++ aggiunta la prenotazione negli eventi. con la lista degli utenti.

This commit is contained in:
Surya Paolo
2023-04-17 00:11:36 +02:00
parent eea6e63c58
commit 0945f1af08
22 changed files with 636 additions and 157 deletions

View File

@@ -138,18 +138,21 @@ module.exports = {
TABLES_MYHOSPS: 'myhosps',
TABLES_MYGOODS: 'mygoods',
TABLES_MYEVENTS: 'myevents',
TABLES_CIRCUITS: 'circuits',
TABLES_MYGROUPS: 'mygroups',
MYTABS: [{id: 0, table: 'none' },
{id: 1, table: 'myskills'},
{id: 2, table: 'mybachecas' },
{id: 3, table: 'myhosps'} ,
{id: 4, table: 'mygoods'},
{id: 5, table: 'myevents'}],
MYTABS: [{ id: 0, table: 'none' },
{ id: 1, table: 'myskills' },
{ id: 2, table: 'mybachecas' },
{ id: 3, table: 'myhosps' },
{ id: 4, table: 'mygoods' },
{ id: 5, table: 'myevents' }],
CMD_USER: {
SET_FAVORITE: 1,
SET_BOOKMARK: 2,
SET_SEEN: 3,
SET_ATTEND: 4,
},
TABLES_ENABLE_GETREC_BYID: ['mybachecas', 'myhosps', 'myskills', 'mygoods'],
@@ -171,13 +174,13 @@ module.exports = {
TABLES_GROUPS_NOTIFICATION: ['mygroups'],
TABLES_CIRCUITS_NOTIFICATION: ['circuits'],
TABLES_NUM_AS_ID_NUMBER: [ ],
TABLES_NUM_AS_ID_NUMBER: [],
TABLES_ID_STRING: [
'circuits',
'accounts',
'movements',
],
'circuits',
'accounts',
'movements',
],
TABLES_ID_NUMBER: [
'permissions',
@@ -212,19 +215,19 @@ module.exports = {
table: 'adtypes',
key: 'descr',
},
{table: 'catgrps', key: 'descr'},
{ table: 'catgrps', key: 'descr' },
{
table: 'contribtypes',
key: 'descr',
},
{table: 'goods', key: 'descr'},
{table: 'levels', key: 'descr'},
{table: 'cities', key: 'comune'},
{table: 'provinces', key: 'descr'},
{table: 'sectorgoods', key: 'descr'},
{table: 'sectors', key: 'descr'},
{table: 'skills', key: 'descr'},
{table: 'statusSkills', key: 'descr'},
{ table: 'goods', key: 'descr' },
{ table: 'levels', key: 'descr' },
{ table: 'cities', key: 'comune' },
{ table: 'provinces', key: 'descr' },
{ table: 'sectorgoods', key: 'descr' },
{ table: 'sectors', key: 'descr' },
{ table: 'skills', key: 'descr' },
{ table: 'statusSkills', key: 'descr' },
],
VISIB_ALL: 0,
@@ -411,6 +414,8 @@ module.exports = {
TYPEDIR_EVENTS: 2,
ID_EVENTS_NEW_REC: 1,
ID_EVENTS_REMOVE_REC: 2,
ID_EVENTS_ATTEND: 4,
ID_EVENTS_SEND_MSG: 8,
TYPEDIR_FRIENDS: 3,
ID_FRIENDS_NEW_REC: 1,
@@ -464,7 +469,7 @@ module.exports = {
},
// Tipi di Notifiche:
// Tipi di Notifiche:
/*
Notif: {
UPDATE_APP: 1,
@@ -520,7 +525,7 @@ module.exports = {
},
{
'dir': 2,
'value': 1
'value': 4
},
{
'dir': 3,
@@ -538,6 +543,10 @@ module.exports = {
'dir': 11,
'value': 1
},
{
'dir': 12,
'value': 1
},
],
CIRCUIT_STATUS: {
@@ -554,7 +563,149 @@ module.exports = {
SCOPERTO_MAX_CONTO_COMUNITARIO: 1000,
},
getProjectForAll(proj_add) {
TABLETYPE: {
DefaultCal: 0,
MyBachecas: 1,
},
getProjectByTable(table, proj_add) {
let proj = {}
if (table === this.TABLES_MYGOODS) {
proj = {
'recGood': 1,
'sectorGood': 1,
'idSectorGood': 1,
'idGood': 1,
'idShipping': 1,
'idStatusGood': 1,
//**ADDFIELD_MYGOOD
}
} else if (table === this.TABLES_MYGROUPS) {
proj = {
groupname: 1,
title: 1,
descr: 1,
img: 1,
visibility: 1,
admins: 1,
idCatGrp: 1,
date_created: 1,
date_updated: 1,
photos: 1,
idCity: 1,
note: 1,
website: 1,
link_telegram: 1,
comune: 1,
mycities: 1,
sector: 1,
recCatGrp: 1,
}
} else if (table === this.TABLES_CIRCUITS) {
proj = {
_id: 1,
groupnameId: 1,
path: 1,
name: 1,
strProv: 1,
subname: 1,
longdescr: 1,
regulation: 1,
numMembers: 1,
totCircolante: 1,
totTransato: 1,
systemUserId: 1,
createdBy: 1,
date_created: 1,
date_updated: 1,
nome_valuta: 1,
fido_scoperto_default: 1,
deperimento: 1,
status: 1,
transactionsEnabled: 1,
qta_max_default: 1,
fido_scoperto_default_grp: 1,
qta_max_default_grp: 1,
valuta_per_euro: 1,
symbol: 1,
idCity: 1,
pub_to_share: 1,
visibility: 1,
color: 1,
abbrev: 1,
data_costituz: 1,
photos: 1,
admins: 1,
req_users: 1,
refused_users: 1,
'mycities': 1,
//**ADDFIELD_CIRCUITS
}
} else if (table === this.TABLES_MYSKILLS) {
proj = {
recSkill: 1,
sector: 1,
idSector: 1,
idSkill: 1,
myskill: 1,
idStatusSkill: 1,
idContribType: 1,
numLevel: 1,
adType: 1,
photos: 1,
note: 1,
website: 1,
//**ADDFIELD_MYSKILL
}
} else if (table === this.TABLES_MYHOSPS) {
proj = {
visibile: 1,
typeHosp: 1,
numMaxPeopleHosp: 1,
accomodation: 1,
preferences: 1,
idContribType: 1,
photos: 1,
idCity: 1,
note: 1,
website: 1,
link_maplocation: 1,
}
} else if (table === this.TABLES_MYBACHECAS) {
proj = {
recSkill: 1,
sector: 1,
idSector: 1,
idSkill: 1,
// 'idSubSkill': 1,
idStatusSkill: 1,
idContribType: 1,
dateTimeStart: 1,
dateTimeEnd: 1,
website: 1,
organisedBy: 1,
contact_phone: 1,
contact_telegram: 1,
address: 1,
min_partecip: 1,
max_partecip: 1,
contribstr: 1,
link_maplocation: 1,
//**ADDFIELD_MYBACHECAS
}
}
if (proj_add)
proj = Object.assign({}, proj, proj_add);
return proj;
},
getProjectForAll(proj_add, table) {
let proj = {
idContribType: 1,
idCity: 1,
@@ -580,6 +731,7 @@ module.exports = {
'profile.username_telegram': 1,
'profile.favorite': 1,
'profile.bookmark': 1,
'profile.attend': 1,
'profile.seen': 1,
reported: 1,
date_report: 1,
@@ -591,6 +743,11 @@ module.exports = {
if (proj_add)
proj = Object.assign({}, proj, proj_add);
if (table) {
let proj_add3 = this.getProjectByTable(table);
proj = Object.assign({}, proj, proj_add3);
}
return proj;
},