Conti Comunitari e Collettivi
This commit is contained in:
@@ -38,6 +38,11 @@ export default defineComponent({
|
|||||||
required: false,
|
required: false,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
from_contocom: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
to_contocom: {
|
to_contocom: {
|
||||||
type: String,
|
type: String,
|
||||||
required: false,
|
required: false,
|
||||||
@@ -118,6 +123,9 @@ export default defineComponent({
|
|||||||
} else if (tipoConto.value === costanti.AccountType.COMMUNITY_ACCOUNT) {
|
} else if (tipoConto.value === costanti.AccountType.COMMUNITY_ACCOUNT) {
|
||||||
groupSel.value = userStore.my.profile.manage_mygroups.find((group: IMyGroup) => from_groupname.value === group.groupname)
|
groupSel.value = userStore.my.profile.manage_mygroups.find((group: IMyGroup) => from_groupname.value === group.groupname)
|
||||||
accountloaded.value = groupSel.value ? groupSel.value.account : null
|
accountloaded.value = groupSel.value ? groupSel.value.account : null
|
||||||
|
} else if (tipoConto.value === costanti.AccountType.COLLECTIVE_ACCOUNT) {
|
||||||
|
groupSel.value = userStore.my.profile.manage_mygroups.find((group: IMyGroup) => from_groupname.value === group.groupname)
|
||||||
|
accountloaded.value = groupSel.value ? groupSel.value.account : null
|
||||||
}
|
}
|
||||||
|
|
||||||
groupsListAdmin.value = userStore.GroupsListWhereIAmAdmin()
|
groupsListAdmin.value = userStore.GroupsListWhereIAmAdmin()
|
||||||
@@ -244,10 +252,13 @@ export default defineComponent({
|
|||||||
symbol: circuitloaded.value.symbol,
|
symbol: circuitloaded.value.symbol,
|
||||||
}
|
}
|
||||||
|
|
||||||
myrecsendcoin.groupdest = props.to_group ? props.to_group.groupname : props.to_contocom
|
myrecsendcoin.groupdest = props.to_group ? props.to_group.groupname : ''
|
||||||
|
myrecsendcoin.contoComDest = props.to_contocom
|
||||||
|
myrecsendcoin.grouporig = tipoConto.value === costanti.AccountType.COMMUNITY_ACCOUNT ? from_groupname.value : ''
|
||||||
|
myrecsendcoin.contoComOrig = tipoConto.value === costanti.AccountType.COLLECTIVE_ACCOUNT ? props.from_contocom : ''
|
||||||
|
|
||||||
myrecsendcoin.dest = props.to_user ? props.to_user.username : ''
|
myrecsendcoin.dest = props.to_user ? props.to_user.username : ''
|
||||||
|
|
||||||
myrecsendcoin.grouporig = tipoConto.value === costanti.AccountType.COMMUNITY_ACCOUNT ? from_groupname.value : ''
|
|
||||||
|
|
||||||
if (myrecsendcoin) {
|
if (myrecsendcoin) {
|
||||||
tools.sendCoinsByCircuit($q, circuitloaded.value, myrecsendcoin)
|
tools.sendCoinsByCircuit($q, circuitloaded.value, myrecsendcoin)
|
||||||
|
|||||||
@@ -1051,6 +1051,8 @@ export interface ISendCoin {
|
|||||||
dest: string
|
dest: string
|
||||||
groupdest: string
|
groupdest: string
|
||||||
grouporig: string
|
grouporig: string
|
||||||
|
contoComOrig?: string
|
||||||
|
contoComDest?: string
|
||||||
causal: string
|
causal: string
|
||||||
symbol: string
|
symbol: string
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1246,6 +1246,7 @@ const msg_it = {
|
|||||||
domanda_refuse_circuit: 'Rifiutare la richiesta di {username} per entrare nel Circuito {circuitname}?',
|
domanda_refuse_circuit: 'Rifiutare la richiesta di {username} per entrare nel Circuito {circuitname}?',
|
||||||
refusedcircuit: 'Rifiutato a {username} la richiesta di entrare nel Circuito',
|
refusedcircuit: 'Rifiutato a {username} la richiesta di entrare nel Circuito',
|
||||||
sendcoins: 'Invia Monete',
|
sendcoins: 'Invia Monete',
|
||||||
|
sendcoins_tocom: 'Invia a Conto Comunitario',
|
||||||
sendcoinsto: 'Invia {qty} {coin} a {dest}',
|
sendcoinsto: 'Invia {qty} {coin} a {dest}',
|
||||||
question_sendcoinsto: 'Inviare {qty} {coin} a {dest}?',
|
question_sendcoinsto: 'Inviare {qty} {coin} a {dest}?',
|
||||||
question_sendcoinsto_from: 'Inviare {qty} {coin} da {from} a {dest}?',
|
question_sendcoinsto_from: 'Inviare {qty} {coin} da {from} a {dest}?',
|
||||||
@@ -1292,8 +1293,10 @@ const msg_it = {
|
|||||||
movement: {
|
movement: {
|
||||||
transactionDate: 'Data Transazione',
|
transactionDate: 'Data Transazione',
|
||||||
accountFromId: 'Dal Conto',
|
accountFromId: 'Dal Conto',
|
||||||
|
accountFromCollId: 'Dal Conto Collettivo',
|
||||||
accountFromComId: 'Dal Conto Com.',
|
accountFromComId: 'Dal Conto Com.',
|
||||||
accountToId: 'Al Conto',
|
accountToId: 'Al Conto',
|
||||||
|
accountToCollId: 'Al Conto Collettivo',
|
||||||
accountToComId: 'Al Conto Com.',
|
accountToComId: 'Al Conto Com.',
|
||||||
amount_sent: 'Quantità inviate',
|
amount_sent: 'Quantità inviate',
|
||||||
amount_to_send: 'Quantità da inviare',
|
amount_to_send: 'Quantità da inviare',
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ export const costanti = {
|
|||||||
AccountType: {
|
AccountType: {
|
||||||
USER: 0,
|
USER: 0,
|
||||||
COMMUNITY_ACCOUNT: 1,
|
COMMUNITY_ACCOUNT: 1,
|
||||||
|
COLLECTIVE_ACCOUNT: 2,
|
||||||
},
|
},
|
||||||
|
|
||||||
Lang: {
|
Lang: {
|
||||||
|
|||||||
@@ -657,9 +657,11 @@ export const colmyMovementTable = [
|
|||||||
// AddCol({ name: '_id', label_trans: 'reg.id' }),
|
// AddCol({ name: '_id', label_trans: 'reg.id' }),
|
||||||
AddCol({ name: 'transactionDate', label_trans: 'movement.transactionDate', fieldtype: costanti.FieldType.date }),
|
AddCol({ name: 'transactionDate', label_trans: 'movement.transactionDate', fieldtype: costanti.FieldType.date }),
|
||||||
AddCol({ name: 'userfrom.username', field: 'userfrom', subfield: 'username', label_trans: 'movement.accountFromId', fieldtype: costanti.FieldType.string, required: true }),
|
AddCol({ name: 'userfrom.username', field: 'userfrom', subfield: 'username', label_trans: 'movement.accountFromId', fieldtype: costanti.FieldType.string, required: true }),
|
||||||
AddCol({ name: 'groupfrom.groupname', field: 'groupfrom', subfield: 'groupname', label_trans: 'movement.accountFromComId', fieldtype: costanti.FieldType.string, required: true }),
|
AddCol({ name: 'groupfrom.groupname', field: 'groupfrom', subfield: 'groupname', label_trans: 'movement.accountFromCollId', fieldtype: costanti.FieldType.string, required: true }),
|
||||||
|
AddCol({ name: 'contocomfrom.path', field: 'contocomfrom', subfield: 'path', label_trans: 'movement.accountFromComId', 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: 'userto.username', field: 'userto', subfield: 'username', label_trans: 'movement.accountToId', fieldtype: costanti.FieldType.string, required: true }),
|
||||||
AddCol({ name: 'groupto.groupname', field: 'groupto', subfield: 'groupname', label_trans: 'movement.accountToComId', fieldtype: costanti.FieldType.string, required: true }),
|
AddCol({ name: 'groupto.groupname', field: 'groupto', subfield: 'groupname', label_trans: 'movement.accountToCollId', fieldtype: costanti.FieldType.string, required: true }),
|
||||||
|
AddCol({ name: 'contocomto.path', field: 'contocomto', subfield: 'path', label_trans: 'movement.accountToComId', fieldtype: costanti.FieldType.string, required: true }),
|
||||||
|
|
||||||
AddCol({
|
AddCol({
|
||||||
name: 'amount', label_trans: 'movement.amount',
|
name: 'amount', label_trans: 'movement.amount',
|
||||||
|
|||||||
@@ -6195,8 +6195,8 @@ export const tools = {
|
|||||||
|
|
||||||
const username = userStore.my.username
|
const username = userStore.my.username
|
||||||
|
|
||||||
let orig = sendcoinrec.grouporig ? sendcoinrec.grouporig : ''
|
let orig = sendcoinrec.grouporig ? sendcoinrec.grouporig : (sendcoinrec.contoComOrig ? sendcoinrec.contoComOrig : '')
|
||||||
let dest = sendcoinrec.groupdest ? sendcoinrec.groupdest : sendcoinrec.dest
|
let dest = sendcoinrec.groupdest ? sendcoinrec.groupdest : (sendcoinrec.contoComDest ? sendcoinrec.contoComDest : sendcoinrec.dest)
|
||||||
|
|
||||||
let msg = ''
|
let msg = ''
|
||||||
if (orig) {
|
if (orig) {
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ export default defineComponent({
|
|||||||
const groupnameSel = ref('')
|
const groupnameSel = ref('')
|
||||||
|
|
||||||
const showsendCoinTo = ref(false)
|
const showsendCoinTo = ref(false)
|
||||||
|
const showrules = ref(false)
|
||||||
|
|
||||||
const animation = ref('fade')
|
const animation = ref('fade')
|
||||||
|
|
||||||
@@ -455,6 +456,7 @@ export default defineComponent({
|
|||||||
groupsListAdmin,
|
groupsListAdmin,
|
||||||
groupnameSel,
|
groupnameSel,
|
||||||
showsendCoinTo,
|
showsendCoinTo,
|
||||||
|
showrules,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -27,21 +27,30 @@
|
|||||||
v-if="circuit.name"
|
v-if="circuit.name"
|
||||||
class="fit column no-wrap justify-evenly items-center content-start"
|
class="fit column no-wrap justify-evenly items-center content-start"
|
||||||
>
|
>
|
||||||
<div class="">
|
<div class="row justify-center">
|
||||||
<q-avatar size="140px">
|
<q-avatar size="70px">
|
||||||
<q-img
|
<q-img
|
||||||
:src="getImgCircuit()"
|
:src="getImgCircuit()"
|
||||||
:alt="circuit.name"
|
:alt="circuit.name"
|
||||||
img-class="imgprofile"
|
img-class="imgprofile"
|
||||||
height="140px"
|
height="70px"
|
||||||
@click="showPic = true"
|
@click="showPic = true"
|
||||||
/>
|
/>
|
||||||
</q-avatar>
|
</q-avatar>
|
||||||
</div>
|
<div class="q-mx-sm text-h6" style="align-self: center">
|
||||||
|
|
||||||
<div class="text-h6">
|
|
||||||
<span v-if="checkifShow('name')"> {{ circuit.name }}</span>
|
<span v-if="checkifShow('name')"> {{ circuit.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<CSaldo
|
||||||
|
:symbol="circuit.symbol"
|
||||||
|
:account="account"
|
||||||
|
:color="circuit.color"
|
||||||
|
:saldo="saldo"
|
||||||
|
:qtarem="account ? qtarem : 0"
|
||||||
|
>
|
||||||
|
</CSaldo>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<q-banner
|
<q-banner
|
||||||
v-if="userStore.IsRefusedCircuitByName(circuit.name)"
|
v-if="userStore.IsRefusedCircuitByName(circuit.name)"
|
||||||
@@ -57,14 +66,6 @@
|
|||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<CSaldo
|
|
||||||
:symbol="circuit.symbol"
|
|
||||||
:account="account"
|
|
||||||
:color="circuit.color"
|
|
||||||
:saldo="saldo"
|
|
||||||
:qtarem="account ? qtarem : 0"
|
|
||||||
>
|
|
||||||
</CSaldo>
|
|
||||||
<div>
|
<div>
|
||||||
<q-banner
|
<q-banner
|
||||||
v-if="
|
v-if="
|
||||||
@@ -655,9 +656,16 @@
|
|||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
|
<div class="centermydiv">
|
||||||
|
<q-btn
|
||||||
|
label="vedi Regolamento"
|
||||||
|
@click="showrules = !showrules"
|
||||||
|
>
|
||||||
|
</q-btn>
|
||||||
|
</div>
|
||||||
<div class="col-12 text-h7">
|
<div class="col-12 text-h7">
|
||||||
<span
|
<span
|
||||||
v-if="checkifShow('descr')"
|
v-if="checkifShow('descr') && showrules"
|
||||||
v-html="circuit.regulation"
|
v-html="circuit.regulation"
|
||||||
></span>
|
></span>
|
||||||
</div>
|
</div>
|
||||||
@@ -672,7 +680,7 @@
|
|||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<div class="col-12 text-h7">
|
<div class="col-12 text-h7 text-center">
|
||||||
<span v-if="checkifShow('descr')">
|
<span v-if="checkifShow('descr')">
|
||||||
<CSaldo
|
<CSaldo
|
||||||
v-if="tools.isUserOk() && circuit.account"
|
v-if="tools.isUserOk() && circuit.account"
|
||||||
@@ -690,17 +698,19 @@
|
|||||||
>
|
>
|
||||||
</CSaldo>
|
</CSaldo>
|
||||||
</span>
|
</span>
|
||||||
|
<div class=""
|
||||||
|
v-if="tools.iAmAdminCircuit(circuit.name)">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="tools.iAmAdminCircuit(circuit.name)"
|
|
||||||
icon="fas fa-coins"
|
icon="fas fa-coins"
|
||||||
color="green"
|
color="green"
|
||||||
size="md"
|
size="md"
|
||||||
dense
|
rounded
|
||||||
|
:label="$t('circuit.sendcoins_tocom')"
|
||||||
@click="showsendCoinTo = true"
|
@click="showsendCoinTo = true"
|
||||||
>
|
>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
@@ -904,7 +914,9 @@
|
|||||||
<div style="font-weight: bold; font-size: 1.25rem">
|
<div style="font-weight: bold; font-size: 1.25rem">
|
||||||
Regolamento:
|
Regolamento:
|
||||||
</div>
|
</div>
|
||||||
<div v-html="circuit.regulation"></div>
|
<q-btn label="vedi Regolamento" @click="showrules = !showrules">
|
||||||
|
</q-btn>
|
||||||
|
<div v-if="showrules" v-html="circuit.regulation"></div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-actions align="center">
|
<q-card-actions align="center">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|||||||
Reference in New Issue
Block a user