Aggio App

This commit is contained in:
Surya Paolo
2022-12-09 03:09:16 +01:00
parent 771271fda2
commit 6a42df7861
16 changed files with 736 additions and 724 deletions

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.5.30" APP_VERSION="0.5.31"
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.5.30" APP_VERSION="0.5.31"
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.5.30" APP_VERSION="0.5.31"
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.5.30" APP_VERSION="0.5.31"
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.5.30" APP_VERSION="0.5.31"
SERVICE_WORKER_FILE="service-worker.js" SERVICE_WORKER_FILE="service-worker.js"
APP_ID="16" APP_ID="16"
DIRECTORY_LOCAL=newfreeplanet DIRECTORY_LOCAL=newfreeplanet

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.5.30" APP_VERSION="0.5.31"
SERVICE_WORKER_FILE="service-worker.js" SERVICE_WORKER_FILE="service-worker.js"
APP_ID="14" APP_ID="14"
DIRECTORY_LOCAL="newfreeplanet" DIRECTORY_LOCAL="newfreeplanet"

View File

@@ -310,8 +310,6 @@
/> />
</div> </div>
</div> </div>
<q-page-container>
<q-page>
<q-infinite-scroll <q-infinite-scroll
ref="myinfscroll" ref="myinfscroll"
v-if="shared_consts.VERTIC_SHOW_GRID.includes(myvertical)" v-if="shared_consts.VERTIC_SHOW_GRID.includes(myvertical)"
@@ -344,9 +342,7 @@
shared_consts.TABLES_VISU_CMYSRECCARD.includes(tablesel)) shared_consts.TABLES_VISU_CMYSRECCARD.includes(tablesel))
" "
> >
<div <div v-if="row && shared_consts.TABLES_WITH_DATE.includes(tablesel)">
v-if="row && shared_consts.TABLES_WITH_DATE.includes(tablesel)"
>
<div <div
v-if=" v-if="
row.dateTimeStart && row.dateTimeStart &&
@@ -447,10 +443,7 @@
` 100%)` ` 100%)`
" "
> >
<q-toolbar <q-toolbar class="bg-primary text-white" style="min-height: 30px">
class="bg-primary text-white"
style="min-height: 30px"
>
<q-toolbar-title> <q-toolbar-title>
{{ {{
tools.isEntrataByRecMov(row) tools.isEntrataByRecMov(row)
@@ -463,13 +456,7 @@
<div v-for="col in mycolumns" :key="col.name"> <div v-for="col in mycolumns" :key="col.name">
<div <div
v-if=" v-if="
showColCheck( showColCheck(col, tools.TIPOVIS_SHOW_RECORD, true, 1, row)
col,
tools.TIPOVIS_SHOW_RECORD,
true,
1,
row
)
" "
class="tdclass" class="tdclass"
> >
@@ -550,9 +537,7 @@
class="text-italic text-weight-bold" class="text-italic text-weight-bold"
> >
<span <span
v-if=" v-if="col && showColCheck(col, tools.TIPOVIS_SHOW_RECORD, true)"
col && showColCheck(col, tools.TIPOVIS_SHOW_RECORD, true)
"
> >
{{ col.label }} {{ col.label }}
</span> </span>
@@ -861,13 +846,7 @@
<q-td v-for="col in mycolumns" :key="col.name" :props="props"> <q-td v-for="col in mycolumns" :key="col.name" :props="props">
<div <div
v-if=" v-if="
showColCheck( showColCheck(col, tools.TIPOVIS_SHOW_RECORD, true, 1, props.row)
col,
tools.TIPOVIS_SHOW_RECORD,
true,
1,
props.row
)
" "
class="tdclass" class="tdclass"
> >
@@ -875,7 +854,9 @@
<CMyPopupEdit <CMyPopupEdit
:table="mytable" :table="mytable"
:canEdit="canEdit" :canEdit="canEdit"
:canModify="tools.canModifyThisRec(props.row, tablesel) || editOn" :canModify="
tools.canModifyThisRec(props.row, tablesel) || editOn
"
:disable="disabilita()" :disable="disabilita()"
:mycol="col" :mycol="col"
v-model:row="props.row" v-model:row="props.row"
@@ -925,7 +906,8 @@
> >
<q-bar <q-bar
v-if=" v-if="
!visuinpage && (tools.canModifyThisRec(props.row, tablesel) || editOn) !visuinpage &&
(tools.canModifyThisRec(props.row, tablesel) || editOn)
" "
dense dense
class="bg-primary text-white full-height" class="bg-primary text-white full-height"
@@ -961,8 +943,7 @@
clickFunz( clickFunz(
props.row, props.row,
prop_mycolumns.find( prop_mycolumns.find(
(rec) => (rec) => rec.action === lists.MenuAction.CAN_EDIT_TABLE
rec.action === lists.MenuAction.CAN_EDIT_TABLE
) )
) )
" "
@@ -978,8 +959,7 @@
clickFunz( clickFunz(
props.row, props.row,
prop_mycolumns.find( prop_mycolumns.find(
(rec) => (rec) => rec.action === lists.MenuAction.DELETE_RECTABLE
rec.action === lists.MenuAction.DELETE_RECTABLE
) )
) )
" "
@@ -1024,7 +1004,8 @@
:table="mytable" :table="mytable"
:canEdit="canEdit" :canEdit="canEdit"
:canModify=" :canModify="
tools.canModifyThisRec(props.row, tablesel) || editOn tools.canModifyThisRec(props.row, tablesel) ||
editOn
" "
:disable="disabilita()" :disable="disabilita()"
:mycol="col" :mycol="col"
@@ -1063,8 +1044,6 @@
@click="createNewRecordDialog" @click="createNewRecordDialog"
/> />
</q-page-sticky> </q-page-sticky>
</q-page>
</q-page-container>
<q-dialog <q-dialog
v-model="visupagedialog" v-model="visupagedialog"
@@ -1118,7 +1097,9 @@
<CMyPopupEdit <CMyPopupEdit
:table="mytable" :table="mytable"
:canEdit="true" :canEdit="true"
:canModify="tools.canModifyThisRec(rowclicksel, tablesel) || editOn" :canModify="
tools.canModifyThisRec(rowclicksel, tablesel) || editOn
"
:disable="disabilita()" :disable="disabilita()"
:isInModif="mycol.isInModif" :isInModif="mycol.isInModif"
view="field" view="field"
@@ -1145,7 +1126,6 @@
:maximized="$q.screen.lt.sm" :maximized="$q.screen.lt.sm"
permanent permanent
> >
<q-card class="dialog_card"> <q-card class="dialog_card">
<q-bar dense class="bg-primary text-white"> <q-bar dense class="bg-primary text-white">
Nuovo: Nuovo:
@@ -1316,7 +1296,9 @@
<CMyPopupEdit <CMyPopupEdit
:table="mytable" :table="mytable"
:canEdit="true" :canEdit="true"
:canModify="tools.canModifyThisRec(recModif, tablesel) || editOn" :canModify="
tools.canModifyThisRec(recModif, tablesel) || editOn
"
:tablesel="col.tablesel" :tablesel="col.tablesel"
:mycol="col" :mycol="col"
:isInModif="true" :isInModif="true"

View File

@@ -86,6 +86,10 @@ export default defineComponent({
//$router.push(link) //$router.push(link)
} }
function getNameToShow(user: IUserFields) {
return userStore.getNameToShow(user)
}
onMounted(mounted) onMounted(mounted)
@@ -105,6 +109,7 @@ export default defineComponent({
cmdExt, cmdExt,
visupage, visupage,
showBadge, showBadge,
getNameToShow,
} }
}, },
}) })

