This commit is contained in:
2021-05-07 17:55:15 +00:00
parent d570a13c77
commit ea9ba291ae
3 changed files with 20 additions and 6 deletions

View File

@@ -56,7 +56,7 @@ todo: workorders - need to set billing and service address from customers on mig
## CLIENT MISC ITEMS ## CLIENT MISC ITEMS
todo: Translation: "Physical" address seems wierd, rename to Street address or Delivery address or Service Address or whatever 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 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 Flag is for major status like all of workorder

View File

@@ -47,7 +47,7 @@ function isNumber(n) {
// //
function getControl(vm, ref) { function getControl(vm, ref) {
let ctrl = vm.$refs[ref]; let ctrl = vm.$refs[ref];
console.log("getcontrol refs are", vm.$refs);
//I don't think this is required anymore //I don't think this is required anymore
// if (ctrl === undefined) { // if (ctrl === undefined) {
// //it's either a sub field in custom fields component or it's a coding error // //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) { if (vm.formState.loading) {
return true; 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); let ctrl = getControl(vm, ref);
if (typeof ctrl == "undefined") { if (typeof ctrl == "undefined") {
console.log("not found");
return true; return true;
} }
@@ -157,6 +164,8 @@ export default {
return true; return true;
} }
console.log("HERE");
// "ErrorRequiredFieldEmpty": "{0} is a required field. Please enter a value for {0}", // "ErrorRequiredFieldEmpty": "{0} is a required field. Please enter a value for {0}",
let err = vm.$ay.t("ErrorRequiredFieldEmpty"); let err = vm.$ay.t("ErrorRequiredFieldEmpty");
let fieldName = getControlLabel(ctrl); let fieldName = getControlLabel(ctrl);

View File

@@ -88,6 +88,8 @@
v-if="form().showMe(this, 'Items.WorkOrderItemSummary')" v-if="form().showMe(this, 'Items.WorkOrderItemSummary')"
cols="12" cols="12"
> >
servererrors:
{{ form().serverErrors(this, `items[${activeItemIndex}].notes`) }}
<v-textarea <v-textarea
v-model="value.items[activeItemIndex].notes" v-model="value.items[activeItemIndex].notes"
:readonly="formState.readOnly" :readonly="formState.readOnly"
@@ -96,7 +98,8 @@
:error-messages=" :error-messages="
form().serverErrors(this, `items[${activeItemIndex}].notes`) form().serverErrors(this, `items[${activeItemIndex}].notes`)
" "
ref="Items.Notes" :ref="`items[${activeItemIndex}].notes`"
:rules="[form().required(this, `items[${activeItemIndex}].notes`)]"
data-cy="Items.Notes" data-cy="Items.Notes"
@input="fieldValueChanged(`items[${activeItemIndex}].notes`)" @input="fieldValueChanged(`items[${activeItemIndex}].notes`)"
auto-grow auto-grow
@@ -115,8 +118,10 @@
:readonly="formState.readOnly" :readonly="formState.readOnly"
:disabled="isDeleted" :disabled="isDeleted"
:label="$ay.t('Sequence')" :label="$ay.t('Sequence')"
ref="sequence" :ref="`items[${activeItemIndex}].sequence`"
:rules="[form().integerValid(this, 'sequence')]" :rules="[
form().integerValid(this, `items[${activeItemIndex}].sequence`)
]"
:error-messages=" :error-messages="
form().serverErrors(this, `items[${activeItemIndex}].sequence`) form().serverErrors(this, `items[${activeItemIndex}].sequence`)
" "