Conto Comunitario all'interno di un Circuito
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="0.5.58"
|
APP_VERSION="0.5.59"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="0.5.58"
|
APP_VERSION="0.5.59"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL=newfreeplanet
|
DIRECTORY_LOCAL=newfreeplanet
|
||||||
|
|||||||
@@ -212,27 +212,16 @@ const msg_website_it = {
|
|||||||
+ '<li>👥 Aiutando a creare Gruppi Territoriali nella vostra città, impegnandosi a realizzare progetti per il Bene Comune, in onore ai principi Amorevoli e di condivisione.</li>'
|
+ '<li>👥 Aiutando a creare Gruppi Territoriali nella vostra città, impegnandosi a realizzare progetti per il Bene Comune, in onore ai principi Amorevoli e di condivisione.</li>'
|
||||||
+ '<li>🌱 Sostenendo le persone attorno a voi, e rispettando la nostra vera Casa: Madre Natura e Tutti gli Esseri Viventi. ❤️</li>'
|
+ '<li>🌱 Sostenendo le persone attorno a voi, e rispettando la nostra vera Casa: Madre Natura e Tutti gli Esseri Viventi. ❤️</li>'
|
||||||
+ '<li>👨🏻💻 Con una <strong>piccola donazione</strong> per le spese dei Server, manutenzione e per i continui sviluppi e miglioramenti</li></ul>' +
|
+ '<li>👨🏻💻 Con una <strong>piccola donazione</strong> per le spese dei Server, manutenzione e per i continui sviluppi e miglioramenti</li></ul>' +
|
||||||
'1) Tramite <strong>Paypal</strong>:<br>' +
|
'1) Tramite <strong><a href="https://paypal.me/paoloarena" target="_blank">Paypal</a></strong>:<br>' +
|
||||||
'<div style="font-size: 1.5rem; background-color: white; color: blue; border: solid 2px #f00; margin: 10px; padding: 10px; border-radius: 10px; " ' +
|
|
||||||
'class="row justify-around">' +
|
|
||||||
'<span><a href="https://paypal.me/paoloarena/1" target="_blank">1€</a></span>' +
|
|
||||||
'<span><a href="https://paypal.me/paoloarena/2" target="_blank">2€</a></span>' +
|
|
||||||
'<span><a href="https://paypal.me/paoloarena/5" target="_blank">5€</a></span>' +
|
|
||||||
'<span><a href="https://paypal.me/paoloarena/10" target="_blank">10€</a></span>' +
|
|
||||||
'<span><a href="https://paypal.me/paoloarena" target="_blank">scegli</a></span>' +
|
|
||||||
'</div><em>clicca sull\'importo per fare una <strong>donazione</strong> </em><br>' +
|
|
||||||
'<br>2) Tramite <strong>Satispay</strong>: <a href="https://www.satispay.com/app/match/link/money-box/S6Y-SVN--62712D42-35B0-4BB9-8511-410C2AB8CD45" target="_blank">Clicca qui</a><br>' +
|
'<br>2) Tramite <strong>Satispay</strong>: <a href="https://www.satispay.com/app/match/link/money-box/S6Y-SVN--62712D42-35B0-4BB9-8511-410C2AB8CD45" target="_blank">Clicca qui</a><br>' +
|
||||||
'<div style="font-size: 1rem; background-color: white; color: blue; border: solid 2px #f00; margin: 5px; padding: 5px; border-radius: 10px; " ' +
|
'<div style="font-size: 1rem; background-color: white; color: blue; border: solid 2px #f00; margin: 5px; padding: 5px; border-radius: 10px; " ' +
|
||||||
'class="row justify-around">' +
|
'class="row justify-around">' +
|
||||||
'Se ancora non hai Satispay <a href="https://www.satispay.com/promo/PAOLOARENA4">Richiedila cliccando qui</a></br>' +
|
'Se ancora non hai Satispay <a href="https://www.satispay.com/promo/PAOLOARENA4">Richiedila cliccando qui</a></br>' +
|
||||||
'E\' consigliata se hai un conto bancario come alternativa alla costosa carta di credito/debito</br>' +
|
|
||||||
'👉🏻 <strong>Registrandoti entrambi riceviamo un Bonus di 5 €</strong></br>' +
|
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'<br>3) Tramite <strong>Bonifico Bancario</strong>:<br>' +
|
'<br>3) Tramite <strong>Bonifico Bancario</strong>:<br>' +
|
||||||
'(Scrivi a Surya (<a href="mailto:surya@riso.app">surya@riso.app</a>) per ricevere le coordinate</br>' +
|
'(Scrivi a Surya (<a href="https://t.me/surya1977">@surya1977</a>) per le coordinate</br>' +
|
||||||
'' +
|
'' +
|
||||||
'4) In alternativa scegli tu una forma di scambio da donare a Paolo (per scrivergli su Telegram: <a href="https://t.me/surya1977" target="_blank">Surya Paolo</a>)<br />' +
|
'4) In alternativa scegli tu una forma di Dono <br />' +
|
||||||
'<span style="color: red; font-size: 2rem;">❤</span> Sono graditi messaggi sia di suggerimenti che di apprezzamenti.<br>' +
|
|
||||||
'Grazie Mille per l\'Aiuto ed il Supporto' +
|
'Grazie Mille per l\'Aiuto ed il Supporto' +
|
||||||
'<br>',
|
'<br>',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="0.5.58"
|
APP_VERSION="0.5.59"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="0.5.58"
|
APP_VERSION="0.5.59"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL=newfreeplanet
|
DIRECTORY_LOCAL=newfreeplanet
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="0.5.58"
|
APP_VERSION="0.5.59"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="14"
|
APP_ID="14"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -1013,6 +1013,21 @@ export const shared_consts = {
|
|||||||
STATUS_GROUPS_REMOVED: 7,
|
STATUS_GROUPS_REMOVED: 7,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
CircuitsNotif: {
|
||||||
|
STATUS_NONE: 0,
|
||||||
|
STATUS_NEW: 51,
|
||||||
|
STATUS_ACCEPTED: 53,
|
||||||
|
STATUS_REFUSED: 54,
|
||||||
|
STATUS_BLOCKED: 55,
|
||||||
|
STATUS_DELETED: 56,
|
||||||
|
STATUS_REMOVED: 57,
|
||||||
|
STATUS_SENDCOINSREQ: 58,
|
||||||
|
STATUS_COINS_ACCEPTED: 60,
|
||||||
|
STATUS_COINS_REFUSED: 61,
|
||||||
|
STATUS_COINS_ACCEPTED_SENT: 62,
|
||||||
|
STATUS_COINS_REFUSED_SENT: 63,
|
||||||
|
},
|
||||||
|
|
||||||
QualiNotifs: {
|
QualiNotifs: {
|
||||||
CIRCUITS: 1,
|
CIRCUITS: 1,
|
||||||
OTHERS: 2,
|
OTHERS: 2,
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
|
||||||
<div class="row justify-evenly items-center q-pa-sm q-ma-sm">
|
<div class="row justify-evenly items-center q-pa-sm q-ma-sm">
|
||||||
<div class="q-ma-sx">
|
<div class="q-ma-sx">
|
||||||
<q-btn
|
<q-btn
|
||||||
@@ -42,7 +43,7 @@
|
|||||||
<q-btn
|
<q-btn
|
||||||
v-if="
|
v-if="
|
||||||
userStore.getMyCircuitsInCommonByUser(myuser).length > 0 &&
|
userStore.getMyCircuitsInCommonByUser(myuser).length > 0 &&
|
||||||
((contact.username !== userStore.my.username) || userStore.hoContiComunitariDaAmministrare())
|
((myuser.username !== userStore.my.username) || userStore.hoContiComunitariDaAmministrare())
|
||||||
"
|
"
|
||||||
icon="fas fa-coins"
|
icon="fas fa-coins"
|
||||||
color="green"
|
color="green"
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<div v-html="getNotifText($t, notif, false)"></div>
|
<div v-html="getNotifText($t, notif, false)"></div>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-item-label caption lines="18"
|
<q-item-label caption lines="18"
|
||||||
v-if="notif.typedir === shared_consts.TypeNotifs.TYPEDIR_CIRCUITS && notif.status === 0 && notif.typeid === shared_consts.TypeNotifs.ID_CIRCUIT_SENDCOINSREQ"
|
v-if="notif.typedir === shared_consts.TypeNotifs.TYPEDIR_CIRCUITS && notif.status === shared_consts.CircuitsNotif.STATUS_NONE && notif.typeid === shared_consts.TypeNotifs.ID_CIRCUIT_SENDCOINSREQ"
|
||||||
>
|
>
|
||||||
<div class="row no-wrap justify-evenly q-pa-sm">
|
<div class="row no-wrap justify-evenly q-pa-sm">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|||||||
@@ -426,7 +426,7 @@
|
|||||||
tools.errorMsg('username', v$.username) ||
|
tools.errorMsg('username', v$.username) ||
|
||||||
(isalreadyReg ? 'L\'Username è gia stato registrato!' : '')
|
(isalreadyReg ? 'L\'Username è gia stato registrato!' : '')
|
||||||
"
|
"
|
||||||
:label="$t('reg.username_reg_collettivo')"
|
:label="collettivo ? $t('reg.username_reg_collettivo') : $t('reg.username_reg')"
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon name="person" />
|
<q-icon name="person" />
|
||||||
|
|||||||
@@ -188,27 +188,16 @@ const msg_website_it = {
|
|||||||
+ '<li>👥 Aiutando a creare Gruppi Territoriali nella vostra città, impegnandosi a realizzare progetti per il Bene Comune, in onore ai principi Amorevoli e di condivisione.</li>'
|
+ '<li>👥 Aiutando a creare Gruppi Territoriali nella vostra città, impegnandosi a realizzare progetti per il Bene Comune, in onore ai principi Amorevoli e di condivisione.</li>'
|
||||||
+ '<li>🌱 Sostenendo le persone attorno a voi, e rispettando la nostra vera Casa: Madre Natura e Tutti gli Esseri Viventi. ❤️</li>'
|
+ '<li>🌱 Sostenendo le persone attorno a voi, e rispettando la nostra vera Casa: Madre Natura e Tutti gli Esseri Viventi. ❤️</li>'
|
||||||
+ '<li>👨🏻💻 Con una <strong>piccola donazione</strong> per le spese dei Server, manutenzione e per i continui sviluppi e miglioramenti</li></ul>' +
|
+ '<li>👨🏻💻 Con una <strong>piccola donazione</strong> per le spese dei Server, manutenzione e per i continui sviluppi e miglioramenti</li></ul>' +
|
||||||
'1) Tramite <strong>Paypal</strong>:<br>' +
|
'1) Tramite <strong><a href="https://paypal.me/paoloarena" target="_blank">Paypal</a></strong>:<br>' +
|
||||||
'<div style="font-size: 1.5rem; background-color: white; color: blue; border: solid 2px #f00; margin: 10px; padding: 10px; border-radius: 10px; " ' +
|
|
||||||
'class="row justify-around">' +
|
|
||||||
'<span><a href="https://paypal.me/paoloarena/1" target="_blank">1€</a></span>' +
|
|
||||||
'<span><a href="https://paypal.me/paoloarena/2" target="_blank">2€</a></span>' +
|
|
||||||
'<span><a href="https://paypal.me/paoloarena/5" target="_blank">5€</a></span>' +
|
|
||||||
'<span><a href="https://paypal.me/paoloarena/10" target="_blank">10€</a></span>' +
|
|
||||||
'<span><a href="https://paypal.me/paoloarena" target="_blank">scegli</a></span>' +
|
|
||||||
'</div><em>clicca sull\'importo per fare una <strong>donazione</strong> </em><br>' +
|
|
||||||
'<br>2) Tramite <strong>Satispay</strong>: <a href="https://www.satispay.com/app/match/link/money-box/S6Y-SVN--62712D42-35B0-4BB9-8511-410C2AB8CD45" target="_blank">Clicca qui</a><br>' +
|
'<br>2) Tramite <strong>Satispay</strong>: <a href="https://www.satispay.com/app/match/link/money-box/S6Y-SVN--62712D42-35B0-4BB9-8511-410C2AB8CD45" target="_blank">Clicca qui</a><br>' +
|
||||||
'<div style="font-size: 1rem; background-color: white; color: blue; border: solid 2px #f00; margin: 5px; padding: 5px; border-radius: 10px; " ' +
|
'<div style="font-size: 1rem; background-color: white; color: blue; border: solid 2px #f00; margin: 5px; padding: 5px; border-radius: 10px; " ' +
|
||||||
'class="row justify-around">' +
|
'class="row justify-around">' +
|
||||||
'Se ancora non hai Satispay <a href="https://www.satispay.com/promo/PAOLOARENA4">Richiedila cliccando qui</a></br>' +
|
'Se ancora non hai Satispay <a href="https://www.satispay.com/promo/PAOLOARENA4">Richiedila cliccando qui</a></br>' +
|
||||||
'E\' consigliata se hai un conto bancario come alternativa alla costosa carta di credito/debito</br>' +
|
|
||||||
'👉🏻 <strong>Registrandoti entrambi riceviamo un Bonus di 5 €</strong></br>' +
|
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'<br>3) Tramite <strong>Bonifico Bancario</strong>:<br>' +
|
'<br>3) Tramite <strong>Bonifico Bancario</strong>:<br>' +
|
||||||
'(Scrivi a Surya (<a href="mailto:surya@riso.app">surya@riso.app</a>) per ricevere le coordinate</br>' +
|
'(Scrivi a Surya (<a href="https://t.me/surya1977">@surya1977</a>) per le coordinate</br>' +
|
||||||
'' +
|
'' +
|
||||||
'4) In alternativa scegli tu una forma di scambio da donare a Paolo (per scrivergli su Telegram: <a href="https://t.me/surya1977" target="_blank">Surya Paolo</a>)<br />' +
|
'4) In alternativa scegli tu una forma di Dono <br />' +
|
||||||
'<span style="color: red; font-size: 2rem;">❤</span> Sono graditi messaggi sia di suggerimenti che di apprezzamenti.<br>' +
|
|
||||||
'Grazie Mille per l\'Aiuto ed il Supporto' +
|
'Grazie Mille per l\'Aiuto ed il Supporto' +
|
||||||
'<br>',
|
'<br>',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -104,7 +104,7 @@
|
|||||||
<div v-html="getNotifText($t, notif, false)"></div>
|
<div v-html="getNotifText($t, notif, false)"></div>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-item-label caption lines="2"
|
<q-item-label caption lines="2"
|
||||||
v-if="notif.typedir === shared_consts.TypeNotifs.TYPEDIR_CIRCUITS && notif.status === 0 && notif.typeid === shared_consts.TypeNotifs.ID_CIRCUIT_REQUEST_TO_ENTER"
|
v-if="notif.typedir === shared_consts.TypeNotifs.TYPEDIR_CIRCUITS && notif.status === shared_consts.CircuitsNotif.STATUS_NONE && notif.typeid === shared_consts.TypeNotifs.ID_CIRCUIT_REQUEST_TO_ENTER"
|
||||||
v-ripple>
|
v-ripple>
|
||||||
|
|
||||||
<div class="row no-wrap justify-evenly" v-if="tools.iAmAdminCircuit(notif.extrafield)">
|
<div class="row no-wrap justify-evenly" v-if="tools.iAmAdminCircuit(notif.extrafield)">
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-item-label caption lines="2"
|
<q-item-label caption lines="2"
|
||||||
v-if="notif.typedir === shared_consts.TypeNotifs.TYPEDIR_CIRCUITS && notif.status === 0 && notif.typeid === shared_consts.TypeNotifs.ID_CIRCUIT_SENDCOINSREQ"
|
v-if="notif.typedir === shared_consts.TypeNotifs.TYPEDIR_CIRCUITS && notif.status === shared_consts.CircuitsNotif.STATUS_NONE && notif.typeid === shared_consts.TypeNotifs.ID_CIRCUIT_SENDCOINSREQ"
|
||||||
v-ripple>
|
v-ripple>
|
||||||
|
|
||||||
<div class="row no-wrap justify-evenly">
|
<div class="row no-wrap justify-evenly">
|
||||||
@@ -182,6 +182,7 @@
|
|||||||
</q-item>
|
</q-item>
|
||||||
<q-separator/>
|
<q-separator/>
|
||||||
</q-list>
|
</q-list>
|
||||||
|
<br><br><br>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-drawer>
|
</q-drawer>
|
||||||
|
|||||||
@@ -1115,6 +1115,8 @@ export interface IMovement {
|
|||||||
|
|
||||||
export interface IMovVisu {
|
export interface IMovVisu {
|
||||||
transactionDate: Date
|
transactionDate: Date
|
||||||
|
groupfrom: IMyGroup
|
||||||
|
groupto: IMyGroup
|
||||||
userfrom: IUserFields
|
userfrom: IUserFields
|
||||||
userto: IUserFields
|
userto: IUserFields
|
||||||
circuitfrom: ICircuit
|
circuitfrom: ICircuit
|
||||||
|
|||||||
@@ -1051,7 +1051,7 @@ const msg_it = {
|
|||||||
friends: 'Amici',
|
friends: 'Amici',
|
||||||
bacheca: 'Bacheca',
|
bacheca: 'Bacheca',
|
||||||
services: 'Servizi',
|
services: 'Servizi',
|
||||||
handshake: 'Raporti di fiducia',
|
handshake: 'Rapporti di Fiducia',
|
||||||
hosp: 'Ospitalità',
|
hosp: 'Ospitalità',
|
||||||
events: 'Eventi',
|
events: 'Eventi',
|
||||||
goods: 'Beni',
|
goods: 'Beni',
|
||||||
@@ -1139,6 +1139,7 @@ const msg_it = {
|
|||||||
hidden_descr: 'il Gruppo non sarà visibile nella ricerca',
|
hidden_descr: 'il Gruppo non sarà visibile nella ricerca',
|
||||||
page: 'Pagina',
|
page: 'Pagina',
|
||||||
circuits: 'Circuiti',
|
circuits: 'Circuiti',
|
||||||
|
groupname: '',
|
||||||
},
|
},
|
||||||
finder: {
|
finder: {
|
||||||
search_skill: 'Cerca una specializzazione'
|
search_skill: 'Cerca una specializzazione'
|
||||||
@@ -1289,7 +1290,9 @@ const msg_it = {
|
|||||||
movement: {
|
movement: {
|
||||||
transactionDate: 'Data Transazione',
|
transactionDate: 'Data Transazione',
|
||||||
accountFromId: 'Dal Conto',
|
accountFromId: 'Dal Conto',
|
||||||
|
accountFromComId: 'Dal Conto Com.',
|
||||||
accountToId: 'Al Conto',
|
accountToId: 'Al Conto',
|
||||||
|
accountToComId: 'Al Conto Com.',
|
||||||
amount_sent: 'Quantità inviate',
|
amount_sent: 'Quantità inviate',
|
||||||
amount_to_send: 'Quantità da inviare',
|
amount_to_send: 'Quantità da inviare',
|
||||||
amount: 'Quantità',
|
amount: 'Quantità',
|
||||||
|
|||||||
@@ -620,6 +620,31 @@ export const colmyMovement = [
|
|||||||
noshowlabel: true,
|
noshowlabel: true,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
AddCol({
|
||||||
|
name: 'groupfrom.groupname',
|
||||||
|
label_trans: 'groups.groupname',
|
||||||
|
field: 'groupfrom',
|
||||||
|
subfield: 'groupname',
|
||||||
|
foredit: false,
|
||||||
|
tipovisu: costanti.TipoVisu.LINK,
|
||||||
|
fieldtype: costanti.FieldType.username_chip,
|
||||||
|
link: '/my/groupfrom.groupname',
|
||||||
|
noshowlabel: true,
|
||||||
|
extrafield: 'movement.from',
|
||||||
|
}),
|
||||||
|
AddCol({
|
||||||
|
name: 'groupto.groupname',
|
||||||
|
label_trans: 'groups.groupname',
|
||||||
|
field: 'groupto',
|
||||||
|
subfield: 'groupname',
|
||||||
|
foredit: false,
|
||||||
|
tipovisu: costanti.TipoVisu.LINK,
|
||||||
|
fieldtype: costanti.FieldType.username_chip,
|
||||||
|
link: '/my/groupto.groupname',
|
||||||
|
extrafield: 'movement.to',
|
||||||
|
noshowlabel: true,
|
||||||
|
}),
|
||||||
|
|
||||||
AddCol({
|
AddCol({
|
||||||
name: 'amount', label_trans: 'movement.amount',
|
name: 'amount', label_trans: 'movement.amount',
|
||||||
fieldtype: costanti.FieldType.currency, required: true, tipovisu: costanti.TipoVisu.TESTO_BORDATO
|
fieldtype: costanti.FieldType.currency, required: true, tipovisu: costanti.TipoVisu.TESTO_BORDATO
|
||||||
@@ -632,7 +657,9 @@ export const colmyMovementTable = [
|
|||||||
// AddCol({ name: '_id', label_trans: 'reg.id' }),
|
// AddCol({ name: '_id', label_trans: 'reg.id' }),
|
||||||
AddCol({ name: 'transactionDate', label_trans: 'movement.transactionDate', fieldtype: costanti.FieldType.date }),
|
AddCol({ name: 'transactionDate', label_trans: 'movement.transactionDate', fieldtype: costanti.FieldType.date }),
|
||||||
AddCol({ name: 'userfrom.username', field: 'userfrom', subfield: 'username', label_trans: 'movement.accountFromId', fieldtype: costanti.FieldType.string, required: true }),
|
AddCol({ name: 'userfrom.username', field: 'userfrom', subfield: 'username', label_trans: 'movement.accountFromId', fieldtype: costanti.FieldType.string, required: true }),
|
||||||
|
AddCol({ name: 'groupfrom.groupname', field: 'groupfrom', subfield: 'groupname', label_trans: 'movement.accountFromComId', fieldtype: costanti.FieldType.string, required: true }),
|
||||||
AddCol({ name: 'userto.username', field: 'userto', subfield: 'username', label_trans: 'movement.accountToId', fieldtype: costanti.FieldType.string, required: true }),
|
AddCol({ name: 'userto.username', field: 'userto', subfield: 'username', label_trans: 'movement.accountToId', fieldtype: costanti.FieldType.string, required: true }),
|
||||||
|
AddCol({ name: 'groupto.groupname', field: 'groupto', subfield: 'groupname', label_trans: 'movement.accountToComId', fieldtype: costanti.FieldType.string, required: true }),
|
||||||
|
|
||||||
AddCol({
|
AddCol({
|
||||||
name: 'amount', label_trans: 'movement.amount',
|
name: 'amount', label_trans: 'movement.amount',
|
||||||
|
|||||||
@@ -5653,7 +5653,11 @@ export const tools = {
|
|||||||
acceptCoins($q: any, username: string, notif: any) {
|
acceptCoins($q: any, username: string, notif: any) {
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
const notifStore = useNotifStore()
|
||||||
|
|
||||||
notif.extrarec.notifId = notif._id
|
notif.extrarec.notifId = notif._id
|
||||||
|
notif.extrarec.lastdr = notifStore.getLastDataRead(username)
|
||||||
|
|
||||||
userStore.setCircuitCmd($q, t, username, notif.extrarec.circuitname, shared_consts.CIRCUITCMD.SENDCOINS_ACCEPT, 0, notif.extrarec)
|
userStore.setCircuitCmd($q, t, username, notif.extrarec.circuitname, shared_consts.CIRCUITCMD.SENDCOINS_ACCEPT, 0, notif.extrarec)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
@@ -5671,7 +5675,10 @@ export const tools = {
|
|||||||
refuseCoins($q: any, username: string, notif: any) {
|
refuseCoins($q: any, username: string, notif: any) {
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
const notifStore = useNotifStore()
|
||||||
|
|
||||||
notif.extrarec.notifId = notif._id
|
notif.extrarec.notifId = notif._id
|
||||||
|
notif.extrarec.lastdr = notifStore.getLastDataRead(username)
|
||||||
userStore.setCircuitCmd($q, t, username, notif.extrarec.circuitname, shared_consts.CIRCUITCMD.SENDCOINS_REFUSE, 0, notif.extrarec)
|
userStore.setCircuitCmd($q, t, username, notif.extrarec.circuitname, shared_consts.CIRCUITCMD.SENDCOINS_REFUSE, 0, notif.extrarec)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
if (res && res.result) {
|
if (res && res.result) {
|
||||||
@@ -7306,9 +7313,13 @@ export const tools = {
|
|||||||
let type = costanti.TypeMov.Nessuno
|
let type = costanti.TypeMov.Nessuno
|
||||||
if (rec && rec.userfrom) {
|
if (rec && rec.userfrom) {
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
if (userStore.my.username === rec.userfrom.username) {
|
if (rec.userfrom && userStore.my.username === rec.userfrom.username) {
|
||||||
type = costanti.TypeMov.Uscita
|
type = costanti.TypeMov.Uscita
|
||||||
} else if (userStore.my.username === rec.userto.username) {
|
} else if (rec.userto && userStore.my.username === rec.userto.username) {
|
||||||
|
type = costanti.TypeMov.Entrata
|
||||||
|
} else if (rec.groupfrom && tools.isUserAdminGroup(rec.groupfrom.groupname, userStore.my.username)) {
|
||||||
|
type = costanti.TypeMov.Uscita
|
||||||
|
} else if (rec.groupto && tools.isUserAdminGroup(rec.groupto.groupname, userStore.my.username)) {
|
||||||
type = costanti.TypeMov.Entrata
|
type = costanti.TypeMov.Entrata
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export const useNotifStore = defineStore('NotifStore', {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getnotifs_coinsreq: (mystate: INotifState) => (): INotif[] => {
|
getnotifs_coinsreq: (mystate: INotifState) => (): INotif[] => {
|
||||||
const ctrec = (mystate.last_notifs) ? mystate.last_notifs.slice(0, 20).filter((rec) => rec.typedir === shared_consts.TypeNotifs.TYPEDIR_CIRCUITS && rec.typeid === shared_consts.TypeNotifs.ID_CIRCUIT_SENDCOINSREQ && rec.status === 0) : []
|
const ctrec = (mystate.last_notifs) ? mystate.last_notifs.slice(0, 20).filter((rec) => rec.typedir === shared_consts.TypeNotifs.TYPEDIR_CIRCUITS && rec.typeid === shared_consts.TypeNotifs.ID_CIRCUIT_SENDCOINSREQ && rec.status === shared_consts.CircuitsNotif.STATUS_NONE) : []
|
||||||
return (ctrec)
|
return (ctrec)
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -84,6 +84,13 @@ export const useNotifStore = defineStore('NotifStore', {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
updateArrRecNotifFromServer(arrrecnotif: INotif[]) {
|
||||||
|
if (arrrecnotif && arrrecnotif.length > 0) {
|
||||||
|
this.last_notifs = arrrecnotif
|
||||||
|
|
||||||
|
this.updateArrNotif()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
async setBadgeIconApp() {
|
async setBadgeIconApp() {
|
||||||
// Get our dummy count and update it,
|
// Get our dummy count and update it,
|
||||||
@@ -244,6 +251,30 @@ export const useNotifStore = defineStore('NotifStore', {
|
|||||||
setCountNotifs(num: number) {
|
setCountNotifs(num: number) {
|
||||||
this.countNotif = num
|
this.countNotif = num
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getLastNotif(username: string): any {
|
||||||
|
// Get msg for this chat
|
||||||
|
if (this.last_notifs)
|
||||||
|
return this.last_notifs.find((rec: INotif) => rec.dest === username)
|
||||||
|
// return users_msg_saved[username]
|
||||||
|
},
|
||||||
|
|
||||||
|
getLastDataRead(username: string): any {
|
||||||
|
// Get msg for this
|
||||||
|
|
||||||
|
let myrec = this.getLastNotif(username)
|
||||||
|
const lastdata: any = (myrec && myrec.lastdataread) ? myrec.lastdataread : tools.getLastDateReadReset()
|
||||||
|
|
||||||
|
let mydate = ''
|
||||||
|
if (!tools.isIsoDate(lastdata))
|
||||||
|
mydate = lastdata.toISOString()
|
||||||
|
else
|
||||||
|
return lastdata
|
||||||
|
|
||||||
|
return mydate
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -491,8 +491,12 @@ export const useUserStore = defineStore('UserStore', {
|
|||||||
let myrec = user
|
let myrec = user
|
||||||
if (col && col.field === 'userto')
|
if (col && col.field === 'userto')
|
||||||
myrec = user.userto
|
myrec = user.userto
|
||||||
|
if (col && col.field === 'groupto')
|
||||||
|
myrec = user.groupto
|
||||||
if (col && col.field === 'userfrom')
|
if (col && col.field === 'userfrom')
|
||||||
myrec = user.userfrom
|
myrec = user.userfrom
|
||||||
|
if (col && col.field === 'groupfrom')
|
||||||
|
myrec = user.groupfrom
|
||||||
|
|
||||||
return myrec
|
return myrec
|
||||||
},
|
},
|
||||||
@@ -1338,6 +1342,8 @@ export const useUserStore = defineStore('UserStore', {
|
|||||||
const notifStore = useNotifStore()
|
const notifStore = useNotifStore()
|
||||||
|
|
||||||
notifStore.updateRecNotif(res.data.recnotif)
|
notifStore.updateRecNotif(res.data.recnotif)
|
||||||
|
|
||||||
|
notifStore.updateArrRecNotifFromServer(res.data.arrrecnotif)
|
||||||
}
|
}
|
||||||
return res.data
|
return res.data
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user