ver 0.5.51
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.5.49"
|
||||
APP_VERSION="0.5.51"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.5.49"
|
||||
APP_VERSION="0.5.51"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.5.49"
|
||||
APP_VERSION="0.5.51"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.5.49"
|
||||
APP_VERSION="0.5.51"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.5.49"
|
||||
APP_VERSION="0.5.51"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="14"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -82,6 +82,8 @@ export default {
|
||||
darkcookie.value = tools.getCookie('darkmode', false, false, false) === '-1'
|
||||
|
||||
scroll()
|
||||
tools.initprompt()
|
||||
|
||||
tools.checkApp()
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
/home/paolo/myproject/freeplanet_serverside/src/server/tools/shared_nodejs.js
|
||||
../../../freeplanet_serverside/src/server/tools/shared_nodejs.js
|
||||
@@ -171,8 +171,8 @@ export const shared_consts = {
|
||||
TABLES_WITH_SORTING: ['mybachecas', 'myhosps'],
|
||||
TABLES_REC_ID: ['skills', 'goods', 'subskills', 'myskills', 'mybachecas', 'myhosps', 'mygoods'],
|
||||
|
||||
// costanti.VISUTABLE_SCHEDA_USER, VISUTABLE_SCHEDA_GROUP, VISUTABLE_USER_TABGROUP, VISUTABLE_USER_TABCIRCUIT
|
||||
VERTIC_SHOW_GRID: [-1, 2, -3, -4, -5],
|
||||
// costanti.VISUTABLE_SCHEDA_USER, VISUTABLE_SCHEDA_GROUP, VISUTABLE_USER_TABGROUP, VISUTABLE_USER_TABCIRCUIT, VISUTABLE_GROUP_CIRCUIT
|
||||
VERTIC_SHOW_GRID: [-1, 2, -3, -4, -5, -6],
|
||||
|
||||
TABLES_UPDATE_LASTIFIED: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'bots'],
|
||||
TABLES_FINDER: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'mygroups'],
|
||||
@@ -1216,6 +1216,11 @@ export const shared_consts = {
|
||||
FASE3_MONETA_ABILITATA: 3,
|
||||
},
|
||||
|
||||
CIRCUIT_PARAMS: {
|
||||
SCOPERTO_MIN_GRP: 200,
|
||||
SCOPERTO_MAX_GRP: 500,
|
||||
},
|
||||
|
||||
FontsInstalled: [
|
||||
{
|
||||
label: 'Arial',
|
||||
|
||||
@@ -25,22 +25,24 @@ export default defineComponent({
|
||||
|
||||
const deferredPrompt = computed(() => globalStore.deferredPrompt)
|
||||
|
||||
function initprompt() {
|
||||
window.addEventListener('beforeinstallprompt', (event) => {
|
||||
event.preventDefault()
|
||||
console.log('beforeinstallprompt !')
|
||||
// Stash the event so it can be triggered later.
|
||||
globalStore.deferredPrompt = event
|
||||
})
|
||||
}
|
||||
|
||||
function installApp() {
|
||||
if (globalStore.deferredPrompt)
|
||||
globalStore.deferredPrompt.prompt()
|
||||
if (globalStore.deferredPrompt) {
|
||||
globalStore.deferredPrompt.prompt()
|
||||
|
||||
// Wait for the user to respond to the prompt
|
||||
globalStore.deferredPrompt.userChoice.then((choiceResult: any)=>{
|
||||
if (choiceResult.outcome === 'accepted') {
|
||||
globalStore.deferredPrompt = null;
|
||||
// console.log('User accepted the A2HS prompt');
|
||||
} else {
|
||||
// console.log('User dismissed the A2HS prompt');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function mounted() {
|
||||
initprompt()
|
||||
tools.checkApp()
|
||||
}
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
</q-chip>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="value !== null" :class="`text-h5 ` + small ? `bordo_stondato_small`: `bordo_stondato_stretto` + ` full-width`"
|
||||
:style="(!$q.screen.lt.sm && !small ? `min-width: 250px; ` : small ? ` max-width: 120px;` : ``) + (color_border ? `border-color: ` + color_border + `!important;`: '')">
|
||||
<div v-if="value !== null" :class="`text-h5 ` + (small ? `bordo_stondato_small`: `bordo_stondato_stretto`) + ` full-width`"
|
||||
:style="(!$q.screen.lt.sm && !small ? `min-width: 250px; ` : (small ? ` max-width: 120px;` : ``)) + (color_border ? `border-color: ` + color_border + `!important;`: '')">
|
||||
<div class="text-center text-h7-dense text-italic text-grey-14">
|
||||
<span v-if="small">
|
||||
<em class="q-px-xs text-white rounded-borders" :style="`background-color: ` + (color ? color : '#ff5500')">{{ symbol }}</em>
|
||||
@@ -41,7 +41,7 @@
|
||||
<q-icon v-else name="fas fa-coins" :size="small ? `xs`: `sm`"/>
|
||||
</template>
|
||||
<template v-slot:control>
|
||||
<div :class="`align_elem_right `+ small ? `text-h7` : ``">{{ valueextra }}{{ tools.roundDec2(value) }}
|
||||
<div :class="`align_elem_right `+ (small ? `text-h7` : ``)">{{ valueextra }}{{ tools.roundDec2(value) }}
|
||||
<q-tooltip :offset="[10, 10]" v-model="showingtooltip">{{ tips }}</q-tooltip>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -135,8 +135,8 @@ export default defineComponent({
|
||||
*/
|
||||
|
||||
watch(() => myrecfiltertoggle.value, (value: any, oldval: any) => {
|
||||
updatefilter(value)
|
||||
},
|
||||
updatefilter(value)
|
||||
},
|
||||
)
|
||||
|
||||
const mypagination = computed(() => {
|
||||
@@ -1115,6 +1115,8 @@ export default defineComponent({
|
||||
status: 1,
|
||||
transactionsEnabled: 1,
|
||||
qta_max_default: 1,
|
||||
fido_scoperto_default_grp: 1,
|
||||
qta_max_default_grp: 1,
|
||||
valuta_per_euro: 1,
|
||||
symbol: 1,
|
||||
idCity: 1,
|
||||
@@ -1239,7 +1241,7 @@ export default defineComponent({
|
||||
username: 1,
|
||||
name: 1,
|
||||
surname: 1,
|
||||
lasttimeonline: 1,
|
||||
lasttimeonline: 1,
|
||||
comune: 1,
|
||||
mycities: 1,
|
||||
'profile.img': 1,
|
||||
@@ -1310,7 +1312,7 @@ lasttimeonline: 1,
|
||||
username: 1,
|
||||
name: 1,
|
||||
surname: 1,
|
||||
lasttimeonline: 1,
|
||||
lasttimeonline: 1,
|
||||
comune: 1,
|
||||
mycities: 1,
|
||||
'profile.img': 1,
|
||||
@@ -1358,7 +1360,7 @@ lasttimeonline: 1,
|
||||
username: 1,
|
||||
name: 1,
|
||||
surname: 1,
|
||||
lasttimeonline: 1,
|
||||
lasttimeonline: 1,
|
||||
comune: 1,
|
||||
mycities: 1,
|
||||
'profile.img': 1,
|
||||
|
||||
@@ -321,6 +321,7 @@
|
||||
:offset="350"
|
||||
debounce="300"
|
||||
>
|
||||
|
||||
<div v-if="showHeaderCol">
|
||||
<div
|
||||
v-for="col in mycolumns"
|
||||
@@ -417,15 +418,16 @@
|
||||
</div>
|
||||
<div
|
||||
v-else-if="
|
||||
(showType === costanti.SHOW_GROUPINFO &&
|
||||
((showType === costanti.SHOW_GROUPINFO &&
|
||||
myvertical !== costanti.VISUTABLE_SCHEDA_GROUP) ||
|
||||
(myvertical === 2 && tablesel === 'mygroups')
|
||||
(myvertical === 2 && tablesel === 'mygroups')) || (myvertical === costanti.VISUTABLE_GROUP_CIRCUIT)
|
||||
"
|
||||
class="fill-all-width"
|
||||
>
|
||||
<div>
|
||||
<CMyGroups
|
||||
v-model="filtergrp"
|
||||
:circuitname="circuitname"
|
||||
:finder="false"
|
||||
:mygrp="row"
|
||||
:visu="costanti.FIND_GROUP"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { defineComponent, onMounted, PropType, ref, watch } from 'vue'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { IMyGroup, IImgGallery, IUserFields, IUserProfile, IFriends } from 'model'
|
||||
import { IMyGroup, IImgGallery, IUserFields, IUserProfile, IFriends, ICircuit, IAccount } from 'model'
|
||||
import { costanti } from '@costanti'
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
@@ -9,11 +9,14 @@ import { useI18n } from '@/boot/i18n'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { CUserNonVerif } from '@/components/CUserNonVerif'
|
||||
import { toolsext } from '@store/Modules/toolsext'
|
||||
import { CSaldo } from '@/components/CSaldo'
|
||||
import { CSendCoins } from '@/components/CSendCoins'
|
||||
import { useCircuitStore } from '@store/CircuitStore'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CMyGroup',
|
||||
emits: ['setCmd'],
|
||||
components: {CUserNonVerif},
|
||||
components: {CUserNonVerif, CSaldo, CSendCoins},
|
||||
props: {
|
||||
mygrp: {
|
||||
type: Object as PropType<IMyGroup | null>,
|
||||
@@ -28,7 +31,12 @@ export default defineComponent({
|
||||
visu: {
|
||||
type: Number,
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
circuitname: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
|
||||
setup(props, { emit }) {
|
||||
@@ -40,11 +48,16 @@ export default defineComponent({
|
||||
const $route = useRoute()
|
||||
|
||||
const groupname = ref('')
|
||||
const circuitStore = useCircuitStore()
|
||||
|
||||
const showsendCoinTo = ref(false)
|
||||
|
||||
const grp = ref(<IMyGroup | null>null)
|
||||
|
||||
const table = ref(toolsext.TABMYGROUPS)
|
||||
|
||||
const circuit = ref(<ICircuit | null | undefined>null)
|
||||
|
||||
watch(() => props.mygrp, (newval, oldval) => {
|
||||
mounted()
|
||||
})
|
||||
@@ -62,6 +75,7 @@ export default defineComponent({
|
||||
groupname.value = props.mygrp.groupname
|
||||
}
|
||||
}
|
||||
circuit.value = circuitStore.getCircuitByName(props.circuitname)
|
||||
}
|
||||
|
||||
function getImgGroup(group: IMyGroup) {
|
||||
@@ -93,6 +107,8 @@ export default defineComponent({
|
||||
tools,
|
||||
table,
|
||||
myusername,
|
||||
circuit,
|
||||
showsendCoinTo,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -2,130 +2,435 @@
|
||||
<div v-if="tools.isUserOk()">
|
||||
<div v-if="grp">
|
||||
<q-item class="q-my-sm" clickable>
|
||||
<q-item-section avatar @click="naviga(tools.getPathByGroup(grp, table))">
|
||||
<q-item-section
|
||||
avatar
|
||||
@click="naviga(tools.getPathByGroup(grp, table))"
|
||||
>
|
||||
<q-avatar size="60px">
|
||||
<q-img :src="getImgGroup(grp)" :alt="grp.groupname" img-class="imgprofile" height="60px"/>
|
||||
<q-img
|
||||
:src="getImgGroup(grp)"
|
||||
:alt="grp.groupname"
|
||||
img-class="imgprofile"
|
||||
height="60px"
|
||||
/>
|
||||
</q-avatar>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section @click="naviga(tools.getPathByGroup(grp, table))">
|
||||
<q-item-label><strong>{{ grp.title }}</strong> ({{ grp.groupname }})
|
||||
<q-item-label
|
||||
><strong>{{ grp.title }}</strong> ({{ grp.groupname }})
|
||||
</q-item-label>
|
||||
<q-item-label v-if="grp.descr" caption lines="3"
|
||||
><em>{{ grp.descr }}</em></q-item-label
|
||||
>
|
||||
<q-item-label v-if="grp.account && circuitname" caption lines="2">
|
||||
<CSaldo
|
||||
:small="true"
|
||||
:account="grp.account"
|
||||
:symbol="tools.getSymbolByCircuit(circuit)"
|
||||
:color="tools.getColorByCircuit(circuit)"
|
||||
:saldo="grp.account.saldo"
|
||||
>
|
||||
</CSaldo>
|
||||
</q-item-label>
|
||||
<q-item-label v-if="grp.descr" caption lines="3"><em>{{ grp.descr }}</em></q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section side v-if="visu === costanti.MY_GROUPS">
|
||||
<q-item-label>
|
||||
<q-item-label>
|
||||
<q-btn
|
||||
v-if="userStore.my.profile.calc.numGoodsAndServices > 0 && circuitname"
|
||||
icon="fas fa-coins"
|
||||
color="green"
|
||||
size="md"
|
||||
dense
|
||||
@click="showsendCoinTo = true"
|
||||
>
|
||||
</q-btn>
|
||||
</q-item-label>
|
||||
<q-item-section side>
|
||||
<q-item-label v-if="visu === costanti.MY_GROUPS">
|
||||
<q-btn rounded icon="fas fa-ellipsis-h">
|
||||
<q-menu>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item clickable icon="fas fa-user-minus" v-close-popup
|
||||
@click="tools.setCmd($q, shared_consts.GROUPSCMD.REMOVE_FROM_MYGROUP, myusername(), '', grp.groupname)">
|
||||
<q-item-section>{{ $t('groups.remove_from_mygroups') }}</q-item-section>
|
||||
<q-item
|
||||
clickable
|
||||
icon="fas fa-user-minus"
|
||||
v-close-popup
|
||||
@click="
|
||||
tools.setCmd(
|
||||
$q,
|
||||
shared_consts.GROUPSCMD.REMOVE_FROM_MYGROUP,
|
||||
myusername(),
|
||||
'',
|
||||
grp.groupname
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section>{{
|
||||
$t('groups.remove_from_mygroups')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list v-if="tools.iAmAdminGroup(grp.groupname)" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.GROUPSCMD.DELETE_GROUP, myusername(), '', grp.groupname)">
|
||||
<q-item-section>{{ $t('groups.delete_group') }}</q-item-section>
|
||||
<q-list
|
||||
v-if="tools.iAmAdminGroup(grp.groupname)"
|
||||
style="min-width: 200px"
|
||||
>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
tools.setCmd(
|
||||
$q,
|
||||
shared_consts.GROUPSCMD.DELETE_GROUP,
|
||||
myusername(),
|
||||
'',
|
||||
grp.groupname
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section>{{
|
||||
$t('groups.delete_group')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item v-if="!tools.iAmAdminGroup(grp.groupname)" clickable icon="fas fa-ban" v-close-popup @click="tools.setCmd($q, shared_consts.GROUPSCMD.BLOCK_GROUP, myusername(), '', grp.groupname)">
|
||||
<q-item-section>{{ $t('groups.block_group') }}</q-item-section>
|
||||
<q-item
|
||||
v-if="!tools.iAmAdminGroup(grp.groupname)"
|
||||
clickable
|
||||
icon="fas fa-ban"
|
||||
v-close-popup
|
||||
@click="
|
||||
tools.setCmd(
|
||||
$q,
|
||||
shared_consts.GROUPSCMD.BLOCK_GROUP,
|
||||
myusername(),
|
||||
'',
|
||||
grp.groupname
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section>{{
|
||||
$t('groups.block_group')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side v-if="visu === costanti.USER_GROUPS">
|
||||
<q-item-label>
|
||||
<q-btn rounded :icon="userStore.IsMyGroupByGroupname(grp.groupname) ? `fas fa-ellipsis-h` : `fas fa-user`">
|
||||
<q-item-label v-else-if="visu === costanti.USER_GROUPS">
|
||||
<q-btn
|
||||
rounded
|
||||
:icon="
|
||||
userStore.IsMyGroupByGroupname(grp.groupname)
|
||||
? `fas fa-ellipsis-h`
|
||||
: `fas fa-user`
|
||||
"
|
||||
>
|
||||
<q-menu>
|
||||
<q-list v-if="(!userStore.IsMyGroupByGroupname(grp.groupname) && !userStore.IsAskedGroupByGroupname(grp.groupname) && !userStore.IsRefusedGroupByGroupname(grp.groupname))" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.GROUPSCMD.REQGROUP, myusername(), true, grp.groupname)">
|
||||
<q-item-section>{{ $t('groups.ask_group') }}</q-item-section>
|
||||
<q-list
|
||||
v-if="
|
||||
!userStore.IsMyGroupByGroupname(grp.groupname) &&
|
||||
!userStore.IsAskedGroupByGroupname(grp.groupname) &&
|
||||
!userStore.IsRefusedGroupByGroupname(grp.groupname)
|
||||
"
|
||||
style="min-width: 200px"
|
||||
>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
tools.setCmd(
|
||||
$q,
|
||||
shared_consts.GROUPSCMD.REQGROUP,
|
||||
myusername(),
|
||||
true,
|
||||
grp.groupname
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section>{{
|
||||
$t('groups.ask_group')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list v-else-if="(!userStore.IsMyGroupByGroupname(grp.groupname) && userStore.IsAskedGroupByGroupname(grp.groupname) && !userStore.IsRefusedGroupByGroupname(grp.groupname))" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.GROUPSCMD.REFUSE_REQ_GROUP, myusername(), false, grp.groupname)">
|
||||
<q-item-section>{{ $t('shared.refuse_ask') }}</q-item-section>
|
||||
<q-list
|
||||
v-else-if="
|
||||
!userStore.IsMyGroupByGroupname(grp.groupname) &&
|
||||
userStore.IsAskedGroupByGroupname(grp.groupname) &&
|
||||
!userStore.IsRefusedGroupByGroupname(grp.groupname)
|
||||
"
|
||||
style="min-width: 200px"
|
||||
>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
tools.setCmd(
|
||||
$q,
|
||||
shared_consts.GROUPSCMD.REFUSE_REQ_GROUP,
|
||||
myusername(),
|
||||
false,
|
||||
grp.groupname
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section>{{
|
||||
$t('shared.refuse_ask')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.GROUPSCMD.REQGROUP, myusername(), false, grp.groupname)">
|
||||
<q-item-section>{{ $t('shared.cancel_ask') }}</q-item-section>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
tools.setCmd(
|
||||
$q,
|
||||
shared_consts.GROUPSCMD.REQGROUP,
|
||||
myusername(),
|
||||
false,
|
||||
grp.groupname
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section>{{
|
||||
$t('shared.cancel_ask')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list v-else-if="userStore.IsMyGroupByGroupname(grp.groupname)" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.GROUPSCMD.REMOVE_FROM_MYGROUP, myusername(), '', grp.groupname)">
|
||||
<q-item-section>{{ $t('groups.exit_group') }}</q-item-section>
|
||||
<q-list
|
||||
v-else-if="userStore.IsMyGroupByGroupname(grp.groupname)"
|
||||
style="min-width: 200px"
|
||||
>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
tools.setCmd(
|
||||
$q,
|
||||
shared_consts.GROUPSCMD.REMOVE_FROM_MYGROUP,
|
||||
myusername(),
|
||||
'',
|
||||
grp.groupname
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section>{{
|
||||
$t('groups.exit_group')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list v-if="tools.iAmAdminGroup(grp.groupname)" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.GROUPSCMD.DELETE_GROUP, myusername(), '', grp.groupname)">
|
||||
<q-item-section>{{ $t('groups.delete_group') }}</q-item-section>
|
||||
<q-list
|
||||
v-if="tools.iAmAdminGroup(grp.groupname)"
|
||||
style="min-width: 200px"
|
||||
>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
tools.setCmd(
|
||||
$q,
|
||||
shared_consts.GROUPSCMD.DELETE_GROUP,
|
||||
myusername(),
|
||||
'',
|
||||
grp.groupname
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section>{{
|
||||
$t('groups.delete_group')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side v-if="visu === costanti.REQ_GROUP">
|
||||
<q-item-label>
|
||||
<q-item-label v-else-if="visu === costanti.REQ_GROUP">
|
||||
<q-btn rounded icon="fas fa-ellipsis-h">
|
||||
<q-menu>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item clickable icon="fas fa-user-minus" v-close-popup
|
||||
@click="tools.setCmd($q, shared_consts.GROUPSCMD.REQGROUP, myusername(), false, grp.groupname)">
|
||||
<q-item-section>{{ $t('groups.reject_ask_group') }}</q-item-section>
|
||||
<q-item
|
||||
clickable
|
||||
icon="fas fa-user-minus"
|
||||
v-close-popup
|
||||
@click="
|
||||
tools.setCmd(
|
||||
$q,
|
||||
shared_consts.GROUPSCMD.REQGROUP,
|
||||
myusername(),
|
||||
false,
|
||||
grp.groupname
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section>{{
|
||||
$t('groups.reject_ask_group')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side v-if="visu === costanti.ASK_SENT_GROUP">
|
||||
<q-item-label>
|
||||
<q-item-label v-else-if="visu === costanti.ASK_SENT_GROUP">
|
||||
<q-btn rounded icon="fas fa-ellipsis-h">
|
||||
<q-menu>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item clickable icon="fas fa-user-minus" v-close-popup
|
||||
@click="tools.setCmd($q, shared_consts.GROUPSCMD.REFUSE_REQ_GROUP, myusername(), '', grp.groupname)">
|
||||
<q-item-section>{{ $t('shared.refuse_ask') }}</q-item-section>
|
||||
<q-item
|
||||
clickable
|
||||
icon="fas fa-user-minus"
|
||||
v-close-popup
|
||||
@click="
|
||||
tools.setCmd(
|
||||
$q,
|
||||
shared_consts.GROUPSCMD.REFUSE_REQ_GROUP,
|
||||
myusername(),
|
||||
'',
|
||||
grp.groupname
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section>{{
|
||||
$t('shared.refuse_ask')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable icon="fas fa-user-minus" v-close-popup
|
||||
@click="tools.setCmd($q, shared_consts.GROUPSCMD.CANCEL_REQ_GROUP, myusername(), '', grp.groupname)">
|
||||
<q-item-section>{{ $t('shared.cancel_ask') }}</q-item-section>
|
||||
<q-item
|
||||
clickable
|
||||
icon="fas fa-user-minus"
|
||||
v-close-popup
|
||||
@click="
|
||||
tools.setCmd(
|
||||
$q,
|
||||
shared_consts.GROUPSCMD.CANCEL_REQ_GROUP,
|
||||
myusername(),
|
||||
'',
|
||||
grp.groupname
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section>{{
|
||||
$t('shared.cancel_ask')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side v-if="visu === costanti.FIND_GROUP">
|
||||
<q-item-label>
|
||||
<q-btn rounded :icon="userStore.IsMyGroupByGroupname(grp.groupname) ? `fas fa-ellipsis-h` : `fas fa-user`">
|
||||
<q-item-label v-else-if="visu === costanti.FIND_GROUP">
|
||||
<q-btn
|
||||
rounded
|
||||
:icon="
|
||||
userStore.IsMyGroupByGroupname(grp.groupname)
|
||||
? `fas fa-ellipsis-h`
|
||||
: `fas fa-user`
|
||||
"
|
||||
>
|
||||
<q-menu>
|
||||
<q-list v-if="(!userStore.IsMyGroupByGroupname(grp.groupname) && !userStore.IsAskedGroupByGroupname(grp.groupname))" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.GROUPSCMD.REQGROUP, myusername(), true, grp.groupname)">
|
||||
<q-item-section>{{ $t('groups.ask_group') }}</q-item-section>
|
||||
<q-list
|
||||
v-if="
|
||||
!userStore.IsMyGroupByGroupname(grp.groupname) &&
|
||||
!userStore.IsAskedGroupByGroupname(grp.groupname)
|
||||
"
|
||||
style="min-width: 200px"
|
||||
>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
tools.setCmd(
|
||||
$q,
|
||||
shared_consts.GROUPSCMD.REQGROUP,
|
||||
myusername(),
|
||||
true,
|
||||
grp.groupname
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section>{{
|
||||
$t('groups.ask_group')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list v-else-if="(!userStore.IsMyGroupByGroupname(grp.groupname) && userStore.IsAskedGroupByGroupname(grp.groupname))" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.GROUPSCMD.REFUSE_REQ_GROUP, myusername(), false, grp.groupname)">
|
||||
<q-item-section>{{ $t('shared.refuse_ask') }}</q-item-section>
|
||||
<q-list
|
||||
v-else-if="
|
||||
!userStore.IsMyGroupByGroupname(grp.groupname) &&
|
||||
userStore.IsAskedGroupByGroupname(grp.groupname)
|
||||
"
|
||||
style="min-width: 200px"
|
||||
>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
tools.setCmd(
|
||||
$q,
|
||||
shared_consts.GROUPSCMD.REFUSE_REQ_GROUP,
|
||||
myusername(),
|
||||
false,
|
||||
grp.groupname
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section>{{
|
||||
$t('shared.refuse_ask')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.GROUPSCMD.REQGROUP, myusername(), false, grp.groupname)">
|
||||
<q-item-section>{{ $t('shared.cancel_ask') }}</q-item-section>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
tools.setCmd(
|
||||
$q,
|
||||
shared_consts.GROUPSCMD.REQGROUP,
|
||||
myusername(),
|
||||
false,
|
||||
grp.groupname
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section>{{
|
||||
$t('shared.cancel_ask')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list v-else-if="userStore.IsMyGroupByGroupname(grp.groupname)" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.GROUPSCMD.REMOVE_FROM_MYGROUP, myusername(), '', grp.groupname)">
|
||||
<q-item-section>{{ $t('groups.exit_group') }}</q-item-section>
|
||||
<q-list
|
||||
v-else-if="userStore.IsMyGroupByGroupname(grp.groupname)"
|
||||
style="min-width: 200px"
|
||||
>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
tools.setCmd(
|
||||
$q,
|
||||
shared_consts.GROUPSCMD.REMOVE_FROM_MYGROUP,
|
||||
myusername(),
|
||||
'',
|
||||
grp.groupname
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section>{{
|
||||
$t('groups.exit_group')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list v-if="tools.iAmAdminGroup(grp.groupname)" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.GROUPSCMD.DELETE_GROUP, myusername(), '', grp.groupname)">
|
||||
<q-item-section>{{ $t('groups.delete_group') }}</q-item-section>
|
||||
<q-list
|
||||
v-if="tools.iAmAdminGroup(grp.groupname)"
|
||||
style="min-width: 200px"
|
||||
>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
tools.setCmd(
|
||||
$q,
|
||||
shared_consts.GROUPSCMD.DELETE_GROUP,
|
||||
myusername(),
|
||||
'',
|
||||
grp.groupname
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section>{{
|
||||
$t('groups.delete_group')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
@@ -138,11 +443,20 @@
|
||||
<div v-else>
|
||||
<CUserNonVerif></CUserNonVerif>
|
||||
</div>
|
||||
<div v-if="showsendCoinTo">
|
||||
<CSendCoins
|
||||
:showprop="showsendCoinTo"
|
||||
:to_group="grp"
|
||||
:circuitname="circuitname"
|
||||
@close="showsendCoinTo = false"
|
||||
>
|
||||
</CSendCoins>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CMyGroup.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CMyGroup.scss';
|
||||
@import './CMyGroup.scss';
|
||||
</style>
|
||||
|
||||
@@ -44,6 +44,11 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: 0,
|
||||
},
|
||||
circuitname: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const userStore = useUserStore()
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
class="q-my-sm"
|
||||
clickable
|
||||
>
|
||||
<CMyGroup :mygrp="grp" :visu="modelValue"> </CMyGroup>
|
||||
<CMyGroup :mygrp="grp" :visu="modelValue" :circuitname="circuitname"> </CMyGroup>
|
||||
</span>
|
||||
</q-list>
|
||||
</div>
|
||||
@@ -35,7 +35,7 @@
|
||||
<div v-else>
|
||||
<q-list class="width-container">
|
||||
<span class="q-my-sm" clickable>
|
||||
<CMyGroup :mygrp="mygrp" :visu="visu"> </CMyGroup>
|
||||
<CMyGroup :mygrp="mygrp" :visu="visu" :circuitname="circuitname"> </CMyGroup>
|
||||
</span>
|
||||
</q-list>
|
||||
</div>
|
||||
|
||||
@@ -11,12 +11,7 @@
|
||||
img-class="imgprofile" height="60px"/>
|
||||
</q-avatar>
|
||||
</q-item-section>
|
||||
<q-item-section v-else avatar @click="naviga(`/my/` + myrec.username)">
|
||||
<q-badge v-if="showBadge" class="q-my-xs self-center" :color="fieldsTable.getColByAdType(myrec.adType)">
|
||||
{{ fieldsTable.getValByTabAndId(table, 'adType', myrec.adType) }}
|
||||
<q-icon :name="fieldsTable.getIconByAdType(myrec.adType)" color="white"
|
||||
class="q-ml-xs"/>
|
||||
</q-badge>
|
||||
<q-item-section v-else avatar>
|
||||
<q-avatar size="60px">
|
||||
<q-img :src="getImgUser(myrec)" :alt="myrec.username" img-class="imgprofile" height="60px"/>
|
||||
</q-avatar>
|
||||
@@ -37,11 +32,10 @@
|
||||
<q-item-label lines="3" v-if="myrec.descr">{{ myrec.descr }}<br>
|
||||
</q-item-label>
|
||||
<q-item-label lines="1" style="text-align: right" class="text_user_city">
|
||||
<span v-if="myrec.visibility.includes(shared_consts.Visibility_Group.PRIVATE)" class="q-mr-xs">
|
||||
<span v-if="myrec.visibility && myrec.visibility.includes(shared_consts.Visibility_Group.PRIVATE)" class="q-mr-xs">
|
||||
<q-icon name="fas fa-lock"></q-icon></span>
|
||||
<span v-if="myrec.visibility.includes(shared_consts.Visibility_Group.HIDDEN)" class="q-mr-xs">
|
||||
<span v-if="myrec.visibility && myrec.visibility.includes(shared_consts.Visibility_Group.HIDDEN)" class="q-mr-xs">
|
||||
<q-icon name="fas fa-eye-slash"></q-icon></span>
|
||||
<span class="text-weight-bold">{{ tools.getNameToShow(myrec) }}</span> -
|
||||
<span v-for="(rec, ind) of myrec.mycities" :key="ind"><span v-if="ind > 0">, </span>{{ rec.comune }}</span>
|
||||
</q-item-label>
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
|
||||
<q-btn
|
||||
v-if="userStore.IsMyCircuitByUser(contact).length > 0 && contact.username !== userStore.my.username && userStore.my.profile.calc.numGoodsAndServices > 0"
|
||||
v-if="userStore.getMyCircuitsInCommonByUser(contact).length > 0 && contact.username !== userStore.my.username && userStore.my.profile.calc.numGoodsAndServices > 0"
|
||||
icon="fas fa-coins"
|
||||
color="green"
|
||||
size="md"
|
||||
|
||||
@@ -271,7 +271,6 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<LandingFooter></LandingFooter>
|
||||
</div>
|
||||
</q-page>
|
||||
</template>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { computed, defineComponent, onMounted, PropType, ref, watch } from 'vue'
|
||||
|
||||
import { IAccount, ICircuit, IOperators, ISendCoin, ISpecialField, IUserFields } from '../../model'
|
||||
import { IAccount, ICircuit, IMyGroup, IOperators, ISendCoin, ISpecialField, IUserFields } from '../../model'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { CSaldo } from '@/components/CSaldo'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
@@ -24,7 +24,18 @@ export default defineComponent({
|
||||
},
|
||||
to_user: {
|
||||
type: Object as PropType<IUserFields>,
|
||||
required: true,
|
||||
required: false,
|
||||
default: null
|
||||
},
|
||||
to_group: {
|
||||
type: Object as PropType<IMyGroup>,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
from_group: {
|
||||
type: Object as PropType<IMyGroup>,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
components: { CSaldo, CMyUserOnlyView },
|
||||
@@ -36,10 +47,9 @@ export default defineComponent({
|
||||
const userStore = useUserStore()
|
||||
const circuitStore = useCircuitStore()
|
||||
|
||||
|
||||
const from_username = ref(userStore.my.username)
|
||||
const circuitsel = ref('')
|
||||
const qty = ref(<string|number>'')
|
||||
const qty = ref(<string | number>'')
|
||||
const causal = ref('')
|
||||
const bothcircuits = ref(<any>[])
|
||||
|
||||
@@ -111,7 +121,25 @@ export default defineComponent({
|
||||
// ....
|
||||
if (props.to_user) {
|
||||
console.log('user', props.to_user)
|
||||
bothcircuits.value = userStore.IsMyCircuitByUser(props.to_user)
|
||||
bothcircuits.value = userStore.getMyCircuitsInCommonByUser(props.to_user)
|
||||
|
||||
if (props.circuitname) {
|
||||
circuitsel.value = props.circuitname
|
||||
} else {
|
||||
circuitsel.value = tools.getCookie(tools.CIRCUIT_USE, bothcircuits.value[0])
|
||||
}
|
||||
if (!userStore.IsMyCircuitByName(circuitsel.value)) {
|
||||
circuitsel.value = bothcircuits.value[0]
|
||||
}
|
||||
|
||||
aggiorna()
|
||||
|
||||
show.value = true
|
||||
}
|
||||
|
||||
if (props.to_group) {
|
||||
console.log('group', props.to_group)
|
||||
bothcircuits.value = userStore.getMyCircuitsInCommonByGroup(props.to_group)
|
||||
|
||||
if (props.circuitname) {
|
||||
circuitsel.value = props.circuitname
|
||||
@@ -133,16 +161,25 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function sendCoin() {
|
||||
console.log('sendcoin', qty.value, props.to_user.username)
|
||||
console.log('sendcoin', qty.value, props.to_group ? props.to_group.groupname : props.to_user.username)
|
||||
|
||||
if (props.to_user.username && qty.value && circuitloaded.value) {
|
||||
const myrecsendcoin: ISendCoin = {
|
||||
let ok = (props.to_user && props.to_user.username) || (props.to_group && props.to_group.groupname)
|
||||
|
||||
if (ok && qty.value && circuitloaded.value) {
|
||||
let myrecsendcoin: ISendCoin = {
|
||||
qty: tools.convstrToNum(qty.value),
|
||||
dest: props.to_user.username,
|
||||
dest: '',
|
||||
groupdest: '',
|
||||
grouporig: '',
|
||||
circuitname: circuitsel.value,
|
||||
causal: causal.value,
|
||||
symbol: circuitloaded.value.symbol,
|
||||
}
|
||||
|
||||
myrecsendcoin.groupdest = props.to_group ? props.to_group.groupname : ''
|
||||
myrecsendcoin.dest = props.to_user ? props.to_user.username : ''
|
||||
myrecsendcoin.grouporig = props.from_group ? props.from_group.groupname : ''
|
||||
|
||||
if (myrecsendcoin) {
|
||||
tools.sendCoinsByCircuit($q, circuitloaded.value, myrecsendcoin)
|
||||
.then((ris: any) => {
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
<q-btn
|
||||
v-if="circuitloaded"
|
||||
:disable="qtyRef ? (qtyRef.hasError || !circuitloaded.transactionsEnabled) : false"
|
||||
:label="$t('circuit.sendcoinsto', {qty, coin: circuitsel, dest: to_user.username })" color="positive"
|
||||
:label="$t('circuit.sendcoinsto', {qty, coin: circuitsel, dest: to_group ? to_group.groupname : to_user.username })" color="positive"
|
||||
@click="sendCoin()"></q-btn>
|
||||
<q-btn flat :label="$t('dialog.cancel')" color="primary" v-close-popup></q-btn>
|
||||
</q-card-actions>
|
||||
|
||||
@@ -13,7 +13,7 @@ export const validations = computed(() => {
|
||||
},
|
||||
username: {
|
||||
required,
|
||||
minLength: minLength(6),
|
||||
minLength: minLength(3),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import { CTitleBanner } from '../CTitleBanner'
|
||||
import { CCopyBtn } from '../CCopyBtn'
|
||||
import { CRegistration } from '../CRegistration'
|
||||
import { PagePolicy } from '../PagePolicy'
|
||||
import { computed, defineComponent, reactive, ref, watch } from 'vue'
|
||||
import { computed, defineComponent, onMounted, reactive, ref, watch } from 'vue'
|
||||
import { CSignIn } from '@/components/CSignIn'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
@@ -64,11 +64,26 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
name_default: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
username_default: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
need_Telegram: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
collettivo: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
@@ -143,10 +158,13 @@ export default defineComponent({
|
||||
},
|
||||
username: {
|
||||
required,
|
||||
minLength: minLength(6),
|
||||
minLength: minLength(3),
|
||||
complexityUser,
|
||||
registereduser,
|
||||
},
|
||||
name: {
|
||||
required: props.collettivo ? true : false,
|
||||
},
|
||||
terms: {
|
||||
required,
|
||||
},
|
||||
@@ -296,6 +314,11 @@ export default defineComponent({
|
||||
signup.profile.teleg_id = $route.params.idteleg ? parseInt($route.params.idteleg.toString(), 10) : 0
|
||||
}
|
||||
|
||||
if (props.collettivo) {
|
||||
signup.username = props.username_default!
|
||||
signup.name = props.name_default!
|
||||
}
|
||||
|
||||
console.log('1) aportador_solidario', signup.aportador_solidario)
|
||||
|
||||
if (!signup.aportador_solidario)
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<template>
|
||||
<div>
|
||||
<div
|
||||
v-if="needTelegram && tools.isLogged() && tools.getUsername()"
|
||||
v-if="
|
||||
needTelegram && tools.isLogged() && tools.getUsername() && !collettivo
|
||||
"
|
||||
class="text-center"
|
||||
>
|
||||
<q-banner rounded class="bg-green text-white" style="text-align: center">
|
||||
@@ -30,7 +32,7 @@
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!tools.isLogged() || visureg" class="text-center">
|
||||
<div v-if="!tools.isLogged() || visureg || collettivo" class="text-center">
|
||||
<div>
|
||||
<div>
|
||||
<logo
|
||||
@@ -43,7 +45,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="visubuttBOT && needTelegram" class="q-gutter-md">
|
||||
<div
|
||||
v-if="visubuttBOT && needTelegram && !collettivo"
|
||||
class="q-gutter-md"
|
||||
>
|
||||
<div class="q-ma-md">
|
||||
<CRegistration
|
||||
:invited="signup.aportador_solidario"
|
||||
@@ -54,7 +59,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else-if="!isalreadyReg" class="q-gutter-sm q-mt-sm">
|
||||
<div v-else-if="!isalreadyReg || collettivo" class="q-gutter-sm q-mt-sm">
|
||||
<div v-if="signup.username === 'undefined'">
|
||||
<br />
|
||||
Vai su <b>BOT RISO</b> Telegram ed imposta l'Username di Telegram.<br /><br />
|
||||
@@ -96,7 +101,11 @@
|
||||
"
|
||||
maxlength="20"
|
||||
debounce="1000"
|
||||
:label="$t('reg.aportador_solidario')"
|
||||
:label="
|
||||
collettivo
|
||||
? $t('reg.username_admin_collettivo')
|
||||
: $t('reg.aportador_solidario')
|
||||
"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person" />
|
||||
@@ -114,7 +123,11 @@
|
||||
v-on:keyup.enter="!checkifDisabled ? $refs.carousel.next() : null"
|
||||
debounce="2000"
|
||||
:rules="[myRuleEmail]"
|
||||
:label="$t('reg.email_reg')"
|
||||
:label="
|
||||
collettivo
|
||||
? $t('reg.email_reg_collettivo')
|
||||
: $t('reg.email_reg')
|
||||
"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="email" />
|
||||
@@ -150,7 +163,29 @@
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<div v-if="show_namesurname">
|
||||
<div v-if="collettivo">
|
||||
<q-input
|
||||
ref="inputName"
|
||||
v-model="signup.name"
|
||||
rounded
|
||||
outlined
|
||||
@blur="v$.name.$touch"
|
||||
:error="v$.name.$error"
|
||||
maxlength="30"
|
||||
debounce="1000"
|
||||
v-on:keyup.enter="
|
||||
!checkifDisabled ? $refs.carousel.next() : null
|
||||
"
|
||||
:error-message="tools.errorMsg('name', v$.name)"
|
||||
:label="$t('reg.name_opt_collettivo')"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person" />
|
||||
</template>
|
||||
</q-input>
|
||||
</div>
|
||||
|
||||
<div v-else-if="show_namesurname">
|
||||
<q-input
|
||||
ref="inputName"
|
||||
v-model="signup.name"
|
||||
@@ -265,7 +300,7 @@
|
||||
:label="$t('reg.submit')"
|
||||
>
|
||||
</q-btn>
|
||||
<br>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
@@ -332,7 +367,11 @@
|
||||
"
|
||||
maxlength="20"
|
||||
debounce="1000"
|
||||
:label="$t('reg.aportador_solidario')"
|
||||
:label="
|
||||
collettivo
|
||||
? $t('reg.username_admin_collettivo')
|
||||
: $t('reg.aportador_solidario')
|
||||
"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person" />
|
||||
@@ -352,7 +391,11 @@
|
||||
"
|
||||
debounce="2000"
|
||||
:rules="[myRuleEmail]"
|
||||
:label="$t('reg.email_reg')"
|
||||
:label="
|
||||
collettivo
|
||||
? $t('reg.email_reg_collettivo')
|
||||
: $t('reg.email_reg')
|
||||
"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="email" />
|
||||
@@ -384,14 +427,36 @@
|
||||
tools.errorMsg('username', v$.username) ||
|
||||
(isalreadyReg ? 'L\'Username è gia stato registrato!' : '')
|
||||
"
|
||||
:label="$t('reg.username_reg')"
|
||||
:label="$t('reg.username_reg_collettivo')"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person" />
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<div v-if="show_namesurname">
|
||||
<div v-if="collettivo">
|
||||
<q-input
|
||||
ref="inputName"
|
||||
v-model="signup.name"
|
||||
rounded
|
||||
outlined
|
||||
@blur="v$.name.$touch"
|
||||
:error="v$.name.$error"
|
||||
maxlength="30"
|
||||
debounce="1000"
|
||||
v-on:keyup.enter="
|
||||
!checkifDisabled ? $refs.carousel.next() : null
|
||||
"
|
||||
:error-message="tools.errorMsg('name', v$.name)"
|
||||
:label="$t('reg.name_opt_collettivo')"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person" />
|
||||
</template>
|
||||
</q-input>
|
||||
</div>
|
||||
|
||||
<div v-else-if="show_namesurname">
|
||||
<q-input
|
||||
ref="inputName"
|
||||
v-model="signup.name"
|
||||
@@ -623,7 +688,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="isalreadyReg">
|
||||
<div v-else-if="isalreadyReg && !collettivo">
|
||||
<q-banner
|
||||
class="bg-negative text-white text-h5"
|
||||
transition-show="jump-down"
|
||||
|
||||
9
src/components/CTitleSec/CTitleSec.scss
Executable file
9
src/components/CTitleSec/CTitleSec.scss
Executable file
@@ -0,0 +1,9 @@
|
||||
.myshad {
|
||||
text-shadow: .125rem .125rem .125rem darkgray;
|
||||
}
|
||||
|
||||
.nonvisibile{
|
||||
border-radius: 16px;
|
||||
border: red solid 3px;
|
||||
padding: 4px;
|
||||
}
|
||||
37
src/components/CTitleSec/CTitleSec.ts
Executable file
37
src/components/CTitleSec/CTitleSec.ts
Executable file
@@ -0,0 +1,37 @@
|
||||
import { defineComponent, ref } from 'vue'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CTitleSec',
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
bgcolor: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: 'bg-primary',
|
||||
},
|
||||
clcolor: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: 'text-white',
|
||||
},
|
||||
icon: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
components: {},
|
||||
setup(props, { emit }) {
|
||||
|
||||
function iconopen() {
|
||||
return 'fas fa-chevron-down q-icon q-expansion-item__toggle-icon q-focusable rotate-180'
|
||||
}
|
||||
|
||||
return {
|
||||
iconopen,
|
||||
}
|
||||
},
|
||||
})
|
||||
30
src/components/CTitleSec/CTitleSec.vue
Executable file
30
src/components/CTitleSec/CTitleSec.vue
Executable file
@@ -0,0 +1,30 @@
|
||||
<template>
|
||||
<div>
|
||||
<q-banner
|
||||
inline-actions
|
||||
rounded
|
||||
dense
|
||||
:class="bgcolor + ` cursor-pointer q-my-sm ` + clcolor + ` `"
|
||||
style="text-align: center"
|
||||
>
|
||||
<template v-slot:avatar>
|
||||
<q-icon v-if="icon" :name="icon" color="white" />
|
||||
</template>
|
||||
<span :class="`mybanner `">{{
|
||||
title
|
||||
}}</span>
|
||||
</q-banner>
|
||||
|
||||
<q-slide-transition>
|
||||
<div>
|
||||
<slot></slot>
|
||||
</div>
|
||||
</q-slide-transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CTitleSec.ts">
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import './CTitleSec.scss';
|
||||
</style>
|
||||
1
src/components/CTitleSec/index.ts
Executable file
1
src/components/CTitleSec/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CTitleSec} from './CTitleSec.vue'
|
||||
@@ -373,6 +373,7 @@
|
||||
id="user-actions"
|
||||
class="column justify-center q-gutter-sm q-ma-sm center-150"
|
||||
>
|
||||
|
||||
<q-btn
|
||||
rounded
|
||||
color="primary"
|
||||
@@ -385,7 +386,7 @@
|
||||
rounded
|
||||
color="orange"
|
||||
icon="house"
|
||||
:to="`/skills/` + getMyUsername()"
|
||||
:to="`/attivita/` + getMyUsername()"
|
||||
> {{ t('otherpages.myactivities') }}
|
||||
</q-btn>
|
||||
<!--<q-btn round color="warning" icon="lock"></q-btn>-->
|
||||
|
||||
@@ -51,6 +51,8 @@ const msg_website_it = {
|
||||
presentazione2: 'Presentazione',
|
||||
invita: 'Invita Persone',
|
||||
SignUp: 'Modulo di Registrazione:',
|
||||
SignUpCollettivo: 'Reg. Collettiva:',
|
||||
SignUpCollettivo2: 'Registrazione Collettiva:',
|
||||
need_Telegram: 'Per poter utilizzare la Piattaforma occorre avere <a href="https://play.google.com/store/apps/details?id=org.telegram.messenger" target="_blank">Telegram</a> installato<br>',
|
||||
Registrazione_Con_Bot: '1) Copia questo username cliccandoci sopra:',
|
||||
SignUpIscrizione: 'Diventa Socio CNM',
|
||||
|
||||
@@ -112,17 +112,6 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
||||
inmenu: true,
|
||||
infooter: true,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 100,
|
||||
path: '/presentazione',
|
||||
materialIcon: 'fas fa-info',
|
||||
name: 'pages.presentazione',
|
||||
component: () => import('@src/root/presentazione/presentazione.vue'),
|
||||
reqauth: false,
|
||||
inmenu: true,
|
||||
infooter: true,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 120,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { IAction } from '@src/model/Projects'
|
||||
import { IFriends, IMyGroup, IPaymentType } from '@src/model/UserStore'
|
||||
import { IFriends, IGroupShort, IMyGroup, IPaymentType } from '@src/model/UserStore'
|
||||
import {
|
||||
IDepartment, IProducer, IShareWithUs, IStorehouse,
|
||||
} from '@src/model/Products'
|
||||
@@ -1033,10 +1033,6 @@ export interface IMyHosp extends IMyMain {
|
||||
date_updated?: Date,
|
||||
}
|
||||
|
||||
export interface ICircuitList {
|
||||
_id: string,
|
||||
inscription_date?: Date
|
||||
}
|
||||
|
||||
export interface IMyCircuit {
|
||||
_id: string
|
||||
@@ -1048,6 +1044,8 @@ export interface ISendCoin {
|
||||
circuitname: string
|
||||
qty: number
|
||||
dest: string
|
||||
groupdest: string
|
||||
grouporig: string
|
||||
causal: string
|
||||
symbol: string
|
||||
}
|
||||
@@ -1072,6 +1070,8 @@ export interface ICircuit {
|
||||
valuta_per_euro?: number
|
||||
fido_scoperto_default?: number
|
||||
qta_max_default?: number
|
||||
fido_scoperto_default_grp?: number
|
||||
qta_max_default_grp?: number
|
||||
data_costituz?: Date
|
||||
deperimento: boolean
|
||||
transactionsEnabled: boolean
|
||||
@@ -1090,6 +1090,10 @@ export interface ICircuit {
|
||||
createdBy?: string
|
||||
regulation?: string
|
||||
numMembers?: number
|
||||
req_users?: IFriends[]
|
||||
refused_users?: IFriends[]
|
||||
req_groups?: IGroupShort[]
|
||||
refused_groups?: IGroupShort[]
|
||||
// --- Mem:
|
||||
movements: IMovement[]
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { IToken } from '@model/other'
|
||||
import { ICart, IOrderCart, IShareWithUs } from '@src/model/Products'
|
||||
import { IAccount, ICircuit, ICircuitList, IGallery, IImgGallery, IMyCircuit } from '@model/GlobalStore'
|
||||
import { IAccount, ICircuit, IGallery, IImgGallery, IMyCircuit } from '@model/GlobalStore'
|
||||
|
||||
const enum ESexType {
|
||||
None = 0,
|
||||
@@ -12,6 +12,16 @@ export interface IFriends {
|
||||
username: string
|
||||
date?: Date
|
||||
}
|
||||
export interface IGroupShort {
|
||||
groupname: string
|
||||
date?: Date
|
||||
}
|
||||
|
||||
export interface IUserAdmins {
|
||||
username: string
|
||||
perm?: number
|
||||
date?: Date
|
||||
}
|
||||
|
||||
export interface IMyGroup {
|
||||
_id: string
|
||||
@@ -30,7 +40,7 @@ export interface IMyGroup {
|
||||
username_who_block?: string
|
||||
date_blocked?: Date
|
||||
createdBy?: string
|
||||
circuits_list?: ICircuitList[]
|
||||
mycircuits?: IMyCircuit[]
|
||||
}
|
||||
|
||||
export interface ICalcStat {
|
||||
@@ -98,8 +108,8 @@ export interface IUserProfile {
|
||||
|
||||
// in memory
|
||||
asked_friends: any[]
|
||||
asked_groups: any[]
|
||||
refused_groups: any[]
|
||||
asked_groups: IGroupShort[]
|
||||
refused_groups: IGroupShort[]
|
||||
list_usersgroup?: IFriends[]
|
||||
|
||||
asked_circuits: any[]
|
||||
|
||||
@@ -441,6 +441,17 @@ function getRoutesAd(site: ISites) {
|
||||
inmenu: false,
|
||||
infooter: false,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 141,
|
||||
path: '/attivita/:username',
|
||||
materialIcon: 'fas fa-user',
|
||||
name: 'otherpages.myactivities2',
|
||||
component: () => import('@/views/user/myactivities/myactivities.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
inmenu: false,
|
||||
infooter: false,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 200,
|
||||
@@ -577,6 +588,28 @@ function getRoutesAd(site: ISites) {
|
||||
infooter: false,
|
||||
separator: false
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 1002,
|
||||
path: '/signup_collettivo/:invited/:username_default/:name_default',
|
||||
materialIcon: 'how_to_reg',
|
||||
name: 'pages.SignUpCollettivo',
|
||||
component: () => import('@/views/login/signup_collettivo/signup_collettivo.vue'),
|
||||
inmenu: false,
|
||||
infooter: false,
|
||||
separator: false
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 1003,
|
||||
path: '/signup_collettivo',
|
||||
materialIcon: 'how_to_reg',
|
||||
name: 'pages.SignUpCollettivo2',
|
||||
component: () => import('@/views/login/signup_collettivo/signup_collettivo.vue'),
|
||||
inmenu: false,
|
||||
infooter: false,
|
||||
separator: false
|
||||
},
|
||||
{
|
||||
active: site.confpages && site.confpages.enableReg && site.confpages.enabledRegNeedTelegram,
|
||||
order: 1000,
|
||||
|
||||
@@ -43,6 +43,7 @@ const msg_it = {
|
||||
},
|
||||
otherpages: {
|
||||
myactivities: 'Attività',
|
||||
myactivities2: 'Mie Attività',
|
||||
product: 'Prodotto',
|
||||
sito_offline: 'Sito in Aggiornamento',
|
||||
modifprof: 'Modifica',
|
||||
@@ -439,6 +440,7 @@ const msg_it = {
|
||||
invitante_regalato: 'Invitante Regalato',
|
||||
legenda: 'Legenda',
|
||||
aportador_solidario: 'Username di chi ti ha Invitato',
|
||||
username_admin_collettivo: 'Username dell\'Amministratore',
|
||||
verified_by_aportador: 'Verificato',
|
||||
notAsk_ToVerify: 'No Verif. Reg',
|
||||
trust_modified: 'Fiducia Modificata',
|
||||
@@ -465,6 +467,7 @@ const msg_it = {
|
||||
email: 'Email',
|
||||
email2: 'Altra Email (eventuale)',
|
||||
email_reg: 'la tua Email',
|
||||
email_reg_collettivo: 'Email dell\'Amministratore',
|
||||
website: 'Sito Web',
|
||||
link_maplocation: 'Link posizione su mappa',
|
||||
intcode_cell: 'Prefisso Int.',
|
||||
@@ -513,11 +516,13 @@ const msg_it = {
|
||||
sospeso: 'Sospeso',
|
||||
username: 'Username',
|
||||
username_reg: 'Username',
|
||||
username_reg_collettivo: 'Username Collettivo',
|
||||
username_hint: 'caratteri consentiti: tratteggio (_)',
|
||||
username_pseudonimo: 'Username (Pseudonimo)',
|
||||
username_short: 'Username',
|
||||
name: 'Nome',
|
||||
name_opt: 'Nome (Facoltativo)',
|
||||
name_opt_collettivo: 'Nome del Collettivo',
|
||||
surname: 'Cognome',
|
||||
surname_opt: 'Cognome (facoltativo)',
|
||||
username_login: 'Username o email',
|
||||
@@ -616,6 +621,7 @@ const msg_it = {
|
||||
sameaspassword: 'Le password devono essere identiche',
|
||||
accetta_carta_costituzionale_on: 'Occorre accettare la sintesi della Carta Costituzionale',
|
||||
},
|
||||
accedi_come: 'Accedi come...',
|
||||
tips: {
|
||||
email: 'inserisci la tua email',
|
||||
username: 'username lunga almeno 6 caratteri',
|
||||
@@ -1160,10 +1166,14 @@ const msg_it = {
|
||||
valuta_per_euro: 'Valuta per Euro',
|
||||
fido_scoperto_default: 'Fiducia concessa',
|
||||
fido_scoperto_default_tips: 'Rappresenta quanta moneta puoi creare autonomamente',
|
||||
fido_scoperto_default_grp: 'Fiducia concessa Gruppi',
|
||||
fido_scoperto_default_tips_grp: 'Rappresenta quanta moneta puo creare autonomamente il Gruppo',
|
||||
transactionsEnabled: 'Transazioni Abilitate',
|
||||
transactionsEnabled_text: 'Le transazioni al Circuito sono attualmente sospese, in attesa di attivare il gruppo territoriale',
|
||||
qta_max_default: 'Massimo accumulo',
|
||||
qta_max_default_tips: 'Rappresenta quanta moneta ti è concesso accumulare temporaneamente. Incentiviamo di utilizzarla...',
|
||||
qta_max_default_grp: 'Massimo accumulo Gruppo',
|
||||
qta_max_default_tips_grp: 'Rappresenta quanta moneta è concesso accumulare temporaneamente al Gruppo. Incentiviamo di utilizzarla...',
|
||||
data_costituz: 'Data Costituzione',
|
||||
deperimento: 'Deperimento',
|
||||
freq_deper: 'Frequenza Deperimento',
|
||||
@@ -1206,6 +1216,7 @@ const msg_it = {
|
||||
sendcoins: 'Invia Monete',
|
||||
sendcoinsto: 'Invia {qty} {coin} a {dest}',
|
||||
question_sendcoinsto: 'Inviare {qty} {coin} a {dest}?',
|
||||
question_sendcoinsto_from: 'Inviare {qty} {coin} da {from} a {dest}?',
|
||||
coins_sendrequest_sent: 'Richiesta d\'invio monete avvenuto',
|
||||
coins_sendrequest_failed: 'Richiesta d\'invio monete non avvenuta, riprovare',
|
||||
coins_accepted: 'Monete accettate',
|
||||
@@ -1215,7 +1226,7 @@ const msg_it = {
|
||||
refuse_coins_qty: 'Rifiuta',
|
||||
refuse_coins: 'Rifiuta Monete',
|
||||
movements: 'Movimenti',
|
||||
conticomunitari: 'Conti Comunitari',
|
||||
gruppicom: 'Gruppi Com.',
|
||||
qta_remaining_to_send: 'Quantità massima inviabile {maxqta} {symbol}',
|
||||
qta_not_valid: 'Quantità non valida',
|
||||
qta_max_to_send: 'Quantità massima inviabile {maxqta} {symbol}',
|
||||
|
||||
@@ -2,7 +2,7 @@ import { defineStore } from 'pinia'
|
||||
|
||||
import {
|
||||
IAccount,
|
||||
ICircuit, ICircuitState, IGlobalState,
|
||||
ICircuit, ICircuitState, IGlobalState, IGroupShort, IMyCircuit, IMyGroup,
|
||||
} from '@src/model'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import translate from '@src/globalroutines/util'
|
||||
@@ -82,5 +82,18 @@ export const useCircuitStore = defineStore('CircuitStore', {
|
||||
|
||||
},
|
||||
|
||||
getCircuitsListByGroup(mygrp: IMyGroup): ICircuit[] | undefined | null {
|
||||
return this.listcircuits.filter((rec: ICircuit) => mygrp.mycircuits!.findIndex((circ: IMyCircuit) => circ.circuitname === rec.name) >= 0)
|
||||
},
|
||||
|
||||
IsAskedCircuitByNameAndGroup(name: string, groupname: string): boolean {
|
||||
let circuit = this.listcircuits.find((circ: ICircuit) => circ.name === name)
|
||||
if (circuit && circuit.req_groups) {
|
||||
return circuit.req_groups?.findIndex((grp: IGroupShort) => grp.groupname === groupname) >= 0
|
||||
}
|
||||
return false
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
})
|
||||
|
||||
@@ -223,6 +223,7 @@ export const costanti = {
|
||||
VISUTABLE_SCHEDA_GROUP: -3,
|
||||
VISUTABLE_USER_TABGROUP: -4,
|
||||
VISUTABLE_USER_TABCIRCUIT: -5,
|
||||
VISUTABLE_GROUP_CIRCUIT: -6,
|
||||
|
||||
DIR_UPLOAD: 'upload/', // upload/
|
||||
|
||||
|
||||
@@ -141,9 +141,9 @@ export const colmylistcards = [
|
||||
]
|
||||
|
||||
export const colmyelems = [
|
||||
AddCol({ name: 'active', label_trans: 'myelems.active', fieldtype: costanti.FieldType.boolean }),
|
||||
AddCol({ name: 'active', label_trans: 'myelems.active', fieldtype: costanti.FieldType.boolean }),
|
||||
AddCol({ name: 'path', label_trans: 'myelems.path' }),
|
||||
AddCol({ name: 'order', label_trans: 'myelems.order', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'order', label_trans: 'myelems.order', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'type', label_trans: 'myelems.type', fieldtype: costanti.FieldType.select, jointable: 'elemtypes' }),
|
||||
AddCol({ name: 'container', label_trans: 'myelems.container' }),
|
||||
AddCol({ name: 'container2', label_trans: 'myelems.container2' }),
|
||||
@@ -157,18 +157,18 @@ export const colmyelems = [
|
||||
AddCol({ name: 'parambool', label_trans: 'myelems.parambool', fieldtype: costanti.FieldType.boolean }),
|
||||
AddCol({ name: 'parambool2', label_trans: 'myelems.parambool2', fieldtype: costanti.FieldType.boolean }),
|
||||
AddCol({ name: 'parambool3', label_trans: 'myelems.parambool3', fieldtype: costanti.FieldType.boolean }),
|
||||
AddCol({ name: 'number', label_trans: 'myelems.number', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'number', label_trans: 'myelems.number', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'imgback', label_trans: 'myelems.imgback' }),
|
||||
AddCol({ name: 'size', label_trans: 'myelems.size' }),
|
||||
AddCol({ name: 'ratio', label_trans: 'myelems.ratio' }),
|
||||
AddCol({ name: 'containerHtml', label_trans: 'myelems.containerHtml', fieldtype: costanti.FieldType.html }),
|
||||
AddCol({ name: 'listcards', label_trans: 'myelems.listcards', fieldtype: costanti.FieldType.listimages }),
|
||||
AddCol({ name: 'height', label_trans: 'myelems.height', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'heightimg', label_trans: 'myelems.heightimg', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'height', label_trans: 'myelems.height', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'heightimg', label_trans: 'myelems.heightimg', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'widthimg', label_trans: 'pages.widthimg', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'link', label_trans: 'pages.link', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'width', label_trans: 'myelems.width', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'onlyif_logged', label_trans: 'myelems.onlyif_logged', fieldtype: costanti.FieldType.boolean }),
|
||||
AddCol({ name: 'width', label_trans: 'myelems.width', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'onlyif_logged', label_trans: 'myelems.onlyif_logged', fieldtype: costanti.FieldType.boolean }),
|
||||
AddCol({ name: 'color', label_trans: 'myelems.color' }),
|
||||
AddCol({ name: 'colorsub', label_trans: 'myelems.colorsub' }),
|
||||
AddCol({ name: 'colorsub2', label_trans: 'myelems.colorsub2' }),
|
||||
@@ -620,8 +620,10 @@ export const colmyMovement = [
|
||||
noshowlabel: true,
|
||||
}),
|
||||
|
||||
AddCol({ name: 'amount', label_trans: 'movement.amount',
|
||||
fieldtype: costanti.FieldType.currency, required: true, tipovisu: costanti.TipoVisu.TESTO_BORDATO }),
|
||||
AddCol({
|
||||
name: 'amount', label_trans: 'movement.amount',
|
||||
fieldtype: costanti.FieldType.currency, required: true, tipovisu: costanti.TipoVisu.TESTO_BORDATO
|
||||
}),
|
||||
AddCol({ name: 'causal', label_trans: 'movement.causal', tipovisu: costanti.TipoVisu.TESTO_BORDATO }),
|
||||
|
||||
]
|
||||
@@ -632,8 +634,10 @@ export const colmyMovementTable = [
|
||||
AddCol({ name: 'userfrom.username', field: 'userfrom', subfield: 'username', label_trans: 'movement.accountFromId', fieldtype: costanti.FieldType.string, required: true }),
|
||||
AddCol({ name: 'userto.username', field: 'userto', subfield: 'username', label_trans: 'movement.accountToId', fieldtype: costanti.FieldType.string, required: true }),
|
||||
|
||||
AddCol({ name: 'amount', label_trans: 'movement.amount',
|
||||
fieldtype: costanti.FieldType.currency, required: true, tipovisu: costanti.TipoVisu.TESTO_BORDATO }),
|
||||
AddCol({
|
||||
name: 'amount', label_trans: 'movement.amount',
|
||||
fieldtype: costanti.FieldType.currency, required: true, tipovisu: costanti.TipoVisu.TESTO_BORDATO
|
||||
}),
|
||||
AddCol({ name: 'causal', label_trans: 'movement.causal', tipovisu: costanti.TipoVisu.TESTO_BORDATO }),
|
||||
|
||||
]
|
||||
@@ -676,9 +680,11 @@ export const colmyUserPeople = [
|
||||
|
||||
export const colmyUserGroup = [
|
||||
// AddCol({ name: '_id', label_trans: 'reg.id' }),
|
||||
AddCol({ name: 'title', label_trans: 'reg.name',
|
||||
AddCol({
|
||||
name: 'title', label_trans: 'reg.name',
|
||||
field_toduplicate_nospace: 'groupname',
|
||||
required: true, noshowlabel: true, maxlength: 40 }),
|
||||
required: true, noshowlabel: true, maxlength: 40
|
||||
}),
|
||||
AddCol({
|
||||
name: 'groupname', label_trans: 'reg.groupname', required: false,
|
||||
maxlength: 30,
|
||||
@@ -2717,10 +2723,13 @@ export const colTableSubCashCategory = [
|
||||
|
||||
export const colTableCircuitComplete = [
|
||||
// AddCol({ name: 'groupnameId', label_trans: 'circuit.groupnameId', fieldtype: costanti.FieldType.select, jointable: 'mygroups' }), // da togliere poi
|
||||
AddCol({ name: 'name', label_trans: 'circuit.name',
|
||||
AddCol({
|
||||
name: 'name', label_trans: 'circuit.name',
|
||||
maxlength: 40,
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage }),
|
||||
AddCol({ name: 'path', label_trans: 'circuit.path',
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage
|
||||
}),
|
||||
AddCol({
|
||||
name: 'path', label_trans: 'circuit.path',
|
||||
allowchar: costanti.ALLOWCHAR_CODE,
|
||||
}),
|
||||
AddCol({ name: 'subname', label_trans: 'circuit.subname' }),
|
||||
@@ -2749,7 +2758,8 @@ export const colTableCircuitComplete = [
|
||||
AddCol({ name: 'regulation', label_trans: 'circuit.regulation', fieldtype: costanti.FieldType.html }),
|
||||
AddCol({ name: 'systemUserDescr', label_trans: 'circuit.systemUserDescr' }),
|
||||
AddCol({ name: 'systemUserId', label_trans: 'circuit.systemUserId', fieldtype: costanti.FieldType.select, jointable: 'users' }),
|
||||
AddCol({ name: 'createdBy', label_trans: 'circuit.founder', fieldtype: costanti.FieldType.select, jointable: 'users',
|
||||
AddCol({
|
||||
name: 'createdBy', label_trans: 'circuit.founder', fieldtype: costanti.FieldType.select, jointable: 'users',
|
||||
showWhen: costanti.showWhen.InPage + costanti.showWhen.InView,
|
||||
}),
|
||||
AddCol({ name: 'totCircolante', label_trans: 'circuit.totCircolante', fieldtype: costanti.FieldType.number }),
|
||||
@@ -2763,6 +2773,8 @@ export const colTableCircuitComplete = [
|
||||
AddCol({ name: 'valuta_per_euro', label_trans: 'circuit.valuta_per_euro', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'fido_scoperto_default', label_trans: 'circuit.fido_scoperto_default', fieldtype: costanti.FieldType.currency }),
|
||||
AddCol({ name: 'qta_max_default', label_trans: 'circuit.qta_max_default', fieldtype: costanti.FieldType.currency }),
|
||||
AddCol({ name: 'fido_scoperto_default_grp', label_trans: 'circuit.fido_scoperto_default_grp', fieldtype: costanti.FieldType.currency }),
|
||||
AddCol({ name: 'qta_max_default_grp', label_trans: 'circuit.qta_max_default_grp', fieldtype: costanti.FieldType.currency }),
|
||||
AddCol({ name: 'data_costituz', label_trans: 'circuit.data_costituz', fieldtype: costanti.FieldType.date }),
|
||||
AddCol({ name: 'deperimento', label_trans: 'circuit.deperimento', fieldtype: costanti.FieldType.boolean }),
|
||||
AddCol({ name: 'transactionsEnabled', label_trans: 'circuit.transactionsEnabled', fieldtype: costanti.FieldType.boolean }),
|
||||
@@ -2809,11 +2821,14 @@ export const colTableCircuitComplete = [
|
||||
|
||||
export const colTableCircuit = [
|
||||
// AddCol({ name: 'groupnameId', label_trans: 'circuit.groupnameId', fieldtype: costanti.FieldType.select, jointable: 'mygroups' }), // da togliere poi
|
||||
AddCol({ name: 'name', label_trans: 'circuit.name',
|
||||
AddCol({
|
||||
name: 'name', label_trans: 'circuit.name',
|
||||
required: true,
|
||||
maxlength: 30,
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InView }),
|
||||
AddCol({ name: 'path', label_trans: 'circuit.path', required: true,
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InView
|
||||
}),
|
||||
AddCol({
|
||||
name: 'path', label_trans: 'circuit.path', required: true,
|
||||
maxlength: 30,
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InView,
|
||||
allowchar: costanti.ALLOWCHAR_CODE,
|
||||
@@ -2841,10 +2856,12 @@ export const colTableCircuit = [
|
||||
jointable: 'visibilGroup',
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
|
||||
}),
|
||||
AddCol({ name: 'systemUserId', label_trans: 'circuit.systemUserId', fieldtype: costanti.FieldType.select, jointable: 'users',
|
||||
AddCol({
|
||||
name: 'systemUserId', label_trans: 'circuit.systemUserId', fieldtype: costanti.FieldType.select, jointable: 'users',
|
||||
showWhen: costanti.showWhen.InEdit + costanti.showWhen.InView,
|
||||
}),
|
||||
AddCol({ name: 'createdBy', label_trans: 'circuit.founder', fieldtype: costanti.FieldType.select, jointable: 'users',
|
||||
AddCol({
|
||||
name: 'createdBy', label_trans: 'circuit.founder', fieldtype: costanti.FieldType.select, jointable: 'users',
|
||||
showWhen: costanti.showWhen.InPage + costanti.showWhen.InView,
|
||||
}),
|
||||
AddCol({
|
||||
@@ -2864,28 +2881,37 @@ export const colTableCircuit = [
|
||||
// AddCol({ name: 'nome_valuta', label_trans: 'circuit.nome_valuta', required: true }),
|
||||
AddCol({ name: 'symbol', label_trans: 'circuit.symbol' }),
|
||||
AddCol({ name: 'color', label_trans: 'circuit.color' }),
|
||||
AddCol({ name: 'fido_scoperto_default', label_trans: 'circuit.fido_scoperto_default',
|
||||
fieldtype: costanti.FieldType.currency, required: true, visulabel: true }),
|
||||
AddCol({ name: 'qta_max_default', label_trans: 'circuit.qta_max_default',
|
||||
fieldtype: costanti.FieldType.currency, required: true, visulabel: true }),
|
||||
AddCol({
|
||||
name: 'fido_scoperto_default', label_trans: 'circuit.fido_scoperto_default',
|
||||
fieldtype: costanti.FieldType.currency, required: true, visulabel: true
|
||||
}),
|
||||
AddCol({
|
||||
name: 'qta_max_default', label_trans: 'circuit.qta_max_default',
|
||||
fieldtype: costanti.FieldType.currency, required: true, visulabel: true
|
||||
}),
|
||||
AddCol({ name: 'fido_scoperto_default_grp', label_trans: 'circuit.fido_scoperto_default_grp', fieldtype: costanti.FieldType.currency }),
|
||||
AddCol({ name: 'qta_max_default_grp', label_trans: 'circuit.qta_max_default_grp', fieldtype: costanti.FieldType.currency }),
|
||||
AddCol({ name: 'valuta_per_euro', label_trans: 'circuit.valuta_per_euro', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'totCircolante', label_trans: 'circuit.totCircolante',
|
||||
AddCol({
|
||||
name: 'totCircolante', label_trans: 'circuit.totCircolante',
|
||||
fieldtype: costanti.FieldType.currency, visulabel: true,
|
||||
showWhen: costanti.showWhen.InPage + costanti.showWhen.InView,
|
||||
}),
|
||||
AddCol({ name: 'totTransato', label_trans: 'circuit.totTransato',
|
||||
AddCol({
|
||||
name: 'totTransato', label_trans: 'circuit.totTransato',
|
||||
fieldtype: costanti.FieldType.currency, visulabel: true,
|
||||
showWhen: costanti.showWhen.InPage + costanti.showWhen.InView,
|
||||
}),
|
||||
AddCol({ name: 'regulation', label_trans: 'circuit.regulation', fieldtype: costanti.FieldType.html, required: true }),
|
||||
AddCol({ name: 'deperimento', label_trans: 'circuit.deperimento', fieldtype: costanti.FieldType.boolean, disable: true }),
|
||||
AddCol({ name: 'transactionsEnabled', label_trans: 'circuit.transactionsEnabled', fieldtype: costanti.FieldType.boolean }),
|
||||
AddCol({ name: 'status', label_trans: 'circuit.status',
|
||||
fieldtype: costanti.FieldType.select,
|
||||
jointable: 'statuscircuit',
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
|
||||
}
|
||||
),
|
||||
AddCol({
|
||||
name: 'status', label_trans: 'circuit.status',
|
||||
fieldtype: costanti.FieldType.select,
|
||||
jointable: 'statuscircuit',
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
|
||||
}
|
||||
),
|
||||
AddCol({ name: 'data_costituz', label_trans: 'circuit.data_costituz', fieldtype: costanti.FieldType.date }),
|
||||
AddCol({
|
||||
name: 'photos',
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
ITodo,
|
||||
IUserFields,
|
||||
Privacy,
|
||||
TipoVisu, IGroup, IMySkill, IMyBacheca, IImgGallery, IMsgGlobParam, IUserExport, ISpecialField, IAccount, IMyCircuit, ISendCoin, IMovement, IMovVisu, INotif, IMyElem, IMyCard, ILabelValue, ILabelValueStr, IAnim, ILang,
|
||||
TipoVisu, IGroup, IMySkill, IMyBacheca, IImgGallery, IMsgGlobParam, IUserExport, ISpecialField, IAccount, IMyCircuit, ISendCoin, IMovement, IMovVisu, INotif, IMyElem, IMyCard, ILabelValue, ILabelValueStr, IAnim, ILang, IGroupShort,
|
||||
} from '@model'
|
||||
|
||||
import { fieldsTable } from '@store/Modules/fieldsTable'
|
||||
@@ -5528,6 +5528,7 @@ export const tools = {
|
||||
updateMyData(res: any) {
|
||||
const userStore = useUserStore()
|
||||
const circuitStore = useCircuitStore()
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
// console.log('OUT', res)
|
||||
|
||||
@@ -5538,6 +5539,9 @@ export const tools = {
|
||||
if (res.listcircuits) {
|
||||
circuitStore.listcircuits = res.listcircuits
|
||||
}
|
||||
if (res.mygroups) {
|
||||
globalStore.mygroups = res.mygroups
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -5641,7 +5645,7 @@ export const tools = {
|
||||
if (res) {
|
||||
notifStore.updateNotification = true
|
||||
if (username === userStore.my.username) {
|
||||
userStore.my.profile.asked_groups = userStore.my.profile.asked_groups.filter((rec: IMyGroup) => rec.groupname !== groupnameDest)
|
||||
userStore.my.profile.asked_groups = userStore.my.profile.asked_groups.filter((rec: IGroupShort) => rec.groupname !== groupnameDest)
|
||||
}
|
||||
tools.showPositiveNotif($q, t('db.refusedgroup', { username }))
|
||||
}
|
||||
@@ -5833,7 +5837,7 @@ export const tools = {
|
||||
tools.showPositiveNotif($q, t('db.askedtogroup', { groupname: groupnameDest }))
|
||||
} else {
|
||||
// REMOVE to req Friends
|
||||
userStore.my.profile.asked_groups = userStore.my.profile.asked_groups.filter((rec: IMyGroup) => rec.groupname !== groupnameDest)
|
||||
userStore.my.profile.asked_groups = userStore.my.profile.asked_groups.filter((rec: IGroupShort) => rec.groupname !== groupnameDest)
|
||||
tools.showPositiveNotif($q, t('db.revoketogroup', { groupname: groupnameDest }))
|
||||
}
|
||||
|
||||
@@ -5872,7 +5876,7 @@ export const tools = {
|
||||
userStore.setGroupsCmd($q, t, username, groupnameDest, shared_consts.GROUPSCMD.CANCEL_REQ_GROUP, null).then((res) => {
|
||||
if (res) {
|
||||
if (username === userStore.my.username) {
|
||||
userStore.my.profile.asked_groups = userStore.my.profile.asked_groups.filter((rec: IMyGroup) => rec.groupname !== groupnameDest)
|
||||
userStore.my.profile.asked_groups = userStore.my.profile.asked_groups.filter((rec: IGroupShort) => rec.groupname !== groupnameDest)
|
||||
}
|
||||
tools.showPositiveNotif($q, t('db.cancel_req_group'))
|
||||
}
|
||||
@@ -6037,7 +6041,7 @@ export const tools = {
|
||||
return risultato
|
||||
|
||||
},
|
||||
setRequestCircuit($q: any, username: string, circuitname: string, value: boolean) {
|
||||
setRequestCircuit($q: any, username: string, circuitname: string, value: boolean, groupname?: string) {
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
@@ -6060,7 +6064,7 @@ export const tools = {
|
||||
title: t('db.domanda')
|
||||
}).onOk(() => {
|
||||
|
||||
userStore.setCircuitCmd($q, t, username, circuitname, shared_consts.CIRCUITCMD.REQ, value)
|
||||
userStore.setCircuitCmd($q, t, username, circuitname, shared_consts.CIRCUITCMD.REQ, value, { groupname })
|
||||
.then((res: any) => {
|
||||
if (res) {
|
||||
if (value) {
|
||||
@@ -6088,8 +6092,15 @@ export const tools = {
|
||||
|
||||
const username = userStore.my.username
|
||||
|
||||
let orig = sendcoinrec.grouporig ? sendcoinrec.grouporig : ''
|
||||
let dest = sendcoinrec.groupdest ? sendcoinrec.groupdest : sendcoinrec.dest
|
||||
|
||||
let msg = ''
|
||||
msg = t('circuit.question_sendcoinsto', { coin: circuit.symbol, dest: sendcoinrec.dest, qty: sendcoinrec.qty })
|
||||
if (orig) {
|
||||
msg = t('circuit.question_sendcoinsto_from', { coin: circuit.symbol, from: orig, dest, qty: sendcoinrec.qty })
|
||||
} else {
|
||||
msg = t('circuit.question_sendcoinsto', { coin: circuit.symbol, dest, qty: sendcoinrec.qty })
|
||||
}
|
||||
|
||||
return $q.dialog({
|
||||
message: msg,
|
||||
@@ -6124,7 +6135,7 @@ export const tools = {
|
||||
})
|
||||
},
|
||||
|
||||
cancelReqCircuit($q: any, username: string, circuitname: string) {
|
||||
cancelReqCircuit($q: any, username: string, circuitname: string, groupname?: string) {
|
||||
const userStore = useUserStore()
|
||||
$q.dialog({
|
||||
message: t('circuit.domanda_cancel_req', { username, circuitname }),
|
||||
@@ -6133,7 +6144,7 @@ export const tools = {
|
||||
title: t('db.domanda')
|
||||
}).onOk(() => {
|
||||
|
||||
userStore.setCircuitCmd($q, t, username, circuitname, shared_consts.CIRCUITCMD.CANCEL_REQ, null).then((res) => {
|
||||
userStore.setCircuitCmd($q, t, username, circuitname, shared_consts.CIRCUITCMD.CANCEL_REQ, null, { groupname }).then((res) => {
|
||||
if (res && res.result) {
|
||||
if (username === userStore.my.username) {
|
||||
userStore.my.profile.asked_circuits = userStore.my.profile.asked_circuits.filter((rec: ICircuit) => rec.name !== circuitname)
|
||||
@@ -6145,7 +6156,7 @@ export const tools = {
|
||||
})
|
||||
},
|
||||
|
||||
refuseReqCircuit($q: any, username: string, circuitname: string) {
|
||||
refuseReqCircuit($q: any, username: string, circuitname: string, groupname?: string) {
|
||||
|
||||
const userStore = useUserStore()
|
||||
const notifStore = useNotifStore()
|
||||
@@ -6156,7 +6167,7 @@ export const tools = {
|
||||
title: t('db.domanda')
|
||||
}).onOk(() => {
|
||||
|
||||
userStore.setCircuitCmd($q, t, username, circuitname, shared_consts.CIRCUITCMD.REFUSE_REQ, null).then((res) => {
|
||||
userStore.setCircuitCmd($q, t, username, circuitname, shared_consts.CIRCUITCMD.REFUSE_REQ, null, { groupname }).then((res) => {
|
||||
if (res && res.result) {
|
||||
notifStore.updateNotification = true
|
||||
if (username === userStore.my.username) {
|
||||
@@ -6696,6 +6707,8 @@ export const tools = {
|
||||
symbol: 'RIS',
|
||||
fido_scoperto_default: 100,
|
||||
qta_max_default: 200,
|
||||
fido_scoperto_default_grp: shared_consts.CIRCUIT_PARAMS.SCOPERTO_MIN_GRP,
|
||||
qta_max_default_grp: shared_consts.CIRCUIT_PARAMS.SCOPERTO_MAX_GRP,
|
||||
valuta_per_euro: 1,
|
||||
totTransato: 0,
|
||||
totCircolante: 0,
|
||||
@@ -7415,6 +7428,16 @@ export const tools = {
|
||||
}
|
||||
|
||||
},
|
||||
initprompt() {
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
window.addEventListener('beforeinstallprompt', (event) => {
|
||||
event.preventDefault()
|
||||
console.log('beforeinstallprompt !')
|
||||
// Stash the event so it can be triggered later.
|
||||
globalStore.deferredPrompt = event
|
||||
})
|
||||
},
|
||||
|
||||
// FINE !
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ import { Router } from 'vue-router'
|
||||
import { useProjectStore } from '@store/Projects'
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
import { costanti } from '@costanti'
|
||||
import { IMyGroup } from '@model/UserStore'
|
||||
import { IGroupShort, IMyGroup, IUserAdmins } from '@model/UserStore'
|
||||
|
||||
import globalroutines from '../globalroutines/index'
|
||||
import { useNotifStore } from '@store/NotifStore'
|
||||
@@ -228,6 +228,22 @@ export const useUserStore = defineStore('UserStore', {
|
||||
return false
|
||||
},
|
||||
|
||||
GroupsListWhereIAmAdmin(username: string): string[] {
|
||||
let myarr: any[] = []
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
if (this.my.profile && globalStore.mygroups) {
|
||||
myarr = globalStore.mygroups.filter((mygroup: IMyGroup) => {
|
||||
if (mygroup.admins && mygroup.admins.findIndex((useradmin: IUserAdmins) => useradmin.username === username) >= 0) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
})
|
||||
}
|
||||
|
||||
return myarr
|
||||
},
|
||||
|
||||
IsAskedFriendByUsername(username: string): boolean {
|
||||
if (this.my.profile.asked_friends)
|
||||
return this.my.profile.asked_friends.findIndex((rec) => rec.username === username) >= 0
|
||||
@@ -244,14 +260,14 @@ export const useUserStore = defineStore('UserStore', {
|
||||
|
||||
IsAskedGroupByGroupname(groupname: string): boolean {
|
||||
if (this.my.profile.asked_groups)
|
||||
return this.my.profile.asked_groups.findIndex((rec: IMyGroup) => rec.groupname === groupname) >= 0
|
||||
return this.my.profile.asked_groups.findIndex((rec: IGroupShort) => rec.groupname === groupname) >= 0
|
||||
else
|
||||
return false
|
||||
},
|
||||
|
||||
IsRefusedGroupByGroupname(groupname: string): boolean {
|
||||
if (this.my.profile.refused_groups)
|
||||
return this.my.profile.refused_groups.findIndex((rec: IMyGroup) => rec.groupname === groupname) >= 0
|
||||
return this.my.profile.refused_groups.findIndex((rec: IGroupShort) => rec.groupname === groupname) >= 0
|
||||
else
|
||||
return false
|
||||
},
|
||||
@@ -340,13 +356,34 @@ export const useUserStore = defineStore('UserStore', {
|
||||
|
||||
},
|
||||
|
||||
IsMyCircuitByUser(user: IUserFields): any[] {
|
||||
IsMyCircuitByNameAndGroup(circuitname: string, groupname: string): boolean {
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
if (globalStore.mygroups) {
|
||||
const group: IMyGroup | undefined = globalStore.mygroups.find((rec: IMyGroup) => rec.groupname === groupname)
|
||||
if (group && group.mycircuits) {
|
||||
return group.mycircuits.findIndex((rec: any) => rec.circuitname === circuitname) >= 0
|
||||
}
|
||||
return false
|
||||
} else
|
||||
return false
|
||||
|
||||
},
|
||||
|
||||
getMyCircuitsInCommonByUser(user: IUserFields): any[] {
|
||||
|
||||
if (!this.my.profile.mycircuits || (!user || !user.profile || !user.profile.mycircuits))
|
||||
return []
|
||||
return tools.getCommon([...this.my.profile.mycircuits], [...user.profile.mycircuits], 'circuitname')
|
||||
},
|
||||
|
||||
getMyCircuitsInCommonByGroup(group: IMyGroup): any[] {
|
||||
|
||||
if (!this.my.profile.mycircuits || (!group || !group.mycircuits))
|
||||
return []
|
||||
return tools.getCommon([...this.my.profile.mycircuits], [...group.mycircuits], 'circuitname')
|
||||
},
|
||||
|
||||
|
||||
getAccountByCircuitId(circuitId: string): any {
|
||||
if (this.my.profile.useraccounts) {
|
||||
|
||||
12
src/views/login/signup_collettivo/signup_collettivo.scss
Executable file
12
src/views/login/signup_collettivo/signup_collettivo.scss
Executable file
@@ -0,0 +1,12 @@
|
||||
.signup {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
max-width: 450px;
|
||||
}
|
||||
|
||||
|
||||
.wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
43
src/views/login/signup_collettivo/signup_collettivo.ts
Executable file
43
src/views/login/signup_collettivo/signup_collettivo.ts
Executable file
@@ -0,0 +1,43 @@
|
||||
import { computed, defineComponent, ref, watch } from 'vue'
|
||||
import { CSignUp } from '../../../components/CSignUp'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'SignUpCollettivo',
|
||||
components: { CSignUp },
|
||||
props: {},
|
||||
setup() {
|
||||
const $route = useRoute()
|
||||
|
||||
const adult = ref(false)
|
||||
const invited = computed(() => $route.params.invited)
|
||||
const regexpire = computed(() => $route.params.regexpire)
|
||||
const username_default = computed(() => $route.params.username_default)
|
||||
const name_default = computed(() => $route.params.name_default)
|
||||
|
||||
// @ts-ignore
|
||||
watch(() => invited, (newval, oldval) => {
|
||||
console.log('$route.params.invited')
|
||||
adult.value = !!$route.params.invited
|
||||
})
|
||||
|
||||
function created() {
|
||||
if (!tools.getCookie(tools.APORTADOR_SOLIDARIO, '')) {
|
||||
// @ts-ignore
|
||||
tools.setCookie(tools.APORTADOR_SOLIDARIO, $route.params.invited ? $route.params.invited : '')
|
||||
}
|
||||
}
|
||||
|
||||
created()
|
||||
|
||||
return {
|
||||
regexpire,
|
||||
username_default,
|
||||
name_default,
|
||||
}
|
||||
},
|
||||
})
|
||||
13
src/views/login/signup_collettivo/signup_collettivo.vue
Executable file
13
src/views/login/signup_collettivo/signup_collettivo.vue
Executable file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<q-page padding class="signup">
|
||||
<CSignUp :showcell="false" :showaportador="true" :show_namesurname="true" :need_Telegram="true" :regexpire="regexpire" :collettivo="true" :name_default="name_default" :username_default="username_default">
|
||||
|
||||
</CSignUp>
|
||||
</q-page>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./signup_collettivo.ts">
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import './signup_collettivo.scss';
|
||||
</style>
|
||||
@@ -29,8 +29,55 @@
|
||||
<div class="q-gutter-sm q-pa-sm q-pb-md">
|
||||
<div
|
||||
v-if="myuser && myuser.date_reg"
|
||||
class="row wrap justify-evenly items-center content-start"
|
||||
class="fit column no-wrap justify-evenly items-center content-start"
|
||||
>
|
||||
<div class="">
|
||||
<q-avatar size="140px">
|
||||
<q-img
|
||||
:src="myuser.profile ? getImgUser(myuser.profile) : ''"
|
||||
:alt="username"
|
||||
img-class="imgprofile"
|
||||
height="140px"
|
||||
@click="showPic = true"
|
||||
/>
|
||||
<q-badge
|
||||
v-if="tools.isUserOnline(myuser)"
|
||||
align="top"
|
||||
floating
|
||||
color="green"
|
||||
>online</q-badge
|
||||
>
|
||||
</q-avatar>
|
||||
</div>
|
||||
|
||||
<div class="last_access">
|
||||
OnLine: {{ tools.timeAgo(myuser.lasttimeonline) }}
|
||||
</div>
|
||||
|
||||
<div v-if="myuser.reported">
|
||||
<CTitleBanner
|
||||
title="⚠️ L'utente è stato Segnalato per comportamento non idoneo."
|
||||
bgcolor="bg-red"
|
||||
clcolor="text-white"
|
||||
>
|
||||
</CTitleBanner>
|
||||
</div>
|
||||
|
||||
<div v-if="site && site.confpages && site.confpages.showNameSurname">
|
||||
<div class="text-h6">
|
||||
<span v-if="checkifShow('name') && myuser.name">
|
||||
{{ myuser.name }}</span
|
||||
>
|
||||
<span v-if="checkifShow('surname') && myuser.surname"
|
||||
> {{ myuser.surname }}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 text-h7 text-blue text-shadow-2">
|
||||
{{ myuser.username }}
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<CTitleBanner
|
||||
v-if="site.confpages.showCompetenze"
|
||||
class=""
|
||||
@@ -40,24 +87,10 @@
|
||||
myclass="myshad"
|
||||
:canopen="true"
|
||||
>
|
||||
<div
|
||||
class="fit column no-wrap justify-evenly items-center content-start"
|
||||
>
|
||||
<div v-if="site.confpages.showNameSurname">
|
||||
<div class="text-h6">
|
||||
<span v-if="checkifShow('name') && myuser.name"> {{ myuser.name }}</span>
|
||||
<span v-if="checkifShow('surname') && myuser.surname"> {{
|
||||
myuser.surname
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 text-h7 text-blue text-shadow-2">
|
||||
{{ myuser.username }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div v-for="(card, ind) of mycards" :key="ind" :name="card.table">
|
||||
<div class="text-h6">{{card.title}}</div>
|
||||
<div class="text-h6">{{ card.title }}</div>
|
||||
<div v-if="card.table === 'mygroups'">
|
||||
<q-list>
|
||||
<span
|
||||
@@ -65,7 +98,7 @@
|
||||
:key="index"
|
||||
class="q-my-sm q-mx-none"
|
||||
clickable
|
||||
>
|
||||
>
|
||||
<CMyGroup :mygrp="grp" :visu="costanti.USER_GROUPS">
|
||||
</CMyGroup>
|
||||
</span>
|
||||
|
||||
@@ -7,6 +7,7 @@ import { CCheckIfIsLogged } from '@/components/CCheckIfIsLogged'
|
||||
import { CMyFieldRec } from '@/components/CMyFieldRec'
|
||||
import { CCurrencyValue } from '@/components/CCurrencyValue'
|
||||
import { CSaldo } from '@/components/CSaldo'
|
||||
import { CTitleSec } from '@/components/CTitleSec'
|
||||
import { CSkill } from '@/components/CSkill'
|
||||
import { CDateTime } from '@/components/CDateTime'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
@@ -29,7 +30,7 @@ import { useCircuitStore } from '@store/CircuitStore'
|
||||
export default defineComponent({
|
||||
name: 'mycircuit',
|
||||
components: {
|
||||
CProfile, CTitleBanner, CMyFieldRec, CSkill, CDateTime, CMyFriends,
|
||||
CProfile, CTitleBanner, CMyFieldRec, CSkill, CTitleSec, CDateTime, CMyFriends,
|
||||
CGridTableRec, CMyUser, CCheckIfIsLogged, CCurrencyValue, CSaldo, CNotifAtTop
|
||||
},
|
||||
props: {},
|
||||
@@ -43,6 +44,8 @@ export default defineComponent({
|
||||
|
||||
const showonlymine = ref(true)
|
||||
const tabellare = ref(false)
|
||||
const groupsListAdmin = ref(<string[]>[])
|
||||
const groupnameSel = ref('')
|
||||
|
||||
const animation = ref('fade')
|
||||
|
||||
@@ -70,11 +73,13 @@ export default defineComponent({
|
||||
|
||||
const arrfilterand: any = ref([])
|
||||
const filterextra: any = ref([])
|
||||
const filterextra_group: any = ref([])
|
||||
const filterextra2: any = ref([])
|
||||
const filtercustom: any = ref([])
|
||||
const filtercustom_rich: any = ref([])
|
||||
const searchList = ref([] as ISearchList[])
|
||||
|
||||
|
||||
const cities = ref([] as ICity[])
|
||||
|
||||
watch(() => path.value, (to: any, from: any) => {
|
||||
@@ -117,20 +122,7 @@ export default defineComponent({
|
||||
|
||||
];
|
||||
|
||||
filterextra.value = [
|
||||
/*{
|
||||
'profile.mycircuits':
|
||||
{
|
||||
$elemMatch: {
|
||||
circuitname:
|
||||
{ $eq: circuit.value.name }
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
*/
|
||||
|
||||
{
|
||||
filterextra.value = [ {
|
||||
$match: {
|
||||
idapp: process.env.APP_ID,
|
||||
'profile.mycircuits': {
|
||||
@@ -199,6 +191,68 @@ export default defineComponent({
|
||||
},
|
||||
{ $unwind: '$account' },
|
||||
]
|
||||
|
||||
filterextra_group.value = [ {
|
||||
$match: {
|
||||
idapp: process.env.APP_ID,
|
||||
'mycircuits': {
|
||||
$elemMatch: { circuitname: { $eq: circuit.value.name } },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
$lookup: {
|
||||
from: 'circuits',
|
||||
as: 'circuit',
|
||||
let: { circuitname: circuit.value.name, idapp: '$idapp' },
|
||||
pipeline: [
|
||||
{
|
||||
$match:
|
||||
{
|
||||
$expr:
|
||||
{
|
||||
$and:
|
||||
[
|
||||
{ $eq: ['$name', '$$circuitname'] },
|
||||
{ $eq: ['$idapp', '$$idapp'] },
|
||||
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
},
|
||||
{ $unwind: '$circuit' },
|
||||
{
|
||||
$project: {
|
||||
groupname: 1,
|
||||
title: 1,
|
||||
descr: 1,
|
||||
photos: 1,
|
||||
surname: 1,
|
||||
admins: 1,
|
||||
idapp: 1,
|
||||
'circuit.name': 1, 'circuit._id': 1
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
$lookup: {
|
||||
from: 'accounts',
|
||||
localField: 'circuit._id',
|
||||
foreignField: 'circuitId',
|
||||
as: 'account',
|
||||
},
|
||||
},
|
||||
{
|
||||
$unwind: '$account',
|
||||
},
|
||||
{ $match: { 'account.groupname': { $exists: true, $ne: '' } }
|
||||
},
|
||||
]
|
||||
}
|
||||
arrfilterand.value = []
|
||||
filtercustom_rich.value = []
|
||||
@@ -212,6 +266,9 @@ export default defineComponent({
|
||||
async function mounted() {
|
||||
await loadCircuit()
|
||||
|
||||
if (userStore.my.username)
|
||||
groupsListAdmin.value = userStore.GroupsListWhereIAmAdmin(userStore.my.username)
|
||||
|
||||
}
|
||||
|
||||
function getImgCircuit() {
|
||||
@@ -257,6 +314,30 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
function extraparams_groups() {
|
||||
const lk_tab = 'mygroups'
|
||||
const lk_LF = 'userId'
|
||||
const lk_FF = '_id'
|
||||
const lk_as = 'group'
|
||||
const af_objId_tab = 'myId'
|
||||
|
||||
return {
|
||||
lookup1: {
|
||||
lk_tab,
|
||||
lk_LF,
|
||||
lk_FF,
|
||||
lk_as,
|
||||
af_objId_tab,
|
||||
lk_proj: {
|
||||
groupname: 1,
|
||||
title: 1,
|
||||
descr: 1,
|
||||
photos: 1,
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
function extraparams_rich() {
|
||||
return {
|
||||
querytype: shared_consts.QUERYTYPE_CIRCUIT,
|
||||
@@ -349,6 +430,10 @@ export default defineComponent({
|
||||
showonlymine,
|
||||
tabellare,
|
||||
showsaldi,
|
||||
extraparams_groups,
|
||||
filterextra_group,
|
||||
groupsListAdmin,
|
||||
groupnameSel,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -67,8 +67,10 @@
|
||||
</CSaldo>
|
||||
<div>
|
||||
<q-banner
|
||||
v-if="userStore.my.profile.calc.numGoodsAndServices <= 0 &&
|
||||
userStore.IsMyCircuitByName(circuit.name)"
|
||||
v-if="
|
||||
userStore.my.profile.calc.numGoodsAndServices <= 0 &&
|
||||
userStore.IsMyCircuitByName(circuit.name)
|
||||
"
|
||||
rounded
|
||||
class="bg-orange text-white"
|
||||
style="text-align: center"
|
||||
@@ -107,7 +109,8 @@
|
||||
</q-banner>
|
||||
|
||||
<q-btn
|
||||
v-if="userStore.my.profile.calc.numGoodsAndServices > 0 &&
|
||||
v-if="
|
||||
userStore.my.profile.calc.numGoodsAndServices > 0 &&
|
||||
!userStore.IsMyCircuitByName(circuit.name) &&
|
||||
!userStore.IsAskedCircuitByName(circuit.name) &&
|
||||
!userStore.IsRefusedCircuitByName(circuit.name)
|
||||
@@ -115,7 +118,10 @@
|
||||
icon="fas fa-user-plus"
|
||||
color="primary"
|
||||
:label="$t('circuit.ask')"
|
||||
@click="requestToEnterCircuit = true"
|
||||
@click="
|
||||
requestToEnterCircuit = true;
|
||||
groupnameSel = null;
|
||||
"
|
||||
/>
|
||||
<q-btn
|
||||
v-if="userStore.IsMyCircuitByName(circuit.name)"
|
||||
@@ -222,16 +228,100 @@
|
||||
icon="fas fa-file-word"
|
||||
></q-tab>
|
||||
<q-tab
|
||||
v-if="tools.iAmAdminCircuit(circuit.name)"
|
||||
:label="t('circuit.conticomunitari')"
|
||||
name="accounts"
|
||||
v-if="false && tools.iAmAdminCircuit(circuit.name)"
|
||||
:label="t('circuit.gruppicom')"
|
||||
name="gruppicom"
|
||||
icon="fas fa-coins"
|
||||
></q-tab>
|
||||
</q-tabs>
|
||||
|
||||
<q-tab-panels v-model="tabcircuit" animated>
|
||||
<q-tab-panel name="accounts">
|
||||
<q-tab-panel name="gruppicom">
|
||||
<div
|
||||
v-for="(group, ind) of groupsListAdmin"
|
||||
:key="ind"
|
||||
class="q-pa-sm"
|
||||
>
|
||||
<q-btn
|
||||
v-if="group.groupname &&
|
||||
!circuitStore.IsAskedCircuitByNameAndGroup(
|
||||
circuit.name,
|
||||
group.groupname
|
||||
) &&
|
||||
!userStore.IsMyCircuitByNameAndGroup(
|
||||
circuit.name,
|
||||
group.groupname
|
||||
)
|
||||
"
|
||||
icon="fas fa-user-plus"
|
||||
color="primary"
|
||||
:label="$t('circuit.ask') + ' con ' + group.groupname"
|
||||
@click="
|
||||
requestToEnterCircuit = true;
|
||||
groupnameSel = group;
|
||||
"
|
||||
/>
|
||||
<q-btn
|
||||
v-else-if="group.groupname && circuitStore.IsAskedCircuitByNameAndGroup(
|
||||
circuit.name,
|
||||
group.groupname
|
||||
) &&
|
||||
!userStore.IsMyCircuitByNameAndGroup(
|
||||
circuit.name,
|
||||
group.groupname
|
||||
)"
|
||||
icon="fas fa-user-minus"
|
||||
flat
|
||||
:label="$t('shared.cancel_ask_short')"
|
||||
@click="
|
||||
tools.cancelReqCircuit(
|
||||
$q,
|
||||
userStore.my.username,
|
||||
circuit.name,
|
||||
group.groupname,
|
||||
)
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<CTitleSec title="Lista Gruppi Comunitari" />
|
||||
|
||||
<CGridTableRec
|
||||
v-if="!loading"
|
||||
ref="tabGroups"
|
||||
prop_mytable="mygroups"
|
||||
prop_mytitle=""
|
||||
:prop_mycolumns="
|
||||
showsaldi ? colmyUserPeopleSaldi : colmyUserPeople
|
||||
"
|
||||
prop_colkey="_id"
|
||||
col_title="groupname"
|
||||
:vertical="costanti.VISUTABLE_GROUP_CIRCUIT"
|
||||
nodataLabel="Nessun Gruppo Comunitario"
|
||||
:prop_search="true"
|
||||
hint="gruppo da trovare"
|
||||
:finder="false"
|
||||
:choose_visutype="true"
|
||||
:finder_noNull="false"
|
||||
:options="shared_consts.OPTIONS_SEARCH_USER_ALL_WORDS"
|
||||
:butt_modif_new="false"
|
||||
noresultLabel="gruppo non trovato"
|
||||
:arrfilters="arrfilterand"
|
||||
:filtercustom="filtercustom"
|
||||
:filterextra="filterextra_group"
|
||||
:filterextra2="filterextra2"
|
||||
:prop_searchList="searchList"
|
||||
:showType="costanti.SHOW_GROUPINFO"
|
||||
:showCol="false"
|
||||
:circuitname="circuit.name"
|
||||
extraparams=""
|
||||
:visufind="
|
||||
tools.iAmAdminCircuit(circuit.name)
|
||||
? costanti.REQ_REMOVE_USER_TO_CIRCUIT
|
||||
: costanti.FIND_PEOPLE
|
||||
"
|
||||
>
|
||||
</CGridTableRec>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="mov">
|
||||
<q-toggle
|
||||
@@ -418,6 +508,36 @@
|
||||
>
|
||||
</CCurrencyValue>
|
||||
</div>
|
||||
<div
|
||||
v-if="circuit.fido_scoperto_default_grp"
|
||||
class="sezioni"
|
||||
>
|
||||
<CCurrencyValue
|
||||
:symbol="tools.getSymbolByCircuit(circuit)"
|
||||
:color="tools.getColorByCircuit(circuit)"
|
||||
color_border="red"
|
||||
:value="circuit.fido_scoperto_default_grp"
|
||||
icon="fas fa-battery-quarter"
|
||||
:label="t('circuit.fido_scoperto_default_grp')"
|
||||
:tips="t('circuit.fido_scoperto_default_tips_grp')"
|
||||
>
|
||||
</CCurrencyValue>
|
||||
</div>
|
||||
<div
|
||||
v-if="circuit.fido_scoperto_default_grp"
|
||||
class="sezioni"
|
||||
>
|
||||
<CCurrencyValue
|
||||
:symbol="tools.getSymbolByCircuit(circuit)"
|
||||
:color="tools.getColorByCircuit(circuit)"
|
||||
color_border="green"
|
||||
:value="circuit.qta_max_default_grp"
|
||||
icon="fas fa-battery-quarter"
|
||||
:label="t('circuit.qta_max_default_grp')"
|
||||
:tips="t('circuit.qta_max_default_tips_grp')"
|
||||
>
|
||||
</CCurrencyValue>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sezioni">
|
||||
<q-icon name="fas fa-stats" class="iconcirc"></q-icon>
|
||||
@@ -701,6 +821,9 @@
|
||||
<!--:style="tools.displayStyles(myevent) + ` min-width: `+ tools.myheight_dialog() + `px;`">-->
|
||||
<q-toolbar-title>
|
||||
{{ circuit.name }}
|
||||
<div v-if="groupnameSel">
|
||||
Gruppo: {{ groupnameSel.groupname }}
|
||||
</div>
|
||||
</q-toolbar-title>
|
||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||
</q-toolbar>
|
||||
@@ -708,7 +831,9 @@
|
||||
<div v-html="t('circuit.disclaimer')"></div>
|
||||
</q-card-section>
|
||||
<q-card-section class="inset-shadow">
|
||||
<div style="font-weight: bold; font-size: 1.25rem;">Regolamento:</div>
|
||||
<div style="font-weight: bold; font-size: 1.25rem">
|
||||
Regolamento:
|
||||
</div>
|
||||
<div v-html="circuit.regulation"></div>
|
||||
</q-card-section>
|
||||
<q-card-actions align="center">
|
||||
@@ -723,7 +848,8 @@
|
||||
$q,
|
||||
userStore.my.username,
|
||||
circuit.name,
|
||||
true
|
||||
true,
|
||||
groupnameSel ? groupnameSel.groupname : ''
|
||||
);
|
||||
"
|
||||
/>
|
||||
|
||||
@@ -7,6 +7,7 @@ import { CCheckIfIsLogged } from '@/components/CCheckIfIsLogged'
|
||||
import { CMyFieldRec } from '@/components/CMyFieldRec'
|
||||
import { CSkill } from '@/components/CSkill'
|
||||
import { CDateTime } from '@/components/CDateTime'
|
||||
import { CSaldo } from '@/components/CSaldo'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
@@ -16,19 +17,22 @@ import { useI18n } from '@/boot/i18n'
|
||||
import { toolsext } from '@store/Modules/toolsext'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { costanti } from '@costanti'
|
||||
import { ICity, IFriends, IMyGroup, ISearchList, IUserFields } from 'model'
|
||||
import { ICircuit, ICity, IFriends, IMyCircuit, IMyGroup, ISearchList, IUserFields } from 'model'
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
import { colmyUserPeople, colmyUserGroup } from '@store/Modules/fieldsTable'
|
||||
import { useNotifStore } from '@store/NotifStore'
|
||||
import { useCircuitStore } from '@src/store/CircuitStore'
|
||||
|
||||
|
||||
export default defineComponent({
|
||||
name: 'mygroup',
|
||||
components: { CProfile, CTitleBanner, CMyFieldRec, CSkill, CDateTime, CMyFriends, CGridTableRec, CMyUser, CCheckIfIsLogged },
|
||||
components: { CProfile, CTitleBanner, CMyFieldRec,
|
||||
CSaldo, CSkill, CDateTime, CMyFriends, CGridTableRec, CMyUser, CCheckIfIsLogged },
|
||||
props: {},
|
||||
setup() {
|
||||
const userStore = useUserStore()
|
||||
const notifStore = useNotifStore()
|
||||
const circuitStore = useCircuitStore()
|
||||
const $route = useRoute()
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
@@ -41,7 +45,7 @@ export default defineComponent({
|
||||
const filtroutente = ref(<any[]>[])
|
||||
const showPic = ref(false)
|
||||
|
||||
const mygrp = ref(<IMyGroup|null>{})
|
||||
const mygrp = ref(<IMyGroup | null>{})
|
||||
const mystatus = ref(<number>0)
|
||||
const users_in_group = ref(<IFriends[]>[])
|
||||
|
||||
@@ -58,6 +62,8 @@ export default defineComponent({
|
||||
|
||||
const cities = ref(<ICity[]>[])
|
||||
|
||||
const circuitslist = ref(<ICircuit[] | null | undefined>[])
|
||||
|
||||
function profile() {
|
||||
return userStore.my.profile
|
||||
}
|
||||
@@ -69,13 +75,18 @@ export default defineComponent({
|
||||
async function loadGroup() {
|
||||
// Carica il profilo di quest'utente
|
||||
if (groupname.value) {
|
||||
await userStore.loadGroup(groupname.value, idnotif.value).then(({ data, status }: {data: any, status: number}) => {
|
||||
await userStore.loadGroup(groupname.value, idnotif.value).then(({ data, status }: { data: any, status: number }) => {
|
||||
console.log('data', data)
|
||||
circuitslist.value = []
|
||||
if (data) {
|
||||
mygrp.value = data.mygroup
|
||||
cities.value = data.cities
|
||||
notifStore.setAsRead(idnotif.value)
|
||||
users_in_group.value = data.users_in_group
|
||||
|
||||
if (mygrp.value && tools.iAmAdminGroup(groupname.value)) {
|
||||
circuitslist.value = circuitStore.getCircuitsListByGroup(mygrp.value)
|
||||
}
|
||||
} else {
|
||||
mygrp.value = null
|
||||
users_in_group.value = []
|
||||
@@ -99,7 +110,7 @@ export default defineComponent({
|
||||
await loadGroup()
|
||||
|
||||
searchList.value = []
|
||||
filtercustom.value = [{ 'profile.mygroups': { $elemMatch: {groupname: {$eq: groupname.value }} } } ]
|
||||
filtercustom.value = [{ 'profile.mygroups': { $elemMatch: { groupname: { $eq: groupname.value } } } }]
|
||||
|
||||
arrfilterand.value = []
|
||||
filtercustom_rich.value = []
|
||||
@@ -236,6 +247,7 @@ export default defineComponent({
|
||||
loading,
|
||||
mystatus,
|
||||
cities,
|
||||
circuitslist,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,35 +1,45 @@
|
||||
<template>
|
||||
|
||||
<div class="q-gutter-sm q-pa-sm q-pb-md">
|
||||
<div v-if="!mygrp && !loading">
|
||||
<div v-if="mystatus === 403">
|
||||
<h3>Non hai i permessi per accedere al Gruppo.<br>
|
||||
<h3>
|
||||
Non hai i permessi per accedere al Gruppo.<br />
|
||||
|
||||
Occorre prima registrarsi alla App </h3>
|
||||
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="mygrp.descr" class="fit column no-wrap justify-evenly items-center content-start">
|
||||
|
||||
<div
|
||||
v-if="mygrp.descr"
|
||||
class="fit column no-wrap justify-evenly items-center content-start"
|
||||
>
|
||||
<div class="">
|
||||
<q-avatar size="140px">
|
||||
<q-img :src="getImgGrp()" :alt="mygrpname()" img-class="imgprofile" height="140px" @click="showPic = true"/>
|
||||
<q-img
|
||||
:src="getImgGrp()"
|
||||
:alt="mygrpname()"
|
||||
img-class="imgprofile"
|
||||
height="140px"
|
||||
@click="showPic = true"
|
||||
/>
|
||||
</q-avatar>
|
||||
</div>
|
||||
|
||||
<div class="text-h6">
|
||||
<span v-if="checkifShow('name')"> {{ mygrp.title }}</span>
|
||||
</div>
|
||||
<div v-if="mygrp.title !== mygrp.groupname" class="col-12 text-h7 text-blue text-shadow-2">
|
||||
<div
|
||||
v-if="mygrp.title !== mygrp.groupname"
|
||||
class="col-12 text-h7 text-blue text-shadow-2"
|
||||
>
|
||||
{{ mygrp.groupname }}
|
||||
</div>
|
||||
|
||||
@@ -37,58 +47,111 @@
|
||||
v-if="userStore.IsRefusedGroupByGroupname(mygrp.groupname)"
|
||||
rounded
|
||||
class="bg-red text-white"
|
||||
style="text-align: center;"
|
||||
style="text-align: center"
|
||||
>
|
||||
<em style="font-weight: bold">{{ $t('db.youarerefusedgroup') }}</em><br>
|
||||
<em style="font-weight: bold">{{ $t('db.youarerefusedgroup') }}</em
|
||||
><br />
|
||||
</q-banner>
|
||||
|
||||
|
||||
<div>
|
||||
<q-btn
|
||||
v-if="!userStore.IsMyGroupByGroupname(mygrp.groupname) && !userStore.IsAskedGroupByGroupname(mygrp.groupname) && !userStore.IsRefusedGroupByGroupname(mygrp.groupname)"
|
||||
v-if="
|
||||
!userStore.IsMyGroupByGroupname(mygrp.groupname) &&
|
||||
!userStore.IsAskedGroupByGroupname(mygrp.groupname) &&
|
||||
!userStore.IsRefusedGroupByGroupname(mygrp.groupname)
|
||||
"
|
||||
icon="fas fa-user-plus"
|
||||
color="primary" :label="$t('groups.ask_group')"
|
||||
@click="tools.setRequestGroup($q, userStore.my.username, mygrp.groupname, true)"
|
||||
color="primary"
|
||||
:label="$t('groups.ask_group')"
|
||||
@click="
|
||||
tools.setRequestGroup(
|
||||
$q,
|
||||
userStore.my.username,
|
||||
mygrp.groupname,
|
||||
true
|
||||
)
|
||||
"
|
||||
/>
|
||||
<q-btn
|
||||
v-if="userStore.IsMyGroupByGroupname(mygrp.groupname)"
|
||||
rounded icon="fas fa-ellipsis-h">
|
||||
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.removeFromMyGroups($q, userStore.my.username, mygrp.groupname, $t('db.domanda_exit_fromgroup', {groupname: mygrp.groupname }))">
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
tools.removeFromMyGroups(
|
||||
$q,
|
||||
userStore.my.username,
|
||||
mygrp.groupname,
|
||||
$t('db.domanda_exit_fromgroup', {
|
||||
groupname: mygrp.groupname,
|
||||
})
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="negative" name="fas fa-user-minus"/>
|
||||
<q-icon color="negative" name="fas fa-user-minus" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{ $t('groups.exit_group') }}</q-item-section>
|
||||
<q-item-section>{{
|
||||
$t('groups.exit_group')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-list v-if="tools.iAmAdminGroup(mygrp.groupname)" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.GROUPSCMD.DELETE_GROUP, userStore.my.username, '', mygrp.groupname)">
|
||||
<q-list
|
||||
v-if="tools.iAmAdminGroup(mygrp.groupname)"
|
||||
style="min-width: 200px"
|
||||
>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
tools.setCmd(
|
||||
$q,
|
||||
shared_consts.GROUPSCMD.DELETE_GROUP,
|
||||
userStore.my.username,
|
||||
'',
|
||||
mygrp.groupname
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="negative" name="fas fa-trash-alt"/>
|
||||
<q-icon color="negative" name="fas fa-trash-alt" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{ $t('groups.delete_group') }}</q-item-section>
|
||||
<q-item-section>{{
|
||||
$t('groups.delete_group')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
|
||||
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
v-if="userStore.IsAskedGroupByGroupname(mygrp.groupname) && !userStore.IsMyGroupByGroupname(mygrp.groupname)"
|
||||
v-if="
|
||||
userStore.IsAskedGroupByGroupname(mygrp.groupname) &&
|
||||
!userStore.IsMyGroupByGroupname(mygrp.groupname)
|
||||
"
|
||||
icon="fas fa-user-minus"
|
||||
flat :label="$t('shared.cancel_ask_short')"
|
||||
@click="tools.cancelReqGroups($q, userStore.my.username, mygrp.groupname)"
|
||||
flat
|
||||
:label="$t('shared.cancel_ask_short')"
|
||||
@click="
|
||||
tools.cancelReqGroups(
|
||||
$q,
|
||||
userStore.my.username,
|
||||
mygrp.groupname
|
||||
)
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-if="mygrp.descr" class="no-wrap justify-evenly items-center content-start">
|
||||
|
||||
|
||||
<div
|
||||
v-if="mygrp.descr"
|
||||
class="no-wrap justify-evenly items-center content-start"
|
||||
>
|
||||
<!--
|
||||
<q-btn
|
||||
v-if="tools.iAmAdminGroup(groupname)" icon="fas fa-pencil-alt"
|
||||
@@ -100,10 +163,35 @@
|
||||
-->
|
||||
|
||||
<q-tabs v-model="tabgrp" class="text-blue">
|
||||
<q-tab :label="t('shared.info1')" name="info" icon="fas fa-info"></q-tab>
|
||||
<q-tab v-if="!!mygrp.note" :label="t('groups.page')" name="page" icon="fas fa-file-word"></q-tab>
|
||||
<q-tab v-if="tools.iCanShowGroupsMember(mygrp) || tools.iAmAdminGroup(groupname)"
|
||||
:label="t('shared.subscribes')" name="members" icon="fas fa-users"></q-tab>
|
||||
<q-tab
|
||||
:label="t('shared.info1')"
|
||||
name="info"
|
||||
icon="fas fa-info"
|
||||
></q-tab>
|
||||
<q-tab
|
||||
v-if="!!mygrp.note"
|
||||
:label="t('groups.page')"
|
||||
name="page"
|
||||
icon="fas fa-file-word"
|
||||
></q-tab>
|
||||
<q-tab
|
||||
v-if="
|
||||
tools.iCanShowGroupsMember(mygrp) ||
|
||||
tools.iAmAdminGroup(groupname)
|
||||
"
|
||||
:label="t('shared.subscribes')"
|
||||
name="members"
|
||||
icon="fas fa-users"
|
||||
></q-tab>
|
||||
<q-tab
|
||||
v-if="
|
||||
tools.iCanShowGroupsMember(mygrp) ||
|
||||
tools.iAmAdminGroup(groupname)
|
||||
"
|
||||
:label="t('groups.circuits')"
|
||||
name="circuits"
|
||||
icon="fas fa-coins"
|
||||
></q-tab>
|
||||
</q-tabs>
|
||||
|
||||
<q-tab-panels v-model="tabgrp" animated>
|
||||
@@ -114,39 +202,66 @@
|
||||
<div class="text-h6">{{ t('groups.info') }}</div>
|
||||
</q-card-section>
|
||||
|
||||
<q-separator/>
|
||||
<q-separator />
|
||||
|
||||
<q-card-section>
|
||||
<div class="element">
|
||||
<q-icon name="fas fa-lightbulb"></q-icon>
|
||||
{{ $t('shared.createdby', {
|
||||
username: mygrp.createdBy,
|
||||
date: tools.getstrDateYY(mygrp.date_created), })
|
||||
{{
|
||||
$t('shared.createdby', {
|
||||
username: mygrp.createdBy,
|
||||
date: tools.getstrDateYY(mygrp.date_created),
|
||||
})
|
||||
}}
|
||||
</div>
|
||||
<div v-if="!!mygrp.date_updated && tools.getstrshortDate(mygrp.date_updated) !== tools.getstrshortDate(mygrp.createdBy)" class="element">
|
||||
<div
|
||||
v-if="
|
||||
!!mygrp.date_updated &&
|
||||
tools.getstrshortDate(mygrp.date_updated) !==
|
||||
tools.getstrshortDate(mygrp.createdBy)
|
||||
"
|
||||
class="element"
|
||||
>
|
||||
<q-icon name="fas fa-pencil-alt"></q-icon>
|
||||
{{ $t('shared.lastmodify', {
|
||||
date: tools.getstrDateYY(mygrp.date_updated), })
|
||||
{{
|
||||
$t('shared.lastmodify', {
|
||||
date: tools.getstrDateYY(mygrp.date_updated),
|
||||
})
|
||||
}}
|
||||
</div>
|
||||
|
||||
<div v-if="mygrp.visibility.includes(shared_consts.Visibility_Group.PRIVATE)" class="row">
|
||||
<div
|
||||
v-if="
|
||||
mygrp.visibility.includes(
|
||||
shared_consts.Visibility_Group.PRIVATE
|
||||
)
|
||||
"
|
||||
class="row"
|
||||
>
|
||||
<div class="q-pa-xs">
|
||||
<q-icon name="fas fa-lock"></q-icon>
|
||||
</div>
|
||||
<div>
|
||||
<div class="title_param"> {{ $t('groups.private') }}</div>
|
||||
<div class="title_param">
|
||||
{{ $t('groups.private') }}
|
||||
</div>
|
||||
{{ $t('groups.private_descr') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="mygrp.visibility.includes(shared_consts.Visibility_Group.HIDDEN)" class="row">
|
||||
<div
|
||||
v-if="
|
||||
mygrp.visibility.includes(
|
||||
shared_consts.Visibility_Group.HIDDEN
|
||||
)
|
||||
"
|
||||
class="row"
|
||||
>
|
||||
<div class="q-pa-xs">
|
||||
<q-icon name="fas fa-eye-slash"></q-icon>
|
||||
</div>
|
||||
<div>
|
||||
<div class="title_param"> {{ $t('groups.hidden') }}</div>
|
||||
<div class="title_param">{{ $t('groups.hidden') }}</div>
|
||||
{{ $t('groups.hidden_descr') }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -166,11 +281,21 @@
|
||||
|
||||
<div class="members">
|
||||
<q-icon name="fas fa-users"></q-icon>
|
||||
{{ numUsers() }} {{ numUsers() === 1 ? t('shared.member') : t('shared.members') }}
|
||||
{{ numUsers() }}
|
||||
{{
|
||||
numUsers() === 1
|
||||
? t('shared.member')
|
||||
: t('shared.members')
|
||||
}}
|
||||
</div>
|
||||
<div class="admins">
|
||||
<q-icon name="fas fa-user-cog"></q-icon>
|
||||
{{ numAdmins() }} {{ numAdmins() === 1 ? t('shared.admin') : t('shared.admins') }}
|
||||
{{ numAdmins() }}
|
||||
{{
|
||||
numAdmins() === 1
|
||||
? t('shared.admin')
|
||||
: t('shared.admins')
|
||||
}}
|
||||
</div>
|
||||
<div v-for="(user, index) of mygrp.admins" :key="index">
|
||||
<CMyUser
|
||||
@@ -183,13 +308,13 @@
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
||||
<br>
|
||||
<br />
|
||||
</div>
|
||||
<q-card v-if="mygrp.title">
|
||||
<q-card-section>
|
||||
<div class="text-h6">Descrizione:</div>
|
||||
</q-card-section>
|
||||
<q-separator/>
|
||||
<q-separator />
|
||||
|
||||
<q-card-section>
|
||||
<div class="col-12 text-h7">
|
||||
@@ -197,187 +322,215 @@
|
||||
</div>
|
||||
|
||||
<div class="col-6 q-ma-xs">
|
||||
|
||||
<q-btn
|
||||
v-if="getLinkGrpTelegram()" icon="fab fa-telegram"
|
||||
color="blue" type="a"
|
||||
v-if="getLinkGrpTelegram()"
|
||||
icon="fab fa-telegram"
|
||||
color="blue"
|
||||
type="a"
|
||||
size="md"
|
||||
rounded
|
||||
:label="$t('msgs.telegrammsg')"
|
||||
:href="getLinkGrpTelegram()" target="__blank">
|
||||
: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"
|
||||
v-if="getLinkWebSite()"
|
||||
icon="fas fa-globe"
|
||||
color="blue"
|
||||
type="a"
|
||||
size="md"
|
||||
rounded
|
||||
:label="$t('reg.website')"
|
||||
:href="getLinkWebSite()" target="__blank">
|
||||
:href="getLinkWebSite()"
|
||||
target="__blank"
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
||||
</q-tab-panel>
|
||||
|
||||
<q-tab-panel name="page">
|
||||
<div v-if="mygrp.note">
|
||||
<br>
|
||||
<br />
|
||||
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
||||
<div v-if="mygrp.note" v-html="mygrp.note">
|
||||
</div>
|
||||
<div v-if="mygrp.note" v-html="mygrp.note"></div>
|
||||
</div>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
|
||||
<q-tab-panel name="members" style="max-width: 500px;" v-if="tools.iCanShowGroupsMember(mygrp)">
|
||||
|
||||
<q-tab-panel
|
||||
name="members"
|
||||
style="max-width: 500px"
|
||||
v-if="tools.iCanShowGroupsMember(mygrp)"
|
||||
>
|
||||
<q-tabs
|
||||
v-show="tools.iAmAdminGroup(groupname)"
|
||||
v-model="tabmembers" class="text-blue">
|
||||
v-model="tabmembers"
|
||||
class="text-blue"
|
||||
>
|
||||
<q-tab label="Tutti" name="all" icon="fas fa-users"></q-tab>
|
||||
<q-tab v-if="tools.iAmAdminGroup(groupname)" label="Richieste" name="rich" icon="fas fa-user-plus"></q-tab>
|
||||
<q-tab v-if="tools.iAmAdminGroup(groupname)" label="Rifiutati" name="refused" icon="fas fa-user-minus"></q-tab>
|
||||
<q-tab
|
||||
v-if="tools.iAmAdminGroup(groupname)"
|
||||
label="Richieste"
|
||||
name="rich"
|
||||
icon="fas fa-user-plus"
|
||||
></q-tab>
|
||||
<q-tab
|
||||
v-if="tools.iAmAdminGroup(groupname)"
|
||||
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="groupname"
|
||||
:extraparams="extraparams()"
|
||||
:visufind="tools.iAmAdminGroup(groupname) ? costanti.REQ_REMOVE_USER_TO_GROUP : costanti.FIND_PEOPLE"
|
||||
>
|
||||
|
||||
</CGridTableRec>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="rich">
|
||||
|
||||
<CGridTableRec
|
||||
prop_mytable="mygroups"
|
||||
prop_mytitle=""
|
||||
:prop_mycolumns="colmyUserPeople"
|
||||
prop_colkey="_id"
|
||||
col_title=""
|
||||
:vertical="costanti.VISUTABLE_USER_TABGROUP"
|
||||
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="groupname"
|
||||
:visufind="costanti.REQ_ADD_USER_TO_GROUP"
|
||||
>
|
||||
|
||||
</CGridTableRec>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="refused">
|
||||
|
||||
<CGridTableRec
|
||||
prop_mytable="mygroups"
|
||||
prop_mytitle=""
|
||||
:prop_mycolumns="colmyUserPeople"
|
||||
prop_colkey="_id"
|
||||
col_title=""
|
||||
:vertical="costanti.VISUTABLE_USER_TABGROUP"
|
||||
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="groupname"
|
||||
:visufind="costanti.REQ_ADD_USER_TO_GROUP"
|
||||
>
|
||||
|
||||
</CGridTableRec>
|
||||
</q-tab-panel>
|
||||
<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="groupname"
|
||||
:extraparams="extraparams()"
|
||||
:visufind="
|
||||
tools.iAmAdminGroup(groupname)
|
||||
? costanti.REQ_REMOVE_USER_TO_GROUP
|
||||
: costanti.FIND_PEOPLE
|
||||
"
|
||||
>
|
||||
</CGridTableRec>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="rich">
|
||||
<CGridTableRec
|
||||
prop_mytable="mygroups"
|
||||
prop_mytitle=""
|
||||
:prop_mycolumns="colmyUserPeople"
|
||||
prop_colkey="_id"
|
||||
col_title=""
|
||||
:vertical="costanti.VISUTABLE_USER_TABGROUP"
|
||||
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="groupname"
|
||||
:visufind="costanti.REQ_ADD_USER_TO_GROUP"
|
||||
>
|
||||
</CGridTableRec>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="refused">
|
||||
<CGridTableRec
|
||||
prop_mytable="mygroups"
|
||||
prop_mytitle=""
|
||||
:prop_mycolumns="colmyUserPeople"
|
||||
prop_colkey="_id"
|
||||
col_title=""
|
||||
:vertical="costanti.VISUTABLE_SCHEDA_GROUP"
|
||||
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="groupname"
|
||||
:visufind="costanti.REQ_ADD_USER_TO_GROUP"
|
||||
>
|
||||
</CGridTableRec>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="circuits">
|
||||
<div v-for="(circuit, ind) of circuitslist" :key="ind">
|
||||
circuit.account: {{ circuit.account}}
|
||||
<CSaldo
|
||||
:account="circuit.account"
|
||||
:symbol="circuit.symbol"
|
||||
:color="circuit.color"
|
||||
:saldo="circuit.account"
|
||||
:qtarem="circuit.account ? circuitStore.getRemainingCoinsToSend(circuit.account) : 0"
|
||||
>
|
||||
</CSaldo>
|
||||
</div>
|
||||
</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"/>
|
||||
<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"/>
|
||||
<q-skeleton :animation="animation" />
|
||||
</div>
|
||||
<div class="col-12 text-h7 text-grey text-center">
|
||||
{{ groupname }}
|
||||
</div>
|
||||
<div class="col-12 text-h7">
|
||||
<q-skeleton :animation="animation"/>
|
||||
<q-skeleton :animation="animation" />
|
||||
</div>
|
||||
|
||||
<div class="col-12 text-h8 q-mt-sm">
|
||||
<q-skeleton :animation="animation"/>
|
||||
<q-skeleton :animation="animation" />
|
||||
</div>
|
||||
<div class="col-12 text-h8 q-mt-sm">
|
||||
<q-skeleton :animation="animation"/>
|
||||
<q-skeleton :animation="animation" />
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<q-dialog
|
||||
v-model="showPic"
|
||||
full-height full-width
|
||||
>
|
||||
|
||||
<img :src="getImgGrp()" :alt="groupname" class="full-width">
|
||||
|
||||
<q-dialog v-model="showPic" full-height full-width>
|
||||
<img :src="getImgGrp()" :alt="groupname" class="full-width" />
|
||||
</q-dialog>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./mygroup.ts">
|
||||
|
||||
@@ -294,14 +294,14 @@
|
||||
size="md"
|
||||
color="orange"
|
||||
:label="$t('profile.myactivities')"
|
||||
:to="`/skills/` + myuser.username"
|
||||
:to="`/attivita/` + myuser.username"
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6 q-ma-xs col-xs-12">
|
||||
<q-btn
|
||||
v-if="
|
||||
userStore.IsMyCircuitByUser(myuser).length > 0 &&
|
||||
userStore.getMyCircuitsInCommonByUser(myuser).length > 0 &&
|
||||
myuser.username !== myusername() &&
|
||||
userStore.my.profile.calc.numGoodsAndServices > 0
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user