styling..
This commit is contained in:
parent
1d3cbadcb5
commit
03fce57394
@ -116,25 +116,31 @@ import WizardAction from "./../../mixins/wizardAction";
|
||||
|
||||
export default {
|
||||
name: "Company",
|
||||
|
||||
mixins: [WizardAction],
|
||||
|
||||
components: {
|
||||
[Step.name]: Step,
|
||||
[Steps.name]: Steps,
|
||||
AkauntingDropzoneFileUpload,
|
||||
AkauntingDate,
|
||||
},
|
||||
|
||||
props: {
|
||||
company: {
|
||||
type: [Object, Array],
|
||||
},
|
||||
|
||||
translations: {
|
||||
type: [Object, Array],
|
||||
},
|
||||
|
||||
url: {
|
||||
type: String,
|
||||
default: "text",
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
active: 0,
|
||||
@ -142,28 +148,25 @@ export default {
|
||||
real_date: "",
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
let company_data = this.company;
|
||||
|
||||
this.onDataWatch(company_data);
|
||||
},
|
||||
watch: {
|
||||
company: function (company) {
|
||||
this.onDataWatch(company);
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
onDataWatch(company) {
|
||||
if (Object.keys(company).length) {
|
||||
let logo_arr = [
|
||||
{
|
||||
let logo_arr = [{
|
||||
id: company.logo.id,
|
||||
name: company.logo.filename + "." + company.logo.extension,
|
||||
path: company.logo.path,
|
||||
type: company.logo.mime_type,
|
||||
size: company.logo.size,
|
||||
downloadPath: false,
|
||||
},
|
||||
];
|
||||
}];
|
||||
|
||||
this.logo.push(logo_arr);
|
||||
this.real_date = company.financial_start;
|
||||
}
|
||||
@ -175,6 +178,7 @@ export default {
|
||||
if (name == "previewElement" || name == "previewTemplate") {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (wrapper) {
|
||||
if (
|
||||
(typeof data[name] == "object" || Array.isArray(data[name])) &&
|
||||
@ -200,6 +204,7 @@ export default {
|
||||
};
|
||||
|
||||
const formData = new FormData(this.$refs["form"]);
|
||||
|
||||
let data_name = {};
|
||||
|
||||
for (let [key, val] of formData.entries()) {
|
||||
@ -215,8 +220,8 @@ export default {
|
||||
}
|
||||
|
||||
formData.appendRecursive(data_name);
|
||||
window
|
||||
.axios({
|
||||
|
||||
window.axios({
|
||||
method: "POST",
|
||||
url: url + "/wizard/companies",
|
||||
data: formData,
|
||||
@ -239,5 +244,11 @@ export default {
|
||||
this.$router.push("/wizard/currencies");
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
company: function (company) {
|
||||
this.onDataWatch(company);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
@ -300,7 +300,9 @@ import WizardAction from "./../../mixins/wizardAction";
|
||||
|
||||
export default {
|
||||
name: "Currencies",
|
||||
|
||||
mixins: [MixinsGlobal, WizardAction],
|
||||
|
||||
components: {
|
||||
[Step.name]: Step,
|
||||
[Steps.name]: Steps,
|
||||
@ -308,26 +310,32 @@ export default {
|
||||
[Option.name]: Option,
|
||||
AkauntingRadioGroup,
|
||||
},
|
||||
|
||||
props: {
|
||||
currencies: {
|
||||
type: [Object, Array],
|
||||
},
|
||||
|
||||
currency_codes: {
|
||||
type: [Object, Array],
|
||||
},
|
||||
|
||||
translations: {
|
||||
type: [Object, Array],
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
active: 1,
|
||||
bulk_action: new BulkAction(url + "/settings/currencies"),
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
onSwitchUpdate(item) {
|
||||
this.onStatus(item.id, event);
|
||||
|
||||
this.onStatusControl(this.currencies, item.id, event);
|
||||
},
|
||||
|
||||
@ -369,8 +377,7 @@ export default {
|
||||
});
|
||||
}
|
||||
|
||||
window
|
||||
.axios({
|
||||
window.axios({
|
||||
method: "GET",
|
||||
url: url + "/settings/currencies/config",
|
||||
params: {
|
||||
@ -384,6 +391,7 @@ export default {
|
||||
data.symbol_first = response.data.symbol_first;
|
||||
data.decimal_mark = response.data.decimal_mark;
|
||||
data.thousands_separator = response.data.thousands_separator;
|
||||
|
||||
this.model.rate = response.data.rate;
|
||||
}, this);
|
||||
},
|
||||
@ -410,6 +418,7 @@ export default {
|
||||
prev() {
|
||||
if (this.active-- > 2);
|
||||
history.back()
|
||||
|
||||
this.$router.push("/wizard/companies");
|
||||
},
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div v-if="is_loaded">
|
||||
<div>
|
||||
<h1 class="text-white">{{ translations.finish.title }}</h1>
|
||||
<div class="card">
|
||||
<div class="card-header wizard-header p-3">
|
||||
@ -88,20 +88,35 @@ import { Step, Steps } from "element-ui";
|
||||
|
||||
export default {
|
||||
name: "Finish",
|
||||
|
||||
components: {
|
||||
[Step.name]: Step,
|
||||
[Steps.name]: Steps,
|
||||
},
|
||||
|
||||
props: {
|
||||
modules: {
|
||||
type: [Object, Array],
|
||||
},
|
||||
|
||||
translations: {
|
||||
type: [Object, Array],
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
active: 3,
|
||||
route_url: url,
|
||||
};
|
||||
},
|
||||
|
||||
created() {
|
||||
window
|
||||
.axios({
|
||||
window.axios({
|
||||
method: "PATCH",
|
||||
url: url + "/wizard/finish",
|
||||
})
|
||||
.then((response) => {
|
||||
if (response.status == "200") {
|
||||
this.is_loaded = true;
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$notify({
|
||||
@ -114,25 +129,14 @@ export default {
|
||||
this.prev();
|
||||
});
|
||||
},
|
||||
props: {
|
||||
modules: {
|
||||
type: [Object, Array],
|
||||
},
|
||||
translations: {
|
||||
type: [Object, Array],
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
active: 3,
|
||||
route_url: url,
|
||||
is_loaded: false
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
prev() {
|
||||
if (this.active-- > 2);
|
||||
this.active--;
|
||||
|
||||
if (this.active > 2) {
|
||||
this.$router.push("/wizard/taxes");
|
||||
}
|
||||
},
|
||||
|
||||
finish() {
|
||||
|
@ -230,29 +230,36 @@ import WizardAction from "./../../mixins/wizardAction";
|
||||
|
||||
export default {
|
||||
name: "Taxes",
|
||||
|
||||
mixins: [MixinsGlobal, WizardAction],
|
||||
|
||||
components: {
|
||||
[Step.name]: Step,
|
||||
[Steps.name]: Steps,
|
||||
AkauntingRadioGroup,
|
||||
},
|
||||
|
||||
props: {
|
||||
taxes: {
|
||||
type: [Object, Array],
|
||||
},
|
||||
|
||||
translations: {
|
||||
type: [Object, Array],
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
active: 2,
|
||||
bulk_action: new BulkAction(url + "/settings/taxes"),
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
onSwitchUpdate(item) {
|
||||
this.onStatus(item.id, event);
|
||||
|
||||
this.onStatusControl(this.taxes, item.id, event);
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user