From e31f1eda5355e5e403d1174977d9de2efe5fa146 Mon Sep 17 00:00:00 2001 From: edmondlang Date: Sun, 6 Aug 2023 23:16:20 +0800 Subject: [PATCH] fix code update customer prrofile --- .../ControllersLogic/UpdateCompanyProfileLogic.php | 4 ++-- .../Companies/UpdateCompanyProfileController.php | 1 - .../companies/elements/CompanyDetailsComponent.vue | 10 +++++++--- .../forms/EditCustomerProfileInfoFormComponent.vue | 7 ++++--- .../sections/CustomerProfileSectionComponent.vue | 2 +- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/app/Classes/Modules/Companies/ControllersLogic/UpdateCompanyProfileLogic.php b/app/Classes/Modules/Companies/ControllersLogic/UpdateCompanyProfileLogic.php index ddc4fd08..f9a1c91e 100644 --- a/app/Classes/Modules/Companies/ControllersLogic/UpdateCompanyProfileLogic.php +++ b/app/Classes/Modules/Companies/ControllersLogic/UpdateCompanyProfileLogic.php @@ -18,8 +18,8 @@ class UpdateCompanyProfileLogic extends AbstractControllerLogic */ protected function notification():array { return [ - 'title' => 'Update Company Account Profile', - 'message' => 'You have successfully updated the Company Account Profile' + 'title' => 'Update Company Details', + 'message' => 'You have successfully updated the Company Details' ]; } diff --git a/app/Http/Controllers/Companies/UpdateCompanyProfileController.php b/app/Http/Controllers/Companies/UpdateCompanyProfileController.php index 0ec9a688..088c6ffd 100644 --- a/app/Http/Controllers/Companies/UpdateCompanyProfileController.php +++ b/app/Http/Controllers/Companies/UpdateCompanyProfileController.php @@ -14,7 +14,6 @@ class UpdateCompanyProfileController * @return JsonResponse */ public function update(Request $request, UpdateCompanyProfileLogic $logic): JsonResponse { - dd("controller called"); return $logic->execute($request); } diff --git a/resources/assets/vue/components/companies/elements/CompanyDetailsComponent.vue b/resources/assets/vue/components/companies/elements/CompanyDetailsComponent.vue index 2d07c2ca..f8b27bd7 100644 --- a/resources/assets/vue/components/companies/elements/CompanyDetailsComponent.vue +++ b/resources/assets/vue/components/companies/elements/CompanyDetailsComponent.vue @@ -6,7 +6,7 @@
- +
@@ -67,7 +67,7 @@ - +
@@ -83,6 +83,10 @@ type:Object, required:true }, + section: { + type: String, + required: true + }, }, mounted(){ this.$root.$on('deleteAddressConfirm', (id) => { @@ -101,7 +105,7 @@ data(){ return { minWidth:{ - minWidth:'100px', + minWidth:'120px', }, minWidth150:{ minWidth:'150px', diff --git a/resources/assets/vue/components/companies/forms/EditCustomerProfileInfoFormComponent.vue b/resources/assets/vue/components/companies/forms/EditCustomerProfileInfoFormComponent.vue index 11447285..6f5d04ff 100644 --- a/resources/assets/vue/components/companies/forms/EditCustomerProfileInfoFormComponent.vue +++ b/resources/assets/vue/components/companies/forms/EditCustomerProfileInfoFormComponent.vue @@ -53,7 +53,7 @@ data: { type: Object, default: null - } + }, }, created() { if(this.data){ @@ -77,7 +77,7 @@ required, }, email: { - required, + // required, }, phone: { required, @@ -86,8 +86,9 @@ }, methods: { submitForm(){ - this.submit(route('api.company.profile.update', this.data.id), 'put', '', false, false); + this.submit(route('api.company.profile.update', this.data.id), 'put', this.section, true, true); }, }, + mixins: [modalFormHandler] } \ No newline at end of file diff --git a/resources/assets/vue/components/companies/sections/CustomerProfileSectionComponent.vue b/resources/assets/vue/components/companies/sections/CustomerProfileSectionComponent.vue index c8a07bf9..bd646426 100644 --- a/resources/assets/vue/components/companies/sections/CustomerProfileSectionComponent.vue +++ b/resources/assets/vue/components/companies/sections/CustomerProfileSectionComponent.vue @@ -122,7 +122,7 @@
- +