From 9fce0efaeb497bf9eeef057d1adf64ef864fd76e Mon Sep 17 00:00:00 2001 From: JiaSheng Date: Sun, 22 Oct 2023 11:00:44 +0800 Subject: [PATCH] unhide some parcel, packing list and package information --- app/Http/Resources/TransactionResource.php | 4 + .../orders/elements/PackageComponent.vue | 6 +- .../orders/elements/ParcelComponent.vue | 4 +- .../CustomerPaymentsBillingComponent.vue | 86 +++++++++++-------- .../elements/PaymentsBillingComponents.vue | 2 + 5 files changed, 60 insertions(+), 42 deletions(-) diff --git a/app/Http/Resources/TransactionResource.php b/app/Http/Resources/TransactionResource.php index 74fa69ad..0da7bccb 100644 --- a/app/Http/Resources/TransactionResource.php +++ b/app/Http/Resources/TransactionResource.php @@ -24,11 +24,14 @@ class TransactionResource extends JsonResource { $order = null; $groupTransactions = null; + $packingListReference = null; if ($this->owner instanceof Transaction) { $order = new OrderResource($this->owner->owner->owner); + $packingListReference = $this->owner->owner->reference; } else if (!($this->owner instanceof Transaction) && !($this->owner instanceof Wallet)) { $order = new OrderResource($this->owner->owner); + $packingListReference = $this->owner->reference; } else { $group = Group::where('reference', $this->payment_reference)->first(); if ($group) { @@ -41,6 +44,7 @@ class TransactionResource extends JsonResource 'id' => $this->id, 'owner_type' => $this->owner_type, 'order' => $order, + 'packing_list_reference' => $packingListReference, 'group_transactions' => $groupTransactions, 'group_reference' => $groupTransactions ? $group->reference : null, 'documents' => $groupTransactions ? DocumentResource::collection($this->documents->where('status', ApprovalStatus::PENDING_VERIFICATION)) : DocumentResource::collection($this->documents), diff --git a/resources/assets/vue/components/orders/elements/PackageComponent.vue b/resources/assets/vue/components/orders/elements/PackageComponent.vue index 92cc77c9..62b60567 100644 --- a/resources/assets/vue/components/orders/elements/PackageComponent.vue +++ b/resources/assets/vue/components/orders/elements/PackageComponent.vue @@ -19,7 +19,7 @@

{{item.description}}

-
+

Reference

{{item.reference}}

@@ -58,7 +58,7 @@ Status

{{item.container ? item.container.transport.schedule_complete && status === 'Shipping' ? 'Custom Clearance' : status : status}}

-
+
Container

{{item.container ? item.container.container_reference : '-'}}

@@ -66,7 +66,7 @@
Warehouse -
{{item.order.warehouse.name}} {{$store.getters.isAdmin ? item.order.warehouse.reference : ''}}
+
{{item.order.warehouse.name}} {{ item.order.warehouse.reference }}
Delivery Address diff --git a/resources/assets/vue/components/orders/elements/ParcelComponent.vue b/resources/assets/vue/components/orders/elements/ParcelComponent.vue index cef41560..ef992380 100644 --- a/resources/assets/vue/components/orders/elements/ParcelComponent.vue +++ b/resources/assets/vue/components/orders/elements/ParcelComponent.vue @@ -30,7 +30,7 @@

Est. CBM

{{((parseFloat(item.cbm) * 1000) / 1000).toFixed(3)}}

-
+

Warehouse

{{item.order.warehouse.reference}}

Unclaimed @@ -75,7 +75,7 @@

{{item.order.company_module.marking}}

-
+

Reference

diff --git a/resources/assets/vue/components/paymentsBilling/elements/CustomerPaymentsBillingComponent.vue b/resources/assets/vue/components/paymentsBilling/elements/CustomerPaymentsBillingComponent.vue index f64b006c..4d809f2f 100644 --- a/resources/assets/vue/components/paymentsBilling/elements/CustomerPaymentsBillingComponent.vue +++ b/resources/assets/vue/components/paymentsBilling/elements/CustomerPaymentsBillingComponent.vue @@ -4,11 +4,19 @@
+
+

Invoice No

+
{{ item.bill_no }}
+
+
+

Reference

+
{{ item.packing_list_reference }}
+

Invoice Date

{{ item.updated_at }}
-
+

Status

Payment Completed
Dispute in progress
@@ -19,7 +27,7 @@

Amount

MYR {{ item.amount.toFixed(2) }}
-
+

Billing Question

{{ latestComment.content }} @@ -31,49 +39,53 @@
-
+ +
+
+
+
+ Billing Question? +
+ + + +
+
+ + + +
+
+
+ +
+
+
+ + + + + + +
+
+
+ {{ expanded ? 'Cancel' : 'Make Payment' }}
-
- -
-
-
- - - - - - -
-
-
- {{ expanded ? 'Cancel' : 'Make Payment' }}
diff --git a/resources/assets/vue/components/paymentsBilling/elements/PaymentsBillingComponents.vue b/resources/assets/vue/components/paymentsBilling/elements/PaymentsBillingComponents.vue index 1bbc1253..cbc564af 100644 --- a/resources/assets/vue/components/paymentsBilling/elements/PaymentsBillingComponents.vue +++ b/resources/assets/vue/components/paymentsBilling/elements/PaymentsBillingComponents.vue @@ -10,6 +10,8 @@

Invoice No

{{ item.bill_no }}
+

Reference

+
{{ item.packing_list_reference }}

Order