-
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 https://github.com/inikoo/aiku into main
- Loading branch information
Showing
28 changed files
with
681 additions
and
96 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
41 changes: 41 additions & 0 deletions
41
app/Actions/Fulfilment/PalletDelivery/Json/ShowPalletDeliveryStatus.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,41 @@ | ||
<?php | ||
|
||
/* | ||
* Author: Raul Perusquia <[email protected]> | ||
* Created: Thu, 11 Jul 2024 13:54:36 Malaysia Time, Kuala Lumpur, Malaysia | ||
* Copyright (c) 2024, Raul A Perusquia Flores | ||
*/ | ||
|
||
namespace App\Actions\Fulfilment\PalletDelivery\Json; | ||
|
||
use App\Actions\OrgAction; | ||
use App\Http\Resources\Fulfilment\PalletDeliveryStatusResource; | ||
use App\Models\Fulfilment\PalletDelivery; | ||
use Lorisleiva\Actions\ActionRequest; | ||
|
||
class ShowPalletDeliveryStatus extends OrgAction | ||
{ | ||
public function handle(PalletDelivery $palletDelivery): PalletDelivery | ||
{ | ||
return $palletDelivery; | ||
} | ||
|
||
public function authorize(ActionRequest $request): bool | ||
{ | ||
return $request->user()->authTo("fulfilment-shop.{$this->fulfilment->id}.view"); | ||
} | ||
|
||
public function asController(PalletDelivery $palletDelivery, ActionRequest $request): PalletDelivery | ||
{ | ||
$this->initialisationFromFulfilment($palletDelivery->fulfilment, $request); | ||
|
||
return $this->handle($palletDelivery); | ||
} | ||
|
||
|
||
|
||
public function jsonResponse(PalletDelivery $palletDelivery): PalletDeliveryStatusResource | ||
{ | ||
return PalletDeliveryStatusResource::make($palletDelivery); | ||
} | ||
} |
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
Oops, something went wrong.