ridotto la scheda, se noshowifnone: true
This commit is contained in:
@@ -13,14 +13,17 @@
|
||||
<q-space></q-space>
|
||||
<div v-if="butt_modif_new">
|
||||
<q-btn
|
||||
v-if="mytable" rounded dense size="sm" flat :color="canEdit ? 'positive' : 'light-gray'"
|
||||
v-if="mytable && mytable !== 'myskills'" rounded dense size="sm" flat
|
||||
:color="canEdit ? 'positive' : 'light-gray'"
|
||||
:disable="disabilita()"
|
||||
:val="lists.MenuAction.CAN_EDIT_TABLE"
|
||||
icon="fas fa-pencil-alt" @update:model-value="changefuncAct"
|
||||
@click="canEdit = !canEdit">
|
||||
</q-btn>
|
||||
<q-btn
|
||||
v-if="mytable" rounded dense size="sm" flat color="light-gray"
|
||||
v-if="mytable" rounded size="md" color="primary"
|
||||
class="centermydiv"
|
||||
label="Aggiungi"
|
||||
:disable="loading"
|
||||
icon="fas fa-plus"
|
||||
@click="createNewRecord">
|
||||
@@ -231,9 +234,12 @@
|
||||
<div v-if="pagination.rowsNumber > 1 && prop_search">{{ pagination.rowsNumber }} elementi trovati</div>
|
||||
|
||||
<div v-if="finder" class="">
|
||||
<q-radio v-model="myvertical" :val="2" label="Lista" @update:model-value="tools.setCookie('myv', myvertical) "/>
|
||||
<q-radio v-model="myvertical" :val="-1" label="Scheda" @update:model-value="tools.setCookie('myv', myvertical) "/>
|
||||
<q-radio v-model="myvertical" :val="0" label="Tabella" @update:model-value="tools.setCookie('myv', myvertical) "/>
|
||||
<q-radio v-model="myvertical" :val="2" label="Lista"
|
||||
@update:model-value="tools.setCookie('myv', myvertical) "/>
|
||||
<q-radio v-model="myvertical" :val="-1" label="Scheda"
|
||||
@update:model-value="tools.setCookie('myv', myvertical) "/>
|
||||
<q-radio v-model="myvertical" :val="0" label="Tabella"
|
||||
@update:model-value="tools.setCookie('myv', myvertical) "/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -320,7 +326,10 @@
|
||||
<q-card-section class="inset-shadow">
|
||||
<q-list dense>
|
||||
<div v-for="col in mycolumns" :key="col.name">
|
||||
<q-item v-if="colVisib.includes(col.field + col.subfield)" :class="clByCol(col)" class="riduci_pad">
|
||||
<q-item v-if="colVisib.includes(col.field + col.subfield) &&
|
||||
!col.noshowifnone || (col.noshowifnone && !!props.row.value)"
|
||||
:class="clByCol(col)" class="riduci_pad">
|
||||
|
||||
<q-item-section avatar v-if="visuIntestazCol(col)">
|
||||
<q-item-label class="q-table__col">{{ col.label }}</q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
:pickup="pickup"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
||||
:useinput="false">
|
||||
</CMySelect>
|
||||
</div>
|
||||
@@ -177,7 +177,7 @@
|
||||
:pickup="pickup"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
||||
:useinput="false">
|
||||
</CMySelect>
|
||||
</div>
|
||||
@@ -217,11 +217,11 @@
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.binary">
|
||||
<div v-if="isInModif">
|
||||
<span v-if="insertMode">
|
||||
{{col.label }}:
|
||||
{{ col.label }}:
|
||||
</span>
|
||||
<CMyToggleList
|
||||
:label="col.titlepopupedit"
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
||||
v-model:value="myvalue"
|
||||
@update:value="changevalRec"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
@@ -233,7 +233,7 @@
|
||||
:type="costanti.FieldType.binary"
|
||||
:value="myvalue"
|
||||
@update:value="changevalRec"
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||
@@ -253,7 +253,7 @@
|
||||
:display-value="fieldsTable.getTitleByTable(col.jointable)"
|
||||
emit-value
|
||||
map-options
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
||||
class="combowidth"
|
||||
:option-value="fieldsTable.getKeyByTable(col.jointable)"
|
||||
@update:model-value="changevalRec">
|
||||
@@ -278,13 +278,14 @@
|
||||
:type="col.fieldtype"
|
||||
@update:value="changevalRec"
|
||||
:value="myvalue"
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="(col.fieldtype === costanti.FieldType.select) || (col.fieldtype === costanti.FieldType.select_by_server)">
|
||||
<div
|
||||
v-else-if="(col.fieldtype === costanti.FieldType.select) || (col.fieldtype === costanti.FieldType.select_by_server)">
|
||||
<div v-if="isInModif">
|
||||
<CMySelect
|
||||
:label="col.label"
|
||||
@@ -294,7 +295,7 @@
|
||||
@update:value="changevalRec"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
||||
:useinput="false">
|
||||
</CMySelect>
|
||||
</div>
|
||||
@@ -304,7 +305,7 @@
|
||||
:type="col.fieldtype"
|
||||
@update:value="changevalRec"
|
||||
v-model:value="myvalue"
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||
@@ -324,8 +325,9 @@
|
||||
color="primary"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
:useinput="true">
|
||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
||||
:sola_lettura="!isInModif"
|
||||
:useinput="isInModif">
|
||||
</CMySelect>
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.star5">
|
||||
@@ -336,7 +338,7 @@
|
||||
@update:value="changevalRec"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
||||
:useinput="false">
|
||||
</CMySelect>
|
||||
</div>
|
||||
@@ -493,7 +495,8 @@
|
||||
</q-input>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="(col.fieldtype === costanti.FieldType.select) || (col.fieldtype === costanti.FieldType.select_by_server)">
|
||||
<div
|
||||
v-else-if="(col.fieldtype === costanti.FieldType.select) || (col.fieldtype === costanti.FieldType.select_by_server)">
|
||||
<CMySelect
|
||||
:label="col.label"
|
||||
v-model:value="scope.value"
|
||||
@@ -501,12 +504,11 @@
|
||||
:tablesel="col.type === costanti.FieldType.select_by_server ? tablesel : ''"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
||||
:useinput="false">
|
||||
</CMySelect>
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.multiselect_by_server">
|
||||
myvalue2 : {{scope.value}}
|
||||
<CMySelect
|
||||
:multiselect_by_server="true"
|
||||
:label="col.label"
|
||||
@@ -520,7 +522,7 @@
|
||||
color="primary"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
||||
:useinput="true">
|
||||
</CMySelect>
|
||||
</div>
|
||||
@@ -535,7 +537,7 @@
|
||||
:display-value="fieldsTable.getTitleByTable(col.jointable)"
|
||||
emit-value
|
||||
map-options
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
||||
class="combowidth"
|
||||
:option-value="fieldsTable.getKeyByTable(col.jointable)"
|
||||
@update:model-value="changeval">
|
||||
@@ -588,7 +590,7 @@
|
||||
|
||||
<CMyToggleList
|
||||
:label="col.titlepopupedit"
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
||||
v-model:value="scope.value"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)">
|
||||
@@ -600,7 +602,7 @@
|
||||
v-model:value="scope.value"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
||||
:useinput="false">
|
||||
</CMySelect>
|
||||
</div>
|
||||
|
||||
@@ -78,6 +78,10 @@ export default defineComponent({
|
||||
multiselect_by_server: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
sola_lettura: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
}
|
||||
},
|
||||
components: {},
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<div class="text-center">
|
||||
<div v-if="multiselect_by_server">
|
||||
<q-select
|
||||
v-bind="$attrs"
|
||||
:model-value="myarrvalue"
|
||||
label-color="primary"
|
||||
:label="label"
|
||||
@@ -16,7 +17,8 @@
|
||||
map-options
|
||||
stack-label
|
||||
emit-value
|
||||
:use-input="true"
|
||||
:readonly="sola_lettura"
|
||||
:use-input="useinput"
|
||||
:dense="dense"
|
||||
:input-class="myclass"
|
||||
:options="valori"
|
||||
@@ -35,7 +37,7 @@
|
||||
<template v-slot:selected-item="scope">
|
||||
<div v-if="scope.opt[fieldsTable.getLabelByTable(tablesel)]">
|
||||
<q-chip
|
||||
removable
|
||||
:removable="!sola_lettura"
|
||||
dense
|
||||
@remove="scope.removeAtIndex(scope.index)"
|
||||
v-if="checkIfShowRec(scope.opt)"
|
||||
|
||||
@@ -498,8 +498,11 @@ export interface IColGridTable {
|
||||
tipovisu?: number
|
||||
link?: string
|
||||
jointable?: string
|
||||
addall?: boolean
|
||||
filter?: any
|
||||
resultjoin?: string[]
|
||||
visuonlyEditVal?: boolean
|
||||
noshowifnone?: boolean
|
||||
notShowInNewRec?: boolean
|
||||
tablesel?: string
|
||||
}
|
||||
|
||||
@@ -65,6 +65,9 @@ function AddCol(params: IColGridTable) {
|
||||
askaction: (params.askaction === undefined) ? '' : params.askaction,
|
||||
tablesel: (params.tablesel === undefined) ? '' : params.tablesel,
|
||||
jointable: (params.jointable === undefined) ? '' : params.jointable,
|
||||
addall: (params.addall === undefined) ? false : params.addall,
|
||||
filter: (params.filter === undefined) ? null : params.filter,
|
||||
noshowifnone: (params.noshowifnone === undefined) ? false : params.noshowifnone,
|
||||
notShowInNewRec: (params.notShowInNewRec === undefined) ? false : params.notShowInNewRec,
|
||||
}
|
||||
}
|
||||
@@ -426,18 +429,21 @@ export const colmySkills = [
|
||||
fieldtype: costanti.FieldType.star5,
|
||||
required: true,
|
||||
jointable: 'levels',
|
||||
noshowifnone: true,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'idStatusSkill',
|
||||
label_trans: 'statusSkill.name',
|
||||
fieldtype: costanti.FieldType.multiselect,
|
||||
jointable: 'statusSkills',
|
||||
noshowifnone: true,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'idContribType',
|
||||
label_trans: 'contribtype.name',
|
||||
fieldtype: costanti.FieldType.multiselect,
|
||||
jointable: 'contribtypes',
|
||||
noshowifnone: true,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'idCity',
|
||||
@@ -451,9 +457,10 @@ export const colmySkills = [
|
||||
label_trans: 'skill.photos',
|
||||
fieldtype: costanti.FieldType.listimages,
|
||||
jointable: '',
|
||||
noshowifnone: true,
|
||||
}),
|
||||
AddCol({ name: 'subTitle', label_trans: 'skill.note', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'note', label_trans: 'proj.longdescr', fieldtype: costanti.FieldType.html }),
|
||||
AddCol({ name: 'note', label_trans: 'proj.longdescr', fieldtype: costanti.FieldType.html, noshowifnone: true }),
|
||||
AddCol(DuplicateRec),
|
||||
AddCol(ModifRec),
|
||||
AddCol(DeleteRec),
|
||||
|
||||
Reference in New Issue
Block a user