Lista Richieste e Rifiutati dei Conti Collettivi
This commit is contained in:
@@ -64,6 +64,8 @@ export const shared_consts = {
|
|||||||
QUERYTYPE_REFUSED_USER_CIRCUIT: 12,
|
QUERYTYPE_REFUSED_USER_CIRCUIT: 12,
|
||||||
QUERYTYPE_LIST_MOVEMENTS: 15,
|
QUERYTYPE_LIST_MOVEMENTS: 15,
|
||||||
QUERYTYPE_LIST_ALLMOVEMENTS: 16,
|
QUERYTYPE_LIST_ALLMOVEMENTS: 16,
|
||||||
|
QUERYTYPE_GROUP_CIRCUIT: 20,
|
||||||
|
QUERYTYPE_REFUSED_GROUP_CIRCUIT: 22,
|
||||||
|
|
||||||
FILTER_EXTRALIST_NOT_REGISTERED: 1,
|
FILTER_EXTRALIST_NOT_REGISTERED: 1,
|
||||||
FILTER_EXTRALIST_NOT_CONTACTED: 2,
|
FILTER_EXTRALIST_NOT_CONTACTED: 2,
|
||||||
|
|||||||
@@ -435,7 +435,7 @@
|
|||||||
:circuitname="circuitname"
|
:circuitname="circuitname"
|
||||||
:finder="false"
|
:finder="false"
|
||||||
:mygrp="row"
|
:mygrp="row"
|
||||||
:visu="costanti.FIND_GROUP"
|
:visu="visufind ? visufind : costanti.FIND_GROUP"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -461,6 +461,60 @@
|
|||||||
</q-menu>
|
</q-menu>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
|
<q-item-label v-else-if="visu === costanti.REQ_ADD_GROUP_TO_CIRCUIT">
|
||||||
|
<q-btn 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.addGroupToMyCircuits($q, grp.groupname, circuitname)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<q-item-section avatar>
|
||||||
|
<q-icon color="positive" name="fas fa-user-plus" />
|
||||||
|
</q-item-section>
|
||||||
|
<q-item-section>
|
||||||
|
{{ $t('circuit.accept') }}
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</q-list>
|
||||||
|
<q-list style="min-width: 200px">
|
||||||
|
<q-item
|
||||||
|
clickable
|
||||||
|
v-close-popup
|
||||||
|
@click="
|
||||||
|
tools.refuseReqCircuit($q, myusername(), circuitname, grp.groupname)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<q-item-section avatar>
|
||||||
|
<q-icon color="negative" name="fas fa-user-minus" />
|
||||||
|
</q-item-section>
|
||||||
|
|
||||||
|
<q-item-section>{{
|
||||||
|
$t('shared.refuse_ask')
|
||||||
|
}}</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
<q-item
|
||||||
|
clickable
|
||||||
|
v-close-popup
|
||||||
|
@click="
|
||||||
|
tools.cancelReqCircuit($q, myusername(), circuitname, grp.groupname)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<q-item-section avatar>
|
||||||
|
<q-icon color="negative" name="fas fa-user-minus" />
|
||||||
|
</q-item-section>
|
||||||
|
|
||||||
|
<q-item-section>{{
|
||||||
|
$t('shared.cancel_ask_short')
|
||||||
|
}}</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</q-list>
|
||||||
|
</q-menu>
|
||||||
|
</q-btn>
|
||||||
|
</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -232,6 +232,7 @@ const msg_it = {
|
|||||||
both_fiducia: 'Fiducia reciproca tra te e {username}',
|
both_fiducia: 'Fiducia reciproca tra te e {username}',
|
||||||
domanda_addtogroup: 'Aggiungi {username} al gruppo {groupname}?',
|
domanda_addtogroup: 'Aggiungi {username} al gruppo {groupname}?',
|
||||||
domanda_addtocircuit: 'Aggiungi {username} al Circuito {circuitname}?',
|
domanda_addtocircuit: 'Aggiungi {username} al Circuito {circuitname}?',
|
||||||
|
domanda_addgrouptocircuit: 'Aggiungi il Conto Collettivo {groupname} al Circuito {circuitname}?',
|
||||||
addedfriend: 'Aggiunto alla lista di Amici',
|
addedfriend: 'Aggiunto alla lista di Amici',
|
||||||
addedhandshake: 'Aggiunto alla lista Strette di Mano',
|
addedhandshake: 'Aggiunto alla lista Strette di Mano',
|
||||||
addedgroup: 'Aggiunto al Gruppo',
|
addedgroup: 'Aggiunto al Gruppo',
|
||||||
|
|||||||
@@ -277,6 +277,8 @@ export const costanti = {
|
|||||||
REQ_REMOVE_USER_TO_GROUP: 101,
|
REQ_REMOVE_USER_TO_GROUP: 101,
|
||||||
REQ_ADD_USER_TO_CIRCUIT: 110,
|
REQ_ADD_USER_TO_CIRCUIT: 110,
|
||||||
REQ_REMOVE_USER_TO_CIRCUIT: 111,
|
REQ_REMOVE_USER_TO_CIRCUIT: 111,
|
||||||
|
REQ_ADD_GROUP_TO_CIRCUIT: 120,
|
||||||
|
REQ_REMOVE_GROUP_TO_CIRCUIT: 121,
|
||||||
|
|
||||||
FILTER_NESSUNO: 0,
|
FILTER_NESSUNO: 0,
|
||||||
FILTER_TUTTI: -100,
|
FILTER_TUTTI: -100,
|
||||||
|
|||||||
@@ -5632,6 +5632,38 @@ export const tools = {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
addGroupToMyCircuits($q: any, groupname: string, circuitname: string) {
|
||||||
|
|
||||||
|
const userStore = useUserStore()
|
||||||
|
const notifStore = useNotifStore()
|
||||||
|
$q.dialog({
|
||||||
|
message: t('db.domanda_addgrouptocircuit', { groupname, circuitname }),
|
||||||
|
ok: { label: t('dialog.yes'), push: true },
|
||||||
|
cancel: { label: t('dialog.cancel') },
|
||||||
|
title: t('db.domanda')
|
||||||
|
}).onOk(() => {
|
||||||
|
|
||||||
|
let extrarec = {
|
||||||
|
groupname,
|
||||||
|
}
|
||||||
|
|
||||||
|
userStore.setCircuitCmd($q, t, userStore.my.username, circuitname, shared_consts.CIRCUITCMD.SET, true, extrarec)
|
||||||
|
.then((res: any) => {
|
||||||
|
if (res && res.result) {
|
||||||
|
this.updateMyData(res)
|
||||||
|
notifStore.updateNotification = true
|
||||||
|
if (res.circuit) {
|
||||||
|
if (userStore.my.profile.mycircuits)
|
||||||
|
userStore.my.profile.mycircuits = [...userStore.my.profile.mycircuits, res.circuit]
|
||||||
|
else
|
||||||
|
userStore.my.profile.mycircuits = [res]
|
||||||
|
}
|
||||||
|
tools.showPositiveNotif($q, t('db.addedcircuit', { circuitname }))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
addToMyGroups($q: any, username: string, groupnameDest: string) {
|
addToMyGroups($q: any, username: string, groupnameDest: string) {
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import { CNotifAtTop } from '@src/components/CNotifAtTop'
|
|||||||
import { costanti } from '@costanti'
|
import { costanti } from '@costanti'
|
||||||
import { ICity, IFriends, ICircuit, ISearchList, IUserFields, IAccount, IMyGroup } from 'model'
|
import { ICity, IFriends, ICircuit, ISearchList, IUserFields, IAccount, IMyGroup } from 'model'
|
||||||
import { shared_consts } from '@/common/shared_vuejs'
|
import { shared_consts } from '@/common/shared_vuejs'
|
||||||
import { colmyUserPeople, colmyUserPeopleSaldi, colmyUserCircuit, colmyMovement, colmyMovementTable } from '@store/Modules/fieldsTable'
|
import { colmyUserPeople, colmyUserPeopleSaldi, colmyUserCircuit, colmyMovement, colmyMovementTable, colmyUserGroup } from '@store/Modules/fieldsTable'
|
||||||
import { useNotifStore } from '@store/NotifStore'
|
import { useNotifStore } from '@store/NotifStore'
|
||||||
import { useCircuitStore } from '@store/CircuitStore'
|
import { useCircuitStore } from '@store/CircuitStore'
|
||||||
|
|
||||||
@@ -368,6 +368,13 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function extraparams_rich_groups() {
|
||||||
|
return {
|
||||||
|
querytype: shared_consts.QUERYTYPE_GROUP_CIRCUIT,
|
||||||
|
myid: circuit.value ? circuit.value._id : '',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const extraparams_movs = (() => {
|
const extraparams_movs = (() => {
|
||||||
if (showonlymine.value) {
|
if (showonlymine.value) {
|
||||||
return {
|
return {
|
||||||
@@ -390,6 +397,12 @@ export default defineComponent({
|
|||||||
myid: circuit.value ? circuit.value._id : '',
|
myid: circuit.value ? circuit.value._id : '',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function extraparams_refused_groups() {
|
||||||
|
return {
|
||||||
|
querytype: shared_consts.QUERYTYPE_REFUSED_GROUP_CIRCUIT,
|
||||||
|
myid: circuit.value ? circuit.value._id : '',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function numUsers() {
|
function numUsers() {
|
||||||
return users_in_circuit.value ? users_in_circuit.value.length : 0
|
return users_in_circuit.value ? users_in_circuit.value.length : 0
|
||||||
@@ -431,6 +444,7 @@ export default defineComponent({
|
|||||||
colmyUserPeople,
|
colmyUserPeople,
|
||||||
colmyUserPeopleSaldi,
|
colmyUserPeopleSaldi,
|
||||||
colmyUserCircuit,
|
colmyUserCircuit,
|
||||||
|
colmyUserGroup,
|
||||||
extraparams,
|
extraparams,
|
||||||
extraparams_rich,
|
extraparams_rich,
|
||||||
extraparams_refused,
|
extraparams_refused,
|
||||||
@@ -460,6 +474,8 @@ export default defineComponent({
|
|||||||
showsendCoinTo,
|
showsendCoinTo,
|
||||||
showrules,
|
showrules,
|
||||||
loadCircuit,
|
loadCircuit,
|
||||||
|
extraparams_rich_groups,
|
||||||
|
extraparams_refused_groups,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -220,9 +220,7 @@
|
|||||||
icon="fas fa-user-friends"
|
icon="fas fa-user-friends"
|
||||||
></q-tab>
|
></q-tab>
|
||||||
<q-tab
|
<q-tab
|
||||||
v-if="
|
v-if="costanti.ENABLE_CONTI_COLLETTIVI"
|
||||||
costanti.ENABLE_CONTI_COLLETTIVI
|
|
||||||
"
|
|
||||||
:label="t('circuit.conticollettivi')"
|
:label="t('circuit.conticollettivi')"
|
||||||
name="gruppicollettivi"
|
name="gruppicollettivi"
|
||||||
icon="fas fa-users"
|
icon="fas fa-users"
|
||||||
@@ -242,7 +240,33 @@
|
|||||||
</q-tabs>
|
</q-tabs>
|
||||||
|
|
||||||
<q-tab-panels v-model="tabcircuit" animated>
|
<q-tab-panels v-model="tabcircuit" animated>
|
||||||
<q-tab-panel name="gruppicollettivi">
|
<q-tab-panel
|
||||||
|
name="gruppicollettivi"
|
||||||
|
style="max-width: 500px"
|
||||||
|
v-if="tools.iCanShowCircuitsMember(circuit)"
|
||||||
|
>
|
||||||
|
<q-tabs
|
||||||
|
v-show="tools.iAmAdminCircuit(circuit.name)"
|
||||||
|
v-model="tabmembers"
|
||||||
|
class="text-blue"
|
||||||
|
>
|
||||||
|
<q-tab label="Iscritti" name="all" icon="fas fa-users"></q-tab>
|
||||||
|
<q-tab
|
||||||
|
v-if="tools.iAmAdminCircuit(circuit.name)"
|
||||||
|
label="Richieste"
|
||||||
|
name="rich"
|
||||||
|
icon="fas fa-user-plus"
|
||||||
|
></q-tab>
|
||||||
|
<q-tab
|
||||||
|
v-if="tools.iAmAdminCircuit(circuit.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">
|
||||||
<div class="row justify-center">
|
<div class="row justify-center">
|
||||||
<q-btn rounded icon="fas fa-user-plus" class="text-center">
|
<q-btn rounded icon="fas fa-user-plus" class="text-center">
|
||||||
<q-menu>
|
<q-menu>
|
||||||
@@ -252,10 +276,14 @@
|
|||||||
:key="ind"
|
:key="ind"
|
||||||
class="q-pa-sm"
|
class="q-pa-sm"
|
||||||
>
|
>
|
||||||
<q-item v-if="!userStore.IsMyCircuitByNameAndGroup(
|
<q-item
|
||||||
|
v-if="
|
||||||
|
!userStore.IsMyCircuitByNameAndGroup(
|
||||||
circuit.name,
|
circuit.name,
|
||||||
group.groupname
|
group.groupname
|
||||||
)">
|
)
|
||||||
|
"
|
||||||
|
>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="
|
v-if="
|
||||||
@@ -365,6 +393,68 @@
|
|||||||
>
|
>
|
||||||
</CGridTableRec>
|
</CGridTableRec>
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
|
<q-tab-panel name="rich">
|
||||||
|
<CGridTableRec
|
||||||
|
v-if="!loading"
|
||||||
|
prop_mytable="circuits"
|
||||||
|
prop_mytitle=""
|
||||||
|
:prop_mycolumns="colmyUserGroup"
|
||||||
|
prop_colkey="_id"
|
||||||
|
col_title=""
|
||||||
|
:vertical="costanti.VISUTABLE_GROUP_CIRCUIT"
|
||||||
|
nodataLabel="Nessuna Richiesta Collettiva 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="Gruppo non trovato"
|
||||||
|
:arrfilters="arrfilterand"
|
||||||
|
:filterextra2="filterextra2"
|
||||||
|
:filtercustom="filtercustom_rich"
|
||||||
|
:prop_searchList="searchList"
|
||||||
|
:showType="costanti.SHOW_GROUPINFO"
|
||||||
|
:showCol="false"
|
||||||
|
:extraparams="extraparams_rich_groups()"
|
||||||
|
:circuitname="circuit.name"
|
||||||
|
:visufind="costanti.REQ_ADD_GROUP_TO_CIRCUIT"
|
||||||
|
>
|
||||||
|
</CGridTableRec>
|
||||||
|
</q-tab-panel>
|
||||||
|
<q-tab-panel name="refused">
|
||||||
|
<CGridTableRec
|
||||||
|
v-if="!loading"
|
||||||
|
prop_mytable="circuits"
|
||||||
|
prop_mytitle=""
|
||||||
|
:prop_mycolumns="colmyUserGroup"
|
||||||
|
prop_colkey="_id"
|
||||||
|
col_title=""
|
||||||
|
:vertical="costanti.VISUTABLE_GROUP_CIRCUIT"
|
||||||
|
nodataLabel="Nessun Conto Collettivo Rifiutato"
|
||||||
|
:prop_search="false"
|
||||||
|
hint="Gruppo da trovare"
|
||||||
|
:finder="false"
|
||||||
|
:choose_visutype="false"
|
||||||
|
:finder_noNull="false"
|
||||||
|
:options="shared_consts.OPTIONS_SEARCH_USER_ALL_WORDS"
|
||||||
|
:butt_modif_new="false"
|
||||||
|
noresultLabel="Conto Collettivo non trovato"
|
||||||
|
:arrfilters="arrfilterand"
|
||||||
|
:filtercustom="filtercustom_rich"
|
||||||
|
:filterextra2="filterextra2"
|
||||||
|
:prop_searchList="searchList"
|
||||||
|
:showType="costanti.SHOW_GROUPINFO"
|
||||||
|
:showCol="false"
|
||||||
|
:extraparams="extraparams_refused_groups()"
|
||||||
|
:circuitname="circuit.name"
|
||||||
|
:visufind="costanti.REQ_ADD_GROUP_TO_CIRCUIT"
|
||||||
|
>
|
||||||
|
</CGridTableRec>
|
||||||
|
</q-tab-panel>
|
||||||
|
</q-tab-panels>
|
||||||
|
</q-tab-panel>
|
||||||
<q-tab-panel name="mov">
|
<q-tab-panel name="mov">
|
||||||
<q-toggle
|
<q-toggle
|
||||||
v-model="showonlymine"
|
v-model="showonlymine"
|
||||||
|
|||||||
Reference in New Issue
Block a user