- 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 ok = true
|
||||||
|
|
||||||
const showmsg = true
|
|
||||||
|
|
||||||
let myrec = null
|
let myrec = null
|
||||||
if (newrec) {
|
if (newrec) {
|
||||||
myrec = { ...newRecord.value }
|
myrec = { ...newRecord.value }
|
||||||
@@ -1918,6 +1916,17 @@ export default defineComponent({
|
|||||||
|
|
||||||
for (col of mycolumns.value) {
|
for (col of mycolumns.value) {
|
||||||
if (!msg) {
|
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) {
|
if (col.required) {
|
||||||
// console.log('newRecord.value', newRecord.value, newRecord.value[col.name])
|
// console.log('newRecord.value', newRecord.value, newRecord.value[col.name])
|
||||||
if (tools.isArray(myrec[col.name])) {
|
if (tools.isArray(myrec[col.name])) {
|
||||||
@@ -2288,14 +2297,17 @@ export default defineComponent({
|
|||||||
function update_col(col: string, value: string) {
|
function update_col(col: string, value: string) {
|
||||||
// console.log('update_col', col, value)
|
// console.log('update_col', col, value)
|
||||||
|
|
||||||
|
|
||||||
if (col) {
|
if (col) {
|
||||||
if (newRecordBool.value) {
|
if (newRecordBool.value) {
|
||||||
newRecord.value[col] = value
|
newRecord.value[col] = value
|
||||||
} else {
|
} else {
|
||||||
recModif.value[col] = value
|
recModif.value[col] = value
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enableSaveNewRec(newRecordBool.value, false)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setShowMonth(row: any, index: number) {
|
function setShowMonth(row: any, index: number) {
|
||||||
|
|||||||
@@ -548,7 +548,7 @@
|
|||||||
</q-item-label>
|
</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</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-item-section avatar>
|
||||||
<q-icon color="amber" name="fas fa-map-marker-alt" />
|
<q-icon color="amber" name="fas fa-map-marker-alt" />
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
|||||||
@@ -772,6 +772,7 @@ export interface IColGridTable {
|
|||||||
remote_table?: string
|
remote_table?: string
|
||||||
remote_key?: string
|
remote_key?: string
|
||||||
remote_field?: string
|
remote_field?: string
|
||||||
|
showonlyif_dipersona?: boolean
|
||||||
field_extra1?: string
|
field_extra1?: string
|
||||||
field_toduplicate_nospace?: string
|
field_toduplicate_nospace?: string
|
||||||
showLinkResult?: string
|
showLinkResult?: string
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ function AddCol(params: IColGridTable) {
|
|||||||
remote_table: (params.remote_table === undefined) ? '' : params.remote_table,
|
remote_table: (params.remote_table === undefined) ? '' : params.remote_table,
|
||||||
remote_key: (params.remote_key === undefined) ? '' : params.remote_key,
|
remote_key: (params.remote_key === undefined) ? '' : params.remote_key,
|
||||||
remote_field: (params.remote_field === undefined) ? '' : params.remote_field,
|
remote_field: (params.remote_field === undefined) ? '' : params.remote_field,
|
||||||
|
showonlyif_dipersona: (params.showonlyif_dipersona === undefined) ? false : params.showonlyif_dipersona,
|
||||||
maxlength: (params.maxlength === undefined) ? 0 : params.maxlength,
|
maxlength: (params.maxlength === undefined) ? 0 : params.maxlength,
|
||||||
minlength: (params.minlength === undefined) ? 0 : params.minlength,
|
minlength: (params.minlength === undefined) ? 0 : params.minlength,
|
||||||
filter_field: (params.filter_field === undefined) ? '' : params.filter_field,
|
filter_field: (params.filter_field === undefined) ? '' : params.filter_field,
|
||||||
@@ -1245,6 +1246,7 @@ export const colmySkills = [
|
|||||||
remote_key: '_id',
|
remote_key: '_id',
|
||||||
remote_field: 'comune',
|
remote_field: 'comune',
|
||||||
required: true,
|
required: true,
|
||||||
|
showonlyif_dipersona: true,
|
||||||
numpag_carousel: 2,
|
numpag_carousel: 2,
|
||||||
}),
|
}),
|
||||||
AddCol({
|
AddCol({
|
||||||
|
|||||||
Reference in New Issue
Block a user