From d076892176c4e71b4173e73a87a38ea3d4cefeb8 Mon Sep 17 00:00:00 2001 From: edmondlang Date: Wed, 9 Apr 2025 17:21:52 +0800 Subject: [PATCH 1/2] invoice date in the order payment section is wrong. It should be created_at date --- .../elements/CustomerPaymentsBillingComponent.vue | 2 +- .../elements/CustomerPaymentsBillingWithStorageComponent.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/assets/vue/components/paymentsBilling/elements/CustomerPaymentsBillingComponent.vue b/resources/assets/vue/components/paymentsBilling/elements/CustomerPaymentsBillingComponent.vue index 39893e3b..0b637d97 100644 --- a/resources/assets/vue/components/paymentsBilling/elements/CustomerPaymentsBillingComponent.vue +++ b/resources/assets/vue/components/paymentsBilling/elements/CustomerPaymentsBillingComponent.vue @@ -6,7 +6,7 @@

Invoice Date

-
{{ item.updated_at }}
+
{{ item.created_at }}

Status

diff --git a/resources/assets/vue/components/paymentsBilling/elements/CustomerPaymentsBillingWithStorageComponent.vue b/resources/assets/vue/components/paymentsBilling/elements/CustomerPaymentsBillingWithStorageComponent.vue index ce2f0c42..720a690d 100644 --- a/resources/assets/vue/components/paymentsBilling/elements/CustomerPaymentsBillingWithStorageComponent.vue +++ b/resources/assets/vue/components/paymentsBilling/elements/CustomerPaymentsBillingWithStorageComponent.vue @@ -6,7 +6,7 @@

Invoice Date

-
{{ item.updated_at }}
+
{{ item.created_at }}

Status

From c0e60e5d3b9f6353d36a5a264844122a7608f66e Mon Sep 17 00:00:00 2001 From: Edmondlang Date: Tue, 15 Apr 2025 19:24:11 +0800 Subject: [PATCH 2/2] add function to change mobile no --- .../UpdateCompanyContactNumberLogic.php | 67 +++++++++++++++++++ .../UpdateCompanyContactNumberController.php | 21 ++++++ .../elements/CustomerProfileComponent.vue | 10 ++- ...angeCustomerContactNumberFormComponent.vue | 56 ++++++++++++++++ routes/company.php | 1 + 5 files changed, 154 insertions(+), 1 deletion(-) create mode 100644 app/Classes/Modules/Companies/ControllersLogic/UpdateCompanyContactNumberLogic.php create mode 100644 app/Http/Controllers/Companies/UpdateCompanyContactNumberController.php create mode 100644 resources/assets/vue/components/orders/forms/ChangeCustomerContactNumberFormComponent.vue diff --git a/app/Classes/Modules/Companies/ControllersLogic/UpdateCompanyContactNumberLogic.php b/app/Classes/Modules/Companies/ControllersLogic/UpdateCompanyContactNumberLogic.php new file mode 100644 index 00000000..1a3ec283 --- /dev/null +++ b/app/Classes/Modules/Companies/ControllersLogic/UpdateCompanyContactNumberLogic.php @@ -0,0 +1,67 @@ + 'Updated Company Contact Number', + 'message' => 'You have successfully updated the Company Contact Number' + ]; + } + + /** @var FetchesContact */ + private $fetchesContact; + + /** @var UpdatesContact */ + private $updatesContact; + + /** + * UpdateCompanyControllersLogic constructor. + * @param FetchesContact $fetchesContact + * @param UpdatesContact $updatesContact + */ + public function __construct(FetchesContact $fetchesContact, UpdatesContact $updatesContact) + { + $this->fetchesContact = $fetchesContact; + $this->updatesContact = $updatesContact; + } + + /** + * @param Request $request + * @return JsonResponse + * @throws ErrorException + */ + public function logic(Request $request) : JsonResponse + { + $query = $this->fetchesContact->execute(['id' => $request->input('id')]); + + $contact = new ContactObject( + $query->first()->reference, + $request->input('contactNumber'), + $query->first()->email, + $query->first()->wechat_id + ); + + $this->updatesContact->execute($query, $contact); + + return $this->resourceResponse(new ContactResource($query)); + + } + +} diff --git a/app/Http/Controllers/Companies/UpdateCompanyContactNumberController.php b/app/Http/Controllers/Companies/UpdateCompanyContactNumberController.php new file mode 100644 index 00000000..e7920b8e --- /dev/null +++ b/app/Http/Controllers/Companies/UpdateCompanyContactNumberController.php @@ -0,0 +1,21 @@ +execute($request); + } +} diff --git a/resources/assets/vue/components/companies/elements/CustomerProfileComponent.vue b/resources/assets/vue/components/companies/elements/CustomerProfileComponent.vue index 0bf4edba..f99262b9 100644 --- a/resources/assets/vue/components/companies/elements/CustomerProfileComponent.vue +++ b/resources/assets/vue/components/companies/elements/CustomerProfileComponent.vue @@ -118,7 +118,15 @@
Contact Number
-
{{item.contact.phone}}
+ + + +
+ {{item.contact.phone}} +
+ +
+