Inbound custom cleared

This commit is contained in:
Fairuz
2021-09-27 09:48:00 +08:00
parent 4626eb937e
commit ed637739cc
6 changed files with 243 additions and 1 deletions
@@ -0,0 +1,66 @@
<?php
namespace App\Classes\Modules\PackingLists\ControllersLogic\Containers;
use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\PackingLists\Services\Containers\ListsContainers;
use App\Classes\Modules\PackingLists\Standards\Rules\Containers\CanListContainers;
use App\Classes\Modules\PackingLists\Processors\FetchInboundCustomClearedProcessor;
use App\Http\Resources\ContainerResource;
use ErrorException;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class InboundCustomClearedLogic extends AbstractControllerLogic
{
/**
* @return array
*/
protected function notification():array {
return [
'title' => 'Retrieved Containers',
'message' => 'You have successfully retrieved a list of Containers'
];
}
/** @var CanListContainers */
private $canListContainers;
/** @var ListsContainers */
private $listsContainers;
private $fetchInboundCustomCleared;
/**
* ListContainersLogic constructor.
* @param CanListContainers $canListContainers
* @param ListsContainers $listsContainers
*/
public function __construct(CanListContainers $canListContainers, ListsContainers $listsContainers, FetchInboundCustomClearedProcessor $fetchInboundCustomCleared)
{
$this->canListContainers = $canListContainers;
$this->listsContainers = $listsContainers;
$this->fetchInboundCustomCleared = $fetchInboundCustomCleared;
}
/**
* @param Request $request
* @return JsonResponse
* @throws ErrorException
*/
public function logic(Request $request) : JsonResponse
{
//$this->canListOrders->passes();
//$query = $this->listsOrders->execute(array_merge($this->listsOrders->deserializeFilters($request->input('filters')), ['with_parcels' => true]));
$d = $this->fetchInboundCustomCleared->execute();
return response()->json($d);
}
}