View File

@@ -35,7 +35,6 @@
<q-item-section @click="navigaExt(myrec)"> <q-item-section @click="navigaExt(myrec)">
<q-item-label lines="1" class="full-width" > <q-item-label lines="1" class="full-width" >
<span v-for="(rec, ind) of tools.getArrSubSector(table, myrec)" :key="ind"> <span v-for="(rec, ind) of tools.getArrSubSector(table, myrec)" :key="ind">
<q-chip dense class="text-center shadow-5 glossy text-white bg-green">{{ rec.descr }}</q-chip> <q-chip dense class="text-center shadow-5 glossy text-white bg-green">{{ rec.descr }}</q-chip>
</span> </span>
@@ -51,7 +50,7 @@
<q-item-label lines="4" v-if="myrec.descr">{{ myrec.descr }}<br> <q-item-label lines="4" v-if="myrec.descr">{{ myrec.descr }}<br>
</q-item-label> </q-item-label>
<q-item-label lines="1" style="text-align: right" class="text_user_city"> <q-item-label lines="1" style="text-align: right" class="text_user_city">
<span class="text-weight-bold">{{ myrec.username }}</span> - <span class="text-weight-bold">{{ getNameToShow(myrec) }}</span> -
<span v-for="(rec, ind) of myrec.mycities" :key="ind"><span v-if="ind > 0">, </span>{{ rec.comune }} ({{ rec.prov }})</span> <span v-for="(rec, ind) of myrec.mycities" :key="ind"><span v-if="ind > 0">, </span>{{ rec.comune }} ({{ rec.prov }})</span>
</q-item-label> </q-item-label>

