Circuit table...
This commit is contained in:
29
src/views/user/mycircuit/mycircuit.scss
Executable file
29
src/views/user/mycircuit/mycircuit.scss
Executable file
@@ -0,0 +1,29 @@
|
||||
.profile {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
max-width: 450px;
|
||||
}
|
||||
|
||||
.myrow{
|
||||
display: flex;
|
||||
@media (max-width: 600px) {
|
||||
flex-flow: column;
|
||||
}
|
||||
}
|
||||
|
||||
.qualifica{
|
||||
border: solid 2px #4198ef;
|
||||
border-radius: 1rem;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.members, .admins, .creator, .element{
|
||||
font-weight: bold;
|
||||
vertical-align: center;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
|
||||
.title_param{
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
214
src/views/user/mycircuit/mycircuit.ts
Executable file
214
src/views/user/mycircuit/mycircuit.ts
Executable file
@@ -0,0 +1,214 @@
|
||||
import { CGridTableRec } from '@/components/CGridTableRec'
|
||||
import { CMyFriends } from '@/components/CMyFriends'
|
||||
import { CMyUser } from '@/components/CMyUser'
|
||||
import { CTitleBanner } from '@/components/CTitleBanner'
|
||||
import { CProfile } from '@/components/CProfile'
|
||||
import { CCheckIfIsLogged } from '@/components/CCheckIfIsLogged'
|
||||
import { CMyFieldRec } from '@/components/CMyFieldRec'
|
||||
import { CSkill } from '@/components/CSkill'
|
||||
import { CDateTime } from '@/components/CDateTime'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
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 { toolsext } from '@store/Modules/toolsext'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { costanti } from '@costanti'
|
||||
import { ICity, IFriends, ICircuit, ISearchList, IUserFields } from 'model'
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
import { colmyUserPeople, colmyUserCircuit } from '@store/Modules/fieldsTable'
|
||||
import { useNotifStore } from '@store/NotifStore'
|
||||
|
||||
|
||||
export default defineComponent({
|
||||
name: 'mycircuit',
|
||||
components: { CProfile, CTitleBanner, CMyFieldRec, CSkill, CDateTime, CMyFriends, CGridTableRec, CMyUser, CCheckIfIsLogged },
|
||||
props: {},
|
||||
setup() {
|
||||
const userStore = useUserStore()
|
||||
const notifStore = useNotifStore()
|
||||
const $route = useRoute()
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
|
||||
const animation = ref('fade')
|
||||
|
||||
const name = computed(() => $route.params.name ? $route.params.name.toString() : '')
|
||||
const idnotif = computed(() => $route.query.idnotif ? $route.query.idnotif.toString() : '')
|
||||
|
||||
const filtroutente = ref(<any[]>[])
|
||||
const showPic = ref(false)
|
||||
|
||||
const circuit = ref(<ICircuit|null>{})
|
||||
const mystatus = ref(<number>0)
|
||||
const users_in_circuit = ref(<IFriends[]>[])
|
||||
|
||||
const loading = ref(false)
|
||||
|
||||
const tabgrp = ref('info')
|
||||
const tabmembers = ref('all')
|
||||
const tab = ref('membri')
|
||||
|
||||
const arrfilterand: any = ref([])
|
||||
const filtercustom: any = ref([])
|
||||
const filtercustom_rich: any = ref([])
|
||||
const searchList = ref(<ISearchList[]>[])
|
||||
|
||||
const cities = ref(<ICity[]>[])
|
||||
|
||||
function profile() {
|
||||
return userStore.my.profile
|
||||
}
|
||||
|
||||
function circuitname() {
|
||||
return userStore.my.username
|
||||
}
|
||||
|
||||
async function loadCircuit() {
|
||||
// Carica il profilo di quest'utente
|
||||
if (name.value) {
|
||||
await userStore.loadCIrcuit(name.value, idnotif.value).then(({ data, status }: {data: any, status: number}) => {
|
||||
console.log('data', data)
|
||||
if (data) {
|
||||
circuit.value = data.circuit
|
||||
cities.value = data.cities
|
||||
notifStore.setAsRead(idnotif.value)
|
||||
users_in_circuit.value = data.users_in_circuit
|
||||
} else {
|
||||
circuit.value = null
|
||||
users_in_circuit.value = []
|
||||
}
|
||||
|
||||
mystatus.value = status
|
||||
|
||||
loading.value = false
|
||||
// filtroutente.value = [{ userId: userStore.my._id }]
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
watch(() => name.value, (to: any, from: any) => {
|
||||
loadCircuit()
|
||||
})
|
||||
|
||||
async function mounted() {
|
||||
loading.value = true
|
||||
await loadCircuit()
|
||||
|
||||
searchList.value = []
|
||||
filtercustom.value = [{ 'profile.mycircuits': { $elemMatch: {name: {$eq: name.value }} } } ]
|
||||
|
||||
arrfilterand.value = []
|
||||
filtercustom_rich.value = []
|
||||
//++TODO: sistemare la filtercustom ... richieste...
|
||||
}
|
||||
|
||||
function getImgGrp() {
|
||||
if (circuit.value)
|
||||
return userStore.getImgByCircuit(circuit.value)
|
||||
else
|
||||
return ''
|
||||
}
|
||||
|
||||
function checkifShow(col: string) {
|
||||
//++Todo: checkifShow Permessi !
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function extraparams() {
|
||||
let lk_tab = 'users'
|
||||
let lk_LF = 'userId'
|
||||
let lk_FF = '_id'
|
||||
let lk_as = 'user'
|
||||
let af_objId_tab = 'myId'
|
||||
|
||||
return {
|
||||
lookup1: {
|
||||
lk_tab,
|
||||
lk_LF,
|
||||
lk_FF,
|
||||
lk_as,
|
||||
af_objId_tab,
|
||||
lk_proj: {
|
||||
'username': 1,
|
||||
'profile.img': 1,
|
||||
'profile.mycircuits': 1,
|
||||
'profile.qualifica': 1,
|
||||
reported: 1,
|
||||
date_report: 1,
|
||||
username_who_report: 1,
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
function extraparams_rich() {
|
||||
return {
|
||||
querytype: shared_consts.QUERYTYPE_CIRCUIT,
|
||||
myid: circuit.value ? circuit.value._id : '',
|
||||
}
|
||||
}
|
||||
|
||||
function extraparams_refused() {
|
||||
return {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function numUsers() {
|
||||
return users_in_circuit.value ? users_in_circuit.value.length : 0
|
||||
}
|
||||
function numAdmins() {
|
||||
return (circuit.value && circuit.value.admins) ? circuit.value.admins.length : 0
|
||||
}
|
||||
function listaAdmins() {
|
||||
return (circuit.value && circuit.value.admins) ? circuit.value.admins.map((rec) => rec.username).join(', ') : ''
|
||||
}
|
||||
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
name,
|
||||
profile,
|
||||
tools,
|
||||
costanti,
|
||||
circuit,
|
||||
shared_consts,
|
||||
getImgGrp,
|
||||
checkifShow,
|
||||
|
||||
filtroutente,
|
||||
showPic,
|
||||
circuitname,
|
||||
userStore,
|
||||
t,
|
||||
animation,
|
||||
arrfilterand,
|
||||
filtercustom,
|
||||
filtercustom_rich,
|
||||
searchList,
|
||||
colmyUserPeople,
|
||||
colmyUserCircuit,
|
||||
extraparams,
|
||||
extraparams_rich,
|
||||
extraparams_refused,
|
||||
tab,
|
||||
tabgrp,
|
||||
tabmembers,
|
||||
numUsers,
|
||||
numAdmins,
|
||||
listaAdmins,
|
||||
users_in_circuit,
|
||||
loading,
|
||||
mystatus,
|
||||
cities,
|
||||
}
|
||||
}
|
||||
})
|
||||
401
src/views/user/mycircuit/mycircuit.vue
Executable file
401
src/views/user/mycircuit/mycircuit.vue
Executable file
@@ -0,0 +1,401 @@
|
||||
<template>
|
||||
|
||||
<div class="q-gutter-sm q-pa-sm q-pb-md">
|
||||
<div v-if="!circuit && !loading">
|
||||
<div v-if="mystatus === 403">
|
||||
<h3>Non hai i permessi per accedere al Gruppo.<br>
|
||||
|
||||
Occorre prima registrarsi alla App </h3>
|
||||
</div>
|
||||
<div v-else>
|
||||
<h3>Gruppo non Esistente</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
|
||||
<div v-if="!tools.isLogged()">
|
||||
<CCheckIfIsLogged></CCheckIfIsLogged>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<div v-if="circuit.longdescr" class="fit column no-wrap justify-evenly items-center content-start">
|
||||
|
||||
<div class="">
|
||||
<q-avatar size="140px">
|
||||
<q-img :src="getImgGrp()" :alt="circuitname()" img-class="imgprofile" height="140px" @click="showPic = true"/>
|
||||
</q-avatar>
|
||||
</div>
|
||||
|
||||
<div class="text-h6">
|
||||
<span v-if="checkifShow('name')"> {{ circuit.title }}</span>
|
||||
</div>
|
||||
<div v-if="circuit.title !== circuit.name" class="col-12 text-h7 text-blue text-shadow-2">
|
||||
{{ circuit.name }}
|
||||
</div>
|
||||
|
||||
<q-banner
|
||||
v-if="userStore.IsRefusedCircuitByName(circuit.name)"
|
||||
rounded
|
||||
class="bg-red text-white"
|
||||
style="text-align: center;"
|
||||
>
|
||||
<em style="font-weight: bold">{{ $t('db.youarerefusedcircuit') }}</em><br>
|
||||
</q-banner>
|
||||
|
||||
|
||||
<div>
|
||||
<q-btn
|
||||
v-if="!userStore.IsMyCircuitByName(circuit.name) && !userStore.IsAskedCircuitByName(circuit.name) && !userStore.IsRefusedCircuitByName(circuit.name)"
|
||||
icon="fas fa-user-plus"
|
||||
color="primary" :label="$t('circuits.ask_circuit')"
|
||||
@click="tools.setRequestCircuit($q, userStore.my.username, circuit.name, true)"
|
||||
/>
|
||||
<q-btn
|
||||
v-if="userStore.IsMyCircuitByName(circuit.name)"
|
||||
rounded icon="fas fa-ellipsis-h">
|
||||
<q-menu>
|
||||
<q-list v-if="true" style="min-width: 150px">
|
||||
<q-item clickable v-close-popup
|
||||
@click="tools.removeFromMyCircuits($q, userStore.my.username, circuit.name, $t('db.domanda_exit_fromcircuit', {name: circuit.name }))">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="negative" name="fas fa-user-minus"/>
|
||||
</q-item-section>
|
||||
<q-item-section>{{ $t('circuits.exit_circuit') }}</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-list v-if="tools.iAmAdminCircuit(circuit.name)" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.CIRCUITSCMD.DELETE_CIRCUIT, userStore.my.username, '', circuit.name)">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="negative" name="fas fa-trash-alt"/>
|
||||
</q-item-section>
|
||||
<q-item-section>{{ $t('circuits.delete_circuit') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
|
||||
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
v-if="userStore.IsAskedCircuitByName(circuit.name) && !userStore.IsMyCircuitByName(circuit.name)"
|
||||
icon="fas fa-user-minus"
|
||||
flat :label="$t('circuits.cancel_ask_circuit_short')"
|
||||
@click="tools.cancelReqCircuits($q, userStore.my.username, circuit.name)"
|
||||
/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-if="circuit.longdescr" class="no-wrap justify-evenly items-center content-start">
|
||||
|
||||
|
||||
<!--
|
||||
<q-btn
|
||||
v-if="tools.iAmAdminCircuit(name)" icon="fas fa-pencil-alt"
|
||||
color="blue"
|
||||
size="md"
|
||||
:label="$t('otherpages.modifgrp')"
|
||||
to="/editgrp">
|
||||
</q-btn>
|
||||
-->
|
||||
|
||||
<q-tabs v-model="tabgrp" class="text-blue">
|
||||
<q-tab :label="t('circuits.info1')" name="info" icon="fas fa-info"></q-tab>
|
||||
<q-tab v-if="!!circuit.note" :label="t('circuits.page')" name="page" icon="fas fa-file-word"></q-tab>
|
||||
<q-tab v-if="tools.iCanShowCircuitsMember(circuit) || tools.iAmAdminCircuit(name)"
|
||||
:label="t('circuits.subscribes')" name="members" icon="fas fa-users"></q-tab>
|
||||
<q-tab :label="t('circuits.circuits')" name="circuits" icon="fas fa-coins"></q-tab>
|
||||
</q-tabs>
|
||||
|
||||
<q-tab-panels v-model="tabgrp" animated>
|
||||
<q-tab-panel name="info">
|
||||
<div>
|
||||
<q-card>
|
||||
<q-card-section>
|
||||
<div class="text-h6">{{ t('circuits.info') }}</div>
|
||||
</q-card-section>
|
||||
|
||||
<q-separator/>
|
||||
|
||||
<q-card-section>
|
||||
<div class="element">
|
||||
<q-icon name="fas fa-lightbulb"></q-icon>
|
||||
{{ $t('circuits.createdby', {
|
||||
username: circuit.createdBy,
|
||||
date: tools.getstrDateYY(circuit.date_created), })
|
||||
}}
|
||||
</div>
|
||||
<div v-if="!!circuit.date_updated && circuit.date_updated !== circuit.createdBy" class="element">
|
||||
<q-icon name="fas fa-pencil-alt"></q-icon>
|
||||
{{ $t('circuits.lastmodify', {
|
||||
date: tools.getstrDateYY(circuit.date_updated), })
|
||||
}}
|
||||
</div>
|
||||
|
||||
<div v-if="circuit.visibility.includes(shared_consts.Visibility_Circuit.PRIVATE)" class="row">
|
||||
<div class="q-pa-xs">
|
||||
<q-icon name="fas fa-lock"></q-icon>
|
||||
</div>
|
||||
<div>
|
||||
<div class="title_param"> {{ $t('circuits.private') }}</div>
|
||||
{{ $t('circuits.private_descr') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="circuit.visibility.includes(shared_consts.Visibility_Circuit.HIDDEN)" class="row">
|
||||
<div class="q-pa-xs">
|
||||
<q-icon name="fas fa-eye-slash"></q-icon>
|
||||
</div>
|
||||
<div>
|
||||
<div class="title_param"> {{ $t('circuits.hidden') }}</div>
|
||||
{{ $t('circuits.hidden_descr') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="cities.length > 0" class="row">
|
||||
<div class="q-pa-xs">
|
||||
<q-icon name="fas fa-map-marker-alt"></q-icon>
|
||||
</div>
|
||||
<div>
|
||||
<div class="title_param">
|
||||
<div v-for="(city, index) of cities" :key="index">
|
||||
{{ city.comune }} ({{ city.prov }})
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="members">
|
||||
<q-icon name="fas fa-users"></q-icon>
|
||||
{{ numUsers() }} {{ numUsers() === 1 ? t('circuits.member') : t('circuits.members') }}
|
||||
</div>
|
||||
<div class="admins">
|
||||
<q-icon name="fas fa-user-cog"></q-icon>
|
||||
{{ numAdmins() }} {{ numAdmins() === 1 ? t('circuits.admin') : t('circuits.admins') }}
|
||||
</div>
|
||||
<div v-for="(user, index) of circuit.admins" :key="index">
|
||||
<CMyUser
|
||||
:mycontact="user"
|
||||
:visu="costanti.FIND_PEOPLE"
|
||||
@setCmd="tools.setCmd"
|
||||
>
|
||||
</CMyUser>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
||||
<br>
|
||||
</div>
|
||||
<q-card v-if="circuit.title">
|
||||
<q-card-section>
|
||||
<div class="text-h6">Descrizione:</div>
|
||||
</q-card-section>
|
||||
<q-separator/>
|
||||
|
||||
<q-card-section>
|
||||
<div class="col-12 text-h7">
|
||||
<span v-if="checkifShow('descr')">{{ circuit.longdescr }}</span>
|
||||
</div>
|
||||
|
||||
<div class="col-6 q-ma-xs">
|
||||
|
||||
<q-btn
|
||||
v-if="getLinkGrpTelegram()" icon="fab fa-telegram"
|
||||
color="blue" type="a"
|
||||
size="md"
|
||||
rounded
|
||||
:label="$t('msgs.telegrammsg')"
|
||||
:href="getLinkGrpTelegram()" target="__blank">
|
||||
</q-btn>
|
||||
|
||||
</div>
|
||||
<div class="col-6 q-ma-xs">
|
||||
<q-btn
|
||||
v-if="getLinkWebSite()" icon="fas fa-globe"
|
||||
color="blue" type="a"
|
||||
size="md"
|
||||
rounded
|
||||
:label="$t('reg.website')"
|
||||
:href="getLinkWebSite()" target="__blank">
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
||||
</q-tab-panel>
|
||||
|
||||
<q-tab-panel name="page">
|
||||
<div v-if="circuit.note">
|
||||
<br>
|
||||
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
||||
<div v-if="circuit.note" v-html="circuit.note">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
|
||||
<q-tab-panel name="circuits">
|
||||
Scegli il Circuito
|
||||
|
||||
circuit.circuits_list {{circuit.circuits_list}}
|
||||
|
||||
Mostra la lista dei Circuiti Esistenti
|
||||
(come la lista gruppi, in formato scheda)
|
||||
con possibilità di aggiungerli ai gruppi in cui sei Admin
|
||||
|
||||
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="members" style="max-width: 400px;" v-if="tools.iCanShowCircuitsMember(circuit)">
|
||||
|
||||
<q-tabs
|
||||
v-show="tools.iAmAdminCircuit(name)"
|
||||
v-model="tabmembers" class="text-blue">
|
||||
<q-tab label="Tutti" name="all" icon="fas fa-users"></q-tab>
|
||||
<q-tab v-if="tools.iAmAdminCircuit(name)" label="Richieste" name="rich" icon="fas fa-user-plus"></q-tab>
|
||||
<q-tab v-if="tools.iAmAdminCircuit(name)" label="Rifiutati" name="refused" icon="fas fa-user-minus"></q-tab>
|
||||
</q-tabs>
|
||||
|
||||
<q-tab-panels v-model="tabmembers" animated>
|
||||
<q-tab-panel name="all">
|
||||
|
||||
<CGridTableRec
|
||||
ref="tabMembri"
|
||||
prop_mytable="users"
|
||||
prop_mytitle=""
|
||||
:prop_mycolumns="colmyUserPeople"
|
||||
prop_colkey="_id"
|
||||
col_title="username"
|
||||
:vertical="costanti.VISUTABLE_LISTA"
|
||||
nodataLabel="Nessun Iscritto"
|
||||
:prop_search="true"
|
||||
hint="Username da trovare"
|
||||
:finder="false"
|
||||
:choose_visutype="true"
|
||||
:finder_noNull="false"
|
||||
:options="shared_consts.OPTIONS_SEARCH_USER_ALL_WORDS"
|
||||
:butt_modif_new="false"
|
||||
noresultLabel="Username non trovato"
|
||||
:arrfilters="arrfilterand"
|
||||
:filtercustom="filtercustom"
|
||||
:prop_searchList="searchList"
|
||||
:showType="costanti.SHOW_USERINFO"
|
||||
:showCol="false"
|
||||
:extrafield="name"
|
||||
:extraparams="extraparams()"
|
||||
:visufind="tools.iAmAdminCircuit(name) ? costanti.REQ_REMOVE_USER_TO_CIRCUIT : costanti.FIND_PEOPLE"
|
||||
>
|
||||
|
||||
</CGridTableRec>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="rich">
|
||||
|
||||
<CGridTableRec
|
||||
prop_mytable="mycircuits"
|
||||
prop_mytitle=""
|
||||
:prop_mycolumns="colmyUserPeople"
|
||||
prop_colkey="_id"
|
||||
col_title=""
|
||||
:vertical="costanti.VISUTABLE_USER_TABCIRCUIT"
|
||||
nodataLabel="Nessuna Richiesta in sospeso"
|
||||
:prop_search="false"
|
||||
hint="Username da trovare"
|
||||
:finder="false"
|
||||
:choose_visutype="false"
|
||||
:finder_noNull="false"
|
||||
:options="shared_consts.OPTIONS_SEARCH_USER_ALL_WORDS"
|
||||
:butt_modif_new="false"
|
||||
noresultLabel="Username non trovato"
|
||||
:arrfilters="arrfilterand"
|
||||
:filtercustom="filtercustom_rich"
|
||||
:prop_searchList="searchList"
|
||||
:showType="costanti.SHOW_USERINFO"
|
||||
keyMain=""
|
||||
:showCol="false"
|
||||
:extraparams="extraparams_rich()"
|
||||
:extrafield="name"
|
||||
:visufind="costanti.REQ_ADD_USER_TO_CIRCUIT"
|
||||
>
|
||||
|
||||
</CGridTableRec>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="refused">
|
||||
|
||||
<CGridTableRec
|
||||
prop_mytable="mycircuits"
|
||||
prop_mytitle=""
|
||||
:prop_mycolumns="colmyUserPeople"
|
||||
prop_colkey="_id"
|
||||
col_title=""
|
||||
:vertical="costanti.VISUTABLE_USER_TABCIRCUIT"
|
||||
nodataLabel="Nessun utente Rifiutato"
|
||||
:prop_search="false"
|
||||
hint="Username da trovare"
|
||||
:finder="false"
|
||||
:choose_visutype="false"
|
||||
:finder_noNull="false"
|
||||
:options="shared_consts.OPTIONS_SEARCH_USER_ALL_WORDS"
|
||||
:butt_modif_new="false"
|
||||
noresultLabel="Username non trovato"
|
||||
:arrfilters="arrfilterand"
|
||||
:filtercustom="filtercustom_rich"
|
||||
:prop_searchList="searchList"
|
||||
:showType="costanti.SHOW_USERINFO"
|
||||
keyMain=""
|
||||
:showCol="false"
|
||||
:extraparams="extraparams_refused()"
|
||||
:extrafield="name"
|
||||
:visufind="costanti.REQ_ADD_USER_TO_CIRCUIT"
|
||||
>
|
||||
|
||||
</CGridTableRec>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
|
||||
</div>
|
||||
<div v-else class="fit column no-wrap justify-evenly items-center content-start">
|
||||
<q-skeleton type="QAvatar" size="140px" height="140px" animation="fade"/>
|
||||
<q-card flat bordered style="width: 250px">
|
||||
<div class="text-h6">
|
||||
<q-skeleton :animation="animation"/>
|
||||
</div>
|
||||
<div class="col-12 text-h7 text-grey text-center">
|
||||
{{ name }}
|
||||
</div>
|
||||
<div class="col-12 text-h7">
|
||||
<q-skeleton :animation="animation"/>
|
||||
</div>
|
||||
|
||||
<div class="col-12 text-h8 q-mt-sm">
|
||||
<q-skeleton :animation="animation"/>
|
||||
</div>
|
||||
<div class="col-12 text-h8 q-mt-sm">
|
||||
<q-skeleton :animation="animation"/>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<q-dialog
|
||||
v-model="showPic"
|
||||
full-height full-width
|
||||
>
|
||||
|
||||
<img :src="getImgGrp()" :alt="name" class="full-width">
|
||||
|
||||
</q-dialog>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./mycircuit.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './mycircuit.scss';
|
||||
</style>
|
||||
|
||||
0
src/views/user/mycircuits/mycircuits.scss
Normal file
0
src/views/user/mycircuits/mycircuits.scss
Normal file
50
src/views/user/mycircuits/mycircuits.ts
Executable file
50
src/views/user/mycircuits/mycircuits.ts
Executable file
@@ -0,0 +1,50 @@
|
||||
import { CMyCircuits } from '@/components/CMyCircuits'
|
||||
import { CFinder } from '@/components/CFinder'
|
||||
import { CGridTableRec } from '@/components/CGridTableRec'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { toolsext } from '@store/Modules/toolsext'
|
||||
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 { colmyUserCircuit } from '@store/Modules/fieldsTable'
|
||||
import { costanti } from '@costanti'
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'mycircuits',
|
||||
components: { CMyCircuits, CGridTableRec, CFinder },
|
||||
props: {},
|
||||
setup() {
|
||||
const userStore = useUserStore()
|
||||
const globalStore = useGlobalStore()
|
||||
const { t } = useI18n()
|
||||
|
||||
const filter = ref(costanti.FIND_CIRCUIT)
|
||||
|
||||
const isfinishLoading = computed(() => globalStore.finishLoading)
|
||||
|
||||
function mounted() {
|
||||
|
||||
const filt_loaded = tools.getCookie(tools.COOK_SEARCH + tools.CIRCUIT_SEARCH, costanti.FIND_CIRCUIT, true)
|
||||
console.log('filt_loaded', filt_loaded)
|
||||
filter.value = filt_loaded ? filt_loaded : costanti.FIND_CIRCUIT
|
||||
}
|
||||
|
||||
watch(() => filter.value, (newval: any, oldval) => {
|
||||
tools.setCookie(tools.COOK_SEARCH + tools.CIRCUIT_SEARCH, newval)
|
||||
|
||||
})
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
filter,
|
||||
costanti,
|
||||
shared_consts,
|
||||
colmyUserCircuit,
|
||||
toolsext,
|
||||
isfinishLoading,
|
||||
}
|
||||
}
|
||||
})
|
||||
27
src/views/user/mycircuits/mycircuits.vue
Executable file
27
src/views/user/mycircuits/mycircuits.vue
Executable file
@@ -0,0 +1,27 @@
|
||||
<template>
|
||||
<div v-if="isfinishLoading" class="">
|
||||
<CMyCircuits
|
||||
v-model="filter"
|
||||
:finder="true"
|
||||
>
|
||||
|
||||
<CFinder
|
||||
:table="toolsext.TABCIRCUITS"
|
||||
:showFilterPersonal="true"
|
||||
/>
|
||||
|
||||
</CMyCircuits>
|
||||
|
||||
<div v-if="filter === costanti.CREATE_CIRCUIT">
|
||||
Nuovo Circuito:
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./mycircuits.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './mycircuits.scss';
|
||||
</style>
|
||||
|
||||
@@ -236,6 +236,14 @@
|
||||
</q-tab-panel>
|
||||
|
||||
<q-tab-panel name="circuits">
|
||||
Scegli il Circuito
|
||||
|
||||
mygrp.circuits_list {{mygrp.circuits_list}}
|
||||
|
||||
Mostra la lista dei Circuiti Esistenti
|
||||
(come la lista gruppi, in formato scheda)
|
||||
con possibilità di aggiungerli ai gruppi in cui sei Admin
|
||||
|
||||
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="members" style="max-width: 400px;" v-if="tools.iCanShowGroupsMember(mygrp)">
|
||||
|
||||
Reference in New Issue
Block a user