akaunting 3.0 (the last dance)

This commit is contained in:
Burak Civan
2022-06-01 10:15:55 +03:00
parent cead09f6d4
commit d9c0764572
3812 changed files with 126831 additions and 102949 deletions

View File

@ -15,50 +15,46 @@ import Global from './../../mixins/global';
import Form from './../../plugins/form';
import BulkAction from './../../plugins/bulk-action';
import {ColorPicker} from 'element-ui';
// plugin setup
Vue.use(DashboardPlugin, ColorPicker);
Vue.use(DashboardPlugin);
const app = new Vue({
el: '#app',
mixins: [
Global
Global,
],
components: {
[ColorPicker.name]: ColorPicker,
},
mounted() {
this.color = this.form.color;
},
data: function () {
return {
form: new Form('category'),
bulk_action: new BulkAction('categories'),
color: '#55588b',
predefineColors: [
'#3c3f72',
'#55588b',
'#e5e5e5',
'#328aef',
'#efad32',
'#ef3232',
'#efef32'
]
categoriesBasedTypes: null,
isParentCategoryDisabled: true,
}
},
methods: {
onChangeColor() {
this.form.color = this.color;
},
updateParentCategories(event) {
if (event === '') {
return;
}
onChangeColorInput() {
this.color = this.form.color;
if (typeof JSON.parse(this.form.categories)[event] === 'undefined') {
this.categoriesBasedTypes = [];
this.isParentCategoryDisabled = true;
return;
}
if (this.form.parent_category_id) {
this.form.parent_category_id = null;
return;
}
this.categoriesBasedTypes = JSON.parse(this.form.categories)[event];
this.isParentCategoryDisabled = false;
}
}
});