location brought from model

This commit is contained in:
Cihan Şentürk
2021-09-03 12:53:35 +03:00
parent 414e405168
commit 6154ff31fd
10 changed files with 65 additions and 154 deletions

View File

@ -13,9 +13,9 @@
{{ company.address }}
</th>
</tr>
<tr v-if="company_data.locations">
<tr v-if="company.location">
<th class="text-right p-0">
{{ company_data.locations }}
{{ company.location }}
</th>
</tr>
<tr v-if="company.tax_number">
@ -60,18 +60,18 @@ import Form from './../plugins/form';
export default {
name: 'akaunting-company-edit',
components: {
[Select.name]: Select,
[Option.name]: Option,
[OptionGroup.name]: OptionGroup,
[ColorPicker.name]: ColorPicker,
AkauntingModalAddNew,
AkauntingModal,
AkauntingMoney,
AkauntingRadioGroup,
AkauntingSelect,
AkauntingDate,
},
components: {
[Select.name]: Select,
[Option.name]: Option,
[OptionGroup.name]: OptionGroup,
[ColorPicker.name]: ColorPicker,
AkauntingModalAddNew,
AkauntingModal,
AkauntingMoney,
AkauntingRadioGroup,
AkauntingSelect,
AkauntingDate,
},
props: {
buttonText: {
@ -94,9 +94,6 @@ export default {
default: {},
description: 'Company object'
},
countryText: {
type: [Array, Object],
},
companyForm: {
type: Object,
default: function () {
@ -120,7 +117,6 @@ export default {
buttons: this.companyForm.buttons,
},
company_html: '',
company_data: this.company,
};
},
@ -247,27 +243,5 @@ export default {
documentClasses.remove("modal-open");
},
},
created() {
let locations = [];
if (this.company.city) {
locations.push(this.company.city);
}
if (this.company.zip_code) {
locations.push(this.company.zip_code);
}
if (this.company.state) {
locations.push(this.company.state);
}
if (this.company.country) {
locations.push(this.countryText[this.company.country])
}
this.company.locations = locations.join(', ');
},
};
</script>