Pagina con i link dei Canali territoriali di RISO

Lista Tabelle "Aggiungi" da errore userId...
Aggiunto "Servizi" e alcune sue sottocategorie
Aggiunto anche la conversione della foto piccola alla Foto Profilo
This commit is contained in:
paoloar77
2022-03-09 14:53:17 +01:00
parent 267dca3f15
commit 00939b053a
38 changed files with 722 additions and 741 deletions

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.3.6" APP_VERSION="0.3.7"
SERVICE_WORKER_FILE="service-worker.js" SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13" APP_ID="13"
DIRECTORY_LOCAL="newfreeplanet" DIRECTORY_LOCAL="newfreeplanet"

View File

@@ -81,6 +81,7 @@ const msg_website_it = {
favproj: 'Favoriti', favproj: 'Favoriti',
statusreg: { statusreg: {
reg: 'Partecipanti', reg: 'Partecipanti',
verifieds: 'Verificati',
passeggeri: 'Passeggeri Navi', passeggeri: 'Passeggeri Navi',
giainlista: 'Gia in Lista', giainlista: 'Gia in Lista',
newreg: 'Ultime Registrazioni:', newreg: 'Ultime Registrazioni:',

View File

@@ -94,19 +94,6 @@ const routes_admin: IListRoutes[] = [
submenu: true, submenu: true,
onlyAdmin: true onlyAdmin: true
}, },
{
active: true,
order: 1030,
path: '/admin/sendpushnotif',
materialIcon: 'event_seat',
name: 'otherpages.manage.sendpushnotif',
component: () => import('@/rootgen/admin/sendpushnotif/sendpushnotif.vue'),
level_parent: 0.0,
level_child: 0.5,
inmenu: true,
submenu: true,
onlyAdmin: true
},
{ {
active: true, active: true,
order: 1040, order: 1040,
@@ -336,6 +323,20 @@ const routes_manager: IListRoutes[] = [
onlyManager: true onlyManager: true
// onlyTutor: true // onlyTutor: true
}, },
{
active: true,
order: 1030,
path: '/admin/sendpushnotif',
materialIcon: 'event_seat',
name: 'otherpages.manage.sendpushnotif',
component: () => import('@/rootgen/admin/sendpushnotif/sendpushnotif.vue'),
level_parent: 0.0,
level_child: 0.5,
inmenu: true,
submenu: true,
onlyAdmin: true,
onlyManager: true,
},
{ {
active: true, active: true,
order: 40, order: 40,

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.3.6" APP_VERSION="0.3.7"
SERVICE_WORKER_FILE="service-worker.js" SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13" APP_ID="13"
DIRECTORY_LOCAL="newfreeplanet" DIRECTORY_LOCAL="newfreeplanet"

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.3.6" APP_VERSION="0.3.7"
SERVICE_WORKER_FILE="service-worker.js" SERVICE_WORKER_FILE="service-worker.js"
APP_ID="12" APP_ID="12"
DIRECTORY_LOCAL="newfreeplanet" DIRECTORY_LOCAL="newfreeplanet"

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.3.6" APP_VERSION="0.3.7"
SERVICE_WORKER_FILE="service-worker.js" SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13" APP_ID="13"
DIRECTORY_LOCAL="newfreeplanet" DIRECTORY_LOCAL="newfreeplanet"

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.3.6" APP_VERSION="0.3.7"
SERVICE_WORKER_FILE="service-worker.js" SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13" APP_ID="13"
DIRECTORY_LOCAL=newfreeplanet DIRECTORY_LOCAL=newfreeplanet

View File

@@ -41,6 +41,7 @@ const msg_website_de = {
dbop: 'Operazioni', dbop: 'Operazioni',
statusreg: { statusreg: {
reg: 'Partecipanti', reg: 'Partecipanti',
verifieds: 'Verificati',
passeggeri: 'Passeggeri Navi', passeggeri: 'Passeggeri Navi',
giainlista: 'Gia in Lista', giainlista: 'Gia in Lista',
newreg: 'Ultime Registrazioni:', newreg: 'Ultime Registrazioni:',

View File

@@ -1,139 +0,0 @@
module.exports = {
Accepted: {
CHECK_READ_GUIDELINES: 1,
CHECK_SEE_VIDEO_PRINCIPI: 2,
},
ALL_SAW_AND_ACCEPTED: 3,
// ---------------------
FILTER_EXTRALIST_NOT_REGISTERED: 1,
FILTER_EXTRALIST_NOT_CONTACTED: 2,
FILTER_EXTRALIST_WITH_NOTE: 4,
FILTER_USER_NO_ZOOM: 8,
FILTER_USER_NO_INVITANTE: 16,
FILTER_USER_NO_TELEGRAM_ID: 32,
FILTER_USER_CODICE_AUTH_TELEGRAM: 64,
FILTER_USER_NO_EMAIL_VERIFICATA: 128,
FILTER_USER_NO_DREAM: 256,
FILTER_EXTRALIST_DELETED: 512,
FILTER_USER_TELEGRAM_BLOCKED: 1024,
FILTER_ATTIVI: 2048,
FILTER_NASCOSTI: 4096,
FILTER_NAVI_NON_PRESENTI: 8192,
FILTER_QUALIFIED: 16384,
FILTER_ASK_ZOOM_VISTO: 32768,
FILTER_HOURS_MYLIST: 65536,
FILTER_HOURS_ALL: 131072,
FILTER_MISSING_PAYMENT: 262144,
FILTER_TO_MAKE_MEMBERSHIP_CARD: 524288,
FILTER_MEMBERSHIP_CARD_OK: 1048576,
REPORT_FILT_RESP: 1,
REPORT_FILT_ATTIVITA: 2,
PaymentTypes: [
'Nessuno',
'Bonifico Bancario',
'Paypal',
'In Contanti alla CNM',
],
CashType: {
None: 0,
Incoming: 1,
Outcoming: 2,
},
Cmd: {
PROVINCE: 1,
COMUNI: 2,
CITIES_SERVER: 3,
},
WalletFinalStatusType: {
None: 0,
InCommonCash: 1,
InMyWallet: 2,
},
Permissions: {
Admin: 1,
Manager: 2,
Teacher: 4,
Tutor: 8,
Editor: 16,
Zoomeri: 32,
Department: 64,
},
MessageOptions: {
Notify_ByEmail: 2,
Notify_ByPushNotification: 4,
},
TypeMsg: {
SEND_TO_ALL: 1,
SEND_TO_SOCI: 2,
SEND_TO_SOCIO_RESIDENTE: 3,
SEND_TO_CONSIGLIO: 5,
SEND_TO_NON_SOCI: 10,
SEND_TO_PAOLO: 20,
SEND_TO_USER: 25,
SEND_TO_GROUP: 30,
SEND_TO_MYSELF: 40,
},
TypeMsg_Actions: {
NORMAL: 0,
YESNO: 1,
OPZ1_2: 2,
},
CallFunz: {
SOSTITUISCI: 345,
AGGIUNGI_NUOVO_IMBARCO: 380,
CANCELLA_IMBARCO: 385,
DAMMI_PRIMO_UTENTE_LIBERO: 390,
GET_VALBYTABLE: 400,
SET_VALBYTABLE: 410,
ZOOM_GIA_PARTECIPATO: 510,
},
OrderStatus: {
NONE: 0,
IN_CART: 1,
CHECKOUT_SENT: 2,
ORDER_CONFIRMED: 3,
PAYED: 4,
DELIVEDED: 5,
RECEIVED: 6,
CANCELED: 10,
},
OrderStatusView: {
CHECKOUT_SENT: 2,
ORDER_CONFIRMED: 3,
PAYED: 4,
RECEIVED: 6,
CANCELED: 10,
},
MsgTeleg: {
SHARE_MSGREG: 1
},
TypeMsgTemplate: {
MSG_BENVENUTO_SHARE_LINK: 2000
},
TypeSend: {
PUSH_NOTIFICATION: 1,
TELEGRAM: 2,
},
fieldsUserToChange() {
return ['_id', 'index', 'username', 'email', 'name', 'surname', 'perm', 'date_reg', 'verified_email', 'notask_verif', 'verified_by_aportador', 'ipaddr', 'lasttimeonline', 'profile', 'calcstat', 'news_on', 'aportador_solidario', 'made_gift', 'ind_order', 'old_order', 'numinvitati', 'numinvitatiattivi', 'qualified']
},
};

1
src/common/shared_nodejs.js Symbolic link
View File

@@ -0,0 +1 @@
/home/paolo/myproject/freeplanet_serverside/src/server/tools/shared_nodejs.js

View File

@@ -40,6 +40,8 @@ export const shared_consts = {
FILTER_TO_MAKE_MEMBERSHIP_CARD: 524288, FILTER_TO_MAKE_MEMBERSHIP_CARD: 524288,
FILTER_MEMBERSHIP_CARD_OK: 1048576, FILTER_MEMBERSHIP_CARD_OK: 1048576,
FILTER_USER_NO_VERIFIED_APORTADOR: 2097152, FILTER_USER_NO_VERIFIED_APORTADOR: 2097152,
FILTER_USER_SI_TELEGRAM_ID: 4194304,
FILTER_USER_WITHOUT_USERNAME_TELEGRAM: 8388608,
OPTIONS_SEARCH_ONLY_FULL_WORDS: 1, OPTIONS_SEARCH_ONLY_FULL_WORDS: 1,
OPTIONS_SEARCH_USER_ONLY_FULL_WORDS: 2, OPTIONS_SEARCH_USER_ONLY_FULL_WORDS: 2,
@@ -197,289 +199,6 @@ export const shared_consts = {
}, },
], ],
Provinces: [
{ _id: 1, reg: 'SIC', value: 'AG', label: 'Agrigento', }, {
_id: 2,
reg: 'PIE',
value: 'AL',
label: 'Alessandria',
}, { _id: 3, reg: 'MAR', value: 'AN', label: 'Ancona', }, {
_id: 4,
reg: 'VDA',
value: 'AO',
label: 'Aosta',
}, { _id: 5, reg: 'TOS', value: 'AR', label: 'Arezzo', }, {
_id: 6,
reg: 'MAR',
value: 'AP',
label: 'Ascoli Piceno',
}, { _id: 7, reg: 'PIE', value: 'AT', label: 'Asti', }, {
_id: 8,
reg: 'CAM',
value: 'AV',
label: 'Avellino',
}, { _id: 9, reg: 'PUG', value: 'BA', label: 'Bari', }, {
_id: 10,
reg: 'PUG',
value: 'BT',
label: 'Barletta-Andria-Trani',
}, { _id: 11, reg: 'VEN', value: 'BL', label: 'Belluno', }, {
_id: 12,
reg: 'CAM',
value: 'BN',
label: 'Benevento',
}, { _id: 13, reg: 'LOM', value: 'BG', label: 'Bergamo', }, {
_id: 14,
reg: 'PIE',
value: 'BI',
label: 'Biella',
}, { _id: 15, reg: 'EMR', value: 'BO', label: 'Bologna', }, {
_id: 16,
reg: 'TAA',
value: 'BZ',
label: 'Bolzano',
}, { _id: 17, reg: 'LOM', value: 'BS', label: 'Brescia', }, {
_id: 18,
reg: 'PUG',
value: 'BR',
label: 'Brindisi',
}, { _id: 19, reg: 'SAR', value: 'CA', label: 'Cagliari', }, {
_id: 20,
reg: 'SIC',
value: 'CL',
label: 'Caltanissetta',
}, { _id: 21, reg: 'MOL', value: 'CB', label: 'Campobasso', }, {
_id: 22,
reg: 'SAR',
value: 'CI',
label: 'Carbonia-Iglesias',
}, { _id: 23, reg: 'CAM', value: 'CE', label: 'Caserta', }, {
_id: 24,
reg: 'SIC',
value: 'CT',
label: 'Catania',
}, { _id: 25, reg: 'CAL', value: 'CZ', label: 'Catanzaro', }, {
_id: 26,
reg: 'ABR',
value: 'CH',
label: 'Chieti',
}, { _id: 27, reg: 'LOM', value: 'CO', label: 'Como', }, {
_id: 28,
reg: 'CAL',
value: 'CS',
label: 'Cosenza',
}, { _id: 29, reg: 'LOM', value: 'CR', label: 'Cremona', }, {
_id: 30,
reg: 'CAL',
value: 'KR',
label: 'Crotone',
}, { _id: 31, reg: 'PIE', value: 'CN', label: 'Cuneo', }, {
_id: 32,
reg: 'SIC',
value: 'EN',
label: 'Enna',
}, { _id: 33, reg: 'MAR', value: 'FM', label: 'Fermo', }, {
_id: 34,
reg: 'EMR',
value: 'FE',
label: 'Ferrara',
}, { _id: 35, reg: 'TOS', value: 'FI', label: 'Firenze', }, {
_id: 36,
reg: 'PUG',
value: 'FG',
label: 'Foggia',
}, { _id: 37, reg: 'EMR', value: 'FC', label: 'Forli-Cesena', }, {
_id: 38,
reg: 'LAZ',
value: 'FR',
label: 'Frosinone',
}, { _id: 39, reg: 'LIG', value: 'GE', label: 'Genova', }, {
_id: 40,
reg: 'FVG',
value: 'GO',
label: 'Gorizia',
}, { _id: 41, reg: 'TOS', value: 'GR', label: 'Grosseto', }, {
_id: 42,
reg: 'LIG',
value: 'IM',
label: 'Imperia',
}, { _id: 43, reg: 'MOL', value: 'IS', label: 'Isernia', }, {
_id: 44,
reg: 'LIG',
value: 'SP',
label: 'La Spezia',
}, { _id: 45, reg: 'ABR', value: 'AQ', label: 'L\'Aquila', }, {
_id: 46,
reg: 'LAZ',
value: 'LT',
label: 'Latina',
}, { _id: 47, reg: 'PUG', value: 'LE', label: 'Lecce', }, {
_id: 48,
reg: 'LOM',
value: 'LC',
label: 'Lecco',
}, { _id: 49, reg: 'TOS', value: 'LI', label: 'Livorno', }, {
_id: 50,
reg: 'LOM',
value: 'LO',
label: 'Lodi',
}, { _id: 51, reg: 'TOS', value: 'LU', label: 'Lucca', }, {
_id: 52,
reg: 'MAR',
value: 'MC',
label: 'Macerata',
}, { _id: 53, reg: 'LOM', value: 'MN', label: 'Mantova', }, {
_id: 54,
reg: 'TOS',
value: 'MS',
label: 'Massa-Carrara',
}, { _id: 55, reg: 'BAS', value: 'MT', label: 'Matera', }, {
_id: 56,
reg: 'SIC',
value: 'ME',
label: 'Messina',
}, { _id: 57, reg: 'LOM', value: 'MI', label: 'Milano', }, {
_id: 58,
reg: 'EMR',
value: 'MO',
label: 'Modena',
}, { _id: 59, reg: 'LOM', value: 'MB', label: 'Monza e della Brianza', }, {
_id: 60,
reg: 'CAM',
value: 'NA',
label: 'Napoli',
}, { _id: 61, reg: 'PIE', value: 'NO', label: 'Novara', }, {
_id: 62,
reg: 'SAR',
value: 'NU',
label: 'Nuoro',
}, { _id: 63, reg: 'SAR', value: 'OT', label: 'Olbia-Tempio', }, {
_id: 64,
reg: 'SAR',
value: 'OR',
label: 'Oristano',
}, { _id: 65, reg: 'VEN', value: 'PD', label: 'Padova', }, {
_id: 66,
reg: 'SIC',
value: 'PA',
label: 'Palermo',
}, { _id: 67, reg: 'EMR', value: 'PR', label: 'Parma', }, {
_id: 68,
reg: 'LOM',
value: 'PV',
label: 'Pavia',
}, { _id: 69, reg: 'UMB', value: 'PG', label: 'Perugia', }, {
_id: 70,
reg: 'MAR',
value: 'PU',
label: 'Pesaro e Urbino',
}, { _id: 71, reg: 'ABR', value: 'PE', label: 'Pescara', }, {
_id: 72,
reg: 'EMR',
value: 'PC',
label: 'Piacenza',
}, { _id: 73, reg: 'TOS', value: 'PI', label: 'Pisa', }, {
_id: 74,
reg: 'TOS',
value: 'PT',
label: 'Pistoia',
}, { _id: 75, reg: 'FVG', value: 'PN', label: 'Pordenone', }, {
_id: 76,
reg: 'BAS',
value: 'PZ',
label: 'Potenza',
}, { _id: 77, reg: 'TOS', value: 'PO', label: 'Prato', }, {
_id: 78,
reg: 'SIC',
value: 'RG',
label: 'Ragusa',
}, { _id: 79, reg: 'EMR', value: 'RA', label: 'Ravenna', }, {
_id: 80,
reg: 'CAL',
value: 'RC',
label: 'Reggio CAL',
}, { _id: 81, reg: 'EMR', value: 'RE', label: 'Reggio Emilia', }, {
_id: 82,
reg: 'LAZ',
value: 'RI',
label: 'Rieti',
}, { _id: 83, reg: 'EMR', value: 'RN', label: 'Rimini', }, {
_id: 84,
reg: 'LAZ',
value: 'RM',
label: 'Roma',
}, { _id: 85, reg: 'VEN', value: 'RO', label: 'Rovigo', }, {
_id: 86,
reg: 'CAM',
value: 'SA',
label: 'Salerno',
}, { _id: 87, reg: 'SAR', value: 'VS', label: 'Medio Campidano', }, {
_id: 88,
reg: 'SAR',
value: 'SS',
label: 'Sassari',
}, { _id: 89, reg: 'LIG', value: 'SV', label: 'Savona', }, {
_id: 90,
reg: 'TOS',
value: 'SI',
label: 'Siena',
}, { _id: 91, reg: 'SIC', value: 'SR', label: 'Siracusa', }, {
_id: 92,
reg: 'LOM',
value: 'SO',
label: 'Sondrio',
}, { _id: 93, reg: 'PUG', value: 'TA', label: 'Taranto', }, {
_id: 94,
reg: 'ABR',
value: 'TE',
label: 'Teramo',
}, { _id: 95, reg: 'UMB', value: 'TR', label: 'Terni', }, {
_id: 96,
reg: 'PIE',
value: 'TO',
label: 'Torino',
}, { _id: 97, reg: 'SAR', value: 'OG', label: 'Ogliastra', }, {
_id: 98,
reg: 'SIC',
value: 'TP',
label: 'Trapani',
}, { _id: 99, reg: 'TAA', value: 'TN', label: 'Trento', }, {
_id: 100,
reg: 'VEN',
value: 'TV',
label: 'Treviso',
}, { _id: 101, reg: 'FVG', value: 'TS', label: 'Trieste', }, {
_id: 102,
reg: 'FVG',
value: 'UD',
label: 'Udine',
}, { _id: 103, reg: 'LOM', value: 'VA', label: 'Varese', }, {
_id: 104,
reg: 'VEN',
value: 'VE',
label: 'Venezia',
}, { _id: 105, reg: 'PIE', value: 'VB', label: 'Verbano-Cusio-Ossola', }, {
_id: 106,
reg: 'PIE',
value: 'VC',
label: 'Vercelli',
}, { _id: 107, reg: 'VEN', value: 'VR', label: 'Verona', }, {
_id: 108,
reg: 'CAL',
value: 'VV',
label: 'Vibo Valentia',
},
{ _id: 109, reg: 'VEN', value: 'VI', label: 'Vicenza', }, {
_id: 110,
reg: 'LAZ',
value: 'VT',
label: 'Viterbo',
},
{ _id: 111, reg: 'RSM', value: 'RSM', label: 'Repubblica di San Marino', },
{ _id: 112, reg: 'EST', value: 'EST', label: 'Estero', },
{ _id: 113, reg: 'ONL', value: 'ONL', label: 'On Line', },
],
Regions: [ Regions: [
{ {
value: 'ABR', value: 'ABR',
@@ -681,6 +400,8 @@ export const shared_consts = {
SEND_TO_USER: 25, SEND_TO_USER: 25,
SEND_TO_GROUP: 30, SEND_TO_GROUP: 30,
SEND_TO_MYSELF: 40, SEND_TO_MYSELF: 40,
SEND_TO_TELEG_NO_USERNAME_TELEG: 50,
SEND_TO_TELEG_NO_VERIF_BY_APORTADOR: 60,
}, },
TypeMsg_Actions: { TypeMsg_Actions: {
@@ -689,6 +410,24 @@ export const shared_consts = {
OPZ1_2: 2, OPZ1_2: 2,
}, },
whatMsgToSend: {
MSG_OF_TEMPLATE: 1,
MSG_TEXT: 2,
},
selectwhatMsgToSend: [
{
id: 1,
label: 'Messaggio su Template',
value: 1, //MSG_OF_TEMPLATE
},
{
id: 2,
label: 'Messaggio di Testo',
value: 2, // MSG_TEXT
},
],
selectActions: [ selectActions: [
{ {
id: 0, id: 0,
@@ -707,6 +446,18 @@ export const shared_consts = {
}, },
], ],
selectSendReally: [
{
id: 0,
label: 'Vedi quanti msg saranno inviati',
value: false,
},
{
id: 1,
label: 'Invia il messaggio veramente',
value: true,
},
],
selectDestination: [ selectDestination: [
{ {
id: 0, id: 0,
@@ -733,6 +484,35 @@ export const shared_consts = {
label: 'a Paolo (test)', label: 'a Paolo (test)',
value: 20, value: 20,
}, },
{
id: 5,
label: 'a un Utente',
value: 25, //TypeMsg.SEND_TO_USER
},
{
id: 6,
label: 'a un Gruppo',
value: 30, //SEND_TO_GROUP: 30,
},
{
id: 7,
label: 'a me stesso',
value: 40, //SEND_TO_MYSELF: 40,
},
{
id: 8,
label: 'Abilitati Telegram (senza Username telegram)',
value: 50, //SEND_TO_TELEG_NO_USERNAME_TELEG: 50,
},
{
id: 9,
label: 'Abilitati Telegram (Non Verificati dall\'Invitante)',
value: 60, //SEND_TO_TELEG_NO_VERIF_BY_APORTADOR: 60,
},
], ],
OrderStatus: { OrderStatus: {

View File

@@ -8,13 +8,15 @@
<q-banner rounded class="bg-primary text-white"> <q-banner rounded class="bg-primary text-white">
<div class="text-h6 text-center"> <div class="text-h6 text-center">
Accedi al menu inserendo le tue credenziali 🔑<br><br> Accedi al menu inserendo le tue credenziali per entrare 🔑<br>
<div class="text-center">
<q-btn color="white" text-color="blue" label="Clicca qui per Accedere" @click="tools.openrighttoolbar()"/>
</div>
<br>
📝 Non sei <strong>Registrato</strong>?<br> 📝 Non sei <strong>Registrato</strong>?<br>
👉🏻 Chiedi in chat il link a chi ti ha <strong>invitato</strong>.<br> 👉🏻 Chiedi in chat il link a chi ti ha <strong>invitato</strong>.<br>
</div> </div>
<template v-slot:action> <br>
<q-btn flat color="white" label="Accedi al Login" @click="tools.openrighttoolbar()"/>
</template>
</q-banner> </q-banner>
</div> </div>

View File

@@ -951,6 +951,9 @@ export default defineComponent({
// @ts-ignore // @ts-ignore
newRecord.value = props.defaultnewrec() newRecord.value = props.defaultnewrec()
} }
if (!newRecord.value) {
newRecord.value = {}
}
newRecord.value['userId'] = userStore.my._id newRecord.value['userId'] = userStore.my._id
newRecord.value['idapp'] = process.env.APP_ID newRecord.value['idapp'] = process.env.APP_ID
// globalStore.saveTable(mydata).then(ris => console.log('RISULT', ris)) // globalStore.saveTable(mydata).then(ris => console.log('RISULT', ris))

View File

@@ -554,6 +554,7 @@
<q-space/> <q-space/>
<q-btn flat round color="white" icon="close" v-close-popup></q-btn> <q-btn flat round color="white" icon="close" v-close-popup></q-btn>
</q-bar> </q-bar>
<q-card-section class="inset-shadow"> <q-card-section class="inset-shadow">
<div <div
v-for="col in mycolumns" :key="col.name" class="newrec_fields"> v-for="col in mycolumns" :key="col.name" class="newrec_fields">

View File

@@ -73,6 +73,7 @@ export default defineComponent({
const iamadult = ref(false) const iamadult = ref(false)
const duplicate_email = ref(false) const duplicate_email = ref(false)
const duplicate_username = ref(false) const duplicate_username = ref(false)
const visureg = ref(false)
const globalStore = useGlobalStore() const globalStore = useGlobalStore()
@@ -297,6 +298,7 @@ export default defineComponent({
t, t,
allowSubmit, allowSubmit,
myRuleEmail, myRuleEmail,
visureg,
} }
}, },
}) })

View File

@@ -1,228 +1,254 @@
<template> <template>
<div> <div>
<div class="text-center"> <div v-if="tools.isLogged() && tools.getUsername()" class="text-center">
<p> <q-banner
<logo></logo> rounded
<CTitleBanner :title="$t('pages.SignUp')"></CTitleBanner> class="bg-green text-white"
style="text-align: center;"
>
<span class="mybanner">
{{ tools.getUsername() }} sei già correttamente registrato ed hai accesso alla Piattaforma<br>
</span>
</q-banner>
<q-banner <div class="row q-ma-sm q-pa-sm justify-center">
rounded <q-btn class="q-ma-sm" color="primary" icon="fas fa-home" label="Vai alla Home" to="/"></q-btn>
class="bg-warning text-black"
style="text-align: center;"
>
<span class="mybanner" v-html="t('pages.need_Telegram')"></span>
</q-banner>
</p>
</div>
<div class="q-gutter-sm"> <q-btn class="q-ma-sm" color="accent" icon="fas fa-sign" label="Voglio vedere la pagina di Registrazione" @click="visureg = true"></q-btn>
<q-input
v-if="showaportador && signup.aportador_solidario !== tools.APORTADOR_NONE"
bg-color="lightblue"
:readonly="true"
v-model="signup.aportador_solidario"
rounded outlined
@blur="v$.aportador_solidario.$touch"
:error="v$.aportador_solidario.$error"
:error-message="tools.errorMsg('aportador_solidario', v$.aportador_solidario)"
maxlength="20"
debounce="1000"
:label="$t('reg.aportador_solidario')">
<template v-slot:prepend>
<q-icon name="person"/>
</template>
</q-input>
<!--<q-input
v-model="signup.email"
rounded outlined
@blur="v$.email.$touch"
@update:model-value="changeemail()"
:error="v$.email.$invalid"
:error-message="tools.errorMsg( 'email', v$.email)"
maxlength="50"
debounce="2000"
:label="$t('reg.email')">
<template v-slot:prepend>
<q-icon name="email"/>
</template>
</q-input> -->
<q-input
v-model="signup.email"
rounded outlined
@update:model-value="changeemail()"
maxlength="50"
debounce="3000"
:rules="[ myRuleEmail ]"
lazy-rules
:label="$t('reg.email_reg')">
<template v-slot:prepend>
<q-icon name="email"/>
</template>
</q-input>
<q-input
v-model="signup.username"
rounded outlined
@blur="v$.username.$touch"
@update:model-value="changeusername"
:error="v$.username.$error"
@keydown.space="(event) => event.preventDefault()"
maxlength="20"
:hint="$t('reg.username_hint')"
debounce="1000"
:error-message="tools.errorMsg( 'username', v$.username)"
:label="$t('reg.username_reg')">
<template v-slot:prepend>
<q-icon name="person"/>
</template>
</q-input>
<div v-if="show_namesurname">
<q-input
v-model="signup.name"
rounded outlined
@blur="v$.name.$touch"
:error="v$.name.$error"
maxlength="30"
debounce="1000"
:error-message="tools.errorMsg( 'name', v$.name)"
:label="$t('reg.name')">
<template v-slot:prepend>
<q-icon name="person"/>
</template>
</q-input>
<q-input
v-model="signup.surname"
rounded outlined
:error="v$.surname.$error"
@blur="v$.surname.$touch"
maxlength="30"
debounce="1000"
:error-message="tools.errorMsg( 'surname', v$.surname)"
:label="$t('reg.surname')">
<template v-slot:prepend>
<q-icon name="person"/>
</template>
</q-input>
</div>
<q-input
v-model="signup.password"
type="password"
rounded outlined
@blur="v$.password.$touch"
:error="v$.password.$error"
:error-message="`${tools.errorMsg( 'password', v$.password)}`"
maxlength="30"
debounce="1000"
:label="$t('reg.password_reg')">
<template v-slot:prepend>
<q-icon name="vpn_key"/>
</template>
</q-input>
<q-input
v-model="signup.repeatPassword"
type="password"
maxlength="30"
rounded outlined
@blur="v$.repeatPassword.$touch"
:error="v$.repeatPassword.$error"
:error-message="`${tools.errorMsg( 'repeatpassword', v$.repeatPassword)}`"
:label="$t('reg.repeatPassword')">
<template v-slot:prepend>
<q-icon name="vpn_key"/>
</template>
</q-input>
<q-input
v-if="shownationality"
v-model="countryname"
:readonly="true"
rounded outlined
debounce="1000"
:label="$t('reg.nationality')">
<template v-slot:prepend>
<!--<vue-country-code
@onSelect="selectcountry"
:preferredCountries="tools.getprefCountries"
:dropdownOptions="{ disabledDialCode: true }"
>
</vue-country-code>-->
</template>
</q-input>
<div v-if="!tools.isMobile()"><br></div>
<!--<vue-tel-input
v-if="showcell"
@country-changed="intcode_change()"
:value="signup.profile.cell"
:placeholder="$t('reg.cell')"
maxlength="20"
:enabledCountryCode="true"
inputClasses="clCell"
wrapperClasses="clCellCode">
</vue-tel-input>-->
<q-checkbox
v-model="signup.terms"
color="secondary"
@blur="v$.terms.$touch"
:error="v$.terms.$error"
:error-message="`${tools.errorMsg( 'terms', v$.terms)}`"
:label="$t('reg.terms')">
</q-checkbox>
<q-checkbox
v-if="showadultcheck"
v-model="iamadult"
color="secondary"
:label="$t('reg.onlyadult')">
</q-checkbox>
<div v-if="showadultcheck">
<br> <br>
</div> </div>
<div class="wrapper">
<q-btn rounded size="lg" color="positive" @click="submitOk" :disabled='!allowSubmit()'
:label="$t('reg.submit')">
</q-btn>
</div>
<br/><br/><br/>
</div> </div>
<div v-if="!tools.isLogged() || visureg"
class="text-center">
<div>
<p>
<logo></logo>
<q-btn class="q-ma-sm" color="positive" icon="fas fa-home" label="Se sei già Registrato CLICCA QUI" to="/"></q-btn>
<CTitleBanner :title="$t('pages.SignUp')"></CTitleBanner>
<q-banner
rounded
class="bg-warning text-black"
style="text-align: center;"
>
<span class="mybanner" v-html="t('pages.need_Telegram')"></span>
</q-banner>
</p>
</div>
<div class="q-gutter-sm">
<q-input
v-if="showaportador && signup.aportador_solidario !== tools.APORTADOR_NONE"
bg-color="lightblue"
:readonly="true"
v-model="signup.aportador_solidario"
rounded outlined
@blur="v$.aportador_solidario.$touch"
:error="v$.aportador_solidario.$error"
:error-message="tools.errorMsg('aportador_solidario', v$.aportador_solidario)"
maxlength="20"
debounce="1000"
:label="$t('reg.aportador_solidario')">
<template v-slot:prepend>
<q-icon name="person"/>
</template>
</q-input>
<!--<q-input
v-model="signup.email"
rounded outlined
@blur="v$.email.$touch"
@update:model-value="changeemail()"
:error="v$.email.$invalid"
:error-message="tools.errorMsg( 'email', v$.email)"
maxlength="50"
debounce="2000"
:label="$t('reg.email')">
<template v-slot:prepend>
<q-icon name="email"/>
</template>
</q-input> -->
<q-input
v-model="signup.email"
rounded outlined
@update:model-value="changeemail()"
maxlength="50"
debounce="3000"
:rules="[ myRuleEmail ]"
lazy-rules
:label="$t('reg.email_reg')">
<template v-slot:prepend>
<q-icon name="email"/>
</template>
</q-input>
<q-input
v-model="signup.username"
rounded outlined
@blur="v$.username.$touch"
@update:model-value="changeusername"
:error="v$.username.$error"
@keydown.space="(event) => event.preventDefault()"
maxlength="20"
:hint="$t('reg.username_hint')"
debounce="1000"
:error-message="tools.errorMsg( 'username', v$.username)"
:label="$t('reg.username_reg')">
<template v-slot:prepend>
<q-icon name="person"/>
</template>
</q-input>
<div v-if="show_namesurname">
<q-input
v-model="signup.name"
rounded outlined
@blur="v$.name.$touch"
:error="v$.name.$error"
maxlength="30"
debounce="1000"
:error-message="tools.errorMsg( 'name', v$.name)"
:label="$t('reg.name')">
<template v-slot:prepend>
<q-icon name="person"/>
</template>
</q-input>
<q-input
v-model="signup.surname"
rounded outlined
:error="v$.surname.$error"
@blur="v$.surname.$touch"
maxlength="30"
debounce="1000"
:error-message="tools.errorMsg( 'surname', v$.surname)"
:label="$t('reg.surname')">
<template v-slot:prepend>
<q-icon name="person"/>
</template>
</q-input>
</div>
<q-input
v-model="signup.password"
type="password"
rounded outlined
@blur="v$.password.$touch"
:error="v$.password.$error"
:error-message="`${tools.errorMsg( 'password', v$.password)}`"
maxlength="30"
debounce="1000"
:label="$t('reg.password_reg')">
<template v-slot:prepend>
<q-icon name="vpn_key"/>
</template>
</q-input>
<q-input
v-model="signup.repeatPassword"
type="password"
maxlength="30"
rounded outlined
@blur="v$.repeatPassword.$touch"
:error="v$.repeatPassword.$error"
:error-message="`${tools.errorMsg( 'repeatpassword', v$.repeatPassword)}`"
:label="$t('reg.repeatPassword')">
<template v-slot:prepend>
<q-icon name="vpn_key"/>
</template>
</q-input>
<q-input
v-if="shownationality"
v-model="countryname"
:readonly="true"
rounded outlined
debounce="1000"
:label="$t('reg.nationality')">
<template v-slot:prepend>
<!--<vue-country-code
@onSelect="selectcountry"
:preferredCountries="tools.getprefCountries"
:dropdownOptions="{ disabledDialCode: true }"
>
</vue-country-code>-->
</template>
</q-input>
<div v-if="!tools.isMobile()"><br></div>
<!--<vue-tel-input
v-if="showcell"
@country-changed="intcode_change()"
:value="signup.profile.cell"
:placeholder="$t('reg.cell')"
maxlength="20"
:enabledCountryCode="true"
inputClasses="clCell"
wrapperClasses="clCellCode">
</vue-tel-input>-->
<q-checkbox
v-model="signup.terms"
color="secondary"
@blur="v$.terms.$touch"
:error="v$.terms.$error"
:error-message="`${tools.errorMsg( 'terms', v$.terms)}`"
:label="$t('reg.terms')">
</q-checkbox>
<q-checkbox
v-if="showadultcheck"
v-model="iamadult"
color="secondary"
:label="$t('reg.onlyadult')">
</q-checkbox>
<div v-if="showadultcheck">
<br>
</div>
<div class="wrapper">
<q-btn rounded size="lg" color="positive" @click="submitOk" :disabled='!allowSubmit()'
:label="$t('reg.submit')">
</q-btn>
</div>
<br/><br/><br/>
</div>
</div>
</div> </div>
</template> </template>

View File

@@ -43,6 +43,8 @@ export default defineComponent({
num_passeggeri: 0, num_passeggeri: 0,
num_imbarcati: 0, num_imbarcati: 0,
num_teleg_attivo: 0, num_teleg_attivo: 0,
num_autorizzare: 0,
num_autorizzati: 0,
email_non_verif: 0, email_non_verif: 0,
num_teleg_pending: 0, num_teleg_pending: 0,
lastsreg: [], lastsreg: [],

View File

@@ -7,8 +7,11 @@
<div class="flex flex-center"> <div class="flex flex-center">
<CCardState :mytext="$t('pages.statusreg.reg')" :myval="datastat.num_reg" <CCardState :mytext="$t('pages.statusreg.verifieds')" :myval="datastat.num_teleg_attivo"
:myperc="100"></CCardState> :myperc="(datastat.num_teleg_attivo / datastat.num_reg) * 100"></CCardState>
<CCardState :mytext="$t('pages.statusreg.autorizzare')" :myval="datastat.num_autorizzare"
:myperc="(datastat.num_autorizzare / datastat.num_teleg_attivo) * 100"></CCardState>
<div class="q-pa-xs" v-if="datastat.num_part_accepted > 1"> <div class="q-pa-xs" v-if="datastat.num_part_accepted > 1">
<CCardStat :mytext="$t('stat.accepted')" :myval="datastat.num_part_accepted"></CCardStat> <CCardStat :mytext="$t('stat.accepted')" :myval="datastat.num_part_accepted"></CCardStat>

View File

@@ -8,12 +8,38 @@
</CVerifyEmail>--> </CVerifyEmail>-->
<div v-if="tools.isTelegOk()" class="centeritems"> <div v-if="tools.isTelegOk()" class="centeritems">
<q-banner inline-actions rounded class="bg-orange text-black">
<q-banner
v-if="!tools.isUsernameTelegOk()"
inline-actions rounded class="bg-green-4 text-black">
<br>🔑 Ora torna su Telegram ed imposta l'<b>Username di Telegram</b>:<br>
<br>
💬 In questo modo le persone potranno contattarti su Telegram senza aver bisogno del tuo numero di cellulare, e potranno farlo anche dalla APP.<br>
<br>
👉🏻 1. Su telegram premi sull'icona (tre linee orizzontali) del menu principale in alto a sinistra.<br>
👉🏻 2. Seleziona la voce <b>Impostazioni</b> nel menu.<br>
👉🏻 3.Premi su <b>Username</b> nella sezione account.<br>
👉🏻 4. Digita il tuo username. (deve essere un nome ancora libero e non già usato da altri).<br>
👉🏻 5. Per confermare premi sull'icona con la spunta (V) in alto a destra.<br>
🏁 Infine vai sul <b>BOT RISO</b> Telegram e scrivi OK nel messaggio.
<q-btn rounded color="primary" icon="fab fa-telegram" label="Apri il BOT"
type="a"
:href="tools.getLinkBotTelegram()" target="_blank"></q-btn>
<br><br>
Se non ci riesci vedi la <a href="https://www.nigiara.it/telegram/come-impostare-uno-username-su-telegram.htm" target="_blank">GUIDA PER IMPOSTARE
L'USERNAME SU TELEGRAM</a><br>
<br>
</q-banner>
<q-banner v-else
inline-actions rounded class="bg-orange text-black">
<template v-slot:avatar> <template v-slot:avatar>
<q-icon name="info" color="primary"/> <q-icon name="info" color="primary"/>
</template> </template>
<strong>Appena sarai abilitato, dal tuo invitante {{tools.getAportadorSolidario()}}, ti arriverà una <strong>notifica su Telegram</strong>.<br><br> <strong>Appena sarai abilitato, dal tuo invitante {{ tools.getAportadorSolidario() }}, ti arriverà una <strong>notifica su Telegram</strong>.<br><br>
Se non dovesse arrivarti subito probabilmente {{tools.getAportadorSolidario()}} non ha il cellulare a portata di mano.<br> Se non dovesse arrivarti entro 24 ore prova a mandargli un messaggio.<br>
</strong> </strong>
<q-btn <q-btn
@@ -26,7 +52,6 @@
</q-btn> </q-btn>
</q-banner> </q-banner>
</div> </div>
</div> </div>

View File

@@ -128,6 +128,7 @@ export default defineComponent({
} }
function setLangAtt(mylang: string) { function setLangAtt(mylang: string) {
console.log('LANG =', mylang) console.log('LANG =', mylang)
// console.log('PRIMA $q.lang.isoName', $q.lang.isoName) // console.log('PRIMA $q.lang.isoName', $q.lang.isoName)
@@ -189,12 +190,12 @@ export default defineComponent({
// tools.showNotif($q, 'IMPOSTA LANG= ' + $i18n.locale) // tools.showNotif($q, 'IMPOSTA LANG= ' + $i18n.locale)
// console.log('IMPOSTA LANG= ' + $i18n.locale) // console.log('IMPOSTA LANG= ' + $i18n.locale)
userStore.setlang($router, $q.lang.getLocale())
let mylangtopass = mylang let mylangtopass = mylang
mylangtopass = toolsext.checkLangPassed($q, $router, mylangtopass) mylangtopass = toolsext.checkLangPassed($q, $router, mylangtopass)
userStore.setlang($router, mylangtopass)
setshortlang(mylangtopass) setshortlang(mylangtopass)
setLangAtt(mylangtopass) setLangAtt(mylangtopass)

View File

@@ -969,3 +969,6 @@ $heightBtn: 100%;
font-weight: bold; font-weight: bold;
} }
.regione{
}

View File

@@ -41,6 +41,8 @@ const msg_website_de = {
dbop: 'Operazioni', dbop: 'Operazioni',
statusreg: { statusreg: {
reg: 'Partecipanti', reg: 'Partecipanti',
verifieds: 'Verificati',
autorizzati: 'Autorizzati',
passeggeri: 'Passeggeri Navi', passeggeri: 'Passeggeri Navi',
giainlista: 'Gia in Lista', giainlista: 'Gia in Lista',
newreg: 'Ultime Registrazioni:', newreg: 'Ultime Registrazioni:',

View File

@@ -82,6 +82,9 @@ const msg_website_enUs = {
favproj: 'Favoriti', favproj: 'Favoriti',
statusreg: { statusreg: {
reg: 'Participants', reg: 'Participants',
verifieds: 'Verificati',
autorizzati: 'Autorizzati',
autorizzare: 'In attesa di Abilitazione',
passeggeri: 'Passengers Ships', passeggeri: 'Passengers Ships',
giainlista: 'Already in the List', giainlista: 'Already in the List',
newreg: 'New registrations:', newreg: 'New registrations:',

View File

@@ -83,6 +83,9 @@ const msg_website_es = {
favproj: 'Favoriti', favproj: 'Favoriti',
statusreg: { statusreg: {
reg: 'Participantes', reg: 'Participantes',
verifieds: 'Verificati',
autorizzati: 'Autorizzati',
autorizzare: 'In attesa di Abilitazione',
passeggeri: 'Barcos de pasajeros', passeggeri: 'Barcos de pasajeros',
giainlista: 'Gia in Lista', giainlista: 'Gia in Lista',
newreg: 'Nuevas inscripciones :', newreg: 'Nuevas inscripciones :',

View File

@@ -83,6 +83,9 @@ const msg_website_it = {
favproj: 'Favoriti', favproj: 'Favoriti',
statusreg: { statusreg: {
reg: 'Partecipanti', reg: 'Partecipanti',
verifieds: 'Verificati',
autorizzati: 'Autorizzati',
autorizzare: 'In attesa di Abilitazione',
passeggeri: 'Passeggeri Navi', passeggeri: 'Passeggeri Navi',
giainlista: 'Gia in Lista', giainlista: 'Gia in Lista',
newreg: 'Ultime Registrazioni:', newreg: 'Ultime Registrazioni:',

View File

@@ -94,19 +94,6 @@ const routes_admin: IListRoutes[] = [
submenu: true, submenu: true,
onlyAdmin: true onlyAdmin: true
}, },
{
active: true,
order: 1030,
path: '/admin/sendpushnotif',
materialIcon: 'event_seat',
name: 'otherpages.manage.sendpushnotif',
component: () => import('@/rootgen/admin/sendpushnotif/sendpushnotif.vue'),
level_parent: 0.0,
level_child: 0.5,
inmenu: true,
submenu: true,
onlyAdmin: true
},
{ {
active: true, active: true,
order: 1040, order: 1040,
@@ -350,6 +337,20 @@ const routes_manager: IListRoutes[] = [
onlyManager: true onlyManager: true
// onlyTutor: true // onlyTutor: true
}, },
{
active: true,
order: 1030,
path: '/admin/sendpushnotif',
materialIcon: 'event_seat',
name: 'otherpages.manage.sendpushnotif',
component: () => import('@/rootgen/admin/sendpushnotif/sendpushnotif.vue'),
level_parent: 0.0,
level_child: 0.5,
inmenu: true,
submenu: true,
onlyAdmin: true,
onlyManager: true,
},
{ {
active: true, active: true,
order: 40, order: 40,
@@ -718,8 +719,8 @@ const baseroutes: IListRoutes[] = [
const arrLangUsed = [ const arrLangUsed = [
'it', 'it',
'enUs', // 'enUs',
'es', // 'es',
] ]
const lang_available: ILang[] = [ const lang_available: ILang[] = [

View File

@@ -23,6 +23,8 @@ export interface INotData {
num_imbarcati?: number num_imbarcati?: number
email_non_verif?: number email_non_verif?: number
num_teleg_attivo?: number num_teleg_attivo?: number
num_autorizzare?: number
num_autorizzati?: number
num_teleg_pending?: number num_teleg_pending?: number
num_part_zoom?: number num_part_zoom?: number
num_part_accepted?: number num_part_accepted?: number
@@ -299,7 +301,7 @@ export interface IGlobalState {
sectors: ISector[], sectors: ISector[],
sectorgoods: ISectorGood[], sectorgoods: ISectorGood[],
catgrps: ICatGrp[], catgrps: ICatGrp[],
cities: ICity[], provinces: IProvince[],
datastat?: INotData datastat?: INotData
} }
@@ -626,6 +628,7 @@ export interface IMsgGlobParam {
groupnameDest?: string groupnameDest?: string
text?: string text?: string
typesend: number typesend: number
sendreally?: boolean
} }
export interface IDataToSet { export interface IDataToSet {
@@ -756,6 +759,14 @@ export interface ICity {
prov: string prov: string
} }
export interface IProvince {
_id: number
prov: string
reg: string
descr: string
link_grp: string
}
export interface IMySkill { export interface IMySkill {
_id: number _id: number
idSector: number idSector: number

View File

@@ -32,6 +32,7 @@ export default defineComponent({
const inputfile = ref('') const inputfile = ref('')
const risultato = ref('') const risultato = ref('')
const risraw = ref('')
const caricaDatiToggle = ref(false) const caricaDatiToggle = ref(false)
@@ -395,6 +396,32 @@ export default defineComponent({
userStore.importToServerCmd($q, t, cosafare.value, null) userStore.importToServerCmd($q, t, cosafare.value, null)
} }
function createProvLink() {
let str = ''
const arr = globalStore.provinces
let regione = ''
let regid = ''
for (const prov of arr) {
if (prov.link_grp) {
if (prov.reg !== regid) {
const myreg = shared_consts.Regions.find((rec: any) => rec.value === prov.reg)
if (myreg) {
regid = myreg.value
regione = myreg.label
str += '<br><div class="text-subtitle1">' + regione + '</div>'
}
}
str += '<a class="prov" href="' + prov.link_grp + '" target="_blank">' + prov.descr + '</a><br>'
}
}
risultato.value = str
risraw.value = str
}
onMounted(created) onMounted(created)
return { return {
@@ -407,6 +434,8 @@ export default defineComponent({
eseguiCmd, eseguiCmd,
caricaDatiToggle, caricaDatiToggle,
caricadati, caricadati,
createProvLink,
risraw,
} }
} }
}) })

View File

@@ -20,8 +20,15 @@
label="Esegui" label="Esegui"
@click="eseguiCmd"></q-btn> @click="eseguiCmd"></q-btn>
<br>
<q-btn
label="Genera HTML Province Territoriali"
@click="createProvLink"></q-btn>
<br><br> <br><br>
<div>{{ risraw }}</div>
<div v-html="risultato"></div> <div v-html="risultato"></div>
<br> <br>

View File

@@ -1,9 +1,10 @@
import { CMyPage } from '../../../components/CMyPage/index' import { CMyPage } from '../../../components/CMyPage/index'
import { CMyEditor } from '../../../components/CMyEditor/index'
import { shared_consts } from '@src/common/shared_vuejs' import { shared_consts } from '@src/common/shared_vuejs'
import { tools } from '@src/store/Modules/tools' import { tools } from '@src/store/Modules/tools'
import { defineComponent, ref, onMounted } from 'vue' import { defineComponent, ref, onMounted, watch } from 'vue'
import { useI18n } from '@src/boot/i18n' import { useI18n } from '@src/boot/i18n'
import { useUserStore } from '@store/UserStore' import { useUserStore } from '@store/UserStore'
import { useGlobalStore } from '@store/globalStore' import { useGlobalStore } from '@store/globalStore'
@@ -12,7 +13,7 @@ import { IMsgGlobParam } from 'model'
export default defineComponent({ export default defineComponent({
name: 'Sendpushnotif', name: 'Sendpushnotif',
components: { CMyPage }, components: { CMyPage, CMyEditor },
setup(props, { emit }) { setup(props, { emit }) {
const $q = useQuasar() const $q = useQuasar()
const { t } = useI18n() const { t } = useI18n()
@@ -29,13 +30,68 @@ export default defineComponent({
const opz2= ref('') const opz2= ref('')
const tag= ref('') const tag= ref('')
const actiontype = ref(shared_consts.TypeMsg_Actions.NORMAL) const actiontype = ref(shared_consts.TypeMsg_Actions.NORMAL)
const destination = ref(shared_consts.TypeMsg.SEND_TO_ALL) const whatMsg = ref(shared_consts.whatMsgToSend.MSG_TEXT)
const destination = ref(shared_consts.TypeMsg.SEND_TO_MYSELF)
const sendreally = ref(false)
const templmsgid = ref(0)
const mytempl = ref(<any>null)
const mytab = ref('telegram')
const arrTemplate = ref(<any>[])
const recMsgTempl = ref(<any>[])
const mymsg = ref('')
const msgold = ref('')
watch(() => whatMsg.value, (newval: any, oldval) => {
if (whatMsg.value !== shared_consts.whatMsgToSend.MSG_TEXT) {
msgold.value = mymsg.value
} else {
mymsg.value = msgold.value
}
load()
})
watch(() => templmsgid.value, (newval: any, oldval) => {
if (newval && recMsgTempl.value.length > 0) {
mytempl.value = recMsgTempl.value.find((rec: any) => rec._id === newval)
mymsg.value = mytempl.value.msg_it
}
})
async function load() {
if (whatMsg.value === shared_consts.whatMsgToSend.MSG_OF_TEMPLATE) {
recMsgTempl.value = await globalStore.GetMsgTemplates()
for (const rec of recMsgTempl.value) {
arrTemplate.value.push({id: rec._id, value: rec._id, label: rec.title})
}
if (templmsgid.value) {
if (recMsgTempl.value.length > 0) {
templmsgid.value = recMsgTempl.value[0]._id;
}
}
if (templmsgid.value) {
mytempl.value = recMsgTempl.value.find((rec: any) => rec._id === templmsgid.value)
mymsg.value = ''
mymsg.value = mytempl.value.msg_it
}
}
}
function created() { function created() {
title.value = t('ws.sitename') title.value = t('ws.sitename')
openUrl.value = '/' openUrl.value = '/'
openUrl2.value = '' openUrl2.value = ''
tag.value = 'msg' tag.value = 'msg'
load()
} }
function SendMsg(params: any) { function SendMsg(params: any) {
@@ -66,7 +122,7 @@ export default defineComponent({
}) })
} }
function SendMsgToParam(typemsg: any) { function SendMsgToParam(typemsg: any, typesend: number = shared_consts.TypeSend.PUSH_NOTIFICATION, sendreally: any = false) {
let param: IMsgGlobParam = { let param: IMsgGlobParam = {
typemsg, typemsg,
@@ -76,9 +132,15 @@ export default defineComponent({
openUrl2: openUrl2.value, openUrl2: openUrl2.value,
tag: tag.value, tag: tag.value,
actions: [], actions: [],
typesend: shared_consts.TypeSend.PUSH_NOTIFICATION typesend,
sendreally
} }
if (typesend === shared_consts.TypeSend.TELEGRAM) {
param.content = mymsg.value
}
param.actions = [] param.actions = []
if (actiontype.value === shared_consts.TypeMsg_Actions.YESNO) { if (actiontype.value === shared_consts.TypeMsg_Actions.YESNO) {
@@ -100,9 +162,9 @@ export default defineComponent({
return SendMsg(param) return SendMsg(param)
} }
function SendMsgToAll() { function SendMsgToAll(typesend: number) {
SendMsgToParam(destination.value) SendMsgToParam(destination.value, typesend, sendreally.value)
} }
onMounted(created) onMounted(created)
@@ -113,13 +175,20 @@ export default defineComponent({
openUrl, openUrl,
openUrl2, openUrl2,
actiontype, actiontype,
whatMsg,
destination, destination,
sendreally,
SendMsgToAll, SendMsgToAll,
opz1, opz1,
opz2, opz2,
content, content,
shared_consts, shared_consts,
incaricamento, incaricamento,
mytab,
templmsgid,
arrTemplate,
mytempl,
mymsg,
} }
} }
}) })

View File

@@ -1,47 +1,130 @@
<template> <template>
<CMyPage img="" title="Invio Push Notifiche" keywords="" description=""> <CMyPage img="" title="Invio Push Notifiche" keywords="" description="">
<div class="q-ma-sm"> <div class="q-ma-sm">
<div class="row center_img clBorderSteps" style="max-width: 600px;">
<div class="row"> <q-tabs v-model="mytab" class="text-teal">
<q-input v-model="title" autofocus label="Titolo" style="width: 300px;"></q-input> <q-tab label="Telegram" name="telegram"></q-tab>
</div> <q-tab label="Notifiche Push" name="push"></q-tab>
<div class="row"> </q-tabs>
<q-input
v-model="content" type="textarea" autofocus label="Contenuto" <q-separator></q-separator>
input-class="myinput-area"
style="height: 100px; width: 500px;"></q-input> <q-tab-panels v-model="mytab" animated>
</div> <q-tab-panel name="telegram">
<div class="row"> <div class="row center_img clBorderSteps" style="max-width: 600px;">
<q-input v-model="openUrl" autofocus label="openUrl" style="width: 200px;"></q-input> <q-select
<q-input v-model="openUrl2" autofocus label="openUrl2" style="width: 200px;"></q-input> rounded outlined v-model="whatMsg"
<q-input v-model="tag" autofocus label="tag" style="width: 100px;"></q-input> :options="shared_consts.selectwhatMsgToSend"
</div> label="Quale Messaggio" emit-value map-options>
<q-select </q-select>
rounded outlined v-model="actiontype" <div v-if="whatMsg === shared_consts.whatMsgToSend.MSG_TEXT"
:options="shared_consts.selectActions" class="row">
label="Tipo Msg" emit-value map-options> <q-input
</q-select> v-model="mymsg" type="textarea" autofocus label="Messaggio"
<q-select input-class="myinput-area"
rounded outlined v-model="destination" style="height: 100px; width: 500px;"></q-input>
:options="shared_consts.selectDestination" </div>
label="Destinazione" emit-value map-options> <div v-if="whatMsg === shared_consts.whatMsgToSend.MSG_OF_TEMPLATE">
</q-select> <q-select
<div v-if="actiontype === shared_consts.TypeMsg_Actions.OPZ1_2" class="row"> rounded outlined v-model="templmsgid"
<q-input v-model="opz1" autofocus label="Opzione 1" style="width: 100px;"></q-input> :options="arrTemplate"
<q-input v-model="opz2" autofocus label="Opzione 2" style="width: 100px;"></q-input> label="Scegli il Template di Msg da inviare" emit-value map-options>
</div> </q-select>
<br/>
<div class=""> <CMyEditor v-if="mymsg"
<q-btn label="Invia Msg" color="primary" @click="SendMsgToAll()"></q-btn> v-model:value="mymsg" :showButtons="false" :canModify="true">
</div>
</div> </CMyEditor>
<q-inner-loading id="spinner" :showing="incaricamento">
<q-spinner-tail </div>
color="primary" <div class="q-ma-xs q-pa-xs" style="border-color: darkred; border-width: 3px;">
size="4em"> <q-banner
</q-spinner-tail> rounded
</q-inner-loading> dense
class="bg-positive text-white"
color="primary q-title"
style="text-align: center;">
<template v-slot:avatar>
<q-icon name="fas fa-bullhorn" color="yellow" size="xs" />
</template>
<span class="mybanner">MESSAGGIO DA INVIARE:</span>
</q-banner>
<div v-html="mymsg"></div>
</div>
<q-select
rounded outlined v-model="destination"
:options="shared_consts.selectDestination"
label="Destinazione" emit-value map-options>
</q-select>
<q-select
rounded outlined v-model="sendreally"
:options="shared_consts.selectSendReally"
label="Destinazione" emit-value map-options>
</q-select>
<br/>
<div class="">
<q-btn label="Invia Msg" color="primary" @click="SendMsgToAll(shared_consts.TypeSend.TELEGRAM)"></q-btn>
</div>
</div>
<q-inner-loading id="spinner" :showing="incaricamento">
<q-spinner-tail
color="primary"
size="4em">
</q-spinner-tail>
</q-inner-loading>
</q-tab-panel>
<q-tab-panel name="push">
<div class="row center_img clBorderSteps" style="max-width: 600px;">
<div class="row">
<q-input v-model="title" autofocus label="Titolo" style="width: 300px;"></q-input>
</div>
<div class="row">
<q-input
v-model="content" type="textarea" autofocus label="Contenuto"
input-class="myinput-area"
style="height: 100px; width: 500px;"></q-input>
</div>
<div class="row">
<q-input v-model="openUrl" autofocus label="openUrl" style="width: 200px;"></q-input>
<q-input v-model="openUrl2" autofocus label="openUrl2" style="width: 200px;"></q-input>
<q-input v-model="tag" autofocus label="tag" style="width: 100px;"></q-input>
</div>
<q-select
rounded outlined v-model="actiontype"
:options="shared_consts.selectActions"
label="Tipo Msg" emit-value map-options>
</q-select>
<q-select
rounded outlined v-model="destination"
:options="shared_consts.selectDestination"
label="Destinazione" emit-value map-options>
</q-select>
<q-select
rounded outlined v-model="sendreally"
:options="shared_consts.selectSendReally"
label="Destinazione" emit-value map-options>
</q-select>
<div v-if="actiontype === shared_consts.TypeMsg_Actions.OPZ1_2" class="row">
<q-input v-model="opz1" autofocus label="Opzione 1" style="width: 100px;"></q-input>
<q-input v-model="opz2" autofocus label="Opzione 2" style="width: 100px;"></q-input>
</div>
<br/>
<div class="">
<q-btn label="Invia Msg" color="primary" @click="SendMsgToAll(shared_consts.TypeSend.PUSH_NOTIFICATION)"></q-btn>
</div>
</div>
<q-inner-loading id="spinner2" :showing="incaricamento">
<q-spinner-tail
color="primary"
size="4em">
</q-spinner-tail>
</q-inner-loading>
</q-tab-panel>
</q-tab-panels>
</div> </div>
</CMyPage> </CMyPage>
</template> </template>
<script lang="ts" src="./sendpushnotif.ts"> <script lang="ts" src="./sendpushnotif.ts">

View File

@@ -31,7 +31,7 @@ export default defineComponent({
value: shared_consts.FILTER_USER_NO_INVITANTE value: shared_consts.FILTER_USER_NO_INVITANTE
}, },
{ {
label: 'Non sono stati Approvati dall\'Invitante', label: 'No Approv. Invitante',
value: shared_consts.FILTER_USER_NO_VERIFIED_APORTADOR value: shared_consts.FILTER_USER_NO_VERIFIED_APORTADOR
}, },
{ {
@@ -39,7 +39,15 @@ export default defineComponent({
value: shared_consts.FILTER_USER_NO_TELEGRAM_ID value: shared_consts.FILTER_USER_NO_TELEGRAM_ID
}, },
{ {
label: 'Verifica Telegram interrotta', label: 'SI Telegram ID',
value: shared_consts.FILTER_USER_SI_TELEGRAM_ID
},
{
label: 'NO Username Teleg',
value: shared_consts.FILTER_USER_WITHOUT_USERNAME_TELEGRAM
},
{
label: 'Verifica Teleg interrotta',
value: shared_consts.FILTER_USER_CODICE_AUTH_TELEGRAM value: shared_consts.FILTER_USER_CODICE_AUTH_TELEGRAM
}, },
{ {

View File

@@ -64,7 +64,7 @@ const msg_it = {
menu: 'Segreteria', menu: 'Segreteria',
manager: 'Segreteria', manager: 'Segreteria',
nessuno: 'Nessuno', nessuno: 'Nessuno',
sendpushnotif: 'Invia Msg Push', sendpushnotif: 'Invia Messaggi',
importfile: 'Importa File', importfile: 'Importa File',
}, },
messages: { messages: {
@@ -946,7 +946,13 @@ const msg_it = {
}, },
otherfilters: { otherfilters: {
name: 'Altri Filtri' name: 'Altri Filtri'
},
city: {
prov: 'Provincia',
reg: 'Regione',
link_grp: 'Link Territoriale',
} }
}, },
}; };

View File

@@ -414,6 +414,17 @@ export const colCitys = [
AddCol(DuplicateRec), AddCol(DuplicateRec),
] ]
export const colProvinces = [
AddCol({ name: '_id', label_trans: 'index', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'reg', label_trans: 'city.reg' }),
AddCol({ name: 'prov', label_trans: 'city.prov' }),
AddCol({ name: 'descr', label_trans: 'store.description' }),
AddCol({ name: 'link_grp', label_trans: 'city.link_grp' }),
AddCol(DeleteRec),
AddCol(DuplicateRec),
]
/*
export const colProvinces = [ export const colProvinces = [
// AddCol({ name: '_id', label_trans: 'index', fieldtype: costanti.FieldType.number }), // AddCol({ name: '_id', label_trans: 'index', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'label', label_trans: 'store.description' }), AddCol({ name: 'label', label_trans: 'store.description' }),
@@ -422,6 +433,7 @@ export const colProvinces = [
AddCol(DeleteRec), AddCol(DeleteRec),
AddCol(DuplicateRec), AddCol(DuplicateRec),
] ]
*/
export const colTableCountry = [ export const colTableCountry = [
AddCol({ name: 'id', label_trans: 'index', fieldtype: costanti.FieldType.string }), AddCol({ name: 'id', label_trans: 'index', fieldtype: costanti.FieldType.string }),
@@ -2006,6 +2018,12 @@ export const colTableUsersISP = [
AddCol({ AddCol({
name: 'profile.teleg_id', field: 'profile', subfield: 'teleg_id', label_trans: 'reg.teleg_id', name: 'profile.teleg_id', field: 'profile', subfield: 'teleg_id', label_trans: 'reg.teleg_id',
}), }),
AddCol({
name: 'profile.teleg_id_old',
field: 'profile',
subfield: 'teleg_id_old',
label_trans: 'reg.teleg_id_old',
}),
AddCol({ AddCol({
name: 'profile.teleg_checkcode', name: 'profile.teleg_checkcode',
@@ -2643,8 +2661,8 @@ export const fieldsTable = {
value: 'provinces', value: 'provinces',
label: 'Provincia', label: 'Provincia',
columns: colProvinces, columns: colProvinces,
colkey: 'value', colkey: '_id',
collabel: 'label', collabel: 'descr',
remote: true, remote: true,
}, },
{ {

View File

@@ -2024,6 +2024,7 @@ export const tools = {
mylang = 'si' mylang = 'si'
} }
if (!(static_data.arrLangUsed.includes(mylang))) { if (!(static_data.arrLangUsed.includes(mylang))) {
// console.log('non incluso ', mylang) // console.log('non incluso ', mylang)
// mylang = static_data.arrLangUsed[0] // mylang = static_data.arrLangUsed[0]
@@ -4133,6 +4134,18 @@ export const tools = {
return false return false
}, },
getUsername() {
const userStore = useUserStore()
try {
if (!!userStore)
return userStore.my.username
else
return false
}catch (e) {
return ''
}
},
isUserOk() { isUserOk() {
const userStore = useUserStore() const userStore = useUserStore()
if (!!userStore) if (!!userStore)
@@ -5015,6 +5028,11 @@ export const tools = {
return userStore.isTelegOk() return userStore.isTelegOk()
}, },
isUsernameTelegOk() {
const userStore = useUserStore()
return userStore.isUsernameTelegOk()
},
getParamsByTable(table: string) { getParamsByTable(table: string) {
let obj = { let obj = {

View File

@@ -236,6 +236,7 @@ export const toolsext = {
mylang = 'si' mylang = 'si'
} }
if (!(static_data.arrLangUsed.includes(mylang))) { if (!(static_data.arrLangUsed.includes(mylang))) {
// console.log('non incluso ', mylang) // console.log('non incluso ', mylang)
// mylang = static_data.arrLangUsed[0] // mylang = static_data.arrLangUsed[0]

View File

@@ -272,6 +272,11 @@ export const useUserStore = defineStore('UserStore', {
// return this.my.verified_email! && this.my.profile.teleg_id! > 0 && this.my.verified_by_aportador! // return this.my.verified_email! && this.my.profile.teleg_id! > 0 && this.my.verified_by_aportador!
}, },
isUsernameTelegOk(): boolean {
return !!this.my.profile.username_telegram
// return this.my.verified_email! && this.my.profile.teleg_id! > 0 && this.my.verified_by_aportador!
},
getNameSurnameByUserId(userId: string): string { getNameSurnameByUserId(userId: string): string {
const user = this.getUserByUserId(userId) const user = this.getUserByUserId(userId)

View File

@@ -128,7 +128,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
sectors: [], sectors: [],
sectorgoods: [], sectorgoods: [],
catgrps: [], catgrps: [],
cities: [], provinces: [],
}), }),
getters: { getters: {
@@ -256,6 +256,8 @@ export const useGlobalStore = defineStore('GlobalStore', {
return state.sectorgoods return state.sectorgoods
else if (table === 'catgrps') else if (table === 'catgrps')
return state.catgrps return state.catgrps
else if (table === 'provinces')
return state.provinces
else { else {
return ris return ris
} }
@@ -1304,7 +1306,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
this.statusSkills = (res.data.statusSkills) ? [...res.data.statusSkills] : [] this.statusSkills = (res.data.statusSkills) ? [...res.data.statusSkills] : []
this.sectors = (res.data.sectors) ? [...res.data.sectors] : [] this.sectors = (res.data.sectors) ? [...res.data.sectors] : []
this.sectorgoods = (res.data.sectorgoods) ? [...res.data.sectorgoods] : [] this.sectorgoods = (res.data.sectorgoods) ? [...res.data.sectorgoods] : []
this.cities = (res.data.cities) ? [...res.data.cities] : [] this.provinces = (res.data.provinces) ? [...res.data.provinces] : []
this.catgrps = (res.data.catgrps) ? [...res.data.catgrps] : [] this.catgrps = (res.data.catgrps) ? [...res.data.catgrps] : []
this.adtypes = (res.data.adtypes) ? [...res.data.adtypes] : [] this.adtypes = (res.data.adtypes) ? [...res.data.adtypes] : []
this.adtypegoods = (res.data.adtypegoods) ? [...res.data.adtypegoods] : [] this.adtypegoods = (res.data.adtypegoods) ? [...res.data.adtypegoods] : []
@@ -1531,7 +1533,6 @@ export const useGlobalStore = defineStore('GlobalStore', {
else if (table === 'visibilGroup') myarr = shared_consts.VisibilGroup else if (table === 'visibilGroup') myarr = shared_consts.VisibilGroup
else if (table === 'lang') myarr = shared_consts.Lang else if (table === 'lang') myarr = shared_consts.Lang
else if (table === 'regions') myarr = shared_consts.Regions else if (table === 'regions') myarr = shared_consts.Regions
else if (table === 'provinces') myarr = shared_consts.Provinces
else if (table === 'shippings') myarr = shared_consts.Shippings else if (table === 'shippings') myarr = shared_consts.Shippings
else if (table === 'otherfilters') myarr = shared_consts.OtherFilters else if (table === 'otherfilters') myarr = shared_consts.OtherFilters
else if (table === toolsext.TABCALDATE) myarr = this.getArrDateEvent() else if (table === toolsext.TABCALDATE) myarr = this.getArrDateEvent()

View File

@@ -1,6 +1,6 @@
<template> <template>
<div class=""> <div class="">
<q-banner <!--<q-banner
rounded rounded
dense dense
class="bg-warning text-white" class="bg-warning text-white"
@@ -11,7 +11,7 @@
</template> </template>
<span class="mybanner">Questa sezione è ancora in fase di miglioramento.</span> <span class="mybanner">Questa sezione è ancora in fase di miglioramento.</span>
</q-banner> </q-banner>-->
<CMyGroups <CMyGroups
v-model="filter" v-model="filter"