-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:inikoo/aiku
- Loading branch information
Showing
43 changed files
with
1,164 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 0 additions & 44 deletions
44
app/Actions/HumanResources/Employee/UI/GetJobPositionsGroupData.php
This file was deleted.
Oops, something went wrong.
29 changes: 29 additions & 0 deletions
29
app/Actions/HumanResources/Employee/UI/GetPermissionGroupData.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
/* | ||
* Author: Raul Perusquia <[email protected]> | ||
* Created: Tue, 14 Mar 2023 19:13:28 Malaysia Time, Kuala Lumpur, Malaysia | ||
* Copyright (c) 2023, Raul A Perusquia Flores | ||
*/ | ||
|
||
namespace App\Actions\HumanResources\Employee\UI; | ||
|
||
use App\Models\HumanResources\Employee; | ||
use App\Models\SysAdmin\Group; | ||
use App\Models\SysAdmin\Guest; | ||
use App\Models\SysAdmin\User; | ||
use Lorisleiva\Actions\Concerns\AsAction; | ||
|
||
class GetPermissionGroupData | ||
{ | ||
use AsAction; | ||
|
||
public function handle(Employee|User|Guest $user, Group $group): array | ||
{ | ||
return (array) $user->permissions->map(function ($permission) use ($group) { | ||
return [$permission->name]; | ||
})->reduce(function ($carry, $item) { | ||
return array_merge_recursive($carry, $item); | ||
}, []); | ||
} | ||
} |
86 changes: 86 additions & 0 deletions
86
app/Actions/Retina/Storage/Pallet/Search/PalletRecordSearch.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<?php | ||
|
||
/* | ||
* Author: Ganes <[email protected]> | ||
* Created on: 07-01-2025, Bali, Indonesia | ||
* Github: https://github.com/Ganes556 | ||
* Copyright: 2025 | ||
* | ||
*/ | ||
|
||
namespace App\Actions\Retina\Storage\Pallet\Search; | ||
|
||
use App\Models\Billables\Rental; | ||
use App\Models\Fulfilment\Pallet; | ||
use Lorisleiva\Actions\Concerns\AsAction; | ||
|
||
class PalletRecordSearch | ||
{ | ||
use AsAction; | ||
|
||
public string $jobQueue = 'retina-search'; | ||
|
||
public function handle(Pallet $pallet): void | ||
{ | ||
if ($pallet->trashed()) { | ||
|
||
if ($pallet->retinaSearch) { | ||
$pallet->retinaSearch()->delete(); | ||
} | ||
return; | ||
} | ||
|
||
$rental = Rental::find($pallet->rental_id) ?? null; | ||
|
||
$pallet->retinaSearch()->updateOrCreate( | ||
[], | ||
[ | ||
'group_id' => $pallet->group_id, | ||
'organisation_id' => $pallet->organisation_id, | ||
'customer_id' => $pallet->fulfilmentCustomer->customer_id, | ||
'haystack_tier_1' => trim($pallet->reference . ' ' . $rental->name), | ||
'keyword' => $pallet->slug, | ||
'keyword_2' => $pallet->reference, | ||
'result' => [ | ||
'route' => [ | ||
'name' => 'retina.storage.pallets.show', | ||
'parameters' => [ | ||
'pallet' => $pallet->slug | ||
] | ||
], | ||
'icon' => [ | ||
'icon' => 'fal fa-pallet', | ||
], | ||
'code' => [ | ||
'label' => $pallet->reference, | ||
'tooltip' => __('Reference') | ||
], | ||
'description' => [ | ||
'label' => $rental->name | ||
], | ||
'state_icon' => $pallet->type->typeIcon()[$pallet->type->value], | ||
'meta' => [ | ||
[ | ||
'key' => __("customer_reference"), | ||
'label' => __("Pallet reference (customer's), notes") . ': ' . __($pallet->customer_reference), | ||
'tooltip' => __("Pallet reference (customer's), notes") | ||
], | ||
[ | ||
'key' => __("state"), | ||
'icon' => $pallet->state->stateIcon()[$pallet->state->value], | ||
'label' => __("State") . ': ' . __($pallet->state->value), | ||
'tooltip' => __("State") | ||
], | ||
[ | ||
'key' => __("status"), | ||
'icon' => $pallet->status->statusIcon()[$pallet->status->value], | ||
'label' => __("Status") . ': ' . __($pallet->status->value), | ||
'tooltip' => __("Status") | ||
], | ||
], | ||
] | ||
] | ||
); | ||
} | ||
|
||
} |
Oops, something went wrong.