View File

@@ -41,7 +41,7 @@
<q-icon name="fas fa-lock"></q-icon></span> <q-icon name="fas fa-lock"></q-icon></span>
<span v-if="myrec.visibility.includes(shared_consts.Visibility_Group.HIDDEN)" class="q-mr-xs"> <span v-if="myrec.visibility.includes(shared_consts.Visibility_Group.HIDDEN)" class="q-mr-xs">
<q-icon name="fas fa-eye-slash"></q-icon></span> <q-icon name="fas fa-eye-slash"></q-icon></span>
<span class="text-weight-bold">{{ myrec.username }}</span> - <span class="text-weight-bold">{{ getNameToShow(myrec) }}</span> -
<span v-for="(rec, ind) of myrec.mycities" :key="ind"><span v-if="ind > 0">, </span>{{ rec.comune }}</span> <span v-for="(rec, ind) of myrec.mycities" :key="ind"><span v-if="ind > 0">, </span>{{ rec.comune }}</span>
</q-item-label> </q-item-label>

View File

@@ -21,8 +21,8 @@
outline outline
icon="fas fa-envelope" icon="fas fa-envelope"
size="md" size="md"
color="black" :color="$q.dark.isActive ? `black` : `white`"
text-color="white" :text-color="$q.dark.isActive ? `white` : `black`"
to="/signup" to="/signup"
:label="$t('reg.byemail')" :label="$t('reg.byemail')"
> >

View File

@@ -1,4 +1,4 @@
<template> ù<template>
<div> <div>
<div class="q-my-sm q-gutter-xs q-py-xs"> <div class="q-my-sm q-gutter-xs q-py-xs">
<CGridTableRec <CGridTableRec

View File

@@ -219,7 +219,7 @@ const msg_it = {
youarerefusedgroup: 'Ti è stato rifiutata la richiesta di entrare in questo Gruppo (per info chiedi all\'amministratore del gruppo)', youarerefusedgroup: 'Ti è stato rifiutata la richiesta di entrare in questo Gruppo (per info chiedi all\'amministratore del gruppo)',
youarerefusedcircuit: 'Ti è stato rifiutata la richiesta di entrare in questo Circuito (per info chiedi all\'amministratore del gruppo)', youarerefusedcircuit: 'Ti è stato rifiutata la richiesta di entrare in questo Circuito (per info chiedi all\'amministratore del gruppo)',
insertgoodorservices_to_start_circuit: 'Per poter inviare monete è necessario aggiungere almeno un Bene o Servizio, con la voglia di proporsi ed accettare i RIS come scambio.', insertgoodorservices_to_start_circuit: 'Per poter inviare monete è necessario aggiungere almeno un Bene o Servizio, con la voglia di proporsi ed accettare i RIS come scambio.',
insertgoodorservices_to_enter_circuit: 'Per poter entrare nel Circuito è necessario aggiungere almeno un Bene o Servizio, con la voglia di proporsi ed accettare i RIS come scambio.', insertgoodorservices_to_enter_circuit: 'Per poter entrare nel Circuito è necessario aggiungere almeno un Bene, Servizio o offrire Ospitalità',
deletedgroup: 'Gruppo Eliminato', deletedgroup: 'Gruppo Eliminato',
domanda_addtofriend: 'Aggiungere agli amici {username}?', domanda_addtofriend: 'Aggiungere agli amici {username}?',
domanda_addtogroup: 'Aggiungi {username} al gruppo {groupname}?', domanda_addtogroup: 'Aggiungi {username} al gruppo {groupname}?',
@@ -743,6 +743,7 @@ const msg_it = {
sendmsg_error: 'Messaggio non inviato. Riprovare più tardi', sendmsg_error: 'Messaggio non inviato. Riprovare più tardi',
sendmsg_sent: 'Messaggio Inviato', sendmsg_sent: 'Messaggio Inviato',
sendmsg_sent_sharedlink: 'Condividi il messaggio che ti è appena arrivato sulla Chat Telegram', sendmsg_sent_sharedlink: 'Condividi il messaggio che ti è appena arrivato sulla Chat Telegram',
sendmsg_sent_sharedlink_copied: 'Messaggio copiato. Ora incollalo nel messaggio da inviare.',
sendmsgs_sent: 'Messaggi Inviati', sendmsgs_sent: 'Messaggi Inviati',
err_sendmsg: 'Errore durante l\'invio del Messaggio', err_sendmsg: 'Errore durante l\'invio del Messaggio',
booking: 'Prenota Evento', booking: 'Prenota Evento',

View File

@@ -831,7 +831,7 @@ export const colmyGoods = [
name: 'note', label_trans: 'proj.descrapprof', fieldtype: costanti.FieldType.html, name: 'note', label_trans: 'proj.descrapprof', fieldtype: costanti.FieldType.html,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist, showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '', titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '',
minlength: 50, // minlength: 50,
isadvanced_field: true, isadvanced_field: true,
required: false, required: false,
}), }),

