diff --git a/public/images/ombra.png b/public/images/ombra.png new file mode 100644 index 00000000..6059aeb5 Binary files /dev/null and b/public/images/ombra.png differ diff --git a/src/components/CBarCode/CBarCode.scss b/src/components/CBarCode/CBarCode.scss index e3e7c796..c4b04346 100755 --- a/src/components/CBarCode/CBarCode.scss +++ b/src/components/CBarCode/CBarCode.scss @@ -1,5 +1,5 @@ .barcode-container { - padding: 10px; + padding: 5px; display: flex; justify-content: center; align-items: center; diff --git a/src/components/CBarCode/CBarCode.ts b/src/components/CBarCode/CBarCode.ts index 5466b686..b13b2777 100755 --- a/src/components/CBarCode/CBarCode.ts +++ b/src/components/CBarCode/CBarCode.ts @@ -25,6 +25,11 @@ export default defineComponent({ default: '', }, width: { + type: Number, + required: false, + default: 50, + }, + widthlines: { type: Number, required: false, default: 2, @@ -45,18 +50,18 @@ export default defineComponent({ const { t } = useI18n(); // Converti le props in riferimenti reattivi - const { value, format, width, height, fontsize } = toRefs(props); + const { value, format, width, widthlines, height, fontsize } = toRefs(props); // Funzione per disegnare il codice a barre const drawBarcode = () => { JsBarcode("#C" + value.value, value.value, { format: format.value, - width: width.value, + width: widthlines.value, height: height.value, displayValue: true, lineColor: "#000", font: "monospace", - margin: 1, + margin: 0, textMargin: 0, marginTop: 0, fontSize: fontsize.value, diff --git a/src/components/CBarCode/CBarCode.vue b/src/components/CBarCode/CBarCode.vue index 0be8afc8..90bcfd65 100755 --- a/src/components/CBarCode/CBarCode.vue +++ b/src/components/CBarCode/CBarCode.vue @@ -1,7 +1,9 @@ diff --git a/src/components/CCatalogoCard/CCatalogoCard.scss b/src/components/CCatalogoCard/CCatalogoCard.scss index f72e09b3..ea866cf1 100755 --- a/src/components/CCatalogoCard/CCatalogoCard.scss +++ b/src/components/CCatalogoCard/CCatalogoCard.scss @@ -341,4 +341,23 @@ transform-origin: center center; transition: transform 0.5s ease-in-out; } +} + +.shadow-image-wrapper { + position: relative; /* Necessario per il posizionamento dell'ombra */ +} + +.shadow-image { + position: absolute; /* Posiziona l'immagine dell'ombra sopra l'immagine principale */ + width: 100%; /* Assicurati che l'ombra si adatti all'immagine principale */ + height: auto; + top: 0; /* Allineato in alto */ + left: 0; /* Allineato a sinistra */ + z-index: 1; /* Posiziona l'ombra dietro l'immagine principale */ +} + +/* Regola z-index per il resto */ +.q-img { + position: relative; /* Per la sovrapposizione */ + z-index: 2; /* Posiziona l'immagine principale sopra l'ombra */ } \ No newline at end of file diff --git a/src/components/CCatalogoCard/CCatalogoCard.vue b/src/components/CCatalogoCard/CCatalogoCard.vue index 613e5cfa..b898842a 100755 --- a/src/components/CCatalogoCard/CCatalogoCard.vue +++ b/src/components/CCatalogoCard/CCatalogoCard.vue @@ -48,23 +48,58 @@ + +
+ + +
-
- -
-
- + />
@@ -138,34 +158,36 @@ :style="{ '--scalecatalog': optcatalogo.areadistampa.scale, 'line-height': scheda.line_height, + height: '100%', + display: 'flex', + flexDirection: 'column', }" - v-html=" - products.replaceKeyWordsByProduct( - optcatalogo, - myproduct, - scheda.testo_right - ) - " - >
- -
- - - + style="display: flex; flex-direction: column; justify-content: space-between; height: 100%;" + >
+
+ + +
+
+
+
0) + const idSchedaDaCopiare = ref('') + const myel = toRef(props, 'myelem') const newtype = ref('') const visuadd = ref(false) @@ -199,7 +201,7 @@ export default defineComponent({ } async function dupElem(order?: number) { - const newrec: IMyElem = { ...props.myelem } + const newrec: IMyElem = tools.jsonCopy(props.myelem) newrec._id = undefined newrec.order = getNewOrderByThisElem() @@ -242,6 +244,12 @@ export default defineComponent({ disableSave.value = false elemChanged.value = true } + function modifElemAndSchede() { + modifElem() + + myel.value.catalogo!.aggiorna++ + + } function mounted() { neworder.value = props.myelem.order @@ -438,6 +446,7 @@ export default defineComponent({ _id: objectId(), idapp: tools.appid()!, isTemplate: false, + show_separatore: true, name: 'Scheda Nuova', dimensioni, line_height: 100, @@ -459,7 +468,7 @@ export default defineComponent({ }, font: { name: 'monospace', - size: 16, + size: '16px', } }, productTypes: [], @@ -486,6 +495,51 @@ export default defineComponent({ modifElem() } + + function copyfromTemplate(indscheda: number) { + // Estrai l'id da copiare e sostituisci tutto con questo + + if (!idSchedaDaCopiare.value) { + return false + } + + const arrschede: ISchedaSingola[] = globalStore.getMySchede() + + if (arrschede.length <= 0) { + return false + } + + const myschedatocopy = arrschede.find((recscheda: ISchedaSingola) => recscheda.scheda!._id === idSchedaDaCopiare.value) + const schedadest = myel.value.catalogo!.arrSchede![indscheda] + + if (myschedatocopy) { + + let newscheda = myschedatocopy.scheda!.name + + const msg = 'Sostituisci questa scheda (' + schedadest.scheda?.name + ') con "' + newscheda + '" ?' + + $q.dialog({ + message: msg, + html: true, + ok: { + label: 'Sostituisci', + push: true, + }, + title: '', + cancel: true, + persistent: false, + }).onOk(async () => { + const myschedadest: ISchedaSingola = myel.value.catalogo!.arrSchede![indscheda] + myschedadest.scheda = tools.jsonCopy(myschedatocopy.scheda!) + myschedadest.scheda!._id = objectId() + myschedadest.order = 20 + + myschedadest.scheda!.name = myschedadest.scheda!.name + '_copia' + myschedadest.scheda!.isTemplate = false + }) + + } + } function dupNewScheda(id: string) { if (!myel.value.catalogo!.arrSchede) return @@ -493,14 +547,19 @@ export default defineComponent({ const myfindscheda = myel.value.catalogo!.arrSchede.find((scheda: ISchedaSingola) => scheda._id === id) if (myfindscheda) { - let myscheda = { ...myfindscheda } + let myscheda = tools.jsonCopy(myfindscheda) delete myscheda._id + delete myscheda.scheda!._id + myscheda.numSchede = 1 + myscheda.order = myscheda.order + 10, myscheda._id = objectId() + myscheda.scheda!._id = objectId() + myscheda.scheda!.name = myscheda.scheda!.name + '_copia' + myscheda.scheda!.isTemplate = false const bakscheda = [...myel.value.catalogo!.arrSchede] - myel.value.catalogo!.arrSchede = [] - myel.value.catalogo!.arrSchede = [...bakscheda, myscheda] + myel.value.catalogo!.arrSchede.push(myscheda) modifElem() } @@ -514,7 +573,7 @@ export default defineComponent({ const myfindcard = myel.value.listcards[tabCard.value] if (myfindcard) { - let mycard = { ...myfindcard } + let mycard = tools.jsonCopy(myfindcard) delete mycard._id mycard._id = objectId() @@ -568,10 +627,28 @@ export default defineComponent({ } function delRecScheda(id: string, myel: IMyElem) { - // - myel.catalogo!.arrSchede = myel.catalogo!.arrSchede!.filter((scheda: ISchedaSingola) => scheda._id !== id) - modifElem() + const myscheda = myel.catalogo!.arrSchede!.find((scheda: ISchedaSingola) => scheda._id === id) + + if (myscheda) { + $q.dialog({ + message: 'Eliminare la scheda "' + myscheda?.scheda?.name + '" ?', + html: true, + ok: { + label: 'Elimina', + push: true, + }, + title: '', + cancel: true, + persistent: false, + }).onOk(async () => { + + // + myel.catalogo!.arrSchede = myel.catalogo!.arrSchede!.filter((scheda: ISchedaSingola) => scheda._id !== id) + + modifElem() + }) + } } @@ -678,13 +755,13 @@ export default defineComponent({ } function SchedeOpt() { - const arrschede = globalStore.getMySchede() + const arrschede: ISchedaSingola[] = globalStore.getMySchede() let arr: any = [] if (arrschede) { - arrschede.forEach(scheda => { - arr.push({ label: scheda.name, value: scheda._id }) + arrschede.forEach((recscheda: ISchedaSingola) => { + arr.push({ label: recscheda.scheda!.name, value: recscheda.scheda!._id }) }); } @@ -865,6 +942,9 @@ export default defineComponent({ addProdSpeciale, formatOptions, fontSizeOptions, + idSchedaDaCopiare, + copyfromTemplate, + modifElemAndSchede, } }, diff --git a/src/components/CMyEditElem/CMyEditElem.vue b/src/components/CMyEditElem/CMyEditElem.vue index 83d1e799..f3babc8d 100755 --- a/src/components/CMyEditElem/CMyEditElem.vue +++ b/src/components/CMyEditElem/CMyEditElem.vue @@ -1473,7 +1473,7 @@ > @@ -1545,23 +1545,34 @@ > - +
+ + + + +
@@ -1877,20 +1889,24 @@ text-color="white" > - - + > + + -
Ratio: {{myel.catalogo.areadistampa.format[0] / myel.catalogo.areadistampa.format[1]}}
+
+ Ratio: + {{ + myel.catalogo.areadistampa.format[0] / + myel.catalogo.areadistampa.format[1] + }} +
+
diff --git a/src/components/CMySlider/CMySlider.ts b/src/components/CMySlider/CMySlider.ts index 1fbdcd2d..cc75e76e 100755 --- a/src/components/CMySlider/CMySlider.ts +++ b/src/components/CMySlider/CMySlider.ts @@ -64,13 +64,14 @@ export default defineComponent({ return 5 } else { if (props.max < 5) { - return (props.max - props.min) / 100 + return Math.abs((props.max - props.min) / 20) } else { return 1 } } } + function incrementValue() { if (!sliderValue.value) { diff --git a/src/css/app.scss b/src/css/app.scss index cb950b4c..1028ccb9 100755 --- a/src/css/app.scss +++ b/src/css/app.scss @@ -7,6 +7,41 @@ font-style: normal; } +@font-face { + font-family: 'DINPro-BoldItalic'; + src: url('~src/assets/fonts/DINPro-BoldItalic.otf') format('opentype'); + font-weight: bold; + font-style: italic; +} + +@font-face { + font-family: 'DINPro-CondBlack'; + src: url('~src/assets/fonts/DINPro-CondBlack.otf') format('opentype'); + font-weight: normal; + font-style: normal; +} + +@font-face { + font-family: 'DINPro-CondensedBold'; + src: url('~src/assets/fonts/DINPro-CondensedBold.otf') format('opentype'); + font-weight: bold; + font-style: normal; +} + +@font-face { + font-family: 'DIN-Pro-Condensed-Regular'; + src: url('~src/assets/fonts/DINPro-CondensedBold.otf') format('opentype'); + font-weight: normal; + font-style: normal; +} + +@font-face { + font-family: 'DINPro'; + src: url('~src/assets/fonts/DINPro.otf') format('opentype'); + font-weight: normal; + font-style: normal; +} + body { font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; -webkit-font-smoothing: antialiased; @@ -2267,9 +2302,8 @@ $coloreprincipale: lightblue; display: flex; flex-wrap: nowrap; flex-direction: row; - gap: 0.5rem; height: 100%; - padding: 0.5rem; + /*padding: 0.5rem;*/ } .flex-card { @@ -2512,4 +2546,8 @@ body.body--dark { .q-card-section-small { padding: 0px; +} + +.uppercase { + text-transform: uppercase; } \ No newline at end of file diff --git a/src/model/GlobalStore.ts b/src/model/GlobalStore.ts index e3e083b8..dde81bcf 100755 --- a/src/model/GlobalStore.ts +++ b/src/model/GlobalStore.ts @@ -687,6 +687,7 @@ export interface IMyCard { export interface ISize { width?: string height?: string + gap?: string } export interface IFont { name?: string @@ -710,6 +711,7 @@ export interface IBarCode { format?: string size?: ISize font?: IFont + widthlines?: number } export interface IDimensioni { @@ -799,6 +801,7 @@ export interface ICatalogo { dimensioni_def?: IElementiPagina arrSchede?: ISchedaSingola[] + aggiorna: number } diff --git a/src/store/Modules/fieldsTable.ts b/src/store/Modules/fieldsTable.ts index 31d87a3d..6b0e20a4 100755 --- a/src/store/Modules/fieldsTable.ts +++ b/src/store/Modules/fieldsTable.ts @@ -1002,11 +1002,11 @@ export const colmyUserGroup = [ AddCol({ name: 'title', label_trans: 'reg.name', field_toduplicate_nospace: 'groupname', - required: true, noshowlabel: true, maxlength: 40 + required: true, noshowlabel: true, maxlength: 50 }), AddCol({ name: 'groupname', label_trans: 'reg.groupname', required: false, - maxlength: 30, + maxlength: 50, allowchar: costanti.ALLOWCHAR_CODE, showLinkResult: '{site}/grp/{value}', showWhen: costanti.showWhen.InPage + costanti.showWhen.NewRec @@ -3516,7 +3516,7 @@ export const colTableCircuitComplete = [ // AddCol({ name: 'groupnameId', label_trans: 'circuit.groupnameId', fieldtype: costanti.FieldType.select, jointable: 'mygroups' }), // da togliere poi AddCol({ name: 'name', label_trans: 'circuit.name', - maxlength: 40, + maxlength: 50, showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage }), AddCol({ @@ -3633,12 +3633,12 @@ export const colTableCircuit = [ AddCol({ name: 'name', label_trans: 'circuit.name', required: true, - maxlength: 40, + maxlength: 50, showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InView }), AddCol({ name: 'path', label_trans: 'circuit.path', required: true, - maxlength: 40, + maxlength: 50, showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InView, allowchar: costanti.ALLOWCHAR_CODE, }), diff --git a/src/store/Modules/tools.ts b/src/store/Modules/tools.ts index c125f5fe..cdbc1abb 100644 --- a/src/store/Modules/tools.ts +++ b/src/store/Modules/tools.ts @@ -9276,24 +9276,32 @@ export const tools = { return myrec }, - adjustSize(optcatalogo: ICatalogo, mysize: any) { + adjustSize(optcatalogo: ICatalogo, mysize: any, add: number = 0) { if (!mysize) { return ''; } - // Estrae l'unità di misura - const unit = mysize.replace(/[\d.]/g, ''); // Ottiene il suffisso (es. 'px') - const numericalValue = parseFloat(mysize) || 0; // Converti la parte numerica in float + try { + // Estrae l'unità di misura + const unit = mysize.replace(/[\d.]/g, ''); // Ottiene il suffisso (es. 'px') + const numericalValue = parseFloat(mysize) || 0; // Converti la parte numerica in float - let size = numericalValue; // Inizializza size con il valore numerico + let size = numericalValue; // Inizializza size con il valore numerico - if (optcatalogo.printable && optcatalogo.areadistampa?.scale && optcatalogo.areadistampa?.scale > 0) { - size = size * optcatalogo.areadistampa?.scale; // Applicare la scala se necessaria + if (add > 0) { + size += add + } + + if (optcatalogo.printable && optcatalogo.areadistampa?.scale && optcatalogo.areadistampa?.scale > 0) { + size = size * optcatalogo.areadistampa?.scale; // Applicare la scala se necessaria + } + + let strfinale = `${size}${unit}` + // console.log('mysize', mysize, ' => ', strfinale) + return strfinale; // Restituisce il valore con il suffisso + } catch (e) { + return mysize } - - let strfinale = `${size}${unit}` - // console.log('mysize', mysize, ' => ', strfinale) - return strfinale; // Restituisce il valore con il suffisso }, getValueAndSuffix(myvalue: any): {value: number, suffix: string} { diff --git a/src/store/globalStore.ts b/src/store/globalStore.ts index 3d2d8813..590502b0 100644 --- a/src/store/globalStore.ts +++ b/src/store/globalStore.ts @@ -13,6 +13,7 @@ import { IStatusSkill, StateConnection, IMyScheda, + ISchedaSingola, } from '@model' import { static_data } from '@src/db/static_data' import * as Types from '@src/store/Api/ApiTypes' @@ -116,7 +117,7 @@ export const useGlobalStore = defineStore('GlobalStore', { mailinglist: [], mypage: [], myelems: [], - myscheda: [], + myschedas: [], calzoom: [], producers: [], groups: [], @@ -277,7 +278,7 @@ export const useGlobalStore = defineStore('GlobalStore', { return state.myelems.filter((page: IMyElem) => (page._id === idPage)).sort((a: any, b: any) => a.order - b.order) }, - getMySchede: (state: IGlobalState) => (): IMyScheda[] | [] => { + getMySchede: (state: IGlobalState) => (): ISchedaSingola[] | [] => { return state.myschedas }, diff --git a/src/views/ecommerce/catalogo/catalogo.scss b/src/views/ecommerce/catalogo/catalogo.scss index 429b54da..2823611e 100755 --- a/src/views/ecommerce/catalogo/catalogo.scss +++ b/src/views/ecommerce/catalogo/catalogo.scss @@ -68,3 +68,25 @@ body { flex-basis: 100%; height: 0; } + +.book-title { + font-family: 'DINPro-CondensedBold', sans-serif; + color: rgba(255, 0, 0, 1); + text-transform: uppercase; + margin-top: calc(5 * var(--scalecatalog) * 1px); + margin-bottom: calc(5 * var(--scalecatalog) * 1px); +} + +.book-author { + font-family: 'DIN-Pro-Condensed-Regular', sans-serif; +} + +.book-descr { + font-family: 'DINPro-BoldItalic', sans-serif; +} + + +.book-details { + font-family: 'DINPro', sans-serif; + margin-bottom: calc(5 * var(--scalecatalog) * 1px); +} diff --git a/src/views/ecommerce/catalogo/catalogo.ts b/src/views/ecommerce/catalogo/catalogo.ts index c63a7139..9f000ead 100755 --- a/src/views/ecommerce/catalogo/catalogo.ts +++ b/src/views/ecommerce/catalogo/catalogo.ts @@ -167,6 +167,11 @@ export default defineComponent({ } }) + watch(() => props.optcatalogo.aggiorna, (newval, oldval) => { + console.log('Aggiorna array...') + generatearrProdToViewSorted() + }) + function resetSearch() { const mialista = getSearchList() if (mialista && mialista.value && mialista.value.hasOwnProperty('name')) { @@ -689,6 +694,7 @@ export default defineComponent({ orientation: props.optcatalogo.areadistampa!.orientation, compress: props.optcatalogo.areadistampa!.compress, }, + enableLinks: true, } console.log('opt di stampa', opt)