- aggiornati gli argomenti in base a GM
This commit is contained in:
@@ -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: {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
:prop_showMap="false"
|
||||
:heightcarousel="heightcarousel"
|
||||
@clickButtBar="clickButtBar"
|
||||
:opt="{rowclass: true, widthcard, heightcard}"
|
||||
:opt="{rowclass: true, widthcard, heightcard, widthimg, heightimg}"
|
||||
>
|
||||
</CGridTableRec>
|
||||
</div>
|
||||
|
||||
@@ -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(<ISearchList[]>[])
|
||||
const searchList_Hosp = ref(<ISearchList[]>[])
|
||||
const searchList_Attivita = ref(<ISearchList[]>[])
|
||||
const searchList_Cataloghi = ref(<ISearchList[]>[])
|
||||
|
||||
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(<any>[])
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -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()"
|
||||
>
|
||||
</CGridTableRec>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div v-if="tools.isDebugOn()"></div>
|
||||
<div :class="$q.screen.lt.sm ? `` : `q-pa-xs`" v-if="isfinishLoading">
|
||||
<q-toggle
|
||||
v-if="(tools.isManager() || tools.isEditor()) && !showMap && editOn"
|
||||
v-if="(tools.isManager() || tools.isEditor() || tools.isGrafico()) && !showMap && editOn"
|
||||
v-model="editOn"
|
||||
color="green"
|
||||
icon="fas fa-pencil-alt"
|
||||
@@ -678,7 +678,7 @@
|
||||
!(
|
||||
myvertical === costanti.VISUTABLE_SCHEDA_USER ||
|
||||
myvertical === 2 ||
|
||||
myvertical === costanti.VISUTABLE_SCHEDA_GROUP
|
||||
myvertical === costanti.VISUTABLE_SCHEDA_GROUP
|
||||
)
|
||||
"
|
||||
v-slot:header="props"
|
||||
|
||||
@@ -1283,6 +1283,7 @@
|
||||
:options="[
|
||||
{ label: 'Eventi', value: 'mybachecas' },
|
||||
{ label: 'Servizi', value: 'myskills' },
|
||||
{ label: 'Lista Cataloghi', value: 'catalogs' },
|
||||
]"
|
||||
label="Tabella"
|
||||
emit-value
|
||||
@@ -1299,6 +1300,7 @@
|
||||
{ label: 'Griglia', value: costanti.VISUTABLE_LISTA },
|
||||
{ label: 'Scheda User', value: costanti.VISUTABLE_SCHEDA_USER },
|
||||
{ label: 'User Info', value: costanti.SHOW_USERINFO },
|
||||
{ label: 'Lista Tabelle', value: costanti.VISUTABLE_TABLELIST },
|
||||
]"
|
||||
label="Visualizzazione"
|
||||
emit-value
|
||||
@@ -1325,6 +1327,12 @@
|
||||
label="Mostra Mappa"
|
||||
@update:model-value="modifElem"
|
||||
></q-toggle>
|
||||
<q-toggle
|
||||
v-model="myel.parambool4"
|
||||
color="positive"
|
||||
label="Bottone Modifica"
|
||||
@update:model-value="modifElem"
|
||||
></q-toggle>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CATALOGLIST">
|
||||
|
||||
@@ -562,6 +562,7 @@
|
||||
:finder="myel.parambool2"
|
||||
:showMap="myel.parambool3"
|
||||
:heightcarousel="myel.heightcarousel"
|
||||
:prop_modif="myel.parambool4"
|
||||
></CGridOriz>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CATALOGLIST">
|
||||
@@ -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"
|
||||
></CCatalogList>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.STATUSREG">
|
||||
|
||||
@@ -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 = ''
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
<div class="q-pa-sm row items-start q-gutter-sm">
|
||||
<q-card
|
||||
v-if="myrec"
|
||||
flat
|
||||
bordered
|
||||
:style="`width: ` + opt.widthcard + `; `"
|
||||
:style="`width: ` + opt.widthcard + `; ` + (opt.heightcard ? `height: ` + opt.heightcard + `; ` : '')"
|
||||
>
|
||||
<!--<q-skeleton
|
||||
v-if="!myrec.foto_collana"
|
||||
@@ -13,9 +12,9 @@
|
||||
:height="opt.heightcard"
|
||||
/>-->
|
||||
<q-img
|
||||
:width="opt.widthcard"
|
||||
:width="opt.widthimg"
|
||||
@click="apriInfo = true"
|
||||
:height="opt.heightcard"
|
||||
:height="opt.heightimg"
|
||||
class="clickable-image"
|
||||
fit="cover"
|
||||
:src="
|
||||
@@ -189,7 +188,7 @@
|
||||
? myrec.referenti.join(', ')
|
||||
: '[Non Assegnato]'
|
||||
"
|
||||
:label="$t('cataloglist.argomenti') + `:`"
|
||||
:label="$t('cataloglist.referenti') + `:`"
|
||||
:color="
|
||||
myrec.referenti && myrec.referenti.length > 0
|
||||
? 'text-blue'
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
<q-toggle :icon="'fas fa-moon'" v-model="dark"> </q-toggle>
|
||||
</div>
|
||||
<div
|
||||
v-if="tools.isLogged() && (isAdmin() || tools.isEditor())"
|
||||
v-if="tools.isLogged() && (isAdmin() || tools.isEditor()|| tools.isGrafico())"
|
||||
class="text-h7"
|
||||
>
|
||||
<q-toggle :icon="'fas fa-pencil-alt'" v-model="globalStore.editOn"> </q-toggle>
|
||||
|
||||
@@ -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}`
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -281,6 +281,7 @@ export interface IUserState {
|
||||
isZoomeri?: boolean
|
||||
isTratuttrici?: boolean
|
||||
isEditor?: boolean
|
||||
isGrafico?: boolean
|
||||
isTeacher?: boolean
|
||||
usersList?: IUserFields[]
|
||||
countusers?: number
|
||||
|
||||
@@ -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,
|
||||
|
||||
|
||||
@@ -465,6 +465,7 @@ const msg_it = {
|
||||
facilitatore: 'Facilitatore',
|
||||
Editor: 'Editor',
|
||||
zoomeri: 'Zoomeri',
|
||||
grafico: 'Grafico',
|
||||
/* sonomediatore: 'Quando diventi Meditore vieni contattato da un <strong>FACILITATORE</strong>, con lui devi:<br><ol class="lista">' +
|
||||
'<li>Aprire la tua <strong>Gift Chat</strong> (tu come proprietario e il Facilitatore ' +
|
||||
'come amministratore) con questo nome:<br><strong>{nomenave}</strong></li>' +
|
||||
|
||||
@@ -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/',
|
||||
|
||||
@@ -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 []
|
||||
},
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 || ''
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -397,6 +397,14 @@
|
||||
></q-btn>
|
||||
<br />
|
||||
</div>
|
||||
<div class="row">
|
||||
<q-btn
|
||||
label="Elimina CatProds e SubCatProds"
|
||||
color="negative"
|
||||
@click="EseguiFunz('eliminaCatProds')"
|
||||
></q-btn>
|
||||
<br />
|
||||
</div>
|
||||
<div class="row">
|
||||
<q-input
|
||||
v-model="valmin"
|
||||
|
||||
@@ -11,10 +11,15 @@ import { costanti } from '@costanti'
|
||||
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
import { CProductCard } from '@src/components/CProductCard'
|
||||
|
||||
import { CMySelect } from '@src/components/CMySelect'
|
||||
import { CContainerCatalogoCard } from '@src/components/CContainerCatalogoCard'
|
||||
import { CSelectUserActive } from '@src/components/CSelectUserActive'
|
||||
import { IOptCatalogo, IDimensioni, IFilterCatalogo, IMyScheda, IProdView, IProduct, ISchedaSingola, ISearchList, ICatalog, IImg, IMyPage } from 'model'
|
||||
import {
|
||||
IOptCatalogo, IDimensioni, IFilterCatalogo,
|
||||
IMyScheda, IProdView, IProduct, ISchedaSingola, ISearchList, ICatalog, IImg, IMyPage,
|
||||
|
||||
} from 'model'
|
||||
|
||||
|
||||
import { fieldsTable } from '@store/Modules/fieldsTable'
|
||||
@@ -145,6 +150,10 @@ export default defineComponent({
|
||||
return catalogStore.catalogs?.find((catalog: ICatalog) => 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,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -7,9 +7,22 @@
|
||||
class="bg-green text-white"
|
||||
>
|
||||
<q-tab name="visu" icon="fas fa-eye" label="Visualizza"> </q-tab>
|
||||
<q-tab name="sfondo" icon="fas fa-image" label="Sfondo"> </q-tab>
|
||||
<q-tab name="pagine" icon="fas fa-book-reader" label="Pagine"> </q-tab>
|
||||
<q-tab name="opzioni" icon="fas fa-save" label="Opzioni"> </q-tab>
|
||||
<q-tab
|
||||
v-if="tools.isGrafico()"
|
||||
name="sfondo"
|
||||
icon="fas fa-image"
|
||||
label="Sfondo"
|
||||
>
|
||||
</q-tab>
|
||||
<q-tab
|
||||
v-if="tools.isGrafico()"
|
||||
name="pagine"
|
||||
icon="fas fa-book-reader"
|
||||
label="Pagine"
|
||||
>
|
||||
</q-tab>
|
||||
<q-tab name="tutorial" icon="fas fa-info" label="Tutorial"> </q-tab>
|
||||
<q-tab name="opzioni" icon="fas fa-save" label="Avanzati"> </q-tab>
|
||||
</q-tabs>
|
||||
<q-tab-panels v-model="tabcatalogo" animated class="" keep-alive>
|
||||
<q-tab-panel name="visu" v-if="optcatalogo">
|
||||
@@ -24,7 +37,12 @@
|
||||
</div>
|
||||
<div v-if="loadpage" class="panel">
|
||||
<div class="container">
|
||||
<q-tabs v-model="tabvisu" dense class="bg-indigo text-white">
|
||||
<q-tabs
|
||||
v-if="!ispageCatalogata"
|
||||
v-model="tabvisu"
|
||||
dense
|
||||
class="bg-indigo text-white"
|
||||
>
|
||||
<q-tab
|
||||
name="categorie"
|
||||
icon="fas fa-folder-open"
|
||||
@@ -32,17 +50,27 @@
|
||||
>
|
||||
<q-badge v-if="cat" color="red" floating>1</q-badge>
|
||||
</q-tab>
|
||||
<q-tab name="autori" icon="fas fa-user" label="Autori">
|
||||
<q-tab
|
||||
v-if="!ispageCatalogata"
|
||||
name="autori"
|
||||
icon="fas fa-user"
|
||||
label="Autori"
|
||||
>
|
||||
<q-badge v-if="filter.author" color="red" floating>1</q-badge>
|
||||
</q-tab>
|
||||
<q-tab name="ricerca" icon="fas fa-search" label="Cerca">
|
||||
<q-tab
|
||||
v-if="!ispageCatalogata"
|
||||
name="ricerca"
|
||||
icon="fas fa-search"
|
||||
label="Cerca"
|
||||
>
|
||||
<q-badge v-if="getSearchText()" color="red" floating
|
||||
>1</q-badge
|
||||
>
|
||||
</q-tab>
|
||||
</q-tabs>
|
||||
<q-tab-panels v-model="tabvisu" animated class="" keep-alive>
|
||||
<q-tab-panel name="categorie">
|
||||
<q-tab-panel v-if="!ispageCatalogata" name="categorie">
|
||||
<div class="row justify-center q-mx-auto bg-blue-1">
|
||||
<div v-for="(reccat, index) in getCatProds()" :key="index">
|
||||
<span
|
||||
@@ -157,7 +185,10 @@
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
|
||||
<div class="row justify-center q-mx-auto">
|
||||
<div
|
||||
v-if="!ispageCatalogata"
|
||||
class="row justify-center q-mx-auto"
|
||||
>
|
||||
<q-select
|
||||
v-model="filter.sort_field"
|
||||
dense
|
||||
@@ -311,8 +342,7 @@
|
||||
?.contenuto
|
||||
"
|
||||
:style="{
|
||||
'--scalecatalog':
|
||||
tools.getScale(optcatalogo),
|
||||
'--scalecatalog': tools.getScale(optcatalogo),
|
||||
'line-height':
|
||||
recscheda.scheda.dimensioni.pagina?.testo_up
|
||||
?.font.line_height,
|
||||
@@ -321,9 +351,7 @@
|
||||
}"
|
||||
>
|
||||
<div
|
||||
v-html="
|
||||
getTestoIntroduttivo(recscheda)
|
||||
"
|
||||
v-html="getTestoIntroduttivo(recscheda)"
|
||||
style="display: flex; flex-direction: row"
|
||||
></div>
|
||||
</div>
|
||||
@@ -483,9 +511,19 @@
|
||||
</q-img>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="tutorial">
|
||||
<div class="q-pa-md q-ma-sm text-center">
|
||||
<q-btn
|
||||
rounded
|
||||
label="Apri Tutorial"
|
||||
color="primary"
|
||||
@click="naviga('/tutorial')"
|
||||
></q-btn>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="opzioni">
|
||||
<pre>
|
||||
<strong>PASSI DA COMPIERE:</strong>
|
||||
<strong>PASSI DA COMPIERE PER FARE AGGIORNAMENTI :</strong>
|
||||
|
||||
1. Ottenere il file delle descrizioni aggiornato (da Matteo chiedere l'export di tutti i prodotti presenti su GruppoMacro - XML)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user