- aggiornato la visualoizzazione per scaricare il PDF e per aprirlo
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
:prop_mytable="table"
|
||||
:options="tools.optionsTable(table)"
|
||||
:prop_mytitlenew="tools.getTitleAnnuncio(table)"
|
||||
prop_mytitle="Cataloghi"
|
||||
prop_mytitle=""
|
||||
:prop_mycolumns="col"
|
||||
:prop_colkey="prop_colkey"
|
||||
:col_title="col_title"
|
||||
|
||||
@@ -524,6 +524,7 @@
|
||||
row: opt.rowclass,
|
||||
'items-stretch': opt.rowclass,
|
||||
'justify-evenly': opt.rowclass,
|
||||
'q-col-gutter-y-md': opt.rowclass,
|
||||
}"
|
||||
>
|
||||
<div
|
||||
|
||||
@@ -2,8 +2,13 @@
|
||||
<q-card
|
||||
v-if="myrec"
|
||||
bordered
|
||||
class="full-height flex flex-column justify-evenly"
|
||||
:style="`width: ` + opt.widthcard + `; ` + (opt.heightcard ? `height: ` + opt.heightcard + `;` : '')"
|
||||
class="full-height justify-evenly catalog-card"
|
||||
:style="
|
||||
`width: ` +
|
||||
opt.widthcard +
|
||||
`; ` +
|
||||
(opt.heightcard ? `height: ` + opt.heightcard + `;` : '')
|
||||
"
|
||||
>
|
||||
<q-img
|
||||
:width="opt.widthimg"
|
||||
@@ -14,29 +19,38 @@
|
||||
:src="tools.getFullFileName([myrec.foto_collana], table, '', myrec._id)"
|
||||
>
|
||||
<template v-slot:error>
|
||||
<div class="absolute-full flex flex-center text-white">immagine non impostata</div>
|
||||
<div class="absolute-full flex flex-center text-white">
|
||||
immagine non impostata
|
||||
</div>
|
||||
</template>
|
||||
<!--<div class="text-h6 absolute-bottom text-left">
|
||||
{{ myrec.title }}
|
||||
</div>-->
|
||||
</q-img>
|
||||
|
||||
<q-card-section class="q-px-sm" style="margin-top: 0; flex-grow: 0; align-self: flex-start;">
|
||||
|
||||
<q-card-section
|
||||
class="q-px-sm"
|
||||
style="margin-top: 0; flex-grow: 0; align-self: flex-start"
|
||||
>
|
||||
<div
|
||||
class="q-mb-md text-center text-bold"
|
||||
style="font-size: 1.15rem"
|
||||
>
|
||||
<a
|
||||
:href="pagina_collegata"
|
||||
target="_blank"
|
||||
>{{ myrec.title }}</a
|
||||
>
|
||||
<div class="q-mb-md text-center text-bold">
|
||||
<span
|
||||
class="text-link"
|
||||
@click="naviga(pagina_collegata)"
|
||||
>
|
||||
{{ myrec.title }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="q-px-md">
|
||||
<div class="text-caption text-h7 text-grey q-pb-xs">
|
||||
<q-icon name="fas fa-list-ol" /> {{ $t('cataloglist.numprodotti') }}:
|
||||
<span :class="`text-` + (numprodottistr === 0 ? 'red' : 'blue')">{{ numprodottistr }}</span>
|
||||
<q-icon name="fas fa-list-ol" /> {{ $t('cataloglist.numprodotti') }}:
|
||||
<span :class="`text-` + (numprodottistr === 0 ? 'red' : 'blue')">{{
|
||||
numprodottistr
|
||||
}}</span>
|
||||
</div>
|
||||
<div
|
||||
v-if="!tools.isUtente() && dettagli"
|
||||
@@ -45,7 +59,11 @@
|
||||
<q-icon name="fas fa-user" /> {{ $t('cataloglist.referenti') }}:
|
||||
<span
|
||||
v-if="myrec.referenti && myrec.referenti.length > 0"
|
||||
:class="`text-bold ` + myrec.referenti && myrec.referenti.length > 0 ? 'text-blue' : 'text-red'"
|
||||
:class="
|
||||
`text-bold ` + myrec.referenti && myrec.referenti.length > 0
|
||||
? 'text-blue'
|
||||
: 'text-red'
|
||||
"
|
||||
>
|
||||
{{ myrec.referenti ? myrec.referenti.join(', ') : '' }}
|
||||
</span>
|
||||
@@ -103,18 +121,14 @@
|
||||
</div>
|
||||
<div
|
||||
v-if="myrec.pdf_online"
|
||||
class="text-caption text-h7 text-blue q-pb-xs"
|
||||
class="text-caption text-h7 text-grey q-pb-xs"
|
||||
>
|
||||
<q-icon name="fas fa-book" />
|
||||
<a
|
||||
:href="myrec.pdf_online"
|
||||
target="_blank"
|
||||
>PDF OnLine</a
|
||||
>
|
||||
aggiornato al ({{ tools.getstrDate(myrec.data_online) }})
|
||||
<q-icon name="fas fa-book" /> Aggiornato al ({{
|
||||
tools.getstrDate(myrec.data_online)
|
||||
}})
|
||||
</div>
|
||||
<div
|
||||
v-if="!tools.isUtente() && myrec.pdf_online_stampa && dettagli"
|
||||
v-if="!tools.isUtente() && myrec.pdf_online_stampa && dettagli"
|
||||
class="text-caption text-h7 text-blue q-pb-xs"
|
||||
>
|
||||
<q-icon name="fas fa-print" />
|
||||
@@ -130,8 +144,12 @@
|
||||
class="text-caption text-h7 text-grey q-pb-xs"
|
||||
>
|
||||
<q-icon name="fas fa-list" /> Lista generata il:
|
||||
<span :class="`text-` + (tools.isDateValid(myrec.data_lista_generata) ? 'blue' : 'red')"
|
||||
>{{ tools.getstrDate(myrec.data_lista_generata) || '(non ancora generata)' }} da
|
||||
<span
|
||||
:class="
|
||||
`text-` + (tools.isDateValid(myrec.data_lista_generata) ? 'blue' : 'red')
|
||||
"
|
||||
>{{ tools.getstrDate(myrec.data_lista_generata) || '(non ancora generata)' }}
|
||||
da
|
||||
{{ myrec.username_lista_generata }}
|
||||
</span>
|
||||
</div>
|
||||
@@ -140,11 +158,34 @@
|
||||
</q-card-section>
|
||||
|
||||
<q-card-actions
|
||||
v-if="!tools.isUtente() && dettagli"
|
||||
align="center"
|
||||
class="q-mt-auto q-mx-auto q-mb-sm"
|
||||
>
|
||||
<q-btn
|
||||
v-if="myrec.pdf_online"
|
||||
unelevated
|
||||
rounded
|
||||
color="primary"
|
||||
icon="fas fa-file-pdf"
|
||||
:label="`Apri PDF`"
|
||||
:href="tools.getURLByHostAndFilePath(myrec.pdf_online)"
|
||||
size="md"
|
||||
class="hover-lift"
|
||||
/>
|
||||
<q-btn
|
||||
v-if="myrec.pdf_online"
|
||||
unelevated
|
||||
rounded
|
||||
color="primary"
|
||||
icon="download"
|
||||
:label="`Scarica PDF`"
|
||||
:href="tools.getURLByHostAndFilePath(myrec.pdf_online)"
|
||||
download
|
||||
size="md"
|
||||
class="hover-lift"
|
||||
/>
|
||||
<q-fab
|
||||
v-if="!tools.isUtente() && dettagli"
|
||||
color="primary"
|
||||
icon="fas fa-caret-down"
|
||||
label="Menu"
|
||||
@@ -182,13 +223,13 @@
|
||||
icon="fas fa-pencil-alt"
|
||||
/>
|
||||
</q-fab>
|
||||
<q-btn
|
||||
<!--<q-btn
|
||||
flat
|
||||
color="primary"
|
||||
label="Info"
|
||||
icon="fas fa-info"
|
||||
@click="apriInfo = true"
|
||||
/>
|
||||
/>-->
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
|
||||
@@ -214,9 +255,15 @@
|
||||
class="q-ma-sm"
|
||||
>
|
||||
<CLabel
|
||||
:value="myrec.referenti && myrec.referenti.length > 0 ? myrec.referenti.join(', ') : '[Non Assegnato]'"
|
||||
:value="
|
||||
myrec.referenti && myrec.referenti.length > 0
|
||||
? myrec.referenti.join(', ')
|
||||
: '[Non Assegnato]'
|
||||
"
|
||||
:label="$t('cataloglist.referenti') + `:`"
|
||||
:color="myrec.referenti && myrec.referenti.length > 0 ? 'text-blue' : 'text-red'"
|
||||
:color="
|
||||
myrec.referenti && myrec.referenti.length > 0 ? 'text-blue' : 'text-red'
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
@@ -256,8 +303,9 @@
|
||||
>
|
||||
<CLabel
|
||||
:value="
|
||||
tools.getstrDate(myrec.data_lista_generata) + ' da ' + myrec.username_lista_generata ||
|
||||
'ancora non è stata generata'
|
||||
tools.getstrDate(myrec.data_lista_generata) +
|
||||
' da ' +
|
||||
myrec.username_lista_generata || 'ancora non è stata generata'
|
||||
"
|
||||
label="Lista generata"
|
||||
:color="myrec.pdf_generato ? 'green' : 'red'"
|
||||
|
||||
@@ -422,7 +422,6 @@ export default defineComponent({
|
||||
label: 'Magazz.',
|
||||
field: 'quantity',
|
||||
align: 'right',
|
||||
visu: costanti.VISUCAMPI.PER_EDITORE,
|
||||
},
|
||||
{
|
||||
name: 'actions',
|
||||
@@ -437,7 +436,7 @@ export default defineComponent({
|
||||
|
||||
const allColumnsComputed = computed(() => {
|
||||
return allColumns.value.filter(
|
||||
(col) => !col.visu || col.visu === costanti.VISUCAMPI.PER_TUTTI
|
||||
(col) => !col.visu || col.visu === costanti.VISUCAMPI.PER_TUTTI || (col.visu === costanti.VISUCAMPI.PER_EDITORE && tools.isCollaboratore())
|
||||
);
|
||||
});
|
||||
|
||||
@@ -448,6 +447,7 @@ export default defineComponent({
|
||||
if (props.table === shared_consts.TABLES_CATALOG) {
|
||||
selectedColumns.value = selectedColumns_Catalogs.value;
|
||||
} else {
|
||||
// "products"
|
||||
selectedColumns.value = tools.isUtente()
|
||||
? selectedColumns_Utenti.value
|
||||
: selectedColumns_Editori.value;
|
||||
|
||||
Reference in New Issue
Block a user