styling..
This commit is contained in:
		| @@ -115,129 +115,140 @@ import AkauntingDate from "./../../components/AkauntingDate"; | ||||
| 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, | ||||
|       logo: [], | ||||
|       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 = [ | ||||
|           { | ||||
|             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; | ||||
|       } | ||||
|     name: "Company", | ||||
|  | ||||
|     mixins: [WizardAction], | ||||
|  | ||||
|     components: { | ||||
|         [Step.name]: Step, | ||||
|         [Steps.name]: Steps, | ||||
|         AkauntingDropzoneFileUpload, | ||||
|         AkauntingDate, | ||||
|     }, | ||||
|  | ||||
|     onEditSave() { | ||||
|       FormData.prototype.appendRecursive = function (data, wrapper = null) { | ||||
|         for (var name in data) { | ||||
|           if (name == "previewElement" || name == "previewTemplate") { | ||||
|             continue; | ||||
|           } | ||||
|           if (wrapper) { | ||||
|             if ( | ||||
|               (typeof data[name] == "object" || Array.isArray(data[name])) && | ||||
|               data[name] instanceof File != true && | ||||
|               data[name] instanceof Blob != true | ||||
|             ) { | ||||
|               this.appendRecursive(data[name], wrapper + "[" + name + "]"); | ||||
|             } else { | ||||
|               this.append(wrapper + "[" + name + "]", data[name]); | ||||
|             } | ||||
|           } else { | ||||
|             if ( | ||||
|               (typeof data[name] == "object" || Array.isArray(data[name])) && | ||||
|               data[name] instanceof File != true && | ||||
|               data[name] instanceof Blob != true | ||||
|             ) { | ||||
|               this.appendRecursive(data[name], name); | ||||
|             } else { | ||||
|               this.append(name, data[name]); | ||||
|             } | ||||
|           } | ||||
|         } | ||||
|       }; | ||||
|     props: { | ||||
|         company: { | ||||
|             type: [Object, Array], | ||||
|         }, | ||||
|  | ||||
|       const formData = new FormData(this.$refs["form"]); | ||||
|       let data_name = {}; | ||||
|         translations: { | ||||
|             type: [Object, Array], | ||||
|         }, | ||||
|  | ||||
|         url: { | ||||
|             type: String, | ||||
|             default: "text", | ||||
|         }, | ||||
|     }, | ||||
|  | ||||
|     data() { | ||||
|         return { | ||||
|             active: 0, | ||||
|             logo: [], | ||||
|             real_date: "", | ||||
|         }; | ||||
|     }, | ||||
|  | ||||
|     mounted() { | ||||
|         let company_data = this.company; | ||||
|  | ||||
|         this.onDataWatch(company_data); | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|         onDataWatch(company) { | ||||
|             if (Object.keys(company).length) { | ||||
|                 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; | ||||
|             } | ||||
|         }, | ||||
|  | ||||
|         onEditSave() { | ||||
|             FormData.prototype.appendRecursive = function (data, wrapper = null) { | ||||
|                 for (var name in data) { | ||||
|                     if (name == "previewElement" || name == "previewTemplate") { | ||||
|                         continue; | ||||
|                     } | ||||
|  | ||||
|                     if (wrapper) { | ||||
|                         if ( | ||||
|                         (typeof data[name] == "object" || Array.isArray(data[name])) && | ||||
|                         data[name] instanceof File != true && | ||||
|                         data[name] instanceof Blob != true | ||||
|                         ) { | ||||
|                             this.appendRecursive(data[name], wrapper + "[" + name + "]"); | ||||
|                         } else { | ||||
|                             this.append(wrapper + "[" + name + "]", data[name]); | ||||
|                         } | ||||
|                     } else { | ||||
|                         if ( | ||||
|                         (typeof data[name] == "object" || Array.isArray(data[name])) && | ||||
|                         data[name] instanceof File != true && | ||||
|                         data[name] instanceof Blob != true | ||||
|                         ) { | ||||
|                             this.appendRecursive(data[name], name); | ||||
|                         } else { | ||||
|                             this.append(name, data[name]); | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
|             }; | ||||
|  | ||||
|             const formData = new FormData(this.$refs["form"]); | ||||
|  | ||||
|             let data_name = {}; | ||||
|        | ||||
|       for (let [key, val] of formData.entries()) { | ||||
|         Object.assign(data_name, { | ||||
|           [key]: val, | ||||
|           ["logo"]: this.$refs.dropzoneWizard.files[1] | ||||
|             ? this.$refs.dropzoneWizard.files[1] | ||||
|             : this.$refs.dropzoneWizard.files[0], | ||||
|           ["_prefix"]: "company", | ||||
|           ["_token"]: window.Laravel.csrfToken, | ||||
|           ["_method"]: "POST", | ||||
|         }); | ||||
|       } | ||||
|             for (let [key, val] of formData.entries()) { | ||||
|                 Object.assign(data_name, { | ||||
|                     [key]: val, | ||||
|                     ["logo"]: this.$refs.dropzoneWizard.files[1] | ||||
|                         ? this.$refs.dropzoneWizard.files[1] | ||||
|                         : this.$refs.dropzoneWizard.files[0], | ||||
|                     ["_prefix"]: "company", | ||||
|                     ["_token"]: window.Laravel.csrfToken, | ||||
|                     ["_method"]: "POST", | ||||
|                 }); | ||||
|             } | ||||
|  | ||||
|       formData.appendRecursive(data_name); | ||||
|       window | ||||
|         .axios({ | ||||
|           method: "POST", | ||||
|           url: url + "/wizard/companies", | ||||
|           data: formData, | ||||
|           headers: { | ||||
|             "X-CSRF-TOKEN": window.Laravel.csrfToken, | ||||
|             "X-Requested-With": "XMLHttpRequest", | ||||
|             "Content-Type": "multipart/form-data", | ||||
|           }, | ||||
|         }) | ||||
|         .then((response) => { | ||||
|           this.onSuccessMessage(response); | ||||
|           this.$router.push("/wizard/currencies"); | ||||
|         }, this) | ||||
|         .catch((error) => { | ||||
|         }, this); | ||||
|             formData.appendRecursive(data_name); | ||||
|  | ||||
|             window.axios({ | ||||
|                 method: "POST", | ||||
|                 url: url + "/wizard/companies", | ||||
|                 data: formData, | ||||
|                 headers: { | ||||
|                     "X-CSRF-TOKEN": window.Laravel.csrfToken, | ||||
|                     "X-Requested-With": "XMLHttpRequest", | ||||
|                     "Content-Type": "multipart/form-data", | ||||
|                 }, | ||||
|             }) | ||||
|             .then((response) => { | ||||
|                 this.onSuccessMessage(response); | ||||
|                 this.$router.push("/wizard/currencies"); | ||||
|             }, this) | ||||
|             .catch((error) => { | ||||
|             }, this); | ||||
|         }, | ||||
|  | ||||
|         next() { | ||||
|             if (this.active++ > 2); | ||||
|             this.$router.push("/wizard/currencies"); | ||||
|         }, | ||||
|     }, | ||||
|  | ||||
|     next() { | ||||
|       if (this.active++ > 2); | ||||
|       this.$router.push("/wizard/currencies"); | ||||
|     watch: { | ||||
|         company: function (company) { | ||||
|             this.onDataWatch(company); | ||||
|         }, | ||||
|     }, | ||||
|   }, | ||||
| }; | ||||
| </script> | ||||
| @@ -299,124 +299,133 @@ import MixinsGlobal from "./../../mixins/global"; | ||||
| import WizardAction from "./../../mixins/wizardAction"; | ||||
|  | ||||
| export default { | ||||
|   name: "Currencies", | ||||
|   mixins: [MixinsGlobal, WizardAction], | ||||
|   components: { | ||||
|     [Step.name]: Step, | ||||
|     [Steps.name]: Steps, | ||||
|     [Select.name]: Select, | ||||
|     [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); | ||||
|     name: "Currencies", | ||||
|  | ||||
|     mixins: [MixinsGlobal, WizardAction], | ||||
|  | ||||
|     components: { | ||||
|         [Step.name]: Step, | ||||
|         [Steps.name]: Steps, | ||||
|         [Select.name]: Select, | ||||
|         [Option.name]: Option, | ||||
|         AkauntingRadioGroup, | ||||
|     }, | ||||
|  | ||||
|     onClickDelete(item) { | ||||
|       this.confirmDelete( | ||||
|         `${ | ||||
|           new URL(url).protocol + | ||||
|           "//" + | ||||
|           location.host + | ||||
|           location.pathname + | ||||
|           "/" + | ||||
|           item.id | ||||
|         }`, | ||||
|         this.translations.currencies.title, | ||||
|         `Confirm Delete <strong>${item.name}</strong> ${this.translations.currencies.title}?`, | ||||
|         this.translations.currencies.cancel, | ||||
|         this.translations.currencies.delete | ||||
|       ); | ||||
|     props: { | ||||
|         currencies: { | ||||
|             type: [Object, Array], | ||||
|         }, | ||||
|  | ||||
|         currency_codes: { | ||||
|             type: [Object, Array], | ||||
|         }, | ||||
|  | ||||
|         translations: { | ||||
|             type: [Object, Array], | ||||
|         }, | ||||
|     }, | ||||
|  | ||||
|     onDeleteCurrency(event) { | ||||
|       this.onEjetItem(event, this.currencies, event.currency_id); | ||||
|     data() { | ||||
|         return { | ||||
|             active: 1, | ||||
|             bulk_action: new BulkAction(url + "/settings/currencies"), | ||||
|         }; | ||||
|     }, | ||||
|  | ||||
|     onChangeCodeItem(code) { | ||||
|       const formData = new FormData(this.$refs["form"]); | ||||
|       const data = { | ||||
|         rate: "", | ||||
|         precision: "", | ||||
|         symbol: "", | ||||
|         symbol_first: "", | ||||
|         decimal_mark: "", | ||||
|         thousands_separator: "", | ||||
|       }; | ||||
|     methods: { | ||||
|         onSwitchUpdate(item) { | ||||
|             this.onStatus(item.id, event); | ||||
|  | ||||
|       for (let [key, val] of formData.entries()) { | ||||
|         Object.assign(data, { | ||||
|           [key]: val, | ||||
|         }); | ||||
|       } | ||||
|             this.onStatusControl(this.currencies, item.id, event); | ||||
|         }, | ||||
|  | ||||
|       window | ||||
|         .axios({ | ||||
|           method: "GET", | ||||
|           url: url + "/settings/currencies/config", | ||||
|           params: { | ||||
|             code: code, | ||||
|           }, | ||||
|         }) | ||||
|         .then((response) => { | ||||
|           data.rate = response.data.rate; | ||||
|           data.precision = response.data.precision; | ||||
|           data.symbol = response.data.symbol; | ||||
|           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); | ||||
|         onClickDelete(item) { | ||||
|             this.confirmDelete( | ||||
|                 `${ | ||||
|                   new URL(url).protocol + | ||||
|                   "//" + | ||||
|                   location.host + | ||||
|                   location.pathname + | ||||
|                   "/" + | ||||
|                   item.id | ||||
|                 }`, | ||||
|                 this.translations.currencies.title, | ||||
|                 `Confirm Delete <strong>${item.name}</strong> ${this.translations.currencies.title}?`, | ||||
|                 this.translations.currencies.cancel, | ||||
|                 this.translations.currencies.delete | ||||
|             ); | ||||
|         }, | ||||
|  | ||||
|         onDeleteCurrency(event) { | ||||
|             this.onEjetItem(event, this.currencies, event.currency_id); | ||||
|         }, | ||||
|  | ||||
|         onChangeCodeItem(code) { | ||||
|             const formData = new FormData(this.$refs["form"]); | ||||
|             const data = { | ||||
|                 rate: "", | ||||
|                 precision: "", | ||||
|                 symbol: "", | ||||
|                 symbol_first: "", | ||||
|                 decimal_mark: "", | ||||
|                 thousands_separator: "", | ||||
|             }; | ||||
|  | ||||
|             for (let [key, val] of formData.entries()) { | ||||
|                 Object.assign(data, { | ||||
|                     [key]: val, | ||||
|                 }); | ||||
|             } | ||||
|  | ||||
|             window.axios({ | ||||
|                 method: "GET", | ||||
|                 url: url + "/settings/currencies/config", | ||||
|                 params: { | ||||
|                     code: code, | ||||
|                 }, | ||||
|             }) | ||||
|             .then((response) => { | ||||
|                 data.rate = response.data.rate; | ||||
|                 data.precision = response.data.precision; | ||||
|                 data.symbol = response.data.symbol; | ||||
|                 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); | ||||
|         }, | ||||
|  | ||||
|         onEditForm(item) { | ||||
|             this.onSubmitEvent( | ||||
|                 "PATCH", | ||||
|                 url + "/wizard/currencies/" + item.id, | ||||
|                 "", | ||||
|                 this.currencies, | ||||
|                 item.id | ||||
|             ); | ||||
|         }, | ||||
|  | ||||
|         onSubmitForm() { | ||||
|             this.onSubmitEvent( | ||||
|                 "POST", | ||||
|                 url + "/wizard/currencies", | ||||
|                 "", | ||||
|                 this.currencies | ||||
|             ); | ||||
|         }, | ||||
|  | ||||
|         prev() { | ||||
|             if (this.active-- > 2); | ||||
|             history.back() | ||||
|  | ||||
|             this.$router.push("/wizard/companies"); | ||||
|         }, | ||||
|  | ||||
|         next() { | ||||
|             if (this.active++ > 2); | ||||
|             this.$router.push("/wizard/taxes"); | ||||
|         }, | ||||
|     }, | ||||
|  | ||||
|     onEditForm(item) { | ||||
|       this.onSubmitEvent( | ||||
|         "PATCH", | ||||
|         url + "/wizard/currencies/" + item.id, | ||||
|         "", | ||||
|         this.currencies, | ||||
|         item.id | ||||
|       ); | ||||
|     }, | ||||
|  | ||||
|     onSubmitForm() { | ||||
|       this.onSubmitEvent( | ||||
|         "POST", | ||||
|         url + "/wizard/currencies", | ||||
|         "", | ||||
|         this.currencies | ||||
|       ); | ||||
|     }, | ||||
|  | ||||
|     prev() { | ||||
|       if (this.active-- > 2); | ||||
|       history.back() | ||||
|       this.$router.push("/wizard/companies"); | ||||
|     }, | ||||
|  | ||||
|     next() { | ||||
|       if (this.active++ > 2); | ||||
|       this.$router.push("/wizard/taxes"); | ||||
|     }, | ||||
|   }, | ||||
| }; | ||||
| </script> | ||||
|   | ||||
| @@ -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"> | ||||
| @@ -87,57 +87,61 @@ | ||||
| import { Step, Steps } from "element-ui"; | ||||
|  | ||||
| export default { | ||||
|   name: "Finish", | ||||
|   components: { | ||||
|     [Step.name]: Step, | ||||
|     [Steps.name]: Steps, | ||||
|   }, | ||||
|   created() { | ||||
|     window | ||||
|       .axios({ | ||||
|         method: "PATCH", | ||||
|         url: url + "/wizard/finish", | ||||
|       }) | ||||
|       .then((response) => { | ||||
|         if (response.status == "200") { | ||||
|           this.is_loaded = true; | ||||
|     name: "Finish", | ||||
|  | ||||
|     components: { | ||||
|         [Step.name]: Step, | ||||
|         [Steps.name]: Steps, | ||||
|     }, | ||||
|  | ||||
|     props: { | ||||
|         modules: { | ||||
|             type: [Object, Array], | ||||
|         }, | ||||
|  | ||||
|         translations: { | ||||
|             type: [Object, Array], | ||||
|         } | ||||
|       }) | ||||
|       .catch((error) => { | ||||
|         this.$notify({ | ||||
|           message: this.translations.finish.error_message, | ||||
|           timeout: 1000, | ||||
|           icon: "fas fa-bell", | ||||
|           type: 0 | ||||
|     }, | ||||
|  | ||||
|     data() { | ||||
|         return { | ||||
|             active: 3, | ||||
|             route_url: url, | ||||
|         }; | ||||
|     }, | ||||
|  | ||||
|     created() { | ||||
|         window.axios({ | ||||
|             method: "PATCH", | ||||
|             url: url + "/wizard/finish", | ||||
|         }) | ||||
|         .then((response) => { | ||||
|         }) | ||||
|         .catch((error) => { | ||||
|             this.$notify({ | ||||
|                 message: this.translations.finish.error_message, | ||||
|                 timeout: 1000, | ||||
|                 icon: "fas fa-bell", | ||||
|                 type: 0 | ||||
|             }); | ||||
|  | ||||
|             this.prev(); | ||||
|         }); | ||||
|  | ||||
|         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.$router.push("/wizard/taxes"); | ||||
|     }, | ||||
|  | ||||
|     finish() { | ||||
|       window.location.href = url; | ||||
|     methods: { | ||||
|         prev() { | ||||
|             this.active--; | ||||
|  | ||||
|             if (this.active > 2) { | ||||
|                 this.$router.push("/wizard/taxes"); | ||||
|             } | ||||
|         }, | ||||
|  | ||||
|         finish() { | ||||
|             window.location.href = url; | ||||
|         }, | ||||
|     }, | ||||
|   }, | ||||
| }; | ||||
| </script> | ||||
|   | ||||
| @@ -229,82 +229,89 @@ import MixinsGlobal from "./../../mixins/global"; | ||||
| 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); | ||||
|     name: "Taxes", | ||||
|  | ||||
|     mixins: [MixinsGlobal, WizardAction], | ||||
|  | ||||
|     components: { | ||||
|         [Step.name]: Step, | ||||
|         [Steps.name]: Steps, | ||||
|         AkauntingRadioGroup, | ||||
|     }, | ||||
|  | ||||
|     onClickDelete(item) { | ||||
|       this.confirmDelete( | ||||
|         `${ | ||||
|           new URL(url).protocol + | ||||
|           "//" + | ||||
|           location.host + | ||||
|           location.pathname + | ||||
|           "/" + | ||||
|           item.id | ||||
|         }`, | ||||
|         this.translations.taxes.title, | ||||
|         `${ | ||||
|           this.translations.currencies.title + | ||||
|           " " + | ||||
|           this.translations.currencies.delete | ||||
|         } <strong>${item.name}</strong>?`, | ||||
|         this.translations.taxes.cancel, | ||||
|         this.translations.taxes.delete | ||||
|       ); | ||||
|     props: { | ||||
|         taxes: { | ||||
|             type: [Object, Array], | ||||
|         }, | ||||
|  | ||||
|         translations: { | ||||
|             type: [Object, Array], | ||||
|         }, | ||||
|     }, | ||||
|  | ||||
|     onDeleteCurrency(event) { | ||||
|       this.onEjetItem(event, this.taxes, event.tax_id); | ||||
|     data() { | ||||
|         return { | ||||
|             active: 2, | ||||
|             bulk_action: new BulkAction(url + "/settings/taxes"), | ||||
|         }; | ||||
|     }, | ||||
|  | ||||
|      onEditForm(item) { | ||||
|       this.onSubmitEvent( | ||||
|         "PATCH", | ||||
|         url + "/wizard/taxes/" + item.id, | ||||
|         "type", | ||||
|         this.taxes, | ||||
|         item.id | ||||
|       ); | ||||
|     }, | ||||
|     methods: { | ||||
|         onSwitchUpdate(item) { | ||||
|             this.onStatus(item.id, event); | ||||
|  | ||||
|     onSubmitForm() { | ||||
|       this.onSubmitEvent("POST", url + "/wizard/taxes", "type", this.taxes); | ||||
|     }, | ||||
|             this.onStatusControl(this.taxes, item.id, event); | ||||
|         }, | ||||
|  | ||||
|     prev() { | ||||
|       if (this.active-- > 2); | ||||
|       this.$router.push("/wizard/currencies"); | ||||
|     }, | ||||
|         onClickDelete(item) { | ||||
|             this.confirmDelete( | ||||
|                 `${ | ||||
|                   new URL(url).protocol + | ||||
|                   "//" + | ||||
|                   location.host + | ||||
|                   location.pathname + | ||||
|                   "/" + | ||||
|                   item.id | ||||
|                 }`, | ||||
|                 this.translations.taxes.title, | ||||
|                 `${ | ||||
|                   this.translations.currencies.title + | ||||
|                   " " + | ||||
|                   this.translations.currencies.delete | ||||
|                 } <strong>${item.name}</strong>?`, | ||||
|                 this.translations.taxes.cancel, | ||||
|                 this.translations.taxes.delete | ||||
|             ); | ||||
|         }, | ||||
|  | ||||
|     next() { | ||||
|       if (this.active++ > 2); | ||||
|       this.$router.push("/wizard/finish"); | ||||
|         onDeleteCurrency(event) { | ||||
|             this.onEjetItem(event, this.taxes, event.tax_id); | ||||
|         }, | ||||
|  | ||||
|         onEditForm(item) { | ||||
|             this.onSubmitEvent( | ||||
|                 "PATCH", | ||||
|                 url + "/wizard/taxes/" + item.id, | ||||
|                 "type", | ||||
|                 this.taxes, | ||||
|                 item.id | ||||
|             ); | ||||
|         }, | ||||
|  | ||||
|         onSubmitForm() { | ||||
|             this.onSubmitEvent("POST", url + "/wizard/taxes", "type", this.taxes); | ||||
|         }, | ||||
|  | ||||
|         prev() { | ||||
|             if (this.active-- > 2); | ||||
|             this.$router.push("/wizard/currencies"); | ||||
|         }, | ||||
|  | ||||
|         next() { | ||||
|             if (this.active++ > 2); | ||||
|             this.$router.push("/wizard/finish"); | ||||
|         }, | ||||
|     }, | ||||
|   }, | ||||
| }; | ||||
| </script> | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user