Notifiche - Tutti - non letti

This commit is contained in:
Paolo Arena
2022-07-21 00:20:48 +02:00
parent 7006d62cae
commit 6ae82f14cc
41 changed files with 640 additions and 135 deletions

View File

@@ -0,0 +1,40 @@
import { defineComponent, onMounted, PropType, ref, watch } from 'vue'
import { useQuasar } from 'quasar'
import { useI18n } from '@/boot/i18n'
import { useGlobalStore } from '@store/globalStore'
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'
export default defineComponent({
name: 'CNotifSettings',
props: {
},
components: { CMyFieldDb },
setup(props, { emit }) {
const $q = useQuasar()
const { t } = useI18n()
const globalStore = useGlobalStore()
function mounted() {
//
}
onMounted(mounted)
return {
t,
tools,
costanti,
shared_consts,
fieldsTable,
globalStore,
}
},
})

View File

@@ -0,0 +1,46 @@
<template>
<div class="text-center">
<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"
:key="index"
expand-separator
icon="perm_identity"
:label="t(rec.labeltrans)"
>
<q-card>
<q-card-section>
<div>{{ t(rec.descr) }}</div>
<CMyFieldDb
title=""
table="users"
mykey="profile"
mysubkey="notifs"
:specialField="{
findsubkey: (myrec) => myrec.dir === rec.value,
paramtosetsubkey: 'value',
paramdef: rec.value,
defaultnewrec: { dir: rec.value},
}"
jointable="usernotifs"
tablesel="usernotifs"
:filter="(myrec) => myrec.directory === rec.value"
:type="costanti.FieldType.binary">
</CMyFieldDb>
</q-card-section>
</q-card>
</q-expansion-item>
</q-list>
</div>
</div>
</template>
<script lang="ts" src="./CNotifSettings.ts">
</script>
<style lang="scss" scoped>
@import './CNotifSettings.scss';
</style>

View File

@@ -0,0 +1 @@
export {default as CNotifSettings} from './CNotifSettings.vue'