This commit is contained in:
2021-05-06 23:57:57 +00:00
parent 6df2e27fb8
commit a2f33966d5
4 changed files with 9 additions and 3 deletions

View File

@@ -11,6 +11,7 @@ function addDataKeyNames(obj) {
obj[i]["dataKey"] = "c" + parseInt(obj[i].fld.replace(/^\D+/g, ""));
}
}
//return the whole thing again now translated
return obj;
}
@@ -30,6 +31,7 @@ export default {
if (res.error) {
throw new Error(window.$gz.errorHandler.errorToString(res, vm));
}
window.$gz.store.commit("setFormCustomTemplateItem", {
formKey: formKey,
concurrency: res.data.concurrency,

View File

@@ -10,6 +10,7 @@
<!-- <template v-for="item in this.$store.state.formCustomTemplate[formKey]"> -->
<template v-for="item in availableCustomFields">
<v-col :key="item.fld" cols="12" sm="6" lg="4" xl="3" px-2>
item:{{ item }}
<!-- DATETIME -->
<div v-if="item.type === 1">
<gz-date-time-picker
@@ -77,7 +78,7 @@
v-model="_self[item.dataKey]"
:readonly="readonly"
:disabled="disabled"
:label="$ay.t(item.fld)"
:label="$ay.t(item.tKey)"
:ref="item.fld"
:data-cy="item.fld"
:error-messages="form().serverErrors(parentVM, item.fld)"
@@ -86,7 +87,7 @@
parentVM,
item,
_self,
$ay.t(item.fld)
$ay.t(item.tKey)
)
]"
auto-grow
@@ -363,6 +364,7 @@ export default {
//In addition if there is a keyStartWith then there are multiple custom field controls on same form so that's a different route to take
let template = this.$store.state.formCustomTemplate[this.formKey];
// debugger;
//console.log("Template is: ", template);
if (template != undefined) {
if (this.keyStartWith != "") {

View File

@@ -313,7 +313,7 @@
:form-key="formCustomTemplateKey"
:readonly="formState.readOnly"
:parent-v-m="this"
key-start-with="WorkOrderItemCustom"
key-start-with="Items.WorkOrderItemCustom"
ref="customFields"
data-cy="customFields"
:error-messages="

View File

@@ -204,6 +204,7 @@ export default {
if (fldItem.visible == true) {
temp.push({
fld: fldItem.key,
tKey: fldItem.tKey,
required: fldItem.required,
type: fldItem.type
});
@@ -424,6 +425,7 @@ async function initDataObject(vm) {
let objItem = {
key: faf.fieldKey,
tKey: faf.tKey,
title: null,
custom: faf.isCustomField,
required: templateItem.required === true,