- fix: "Circuito RIS {nomecircuito}" uniformati tutti quanti.

- fix Strette di mano dicitura.
- poter vedere e cliccare sul gruppo telegram della provincia (dalla lista dei circuiti).
This commit is contained in:
Surya Paolo
2024-04-25 23:26:25 +02:00
parent 3fb8755287
commit 87aa9427b3
8 changed files with 216 additions and 129 deletions

View File

@@ -1907,6 +1907,7 @@ export const shared_consts = {
longdescr: 1,
regulation: 1,
numMembers: 1,
link_group: 1,
totCircolante: 1,
totTransato: 1,
systemUserId: 1,

View File

@@ -592,6 +592,9 @@ export default defineComponent({
tools.copyToClip($q, getlinkpage(), true)
await tools.sendMsgAnnuncioToTelegramCmd($q, t, props.table, myrec.value._id)
// Apri telegram sulla chat BOT RISO
tools.openUrl(tools.getLinkBotTelegram('', ''))
}
onMounted(mounted)

View File

@@ -1,5 +1,5 @@
<template>
<div v-if="tools.isUserOk() || noaut">
<div v-if="tools.isUserOk() || noaut">
<div v-if="circuit">
<q-item
:class="
@@ -11,6 +11,7 @@
<q-item-section
v-if="visu !== costanti.ENTER_TO_THE_CIRCUIT"
avatar
class="items-center"
@click="naviga(tools.getPathByTableAndRec(table, circuit))"
>
<q-avatar size="60px">
@@ -26,18 +27,28 @@
:class="
`q-ma-sm ` + ($q.dark.isActive ? `text-white` : `text-black`)
"
>{{ circuit.numMembers }}</span
>
>{{ circuit.numMembers }}</span>
<q-icon name="fas fa-users" size="xs" color="blue"></q-icon>
</div>
<div v-if="circuit.link_group" :class="` `">
<q-btn
icon="fab fa-telegram"
size="xs"
color="blue"
rounded
@click.stop.prevent="tools.openUrl(circuit.link_group)"
></q-btn>
</div>
</q-item-section>
<q-item-section :class="$q.dark.isActive ? `text-white` : `text-black`">
<q-item-label
class="text-center"
@click="naviga(tools.getPathByTableAndRec(table, circuit))"
><strong>{{ circuit.name }}</strong>
<span v-if="circuit.subname"> ({{ circuit.subname }})</span>
>
<strong>{{ circuit.name }}</strong>
<span v-if="circuit.subname">({{ circuit.subname }})</span>
</q-item-label>
<!---<q-item-label
@click="naviga(tools.getPathByTableAndRec(table, circuit))"
@@ -47,7 +58,7 @@
><em>{{ circuit.longdescr }}</em>
</q-item-label>-->
<q-item-label v-if="visu === costanti.ENTER_TO_THE_CIRCUIT" caption>
<span> Membri: {{ circuit.numMembers }}</span>
<span>Membri: {{ circuit.numMembers }}</span>
</q-item-label>
<!--<q-item-label caption lines="3">
<q-chip
@@ -91,22 +102,20 @@
v-if="
!circuit.transactionsEnabled &&
circuit.status ===
shared_consts.CIRCUIT_STATUS.FASE3_MONETA_ABILITATA
shared_consts.CIRCUIT_STATUS.FASE3_MONETA_ABILITATA
"
caption
lines="1"
>
<q-icon v-if="!circuit.transactionsEnabled" name="fas fa-lock">
</q-icon>
<span class="text-red text-weight-bold">{{
$t('circuit.transaction_suspended')
}}</span>
<q-icon v-if="!circuit.transactionsEnabled" name="fas fa-lock"></q-icon>
<span class="text-red text-weight-bold">
{{
$t('circuit.transaction_suspended')
}}
</span>
</q-item-label>
<q-item-label
@click="naviga(tools.getPathByTableAndRec(table, circuit))"
lines="1"
>
<q-item-label @click="naviga(tools.getPathByTableAndRec(table, circuit))" lines="1">
<CSaldo
v-if="tools.isUserOk() && username === myusername() && account"
:account="account"
@@ -115,8 +124,7 @@
:saldo="saldo_pend"
:valueextra="saldo_pend != saldo ? `* ` : ''"
:qtarem="qtarem"
>
</CSaldo>
></CSaldo>
</q-item-label>
<q-item-label
lines="4"
@@ -143,12 +151,12 @@
!userStore.IsMyCircuitByName(circuit.name) &&
!userStore.IsAskedCircuitByName(circuit.name) &&
!userStore.IsRefusedCircuitByName(circuit.name)
"
"
color="positive"
:label="$t('circuit.apri')"
@click="
requestToEnterCircuit = true;
groupnameSel = null;
requestToEnterCircuit = true;
groupnameSel = null;
"
/>
</template>
@@ -157,10 +165,7 @@
</q-item-label>
</q-item-section>
<q-item-section
side
v-if="visu === costanti.USER_CIRCUITS && tools.isUserOk()"
>
<q-item-section side v-if="visu === costanti.USER_CIRCUITS && tools.isUserOk()">
<q-item-label>
<q-btn
rounded
@@ -216,9 +221,11 @@
)
"
>
<q-item-section>{{
$t('shared.refuse_ask')
}}</q-item-section>
<q-item-section>
{{
$t('shared.refuse_ask')
}}
</q-item-section>
</q-item>
<q-item
clickable
@@ -233,9 +240,11 @@
)
"
>
<q-item-section>{{
$t('shared.cancel_ask')
}}</q-item-section>
<q-item-section>
{{
$t('shared.cancel_ask')
}}
</q-item-section>
</q-item>
</q-list>
<q-list
@@ -258,10 +267,7 @@
<q-item-section>{{ $t('circuit.exit') }}</q-item-section>
</q-item>
</q-list>
<q-list
v-if="userStore.isAdmin"
style="min-width: 200px"
>
<q-list v-if="userStore.isAdmin" style="min-width: 200px">
<q-item
clickable
v-close-popup
@@ -282,10 +288,7 @@
</q-btn>
</q-item-label>
</q-item-section>
<q-item-section
side
v-if="visu === costanti.REQ_CIRCUIT && tools.isUserOk()"
>
<q-item-section side v-if="visu === costanti.REQ_CIRCUIT && tools.isUserOk()">
<q-item-label>
<q-btn rounded icon="fas fa-ellipsis-h">
<q-menu>
@@ -305,19 +308,18 @@
)
"
>
<q-item-section>{{
$t('circuit.reject_ask')
}}</q-item-section>
<q-item-section>
{{
$t('circuit.reject_ask')
}}
</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</q-item-label>
</q-item-section>
<q-item-section
side
v-if="visu === costanti.ASK_SENT_CIRCUIT && tools.isUserOk()"
>
<q-item-section side v-if="visu === costanti.ASK_SENT_CIRCUIT && tools.isUserOk()">
<q-item-label>
<q-btn rounded icon="fas fa-ellipsis-h">
<q-menu>
@@ -337,9 +339,11 @@
)
"
>
<q-item-section>{{
$t('shared.refuse_ask')
}}</q-item-section>
<q-item-section>
{{
$t('shared.refuse_ask')
}}
</q-item-section>
</q-item>
<q-item
clickable
@@ -356,9 +360,11 @@
)
"
>
<q-item-section>{{
$t('shared.cancel_ask')
}}</q-item-section>
<q-item-section>
{{
$t('shared.cancel_ask')
}}
</q-item-section>
</q-item>
</q-list>
</q-menu>
@@ -367,10 +373,7 @@
</q-item-section>
</q-item>
<div
class="centermydiv text-center"
v-if="visu === costanti.ENTER_TO_THE_CIRCUIT"
>
<div class="centermydiv text-center" v-if="visu === costanti.ENTER_TO_THE_CIRCUIT">
<q-btn
v-if="
!userStore.IsMyCircuitByName(circuit.name) &&
@@ -382,15 +385,11 @@
:label="$t('circuit.ask')"
rounded
@click="
requestToEnterCircuit = true;
groupnameSel = null;
requestToEnterCircuit = true;
groupnameSel = null;
"
/>
<q-btn
v-if="userStore.IsMyCircuitByName(circuit.name)"
rounded
icon="fas fa-ellipsis-h"
>
<q-btn v-if="userStore.IsMyCircuitByName(circuit.name)" rounded icon="fas fa-ellipsis-h">
<q-menu>
<q-list v-if="true" style="min-width: 150px">
<q-item
@@ -398,8 +397,8 @@
v-close-popup
v-if="true"
@click="(saldo !== 0) ?
tools.showPositiveNotif($q, t('circuit.per_uscire_dal_circuito_occorre_essere_a_zero'), 30000) :
tools.removeFromMyCircuits(
tools.showNegativeNotif($q, t('circuit.per_uscire_dal_circuito_occorre_essere_a_zero'), 30000) :
tools.removeFromMyCircuits(
$q,
userStore.my.username,
circuit.name,
@@ -413,15 +412,14 @@
<q-item-section avatar>
<q-icon color="negative" name="fas fa-user-minus" />
</q-item-section>
<q-item-section>{{
$t('circuit.exit_circuit')
}}</q-item-section>
<q-item-section>
{{
$t('circuit.exit_circuit')
}}
</q-item-section>
</q-item>
<q-list
v-if="userStore.isAdmin"
style="min-width: 200px"
>
<q-list v-if="userStore.isAdmin" style="min-width: 200px">
<q-item
clickable
v-close-popup
@@ -481,12 +479,8 @@
</q-card-section>
<q-card-section class="inset-shadow">
<div style="font-weight: bold; font-size: 1.25rem">Regolamento:</div>
<q-btn label="vedi Regolamento" @click="showrules = !showrules">
</q-btn>
<div
v-if="showrules"
v-html="getRegulation(circuit.regulation)"
></div>
<q-btn label="vedi Regolamento" @click="showrules = !showrules"></q-btn>
<div v-if="showrules" v-html="getRegulation(circuit.regulation)"></div>
</q-card-section>
<q-card-actions align="center">
<q-btn
@@ -495,22 +489,17 @@
color="positive"
:label="$t('circuit.acceptregulation')"
@click="
requestToEnterCircuit = false;
tools.setRequestCircuit(
$q,
userStore.my.username,
circuit.name,
true,
groupnameSel ? groupnameSel.groupname : ''
);
requestToEnterCircuit = false;
tools.setRequestCircuit(
$q,
userStore.my.username,
circuit.name,
true,
groupnameSel ? groupnameSel.groupname : ''
);
"
/>
<q-btn
outline
:label="$t('dialog.cancel')"
icon="close"
v-close-popup
></q-btn>
<q-btn outline :label="$t('dialog.cancel')" icon="close" v-close-popup></q-btn>
</q-card-actions>
</q-card>
</q-dialog>
@@ -524,5 +513,5 @@
</script>
<style lang="scss" scoped>
@import './CMyCircuit.scss';
@import "./CMyCircuit.scss";
</style>

View File

@@ -112,7 +112,7 @@ export default defineComponent({
if (!globalStore.isPresenteCardsByProv(strProv.value)) {
if (contact.value && contact.value.profile.resid_card) {
contact.value.profile.resid_card = ''
}
}
}
})
@@ -133,7 +133,7 @@ export default defineComponent({
title: t('tutorial.step_residence_title'),
extratitle: function () { return ': ' + contact.value!.profile.resid_province },
label: t('tutorial.step_residence'),
checkOk: function (): boolean { return contact.value ? contact.value.profile.resid_province !== '' : false },
checkOk: function (): boolean { return contact.value ? contact.value.profile.resid_province !== '' && contact.value.profile.resid_province !== '0' : false },
checkOkReal: function (): boolean { return this.checkOk() },
icon: 'house',
required: true,
@@ -297,6 +297,8 @@ export default defineComponent({
for (const mystep of arrStep.value) {
if (mystep.checkOk())
num++
else
break
}
return num
})
@@ -336,6 +338,10 @@ export default defineComponent({
username.value = props.mycontact.username
}
}
if (contact.value && contact.value.profile && contact.value.profile.resid_province === '0') {
contact.value.profile.resid_province = ''
}
mylistcircuits.value = circuitStore.getCircuitsNameByProvince(strProv.value)
mycircuit.value = circuitStore.getCircuitByProvinceAndCard(strProv.value, card.value)
@@ -410,7 +416,7 @@ export default defineComponent({
function getindstepByStep(step: number) {
for (let indstep = 0; indstep < arrStep.value.length; indstep++) {
if (arrStep.value[indstep].step === step)
return indstep
return indstep
}
return -1
}
@@ -572,6 +578,7 @@ export default defineComponent({
userstoverify,
numStepCompleted,
globalStore,
prStep,
}
},
})

View File

@@ -1,43 +1,115 @@
<template>
<div class="q-py-xs centermydiv cardrec"
:style="`max-width: `+ (tools.getwidth($q) - 20) +`px; ` + ($q.screen.lt.sm ? (`min-width: `+ (tools.getwidth($q) - 20) +`px;`) : ``)">
<q-item v-if="circuit" clickable v-ripple :class="`shadow-2 q-btn--rounded ` + ($q.dark.isActive ? `bg-black`: `bg-teal-1`)">
<q-item-section v-if="circuit.photos" avatar
@click="cmdExt(costanti.CMD_OPEN_PAGE, circuit)">
<div
class="q-py-xs centermydiv cardrec"
:style="
`max-width: ` +
(tools.getwidth($q) - 20) +
`px; ` +
($q.screen.lt.sm ? `min-width: ` + (tools.getwidth($q) - 20) + `px;` : ``)
"
>
<q-item
v-if="circuit"
clickable
v-ripple
:class="
`shadow-2 q-btn--rounded ` +
($q.dark.isActive ? `bg-black` : `bg-teal-1`)
"
>
<q-item-section
v-if="circuit.photos"
avatar
class="items-center"
@click="cmdExt(costanti.CMD_OPEN_PAGE, circuit)"
>
<q-avatar size="60px">
<q-img :src="userStore.getImgByCircuit(circuit)" :alt="circuit.descr"
img-class="imgprofile" height="60px"/>
<q-img
:src="userStore.getImgByCircuit(circuit)"
:alt="circuit.descr"
img-class="imgprofile"
height="60px"
/>
</q-avatar>
<q-chip class="glossy" icon-right="fas fa-users" text-color="blue"><span style="font-size: 1rem;" class="q-mr-xs">{{circuit.numMembers}}</span></q-chip>
<q-chip class="glossy" icon-right="fas fa-users" text-color="blue"
><span style="font-size: 1rem" class="q-mr-xs">{{
circuit.numMembers
}}</span></q-chip
>
<span v-if="circuit.link_group" :class="` `">
<q-btn
icon="fab fa-telegram"
size="xs"
color="blue"
rounded
@click.stop.prevent="tools.openUrl(circuit.link_group)"
></q-btn>
</span>
</q-item-section>
<q-item-section @click="cmdExt(costanti.CMD_OPEN_PAGE, circuit)">
<q-item-label @click="naviga(tools.getPathByTableAndRec(table, circuit))"><strong>{{ circuit.name }}</strong> <span v-if="circuit.subname"> ({{ circuit.subname }})</span>
<q-item-label
@click="naviga(tools.getPathByTableAndRec(table, circuit))"
><strong>{{ circuit.name }}</strong>
<span v-if="circuit.subname"> ({{ circuit.subname }})</span>
</q-item-label>
<q-item-label @click="naviga(tools.getPathByTableAndRec(table, circuit))" v-if="circuit.longdescr" caption lines="3"><em>{{ circuit.longdescr }}</em></q-item-label>
<q-item-label caption lines="2">
<q-item-label
@click="naviga(tools.getPathByTableAndRec(table, circuit))"
v-if="circuit.longdescr"
caption
lines="3"
><em>{{ circuit.longdescr }}</em></q-item-label
>
<q-item-label caption lines="2">
<q-chip
v-if="circuit.status !== undefined && circuit.status !== 0" :color="circuitStore.getColorCircuitClass(circuit)"
v-if="circuit.status !== undefined && circuit.status !== 0"
:color="circuitStore.getColorCircuitClass(circuit)"
text-color="white"
size="sm"
:icon="globalStore.getValueByTableSingle('statuscircuit', circuit.status, 'icon')">{{ globalStore.getValueByTableSingle('statuscircuit', circuit.status) }}
:icon="
globalStore.getValueByTableSingle(
'statuscircuit',
circuit.status,
'icon'
)
"
>{{
globalStore.getValueByTableSingle('statuscircuit', circuit.status)
}}
<q-btn
class="q-ml-sm"
icon="fas fa-info" color="primary" text-color="white"
icon="fas fa-info"
color="primary"
text-color="white"
size="xs"
round
@click="showingtooltip = !showingtooltip">
<q-tooltip :offset="[10, 10]" v-model="showingtooltip">{{globalStore.getValueByTableSingle('statuscircuit', circuit.status, 'hint')}}</q-tooltip>
@click="showingtooltip = !showingtooltip"
>
<q-tooltip :offset="[10, 10]" v-model="showingtooltip">{{
globalStore.getValueByTableSingle(
'statuscircuit',
circuit.status,
'hint'
)
}}</q-tooltip>
</q-btn>
</q-chip>
</q-item-label>
<q-item-label v-if="(!circuit.transactionsEnabled) && (circuit.status === shared_consts.CIRCUIT_STATUS.FASE3_MONETA_ABILITATA)" caption lines="1">
<q-item-label
v-if="
!circuit.transactionsEnabled &&
circuit.status ===
shared_consts.CIRCUIT_STATUS.FASE3_MONETA_ABILITATA
"
caption
lines="1"
>
<q-icon v-if="!circuit.transactionsEnabled" name="fas fa-lock">
</q-icon>
<span class="text-red text-weight-bold">{{ $t('circuit.transaction_suspended') }}</span>
<span class="text-red text-weight-bold">{{
$t('circuit.transaction_suspended')
}}</span>
</q-item-label>
<!--
@@ -51,25 +123,31 @@
<q-item-label lines="3" v-if="circuit.longdescr">{{ circuit.longdescr }}<br>
</q-item-label>
-->
</q-item-section>
<q-item-section side v-if="tools.canModifyThisRec(circuit, table)">
<q-item-label>
<q-btn rounded dense icon="fas fa-pencil-alt">
<q-menu>
<q-list style="min-width: 150px">
<q-item clickable v-close-popup
@click="cmdExt(costanti.CMD_MODIFY, circuit._id)">
<q-item
clickable
v-close-popup
@click="cmdExt(costanti.CMD_MODIFY, circuit._id)"
>
<q-item-section side>
<q-icon name="fas fa-pencil-alt"/>
<q-icon name="fas fa-pencil-alt" />
</q-item-section>
<q-item-section>{{ $t('reg.edit') }}</q-item-section>
</q-item>
</q-list>
<q-list style="min-width: 150px">
<q-item clickable v-close-popup @click="cmdExt(costanti.CMD_DELETE, circuit._id)">
<q-item
clickable
v-close-popup
@click="cmdExt(costanti.CMD_DELETE, circuit._id)"
>
<q-item-section side>
<q-icon name="fas fa-trash-alt"/>
<q-icon name="fas fa-trash-alt" />
</q-item-section>
<q-item-section>{{ $t('reg.elimina') }}</q-item-section>
</q-item>
@@ -78,11 +156,9 @@
</q-btn>
</q-item-label>
</q-item-section>
</q-item>
<q-separator inset="item"/>
<q-separator inset="item" />
</div>
</template>
<script lang="ts" src="./CMyRecCircuitCard.ts">

File diff suppressed because one or more lines are too long

View File

@@ -96,7 +96,7 @@ tools.setRequestCircuit(
v-close-popup
v-if="true"
@click="(saldo !== 0) ?
tools.showPositiveNotif($q, t('circuit.per_uscire_dal_circuito_occorre_essere_a_zero'), 30000) :
tools.showNegativeNotif($q, t('circuit.per_uscire_dal_circuito_occorre_essere_a_zero'), 30000) :
tools.removeFromMyCircuits(
$q,
userStore.my.username,

View File

@@ -643,6 +643,17 @@
:showBtnActivities="true"
:sendRIS="tools.isUserOk() ? sendRIS : false"
/>
<div class="row text-center">
<q-btn
v-if="userStore.userprofile.username === myusername()"
outline
icon="fas fa-pencil-alt"
:label="$t('shared.edit_profile')"
@click.stop="gotoPage('/editprofile')"
>
</q-btn>
</div>
</div>
<div