- aggiunto anche nei beni, servizi e ospitalità la possibilità di aggiungerli come "Gruppo"

This commit is contained in:
Surya Paolo
2025-01-14 18:34:58 +01:00
parent 37970c5c91
commit 08a089881c
23 changed files with 484 additions and 94 deletions

View File

@@ -30,7 +30,7 @@ export default defineComponent({
name: 'mygroup',
components: {
CProfile, CTitleBanner, CMyFieldRec,
CInfoAccount, CSkill, CDateTime, CMyFriends, CGridTableRec, CMyUser, CCheckIfIsLogged,
CInfoAccount, CSkill, CDateTime, CMyFriends, CGridTableRec, CMyUser, CCheckIfIsLogged,
CNotifAtTop, CSendCoins
},
props: {},
@@ -43,6 +43,11 @@ export default defineComponent({
const { t } = useI18n()
const animation = ref('fade')
const tabevents = ref('new')
const mycards = computed(() => {
return costanti.MAINCARDS.filter((rec: any) => rec.table && rec.showinprofile)
})
const groupname = computed(() => $route.params.groupname ? $route.params.groupname.toString() : '')
const idnotif = computed(() => $route.query.idnotif ? $route.query.idnotif.toString() : '')
@@ -53,6 +58,7 @@ export default defineComponent({
const showsendCoinTo = ref(false)
const tabcircuit = ref('info')
const filtro_eventi = ref(<any[]>[])
const mygrp = ref(<IMyGroup | null>{})
const mystatus = ref(<number>0)
@@ -106,7 +112,7 @@ export default defineComponent({
if (circuitslist.value) {
circuitslistOpt.value = []
for (let i = 0; i < circuitslist.value.length; i++) {
circuitslistOpt.value.push({label: circuitslist.value[i].name, value: i })
circuitslistOpt.value.push({ label: circuitslist.value[i].name, value: i })
let myc = data.mygroup.mycircuits.find((circ: IMyCircuit) => circ.circuitname === circuitslist.value[i].name)
if (myc) {
circuitslist.value[i].account = myc.account
@@ -140,6 +146,7 @@ export default defineComponent({
arrfilterand.value = []
filtercustom_rich.value = []
//++TODO: sistemare la filtercustom ... richieste...
}
@@ -213,11 +220,34 @@ export default defineComponent({
}
}
function filtroeventsgroup() {
function filtrotables(table: string, quale: string) {
let out = []
if (mygrp.value)
return [{ groupname: mygrp.value.groupname }]
else
return null
out.push({ groupname: mygrp.value.groupname })
if (table === shared_consts.TABLES_MYBACHECAS) {
let mydate = tools.addDays(tools.getDateNow(), -1)
let mydateend = tools.addDays(mydate, 180)
mydate = tools.getstrYYMMDDDate(mydate)
mydateend = tools.getstrYYMMDDDate(mydateend)
if (quale === 'new') {
filtro_eventi.value = [{ dateTimeStart: { $gte: mydate, $lte: mydateend } }]
} else {
mydate = tools.addDays(tools.getDateNow(), -365)
mydateend = tools.addDays(tools.getDateNow(), 0)
mydate = tools.getstrYYMMDDDate(mydate)
mydateend = tools.getstrYYMMDDDate(mydateend)
filtro_eventi.value = [{ dateTimeStart: { $gte: mydate, $lte: mydateend } }]
}
filtro_eventi.value.forEach((rec: any) => [
out.push({ ...rec })
])
}
return out
}
function getlinkpage() {
@@ -270,9 +300,11 @@ export default defineComponent({
tabcircuit,
circuitIndex,
circuitslistOpt,
filtroeventsgroup,
filtrotables,
getlinkpage,
showsendCoinTo,
mycards,
tabevents,
}
}
})