Aggiornamento cataloghi...

This commit is contained in:
Surya Paolo
2025-04-11 18:49:42 +02:00
parent cea3bcfa0e
commit 3616e2ca0f
44 changed files with 593 additions and 206 deletions

View File

@@ -82,7 +82,7 @@
(col.tipovisu !== costanti.TipoVisu.LINK || (col.tipovisu === costanti.TipoVisu.LINK && myvalue))
"
>
<span class="extrafield">{{ $t(col.extrafield) }}</span>
<span class="extrafield">{{ t(col.extrafield) }}</span>
</span>
</div>
<div v-if="canModify">
@@ -92,7 +92,7 @@
:minlength="col.minlength ? col.minlength : undefined"
v-model="myvalue"
@update:model-value="changevalRec"
:label="col.visulabel ? addstrrequired + $t(col.label_trans) : undefined"
:label="col.visulabel ? addstrrequired + t(col.label_trans) : undefined"
:autogrow="col.fieldtype !== costanti.FieldType.crypted"
@keyup.enter.stop
autofocus
@@ -205,7 +205,7 @@
@update:model-value="changevalRec"
autofocus
:rules="[(val) => !!val || !col.required || 'Campo richiesto']"
:label="col.visulabel ? addstrrequired + $t(col.label_trans) : col.label"
:label="col.visulabel ? addstrrequired + t(col.label_trans) : col.label"
>
</q-input>
<q-field v-if="col.showLinkResult && myvalue">
@@ -219,7 +219,7 @@
<CLabel
v-bind="$attrs"
:value="myvalue"
:label="$t(col.label_trans)"
:label="t(col.label_trans)"
/>
</div>
<div v-else>
@@ -290,10 +290,11 @@
<div v-else-if="col.fieldtype === costanti.FieldType.number || col.fieldtype === costanti.FieldType.currency">
<div v-if="canEdit || isInModif">
<div>
<CInput
v-model="myvalue"
:label="col.visulabel ? $t(col.label_trans) : visulabel ? addstrrequired + $t(col.label_trans) : undefined"
:label="
col.visulabel ? t(col.label_trans) : visulabel ? addstrrequired + t(col.label_trans) : undefined
"
:dense="dense"
@savedb="Savedb"
/>
@@ -304,7 +305,7 @@
:symbol="tools.getSymbolByCircuit(row)"
:color="tools.getColorByCircuit(row)"
v-model="myvalue"
:label="$t(col.label_trans)"
:label="t(col.label_trans)"
>
</CCurrencyValue>
</div>
@@ -331,13 +332,15 @@
</div>
<div v-else>
<CInput
v-model="myvalue"
:label="col.visulabel ? $t(col.label_trans) : visulabel ? addstrrequired + $t(col.label_trans) : undefined"
:dense="dense"
@savedb="changevalRec"
:maxlength="col.maxlength ? col.maxlength : undefined"
autofocus
/>
v-model="myvalue"
:label="
col.visulabel ? t(col.label_trans) : visulabel ? addstrrequired + t(col.label_trans) : undefined
"
:dense="dense"
@savedb="changevalRec"
:maxlength="col.maxlength ? col.maxlength : undefined"
autofocus
/>
</div>
</div>
<div
@@ -345,7 +348,7 @@
style="text-align: center"
>
<span class="text-h7 text-weight-bold row justify-center">
{{ $t(col.label_trans) }}
{{ t(col.label_trans) }}
</span>
<CGallery
:imagebak="
@@ -384,7 +387,7 @@
>
<div v-if="canEdit">
<span class="text-h7 text-weight-bold row justify-center">
{{ $t(col.label_trans ? col.label_trans : '') }}
{{ t(col.label_trans ? col.label_trans : '') }}
</span>
<CGallery
:imagebak="col.showpicprofile_ifnotset ? userStore.getImgByProfile(row['profile'], true) : ''"
@@ -441,7 +444,7 @@
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.image_and_filename">
<div v-if="canEdit">
{{ $t('reg.photo') }}
{{ t('reg.photo') }}
<q-input
v-model="myvalue"
@update:value="changevalRec"
@@ -505,7 +508,7 @@
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.imgcard">
<div v-if="canEdit">
{{ $t('reg.photo') }}
{{ t('reg.photo') }}
<CSelectImage
v-bind="$attrs"
:imagebak="col.showpicprofile_ifnotset ? userStore.getImgByProfile(row['profile'], true) : ''"
@@ -568,7 +571,7 @@
:type_out="col.field_outtype"
:col="col"
:row="row"
:label="col.label ? col.label : $t(col.label_trans)"
:label="col.label ? col.label : t(col.label_trans)"
v-model:value="myvalue"
@update:value="changevalRec"
:tablesel="tablesel"
@@ -594,7 +597,7 @@
:type_out="col.field_outtype"
:col="col"
:row="row"
:label="col.label ? col.label : $t(col.label_trans)"
:label="col.label ? col.label : t(col.label_trans)"
v-model:value="myvalue"
@update:value="changevalRec"
:tablesel="tablesel"
@@ -615,7 +618,11 @@
<div v-if="myvalue">
<CDateTime
:label="
col.label ? addstrrequired + col.label : col.label_trans ? addstrrequired + $t(col.label_trans) : undefined
col.label
? addstrrequired + col.label
: col.label_trans
? addstrrequired + t(col.label_trans)
: undefined
"
:class="{ 'cursor-pointer': canEdit }"
v-model:value="myvalue"
@@ -640,7 +647,11 @@
<div v-if="myvalue">
<CDateTime
:label="
col.label ? addstrrequired + col.label : col.label_trans ? addstrrequired + $t(col.label_trans) : undefined
col.label
? addstrrequired + col.label
: col.label_trans
? addstrrequired + t(col.label_trans)
: undefined
"
:class="{ 'cursor-pointer': canEdit }"
v-model:value="myvalue"
@@ -656,7 +667,7 @@
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.binary">
<div v-if="isInModif">
<span v-if="insertMode"> {{ col.label ? col.label : $t(col.label_trans) }}: </span>
<span v-if="insertMode"> {{ col.label ? col.label : t(col.label_trans) }}: </span>
<CMyToggleList
:label="col.titlepopupedit ? col.titlepopupedit : undefined"
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.addnone, col.filter)"
@@ -689,7 +700,7 @@
:row="row"
:multiple="true"
:withToggle="true"
:label="col.label ? col.label : $t(col.label_trans)"
:label="col.label ? col.label : t(col.label_trans)"
:filter_table="col.filter_table"
:filter_field="col.filter_field"
:value_extra="value_extra"
@@ -769,7 +780,7 @@
v-model="myvalue"
:inline="col.inline"
:type="col.typeobj"
:label="col.label ? col.label : $t(col.label_trans)"
:label="col.label ? col.label : t(col.label_trans)"
@update:model-value="changevalRec"
:options="globalStore.getTableJoinLabelValueByName(col)"
></q-option-group>
@@ -792,7 +803,7 @@
:type_out="col.field_outtype"
:col="col"
:row="row"
:label="col.label ? col.label : $t(col.label_trans)"
:label="col.label ? col.label : t(col.label_trans)"
v-model:value="myvalue"
:pickup="col.fieldtype === costanti.FieldType.select_by_server"
:tablesel="col.fieldtype === costanti.FieldType.select_by_server ? tablesel : ''"
@@ -814,13 +825,13 @@
</div>
<div v-else>
<!--
rec: {{rec}}
row: {{row}}
col.jointable {{col.jointable}}
myvalue {{myvalue}}
opt: {{globalStore.getTableJoinByName(col.jointable, col.addall, col.addnone, col.filter)}}
val: {{fieldsTable.getKeyByTable(col.jointable)}}
lab: {{fieldsTable.getLabelByTable(col.jointable)}}-->
rec: {{rec}}<br><br>
row: {{row}}<br><br>
col.jointable {{col.jointable}}<br><br>
myvalue {{myvalue}}<br><br>
opt: {{globalStore.getTableJoinByName(col.jointable, col.addall, col.addnone, col.filter)}}<br><br>
val: {{fieldsTable.getKeyByTable(col.jointable)}}<br><br>
lab: {{fieldsTable.getLabelByTable(col.jointable)}}<br><br>-->
<CMyChipList
:rec="row"
myclass="text-center"
@@ -844,7 +855,7 @@
:col="col"
:row="row"
:multiselect_by_server="true"
:label="col.label ? col.label : $t(col.label_trans)"
:label="col.label ? col.label : t(col.label_trans)"
v-model:arrvalue="myvalue"
@update:arrvalue="changevalRec"
:addall="false"
@@ -873,7 +884,7 @@
:type_out="col.field_outtype"
:col="col"
:row="row"
:label="col.label ? col.label : $t(col.label_trans)"
:label="col.label ? col.label : t(col.label_trans)"
v-model:value="myvalue"
@update:value="changevalRec"
:filter_table="col.filter_table"
@@ -908,8 +919,8 @@
:dense="dense"
class="bg-primary text-white"
>
<span v-if="col.label_trans">{{ $t(col.label_trans) }}</span
><span v-else> {{ $t('event.testo_di_spiegazione') }}: </span>
<span v-if="col.label_trans">{{ t(col.label_trans) }}</span
><span v-else> {{ t('event.testo_di_spiegazione') }}: </span>
<q-space />
</q-bar>
<div v-if="!isFieldDb()">
@@ -1034,18 +1045,20 @@
</div>
<q-popup-edit
ref="popupEditRef"
v-if="!isInModif && canEdit && noPopupeditByCol(col)"
v-model="myvalue"
:disable="col.disable || disable || col.fieldtype === costanti.FieldType.image_and_filename"
:readonly="col.disable || disable"
:title="col.title ? col.title : col.titlepopupedit"
buttons
:label-set="$t('dialog.save')"
:label-cancel="$t('dialog.cancel')"
:label-set="t('dialog.save')"
:label-cancel="t('dialog.cancel')"
persistent
@save="SaveValueInt"
@show="OpenEdit"
v-slot="scope"
@cancel="handleCancel"
>
<div v-if="col.fieldtype === costanti.FieldType.boolean">
<q-checkbox
@@ -1065,9 +1078,10 @@
:maxlength="col.maxlength ? col.maxlength : undefined"
:minlength="col.minlength ? col.minlength : undefined"
v-model="scope.value"
:label="col.visulabel ? addstrrequired + $t(col.label_trans) : undefined"
:label="col.visulabel ? addstrrequired + t(col.label_trans) : undefined"
:autogrow="col.fieldtype !== costanti.FieldType.crypted"
@keyup.enter.stop
@keydown="handleKeydown"
autofocus
:rules="[(val) => !!val || !col.required || 'Campo richiesto']"
>
@@ -1087,7 +1101,7 @@
debounce="1000"
:maxlength="col.maxlength ? col.maxlength : undefined"
autofocus
:label="col.visulabel ? $t(col.label_trans) : visulabel ? addstrrequired + col.label : undefined"
:label="col.visulabel ? t(col.label_trans) : visulabel ? addstrrequired + col.label : undefined"
>
</q-input>
</div>
@@ -1100,7 +1114,7 @@
:symbol="tools.getSymbolByCircuit(row)"
:color="tools.getColorByCircuit(row)"
v-model="scope.value"
:label="$t(col.label_trans)"
:label="t(col.label_trans)"
>
</CCurrencyValue>
</div>
@@ -1121,7 +1135,7 @@
autofocus
@update:model-value="changevalRec"
style="max-width: 100px"
:label="col.label ? col.label : $t(col.label_trans)"
:label="col.label ? col.label : t(col.label_trans)"
>
</q-input>
</div>
@@ -1162,7 +1176,7 @@
:type_out="col.field_outtype"
:col="col"
:row="row"
:label="col.label ? col.label : $t(col.label_trans)"
:label="col.label ? col.label : t(col.label_trans)"
v-model:value="scope.value"
:pickup="col.fieldtype === costanti.FieldType.select_by_server"
:addnone="col.addnone"
@@ -1186,7 +1200,7 @@
:col="col"
:row="row"
:multiselect_by_server="true"
:label="col.label ? col.label : $t(col.label_trans)"
:label="col.label ? col.label : t(col.label_trans)"
v-model:arrvalue="scope.value"
@update:arrvalue="changevalRec"
:addall="false"
@@ -1210,18 +1224,17 @@
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.multiselect">
<CMySelect
v-if="scope.value"
:type_out="col.field_outtype"
:col="col"
:row="row"
:multiple="true"
:withToggle="true"
:label="col.label ? col.label : $t(col.label_trans)"
:label="col.label ? col.label : col.label_trans ? t(col.label_trans) : ''"
:filter_table="col.filter_table"
:filter_field="col.filter_field"
:value_extra="value_extra"
v-model:arrvalue="scope.value"
@update:arrvalue="changevalRec"
:addall="false"
:addnone="false"
label-color="primary"
class="combowidth"
@@ -1288,7 +1301,7 @@
:type_out="col.field_outtype"
:col="col"
:row="row"
:label="col.label ? col.label : $t(col.label_trans)"
:label="col.label ? col.label : t(col.label_trans)"
v-model:value="scope.value"
@update:value="changevalRec"
:tablesel="tablesel"
@@ -1312,7 +1325,7 @@
:type_out="col.field_outtype"
:col="col"
:row="row"
:label="col.label ? col.label : $t(col.label_trans)"
:label="col.label ? col.label : t(col.label_trans)"
v-model:value="scope.value"
@update:value="changevalRec"
:tablesel="tablesel"
@@ -1329,7 +1342,11 @@
<div v-else-if="col.fieldtype === costanti.FieldType.date">
<CDateTime
:label="
col.label ? addstrrequired + col.label : col.label_trans ? addstrrequired + $t(col.label_trans) : undefined
col.label
? addstrrequired + col.label
: col.label_trans
? addstrrequired + t(col.label_trans)
: undefined
"
:class="{ 'cursor-pointer': canEdit }"
v-model:value="myvalue"
@@ -1343,7 +1360,7 @@
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.onlydate">
<CDateTime
:label="col.label ? addstrrequired + col.label : addstrrequired + $t(col.label_trans)"
:label="col.label ? addstrrequired + col.label : addstrrequired + t(col.label_trans)"
:class="{ 'cursor-pointer': canEdit }"
:valueDate="myvalue"
v-model:value="myvalue"
@@ -1372,7 +1389,7 @@
:maxlength="col.maxlength ? col.maxlength : undefined"
:minlength="col.minlength ? col.minlength : undefined"
v-model="scope.value"
:label="col.visulabel ? addstrrequired + $t(col.label_trans) : undefined"
:label="col.visulabel ? addstrrequired + t(col.label_trans) : undefined"
:autogrow="col.fieldtype !== costanti.FieldType.crypted"
@keyup.enter.stop
autofocus
@@ -1384,7 +1401,7 @@
:type_out="col.field_outtype"
:col="col"
:row="row"
:label="col.label ? col.label : $t(col.label_trans)"
:label="col.label ? col.label : t(col.label_trans)"
v-model:value="scope.value"
:optval="fieldsTable.getKeyByTable(col.jointable)"
:optlab="fieldsTable.getLabelByTable(col.jointable)"
@@ -1422,7 +1439,7 @@
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.image_and_filename">
<div v-if="canEdit">
{{ $t('reg.photo') }}
{{ t('reg.photo') }}
<q-input
v-model="myvalue"
@update:value="changevalRec"