Compare commits

..

53 Commits

Author SHA1 Message Date
Dillon Ngo 6c0e09c2d2 Merge branch 'dillon/172-explore-unity-server-shut-down' into vapor/production 2026-08-24 22:58:13 +08:00
Dillon Ngo 6fdeeaca33 Attempt to disable unity integration and test run at production 2026-08-24 22:57:52 +08:00
Dillon Ngo c8f7461ebb Merge branch 'dillon/172-explore-unity-server-shut-down' into vapor/production 2026-08-21 10:50:59 +08:00
Dillon Ngo bbca32578e Update perfexcrm gate checking 2026-08-21 10:50:51 +08:00
Dillon Ngo a79b63ddac Merge branch 'dillon/172-explore-unity-server-shut-down' into vapor/production 2026-08-21 10:33:44 +08:00
Dillon Ngo 4fee6d9349 Attempt to disable unity integration and test run at production 2026-08-21 10:33:08 +08:00
Dillon Ngo 63c120cf13 Attempt to disable unity integration and test run at production 2026-08-19 12:39:44 +08:00
Dillon Ngo ffdaf8bb1d Merge branch 'dillon/137-project-upgrade-update-1A' into vapor/production 2026-08-10 17:07:13 +08:00
Dillon Ngo 253889709b Emergency fix for inaccurate storage fee calculation 2026-08-10 17:06:34 +08:00
Dillon Ngo 9d1524c9d6 Merge branch 'dillon/137-project-upgrade-update-1A' into vapor/production 2026-08-06 12:15:19 +08:00
Dillon Ngo 6cc8283594 Sin Yee requested for additional info to be included in arrived-parcel.xlsx 2026-08-06 12:01:43 +08:00
Dillon Ngo 386e1c36e1 Merge branch 'dillon/137-project-upgrade-update-1A' into vapor/production 2026-07-24 15:42:00 +08:00
Dillon Ngo 390510e8aa Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment)
- Fix an error reported by KS on settings > Warehouses > Extra Charges
2026-07-24 15:41:27 +08:00
Dillon Ngo d95efdcf27 Merge branch 'dillon/137-project-upgrade-update-1A' into vapor/production 2026-07-23 13:06:45 +08:00
Dillon Ngo f834bfd63a Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment)
- Fix an error reported by KS on settings > Warehouses > Extra Charges
2026-07-23 13:06:12 +08:00
Dillon Ngo 45f9c091d2 Merge branch 'dillon/137-project-upgrade-update-1A' into vapor/production 2026-07-22 21:47:00 +08:00
Dillon Ngo 1336b3f3ae Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment)
- Fix an error reported by KS on settings > Warehouses > Extra Charges
2026-07-22 21:46:38 +08:00
Dillon Ngo 1ae885ea78 Merge branch 'dillon/137-project-upgrade-update-1A' into vapor/production 2026-07-22 03:14:12 +08:00
Dillon Ngo fe1df936ed Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment) 2026-07-22 03:05:31 +08:00
Dillon Ngo f61381a734 Merge branch 'dillon/137-project-upgrade-update-1A' into vapor/production 2026-07-08 02:12:54 +08:00
Dillon Ngo f05ce01a40 Fix previously marked TODO 2026-07-08 02:12:40 +08:00
Dillon Ngo 7dd796ad50 Merge branch 'dillon/137-project-upgrade-update-1A' into vapor/production 2026-07-08 01:50:37 +08:00
Dillon Ngo f1d5de226f Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment)
- Fix a timing problem exist before upgrade from Vue 2 to Vue 3
2026-07-08 01:37:54 +08:00
Dillon Ngo adfa6e2626 Merge branch 'dillon/137-project-upgrade-update-1A' into vapor/production 2026-07-07 01:28:03 +08:00
Dillon Ngo 2625d58da2 Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment) 2026-07-07 00:33:55 +08:00
Dillon Ngo 75d3f74d09 Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment) 2026-07-05 12:24:11 +08:00
Dillon Ngo f420afd790 Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment) 2026-07-05 12:16:51 +08:00
Dillon Ngo d41b82bcee Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment) 2026-07-04 22:48:14 +08:00
Dillon Ngo c70d6244f2 Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment) 2026-07-04 21:32:13 +08:00
Dillon Ngo d09709c65d Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment) 2026-07-04 21:09:57 +08:00
Dillon Ngo 0a24113fdb Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment) 2026-07-04 20:28:00 +08:00
Dillon Ngo 7cc22d555c Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment) 2026-07-03 22:24:55 +08:00
Dillon Ngo eac7885ef9 Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment) 2026-07-03 22:06:14 +08:00
Dillon Ngo c01c127846 Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment) 2026-07-03 21:47:14 +08:00
Dillon Ngo 76692755ca Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment) 2026-07-01 12:25:08 +08:00
Dillon Ngo 9d09eb4dd7 Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment) 2026-07-01 12:09:29 +08:00
Dillon Ngo ab67557d89 Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment)
- Minor update on docker-compose,yml
2026-07-01 11:13:27 +08:00
Dillon Ngo f9eef62536 Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment) 2026-07-01 11:03:40 +08:00
Dillon Ngo 2566f26c53 Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment) 2026-07-01 10:10:07 +08:00
Dillon Ngo dc553e5e95 Fix server error reported by Mira: failed to approve address due to an error related to VT portal: Client error: POST http://portal.vtnation.com.my/Services/DataControllerService.asmx/Login 2026-06-30 12:20:30 +08:00
Dillon Ngo 000c212085 Fix server error reported by Kanisha: failed to approve address due to an error related to VT portal: Client error: POST http://portal.vtnation.com.my/Services/DataControllerService.asmx/Login 2026-06-29 11:38:37 +08:00
Dillon Ngo 01c53c20df Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment) 2026-06-21 15:53:07 +08:00
Dillon Ngo 7a7c096aba Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment) 2026-06-21 15:10:34 +08:00
Dillon Ngo e5a474f21c Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment) 2026-06-16 16:51:12 +08:00
Dillon Ngo 11b24f376c Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment) 2026-06-16 16:02:03 +08:00
Dillon Ngo 7314c3aa0b Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment) 2026-06-16 15:47:17 +08:00
Dillon Ngo e52dee2877 Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment) 2026-06-10 15:30:07 +08:00
Dillon Ngo 1c393e86e2 Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment) 2026-06-08 19:42:42 +08:00
Dillon Ngo 7f66e616de Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment) 2026-06-05 20:15:52 +08:00
Dillon Ngo 56e4c07adb Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment) 2026-05-28 11:30:50 +08:00
Dillon Ngo 9b0746246c Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml 2026-05-27 20:59:43 +08:00
Dillon Ngo baa3bb3d4e Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml 2026-05-27 20:52:19 +08:00
Dillon Ngo 51ae5c756e Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml 2026-05-27 20:43:27 +08:00
128 changed files with 654 additions and 918 deletions
+1
View File
@@ -51,6 +51,7 @@ MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
UNITY_APP_URL="https://unity.izyim.com"
UNITY_ENABLED=true
EXCHANGE_URL=https://dev.exchange.cief-malaysia.com/
MIX_EXCHANGE_URL="${EXCHANGE_URL}"
+1 -1
View File
@@ -5,7 +5,7 @@ APP_KEY=base64:I9qXyDlm7GVu/e47+YGzLB00fA/FMA2/hMPEhqu8pUQ=
JWT_SECRET=9j7f7vUWEzxUBjLYcQimZp5wmxHEglcjU3beog26qC4pQKENZSpfWQfv065tjZrZ
DB_CONNECTION=mysql
DB_HOST=172.18.0.2
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=ci_test_shipping_portal
DB_USERNAME=ci
@@ -69,7 +69,7 @@ class SuccessUpdatePaymentStatusV2CommandJob implements ShouldQueue
$packingList->save();
if(app()->environment('production')){
(App()->make(UpdateDoFromVTPortalProcessor::class))->execute($packingList);
//(App()->make(UpdateDoFromVTPortalProcessor::class))->execute($packingList);
(App()->make(UpdateDoFromYDPortalProcessor::class))->execute($packingList);
}
@@ -53,6 +53,10 @@ class UpdatePerfexCRMPrelude implements ShouldQueue
return;
}
if(config('perfexcrm.is_enabled') == 'false'){
return;
}
if(is_null($this->packingList)){
$this->packingList = $this->transaction->owner->owner;
}
@@ -4,6 +4,7 @@ namespace App\Classes\Modules\Companies\Standards\Validators;
use App\Classes\General\Abstracts\AbstractValidation;
use App\Classes\Modules\Companies\DataTransferObjects\CompanyObject;
use Config;
class CompanyModuleValidation extends AbstractValidation
{
@@ -25,9 +26,11 @@ class CompanyModuleValidation extends AbstractValidation
*/
protected function rules(): array
{
$required = !config('unity.enabled') ? 'nullable' : 'required';
return [
'unity_hash_id' => 'required',
'unity_signature' => 'required'
'unity_hash_id' => $required,
'unity_signature' => $required
];
}
@@ -2,6 +2,7 @@
namespace App\Classes\Modules\Exports\Services;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Models\Order;
use App\Models\PackingList;
use Carbon\Carbon;
@@ -38,7 +39,10 @@ class ExportsArrivedParcel implements WithHeadings, WithHeadingRow, WithMapping,
'Received Date',
'Recorded On',
'Days to Record',
'Remarks'
'Remarks',
'Delivery Address',
'Post Code',
'State',
];
}
@@ -79,6 +83,8 @@ class ExportsArrivedParcel implements WithHeadings, WithHeadingRow, WithMapping,
$recorded_on = $packingList->created_at->format('d-m-Y');
$days_to_record = Carbon::parse($arrival_date)->diffInDays(Carbon::parse($recorded_on));
$address = $order->addresses()->where('status', '=', ApprovalStatus::APPROVED)->first();
return [
$packingList->owner->reference,
$marking,
@@ -89,7 +95,10 @@ class ExportsArrivedParcel implements WithHeadings, WithHeadingRow, WithMapping,
$arrival_date,
$recorded_on,
$days_to_record,
''
'',
$address->street_one . ' ' . ($address->street_two ? $address->street_two : '') . ', ' . $address->district->name,
$address->postcode,
$address->state->name,
];
}
}
@@ -105,17 +105,22 @@ class UpdateNextQuestionQALogic extends AbstractControllerLogic
//Create ticket at crm
if (!$request->has('isPrevious')) {
if($questionType == QAType::TICKET_CRM){
$email = Auth::user()->email;
$customer = $this->fetchesPerfexCRMCustomer->execute($email);
$subject = "test subject 3";
$department = 1;
$contactid = 0;
$userid = 0;
if($customer){
$contactid = $customer->id;
$userid = $customer->userid;
if(config('perfexcrm.is_enabled') == 'true'){
Log::info('UpdateNextQuestionQALogic: Creating PerfexCRM support ticket for user ' . Auth::user()->id);
$email = Auth::user()->email;
$customer = $this->fetchesPerfexCRMCustomer->execute($email);
$subject = "test subject 3";
$department = 1;
$contactid = 0;
$userid = 0;
if($customer){
$contactid = $customer->id;
$userid = $customer->userid;
}
$this->createsPerfexCRMSupportTicket->execute($subject, $department, $contactid, $userid);
} else {
Log::info('UpdateNextQuestionQALogic: PerfexCRM is disabled, skipping support ticket creation for user ' . Auth::user()->id);
}
$this->createsPerfexCRMSupportTicket->execute($subject, $department, $contactid, $userid);
}
}
@@ -68,7 +68,7 @@ class ApproveChangeOrderAddressProcessor
$appointee = $address->owner->orderRoles()->where('role_id', '=', OrderRoleTypes::ORIGIN_FREIGHT_FORWARDER)->first()->appointee->id;
if($appointee === 2) {
foreach($address->owner->packingLists()->where('type', PackingListType::SHIPPING_PACKING_LIST) as $packingList){
$this->updateDoFromVTPortalProcessor->execute($packingList);
//$this->updateDoFromVTPortalProcessor->execute($packingList);
}
}
@@ -132,37 +132,51 @@ class AssignPackingListOrderLogic extends AbstractControllerLogic
$transport = $warehouse_packing_list->transports()->first();
$transport = $this->updatesTransportStatus->execute($transport, ApprovalStatus::APPROVED);
$contract = $this->unityCreateContract->execute();
$contractReference = $contract->hash_id;
$contractObligations = $contract->contract_obligation_list;
if(config('unity.enabled')) {
$contract = $this->unityCreateContract->execute();
$contractReference = $contract->hash_id;
$contractObligations = $contract->contract_obligation_list;
$this->unityActivateContract->execute($contractReference);
$supervisorHashId = $order->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->appointee->unity_hash_id;
$this->unityActivateContract->execute($contractReference);
$supervisorHashId = $order->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->appointee->unity_hash_id;
$supervisorContractEntity = $this->unityCreateContractEntity->execute($contractReference, $supervisorHashId);
$order->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->update(['entity_hash_id' => $supervisorContractEntity->hash_id, 'entity_signature' => $supervisorContractEntity->entity_signature_hash_id]);
$supervisorContractEntity = $this->unityCreateContractEntity->execute($contractReference, $supervisorHashId);
$order->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->update(['entity_hash_id' => $supervisorContractEntity->hash_id, 'entity_signature' => $supervisorContractEntity->entity_signature_hash_id]);
$importerContractEntity = $this->unityCreateContractEntity->execute($contractReference, $order->orderRoles()->where('role_id', '=', OrderRoleTypes::IMPORTER)->first()->appointee->unity_hash_id);
$order->orderRoles()->where('role_id', '=', OrderRoleTypes::IMPORTER)->first()->update(['entity_hash_id' => $importerContractEntity->hash_id, 'entity_signature' => $importerContractEntity->entity_signature_hash_id]);
$importerContractEntity = $this->unityCreateContractEntity->execute($contractReference, $order->orderRoles()->where('role_id', '=', OrderRoleTypes::IMPORTER)->first()->appointee->unity_hash_id);
$order->orderRoles()->where('role_id', '=', OrderRoleTypes::IMPORTER)->first()->update(['entity_hash_id' => $importerContractEntity->hash_id, 'entity_signature' => $importerContractEntity->entity_signature_hash_id]);
$this->unityAssignContractEntity->execute($supervisorContractEntity->hash_id, $contractObligations);
$this->unityAssignContractEntity->execute($supervisorContractEntity->hash_id, $contractObligations);
try {
$packing_list = $this->fetchesPackingList->execute([
'reference' => $warehouse_packing_list->reference,
'type' => PackingListType::SHIPPING_PACKING_LIST
]);
try {
$packing_list = $this->fetchesPackingList->execute([
'reference' => $warehouse_packing_list->reference,
'type' => PackingListType::SHIPPING_PACKING_LIST
]);
$warehouse_packing_list = $this->updatesPackingListOwner->execute($packing_list, $order);
$warehouse_packing_list = $this->updatesPackingListOwner->execute($packing_list, $order);
$this->updatesPackingListContractReference->execute($packing_list, $contractReference);
$this->updatesPackingListContractReference->execute($packing_list, $contractReference);
foreach($contractObligations as $obligation) {
$stepObject = new StepsObject($order->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->appointee->id, $obligation->reference, $obligation->sequence, $obligation->hash_id);
$this->createsStep->execute($packing_list, $stepObject);
}
} catch (ResourceNotFoundException $exception) {
foreach($contractObligations as $obligation) {
$stepObject = new StepsObject($order->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->appointee->id, $obligation->reference, $obligation->sequence, $obligation->hash_id);
$this->createsStep->execute($packing_list, $stepObject);
}
} catch (ResourceNotFoundException $exception) {
}
else{
try {
$packing_list = $this->fetchesPackingList->execute([
'reference' => $warehouse_packing_list->reference,
'type' => PackingListType::SHIPPING_PACKING_LIST
]);
$warehouse_packing_list = $this->updatesPackingListOwner->execute($packing_list, $order);
} catch (ResourceNotFoundException $exception) {
}
}
// Update Packing Lists' packages info,
@@ -77,7 +77,7 @@ class UpdatePackingListStatusLogic extends AbstractControllerLogic
// $appointee = $address->owner->orderRoles()->where('role_id', '=', OrderRoleTypes::ORIGIN_FREIGHT_FORWARDER)->first()->appointee->id;
$this->updateDoFromVTPortalProcessor->execute($packingList);
// $this->updateDoFromVTPortalProcessor->execute($packingList);
$this->updateDoFromYDPortalProcessor->execute($packingList);
return $this->resourceResponse(new PackingListResource($packingList));
@@ -37,6 +37,7 @@ use App\Models\Order;
use App\Models\PackingList;
use App\Models\Transport;
use Carbon\Carbon;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Str;
@@ -139,6 +140,9 @@ class FetchOrderListsFromYdPortalProcessor
*/
public function execute(?Carbon $start = null, ?Carbon $end = null)
{
Log::info('FetchOrderListsFromYdPortalProcessor no longer in use, use FetchOrderListsFromYdPortalV2Processor instead');
return;
ini_set('max_execution_time', '900');
// $missingOrders = ['M202302161513122', 'YW202302161027442', 'YW202302151637022', 'M202302151605025', 'M202302151527103', 'M202302151527356', 'M202302151556019', 'YW202302151520241', 'YW202302151445068', 'M202302151359169', 'YW202302151349223', 'YW202302151336520', 'M202302151334316', 'YW202302151148129', 'M202302151145379', 'M202302151142411', 'M202302151037036', 'M202302151036398', 'M202302150919406', 'M202302141535009', 'YW202302141532318', 'M202302141319463', 'M202302141319045', 'YW202302141405471', 'M202302141334494', 'YW202302141321569', 'YW202302141323005', 'M202302141309053', 'M202302140905116', 'M202302141039558', 'M202302141022333', 'YW202302140943182', 'YW202302140923485', 'YW202302131728233', 'YW202302131702040', 'M202302131649417', 'M202302131638056', 'YW202302131601110', 'YW202302131530436', 'YW202302131411338', 'YW202302131355161', 'YW202302131312526', 'M202302130859076', 'M202302111708070', 'M202302111455134', 'M202302111457501', 'M202302111444041', 'M202302111506514', 'M202302111440286', 'M202302111354585', 'M202302111055551', 'M202302110900216', 'YW202302101743112', 'M202302091559443', 'M202302101716374', 'M202302101700402', 'M202302101633570', 'M202302101612095', 'M202302101611408', 'M202302101542340', 'M202302101408370', 'M202302101323341', 'M202302101129532', 'M202302101025109', 'M202302101006595', 'M202302091706357', 'YW202302091255022', 'YW202302091448196', 'YW202302091446431', 'M202302091138154', 'M202302091129396', 'YW202302091028175', 'M202302091006545', 'YW202302090942033', 'YW202302081743094', 'M202302081530599', 'M202302081531210', 'M202302081508571', 'YW202302081530492', 'M202302081500361', 'M202302081253105', 'M202302081303370', 'M202302071636303', 'M202302071741187', 'YW202302071735407', 'M202302071706323', 'M202302071537501', 'M202302071538092', 'YW202302071516453', 'M202302071311314', 'M202302071148154', 'YW202302071136018', 'M202302071036027', 'M202302071008010', 'M202302061742178', 'M202302061615198', 'M202302061502093', 'M202302061458532', 'M202302061552141', 'M202302061548431', 'M202302061555033', 'YW202302061404567', 'M202302061322463', 'M202302061042556', 'M202302061021277', 'M202302060917276', 'M202302041551570', 'M202302041552382', 'YW202302041515257', 'M202302041405502', 'M202302041030185', 'YW202302041215576', 'YW202302041058469', 'YW202302041024459', 'YW202302040939568', 'M202302031701053', 'M202302031700316', 'M202302031430562', 'M202302031431535', 'M202302031147213', 'YW202302031406529', 'YW202302031322256', 'M202302021718554', 'M202302021417415', 'YW202302021404542', 'M202302021055324', 'YW202302021037462', 'M202302011613381', 'M202302011347586', 'M202302011348245', 'M202301151635132', 'M202301141803516', 'YW202301141653536', 'M202301131504477', 'M202301131538220', 'M202301121327453', 'YW202301111153183', 'M202301091649543', 'M202212311641071', 'YW202212211532191', 'YW202212191605226'];
@@ -27,6 +27,7 @@ use App\Models\Order;
use App\Models\PackingList;
use Carbon\Carbon;
use GuzzleHttp\Exception\GuzzleException;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
@@ -107,6 +108,9 @@ class FetchPackingListsFromYdPortalProcessor
*/
public function execute(?Carbon $start = null, ?Carbon $end = null)
{
Log::info('FetchPackingListsFromYdPortalProcessor no longer in use, use FetchPackingListsFromYdPortalV2Processor instead');
return;
$from = $end ? Carbon::today()->diff($end)->days : 0;
$to = $start ? Carbon::today()->diff($start)->days : 10;
@@ -143,7 +147,7 @@ class FetchPackingListsFromYdPortalProcessor
if (strpos($customerno, '正确唛头YD') !== false) {
$customerno = explode('正确唛头YD', $customerno)[1];
}
$customerno = preg_split('/[-()\/]/', $customerno);
$orderNumber = $customerno[array_key_last($customerno)];
@@ -38,6 +38,7 @@ use App\Models\Order;
use App\Models\PackingList;
use App\Models\Transport;
use Carbon\Carbon;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Str;
@@ -139,6 +140,12 @@ class FetchOrderListsFromYdPortalV2Processor
*/
public function execute(Carbon $startDate = null, Carbon $endDate = null)
{
// cief todo: 172
// if(!config('unity.enabled')) {
// Log::info('FetchOrderListsFromYdPortalV2Processor skipped: UNITY_ENABLED is false');
// return;
// }
Log::info('FetchOrderListsFromYdPortalV2Processor starts for start date: ' . $startDate . ', and end date: ' . $endDate);
// return;
@@ -303,7 +310,7 @@ class FetchOrderListsFromYdPortalV2Processor
$transportObject = new TransportObject(TransportType::LAND, null, $row->kuaidilist, Carbon::parse($receiveDate), Carbon::parse($receiveDate), $allow_contract ? ApprovalStatus::APPROVED : ApprovalStatus::REJECTED);
$transport = $this->createsTransport->execute($transportObject, $warehouseReceiveList);
if ($allow_contract) {
if (config('unity.enabled') && $allow_contract) {
$contract = $this->unityCreateContract->execute();
@@ -328,7 +335,7 @@ class FetchOrderListsFromYdPortalV2Processor
/** @var PackingList $packingList */
$packingList = $this->createPackingListProcessor->execute($packingListObject, $order);
if ($allow_contract) {
if (config('unity.enabled') && $allow_contract) {
foreach ($contractObligations as $obligation) {
$stepObject = new StepsObject($order->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->appointee->id, $obligation->reference, $obligation->sequence, $obligation->hash_id);
$this->createsStep->execute($packingList, $stepObject);
@@ -432,7 +439,7 @@ class FetchOrderListsFromYdPortalV2Processor
$packingList->save();
}
if ($allow_contract) {
if (config('unity.enabled') && $allow_contract) {
$signature = $packingList->owner->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->appointee->entity_sigiture;
foreach($packingList->steps()->where('reference', '!=', 'DELIVERY')->get() as $step){
$this->updatesContractObligations->execute($signature, $step->obligation_hash_id);
@@ -455,7 +462,7 @@ class FetchOrderListsFromYdPortalV2Processor
$this->createsSchedule->execute($transport, new ScheduleObject($deliveryDate, $deliveryDate, ApprovalStatus::APPROVED));
if ($allow_contract) {
if (config('unity.enabled') && $allow_contract) {
$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);
@@ -31,6 +31,7 @@ use Carbon\Carbon;
use DateTime;
use Illuminate\Support\Facades\Cache;
use GuzzleHttp\Exception\GuzzleException;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
@@ -111,6 +112,12 @@ class FetchPackingListsFromYdPortalV2Processor
*/
public function execute(Carbon $startDate = null, Carbon $endDate = null)
{
// cief todo: 172
// if(!config('unity.enabled')) {
// Log::info('FetchPackingListsFromYdPortalV2Processor skipped: UNITY_ENABLED is false');
// return;
// }
Log::info('FetchPackingListsFromYdPortalV2Processor starts for start date: ' . $startDate . ', and end date: ' . $endDate);
// return;
@@ -200,7 +207,9 @@ class FetchPackingListsFromYdPortalV2Processor
$transportObject = new TransportObject(TransportType::LAND, null, $row->kuaidilist, Carbon::parse($receiveDate), Carbon::parse($receiveDate), $allow_contract ? ApprovalStatus::APPROVED : ApprovalStatus::REJECTED);
$transport = $this->createsTransport->execute($transportObject, $warehouseReceiveList);
if ($allow_contract) {
$contractReference = null;
if (config('unity.enabled') && $allow_contract) {
$contract = $this->unityCreateContract->execute();
@@ -226,7 +235,7 @@ class FetchPackingListsFromYdPortalV2Processor
$packingList = $this->createPackingListProcessor->execute($packingListObject, $order);
Log::info('Create SHIPPING_PACKING_LIST id: ' . $packingList->id);
if ($allow_contract) {
if (config('unity.enabled') && $allow_contract) {
foreach ($contractObligations as $obligation) {
$stepObject = new StepsObject($order->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->appointee->id, $obligation->reference, $obligation->sequence, $obligation->hash_id);
$this->createsStep->execute($packingList, $stepObject);
@@ -6,6 +6,7 @@ namespace App\Classes\Modules\Transactions\ControllersLogic;
use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\Transactions\Services\ListsTransactions;
use App\Http\Resources\TransactionWithStorageResource;
use Carbon\Carbon;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
@@ -40,7 +41,19 @@ class ListTransactionsLogic extends AbstractControllerLogic
$query = $this->listsTransactions->execute($this->listsTransactions->deserializeFilters($request->input('filters')));
foreach ($query->items() as $item) {
if($item instanceof \App\Models\Transaction && $item->owner && $item->owner->owner->companyModule){
$item['is_einvoice_applicable'] = $item->owner->owner->companyModule->company->e_invoice === 1;
$eInvoice = false;
$eInvoiceStartDate = Carbon::parse(env('E_INVOICE_START_DATE', '2025-07-01 00:00:00'));
$transactionCreatedDate = Carbon::parse($item->created_at);
$eInvoiceRequestedDate = Carbon::parse($item->owner->owner->companyModule->company->e_invoice_requested_at);
if ($transactionCreatedDate->isAfter($eInvoiceStartDate)
&&($transactionCreatedDate->isAfter($eInvoiceRequestedDate) || $transactionCreatedDate->diffInMinutes($eInvoiceRequestedDate) <= 60)
&& $item->owner->owner->companyModule->company->e_invoice === 1)
{
$eInvoice = true;
}
$item['is_einvoice_applicable'] = $eInvoice;
// $item['is_einvoice_applicable'] = $item->owner->owner->companyModule->company->e_invoice === 1;
}
}
@@ -267,6 +267,9 @@ class CheckStorageInvoiceTransactionProcessor
$transactionDetailsItems = $transaction->transactionDetails()->get();
$cbm = 0.00;
foreach ($transactionDetailsItems as $tdItem){
if (in_array($tdItem->reference, ['PAY_ON_BEHALF', 'CUSTOM_CHARGES'])) {
continue;
}
$quantity = $tdItem->quantity;
if($tdItem->price < 0.00){
$quantity = $quantity * -1;
@@ -135,7 +135,13 @@ class CreateInvoiceTransactionProcessor
$warehouseId = $order->orderRoles()->where('role_id', OrderRoleTypes::ORIGIN_WAREHOUSE)->first()->company_module_id;
$selected_warehouse_rate = $this->getConstantByKey($warehouse_rate_constant, $warehouseId);
$warehouse_rate = is_object($selected_warehouse_rate) ? $selected_warehouse_rate->amount : 0;
$warehouse_rate = 0;
if (is_object($selected_warehouse_rate)) {
$warehouse_rate = $selected_warehouse_rate->amount;
} elseif (is_array($selected_warehouse_rate)) {
$warehouse_rate = $selected_warehouse_rate['amount'] ?? 0;
}
$stateId = $address->state_id;
$state_rate_constant = $this->getConstantByKey($state_rate_constant, $stateId);
@@ -144,7 +144,7 @@ class CreatePaymentTransactionOneTimeFixProcessor
$packingList->save();
if(app()->environment('production')){
$this->updateDoFromVTPortalProcessor->execute($packingList);
//$this->updateDoFromVTPortalProcessor->execute($packingList);
$this->updateDoFromYDPortalProcessor->execute($packingList);
}
}
@@ -135,7 +135,7 @@ class CreatePaymentTransactionProcessor
$packingList->save();
if(app()->environment('production')){
$this->updateDoFromVTPortalProcessor->execute($packingList);
//$this->updateDoFromVTPortalProcessor->execute($packingList);
$this->updateDoFromYDPortalProcessor->execute($packingList);
}
}
@@ -93,7 +93,7 @@ class ReleaseGoodsToCustomerProcessor
$packingList->save();
if (app()->environment('production')) {
$this->updateDoFromVTPortalProcessor->execute($packingList);
// $this->updateDoFromVTPortalProcessor->execute($packingList);
$this->updateDoFromYDPortalProcessor->execute($packingList);
}
@@ -4,6 +4,7 @@ namespace App\Classes\Modules\Unity\Services;
use Config;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
use App\Classes\Modules\Unity\Services\GetAccessToken;
class ActivatesContract
@@ -20,11 +21,17 @@ class ActivatesContract
public function execute($contract_hash_id){
if(!config('unity.enabled')) return null;
Log::info('[ActivatesContract] UNITY CALLED', [
'contract_hash_id' => $contract_hash_id,
]);
$accessToken=$this->getAccessToken->execute();
$this->activateEntityEndpoint = str_replace('{hash}',$contract_hash_id,$this->activateEntityEndpoint);
$response = Http::withToken($accessToken)->put($this->activateEntityEndpoint)->object();
$response = Http::withoutVerifying()->withToken($accessToken)->put($this->activateEntityEndpoint)->object();
return (isset($response->data)) ? $response->data : null;
@@ -4,6 +4,7 @@ namespace App\Classes\Modules\Unity\Services;
use Config;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
use App\Classes\Modules\Unity\Services\GetAccessToken;
class CreatesContract
@@ -23,10 +24,13 @@ class CreatesContract
public function execute(){
if(!config('unity.enabled')) return null;
Log::info('[CreatesContract] UNITY CALLED');
$accessToken=$this->getAccessToken->execute();
$response = Http::withToken($accessToken)->post($this->createEntityEndpoint,['contract_template_id'=>[$this->contract_hash_id]])->object();
$response = Http::withoutVerifying()->withToken($accessToken)->post($this->createEntityEndpoint,['contract_template_id'=>[$this->contract_hash_id]])->object();
return (isset($response->data)) ? $response->data : null;
@@ -4,6 +4,7 @@ namespace App\Classes\Modules\Unity\Services;
use Config;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
use App\Classes\Modules\Unity\Services\GetAccessToken;
class CreatesContractEntity
@@ -23,8 +24,15 @@ class CreatesContractEntity
public function execute(string $new_contract_id, string $entity_hash_ids){
if(!config('unity.enabled')) return null;
Log::info('[CreatesContractEntity] UNITY CALLED', [
'new_contract_id' => $new_contract_id,
'entity_hash_ids' => $entity_hash_ids,
]);
$accesToken=$this->getAccessToken->execute();
$response = Http::withToken($accesToken)->post($this->createContractEntityEndpoint,['contract_id'=>[$new_contract_id],'entity_id'=>$entity_hash_ids])->object();
$response = Http::withoutVerifying()->withToken($accesToken)->post($this->createContractEntityEndpoint,['contract_id'=>[$new_contract_id],'entity_id'=>$entity_hash_ids])->object();
return (isset($response->data)) ? $response->data : null;
}
@@ -4,6 +4,7 @@ namespace App\Classes\Modules\Unity\Services;
use Config;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
use App\Classes\Modules\Unity\Services\GetAccessToken;
class CreatesEntity
@@ -20,9 +21,15 @@ class CreatesEntity
public function execute($entity_name){
if(!config('unity.enabled')) return (object)['hash_id' => ''];
Log::info('[CreatesEntity] UNITY CALLED', [
'entity_name' => $entity_name,
]);
$accesToken= $this->getAccessToken->execute();
$response = Http::withToken($accesToken)->post($this->createEntityEndpoint,['name'=>$entity_name])->object();
$response = Http::withoutVerifying()->withToken($accesToken)->post($this->createEntityEndpoint,['name'=>$entity_name])->object();
return (isset($response->data)) ? $response->data : null;
@@ -4,6 +4,7 @@ namespace App\Classes\Modules\Unity\Services;
use Config;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
use App\Classes\Modules\Unity\Services\GetAccessToken;
class CreatesEntitySignature
@@ -20,9 +21,15 @@ class CreatesEntitySignature
public function execute(string $entity_hash_id){
if(!config('unity.enabled')) return (object)['hash_id' => ''];
Log::info('[CreatesEntitySignature] UNITY CALLED', [
'entity_hash_id' => $entity_hash_id,
]);
$accesToken=$this->getAccessToken->execute();
$response = Http::withToken($accesToken)->post($this->createEntitySignatureEndpoint,['entity_id'=>[$entity_hash_id], 'type'=>'1'])->object();
$response = Http::withoutVerifying()->withToken($accesToken)->post($this->createEntitySignatureEndpoint,['entity_id'=>[$entity_hash_id], 'type'=>'1'])->object();
return (isset($response->data)) ? $response->data : null;
@@ -5,6 +5,7 @@ namespace App\Classes\Modules\Unity\Services;
use Config;
use Cache;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
class GetAccessToken
{
@@ -35,10 +36,14 @@ class GetAccessToken
public function execute(){
if(!config('unity.enabled')) return "";
if(!empty($this->getCachedAccessToken())) return $this->getCachedAccessToken();
Log::info('[GetAccessToken] UNITY CALLED');
if(empty($this->apiKey)){
$response = Http::post($this->getAccessTokenEndpoint, [
$response = Http::withoutVerifying()->post($this->getAccessTokenEndpoint, [
'email' => $this->username,
'password' => $this->password ,
])->object();
@@ -4,6 +4,7 @@ namespace App\Classes\Modules\Unity\Services;
use Config;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
use App\Classes\Modules\Unity\Services\GetAccessToken;
class GetContractObligations
@@ -21,9 +22,13 @@ class GetContractObligations
public function execute(){
if(!config('unity.enabled')) return [];
Log::info('[GetContractObligations] UNITY CALLED');
$accesToken=$this->getAccessToken->execute();
$response = Http::withToken($accesToken)->get($this->getContractObligationsEndpoint)->object();
$response = Http::withoutVerifying()->withToken($accesToken)->get($this->getContractObligationsEndpoint)->object();
return (isset($response->data)) ? $response->data : [];
@@ -4,6 +4,7 @@ namespace App\Classes\Modules\Unity\Services;
use Config;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
use App\Classes\Modules\Unity\Services\GetAccessToken;
class UpdatesContractEntity
@@ -20,11 +21,18 @@ class UpdatesContractEntity
public function execute(string $obligation_hash_id, array $entity_hash_id){
if(!config('unity.enabled')) return null;
Log::info('[UpdatesContractEntity] UNITY CALLED', [
'obligation_hash_id' => $obligation_hash_id,
'entity_hash_id' => $entity_hash_id,
]);
$accessToken=$this->getAccessToken->execute();
$this->assignEntityEndpoint = str_replace('{hash}',$obligation_hash_id,$this->assignEntityEndpoint);
$response = Http::withToken($accessToken)->put( $this->assignEntityEndpoint,['contract_entity_id'=>$entity_hash_id])->object();
$response = Http::withoutVerifying()->withToken($accessToken)->put( $this->assignEntityEndpoint,['contract_entity_id'=>$entity_hash_id])->object();
return (isset($response->data)) ? $response->data : null;
@@ -4,6 +4,7 @@ namespace App\Classes\Modules\Unity\Services;
use Config;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
use App\Classes\Modules\Unity\Services\GetAccessToken;
class UpdatesContractObligation
@@ -20,11 +21,18 @@ class UpdatesContractObligation
public function execute($contract_entity_signature, $obligation_hash_id){
if(!config('unity.enabled')) return (object)['status' => 3, 'completed_at' => date('Y-m-d H:i:s')];
Log::info('[UpdatesContractObligation] UNITY CALLED', [
'contract_entity_signature' => $contract_entity_signature,
'obligation_hash_id' => $obligation_hash_id,
]);
$accessToken=$this->getAccessToken->execute();
$this->updateContractStatusEndpoint = str_replace('{hash}', $obligation_hash_id, $this->updateContractStatusEndpoint);
$response = Http::withToken($accessToken)->put($this->updateContractStatusEndpoint,['entity_signature_id'=>$contract_entity_signature])->object();
$response = Http::withoutVerifying()->withToken($accessToken)->put($this->updateContractStatusEndpoint,['entity_signature_id'=>$contract_entity_signature])->object();
return (isset($response->data)) ? $response->data : null;
@@ -76,10 +76,10 @@ class SuccessUpdatePaymentStatusButFailedCallback extends Command
*/
public function handle()
{
ini_set('memory_limit', '-1');
ini_set('memory_limit', '-1');
$this->info(Carbon::now() . ' : Billplz Failled Callback cron started.');
$this->outputArray = [];
$this->outputArray = [];
$start = new Carbon();
$approvalStatusArray = ApprovalStatus::APPROVAL_STATUS_ID;
@@ -107,27 +107,27 @@ class SuccessUpdatePaymentStatusButFailedCallback extends Command
$this->info('PackingList has no owner. PackingList ID: ' . $packingList->id);
continue;
}
if ($invoice->status == ApprovalStatus::APPROVED) {
$totalPaidAmount = $invoice->transactions->where('type', TransactionType::PAYMENT)->whereIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED])->sum('amount');
if(($invoice->amount - $totalPaidAmount) < 0.01) {
$this->updatesTransactionStatus->execute($invoice, ApprovalStatus::COMPLETED);
$packingList->status = ApprovalStatus::APPROVED;
$packingList->save();
if(app()->environment('production')){
$this->updateDoFromVTPortalProcessor->execute($packingList);
//$this->updateDoFromVTPortalProcessor->execute($packingList);
$this->updateDoFromYDPortalProcessor->execute($packingList);
}
dump('Updated invoice ' . $invoice->id . '. Order: '. $order->reference);
} else {
$this->info('Failed Update invoice ' . $invoice->id . ' because payment not enough. Invoice Amount: ' . $invoice->amount . ' . Paid Amount: ' . $totalPaidAmount . ' . Order: '. $order->reference);
}
}
}
}
$end = new Carbon();
@@ -17,6 +17,7 @@ use Carbon\Carbon;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use App\Classes\Modules\Jobs\ControllersLogic\SubmitJobLogic;
use Illuminate\Support\Facades\Log;
class MonthlyReportController
{
@@ -150,45 +151,84 @@ class MonthlyReportController
}
public function customerReport(Request $request): JsonResponse {
try {
$connection = CompanyConnection::where('invitee_reference', $request->route('marking'))->firstOrFail();
$invitee = $connection->invitee;
$connection = CompanyConnection::where('invitee_reference', $request->route('marking'))->firstOrFail();
$id = $connection->invitee->id;
if (!$invitee) {
Log::warning('Customer report: invitee not found for marking', ['marking' => $request->route('marking')]);
return (new ApiResponseObject('Customer not found',
'The customer associated with this marking no longer exists.',
HttpStatus::OK_WITH_MESSAGE, ['data' => [
'activated_orders' => 0,
'total_cbm' => 0,
'packages' => 0,
]]))->handler();
}
$from = $request->route('from') ? Carbon::parse($request->route('from')) : Carbon::parse('01-01-2018');
$to = $request->route('to') ? Carbon::parse($request->route('to')) : Carbon::now();
$id = $invitee->id;
$containers = Container::whereBetween('loading_date', [$from, $to])->orderBy('loading_date')->get();
$from = $request->route('from') ? Carbon::parse($request->route('from')) : Carbon::parse('01-01-2018');
$to = $request->route('to') ? Carbon::parse($request->route('to')) : Carbon::now();
$packingLists = $containers->flatMap(function ($container) {
return $container->packingLists;
});
// Only load containers that actually have packing lists belonging to this customer,
// instead of loading ALL containers and filtering in PHP (which causes memory exhaustion).
$containers = Container::whereBetween('loading_date', [$from, $to])
->whereHas('packingLists', function ($query) use ($id) {
$query->whereHas('packages', function ($pkgQuery) use ($id) {
$pkgQuery->whereHas('companyModule', function ($cmQuery) use ($id) {
$cmQuery->where('company_modules.id', $id);
});
});
})
->orderBy('loading_date')
->get();
$packages = $packingLists->map(function ($packingList) {
$replica = in_array(Auth()->user()->type, [RoleTypes::SHADOW_ADMIN, RoleTypes::SUPER_ADMIN]) ? $packingList : $packingList->packingLists()->where('type', PackingListType::SHIPPING_PACKING_LIST_REPLICA)->first();
return $replica ? $replica : $packingList;
})->flatMap(function ($packingList) {
return $packingList->packages;
});
$packingLists = $containers->flatMap(function ($container) {
return $container->packingLists;
});
$packages = $packages->filter(function($package) use ($id) {
return $package->companyModule->id === $id;
});
$userType = Auth() && Auth()->user() ? Auth()->user()->type : RoleTypes::USER;
$exceptionUsers = in_array($userType, [RoleTypes::SHADOW_ADMIN, RoleTypes::SUPER_ADMIN]);
$orders = $packages->unique(function ($package) {
return $package->order;
});
$packages = $packingLists->map(function ($packingList) use ($exceptionUsers) {
$replica = $exceptionUsers ? $packingList : $packingList->packingLists()->where('type', PackingListType::SHIPPING_PACKING_LIST_REPLICA)->first();
return $replica ? $replica : $packingList;
})->flatMap(function ($packingList) {
return $packingList->packages;
});
$totalCbm = $packages->sum(function($package){
return (( (float) $package->width / 100) * ( (float) $package->length / 100) * ( (float) $package->height / 100)) * $package->quantity;
});
$packages = $packages->filter(function($package) use ($id) {
$companyModule = $package->companyModule;
return $companyModule && $companyModule->id === $id;
});
return (new ApiResponseObject('fetch monthly report Successful',
'',
HttpStatus::OK_WITH_MESSAGE, ['data' => [
'activated_orders' => count($orders),
'total_cbm' => $totalCbm,
'packages' => $packages->sum('quantity'),
]]))->handler();
$orders = $packages->unique(function ($package) {
return $package->order;
});
$totalCbm = $packages->sum(function($package){
return (( (float) $package->width / 100) * ( (float) $package->length / 100) * ( (float) $package->height / 100)) * $package->quantity;
});
return (new ApiResponseObject('fetch monthly report Successful',
'',
HttpStatus::OK_WITH_MESSAGE, ['data' => [
'activated_orders' => count($orders),
'total_cbm' => $totalCbm,
'packages' => $packages->sum('quantity'),
]]))->handler();
} catch (\Exception $e) {
Log::error('Customer report failed', [
'marking' => $request->route('marking'),
'from' => $request->route('from'),
'to' => $request->route('to'),
'error' => $e->getMessage(),
'trace' => $e->getTraceAsString(),
]);
throw $e;
}
}
public function serviceReport(Request $request): JsonResponse {
+14 -1
View File
@@ -5,6 +5,7 @@ namespace App\Http\Resources;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\OrderRoleTypes;
use App\Classes\ValueObjects\Constants\TransactionType;
use Carbon\Carbon;
use Illuminate\Http\Resources\Json\JsonResource;
class FetchOrderResource extends JsonResource
@@ -30,7 +31,19 @@ class FetchOrderResource extends JsonResource
'invoices' => $this->whenLoaded('packingLists', function() {
$transactions = $this->transactions()->whereNotIn('transactions.status', [0, 1])->whereIn('transactions.type', [TransactionType::SHIPPING_INVOICE, TransactionType::STORAGE_INVOICE])->get();
foreach ($transactions as $transaction) {
$transaction['is_einvoice_applicable'] = $this->companyModule->company->e_invoice === 1;
$eInvoice = false;
$eInvoiceStartDate = Carbon::parse(env('E_INVOICE_START_DATE', '2025-07-01 00:00:00'));
$transactionCreatedDate = Carbon::parse($transaction->created_at);
$eInvoiceRequestedDate = Carbon::parse($this->companyModule->company->e_invoice_requested_at);
if ($transactionCreatedDate->isAfter($eInvoiceStartDate)
&&($transactionCreatedDate->isAfter($eInvoiceRequestedDate) || $transactionCreatedDate->diffInMinutes($eInvoiceRequestedDate) <= 60)
&& $this->companyModule->company->e_invoice === 1)
{
$eInvoice = true;
}
$transaction['is_einvoice_applicable'] = $eInvoice;
// $transaction['is_einvoice_applicable'] = $this->companyModule->company->e_invoice === 1;
}
return TransactionWithStorageResource::collection($transactions);
}),
@@ -23,7 +23,7 @@ class OrderPackagesOriginWarehouseResource extends JsonResource
'reference_contract' => (int) $this->type,
'type' => (int) $this->type,
'status' => (int) $this->status,
'origin_warehouse_packages' => PackingListForPackagesReceivedResource::collection($origin_warehouse_packages), //cief todo: 150 - to update with new resource
'origin_warehouse_packages' => PackingListForOriginWarehouseResource::collection($origin_warehouse_packages),
'created_at' => $this->created_at->format('d-m-Y')
];
}
@@ -0,0 +1,41 @@
<?php
namespace App\Http\Resources;
use App\Classes\ValueObjects\Constants\RoleTypes;
use App\Models\Order;
use Illuminate\Http\Resources\Json\JsonResource;
use Illuminate\Support\Facades\Log;
class PackingListForOriginWarehouseResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
// $exceptionUsers = in_array(Auth()->user()->type, [RoleTypes::SHADOW_ADMIN, RoleTypes::SUPER_ADMIN]);
$userType = Auth() && Auth()->user() ? Auth()->user()->type : RoleTypes::USER;
$exceptionUsers = in_array($userType, [RoleTypes::SHADOW_ADMIN, RoleTypes::SUPER_ADMIN]);
$data = [
'id' => $this->id,
'claimant_id' => $this->claimant_id,
'status' => $this->status,
'transport' => new TransportResource($this->transports()->first()),
'type' => $this->type,
'container' => new ContainerResource($this->containers->first()),
$this->mergeWhen($this->owner instanceof Order, [
'order' => New OrderResource($this->owner)
]),
];
$packages = !$this->packingLists()->exists() || $exceptionUsers ? $this->packages : $this->packingLists->first()->packages;
$data['packages'] = PackageReceivedResource::collection($packages);
return $data;
}
}
+1 -1
View File
@@ -29,6 +29,6 @@ return [
'max_age' => 0,
'supports_credentials' => false, //cief todo: 137
'supports_credentials' => false,
];
+2
View File
@@ -41,6 +41,8 @@ return [
'on_error_email' => env('UNITY_ON_ERROR_EMAIL','dev@shipping.com,dev@unity.com'),
'enabled' => env('UNITY_ENABLED', false),
'contract_template_hash_id' => env('UNITY_CONTRACT_TEMPLATE_HASH_ID', 'Kp3qzMV82m5R2PZg6eX0'),
'contract_template_cache' => env('UNITY_CONTRACT_TEMPLATE_CACHE','60'),
+3 -3
View File
@@ -8,7 +8,7 @@ services:
nginx:
image: nginx:stable-alpine
platform: linux/amd64
container_name: shipping-portal-2-ngnix
container_name: shipping-portal-ngnix
ports:
- "8081:80"
volumes:
@@ -23,7 +23,7 @@ services:
mysql:
image: mysql:5.7.29
platform: linux/amd64
container_name: shipping-portal-2-mysql
container_name: shipping-portal-mysql
restart: unless-stopped
tty: true
ports:
@@ -44,7 +44,7 @@ services:
build:
context: .
dockerfile: Dockerfile
container_name: shipping-portal-2-php
container_name: shipping-portal-php
volumes:
- ../:/var/www/html
ports:
+1 -3
View File
@@ -1576,8 +1576,6 @@ padding-right: 30px;
.navbar-center, .navbar-center > li{
float:none;
display:inline-block;
*display:inline; /* ie7 fix */
*zoom:1; /* hasLayout ie7 trigger */
vertical-align: top;
}
@@ -2040,7 +2038,7 @@ padding-right: 30px;
.mfp-figure:after {
box-shadow: none !important;
background: none !important;
background: none !important;
}
.profile-picture {
+17 -364
View File
@@ -16,35 +16,32 @@ window.route = route;
window.Vapor = Vapor;
window.Vapor.withBaseAssetUrl(import.meta.env.VITE_VAPOR_ASSET_URL);
const pinia = createPinia();
// Create app
const app = createApp({
created() {
setup() {
const { routesGuard } = useGuards();
routesGuard();
},
});
// Pinia store
const pinia = createPinia();
app.use(pinia);
// V-Money
app.use(VMoney);
app.directive('money', Money3Directive);
// app.directive('money', Money3Directive);
// Expose stores for legacy Blade templates that are not SFCs
(app.config.globalProperties as any).authStore = useAuthStore();
(app.config.globalProperties as any).uiStore = useUiStore();
app.config.globalProperties.qr_code_img_url = 'https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=';
app.config.globalProperties.route = window.route;
app.config.globalProperties.asset = window.Vapor.asset;
const modules = import.meta.glob('./**/*.vue', { eager: true });
//const modules = import.meta.glob('./**/*.vue', { eager: true });
/*
const STORAGE_KEY = 'shippingPortalComponents';
const usedComponents = new Set<string>(
@@ -96,364 +93,20 @@ function downloadUsedComponents() {
}
(window as any).downloadUsedComponents = downloadUsedComponents;
*/
// Remove data created by the previously disabled component tracking logic.
const LEGACY_COMPONENTS_STORAGE_KEY = 'shippingPortalComponents';
localStorage.removeItem(LEGACY_COMPONENTS_STORAGE_KEY);
// Auto-register components (eager loaded)
// const modules = import.meta.glob('./**/*.vue', { eager: true });
// Object.entries(modules).forEach(([path, module]) => {
// const componentName = path.split('/').pop()?.split('.')[0];
// if (componentName) {
// app.component(componentName, (module as any).default);
// }
// });
// Components
// import LoadingComponent from './components/general/elements/LoadingComponent.vue';
// import ModalComponent from './components/general/elements/ModalComponent.vue';
// import LoginFormComponent from './components/accounts/forms/LoginFormComponent.vue';
// import ForgetPasswordFormComponent from './components/accounts/forms/ForgetPasswordFormComponent.vue';
// import RegistrationFormComponent from './components/accounts/forms/RegistrationFormComponent.vue';
// import LogoutComponent from './components/accounts/elements/LogoutComponent.vue';
// import ValidationWrapperComponent from './components/general/forms/ValidationWrapperComponent.vue';
// import ValidationErrorComponent from './components/general/forms/ValidationErrorComponent.vue';
// import ErrorMessageComponent from './components/general/elements/ErrorMessageComponent.vue';
// import ListComponent from './components/general/elements/ListComponent.vue';
// import PaginationComponent from './components/general/elements/PaginationComponent.vue';
// import TransitionComponent from './components/general/elements/TransitionComponent.vue';
// import CustomerProfileSectionComponent from './components/companies/sections/CustomerProfileSectionComponent.vue';
// import DeliveryCustomerProfileSectionComponent from './components/companies/sections/DeliveryCustomerProfileSectionComponent.vue';
// import WarehouseSectionComponent from './components/companies/sections/WarehouseSectionComponent.vue';
// import CustomerProfileComponent from './components/companies/elements/CustomerProfileComponent.vue';
// import QuickOrderComponent from './components/orders/elements/QuickOrderComponent.vue';
// import OnBoardingSectionComponent from './components/companies/sections/OnBoardingSectionComponent.vue';
// import IdentificationVerificationComponent from './components/companies/elements/IdentificationVerificationComponent.vue';
// import AddressVerificationComponent from './components/addresses/elements/AddressVerificationComponent.vue';
// import UnclaimedPackinglistComponent from './components/orders/elements/UnclaimedPackinglistComponent.vue';
// import ProfitModelReportSectionComponent from './components/reports/sections/ProfitModelReportSectionComponent.vue';
// import MonthlySalesReportSectionComponent from './components/reports/sections/MonthlySalesReportSectionComponent.vue';
// import ServiceReportSectionComponent from './components/reports/sections/ServiceReportSectionComponent.vue';
// import DatePickerComponent from './components/general/forms/DatePickerComponent.vue';
// import DatePickerLimitRangeComponent from './components/general/forms/DatePickerLimitRangeComponent.vue';
// import OpenLinkInNewTabComponent from './components/general/elements/OpenLinkInNewTabComponent.vue';
// import AddressFormComponent from './components/addresses/forms/AddressFormComponent.vue';
// import AssignSegmentFormComponent from './components/companies/forms/AssignSegmentFormComponent.vue';
// import ContactFormComponent from './components/companies/forms/ContactFormComponent.vue';
// import DetachSegmentFormComponent from './components/companies/forms/DetachSegmentFormComponent.vue';
// import EInvoiceInfoFormComponent from './components/companies/forms/EInvoiceInfoFormComponent.vue';
// import EInvoiceRequestFormComponent from './components/companies/forms/EInvoiceRequestFormComponent.vue';
// import IdentificationVerificationFormComponent from './components/companies/forms/IdentificationVerificationFormComponent.vue';
// import UpdateCompanyNameFormComponent from './components/companies/forms/UpdateCompanyNameFormComponent.vue';
// import UpdateCreditTermStatusFormComponent from './components/companies/forms/UpdateCreditTermStatusFormComponent.vue';
// import UpdateIdentificationNumberFormComponent from './components/companies/forms/UpdateIdentificationNumberFormComponent.vue';
// import RejectIdentificationVerificationFormComponent from './components/companies/forms/RejectIdentificationVerificationFormComponent.vue';
// import ChangeCustomerCompanyDetailsFormComponent from './components/orders/forms/ChangeCustomerCompanyDetailsFormComponent.vue';
// import ChangeCustomerEmailFormComponent from './components/orders/forms/ChangeCustomerEmailFormComponent.vue';
// import ChangeCustomerContactNumberFormComponent from './components/orders/forms/ChangeCustomerContactNumberFormComponent.vue';
// import ChangeCustomerNameFormComponent from './components/orders/forms/ChangeCustomerNameFormComponent.vue';
// import EInvoiceInfoComponent from './components/companies/elements/EInvoiceInfoComponent.vue';
// import AdminPaymentsBillingSectionComponent from './components/paymentsBilling/sections/AdminPaymentsBillingSectionComponent.vue';
// import AdminPaymentsBillingPollingSectionComponent from './components/paymentsBilling/sections/AdminPaymentsBillingPollingSectionComponent.vue';
// import AdminDisputePaymentsBillingComponent from './components/paymentsBilling/elements/AdminDisputePaymentsBillingComponent.vue';
// import AdminPaymentsBillingWithSearchComponent from './components/paymentsBilling/elements/AdminPaymentsBillingWithSearchComponent.vue';
// import AdminPaymentsBillingWithSearchPollingComponent from './components/paymentsBilling/elements/AdminPaymentsBillingWithSearchPollingComponent.vue';
// import SingleParentAdminPaymentsBillingComponent from './components/paymentsBilling/elements/SingleParentAdminPaymentsBillingComponent.vue';
// import SingleAdminPaymentsBillingWithStorageComponent from './components/paymentsBilling/elements/SingleAdminPaymentsBillingWithStorageComponent.vue';
// import SingleAdminPaymentsBillingWithoutStorageComponent from './components/paymentsBilling/elements/SingleAdminPaymentsBillingWithoutStorageComponent.vue';
// import CustomerPaymentsBillingWithStorageComponent from './components/paymentsBilling/elements/CustomerPaymentsBillingWithStorageComponent.vue';
// import ApproveShippingInvoiceFormComponent from './components/paymentsBilling/forms/ApproveShippingInvoiceFormComponent.vue';
// import CustomerInvoiceRemarkFormComponent from './components/paymentsBilling/forms/CustomerInvoiceRemarkFormComponent.vue';
// import DeleteDisputeFormComponent from './components/paymentsBilling/forms/DeleteDisputeFormComponent.vue';
// import DeleteGroupPaymentAttemptFormComponent from './components/paymentsBilling/forms/DeleteGroupPaymentAttemptFormComponent.vue';
// import DeleteInvoiceFormComponent from './components/paymentsBilling/forms/DeleteInvoiceFormComponent.vue';
// import DeleteShippingInvoiceFormComponent from './components/paymentsBilling/forms/DeleteShippingInvoiceFormComponent.vue';
// import GroupPaymentFormComponent from './components/paymentsBilling/forms/GroupPaymentFormComponent.vue';
// import InvoiceItemFormComponent from './components/paymentsBilling/forms/InvoiceItemFormComponent.vue';
// import InvoiceItemsFormComponent from './components/paymentsBilling/forms/InvoiceItemsFormComponent.vue';
// import PaymentFormComponent from './components/paymentsBilling/forms/PaymentFormComponent.vue';
// import PaymentVerificationFormComponent from './components/paymentsBilling/forms/PaymentVerificationFormComponent.vue';
// import RegenerateDisputeInvoiceFormComponent from './components/paymentsBilling/forms/RegenerateDisputeInvoiceFormComponent.vue';
// import WaiveInvoiceFormComponent from './components/paymentsBilling/forms/WaiveInvoiceFormComponent.vue';
// import DownloadBillingWithDatesComponent from './components/paymentsBilling/forms/DownloadBillingWithDatesComponent.vue';
// import DownloadParcelSummaryComponent from './components/paymentsBilling/forms/DownloadParcelSummaryComponent.vue';
// import NewServiceAnnouncementComponent from './components/companies/elements/NewServiceAnnouncementComponent.vue';
// import ExportCompanyModuleSummaryFormComponent from './components/reports/forms/ExportCompanyModuleSummaryFormComponent.vue';
// import NotificationSectionComponent from './components/general/elements/NotificationSectionComponent.vue';
// import PaymentVerificationComponent from './components/paymentsBilling/elements/PaymentVerificationComponent.vue';
// import DocumentFileViewerComponent from './components/general/elements/DocumentFileViewerComponent.vue';
// import FulfilmentInterestedFormComponent from './components/companies/elements/FulfilmentInterestedFormComponent.vue';
// import FileInputComponent from './components/general/forms/FileInputComponent.vue';
// import FileUploadComponent from './components/general/forms/FileUploadComponent.vue';
// import RemarkComponent from './components/general/elements/RemarkComponent.vue';
// import GeneralConfirmationFormComponent from './components/general/forms/GeneralConfirmationFormComponent.vue';
// import SelectComponent from './components/general/forms/SelectComponent.vue';
// import SelectableComponent from './components/general/forms/SelectableComponent.vue';
// import RemarkFormComponent from './components/general/forms/RemarkFormComponent.vue';
// import RemarkCommentFormComponent from './components/general/forms/RemarkCommentFormComponent.vue';
// import ReloadConfirmationFormComponent from './components/general/forms/ReloadConfirmationFormComponent.vue';
// import HelpMenuFormComponent from './components/general/forms/HelpMenuFormComponent.vue';
// import DeleteRemarkFormComponent from './components/general/forms/DeleteRemarkFormComponent.vue';
// import ModalFormComponent from './components/general/forms/ModalFormComponent.vue';
// import AnchorLinkComponent from './components/general/elements/AnchorLinkComponent.vue';
// import BearComponent from './components/general/elements/bearComponent.vue';
// import BoxLoadingComponent from './components/general/elements/BoxLoadingComponent.vue';
// import HelpMenuComponent from './components/general/elements/HelpMenuComponent.vue';
// import ListPollingComponent from './components/general/elements/ListPollingComponent.vue';
// import PasswordProtectedDownloadComponent from './components/general/elements/PasswordProtectedDownloadComponent.vue';
// import PdfViewerComponent from './components/general/elements/PdfViewerComponent.vue';
// import RemarkListComponent from './components/general/elements/RemarkListComponent.vue';
// import SearchComponent from './components/general/elements/SearchComponent.vue';
// import CustomerPaymentBillingSectionComponent from './components/companies/sections/CustomerPaymentBillingSectionComponent.vue';
// import PaymentsBillingVariant2Components from './components/paymentsBilling/elements/PaymentsBillingVariant2Components.vue';
// import GroupPaymentsBillingComponents from './components/paymentsBilling/elements/GroupPaymentsBillingComponents.vue';
// import WalletComponent from './components/wallets/elements/WalletComponent.vue';
// import WalletTopUpFormComponent from './components/wallets/forms/WalletTopUpFormComponent.vue';
// import ViewAnnouncementFormComponent from './components/announcements/forms/ViewAnnouncementFormComponent.vue';
// import BillingAddressSectionComponent from './components/addresses/sections/BillingAddressSectionComponent.vue';
// import OrderSectionComponent from './components/orders/sections/OrderSectionComponent.vue';
// import OrderFormComponent from './components/orders/forms/OrderFormComponent.vue';
// import SelectAddressComponent from './components/addresses/elements/SelectAddressComponent.vue';
// import WarehouseAddressFormComponent from './components/addresses/forms/WarehouseAddressFormComponent.vue';
// import OrderProfileV2SectionComponent from './components/orders/sections/OrderProfileV2SectionComponent.vue';
// import OrderPackageV3SectionComponent from './components/orders/sections/OrderPackageV3SectionComponent.vue';
// import OrderPackageReceivedSectionComponent from './components/orders/sections/OrderPackageReceivedSectionComponent.vue';
// import TaxRebateQrCodeFormComponent from './components/orders/forms/TaxRebateQrCodeFormComponent.vue';
// import CustPayBillParentComponent from './components/paymentsBilling/elements/CustPayBillParentComponent.vue';
// import ChangeOrderAddressFormComponent from './components/orders/forms/ChangeOrderAddressFormComponent.vue';
// import ChangeOrderNumberFormComponent from './components/orders/forms/ChangeOrderNumberFormComponent.vue';
// import CreateWarehousePackageListFormComponent from './components/orders/forms/CreateWarehousePackageListFormComponent.vue';
// import DownloadReceivePaymentDepositEntryReportComponent from './components/companies/elements/DownloadReceivePaymentDepositEntryReportComponent.vue';
// import DownloadCustomersDataReportComponent from './components/companies/elements/DownloadCustomersDataReportComponent.vue';
// import DownloadUploadSalesInvoiceReportComponent from './components/companies/elements/DownloadUploadSalesInvoiceReportComponent.vue';
// import DownloadUnpaidSalesInvoiceReportComponent from './components/companies/elements/DownloadUnpaidSalesInvoiceReportComponent.vue';
// import DownloadReceivePaymentForOrderReportComponent from './components/companies/elements/DownloadReceivePaymentForOrderReportComponent.vue';
// import UploadComponent from './components/orders/elements/UploadComponent.vue';
// import OrderComponent from './components/orders/elements/OrderComponent.vue';
// import ListOrderComponent from './components/orders/elements/ListOrderComponent.vue';
// import OrderPackageSummaryComponent from './components/orders/elements/OrderPackageSummaryComponent.vue';
// import CancelOrderFormComponent from './components/orders/forms/CancelOrderFormComponent.vue';
// import RestoreOrderFormComponent from './components/orders/forms/RestoreOrderFormComponent.vue';
// import PaymentsBillingComponents from './components/paymentsBilling/elements/PaymentsBillingComponents.vue';
// import CustomerActivityReportSectionComponent from './components/reports/sections/CustomerActivityReportSectionComponent.vue';
// import SearchCustomerByEmailComponent from './components/reports/sections/SearchCustomerByEmailComponent.vue';
// import CustomerReportSectionComponent from './components/reports/sections/CustomerReportSectionComponent.vue';
// import CompanyComponent from './components/companies/elements/CompanyComponent.vue';
// import UserCompanyComponent from './components/companies/elements/UserCompanyComponent.vue';
// import OrderSearchSectionComponent from './components/orders/sections/OrderSearchSectionComponent.vue';
// import WarehouseListExportComponent from './components/companies/elements/WarehouseListExportComponent.vue';
// import WarehousePackingListComponent from './components/containers/elements/WarehousePackingListComponent.vue';
// import ParcelComponent from './components/orders/elements/ParcelComponent.vue';
// import DeleteParcelFormComponent from './components/paymentsBilling/forms/DeleteParcelFormComponent.vue';
// import ContainerSearchComponent from './components/containers/elements/ContainerSearchComponent.vue';
// import CreateLoadContainerFormComponent from './components/containers/forms/CreateLoadContainerFormComponent.vue';
// import ContainerComponent from './components/containers/elements/ContainerComponent.vue';
// import PackingListSectionComponent from './components/containers/sections/PackingListSectionComponent.vue';
// import SegmentCompanyComponent from './components/segments/elements/SegmentCompanyComponent.vue';
// import AdminFeedbackCustomerSectionComponent from './components/feedback/sections/AdminFeedbackCustomerSectionComponent.vue';
// import GenerateFeedbackLinkFormComponent from './components/feedback/forms/GenerateFeedbackLinkFormComponent.vue';
// import QuestionAnswerComponent from './components/feedback/elements/QuestionAnswerComponent.vue';
// import UserProfileComponent from './components/settings/elements/UserProfileComponent.vue';
// import UploadDebtorExcelComponent from './components/containers/elements/UploadDebtorExcelComponent.vue';
// import PermitsReminderComponent from './components/settings/elements/PermitsReminderComponent.vue';
// import UserFormComponent from './components/user/form/UserFormComponent.vue';
// import ListAdminComponent from './components/user/elements/ListAdminComponent.vue';
// import BasePriceFormComponent from './components/settings/forms/BasePriceFormComponent.vue';
// import ListBasePriceSectionComponent from './components/settings/elements/ListBasePriceSectionComponent.vue';
// import EditSegmentPriceFormComponent from './components/settings/forms/EditSegmentPriceFormComponent.vue';
// import SegmentFormComponent from './components/settings/forms/SegmentFormComponent.vue';
// import SegmentComponent from './components/settings/elements/SegmentComponent.vue';
// import AnnouncementFormComponent from './components/settings/forms/AnnouncementFormComponent.vue';
// import AnnouncementListComponent from './components/announcements/elements/AnnouncementListComponent.vue';
// import DeleteAnnouncementFormComponent from './components/settings/forms/DeleteAnnouncementFormComponent.vue';
// import DetachAnnouncementFromSegmentFormComponent from './components/announcements/forms/DetachAnnouncementFromSegmentFormComponent.vue';
// import AssignAnnouncementToSegmentFormComponent from './components/announcements/forms/AssignAnnouncementToSegmentFormComponent.vue';
// import PostcodeSectionComponent from './components/settings/elements/PostcodeSectionComponent.vue';
// import StatesChargesComponent from './components/settings/elements/StatesChargesComponent.vue';
// import EditStateChargesFormComponent from './components/settings/forms/EditStateChargesFormComponent.vue';
// import WarehouseChargesComponent from './components/settings/elements/WarehouseChargesComponent.vue';
// import EditWarehouseChargesFormComponent from './components/settings/forms/EditWarehouseChargesFormComponent.vue';
// import PaymentAttemptLimitFormComponent from './components/settings/forms/PaymentAttemptLimitFormComponent.vue';
// import DisplayWarehouseAddressComponent from './components/addresses/elements/DisplayWarehouseAddressComponent.vue';
// import AddPermitsReminderFormComponent from './components/settings/forms/AddPermitsReminderFormComponent.vue';
// import PermitsReminderItemComponent from './components/settings/elements/PermitsReminderItemComponent.vue';
// import UserComponent from './components/user/elements/UserComponent.vue';
// import ListPostcodeComponent from './components/settings/elements/ListPostcodeComponent.vue';
// import ChangeAdminRoleTypeFormComponent from './components/orders/forms/ChangeAdminRoleTypeFormComponent.vue';
// import DeleteUserFormComponent from './components/user/form/DeleteUserFormComponent.vue';
// import DeclarePostcodeAreaFormComponent from './components/containers/forms/DeclarePostcodeAreaFormComponent.vue';
// app.component('LoadingComponent', LoadingComponent);
// app.component('ModalComponent', ModalComponent);
// app.component('LoginFormComponent', LoginFormComponent);
// app.component('ForgetPasswordFormComponent', ForgetPasswordFormComponent);
// app.component('RegistrationFormComponent', RegistrationFormComponent);
// app.component('LogoutComponent', LogoutComponent);
// app.component('ValidationWrapperComponent', ValidationWrapperComponent);
// app.component('ValidationErrorComponent', ValidationErrorComponent);
// app.component('ErrorMessageComponent', ErrorMessageComponent);
// app.component('ListComponent', ListComponent);
// app.component('PaginationComponent', PaginationComponent);
// app.component('TransitionComponent', TransitionComponent);
// app.component('CustomerProfileSectionComponent', CustomerProfileSectionComponent);
// app.component('DeliveryCustomerProfileSectionComponent', DeliveryCustomerProfileSectionComponent);
// app.component('WarehouseSectionComponent', WarehouseSectionComponent);
// app.component('CustomerProfileComponent', CustomerProfileComponent);
// app.component('QuickOrderComponent', QuickOrderComponent);
// app.component('OnBoardingSectionComponent', OnBoardingSectionComponent);
// app.component('IdentificationVerificationComponent', IdentificationVerificationComponent);
// app.component('AddressVerificationComponent', AddressVerificationComponent);
// app.component('UnclaimedPackinglistComponent', UnclaimedPackinglistComponent);
// app.component('ProfitModelReportSectionComponent', ProfitModelReportSectionComponent);
// app.component('MonthlySalesReportSectionComponent', MonthlySalesReportSectionComponent);
// app.component('ServiceReportSectionComponent', ServiceReportSectionComponent);
// app.component('DatePickerComponent', DatePickerComponent);
// app.component('DatePickerLimitRangeComponent', DatePickerLimitRangeComponent);
// app.component('OpenLinkInNewTabComponent', OpenLinkInNewTabComponent);
// app.component('AddressFormComponent', AddressFormComponent);
// app.component('AssignSegmentFormComponent', AssignSegmentFormComponent);
// app.component('ContactFormComponent', ContactFormComponent);
// app.component('DetachSegmentFormComponent', DetachSegmentFormComponent);
// app.component('EInvoiceInfoFormComponent', EInvoiceInfoFormComponent);
// app.component('EInvoiceRequestFormComponent', EInvoiceRequestFormComponent);
// app.component('IdentificationVerificationFormComponent', IdentificationVerificationFormComponent);
// app.component('UpdateCompanyNameFormComponent', UpdateCompanyNameFormComponent);
// app.component('UpdateCreditTermStatusFormComponent', UpdateCreditTermStatusFormComponent);
// app.component('UpdateIdentificationNumberFormComponent', UpdateIdentificationNumberFormComponent);
// app.component('RejectIdentificationVerificationFormComponent', RejectIdentificationVerificationFormComponent);
// app.component('ChangeCustomerCompanyDetailsFormComponent', ChangeCustomerCompanyDetailsFormComponent);
// app.component('ChangeCustomerEmailFormComponent', ChangeCustomerEmailFormComponent);
// app.component('ChangeCustomerContactNumberFormComponent', ChangeCustomerContactNumberFormComponent);
// app.component('ChangeCustomerNameFormComponent', ChangeCustomerNameFormComponent);
// app.component('EInvoiceInfoComponent', EInvoiceInfoComponent);
// app.component('AdminPaymentsBillingSectionComponent', AdminPaymentsBillingSectionComponent);
// app.component('AdminPaymentsBillingPollingSectionComponent', AdminPaymentsBillingPollingSectionComponent);
// app.component('AdminDisputePaymentsBillingComponent', AdminDisputePaymentsBillingComponent);
// app.component('AdminPaymentsBillingWithSearchComponent', AdminPaymentsBillingWithSearchComponent);
// app.component('AdminPaymentsBillingWithSearchPollingComponent', AdminPaymentsBillingWithSearchPollingComponent);
// app.component('SingleParentAdminPaymentsBillingComponent', SingleParentAdminPaymentsBillingComponent);
// app.component('SingleAdminPaymentsBillingWithStorageComponent', SingleAdminPaymentsBillingWithStorageComponent);
// app.component('SingleAdminPaymentsBillingWithoutStorageComponent', SingleAdminPaymentsBillingWithoutStorageComponent);
// app.component('CustomerPaymentsBillingWithStorageComponent', CustomerPaymentsBillingWithStorageComponent);
// app.component('ApproveShippingInvoiceFormComponent', ApproveShippingInvoiceFormComponent);
// app.component('CustomerInvoiceRemarkFormComponent', CustomerInvoiceRemarkFormComponent);
// app.component('DeleteDisputeFormComponent', DeleteDisputeFormComponent);
// app.component('DeleteGroupPaymentAttemptFormComponent', DeleteGroupPaymentAttemptFormComponent);
// app.component('DeleteInvoiceFormComponent', DeleteInvoiceFormComponent);
// app.component('DeleteShippingInvoiceFormComponent', DeleteShippingInvoiceFormComponent);
// app.component('GroupPaymentFormComponent', GroupPaymentFormComponent);
// app.component('InvoiceItemFormComponent', InvoiceItemFormComponent);
// app.component('InvoiceItemsFormComponent', InvoiceItemsFormComponent);
// app.component('PaymentFormComponent', PaymentFormComponent);
// app.component('PaymentVerificationFormComponent', PaymentVerificationFormComponent);
// app.component('RegenerateDisputeInvoiceFormComponent', RegenerateDisputeInvoiceFormComponent);
// app.component('WaiveInvoiceFormComponent', WaiveInvoiceFormComponent);
// app.component('DownloadBillingWithDatesComponent', DownloadBillingWithDatesComponent);
// app.component('DownloadParcelSummaryComponent', DownloadParcelSummaryComponent);
// app.component('NewServiceAnnouncementComponent', NewServiceAnnouncementComponent);
// app.component('ExportCompanyModuleSummaryFormComponent', ExportCompanyModuleSummaryFormComponent);
// app.component('NotificationSectionComponent', NotificationSectionComponent);
// app.component('PaymentVerificationComponent', PaymentVerificationComponent);
// app.component('DocumentFileViewerComponent', DocumentFileViewerComponent);
// app.component('FulfilmentInterestedFormComponent', FulfilmentInterestedFormComponent);
// app.component('FileInputComponent', FileInputComponent);
// app.component('FileUploadComponent', FileUploadComponent);
// app.component('RemarkComponent', RemarkComponent);
// app.component('GeneralConfirmationFormComponent', GeneralConfirmationFormComponent);
// app.component('SelectComponent', SelectComponent);
// app.component('SelectableComponent', SelectableComponent);
// app.component('RemarkFormComponent', RemarkFormComponent);
// app.component('RemarkCommentFormComponent', RemarkCommentFormComponent);
// app.component('ReloadConfirmationFormComponent', ReloadConfirmationFormComponent);
// app.component('HelpMenuFormComponent', HelpMenuFormComponent);
// app.component('DeleteRemarkFormComponent', DeleteRemarkFormComponent);
// app.component('ModalFormComponent', ModalFormComponent);
// app.component('AnchorLinkComponent', AnchorLinkComponent);
// app.component('BearComponent', BearComponent);
// app.component('BoxLoadingComponent', BoxLoadingComponent);
// app.component('HelpMenuComponent', HelpMenuComponent);
// app.component('ListPollingComponent', ListPollingComponent);
// app.component('PasswordProtectedDownloadComponent', PasswordProtectedDownloadComponent);
// app.component('PdfViewerComponent', PdfViewerComponent);
// app.component('RemarkListComponent', RemarkListComponent);
// app.component('SearchComponent', SearchComponent);
// app.component('CustomerPaymentBillingSectionComponent', CustomerPaymentBillingSectionComponent);
// app.component('PaymentsBillingVariant2Components', PaymentsBillingVariant2Components);
// app.component('GroupPaymentsBillingComponents', GroupPaymentsBillingComponents);
// app.component('WalletComponent', WalletComponent);
// app.component('WalletTopUpFormComponent', WalletTopUpFormComponent);
// app.component('ViewAnnouncementFormComponent', ViewAnnouncementFormComponent);
// app.component('BillingAddressSectionComponent', BillingAddressSectionComponent);
// app.component('OrderSectionComponent', OrderSectionComponent);
// app.component('OrderFormComponent', OrderFormComponent);
// app.component('SelectAddressComponent', SelectAddressComponent);
// app.component('WarehouseAddressFormComponent', WarehouseAddressFormComponent);
// app.component('OrderProfileV2SectionComponent', OrderProfileV2SectionComponent);
// app.component('OrderPackageV3SectionComponent', OrderPackageV3SectionComponent);
// app.component('OrderPackageReceivedSectionComponent', OrderPackageReceivedSectionComponent);
// app.component('TaxRebateQrCodeFormComponent', TaxRebateQrCodeFormComponent);
// app.component('CustPayBillParentComponent', CustPayBillParentComponent);
// app.component('ChangeOrderAddressFormComponent', ChangeOrderAddressFormComponent);
// app.component('ChangeOrderNumberFormComponent', ChangeOrderNumberFormComponent);
// app.component('CreateWarehousePackageListFormComponent', CreateWarehousePackageListFormComponent);
// app.component('DownloadReceivePaymentDepositEntryReportComponent', DownloadReceivePaymentDepositEntryReportComponent);
// app.component('DownloadCustomersDataReportComponent', DownloadCustomersDataReportComponent);
// app.component('DownloadUploadSalesInvoiceReportComponent', DownloadUploadSalesInvoiceReportComponent);
// app.component('DownloadUnpaidSalesInvoiceReportComponent', DownloadUnpaidSalesInvoiceReportComponent);
// app.component('DownloadReceivePaymentForOrderReportComponent', DownloadReceivePaymentForOrderReportComponent);
// app.component('UploadComponent', UploadComponent);
// app.component('OrderComponent', OrderComponent);
// app.component('ListOrderComponent', ListOrderComponent);
// app.component('OrderPackageSummaryComponent', OrderPackageSummaryComponent);
// app.component('CancelOrderFormComponent', CancelOrderFormComponent);
// app.component('RestoreOrderFormComponent', RestoreOrderFormComponent);
// app.component('PaymentsBillingComponents', PaymentsBillingComponents);
// app.component('CustomerActivityReportSectionComponent', CustomerActivityReportSectionComponent);
// app.component('SearchCustomerByEmailComponent', SearchCustomerByEmailComponent);
// app.component('CustomerReportSectionComponent', CustomerReportSectionComponent);
// app.component('CompanyComponent', CompanyComponent);
// app.component('UserCompanyComponent', UserCompanyComponent);
// app.component('OrderSearchSectionComponent', OrderSearchSectionComponent);
// app.component('WarehouseListExportComponent', WarehouseListExportComponent);
// app.component('WarehousePackingListComponent', WarehousePackingListComponent);
// app.component('ParcelComponent', ParcelComponent);
// app.component('DeleteParcelFormComponent', DeleteParcelFormComponent);
// app.component('ContainerSearchComponent', ContainerSearchComponent);
// app.component('CreateLoadContainerFormComponent', CreateLoadContainerFormComponent);
// app.component('ContainerComponent', ContainerComponent);
// app.component('PackingListSectionComponent', PackingListSectionComponent);
// app.component('SegmentCompanyComponent', SegmentCompanyComponent);
// app.component('AdminFeedbackCustomerSectionComponent', AdminFeedbackCustomerSectionComponent);
// app.component('GenerateFeedbackLinkFormComponent', GenerateFeedbackLinkFormComponent);
// app.component('QuestionAnswerComponent', QuestionAnswerComponent);
// app.component('UserProfileComponent', UserProfileComponent);
// app.component('UploadDebtorExcelComponent', UploadDebtorExcelComponent);
// app.component('PermitsReminderComponent', PermitsReminderComponent);
// app.component('UserFormComponent', UserFormComponent);
// app.component('ListAdminComponent', ListAdminComponent);
// app.component('BasePriceFormComponent', BasePriceFormComponent);
// app.component('ListBasePriceSectionComponent', ListBasePriceSectionComponent);
// app.component('EditSegmentPriceFormComponent', EditSegmentPriceFormComponent);
// app.component('SegmentFormComponent', SegmentFormComponent);
// app.component('SegmentComponent', SegmentComponent);
// app.component('AnnouncementFormComponent', AnnouncementFormComponent);
// app.component('AnnouncementListComponent', AnnouncementListComponent);
// app.component('DeleteAnnouncementFormComponent', DeleteAnnouncementFormComponent);
// app.component('DetachAnnouncementFromSegmentFormComponent', DetachAnnouncementFromSegmentFormComponent);
// app.component('AssignAnnouncementToSegmentFormComponent', AssignAnnouncementToSegmentFormComponent);
// app.component('PostcodeSectionComponent', PostcodeSectionComponent);
// app.component('StatesChargesComponent', StatesChargesComponent);
// app.component('EditStateChargesFormComponent', EditStateChargesFormComponent);
// app.component('WarehouseChargesComponent', WarehouseChargesComponent);
// app.component('EditWarehouseChargesFormComponent', EditWarehouseChargesFormComponent);
// app.component('PaymentAttemptLimitFormComponent', PaymentAttemptLimitFormComponent);
// app.component('DisplayWarehouseAddressComponent', DisplayWarehouseAddressComponent);
// app.component('AddPermitsReminderFormComponent', AddPermitsReminderFormComponent);
// app.component('PermitsReminderItemComponent', PermitsReminderItemComponent);
// app.component('UserComponent', UserComponent);
// app.component('ListPostcodeComponent', ListPostcodeComponent);
// app.component('ChangeAdminRoleTypeFormComponent', ChangeAdminRoleTypeFormComponent);
// app.component('DeleteUserFormComponent', DeleteUserFormComponent);
// app.component('DeclarePostcodeAreaFormComponent', DeclarePostcodeAreaFormComponent);
const modules = import.meta.glob('./**/*.vue', { eager: true });
Object.entries(modules).forEach(([path, module]) => {
const componentName = path.split('/').pop()?.split('.')[0];
if (componentName) {
app.component(componentName, (module as any).default);
}
});
// Register tooltip directive
app.directive('tooltip', {
@@ -172,7 +172,7 @@ import { useVuelidate } from '@vuelidate/core';
import { required, email, numeric, sameAs, requiredIf } from '@vuelidate/validators';
import { useAuthStore } from '@/stores/auth';
import { useUiStore } from '@/stores/ui';
import { useRequest } from '@/composables/useRequest';
import { useModalFormHandler } from '@/composables/useModalFormHandler';
import route from '@/general/functions/router';
import ErrorMessageComponent from '@/components/general/elements/ErrorMessageComponent.vue';
import ValidationWrapperComponent from '@/components/general/forms/ValidationWrapperComponent.vue';
@@ -181,11 +181,10 @@ const props = defineProps<{
section: string;
}>();
const { submit } = useRequest();
const { submit, error } = useModalFormHandler(props);
const authStore = useAuthStore();
const uiStore = useUiStore();
const error = ref('');
const step = ref(1);
const parameters = reactive({
name: '',
@@ -220,7 +219,7 @@ const rules = computed(() => ({
},
password_confirmation: {
required: requiredIf(() => step.value === 2),
sameAs: sameAs(parameters.password)
sameAs: sameAs(parameters.password, 'password')
},
identification_no: {
required: requiredIf(() => step.value === 1)
@@ -266,9 +265,6 @@ const submitForm = async () => {
access_token: response.payload.access_token,
redirect_url: response.payload.redirect_url
});
},
errorHandler: (response: any) => {
error.value = response.message;
}
}
);
@@ -35,7 +35,7 @@ const props = defineProps<{
section: string;
}>();
import { route } from '@/general/functions/router';
import route from '@/general/functions/router';
const { submit } = useRequest();
const parameters = ref({
@@ -44,7 +44,7 @@
import { reactive, ref } from 'vue';
import { useVuelidate } from '@vuelidate/core';
import { required, email } from '@vuelidate/validators';
import { useRequest } from '@/composables/useRequest';
import { useModalFormHandler } from '@/composables/useModalFormHandler';
import { useAuthStore } from '@/stores/auth';
import { useUiStore } from '@/stores/ui';
import route from '@/general/functions/router';
@@ -55,7 +55,7 @@ const props = defineProps<{
section: string;
}>();
const { submit } = useRequest();
const { submit, error } = useModalFormHandler(props);
const authStore = useAuthStore();
const uiStore = useUiStore();
const rules = {
@@ -65,7 +65,6 @@ const rules = {
}
};
const error = ref('');
const parameters = reactive({
email: '',
password: ''
@@ -92,11 +91,8 @@ const submitForm = async () => {
access_token: response.payload.access_token,
redirect_url: response.payload.redirect_url
});
},
errorHandler: (response: any) => {
error.value = response.message;
}
}
);
};
</script>
</script>
@@ -48,7 +48,7 @@ import { useModalFormHandler } from '@/composables/useModalFormHandler';
import { useAuthStore } from '@/stores/auth';
import { useUiStore } from '@/stores/ui';
import { useRequest } from '@/composables/useRequest';
import { route } from '@/general/functions/router';
import route from '@/general/functions/router';
const authStore = useAuthStore();
const uiStore = useUiStore();
@@ -55,7 +55,7 @@ import { required, email } from '@vuelidate/validators'
import { useRequest } from '@/composables/useRequest'
import { useAuthStore } from '@/stores/auth';
import { useUiStore } from '@/stores/ui'
import { route } from '@/general/functions/router'
import route from '@/general/functions/router';
interface Props {
section: string
@@ -80,7 +80,7 @@ import { useVuelidate } from '@vuelidate/core';
import { required, email, numeric, sameAs } from '@vuelidate/validators';
import { useAuthStore } from '@/stores/auth';
import { useUiStore } from '@/stores/ui';
import { useRequest } from '@/composables/useRequest';
import { useModalFormHandler } from '@/composables/useModalFormHandler';
import route from '@/general/functions/router';
import ErrorMessageComponent from '@/components/general/elements/ErrorMessageComponent.vue';
import ValidationWrapperComponent from '@/components/general/forms/ValidationWrapperComponent.vue';
@@ -90,11 +90,10 @@ const props = defineProps<{
section: string;
}>();
const { submit } = useRequest();
const { submit, error } = useModalFormHandler(props);
const authStore = useAuthStore();
const uiStore = useUiStore();
const error = ref('');
const parameters = reactive({
company_id: props.id,
name: '',
@@ -112,7 +111,7 @@ const rules = computed(() => ({
password: { required },
password_confirmation: {
required,
sameAs: sameAs(parameters.password)
sameAs: sameAs(parameters.password, 'password')
}
}
}));
@@ -135,9 +134,6 @@ const submitForm = async () => {
access_token: response.payload.access_token,
redirect_url: response.payload.redirect_url
});
},
errorHandler: (response: any) => {
error.value = response.message;
}
}
);
@@ -55,7 +55,7 @@ const props = defineProps<{
section: string;
}>();
const { submit } = useModalFormHandler({ section: props.section })
const { submit, error } = useModalFormHandler({ section: props.section })
const authStore = useAuthStore();
const uiStore = useUiStore();
const rules = {
@@ -65,7 +65,6 @@ const rules = {
}
};
const error = ref('');
const parameters = reactive({
email: '',
password: ''
@@ -92,9 +91,6 @@ const submitForm = async () => {
access_token: response.payload.access_token,
redirect_url: response.payload.redirect_url
});
},
errorHandler: (response: any) => {
error.value = response.message;
}
}
);
@@ -76,7 +76,7 @@ import { useVuelidate } from '@vuelidate/core';
import { required, email, numeric, sameAs } from '@vuelidate/validators';
import { useAuthStore } from '@/stores/auth';
import { useUiStore } from '@/stores/ui';
import { useRequest } from '@/composables/useRequest';
import { useModalFormHandler } from '@/composables/useModalFormHandler';
import route from '@/general/functions/router';
import ErrorMessageComponent from '@/components/general/elements/ErrorMessageComponent.vue';
import ValidationWrapperComponent from '@/components/general/forms/ValidationWrapperComponent.vue';
@@ -85,11 +85,10 @@ const props = defineProps<{
section: string;
}>();
const { submit } = useRequest();
const { submit, error } = useModalFormHandler(props);
const authStore = useAuthStore();
const uiStore = useUiStore();
const error = ref('');
const parameters = reactive({
name: '',
email: '',
@@ -108,7 +107,7 @@ const rules = computed(() => ({
password: { required },
password_confirmation: {
required,
sameAs: sameAs(parameters.password)
sameAs: sameAs(parameters.password, 'password')
},
}
}));
@@ -132,9 +131,6 @@ const submitForm = async () => {
redirect_url: response.payload.redirect_url
});
},
errorHandler: (response: any) => {
error.value = response.message;
}
}
);
};
@@ -34,20 +34,29 @@
</div>
</div>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { reactive, ref, watch } from 'vue';
import { useVuelidate } from '@vuelidate/core';
import { required, email } from '@vuelidate/validators';
import { useUiStore } from '@/stores/ui';
import { useRequest } from '@/composables/useRequest';
import { useModalFormHandler } from '@/composables/useModalFormHandler';
import route from '@/general/functions/router';
import ValidationWrapperComponent from '@/components/general/forms/ValidationWrapperComponent.vue';
interface Props {
data?: any;
section: string;
}
const props = withDefaults(defineProps<Props>(), {
data: null
});
const emit = defineEmits(['updateStatus']);
const { submit } = useRequest();
const { submit } = useModalFormHandler(props);
const uiStore = useUiStore();
const parameters = reactive({
@@ -260,7 +260,7 @@ import { computed, reactive, ref } from 'vue';
import { useVuelidate } from '@vuelidate/core';
import { required, email, numeric, sameAs, requiredIf } from '@vuelidate/validators';
import { useAuthStore } from '@/stores/auth';
import { useRequest } from '@/composables/useRequest';
import { useModalFormHandler } from '@/composables/useModalFormHandler';
import route from '@/general/functions/router';
import ErrorMessageComponent from '@/components/general/elements/ErrorMessageComponent.vue';
import ValidationWrapperComponent from '@/components/general/forms/ValidationWrapperComponent.vue';
@@ -270,10 +270,9 @@ const props = defineProps<{
section: string;
}>();
const { submit } = useRequest();
const { submit, error } = useModalFormHandler(props);
const authStore = useAuthStore();
const error = ref('');
const step = ref(1);
const parameters = reactive({
name: '',
@@ -308,7 +307,7 @@ const rules = computed(() => ({
},
password_confirmation: {
required: requiredIf(() => step.value === 2),
sameAs: sameAs(parameters.password)
sameAs: sameAs(parameters.password, 'password')
},
identification_no: {
required: requiredIf(() => step.value === 1)
@@ -354,9 +353,6 @@ const submitForm = async () => {
access_token: response.payload.access_token,
redirect_url: response.payload.redirect_url
});
},
errorHandler: (response: any) => {
error.value = response.message;
}
}
);
@@ -364,4 +360,4 @@ const submitForm = async () => {
await changeStep('next');
}
};
</script>
</script>
@@ -63,7 +63,7 @@ import { useVuelidate } from '@vuelidate/core'
import { required } from '@vuelidate/validators'
import { useRequest } from '@/composables/useRequest'
import { useUiStore } from '@/stores/ui'
import { route } from '@/general/functions/router'
import route from '@/general/functions/router';
interface Props {
section: string
@@ -125,6 +125,7 @@ import { ref, watch } from 'vue';
import { useQueueStore } from '@/stores/queue';
import { useRequest } from '@/composables/useRequest';
import route from '@/general/functions/router';
import { useModalFormHandler } from '@/composables/useModalFormHandler';
interface Props {
data?: any;
@@ -136,11 +137,10 @@ const props = withDefaults(defineProps<Props>(), {
});
const queueStore = useQueueStore();
const { submit } = useRequest();
const { submit } = useModalFormHandler(props);
const item = ref(props.data ? JSON.parse(JSON.stringify(props.data)) : {});
const isLoading = ref(false);
const error = ref('');
watch(() => props.data, (newData) => {
if (newData) {
@@ -150,24 +150,9 @@ watch(() => props.data, (newData) => {
}
}, { deep: true });
const successHandler = () => {
isLoading.value = false;
queueStore.reloadList({ name: props.section });
error.value = '';
};
const errorHandler = (err: any) => {
isLoading.value = false;
queueStore.reloadList({ name: props.section });
error.value = err.message || 'An error occurred';
};
const approveAddress = (status: number) => {
isLoading.value = true;
const url = route('api.order.address.status.update', item.value.id, status);
submit(url, 'put', 'addressVerificationSection', true, true, null, {
successHandler: successHandler,
errorHandler: errorHandler
});
submit(url, 'put', 'addressVerificationSection', true, true, null);
};
</script>
@@ -321,4 +321,5 @@ const submitForm = async () => {
}
});
};
</script>
@@ -27,6 +27,7 @@
import { useComponentHandler } from '@/composables/useComponentHandler';
import { useModalFormHandler } from '@/composables/useModalFormHandler';
import { useRequest } from '@/composables/useRequest';
import route from '@/general/functions/router';
const props = defineProps<{
section: string;
@@ -115,7 +115,7 @@ import { ref, onMounted, computed } from 'vue'
import { useVuelidate } from '@vuelidate/core'
import { required, requiredIf } from '@vuelidate/validators'
import { useModalFormHandler } from '@/composables/useModalFormHandler'
import { route } from '@/general/functions/router'
import route from '@/general/functions/router';
import { useAuthStore } from '@/stores/auth'
interface Props {
@@ -67,7 +67,7 @@
<script setup lang="ts">
import { ref } from 'vue';
import { useRequest } from '@/composables/useRequest';
import { route } from '@/general/functions/router';
import route from '@/general/functions/router';
const props = withDefaults(defineProps<{
section?: string;
@@ -41,7 +41,7 @@ import { ref, computed } from 'vue'
import { useVuelidate } from '@vuelidate/core'
import { required } from '@vuelidate/validators'
import { useModalFormHandler } from '@/composables/useModalFormHandler'
import { route } from '@/general/functions/router'
import route from '@/general/functions/router';
import { useUiStore } from '@/stores/ui';
interface Props {
@@ -32,7 +32,7 @@
<script setup lang="ts">
import { useComponentHandler } from '@/composables/useComponentHandler';
import { useModalFormHandler } from '@/composables/useModalFormHandler';
import { route } from '@/general/functions/router';
import route from '@/general/functions/router';
const props = defineProps<{
announcement_id: number;
@@ -42,12 +42,13 @@
<script setup lang="ts">
import route from '@/general/functions/router';
import { ref, computed } from 'vue';
import DatePickerLimitRangeComponent from '@/components/general/forms/DatePickerLimitRangeComponent.vue';
const maxDays = ref(180);
const startDate = ref('');
const endDate = ref('');
const isValidRange = ref(false);
const endDatePicker = ref<any>(null);
const endDatePicker = ref<InstanceType<typeof DatePickerLimitRangeComponent> | null>(null);
const onStartDateChange = (date: string) => {
if (date) {
@@ -76,6 +76,7 @@
<script setup lang="ts">
import route from '@/general/functions/router';
import { ref, computed } from 'vue';
import DatePickerLimitRangeComponent from '@/components/general/forms/DatePickerLimitRangeComponent.vue';
const isCollapsed = ref(false);
const maxDays = ref(180);
@@ -83,7 +84,7 @@ const startDate = ref('');
const endDate = ref('');
const isValidRange = ref(false);
const section = ref('ExportReceivePaymentDepositEntryReportSection');
const endDatePicker = ref<any>(null);
const endDatePicker = ref<InstanceType<typeof DatePickerLimitRangeComponent> | null>(null);
const onStartDateChange = (date: string) => {
if (date) {
@@ -87,6 +87,7 @@
<script setup lang="ts">
import route from '@/general/functions/router';
import { ref, computed } from 'vue';
import DatePickerLimitRangeComponent from '@/components/general/forms/DatePickerLimitRangeComponent.vue';
const isCollapsed = ref(false);
const maxDays = ref(180);
@@ -94,7 +95,7 @@ const startDate = ref('');
const endDate = ref('');
const isValidRange = ref(false);
const section = ref('ExportReceivePaymentDepositForOrderSection');
const endDatePicker = ref<any>(null);
const endDatePicker = ref<InstanceType<typeof DatePickerLimitRangeComponent> | null>(null);
const onStartDateChange = (date: string) => {
if (date) {
@@ -76,13 +76,14 @@
<script setup lang="ts">
import route from '@/general/functions/router';
import { ref, computed } from 'vue';
import DatePickerLimitRangeComponent from '@/components/general/forms/DatePickerLimitRangeComponent.vue';
const isCollapsed = ref(false);
const maxDays = ref(180);
const startDate = ref('');
const endDate = ref('');
const isValidRange = ref(false);
const endDatePicker = ref<any>(null);
const endDatePicker = ref<InstanceType<typeof DatePickerLimitRangeComponent> | null>(null);
const onStartDateChange = (date: string) => {
if (date) {
@@ -110,6 +110,7 @@
<script setup lang="ts">
import route from '@/general/functions/router';
import { ref, computed } from 'vue';
import DatePickerLimitRangeComponent from '@/components/general/forms/DatePickerLimitRangeComponent.vue';
const isCollapsed = ref(false);
const maxDays = ref(180);
@@ -118,7 +119,7 @@ const endDate = ref('');
const isValidRange = ref(false);
const section = ref('ImportExportSalesInvoiceReportSection');
const generateEInvoicesUrl = ref<string | null>(null);
const endDatePicker = ref<any>(null);
const endDatePicker = ref<InstanceType<typeof DatePickerLimitRangeComponent> | null>(null);
const onStartDateChange = (date: string) => {
if (date) {
@@ -184,7 +184,7 @@
<script setup lang="ts">
import { ref, watch } from 'vue';
import { useQueueStore } from '@/stores/queue';
import { useRequest } from '@/composables/useRequest';
import { useModalFormHandler } from '@/composables/useModalFormHandler';
import { useUiStore } from '@/stores/ui';
import { useAuthStore } from '@/stores/auth';
import route from '@/general/functions/router';
@@ -194,17 +194,14 @@ const props = defineProps<{
section: string;
}>();
const queueStore = useQueueStore();
const uiStore = useUiStore();
const authStore = useAuthStore();
const { submit } = useRequest();
const { submit } = useModalFormHandler(props);
const expanded = ref(false);
const isEditIdentificationNumber = ref(false);
const isEditCompanyName = ref(false);
const item = ref(props.data ? JSON.parse(JSON.stringify(props.data)) : {});
const isLoading = ref(false);
const error = ref('');
watch(() => props.data, (newData) => {
if (newData) {
@@ -214,24 +211,9 @@ watch(() => props.data, (newData) => {
}
}, { deep: true });
const successHandler = () => {
isLoading.value = false;
queueStore.reloadList({ name: props.section });
error.value = '';
};
const errorHandler = (err: any) => {
isLoading.value = false;
queueStore.reloadList({ name: props.section });
error.value = err.message || 'An error occurred';
};
const approveDocument = (status: string) => {
isLoading.value = true;
const url = route('api.company.identification.approval', item.value.owner.id, item.value.id, status);
submit(url, 'put', 'identificationVerificationSection', true, true, null, {
successHandler: successHandler,
errorHandler: errorHandler
});
submit(url, 'put', 'identificationVerificationSection', true, true, null);
};
</script>
@@ -130,7 +130,7 @@ import { useAuthStore } from '@/stores/auth';
import { useRequest } from '@/composables/useRequest';
import { useUiStore } from '@/stores/ui';
const asset = (path: string) => (window as any).Vapor.asset(path);
const asset = window.Vapor.asset;
interface Props {
company_id: number;
@@ -52,7 +52,7 @@ import { ref, computed } from 'vue'
import { useVuelidate } from '@vuelidate/core'
import { required } from '@vuelidate/validators'
import { useModalFormHandler } from '@/composables/useModalFormHandler'
import { route } from '@/general/functions/router'
import route from '@/general/functions/router';
import { useUiStore } from '@/stores/ui';
interface Props {
@@ -40,7 +40,7 @@ import { ref } from 'vue'
import { useVuelidate } from '@vuelidate/core'
import { required } from '@vuelidate/validators'
import { useModalFormHandler } from '@/composables/useModalFormHandler'
import { route } from '@/general/functions/router'
import route from '@/general/functions/router';
interface Props {
data: any
@@ -15,7 +15,7 @@ import { ref, onMounted } from 'vue'
import { useVuelidate } from '@vuelidate/core'
import { required } from '@vuelidate/validators'
import { useModalFormHandler } from '@/composables/useModalFormHandler'
import { route } from '@/general/functions/router'
import route from '@/general/functions/router';
interface Props {
id: number
@@ -40,7 +40,7 @@ import { ref } from 'vue'
import { useVuelidate } from '@vuelidate/core'
import { required } from '@vuelidate/validators'
import { useModalFormHandler } from '@/composables/useModalFormHandler'
import { route } from '@/general/functions/router'
import route from '@/general/functions/router';
interface Props {
data: any
@@ -40,7 +40,7 @@ import { ref } from 'vue'
import { useVuelidate } from '@vuelidate/core'
import { required } from '@vuelidate/validators'
import { useModalFormHandler } from '@/composables/useModalFormHandler'
import { route } from '@/general/functions/router'
import route from '@/general/functions/router';
interface Props {
packinglistId: number
@@ -41,7 +41,7 @@
<script setup lang="ts">
import { ref } from 'vue'
import { useModalFormHandler } from '@/composables/useModalFormHandler'
import { route } from '@/general/functions/router'
import route from '@/general/functions/router';
interface Props {
data?: any
@@ -33,7 +33,7 @@ import { ref } from 'vue'
import { useVuelidate } from '@vuelidate/core'
import { required } from '@vuelidate/validators'
import { useModalFormHandler } from '@/composables/useModalFormHandler'
import { route } from '@/general/functions/router'
import route from '@/general/functions/router';
import { useAuthStore } from '@/stores/auth';
const authStore = useAuthStore();
@@ -40,7 +40,7 @@ import { ref } from 'vue'
import { useVuelidate } from '@vuelidate/core'
import { required } from '@vuelidate/validators'
import { useModalFormHandler } from '@/composables/useModalFormHandler'
import { route } from '@/general/functions/router'
import route from '@/general/functions/router';
interface Props {
data: any
@@ -40,7 +40,7 @@ import { ref } from 'vue'
import { useVuelidate } from '@vuelidate/core'
import { required } from '@vuelidate/validators'
import { useModalFormHandler } from '@/composables/useModalFormHandler'
import { route } from '@/general/functions/router'
import route from '@/general/functions/router';
interface Props {
section?: string
@@ -40,7 +40,7 @@
import { ref, onMounted } from 'vue'
import { useComponentHandler } from '@/composables/useComponentHandler'
import { useRequest } from '@/composables/useRequest';
import { route } from '@/general/functions/router'
import route from '@/general/functions/router';
import LoadingComponent from '@/components/general/elements/LoadingComponent.vue'
import PackingListComponent from '@/components/containers/elements/PackingListComponent.vue'
@@ -23,7 +23,7 @@ import { ref, computed } from 'vue';
import { useRequest } from '@/composables/useRequest';
import route from '@/general/functions/router';
const asset = (path: string) => (window as any).Vapor.asset(path);
const asset = window.Vapor.asset;
const props = defineProps<{
file: any;
@@ -54,6 +54,7 @@ import { ref, watch, onMounted } from 'vue';
import { useQueueStore } from '@/stores/queue';
import { useUiStore } from '@/stores/ui';
import { useRequest } from '@/composables/useRequest';
import PaginationComponent from '@/components/general/elements/PaginationComponent.vue';
const asset = window.Vapor.asset;
@@ -74,7 +75,8 @@ const props = withDefaults(defineProps<Props>(), {
const queueStore = useQueueStore();
const uiStore = useUiStore();
const { submit } = useRequest();
const pagination = ref<any>(null);
const pagination = ref<InstanceType<typeof PaginationComponent> | null>(null);
const filters = ref<any>(props.options);
const setDecoratorDefault = () => {
@@ -94,7 +96,8 @@ const fetchList = () => {
successHandler: (response: any) => {
queueStore.setListComplete({ name: props.section, data: response.payload.data });
if (pagination.value) {
pagination.value.makePagination(response.payload.meta, response.payload.links);
// pagination.value.makePagination(response.payload.meta, response.payload.links);
pagination.value.makePagination(response.payload.meta);
}
}
});
@@ -108,7 +111,8 @@ const updateFilters = (newFilters: any) => {
successHandler: (response: any) => {
queueStore.setListComplete({ name: props.section, data: response.payload.data });
if (pagination.value) {
pagination.value.makePagination(response.payload.meta, response.payload.links);
// pagination.value.makePagination(response.payload.meta, response.payload.links);
pagination.value.makePagination(response.payload.meta);
}
}
});
@@ -126,6 +130,6 @@ watch(() => queueStore.isInCompleteQueue(props.section), (inComplete) => {
});
defineExpose({
updateFilters
// updateFilters //no where is this being used
});
</script>
@@ -56,6 +56,7 @@ import { useQueueStore } from '@/stores/queue';
import { useUiStore } from '@/stores/ui';
import { useJobPollingStore } from '@/stores/jobPolling';
import { useRequest } from '@/composables/useRequest';
import PaginationComponent from '@/components/general/elements/PaginationComponent.vue';
const props = withDefaults(defineProps<{
section: string;
@@ -67,6 +68,8 @@ const props = withDefaults(defineProps<{
emptyListSection: true
});
const asset = window.Vapor.asset;
const queueStore = useQueueStore();
const uiStore = useUiStore();
const jobPollingStore = useJobPollingStore();
@@ -74,7 +77,7 @@ const { submit } = useRequest();
const filters = ref(props.options);
const isLoading = ref(false);
const pagination = ref<any>(null);
const pagination = ref<InstanceType<typeof PaginationComponent> | null>(null);
const setDecoratorDefault = () => {
filters.value = {};
@@ -126,7 +129,8 @@ const successHandler = (response: any) => {
queueStore.setListComplete({ name: props.section, data: result.data });
jobPollingStore.stopPollingJobResultByJobId(currentJob().jobId);
if (pagination.value) {
pagination.value.makePagination(result.meta, result.links);
// pagination.value.makePagination(result.meta, result.links);
pagination.value.makePagination(result.meta);
}
isLoading.value = false;
};
@@ -72,7 +72,7 @@ import LoadingComponent from "@/components/general/elements/LoadingComponent.vue
import route from '@/general/functions/router';
import { useModalFormHandler } from '@/composables/useModalFormHandler';
const asset = (path: string) => (window as any).Vapor.asset(path);
const asset = window.Vapor.asset;
const props = defineProps<{
data?: any;
@@ -6,7 +6,7 @@
</component>
</template>
<script setup lang="ts">
import { computed } from 'vue';
import { computed, Transition, TransitionGroup } from 'vue';
const props = withDefaults(defineProps<{
speed?: string;
@@ -22,9 +22,7 @@ const props = withDefaults(defineProps<{
tag: 'div'
});
const type = computed(() => {
return props.group ? "transition-group" : "transition";
});
const type = computed(() => (props.group ? TransitionGroup : Transition));
const dynamicProps = computed(() => {
const p: any = {
@@ -53,4 +51,4 @@ const hooks = {
beforeLeave: setAbsolutePosition,
afterLeave: cleanUp
};
</script>
</script>
@@ -15,5 +15,5 @@
<script setup lang="ts">
import ModalComponent from './ModalComponent.vue'
const asset = (path: string) => (window as any).Vapor.asset(path);
const asset = window.Vapor.asset;
</script>
@@ -40,7 +40,11 @@ const getErrorMessage = (error: ValidationErrorItem): string => {
if (validatorName === 'minLength') return `${errorMessages.minLength} ${params.min} characters`;
if (validatorName === 'maxLength') return `${errorMessages.maxLength} ${params.max} characters`;
if (validatorName === 'sameAs') return `${errorMessages.sameAs} ${params.eq} field`;
if (validatorName === 'sameAs' || validatorName === 'sameAsPassword') {
let fieldName = params.otherName || params.eq || 'password';
if (fieldName === 'password') fieldName = 'password';
return `${errorMessages.sameAs} ${fieldName} field`;
}
if (validatorName === 'minValue') return `${errorMessages.minValue} ${params.min}`;
if (validatorName === 'maxValue') return `${errorMessages.maxValue} ${params.max}`;
@@ -54,7 +54,8 @@ import { ref, computed, watch, onMounted } from 'vue';
import { useRequest } from '@/composables/useRequest';
import { useQueueStore } from '@/stores/queue';
import { useUiStore } from '@/stores/ui';
import { route } from '@/general/functions/router';
import route from '@/general/functions/router';
import PaginationComponent from '@/components/general/elements/PaginationComponent.vue';
const asset = window.Vapor.asset;
@@ -80,7 +81,7 @@ const { submit } = useRequest();
const filters = ref(props.options);
const api_count = ref(0);
const isLoading = ref(true);
const pagination = ref<any>(null);
const pagination = ref<InstanceType<typeof PaginationComponent> | null>(null);
// Create computed properties for reactive data
const listData = computed(() => queueStore.getListData(props.section));
@@ -114,7 +115,7 @@ const fetchList = () => {
name: props.section,
data: response.payload.data
});
pagination.value?.makePagination(response.payload.meta, response.payload.links);
pagination.value?.makePagination(response.payload.meta); //pagination.value?.makePagination(response.payload.meta, response.payload.links);
api_count.value += 1;
isLoading.value = false;
}
@@ -138,7 +139,7 @@ const updateFilters = (newFilters: any) => {
name: props.section,
data: response.payload.data
});
pagination.value?.makePagination(response.payload.meta, response.payload.links);
pagination.value?.makePagination(response.payload.meta); //pagination.value?.makePagination(response.payload.meta, response.payload.links);
api_count.value += 1;
isLoading.value = false;
}
@@ -157,6 +158,6 @@ onMounted(() => {
});
defineExpose({
updateFilters
// updateFilters //no where is this being used
});
</script>
@@ -158,7 +158,7 @@ import { useComponentHandler } from '@/composables/useComponentHandler';
import { useRequest } from '@/composables/useRequest';
import { useAuthStore } from '@/stores/auth';
import { useCrudStore } from '@/stores/crud';
import { route } from '@/general/functions/router';
import route from '@/general/functions/router';
interface Props {
data: any;
@@ -54,7 +54,7 @@ const dataLoaded = ref(false);
const isLoading = computed(() => uiStore.isLoading(section));
const asset = (path: string) => (window as any).Vapor.asset(path);
const asset = window.Vapor.asset;
const filters = {
include_packages_delivery: true,
};
@@ -53,7 +53,7 @@ const order = ref<any>(null);
const dataLoaded = ref(false);
const isLoading = computed(() => uiStore.isLoading(section));
const asset = (path: string) => (window as any).Vapor.asset(path);
const asset = window.Vapor.asset;
const filters = {
include_packages_destination_warehouse: true,
};
@@ -54,7 +54,7 @@ const dataLoaded = ref(false);
const isLoading = computed(() => uiStore.isLoading(section));
const asset = (path: string) => (window as any).Vapor.asset(path);
const asset = window.Vapor.asset;
const filters = {
include_packages_in_transit: true,
};
@@ -85,6 +85,8 @@ interface Props {
const props = defineProps<Props>();
const asset = window.Vapor.asset;
const authStore = useAuthStore();
const { submit } = useRequest();
@@ -66,7 +66,7 @@
import { ref, onMounted } from 'vue';
import { useAuthStore } from '@/stores/auth';
import { useRequest } from '@/composables/useRequest';
import { route } from '@/general/functions/router';
import route from '@/general/functions/router';
interface Props {
order_number: string;
@@ -92,7 +92,7 @@
import { ref, computed, onMounted } from 'vue';
import { useAuthStore } from '@/stores/auth';
import { useRequest } from '@/composables/useRequest';
import { route } from '@/general/functions/router';
import route from '@/general/functions/router';
interface Props {
order_number: number;
@@ -100,6 +100,8 @@ interface Props {
const props = defineProps<Props>();
const asset = window.Vapor.asset;
const authStore = useAuthStore();
const { submit } = useRequest();
@@ -223,7 +223,7 @@
import { ref, onMounted } from 'vue';
import { useAuthStore } from '@/stores/auth';
import { useComponentHandler } from '@/composables/useComponentHandler';
import { route } from '@/general/functions/router';
import route from '@/general/functions/router';
const asset = window.Vapor.asset;
interface Props {
@@ -66,7 +66,7 @@
import { ref, onMounted } from 'vue';
import { useAuthStore } from '@/stores/auth';
import { useComponentHandler } from '@/composables/useComponentHandler';
import { route } from '@/general/functions/router';
import route from '@/general/functions/router';
interface Props {
data: any;
@@ -108,7 +108,7 @@
import { ref } from 'vue';
import { useAuthStore } from '@/stores/auth';
import { useComponentHandler } from '@/composables/useComponentHandler';
import { route } from '@/general/functions/router';
import route from '@/general/functions/router';
interface Props {
data: any;
@@ -34,7 +34,7 @@ import { ref } from 'vue';
import { required } from "@vuelidate/validators";
import useVuelidate from '@vuelidate/core';
import { useModalFormHandler } from '@/composables/useModalFormHandler';
import { route } from '@/general/functions/router';
import route from '@/general/functions/router';
interface Props {
data?: number;
@@ -326,22 +326,19 @@ const parameters = ref({
const money = {
decimal: '.',
thousands: ',',
precision: 2,
masked: false
precision: 2
};
const weight = {
decimal: '.',
thousands: ',',
precision: 1,
masked: false
precision: 1
};
const integer = {
decimal: '',
thousands: '',
precision: 0,
masked: false
precision: 0
};
const rules = {
@@ -204,7 +204,7 @@ const parameters = reactive({
company_id: props.company.id,
});
const asset = (path: string) => (window as any).Vapor.asset(path);
const asset = window.Vapor.asset;
const createOrder = () => {
step.value++;
@@ -314,7 +314,7 @@ import { ref, reactive, computed } from 'vue';
import { required } from "@vuelidate/validators";
import useVuelidate from '@vuelidate/core';
import { useUiStore } from '@/stores/ui';
import { route } from '@/general/functions/router';
import route from '@/general/functions/router';
const uiStore = useUiStore();
const section = 'createDelvieryOrderSectionComponent';
@@ -145,7 +145,8 @@ import { useAuthStore } from '@/stores/auth';
import { useUiStore } from '@/stores/ui';
import { useQueueStore } from '@/stores/queue';
import { useRequest } from '@/composables/useRequest';
import { route } from '@/general/functions/router';
import route from '@/general/functions/router';
import PaginationComponent from '@/components/general/elements/PaginationComponent.vue';
interface Props {
data?: any;
@@ -166,7 +167,7 @@ const emptyListSection = ref(false);
const orderNumber = ref('');
const orderMarking = ref('');
const orderSenderName = ref('');
const pagination = ref<any>(null);
const pagination = ref<InstanceType<typeof PaginationComponent> | null>(null);
const filters = ref(props.data ? {
company_module_id: props.data.company_module.id,
@@ -224,7 +225,7 @@ const fetchList = () => {
const successHandler = (response: any) => {
queueStore.setListComplete({ name: section.value, data: response.payload.data });
pagination.value?.makePagination(response.payload.meta, response.payload.links);
pagination.value?.makePagination(response.payload.meta); //pagination.value?.makePagination(response.payload.meta, response.payload.links);
metaData.value = response.payload.meta;
orderData.value = response.payload.data;
};
@@ -206,7 +206,7 @@ import { useAuthStore } from '@/stores/auth';
import { useQueueStore } from '@/stores/queue';
import { useRequest } from '@/composables/useRequest';
import { useCrudStore } from '@/stores/crud';
import { route } from '@/general/functions/router';
import route from '@/general/functions/router';
interface Props {
order_number: number;
@@ -191,7 +191,10 @@ import { useAuthStore } from '@/stores/auth';
import { useUiStore } from '@/stores/ui';
import { useQueueStore } from '@/stores/queue';
import { useRequest } from '@/composables/useRequest';
import { route } from '@/general/functions/router';
import route from '@/general/functions/router';
import PaginationComponent from '@/components/general/elements/PaginationComponent.vue';
const asset = window.Vapor.asset;
const authStore = useAuthStore();
const uiStore = useUiStore();
@@ -205,7 +208,7 @@ const perPageFilterDropDownStatus = ref(false);
const orderStatus = ref('Active');
const orderStatusFilterArray = ref(['Active', 'Complete', 'Pending Verification', 'Cancelled']);
const orderStatusFilterDropDownStatus = ref(false);
const pagination = ref<any>(null);
const pagination = ref<InstanceType<typeof PaginationComponent> | null>(null);
const filters = ref({
per_page: 2,
@@ -298,7 +301,7 @@ const updateFilters = (newFilters: any) => {
const successHandler = (response: any) => {
queueStore.setListComplete({ name: section.value, data: response.payload.data });
pagination.value?.makePagination(response.payload.meta, response.payload.links);
pagination.value?.makePagination(response.payload.meta); //pagination.value?.makePagination(response.payload.meta, response.payload.links);
metaData.value = response.payload.meta;
};
@@ -344,6 +344,7 @@ import { ref, computed, onMounted } from 'vue';
import { useComponentHandler } from '@/composables/useComponentHandler';
import { useRequest } from '@/composables/useRequest';
import { useAuthStore } from '@/stores/auth';
import route from '@/general/functions/router';
const props = withDefaults(defineProps<{
data: any;

Some files were not shown because too many files have changed in this diff Show More