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;
}
}
});

View File

@ -1,33 +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';
// plugin setup
Vue.use(DashboardPlugin);
const app = new Vue({
el: '#app',
mixins: [
Global
],
data: function () {
return {
form: new Form('module')
}
}
});

View File

@ -25,12 +25,6 @@ const app = new Vue({
Global
],
mounted() {
this.onChangeProtocol(this.form.protocol);
this.color = this.form.color;
},
data: function () {
return {
form: new Form('setting'),
@ -43,6 +37,8 @@ const app = new Vue({
smtpPassword:true,
smtpEncryption:true,
},
tags: null,
template_title: '',
invoice_form: new Form('template'),
template: {
@ -52,17 +48,9 @@ const app = new Vue({
html: '',
errors: new Error()
},
color: '#55588b',
predefineColors: [
'#3c3f72',
'#55588b',
'#e5e5e5',
'#328aef',
'#efad32',
'#ef3232',
'#efef32'
],
item_name_input: false,
price_name_input: false,
quantity_name_input: false
}
},
@ -138,12 +126,39 @@ const app = new Vue({
};
},
onChangeColor() {
this.form.color = this.color;
onEditEmailTemplate(template_id) {
axios.get(url + '/settings/email-templates/get', {
params: {
id: template_id
}
})
.then(response => {
this.template_title = response.data.data.title;
this.form.subject = response.data.data.subject;
this.form.body = response.data.data.body;
this.form.id = response.data.data.id;
this.tags = response.data.data.tags;
});
},
onChangeColorInput() {
this.color = this.form.color;
settingsInvoice() {
if (this.form.item_name == 'custom') {
this.item_name_input = true;
} else {
this.item_name_input = false;
}
if (this.form.price_name == 'custom') {
this.price_name_input = true;
} else {
this.price_name_input = false;
}
if (this.form.quantity_name == 'custom') {
this.quantity_name_input = true;
} else {
this.quantity_name_input = false;
}
}
}
});