Notification New Group
This commit is contained in:
@@ -866,6 +866,12 @@ export const shared_consts = {
|
||||
STATUS_GROUPS_REFUSED: 4,
|
||||
},
|
||||
|
||||
GroupsNotifs: {
|
||||
STATUS_GROUPS_NEW: 1,
|
||||
STATUS_GROUPS_ACCEPTED: 2,
|
||||
STATUS_GROUPS_REFUSED: 4,
|
||||
},
|
||||
|
||||
TypeNotifs: {
|
||||
TYPEDIR_BACHECA: 1,
|
||||
ID_BACHECA_NEW_GOOD: 1,
|
||||
@@ -1007,7 +1013,7 @@ export const shared_consts = {
|
||||
directory: 3,
|
||||
},
|
||||
{
|
||||
value: 1, //
|
||||
value: 1, // STATUS_GROUPS_NEW
|
||||
labeltrans: 'notifsid.groups_new',
|
||||
directory: 4,
|
||||
},
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -1034,9 +1034,10 @@ export const useUserStore = defineStore('UserStore', {
|
||||
|
||||
},
|
||||
|
||||
async loadGroup(groupname: string) {
|
||||
async loadGroup(groupname: string, idnotif: string) {
|
||||
const data = {
|
||||
groupname
|
||||
groupname,
|
||||
idnotif,
|
||||
}
|
||||
|
||||
return Api.SendReq('/mygroup/load', 'POST', data)
|
||||
|
||||
@@ -19,6 +19,7 @@ import { costanti } from '@costanti'
|
||||
import { IFriends, IMyGroup, ISearchList, IUserFields } from 'model'
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
import { colmyUserPeople, colmyUserGroup } from '@store/Modules/fieldsTable'
|
||||
import { useNotifStore } from '@store/NotifStore'
|
||||
|
||||
|
||||
export default defineComponent({
|
||||
@@ -27,6 +28,7 @@ export default defineComponent({
|
||||
props: {},
|
||||
setup() {
|
||||
const userStore = useUserStore()
|
||||
const notifStore = useNotifStore()
|
||||
const $route = useRoute()
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
@@ -34,6 +36,7 @@ export default defineComponent({
|
||||
const animation = ref('fade')
|
||||
|
||||
const groupname = computed(() => $route.params.groupname ? $route.params.groupname.toString() : '')
|
||||
const idnotif = computed(() => $route.query.idnotif ? $route.query.idnotif.toString() : '')
|
||||
|
||||
const filtroutente = ref(<any[]>[])
|
||||
const showPic = ref(false)
|
||||
@@ -62,9 +65,10 @@ export default defineComponent({
|
||||
async function loadGroup() {
|
||||
// Carica il profilo di quest'utente
|
||||
if (groupname.value) {
|
||||
await userStore.loadGroup(groupname.value).then((ris) => {
|
||||
await userStore.loadGroup(groupname.value, idnotif.value).then((ris) => {
|
||||
if (ris) {
|
||||
mygrp.value = ris.mygroup
|
||||
notifStore.setAsRead(idnotif.value)
|
||||
users_in_group.value = ris.users_in_group
|
||||
} else {
|
||||
mygrp.value = null
|
||||
|
||||
48
yarn.lock
48
yarn.lock
@@ -3096,13 +3096,12 @@ aws4@^1.8.0:
|
||||
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59"
|
||||
integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==
|
||||
|
||||
axios@^0.27.2:
|
||||
version "0.27.2"
|
||||
resolved "https://registry.yarnpkg.com/axios/-/axios-0.27.2.tgz#207658cc8621606e586c85db4b41a750e756d972"
|
||||
integrity sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==
|
||||
axios@^0.26.0:
|
||||
version "0.26.1"
|
||||
resolved "https://registry.yarnpkg.com/axios/-/axios-0.26.1.tgz#1ede41c51fcf51bbbd6fd43669caaa4f0495aaa9"
|
||||
integrity sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==
|
||||
dependencies:
|
||||
follow-redirects "^1.14.9"
|
||||
form-data "^4.0.0"
|
||||
follow-redirects "^1.14.8"
|
||||
|
||||
babel-jest@^28.1.2:
|
||||
version "28.1.2"
|
||||
@@ -4021,7 +4020,7 @@ columnify@^1.6.0:
|
||||
strip-ansi "^6.0.1"
|
||||
wcwidth "^1.0.0"
|
||||
|
||||
combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6:
|
||||
combined-stream@^1.0.6, combined-stream@~1.0.6:
|
||||
version "1.0.8"
|
||||
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
|
||||
integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==
|
||||
@@ -4989,7 +4988,7 @@ enhanced-resolve@^5.0.0, enhanced-resolve@^5.8.3:
|
||||
graceful-fs "^4.2.4"
|
||||
tapable "^2.2.0"
|
||||
|
||||
enhanced-resolve@^5.9.3:
|
||||
enhanced-resolve@^5.10.0:
|
||||
version "5.10.0"
|
||||
resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz#0dc579c3bb2a1032e357ac45b8f3a6f3ad4fb1e6"
|
||||
integrity sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ==
|
||||
@@ -5783,7 +5782,7 @@ follow-redirects@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7"
|
||||
integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==
|
||||
|
||||
follow-redirects@^1.14.9:
|
||||
follow-redirects@^1.14.8:
|
||||
version "1.15.1"
|
||||
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.1.tgz#0ca6a452306c9b276e4d3127483e29575e207ad5"
|
||||
integrity sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==
|
||||
@@ -5822,15 +5821,6 @@ form-data-encoder@1.7.1:
|
||||
resolved "https://registry.yarnpkg.com/form-data-encoder/-/form-data-encoder-1.7.1.tgz#ac80660e4f87ee0d3d3c3638b7da8278ddb8ec96"
|
||||
integrity sha512-EFRDrsMm/kyqbTQocNvRXMLjc7Es2Vk+IQFx/YW7hkUH1eBl4J1fqiP34l74Yt0pFLCNpc06fkbVk00008mzjg==
|
||||
|
||||
form-data@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452"
|
||||
integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==
|
||||
dependencies:
|
||||
asynckit "^0.4.0"
|
||||
combined-stream "^1.0.8"
|
||||
mime-types "^2.1.12"
|
||||
|
||||
form-data@~2.3.2:
|
||||
version "2.3.3"
|
||||
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6"
|
||||
@@ -12738,6 +12728,14 @@ watchpack@^2.3.1:
|
||||
glob-to-regexp "^0.4.1"
|
||||
graceful-fs "^4.1.2"
|
||||
|
||||
watchpack@^2.4.0:
|
||||
version "2.4.0"
|
||||
resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d"
|
||||
integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==
|
||||
dependencies:
|
||||
glob-to-regexp "^0.4.1"
|
||||
graceful-fs "^4.1.2"
|
||||
|
||||
wbuf@^1.1.0, wbuf@^1.7.3:
|
||||
version "1.7.3"
|
||||
resolved "https://registry.yarnpkg.com/wbuf/-/wbuf-1.7.3.tgz#c1d8d149316d3ea852848895cb6a0bfe887b87df"
|
||||
@@ -12883,21 +12881,21 @@ webpack@^5, webpack@^5.58.1:
|
||||
watchpack "^2.3.1"
|
||||
webpack-sources "^3.2.3"
|
||||
|
||||
webpack@^5.73.0:
|
||||
version "5.73.0"
|
||||
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.73.0.tgz#bbd17738f8a53ee5760ea2f59dce7f3431d35d38"
|
||||
integrity sha512-svjudQRPPa0YiOYa2lM/Gacw0r6PvxptHj4FuEKQ2kX05ZLkjbVc5MnPs6its5j7IZljnIqSVo/OsY2X0IpHGA==
|
||||
webpack@^5.0.0:
|
||||
version "5.74.0"
|
||||
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.74.0.tgz#02a5dac19a17e0bb47093f2be67c695102a55980"
|
||||
integrity sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA==
|
||||
dependencies:
|
||||
"@types/eslint-scope" "^3.7.3"
|
||||
"@types/estree" "^0.0.51"
|
||||
"@webassemblyjs/ast" "1.11.1"
|
||||
"@webassemblyjs/wasm-edit" "1.11.1"
|
||||
"@webassemblyjs/wasm-parser" "1.11.1"
|
||||
acorn "^8.4.1"
|
||||
acorn "^8.7.1"
|
||||
acorn-import-assertions "^1.7.6"
|
||||
browserslist "^4.14.5"
|
||||
chrome-trace-event "^1.0.2"
|
||||
enhanced-resolve "^5.9.3"
|
||||
enhanced-resolve "^5.10.0"
|
||||
es-module-lexer "^0.9.0"
|
||||
eslint-scope "5.1.1"
|
||||
events "^3.2.0"
|
||||
@@ -12910,7 +12908,7 @@ webpack@^5.73.0:
|
||||
schema-utils "^3.1.0"
|
||||
tapable "^2.1.1"
|
||||
terser-webpack-plugin "^5.1.3"
|
||||
watchpack "^2.3.1"
|
||||
watchpack "^2.4.0"
|
||||
webpack-sources "^3.2.3"
|
||||
|
||||
websocket-driver@>=0.5.1, websocket-driver@^0.7.4:
|
||||
|
||||
Reference in New Issue
Block a user