Merge pull request #2796 from brkcvn/master

Javascript console errors
This commit is contained in:
Burak Civan 2022-12-06 17:25:08 +03:00 committed by GitHub
commit 5542894ccd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 10 deletions

5
public/css/app.css vendored
View File

@ -54051,6 +54051,7 @@ html[dir='rtl'] .el-scrollbar__wrap {
}
.collapse-sub{
display: block;
height: 0px;
overflow: hidden;
opacity: 0;
@ -56327,10 +56328,6 @@ body{
right: -2rem;
}
[dir="rtl"] .rtl\:float-left{
float: left;
}
[dir="rtl"] .rtl\:m-0{
margin: 0px;
}

View File

@ -114,7 +114,10 @@ const app = new Vue({
onRefFocus(ref) {
let index = this.form.items.length - 1;
this.$refs['items-' + index + '-' + ref][0].focus();
if (this.$refs['items-' + index + '-' + ref] != undefined) {
let first_ref = this.$refs['items-' + index + '-' + ref];
first_ref != undefined ? first_ref[0].focus() : this.$refs[Object.keys(this.$refs)[0]][0].focus();
}
},
onCalculateTotal() {
@ -811,15 +814,20 @@ const app = new Vue({
watch: {
'form.discount': function (newVal, oldVal) {
if (newVal != '' && newVal.search('^(?=.*?[0-9])[0-9.,]+$') !== 0) {
if (newVal > 99) {
newVal = oldVal;
return;
}
if (newVal != '' && newVal.search('^[-+]?([0-9]|[1-9][0-9]|100)*\.?[0-9]+$') !== 0) {
this.form.discount = oldVal;
this.form.discount = this.form.discount.replace(',', '.');
this.form.discount = this.form.discount ? this.form.discount.replace(',', '.') : '';
return;
}
for (let item of this.regex_condition) {
if (this.form.discount.includes(item)) {
if (this.form.discount && this.form.discount.includes(item)) {
const removeLastChar = newVal.length - 1;
const inputShown = newVal.slice(0, removeLastChar);
@ -827,7 +835,7 @@ const app = new Vue({
}
}
this.form.discount = this.form.discount.replace(',', '.');
this.form.discount = this.form.discount ? this.form.discount.replace(',', '.') : '';
},
'form.loading': function (newVal, oldVal) {

View File

@ -561,7 +561,7 @@ html[dir='rtl'] .el-scrollbar__wrap {
}
.collapse-sub {
@apply opacity-0 h-0 overflow-hidden;
@apply block opacity-0 h-0 overflow-hidden;
}
.collapse-sub-report.collapse-sub {