- Cataloghi aggiornamento...
This commit is contained in:
@@ -1,27 +1,27 @@
|
||||
APP_VERSION="1.1.21"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
APP_ID="18"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
DIRECTORY_SERVER=freeplanet_serverside
|
||||
SERVERDIR_WEBSITE=riso.app
|
||||
DIRECTORY_SERVER=/var/www/freeplanet_serverside
|
||||
SERVERDIR_WEBSITE="/var/www/gruppomacro.app"
|
||||
SERVERPW_WEBSITE=pwdadmin@1AOK
|
||||
APP_URL="https://riso.app"
|
||||
APP_URL="https://gruppomacro.app"
|
||||
URL_FACEBOOK=""
|
||||
PROVA_PAOLO=""
|
||||
LANG_DEFAULT="it"
|
||||
PAO_APP_ID="KKPPAA5KJK435J3KSS9F9D8S9F8SD98F9SDF"
|
||||
MASTER_KEY="KKPPSS5KJK435J3KSS9F9D8S9F8SD3CR3T"
|
||||
MONGODB_HOST="https://www.freeplanet.app:3000"
|
||||
LOGO_REG='riso-logo-full.png'
|
||||
MONGODB_HOST="https://api.gruppomacro.app"
|
||||
LOGO_REG='gruppomacro-logo-full.png'
|
||||
TEST_NAME=""
|
||||
TEST_SURNAME=""
|
||||
TEST_EMAIL=""
|
||||
TEST_USERNAME=""
|
||||
TEST_PASSWORD=""
|
||||
TEST_APORTADOR="------"
|
||||
PUBLICKEY_PUSH="BNM-cEpTbPVc_ujXf3QOC8ggf7b-X44P44esfJUWqNOFq1XhWCoZJpOi71_cbXC5SnfO9HassQ6OouAYgtBA9Pw"
|
||||
PUBLICKEY_PUSH="BJgo8XR_upbnbMLWgCAUELo6DK7dRXffYAnFOxbaMMz5favBgcQBKT-eISqouO-jRad4Sw8l5nd2wCF6KorGiTc"
|
||||
DEBUG="1"
|
||||
TELEGRAM_SUPPORT=""
|
||||
PROJECT_ID_MAIN="5cc0a13fe5c9d156728f400a"
|
||||
TEST_CELL=""
|
||||
VUE_APP_ISTEST=0
|
||||
VUE_APP_ISTEST=0
|
||||
@@ -39,7 +39,7 @@ module.exports = configure((ctx) => ({
|
||||
// --> boot files are part of "main.js"
|
||||
// https://v2.quasar.dev/quasar-cli/boot-files
|
||||
// boot: ['vue-i18n', 'vue-meta', 'axios', 'vee-validate', 'myconfig', 'local-storage', 'error-handler', 'globalroutines', 'vue-idb', 'dragula', 'guard'],
|
||||
boot: ['i18n', 'axios', 'vee-validate', 'myconfig', 'local-storage', 'error-handler', 'globalroutines', 'calendar', 'social-sharing', 'timeago'],
|
||||
boot: ['i18n', 'axios', 'vee-validate', 'myconfig', 'local-storage', 'error-handler', 'globalroutines', 'calendar', 'social-sharing', 'timeago', 'guard'],
|
||||
|
||||
// https://v2.quasar.dev/quasar-cli/quasar-conf-js#Property%3A-css
|
||||
css: [
|
||||
|
||||
@@ -288,6 +288,34 @@ export const shared_consts = {
|
||||
|
||||
PARAM_SHOW_PROVINCE: 1,
|
||||
|
||||
TABLES_ID_STRING: [
|
||||
'circuits',
|
||||
'accounts',
|
||||
'movements',
|
||||
'mygroups',
|
||||
],
|
||||
|
||||
TABLES_ID_NUMBER: [
|
||||
'permissions',
|
||||
'levels',
|
||||
'adtypes',
|
||||
'adtypegoods',
|
||||
'statusSkills',
|
||||
'sectors',
|
||||
'goods',
|
||||
'sectorgoods',
|
||||
'catgrps',
|
||||
'skills',
|
||||
'subskills',
|
||||
'cities',
|
||||
'provinces',
|
||||
// 'myskills',
|
||||
// 'mybachecas',
|
||||
// 'myhosps',
|
||||
// 'mygoods',
|
||||
// 'mygroups'
|
||||
],
|
||||
|
||||
TABLES_MYSKILLS: 'myskills',
|
||||
TABLES_MYBACHECAS: 'mybachecas',
|
||||
TABLES_MYHOSPS: 'myhosps',
|
||||
|
||||
@@ -42,6 +42,16 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: 0,
|
||||
},
|
||||
heightcard: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '150px',
|
||||
},
|
||||
widthcard: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '300px',
|
||||
},
|
||||
},
|
||||
components: {
|
||||
CMyFieldDb, CGridTableRec, CTitlePage,
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
:prop_showMap="false"
|
||||
:heightcarousel="heightcarousel"
|
||||
@clickButtBar="clickButtBar"
|
||||
:opt="{rowclass: true, widthcard: $q.screen.gt.xs ? '300px' : '170px', heightcard: $q.screen.gt.xs ? '300px' : '170px'}"
|
||||
:opt="{rowclass: true, widthcard, heightcard}"
|
||||
>
|
||||
</CGridTableRec>
|
||||
</div>
|
||||
|
||||
@@ -111,7 +111,7 @@ export default defineComponent({
|
||||
watch(() => props.modelValue, (newVal) => {
|
||||
optcatalogo.value = { ...newVal };
|
||||
// updateCatalogoPadre()
|
||||
}, { deep: true });
|
||||
}, { deep: false });
|
||||
|
||||
function updateCatalogoPadre() {
|
||||
emit('update:modelValue', optcatalogo.value);
|
||||
|
||||
@@ -80,7 +80,7 @@ export default defineComponent({
|
||||
watch(() => props.modelValue, (newVal) => {
|
||||
optcatalogo.value = { ...newVal };
|
||||
// updateCatalogoPadre()
|
||||
}, { deep: true });
|
||||
}, { deep: false });
|
||||
|
||||
function updateCatalogoPadre() {
|
||||
emit('update:modelValue', optcatalogo.value);
|
||||
|
||||
@@ -2213,59 +2213,64 @@ export default defineComponent({
|
||||
|
||||
const ok = true
|
||||
|
||||
let myrec = null
|
||||
if (newrec) {
|
||||
myrec = { ...newRecord.value }
|
||||
} else {
|
||||
myrec = { ...recModif.value }
|
||||
}
|
||||
try {
|
||||
|
||||
// mycolumns.value.forEach((col: IColGridTable) => {
|
||||
let col: IColGridTable
|
||||
let myrec = null
|
||||
if (newrec) {
|
||||
myrec = { ...newRecord.value }
|
||||
} else {
|
||||
myrec = { ...recModif.value }
|
||||
}
|
||||
|
||||
let msg = ''
|
||||
// mycolumns.value.forEach((col: IColGridTable) => {
|
||||
let col: IColGridTable
|
||||
|
||||
for (col of mycolumns.value) {
|
||||
if (!msg) {
|
||||
if (col.showonlyif_dipersona) {
|
||||
const valori = myrec['idStatusSkill']
|
||||
let msg = ''
|
||||
|
||||
if (valori && (valori.length === 1) && valori.includes(shared_consts.STATUSSKILL_ONLINE)) {
|
||||
col.required = false
|
||||
} else {
|
||||
col.required = true
|
||||
}
|
||||
for (col of mycolumns.value) {
|
||||
if (!msg) {
|
||||
if (col.showonlyif_dipersona) {
|
||||
const valori = myrec['idStatusSkill']
|
||||
|
||||
col.visible = col.required
|
||||
}
|
||||
if (col.required) {
|
||||
// console.log('newRecord.value', newRecord.value, newRecord.value[col.name])
|
||||
if (tools.isArray(myrec[col.name])) {
|
||||
if (myrec[col.name].length <= 0) {
|
||||
msg = 'Si prega di compilare il campo \'' + getColMissing(myrec) + '\''
|
||||
if (valori && (valori.length === 1) && valori.includes(shared_consts.STATUSSKILL_ONLINE)) {
|
||||
col.required = false
|
||||
} else {
|
||||
col.required = true
|
||||
}
|
||||
} else {
|
||||
if (!myrec[col.name]) {
|
||||
msg = 'Si prega di compilare il campo \'' + getColMissing(myrec) + '\''
|
||||
|
||||
col.visible = col.required
|
||||
}
|
||||
if (col.required) {
|
||||
// console.log('newRecord.value', newRecord.value, newRecord.value[col.name])
|
||||
if (tools.isArray(myrec[col.name])) {
|
||||
if (myrec[col.name].length <= 0) {
|
||||
msg = 'Si prega di compilare il campo \'' + getColMissing(myrec) + '\''
|
||||
}
|
||||
} else {
|
||||
if (!myrec[col.name]) {
|
||||
msg = 'Si prega di compilare il campo \'' + getColMissing(myrec) + '\''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!msg && col.maxlength! > 0) {
|
||||
if (myrec[col.name].length > col.maxlength!) {
|
||||
msg = t('annunci.maxlength', { name: translate(col.label_trans), maxlength: col.maxlength })
|
||||
if (!msg && col.maxlength! > 0 && myrec && myrec[col.name]) {
|
||||
if ((myrec[col.name].length > col.maxlength!) && (col.fieldtype !== costanti.FieldType.html)) {
|
||||
msg = t('annunci.maxlength', { name: translate(col.label_trans), maxlength: col.maxlength })
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!msg && col.minlength! > 0) {
|
||||
if (myrec[col.name].length < col.minlength!) {
|
||||
msg = t('annunci.minlength', { name: translate(col.label_trans), minlength: col.minlength })
|
||||
if (!msg && col.minlength! > 0 && myrec && myrec[col.name]) {
|
||||
if ((myrec[col.name].length < col.minlength!) && (col.fieldtype !== costanti.FieldType.html)) {
|
||||
msg = t('annunci.minlength', { name: translate(col.label_trans), minlength: col.minlength })
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (showmsg && msg) {
|
||||
tools.showNegativeNotif($q, msg, 5000)
|
||||
return false
|
||||
if (showmsg && msg) {
|
||||
tools.showNegativeNotif($q, msg, 5000)
|
||||
return false
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
|
||||
return ok
|
||||
|
||||
@@ -455,6 +455,7 @@ export default defineComponent({
|
||||
_id: objectId(),
|
||||
idapp: tools.appid()!,
|
||||
isTemplate: false,
|
||||
isPagIntro: false,
|
||||
show_separatore: true,
|
||||
name: 'Scheda Nuova',
|
||||
dimensioni,
|
||||
|
||||
@@ -217,7 +217,7 @@
|
||||
<CMySlider
|
||||
v-if="
|
||||
myel.type === shared_consts.ELEMTYPE.CARD ||
|
||||
myel.type === shared_consts.ELEMTYPE.GRID_ORIZ||
|
||||
myel.type === shared_consts.ELEMTYPE.GRID_ORIZ ||
|
||||
myel.type === shared_consts.ELEMTYPE.CATALOGLIST
|
||||
"
|
||||
label="Altezza Carosello:"
|
||||
@@ -1391,6 +1391,15 @@
|
||||
>
|
||||
</q-toggle>
|
||||
|
||||
<CMySlider
|
||||
label="Numero massimo libri:"
|
||||
v-model="myel.catalogo.maxnumlibri"
|
||||
:min="0"
|
||||
:max="1000"
|
||||
color="green"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
|
||||
<q-input
|
||||
label="NomeFile PDF"
|
||||
@update:model-value="modifElem"
|
||||
@@ -2176,6 +2185,7 @@
|
||||
@update:model-value="modifElem"
|
||||
>
|
||||
</q-toggle>
|
||||
|
||||
<q-toggle
|
||||
v-model="myel.catalogo.indebug"
|
||||
color="positive"
|
||||
|
||||
@@ -570,6 +570,8 @@
|
||||
:prop_search="myel.parambool"
|
||||
:finder="myel.parambool2"
|
||||
:heightcarousel="myel.heightcarousel"
|
||||
:heightcard="myel.heightimg"
|
||||
:widthcard="myel.widthimg"
|
||||
></CCatalogList>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.STATUSREG">
|
||||
|
||||
@@ -1054,6 +1054,7 @@
|
||||
:canModify="canModify"
|
||||
@update:value="changevalRec"
|
||||
@showandsave="Savedb"
|
||||
:maxlength="col.maxlength"
|
||||
>
|
||||
</CMyEditor>
|
||||
</div>
|
||||
@@ -1125,6 +1126,7 @@
|
||||
:canModify="canModify"
|
||||
@showandsave="Savedb"
|
||||
@annulla="visueditor = false"
|
||||
:maxlength="col.maxlength"
|
||||
>
|
||||
</CMyEditor>
|
||||
</q-card-section>
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<q-badge color="primary"> {{ label }} {{ modelValue }} </q-badge>
|
||||
<q-badge color="primary"> {{ label }} <span v-if="modelValue">{{ modelValue }}</span> </q-badge>
|
||||
<div class="q-pa-xs row no-wrap">
|
||||
<q-btn
|
||||
icon="fas fa-minus"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { defineComponent, ref, computed, PropType, toRef, reactive, watch } from 'vue'
|
||||
import { defineComponent, ref, computed, PropType, toRef, reactive, watch, onMounted } from 'vue'
|
||||
import { IOperators, ISize, IText } from 'model'
|
||||
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
@@ -71,6 +71,17 @@ export default defineComponent({
|
||||
|
||||
}, { immediate: true });
|
||||
|
||||
function mounted() {
|
||||
if (!internalModel.font?.perc_text) {
|
||||
internalModel.font!.perc_text = ''
|
||||
}
|
||||
if (!internalModel.maxlength) {
|
||||
internalModel.maxlength = 0
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
t,
|
||||
shared_consts,
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
>
|
||||
<q-img
|
||||
ratio="1"
|
||||
fit="conver"
|
||||
fit="cover"
|
||||
:src="getMyImg()"
|
||||
:alt="Username()"
|
||||
img-class="imgprofile_small"
|
||||
|
||||
@@ -6,23 +6,31 @@ export interface ICatalog {
|
||||
_id: string
|
||||
idapp: string
|
||||
active?: boolean
|
||||
versione_perstampa?: boolean
|
||||
title: string
|
||||
foto_collana?: IImg,
|
||||
idCollane?: number[]
|
||||
argomenti?: string[]
|
||||
editore?: string[]
|
||||
collana_info?: ICollana
|
||||
descr_introduttiva?: string
|
||||
idPageAssigned?: string
|
||||
idPageAssigned_stampa?: string
|
||||
referenti?: string[]
|
||||
img_bordata?: IImg,
|
||||
img_intro?: IImg,
|
||||
img_bordata_stampa?: IImg,
|
||||
img_intro_stampa?: IImg,
|
||||
pagina_introduttiva_sfondo_nero?: boolean
|
||||
|
||||
pdf_generato?: string
|
||||
data_generato?: Date
|
||||
pdf_online?: string
|
||||
data_online?: Date
|
||||
|
||||
pdf_generato_stampa?: string
|
||||
data_generato_stampa?: Date
|
||||
pdf_online_stampa?: string
|
||||
data_online_stampa?: Date
|
||||
|
||||
date_created?: Date,
|
||||
date_updated?: Date,
|
||||
|
||||
@@ -834,6 +834,7 @@ export interface IOptCatalogo {
|
||||
pdf_filename?: string
|
||||
printable?: boolean
|
||||
indebug?: boolean
|
||||
maxnumlibri?: number
|
||||
generazionePDFInCorso?: boolean
|
||||
|
||||
first_page?: IDimensioni
|
||||
|
||||
@@ -2008,22 +2008,32 @@ const msg_it = {
|
||||
link_macro: '{link_macro}',
|
||||
totVen: 'Totale Venduti',
|
||||
totFat: 'Totale Fatturati',
|
||||
contenuto: 'Contenuto',
|
||||
},
|
||||
|
||||
iimg: {
|
||||
imagefile: 'File Immagine',
|
||||
},
|
||||
|
||||
cataloglist: {
|
||||
foto_collana: 'Foto Collana',
|
||||
referenti: 'Referenti',
|
||||
referenti: 'Editori',
|
||||
img_bordata: 'Immagine di sfondo',
|
||||
img_intro: 'Immagine sfondo pagina introduttiva',
|
||||
img_intro: 'Copertina introduttiva',
|
||||
img_bordata_stampa: 'Immagine di sfondo (per STAMPA)',
|
||||
img_intro_stampa: 'Copertina introduttiva (per STAMPA)',
|
||||
pagina_introduttiva_sfondo_nero: 'Pagina intro a sfondo nero',
|
||||
collane: 'Collane',
|
||||
idPageAssigned: 'Pagina Assegnata',
|
||||
idPageAssigned_stampa: 'Pagina Assegnata (per STAMPA)',
|
||||
descr_introduttiva: 'Descrizione Introduttiva (circa 1300 battute)',
|
||||
editore: 'Editori',
|
||||
editore: 'Gruppo Editoriale',
|
||||
versione_perstampa: 'Per Stampa',
|
||||
pdf_generato: 'Pdf generato',
|
||||
pdf_online: 'Pdf online Ufficiale',
|
||||
pdf_generato_stampa: 'Pdf generato (per STAMPA)',
|
||||
pdf_online_stampa: 'Pdf online Ufficiale (per STAMPA)',
|
||||
argomenti: 'Argomenti',
|
||||
},
|
||||
|
||||
scheda: {
|
||||
|
||||
@@ -123,7 +123,6 @@ export const colmailinglist = [
|
||||
|
||||
export const colTableCatalogList = [
|
||||
AddCol({ name: 'active', label_trans: 'myelems.active', fieldtype: costanti.FieldType.boolean }),
|
||||
AddCol({ name: 'versione_perstampa', label_trans: 'cataloglist.versione_perstampa', fieldtype: costanti.FieldType.boolean }),
|
||||
AddCol({ name: 'title', label_trans: 'gallery.title' }),
|
||||
AddCol({
|
||||
name: 'foto_collana',
|
||||
@@ -139,6 +138,12 @@ export const colTableCatalogList = [
|
||||
fieldtype: costanti.FieldType.multiselect,
|
||||
jointable: 'collanas',
|
||||
}),
|
||||
AddCol({
|
||||
name: 'argomenti',
|
||||
label_trans: 'cataloglist.argomenti',
|
||||
fieldtype: costanti.FieldType.multiselect,
|
||||
jointable: 'catprods',
|
||||
}),
|
||||
AddCol({
|
||||
name: 'editore',
|
||||
label_trans: 'cataloglist.editore',
|
||||
@@ -178,7 +183,6 @@ export const colTableCatalogList = [
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit,
|
||||
isadvanced_field: false,
|
||||
}),
|
||||
|
||||
AddCol({
|
||||
name: 'pdf_generato',
|
||||
label_trans: 'cataloglist.pdf_generato',
|
||||
@@ -188,10 +192,44 @@ export const colTableCatalogList = [
|
||||
name: 'pdf_online',
|
||||
label_trans: 'cataloglist.pdf_online',
|
||||
}),
|
||||
|
||||
AddCol({
|
||||
name: 'idPageAssigned_stampa',
|
||||
label_trans: 'cataloglist.idPageAssigned_stampa',
|
||||
fieldtype: costanti.FieldType.select,
|
||||
jointable: 'mypages_id',
|
||||
}),
|
||||
|
||||
AddCol({
|
||||
name: 'img_bordata_stampa',
|
||||
label_trans: 'cataloglist.img_bordata_stampa',
|
||||
fieldtype: costanti.FieldType.image,
|
||||
jointable: '',
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit,
|
||||
isadvanced_field: false,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'img_intro_stampa',
|
||||
label_trans: 'cataloglist.img_intro_stampa',
|
||||
fieldtype: costanti.FieldType.image,
|
||||
jointable: '',
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit,
|
||||
isadvanced_field: false,
|
||||
}),
|
||||
|
||||
AddCol({
|
||||
name: 'pdf_generato_stampa',
|
||||
label_trans: 'cataloglist.pdf_generato_stampa',
|
||||
}),
|
||||
// AddCol({ name: 'data_generato', label_trans: 'dataloglist.data_generato', fieldtype: costanti.FieldType.date }),
|
||||
AddCol({
|
||||
name: 'pdf_online_stampa',
|
||||
label_trans: 'cataloglist.pdf_online_stampa',
|
||||
}),
|
||||
// AddCol({ name: 'data_online', label_trans: 'dataloglist.data_online', fieldtype: costanti.FieldType.date }),
|
||||
|
||||
AddCol(ModifRec),
|
||||
AddCol(DuplicateRec),
|
||||
// AddCol(DuplicateRec),
|
||||
AddCol(DeleteRec),
|
||||
|
||||
]
|
||||
|
||||
@@ -1304,7 +1304,6 @@ export const useProducts = defineStore('Products', {
|
||||
const autori = this.getAutoriByArrayAuthors(myproduct.productInfo.authors)
|
||||
const collana = myproduct.productInfo.collana
|
||||
|
||||
|
||||
const maxDescriptionLength = testo.maxlength ?? 100;
|
||||
const description = myproduct.productInfo.short_descr || '';
|
||||
const long_descr = myproduct.productInfo.description || '';
|
||||
@@ -1389,8 +1388,7 @@ export const useProducts = defineStore('Products', {
|
||||
'{ranking}': ranking || '',
|
||||
'{venduti}': venduti || '',
|
||||
'{formato}': formato || '',
|
||||
'{collana_title}': collana ? collana.descrizione || '' : '',
|
||||
'{collana_descr}': collana ? collana.descrizione_estesa || '' : '',
|
||||
'{collana_title}': collana ? collana.title || '' : '',
|
||||
'{prezzo}': prezzo || '',
|
||||
'{scale}': scale || '',
|
||||
'{prezzo_scontato}': prezzo_scontato || '',
|
||||
|
||||
@@ -64,7 +64,7 @@ export default defineComponent({
|
||||
// Utile anche per sincronizzare con le modifiche ricevute da props
|
||||
watch(() => props.modelValue, (newVal) => {
|
||||
optcatalogo.value = { ...newVal };
|
||||
}, { deep: true });
|
||||
}, { deep: false });
|
||||
|
||||
/*watch(optcatalogo, (newValue) => {
|
||||
emit('update:modelValue', newValue);
|
||||
@@ -125,7 +125,7 @@ export default defineComponent({
|
||||
if (recscheda.scheda!.isPagIntro) {
|
||||
|
||||
const catalogStore = useCatalogStore()
|
||||
const catalog = catalogStore.catalogs?.find((catalog: ICatalog) => catalog.idPageAssigned === props.idPage)
|
||||
const catalog = getCatalogoByMyPage.value
|
||||
if (catalog && catalog.descr_introduttiva) {
|
||||
// Cerca se la descrizione introduttiva è stata impostata
|
||||
testo = catalog.descr_introduttiva
|
||||
@@ -313,6 +313,21 @@ export default defineComponent({
|
||||
return idCollane
|
||||
}
|
||||
|
||||
function getArgomentiDaFiltrare(def_argomenti?: string[]) {
|
||||
let argomenti: string[] = []
|
||||
|
||||
// Cerca se nella lista cataloghi c'è la Collana di questa Pagina !
|
||||
let trovatocatalogo = getCatalogoByMyPage.value
|
||||
|
||||
if (trovatocatalogo) {
|
||||
argomenti = trovatocatalogo.argomenti! || []
|
||||
} else {
|
||||
argomenti = def_argomenti || []
|
||||
}
|
||||
|
||||
return argomenti
|
||||
}
|
||||
|
||||
function getEditoreDaFiltrare(def_editori?: string[]) {
|
||||
let editore: string[] = []
|
||||
|
||||
@@ -361,29 +376,35 @@ export default defineComponent({
|
||||
|
||||
if (optcatalogo.value.argomenti) {
|
||||
// ha la priorità questo scelto sul catalogo
|
||||
arrargomstr = optcatalogo.value.argomenti
|
||||
arrargomstr = getArgomentiDaFiltrare(optcatalogo.value.argomenti!)
|
||||
} else {
|
||||
catstr = cat.value || ''
|
||||
}
|
||||
|
||||
|
||||
let filtroArgomenti = arrargomstr || []
|
||||
let boolfiltroVuotoArgomenti = (filtroArgomenti.length === 0)
|
||||
|
||||
let gasselstr = ''
|
||||
if (cosa.value === shared_consts.PROD.GAS) {
|
||||
gasselstr = idGasSel.value || '';
|
||||
}
|
||||
let lowerSearchText = (searchtext || '').toLowerCase().trim();
|
||||
lowerSearchText = lowerSearchText.replace(/[-@:=]/g, '');
|
||||
if ((!lowerSearchText || (lowerSearchText && lowerSearchText.length < 2)) && !catstr && boolfiltroVuotoProductTypes && boolfiltroVuotoExcludeProductTypes && boolfiltroVuotoCollane && boolfiltroVuotoEditore && boolfiltroVuotoCollana && !filtroAuthor && (!gasselstr && (cosa.value !== shared_consts.PROD.GAS))) {
|
||||
if ((!lowerSearchText || (lowerSearchText && lowerSearchText.length < 2)) && !catstr && boolfiltroVuotoArgomenti && boolfiltroVuotoProductTypes && boolfiltroVuotoExcludeProductTypes && boolfiltroVuotoCollane && boolfiltroVuotoEditore && boolfiltroVuotoCollana && !filtroAuthor && (!gasselstr && (cosa.value !== shared_consts.PROD.GAS))) {
|
||||
|
||||
} else {
|
||||
|
||||
arrprod = arrprod.filter((product: IProduct) => {
|
||||
if (product && product.productInfo) {
|
||||
let lowerName = (product.productInfo.name || '').toLowerCase();
|
||||
let hasCategoria = !catstr || (catstr && (product.productInfo.idCatProds || []).includes(catstr));
|
||||
let hasCategoria = false
|
||||
let hasArgomentiCat = true
|
||||
if (arrargomstr && arrargomstr.length > 0) {
|
||||
hasArgomentiCat = (product.productInfo.idCatProds || []).some(idCat => arrargomstr.includes(idCat))
|
||||
hasCategoria = true
|
||||
} else {
|
||||
hasCategoria = (!catstr || (catstr && (product.productInfo.idCatProds || []).includes(catstr))) ? true : false
|
||||
}
|
||||
|
||||
let hasAuthor = !filtroAuthor || (filtroAuthor && (product.productInfo.idAuthors || []).includes(filtroAuthor));
|
||||
@@ -463,7 +484,6 @@ export default defineComponent({
|
||||
if (myschedatocopy) {
|
||||
myschedatocopy.scheda._id = origScheda.scheda?._id
|
||||
myschedatocopy.scheda.isTemplate = false
|
||||
myschedatocopy.scheda.isPagIntro = false
|
||||
myschedatocopy.scheda.name = precname
|
||||
myschedatocopy.scheda.linkIdTemplate = linkIdTemplate
|
||||
|
||||
@@ -491,6 +511,7 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
console.log(' FINE - populateDataWithlinkIdTemplate')
|
||||
}
|
||||
|
||||
|
||||
@@ -522,7 +543,7 @@ export default defineComponent({
|
||||
|
||||
if (optcatalogo.value.argomenti) {
|
||||
// ha la priorità questo scelto sul catalogo
|
||||
arrargomstr = optcatalogo.value.argomenti
|
||||
arrargomstr = getArgomentiDaFiltrare(optcatalogo.value.argomenti!)
|
||||
} else {
|
||||
catstr = cat.value || ''
|
||||
}
|
||||
@@ -541,11 +562,13 @@ export default defineComponent({
|
||||
let lowerName = (product.productInfo.name || '').toLowerCase();
|
||||
let lowerCode = (product.productInfo.code || '').toLowerCase();
|
||||
|
||||
let hasCategoria = !catstr || (catstr && (product.productInfo.idCatProds || []).includes(catstr));
|
||||
let hasCategoria = false
|
||||
let hasArgomentiCat = true
|
||||
if (arrargomstr && arrargomstr.length > 0) {
|
||||
hasArgomentiCat = (product.productInfo.idCatProds || []).some(idCat => arrargomstr.includes(idCat))
|
||||
hasCategoria = true
|
||||
} else {
|
||||
hasCategoria = (!catstr || (catstr && (product.productInfo.idCatProds || []).includes(catstr))) ? true : false
|
||||
}
|
||||
|
||||
let hasAuthor = !filtroAuthor || (filtroAuthor && (product.productInfo.idAuthors || []).includes(filtroAuthor));
|
||||
@@ -673,7 +696,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function generatearrProdToViewSorted() {
|
||||
// console.log('generatearrProdToViewSorted', arrProducts.value)
|
||||
console.log('generatearrProdToViewSorted...')
|
||||
|
||||
try {
|
||||
|
||||
@@ -686,6 +709,8 @@ export default defineComponent({
|
||||
let indprod = 0
|
||||
let indprodGenerale = 0
|
||||
|
||||
let indtotale = 0
|
||||
|
||||
for (const recscheda of optcatalogo.value.arrSchede!) {
|
||||
if (recscheda && recscheda.scheda) {
|
||||
let schedePerRiga = recscheda.scheda.numschede_perRiga || 1
|
||||
@@ -739,16 +764,28 @@ export default defineComponent({
|
||||
recscheda.arrProdToShow[pagina][riga][col] = result.myrec
|
||||
|
||||
indadded++
|
||||
indtotale++
|
||||
// console.log('indadded', indadded)
|
||||
if (optcatalogo.value.maxnumlibri! > 0) {
|
||||
if (indtotale > optcatalogo.value.maxnumlibri!)
|
||||
return
|
||||
|
||||
} else {
|
||||
if (indtotale > 200)
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (recscheda.numPagineMax! > 0) {
|
||||
if (pagina + 1 >= recscheda.numPagineMax!)
|
||||
break; // fine pagine
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// console.log('*** arrProdToShow', recscheda.arrProdToShow)
|
||||
@@ -757,6 +794,8 @@ export default defineComponent({
|
||||
// console.log('Fine Generazione')
|
||||
}
|
||||
|
||||
console.log(' FINE - generatearrProdToViewSorted !')
|
||||
|
||||
} catch (e) {
|
||||
console.error('Err', e)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user