Files
newfreeplanet_OLD/src/views/user/mygroups/mygroups.ts

48 lines
1.5 KiB
TypeScript
Raw Normal View History

2022-02-03 00:33:05 +01:00
import { CMyGroups } from '@/components/CMyGroups'
import { CFinder } from '@/components/CFinder'
2022-02-03 00:33:05 +01:00
import { CGridTableRec } from '@/components/CGridTableRec'
2022-09-13 12:28:33 +02:00
import { CNotifAtTop } from '@/components/CNotifAtTop'
2022-02-03 00:33:05 +01:00
import { tools } from '@store/Modules/tools'
import { toolsext } from '@store/Modules/toolsext'
2022-02-03 00:33:05 +01:00
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
import { useUserStore } from '@store/UserStore'
import { useRoute, useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useI18n } from '@/boot/i18n'
import { colmyUserGroup } from '@store/Modules/fieldsTable'
import { costanti } from '@costanti'
import { shared_consts } from '@/common/shared_vuejs'
export default defineComponent({
name: 'mygroups',
2022-09-13 12:28:33 +02:00
components: { CMyGroups, CGridTableRec, CNotifAtTop, CFinder },
2022-02-03 00:33:05 +01:00
props: {},
setup() {
const userStore = useUserStore()
const { t } = useI18n()
const filter = ref(costanti.FIND_GROUP)
function mounted() {
2022-02-04 23:48:53 +01:00
const filt_loaded = tools.getCookie(tools.COOK_SEARCH + tools.GROUP_SEARCH, costanti.FIND_GROUP, true)
console.log('filt_loaded', filt_loaded)
2022-02-03 00:33:05 +01:00
filter.value = filt_loaded ? filt_loaded : costanti.FIND_GROUP
}
watch(() => filter.value, (newval: any, oldval) => {
tools.setCookie(tools.COOK_SEARCH + tools.GROUP_SEARCH, newval)
})
onMounted(mounted)
return {
filter,
costanti,
shared_consts,
colmyUserGroup,
toolsext,
2022-02-03 00:33:05 +01:00
}
}
})