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