Notifications
Settings Notifications User Panel
This commit is contained in:
@@ -2,13 +2,15 @@ import { defineComponent, onMounted, PropType, ref, watch } from 'vue'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { fieldsTable } from '@store/Modules/fieldsTable'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { costanti } from '@costanti'
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
import { CMyFieldDb } from '@/components/CMyFieldDb'
|
||||
import { CDateTime } from '@/components/CDateTime'
|
||||
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { computed } from 'vue'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CNotifSettings',
|
||||
@@ -19,6 +21,9 @@ export default defineComponent({
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
const globalStore = useGlobalStore()
|
||||
const userStore = useUserStore()
|
||||
|
||||
const profile = computed(() => userStore.my.profile)
|
||||
|
||||
|
||||
function mounted() {
|
||||
@@ -34,6 +39,8 @@ export default defineComponent({
|
||||
shared_consts,
|
||||
fieldsTable,
|
||||
globalStore,
|
||||
toolsext,
|
||||
profile,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
<div class="row items-center justify-center q-gutter-md q-ma-xs">
|
||||
|
||||
<q-list bordered class="rounded-borders">
|
||||
<q-expansion-item v-for="(rec, index) in shared_consts.typeNotifs"
|
||||
<q-expansion-item v-for="(rec, index) in shared_consts.TypeNotifs_Arr"
|
||||
:key="index"
|
||||
expand-separator
|
||||
icon="perm_identity"
|
||||
:icon="rec.icon"
|
||||
:label="t(rec.labeltrans)"
|
||||
>
|
||||
<q-card>
|
||||
@@ -30,6 +30,61 @@
|
||||
:type="costanti.FieldType.binary">
|
||||
</CMyFieldDb>
|
||||
|
||||
<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)">
|
||||
<CMyFieldDb
|
||||
:title="$t('sectors.sector_general')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="notif_sectors"
|
||||
:jointable="toolsext.TABSECTORS"
|
||||
:type="costanti.FieldType.multiselect">
|
||||
</CMyFieldDb>
|
||||
<CMyFieldDb
|
||||
:title="$t('sectors.sector_goods')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="notif_sector_goods"
|
||||
:jointable="toolsext.TABSECTORGOODS"
|
||||
:type="costanti.FieldType.multiselect">
|
||||
</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)">
|
||||
<CMyFieldDb
|
||||
:title="$t('notifs.select_regions')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="notif_regions"
|
||||
:jointable="toolsext.TABREGIONS"
|
||||
:type="costanti.FieldType.multiselect">
|
||||
</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)">
|
||||
<CMyFieldDb
|
||||
:title="$t('notifs.select_provinces')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="notif_provinces"
|
||||
:jointable="toolsext.TABPROVINCE"
|
||||
:type="costanti.FieldType.multiselect">
|
||||
</CMyFieldDb>
|
||||
</div>
|
||||
|
||||
<!--<CMyFieldDb
|
||||
:title="$t('notification.cities')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="notif_cities"
|
||||
:jointable="toolsext.TABCITIES"
|
||||
:type="costanti.FieldType.multiselect_by_server">
|
||||
</CMyFieldDb>-->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-expansion-item>
|
||||
|
||||
Reference in New Issue
Block a user