- Lista iscritti: aggiunto le note e il flag "Da Contattare"
This commit is contained in:
@@ -107,6 +107,7 @@ export default defineComponent({
|
||||
'profile.mygroups': 1,
|
||||
'profile.qualifica': 1,
|
||||
'profile.note': 1,
|
||||
'profile.da_contattare': 1,
|
||||
'profile.resid_province': 1,
|
||||
'mycities.reg': 1,
|
||||
}
|
||||
|
||||
@@ -204,6 +204,26 @@ export default defineComponent({
|
||||
userStore.userprofile = userprofile
|
||||
}
|
||||
|
||||
function saveDaContattare() {
|
||||
const globalStore = useGlobalStore()
|
||||
const { t } = useI18n()
|
||||
|
||||
const mydatatosave = {
|
||||
id: userStore.userprofile._id,
|
||||
table: 'users',
|
||||
fieldsvalue: { 'profile.da_contattare': userStore.userprofile.profile.da_contattare }
|
||||
}
|
||||
|
||||
globalStore.saveFieldValue(mydatatosave).then((esito) => {
|
||||
if (esito) {
|
||||
tools.showPositiveNotif($q, t('db.recupdated'))
|
||||
} else {
|
||||
tools.showNegativeNotif($q, t('db.recfailed'))
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
return {
|
||||
username,
|
||||
getlinkpage,
|
||||
@@ -249,6 +269,7 @@ export default defineComponent({
|
||||
shownote,
|
||||
mostranota,
|
||||
salvaUserProv,
|
||||
saveDaContattare,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -221,6 +221,16 @@
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="
|
||||
userStore.userprofile &&
|
||||
userStore.userprofile.profile.da_contattare &&
|
||||
(userStore.isFacilitatore || userStore.isAdmin)
|
||||
"
|
||||
class="col-12 text-h8 q-mt-sm bg-red text-white q-pa-md"
|
||||
>
|
||||
<q-icon name="fas fa-comment"></q-icon> Da Contattare
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
userStore.userprofile &&
|
||||
@@ -794,6 +804,26 @@
|
||||
:label="$t('profile.aggiungi_note')"
|
||||
@click="shownote = !shownote"
|
||||
/>
|
||||
<q-fab-action
|
||||
label-position="right"
|
||||
v-if="userStore.isFacilitatore || userStore.isAdmin"
|
||||
color="green"
|
||||
:icon="
|
||||
userStore.userprofile.profile.da_contattare
|
||||
? 'fas fa-user-slash'
|
||||
: 'fas fa-comment'
|
||||
"
|
||||
:label="
|
||||
userStore.userprofile.profile.da_contattare
|
||||
? $t('profile.togli_da_contattare')
|
||||
: $t('profile.da_contattare')
|
||||
"
|
||||
@click="
|
||||
userStore.userprofile.profile.da_contattare =
|
||||
!userStore.userprofile.profile.da_contattare;
|
||||
saveDaContattare();
|
||||
"
|
||||
/>
|
||||
</q-fab>
|
||||
</q-page-sticky>
|
||||
<q-dialog v-model="showPic" full-height full-width>
|
||||
|
||||
Reference in New Issue
Block a user