mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-25 07:24:05 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 68c5208316 |
@@ -51,7 +51,6 @@ 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
@@ -5,7 +5,7 @@ APP_KEY=base64:I9qXyDlm7GVu/e47+YGzLB00fA/FMA2/hMPEhqu8pUQ=
|
||||
JWT_SECRET=9j7f7vUWEzxUBjLYcQimZp5wmxHEglcjU3beog26qC4pQKENZSpfWQfv065tjZrZ
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=mysql
|
||||
DB_HOST=172.18.0.2
|
||||
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,10 +53,6 @@ class UpdatePerfexCRMPrelude implements ShouldQueue
|
||||
return;
|
||||
}
|
||||
|
||||
if(config('perfexcrm.is_enabled') == 'false'){
|
||||
return;
|
||||
}
|
||||
|
||||
if(is_null($this->packingList)){
|
||||
$this->packingList = $this->transaction->owner->owner;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ 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
|
||||
{
|
||||
@@ -26,11 +25,9 @@ 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,7 +2,6 @@
|
||||
|
||||
namespace App\Classes\Modules\Exports\Services;
|
||||
|
||||
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
use App\Models\Order;
|
||||
use App\Models\PackingList;
|
||||
use Carbon\Carbon;
|
||||
@@ -39,10 +38,7 @@ class ExportsArrivedParcel implements WithHeadings, WithHeadingRow, WithMapping,
|
||||
'Received Date',
|
||||
'Recorded On',
|
||||
'Days to Record',
|
||||
'Remarks',
|
||||
'Delivery Address',
|
||||
'Post Code',
|
||||
'State',
|
||||
'Remarks'
|
||||
];
|
||||
}
|
||||
|
||||
@@ -83,8 +79,6 @@ 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,
|
||||
@@ -95,10 +89,7 @@ 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,22 +105,17 @@ class UpdateNextQuestionQALogic extends AbstractControllerLogic
|
||||
//Create ticket at crm
|
||||
if (!$request->has('isPrevious')) {
|
||||
if($questionType == QAType::TICKET_CRM){
|
||||
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);
|
||||
$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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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,51 +132,37 @@ class AssignPackingListOrderLogic extends AbstractControllerLogic
|
||||
$transport = $warehouse_packing_list->transports()->first();
|
||||
$transport = $this->updatesTransportStatus->execute($transport, ApprovalStatus::APPROVED);
|
||||
|
||||
if(config('unity.enabled')) {
|
||||
$contract = $this->unityCreateContract->execute();
|
||||
$contractReference = $contract->hash_id;
|
||||
$contractObligations = $contract->contract_obligation_list;
|
||||
$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);
|
||||
|
||||
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) {
|
||||
$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);
|
||||
}
|
||||
}
|
||||
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) {
|
||||
|
||||
} 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,7 +37,6 @@ 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;
|
||||
@@ -140,9 +139,6 @@ 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'];
|
||||
|
||||
|
||||
+1
-5
@@ -27,7 +27,6 @@ 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;
|
||||
|
||||
@@ -108,9 +107,6 @@ 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;
|
||||
|
||||
@@ -147,7 +143,7 @@ class FetchPackingListsFromYdPortalProcessor
|
||||
if (strpos($customerno, '正确唛头YD') !== false) {
|
||||
$customerno = explode('正确唛头YD', $customerno)[1];
|
||||
}
|
||||
|
||||
|
||||
$customerno = preg_split('/[-()\/]/', $customerno);
|
||||
|
||||
$orderNumber = $customerno[array_key_last($customerno)];
|
||||
|
||||
+4
-11
@@ -38,7 +38,6 @@ 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;
|
||||
@@ -140,12 +139,6 @@ 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;
|
||||
|
||||
@@ -310,7 +303,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 (config('unity.enabled') && $allow_contract) {
|
||||
if ($allow_contract) {
|
||||
|
||||
$contract = $this->unityCreateContract->execute();
|
||||
|
||||
@@ -335,7 +328,7 @@ class FetchOrderListsFromYdPortalV2Processor
|
||||
/** @var PackingList $packingList */
|
||||
$packingList = $this->createPackingListProcessor->execute($packingListObject, $order);
|
||||
|
||||
if (config('unity.enabled') && $allow_contract) {
|
||||
if ($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);
|
||||
@@ -439,7 +432,7 @@ class FetchOrderListsFromYdPortalV2Processor
|
||||
$packingList->save();
|
||||
}
|
||||
|
||||
if (config('unity.enabled') && $allow_contract) {
|
||||
if ($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);
|
||||
@@ -462,7 +455,7 @@ class FetchOrderListsFromYdPortalV2Processor
|
||||
$this->createsSchedule->execute($transport, new ScheduleObject($deliveryDate, $deliveryDate, ApprovalStatus::APPROVED));
|
||||
|
||||
|
||||
if (config('unity.enabled') && $allow_contract) {
|
||||
if ($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);
|
||||
|
||||
+2
-11
@@ -31,7 +31,6 @@ 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;
|
||||
|
||||
@@ -112,12 +111,6 @@ 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;
|
||||
|
||||
@@ -207,9 +200,7 @@ 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);
|
||||
|
||||
$contractReference = null;
|
||||
|
||||
if (config('unity.enabled') && $allow_contract) {
|
||||
if ($allow_contract) {
|
||||
|
||||
$contract = $this->unityCreateContract->execute();
|
||||
|
||||
@@ -235,7 +226,7 @@ class FetchPackingListsFromYdPortalV2Processor
|
||||
$packingList = $this->createPackingListProcessor->execute($packingListObject, $order);
|
||||
Log::info('Create SHIPPING_PACKING_LIST id: ' . $packingList->id);
|
||||
|
||||
if (config('unity.enabled') && $allow_contract) {
|
||||
if ($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,7 +6,6 @@ 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;
|
||||
@@ -41,19 +40,7 @@ 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){
|
||||
$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;
|
||||
$item['is_einvoice_applicable'] = $item->owner->owner->companyModule->company->e_invoice === 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-3
@@ -267,9 +267,6 @@ 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,13 +135,7 @@ 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 = 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;
|
||||
}
|
||||
$warehouse_rate = is_object($selected_warehouse_rate) ? $selected_warehouse_rate->amount : 0;
|
||||
|
||||
$stateId = $address->state_id;
|
||||
$state_rate_constant = $this->getConstantByKey($state_rate_constant, $stateId);
|
||||
|
||||
+1
-1
@@ -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,7 +4,6 @@ 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
|
||||
@@ -21,17 +20,11 @@ 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::withoutVerifying()->withToken($accessToken)->put($this->activateEntityEndpoint)->object();
|
||||
$response = Http::withToken($accessToken)->put($this->activateEntityEndpoint)->object();
|
||||
|
||||
return (isset($response->data)) ? $response->data : null;
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ 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
|
||||
@@ -24,13 +23,10 @@ class CreatesContract
|
||||
|
||||
public function execute(){
|
||||
|
||||
if(!config('unity.enabled')) return null;
|
||||
|
||||
Log::info('[CreatesContract] UNITY CALLED');
|
||||
|
||||
$accessToken=$this->getAccessToken->execute();
|
||||
|
||||
$response = Http::withoutVerifying()->withToken($accessToken)->post($this->createEntityEndpoint,['contract_template_id'=>[$this->contract_hash_id]])->object();
|
||||
$response = Http::withToken($accessToken)->post($this->createEntityEndpoint,['contract_template_id'=>[$this->contract_hash_id]])->object();
|
||||
|
||||
return (isset($response->data)) ? $response->data : null;
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ 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
|
||||
@@ -24,15 +23,8 @@ 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::withoutVerifying()->withToken($accesToken)->post($this->createContractEntityEndpoint,['contract_id'=>[$new_contract_id],'entity_id'=>$entity_hash_ids])->object();
|
||||
$response = Http::withToken($accesToken)->post($this->createContractEntityEndpoint,['contract_id'=>[$new_contract_id],'entity_id'=>$entity_hash_ids])->object();
|
||||
return (isset($response->data)) ? $response->data : null;
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ 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
|
||||
@@ -21,15 +20,9 @@ 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::withoutVerifying()->withToken($accesToken)->post($this->createEntityEndpoint,['name'=>$entity_name])->object();
|
||||
$response = Http::withToken($accesToken)->post($this->createEntityEndpoint,['name'=>$entity_name])->object();
|
||||
|
||||
return (isset($response->data)) ? $response->data : null;
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ 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
|
||||
@@ -21,15 +20,9 @@ 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::withoutVerifying()->withToken($accesToken)->post($this->createEntitySignatureEndpoint,['entity_id'=>[$entity_hash_id], 'type'=>'1'])->object();
|
||||
$response = Http::withToken($accesToken)->post($this->createEntitySignatureEndpoint,['entity_id'=>[$entity_hash_id], 'type'=>'1'])->object();
|
||||
|
||||
return (isset($response->data)) ? $response->data : null;
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ namespace App\Classes\Modules\Unity\Services;
|
||||
use Config;
|
||||
use Cache;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class GetAccessToken
|
||||
{
|
||||
@@ -36,14 +35,10 @@ 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::withoutVerifying()->post($this->getAccessTokenEndpoint, [
|
||||
$response = Http::post($this->getAccessTokenEndpoint, [
|
||||
'email' => $this->username,
|
||||
'password' => $this->password ,
|
||||
])->object();
|
||||
|
||||
@@ -4,7 +4,6 @@ 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
|
||||
@@ -22,13 +21,9 @@ class GetContractObligations
|
||||
|
||||
public function execute(){
|
||||
|
||||
if(!config('unity.enabled')) return [];
|
||||
|
||||
Log::info('[GetContractObligations] UNITY CALLED');
|
||||
|
||||
$accesToken=$this->getAccessToken->execute();
|
||||
|
||||
$response = Http::withoutVerifying()->withToken($accesToken)->get($this->getContractObligationsEndpoint)->object();
|
||||
$response = Http::withToken($accesToken)->get($this->getContractObligationsEndpoint)->object();
|
||||
|
||||
return (isset($response->data)) ? $response->data : [];
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ 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
|
||||
@@ -21,18 +20,11 @@ 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::withoutVerifying()->withToken($accessToken)->put( $this->assignEntityEndpoint,['contract_entity_id'=>$entity_hash_id])->object();
|
||||
$response = Http::withToken($accessToken)->put( $this->assignEntityEndpoint,['contract_entity_id'=>$entity_hash_id])->object();
|
||||
|
||||
return (isset($response->data)) ? $response->data : null;
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ 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
|
||||
@@ -21,18 +20,11 @@ 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::withoutVerifying()->withToken($accessToken)->put($this->updateContractStatusEndpoint,['entity_signature_id'=>$contract_entity_signature])->object();
|
||||
$response = Http::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,7 +17,6 @@ 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
|
||||
{
|
||||
@@ -151,84 +150,45 @@ class MonthlyReportController
|
||||
}
|
||||
|
||||
public function customerReport(Request $request): JsonResponse {
|
||||
try {
|
||||
$connection = CompanyConnection::where('invitee_reference', $request->route('marking'))->firstOrFail();
|
||||
$invitee = $connection->invitee;
|
||||
|
||||
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();
|
||||
}
|
||||
$connection = CompanyConnection::where('invitee_reference', $request->route('marking'))->firstOrFail();
|
||||
$id = $connection->invitee->id;
|
||||
|
||||
$id = $invitee->id;
|
||||
$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();
|
||||
|
||||
$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();
|
||||
$containers = Container::whereBetween('loading_date', [$from, $to])->orderBy('loading_date')->get();
|
||||
|
||||
// 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();
|
||||
$packingLists = $containers->flatMap(function ($container) {
|
||||
return $container->packingLists;
|
||||
});
|
||||
|
||||
$packingLists = $containers->flatMap(function ($container) {
|
||||
return $container->packingLists;
|
||||
});
|
||||
$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;
|
||||
});
|
||||
|
||||
$userType = Auth() && Auth()->user() ? Auth()->user()->type : RoleTypes::USER;
|
||||
$exceptionUsers = in_array($userType, [RoleTypes::SHADOW_ADMIN, RoleTypes::SUPER_ADMIN]);
|
||||
$packages = $packages->filter(function($package) use ($id) {
|
||||
return $package->companyModule->id === $id;
|
||||
});
|
||||
|
||||
$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;
|
||||
});
|
||||
$orders = $packages->unique(function ($package) {
|
||||
return $package->order;
|
||||
});
|
||||
|
||||
$packages = $packages->filter(function($package) use ($id) {
|
||||
$companyModule = $package->companyModule;
|
||||
return $companyModule && $companyModule->id === $id;
|
||||
});
|
||||
$totalCbm = $packages->sum(function($package){
|
||||
return (( (float) $package->width / 100) * ( (float) $package->length / 100) * ( (float) $package->height / 100)) * $package->quantity;
|
||||
});
|
||||
|
||||
$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;
|
||||
}
|
||||
return (new ApiResponseObject('fetch monthly report Successful',
|
||||
'',
|
||||
HttpStatus::OK_WITH_MESSAGE, ['data' => [
|
||||
'activated_orders' => count($orders),
|
||||
'total_cbm' => $totalCbm,
|
||||
'packages' => $packages->sum('quantity'),
|
||||
]]))->handler();
|
||||
}
|
||||
|
||||
public function serviceReport(Request $request): JsonResponse {
|
||||
|
||||
@@ -5,7 +5,6 @@ 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
|
||||
@@ -31,19 +30,7 @@ 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) {
|
||||
$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;
|
||||
$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' => PackingListForOriginWarehouseResource::collection($origin_warehouse_packages),
|
||||
'origin_warehouse_packages' => PackingListForPackagesReceivedResource::collection($origin_warehouse_packages), //cief todo: 150 - to update with new resource
|
||||
'created_at' => $this->created_at->format('d-m-Y')
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
<?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
@@ -29,6 +29,6 @@ return [
|
||||
|
||||
'max_age' => 0,
|
||||
|
||||
'supports_credentials' => false,
|
||||
'supports_credentials' => false, //cief todo: 137
|
||||
|
||||
];
|
||||
|
||||
@@ -41,8 +41,6 @@ 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'),
|
||||
|
||||
@@ -8,7 +8,7 @@ services:
|
||||
nginx:
|
||||
image: nginx:stable-alpine
|
||||
platform: linux/amd64
|
||||
container_name: shipping-portal-ngnix
|
||||
container_name: shipping-portal-2-ngnix
|
||||
ports:
|
||||
- "8081:80"
|
||||
volumes:
|
||||
@@ -23,7 +23,7 @@ services:
|
||||
mysql:
|
||||
image: mysql:5.7.29
|
||||
platform: linux/amd64
|
||||
container_name: shipping-portal-mysql
|
||||
container_name: shipping-portal-2-mysql
|
||||
restart: unless-stopped
|
||||
tty: true
|
||||
ports:
|
||||
@@ -44,7 +44,7 @@ services:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: shipping-portal-php
|
||||
container_name: shipping-portal-2-php
|
||||
volumes:
|
||||
- ../:/var/www/html
|
||||
ports:
|
||||
|
||||
+3
-1
@@ -1576,6 +1576,8 @@ 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;
|
||||
}
|
||||
|
||||
@@ -2038,7 +2040,7 @@ padding-right: 30px;
|
||||
|
||||
.mfp-figure:after {
|
||||
box-shadow: none !important;
|
||||
background: none !important;
|
||||
background: none !important;
|
||||
}
|
||||
|
||||
.profile-picture {
|
||||
|
||||
+364
-17
@@ -16,32 +16,35 @@ window.route = route;
|
||||
window.Vapor = Vapor;
|
||||
window.Vapor.withBaseAssetUrl(import.meta.env.VITE_VAPOR_ASSET_URL);
|
||||
|
||||
const pinia = createPinia();
|
||||
// Create app
|
||||
const app = createApp({
|
||||
setup() {
|
||||
created() {
|
||||
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>(
|
||||
@@ -93,20 +96,364 @@ 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);
|
||||
}
|
||||
});
|
||||
// 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);
|
||||
|
||||
|
||||
// Register tooltip directive
|
||||
app.directive('tooltip', {
|
||||
|
||||
+7
-3
@@ -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 { useModalFormHandler } from '@/composables/useModalFormHandler';
|
||||
import { useRequest } from '@/composables/useRequest';
|
||||
import route from '@/general/functions/router';
|
||||
import ErrorMessageComponent from '@/components/general/elements/ErrorMessageComponent.vue';
|
||||
import ValidationWrapperComponent from '@/components/general/forms/ValidationWrapperComponent.vue';
|
||||
@@ -181,10 +181,11 @@ const props = defineProps<{
|
||||
section: string;
|
||||
}>();
|
||||
|
||||
const { submit, error } = useModalFormHandler(props);
|
||||
const { submit } = useRequest();
|
||||
const authStore = useAuthStore();
|
||||
const uiStore = useUiStore();
|
||||
|
||||
const error = ref('');
|
||||
const step = ref(1);
|
||||
const parameters = reactive({
|
||||
name: '',
|
||||
@@ -219,7 +220,7 @@ const rules = computed(() => ({
|
||||
},
|
||||
password_confirmation: {
|
||||
required: requiredIf(() => step.value === 2),
|
||||
sameAs: sameAs(parameters.password, 'password')
|
||||
sameAs: sameAs(parameters.password)
|
||||
},
|
||||
identification_no: {
|
||||
required: requiredIf(() => step.value === 1)
|
||||
@@ -265,6 +266,9 @@ 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 { useModalFormHandler } from '@/composables/useModalFormHandler';
|
||||
import { useRequest } from '@/composables/useRequest';
|
||||
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, error } = useModalFormHandler(props);
|
||||
const { submit } = useRequest();
|
||||
const authStore = useAuthStore();
|
||||
const uiStore = useUiStore();
|
||||
const rules = {
|
||||
@@ -65,6 +65,7 @@ const rules = {
|
||||
}
|
||||
};
|
||||
|
||||
const error = ref('');
|
||||
const parameters = reactive({
|
||||
email: '',
|
||||
password: ''
|
||||
@@ -91,8 +92,11 @@ 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 { useModalFormHandler } from '@/composables/useModalFormHandler';
|
||||
import { useRequest } from '@/composables/useRequest';
|
||||
import route from '@/general/functions/router';
|
||||
import ErrorMessageComponent from '@/components/general/elements/ErrorMessageComponent.vue';
|
||||
import ValidationWrapperComponent from '@/components/general/forms/ValidationWrapperComponent.vue';
|
||||
@@ -90,10 +90,11 @@ const props = defineProps<{
|
||||
section: string;
|
||||
}>();
|
||||
|
||||
const { submit, error } = useModalFormHandler(props);
|
||||
const { submit } = useRequest();
|
||||
const authStore = useAuthStore();
|
||||
const uiStore = useUiStore();
|
||||
|
||||
const error = ref('');
|
||||
const parameters = reactive({
|
||||
company_id: props.id,
|
||||
name: '',
|
||||
@@ -111,7 +112,7 @@ const rules = computed(() => ({
|
||||
password: { required },
|
||||
password_confirmation: {
|
||||
required,
|
||||
sameAs: sameAs(parameters.password, 'password')
|
||||
sameAs: sameAs(parameters.password)
|
||||
}
|
||||
}
|
||||
}));
|
||||
@@ -134,6 +135,9 @@ 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, error } = useModalFormHandler({ section: props.section })
|
||||
const { submit } = useModalFormHandler({ section: props.section })
|
||||
const authStore = useAuthStore();
|
||||
const uiStore = useUiStore();
|
||||
const rules = {
|
||||
@@ -65,6 +65,7 @@ const rules = {
|
||||
}
|
||||
};
|
||||
|
||||
const error = ref('');
|
||||
const parameters = reactive({
|
||||
email: '',
|
||||
password: ''
|
||||
@@ -91,6 +92,9 @@ 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 { useModalFormHandler } from '@/composables/useModalFormHandler';
|
||||
import { useRequest } from '@/composables/useRequest';
|
||||
import route from '@/general/functions/router';
|
||||
import ErrorMessageComponent from '@/components/general/elements/ErrorMessageComponent.vue';
|
||||
import ValidationWrapperComponent from '@/components/general/forms/ValidationWrapperComponent.vue';
|
||||
@@ -85,10 +85,11 @@ const props = defineProps<{
|
||||
section: string;
|
||||
}>();
|
||||
|
||||
const { submit, error } = useModalFormHandler(props);
|
||||
const { submit } = useRequest();
|
||||
const authStore = useAuthStore();
|
||||
const uiStore = useUiStore();
|
||||
|
||||
const error = ref('');
|
||||
const parameters = reactive({
|
||||
name: '',
|
||||
email: '',
|
||||
@@ -107,7 +108,7 @@ const rules = computed(() => ({
|
||||
password: { required },
|
||||
password_confirmation: {
|
||||
required,
|
||||
sameAs: sameAs(parameters.password, 'password')
|
||||
sameAs: sameAs(parameters.password)
|
||||
},
|
||||
}
|
||||
}));
|
||||
@@ -131,6 +132,9 @@ const submitForm = async () => {
|
||||
redirect_url: response.payload.redirect_url
|
||||
});
|
||||
},
|
||||
errorHandler: (response: any) => {
|
||||
error.value = response.message;
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
+3
-12
@@ -34,29 +34,20 @@
|
||||
</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 { useModalFormHandler } from '@/composables/useModalFormHandler';
|
||||
import { useRequest } from '@/composables/useRequest';
|
||||
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 } = useModalFormHandler(props);
|
||||
const { submit } = useRequest();
|
||||
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 { useModalFormHandler } from '@/composables/useModalFormHandler';
|
||||
import { useRequest } from '@/composables/useRequest';
|
||||
import route from '@/general/functions/router';
|
||||
import ErrorMessageComponent from '@/components/general/elements/ErrorMessageComponent.vue';
|
||||
import ValidationWrapperComponent from '@/components/general/forms/ValidationWrapperComponent.vue';
|
||||
@@ -270,9 +270,10 @@ const props = defineProps<{
|
||||
section: string;
|
||||
}>();
|
||||
|
||||
const { submit, error } = useModalFormHandler(props);
|
||||
const { submit } = useRequest();
|
||||
const authStore = useAuthStore();
|
||||
|
||||
const error = ref('');
|
||||
const step = ref(1);
|
||||
const parameters = reactive({
|
||||
name: '',
|
||||
@@ -307,7 +308,7 @@ const rules = computed(() => ({
|
||||
},
|
||||
password_confirmation: {
|
||||
required: requiredIf(() => step.value === 2),
|
||||
sameAs: sameAs(parameters.password, 'password')
|
||||
sameAs: sameAs(parameters.password)
|
||||
},
|
||||
identification_no: {
|
||||
required: requiredIf(() => step.value === 1)
|
||||
@@ -353,6 +354,9 @@ const submitForm = async () => {
|
||||
access_token: response.payload.access_token,
|
||||
redirect_url: response.payload.redirect_url
|
||||
});
|
||||
},
|
||||
errorHandler: (response: any) => {
|
||||
error.value = response.message;
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -360,4 +364,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
|
||||
|
||||
+18
-3
@@ -125,7 +125,6 @@ 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;
|
||||
@@ -137,10 +136,11 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
});
|
||||
|
||||
const queueStore = useQueueStore();
|
||||
const { submit } = useModalFormHandler(props);
|
||||
const { submit } = useRequest();
|
||||
|
||||
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,9 +150,24 @@ 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);
|
||||
submit(url, 'put', 'addressVerificationSection', true, true, null, {
|
||||
successHandler: successHandler,
|
||||
errorHandler: errorHandler
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -321,5 +321,4 @@ const submitForm = async () => {
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
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 {
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
+1
-1
@@ -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 {
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
+1
-2
@@ -42,13 +42,12 @@
|
||||
<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<InstanceType<typeof DatePickerLimitRangeComponent> | null>(null);
|
||||
const endDatePicker = ref<any>(null);
|
||||
|
||||
const onStartDateChange = (date: string) => {
|
||||
if (date) {
|
||||
|
||||
+1
-2
@@ -76,7 +76,6 @@
|
||||
<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);
|
||||
@@ -84,7 +83,7 @@ const startDate = ref('');
|
||||
const endDate = ref('');
|
||||
const isValidRange = ref(false);
|
||||
const section = ref('ExportReceivePaymentDepositEntryReportSection');
|
||||
const endDatePicker = ref<InstanceType<typeof DatePickerLimitRangeComponent> | null>(null);
|
||||
const endDatePicker = ref<any>(null);
|
||||
|
||||
const onStartDateChange = (date: string) => {
|
||||
if (date) {
|
||||
|
||||
+1
-2
@@ -87,7 +87,6 @@
|
||||
<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);
|
||||
@@ -95,7 +94,7 @@ const startDate = ref('');
|
||||
const endDate = ref('');
|
||||
const isValidRange = ref(false);
|
||||
const section = ref('ExportReceivePaymentDepositForOrderSection');
|
||||
const endDatePicker = ref<InstanceType<typeof DatePickerLimitRangeComponent> | null>(null);
|
||||
const endDatePicker = ref<any>(null);
|
||||
|
||||
const onStartDateChange = (date: string) => {
|
||||
if (date) {
|
||||
|
||||
+1
-2
@@ -76,14 +76,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 isCollapsed = ref(false);
|
||||
const maxDays = ref(180);
|
||||
const startDate = ref('');
|
||||
const endDate = ref('');
|
||||
const isValidRange = ref(false);
|
||||
const endDatePicker = ref<InstanceType<typeof DatePickerLimitRangeComponent> | null>(null);
|
||||
const endDatePicker = ref<any>(null);
|
||||
|
||||
const onStartDateChange = (date: string) => {
|
||||
if (date) {
|
||||
|
||||
+1
-2
@@ -110,7 +110,6 @@
|
||||
<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);
|
||||
@@ -119,7 +118,7 @@ const endDate = ref('');
|
||||
const isValidRange = ref(false);
|
||||
const section = ref('ImportExportSalesInvoiceReportSection');
|
||||
const generateEInvoicesUrl = ref<string | null>(null);
|
||||
const endDatePicker = ref<InstanceType<typeof DatePickerLimitRangeComponent> | null>(null);
|
||||
const endDatePicker = ref<any>(null);
|
||||
|
||||
const onStartDateChange = (date: string) => {
|
||||
if (date) {
|
||||
|
||||
+21
-3
@@ -184,7 +184,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue';
|
||||
import { useQueueStore } from '@/stores/queue';
|
||||
import { useModalFormHandler } from '@/composables/useModalFormHandler';
|
||||
import { useRequest } from '@/composables/useRequest';
|
||||
import { useUiStore } from '@/stores/ui';
|
||||
import { useAuthStore } from '@/stores/auth';
|
||||
import route from '@/general/functions/router';
|
||||
@@ -194,14 +194,17 @@ const props = defineProps<{
|
||||
section: string;
|
||||
}>();
|
||||
|
||||
const queueStore = useQueueStore();
|
||||
const uiStore = useUiStore();
|
||||
const authStore = useAuthStore();
|
||||
const { submit } = useModalFormHandler(props);
|
||||
const { submit } = useRequest();
|
||||
|
||||
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) {
|
||||
@@ -211,9 +214,24 @@ 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);
|
||||
submit(url, 'put', 'identificationVerificationSection', true, true, null, {
|
||||
successHandler: successHandler,
|
||||
errorHandler: errorHandler
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
+1
-1
@@ -130,7 +130,7 @@ import { useAuthStore } from '@/stores/auth';
|
||||
import { useRequest } from '@/composables/useRequest';
|
||||
import { useUiStore } from '@/stores/ui';
|
||||
|
||||
const asset = window.Vapor.asset;
|
||||
const asset = (path: string) => (window as any).Vapor.asset(path);
|
||||
|
||||
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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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 = window.Vapor.asset;
|
||||
const asset = (path: string) => (window as any).Vapor.asset(path);
|
||||
|
||||
const props = defineProps<{
|
||||
file: any;
|
||||
|
||||
@@ -54,7 +54,6 @@ 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;
|
||||
|
||||
@@ -75,8 +74,7 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
const queueStore = useQueueStore();
|
||||
const uiStore = useUiStore();
|
||||
const { submit } = useRequest();
|
||||
|
||||
const pagination = ref<InstanceType<typeof PaginationComponent> | null>(null);
|
||||
const pagination = ref<any>(null);
|
||||
const filters = ref<any>(props.options);
|
||||
|
||||
const setDecoratorDefault = () => {
|
||||
@@ -96,8 +94,7 @@ 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);
|
||||
pagination.value.makePagination(response.payload.meta, response.payload.links);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -111,8 +108,7 @@ 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);
|
||||
pagination.value.makePagination(response.payload.meta, response.payload.links);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -130,6 +126,6 @@ watch(() => queueStore.isInCompleteQueue(props.section), (inComplete) => {
|
||||
});
|
||||
|
||||
defineExpose({
|
||||
// updateFilters //no where is this being used
|
||||
updateFilters
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -56,7 +56,6 @@ 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;
|
||||
@@ -68,8 +67,6 @@ const props = withDefaults(defineProps<{
|
||||
emptyListSection: true
|
||||
});
|
||||
|
||||
const asset = window.Vapor.asset;
|
||||
|
||||
const queueStore = useQueueStore();
|
||||
const uiStore = useUiStore();
|
||||
const jobPollingStore = useJobPollingStore();
|
||||
@@ -77,7 +74,7 @@ const { submit } = useRequest();
|
||||
|
||||
const filters = ref(props.options);
|
||||
const isLoading = ref(false);
|
||||
const pagination = ref<InstanceType<typeof PaginationComponent> | null>(null);
|
||||
const pagination = ref<any>(null);
|
||||
|
||||
const setDecoratorDefault = () => {
|
||||
filters.value = {};
|
||||
@@ -129,8 +126,7 @@ 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);
|
||||
pagination.value.makePagination(result.meta, result.links);
|
||||
}
|
||||
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 = window.Vapor.asset;
|
||||
const asset = (path: string) => (window as any).Vapor.asset(path);
|
||||
|
||||
const props = defineProps<{
|
||||
data?: any;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</component>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { computed, Transition, TransitionGroup } from 'vue';
|
||||
import { computed } from 'vue';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
speed?: string;
|
||||
@@ -22,7 +22,9 @@ const props = withDefaults(defineProps<{
|
||||
tag: 'div'
|
||||
});
|
||||
|
||||
const type = computed(() => (props.group ? TransitionGroup : Transition));
|
||||
const type = computed(() => {
|
||||
return props.group ? "transition-group" : "transition";
|
||||
});
|
||||
|
||||
const dynamicProps = computed(() => {
|
||||
const p: any = {
|
||||
@@ -51,4 +53,4 @@ const hooks = {
|
||||
beforeLeave: setAbsolutePosition,
|
||||
afterLeave: cleanUp
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
@@ -15,5 +15,5 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import ModalComponent from './ModalComponent.vue'
|
||||
const asset = window.Vapor.asset;
|
||||
const asset = (path: string) => (window as any).Vapor.asset(path);
|
||||
</script>
|
||||
|
||||
@@ -40,11 +40,7 @@ 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' || validatorName === 'sameAsPassword') {
|
||||
let fieldName = params.otherName || params.eq || 'password';
|
||||
if (fieldName === 'password') fieldName = 'password';
|
||||
return `${errorMessages.sameAs} ${fieldName} field`;
|
||||
}
|
||||
if (validatorName === 'sameAs') return `${errorMessages.sameAs} ${params.eq} field`;
|
||||
if (validatorName === 'minValue') return `${errorMessages.minValue} ${params.min}`;
|
||||
if (validatorName === 'maxValue') return `${errorMessages.maxValue} ${params.max}`;
|
||||
|
||||
|
||||
@@ -54,8 +54,7 @@ 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 PaginationComponent from '@/components/general/elements/PaginationComponent.vue';
|
||||
import { route } from '@/general/functions/router';
|
||||
|
||||
const asset = window.Vapor.asset;
|
||||
|
||||
@@ -81,7 +80,7 @@ const { submit } = useRequest();
|
||||
const filters = ref(props.options);
|
||||
const api_count = ref(0);
|
||||
const isLoading = ref(true);
|
||||
const pagination = ref<InstanceType<typeof PaginationComponent> | null>(null);
|
||||
const pagination = ref<any>(null);
|
||||
|
||||
// Create computed properties for reactive data
|
||||
const listData = computed(() => queueStore.getListData(props.section));
|
||||
@@ -115,7 +114,7 @@ const fetchList = () => {
|
||||
name: props.section,
|
||||
data: response.payload.data
|
||||
});
|
||||
pagination.value?.makePagination(response.payload.meta); //pagination.value?.makePagination(response.payload.meta, response.payload.links);
|
||||
pagination.value?.makePagination(response.payload.meta, response.payload.links);
|
||||
api_count.value += 1;
|
||||
isLoading.value = false;
|
||||
}
|
||||
@@ -139,7 +138,7 @@ const updateFilters = (newFilters: any) => {
|
||||
name: props.section,
|
||||
data: response.payload.data
|
||||
});
|
||||
pagination.value?.makePagination(response.payload.meta); //pagination.value?.makePagination(response.payload.meta, response.payload.links);
|
||||
pagination.value?.makePagination(response.payload.meta, response.payload.links);
|
||||
api_count.value += 1;
|
||||
isLoading.value = false;
|
||||
}
|
||||
@@ -158,6 +157,6 @@ onMounted(() => {
|
||||
});
|
||||
|
||||
defineExpose({
|
||||
// updateFilters //no where is this being used
|
||||
updateFilters
|
||||
});
|
||||
</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 = window.Vapor.asset;
|
||||
const asset = (path: string) => (window as any).Vapor.asset(path);
|
||||
const filters = {
|
||||
include_packages_delivery: true,
|
||||
};
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ const order = ref<any>(null);
|
||||
const dataLoaded = ref(false);
|
||||
const isLoading = computed(() => uiStore.isLoading(section));
|
||||
|
||||
const asset = window.Vapor.asset;
|
||||
const asset = (path: string) => (window as any).Vapor.asset(path);
|
||||
const filters = {
|
||||
include_packages_destination_warehouse: true,
|
||||
};
|
||||
|
||||
@@ -54,7 +54,7 @@ const dataLoaded = ref(false);
|
||||
const isLoading = computed(() => uiStore.isLoading(section));
|
||||
|
||||
|
||||
const asset = window.Vapor.asset;
|
||||
const asset = (path: string) => (window as any).Vapor.asset(path);
|
||||
const filters = {
|
||||
include_packages_in_transit: true,
|
||||
};
|
||||
|
||||
-2
@@ -85,8 +85,6 @@ 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,8 +100,6 @@ 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,19 +326,22 @@ const parameters = ref({
|
||||
const money = {
|
||||
decimal: '.',
|
||||
thousands: ',',
|
||||
precision: 2
|
||||
precision: 2,
|
||||
masked: false
|
||||
};
|
||||
|
||||
const weight = {
|
||||
decimal: '.',
|
||||
thousands: ',',
|
||||
precision: 1
|
||||
precision: 1,
|
||||
masked: false
|
||||
};
|
||||
|
||||
const integer = {
|
||||
decimal: '',
|
||||
thousands: '',
|
||||
precision: 0
|
||||
precision: 0,
|
||||
masked: false
|
||||
};
|
||||
|
||||
const rules = {
|
||||
|
||||
@@ -204,7 +204,7 @@ const parameters = reactive({
|
||||
company_id: props.company.id,
|
||||
});
|
||||
|
||||
const asset = window.Vapor.asset;
|
||||
const asset = (path: string) => (window as any).Vapor.asset(path);
|
||||
|
||||
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';
|
||||
|
||||
+3
-4
@@ -145,8 +145,7 @@ 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 PaginationComponent from '@/components/general/elements/PaginationComponent.vue';
|
||||
import { route } from '@/general/functions/router';
|
||||
|
||||
interface Props {
|
||||
data?: any;
|
||||
@@ -167,7 +166,7 @@ const emptyListSection = ref(false);
|
||||
const orderNumber = ref('');
|
||||
const orderMarking = ref('');
|
||||
const orderSenderName = ref('');
|
||||
const pagination = ref<InstanceType<typeof PaginationComponent> | null>(null);
|
||||
const pagination = ref<any>(null);
|
||||
|
||||
const filters = ref(props.data ? {
|
||||
company_module_id: props.data.company_module.id,
|
||||
@@ -225,7 +224,7 @@ const fetchList = () => {
|
||||
|
||||
const successHandler = (response: any) => {
|
||||
queueStore.setListComplete({ name: section.value, data: response.payload.data });
|
||||
pagination.value?.makePagination(response.payload.meta); //pagination.value?.makePagination(response.payload.meta, response.payload.links);
|
||||
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,10 +191,7 @@ 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 PaginationComponent from '@/components/general/elements/PaginationComponent.vue';
|
||||
|
||||
const asset = window.Vapor.asset;
|
||||
import { route } from '@/general/functions/router';
|
||||
|
||||
const authStore = useAuthStore();
|
||||
const uiStore = useUiStore();
|
||||
@@ -208,7 +205,7 @@ const perPageFilterDropDownStatus = ref(false);
|
||||
const orderStatus = ref('Active');
|
||||
const orderStatusFilterArray = ref(['Active', 'Complete', 'Pending Verification', 'Cancelled']);
|
||||
const orderStatusFilterDropDownStatus = ref(false);
|
||||
const pagination = ref<InstanceType<typeof PaginationComponent> | null>(null);
|
||||
const pagination = ref<any>(null);
|
||||
|
||||
const filters = ref({
|
||||
per_page: 2,
|
||||
@@ -301,7 +298,7 @@ const updateFilters = (newFilters: any) => {
|
||||
|
||||
const successHandler = (response: any) => {
|
||||
queueStore.setListComplete({ name: section.value, data: response.payload.data });
|
||||
pagination.value?.makePagination(response.payload.meta); //pagination.value?.makePagination(response.payload.meta, response.payload.links);
|
||||
pagination.value?.makePagination(response.payload.meta, response.payload.links);
|
||||
metaData.value = response.payload.meta;
|
||||
};
|
||||
|
||||
|
||||
-1
@@ -344,7 +344,6 @@ 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
Reference in New Issue
Block a user