Unusage codes and files ejected
This commit is contained in:
		| @@ -112,7 +112,7 @@ | ||||
| import { Step, Steps } from "element-ui"; | ||||
| import AkauntingDropzoneFileUpload from "./../../components/AkauntingDropzoneFileUpload"; | ||||
| import AkauntingDate from "./../../components/AkauntingDate"; | ||||
| import WizardAction from "./wizardAction"; | ||||
| import WizardAction from "./../../mixins/wizardAction"; | ||||
|  | ||||
| export default { | ||||
|   name: "Company", | ||||
|   | ||||
| @@ -296,7 +296,7 @@ import { Step, Steps, Select, Option } from "element-ui"; | ||||
| import AkauntingRadioGroup from "./../../components/forms/AkauntingRadioGroup"; | ||||
| import BulkAction from "./../../plugins/bulk-action"; | ||||
| import MixinsGlobal from "./../../mixins/global"; | ||||
| import WizardAction from "./wizardAction"; | ||||
| import WizardAction from "./../../mixins/wizardAction"; | ||||
|  | ||||
| export default { | ||||
|   name: "Currencies", | ||||
| @@ -409,6 +409,7 @@ export default { | ||||
|  | ||||
|     prev() { | ||||
|       if (this.active-- > 2); | ||||
|       history.back() | ||||
|       this.$router.push("/wizard/companies"); | ||||
|     }, | ||||
|  | ||||
|   | ||||
| @@ -226,7 +226,7 @@ import { Step, Steps } from "element-ui"; | ||||
| import AkauntingRadioGroup from "./../../components/forms/AkauntingRadioGroup"; | ||||
| import BulkAction from "./../../plugins/bulk-action"; | ||||
| import MixinsGlobal from "./../../mixins/global"; | ||||
| import WizardAction from "./wizardAction"; | ||||
| import WizardAction from "./../../mixins/wizardAction"; | ||||
|  | ||||
| export default { | ||||
|   name: "Taxes", | ||||
|   | ||||
							
								
								
									
										44
									
								
								resources/assets/js/views/wizard/company.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										44
									
								
								resources/assets/js/views/wizard/company.js
									
									
									
									
										vendored
									
									
								
							| @@ -1,44 +0,0 @@ | ||||
| /** | ||||
|  * First we will load all of this project's JavaScript dependencies which | ||||
|  * includes Vue and other libraries. It is a great starting point when | ||||
|  * building robust, powerful web applications using Vue and Laravel. | ||||
|  */ | ||||
|  | ||||
| require('./../../bootstrap'); | ||||
|  | ||||
| import Vue from 'vue'; | ||||
|  | ||||
| import DashboardPlugin from './../../plugins/dashboard-plugin'; | ||||
|  | ||||
| import Global from './../../mixins/global'; | ||||
|  | ||||
| import Form from './../../plugins/form'; | ||||
|  | ||||
| import {Step, Steps} from 'element-ui'; | ||||
|  | ||||
| // plugin setup | ||||
| Vue.use(DashboardPlugin, Step, Steps); | ||||
|  | ||||
| const app = new Vue({ | ||||
|     el: '#app', | ||||
|  | ||||
|     mixins: [ | ||||
|         Global | ||||
|     ], | ||||
|  | ||||
|     components: { | ||||
|         [Step.name]: Step, | ||||
|         [Steps.name]: Steps, | ||||
|     }, | ||||
|  | ||||
|     data: function () { | ||||
|         return { | ||||
|             form: new Form('company'), | ||||
|             active: 0 | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|  | ||||
|     } | ||||
| }); | ||||
							
								
								
									
										114
									
								
								resources/assets/js/views/wizard/currencies.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										114
									
								
								resources/assets/js/views/wizard/currencies.js
									
									
									
									
										vendored
									
									
								
							| @@ -1,114 +0,0 @@ | ||||
| /** | ||||
|  * First we will load all of this project's JavaScript dependencies which | ||||
|  * includes Vue and other libraries. It is a great starting point when | ||||
|  * building robust, powerful web applications using Vue and Laravel. | ||||
|  */ | ||||
|  | ||||
| require('../../bootstrap'); | ||||
|  | ||||
| import Vue from 'vue'; | ||||
|  | ||||
| import DashboardPlugin from './../../plugins/dashboard-plugin'; | ||||
|  | ||||
| import Global from '../../mixins/global'; | ||||
|  | ||||
| import Form from '../../plugins/form'; | ||||
| import BulkAction from './../../plugins/bulk-action'; | ||||
|  | ||||
| import {Step, Steps} from 'element-ui'; | ||||
|  | ||||
| // plugin setup | ||||
| Vue.use(DashboardPlugin, Step, Steps); | ||||
|  | ||||
| const app = new Vue({ | ||||
|     el: '#app', | ||||
|  | ||||
|     mixins: [ | ||||
|         Global | ||||
|     ], | ||||
|  | ||||
|     components: { | ||||
|         [Step.name]: Step, | ||||
|         [Steps.name]: Steps, | ||||
|     }, | ||||
|  | ||||
|     data: function () { | ||||
|         return { | ||||
|             form: new Form('currency'), | ||||
|             active: 1, | ||||
|             bulk_action: new BulkAction(url + '/settings/currencies'), | ||||
|             show: false, | ||||
|             currency: { | ||||
|                 name: '', | ||||
|                 code: '', | ||||
|                 rate: '1', | ||||
|                 enabled: 1 | ||||
|             }, | ||||
|             submit_function: '', | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|         onAddCurrency() { | ||||
|             this.submit_function = 'onStoreCurrency'; | ||||
|             this.form.method = 'post'; | ||||
|             this.form.action = url + '/wizard/currencies'; | ||||
|  | ||||
|             this.form.name = ''; | ||||
|             this.form.code = ''; | ||||
|             this.form.rate = ''; | ||||
|             this.form.enabled = 1; | ||||
|             this.form.precision = ''; | ||||
|             this.form.symbol = ''; | ||||
|             this.form.symbol_first = ''; | ||||
|             this.form.decimal_mark = ''; | ||||
|             this.form.thousands_separator = ''; | ||||
|  | ||||
|             this.show = true; | ||||
|         }, | ||||
|  | ||||
|         onEditCurrency(currency_id) { | ||||
|             this.submit_function = 'onUpdateCurrency'; | ||||
|             this.form.method = 'patch'; | ||||
|             this.form.action = url + '/wizard/currencies/' + currency_id; | ||||
|  | ||||
|             currencies.forEach(currency => { | ||||
|                 if (currency.id == currency_id) { | ||||
|                     this.form.name = currency.name; | ||||
|                     this.form.code = currency.code; | ||||
|                     this.form.rate = currency.rate; | ||||
|                     this.form.enabled = currency.enabled; | ||||
|                     this.form.precision = currency.precision; | ||||
|                     this.form.symbol = currency.symbol; | ||||
|                     this.form.symbol_first = currency.symbol_first; | ||||
|                     this.form.decimal_mark = currency.decimal_mark; | ||||
|                     this.form.thousands_separator = currency.thousands_separator; | ||||
|                 } | ||||
|             }); | ||||
|  | ||||
|             this.show = true; | ||||
|         }, | ||||
|  | ||||
|         onChangeCode(code) { | ||||
|             axios.get(url + '/settings/currencies/config', { | ||||
|                 params: { | ||||
|                     code: code | ||||
|                 } | ||||
|             }) | ||||
|             .then(response => { | ||||
|                 this.form.rate = response.data.rate; | ||||
|                 this.form.precision = response.data.precision; | ||||
|                 this.form.symbol = response.data.symbol; | ||||
|                 this.form.symbol_first = response.data.symbol_first; | ||||
|                 this.form.decimal_mark = response.data.decimal_mark; | ||||
|                 this.form.thousands_separator = response.data.thousands_separator; | ||||
|             }) | ||||
|             .catch(error => { | ||||
|             }); | ||||
|         }, | ||||
|  | ||||
|         onSubmit() {	 | ||||
|             this.form.oldSubmit();	 | ||||
|         }, | ||||
|     } | ||||
| }); | ||||
							
								
								
									
										41
									
								
								resources/assets/js/views/wizard/finish.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										41
									
								
								resources/assets/js/views/wizard/finish.js
									
									
									
									
										vendored
									
									
								
							| @@ -1,41 +0,0 @@ | ||||
| /** | ||||
|  * First we will load all of this project's JavaScript dependencies which | ||||
|  * includes Vue and other libraries. It is a great starting point when | ||||
|  * building robust, powerful web applications using Vue and Laravel. | ||||
|  */ | ||||
|  | ||||
| require('./../../bootstrap'); | ||||
|  | ||||
| import Vue from 'vue'; | ||||
|  | ||||
| import DashboardPlugin from './../../plugins/dashboard-plugin'; | ||||
|  | ||||
| import Global from './../../mixins/global'; | ||||
|  | ||||
| import {Step, Steps} from 'element-ui'; | ||||
|  | ||||
| // plugin setup | ||||
| Vue.use(DashboardPlugin, Step, Steps); | ||||
|  | ||||
| const app = new Vue({ | ||||
|     el: '#app', | ||||
|  | ||||
|     mixins: [ | ||||
|         Global | ||||
|     ], | ||||
|  | ||||
|     components: { | ||||
|         [Step.name]: Step, | ||||
|         [Steps.name]: Steps, | ||||
|     }, | ||||
|  | ||||
|     data: function () { | ||||
|         return { | ||||
|             active: 3, | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|  | ||||
|     } | ||||
| }); | ||||
							
								
								
									
										87
									
								
								resources/assets/js/views/wizard/taxes.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										87
									
								
								resources/assets/js/views/wizard/taxes.js
									
									
									
									
										vendored
									
									
								
							| @@ -1,87 +0,0 @@ | ||||
| /** | ||||
|  * First we will load all of this project's JavaScript dependencies which | ||||
|  * includes Vue and other libraries. It is a great starting point when | ||||
|  * building robust, powerful web applications using Vue and Laravel. | ||||
|  */ | ||||
|  | ||||
|  require('../../bootstrap'); | ||||
|  | ||||
|  import Vue from 'vue'; | ||||
|   | ||||
|  import DashboardPlugin from './../../plugins/dashboard-plugin'; | ||||
|   | ||||
|  import Global from '../../mixins/global'; | ||||
|   | ||||
|  import Form from '../../plugins/form'; | ||||
|  import BulkAction from './../../plugins/bulk-action'; | ||||
|   | ||||
|  import {Step, Steps} from 'element-ui'; | ||||
|   | ||||
|  // plugin setup | ||||
|  Vue.use(DashboardPlugin, Step, Steps); | ||||
|   | ||||
|  const app = new Vue({ | ||||
|      el: '#app', | ||||
|   | ||||
|      mixins: [ | ||||
|          Global | ||||
|      ], | ||||
|   | ||||
|      components: { | ||||
|          [Step.name]: Step, | ||||
|          [Steps.name]: Steps, | ||||
|      }, | ||||
|   | ||||
|      data: function () { | ||||
|          return { | ||||
|              form: new Form('tax'), | ||||
|              active: 2, | ||||
|              bulk_action: new BulkAction(url + '/settings/taxes'), | ||||
|              show: false, | ||||
|              tax: { | ||||
|                  name: '', | ||||
|                  code: '', | ||||
|                  type: 'normal', | ||||
|                  enabled: 1 | ||||
|              }, | ||||
|              submit_function: '' | ||||
|          } | ||||
|      }, | ||||
|   | ||||
|      methods: { | ||||
|          onAddTax() { | ||||
|              this.submit_function = 'onStoreTax'; | ||||
|              this.form.method = 'post'; | ||||
|              this.form.action = url + '/wizard/taxes'; | ||||
|   | ||||
|              this.form.name = ''; | ||||
|              this.form.rate = ''; | ||||
|              this.form.type = 'normal'; | ||||
|              this.form.enabled = 1; | ||||
|   | ||||
|              this.show = true; | ||||
|          }, | ||||
|   | ||||
|          onEditTax(tax_id) { | ||||
|              this.submit_function = 'onUpdateTax'; | ||||
|              this.form.method = 'patch'; | ||||
|              this.form.action = url + '/wizard/taxes/' + tax_id; | ||||
|   | ||||
|              taxes.forEach(tax => { | ||||
|                  if (tax.id == tax_id) { | ||||
|                      this.form.name = tax.name; | ||||
|                      this.form.rate = tax.rate; | ||||
|                      this.form.type = tax.type; | ||||
|                      this.form.enabled = tax.enabled; | ||||
|                  } | ||||
|              }); | ||||
|   | ||||
|              this.show = true; | ||||
|          }, | ||||
|   | ||||
|          onSubmit() {	 | ||||
|              this.form.oldSubmit();	 | ||||
|          }, | ||||
|      } | ||||
|  }); | ||||
|   | ||||
							
								
								
									
										171
									
								
								resources/assets/js/views/wizard/wizardAction.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										171
									
								
								resources/assets/js/views/wizard/wizardAction.js
									
									
									
									
										vendored
									
									
								
							| @@ -1,171 +0,0 @@ | ||||
|  | ||||
| export default { | ||||
|     data: function () { | ||||
|         return { | ||||
|             current_tab: undefined, | ||||
|             new_datas: false, | ||||
|             model: { | ||||
|                 name: "", | ||||
|                 rate: "", | ||||
|                 select: "", | ||||
|                 enabled: 1 | ||||
|             }, | ||||
|             error_field: {}, | ||||
|         } | ||||
|     }, | ||||
|     methods: { | ||||
|         onAddItem() { | ||||
|             this.new_datas = true; | ||||
|             this.current_tab = undefined; | ||||
|             this.error_field = {}; | ||||
|  | ||||
|             if (this.model) { | ||||
|                 this.model.name = ''; | ||||
|                 this.model.rate = ''; | ||||
|                 this.model.select = ''; | ||||
|             } | ||||
|         }, | ||||
|  | ||||
|         onEditItem(item, index) { | ||||
|             this.new_datas = false; | ||||
|             this.current_tab = index; | ||||
|             this.error_field = {}; | ||||
|  | ||||
|             if (this.model) { | ||||
|                 this.model.name = item.name ? item.name : ''; | ||||
|                 this.model.rate = item.rate ? item.rate : ''; | ||||
|                 this.model.select = item.code ? item.code : ''; | ||||
|             } | ||||
|         }, | ||||
|  | ||||
|         onCancelItem() { | ||||
|             this.current_tab = undefined; | ||||
|         }, | ||||
|  | ||||
|         onDataChange() { | ||||
|             this.new_datas = false; | ||||
|             this.current_tab = undefined; | ||||
|             this.model.name = ''; | ||||
|             this.model.rate = ''; | ||||
|             this.model.select = ''; | ||||
|             this.model.enabled = 1; | ||||
|         }, | ||||
|  | ||||
|         onSuccessMessage(response) { | ||||
|             let type = response.data.success ? 'success' : 'error'; | ||||
|             let timeout = 1000; | ||||
|  | ||||
|             if (response.data.important) { | ||||
|                 timeout = 0; | ||||
|             } | ||||
|  | ||||
|             this.$notify({ | ||||
|                 message: response.data.message, | ||||
|                 timeout: timeout, | ||||
|                 icon: "fas fa-bell", | ||||
|                 type, | ||||
|             }); | ||||
|  | ||||
|             this.onDataChange(); | ||||
|         }, | ||||
|  | ||||
|         onDeleteItemMessage(event) { | ||||
|             let type = event.success ? 'success' : 'error'; | ||||
|             let timeout = 1000; | ||||
|  | ||||
|             if (event.important) { | ||||
|                 timeout = 0; | ||||
|             } | ||||
|  | ||||
|             this.$notify({ | ||||
|                 message: event.message, | ||||
|                 timeout: timeout, | ||||
|                 icon: "fas fa-bell", | ||||
|                 type, | ||||
|             }); | ||||
|  | ||||
|             this.onDataChange(); | ||||
|         }, | ||||
|  | ||||
|         onStatusControl(status_form, status_item, event) { | ||||
|             status_form.forEach((status) => { | ||||
|                 if (status.id == status_item) { | ||||
|                     status.enabled = event.target.checked; | ||||
|                 } | ||||
|               }); | ||||
|         }, | ||||
|  | ||||
|         onSubmitEvent(form_method, form_url, plus_data, form_list, form_id) { | ||||
|             const formData = new FormData(this.$refs["form"]); | ||||
|             const data = {}; | ||||
|  | ||||
|             for (let [key, val] of formData.entries()) { | ||||
|                 Object.assign(data, { | ||||
|                     [key]: val, | ||||
|                 }); | ||||
|             } | ||||
|  | ||||
|             if(plus_data == 'type') { | ||||
|                 Object.assign(data, { | ||||
|                     ['type']: 'normal', | ||||
|                 }); | ||||
|             } | ||||
|  | ||||
|             window.axios({ | ||||
|                     method: form_method, | ||||
|                     url: form_url, | ||||
|                     data: data, | ||||
|                 }) | ||||
|                 .then(response => { | ||||
|                     if(form_list.length && form_list.length != undefined) { | ||||
|                         if(form_method == 'POST') { | ||||
|                             form_list.push({ | ||||
|                                 "id": response.data.data.id, | ||||
|                                 "name": response.data.data.name, | ||||
|                                 "code": response.data.data.code, | ||||
|                                 "rate": response.data.data.rate, | ||||
|                                 "enabled": response.data.data.enabled != undefined ? response.data.data.enabled : 'true' | ||||
|                             }); | ||||
|                         } | ||||
|      | ||||
|                         if(form_method == 'PATCH') { | ||||
|                             form_list.forEach(item => { | ||||
|                                 if (item.id == form_id) { | ||||
|                                     item.name = response.data.data.name; | ||||
|                                     item.code = response.data.data.code; | ||||
|                                     item.rate = response.data.data.rate; | ||||
|                                 } | ||||
|                             }); | ||||
|                         } | ||||
|                     } | ||||
|                     this.onSuccessMessage(response); | ||||
|                 }, this) | ||||
|                 .catch(error => { | ||||
|                     this.onFailError(error); | ||||
|                 }, this); | ||||
|         }, | ||||
|  | ||||
|         onEjetItem(event, form_list, event_id) { | ||||
|             form_list.forEach(function (item, index) { | ||||
|                 if (item.id == event_id) { | ||||
|                   form_list.splice(index, 1); | ||||
|                   return; | ||||
|                 } | ||||
|               }, this); | ||||
|  | ||||
|               this.component = ""; | ||||
|  | ||||
|               this.onDeleteItemMessage(event); | ||||
|         }, | ||||
|  | ||||
|         onFailErrorGet(field_name) { | ||||
|             if(this.error_field[field_name]) { | ||||
|                 return this.error_field[field_name][0]; | ||||
|             } | ||||
|         }, | ||||
|  | ||||
|         onFailError(error) { | ||||
|             this.error_field = error.response.data.errors; | ||||
|         } | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user