fix code update customer prrofile

This commit is contained in:
edmondlang
2023-08-06 23:16:20 +08:00
parent f4e045df5c
commit e31f1eda53
5 changed files with 14 additions and 10 deletions
@@ -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'
];
}
@@ -14,7 +14,6 @@ class UpdateCompanyProfileController
* @return JsonResponse
*/
public function update(Request $request, UpdateCompanyProfileLogic $logic): JsonResponse {
dd("controller called");
return $logic->execute($request);
}
@@ -6,7 +6,7 @@
<label>{{this.company_details.reference ? this.company_details.reference : ""}}</label>
</div>
<div class="col-12 p-0">
<label :style="minWidth">Business Type</label>
<label :style="minWidth">Company Type</label>
<label>{{this.company_details.business_type ? getBusinessTypeDesc(this.company_details.business_type) : ""}}</label>
</div>
<div class="col-12 p-0">
@@ -67,7 +67,7 @@
<address-modal-component section="deleteAddressModal" :address_id="this.address_id"></address-modal-component>
</modal-component>
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="editProfileInfo">
<edit-customer-profile-info-form-component :data="this.company_details" section="editCustomerProfileModal" v-if="this.company_details.id"></edit-customer-profile-info-form-component>
<edit-customer-profile-info-form-component :data="this.company_details" :section="section" v-if="this.company_details.id"></edit-customer-profile-info-form-component>
</modal-component>
</div>
@@ -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',
@@ -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]
}
</script>
@@ -122,7 +122,7 @@
<div class="col">
<div class="row">
<div class="col">
<company-details-component :company_details="company_details" section="customerProfileSection"></company-details-component>
<company-details-component :company_details="company" section="customerProfileSection"></company-details-component>
</div>
</div>
</div>