This commit is contained in:
@@ -301,8 +301,6 @@ todo: cypress testing for load testing etc
|
|||||||
then make new project folder for this and put the tests there
|
then make new project folder for this and put the tests there
|
||||||
install standalone cypress and go it without vue stuff
|
install standalone cypress and go it without vue stuff
|
||||||
|
|
||||||
todo: when fetchign a workorder it should order by woitem.sequence so that reports and things automatically get it in sequence
|
|
||||||
I think in ui it orders automatically at the ui itself in sequence but would need that for reports as well.
|
|
||||||
|
|
||||||
todo: changing scheduser estimated qty doesn't trigger dirty until move off, is it using the wrong event for update?
|
todo: changing scheduser estimated qty doesn't trigger dirty until move off, is it using the wrong event for update?
|
||||||
gz-decimal control
|
gz-decimal control
|
||||||
|
|||||||
@@ -811,8 +811,15 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//dev error on form?
|
//dev error on form?
|
||||||
if (!formControl) {
|
if (formControl == null) {
|
||||||
throw `gzform::fieldValueChanged formControl is not found ref:${ref}, formReferences:${formReference} `;
|
if (vm.$ay.dev) {
|
||||||
|
//not necessarily an error, can happen during form init
|
||||||
|
console.trace(
|
||||||
|
`gzform::fieldValueChanged formControl is not found ref:${ref}, formReferences:${formReference} `
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//this is currently required to ensure that this method runs after all the broken rule checks have settled
|
//this is currently required to ensure that this method runs after all the broken rule checks have settled
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<v-text-field
|
<v-text-field
|
||||||
ref="textField"
|
ref="textField"
|
||||||
:value="currencyValue"
|
:value="currencyValue"
|
||||||
@change="updateValue"
|
@input="updateValue"
|
||||||
v-currency="{
|
v-currency="{
|
||||||
currency: currencyName,
|
currency: currencyName,
|
||||||
locale: languageName
|
locale: languageName
|
||||||
@@ -29,7 +29,8 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
currencyName: window.$gz.locale.getCurrencyName(),
|
currencyName: window.$gz.locale.getCurrencyName(),
|
||||||
languageName: window.$gz.locale.getResolvedLanguage()
|
languageName: window.$gz.locale.getResolvedLanguage(),
|
||||||
|
initializing: true
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@@ -48,11 +49,30 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
updateValue() {
|
updateValue() {
|
||||||
|
//this is required because the initial setting triggers an input event
|
||||||
|
//however the two values differ because it comes from the server in much higher precision
|
||||||
|
//and this control rounds it down
|
||||||
|
//so the first trigger must be ignored until it "settles"
|
||||||
|
if (this.initializing) {
|
||||||
|
this.initializing = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
let val = this.$refs.textField.$refs.input.value;
|
let val = this.$refs.textField.$refs.input.value;
|
||||||
|
// //_value contains the actual underlying numeric value without text
|
||||||
|
// //value contains the entered text
|
||||||
|
// if (this.$refs.textField.$refs.input._value == this.value) {
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
let parsedValue = parseCurrency(val, {
|
let parsedValue = parseCurrency(val, {
|
||||||
currency: this.currencyName,
|
currency: this.currencyName,
|
||||||
locale: this.languageName
|
locale: this.languageName
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// //this.value on init is a very long string of digits / decimal places triggering a variance once rounded
|
||||||
|
// let parsedOldValue = parseCurrency(this.value.toString(), {
|
||||||
|
// currency: this.currencyName,
|
||||||
|
// locale: this.languageName
|
||||||
|
// });
|
||||||
if (parsedValue != this.value) {
|
if (parsedValue != this.value) {
|
||||||
this.$emit("input", parsedValue);
|
this.$emit("input", parsedValue);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<v-text-field
|
<v-text-field
|
||||||
ref="textField"
|
ref="textField"
|
||||||
:value="currencyValue"
|
:value="currencyValue"
|
||||||
@change="updateValue"
|
@input="updateValue"
|
||||||
v-currency="{
|
v-currency="{
|
||||||
currency: null,
|
currency: null,
|
||||||
locale: languageName,
|
locale: languageName,
|
||||||
@@ -52,6 +52,9 @@ export default {
|
|||||||
currency: null,
|
currency: null,
|
||||||
locale: this.languageName
|
locale: this.languageName
|
||||||
});
|
});
|
||||||
|
if (parsedValue == this.value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.$emit("input", parsedValue);
|
this.$emit("input", parsedValue);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<v-text-field
|
<v-text-field
|
||||||
ref="textField"
|
ref="textField"
|
||||||
:value="currencyValue"
|
:value="currencyValue"
|
||||||
@change="updateValue"
|
@input="updateValue"
|
||||||
v-currency="{
|
v-currency="{
|
||||||
currency: null,
|
currency: null,
|
||||||
locale: languageName,
|
locale: languageName,
|
||||||
@@ -54,6 +54,15 @@ export default {
|
|||||||
locale: this.languageName
|
locale: this.languageName
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (parsedValue == this.value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// console.log("PCT CONTROL:", {
|
||||||
|
// parsedValue: parsedValue,
|
||||||
|
// value: this.value
|
||||||
|
// });
|
||||||
|
|
||||||
this.$emit("input", parsedValue);
|
this.$emit("input", parsedValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -185,6 +185,7 @@ export default {
|
|||||||
return window.$gz.form;
|
return window.$gz.form;
|
||||||
},
|
},
|
||||||
fieldValueChanged(ref) {
|
fieldValueChanged(ref) {
|
||||||
|
console.log("woitemscheduserform, field value changed", ref);
|
||||||
if (!this.formState.loading && !this.formState.readonly) {
|
if (!this.formState.loading && !this.formState.readonly) {
|
||||||
//flag this record dirty so it gets picked up by save
|
//flag this record dirty so it gets picked up by save
|
||||||
this.value.items[this.activeWoItemIndex].scheduledUsers[
|
this.value.items[this.activeWoItemIndex].scheduledUsers[
|
||||||
|
|||||||
Reference in New Issue
Block a user