From 43491223abbec2f73f42b0c59771e656b3f5be31 Mon Sep 17 00:00:00 2001 From: edmondlang Date: Sun, 31 Jul 2022 21:38:15 +0800 Subject: [PATCH] customer payment ui inside orders --- .../sections/OrderProfileSectionComponent.vue | 17 ++ .../AdminPaymentsBillingComponent.vue | 1 + .../CustomerPaymentsBillingComponent.vue | 178 ++++++++++++++++++ .../forms/PaymentFormComponent.vue | 6 +- 4 files changed, 200 insertions(+), 2 deletions(-) create mode 100644 resources/assets/vue/components/paymentsBilling/elements/CustomerPaymentsBillingComponent.vue diff --git a/resources/assets/vue/components/orders/sections/OrderProfileSectionComponent.vue b/resources/assets/vue/components/orders/sections/OrderProfileSectionComponent.vue index a0880e40..0b48c640 100644 --- a/resources/assets/vue/components/orders/sections/OrderProfileSectionComponent.vue +++ b/resources/assets/vue/components/orders/sections/OrderProfileSectionComponent.vue @@ -134,6 +134,23 @@ + +
+
+
+
+

Invoices

+

You can view your invoices here and make payment.

+
+
+
+
+ +
+
+
+
+
diff --git a/resources/assets/vue/components/paymentsBilling/elements/AdminPaymentsBillingComponent.vue b/resources/assets/vue/components/paymentsBilling/elements/AdminPaymentsBillingComponent.vue index 535ecfdc..8813d9ed 100644 --- a/resources/assets/vue/components/paymentsBilling/elements/AdminPaymentsBillingComponent.vue +++ b/resources/assets/vue/components/paymentsBilling/elements/AdminPaymentsBillingComponent.vue @@ -193,6 +193,7 @@
+
Make Payment
diff --git a/resources/assets/vue/components/paymentsBilling/elements/CustomerPaymentsBillingComponent.vue b/resources/assets/vue/components/paymentsBilling/elements/CustomerPaymentsBillingComponent.vue new file mode 100644 index 00000000..6573fdca --- /dev/null +++ b/resources/assets/vue/components/paymentsBilling/elements/CustomerPaymentsBillingComponent.vue @@ -0,0 +1,178 @@ + + diff --git a/resources/assets/vue/components/paymentsBilling/forms/PaymentFormComponent.vue b/resources/assets/vue/components/paymentsBilling/forms/PaymentFormComponent.vue index 0dee1870..79a67683 100644 --- a/resources/assets/vue/components/paymentsBilling/forms/PaymentFormComponent.vue +++ b/resources/assets/vue/components/paymentsBilling/forms/PaymentFormComponent.vue @@ -110,8 +110,10 @@ this.error = ''; }, successHandler(response){ - if (response.payload.data.payment_method === 5) { - window.location.href = this.route('billplz.bill', response.payload.data.payment_reference) + '?auto_submit=true'; + if (response.payload) { + if (response.payloaddata.payment_method === 5) { + window.location.href = this.route('billplz.bill', response.payload.data.payment_reference) + '?auto_submit=true'; + } } } },