This commit is contained in:
@@ -56,7 +56,7 @@ todo: workorders - need to set billing and service address from customers on mig
|
||||
## CLIENT MISC ITEMS
|
||||
|
||||
todo: Translation: "Physical" address seems wierd, rename to Street address or Delivery address or Service Address or whatever
|
||||
|
||||
todo: broken rules can't save should color save button red in addition to disabled some forms can't see what's what
|
||||
todo: Any "Priority" type value in UI that has colors should use ayaFireAlt icon instead of round circle which is for minor status only
|
||||
Flag is for major status like all of workorder
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ function isNumber(n) {
|
||||
//
|
||||
function getControl(vm, ref) {
|
||||
let ctrl = vm.$refs[ref];
|
||||
|
||||
console.log("getcontrol refs are", vm.$refs);
|
||||
//I don't think this is required anymore
|
||||
// if (ctrl === undefined) {
|
||||
// //it's either a sub field in custom fields component or it's a coding error
|
||||
@@ -146,9 +146,16 @@ export default {
|
||||
if (vm.formState.loading) {
|
||||
return true;
|
||||
}
|
||||
|
||||
console.log("form-Required ref is:", ref); //Items[0].Notes
|
||||
// if (ref.includes(".")) {
|
||||
// let xxx = ref.split(".");
|
||||
// console.log("split ref=", xxx);
|
||||
// ref = `${xxx[xxx.length - 2]}.${xxx[xxx.length - 1]}`;
|
||||
// }
|
||||
// console.log("actual ref is ", ref);
|
||||
let ctrl = getControl(vm, ref);
|
||||
if (typeof ctrl == "undefined") {
|
||||
console.log("not found");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -157,6 +164,8 @@ export default {
|
||||
return true;
|
||||
}
|
||||
|
||||
console.log("HERE");
|
||||
|
||||
// "ErrorRequiredFieldEmpty": "{0} is a required field. Please enter a value for {0}",
|
||||
let err = vm.$ay.t("ErrorRequiredFieldEmpty");
|
||||
let fieldName = getControlLabel(ctrl);
|
||||
|
||||
@@ -88,6 +88,8 @@
|
||||
v-if="form().showMe(this, 'Items.WorkOrderItemSummary')"
|
||||
cols="12"
|
||||
>
|
||||
servererrors:
|
||||
{{ form().serverErrors(this, `items[${activeItemIndex}].notes`) }}
|
||||
<v-textarea
|
||||
v-model="value.items[activeItemIndex].notes"
|
||||
:readonly="formState.readOnly"
|
||||
@@ -96,7 +98,8 @@
|
||||
:error-messages="
|
||||
form().serverErrors(this, `items[${activeItemIndex}].notes`)
|
||||
"
|
||||
ref="Items.Notes"
|
||||
:ref="`items[${activeItemIndex}].notes`"
|
||||
:rules="[form().required(this, `items[${activeItemIndex}].notes`)]"
|
||||
data-cy="Items.Notes"
|
||||
@input="fieldValueChanged(`items[${activeItemIndex}].notes`)"
|
||||
auto-grow
|
||||
@@ -115,8 +118,10 @@
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="isDeleted"
|
||||
:label="$ay.t('Sequence')"
|
||||
ref="sequence"
|
||||
:rules="[form().integerValid(this, 'sequence')]"
|
||||
:ref="`items[${activeItemIndex}].sequence`"
|
||||
:rules="[
|
||||
form().integerValid(this, `items[${activeItemIndex}].sequence`)
|
||||
]"
|
||||
:error-messages="
|
||||
form().serverErrors(this, `items[${activeItemIndex}].sequence`)
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user