ver 1.1.20:

- corretto campo foto che non compariva più.
 - sistemato i campi aggiuntivi e i richiesti.
- migliorato la barra in alto di selezione.
- aggiunto alcune icone.
This commit is contained in:
Surya Paolo
2025-02-03 17:18:33 +01:00
parent 997fd136ea
commit 979f90f980
84 changed files with 1257 additions and 357 deletions

34
src/store/CatalogStore.ts Executable file
View File

@@ -0,0 +1,34 @@
import { defineStore } from 'pinia'
import {
IAccount,
ICircuit, ICatalog, IGlobalState, IGroupShort, IMyCircuit, IMyGroup, IUserFields,
ICatalogState
} from '@src/model'
import { tools } from '@store/Modules/tools'
import translate from '@src/globalroutines/util'
import * as Types from '@src/store/Api/ApiTypes'
import { useGlobalStore } from '@store/globalStore'
import { serv_constants } from '@store/Modules/serv_constants'
import { Api } from '@api'
import { toolsext } from '@store/Modules/toolsext'
import { static_data } from '@src/db/static_data'
import { shared_consts } from '@/common/shared_vuejs'
import { costanti } from '@costanti'
import globalroutines from '../globalroutines/index'
export const useCatalogStore = defineStore('CatalogStore', {
state: (): ICatalogState => ({
catalog: { idapp: '', title: '' }
}),
getters: {},
actions: {
},
})

View File

