This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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 != "") {
|
||||
|
||||
@@ -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="
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user