- Se inserisco un evento solo "On Line" non dovrebbe comparire obbligatorio il Comune.
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -548,7 +548,7 @@
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item v-if="myrec.mycities[0].comune">
|
||||
<q-item v-if="myrec.mycities && myrec.mycities.length > 0 && myrec.mycities[0].comune">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="amber" name="fas fa-map-marker-alt" />
|
||||
</q-item-section>
|
||||
|
||||
@@ -744,7 +744,7 @@
|
||||
</div>
|
||||
<div v-else>(Scegli)</div>
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.multioption">
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.multioption">
|
||||
<q-option-group
|
||||
v-model="myvalue"
|
||||
:inline="col.inline"
|
||||
|
||||
Reference in New Issue
Block a user