diff --git a/app/Http/Resources/ListPackingListJobResource.php b/app/Http/Resources/ListPackingListJobResource.php index d260f4b6..348b64a0 100644 --- a/app/Http/Resources/ListPackingListJobResource.php +++ b/app/Http/Resources/ListPackingListJobResource.php @@ -32,10 +32,12 @@ class ListPackingListJobResource extends JsonResource 'transport' => new TransportResource($this->transports()->first()), 'type' => $this->type, 'receive_packing_list' => $this->when($this->type === PackingListType::SHIPPING_PACKING_LIST, new PackingListV2Resource(PackingList::where('reference', $this->reference)->where('type', PackingListType::WAREHOUSE_RECEIVE_LIST)->first(), $this->userInfo)), - 'packages' => PackageResource::collection($packages), - $this->mergeWhen($this->owner instanceof Order, [ - 'order' => New OrderResource($this->owner) - ]), + // 'packages' => PackageResource::collection($packages), + // $this->mergeWhen($this->owner instanceof Order, [ + // 'order' => New OrderResource($this->owner) + // ]), + 'packages' => PackageWithoutOrderResource::collection($packages), + $this->mergeWhen($this->owner instanceof Order, [ 'order' => New OrderResource($this->owner) ]), 'shipping_transaction' => new TransactionResource($this->transactions()->where('type', TransactionType::SHIPPING_INVOICE)->whereNotIn('status', [ApprovalStatus::SUSPENDED, ApprovalStatus::EXPIRED])->first()), 'suspended_invoice' => new TransactionResource($this->transactions()->where('type', TransactionType::SHIPPING_INVOICE)->whereIn('status', [ApprovalStatus::SUSPENDED])->first()), // 'suspended_invoices' => TransactionResource::collection($this->transactions()->where('type', TransactionType::SHIPPING_INVOICE)->whereIn('status', [ApprovalStatus::SUSPENDED])->get()), diff --git a/app/Http/Resources/PackageWithoutOrderResource.php b/app/Http/Resources/PackageWithoutOrderResource.php new file mode 100644 index 00000000..4400aa44 --- /dev/null +++ b/app/Http/Resources/PackageWithoutOrderResource.php @@ -0,0 +1,41 @@ +packingList->owner instanceof PackingList ? $this->packingList->owner : $this->packingList; + + return [ + 'id' => $this->id, + 'type' => $this->type, + 'description' => $this->description, + 'width' => floatval($this->width), + 'height' => floatval($this->height), + 'length' => floatval($this->length), + 'weight' => $this->weight, + 'quantity' => $this->quantity, + 'cbm' => (($this->width / 100) * ($this->height / 100) * ($this->length / 100)) * $this->quantity, + 'reference' => $this->packingList->reference, + 'status' => $this->status, + // $this->mergeWhen($originalPackingList->owner instanceof Order, [ + // 'order' => New OrderResource($originalPackingList->owner) + // ]), + 'container' => new ContainerResource($originalPackingList->containers()->first()), + 'transport' => new TransportResource($originalPackingList->transports()->first()) + ]; + } +} diff --git a/resources/assets/vue/components/paymentsBilling/elements/AdminPaymentsBillingWithSearchPollingComponent.vue b/resources/assets/vue/components/paymentsBilling/elements/AdminPaymentsBillingWithSearchPollingComponent.vue new file mode 100644 index 00000000..120fc803 --- /dev/null +++ b/resources/assets/vue/components/paymentsBilling/elements/AdminPaymentsBillingWithSearchPollingComponent.vue @@ -0,0 +1,90 @@ + + diff --git a/resources/assets/vue/components/paymentsBilling/sections/AdminPaymentsBillingPollingSectionComponent.vue b/resources/assets/vue/components/paymentsBilling/sections/AdminPaymentsBillingPollingSectionComponent.vue new file mode 100644 index 00000000..25e4c303 --- /dev/null +++ b/resources/assets/vue/components/paymentsBilling/sections/AdminPaymentsBillingPollingSectionComponent.vue @@ -0,0 +1,141 @@ + + diff --git a/resources/views/pages/paymentAndBilling2.blade.php b/resources/views/pages/paymentAndBilling2.blade.php new file mode 100644 index 00000000..cf4f339f --- /dev/null +++ b/resources/views/pages/paymentAndBilling2.blade.php @@ -0,0 +1,8 @@ +@extends('layouts.base_portal') +@section('inner_content') +
+
+ +
+
+@endsection diff --git a/routes/web.php b/routes/web.php index 9e69dcc5..53c34711 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1247,4 +1247,9 @@ Route::get('fix-payment-status-updated-but-failed-update-invoice', function (Upd echo 'done fix ' . $invoice->owner->owner->reference . '
'; } } -}); \ No newline at end of file +}); + +//A page to monitor Experimental solution (Vue Polling) to solve an AWS API Gateway problem limitation for Laravel Vapor in the event of a emergency rollback to Google +Route::get('/payment-and-billing-2', function () { + return view('pages.paymentAndBilling2'); +})->name('admin.payment-and-billing-2');