Aggiornamento APP RISO:

 Inviando i RIS, deve comparire prima il Circuito della Provincia, e poi quello Nazionale
 Risolto problema per vecchie registrazioni, la provincia compariva "undefined".
This commit is contained in:
Surya Paolo
2024-06-19 00:21:06 +02:00
parent 2d9c178c1f
commit 49d51712bd
155 changed files with 2510 additions and 5296 deletions

View File

@@ -1,3 +1,5 @@
import { GROUPSCMD } from "@src/common/shared_nodejs"
export interface IMainCard {
visible: boolean
strsingolo?: string
@@ -260,8 +262,39 @@ export const costanti = {
small: true,
table: '',
},
{
visible: false,
title: ' Attività ',
subtitle: 'Artigiani, Aziende, Società, Negozi',
strsingolo: 'Attivita',
to: '/activities',
icon: 'fas fa-tshirt',
color: 'indigo-6',
hint: '',
table: 'attivitas',
visuonstat: true,
small: false,
showfavorite: true,
},
],
GROUPCARDS: [
{
visible: true,
title: ' Attività ',
subtitle: 'Artigiani, Aziende, Società, Negozi',
strsingolo: 'Attivita',
to: '/activities',
icon: 'fas fa-tshirt',
color: 'indigo-6',
hint: '',
table: 'attivitas',
visuonstat: true,
small: false,
showfavorite: true,
},
],
BINARY_CHECK: 1,

View File

