Notifiche - Tutti - non letti
This commit is contained in:
0
src/components/CNotifSettings/CNotifSettings.scss
Executable file
0
src/components/CNotifSettings/CNotifSettings.scss
Executable file
40
src/components/CNotifSettings/CNotifSettings.ts
Executable file
40
src/components/CNotifSettings/CNotifSettings.ts
Executable 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,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
46
src/components/CNotifSettings/CNotifSettings.vue
Executable file
46
src/components/CNotifSettings/CNotifSettings.vue
Executable 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>
|
||||
1
src/components/CNotifSettings/index.ts
Executable file
1
src/components/CNotifSettings/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CNotifSettings} from './CNotifSettings.vue'
|
||||
Reference in New Issue
Block a user