- Se inserisco un evento solo "On Line" non dovrebbe comparire obbligatorio il Comune.

This commit is contained in:
Surya Paolo
2024-02-28 15:02:08 +01:00
parent fe7e492a8d
commit 965f32b65c
5 changed files with 21 additions and 6 deletions

View File

@@ -1898,12 +1898,10 @@ export default defineComponent({
}
}
function enableSaveNewRec(newrec: boolean) {
function enableSaveNewRec(newrec: boolean, showmsg: boolean = true) {
const ok = true
const showmsg = true
let myrec = null
if (newrec) {
myrec = { ...newRecord.value }
@@ -1918,6 +1916,17 @@ export default defineComponent({
for (col of mycolumns.value) {
if (!msg) {
if (col.showonlyif_dipersona) {
const valori = myrec['idStatusSkill']
if (valori.length === 1 && valori.includes(shared_consts.STATUSSKILL_ONLINE)) {
col.required = false
} else {
col.required = true
}
col.visible = col.required
}
if (col.required) {
// console.log('newRecord.value', newRecord.value, newRecord.value[col.name])
if (tools.isArray(myrec[col.name])) {
@@ -2288,14 +2297,17 @@ export default defineComponent({
function update_col(col: string, value: string) {
// console.log('update_col', col, value)
if (col) {
if (newRecordBool.value) {
newRecord.value[col] = value
} else {
recModif.value[col] = value
}
}
enableSaveNewRec(newRecordBool.value, false)
}
function setShowMonth(row: any, index: number) {