@@ -117,6 +117,55 @@ export const colmailinglist = [
AddCol(DeleteRec),
]
export const colTableCatalogList = [
AddCol({ name: 'active', label_trans: 'myelems.active', fieldtype: costanti.FieldType.boolean }),
AddCol({ name: 'title', label_trans: 'gallery.title' }),
AddCol({
name: 'foto_collana',
label_trans: 'cataloglist.foto_collana',
fieldtype: costanti.FieldType.image,
jointable: '',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit,
isadvanced_field: false,
}),
AddCol({
name: 'idCollana',
label_trans: 'cataloglist.collane',
fieldtype: costanti.FieldType.select,
jointable: 'collanas',
}),
AddCol({
name: 'idTemplateScheda',
label_trans: 'scheda.linkIdTemplate',
fieldtype: costanti.FieldType.select,
jointable: 'collanas',
}),
AddCol({
name: 'referenti',
label_trans: 'cataloglist.referenti',
fieldtype: costanti.FieldType.multiselect,
jointable: 'friendsandme',
field_outtype: costanti.FieldType.object,
showWhen: costanti.showWhen.InView_OnlyifExist,
}),
AddCol({
name: 'img_bordata_web',
label_trans: 'cataloglist.img_bordata_web',
fieldtype: costanti.FieldType.image,
jointable: '',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit,
isadvanced_field: false,
}),
AddCol({ name: 'idTemplateScheda', label_trans: 'scheda.linkIdTemplate', fieldtype: costanti.FieldType.string }),
AddCol(ModifRec),
AddCol(DuplicateRec),
AddCol(DeleteRec),
]
export const colgallery = [
AddCol({ name: 'author_username', label_trans: 'gallery.author_username' }),
AddCol({ name: 'title', label_trans: 'gallery.title' }),
@@ -1031,7 +1080,7 @@ export const colmyUserGroup = [
}),
AddCol({
name: 'idCity',
label_trans: 'skill.city',
label_trans: 'skill.cityorprovince',
fieldtype: costanti.FieldType.multiselect_by_server,
jointable: 'cities',
tablesel: 'cities',
@@ -1113,13 +1162,15 @@ export const colmyUserGroup = [
isadvanced_field: true,
}),
AddCol({
name: 'link_telegram', label_trans: 'reg.link_telegram', isadvanced_field: true, fieldtype: costanti.FieldType.link,
name: 'link_telegram', label_trans: 'reg.link_telegram', fieldtype: costanti.FieldType.link,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
icon: 'fab fa-telegram'
icon: 'fab fa-telegram',
isadvanced_field: true,
}),
AddCol({
name: 'website', label_trans: 'reg.website', isadvanced_field: true, fieldtype: costanti.FieldType.link,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist
name: 'website', label_trans: 'reg.website', fieldtype: costanti.FieldType.link,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
isadvanced_field: true,
}),
AddCol(ModifRec),
@@ -1140,7 +1191,7 @@ export const colmyGoods = [
}),
AddCol({
name: 'idCity',
label_trans: 'skill.city',
label_trans: 'skill.cityorprovince',
fieldtype: costanti.FieldType.multiselect_by_server,
jointable: 'cities',
tablesel: 'cities',
@@ -1152,14 +1203,6 @@ export const colmyGoods = [
remote_field: 'comune',
required: true,
}),
AddCol({
name: 'pub_to_share',
label_trans: 'skill.pub_to_share',
fieldtype: costanti.FieldType.select,
jointable: 'pub_to_share',
icon: 'fas fa-users',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
}),
AddCol({
name: 'groupname',
label_trans: 'proj.gruppo',
@@ -1172,29 +1215,29 @@ export const colmyGoods = [
AddCol({
name: 'adType',
label_trans: 'adTypes.name',
fieldtype: costanti.FieldType.select,
fieldtype: costanti.FieldType.multioption,
required: true,
jointable: 'adtypes',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit,
icon: 'fas fa-bullhorn',
noshowlabel: true,
numpag_carousel: 1,
inline: true,
typeobj: 'radio',
}),
AddCol({
name: 'descr',
label_trans: 'proj.shortdescr',
fieldtype: costanti.FieldType.string,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
noshowlabel: true,
maxlength: 120,
required: true,
sortable: false,
name: 'photos',
label_trans: 'skill.photos',
fieldtype: costanti.FieldType.listimages,
jointable: '',
showpicprofile_ifnotset: true,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit,
}),
AddCol({
name: 'note', label_trans: 'proj.descrapprof', fieldtype: costanti.FieldType.html,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '',
// minlength: 50,
isadvanced_field: true,
required: false,
}),
AddCol({
@@ -1230,7 +1273,13 @@ export const colmyGoods = [
noshowlabel: true,
icon: 'fas fa-hand-holding',
// icon: 'fas fa-hands-helping',
// isadvanced_field: true,
}),
AddCol({
name: '',
fieldtype: costanti.FieldType.separator,
required: false,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit,
visible: false,
}),
AddCol({
name: 'idShipping',
@@ -1241,7 +1290,7 @@ export const colmyGoods = [
noshowlabel: true,
icon: 'fas fa-shipping-fast',
// icon: 'fas fa-hands-helping',
// isadvanced_field: true,
isadvanced_field: true,
}),
AddCol({
name: 'otherfilters',
@@ -1252,7 +1301,16 @@ export const colmyGoods = [
noshowlabel: true,
icon: 'fas fa-filter',
// icon: 'fas fa-hands-helping',
// isadvanced_field: true,
isadvanced_field: true,
}),
AddCol({
name: 'pub_to_share',
label_trans: 'skill.pub_to_share',
fieldtype: costanti.FieldType.select,
jointable: 'pub_to_share',
icon: 'fas fa-users',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
isadvanced_field: true,
}),
AddCol({
name: 'date_created', label_trans: 'event.dateCreated', fieldtype: costanti.FieldType.onlydate,
@@ -1261,22 +1319,6 @@ export const colmyGoods = [
sortable: true,
showWhen: 0
}),
AddCol({
name: 'photos',
label_trans: 'skill.photos',
fieldtype: costanti.FieldType.listimages,
jointable: '',
showpicprofile_ifnotset: true,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit,
isadvanced_field: false,
}),
AddCol({
name: '',
fieldtype: costanti.FieldType.separator,
required: false,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit,
visible: false,
}),
/*AddCol({
name: 'idSubSkill',
label_trans: 'skill.subskill',
@@ -1368,7 +1410,7 @@ export const colAttivita = [
}),
AddCol({
name: 'idCity',
label_trans: 'skill.city',
label_trans: 'skill.cityorprovince',
fieldtype: costanti.FieldType.multiselect_by_server,
jointable: 'cities',
tablesel: 'cities',
@@ -1455,6 +1497,22 @@ export const colAttivita = [
export const colmySkills = [
AddCol({
name: 'idCity',
label_trans: 'skill.cityorprovince',
fieldtype: costanti.FieldType.multiselect_by_server,
jointable: 'cities',
tablesel: 'cities',
noshowlabel: true,
icon: 'fas fa-map-marker-alt',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
remote_table: 'mycities',
remote_key: '_id',
remote_field: 'comune',
required: true,
showonlyif_dipersona: true,
numpag_carousel: 1,
}),
AddCol({
name: 'adType',
label_trans: 'adTypes.name',
@@ -1492,22 +1550,6 @@ export const colmySkills = [
noshowlabel: true,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
}),
AddCol({
name: 'idCity',
label_trans: 'skill.city',
fieldtype: costanti.FieldType.multiselect_by_server,
jointable: 'cities',
tablesel: 'cities',
noshowlabel: true,
icon: 'fas fa-map-marker-alt',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
remote_table: 'mycities',
remote_key: '_id',
remote_field: 'comune',
required: true,
showonlyif_dipersona: true,
numpag_carousel: 2,
}),
AddCol({
name: 'descr',
label_trans: 'proj.shortdescr',
@@ -1534,7 +1576,6 @@ export const colmySkills = [
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '',
required: false,
isadvanced_field: true,
numpag_carousel: 3,
}),
AddCol({
@@ -1575,13 +1616,6 @@ export const colmySkills = [
// isadvanced_field: true,
numpag_carousel: 5,
}),
AddCol({
name: '',
fieldtype: costanti.FieldType.separator,
required: false,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit,
visible: false,
}),
AddCol({
name: 'groupname',
label_trans: 'proj.gruppo',
@@ -1591,6 +1625,14 @@ export const colmySkills = [
link: '/mygrp/groupname',
noshowlabel: true,
}),
AddCol({
name: '',
fieldtype: costanti.FieldType.separator,
required: false,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit,
visible: false,
sortable: false,
}),
AddCol({
name: 'pub_to_share',
label_trans: 'skill.pub_to_share',
@@ -1602,9 +1644,10 @@ export const colmySkills = [
isadvanced_field: true,
}),
AddCol({
name: 'website', label_trans: 'reg.website', isadvanced_field: true, fieldtype: costanti.FieldType.link,
name: 'website', label_trans: 'reg.website', fieldtype: costanti.FieldType.link,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
numpag_carousel: 6,
isadvanced_field: true,
}),
/*AddCol({
name: 'numLevel',
@@ -1643,6 +1686,21 @@ export const colmyHosp = [
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
sortable: false,
}),
AddCol({
name: 'idCity',
label_trans: 'skill.cityorprovince',
fieldtype: costanti.FieldType.multiselect_by_server,
jointable: 'cities',
tablesel: 'cities',
noshowlabel: true,
icon: 'fas fa-map-marker-alt',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
remote_table: 'mycities',
remote_key: '_id',
remote_field: 'comune',
sortable: false,
required: true,
}),
AddCol({
name: 'visibile', label_trans: 'hosps.visibile', fieldtype: costanti.FieldType.boolean,
@@ -1652,12 +1710,15 @@ export const colmyHosp = [
AddCol({
name: 'adType',
label_trans: 'adTypes.name',
fieldtype: costanti.FieldType.select,
fieldtype: costanti.FieldType.multioption,
required: true,
jointable: 'adtypes',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit,
icon: 'fas fa-bullhorn',
noshowlabel: true,
numpag_carousel: 1,
inline: true,
typeobj: 'radio',
}),
AddCol({
name: 'typeHosp',
@@ -1704,21 +1765,6 @@ export const colmyHosp = [
sortable: false,
}),
AddCol({
name: 'idCity',
label_trans: 'skill.city',
fieldtype: costanti.FieldType.multiselect_by_server,
jointable: 'cities',
tablesel: 'cities',
noshowlabel: true,
icon: 'fas fa-map-marker-alt',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
remote_table: 'mycities',
remote_key: '_id',
remote_field: 'comune',
sortable: false,
required: true,
}),
AddCol({
name: 'pub_to_share',
label_trans: 'skill.pub_to_share',
@@ -1745,7 +1791,6 @@ export const colmyHosp = [
noshowlabel: true,
icon: 'fas fa-hand-holding',
// icon: 'fas fa-hands-helping',
isadvanced_field: false,
sortable: false,
}),
AddCol({
@@ -1762,7 +1807,6 @@ export const colmyHosp = [
name: 'note', label_trans: 'proj.descrapprof', fieldtype: costanti.FieldType.html,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '',
isadvanced_field: true,
required: false,
sortable: false,
}),
@@ -1773,18 +1817,27 @@ export const colmyHosp = [
jointable: '',
showpicprofile_ifnotset: true,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
sortable: false,
}),
AddCol({
name: '',
fieldtype: costanti.FieldType.separator,
required: false,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit,
visible: false,
sortable: false,
}),
AddCol({
name: 'link_maplocation', label_trans: 'reg.link_maplocation', fieldtype: costanti.FieldType.link,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
sortable: false,
isadvanced_field: true,
sortable: false,
}),
AddCol({
name: 'link_maplocation', label_trans: 'reg.link_maplocation', isadvanced_field: true, fieldtype: costanti.FieldType.link,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
sortable: false,
}),
AddCol({
name: 'website', label_trans: 'reg.website', isadvanced_field: true, fieldtype: costanti.FieldType.link,
name: 'website', label_trans: 'reg.website', fieldtype: costanti.FieldType.link,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
sortable: false,
isadvanced_field: true,
}),
AddCol({
name: 'date_created', label_trans: 'event.dateCreated', fieldtype: costanti.FieldType.onlydate,
@@ -1828,7 +1881,6 @@ export const colmyBachecas = [
jointable: '',
showpicprofile_ifnotset: true,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
isadvanced_field: true,
sortable: false,
}),
@@ -1862,6 +1914,7 @@ export const colmyBachecas = [
// fieldtype_real: costanti.FieldType.onlydate,
// fieldtype: costanti.FieldType.onlydate,
icon: 'fas fa-calendar-day',
required: true,
}),
AddCol(
{
@@ -1873,10 +1926,11 @@ export const colmyBachecas = [
// fieldtype_real: costanti.FieldType.onlydate,
icon: 'fas fa-calendar-day',
sortable: false,
required: true,
}),
AddCol({
name: 'idCity',
label_trans: 'skill.city',
label_trans: 'skill.cityorprovince',
fieldtype: costanti.FieldType.multiselect_by_server,
jointable: 'cities',
tablesel: 'cities',
@@ -1920,7 +1974,6 @@ export const colmyBachecas = [
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '',
required: false,
isadvanced_field: true,
sortable: false,
}),
AddCol({
@@ -1928,18 +1981,6 @@ export const colmyBachecas = [
label_trans: 'event.address',
fieldtype: costanti.FieldType.string,
}),
AddCol({
name: 'link_maplocation', label_trans: 'reg.link_maplocation', isadvanced_field: true, fieldtype: costanti.FieldType.link,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
sortable: false,
}),
AddCol({
name: 'pub_to_share',
label_trans: 'skill.pub_to_share',
fieldtype: costanti.FieldType.select,
icon: 'fas fa-users',
jointable: 'pub_to_share',
}),
AddCol({
name: 'organisedBy',
label_trans: 'event.organisedBy_insert',
@@ -1947,28 +1988,52 @@ export const colmyBachecas = [
required: false,
sortable: false,
}),
AddCol({
name: '',
fieldtype: costanti.FieldType.separator,
required: false,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit,
visible: false,
sortable: false,
}),
AddCol({
name: 'link_maplocation', label_trans: 'reg.link_maplocation', fieldtype: costanti.FieldType.link,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
sortable: false,
isadvanced_field: true,
}),
AddCol({
name: 'website', label_trans: 'reg.website', fieldtype: costanti.FieldType.link,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
sortable: false,
isadvanced_field: true,
}),
AddCol({
name: 'contact_phone',
label_trans: 'event.contact_phone',
fieldtype: costanti.FieldType.string,
isadvanced_field: true,
}),
AddCol({
name: 'contact_email',
label_trans: 'event.contact_email',
fieldtype: costanti.FieldType.string,
isadvanced_field: true,
}),
AddCol({
name: 'contact_telegram',
label_trans: 'event.contact_telegram',
fieldtype: costanti.FieldType.string,
isadvanced_field: true,
}),
AddCol({
name: 'website', label_trans: 'reg.website', isadvanced_field: true, fieldtype: costanti.FieldType.link,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
sortable: false,
name: 'min_partecip', label_trans: 'event.min_partecip', fieldtype: costanti.FieldType.number,
isadvanced_field: true,
}),
AddCol({
name: 'max_partecip', label_trans: 'event.max_partecip', fieldtype: costanti.FieldType.number,
isadvanced_field: true,
}),
AddCol({ name: 'min_partecip', label_trans: 'event.min_partecip', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'max_partecip', label_trans: 'event.max_partecip', fieldtype: costanti.FieldType.number }),
AddCol({
name: 'idContribType',
label_trans: 'contribtype.name',
@@ -1978,18 +2043,21 @@ export const colmyBachecas = [
noshowlabel: true,
icon: 'fas fa-hand-holding',
// icon: 'fas fa-hands-helping',
isadvanced_field: false,
isadvanced_field: true,
sortable: false,
}),
AddCol({ name: 'contribstr', label_trans: 'event.contribstr', fieldtype: costanti.FieldType.string }),
/*AddCol({
name: '',
fieldtype: costanti.FieldType.separator,
required: false,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit,
visible: false,
sortable: false,
}),*/
AddCol({
name: 'contribstr', label_trans: 'event.contribstr', fieldtype: costanti.FieldType.string,
isadvanced_field: true,
}),
AddCol({
name: 'pub_to_share',
label_trans: 'skill.pub_to_share',
fieldtype: costanti.FieldType.select,
icon: 'fas fa-users',
jointable: 'pub_to_share',
isadvanced_field: true,
}),
AddCol({
name: 'date_created', label_trans: 'event.dateCreated', fieldtype: costanti.FieldType.onlydate,
required: false,
@@ -2342,18 +2410,18 @@ export const colTableGestoreOrdini = [
]
export const colTableVariazioni = [
AddCol({ name: '_id', label_trans: 'catalogo.id', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'price', label_trans: 'catalogo.prezzo', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'sale_price', label_trans: 'catalogo.prezzo_scontato', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'quantita', label_trans: 'catalogo.quantita', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'availability', label_trans: 'catalogo.availability', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'formato', label_trans: 'catalogo.formato', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'misure', label_trans: 'catalogo.misure', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'tipologia', label_trans: 'catalogo.tipologia', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'edizione', label_trans: 'catalogo.edizione', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'preOrderDate', label_trans: 'catalogo.preOrderDate', fieldtype: costanti.FieldType.date }),
AddCol({ name: 'addtocart_link', label_trans: 'catalogo.addtocart_link', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'eta', label_trans: 'catalogo.eta', fieldtype: costanti.FieldType.string }),
AddCol({ name: '_id', label_trans: 'catalogo.id', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'price', label_trans: 'catalogo.prezzo', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'sale_price', label_trans: 'catalogo.prezzo_scontato', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'quantita', label_trans: 'catalogo.quantita', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'availability', label_trans: 'catalogo.availability', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'formato', label_trans: 'catalogo.formato', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'misure', label_trans: 'catalogo.misure', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'tipologia', label_trans: 'catalogo.tipologia', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'edizione', label_trans: 'catalogo.edizione', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'preOrderDate', label_trans: 'catalogo.preOrderDate', fieldtype: costanti.FieldType.date }),
AddCol({ name: 'addtocart_link', label_trans: 'catalogo.addtocart_link', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'eta', label_trans: 'catalogo.eta', fieldtype: costanti.FieldType.string }),
]
export const colTableProductInfos = [
@@ -3614,7 +3682,7 @@ export const colTableCircuitComplete = [
AddCol({ name: 'longdescr', label_trans: 'circuit.descr', fieldtype: costanti.FieldType.html }),
AddCol({
name: 'idCity',
label_trans: 'skill.city',
label_trans: 'skill.cityorprovince',
fieldtype: costanti.FieldType.multiselect_by_server,
jointable: 'cities',
tablesel: 'cities',
@@ -3742,7 +3810,7 @@ export const colTableCircuit = [
AddCol({ name: 'longdescr', label_trans: 'circuit.descr', fieldtype: costanti.FieldType.html }),
AddCol({
name: 'idCity',
label_trans: 'skill.city',
label_trans: 'skill.cityorprovince',
fieldtype: costanti.FieldType.multiselect_by_server,
jointable: 'cities',
tablesel: 'cities',
@@ -3992,12 +4060,12 @@ export const fieldsTable = {
} else
return null
},
getArrColsByTable(mytable: string) {
getArrColsByTable(mytable: string): any[] {
const tablerec: any = this.tablesList.find((rec) => rec.value === mytable)
if (tablerec && tablerec.columns) {
return tablerec.columns
} else
return null
return []
},
getKeyByTable(mytable: string): string {
const myrec = this.getrecTableList(mytable)
@@ -4873,6 +4941,13 @@ export const fieldsTable = {
colicon: 'icon',
noshow: true,
},
{
value: 'catalogs',
label: 'Lista Cataloghi',
columns: colTableCatalogList,
colkey: '_id',
collabel: 'title',
},
],
}

View File

@@ -21,8 +21,9 @@ import {
IImg,
IText,
IAreaDiStampa,
ICatalogo,
IOptCatalogo,
IPagina,
IUserProfile,
} from '@model'
import MixinBase from '@/mixins/mixin-base'
@@ -5405,6 +5406,24 @@ export const tools = {
return userStore.my.verified_email!
},
isEmailVerifiedByUser(userprofile: IUserFields): boolean {
return userprofile.verified_email!
},
isUsernameTelegOkByUser(userprofile: IUserFields): boolean {
return !!userprofile.profile.username_telegram
},
getLinkUserTelegramByUser(userprofile: IUserFields) {
if (userprofile) {
if (!!userprofile.profile.username_telegram) {
return 'https://t.me/' + userprofile.profile.username_telegram
}
} else {
return ''
}
},
TelegCode() {
const userStore = useUserStore()
@@ -7395,6 +7414,14 @@ export const tools = {
link_telegram: '',
}
},
getdefaultnewrec_Catalog(): any {
return {
title: '',
active: true,
idCollana: '',
}
},
getdefaultnewrec_Circuit(): any {
return {
name: '',
@@ -7508,6 +7535,12 @@ export const tools = {
// if ((userStore.isAdmin || userStore.isManager))
// return true
if (shared_consts.TABLES_PER_EDITORI.includes(tablesel)) {
if (userStore.isEditor || userStore.isAdmin) {
return true
}
}
if (shared_consts.TABLES_WITH_ADMINS.includes(tablesel)) {
if (userStore.isAdmin)
return true
@@ -7520,7 +7553,7 @@ export const tools = {
}
}
}
if (rec.hasOwnProperty('userId')) {
@@ -8037,6 +8070,7 @@ export const tools = {
try {
let username = myrow.hasOwnProperty('username') ? myrow['username'] : ''
const userId = myrow.hasOwnProperty('userId') ? myrow['userId'] : ''
const id = myrow.hasOwnProperty('_id') ? myrow['_id'] : ''
if (username === '') {
if (userId === userStore.my._id)
@@ -8055,6 +8089,8 @@ export const tools = {
} else if (table === 'circuits') {
if (myrow.hasOwnProperty('path'))
ris = 'circuits/' + myrow['path']
} else if (table === 'catalogs') {
ris = 'catalogs/' + id
} else if (!!myrow && !!myrow.directory) {
ris = myrow.directory
} else if (table === 'myelems') {
@@ -8205,13 +8241,14 @@ export const tools = {
getoptionsMainCards(only: boolean) {
let myarr = []
let obj = { label: '', value: '', icon: '' }
let obj = { label: '', value: '', icon: '', color: '' }
for (let i = 0; i < costanti.MAINCARDS.length; i++) {
let rec: any = costanti.MAINCARDS[i]
if (rec.table && rec.showinoptions) {
obj.label = rec.title
obj.value = rec.table
obj.icon = rec.icon
obj.color = rec.color
myarr.push({ ...obj })
}
}
@@ -8398,6 +8435,8 @@ export const tools = {
return tools.getdefaultnewrec_MyGroup()
} else if (table === toolsext.TABCIRCUITS) {
return tools.getdefaultnewrec_Circuit()
} else if (table === toolsext.TABCATALOGS) {
return tools.getdefaultnewrec_Catalog()
}
return null
},
@@ -8606,6 +8645,10 @@ export const tools = {
},
}
} else if (table === toolsext.TABCATALOGS) {
return {
}
} else {
return {
// Servizi
@@ -9460,7 +9503,7 @@ export const tools = {
return myrec
},
adjustSize(optcatalogo: ICatalogo, mysize: any, add: number = 0) {
adjustSize(optcatalogo: IOptCatalogo, mysize: any, add: number = 0) {
if (!mysize) {
return '';
}
@@ -9551,7 +9594,7 @@ export const tools = {
return jsonResult;
},
getScale(optcatalogo: ICatalogo) {
getScale(optcatalogo: IOptCatalogo) {
if (optcatalogo.printable && optcatalogo.generazionePDFInCorso)
return optcatalogo.areadistampa!.scale_printable
else

View File

@@ -83,6 +83,7 @@ export const toolsext = {
TABEXTRALIST: 'extralist',
TABNEWSLETTER: 'newstosent',
TABGALLERY: 'gallery',
TABCATALOGS: 'catalogs',
TABMAILINGLIST: 'mailinglist',
TABGROUPS: 'groups',
TABMYPAGE: 'mypages',

View File

@@ -1,4 +1,4 @@
import { IBaseOrder, ICart, IOrder, IOrderCart, IProduct, IProductsState, IProductInfo, ICatProd, IUserShort, IGasordine, IAuthor, ISubCatProd, IText, ICatalogo } from 'model'
import { IBaseOrder, ICart, IOrder, IOrderCart, IProduct, IProductsState, IProductInfo, ICatProd, IUserShort, IGasordine, IAuthor, ISubCatProd, IText, IOptCatalogo } from 'model'
import { Api } from '@api'
import { serv_constants } from '@src/store/Modules/serv_constants'
@@ -1264,7 +1264,7 @@ export const useProducts = defineStore('Products', {
return globalStore.gasordines.filter((rec) => rec.active)
},
getAutoriByArrayAuthors(authors: IAuthor[] | null) {
getAutoriByArrayAuthors(authors?: IAuthor[]) {
// Gestione degli autori
let authorString = '';
if (authors && Array.isArray(authors)) {
@@ -1295,12 +1295,13 @@ export const useProducts = defineStore('Products', {
}
},
replaceKeyWordsByProduct(optcatalogo: ICatalogo, myproduct: IProduct, testo: IText) {
replaceKeyWordsByProduct(optcatalogo: IOptCatalogo, myproduct: IProduct, testo: IText) {
if (!myproduct || !testo.contenuto) {
return testo.contenuto;
}
const autori = this.getAutoriByArrayAuthors(myproduct.productInfo.authors)
const collana = myproduct.productInfo.collana
const maxDescriptionLength = testo.maxlength ?? 100;
@@ -1388,6 +1389,8 @@ export const useProducts = defineStore('Products', {
'{ranking}': ranking || '',
'{venduti}': venduti || '',
'{formato}': formato || '',
'{collana_title}': collana ? collana.descrizione || '' : '',
'{collana_descr}': collana ? collana.descrizione_estesa || '' : '',
'{prezzo}': prezzo || '',
'{scale}': scale || '',
'{prezzo_scontato}': prezzo_scontato || '',

View File

@@ -41,6 +41,7 @@ import { routesECommerce } from '@src/router/routesECommerce'
import { routesAI } from '@src/router/routesAI'
import LandingFooter from '@src/components/LandingFooter/LandingFooter'
import { useProducts } from '@store/Products'
import { useCatalogStore } from './CatalogStore'
const stateConnDefault = 'online'
@@ -359,6 +360,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
const Products = useProducts()
const circuitStore = useCircuitStore()
const userStore = useUserStore()
const catalogStore = useCatalogStore()
const messageStore = useMessageStore()
const notifStore = useNotifStore()
@@ -383,6 +385,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
else if (table === toolsext.TABMAILINGLIST) ris = state.mailinglist
else if (table === toolsext.TABMYPAGE) ris = state.mypage
else if (table === toolsext.TABMYELEMS) ris = state.myelems
else if (table === toolsext.TABCATALOGS) ris = catalogStore.catalog!
else if (table === toolsext.TABCALZOOM) ris = state.calzoom
else if (table === 'producers') ris = state.producers
else if (table === 'storehouses') ris = state.storehouses
@@ -446,6 +449,8 @@ export const useGlobalStore = defineStore('GlobalStore', {
return state.sectorgoods
else if (table === 'catgrps')
return state.catgrps
else if (table === 'collanas')
return Products.collane
else if (table === 'provinces')
return state.provinces.filter((rec: IProvince) => (!rec.card) && (rec.prov !== 'ITA') && (rec.prov !== 'EST'))
else if (table === 'cards') {
@@ -1694,6 +1699,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
const calendarStore = useCalendarStore()
const circuitStore = useCircuitStore()
const Products = useProducts()
const catalogStore = useCatalogStore()
// console.log('calendarStore: loadAfterLogin')
// Load local data
@@ -1719,6 +1725,8 @@ export const useGlobalStore = defineStore('GlobalStore', {
circuitStore.listcircuits = (res.data.listcircuits) ? res.data.listcircuits : []
circuitStore.listaccounts = (res.data.listaccounts) ? res.data.listaccounts : []
catalogStore.catalog = res.data.catalogs
this.settings = (res.data.settings) ? [...res.data.settings] : []
this.disciplines = (res.data.disciplines) ? [...res.data.disciplines] : []
this.paymenttypes = (res.data.paymenttypes) ? [...res.data.paymenttypes] : []
@@ -2447,7 +2455,32 @@ export const useGlobalStore = defineStore('GlobalStore', {
},
SchedeOpt() {
const arrschede: ISchedaSingola[] = this.getMySchede()
let arr: any = []
arr.push({ label: '[Nessuna]', value: '' })
if (arrschede) {
arrschede.forEach((recscheda: ISchedaSingola) => {
let pagename = ''
if (recscheda.scheda) {
if (recscheda.idPageOrig) {
const page = this.getPageById(recscheda.idPageOrig)
pagename = page ? page.title! : ''
}
if (pagename)
pagename = '[Pag: ' + pagename + '] '
const mylabel = pagename + (recscheda.scheda ? recscheda.scheda!.name : '')
arr.push({ label: mylabel, value: recscheda.scheda!._id })
}
});
}
return arr
},
}