mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-20 21:14:04 +00:00
Compare commits
47 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fbb61f74b4 | |||
| 9398e981fe | |||
| 0f0e99af35 | |||
| da1c653570 | |||
| f86f129949 | |||
| ec24033209 | |||
| e3dd8440df | |||
| 7647dc0e23 | |||
| 3bfb67b55a | |||
| a26368b728 | |||
| a1a9ffa0aa | |||
| c3050445e1 | |||
| 3620e4c4b5 | |||
| 3dafe41c33 | |||
| e28cc43b18 | |||
| 80873a14e2 | |||
| 799936fd8b | |||
| c6d4a6ffae | |||
| bc5a8bce47 | |||
| 2c03e68242 | |||
| 857004a6a5 | |||
| f155186718 | |||
| 35b2d526ed | |||
| 7e7290acc5 | |||
| 5256d5b2f9 | |||
| e8c33e46c4 | |||
| 5afd37652c | |||
| aeb0dfb025 | |||
| 1a591c0404 | |||
| 22c07b19ad | |||
| 9d2dceab2e | |||
| d00be021bc | |||
| 45103f37fd | |||
| 047f58b391 | |||
| 42883b3723 | |||
| 634d4b8b7d | |||
| 6255936cd1 | |||
| ac1fc3103b | |||
| cf6bebcde2 | |||
| a6fc5dd1a5 | |||
| fa88ffca49 | |||
| 2b6a2810e5 | |||
| c67ee25654 | |||
| b0a2ab08c9 | |||
| feec49318b | |||
| 9252134cc4 | |||
| b36313e24c |
@@ -27,7 +27,6 @@ class LogoutUserLogic extends AbstractControllerLogic
|
||||
*/
|
||||
public function __construct(InvalidatesAuthenticationToken $invalidatesAuthenticationToken)
|
||||
{
|
||||
logger("logout user logic");
|
||||
$this->invalidatesAuthenticationToken = $invalidatesAuthenticationToken;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\Orders\ControllersLogic;
|
||||
|
||||
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
||||
use App\Classes\Modules\Orders\Services\CreatesOrderRemark;
|
||||
use App\Classes\Modules\Remarks\Standards\Rules\CanCreateRemark;
|
||||
use App\Classes\Modules\Remarks\DataTransferObjects\RemarkObject;
|
||||
use App\Classes\Modules\Orders\Services\FetchesOrder;
|
||||
use App\Http\Resources\RemarkResource;
|
||||
use ErrorException;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class AssignOrderRemarkLogic extends AbstractControllerLogic
|
||||
{
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected function notification():array {
|
||||
return [
|
||||
'title' => 'Created Order Remark',
|
||||
'message' => 'You have successfully created a new Order Remark'
|
||||
];
|
||||
}
|
||||
|
||||
/** @var CanCreateRemark */
|
||||
private $canCreateRemark;
|
||||
|
||||
/** @var CreatesOrderRemark */
|
||||
private $createsOrderRemark;
|
||||
|
||||
/** @var FetchesOrder */
|
||||
private $fetchesOrder;
|
||||
|
||||
/**
|
||||
* CreateRemarkLogic constructor.
|
||||
* @param CanCreateRemark $canCreateRemark
|
||||
* @param CreatesOrderRemark $createsOrderRemark
|
||||
*/
|
||||
public function __construct(CanCreateRemark $canCreateRemark, CreatesOrderRemark $createsOrderRemark, FetchesOrder $fetchesOrder)
|
||||
{
|
||||
$this->canCreateRemark = $canCreateRemark;
|
||||
$this->createsOrderRemark = $createsOrderRemark;
|
||||
$this->fetchesOrder = $fetchesOrder;
|
||||
}
|
||||
|
||||
/**
|
||||
* @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 RemarkObject(
|
||||
$request->input('content'),
|
||||
$request->route('id')
|
||||
);
|
||||
|
||||
$this->canCreateRemark->passes($object);
|
||||
$query = $this->createsOrderRemark->execute($this->fetchesOrder->execute(['id' => $request->route('id')]), $object);
|
||||
return $this->resourceResponse( new RemarkResource($query));
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ use App\Classes\Modules\Companies\Services\FetchesCompany;
|
||||
use App\Classes\Modules\Companies\Services\FetchesCompanyModule;
|
||||
use App\Classes\Modules\Orders\Processors\CreateOrderProcessor;
|
||||
use App\Classes\Modules\Orders\Services\GeneratesOrderNumber;
|
||||
use App\Classes\ValueObjects\Constants\WarehouseReferences;
|
||||
use App\Http\Resources\OrderResource;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
@@ -63,6 +64,13 @@ class CreateOrderLogic extends AbstractControllerLogic
|
||||
|
||||
$originWarehouse = $this->fetchesCompanyModule->execute(['id' => $request->input('warehouse_id')]);
|
||||
|
||||
if($originWarehouse->reference === WarehouseReferences::VT_GUANG_ZHOU){
|
||||
$marking = $company->companyModules()->importers()->first()->inviters()->withPivot('invitee_reference')->first()->pivot->invitee_reference;
|
||||
if(in_array($marking, ['2192KAA', '2353GFE', '6866DTR', '1905JYW', '1291NSC', '8288MIB'])){
|
||||
$originWarehouse = $this->fetchesCompanyModule->execute(['reference' => WarehouseReferences::YD_GUANG_ZHOU]);
|
||||
}
|
||||
}
|
||||
|
||||
$order = $this->createOrderProcessor->execute($company, $originWarehouse, $address, $this->generatesOrderNumber->execute());
|
||||
|
||||
return $this->resourceResponse(new OrderResource($order));
|
||||
|
||||
@@ -19,6 +19,7 @@ use App\Classes\ValueObjects\Constants\PackingListType;
|
||||
use App\Classes\ValueObjects\Constants\TransportType;
|
||||
|
||||
use App\Http\Resources\PackingListResource;
|
||||
use App\Models\PackingList;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Carbon\Carbon;
|
||||
@@ -80,6 +81,9 @@ class CreateShippingPackingListLogic extends AbstractControllerLogic
|
||||
/**
|
||||
* @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
|
||||
{
|
||||
@@ -93,6 +97,8 @@ class CreateShippingPackingListLogic extends AbstractControllerLogic
|
||||
PackingListType::SHIPPING_PACKING_LIST,
|
||||
ApprovalStatus::PENDING_SUBMISSION
|
||||
);
|
||||
|
||||
/** @var PackingList $packingList */
|
||||
$packingList = $this->createPackingListProcessor->execute($packingListObject, $order);
|
||||
|
||||
$packages = $request->input('packages');
|
||||
|
||||
@@ -53,7 +53,7 @@ class CreateOrderRolesProcessor
|
||||
$importer = $order->companyModule;
|
||||
|
||||
/** @var CompanyModule $destinationWarehouse */
|
||||
$destinationWarehouse = $this->fetchesCompanyModule->execute(['reference' => WarehouseReferences::DESTINATION_WAREHOUSE[$address->state_id ]]);
|
||||
$destinationWarehouse = $this->fetchesCompanyModule->execute(['reference' => $originWarehouse->reference === WarehouseReferences::YD_GUANG_ZHOU ? WarehouseReferences::YD_DESTINATION_WAREHOUSE : WarehouseReferences::VT_DESTINATION_WAREHOUSE[$address->state_id]]);
|
||||
|
||||
/** @var CompanyModule $freightForwarder */
|
||||
$freightForwarder = $originWarehouse->company->companyModules()->freightForwarders()->first();
|
||||
@@ -84,28 +84,5 @@ class CreateOrderRolesProcessor
|
||||
$this->createsOrderRole->execute($roleObject);
|
||||
|
||||
return true;
|
||||
|
||||
$companies = $this->fetchesCompany->getRepository()->whereIn('id',[1, $request->get('warehouse_id')])->get();
|
||||
|
||||
$cief_company = $companies[0]->id == 1 ? $companies[0] : $companies[1];
|
||||
$warehouse_company = $companies[0]->id != 1 ? $companies[0] : $companies[1];
|
||||
|
||||
$cief_company_module = $cief_company->companyModule()->first();
|
||||
$contractEntities[] = $this->unityCreateContractEntity->execute( $contract_reference_no, [$cief_company_module->unity_hash_id]);
|
||||
$contractEntities[0]->{"company_module_id"} = $cief_company_module->id;
|
||||
|
||||
$warehouse_company_module = $warehouse_company->companyModule()->first();
|
||||
$contractEntities[] = $this->unityCreateContractEntity->execute( $contract_reference_no, [$warehouse_company_module->unity_hash_id]);
|
||||
$contractEntities[1]->{"company_module_id"} = $warehouse_company_module->id;
|
||||
|
||||
foreach($contractEntities as $entity){
|
||||
$order_role_object = new OrderRoleObject($orderId, $entity->company_module_id, $entity->hash_id, $entity->entity_signature_hash_id);
|
||||
|
||||
$this->canCreateOrderRole->passes($order_role_object);
|
||||
|
||||
$this->createsOrderRole->execute($order_role_object);
|
||||
}
|
||||
|
||||
return $contractEntities;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\Orders\Services;
|
||||
|
||||
use App\Classes\General\Eloquent\AbstractUpdateRecord;
|
||||
use App\Classes\General\Eloquent\AbstractUpdateRelationshipRecord;
|
||||
use App\Classes\Modules\Remarks\DataTransferObjects\RemarkObject;
|
||||
use App\Models\Remark;
|
||||
use App\Models\Order;
|
||||
|
||||
class CreatesOrderRemark extends AbstractUpdateRelationshipRecord
|
||||
{
|
||||
|
||||
/**
|
||||
* @param Company $company
|
||||
* @param RemarkObject $object
|
||||
* @return \Illuminate\Database\Eloquent\Model
|
||||
* @throws \App\Classes\Exceptions\MalformedRequestException
|
||||
*/
|
||||
public function execute(Order $order, RemarkObject $object) {
|
||||
$model = new Remark();
|
||||
|
||||
$model->commenter_id = $object->getCommenterId();
|
||||
$model->content = $object->getContent();
|
||||
|
||||
return $this->handler($order->remarks(), $model);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\PackingLists\ControllersLogic;
|
||||
|
||||
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
||||
use App\Classes\Modules\PackingLists\Services\CreatesPackingListRemark;
|
||||
use App\Classes\Modules\Remarks\Standards\Rules\CanCreateRemark;
|
||||
use App\Classes\Modules\Remarks\DataTransferObjects\RemarkObject;
|
||||
use App\Classes\Modules\PackingLists\Services\FetchesPackingList;
|
||||
use App\Http\Resources\RemarkResource;
|
||||
use ErrorException;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class AssignPackingListRemarkLogic extends AbstractControllerLogic
|
||||
{
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected function notification():array {
|
||||
return [
|
||||
'title' => 'Created Packing List Remark',
|
||||
'message' => 'You have successfully created a new Packing List Remark'
|
||||
];
|
||||
}
|
||||
|
||||
/** @var CanCreateRemark */
|
||||
private $canCreateRemark;
|
||||
|
||||
/** @var CreatesPackingListRemark */
|
||||
private $createsPackingListRemark;
|
||||
|
||||
/** @var FetchesPackingList */
|
||||
private $fetchesPackingList;
|
||||
|
||||
/**
|
||||
* CreateRemarkLogic constructor.
|
||||
* @param CanCreateRemark $canCreateRemark
|
||||
* @param CreatesPackingListRemark $createsPackingListRemark
|
||||
*/
|
||||
public function __construct(CanCreateRemark $canCreateRemark, CreatesPackingListRemark $createsPackingListRemark, FetchesPackingList $fetchesPackingList)
|
||||
{
|
||||
$this->canCreateRemark = $canCreateRemark;
|
||||
$this->createsPackingListRemark = $createsPackingListRemark;
|
||||
$this->fetchesPackingList = $fetchesPackingList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @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 RemarkObject(
|
||||
$request->input('content'),
|
||||
$request->route('id')
|
||||
);
|
||||
|
||||
$this->canCreateRemark->passes($object);
|
||||
$query = $this->createsPackingListRemark->execute($this->fetchesPackingList->execute(['id' => $request->route('id')]), $object);
|
||||
return $this->resourceResponse( new RemarkResource($query));
|
||||
}
|
||||
}
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\PackingLists\ControllersLogic\Containers;
|
||||
|
||||
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
||||
use App\Classes\Modules\PackingLists\Services\Containers\CreatesContainerRemark;
|
||||
use App\Classes\Modules\Remarks\Standards\Rules\CanCreateRemark;
|
||||
use App\Classes\Modules\Remarks\DataTransferObjects\RemarkObject;
|
||||
use App\Classes\Modules\PackingLists\Services\Containers\FetchesContainer;
|
||||
|
||||
use App\Http\Resources\RemarkResource;
|
||||
use ErrorException;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class AssignContainerRemarkLogic extends AbstractControllerLogic
|
||||
{
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected function notification():array {
|
||||
return [
|
||||
'title' => 'Created Order Remark',
|
||||
'message' => 'You have successfully created a new Order Remark'
|
||||
];
|
||||
}
|
||||
|
||||
/** @var CanCreateRemark */
|
||||
private $canCreateRemark;
|
||||
|
||||
/** @var CreatesContainerRemark */
|
||||
private $createsContainerRemark;
|
||||
|
||||
/** @var FetchesContainer */
|
||||
private $fetchesContainer;
|
||||
|
||||
/**
|
||||
* CreateRemarkLogic constructor.
|
||||
* @param CanCreateRemark $canCreateRemark
|
||||
* @param CreatesContainerRemark $createsContainerRemark
|
||||
*/
|
||||
public function __construct(CanCreateRemark $canCreateRemark, CreatesContainerRemark $createsContainerRemark, FetchesContainer $fetchesContainer)
|
||||
{
|
||||
$this->canCreateRemark = $canCreateRemark;
|
||||
$this->createsContainerRemark = $createsContainerRemark;
|
||||
$this->fetchesContainer = $fetchesContainer;
|
||||
}
|
||||
|
||||
/**
|
||||
* @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 RemarkObject(
|
||||
$request->input('content'),
|
||||
$request->route('id')
|
||||
);
|
||||
|
||||
$this->canCreateRemark->passes($object);
|
||||
$query = $this->createsContainerRemark->execute($this->fetchesContainer->execute(['id' => $request->route('id')]), $object);
|
||||
return $this->resourceResponse( new RemarkResource($query));
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -53,9 +53,9 @@ class CreateContainerRemarkLogic extends AbstractControllerLogic
|
||||
public function logic(Request $request) : JsonResponse
|
||||
{
|
||||
|
||||
$container = $this->fetchesContainer->execute(['id' => $request->input('container_id')]);
|
||||
$container = $this->fetchesContainer->execute(['id' => $request->route('id')]);
|
||||
|
||||
$object = new RemarkObject($request->input('content'), 1);
|
||||
$object = new RemarkObject($request->input('content'), auth()->user()->id);
|
||||
|
||||
$this->createRemarkProcessor->execute($container, $object);
|
||||
|
||||
|
||||
@@ -66,6 +66,10 @@ class FetchDeliveryListFromVTPortalProcessor
|
||||
|
||||
$shippingPackingLists = $this->fetchesDataFRomVTPortal->getResponseBody($shippingPackingListsRequest);
|
||||
|
||||
if(!array_key_exists(0, $shippingPackingLists->Rows)){
|
||||
continue;
|
||||
}
|
||||
|
||||
$shippingPackingList = $shippingPackingLists->Rows[0];
|
||||
|
||||
if(!$shippingPackingList[9] && !$shippingPackingList[10]) {
|
||||
@@ -87,6 +91,7 @@ class FetchDeliveryListFromVTPortalProcessor
|
||||
$deliveryStep->update(['status' => ApprovalStatus::COMPLETED]);
|
||||
|
||||
} catch (GuzzleException $exception) {
|
||||
dd($exception);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\PackingLists\Services\Containers;
|
||||
|
||||
use App\Classes\General\Eloquent\AbstractUpdateRecord;
|
||||
use App\Classes\General\Eloquent\AbstractUpdateRelationshipRecord;
|
||||
use App\Classes\Modules\Remarks\DataTransferObjects\RemarkObject;
|
||||
use App\Models\Remark;
|
||||
use App\Models\Container;
|
||||
|
||||
class CreatesContainerRemark extends AbstractUpdateRelationshipRecord
|
||||
{
|
||||
|
||||
/**
|
||||
* @param Company $company
|
||||
* @param RemarkObject $object
|
||||
* @return \Illuminate\Database\Eloquent\Model
|
||||
* @throws \App\Classes\Exceptions\MalformedRequestException
|
||||
*/
|
||||
public function execute(Container $container, RemarkObject $object) {
|
||||
$model = new Remark();
|
||||
|
||||
$model->commenter_id = $object->getCommenterId();
|
||||
$model->content = $object->getContent();
|
||||
|
||||
return $this->handler($container->remarks(), $model);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,7 @@ class CreatesPackingList extends AbstractUpdateRelationshipRecord
|
||||
$model->claimant_id = $object->getClaimantId();
|
||||
$model->type = $object->getType();
|
||||
$model->status = $object->getStatus();
|
||||
$model->reference_contract = $object->getContractReference();
|
||||
|
||||
return $this->handler($packable->packingLists(), $model);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\PackingLists\Services;
|
||||
|
||||
use App\Classes\General\Eloquent\AbstractUpdateRecord;
|
||||
use App\Classes\General\Eloquent\AbstractUpdateRelationshipRecord;
|
||||
use App\Classes\Modules\Remarks\DataTransferObjects\RemarkObject;
|
||||
use App\Models\Remark;
|
||||
use App\Models\PackingList;
|
||||
|
||||
class CreatesPackingListRemark extends AbstractUpdateRelationshipRecord
|
||||
{
|
||||
|
||||
/**
|
||||
* @param Company $company
|
||||
* @param RemarkObject $object
|
||||
* @return \Illuminate\Database\Eloquent\Model
|
||||
* @throws \App\Classes\Exceptions\MalformedRequestException
|
||||
*/
|
||||
public function execute(PackingList $packingList, RemarkObject $object) {
|
||||
$model = new Remark();
|
||||
|
||||
$model->commenter_id = $object->getCommenterId();
|
||||
$model->content = $object->getContent();
|
||||
|
||||
return $this->handler($packingList->remarks(), $model);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -57,7 +57,7 @@ class UpdateRemarkLogic extends AbstractControllerLogic
|
||||
*/
|
||||
public function logic(Request $request) : JsonResponse
|
||||
{
|
||||
$object = new RemarkObject($request->input('content'), $request->input('commenter_id'));
|
||||
$object = new RemarkObject($request->input('content'), auth()->user()->id);
|
||||
|
||||
$this->canUpdateRemark->passes($object);
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ class UpdatesContractObligation
|
||||
|
||||
$accessToken=$this->getAccessToken->execute();
|
||||
|
||||
$this->updateContractStatusEndpoint = str_replace('{hash}',$obligation_hash_id,$this->updateContractStatusEndpoint);
|
||||
$this->updateContractStatusEndpoint = str_replace('{hash}', $obligation_hash_id, $this->updateContractStatusEndpoint);
|
||||
|
||||
$response = Http::withToken($accessToken)->put($this->updateContractStatusEndpoint,['entity_signature_id'=>$contract_entity_signature])->object();
|
||||
|
||||
|
||||
@@ -16,6 +16,6 @@ final class BusinessType {
|
||||
|
||||
public const DRIVER = 5;
|
||||
|
||||
public const CURRENCY_VENDOR = 5;
|
||||
public const CURRENCY_VENDOR = 6;
|
||||
|
||||
}
|
||||
|
||||
@@ -4,34 +4,40 @@ namespace App\Classes\ValueObjects\Constants;
|
||||
|
||||
final class WarehouseReferences {
|
||||
|
||||
public const GUANG_ZHOU = 'GZ-V01';
|
||||
public const VT_GUANG_ZHOU = 'GZ-V01';
|
||||
|
||||
public const YIWU = 'YW-V01';
|
||||
public const YD_GUANG_ZHOU = 'GZ-V02';
|
||||
|
||||
public const KLANG = 'KL-V01';
|
||||
public const VT_YIWU = 'YW-V01';
|
||||
|
||||
public const SABAH = 'SB-V01';
|
||||
public const VT_KLANG = 'KL-V01';
|
||||
|
||||
public const SARAWAK = 'SRW-V01';
|
||||
public const YD_KLANG = 'KL-V02';
|
||||
|
||||
public const DESTINATION_WAREHOUSE = [
|
||||
1 => self::KLANG,
|
||||
2 => self::KLANG,
|
||||
3 => self::KLANG,
|
||||
4 => self::KLANG,
|
||||
5 => self::SABAH,
|
||||
6 => self::KLANG,
|
||||
7 => self::KLANG,
|
||||
8 => self::KLANG,
|
||||
9 => self::KLANG,
|
||||
10 => self::KLANG,
|
||||
11 => self::KLANG,
|
||||
12 => self::KLANG,
|
||||
13 => self::SABAH,
|
||||
14 => self::KLANG,
|
||||
15 => self::KLANG,
|
||||
16 => self::KLANG,
|
||||
public const VT_SABAH = 'SB-V01';
|
||||
|
||||
public const VT_SARAWAK = 'SRW-V01';
|
||||
|
||||
public const VT_DESTINATION_WAREHOUSE = [
|
||||
1 => self::VT_KLANG,
|
||||
2 => self::VT_KLANG,
|
||||
3 => self::VT_KLANG,
|
||||
4 => self::VT_KLANG,
|
||||
5 => self::VT_SABAH,
|
||||
6 => self::VT_KLANG,
|
||||
7 => self::VT_KLANG,
|
||||
8 => self::VT_KLANG,
|
||||
9 => self::VT_KLANG,
|
||||
10 => self::VT_KLANG,
|
||||
11 => self::VT_KLANG,
|
||||
12 => self::VT_KLANG,
|
||||
13 => self::VT_SABAH,
|
||||
14 => self::VT_SARAWAK,
|
||||
15 => self::VT_KLANG,
|
||||
16 => self::VT_KLANG,
|
||||
];
|
||||
|
||||
public const YD_DESTINATION_WAREHOUSE = self::YD_KLANG;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ class UserAuthenticationLogoutController
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function logout(Request $request, LogoutUserLogic $logic): JsonResponse {
|
||||
logger("logout controller");
|
||||
return $logic->execute($request);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Orders;
|
||||
|
||||
use App\Classes\Modules\Orders\ControllersLogic\AssignOrderRemarkLogic;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class AssignOrderRemarkController
|
||||
{
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param AssignOrderRemarkLogic $logic
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function create(Request $request, AssignOrderRemarkLogic $logic): JsonResponse {
|
||||
return $logic->execute($request);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\PackingLists;
|
||||
|
||||
use App\Classes\Modules\PackingLists\ControllersLogic\AssignPackingListRemarkLogic;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class AssignPackingListRemarkController
|
||||
{
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param AssignPackingListRemarkLogic $logic
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function create(Request $request, AssignPackingListRemarkLogic $logic): JsonResponse {
|
||||
return $logic->execute($request);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\PackingLists\Containers;
|
||||
|
||||
use App\Classes\Modules\PackingLists\ControllersLogic\Containers\AssignContainerRemarkLogic;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class AssignContainerRemarkController
|
||||
{
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param AssignContainerRemarkLogic $logic
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function create(Request $request, AssignContainerRemarkLogic $logic): JsonResponse {
|
||||
return $logic->execute($request);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -35,6 +35,8 @@ class CompanyModuleResource extends JsonResource
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'type' => $this->type,
|
||||
'name' => $this->name,
|
||||
'reference' => $this->reference,
|
||||
'address' => new AddressResource($defaultAddress),
|
||||
'company' => new CompanyResource($this->whenLoaded('company')),
|
||||
'marking' => $marking
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use App\Classes\ValueObjects\Constants\ContainerTypes;
|
||||
use App\Models\Remark;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class ContainerResource extends JsonResource
|
||||
@@ -26,6 +27,7 @@ class ContainerResource extends JsonResource
|
||||
'packing_lists' => PackingListResource::collection($this->whenLoaded('packingLists', function(){
|
||||
return $this->packingLists()->whereHas('packages')->get();
|
||||
})),
|
||||
'remarks' => RemarkResource::collection($this->remarks),
|
||||
'status' => $this->status
|
||||
];
|
||||
}
|
||||
|
||||
@@ -16,8 +16,11 @@ class RemarkResource extends JsonResource
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'commenter_id' => $this->commenter_id,
|
||||
'commenter' => new UserResource($this->commenter),
|
||||
'owner_id' => $this->owner_id,
|
||||
'content' => $this->content,
|
||||
'created_at' => $this->created_at->format('d-m-Y H:i'),
|
||||
'long_ago' => $this->created_at->diffForHumans()
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,18 +4,11 @@ namespace App\Models;
|
||||
|
||||
use App\Classes\General\Interfaces\Documentable;
|
||||
use App\Classes\General\Interfaces\Contactable;
|
||||
use App\Classes\Modules\ServiceTypes\DataTransferObjects\ServiceConfigurationsObject;
|
||||
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
use App\Classes\ValueObjects\Constants\BusinessType;
|
||||
use App\Classes\ValueObjects\Constants\SegmentConstants;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasManyThrough;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Support\Collection;
|
||||
use Staudenmeir\EloquentHasManyDeep\HasManyDeep;
|
||||
use Staudenmeir\EloquentHasManyDeep\HasRelationships;
|
||||
|
||||
|
||||
@@ -65,5 +65,4 @@ class Container extends AbstractModel implements Transportable, Remarkable
|
||||
{
|
||||
return $this->morphMany(Remark::class, 'owner');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -55,6 +55,14 @@ class Order extends AbstractModel implements Addressable, Packable
|
||||
return $this->morphMany(PackingList::class, 'owner');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return MorphMany
|
||||
*/
|
||||
public function remarks(): morphMany
|
||||
{
|
||||
return $this->morphMany(Remark::class, 'owner');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return HasManyThrough
|
||||
*/
|
||||
|
||||
@@ -56,6 +56,14 @@ class PackingList extends AbstractModel implements Transportable, Steppable
|
||||
return $this->morphMany(Transport::class, 'owner');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return MorphMany
|
||||
*/
|
||||
public function remarks(): morphMany
|
||||
{
|
||||
return $this->morphMany(Remark::class, 'owner');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return belongsToMany
|
||||
*/
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class Remark extends AbstractModel
|
||||
{
|
||||
@@ -15,4 +16,12 @@ class Remark extends AbstractModel
|
||||
{
|
||||
return $this->morphTo();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BelongsTo
|
||||
*/
|
||||
public function commenter(): BelongsTo
|
||||
{
|
||||
return $this->BelongsTo(User::class, 'commenter_id', 'id');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Classes\Modules\Addresses\DataTransferObjects\AddressObject;
|
||||
use App\Classes\Modules\Addresses\Processors\CreateAddressFromOldAddressProcessor;
|
||||
use App\Classes\Modules\Addresses\Services\CreatesAddress;
|
||||
use App\Classes\Modules\Companies\DataTransferObjects\CompanyConnectionObject;
|
||||
use App\Classes\Modules\Companies\DataTransferObjects\CompanyObject;
|
||||
use App\Classes\Modules\Companies\Processors\CreateCompanyModuleProcessor;
|
||||
use App\Classes\Modules\Companies\Processors\CreateCompanyProcessor;
|
||||
use App\Classes\Modules\Companies\Services\ApprovesCompanyConnection;
|
||||
use App\Classes\Modules\Companies\Services\CreatesCompany;
|
||||
use App\Classes\Modules\Companies\Services\CreatesCompanyConnection;
|
||||
use App\Classes\Modules\Companies\Services\UpdatesCompanyStatus;
|
||||
use App\Classes\Modules\Contacts\DataTransferObjects\ContactObject;
|
||||
use App\Classes\Modules\Contacts\Processors\CreateContactProcessor;
|
||||
use App\Classes\Modules\Contacts\Services\CreatesContact;
|
||||
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
use App\Classes\ValueObjects\Constants\CompanyType;
|
||||
use App\Classes\ValueObjects\Constants\BusinessType;
|
||||
|
||||
use App\Models\CompanyModule;
|
||||
use App\Models\OldCompany;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
use App\Models\Company;
|
||||
|
||||
class ModernWarehouseTableSeeder extends Seeder
|
||||
{
|
||||
|
||||
/** @var CreateCompanyProcessor */
|
||||
private $createCompanyProcessor;
|
||||
|
||||
/** @var UpdatesCompanyStatus*/
|
||||
private $updatesCompanyStatus;
|
||||
|
||||
/** @var CreateCompanyModuleProcessor */
|
||||
private $createCompanyModuleProcessor;
|
||||
|
||||
/** @var CreateContactProcessor */
|
||||
private $createContactProcessor;
|
||||
|
||||
/** @var CreatesCompanyConnection */
|
||||
private $createsCompanyConnection;
|
||||
|
||||
/** @var ApprovesCompanyConnection */
|
||||
private $approvesCompanyConnection;
|
||||
|
||||
/** @var CreateAddressFromOldAddressProcessor */
|
||||
private $createAddressFromOldAddressProcessor;
|
||||
|
||||
/** @var CreatesAddress */
|
||||
private $createsAddress;
|
||||
|
||||
/** @var CreatesCompany */
|
||||
private $createsCompany;
|
||||
|
||||
/** @var CreatesContact */
|
||||
private $createsContact;
|
||||
|
||||
/**
|
||||
* CompaniesTableSeeder constructor.
|
||||
* @param CreateCompanyProcessor $createCompanyProcessor
|
||||
* @param UpdatesCompanyStatus $updatesCompanyStatus
|
||||
* @param CreateCompanyModuleProcessor $createCompanyModuleProcessor
|
||||
* @param CreateContactProcessor $createContactProcessor
|
||||
* @param CreatesCompanyConnection $createsCompanyConnection
|
||||
* @param ApprovesCompanyConnection $approvesCompanyConnection
|
||||
* @param CreateAddressFromOldAddressProcessor $createAddressFromOldAddressProcessor
|
||||
* @param CreatesAddress $createsAddress
|
||||
* @param CreatesCompany $createsCompany
|
||||
* @param CreatesContact $createsContact
|
||||
*/
|
||||
public function __construct(CreateCompanyProcessor $createCompanyProcessor, UpdatesCompanyStatus $updatesCompanyStatus, CreateCompanyModuleProcessor $createCompanyModuleProcessor, CreateContactProcessor $createContactProcessor, CreatesCompanyConnection $createsCompanyConnection, ApprovesCompanyConnection $approvesCompanyConnection, CreateAddressFromOldAddressProcessor $createAddressFromOldAddressProcessor, CreatesAddress $createsAddress, CreatesCompany $createsCompany, CreatesContact $createsContact)
|
||||
{
|
||||
$this->createCompanyProcessor = $createCompanyProcessor;
|
||||
$this->updatesCompanyStatus = $updatesCompanyStatus;
|
||||
$this->createCompanyModuleProcessor = $createCompanyModuleProcessor;
|
||||
$this->createContactProcessor = $createContactProcessor;
|
||||
$this->createsCompanyConnection = $createsCompanyConnection;
|
||||
$this->approvesCompanyConnection = $approvesCompanyConnection;
|
||||
$this->createAddressFromOldAddressProcessor = $createAddressFromOldAddressProcessor;
|
||||
$this->createsAddress = $createsAddress;
|
||||
$this->createsCompany = $createsCompany;
|
||||
$this->createsContact = $createsContact;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
* @throws \App\Classes\Exceptions\AccessForbiddenException
|
||||
* @throws \App\Classes\Exceptions\MalformedRequestException
|
||||
* @throws \App\Classes\Exceptions\RequestValidationException
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
|
||||
/** @var Company $company */
|
||||
$company = $this->createsCompany->execute(new CompanyObject('Modern', 'MODERN', CompanyType::COMPANY_BUSINESS, ApprovalStatus::APPROVED));
|
||||
|
||||
/** @var CompanyModule $companyModule */
|
||||
$this->createCompanyModuleProcessor->execute($company, BusinessType::FREIGHT_FORWARDER);
|
||||
|
||||
$companyModule = $this->createCompanyModuleProcessor->execute($company, BusinessType::WAREHOUSE);
|
||||
|
||||
$companyModule->update(['name' => 'Guangzhou', 'reference' => 'GZ-V02']);
|
||||
$address = new AddressObject('白云区 白云湖街道 大朗北路 大朗生活区 523A', '(公交车总站对面)', 2, 35, 633, 510000);
|
||||
|
||||
$contact = new ContactObject('郑学钟', '18665696389', '', '');
|
||||
$this->createsAddress->execute($companyModule, $address);
|
||||
$this->createsContact->execute($companyModule, $contact);
|
||||
|
||||
$companyModule = $this->createCompanyModuleProcessor->execute($company, BusinessType::WAREHOUSE);
|
||||
$companyModule->update(['name' => 'Klang', 'reference' => 'KL-V02']);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+24
@@ -11,6 +11,30 @@
|
||||
<on-boarding-section-component v-if="!company.last_order"></on-boarding-section-component>
|
||||
<div class="row" v-if="company.last_order">
|
||||
<div class="col">
|
||||
<div class="row m-b-20">
|
||||
<div class="col no-padding">
|
||||
<div class="alert alert-warning" role="alert">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="fs-18 p-t-15"><i class="fa fa-exclamation-triangle m-r-5"></i> !!!! 海运费涨价通知 NOTICE OF PRICE INCREMENT !!! <i class="fa fa-exclamation-triangle m-l-5"></i></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p>由于近期海运费非常不稳定,运费每个星期都会调整,请发货入仓之前按以下按键确认最新运费价格。</p>
|
||||
<p>Due to the recent unstable shipping rates, shipping costs are adjusted weekly, please confirm the latest shipping prices before shipping into the warehouse by following the button below.</p>
|
||||
<a href="https://www.cief-malaysia.com/services-sea-shipping/" target="_blank"><div class="btn btn-complete">Sea Shipping Price List</div></a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<chinese-new-year-memo-component></chinese-new-year-memo-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-b-30 relative">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
<template>
|
||||
<div class="row m-b-20 parentContainer">
|
||||
<div class="col">
|
||||
<div class="row justify-content-center align-items-center">
|
||||
<div class="hide col-auto btn-rounded padding-10 d-flex justify-content-center align-items-center bg-master-lighter" style="width: 30px;height: 30px; box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.14);">
|
||||
<span class="bold">{{item.commenter.name.substr(0, 1)}}</span>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col-auto">
|
||||
<p class="no-margin muted bold fs-14">{{item.commenter.name}}</p>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<span class="fs-12 muted normal">{{item.long_ago}}</span>
|
||||
</div>
|
||||
<div class="col d-flex justify-content-end">
|
||||
<div class="row">
|
||||
<div class="col p-t-5 p-b-5 b-a b-grey">
|
||||
<div class="row" v-if="!isEdit">
|
||||
<div class="col">
|
||||
<i class="fa fa-edit pointer" @click="isEdit = !isEdit"></i>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="requestModal pointer" data-type="deleteComment">
|
||||
<i class="fa fa-trash"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" v-if="isEdit">
|
||||
<div class="col">
|
||||
<i class="fa fa-times pointer" @click="isEdit = !isEdit"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p v-if="!isEdit">{{item.content}}</p>
|
||||
<container-comment-form-component :section="section" :data="item" :id="item.owner_id" v-on:submit="isEdit=false" v-if="isEdit"></container-comment-form-component>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="deleteComment">
|
||||
<delete-container-comment-form-component :section="section" :data="item"></delete-container-comment-form-component>
|
||||
</modal-component>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import componentHandler from '../../../general/mixins/componentHandler';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
section: {
|
||||
type: String,
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
isEdit: false,
|
||||
}
|
||||
},
|
||||
mixins: [componentHandler]
|
||||
}
|
||||
</script>
|
||||
@@ -1,59 +0,0 @@
|
||||
<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>
|
||||
+8
-2
@@ -26,7 +26,8 @@
|
||||
<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 class="btn btn-primary w-100 btn-lg" data-dismiss="modal" @click="submitDummy('containerArrival')">Confirm</div>
|
||||
<!-- <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>
|
||||
@@ -53,6 +54,11 @@
|
||||
eta: { required },
|
||||
}
|
||||
},
|
||||
mixins: [modalFormHandler]
|
||||
mixins: [modalFormHandler],
|
||||
methods: {
|
||||
submitDummy(progress) {
|
||||
this.$emit('confirm', progress);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,49 @@
|
||||
<template>
|
||||
<div class="row m-t-5">
|
||||
<div class="col">
|
||||
<validation-wrapper-component :validator="$v.parameters.content">
|
||||
<input type="text" class="form-control fs-12" placeholder="Write your comments..." v-model.trim="parameters.content">
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
<div class="col-auto b-a b-grey d-flex justify-content-center align-items-center rounded pointer">
|
||||
<i class="fa fa-paper-plane" @click="submitForm"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import modalFormHandler from '../../../general/mixins/modalFormHandler';
|
||||
import { required } from "vuelidate/lib/validators";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
id: {
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
parameters: {
|
||||
content: this.content,
|
||||
},
|
||||
};
|
||||
},
|
||||
validations: {
|
||||
parameters: {
|
||||
content: { required },
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.data) {
|
||||
this.parameters.content = this.data.content
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
submitForm() {
|
||||
this.submit(this.data ? this.route('api.remark.update', this.data.id) : this.route('api.packing_list.container.remark.create', this.id), this.data ? 'put' : 'post', this.section, true, true);
|
||||
this.$emit('submit')
|
||||
}
|
||||
},
|
||||
mixins: [modalFormHandler]
|
||||
}
|
||||
</script>
|
||||
+8
-2
@@ -26,7 +26,8 @@
|
||||
<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 class="btn btn-primary w-100 btn-lg" data-dismiss="modal" @click="submitDummy('containerDepature')">Confirm</div>
|
||||
<!-- <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>
|
||||
@@ -53,6 +54,11 @@
|
||||
etd: { required },
|
||||
}
|
||||
},
|
||||
mixins: [modalFormHandler]
|
||||
mixins: [modalFormHandler],
|
||||
methods: {
|
||||
submitDummy(progress) {
|
||||
this.$emit('confirm', progress);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
+8
-2
@@ -11,7 +11,8 @@
|
||||
<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 class="btn btn-primary w-100 btn-lg" data-dismiss="modal" @click="submitDummy('containerUnpacking')">Confirm</div>
|
||||
<!-- <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>
|
||||
@@ -26,6 +27,11 @@
|
||||
expanded: false,
|
||||
};
|
||||
},
|
||||
mixins: [modalFormHandler]
|
||||
mixins: [modalFormHandler],
|
||||
methods: {
|
||||
submitDummy(progress) {
|
||||
this.$emit('confirm', progress);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
<template>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<loading-component style="height: 300px; top: 0;" key="1" color="success" v-show="isLoading" ></loading-component>
|
||||
<div class="row justify-content-center" v-show="!isLoading">
|
||||
<div class="col">
|
||||
<div class="row m-b-20">
|
||||
<div class="col">
|
||||
<h3 class="all-caps">Are you Sure?</h3>
|
||||
<div class="fs-11">Are you sure you want to delete this comment?</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col p-r-5">
|
||||
<div class="btn btn-sm btn-success btn-block b-rad-none" data-dismiss="modal">Cancel</div>
|
||||
</div>
|
||||
<div class="col p-l-5">
|
||||
<div class="btn btn-sm btn-danger btn-block b-rad-none" @click="submit(route('api.remark.delete', item.id), 'delete', section, true, true)">Delete</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import componentHandler from '../../../general/mixins/componentHandler';
|
||||
import ModalFormHandler from '../../../general/mixins/modalFormHandler';
|
||||
export default {
|
||||
mixins: [componentHandler, ModalFormHandler]
|
||||
}
|
||||
</script>
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
<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-t-20">
|
||||
<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.content">
|
||||
<label class="text-primary">Comment</label>
|
||||
<input type="text" class="form-control fs-12" v-model="parameters.content">
|
||||
</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.remark.update', data.id), 'put', section, true, true)">Confirm</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import componentHandler from '../../../general/mixins/componentHandler';
|
||||
import ModalFormHandler from '../../../general/mixins/modalFormHandler';
|
||||
import { required } from "vuelidate/lib/validators";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
parameters: {
|
||||
content: this.content,
|
||||
commenter_id: this.$store.getters.getUserId
|
||||
},
|
||||
};
|
||||
},
|
||||
validations: {
|
||||
parameters: {
|
||||
content: { required },
|
||||
}
|
||||
},
|
||||
mixins: [componentHandler, ModalFormHandler]
|
||||
}
|
||||
</script>
|
||||
+14
-2
@@ -29,7 +29,8 @@
|
||||
<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 class="btn btn-primary w-100 btn-lg" data-dismiss="modal" @click="submitDummy('rescheduleDate')">Confirm</div>
|
||||
<!-- <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>
|
||||
@@ -40,6 +41,12 @@
|
||||
import { required } from "vuelidate/lib/validators";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
click: {
|
||||
type: Function,
|
||||
default: () => {}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
parameters: {
|
||||
@@ -54,7 +61,12 @@
|
||||
eta: { required },
|
||||
}
|
||||
},
|
||||
mixins: [modalFormHandler]
|
||||
mixins: [modalFormHandler],
|
||||
methods: {
|
||||
submitDummy(progress) {
|
||||
this.$emit('confirm', progress);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
+134
-75
@@ -148,6 +148,31 @@
|
||||
left: -40px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.tracking-container {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.tracking-container li {
|
||||
list-style: none;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.overview-container {
|
||||
position: relative;
|
||||
display: block;
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.overview-container .overview-fixed-position {
|
||||
position: fixed;
|
||||
background-color: #fff;
|
||||
display: block;
|
||||
width: 71%;
|
||||
top: 0;
|
||||
z-index: 999;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div class="row" v-if="container">
|
||||
@@ -169,7 +194,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="col" v-if="container.transport">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="fs-10 bold m-b-0">ETD</p>
|
||||
@@ -221,20 +246,22 @@
|
||||
<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="row 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>
|
||||
<ul class="tracking-container">
|
||||
<li class="m-t-10">
|
||||
<a class="btn btn-sm btn-primary b-rad-none all-caps requestModal" data-type="rescheduleDate" v-if="showRescheduleDate">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" v-if="showContainerDepature">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" v-if="showContainerArrival">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" v-if="showContainerUnpacking">Date of Unpacking</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -245,39 +272,43 @@
|
||||
</div>
|
||||
|
||||
<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>
|
||||
<reschedule-date-form-component :section="section" :data="container" @confirm="shippingProcess"></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>
|
||||
<container-depature-form-component :section="section" :data="container" @confirm="shippingProcess"></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>
|
||||
<container-arrival-form-component :section="section" :data="container" @confirm="shippingProcess"></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>
|
||||
<container-unpacking-form-container :section="section" :data="container" @confirm="shippingProcess"></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 ref="overviewAnchor" class="overview-container">
|
||||
<div :class="{ 'overview-fixed-position': overviewContClass }">
|
||||
<h5 class="bold m-b-10">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>
|
||||
<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">
|
||||
@@ -295,22 +326,22 @@
|
||||
<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="dot requestModal pointer disabled" v-bind:class="{ 'checked': checkedRescheduleDate }" 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="dot requestModal pointer disabled" v-bind:class="{ 'checked': checkedContainerDepature }" data-type="containerDepature">
|
||||
<div class="position-relative">
|
||||
<div class="status_p text-center position-absolute">In<br>Transit</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dot">
|
||||
<div class="dot requestModal pointer disabled" v-bind:class="{ 'checked': checkedContainerArrival }" data-type="containerArrival">
|
||||
<div class="position-relative">
|
||||
<div class="status_p text-center position-absolute">Discharge<br>Port</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dot">
|
||||
<div class="dot requestModal pointer disabled" v-bind:class="{ 'checked': checkedContainerUnpacking }" data-type="containerUnpacking">
|
||||
<div class="position-relative">
|
||||
<div class="status_p text-center position-absolute">Warehouse-MY(M2525)</div>
|
||||
</div>
|
||||
@@ -616,41 +647,13 @@
|
||||
</div>
|
||||
<div class="row" v-if="tabShowing === 'Comments'">
|
||||
<div class="col">
|
||||
<div class="row m-b-20">
|
||||
|
||||
<div class="row" v-for="remarks in container.remarks">
|
||||
<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>
|
||||
<container-comment-component :section="section" :data="remarks"></container-comment-component>
|
||||
</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...">
|
||||
<container-comment-form-component :section="section" :id="container.id"></container-comment-form-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -661,9 +664,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import RescheduleDateFormComponent from './RescheduleDateFormComponent.vue';
|
||||
export default {
|
||||
components: { RescheduleDateFormComponent },
|
||||
props: {
|
||||
id: {
|
||||
type: Number,
|
||||
@@ -679,7 +680,17 @@
|
||||
CBMcapacity: 30,
|
||||
tabShowing: 'Timeline',
|
||||
selectAllPackingList: false,
|
||||
selectedPackageList: []
|
||||
selectedPackageList: [],
|
||||
deleteCommentId: '',
|
||||
showRescheduleDate: true,
|
||||
showContainerDepature: false,
|
||||
showContainerArrival: false,
|
||||
showContainerUnpacking: false,
|
||||
overviewContClass: false,
|
||||
checkedRescheduleDate: false,
|
||||
checkedContainerDepature: false,
|
||||
checkedContainerArrival: false,
|
||||
checkedContainerUnpacking: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -700,6 +711,9 @@
|
||||
created(){
|
||||
this.$store.dispatch('updateListQueue', {'name': this.section});
|
||||
},
|
||||
mounted() {
|
||||
this.calculateOverviewPosition();
|
||||
},
|
||||
methods: {
|
||||
fetchCompany(){
|
||||
this.isLoading = true;
|
||||
@@ -721,6 +735,51 @@
|
||||
this.selectedPackageList = this.container.packing_lists;
|
||||
}
|
||||
},
|
||||
hideAllProgress() {
|
||||
this.showRescheduleDate = false;
|
||||
this.showContainerDepature = false;
|
||||
this.showContainerArrival = false;
|
||||
this.showContainerUnpacking = false;
|
||||
},
|
||||
shippingProcess(progress) {
|
||||
switch(progress) {
|
||||
case 'rescheduleDate':
|
||||
this.hideAllProgress();
|
||||
this.showContainerDepature = true;
|
||||
this.checkedRescheduleDate = true;
|
||||
break;
|
||||
case 'containerDepature':
|
||||
this.hideAllProgress();
|
||||
this.showContainerArrival = true;
|
||||
this.checkedRescheduleDate = true;
|
||||
this.checkedContainerDepature = true;
|
||||
break;
|
||||
case 'containerArrival':
|
||||
this.hideAllProgress();
|
||||
this.showContainerUnpacking = true;
|
||||
this.checkedRescheduleDate = true;
|
||||
this.checkedContainerDepature = true;
|
||||
this.checkedContainerArrival = true;
|
||||
break;
|
||||
case 'containerUnpacking':
|
||||
this.hideAllProgress();
|
||||
this.checkedRescheduleDate = true;
|
||||
this.checkedContainerDepature = true;
|
||||
this.checkedContainerArrival = true;
|
||||
this.checkedContainerUnpacking = true;
|
||||
break;
|
||||
}
|
||||
},
|
||||
calculateOverviewPosition() {
|
||||
setInterval(() => {
|
||||
const anchor = this.$refs.overviewAnchor;
|
||||
if (anchor) {
|
||||
const viewportOffset = anchor.getBoundingClientRect();
|
||||
let top = viewportOffset.top;
|
||||
this.overviewContClass = (top <= 0) ? true : false;
|
||||
}
|
||||
}, 200);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
@@ -0,0 +1,133 @@
|
||||
<template>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="text-white p-t-25 p-l-25 p-r-25" style="background-image: radial-gradient(rgb(182, 3, 17), rgb(118, 0, 12));">
|
||||
<div class="row" style="max-width: 650px; margin: 0px auto;">
|
||||
<div class="col">
|
||||
<div class="row m-b-25">
|
||||
<div class="col text-center">
|
||||
<h4 class="text-warning no-margin">2022年农历新春前夕仓库运作通知</h4>
|
||||
<h4 class="text-warning no-margin">Chinese New Year Shipping Memo 2022</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="no-margin">尊敬的顾客,</p>
|
||||
<p class="m-b-15">Dear Valued Customers,</p>
|
||||
<p class="no-margin">为确保您的货物在华人农历新年前收到, 务必提前通知您的供应商安排在以下日期前把货物送到仓库:</p>
|
||||
<p>To ensure your goods received before the Chinese New Year Holidays, we advised the customer to inform their suppliers to arrange their goods earlier beforehand to the schedule below:</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-10">
|
||||
<div class="col">
|
||||
<div class="tg-wrap"><table class="tg">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tg-2bkf" colspan="2">仓库 WAREHOUSE</th>
|
||||
<th class="tg-2bkf">入仓日期 RECEIVED DATE</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="tg-2bkf" rowspan="2">广州<br>GUANGHZOU<br></td>
|
||||
<td class="tg-2bkf">西马<br>WEST MALAYSIA</td>
|
||||
<td class="tg-2bkf">25/12/2021</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2bkf">东马<br>EAST MALAYSIA</td>
|
||||
<td class="tg-2bkf">11/12/2021</td>
|
||||
</tr>
|
||||
<tr v-if="expanded">
|
||||
<td class="tg-2bkf" rowspan="2">义乌<br>YIWU</td>
|
||||
<td class="tg-2bkf">西马<br>WEST MALAYSIA</td>
|
||||
<td class="tg-2bkf">18/12/2021</td>
|
||||
</tr>
|
||||
<tr v-if="expanded">
|
||||
<td class="tg-2bkf">东马<br>EAST MALAYSIA</td>
|
||||
<td class="tg-2bkf">04/12/2021</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-15" v-if="expanded">
|
||||
<div class="col">
|
||||
<div class="row m-b-20">
|
||||
<div class="col">
|
||||
<p class="no-margin">我们建议客户尽早安排送货到中国仓库,以确保货物在恶劣天气、运输延误、海关检查等情况下准时到达目的地。</p>
|
||||
<p>Customers are advised to arrange delivery to China warehouse as soon as possible to ensure goods reach their destination on time due to the events of Bad weather, Shipping delay, Custom inspection and etc.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h6 class="text-warning no-margin bold">仓库运营日期</h6>
|
||||
<h6 class="text-warning no-margin bold">Warehouse Operation Date</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-15 m-b-15">
|
||||
<div class="col">
|
||||
<div class="tg-wrap"><table class="tg">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tg-2bkf">仓库<br>WAREHOUSE</th>
|
||||
<th class="tg-2bkf">仓库截止收货日期<br>LAST DAY RECEIVE GOODS</th>
|
||||
<th class="tg-2bkf">仓库復工日期<br>RESUME OPERATION DATE</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="tg-2bkf" rowspan="2">义乌<br>YIWU</td>
|
||||
<td class="tg-2bkf" rowspan="2">18/01/2022</td>
|
||||
<td class="tg-2bkf" rowspan="2">16/02/2022</td>
|
||||
</tr>
|
||||
<tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-2bkf" rowspan="2">广州<br>GUANGHZOU</td>
|
||||
<td class="tg-2bkf" rowspan="2">18/01/2022</td>
|
||||
<td class="tg-2bkf" rowspan="2">12/02/2022</td>
|
||||
</tr>
|
||||
<tr>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-top: -1px;">
|
||||
<div class="col text-center">
|
||||
<div class="btn btn-block btn-danger bg-danger-darker no-border p-t-10 p-b-10" @click="expanded = !expanded"><i class="fa m-r-10" :class="[{'fa-angle-double-down': !expanded}, {'fa-angle-double-up': expanded}]"></i> Click To view {{expanded ? 'less' : 'more'}} details <i class="fa m-l-10" :class="[{'fa-angle-double-down': !expanded}, {'fa-angle-double-up': expanded}]"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data(){
|
||||
return {
|
||||
expanded: false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.tg {border-collapse:collapse;border-spacing:0; width: 650px; margin: 0px auto; }
|
||||
.tg td{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;
|
||||
overflow:hidden;padding:8px 20px;word-break:normal;}
|
||||
.tg th{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;
|
||||
font-weight:normal;overflow:hidden;padding:8px 20px;word-break:normal;}
|
||||
.tg .tg-2bkf{background-color:#76000c;border-color:#ffffff;color:#ffffff;text-align:center;vertical-align:middle}
|
||||
@media screen and (max-width: 767px) {.tg {width: auto !important;}.tg col {width: auto !important;}.tg-wrap {overflow-x: auto;-webkit-overflow-scrolling: touch;margin: auto 0px;}}
|
||||
</style>
|
||||
@@ -23,7 +23,7 @@
|
||||
<div class="row m-b-5">
|
||||
<div class="col">
|
||||
<small class="fs-10 all-caps muted">Warehouse</small>
|
||||
<h6 class="no-margin small">{{item.warehouse.id === 3 ? 'Guang Zhou' : 'Yiwu'}}</h6>
|
||||
<h6 class="no-margin small">{{item.warehouse.name}}</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-b-5">
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<h6 class="no-margin"><b>Order Date:</b> {{order.created_at}}</h6>
|
||||
</div>
|
||||
<div class="col-12 col-sm-auto">
|
||||
<h6 class="no-margin"><b>Warehouse:</b> {{order.warehouse.id === 3 ? 'Guang Zhou' : 'Yiwu'}}</h6>
|
||||
<h6 class="no-margin"><b>Warehouse:</b> {{order.warehouse.name}}</h6>
|
||||
</div>
|
||||
<div class="col col-sm" v-if="$store.getters.isAdmin">
|
||||
<a :href="route('customer.profile', order.company_module.marking)">
|
||||
|
||||
@@ -1,32 +1,5 @@
|
||||
<div class="row d-none" :class="[{'d-flex': !$store.getters.isAdmin}]" v-if="!$store.getters.isAdmin">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col no-padding">
|
||||
<div class="alert alert-warning" role="alert">
|
||||
<div class="row">
|
||||
<div class="col p-b-15">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="fs-18 p-t-15"><i class="fa fa-exclamation-triangle m-r-5"></i> !!!! 海运费涨价通知 NOTICE OF PRICE INCREMENT !!! <i class="fa fa-exclamation-triangle m-l-5"></i></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="no-margin">由于最近船公司正缩减仓位, 导致持续推高海运费。</p>
|
||||
<p>所以从 10/11/2021 开始入仓广州仓库的货物会有所调整。</p>
|
||||
<p>广州 - 西马运费+RM50/立方</p>
|
||||
<p class="m-b-20">有造成不便之处,敬请见谅!谢谢合作</p>
|
||||
<p>Shortage of container is getting terrible in the whole worldwide due to Shipping liner company consolidating their ship</p>
|
||||
<p>Therefore, the shipping fee from Guangzhou to West Malaysia will be adjusted start from good entering warehouse by 10/11/2021</p>
|
||||
<p >Guangzhou - West Malaysia +RM50/CBM</p>
|
||||
<p class="m-b-0">We apologize that any inconvenience caused! Thanks for your cooperation.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<customer-profile-section-component :company_id="$store.getters.getCompanyId"></customer-profile-section-component>
|
||||
</div>
|
||||
</div>
|
||||
@@ -38,7 +38,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p style="font-size: 30px; margin-bottom: 0 !important; margin-top: 10px !important;">仓库地址:</p>
|
||||
<p style="margin-top: 5px !important; margin-bottom: 5px !important; word-wrap: break-word; font-size: 30px;">{{$warehouse_address->street_one.' '.$warehouse_address->street_two.' '.$warehouse_address->district->name.' '.$warehouse_address->state->name.' 邮编:'.$warehouse_address->postcode}}</p>
|
||||
<p style="margin-top: 5px !important; margin-bottom: 5px !important; word-wrap: break-word; font-size: 30px;">{{$warehouse_address->state->name.' '.$warehouse_address->district->name.' '.$warehouse_address->street_one.' '.$warehouse_address->street_two.' 邮编:'.$warehouse_address->postcode}}</p>
|
||||
<p style="margin-top: 5px !important; margin-bottom: 0px !important; font-size: 30px;">联系:@foreach($warehouse_contacts as $contact){{ $loop->first ? '' : ' / ' }}{{ $contact->phone.' '.$contact->reference }}@endforeach</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ Route::group(['prefix' => 'order', 'as' => 'order.', 'namespace' => 'Orders'], f
|
||||
|
||||
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');
|
||||
|
||||
Route::put('/assign-remark/{id}', 'AssignOrderRemarkController@create')->name('assign.remark');
|
||||
Route::get('/{id}/shipping-cost', 'ShippingCostController@calculate')->name('shipping.cost');
|
||||
});
|
||||
|
||||
@@ -16,7 +16,7 @@ Route::group(['namespace' => 'PackingLists', 'as' => 'packing_list.', 'prefix' =
|
||||
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::put('/assign-remark/{id}', 'AssignPackingListRemarkController@create')->name('assign.remark');
|
||||
|
||||
Route::group(['namespace' => 'Containers', 'prefix' => 'container', 'as' => 'container.'], function () {
|
||||
Route::get('/{id}/show', 'FetchContainerController@fetch')->name('show');
|
||||
@@ -30,6 +30,7 @@ Route::group(['namespace' => 'PackingLists', 'as' => 'packing_list.', 'prefix' =
|
||||
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::post('/{id}/remark/create', 'CreateContainerRemarkController@create')->name('remark.create');
|
||||
});
|
||||
|
||||
Route::group(['namespace' => 'Packages', 'as' => 'package.', 'prefix' => 'package'], function () {
|
||||
|
||||
@@ -102,6 +102,7 @@ Route::get('/orders/refresh', function(){
|
||||
|
||||
Route::get('/containers/refresh', function(){
|
||||
|
||||
// FetchLoadedContainersFromVTPortalJob::dispatch();
|
||||
FetchContainersStatusUpdateFromVTPortalJob::dispatch();
|
||||
|
||||
return redirect('orders');
|
||||
@@ -132,6 +133,32 @@ Route::group(['prefix' => 'template', 'as' => 'template.'], function () {
|
||||
})->name('shipping-queue');
|
||||
});
|
||||
|
||||
Route::get('/yiwu', function () {
|
||||
$orders = \App\Models\Order::whereHas('OrderRoles', function($query){
|
||||
return $query->where('role_id', \App\Classes\ValueObjects\Constants\OrderRoleTypes::ORIGIN_WAREHOUSE)->where('company_module_id', 4);
|
||||
})->whereHas('addresses', function($query){
|
||||
return $query->where('status', \App\Classes\ValueObjects\Constants\ApprovalStatus::APPROVED)->whereIn('state_id', [5, 13, 14]);
|
||||
})->get();
|
||||
|
||||
foreach ($orders as $order){
|
||||
echo '<a target="_blank" href="'.route('order.show', $order->reference).'">'. $order->reference.' - '.$order->created_at.'</a><br>';
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Route::get('/guangzhou', function () {
|
||||
$orders = \App\Models\Order::whereHas('OrderRoles', function($query){
|
||||
return $query->where('role_id', \App\Classes\ValueObjects\Constants\OrderRoleTypes::ORIGIN_WAREHOUSE)->where('company_module_id', 3);
|
||||
})->whereHas('addresses', function($query){
|
||||
return $query->where('status', \App\Classes\ValueObjects\Constants\ApprovalStatus::APPROVED)->whereIn('state_id', [5, 13, 14]);
|
||||
})->get();
|
||||
|
||||
foreach ($orders as $order){
|
||||
echo '<a target="_blank" href="'.route('order.show', $order->reference).'">'. $order->reference.' - '.$order->created_at.'</a><br>';
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Route::get('/debug', function (){
|
||||
$orders = \App\Models\Order::all();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user