- posso fare upload dell'immagine del prodotto dalla lista

- corretto import dati
This commit is contained in:
Surya Paolo
2024-03-02 22:53:35 +01:00
parent 93e58f444d
commit 71e4c91930
68 changed files with 240 additions and 161 deletions

View File

@@ -377,7 +377,7 @@
: ''
"
:title="tools.getTitleGall(table)"
:directory="tools.getDirectoryGall(myrow, table, path)"
:directory="tools.getDirectoryGall(myrow, table, mypath)"
:imgGall="myvalue"
:isInModif="isInModif"
:edit="isviewfield() && isInModif"
@@ -409,7 +409,71 @@
: ''
"
:title="tools.getTitleGall(table)"
:directory="tools.getDirectoryGall(myrow, table, path)"
:directory="tools.getDirectoryGall(myrow, table, mypath)"
:imgGall="[{ imagefile: myvalue }]"
:edit="isviewfield()"
:canModify="canModify"
:isInModif="isInModif"
:single="true"
@update:imgGall="changevalRec"
@showandsave="Savedb"
>
</CGallery>
</div>
<div v-else>
<div v-if="myvalue" class="text-center">
<q-img
:src="myvalue"
class="text-center"
style="height: 100px; width: 100px"
alt="foto"
>
</q-img>
</div>
<div v-else class="text-center">
<q-img
:src="
col.showpicprofile_ifnotset
? userStore.getImgByProfile(row['profile'], true)
: 'images/noimg-user.svg'
"
class="text-center"
style="height: 100px; width: 100px"
alt="nessuna immagine"
>
</q-img>
</div>
<q-btn
v-if="myvalue"
label="Rimuovi Foto"
color="blue"
icon="fas fa-trash-alt"
size="sm"
@click="removephoto"
></q-btn>
</div>
</div>
<div
v-else-if="col.fieldtype === costanti.FieldType.image_and_filename"
>
<div v-if="canEdit">
{{ $t('reg.photo') }}
<q-input
v-model="myvalue"
@update:value="changevalRec"
@update:model-value="Savedb"
:maxlength="col.maxlength ? col.maxlength : undefined"
autofocus
>
</q-input>
<CGallery
:imagebak="
col.showpicprofile_ifnotset
? userStore.getImgByProfile(row['profile'], true)
: ''
"
:title="tools.getTitleGall(table)"
:directory="tools.getDirectoryGall(myrow, table, mypath)"
:imgGall="[{ imagefile: myvalue }]"
:edit="isviewfield()"
:canModify="canModify"
@@ -464,7 +528,7 @@
: ''
"
:title="tools.getTitleGall(table)"
:directory="tools.getDirectoryGall(myrow, table, path)"
:directory="tools.getDirectoryGall(myrow, table, mypath)"
:imgGall="[myvalue]"
:edit="isviewfield()"
:canModify="canModify"
@@ -1055,7 +1119,7 @@
<q-popup-edit
v-if="!isInModif && canEdit && noPopupeditByCol(col)"
v-model="myvalue"
:disable="col.disable || disable"
:disable="(col.disable || disable) || (col.fieldtype === costanti.FieldType.image_and_filename)"
:readonly="col.disable || disable"
:title="col.title ? col.title : col.titlepopupedit"
buttons
@@ -1079,8 +1143,7 @@
col.fieldtype === costanti.FieldType.string ||
col.fieldtype === costanti.FieldType.crypted
"
>
>
<q-input
v-bind="$attrs"
counter
@@ -1097,9 +1160,9 @@
@keyup.enter.stop
autofocus
>
<template v-if="notAllowAtChar" v-slot:prepend>
<span class="text-h7 text-blue">@</span>
</template>
<template v-if="notAllowAtChar" v-slot:prepend>
<span class="text-h7 text-blue">@</span>
</template>
</q-input>
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.number">
@@ -1488,6 +1551,35 @@
</CMyEditor>
</div>
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.image_and_filename">
<div v-if="canEdit">
{{ $t('reg.photo') }}
<q-input
v-model="myvalue"
@update:value="changevalRec"
:maxlength="col.maxlength ? col.maxlength : undefined"
autofocus
>
</q-input>
<CGallery
:imagebak="
col.showpicprofile_ifnotset
? userStore.getImgByProfile(row['profile'], true)
: ''
"
:title="tools.getTitleGall(table)"
:directory="tools.getDirectoryGall(myrow, table, mypath)"
:imgGall="[{ imagefile: myvalue }]"
:edit="isviewfield()"
:canModify="canModify"
:isInModif="isInModif"
:single="true"
@update:imgGall="changevalRec"
@showandsave="Savedb"
>
</CGallery>
</div>
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.color">
<q-select
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"