This commit is contained in:
@@ -11,6 +11,7 @@ function addDataKeyNames(obj) {
|
|||||||
obj[i]["dataKey"] = "c" + parseInt(obj[i].fld.replace(/^\D+/g, ""));
|
obj[i]["dataKey"] = "c" + parseInt(obj[i].fld.replace(/^\D+/g, ""));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//return the whole thing again now translated
|
//return the whole thing again now translated
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
@@ -30,6 +31,7 @@ export default {
|
|||||||
if (res.error) {
|
if (res.error) {
|
||||||
throw new Error(window.$gz.errorHandler.errorToString(res, vm));
|
throw new Error(window.$gz.errorHandler.errorToString(res, vm));
|
||||||
}
|
}
|
||||||
|
|
||||||
window.$gz.store.commit("setFormCustomTemplateItem", {
|
window.$gz.store.commit("setFormCustomTemplateItem", {
|
||||||
formKey: formKey,
|
formKey: formKey,
|
||||||
concurrency: res.data.concurrency,
|
concurrency: res.data.concurrency,
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
<!-- <template v-for="item in this.$store.state.formCustomTemplate[formKey]"> -->
|
<!-- <template v-for="item in this.$store.state.formCustomTemplate[formKey]"> -->
|
||||||
<template v-for="item in availableCustomFields">
|
<template v-for="item in availableCustomFields">
|
||||||
<v-col :key="item.fld" cols="12" sm="6" lg="4" xl="3" px-2>
|
<v-col :key="item.fld" cols="12" sm="6" lg="4" xl="3" px-2>
|
||||||
|
item:{{ item }}
|
||||||
<!-- DATETIME -->
|
<!-- DATETIME -->
|
||||||
<div v-if="item.type === 1">
|
<div v-if="item.type === 1">
|
||||||
<gz-date-time-picker
|
<gz-date-time-picker
|
||||||
@@ -77,7 +78,7 @@
|
|||||||
v-model="_self[item.dataKey]"
|
v-model="_self[item.dataKey]"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:label="$ay.t(item.fld)"
|
:label="$ay.t(item.tKey)"
|
||||||
:ref="item.fld"
|
:ref="item.fld"
|
||||||
:data-cy="item.fld"
|
:data-cy="item.fld"
|
||||||
:error-messages="form().serverErrors(parentVM, item.fld)"
|
:error-messages="form().serverErrors(parentVM, item.fld)"
|
||||||
@@ -86,7 +87,7 @@
|
|||||||
parentVM,
|
parentVM,
|
||||||
item,
|
item,
|
||||||
_self,
|
_self,
|
||||||
$ay.t(item.fld)
|
$ay.t(item.tKey)
|
||||||
)
|
)
|
||||||
]"
|
]"
|
||||||
auto-grow
|
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
|
//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];
|
let template = this.$store.state.formCustomTemplate[this.formKey];
|
||||||
// debugger;
|
// debugger;
|
||||||
|
//console.log("Template is: ", template);
|
||||||
|
|
||||||
if (template != undefined) {
|
if (template != undefined) {
|
||||||
if (this.keyStartWith != "") {
|
if (this.keyStartWith != "") {
|
||||||
|
|||||||
@@ -313,7 +313,7 @@
|
|||||||
:form-key="formCustomTemplateKey"
|
:form-key="formCustomTemplateKey"
|
||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly"
|
||||||
:parent-v-m="this"
|
:parent-v-m="this"
|
||||||
key-start-with="WorkOrderItemCustom"
|
key-start-with="Items.WorkOrderItemCustom"
|
||||||
ref="customFields"
|
ref="customFields"
|
||||||
data-cy="customFields"
|
data-cy="customFields"
|
||||||
:error-messages="
|
:error-messages="
|
||||||
|
|||||||
@@ -204,6 +204,7 @@ export default {
|
|||||||
if (fldItem.visible == true) {
|
if (fldItem.visible == true) {
|
||||||
temp.push({
|
temp.push({
|
||||||
fld: fldItem.key,
|
fld: fldItem.key,
|
||||||
|
tKey: fldItem.tKey,
|
||||||
required: fldItem.required,
|
required: fldItem.required,
|
||||||
type: fldItem.type
|
type: fldItem.type
|
||||||
});
|
});
|
||||||
@@ -424,6 +425,7 @@ async function initDataObject(vm) {
|
|||||||
|
|
||||||
let objItem = {
|
let objItem = {
|
||||||
key: faf.fieldKey,
|
key: faf.fieldKey,
|
||||||
|
tKey: faf.tKey,
|
||||||
title: null,
|
title: null,
|
||||||
custom: faf.isCustomField,
|
custom: faf.isCustomField,
|
||||||
required: templateItem.required === true,
|
required: templateItem.required === true,
|
||||||
|
|||||||
Reference in New Issue
Block a user