Code refactoring
This commit is contained in:
@ -26,7 +26,9 @@
|
||||
/>
|
||||
<p class="mb-0 mt--3">
|
||||
<small>
|
||||
<div v-html="translations.company.get_api_key"></div>
|
||||
<div><a href="https://akaunting.com/dashboard" target="_blank">Click here</a>
|
||||
to get your API key.
|
||||
</div>
|
||||
</small>
|
||||
</p>
|
||||
</div>
|
||||
@ -123,6 +125,10 @@ export default {
|
||||
translations: {
|
||||
type: [Object, Array],
|
||||
},
|
||||
url: {
|
||||
type: String,
|
||||
default: 'text'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -133,9 +139,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
let company_data = this.company;
|
||||
setTimeout(() => {
|
||||
this.dataWatch(company_data);
|
||||
}, 500);
|
||||
},
|
||||
watch: {
|
||||
company: function (company) {
|
||||
@ -159,6 +163,7 @@ export default {
|
||||
this.real_date = company.financial_start;
|
||||
}
|
||||
},
|
||||
|
||||
next() {
|
||||
if (this.active++ > 2);
|
||||
this.$router.push("/wizard/currencies");
|
||||
|
@ -300,9 +300,7 @@ import MixinsSpaGlobal from "./../../mixins/spa-global";
|
||||
|
||||
export default {
|
||||
name: "Currencies",
|
||||
|
||||
mixins: [MixinsGlobal, MixinsSpaGlobal],
|
||||
|
||||
components: {
|
||||
[Step.name]: Step,
|
||||
[Steps.name]: Steps,
|
||||
@ -310,7 +308,6 @@ export default {
|
||||
[Option.name]: Option,
|
||||
AkauntingRadioGroup,
|
||||
},
|
||||
|
||||
props: {
|
||||
currencies: {
|
||||
type: [Object, Array],
|
||||
|
@ -255,6 +255,7 @@ export default {
|
||||
this.onStatus(item.id, event);
|
||||
this.onStatusControl(this.taxes, item.id, event);
|
||||
},
|
||||
|
||||
handleClickDelete(item) {
|
||||
this.confirmDelete(
|
||||
`${
|
||||
@ -275,14 +276,17 @@ export default {
|
||||
this.translations.taxes.delete
|
||||
);
|
||||
},
|
||||
|
||||
next() {
|
||||
if (this.active++ > 2);
|
||||
this.$router.push("/wizard/finish");
|
||||
},
|
||||
|
||||
prev() {
|
||||
if (this.active-- > 2);
|
||||
this.$router.push("/wizard/currencies");
|
||||
},
|
||||
|
||||
onEditSave(item) {
|
||||
this.onEditEvent(
|
||||
"PATCH",
|
||||
@ -292,9 +296,11 @@ export default {
|
||||
item.id
|
||||
);
|
||||
},
|
||||
|
||||
onSubmitForm() {
|
||||
this.onSubmitEvent("POST", url + "/wizard/taxes", "type", this.taxes);
|
||||
},
|
||||
|
||||
deleteCurrency(event) {
|
||||
this.onDeleteEvent(event, this.taxes, event.tax_id);
|
||||
},
|
||||
|
Reference in New Issue
Block a user