Notification New Group

This commit is contained in:
paoloar77
2022-07-28 23:27:28 +02:00
parent a509eefd7e
commit 1144177168
6 changed files with 50 additions and 33 deletions

View File

@@ -30,6 +30,13 @@ export default defineComponent({
//
}
function getnotifbydir(dir: string) {
const myrec = profile.value.notifs.find((rec: any) => rec.dir === dir)
if (myrec) {
return myrec.value
}
}
onMounted(mounted)
return {
@@ -41,6 +48,7 @@ export default defineComponent({
globalStore,
toolsext,
profile,
getnotifbydir,
}
},
})

View File

@@ -10,7 +10,7 @@
:label="t(rec.labeltrans)"
>
<q-card>
<q-card-section>
<q-card-section v-if="!!rec">
<div>{{ t(rec.descr) }}</div>
<CMyFieldDb
@@ -32,7 +32,7 @@
<div v-if="rec.value === shared_consts.TypeNotifs.TYPEDIR_BACHECA">
<div
v-if="tools.isBitActive(profile.notifs.find((rec) => rec.dir === shared_consts.TypeNotifs.TYPEDIR_BACHECA).value, shared_consts.UsersNotif.NEW_ADV_SECTOR)">
v-if="tools.isBitActive(getnotifbydir(shared_consts.TypeNotifs.TYPEDIR_BACHECA), shared_consts.UsersNotif.NEW_ADV_SECTOR)">
<CMyFieldDb
:title="$t('sectors.sector_general')"
table="users"
@@ -51,7 +51,7 @@
</CMyFieldDb>
</div>
<div
v-if="tools.isBitActive(profile.notifs.find((rec) => rec.dir === shared_consts.TypeNotifs.TYPEDIR_BACHECA).value, shared_consts.UsersNotif.NEW_ADV_REGION)">
v-if="tools.isBitActive(getnotifbydir(shared_consts.TypeNotifs.TYPEDIR_BACHECA), shared_consts.UsersNotif.NEW_ADV_REGION)">
<CMyFieldDb
:title="$t('notifs.select_regions')"
table="users"
@@ -62,7 +62,7 @@
</CMyFieldDb>
</div>
<div
v-if="tools.isBitActive(profile.notifs.find((rec) => rec.dir === shared_consts.TypeNotifs.TYPEDIR_BACHECA).value, shared_consts.UsersNotif.NEW_ADV_PROVINCE)">
v-if="tools.isBitActive(getnotifbydir(shared_consts.TypeNotifs.TYPEDIR_BACHECA), shared_consts.UsersNotif.NEW_ADV_PROVINCE)">
<CMyFieldDb
:title="$t('notifs.select_provinces')"
table="users"