mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-23 06:24:21 +00:00
Merge remote-tracking branch 'origin/master'
# Conflicts: # app/Http/Resources/OrderResource.php # resources/assets/vue/components/orders/sections/OrderProfileSectionComponent.vue
This commit is contained in:
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\Orders\ControllersLogic;
|
||||
|
||||
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
||||
use App\Classes\Modules\PackingLists\Processors\CreatePackingListProcessor;
|
||||
use App\Classes\Modules\PackingLists\Processors\CreatePackageProcessor;
|
||||
use App\Classes\Modules\Orders\Services\FetchesOrder;
|
||||
use App\Classes\Modules\Transports\Services\CreatesTransport;
|
||||
use App\Classes\Modules\PackingLists\Services\GeneratesPackingListReferenceNumber;
|
||||
use App\Classes\Modules\Schedules\Services\CreatesSchedule;
|
||||
use App\Classes\Modules\PackingLists\DataTransferObjects\PackingListObject;
|
||||
use App\Classes\Modules\PackingLists\DataTransferObjects\PackageObject;
|
||||
use App\Classes\Modules\Transports\DataTransferObjects\TransportObject;
|
||||
use App\Classes\Modules\Schedules\DataTransferObjects\ScheduleObject;
|
||||
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
use App\Classes\ValueObjects\Constants\OrderRoleTypes;
|
||||
use App\Classes\ValueObjects\Constants\PackingListType;
|
||||
use App\Classes\ValueObjects\Constants\TransportType;
|
||||
|
||||
use App\Http\Resources\PackingListResource;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class CreateShippingPackingListLogic extends AbstractControllerLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected function notification():array {
|
||||
return [
|
||||
'title' => 'Created PackingList',
|
||||
'message' => 'You have successfully created a new PackingList'
|
||||
];
|
||||
}
|
||||
|
||||
/** @var CreatePackingListProcessor */
|
||||
private $createPackingListProcessor;
|
||||
|
||||
/** @var GeneratesPackingListReferenceNumber */
|
||||
private $generatesPackingListReferenceNumber;
|
||||
|
||||
/** @var CreatesTransport */
|
||||
private $createsTransport;
|
||||
|
||||
/** @var CreatePackageProcessor */
|
||||
private $createPackageProcessor;
|
||||
|
||||
/** @var CreatesSchedule */
|
||||
private $createsSchedule;
|
||||
|
||||
/** @var FetchesOrder */
|
||||
private $fetchesOrder;
|
||||
|
||||
/**
|
||||
* CreatePackingListLogic constructor.
|
||||
* @param CreatePackingListProcessor $createPackingListProcessor
|
||||
* @param FetchesOrder $fetchesOrder
|
||||
*/
|
||||
public function __construct(
|
||||
CreatePackingListProcessor $createPackingListProcessor,
|
||||
CreatesTransport $createsTransport,
|
||||
CreatesSchedule $createsSchedule,
|
||||
CreatePackageProcessor $createPackageProcessor,
|
||||
GeneratesPackingListReferenceNumber $generatesPackingListReferenceNumber,
|
||||
FetchesOrder $fetchesOrder
|
||||
)
|
||||
{
|
||||
$this->createPackingListProcessor = $createPackingListProcessor;
|
||||
$this->createsTransport = $createsTransport;
|
||||
$this->createsSchedule = $createsSchedule;
|
||||
$this->createPackageProcessor = $createPackageProcessor;
|
||||
$this->generatesPackingListReferenceNumber = $generatesPackingListReferenceNumber;
|
||||
$this->fetchesOrder = $fetchesOrder;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function logic(Request $request) : JsonResponse
|
||||
{
|
||||
$order = $this->fetchesOrder->execute(['id' => $request->input('order_id')]);
|
||||
|
||||
$reference_number = $this->generatesPackingListReferenceNumber->execute();
|
||||
|
||||
$packingListObject = new PackingListObject(
|
||||
$reference_number,
|
||||
$order->orderRoles()->where('role_id', '=', OrderRoleTypes::ORIGIN_WAREHOUSE)->first()->appointee->id,
|
||||
PackingListType::SHIPPING_PACKING_LIST,
|
||||
ApprovalStatus::PENDING_SUBMISSION
|
||||
);
|
||||
$packingList = $this->createPackingListProcessor->execute($packingListObject, $order);
|
||||
|
||||
$packages = $request->input('packages');
|
||||
|
||||
foreach ($packages as $key => $row) {
|
||||
$packageObject = new PackageObject(
|
||||
$row['type'],
|
||||
$row['description'],
|
||||
$row['width'],
|
||||
$row['height'],
|
||||
$row['length'],
|
||||
$row['weight'],
|
||||
$row['quantity'],
|
||||
ApprovalStatus::APPROVED,
|
||||
$row['reference'],
|
||||
);
|
||||
$this->createPackageProcessor->execute($packageObject, $packingList);
|
||||
}
|
||||
|
||||
return $this->resourceResponse(new PackingListResource($packingList));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\Orders\ControllersLogic;
|
||||
|
||||
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
||||
use App\Classes\Modules\PackingLists\Processors\CreatePackingListProcessor;
|
||||
use App\Classes\Modules\PackingLists\Processors\CreatePackageProcessor;
|
||||
use App\Classes\Modules\Orders\Services\FetchesOrder;
|
||||
use App\Classes\Modules\Transports\Services\CreatesTransport;
|
||||
use App\Classes\Modules\PackingLists\Services\GeneratesPackingListReferenceNumber;
|
||||
use App\Classes\Modules\Schedules\Services\CreatesSchedule;
|
||||
use App\Classes\Modules\PackingLists\DataTransferObjects\PackingListObject;
|
||||
use App\Classes\Modules\PackingLists\DataTransferObjects\PackageObject;
|
||||
use App\Classes\Modules\Transports\DataTransferObjects\TransportObject;
|
||||
use App\Classes\Modules\Schedules\DataTransferObjects\ScheduleObject;
|
||||
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
use App\Classes\ValueObjects\Constants\OrderRoleTypes;
|
||||
use App\Classes\ValueObjects\Constants\PackingListType;
|
||||
use App\Classes\ValueObjects\Constants\TransportType;
|
||||
|
||||
use App\Http\Resources\PackingListResource;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class CreateWarehousePackingListLogic extends AbstractControllerLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected function notification():array {
|
||||
return [
|
||||
'title' => 'Created Warehouse PackingList',
|
||||
'message' => 'You have successfully created a new Warehouse PackingList'
|
||||
];
|
||||
}
|
||||
|
||||
/** @var CreatePackingListProcessor */
|
||||
private $createPackingListProcessor;
|
||||
|
||||
/** @var GeneratesPackingListReferenceNumber */
|
||||
private $generatesPackingListReferenceNumber;
|
||||
|
||||
/** @var CreatesTransport */
|
||||
private $createsTransport;
|
||||
|
||||
/** @var CreatePackageProcessor */
|
||||
private $createPackageProcessor;
|
||||
|
||||
/** @var CreatesSchedule */
|
||||
private $createsSchedule;
|
||||
|
||||
/** @var FetchesOrder */
|
||||
private $fetchesOrder;
|
||||
|
||||
/**
|
||||
* CreatePackingListLogic constructor.
|
||||
* @param CreatePackingListProcessor $createPackingListProcessor
|
||||
* @param FetchesOrder $fetchesOrder
|
||||
*/
|
||||
public function __construct(
|
||||
CreatePackingListProcessor $createPackingListProcessor,
|
||||
CreatesTransport $createsTransport,
|
||||
CreatesSchedule $createsSchedule,
|
||||
CreatePackageProcessor $createPackageProcessor,
|
||||
GeneratesPackingListReferenceNumber $generatesPackingListReferenceNumber,
|
||||
FetchesOrder $fetchesOrder
|
||||
)
|
||||
{
|
||||
$this->createPackingListProcessor = $createPackingListProcessor;
|
||||
$this->createsTransport = $createsTransport;
|
||||
$this->createsSchedule = $createsSchedule;
|
||||
$this->createPackageProcessor = $createPackageProcessor;
|
||||
$this->generatesPackingListReferenceNumber = $generatesPackingListReferenceNumber;
|
||||
$this->fetchesOrder = $fetchesOrder;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function logic(Request $request) : JsonResponse
|
||||
{
|
||||
$order = $this->fetchesOrder->execute(['id' => $request->input('order_id')]);
|
||||
|
||||
$reference_number = $this->generatesPackingListReferenceNumber->execute();
|
||||
|
||||
$packingListObject = new PackingListObject(
|
||||
$reference_number,
|
||||
$order->orderRoles()->where('role_id', '=', OrderRoleTypes::ORIGIN_WAREHOUSE)->first()->appointee->id,
|
||||
PackingListType::WAREHOUSE_RECEIVE_LIST,
|
||||
ApprovalStatus::PENDING_SUBMISSION
|
||||
);
|
||||
$packingList = $this->createPackingListProcessor->execute($packingListObject, $order);
|
||||
|
||||
$transportObject = new TransportObject(TransportType::LAND, null, $request->input('tracking'), Carbon::parse($request->input('receive_date')), Carbon::parse($request->input('receive_date')), ApprovalStatus::APPROVED);
|
||||
$transport = $this->createsTransport->execute($transportObject, $packingList);
|
||||
|
||||
$scheduleObject = new ScheduleObject(Carbon::parse($request->input('receive_date')), Carbon::parse($request->input('receive_date')), ApprovalStatus::APPROVED);
|
||||
$schedule = $this->createsSchedule->execute($transport, $scheduleObject);
|
||||
|
||||
$packages = $request->input('packages');
|
||||
|
||||
foreach ($packages as $key => $row) {
|
||||
$packageObject = new PackageObject(
|
||||
$row['type'],
|
||||
$row['description'],
|
||||
$row['width'],
|
||||
$row['height'],
|
||||
$row['length'],
|
||||
$row['weight'],
|
||||
$row['quantity'],
|
||||
ApprovalStatus::APPROVED,
|
||||
$row['reference'],
|
||||
);
|
||||
$this->createPackageProcessor->execute($packageObject, $packingList);
|
||||
}
|
||||
|
||||
return $this->resourceResponse(new PackingListResource($packingList));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\PackingLists\ControllersLogic;
|
||||
|
||||
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
||||
use App\Classes\Modules\PackingLists\Services\UpdatesPackingListStatus;
|
||||
use App\Classes\Modules\PackingLists\Services\FetchesPackingList;
|
||||
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
|
||||
use App\Http\Resources\PackingListResource;
|
||||
use ErrorException;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class CompletePackingListLogic extends AbstractControllerLogic
|
||||
{
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected function notification():array {
|
||||
return [
|
||||
'title' => 'Updated PackingList',
|
||||
'message' => 'You have successfully updated the PackingList'
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/** @var UpdatesPackingListStatus */
|
||||
private $updatesPackingListStatus;
|
||||
|
||||
/** @var FetchesPackingList */
|
||||
private $fetchesPackingList;
|
||||
|
||||
/**
|
||||
* CompletePackingListLogic constructor.
|
||||
* @param CanUpdatePackingList $canUpdatePackingList
|
||||
* @param UpdatesPackingListStatus $updatesPackingListStatus
|
||||
* @param FetchesPackingList $fetchesPackingList
|
||||
*/
|
||||
public function __construct(UpdatesPackingListStatus $updatesPackingListStatus, FetchesPackingList $fetchesPackingList)
|
||||
{
|
||||
$this->updatesPackingListStatus = $updatesPackingListStatus;
|
||||
$this->fetchesPackingList = $fetchesPackingList;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @return JsonResponse
|
||||
* @throws ErrorException
|
||||
*/
|
||||
public function logic(Request $request) : JsonResponse
|
||||
{
|
||||
$packing_list = $this->fetchesPackingList->execute(['id' => $request->route('id')]);
|
||||
$query = $this->updatesPackingListStatus->execute($packing_list, ApprovalStatus::COMPLETED);
|
||||
return $this->resourceResponse(new PackingListResource($packing_list));
|
||||
}
|
||||
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\PackingLists\ControllersLogic\Containers;
|
||||
|
||||
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
||||
use App\Classes\Modules\PackingLists\Services\Containers\UpdatesContainerStatus;
|
||||
use App\Classes\Modules\PackingLists\Services\Containers\FetchesContainer;
|
||||
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
|
||||
use App\Http\Resources\ContainerResource;
|
||||
use ErrorException;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class CompleteContainerLogic extends AbstractControllerLogic
|
||||
{
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected function notification():array {
|
||||
return [
|
||||
'title' => 'Updated Container',
|
||||
'message' => 'You have successfully updated the Container'
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/** @var UpdatesContainerStatus */
|
||||
private $updatesContainerStatus;
|
||||
|
||||
/** @var FetchesContainer */
|
||||
private $fetchesContainer;
|
||||
|
||||
/**
|
||||
* CompleteContainerLogic constructor.
|
||||
* @param CanUpdateContainer $canUpdateContainer
|
||||
* @param UpdatesContainerStatus $updatesContainerStatus
|
||||
* @param FetchesContainer $fetchesContainer
|
||||
*/
|
||||
public function __construct(UpdatesContainerStatus $updatesContainerStatus, FetchesContainer $fetchesContainer)
|
||||
{
|
||||
$this->updatesContainerStatus = $updatesContainerStatus;
|
||||
$this->fetchesContainer = $fetchesContainer;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @return JsonResponse
|
||||
* @throws ErrorException
|
||||
*/
|
||||
public function logic(Request $request) : JsonResponse
|
||||
{
|
||||
$container = $this->fetchesContainer->execute(['id' => $request->route('id')]);
|
||||
$query = $this->updatesContainerStatus->execute($container, ApprovalStatus::COMPLETED);
|
||||
return $this->resourceResponse(new ContainerResource($container));
|
||||
}
|
||||
|
||||
}
|
||||
+2
-4
@@ -23,8 +23,8 @@ class CreateContainerLogic extends AbstractControllerLogic
|
||||
*/
|
||||
protected function notification():array {
|
||||
return [
|
||||
'title' => 'Created PackingList',
|
||||
'message' => 'You have successfully created a new PackingList'
|
||||
'title' => 'Created Container',
|
||||
'message' => 'You have successfully created a new Container'
|
||||
];
|
||||
}
|
||||
|
||||
@@ -66,8 +66,6 @@ class CreateContainerLogic extends AbstractControllerLogic
|
||||
$request->input('status')
|
||||
);
|
||||
|
||||
$company = $this->fetchesCompanyModule->execute(['id' => 2]);
|
||||
|
||||
$this->canCreateContainer->passes($object);
|
||||
|
||||
$query = $this->createsContainer->execute($object, $this->fetchesCompanyModule->execute(['id' => $request->input('company_module_id')]));
|
||||
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\PackingLists\ControllersLogic\Containers;
|
||||
|
||||
|
||||
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
||||
use App\Classes\Modules\Companies\Services\FetchesCompanyModule;
|
||||
use App\Classes\Modules\PackingLists\Services\Containers\CreatesContainer;
|
||||
use App\Classes\Modules\PackingLists\Standards\Rules\Containers\CanCreateContainer;
|
||||
use App\Classes\Modules\Transports\Services\CreatesTransport;
|
||||
use App\Classes\Modules\Schedules\Services\CreatesSchedule;
|
||||
use App\Classes\Modules\PackingLists\DataTransferObjects\ContainerObject;
|
||||
use App\Classes\Modules\Transports\DataTransferObjects\TransportObject;
|
||||
use App\Classes\Modules\Schedules\DataTransferObjects\ScheduleObject;
|
||||
use App\Classes\Modules\PackingLists\Services\FetchesPackingList;
|
||||
use App\Classes\ValueObjects\Constants\TransportType;
|
||||
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
|
||||
use App\Http\Resources\ContainerResource;
|
||||
use ErrorException;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class CreateLoadContainerLogic extends AbstractControllerLogic
|
||||
{
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected function notification():array {
|
||||
return [
|
||||
'title' => 'Created Container',
|
||||
'message' => 'You have successfully created a new Container'
|
||||
];
|
||||
}
|
||||
|
||||
/** @var CanCreateContainer */
|
||||
private $canCreateContainer;
|
||||
|
||||
/** @var FetchesPackingList */
|
||||
private $fetchesPackingList;
|
||||
|
||||
/** @var FetchesCompanyModule */
|
||||
private $fetchesCompanyModule;
|
||||
|
||||
/** @var CreatesPackingList */
|
||||
private $createsContainer;
|
||||
|
||||
/** @var CreatesTransport */
|
||||
private $createsTransport;
|
||||
|
||||
/** @var CreatesSchedule */
|
||||
private $createsSchedule;
|
||||
|
||||
public function __construct(
|
||||
CanCreateContainer $canCreateContainer,
|
||||
FetchesPackingList $fetchesPackingList,
|
||||
FetchesCompanyModule $fetchesCompanyModule,
|
||||
CreatesContainer $createsContainer,
|
||||
CreatesTransport $createsTransport,
|
||||
CreatesSchedule $createsSchedule
|
||||
)
|
||||
{
|
||||
$this->canCreateContainer = $canCreateContainer;
|
||||
$this->fetchesPackingList = $fetchesPackingList;
|
||||
$this->fetchesCompanyModule = $fetchesCompanyModule;
|
||||
$this->createsContainer = $createsContainer;
|
||||
$this->createsTransport = $createsTransport;
|
||||
$this->createsSchedule = $createsSchedule;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @return JsonResponse
|
||||
* @throws \App\Classes\Exceptions\AccessForbiddenException
|
||||
* @throws \App\Classes\Exceptions\MalformedRequestException
|
||||
* @throws \App\Classes\Exceptions\RequestValidationException
|
||||
*/
|
||||
public function logic(Request $request) : JsonResponse
|
||||
{
|
||||
$object = new ContainerObject(
|
||||
$request->input('container_reference'),
|
||||
$request->input('container_number'),
|
||||
$request->input('seal_reference'),
|
||||
$request->input('container_type'),
|
||||
ApprovalStatus::APPROVED
|
||||
);
|
||||
|
||||
$this->canCreateContainer->passes($object);
|
||||
|
||||
$container = $this->createsContainer->execute($object, $this->fetchesCompanyModule->execute(['id' => $request->input('company_module_id')]));
|
||||
|
||||
$transportObject = new TransportObject(
|
||||
TransportType::LAND, null,
|
||||
$request->input('tracking'),
|
||||
Carbon::parse($request->input('etd')),
|
||||
Carbon::parse($request->input('eta')),
|
||||
ApprovalStatus::APPROVED
|
||||
);
|
||||
$transport = $this->createsTransport->execute($transportObject, $container);
|
||||
|
||||
$scheduleObject = new ScheduleObject(
|
||||
Carbon::parse($request->input('etd')),
|
||||
Carbon::parse($request->input('eta')),
|
||||
ApprovalStatus::APPROVED
|
||||
);
|
||||
$schedule = $this->createsSchedule->execute($transport, $scheduleObject);
|
||||
|
||||
return $this->resourceResponse(new ContainerResource($container));
|
||||
}
|
||||
|
||||
}
|
||||
+2
-5
@@ -54,13 +54,10 @@ class InboundCustomClearedLogic extends AbstractControllerLogic
|
||||
*/
|
||||
public function logic(Request $request) : JsonResponse
|
||||
{
|
||||
//$this->canListOrders->passes();
|
||||
|
||||
//$query = $this->listsOrders->execute(array_merge($this->listsOrders->deserializeFilters($request->input('filters')), ['with_parcels' => true]));
|
||||
$query = $this->fetchInboundCustomCleared->execute();
|
||||
|
||||
$d = $this->fetchInboundCustomCleared->execute();
|
||||
|
||||
return response()->json($d);
|
||||
return $this->collectionResponse(ContainerResource::collection($query));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\PackingLists\ControllersLogic\Containers;
|
||||
|
||||
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
||||
use App\Classes\Modules\PackingLists\Services\Containers\FetchesContainer;
|
||||
use App\Classes\Modules\Schedules\Services\CreatesSchedule;
|
||||
use App\Classes\Modules\Schedules\Services\UpdatesScheduleStatus;
|
||||
use App\Classes\Modules\Schedules\DataTransferObjects\ScheduleObject;
|
||||
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
|
||||
use App\Http\Resources\ContainerResource;
|
||||
use ErrorException;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class RescheduleContainerLogic extends AbstractControllerLogic
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected function notification():array {
|
||||
return [
|
||||
'title' => 'Reschedule Container',
|
||||
'message' => 'You have successfully Reschedule Container'
|
||||
];
|
||||
}
|
||||
|
||||
/** @var FetchesContainer */
|
||||
private $fetchesContainer;
|
||||
|
||||
/** @var UpdatesScheduleStatus */
|
||||
private $updatesScheduleStatus;
|
||||
|
||||
/** @var CreatesSchedule */
|
||||
private $createsSchedule;
|
||||
|
||||
/**
|
||||
* DeleteContainerControllersLogic constructor.
|
||||
* @param FetchesContainer $fetchesContainer
|
||||
* @param CreatesSchedule $createsSchedule
|
||||
*/
|
||||
public function __construct(FetchesContainer $fetchesContainer, UpdatesScheduleStatus $updatesScheduleStatus, CreatesSchedule $createsSchedule)
|
||||
{
|
||||
$this->fetchesContainer = $fetchesContainer;
|
||||
$this->updatesScheduleStatus = $updatesScheduleStatus;
|
||||
$this->createsSchedule = $createsSchedule;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @return JsonResponse
|
||||
* @throws ErrorException
|
||||
*/
|
||||
public function logic(Request $request) : JsonResponse
|
||||
{
|
||||
try {
|
||||
$container = $this->fetchesContainer->execute(['id' => $request->route('id')]);
|
||||
$transport = $container->transports()->first();
|
||||
|
||||
$old_sechedule = $transport->schedules()->first();
|
||||
|
||||
$this->updatesScheduleStatus->execute($old_sechedule, ApprovalStatus::REJECTED);
|
||||
|
||||
$scheduleObject = new ScheduleObject(
|
||||
Carbon::parse($request->input('etd')),
|
||||
Carbon::parse($request->input('eta')),
|
||||
ApprovalStatus::APPROVED
|
||||
);
|
||||
$schedule = $this->createsSchedule->execute($transport, $scheduleObject);
|
||||
|
||||
return $this->resourceResponse(new ContainerResource($container));
|
||||
|
||||
} catch (\Exception $exception){
|
||||
throw new ErrorException($exception->getMessage(), $exception->getCode());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\PackingLists\ControllersLogic\Containers;
|
||||
|
||||
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
||||
use App\Classes\Modules\Transports\Services\UpdatesDispatchDateTransport;
|
||||
use App\Classes\Modules\PackingLists\Services\Containers\FetchesContainer;
|
||||
use App\Http\Resources\ContainerResource;
|
||||
use ErrorException;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class UpdateDispatchDateContainerLogic extends AbstractControllerLogic
|
||||
{
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected function notification():array {
|
||||
return [
|
||||
'title' => 'Updated Dispatch Date Container',
|
||||
'message' => 'You have successfully updated the Dispatch Date Container'
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/** @var UpdatesDispatchDateTransport */
|
||||
private $updatesDispatchDateTransport;
|
||||
|
||||
/** @var FetchesContainer */
|
||||
private $fetchesContainer;
|
||||
|
||||
/**
|
||||
* UpdateDispatchDateContainerLogic constructor.
|
||||
* @param CanUpdateContainer $canUpdateContainer
|
||||
* @param UpdatesDispatchDateTransport $updatesDispatchDateTransport
|
||||
* @param FetchesContainer $fetchesContainer
|
||||
*/
|
||||
public function __construct(UpdatesDispatchDateTransport $updatesDispatchDateTransport, FetchesContainer $fetchesContainer)
|
||||
{
|
||||
$this->updatesDispatchDateTransport = $updatesDispatchDateTransport;
|
||||
$this->fetchesContainer = $fetchesContainer;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @return JsonResponse
|
||||
* @throws ErrorException
|
||||
*/
|
||||
public function logic(Request $request) : JsonResponse
|
||||
{
|
||||
$container = $this->fetchesContainer->execute(['id' => $request->route('id')]);
|
||||
$transport = $container->transports()->first();
|
||||
$query = $this->updatesDispatchDateTransport->execute($transport, Carbon::parse($request->input('dispatch_date')));
|
||||
return $this->resourceResponse(new ContainerResource($container));
|
||||
}
|
||||
|
||||
}
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\PackingLists\ControllersLogic\Containers;
|
||||
|
||||
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
||||
use App\Classes\Modules\Transports\Services\UpdatesDropDateTransport;
|
||||
use App\Classes\Modules\PackingLists\Services\Containers\FetchesContainer;
|
||||
use App\Http\Resources\ContainerResource;
|
||||
use ErrorException;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class UpdateDropDateContainerLogic extends AbstractControllerLogic
|
||||
{
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected function notification():array {
|
||||
return [
|
||||
'title' => 'Updated Drop Date Container',
|
||||
'message' => 'You have successfully updated the Drop Date Container'
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/** @var UpdatesDropDateTransport */
|
||||
private $updatesDropDateTransport;
|
||||
|
||||
/** @var FetchesContainer */
|
||||
private $fetchesContainer;
|
||||
|
||||
/**
|
||||
* UpdateDropDateContainerLogic constructor.
|
||||
* @param CanUpdateContainer $canUpdateContainer
|
||||
* @param UpdatesDropDateTransport $updatesDropDateTransport
|
||||
* @param FetchesContainer $fetchesContainer
|
||||
*/
|
||||
public function __construct(UpdatesDropDateTransport $updatesDropDateTransport, FetchesContainer $fetchesContainer)
|
||||
{
|
||||
$this->updatesDropDateTransport = $updatesDropDateTransport;
|
||||
$this->fetchesContainer = $fetchesContainer;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @return JsonResponse
|
||||
* @throws ErrorException
|
||||
*/
|
||||
public function logic(Request $request) : JsonResponse
|
||||
{
|
||||
$container = $this->fetchesContainer->execute(['id' => $request->route('id')]);
|
||||
$transport = $container->transports()->first();
|
||||
$query = $this->updatesDropDateTransport->execute($transport, Carbon::parse($request->input('drop_date')));
|
||||
return $this->resourceResponse(new ContainerResource($container));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -72,7 +72,6 @@ class CreatePackageLogic extends AbstractControllerLogic
|
||||
$request->input('height'),
|
||||
$request->input('length'),
|
||||
$request->input('weight'),
|
||||
0,
|
||||
$request->input('quantity'),
|
||||
ApprovalStatus::PENDING_VERIFICATION);
|
||||
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\PackingLists\ControllersLogic;
|
||||
|
||||
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
||||
use App\Classes\Modules\PackingLists\Services\FetchesPackingList;
|
||||
use App\Classes\Modules\Schedules\Services\CreatesSchedule;
|
||||
use App\Classes\Modules\Schedules\Services\UpdatesScheduleStatus;
|
||||
use App\Classes\Modules\Schedules\DataTransferObjects\ScheduleObject;
|
||||
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
|
||||
use App\Http\Resources\PackingListResource;
|
||||
use ErrorException;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class ReschedulePackingListLogic extends AbstractControllerLogic
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected function notification():array {
|
||||
return [
|
||||
'title' => 'Reschedule Packing List',
|
||||
'message' => 'You have successfully Reschedule Packing List'
|
||||
];
|
||||
}
|
||||
|
||||
/** @var FetchesPackingList */
|
||||
private $fetchesPackingList;
|
||||
|
||||
/** @var UpdatesScheduleStatus */
|
||||
private $updatesScheduleStatus;
|
||||
|
||||
/** @var CreatesSchedule */
|
||||
private $createsSchedule;
|
||||
|
||||
/**
|
||||
* DeleteContainerControllersLogic constructor.
|
||||
* @param FetchesPackingList $fetchesPackingList
|
||||
* @param CreatesSchedule $createsSchedule
|
||||
*/
|
||||
public function __construct(FetchesPackingList $fetchesPackingList, UpdatesScheduleStatus $updatesScheduleStatus, CreatesSchedule $createsSchedule)
|
||||
{
|
||||
$this->fetchesPackingList = $fetchesPackingList;
|
||||
$this->updatesScheduleStatus = $updatesScheduleStatus;
|
||||
$this->createsSchedule = $createsSchedule;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @return JsonResponse
|
||||
* @throws ErrorException
|
||||
*/
|
||||
public function logic(Request $request) : JsonResponse
|
||||
{
|
||||
try {
|
||||
$packing_list = $this->fetchesPackingList->execute(['id' => $request->route('id')]);
|
||||
|
||||
$transport = $packing_list->transports()->first();
|
||||
|
||||
$old_sechedule = $transport->schedules()->first();
|
||||
|
||||
$this->updatesScheduleStatus->execute($old_sechedule, ApprovalStatus::REJECTED);
|
||||
|
||||
$scheduleObject = new ScheduleObject(
|
||||
Carbon::parse($request->input('eta')),
|
||||
Carbon::parse($request->input('etd')),
|
||||
ApprovalStatus::APPROVED
|
||||
);
|
||||
$schedule = $this->createsSchedule->execute($transport, $scheduleObject);
|
||||
|
||||
return $this->resourceResponse(new PackingListResource($packing_list));
|
||||
|
||||
} catch (\Exception $exception){
|
||||
throw new ErrorException($exception->getMessage(), $exception->getCode());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\PackingLists\ControllersLogic;
|
||||
|
||||
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
||||
use App\Classes\Modules\Transports\Services\UpdatesDispatchDateTransport;
|
||||
use App\Classes\Modules\PackingLists\Services\FetchesPackingList;
|
||||
use App\Http\Resources\PackingListResource;
|
||||
use ErrorException;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class UpdateDispatchDatePackingListLogic extends AbstractControllerLogic
|
||||
{
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected function notification():array {
|
||||
return [
|
||||
'title' => 'Updated Dispatch Date Packing List',
|
||||
'message' => 'You have successfully updated the Dispatch Date Packing List'
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/** @var UpdatesDispatchDateTransport */
|
||||
private $updatesDispatchDateTransport;
|
||||
|
||||
/** @var FetchesPackingList */
|
||||
private $fetchesPackingList;
|
||||
|
||||
/**
|
||||
* UpdateDispatchDatePackingListLogic constructor.
|
||||
* @param CanUpdateContainer $canUpdateContainer
|
||||
* @param UpdatesDispatchDateTransport $updatesDispatchDateTransport
|
||||
* @param FetchesPackingList $fetchesPackingList
|
||||
*/
|
||||
public function __construct(UpdatesDispatchDateTransport $updatesDispatchDateTransport, FetchesPackingList $fetchesPackingList)
|
||||
{
|
||||
$this->updatesDispatchDateTransport = $updatesDispatchDateTransport;
|
||||
$this->fetchesPackingList = $fetchesPackingList;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @return JsonResponse
|
||||
* @throws ErrorException
|
||||
*/
|
||||
public function logic(Request $request) : JsonResponse
|
||||
{
|
||||
$packing_list = $this->fetchesPackingList->execute(['id' => $request->route('id')]);
|
||||
$transport = $packing_list->transports()->first();
|
||||
$query = $this->updatesDispatchDateTransport->execute($transport, Carbon::parse($request->input('dispatch_date')));
|
||||
return $this->resourceResponse(new PackingListResource($packing_list));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\PackingLists\ControllersLogic;
|
||||
|
||||
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
||||
use App\Classes\Modules\Transports\Services\UpdatesDropDateTransport;
|
||||
use App\Classes\Modules\PackingLists\Services\FetchesPackingList;
|
||||
use App\Http\Resources\PackingListResource;
|
||||
use ErrorException;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class UpdateDropDatePackingListLogic extends AbstractControllerLogic
|
||||
{
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected function notification():array {
|
||||
return [
|
||||
'title' => 'Updated Drop Date Packing List',
|
||||
'message' => 'You have successfully updated the Drop Date Packing List'
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/** @var UpdatesDropDateTransport */
|
||||
private $updatesDropDateTransport;
|
||||
|
||||
/** @var FetchesPackingList */
|
||||
private $fetchesPackingList;
|
||||
|
||||
/**
|
||||
* UpdateDispatchDatePackingListLogic constructor.
|
||||
* @param CanUpdateContainer $canUpdateContainer
|
||||
* @param UpdatesDropDateTransport $updatesDropDateTransport
|
||||
* @param FetchesPackingList $fetchesPackingList
|
||||
*/
|
||||
public function __construct(UpdatesDropDateTransport $updatesDropDateTransport, FetchesPackingList $fetchesPackingList)
|
||||
{
|
||||
$this->updatesDropDateTransport = $updatesDropDateTransport;
|
||||
$this->fetchesPackingList = $fetchesPackingList;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @return JsonResponse
|
||||
* @throws ErrorException
|
||||
*/
|
||||
public function logic(Request $request) : JsonResponse
|
||||
{
|
||||
$packing_list = $this->fetchesPackingList->execute(['id' => $request->route('id')]);
|
||||
$transport = $packing_list->transports()->first();
|
||||
$query = $this->updatesDropDateTransport->execute($transport, Carbon::parse($request->input('drop_date')));
|
||||
return $this->resourceResponse(new PackingListResource($packing_list));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -20,7 +20,7 @@ class CreatePackingListProcessor
|
||||
|
||||
|
||||
/**
|
||||
* CreatePackingListLogic constructor.
|
||||
* CreatePackingListProcessor constructor.
|
||||
* @param CanCreatePackingList $canCreatePackingList
|
||||
* @param CreatesPackingList $createsPackingList
|
||||
*/
|
||||
|
||||
+15
-41
@@ -55,49 +55,23 @@ class FetchInboundCustomClearedProcessor
|
||||
*/
|
||||
public function execute(){
|
||||
|
||||
$packingLists = PackingList::query()->with(['steps' => function ($query) {
|
||||
$packingLists = PackingList::query()->with(['steps' => function ($query) {
|
||||
$query->where('steps.status', '<>', 3);
|
||||
}])->first();
|
||||
dd($packingLists);
|
||||
/*
|
||||
$packingLists = PackingList::where('type', '=', PackingListType::SHIPPING_PACKING_LIST)
|
||||
->whereIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::SUSPENDED])->get();
|
||||
}])
|
||||
->where('type', PackingListType::SHIPPING_PACKING_LIST)
|
||||
->whereHas('containers', function($query) {
|
||||
return $query->whereHas('transports', function($query){
|
||||
return $query->where('type', '=', TransportType::SEA)->where('status', '=', ApprovalStatus::COMPLETED)->whereHas('schedules', function($query){
|
||||
return $query->where('etd', '<', Carbon::now());
|
||||
});
|
||||
});
|
||||
})->whereDoesntHave('transports', function($query){
|
||||
return $query->where('type', '=', TransportType::LAND)->where('status', '=', ApprovalStatus::APPROVED)->whereHas('schedules', function($query){
|
||||
return $query->where('etd', '<', Carbon::now());
|
||||
});
|
||||
})->get();
|
||||
|
||||
foreach($packingLists as $packingList){
|
||||
try {
|
||||
$filter = '["PoNumber:=%js%\"'.$packingList->reference.'\"\u0000"]';
|
||||
|
||||
$shippingPackingListsRequest = $this->fetchesDataFRomVTPortal->clientRequest('https://portalvt.azurewebsites.net/Services/DataControllerService.asmx/GetPage', 'POST', json_decode('{"controller":"VPodetailparcel","view":"grid1","request":{"PageIndex":-1,"PageSize":10000,"SortExpression":"CreatedOn asc","Filter":'.$filter.'}}'), '');
|
||||
|
||||
$shippingPackingLists = $this->fetchesDataFRomVTPortal->getResponseBody($shippingPackingListsRequest);
|
||||
|
||||
$shippingPackingList = $shippingPackingLists->Rows[0];
|
||||
|
||||
if(!$shippingPackingList[9] && !$shippingPackingList[10]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$packingList->status = ApprovalStatus::COMPLETED;
|
||||
$packingList->save();
|
||||
|
||||
$deliveryDate = Carbon::parse($shippingPackingList[9] ? $shippingPackingList[9]:$shippingPackingList[10]);
|
||||
$transportObject = new TransportObject(TransportType::LAND, null, null, $deliveryDate, $deliveryDate, ApprovalStatus::APPROVED);
|
||||
$transport = $this->createsTransport->execute($transportObject, $packingList);
|
||||
$this->createsSchedule->execute($transport, new ScheduleObject($deliveryDate, $deliveryDate, ApprovalStatus::APPROVED));
|
||||
|
||||
$deliveryStep = $packingList->steps()->where('reference', '=', 'LAST_MILE_DELIVERY')->first();
|
||||
$signature = $packingList->owner->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->appointee->entity_sigiture;
|
||||
$this->updatesContractObligations->execute($signature, $deliveryStep->obligation_hash_id);
|
||||
$deliveryStep->update(['status' => ApprovalStatus::COMPLETED]);
|
||||
|
||||
} catch (GuzzleException $exception) {
|
||||
continue;
|
||||
}
|
||||
|
||||
}*/
|
||||
|
||||
|
||||
return [];
|
||||
return $packingLists ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\PackingLists\Services;
|
||||
|
||||
use App\Models\Order;
|
||||
|
||||
class ChecksIfPackingListReferenceNumberExists
|
||||
{
|
||||
|
||||
private $repository;
|
||||
|
||||
public function __construct(Order $repository)
|
||||
{
|
||||
$this->repository = $repository;
|
||||
}
|
||||
|
||||
public function execute(string $reference_number): bool {
|
||||
return $this->repository->where('reference', $reference_number)->exists();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\PackingLists\Services\Containers;
|
||||
|
||||
use App\Classes\General\Eloquent\AbstractUpdateRecord;
|
||||
use App\Models\Container;
|
||||
|
||||
class UpdatesContainerStatus extends AbstractUpdateRecord
|
||||
{
|
||||
|
||||
/**
|
||||
* @param Container $model
|
||||
* @param int $status
|
||||
* @return \Illuminate\Database\Eloquent\Model
|
||||
* @throws \App\Classes\Exceptions\MalformedRequestException
|
||||
*/
|
||||
public function execute(Container $model, int $status) {
|
||||
|
||||
$model->status = $status;
|
||||
|
||||
return $this->handler($model);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\PackingLists\Services;
|
||||
|
||||
|
||||
class GeneratesPackingListReferenceNumber
|
||||
{
|
||||
|
||||
/** @var ChecksIfPackingListReferenceNumberExists */
|
||||
private $checksIfPackingListReferenceNumberExists;
|
||||
|
||||
/**
|
||||
* GeneratesTransactionBillNo constructor.
|
||||
* @param ChecksIfPackingListReferenceNumberExists $checksIfPackingListRefrenceNumberExists
|
||||
*/
|
||||
public function __construct(ChecksIfPackingListReferenceNumberExists $checksIfPackingListReferenceNumberExists)
|
||||
{
|
||||
$this->checksIfPackingListReferenceNumberExists = $checksIfPackingListReferenceNumberExists;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function execute(): string {
|
||||
|
||||
$referenceNumber = mt_rand(10000000, 99999999);
|
||||
|
||||
return !$this->checksIfPackingListReferenceNumberExists->execute($referenceNumber) ? $referenceNumber : self::execute();
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,7 @@ class ScheduleObject implements DataTransferObject
|
||||
* @param Carbon $eta
|
||||
* @param int $status
|
||||
*/
|
||||
public function __construct(Carbon $etd, Carbon $eta, int $status)
|
||||
public function __construct(?Carbon $etd, ?Carbon $eta, int $status)
|
||||
{
|
||||
$this->etd = $etd;
|
||||
$this->eta = $eta;
|
||||
@@ -33,7 +33,7 @@ class ScheduleObject implements DataTransferObject
|
||||
/**
|
||||
* @return Carbon
|
||||
*/
|
||||
public function getEtd(): Carbon
|
||||
public function getEtd(): ?Carbon
|
||||
{
|
||||
return $this->etd;
|
||||
}
|
||||
@@ -41,7 +41,7 @@ class ScheduleObject implements DataTransferObject
|
||||
/**
|
||||
* @return Carbon
|
||||
*/
|
||||
public function getEta(): Carbon
|
||||
public function getEta(): ?Carbon
|
||||
{
|
||||
return $this->eta;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\Schedules\Services;
|
||||
|
||||
use App\Classes\General\Eloquent\AbstractUpdateRecord;
|
||||
use App\Models\Schedule;
|
||||
|
||||
class UpdatesScheduleStatus extends AbstractUpdateRecord
|
||||
{
|
||||
|
||||
/**
|
||||
* @param Schedule $model
|
||||
* @param int $status
|
||||
* @return \Illuminate\Database\Eloquent\Model
|
||||
* @throws \App\Classes\Exceptions\MalformedRequestException
|
||||
*/
|
||||
public function execute(Schedule $model, int $status) {
|
||||
|
||||
$model->status = $status;
|
||||
|
||||
return $this->handler($model);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\Transports\Services;
|
||||
|
||||
use App\Classes\General\Eloquent\AbstractUpdateRecord;
|
||||
use App\Classes\Modules\Transports\DataTransferObjects\TransportObject;
|
||||
use App\Models\Transport;
|
||||
|
||||
class UpdatesDispatchDateTransport extends AbstractUpdateRecord
|
||||
{
|
||||
|
||||
/**
|
||||
* @param Transport $model
|
||||
* @return \Illuminate\Database\Eloquent\Model
|
||||
* @throws \App\Classes\Exceptions\MalformedRequestException
|
||||
*/
|
||||
public function execute(Transport $model, $date) {
|
||||
|
||||
$model->dispatch_date = $date;
|
||||
return $this->handler($model);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\Transports\Services;
|
||||
|
||||
use App\Classes\General\Eloquent\AbstractUpdateRecord;
|
||||
use App\Classes\Modules\Transports\DataTransferObjects\TransportObject;
|
||||
use App\Models\Transport;
|
||||
|
||||
class UpdatesDropDateTransport extends AbstractUpdateRecord
|
||||
{
|
||||
|
||||
/**
|
||||
* @param Transport $model
|
||||
* @return \Illuminate\Database\Eloquent\Model
|
||||
* @throws \App\Classes\Exceptions\MalformedRequestException
|
||||
*/
|
||||
public function execute(Transport $model, $date) {
|
||||
|
||||
$model->drop_date = $date;
|
||||
return $this->handler($model);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Orders;
|
||||
|
||||
use App\Classes\Modules\Orders\ControllersLogic\CreateShippingPackingListLogic;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class CreateShippingPackingListController
|
||||
{
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param CreateShippingPackingListLogic $logic
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function create(Request $request, CreateShippingPackingListLogic $logic): JsonResponse
|
||||
{
|
||||
return $logic->execute($request);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Orders;
|
||||
|
||||
use App\Classes\Modules\Orders\ControllersLogic\CreateWarehousePackingListLogic;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class CreateWarehousePackingListController
|
||||
{
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param CreateWarehousePackingListLogic $logic
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function create(Request $request, CreateWarehousePackingListLogic $logic): JsonResponse
|
||||
{
|
||||
return $logic->execute($request);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\PackingLists;
|
||||
|
||||
use App\Classes\Modules\PackingLists\ControllersLogic\CompletePackingListLogic;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class CompletePackingListController
|
||||
{
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param CompletePackingListLogic $logic
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function complete(Request $request, CompletePackingListLogic $logic): JsonResponse {
|
||||
return $logic->execute($request);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\PackingLists\Containers;
|
||||
|
||||
use App\Classes\Modules\PackingLists\ControllersLogic\Containers\CompleteContainerLogic;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class CompleteContainerController
|
||||
{
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param CompleteContainerLogic $logic
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function complete(Request $request, CompleteContainerLogic $logic): JsonResponse {
|
||||
return $logic->execute($request);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\PackingLists\Containers;
|
||||
|
||||
use App\Classes\Modules\PackingLists\ControllersLogic\Containers\CreateLoadContainerLogic;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class CreateLoadContainerController
|
||||
{
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param CreateLoadContainerLogic $logic
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function create(Request $request, CreateLoadContainerLogic $logic): JsonResponse {
|
||||
return $logic->execute($request);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\PackingLists\Containers;
|
||||
|
||||
use App\Classes\Modules\PackingLists\ControllersLogic\Containers\RescheduleContainerLogic;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class RescheduleContainerController
|
||||
{
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param RescheduleContainerLogic $logic
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function reschedule(Request $request, RescheduleContainerLogic $logic): JsonResponse {
|
||||
return $logic->execute($request);
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\PackingLists\Containers;
|
||||
|
||||
use App\Classes\Modules\PackingLists\ControllersLogic\Containers\UpdateDispatchDateContainerLogic;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class UpdateDispatchDateContainerController
|
||||
{
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param UpdateDispatchDateContainerLogic $logic
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function update(Request $request, UpdateDispatchDateContainerLogic $logic): JsonResponse {
|
||||
return $logic->execute($request);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\PackingLists\Containers;
|
||||
|
||||
use App\Classes\Modules\PackingLists\ControllersLogic\Containers\UpdateDropDateContainerLogic;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class UpdateDropDateContainerController
|
||||
{
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param UpdateDropDateContainerLogic $logic
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function update(Request $request, UpdateDropDateContainerLogic $logic): JsonResponse {
|
||||
return $logic->execute($request);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\PackingLists;
|
||||
|
||||
use App\Classes\Modules\PackingLists\ControllersLogic\ReschedulePackingListLogic;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ReschedulePackingListController
|
||||
{
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param ReschedulePackingListLogic $logic
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function reschedule(Request $request, ReschedulePackingListLogic $logic): JsonResponse {
|
||||
return $logic->execute($request);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\PackingLists;
|
||||
|
||||
use App\Classes\Modules\PackingLists\ControllersLogic\UpdateDispatchDatePackingListLogic;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class UpdateDispatchDatePackingListController
|
||||
{
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param UpdateDispatchDatePackingListLogic $logic
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function update(Request $request, UpdateDispatchDatePackingListLogic $logic): JsonResponse {
|
||||
return $logic->execute($request);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\PackingLists;
|
||||
|
||||
use App\Classes\Modules\PackingLists\ControllersLogic\UpdateDropDatePackingListLogic;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class UpdateDropDatePackingListController
|
||||
{
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param UpdateDropDatePackingListLogic $logic
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function update(Request $request, UpdateDropDatePackingListLogic $logic): JsonResponse {
|
||||
return $logic->execute($request);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -16,8 +16,8 @@ class ScheduleResource extends JsonResource
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'etd' => $this->etd->format('d-m-Y'),
|
||||
'eta' => $this->eta->format('d-m-Y'),
|
||||
'etd' => $this->etd ? $this->etd->format('d-m-Y') : 'n/a',
|
||||
'eta' => $this->eta ? $this->eta->format('d-m-Y') : 'n/a',
|
||||
'status' => $this->status,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
"v-money": "^0.8.1",
|
||||
"vue": "^2.6.10",
|
||||
"vue-avatar": "^2.1.8",
|
||||
"vue-bootstrap-datetimepicker": "^5.0.1",
|
||||
"vue-debounce": "^2.6.0",
|
||||
"vue-template-compiler": "^2.6.10",
|
||||
"vue-the-mask": "^0.11.1",
|
||||
|
||||
@@ -560,7 +560,6 @@ input[type=checkbox]:checked + label{
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
padding-bottom: 4px;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
@include transition(background-color .2s ease);
|
||||
&.required:after {
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<div class="row" style="width: 450px; margin: auto;" @keyup.enter="submitForm">
|
||||
<div class="col bg-white padding-40 b-rad-lg">
|
||||
<div class="row m-auto" style="width: 300px;">
|
||||
<div class="col text-center">
|
||||
<p :class="[{'hide': expanded}]">Are you sure this container has arrived the Destination Port today?</p>
|
||||
<p :class="[{'hide': !expanded}]">Plese select the actual date of arrival for this container.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-20" :class="[{'hide': !expanded}]">
|
||||
<div class="col">
|
||||
<div class="row m-auto mt-10 mb-10">
|
||||
<div class="col">
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.eta">
|
||||
<label class="text-primary">Date of Arrival </label>
|
||||
<date-picker-component :parameters="parameters" :value="'eta'"></date-picker-component>
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-15">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col-auto p-r-5">
|
||||
<div class="btn btn-lg btn-default b-rad-none" data-dismiss="modal">Cancel</div>
|
||||
</div>
|
||||
<div class="col p-l-5">
|
||||
<div class="btn btn-primary w-100 btn-lg" @click="submit(route('api.packing_list.container.update_dispatch_date', data.id), 'put', section, true, true)">Confirm</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-right small-text m-b-0" @click="expanded = !expanded" >Choose another Date</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import modalFormHandler from '../../../general/mixins/modalFormHandler';
|
||||
import { required } from "vuelidate/lib/validators";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
parameters: {
|
||||
eta: new Date().toJSON().slice(0,10).replace(/-/g,'/'),
|
||||
},
|
||||
expanded: false,
|
||||
};
|
||||
},
|
||||
validations: {
|
||||
parameters: {
|
||||
eta: { required },
|
||||
}
|
||||
},
|
||||
mixins: [modalFormHandler]
|
||||
}
|
||||
</script>
|
||||
File diff suppressed because one or more lines are too long
+58
@@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<div class="row" style="width: 450px; margin: auto;" @keyup.enter="submitForm">
|
||||
<div class="col bg-white padding-40 b-rad-lg">
|
||||
<div class="row m-auto" style="width: 300px;">
|
||||
<div class="col text-center">
|
||||
<p :class="[{'hide': expanded}]">Are you sure the container has depart from the origin port today?</p>
|
||||
<p :class="[{'hide': !expanded}]">Plese select the actual date of departure for this container.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-20" :class="[{'hide': !expanded}]">
|
||||
<div class="col">
|
||||
<div class="row m-auto mt-10 mb-10">
|
||||
<div class="col">
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.etd">
|
||||
<label class="text-primary">Date of Departure</label>
|
||||
<date-picker-component :parameters="parameters" :value="'etd'"></date-picker-component>
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-15">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col-auto p-r-5">
|
||||
<div class="btn btn-lg btn-default b-rad-none" data-dismiss="modal">Cancel</div>
|
||||
</div>
|
||||
<div class="col p-l-5">
|
||||
<div class="btn btn-primary w-100 btn-lg" @click="submit(route('api.packing_list.container.update_drop_date', data.id), 'put', section, true, true)">Confirm</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-right small-text m-b-0 cursor" @click="expanded = !expanded" >Choose another Date</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import modalFormHandler from '../../../general/mixins/modalFormHandler';
|
||||
import { required } from "vuelidate/lib/validators";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
parameters: {
|
||||
etd: new Date().toJSON().slice(0,10).replace(/-/g,'/'),
|
||||
},
|
||||
expanded: false,
|
||||
};
|
||||
},
|
||||
validations: {
|
||||
parameters: {
|
||||
etd: { required },
|
||||
}
|
||||
},
|
||||
mixins: [modalFormHandler]
|
||||
}
|
||||
</script>
|
||||
+553
-223
@@ -1,144 +1,240 @@
|
||||
<template>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row align-items-center">
|
||||
<div class="col bg-master-light rounded padding-20 m-l-10 m-r-10">
|
||||
<div class="row d-flex justify-content-between align-items-center">
|
||||
<div class="col-auto">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h5 class="bold m-b-0">{{container.container_reference}}</h5>
|
||||
<p>{{container.container_number}}</p>
|
||||
<style scoped>
|
||||
.percentageContainer{
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border: 1px solid #444;
|
||||
position: relative;
|
||||
}
|
||||
.percentageInner{
|
||||
position: absolute;
|
||||
width: calc(100% - 2px);
|
||||
height: calc(100% - 2px);
|
||||
margin: 1px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
bottom: 0;
|
||||
}
|
||||
.percentageInnerText{
|
||||
position: absolute;
|
||||
width: calc(100% - 2px);
|
||||
height: calc(100% - 2px);
|
||||
margin: 1px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* timeline */
|
||||
ul.timeline_ul {
|
||||
list-style-type: none;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
ul.timeline_ul:before {
|
||||
content: ' ';
|
||||
background: #d4d9df;
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
left: 21px;
|
||||
width: 2px;
|
||||
height: 100%;
|
||||
z-index: 1;
|
||||
margin-top: 13px;
|
||||
}
|
||||
|
||||
ul.timeline_ul>li {
|
||||
margin: 10px 0;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
ul.timeline_ul>li:before {
|
||||
content: ' ';
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
left: 12px;
|
||||
z-index: 1;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
margin-top: 3px;
|
||||
opacity: 12%;
|
||||
}
|
||||
ul.timeline_ul>li .row:before {
|
||||
content: ' ';
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
left: 16px;
|
||||
z-index: 2;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 50%;
|
||||
margin-top: 7px;
|
||||
}
|
||||
|
||||
ul.timeline_ul>li.bg-blue:before,
|
||||
ul.timeline_ul>li.bg-blue .row:before {
|
||||
background: #00CFE8;
|
||||
}
|
||||
|
||||
ul.timeline_ul>li.bg-purple:before,
|
||||
ul.timeline_ul>li.bg-purple .row:before {
|
||||
background: #7367F0;
|
||||
}
|
||||
|
||||
ul.timeline_ul>li.bg-orange:before,
|
||||
ul.timeline_ul>li.bg-orange .row:before {
|
||||
background: #FF9F43;
|
||||
}
|
||||
|
||||
/* delivery_status_ul */
|
||||
.delivery_status{
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.delivery_status hr{
|
||||
background: #A6A6A6;
|
||||
display: block;
|
||||
height: 2px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.delivery_status .overlay12 {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
justify-content: space-between;
|
||||
align-self: center;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.delivery_status .overlay12 .dot {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
margin-top: auto;
|
||||
margin-bottom: auto;
|
||||
|
||||
border: 2px solid #A6A6A6;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.delivery_status .overlay12 .dot.checked {
|
||||
border: 2px solid #912873;
|
||||
background-color: #912873;
|
||||
position:relative;
|
||||
}
|
||||
|
||||
.delivery_status .overlay12 .dot.checked::before {
|
||||
font-family: FontAwesome;
|
||||
position:absolute;
|
||||
top:0;
|
||||
content: "\f00c";
|
||||
color: white;
|
||||
|
||||
margin-left: 3px;
|
||||
display: block;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.line_div{
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
.status_p{
|
||||
top: 25px;
|
||||
left: -40px;
|
||||
width: 100px;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row align-items-center m-t-10">
|
||||
<div class="col bg-master-lightest rounded padding-20 m-l-10 m-r-10">
|
||||
<div class="row d-flex justify-content-between align-items-center">
|
||||
<div class="col b-r">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="m-b-0 large-text normal m-b-10">Container Number</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="m-t-0 m-b-0 fs-20 bold">{{container.container_reference}}</p>
|
||||
<p class="m-t-0 m-b-0 small-text">{{container.container_number}}</p>
|
||||
<p class="m-t-0 m-b-0 small-text">seal number</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="m-t-0">Container Type: {{container.container_type}}</p>
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="fs-10 bold m-b-0">ETD</p>
|
||||
<p class="small-text m-t-0">{{container.transport.current_schedule.etd}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="fs-10 bold m-b-0">ETA</p>
|
||||
<p class="small-text m-t-0">{{container.transport.current_schedule.eta}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h5 class="m-b-0 large-text normal l-20">total cbm</h5>
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="fs-10 bold m-b-0">Location</p>
|
||||
<p class="small-text m-t-0">Guangzhou, China</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="fs-10 bold m-b-0">Destination</p>
|
||||
<p class="small-text m-t-0">Port Klang, Malaysia</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h5 class="m-t-0 large-text">{{ (Math.ceil((container.packing_lists.reduce((total, obj) => total + obj.packages.reduce((total, obj) => obj.cbm + total, 0), 0)) * 1000) / 1000).toFixed(3) }}</h5>
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="fs-10 bold m-b-0">Container Type</p>
|
||||
<p class="small-text m-t-0">{{container.container_specification.name}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h5 class="m-b-0 large-text normal l-20">ETD</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h5 class="m-t-0 large-text">{{container.transport.current_schedule.etd}}</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h5 class="m-b-0 large-text normal l-20">ETA</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h5 class="m-t-0 large-text">{{container.transport.current_schedule.eta}}</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h5 class="m-b-0 large-text normal l-20">Loading Place</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h5 class="m-t-0 large-text">SHANGHAI, CHINA</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h5 class="m-b-0 large-text normal l-20">Destination port</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h5 class="m-t-0 large-text">PORT KLANG NORTH PORT, MALAYSIA</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto p-r-50">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h5 class="m-b-0 large-text normal l-20">Status</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h5 class="m-t-0 large-text">{{container.status}}</h5>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="fs-10 bold m-b-0">Owner</p>
|
||||
<p class="small-text m-t-0">Greenway Logistic</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-20">
|
||||
<div class="col bg-master-light rounded m-l-10 m-r-10">
|
||||
<div class="row align-items-center p-t-10 p-b-10 padding-10">
|
||||
<div class="col-auto">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h5 class="bold m-b-0">Package List</h5>
|
||||
<p>(Total 77 Package in this container)</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<p class="m-b-0">{{ containerFilledPercentage }}%</p>
|
||||
</div>
|
||||
<div class="batteryContainer">
|
||||
<div class="batteryOuter">
|
||||
<div id="batteryLevel" :style="{ width: svgLenght + 'px' }"></div>
|
||||
</div>
|
||||
<div class="batteryBump"></div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="btn btn-default">
|
||||
Add Package
|
||||
</div>
|
||||
<div class="btn btn-default">
|
||||
Export List
|
||||
</div>
|
||||
<div class="btn btn-default">
|
||||
Print Custom
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto p-r-30">
|
||||
<h5 class="m-b-0 large-text normal l-20">Custom Declaration Status</h5>
|
||||
<h5 class="m-t-0 text-right">__</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col padding-20 p-l-40 p-r-50">
|
||||
<div class="row" v-for="packingList in container.packing_lists">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row b-a b-grey bg-master-lightest rounded align-items-center m-b-15 p-t-10 p-b-10" v-for="package_item in packingList.packages">
|
||||
<div class="col">{{package_item.description}}</div>
|
||||
<div class="col">Quantity: {{package_item.quantity}}</div>
|
||||
<div class="col">cbm:{{ package_item.cbm }}</div>
|
||||
<div class="col">Remark</div>
|
||||
<div class="row m-t-10 m-b-50">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row h-100">
|
||||
<div class="col">
|
||||
<h5 class="m-b-5 large-text bold l-20">Tracking:</h5>
|
||||
<div class="row h-100 p-l-10 p-r-10">
|
||||
<div class="col rounded bg-master-lighter padding-15">
|
||||
<li class="m-t-10">
|
||||
<a class="btn btn-sm btn-primary b-rad-none all-caps requestModal" data-type="rescheduleDate">Reschedule Date form</a>
|
||||
</li>
|
||||
<li class="m-t-10">
|
||||
<a class="btn btn-sm btn-primary b-rad-none all-caps requestModal" data-type="containerDepature">Container Departure</a>
|
||||
</li>
|
||||
<li class="m-t-10">
|
||||
<a class="btn btn-sm btn-primary b-rad-none all-caps requestModal" data-type="containerArrival">Arrival Date</a>
|
||||
</li>
|
||||
<li class="m-t-10">
|
||||
<a class="btn btn-sm btn-primary b-rad-none all-caps requestModal" data-type="containerUnpacking">Date of Unpacking</a>
|
||||
</li>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -147,48 +243,297 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-10">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col" style="height: 300px;">
|
||||
<div class="row h-100">
|
||||
<div class="col">
|
||||
<h5 class="m-b-5 large-text bold l-20">Timeline:</h5>
|
||||
<div class="row h-100 p-l-10 p-r-10">
|
||||
<div class="col rounded bg-master-lighter padding-15">
|
||||
Timeline
|
||||
|
||||
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="rescheduleDate">
|
||||
<reschedule-date-form-component :section="section" :data="container"></reschedule-date-form-component>
|
||||
</modal-component>
|
||||
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="containerDepature">
|
||||
<container-depature-form-component :section="section" :data="container"></container-depature-form-component>
|
||||
</modal-component>
|
||||
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="containerArrival">
|
||||
<container-arrival-form-component :section="section" :data="container"></container-arrival-form-component>
|
||||
</modal-component>
|
||||
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="containerUnpacking">
|
||||
<container-unpacking-form-container :section="section" :data="container"></container-unpacking-form-container>
|
||||
</modal-component>
|
||||
|
||||
<div class="row m-t-40 m-b-0">
|
||||
<div class="col">
|
||||
<h5 class="bold m-b-40">Overview</h5>
|
||||
<div class="row">
|
||||
<div class="col-auto">
|
||||
<div class="percentageContainer rounded bg-master-lightest b-grey">
|
||||
<div class="percentageInner bg-primary rounded-bottom" :style="{ height: Math.round((loadedCBM / CBMcapacity) * 100, 2) + '%' }"></div>
|
||||
<div class="percentageInnerText muted">
|
||||
{{ Math.round((loadedCBM / CBMcapacity) * 100, 2) }}%
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<p class="m-b-5 muted">Container No #{{container.container_number}}</p>
|
||||
<h5 class="m-b-5 m-t-0 bold">Your order(s) are ready for shipment</h5>
|
||||
<p class="m-b-5 m-t-0 muted">Total 1 package(s) in this container</p>
|
||||
<p class="m-b-5 m-t-0">Loaded CBM: <span class="text-complete bold fs-20">{{loadedCBM}}</span></p>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<a class="btn btn-sm btn-danger b-rad-none all-caps requestModal rounded" data-type="rescheduleDate">Reschedule Date form</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-40">
|
||||
<div class="col">
|
||||
<div class="row m-l-30 m-r-30 m-b-50">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="delivery_status">
|
||||
<div class="line_div w-100 justify-content-center align-content-center d-flex">
|
||||
<hr>
|
||||
</div>
|
||||
<div class="overlay12 p-l-0">
|
||||
<div class="dot checked">
|
||||
<div class="position-relative">
|
||||
<div class="status_p text-center position-absolute">Warehouse-CN(K2921)</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dot requestModal pointer disabled" data-type="rescheduleDate">
|
||||
<div class="position-relative">
|
||||
<div class="status_p text-center position-absolute">Loading<br>Port</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dot">
|
||||
<div class="position-relative">
|
||||
<div class="status_p text-center position-absolute">In<br>Transit</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dot">
|
||||
<div class="position-relative">
|
||||
<div class="status_p text-center position-absolute">Discharge<br>Port</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dot">
|
||||
<div class="position-relative">
|
||||
<div class="status_p text-center position-absolute">Warehouse-MY(M2525)</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-50">
|
||||
<div class="col">
|
||||
<input type="text" class="b-a w-100 padding-10 rounded b-grey" placeholder="Search by Package Name, Package Number...">
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class="btn rounded btn-default m-r-10 p-t-10 p-b-10">
|
||||
Print Custom
|
||||
</div>
|
||||
<div class="btn rounded btn-default m-r-10 p-t-10 p-b-10">
|
||||
Export List
|
||||
</div>
|
||||
<div class="btn rounded btn-primary p-t-10 p-b-10">
|
||||
<div><i class="fa fa-plus m-r-10"></i>Add Container</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row m-t-50">
|
||||
<div class="col">
|
||||
<div class="row" v-for="packingList in container.packing_lists">
|
||||
<div class="col">
|
||||
<div class="row m-t-10 b-a rounded b-grey m-l-5 m-r-5 padding-10 p-t-20 p-b-20" v-for="package_item in packingList.packages">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col-auto hide">
|
||||
<svg width="97" height="80" viewBox="0 0 97 80" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M60.087 79.4989L0.178711 59.8679V13.3069L60.087 26.6089V79.4989Z" fill="#D3B875"/>
|
||||
<path d="M96.2289 58.07L60.0823 79.5V26.61L96.2289 8.46899V58.07Z" fill="#B78C58"/>
|
||||
<path d="M0.175781 13.3119L36.7404 0.00390625L96.2288 8.47189L60.087 26.6119L0.175781 13.3119Z" fill="#F2D08B"/>
|
||||
<path opacity="0.6" d="M17.5637 6.97882L74.0242 19.8788L75.1844 40.9638L77.1729 43.9878L78.1566 40.0988L79.4932 41.3088L80.8192 38.5438L81.8135 40.0988L80.5344 16.3498L22.5418 5.16382L17.5637 6.97882Z" fill="#846B3D"/>
|
||||
<path opacity="0.6" d="M24.7881 18.7679L60.0842 3.31787L66.0891 4.17287L32.2254 20.4189L24.7881 18.7679Z" fill="#846B3D"/>
|
||||
<path d="M24.7881 18.7729V67.935L32.2254 70.3719V20.424L24.7881 18.7729Z" fill="#846B3D"/>
|
||||
<path d="M73.3618 66.1058C73.3618 66.6788 72.9524 66.8748 72.3675 67.1428L66.2369 70.3708C65.4085 70.8008 65.2427 69.9068 65.2427 69.3338V59.4828C65.2427 58.9098 65.6013 58.7748 66.2369 58.4458L72.3675 55.2178C73.6657 54.5268 73.2764 55.9318 73.3618 58.5878V66.1058Z" fill="white"/>
|
||||
<path d="M65.8706 60.4519L71.9552 57.3679V57.7219L65.8706 60.9129V60.4519Z" fill="#4C402C"/>
|
||||
<path d="M65.8706 61.668L71.9552 58.584V58.939L65.8706 62.132V61.668Z" fill="#4C402C"/>
|
||||
<path d="M65.8706 63.0308L71.9552 59.9468V60.3018L65.8706 63.4928V63.0308Z" fill="#4C402C"/>
|
||||
<path d="M66.0134 66.7698L69.8601 64.8198L69.9081 65.1888L66.0144 67.2308L66.0134 66.7698Z" fill="#4C402C"/>
|
||||
<path d="M66.0134 67.6949L69.8601 65.7449L69.9081 66.1139L66.0144 68.1559L66.0134 67.6949Z" fill="#4C402C"/>
|
||||
<path d="M66.0134 68.6319L69.8601 66.6819L69.9081 67.0509L66.0144 69.0929L66.0134 68.6319Z" fill="#4C402C"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="bold normal-text">Customer: <a :href="route('customer.profile', packingList.order.company_module.marking)">{{packingList.order.company_module.marking}}</a></p>
|
||||
<p class="bold normal-text">Order: <a :href="route('order.show', packingList.order.reference)">{{packingList.order.reference}}</a></p>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class="col-auto" v-if="!packingList.transport">
|
||||
<div class="btn btn-xs btn-success pointer" v-if="packingList.status === 5"><i class="fa fa-check m-r-5"></i>Release</div>
|
||||
<div class="btn btn-xs btn-danger pointer" v-if="packingList.status !== 5"><i class="fa fa-hand-paper-o m-r-5"></i>Hold</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="normal-text bold">{{package_item.description}} <span class="muted normal m-l-10">(Quantity: {{package_item.quantity}})</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="large-text">{{packingList.order.address.street_one+' '+(packingList.order.address.street_two ? packingList.order.address.street_two : '')+', '+ packingList.order.address.district.name+', '+packingList.order.address.post_code+' '+packingList.order.address.state.name+', '+packingList.order.address.country.name}}</p>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<p class="small-text bold">{{package_item.length}}x{{package_item.width}}x{{package_item.height}} CM / <span class="text-complete bold fs-20">{{ (Math.ceil((package_item.cbm) * 1000) / 1000).toFixed(3)}}CBM</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="small-text muted">Remark</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-20">
|
||||
<div class="col">
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class="btn rounded btn-default btn-lg bold normal-text requestModal" data-type="editContainer">Add Remarks</div>
|
||||
<div class="btn rounded btn-default btn-lg bold normal-text requestModal" data-type="editContainer">Edit Address</div>
|
||||
<div class="btn rounded btn-default btn-lg bold normal-text requestModal" data-type="editContainer">Edit Package</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h5 class="m-b-5 large-text bold l-20">Comments:</h5>
|
||||
<div class="row p-l-10 p-r-10">
|
||||
<div class="col rounded bg-master-lighter padding-15">
|
||||
Comments
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="editContainer">
|
||||
<edit-container-form-component :section="section" :data="container"></edit-container-form-component>
|
||||
</modal-component>
|
||||
|
||||
<div class="row m-t-10">
|
||||
<div class="col">
|
||||
<div class="row h-100">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col-auto padding-5 m-l-15 m-r-15" :class="[{'text-primary': tabShowing === 'Timeline'}, {'b-b': tabShowing === 'Timeline'}]" @click="tabShowing = 'Timeline'">
|
||||
<h5 class="large-text bold l-20" :class="[{'text-primary': tabShowing === 'Timeline'}]" >Activity Timeline</h5>
|
||||
</div>
|
||||
<div class="col-auto padding-5 m-l-15 m-r-15" :class="[{'text-primary': tabShowing === 'Comments'}, {'b-b': tabShowing === 'Comments'}]" @click="tabShowing = 'Comments'">
|
||||
<h5 class="large-text bold l-20" :class="[{'text-primary': tabShowing === 'Comments'}]">Comments</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-15">
|
||||
<div class="col">
|
||||
<div class="row p-l-10 p-r-10">
|
||||
<div class="col">
|
||||
<h5 class="m-b-5 large-text bold l-20">Related documents:</h5>
|
||||
</div>
|
||||
<div class="co-auto">
|
||||
<div class="btn justify-content bg-master-light">
|
||||
<i class="fa fa-upload m-r-10" ></i>Upload Documents
|
||||
<div class="row p-l-10 p-r-10">
|
||||
<div class="col rounded padding-15">
|
||||
<div class="row" v-if="tabShowing === 'Timeline'">
|
||||
<div class="col">
|
||||
<ul class="timeline_ul">
|
||||
<li class="bg-purple">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="no-margin bold">Item Returned</p>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<p class="muted no-margin">5 September 2021</p>
|
||||
</div>
|
||||
</div>
|
||||
<p>Item has been returned due to mismatch</p>
|
||||
</li>
|
||||
<li class="bg-orange">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="no-margin bold">Client Report</p>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<p class="muted no-margin">21 August 2021</p>
|
||||
</div>
|
||||
</div>
|
||||
<p>Client report order number #012AS12W</p>
|
||||
</li>
|
||||
<li class="bg-blue">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="no-margin bold">Item Cancelled</p>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<p class="muted no-margin">8 May 2021</p>
|
||||
</div>
|
||||
</div>
|
||||
<p>Item has been cancelled by clients number #012ASJ21</p>
|
||||
</li>
|
||||
<li class="bg-blue">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="no-margin bold">Item Cancelled</p>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<p class="muted no-margin">8 May 2021</p>
|
||||
</div>
|
||||
</div>
|
||||
<p>Item has been cancelled by clients number #012ASJ21</p>
|
||||
</li>
|
||||
<li class="bg-orange">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="no-margin bold">Client Report</p>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<p class="muted no-margin">21 August 2021</p>
|
||||
</div>
|
||||
</div>
|
||||
<p>Client report order number #012AS12W</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row p-l-10 p-r-10">
|
||||
<div class="col rounded bg-master-lighter padding-15">
|
||||
documents
|
||||
<div class="row" v-if="tabShowing === 'Comments'">
|
||||
<div class="col">
|
||||
<div class="row m-b-20">
|
||||
<div class="col">
|
||||
<div class="row justify-content-center align-items-center m-l-5 m-b-15">
|
||||
<div class="col-auto b-a btn-rounded padding-10 p-l-15 p-r-15">
|
||||
<i class="fa fa-user"></i>
|
||||
</div>
|
||||
<div class="col">
|
||||
<p class="no-margin muted bold fs-20">Jacob Arlington</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p>Adipisicing occaecat pariatur id sunt ullamco quis laborum irure ea excepteur enim dolore est. Deserunt do consectetur ex in dolor labore ad reprehenderit velit laboris officia ut.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-b-20">
|
||||
<div class="col">
|
||||
<div class="row justify-content-center align-items-center m-l-5 m-b-15">
|
||||
<div class="col-auto b-a btn-rounded padding-10 p-l-15 p-r-15">
|
||||
<i class="fa fa-user"></i>
|
||||
</div>
|
||||
<div class="col">
|
||||
<p class="no-margin muted bold fs-20">Jacob Arlington</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p>Adipisicing occaecat pariatur id sunt ullamco quis laborum irure ea excepteur enim dolore est. Deserunt do consectetur ex in dolor labore ad reprehenderit velit laboris officia ut.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="text" class="b-a w-100 padding-10 rounded b-grey" placeholder="Write your comments...">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -198,70 +543,55 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
id: {
|
||||
type: Number,
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
section: 'containerPofileSection',
|
||||
isLoading: true,
|
||||
container: null,
|
||||
expanded: false,
|
||||
totalCBM: 6,
|
||||
CBMcapacity: 30,
|
||||
svgLenght: 0,
|
||||
svgLenghtSquare: 0,
|
||||
confirmLanding: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
pendingQueue () {
|
||||
return this.$store.getters.isInCompleteQueue(this.section);
|
||||
</template>
|
||||
<script>
|
||||
import RescheduleDateFormComponent from './RescheduleDateFormComponent.vue';
|
||||
export default {
|
||||
components: { RescheduleDateFormComponent },
|
||||
props: {
|
||||
id: {
|
||||
type: Number,
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
containerFilledPercentage() {
|
||||
this.svgLenght = this.totalCBM / this.CBMcapacity * 25;
|
||||
this.svgLenghtSquare = this.totalCBM / this.CBMcapacity * 100 -2;
|
||||
return this.totalCBM / this.CBMcapacity * 100;
|
||||
}
|
||||
// totalCbm () {
|
||||
// let totalCbm = 0;
|
||||
|
||||
// return this.container.packing_lists.map(function(packing_list){
|
||||
// totalCbm += packing_list.packages.reduce((total, obj) => obj.quantity + total, 0);
|
||||
// })
|
||||
// }
|
||||
},
|
||||
watch: {
|
||||
pendingQueue(inComplete){
|
||||
if(inComplete){
|
||||
this.fetchCompany();
|
||||
data(){
|
||||
return {
|
||||
section: 'containerPofileSection',
|
||||
isLoading: true,
|
||||
container: null,
|
||||
expanded: false,
|
||||
CBMcapacity: 30,
|
||||
tabShowing: 'Timeline',
|
||||
}
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.$store.dispatch('updateListQueue', {'name': this.section});
|
||||
},
|
||||
methods: {
|
||||
fetchCompany(){
|
||||
this.isLoading = true;
|
||||
this.submit(route('api.packing_list.container.show', this.id), 'get', this.section, false, false)
|
||||
},
|
||||
successHandler(response){
|
||||
this.$store.dispatch('completeList', {'name': this.section, 'data': []});
|
||||
this.isLoading = false;
|
||||
this.container = response.payload.data;
|
||||
computed: {
|
||||
pendingQueue () {
|
||||
return this.$store.getters.isInCompleteQueue(this.section);
|
||||
},
|
||||
loadedCBM() {
|
||||
return (Math.ceil((this.container.packing_lists.reduce((total, obj) => total + obj.packages.reduce((total, obj) => obj.cbm + total, 0), 0)) * 1000) / 1000).toFixed(3)
|
||||
}
|
||||
},
|
||||
confirmStatus(){
|
||||
this.confirmLanding = true;
|
||||
console.log(this.confirmLanding);
|
||||
watch: {
|
||||
pendingQueue(inComplete){
|
||||
if(inComplete){
|
||||
this.fetchCompany();
|
||||
}
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.$store.dispatch('updateListQueue', {'name': this.section});
|
||||
},
|
||||
methods: {
|
||||
fetchCompany(){
|
||||
this.isLoading = true;
|
||||
this.submit(route('api.packing_list.container.show', this.id), 'get', this.section, false, false)
|
||||
},
|
||||
successHandler(response){
|
||||
this.$store.dispatch('completeList', {'name': this.section, 'data': []});
|
||||
this.isLoading = false;
|
||||
this.container = response.payload.data;
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
@@ -0,0 +1,59 @@
|
||||
<template>
|
||||
<div class="row" style="width: 600px; margin: auto;" @keyup.enter="submitForm">
|
||||
<div class="col bg-white padding-20 b-rad-lg">
|
||||
<div class="row m-b-10">
|
||||
<div class="col">
|
||||
<h3 class="bold fs-20 m-b-0">Edit Package</h3>
|
||||
<p class="normal-text muted">Process of editing the container needs to verify from the warehouse</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-20">
|
||||
<div class="col">
|
||||
<div class="row m-auto mt-10 mb-10">
|
||||
<div class="col p-l-0 p-r-10">
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.container_number">
|
||||
<label class="semi-bold text-primary">Container Number</label>
|
||||
<input type="text" class="form-control fs-12">
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
<div class="col p-r-0 p-l-10">
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.sealing_number">
|
||||
<label class="semi-bold text-primary">Sealing Number</label>
|
||||
<input type="text" class="form-control">
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-15">
|
||||
<div class="col d-flex justify-content-end">
|
||||
<div class="btn btn-default btn-sm bg-master-light m-r-10 text-white padding-10 p-l-40 p-r-40 rounded" data-dismiss="modal">Cancel</div>
|
||||
<div class="btn btn-default btn-sm b-primary btn-outline-primary padding-10 p-l-40 p-r-40 rounded">Upload</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import modalFormHandler from '../../../general/mixins/modalFormHandler';
|
||||
import { required } from "vuelidate/lib/validators";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
parameters: {
|
||||
container_number: this.container_number,
|
||||
sealing_number: this.sealing_number,
|
||||
}
|
||||
};
|
||||
},
|
||||
validations: {
|
||||
parameters: {
|
||||
container_number: { required },
|
||||
sealing_number: { required },
|
||||
}
|
||||
},
|
||||
mixins: [modalFormHandler]
|
||||
}
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<div class="row" style="width: 450px; margin: auto;" @keyup.enter="submitForm">
|
||||
<div class="col bg-white padding-40 b-rad-lg">
|
||||
<div class="row m-b-10">
|
||||
<div class="col text-center">
|
||||
<p>Plese set the approximate dates of below.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row m-auto mt-10 mb-10">
|
||||
<div class="col p-l-0 p-r-10">
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.etd">
|
||||
<label class="text-primary">Etd</label>
|
||||
<date-picker-component :parameters="parameters" :value="'etd'"></date-picker-component>
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
<div class="col p-r-0 p-l-10">
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.eta">
|
||||
<label class="text-primary">Eta</label>
|
||||
<date-picker-component :parameters="parameters" :value="'eta'"></date-picker-component>
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-15">
|
||||
<div class="col-auto p-r-5">
|
||||
<div class="btn btn-lg btn-default b-rad-none" data-dismiss="modal">Cancel</div>
|
||||
</div>
|
||||
<div class="col p-l-5">
|
||||
<div class="btn btn-primary w-100 btn-lg" @click="submit(route('api.packing_list.container.reschedule', data.id), 'put', section, true, true)">Confirm</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import modalFormHandler from '../../../general/mixins/modalFormHandler';
|
||||
import { required } from "vuelidate/lib/validators";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
parameters: {
|
||||
etd: this.etd,
|
||||
eta: this.eta,
|
||||
}
|
||||
};
|
||||
},
|
||||
validations: {
|
||||
parameters: {
|
||||
etd: { required },
|
||||
eta: { required },
|
||||
}
|
||||
},
|
||||
mixins: [modalFormHandler]
|
||||
}
|
||||
|
||||
</script>
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<div class="row" style="width: 450px; margin: auto;" @keyup.enter="submitForm">
|
||||
<div class="col bg-white padding-40 b-rad-lg">
|
||||
<div class="row m-auto" style="width: 300px;">
|
||||
<div class="col text-center">
|
||||
<p>Are you sure this container has been unpacked today?</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-15">
|
||||
<div class="col-auto p-r-5">
|
||||
<div class="btn btn-lg btn-default b-rad-none" data-dismiss="modal">Cancel</div>
|
||||
</div>
|
||||
<div class="col p-l-5">
|
||||
<div class="btn btn-primary w-100 btn-lg" @click="submit(route('api.packing_list.container.complete', data.id), 'put', section, true, true)">Confirm</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import modalFormHandler from '../../../general/mixins/modalFormHandler';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
expanded: false,
|
||||
};
|
||||
},
|
||||
mixins: [modalFormHandler]
|
||||
}
|
||||
</script>
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
<template>
|
||||
<div class="row justify-content-center" @keyup.enter="submitForm">
|
||||
<div class="col col-md-8">
|
||||
<div class="row m-b-20 text-info">
|
||||
<div class="col">
|
||||
<h3 class="text-left">Create Load Container</h3>
|
||||
</div>
|
||||
</div>
|
||||
<error-message-component class="m-b-20" :error="error"></error-message-component>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row m-b-10">
|
||||
<div class="col">
|
||||
<div class="row m-b-0 text-primary">
|
||||
<div class="col">
|
||||
<label class="text-primary fs-11 all-caps">Select the warehouse</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row text-center justify-content-center">
|
||||
<div class="col p-r-5">
|
||||
<div class="b-a b-thick p-t-15 p-b-15 p-l-35 p-r-35 pointer" :class="{ 'b-primary': parameters.company_module_id === 3, 'b-grey': parameters.company_module_id !== 3 }" @click="parameters.company_module_id = 3">
|
||||
<div class="row m-b-15 justify-content-center">
|
||||
<div class="col-8">
|
||||
<img src="/images/guangzhou-map.png" class="w-100">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h5 class="no-margin" :class="{ 'text-primary': parameters.company_module_id === 3, 'semi-bold': parameters.company_module_id === 3 }">Guangzhou</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col p-l-5">
|
||||
<div class="b-a b-thick p-t-15 p-b-15 p-l-35 p-r-35 pointer" :class="{ 'b-primary': parameters.company_module_id === 4, 'b-grey': parameters.company_module_id !== 4 }" @click="parameters.company_module_id = 4">
|
||||
<div class="row m-b-15 justify-content-center">
|
||||
<div class="col-8">
|
||||
<img src="/images/yiwu-map.png" class="w-100">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h5 class="no-margin" :class="{ 'text-primary': parameters.company_module_id === 4, 'semi-bold': parameters.company_module_id === 4}">Yiwu</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.container_reference">
|
||||
<label class="text-primary">Container Reference</label>
|
||||
<input type="text" class="form-control fs-12" v-model.trim="parameters.container_reference">
|
||||
</validation-wrapper-component>
|
||||
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.container_number">
|
||||
<label class="text-primary">Container Number</label>
|
||||
<input type="text" class="form-control fs-12" v-model.trim="parameters.container_number">
|
||||
</validation-wrapper-component>
|
||||
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.seal_reference">
|
||||
<label class="text-primary">Seal Reference</label>
|
||||
<input type="text" class="form-control fs-12" v-model.trim="parameters.seal_reference">
|
||||
</validation-wrapper-component>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<validation-wrapper-component class="m-b-10" :validator="$v.parameters.etd">
|
||||
<label class="text-primary">ETD</label>
|
||||
<date-picker-component :parameters="parameters" :value="'etd'"></date-picker-component>
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<validation-wrapper-component class="m-b-10" :validator="$v.parameters.eta">
|
||||
<label class="text-primary">ETA</label>
|
||||
<date-picker-component :parameters="parameters" :value="'eta'"></date-picker-component>
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row m-t-15 align-items-center justify-content-center">
|
||||
<div class="col auto">
|
||||
<div class="btn btn-block btn-lg btn-default b-rad-none" @click="$store.dispatch('toggleSection', {name: 'createContainerFormSection', status: false})">Cancel</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="btn btn-block btn-lg btn-primary b-rad-none" @click="submitForm">Submit</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import createContainerFormValidation from '../../../general/mixins/containers/validation/createContainerFormValidation';
|
||||
import componentHandler from '../../../general/mixins/componentHandler';
|
||||
import modalFormHandler from '../../../general/mixins/modalFormHandler';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
error: '',
|
||||
parameters: {
|
||||
container_reference: this.container_reference,
|
||||
container_number: this.container_number,
|
||||
seal_reference: this.seal_reference,
|
||||
container_type: 1,
|
||||
company_module_id: this.company_module_id,
|
||||
etd: this.etd,
|
||||
eta: this.eta,
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
submitForm(){
|
||||
this.submit(this.route('api.packing_list.container.create.load'), 'post', this.section, true, true)
|
||||
},
|
||||
},
|
||||
mixins: [createContainerFormValidation, componentHandler, modalFormHandler]
|
||||
}
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<div >
|
||||
<date-picker v-model.trim="date" :config="options" @dp-change="onChange"></date-picker>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import datePicker from 'vue-bootstrap-datetimepicker';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
datePicker
|
||||
},
|
||||
props: {
|
||||
value: {
|
||||
required: false
|
||||
},
|
||||
parameters: {
|
||||
required: false
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
date: '',
|
||||
options: {
|
||||
format: 'YYYY/MM/DD',
|
||||
useCurrent: true,
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onChange(){
|
||||
this.parameters[this.value] = this.date;
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -54,7 +54,7 @@
|
||||
</div>
|
||||
<div class="col-auto" v-if="$store.getters.isAdmin">
|
||||
<small class="fs-10 all-caps muted">Container</small>
|
||||
<p class="no-margin bold">{{item.container.container_reference}}</p>
|
||||
<p class="no-margin bold">{{item.container ? item.container.container_reference : '-'}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -69,7 +69,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row p-t-10 p-b-10">
|
||||
<div class="row p-t-10 p-b-10" v-if="item.container">
|
||||
<div class="col-auto p-r-0 p-t-10">
|
||||
<div class="row" v-for="schedule in item.container.transport.schedule_history" :key="schedule.id">
|
||||
<div class="col">
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
<template>
|
||||
<div class="row" @keyup.enter="submitForm">
|
||||
<div class="col">
|
||||
<div class="row m-b-20 text-info">
|
||||
<div class="col">
|
||||
<h3 class="text-left">Create Package</h3>
|
||||
</div>
|
||||
</div>
|
||||
<error-message-component class="m-b-20" :error="error"></error-message-component>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.type">
|
||||
<label class="text-primary">Type</label>
|
||||
<select-component :options="[{'id': 0, 'text': 'Carton'}, {'id': 1, 'text': 'Pallet'}]" v-model="parameters.type"></select-component>
|
||||
<input type="text" class="form-control fs-12" v-model.trim="parameters.type">
|
||||
</validation-wrapper-component>
|
||||
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.description">
|
||||
<label class="text-primary">Description</label>
|
||||
<input type="text" class="form-control fs-12" v-model.trim="parameters.description">
|
||||
</validation-wrapper-component>
|
||||
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.width">
|
||||
<label class="text-primary">Width</label>
|
||||
<input type="text" class="form-control fs-12" v-model.trim="parameters.width">
|
||||
</validation-wrapper-component>
|
||||
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.height">
|
||||
<label class="text-primary">Height</label>
|
||||
<input type="text" class="form-control fs-12" v-model.trim="parameters.height">
|
||||
</validation-wrapper-component>
|
||||
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.length">
|
||||
<label class="text-primary">Length</label>
|
||||
<input type="text" class="form-control fs-12" v-model.trim="parameters.length">
|
||||
</validation-wrapper-component>
|
||||
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.weight">
|
||||
<label class="text-primary">Weight</label>
|
||||
<input type="text" class="form-control fs-12" v-model.trim="parameters.weight">
|
||||
</validation-wrapper-component>
|
||||
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.quantity">
|
||||
<label class="text-primary">Quantity</label>
|
||||
<input type="text" class="form-control fs-12" v-model.trim="parameters.quantity">
|
||||
</validation-wrapper-component>
|
||||
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.reference">
|
||||
<label class="text-primary">Reference</label>
|
||||
<input type="text" class="form-control fs-12" v-model.trim="parameters.reference">
|
||||
</validation-wrapper-component>
|
||||
<div class="row m-t-15 align-items-center justify-content-center">
|
||||
<div class="col">
|
||||
<div class="btn btn-block btn-lg btn-primary b-rad-none no-border" @click="submitForm">Submit</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import createPackageFormValidation from '../../../general/mixins/orders/validation/createPackageFormValidation';
|
||||
import componentHandler from '../../../general/mixins/componentHandler';
|
||||
import modalFormHandler from '../../../general/mixins/modalFormHandler';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
id: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
section:{
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
error: '',
|
||||
parameters: {
|
||||
order_id: this.id,
|
||||
type: this.type,
|
||||
description: this.description,
|
||||
width: this.width,
|
||||
height: this.height,
|
||||
length: this.length,
|
||||
weight: this.weight,
|
||||
quantity: this.quantity,
|
||||
reference: this.reference
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'id': function () {
|
||||
this.parameters.order_id = this.id;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
submitForm(){
|
||||
this.submit(this.route('api.packing_list.package.create'), 'post', this.section, true, true)
|
||||
}
|
||||
},
|
||||
mixins: [createPackageFormValidation, componentHandler, modalFormHandler]
|
||||
}
|
||||
|
||||
</script>
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<div class="row" @keyup.enter="submitForm">
|
||||
<div class="col">
|
||||
<div class="row m-b-20 text-info">
|
||||
<div class="col">
|
||||
<h3 class="text-left">Create Shipping Packing List</h3>
|
||||
</div>
|
||||
</div>
|
||||
<error-message-component class="m-b-20" :error="error"></error-message-component>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<package-form-component :section="section" :packages="parameters.packages"></package-form-component>
|
||||
<div class="row m-t-15 align-items-center justify-content-center">
|
||||
<div class="col">
|
||||
<div class="btn btn-block btn-lg btn-primary b-rad-none no-border" @click="submitForm">Submit</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import componentHandler from '../../../general/mixins/componentHandler';
|
||||
import modalFormHandler from '../../../general/mixins/modalFormHandler';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
id: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
section:{
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
error: '',
|
||||
parameters: {
|
||||
order_id: this.id,
|
||||
packages: []
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'id': function () {
|
||||
this.parameters.order_id = this.id;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
submitForm(){
|
||||
this.submit(this.route('api.order.create.shipping.packing_list'), 'post', this.section, true, true)
|
||||
}
|
||||
},
|
||||
mixins: [componentHandler, modalFormHandler]
|
||||
}
|
||||
|
||||
</script>
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
<template>
|
||||
<div class="row" @keyup.enter="submitForm">
|
||||
<div class="col">
|
||||
<div class="row m-b-20 text-info">
|
||||
<div class="col">
|
||||
<h3 class="text-left">Create Warehouse Packing List</h3>
|
||||
</div>
|
||||
</div>
|
||||
<error-message-component class="m-b-20" :error="error"></error-message-component>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.receive_date">
|
||||
<label class="text-primary">Receive Date</label>
|
||||
<date-picker-component :parameters="parameters" :value="'receive_date'"></date-picker-component>
|
||||
</validation-wrapper-component>
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.tracking">
|
||||
<label class="text-primary">Tracking</label>
|
||||
<input type="text" class="form-control fs-12" v-model.trim="parameters.tracking">
|
||||
</validation-wrapper-component>
|
||||
<package-form-component :section="section" :packages="parameters.packages"></package-form-component>
|
||||
<div class="row m-t-15 align-items-center justify-content-center">
|
||||
<div class="col">
|
||||
<div class="btn btn-block btn-lg btn-primary b-rad-none no-border" @click="submitForm">Submit</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import createPackageListFormValidation from '../../../general/mixins/orders/validation/createPackageListFormValidation';
|
||||
import componentHandler from '../../../general/mixins/componentHandler';
|
||||
import modalFormHandler from '../../../general/mixins/modalFormHandler';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
id: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
section:{
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
error: '',
|
||||
parameters: {
|
||||
order_id: this.id,
|
||||
tracking: this.tracking,
|
||||
receive_date: this.receive_date,
|
||||
packages: []
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'id': function () {
|
||||
this.parameters.order_id = this.id;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
submitForm(){
|
||||
this.submit(this.route('api.order.create.warehouse.packing_list'), 'post', this.section, true, true)
|
||||
}
|
||||
},
|
||||
mixins: [createPackageListFormValidation, componentHandler, modalFormHandler]
|
||||
}
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,194 @@
|
||||
<template>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row no-margin">
|
||||
<div class="col p-t-25 p-t-25">
|
||||
<div class="row">
|
||||
<div class="col p-b-10 b-b b-grey">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-auto p-r-0" style="min-width: 40px;">
|
||||
<div class="font-heading all-caps fs-10"></div>
|
||||
</div>
|
||||
<div class="col p-r-5">
|
||||
<div class="font-heading all-caps fs-10 muted">Type</div>
|
||||
</div>
|
||||
<div class="col-4 p-r-5 p-l-5">
|
||||
<div class="font-heading all-caps fs-10 muted">Description</div>
|
||||
</div>
|
||||
<div class="col text-center p-r-5 p-l-5">
|
||||
<div class="font-heading all-caps fs-10 muted">Width</div>
|
||||
</div>
|
||||
<div class="col text-center p-r-5 p-l-5">
|
||||
<div class="font-heading all-caps fs-10 muted">Height</div>
|
||||
</div>
|
||||
<div class="col-1 text-center p-r-5 p-l-5">
|
||||
<div class="font-heading all-caps fs-10 muted">Length</div>
|
||||
</div>
|
||||
<div class="col-1 text-right p-r-5 p-l-5">
|
||||
<div class="font-heading all-caps fs-10 muted">Weight</div>
|
||||
</div>
|
||||
<div class="col-1 text-right p-r-5 p-l-5">
|
||||
<div class="font-heading all-caps fs-10 muted">Quantity</div>
|
||||
</div>
|
||||
<div class="col-1 text-right p-r-5 p-l-5">
|
||||
<div class="font-heading all-caps fs-10 muted">Reference</div>
|
||||
</div>
|
||||
<div class="col-auto text-center">
|
||||
<button class="btn btn-xs btn-outline-success b-rad-none invisible"><i class="fa fa-check"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-b-20">
|
||||
<div class="col">
|
||||
<div class="row" v-if="!submitted">
|
||||
<div class="col p-b-5 p-t-5 b-b b-grey">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-auto p-r-0" style="min-width: 40px;">
|
||||
<div class="font-heading all-caps fs-10"></div>
|
||||
</div>
|
||||
<div class="col p-r-5">
|
||||
<select-component :options="[{'id': 0, 'text': 'Carton'}, {'id': 1, 'text': 'Pallet'}]" v-model="product.type"></select-component>
|
||||
</div>
|
||||
<div class="col-4 p-r-5 p-l-5">
|
||||
<textarea class="form-control fs-10 b-rad-none" placeholder="Description" rows="1" @keyup="onlyEnglish($event)" v-model="product.description"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="col text-center p-r-5 p-l-5">
|
||||
<input type="text" class="form-control fs-10 b-rad-none text-center" placeholder="Width" v-model.lazy="product.width"/>
|
||||
</div>
|
||||
|
||||
<div class="col text-center p-r-5 p-l-5">
|
||||
<input type="text" class="form-control fs-10 b-rad-none text-center" placeholder="Height" v-model.lazy="product.height"/>
|
||||
</div>
|
||||
|
||||
<div class="col text-center p-r-5 p-l-5">
|
||||
<input type="text" class="form-control fs-10 b-rad-none text-center" placeholder="Length" v-model.lazy="product.length"/>
|
||||
</div>
|
||||
|
||||
<div class="col text-center p-r-5 p-l-5">
|
||||
<input type="text" class="form-control fs-10 b-rad-none text-center" placeholder="Weight" v-model.lazy="product.weight"/>
|
||||
</div>
|
||||
|
||||
<div class="col text-center p-r-5 p-l-5">
|
||||
<input type="text" class="form-control fs-10 b-rad-none text-center" placeholder="Quantity" v-model.lazy="product.quantity"/>
|
||||
</div>
|
||||
|
||||
<div class="col text-center p-r-5 p-l-5">
|
||||
<input type="text" class="form-control fs-10 b-rad-none text-center" placeholder="Reference" v-model.lazy="product.reference"/>
|
||||
</div>
|
||||
|
||||
<div class="col-auto">
|
||||
<button class="btn btn-xs btn-outline-success b-rad-none" @click="addPackage()"><i class="fa fa-check"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" v-for="(item, index) in packages">
|
||||
<div class="col p-b-10 p-t-10 b-b b-grey">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-auto p-r-0" style="min-width: 40px;">
|
||||
<div class="font-heading all-caps fs-10">{{index + 1}}</div>
|
||||
</div>
|
||||
<div class="col p-r-5">
|
||||
<div class="font-heading all-caps fs-10">{{item.type}}</div>
|
||||
</div>
|
||||
<div class="col-4 p-r-5 p-l-5">
|
||||
<div class="font-heading all-caps fs-10">{{item.description}}</div>
|
||||
</div>
|
||||
<div class="col text-center p-r-5 p-l-5">
|
||||
<div class="font-heading all-caps fs-10">{{item.width}}</div>
|
||||
</div>
|
||||
<div class="col text-center p-r-5 p-l-5">
|
||||
<div class="font-heading all-caps fs-10">{{item.height}}</div>
|
||||
</div>
|
||||
<div class="col-1 text-center p-r-5 p-l-5">
|
||||
<div class="font-heading all-caps fs-10">{{item.length}}</div>
|
||||
</div>
|
||||
<div class="col-1 text-center p-r-5 p-l-5">
|
||||
<div class="font-heading all-caps fs-10">{{item.weight}}</div>
|
||||
</div>
|
||||
<div class="col-1 text-right p-r-5 p-l-5">
|
||||
<div class="font-heading all-caps fs-10">{{item.quantity}}</div>
|
||||
</div>
|
||||
<div class="col-1 text-right p-r-5 p-l-5">
|
||||
<div class="font-heading all-caps fs-10">{{item.reference}}</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<button class="btn btn-xs btn-outline-danger b-rad-none" v-if="!submitted" @click="removePackage(index)"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import formHandler from '../../../general/mixins/formHandler';
|
||||
export default {
|
||||
props: {
|
||||
packages: {
|
||||
type: Array,
|
||||
required: true
|
||||
},
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
submitted: false,
|
||||
product: {
|
||||
type: '',
|
||||
description: '',
|
||||
width: 0,
|
||||
height: 0,
|
||||
length: 0,
|
||||
weight: 0,
|
||||
quantity: 1,
|
||||
reference: '',
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onlyEnglish(event){
|
||||
let value = event.target.value,
|
||||
regex = /^[^~`!@#$%^&*()_+=[\]\{}|;':",.\/<>?a-zA-Z0-9-]+$/;
|
||||
event.preventDefault();
|
||||
if(regex.test(value)){
|
||||
this.product.description = value.replace(regex, '');
|
||||
}
|
||||
},
|
||||
addPackage(){
|
||||
this.packages.push({
|
||||
type: this.product.type,
|
||||
description: this.product.description,
|
||||
width: this.product.width,
|
||||
height: this.product.height,
|
||||
length: this.product.length,
|
||||
weight: this.product.weight,
|
||||
quantity: this.product.quantity,
|
||||
reference: this.product.reference,
|
||||
});
|
||||
|
||||
this.product = {
|
||||
type: '',
|
||||
description: '',
|
||||
width: 0,
|
||||
height: 0,
|
||||
length: 0,
|
||||
weight: 0,
|
||||
quantity: 1,
|
||||
reference: 0,
|
||||
};
|
||||
|
||||
},
|
||||
removePackage(index){
|
||||
this.packages.splice(index, 1);
|
||||
}
|
||||
},
|
||||
mixins: [formHandler]
|
||||
}
|
||||
</script>
|
||||
@@ -232,6 +232,12 @@
|
||||
viewBox="0 0 172 172"
|
||||
style=" fill:#000000;"><g fill="none" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><path d="M0,172v-172h172v172z" fill="none"></path><g fill="#000000"><path d="M8.6,23.65c-2.37676,0 -4.3,1.92324 -4.3,4.3c0,2.37676 1.92324,4.3 4.3,4.3c2.37676,0 4.3,-1.92324 4.3,-4.3c4.77031,0 8.6,3.82969 8.6,8.6v85.10137c0,8.28926 6.76074,15.05 15.05,15.05h0.50391c0.99941,2.98145 3.72051,5.19863 7.02109,5.19863h4.43438c-0.74746,1.26816 -1.20938,2.72949 -1.20938,4.3c0,4.72832 3.87168,8.6 8.6,8.6c4.72832,0 8.6,-3.87168 8.6,-8.6c0,-1.57051 -0.46191,-3.03184 -1.20938,-4.3h66.91875c-0.74746,1.26816 -1.20937,2.72949 -1.20937,4.3c0,4.72832 3.87168,8.6 8.6,8.6c4.72832,0 8.6,-3.87168 8.6,-8.6c0,-1.57051 -0.46191,-3.03184 -1.20937,-4.3h4.43437c3.36777,0 6.13926,-2.30117 7.08828,-5.375h0.43672v-2.15c0,-3.90527 -3.04863,-7.12188 -6.87832,-7.45781c0.26035,-0.69707 0.42832,-1.43613 0.42832,-2.21719v-40.85c0,-1.67129 -0.73066,-3.14941 -1.78887,-4.3c1.0582,-1.15059 1.78887,-2.62871 1.78887,-4.3v-43c0,-3.53574 -2.91426,-6.45 -6.45,-6.45h-94.6c-3.53574,0 -6.45,2.91426 -6.45,6.45v43c0,1.67129 0.73066,3.14941 1.78887,4.3c-1.0582,1.15059 -1.78887,2.62871 -1.78887,4.3v40.85c0,0.78105 0.16797,1.52012 0.42832,2.21719c-3.15781,0.27715 -5.75293,2.51953 -6.57598,5.48418h-0.30234c-5.96289,0 -10.75,-4.78711 -10.75,-10.75v-85.10137c0,-7.09668 -5.80332,-12.9 -12.9,-12.9zM49.45,30.1h94.6c1.21777,0 2.15,0.93223 2.15,2.15v43c0,1.21777 -0.93223,2.15 -2.15,2.15c-1.17578,0.0168 -2.11641,0.97422 -2.11641,2.15c0,1.17578 0.94062,2.1332 2.11641,2.15c1.21777,0 2.15,0.93223 2.15,2.15v40.85c0,1.21777 -0.93223,2.15 -2.15,2.15h-94.6c-1.21777,0 -2.15,-0.93223 -2.15,-2.15v-40.85c0,-1.21777 0.93223,-2.15 2.15,-2.15c1.17578,-0.0168 2.11641,-0.97422 2.11641,-2.15c0,-1.17578 -0.94063,-2.1332 -2.11641,-2.15c-1.21777,0 -2.15,-0.93223 -2.15,-2.15v-43c0,-1.21777 0.93223,-2.15 2.15,-2.15zM88.15,38.7c-0.77266,-0.0084 -1.49492,0.39473 -1.88965,1.0666c-0.38633,0.67188 -0.38633,1.49492 0,2.1668c0.39473,0.67188 1.11699,1.075 1.88965,1.0666h17.2c0.77266,0.0084 1.49492,-0.39473 1.88965,-1.0666c0.38633,-0.67187 0.38633,-1.49492 0,-2.1668c-0.39472,-0.67187 -1.11699,-1.075 -1.88965,-1.0666zM58.05,77.4c-1.18418,0 -2.15,0.96582 -2.15,2.15c0,1.18418 0.96582,2.15 2.15,2.15c1.18418,0 2.15,-0.96582 2.15,-2.15c0,-1.18418 -0.96582,-2.15 -2.15,-2.15zM66.65,77.4c-1.18418,0 -2.15,0.96582 -2.15,2.15c0,1.18418 0.96582,2.15 2.15,2.15c1.18418,0 2.15,-0.96582 2.15,-2.15c0,-1.18418 -0.96582,-2.15 -2.15,-2.15zM75.25,77.4c-1.18418,0 -2.15,0.96582 -2.15,2.15c0,1.18418 0.96582,2.15 2.15,2.15c1.18418,0 2.15,-0.96582 2.15,-2.15c0,-1.18418 -0.96582,-2.15 -2.15,-2.15zM83.85,77.4c-1.18418,0 -2.15,0.96582 -2.15,2.15c0,1.18418 0.96582,2.15 2.15,2.15c1.18418,0 2.15,-0.96582 2.15,-2.15c0,-1.18418 -0.96582,-2.15 -2.15,-2.15zM92.45,77.4c-1.18418,0 -2.15,0.96582 -2.15,2.15c0,1.18418 0.96582,2.15 2.15,2.15c1.18418,0 2.15,-0.96582 2.15,-2.15c0,-1.18418 -0.96582,-2.15 -2.15,-2.15zM101.05,77.4c-1.18418,0 -2.15,0.96582 -2.15,2.15c0,1.18418 0.96582,2.15 2.15,2.15c1.18418,0 2.15,-0.96582 2.15,-2.15c0,-1.18418 -0.96582,-2.15 -2.15,-2.15zM109.65,77.4c-1.18418,0 -2.15,0.96582 -2.15,2.15c0,1.18418 0.96582,2.15 2.15,2.15c1.18418,0 2.15,-0.96582 2.15,-2.15c0,-1.18418 -0.96582,-2.15 -2.15,-2.15zM118.25,77.4c-1.18418,0 -2.15,0.96582 -2.15,2.15c0,1.18418 0.96582,2.15 2.15,2.15c1.18418,0 2.15,-0.96582 2.15,-2.15c0,-1.18418 -0.96582,-2.15 -2.15,-2.15zM126.85,77.4c-1.18418,0 -2.15,0.96582 -2.15,2.15c0,1.18418 0.96582,2.15 2.15,2.15c1.18418,0 2.15,-0.96582 2.15,-2.15c0,-1.18418 -0.96582,-2.15 -2.15,-2.15zM135.45,77.4c-1.18418,0 -2.15,0.96582 -2.15,2.15c0,1.18418 0.96582,2.15 2.15,2.15c1.18418,0 2.15,-0.96582 2.15,-2.15c0,-1.18418 -0.96582,-2.15 -2.15,-2.15zM88.15,90.3c-0.77266,-0.0084 -1.49492,0.39473 -1.88965,1.0666c-0.38633,0.67188 -0.38633,1.49492 0,2.1668c0.39473,0.67188 1.11699,1.075 1.88965,1.0666h17.2c0.77266,0.0084 1.49492,-0.39473 1.88965,-1.0666c0.38633,-0.67187 0.38633,-1.49492 0,-2.1668c-0.39472,-0.67187 -1.11699,-1.075 -1.88965,-1.0666zM44.075,131.15h105.35c1.80566,0 3.225,1.41934 3.225,3.225c0,1.80566 -1.41934,3.225 -3.225,3.225h-105.35c-1.80566,0 -3.225,-1.41934 -3.225,-3.225c0,-1.80566 1.41934,-3.225 3.225,-3.225zM55.9,141.9c2.40195,0 4.3,1.89805 4.3,4.3c0,2.40195 -1.89805,4.3 -4.3,4.3c-2.40195,0 -4.3,-1.89805 -4.3,-4.3c0,-2.40195 1.89805,-4.3 4.3,-4.3zM137.6,141.9c2.40195,0 4.3,1.89805 4.3,4.3c0,2.40195 -1.89805,4.3 -4.3,4.3c-2.40195,0 -4.3,-1.89805 -4.3,-4.3c0,-2.40195 1.89805,-4.3 4.3,-4.3z"></path></g></g></svg>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div data-type="createWarehousePackageList" class="btn btn-sm btn-block bg-white text-info b-rad-sm pointer requestModal">Add</div>
|
||||
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="stick-up" type="createWarehousePackageList" size="large">
|
||||
<create-warehouse-package-list-form-component :id="order.id" :section="section"></create-warehouse-package-list-form-component>
|
||||
</modal-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
@@ -243,6 +249,14 @@
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col-12 mb-2">
|
||||
<div data-type="createShippingPackageList" class="btn btn-sm btn-block bg-white text-info b-rad-sm pointer requestModal">
|
||||
Add
|
||||
</div>
|
||||
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="stick-up" type="createShippingPackageList" size="large">
|
||||
<create-shipping-package-list-form-component :id="order.id" :section="section"></create-shipping-package-list-form-component>
|
||||
</modal-component>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="row" v-if="order.parcels.origin_warehouse_packages.length">
|
||||
<div class="col">
|
||||
@@ -277,16 +291,16 @@
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row" v-if="order.parcels.in_transit_packages.length">
|
||||
<div class="row" v-if="order.in_transit_packages.length">
|
||||
<div class="col">
|
||||
<div class="row" v-for="group in Math.ceil(order.parcels.in_transit_packages.length / 3)">
|
||||
<div class="col-12" :class="'col-md-'+(12/3)" v-for="item in order.parcels.in_transit_packages.slice((group - 1) * 3, group * 3)" v-bind:key="item.id" :data="item">
|
||||
<div class="row" v-for="group in Math.ceil(order.in_transit_packages.length / 3)">
|
||||
<div class="col-12" :class="'col-md-'+(12/3)" v-for="item in order.in_transit_packages.slice((group - 1) * 3, group * 3)" v-bind:key="item.id" :data="item">
|
||||
<package-component :data="item" status="Shipping"></package-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row align-items-center justify-content-center p-t-50 p-b-50" v-if="!order.parcels.in_transit_packages.length">
|
||||
<div class="row align-items-center justify-content-center p-t-50 p-b-50" v-if="!order.in_transit_packages.length">
|
||||
<div class="col-10">
|
||||
<div class="row align-items-center justify-content-center hint-text">
|
||||
<div class="col-4 hint-text"><img src="/images/not-found-illustration.png" class="w-100 hint-text"/></div>
|
||||
@@ -310,16 +324,16 @@
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row" v-if="order.parcels.destination_warehouse_packages.length">
|
||||
<div class="row" v-if="order.destination_warehouse_packages.length">
|
||||
<div class="col">
|
||||
<div class="row" v-for="group in Math.ceil(order.parcels.destination_warehouse_packages.length / 3)">
|
||||
<div class="col-12" :class="'col-md-'+(12/3)" v-for="item in order.parcels.destination_warehouse_packages.slice((group - 1) * 3, group * 3)" v-bind:key="item.id" :data="item">
|
||||
<div class="row" v-for="group in Math.ceil(order.destination_warehouse_packages.length / 3)">
|
||||
<div class="col-12" :class="'col-md-'+(12/3)" v-for="item in order.destination_warehouse_packages.slice((group - 1) * 3, group * 3)" v-bind:key="item.id" :data="item">
|
||||
<package-component :data="item" status="Preparing Delivery"></package-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row align-items-center justify-content-center p-t-50 p-b-50" v-if="!order.parcels.destination_warehouse_packages.length">
|
||||
<div class="row align-items-center justify-content-center p-t-50 p-b-50" v-if="!order.destination_warehouse_packages.length">
|
||||
<div class="col-10">
|
||||
<div class="row align-items-center justify-content-center hint-text">
|
||||
<div class="col-4 hint-text"><img src="/images/not-found-illustration.png" class="w-100 hint-text"/></div>
|
||||
@@ -343,16 +357,16 @@
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row" v-if="order.parcels.delivered_packages.length">
|
||||
<div class="row" v-if="order.delivered_packages.length">
|
||||
<div class="col">
|
||||
<div class="row" v-for="group in Math.ceil(order.parcels.delivered_packages.length / 3)">
|
||||
<div class="col-12" :class="'col-md-'+(12/3)" v-for="item in order.parcels.delivered_packages.slice((group - 1) * 3, group * 3)" v-bind:key="item.id" :data="item">
|
||||
<div class="row" v-for="group in Math.ceil(order.delivered_packages.length / 3)">
|
||||
<div class="col-12" :class="'col-md-'+(12/3)" v-for="item in order.delivered_packages.slice((group - 1) * 3, group * 3)" v-bind:key="item.id" :data="item">
|
||||
<package-component :data="item" status="Delivered"></package-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row align-items-center justify-content-center p-t-50 p-b-50" v-if="!order.parcels.delivered_packages.length">
|
||||
<div class="row align-items-center justify-content-center p-t-50 p-b-50" v-if="!order.delivered_packages.length">
|
||||
<div class="col-10">
|
||||
<div class="row align-items-center justify-content-center hint-text">
|
||||
<div class="col-4 hint-text"><img src="/images/not-found-illustration.png" class="w-100 hint-text"/></div>
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
import { required } from "vuelidate/lib/validators";
|
||||
|
||||
export default {
|
||||
validations: {
|
||||
parameters: {
|
||||
etd: {
|
||||
required
|
||||
},
|
||||
eta: {
|
||||
required
|
||||
},
|
||||
company_module_id: {
|
||||
required
|
||||
},
|
||||
container_reference: {
|
||||
required
|
||||
},
|
||||
container_number: {
|
||||
required
|
||||
},
|
||||
seal_reference: {
|
||||
required
|
||||
},
|
||||
container_type: {
|
||||
required
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
import { required, numeric } from "vuelidate/lib/validators";
|
||||
|
||||
export default {
|
||||
validations: {
|
||||
parameters: {
|
||||
type: {
|
||||
required
|
||||
},
|
||||
description: {
|
||||
required
|
||||
},
|
||||
width: {
|
||||
required,
|
||||
numeric
|
||||
},
|
||||
height: {
|
||||
required,
|
||||
numeric
|
||||
},
|
||||
length: {
|
||||
required,
|
||||
numeric
|
||||
},
|
||||
weight: {
|
||||
required,
|
||||
numeric
|
||||
},
|
||||
quantity: {
|
||||
required,
|
||||
numeric
|
||||
},
|
||||
reference: {
|
||||
required
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
import { required } from "vuelidate/lib/validators";
|
||||
|
||||
export default {
|
||||
validations: {
|
||||
parameters: {
|
||||
tracking: {
|
||||
required
|
||||
},
|
||||
receive_date: {
|
||||
required
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
@@ -8,8 +8,15 @@
|
||||
<div class="row border p-1">Filter</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <list-component section="containerListSection" :endpoint="route('api.packing_list.container.list')"> -->
|
||||
<list-component section="containerListSection" :endpoint="route('api.packing_list.container.list')" :options="{'per_page': 5, 'with_packing_lists': true, order_by: {column: 'created_at', DESC: true}}">
|
||||
|
||||
<div class="row m-b-15" v-show="!$store.getters.isShowing('createContainerFormSection')">
|
||||
<div class="col">
|
||||
<div data-type="createContainer" class="btn btn-sm btn-primary all-caps b-rad-none pointer m-l-5 rounded btn-lg" @click="$store.dispatch('toggleSection', {name: 'createContainerFormSection', status: true})"><i class="fa fa-plus m-r-10"></i>Add Container</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<create-load-container-form-component :section="'containerListSection'" v-show="$store.getters.isShowing('createContainerFormSection')"></create-load-container-form-component>
|
||||
<list-component section="containerListSection" :endpoint="route('api.packing_list.container.list')" :options="{'per_page': 5, 'with_packing_lists': true, order_by: {column: 'created_at', DESC: true}}" v-show="!$store.getters.isShowing('createContainerFormSection')">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<container-component :data="data"></container-component>
|
||||
</template>
|
||||
|
||||
@@ -11,4 +11,8 @@ Route::group(['prefix' => 'order', 'as' => 'order.', 'namespace' => 'Orders'], f
|
||||
Route::put('/restore/{id}', 'RestoreOrderController@restore')->name('restore');
|
||||
Route::post('/address/change/request', 'RequestChangeOrderAddressController@request')->name('address.change.request');
|
||||
Route::put('/address/{id}/status/{status}', 'ApproveChangeOrderAddressController@approve')->name('address.status.update');
|
||||
|
||||
Route::post('/create-warehouse-packing-list', 'CreateWarehousePackingListController@create')->name('create.warehouse.packing_list');
|
||||
Route::post('/create-shipping-packing-list', 'CreateShippingPackingListController@create')->name('create.shipping.packing_list');
|
||||
// Route::post('/create', 'CreateOrderController@create')->name('create');
|
||||
});
|
||||
|
||||
+11
-1
@@ -10,14 +10,24 @@ Route::group(['namespace' => 'PackingLists', 'as' => 'packing_list.', 'prefix' =
|
||||
Route::put('/status/{id}/update/{status}', 'UpdatePackingListStatusController@update')->name('status.update');
|
||||
Route::delete('/delete/{id}', 'DeletePackingListController@delete')->name('delete');
|
||||
|
||||
Route::put('/reschedule/{id}', 'ReschedulePackingListController@reschedule')->name('reschedule');
|
||||
Route::put('/update-dispatch-date/{id}', 'UpdateDispatchDatePackingListController@update')->name('update_dispatch_date');
|
||||
Route::put('/update-drop-date/{id}', 'UpdateDropDatePackingListController@update')->name('update_drop_date');
|
||||
Route::put('/complete/{id}', 'CompletePackingListController@complete')->name('complete');
|
||||
|
||||
|
||||
Route::group(['namespace' => 'Containers', 'prefix' => 'container', 'as' => 'container.'], function () {
|
||||
Route::get('/{id}/show', 'FetchContainerController@fetch')->name('show');
|
||||
Route::get('/list', 'ListContainersController@list')->name('list');
|
||||
Route::post('/create', 'CreateContainerController@create')->name('create');
|
||||
Route::post('/create/load', 'CreateLoadContainerController@create')->name('create.load');
|
||||
Route::put('/update/{id}', 'UpdateContainerController@update')->name('update');
|
||||
Route::delete('/delete/{id}', 'DeleteContainerController@delete')->name('delete');
|
||||
|
||||
Route::put('/assign-packing_list/{id}', 'AssignPackingListContainerController@assign')->name('assign.packing_list');
|
||||
Route::put('/reschedule/{id}', 'RescheduleContainerController@reschedule')->name('reschedule');
|
||||
Route::put('/update-dispatch-date/{id}', 'UpdateDispatchDateContainerController@update')->name('update_dispatch_date');
|
||||
Route::put('/update-drop-date/{id}', 'UpdateDropDateContainerController@update')->name('update_drop_date');
|
||||
Route::put('/complete/{id}', 'CompleteContainerController@complete')->name('complete');
|
||||
});
|
||||
|
||||
Route::group(['namespace' => 'Packages', 'as' => 'package.', 'prefix' => 'package'], function () {
|
||||
|
||||
Reference in New Issue
Block a user