- Cataloghi aggiornamento...

This commit is contained in:
Surya Paolo
2025-02-11 18:58:06 +01:00
parent 3d0e307e42
commit 0ad4dcff75
23 changed files with 272 additions and 99 deletions

View File

@@ -14,7 +14,7 @@ import { useRouter } from 'vue-router'
import { useCalendarStore } from '@src/store/CalendarStore'
import { useGlobalStore } from '@src/store/globalStore'
import { ICollana, IPublisher } from "@src/model/Products"
import { ICatProd, ICollana, IPublisher } from "@src/model/Products"
import { useProducts } from '@src/store/Products'
export default defineComponent({
@@ -62,6 +62,7 @@ export default defineComponent({
const statecolor = ref('negative')
const apriInfo = ref(false)
const collanestr = ref('')
const argomentistr = ref('')
const editorestr = ref('')
const products = useProducts()
@@ -106,6 +107,13 @@ export default defineComponent({
collanestr.value += reccoll.title + ' '
}
}
argomentistr.value = ''
if (myrec.value.argomenti) {
for (const arg of myrec.value.argomenti!) {
const recargomento: ICatProd = products.catprods!.find((catprod: ICatProd) => catprod._id === arg)
argomentistr.value += recargomento.name + ' '
}
}
editorestr.value = ''
if (myrec.value.editore) {
for (const receditore of myrec.value.editore!) {
@@ -198,6 +206,7 @@ export default defineComponent({
editorestr,
pagina_collegata,
esiste_descrintro,
argomentistr,
}
},
})

View File

@@ -4,7 +4,7 @@
v-if="myrec"
flat
bordered
:style="`width: ` + opt.widthcard + `; height: 540px;`"
:style="`width: ` + opt.widthcard + `; `"
>
<!--<q-skeleton
v-if="!myrec.foto_collana"
@@ -17,6 +17,7 @@
@click="apriInfo = true"
:height="opt.heightcard"
class="clickable-image"
fit="cover"
:src="
tools.getFullFileName(
[myrec.foto_collana],
@@ -31,21 +32,20 @@
immagine non impostata
</div>
</template>
<div class="text-h6 absolute-bottom text-left">
<!--<div class="text-h6 absolute-bottom text-left">
{{ myrec.title }}
</div>
</div>-->
</q-img>
<q-card-section>
<div
v-if="!myrec.foto_collana"
class="q-mt-sm q-mb-xs"
style="font-size: 1.15rem"
>
{{ myrec.title }}
</div>
<div class="text-caption text-h7 text-grey">
<q-icon name="fas fa-user" /> Referente:
<q-icon name="fas fa-user" /> {{$t('cataloglist.referenti')}}:
<span
v-if="myrec.referenti && myrec.referenti.length > 0"
:class="
@@ -61,11 +61,15 @@
</span>
</div>
<div v-if="collanestr" class="text-caption text-h7 text-grey">
<q-icon name="fas fa-book" /> Collana:
<q-icon name="fas fa-book" /> {{t('cataloglist.collane')}}:
<span class="text-blue">{{ collanestr }}</span>
</div>
<div v-if="argomentistr" class="text-caption text-h7 text-grey">
<q-icon name="fas fa-book" /> {{$t('cataloglist.argomenti')}}:
<span class="text-blue">{{ argomentistr }}</span>
</div>
<div v-if="editorestr" class="text-caption text-h7 text-grey">
<q-icon name="fas fa-book-open" /> Editore:
<q-icon name="fas fa-book-open" /> {{$t('cataloglist.referenti')}}:
<span class="text-blue">{{ editorestr }}</span>
</div>
<div v-if="!esiste_descrintro" class="text-caption text-h7 text-grey">
@@ -109,7 +113,7 @@
<!--<div class="text-overline text-orange-9">{{collanestr}}</div>-->
</q-card-section>
<q-card-actions>
<q-card-actions align="center">
<div class="row justify-center">
<q-fab
color="primary"
@@ -120,20 +124,22 @@
dense
>
<q-fab-action
v-if="tools.canModifyThisRec(myrec, table) || editOn"
v-if="tools.canModifyThisRec(myrec, table) || tools.isManager() || editOn"
@click="cmdExt(costanti.CMD_DELETE, myrec._id, null)"
color="negative"
:label="$t('reg.elimina')"
icon="fas fa-trash-alt"
/>
<q-fab-action
v-if="tools.canModifyThisRec(myrec, table) || editOn"
<!--<q-fab-action
v-if="tools.canModifyThisRec(myrec, table) || tools.isManager() || editOn"
@click="cmdExt(costanti.CMD_CLONE, myrec._id, null)"
color="accent"
:label="$t('event.duplicate')"
icon="fas fa-copy"
/>
/>-->
<q-fab-action
v-if="tools.canModifyThisRec(myrec, table) || editOn"
:disable="!pagina_collegata"
color="positive"
label="Gestisci"
icon="fas fa-book-open"
@@ -154,14 +160,6 @@
icon="fas fa-info"
@click="apriInfo = true"
/>
<q-btn
flat
:color="statecolor"
label="PDF"
icon="fas fa-book"
:disable="!myrec.pdf_generato"
@click="naviga(myrec.pdf_generato)"
/>
</div>
</q-card-actions>
</q-card>
@@ -191,7 +189,7 @@
? myrec.referenti.join(', ')
: '[Non Assegnato]'
"
label="Referente/i:"
:label="$t('cataloglist.argomenti') + `:`"
:color="
myrec.referenti && myrec.referenti.length > 0
? 'text-blue'
@@ -199,8 +197,11 @@
"
/>
</div>
<div style="width: 300px" class="q-ma-sm">
<CLabel v-if="collanestr" :value="collanestr" label="Collana/e:" />
<div v-if="collanestr" style="width: 300px" class="q-ma-sm">
<CLabel :value="collanestr" :label="$t('cataloglist.collane') + `:`" />
</div>
<div v-if="argomentistr" style="width: 300px" class="q-ma-sm">
<CLabel :value="argomentistr" :label="$t('cataloglist.argomenti') + `:`" />
</div>
<div style="width: 300px" class="q-ma-sm">
<CLabel