diff --git a/src/common/shared_vuejs.ts b/src/common/shared_vuejs.ts index fb7405f3..25880660 100755 --- a/src/common/shared_vuejs.ts +++ b/src/common/shared_vuejs.ts @@ -1103,6 +1103,12 @@ export const shared_consts = { icon: 'fas fa-user-tie', color: 'yellow', }, + Grafico: { + value: 128, + label: 'dashboard.grafico', + icon: 'fas fa-paint-brush', + color: 'green', + }, }, MessageOptions: { diff --git a/src/components/CBarCode/CBarCode.ts b/src/components/CBarCode/CBarCode.ts index 6fae50a2..8634d4b0 100755 --- a/src/components/CBarCode/CBarCode.ts +++ b/src/components/CBarCode/CBarCode.ts @@ -64,20 +64,24 @@ export default defineComponent({ // Funzione per disegnare il codice a barre const drawBarcode = () => { - if (value.value) { - JsBarcode("#C" + value.value, value.value, { - format: format.value, - width: widthlines.value, - height: tools.convstrToNum(height.value), - displayValue: true, - lineColor: "#000", - font: "monospace", - margin: 0, - textMargin: 0, - marginTop: 0, - fontSize: tools.convstrToNum(fontsize.value), - textPosition: "bottom", - }); + try { + if (value.value && value.value.length > 2) { + JsBarcode("#C" + value.value, value.value, { + format: format.value, + width: widthlines.value, + height: tools.convstrToNum(height.value), + displayValue: true, + lineColor: "#000", + font: "monospace", + margin: 0, + textMargin: 0, + marginTop: 0, + fontSize: tools.convstrToNum(fontsize.value), + textPosition: "bottom", + }); + } + } catch (e) { + } } diff --git a/src/components/CCatalogList/CCatalogList.ts b/src/components/CCatalogList/CCatalogList.ts index f0206cf1..c40eac13 100755 --- a/src/components/CCatalogList/CCatalogList.ts +++ b/src/components/CCatalogList/CCatalogList.ts @@ -45,13 +45,23 @@ export default defineComponent({ heightcard: { type: String, required: false, - default: '150px', + default: '400px', }, widthcard: { type: String, required: false, default: '300px', }, + heightimg: { + type: String, + required: false, + default: '150px', + }, + widthimg: { + type: String, + required: false, + default: '300px', + }, }, components: { CMyFieldDb, CGridTableRec, CTitlePage, diff --git a/src/components/CCatalogList/CCatalogList.vue b/src/components/CCatalogList/CCatalogList.vue index c4caa727..e205398f 100755 --- a/src/components/CCatalogList/CCatalogList.vue +++ b/src/components/CCatalogList/CCatalogList.vue @@ -34,7 +34,7 @@ :prop_showMap="false" :heightcarousel="heightcarousel" @clickButtBar="clickButtBar" - :opt="{rowclass: true, widthcard, heightcard}" + :opt="{rowclass: true, widthcard, heightcard, widthimg, heightimg}" > diff --git a/src/components/CGridOriz/CGridOriz.ts b/src/components/CGridOriz/CGridOriz.ts index 584acb67..3d013055 100755 --- a/src/components/CGridOriz/CGridOriz.ts +++ b/src/components/CGridOriz/CGridOriz.ts @@ -11,13 +11,15 @@ import { useUserStore } from '@store/UserStore' import { CTitlePage } from '@/components/CTitlePage' import { CGridTableRec } from '@/components/CGridTableRec' -import { IColGridTable, IMyBacheca, IMySkill, ISearchList, ISkill } from 'model' +import { IColGridTable, IMyBacheca, IMySkill, ISearchList, ISkill, TipoVisu } from 'model' import { shared_consts } from '@/common/shared_vuejs' import { useI18n } from '@/boot/i18n' import { toolsext } from '@store/Modules/toolsext' import { fieldsTable } from '@store/Modules/fieldsTable' import { useQuasar } from 'quasar' +import { func } from '@src/store/Modules/fieldsTable' + export default defineComponent({ name: 'CGridOriz', emits: ['clickButtBar'], @@ -46,6 +48,11 @@ export default defineComponent({ required: false, default: true, }, + prop_modif: { + type: Boolean, + required: false, + default: false, + }, finder: { type: Boolean, required: false, @@ -75,6 +82,7 @@ export default defineComponent({ const searchList_Events = ref([]) const searchList_Hosp = ref([]) const searchList_Attivita = ref([]) + const searchList_Cataloghi = ref([]) const search = ref('') const myrecfiltertoggle = ref(tools.FILTER_ALL) @@ -84,6 +92,12 @@ export default defineComponent({ const col_footer = ref('idCity') const col_tabfooter = ref('mycities') + + function gettablesList() { + if (props.table === 'catalogs') + return func.gettablesListByTable(props.table) + } + const strextra = ref('') const myoptions = ref([]) @@ -181,8 +195,10 @@ export default defineComponent({ return searchList_Hosp.value else if (props.table === shared_consts.TABLES_ATTIVITAS) return searchList_Attivita.value + else if (props.table === shared_consts.TABLES_CATALOG) + return searchList_Cataloghi.value - return searchList_Servizi.value + return searchList_Cataloghi.value }) const showType = computed(() => { @@ -626,6 +642,24 @@ export default defineComponent({ ] + searchList_Cataloghi.value = [ + { + visible: true, + label: 'Regione', + table: 'regions', + key: 'idReg', + type: costanti.FieldType.select, + value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'regions', costanti.FILTER_TUTTI), + keycookie: '_hosp', + addall: true, + arrvalue: [], + filter: null, + useinput: false, + icon: 'fas fa-globe-europe' + }, + + ] + searchList_Hosp.value = [ { visible: true, @@ -1135,6 +1169,7 @@ export default defineComponent({ mySortFieldsAvailable, clickButtBar, myGridRef, + gettablesList, } }, }) diff --git a/src/components/CGridOriz/CGridOriz.vue b/src/components/CGridOriz/CGridOriz.vue index 6748b00d..e23154f7 100755 --- a/src/components/CGridOriz/CGridOriz.vue +++ b/src/components/CGridOriz/CGridOriz.vue @@ -21,7 +21,7 @@ :finder="finder" labelElemFind="trovati" :choose_visutype="visuType" - :butt_modif_new="false" + :butt_modif_new="prop_modif" :noresultLabel=" t('grid.nosearchfound') + ' ' + (showMap ? t('grid.intheareamap') : '') " @@ -35,6 +35,7 @@ :prop_showMap="showMap" :heightcarousel="heightcarousel" @clickButtBar="clickButtBar" + :tablesList="gettablesList()" > diff --git a/src/components/CGridTableRec/CGridTableRec.vue b/src/components/CGridTableRec/CGridTableRec.vue index 913c1303..4884b3f2 100755 --- a/src/components/CGridTableRec/CGridTableRec.vue +++ b/src/components/CGridTableRec/CGridTableRec.vue @@ -2,7 +2,7 @@
+
diff --git a/src/components/CMyElem/CMyElem.vue b/src/components/CMyElem/CMyElem.vue index 72edc099..3a522acb 100755 --- a/src/components/CMyElem/CMyElem.vue +++ b/src/components/CMyElem/CMyElem.vue @@ -562,6 +562,7 @@ :finder="myel.parambool2" :showMap="myel.parambool3" :heightcarousel="myel.heightcarousel" + :prop_modif="myel.parambool4" >
@@ -570,8 +571,10 @@ :prop_search="myel.parambool" :finder="myel.parambool2" :heightcarousel="myel.heightcarousel" - :heightcard="myel.heightimg" - :widthcard="myel.widthimg" + :heightimg="myel.heightimg" + :widthimg="myel.widthimg" + :heightcard="myel.height" + :widthcard="myel.width" >
diff --git a/src/components/CMyRecCatalog/CMyRecCatalog.ts b/src/components/CMyRecCatalog/CMyRecCatalog.ts index 975f4faf..a2e1cbd9 100755 --- a/src/components/CMyRecCatalog/CMyRecCatalog.ts +++ b/src/components/CMyRecCatalog/CMyRecCatalog.ts @@ -111,7 +111,8 @@ export default defineComponent({ 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 + ' ' + if (recargomento) + argomentistr.value += recargomento.name + ' ' } } editorestr.value = '' diff --git a/src/components/CMyRecCatalog/CMyRecCatalog.vue b/src/components/CMyRecCatalog/CMyRecCatalog.vue index d24fa35f..5858f854 100755 --- a/src/components/CMyRecCatalog/CMyRecCatalog.vue +++ b/src/components/CMyRecCatalog/CMyRecCatalog.vue @@ -2,9 +2,8 @@
diff --git a/src/layouts/menuone/menuOne.ts b/src/layouts/menuone/menuOne.ts index 4f2a15b5..77c5db15 100755 --- a/src/layouts/menuone/menuOne.ts +++ b/src/layouts/menuone/menuOne.ts @@ -93,6 +93,7 @@ export default defineComponent({ if (elem.onlyDepartment) menu += ' isDepartment' if (elem.onlyFacilitatore) menu += ' isFacilitatore' if (elem.onlyEditor) menu += ' isEditor' + if (elem.onlyGrafico) menu += ' isGrafico' } if (elem.extraclass) menu += ` ${elem.extraclass}` diff --git a/src/model/GlobalStore.ts b/src/model/GlobalStore.ts index 4f3ed783..7dbbbd2b 100755 --- a/src/model/GlobalStore.ts +++ b/src/model/GlobalStore.ts @@ -141,6 +141,7 @@ export interface IMyElem { parambool?: boolean parambool2?: boolean parambool3?: boolean + parambool4?: boolean number?: number num2?: number imgback?: string @@ -581,6 +582,7 @@ export interface IListRoutes { onlyFacilitatore?: boolean color?: string onlyEditor?: boolean + onlyGrafico?: boolean extraclass?: string meta?: any idelem?: string @@ -1035,6 +1037,8 @@ export interface IOptGrid { rowclass?: boolean widthcard?: string heightcard?: string + widthimg?: string + heightimg?: string } export interface IFilter { diff --git a/src/model/Products.ts b/src/model/Products.ts index 612a0fbf..70b20722 100755 --- a/src/model/Products.ts +++ b/src/model/Products.ts @@ -38,6 +38,7 @@ export interface IProductInfo { collana?: ICollana collezione?: string idPublisher?: string + ListaArgomenti?: string publisher?: IPublisher date_pub?: Date date_pub_ts: number @@ -213,6 +214,7 @@ export interface ICategory { export interface ICatProd { _id?: any + idArgomento?: number, name: string, descr_estesa?: string, img?: string, diff --git a/src/model/UserStore.ts b/src/model/UserStore.ts index 1fb1627c..4da375cc 100755 --- a/src/model/UserStore.ts +++ b/src/model/UserStore.ts @@ -281,6 +281,7 @@ export interface IUserState { isZoomeri?: boolean isTratuttrici?: boolean isEditor?: boolean + isGrafico?: boolean isTeacher?: boolean usersList?: IUserFields[] countusers?: number diff --git a/src/router/routesAdmin.ts b/src/router/routesAdmin.ts index e95b6f95..9d2dc5d8 100644 --- a/src/router/routesAdmin.ts +++ b/src/router/routesAdmin.ts @@ -268,7 +268,7 @@ function getRoutesAd(site: ISites) { onlyAdmin: true, onlyManager: true }, - { + /*{ active: false, order: 10, path: '/admin/zoomlist', @@ -281,7 +281,7 @@ function getRoutesAd(site: ISites) { level_child: 0.5, onlyManager: true, onlyFacilitatore: false - }, + },*/ { active: true, order: 27, @@ -539,7 +539,7 @@ function getRoutesAd(site: ISites) { onlyAdmin: true, onlyManager: true, onlyFacilitatore: true, - onlyEditor: true + onlyEditor: false }, ...routes_manager, diff --git a/src/statics/lang/it.js b/src/statics/lang/it.js index ad2656f0..2cc60097 100755 --- a/src/statics/lang/it.js +++ b/src/statics/lang/it.js @@ -465,6 +465,7 @@ const msg_it = { facilitatore: 'Facilitatore', Editor: 'Editor', zoomeri: 'Zoomeri', + grafico: 'Grafico', /* sonomediatore: 'Quando diventi Meditore vieni contattato da un FACILITATORE, con lui devi:
    ' + '
  1. Aprire la tua Gift Chat (tu come proprietario e il Facilitatore ' + 'come amministratore) con questo nome:
    {nomenave}
  2. ' + diff --git a/src/store/Modules/costanti.ts b/src/store/Modules/costanti.ts index 9f9bdef5..b01d8402 100755 --- a/src/store/Modules/costanti.ts +++ b/src/store/Modules/costanti.ts @@ -349,6 +349,7 @@ export const costanti = { VISUTABLE_USER_TABCIRCUIT: -5, VISUTABLE_GROUP_CIRCUIT: -6, VISUTABLE_GRID_ORIZ: -10, + VISUTABLE_TABLELIST: -20, DIR_UPLOAD: 'upload/', DIR_PRODUCTS: 'products/', diff --git a/src/store/Modules/fieldsTable.ts b/src/store/Modules/fieldsTable.ts index bde52e90..36eba26b 100755 --- a/src/store/Modules/fieldsTable.ts +++ b/src/store/Modules/fieldsTable.ts @@ -133,10 +133,16 @@ export const colTableCatalogList = [ isadvanced_field: false, }), AddCol({ - name: 'idCollane', - label_trans: 'cataloglist.collane', + name: 'idPageAssigned', + label_trans: 'cataloglist.idPageAssigned', + fieldtype: costanti.FieldType.select, + jointable: 'mypages_id', + }), + AddCol({ + name: 'referenti', + label_trans: 'cataloglist.referenti', fieldtype: costanti.FieldType.multiselect, - jointable: 'collanas', + jointable: 'lista_editori', }), AddCol({ name: 'argomenti', @@ -144,6 +150,12 @@ export const colTableCatalogList = [ fieldtype: costanti.FieldType.multiselect, jointable: 'catprods', }), + AddCol({ + name: 'idCollane', + label_trans: 'cataloglist.collane', + fieldtype: costanti.FieldType.multiselect, + jointable: 'collanas', + }), AddCol({ name: 'editore', label_trans: 'cataloglist.editore', @@ -151,19 +163,6 @@ export const colTableCatalogList = [ jointable: 'publishers', }), - AddCol({ - name: 'idPageAssigned', - label_trans: 'cataloglist.idPageAssigned', - fieldtype: costanti.FieldType.select, - jointable: 'mypages_id', - }), - - AddCol({ - name: 'referenti', - label_trans: 'cataloglist.referenti', - fieldtype: costanti.FieldType.multiselect, - jointable: 'lista_editori', - }), AddCol({ name: 'descr_introduttiva', label_trans: 'cataloglist.descr_introduttiva', fieldtype: costanti.FieldType.html, maxlength: 1300 }), AddCol({ name: 'pagina_introduttiva_sfondo_nero', label_trans: 'cataloglist.pagina_introduttiva_sfondo_nero', fieldtype: costanti.FieldType.boolean }), @@ -360,6 +359,7 @@ export const colmyelems = [ AddCol({ name: 'parambool', label_trans: 'myelems.parambool', fieldtype: costanti.FieldType.boolean }), AddCol({ name: 'parambool2', label_trans: 'myelems.parambool2', fieldtype: costanti.FieldType.boolean }), AddCol({ name: 'parambool3', label_trans: 'myelems.parambool3', fieldtype: costanti.FieldType.boolean }), + AddCol({ name: 'parambool4', label_trans: 'myelems.parambool4', fieldtype: costanti.FieldType.boolean }), AddCol({ name: 'number', label_trans: 'myelems.number', fieldtype: costanti.FieldType.number }), AddCol({ name: 'num2', label_trans: 'myelems.num2', fieldtype: costanti.FieldType.number }), AddCol({ name: 'imgback', label_trans: 'myelems.imgback' }), @@ -414,7 +414,10 @@ export const colmsg_templates = [ ] export const colmypage = [ - AddCol({ name: '_id', label_trans: 'index', fieldtype: costanti.FieldType.string }), + AddCol({ + name: '_id', label_trans: 'index', fieldtype: costanti.FieldType.string, + showWhen: costanti.showWhen.InPage + costanti.showWhen.InEdit, + }), AddCol({ name: 'path', label_trans: 'pages.path' }), AddCol({ name: 'icon', label_trans: 'pages.icon' }), AddCol({ name: 'order', label_trans: 'pages.order', fieldtype: costanti.FieldType.number }), @@ -5079,6 +5082,16 @@ export const func = { return mylist } + return [] + }, + gettablesListByTable(table: string) { + const userStore = useUserStore() + if (fieldsTable.tablesList) { + const mylist = fieldsTable.tablesList.filter((rec: any) => ((rec.onlyAdmin === userStore.isAdmin) || (!rec.onlyAdmin)) && (!rec.noshow) && rec.value === table) + + return mylist + } + return [] }, } diff --git a/src/store/Modules/tools.ts b/src/store/Modules/tools.ts index 83daabf9..990eb0b3 100644 --- a/src/store/Modules/tools.ts +++ b/src/store/Modules/tools.ts @@ -2654,6 +2654,7 @@ export const tools = { || (elem.onlyNotSoci && !userStore.my.profile.socio) || (elem.onlyFacilitatore && userStore.isFacilitatore) || (elem.onlyEditor && userStore.isEditor) + || (elem.onlyGrafico && userStore.isGrafico) || (elem.onlyDepartment && userStore.isDepartment) || ((!elem.onlyAdmin) && (!elem.onlyManager) && (!elem.onlyFacilitatore) && (!elem.onlyEditor) && (!elem.onlyDepartment) && (!elem.onlySocioResidente) && (!elem.onlyConsiglio) && (!elem.onlyNotSoci))) && elem.active @@ -3170,7 +3171,11 @@ export const tools = { isEditor() { const userStore = useUserStore() - return userStore.isEditor + return userStore.isEditor || userStore.isAdmin + }, + isGrafico() { + const userStore = useUserStore() + return userStore.isGrafico || userStore.isAdmin }, isTeacher() { @@ -7536,7 +7541,7 @@ export const tools = { // return true if (shared_consts.TABLES_PER_EDITORI.includes(tablesel)) { - if (userStore.isEditor || userStore.isAdmin) { + if (userStore.isEditor || userStore.isGrafico || userStore.isAdmin) { return true } } diff --git a/src/store/Products.ts b/src/store/Products.ts index d8f9fa6d..34b24cb9 100755 --- a/src/store/Products.ts +++ b/src/store/Products.ts @@ -1363,7 +1363,7 @@ export const useProducts = defineStore('Products', { const prezzo_scontato = tools.arrotonda2Dec(myproduct.arrvariazioni![0].sale_price) || '' const categoria = this.getCatProdsStrByCatProds(myproduct.productInfo.catprods!) const sottocategoria = myproduct.productInfo.subcatprods && myproduct.productInfo.subcatprods.length > 0 ? myproduct.productInfo.subcatprods[0].name! : '' - const descr_categoria = myproduct.productInfo.catprods ? this.getCatProdDescrStrByIdCatProd(myproduct.productInfo.catprods![0].name) : '' + const descr_categoria = myproduct.productInfo.catprods && myproduct.productInfo.catprods.length > 0 ? this.getCatProdDescrStrByIdCatProd(myproduct.productInfo.catprods![0].name) : '' const misure = myproduct.arrvariazioni![0].misure || '' const formato = myproduct.arrvariazioni![0].formato || '' const pagine = myproduct.arrvariazioni![0].pagine || '' diff --git a/src/store/UserStore.ts b/src/store/UserStore.ts index 463b5999..b206712b 100755 --- a/src/store/UserStore.ts +++ b/src/store/UserStore.ts @@ -209,6 +209,7 @@ export const useUserStore = defineStore('UserStore', { isZoomeri: false, isTratuttrici: false, isEditor: false, + isGrafico: false, isTeacher: false, usersList: [], countusers: 0, @@ -1202,6 +1203,7 @@ export const useUserStore = defineStore('UserStore', { this.isDepartment = tools.isBitActive(this.my.perm, shared_consts.Permissions.Department.value) this.isTeacher = tools.isBitActive(this.my.perm, shared_consts.Permissions.Teacher.value) this.isEditor = tools.isBitActive(this.my.perm, shared_consts.Permissions.Editor.value) + this.isGrafico = tools.isBitActive(this.my.perm, shared_consts.Permissions.Grafico.value) this.my.tokens = [] this.resetArrToken(this.my.tokens) diff --git a/src/views/admin/dbop/dbop.vue b/src/views/admin/dbop/dbop.vue index b602bee0..90e3133c 100755 --- a/src/views/admin/dbop/dbop.vue +++ b/src/views/admin/dbop/dbop.vue @@ -397,6 +397,14 @@ >
+
+ +
+
catalog.idPageAssigned === props.idPage) }) + const ispageCatalogata = computed(() => { + return !!getCatalogoByMyPage.value + }) + // Register the scroll event on component mount const handleScroll = () => { const scrollTop = window.scrollY || document.documentElement.scrollTop; @@ -374,11 +383,12 @@ export default defineComponent({ let catstr = '' - if (optcatalogo.value.argomenti) { + if (optcatalogo.value.argomenti && optcatalogo.value.argomenti.length > 0) { // ha la priorità questo scelto sul catalogo arrargomstr = getArgomentiDaFiltrare(optcatalogo.value.argomenti!) } else { - catstr = cat.value || '' + arrargomstr = getArgomentiDaFiltrare([cat.value || '']) + // catstr = cat.value || '' } @@ -541,7 +551,7 @@ export default defineComponent({ let catstr = '' - if (optcatalogo.value.argomenti) { + if (optcatalogo.value.argomenti && optcatalogo.value.argomenti.length > 0) { // ha la priorità questo scelto sul catalogo arrargomstr = getArgomentiDaFiltrare(optcatalogo.value.argomenti!) } else { @@ -1139,6 +1149,10 @@ export default defineComponent({ return page && page.length > 0 && page[0] && page[0].length > 0 } + function naviga(path: string) { + router.push(path) + } + onMounted(mounted) return { @@ -1191,6 +1205,8 @@ export default defineComponent({ updateOptCatalogo, optcatalogo, getTestoIntroduttivo, + ispageCatalogata, + naviga, } } }) diff --git a/src/views/ecommerce/catalogo/catalogo.vue b/src/views/ecommerce/catalogo/catalogo.vue index 74e5dc9c..e5a0bb6a 100755 --- a/src/views/ecommerce/catalogo/catalogo.vue +++ b/src/views/ecommerce/catalogo/catalogo.vue @@ -7,9 +7,22 @@ class="bg-green text-white" > - - - + + + + + + @@ -24,7 +37,12 @@
- + 1 - + 1 - + 1 - +
-
+
@@ -483,9 +511,19 @@
+ +
+ +
+
-          PASSI DA COMPIERE:
+          PASSI DA COMPIERE PER FARE AGGIORNAMENTI :
 
           1. Ottenere il file delle descrizioni aggiornato (da Matteo chiedere l'export di tutti i prodotti presenti su GruppoMacro - XML)