@@ -5,6 +5,7 @@ import { costanti } from './costanti'
import { useGlobalStore } from '@store/globalStore'
import { toolsext } from '@store/Modules/toolsext'
import { static_data } from '@/db/static_data'
import { shared_consts } from '@src/common/shared_vuejs'
const DeleteRec = {
name: 'deleterec',
@@ -1198,6 +1199,158 @@ export const colmyGoods = [
AddCol(DeleteRec),
]
export const colAttivita = [
AddCol({
name: 'tipodiAttivita',
label_trans: 'attivita.tipodiattivita',
fieldtype: costanti.FieldType.select,
required: true,
jointable: toolsext.TABTIPODIATTIVITA,
icon: 'fas fa-balance-scale',
// noshowlabel: true,
// numpag_carousel: 1,
// inline: true,
// typeobj: 'radio',
}),
AddCol({
name: 'nome_attivita',
label_trans: 'attivita.nome_attivita',
fieldtype: costanti.FieldType.string,
maxlength: 100,
required: true,
}),
AddCol({
name: 'descr',
label_trans: 'proj.shortdescr',
fieldtype: costanti.FieldType.string,
maxlength: 300,
required: true,
}),
AddCol({
name: 'idSector',
label_trans: 'sectors.name',
fieldtype: costanti.FieldType.select,
required: true,
jointable: toolsext.TABSECTORS,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
visible: true,
icon: 'category',
numpag_carousel: 4,
}),
AddCol({
name: 'idSkill',
label_trans: 'skill.name',
fieldtype: costanti.FieldType.select,
jointable: 'skills',
addnone: true,
filter_table: toolsext.TABSECTORS,
filter_field: 'idSector',
noshowlabel: true,
icon: 'engineering',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
allowNewValue: false,
required: false,
sortable: false,
}),
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: '',
required: false,
isadvanced_field: true,
numpag_carousel: 3,
}),
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: 'date_updated', label_trans: 'reg.pub_updated', fieldtype: costanti.FieldType.date,
required: false,
visible: false,
sortable: true,
showWhen: 0
}),
AddCol({
name: 'createdBy',
label_trans: 'reg.username',
foredit: false,
tipovisu: costanti.TipoVisu.LINK,
fieldtype: costanti.FieldType.username_chip,
link: '',
noshowlabel: true,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
}),
AddCol({
name: 'date_publishing', label_trans: 'products.date_publishing',
fieldtype: costanti.FieldType.onlydate,
foredit: false,
noshowlabel: true,
}),
AddCol({ name: 'email', label_trans: 'attivita.email', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'cell_phone', label_trans: 'attivita.cell_phone', fieldtype: costanti.FieldType.string }),
AddCol({
name: 'whatsapp',
label_trans: 'attivita.whatsapp',
}),
AddCol({
name: 'telegram_username',
label_trans: 'attivita.telegram_username',
fieldtype: costanti.FieldType.string,
}),
AddCol({ name: 'website', label_trans: 'attivita.website' }),
AddCol({ name: 'coordinate_gps', label_trans: 'attivita.coordinate_gps', fieldtype: costanti.FieldType.string }),
AddCol({
name: 'logo',
label_trans: 'attivita.logo',
fieldtype: costanti.FieldType.image,
jointable: '',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit,
isadvanced_field: false,
}),
AddCol({
name: 'photos',
label_trans: 'attivita.foto',
fieldtype: costanti.FieldType.listimages,
jointable: '',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit,
isadvanced_field: false,
}),
AddCol({
name: 'date_updated', label_trans: 'reg.pub_updated', fieldtype: costanti.FieldType.date,
required: false,
visible: false,
sortable: true,
showWhen: 0
}),
AddCol(DuplicateRec),
AddCol(ModifRec),
AddCol(DeleteRec),
//++Todo: Aggiungere ORARI di Servizio
]
export const colmySkills = [
AddCol({
name: 'adType',
@@ -2043,7 +2196,7 @@ export const colTableProductInfos = [
AddCol({ name: 'name', label_trans: 'products.name' }),
AddCol({ name: 'description', label_trans: 'products.description', fieldtype: costanti.FieldType.html }),
AddCol({ name: 'icon', label_trans: 'products.icon' }),
AddCol({ name: 'img', label_trans: 'products.img', fieldtype: costanti.FieldType.image_and_filename, path: 'upload/products/' }),
AddCol({ name: 'img', label_trans: 'products.img', fieldtype: costanti.FieldType.image_and_filename, path: 'upload/products/' }),
AddCol({
name: 'department',
label_trans: 'products.department',
@@ -2093,8 +2246,8 @@ export const colTableOrdersCart = [
AddCol({ name: 'totalPrice', label_trans: 'orderscart.totalPrice', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'totalPriceCalc', label_trans: 'orderscart.totalPriceCalc', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'status', label_trans: 'orderscart.status', fieldtype: costanti.FieldType.number }),
]
]
export const colTableProducts = [
AddCol({ name: 'active', label_trans: 'products.active', fieldtype: costanti.FieldType.boolean }),
AddCol({ name: 'isbn', label_trans: 'products.isbn' }),
@@ -2136,8 +2289,8 @@ export const colTableProducts = [
jointable: 'scontisticas',
}),
AddCol({ name: 'price', label_trans: 'products.price', fieldtype: costanti.FieldType.number, required: true }),
// arrvariazioni
/* AddCol({ name: 'sale_price', label_trans: 'products.sale_price', fieldtype: costanti.FieldType.number, required: false }),
AddCol({
@@ -2368,6 +2521,13 @@ const colTablePermission = [
AddCol(DeleteRec),
AddCol(DuplicateRec),
]
const colTableTipoDiAttivita = [
AddCol({ name: '_id', label_trans: 'others.value' }),
AddCol({ name: 'label', label_trans: 'proj.longdescr' }),
AddCol({ name: 'note', label_trans: 'proj.longdescr' }),
AddCol(DeleteRec),
AddCol(DuplicateRec),
]
const colCalDate = [
AddCol({ name: '_id', label_trans: 'rec.date', fieldtype: costanti.FieldType.number }),
@@ -3527,7 +3687,7 @@ export const colmyUserCircuit = [
AddCol({ name: 'deperibile', label_trans: 'account.deperibile', fieldtype: costanti.FieldType.boolean }),
AddCol({ name: 'fidoConcesso', label_trans: 'account.fidoConcesso', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'qta_maxConcessa', label_trans: 'account.qta_maxConcessa', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'totCircolante', label_trans: 'circuit.totCircolante', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'totTransato', label_trans: 'circuit.totTransato', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'numtransactions', label_trans: 'circuit.numtransactions', fieldtype: costanti.FieldType.number }),
@@ -4151,6 +4311,15 @@ export const fieldsTable = {
colicon: 'icon',
noshow: true,
},
{
value: toolsext.TABTIPODIATTIVITA,
label: 'Tipo di Attivita',
columns: colTableTipoDiAttivita,
colkey: 'value',
collabel: 'label',
colicon: 'icon',
noshow: true,
},
{
value: 'accepted',
label: 'Condizioni',
@@ -4180,14 +4349,14 @@ export const fieldsTable = {
collabel: 'key',
},
{
value: toolsext.TABMYSKILLS,
value: shared_consts.TABLES_MYSKILLS,
label: 'Mie Competenze',
columns: colmySkills,
colkey: '_id',
collabel: (rec: any) => `${rec.descr}`,
},
{
value: toolsext.TABMYBACHECAS,
value: shared_consts.TABLES_MYBACHECAS,
label: 'Bacheca',
columns: colmyBachecas,
colkey: '_id',
@@ -4201,12 +4370,26 @@ export const fieldsTable = {
collabel: (rec: any) => `${rec.descr}`,
},
{
value: toolsext.TABMYGOODS,
value: shared_consts.TABLES_MYGOODS,
label: 'Beni',
columns: colmyGoods,
colkey: '_id',
collabel: (rec: any) => `${rec.descr}`,
},
{
value: shared_consts.TABLES_ATTIVITAS,
label: 'Attività',
columns: colAttivita,
colkey: '_id',
collabel: (rec: any) => `${rec.name}`,
},
{
value: toolsext.TABATTIVITA,
label: 'Attivita',
columns: colAttivita,
colkey: '_id',
collabel: (rec: any) => `${rec.descr} - ${rec.note}`,
},
{
value: 'skills',
label: 'Competenze',

View File

@@ -4671,6 +4671,15 @@ export const tools = {
return ''
}
},
getlinkEmail(myemail: string) {
if (myemail) {
return `<a href="${myemail}" >${myemail}</a>`
} else {
return ''
}
},
getNationsByNationality(nat: string) {
@@ -8407,6 +8416,15 @@ export const tools = {
return inputString.replace('\\', '').replace(/"/g, '')
},
removeTrailingBr(str: string) {
// Usa una regex per cercare il tag <br> alla fine della stringa e rimuoverlo
return str.replace(/<br>$/, '');
},
removeescape_e_acapo(inputString: string): string {
return this.removeTrailingBr(inputString.replace('\\', '').replace(/"/g, '').replace(/\r\n/g, '<br>').replace(/\r/g, '<br>'))
},
isObjectEmpty(obj: any) {
return Object.keys(obj).length === 0;
},

View File

@@ -71,6 +71,8 @@ export const toolsext = {
TABPROVINCE: 'provinces',
TABMYSKILLS: 'myskills',
TABMYGOODS: 'mygoods',
TABATTIVITA: 'attivita',
TABTIPODIATTIVITA: 'tipodiattivitas',
TABMYBACHECAS: 'mybachecas',
TABMYHOSPS: 'myhosps',
TABCALDATE: 'caldate',