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

@ -35,6 +35,8 @@ const app = new Vue({
',.',
',,'
],
sale_information : false,
purchase_information : false
}
},
@ -44,11 +46,11 @@ const app = new Vue({
this.form.sale_price = oldVal;
return;
}
for (let item of this.regex_condition) {
if (this.form.sale_price.includes(item)) {
const removeLastChar = newVal.length - 1
const inputShown = newVal.slice(0, removeLastChar)
const removeLastChar = newVal.length - 1;
const inputShown = newVal.slice(0, removeLastChar);
this.form.sale_price = inputShown;
}
}
@ -62,11 +64,63 @@ const app = new Vue({
for (let item of this.regex_condition) {
if (this.form.purchase_price.includes(item)) {
const removeLastChar = newVal.length - 1
const inputShown = newVal.slice(0, removeLastChar)
const removeLastChar = newVal.length - 1;
const inputShown = newVal.slice(0, removeLastChar);
this.form.purchase_price = inputShown;
}
}
},
},
},
mounted() {
if (this.form.sale_price != '' && this.form.purchase_price == '') {
this.form.sale_information = true;
this.form.purchase_information = false;
this.purchase_information = true;
} else if (this.form.sale_price == '' && this.form.purchase_price != '') {
this.form.sale_information = false;
this.form.purchase_information = true;
this.sale_information = true;
} else {
this.form.sale_information = true;
this.form.purchase_information = true;
}
},
methods:{
onInformation(event, type) {
if (event.target.checked) {
if (type == 'sale') {
this.sale_information = false;
this.form.sale_price = '';
this.form.purchase_information = true;
} else {
this.purchase_information = false;
this.form.purchase_price = '';
}
} else {
if (type == 'sale') {
if (! this.form.purchase_information) {
this.purchase_information = false;
this.form.purchase_information = true;
}
this.sale_information = true;
} else {
if (! this.form.sale_information) {
this.sale_information = false;
this.form.sale_information = true;
}
this.purchase_information = true;
}
}
},
onType(event) {
return;
this.form.type = type;
}
}
});