import Vue from 'vue'; import axios from 'axios'; import AkauntingSearch from './../components/AkauntingSearch'; import AkauntingModal from './../components/AkauntingModal'; import AkauntingMoney from './../components/AkauntingMoney'; import AkauntingModalAddNew from './../components/AkauntingModalAddNew'; import AkauntingRadioGroup from './../components/forms/AkauntingRadioGroup'; import AkauntingSelect from './../components/AkauntingSelect'; import AkauntingSelectRemote from './../components/AkauntingSelectRemote'; import AkauntingDate from './../components/AkauntingDate'; import AkauntingRecurring from './../components/AkauntingRecurring'; import AkauntingHtmlEditor from './../components/AkauntingHtmlEditor'; import NProgress from 'nprogress'; import 'nprogress/nprogress.css'; import NProgressAxios from './../plugins/nprogress-axios'; import { Select, Option, Steps, Step, Button, Link, Tooltip, ColorPicker } from 'element-ui'; import Form from './../plugins/form'; export default { components: { AkauntingSearch, AkauntingRadioGroup, AkauntingSelect, AkauntingSelectRemote, AkauntingMoney, AkauntingModal, AkauntingModalAddNew, AkauntingDate, AkauntingRecurring, AkauntingHtmlEditor, [Select.name]: Select, [Option.name]: Option, [Steps.name]: Steps, [Step.name]: Step, [Button.name]: Button, [Link.name]: Link, [Tooltip.name]: Tooltip, [ColorPicker.name]: ColorPicker, }, data: function () { return { component: '', currency: null, } }, directives: { //money: VMoney }, mounted() { this.checkNotify(); }, methods: { // Check Default set notify > store / update action checkNotify: function () { if (!flash_notification) { return false; } flash_notification.forEach(notify => { let type = notify.level; this.$notify({ message: notify.message, timeout: 5000, icon: 'fas fa-bell', type }); }); }, // Form Submit onSubmit() { this.form.submit(); }, onHandleFileUpload(key, event) { this.form[key] = ''; this.form[key] = event.target.files[0]; }, // Bulk Action Select all onSelectAll() { this.bulk_action.selectAll(); }, // Bulk Action Select checked/ unchecked onSelect() { this.bulk_action.select(); }, // Bulk Action use selected Change onChange(event) { var result = this.bulk_action.change(event); }, // Bulk Action use selected Action onAction() { this.bulk_action.action(); }, // Bulk Action modal cancel onCancel() { this.bulk_action.modal = false; }, // Bulk Action Clear selected items onClear() { this.bulk_action.modal = false; this.bulk_action.clear(); }, // List Enabled column status changes onStatus(item_id, event) { this.bulk_action.status(item_id, event, this.$notify); }, // Actions > Delete confirmDelete(url, title, message, button_cancel, button_delete) { let confirm = { url: url, title: title, message: message, button_cancel: button_cancel, button_delete: button_delete, show: true }; this.component = Vue.component('add-new-component', (resolve, reject) => { resolve({ template : '