View File

@@ -427,6 +427,20 @@ export const useUserStore = defineStore('UserStore', {
return `(${username})` return `(${username})`
}, },
getNameToShow(user: IUserFields): string {
let name = ''
if (!!user.name)
name = user.name
if (!!user.surname)
name += ' ' + user.surname
if (!name) {
name = user.username
}
return name
},
getUserByUserId(userId: string): IUserFields | null { getUserByUserId(userId: string): IUserFields | null {
// Check if is this User! // Check if is this User!
if (this.my._id === userId) return this.my if (this.my._id === userId) return this.my
@@ -1239,18 +1253,29 @@ export const useUserStore = defineStore('UserStore', {
}, },
async sendMsgToBotTelegram($q: any, t: any, mydata: IMsgGlobParam, showmsgsent: boolean) { async sendMsgToBotTelegram($q: any, t: any, mydata: IMsgGlobParam, showmsgsent: boolean) {
const globalStore = useGlobalStore()
return Api.SendReq('/users/mgt', 'POST', { mydata }) return Api.SendReq('/users/mgt', 'POST', { mydata })
.then((res) => { .then((res) => {
console.log('res', res) console.log('res', res)
let msgok = (res.data.nummsgsent === 1) ? res.data.nummsgsent + ' ' + t('cal.sendmsg_sent') : res.data.nummsgsent + ' ' + t('cal.sendmsgs_sent') let msgok = (res.data.nummsgsent === 1) ? res.data.nummsgsent + ' ' + t('cal.sendmsg_sent') : res.data.nummsgsent + ' ' + t('cal.sendmsgs_sent')
if (mydata.cmd === shared_consts.MsgTeleg.SHARE_MSGREG) { if (mydata.cmd === shared_consts.MsgTeleg.SHARE_MSGREG) {
if (tools.isTelegOk()) {
msgok = t('cal.sendmsg_sent_sharedlink') + ' ' + tools.getBotName() msgok = t('cal.sendmsg_sent_sharedlink') + ' ' + tools.getBotName()
} else {
msgok = t('cal.sendmsg_sent_sharedlink_copied')
}
showmsgsent = true showmsgsent = true
} }
if (showmsgsent && res.data.nummsgsent >= 0) { if (showmsgsent && res.data.nummsgsent >= 0) {
tools.showPositiveNotif($q, msgok) tools.showPositiveNotif($q, msgok)
if (mydata.cmd === shared_consts.MsgTeleg.SHARE_MSGREG) { if (mydata.cmd === shared_consts.MsgTeleg.SHARE_MSGREG) {
if (!tools.isTelegOk()) {
// console.log('text', res.data.text)
tools.copyStringToClipboardSilent(res.data.text)
}
if (res.data.textsent) { if (res.data.textsent) {
return res.data.textsent return res.data.textsent
} }

View File

@@ -92,7 +92,7 @@
:table="card.table" :table="card.table"
:filtercustom="filtroutente" :filtercustom="filtroutente"
:butt_modif_new="isMyRecord(myuser.username)" :butt_modif_new="isMyRecord(myuser.username)"
visuinpage="true" :visuinpage="true"
/> />
</div> </div>
</div> </div>