fix button registration disabled
Conto Comunitario... passo 2
This commit is contained in:
@@ -41,9 +41,8 @@
|
||||
<div class="q-ma-sx">
|
||||
<q-btn
|
||||
v-if="
|
||||
userStore.getMyCircuitsInCommonByUser(myuser).length > 0 &&
|
||||
myuser.username !== myusername() &&
|
||||
userStore.my.profile.calc.numGoodsAndServices > 0
|
||||
userStore.getMyCircuitsInCommonByUser(myuser).length > 0 &&
|
||||
((contact.username !== userStore.my.username) || userStore.hoContiComunitariDaAmministrare())
|
||||
"
|
||||
icon="fas fa-coins"
|
||||
color="green"
|
||||
|
||||
@@ -1,20 +1,48 @@
|
||||
<template>
|
||||
<div v-if="small">
|
||||
<q-chip
|
||||
dense class="cltexth4 chipbooked shadow-5 q-pa-sm2"
|
||||
dense
|
||||
class="cltexth4 chipbooked shadow-5 q-pa-sm2"
|
||||
size="md"
|
||||
:color="value > 0 ? `green` : value === 0 ? `gray` : `red`" text-color="white"
|
||||
icon="fas fa-coins">
|
||||
{{ tools.roundDec2(value) }} <span class="text-currency"> <em class="q-pa-xxs text-white rounded-borders shadow-2" :style="`background-color: ` + (color ? color : '#ff5500')">{{ symbol }}</em></span>
|
||||
:color="value > 0 ? `green` : value === 0 ? `gray` : `red`"
|
||||
text-color="white"
|
||||
icon="fas fa-coins"
|
||||
>
|
||||
{{ tools.roundDec2(value) }}
|
||||
<span class="text-currency"
|
||||
> <em
|
||||
class="q-pa-xxs text-white rounded-borders shadow-2"
|
||||
:style="`background-color: ` + (color ? color : '#ff5500')"
|
||||
>{{ symbol }}</em
|
||||
></span
|
||||
>
|
||||
</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 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>
|
||||
</span>
|
||||
<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 ` + ($q.dark.isActive ? `text-grey-6`: `text-grey-14`)">
|
||||
<span v-if="small">
|
||||
<em
|
||||
class="q-px-xs text-white rounded-borders"
|
||||
:style="`background-color: ` + (color ? color : '#ff5500')"
|
||||
>{{ symbol }}</em
|
||||
>
|
||||
</span>
|
||||
<span v-else>{{ label }}</span>
|
||||
</div>
|
||||
<div>
|
||||
@@ -24,36 +52,42 @@
|
||||
:readonly="readonly"
|
||||
type="number"
|
||||
rounded
|
||||
:class="!small ? `q-px-sm text-h5`: `q-px-xs text-h7`"
|
||||
:class="!small ? `q-px-sm text-h5` : `q-px-xs text-h7`"
|
||||
:color="value > 0 ? `green` : `red`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<!--<img src="https://cdn.quasar.dev/logo-v2/svg/logo.svg">-->
|
||||
<q-btn v-if="tips && !small"
|
||||
icon="fas fa-info"
|
||||
color="primary" text-color="white"
|
||||
round
|
||||
size="sm"
|
||||
@click="showingtooltip = !showingtooltip"
|
||||
<q-btn
|
||||
v-if="tips && !small"
|
||||
icon="fas fa-info"
|
||||
color="primary"
|
||||
text-color="white"
|
||||
round
|
||||
size="sm"
|
||||
@click="showingtooltip = !showingtooltip"
|
||||
>
|
||||
|
||||
</q-btn>
|
||||
<q-icon v-else name="fas fa-coins" :size="small ? `xs`: `sm`"/>
|
||||
<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) }}
|
||||
<q-tooltip :offset="[10, 10]" v-model="showingtooltip">{{ tips }}</q-tooltip>
|
||||
<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>
|
||||
<template v-slot:append>
|
||||
<div v-if="!small" :class="small ? `text-h7-dense` : `text-h7`">
|
||||
<em class="q-px-sm text-white rounded-borders" :style="`background-color: ` + (color ? color : '#ff5500')">{{ symbol }}</em>
|
||||
<em
|
||||
class="q-px-sm text-white rounded-borders"
|
||||
:style="`background-color: ` + (color ? color : '#ff5500')"
|
||||
>{{ symbol }}</em
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</q-field>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -977,7 +977,7 @@
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CHECKIFISLOGGED">
|
||||
<q-select
|
||||
v-model="myel.container"
|
||||
:options="[{label: 'Mostra Sempre', value: true, label: 'Solo se Offline', value: false}]"
|
||||
:options="[{label: 'Mostra Sempre', value: true }, { label: 'Solo se Offline', value: false}]"
|
||||
label="Quando mostrarlo"
|
||||
emit-value
|
||||
map-options
|
||||
|
||||
@@ -59,8 +59,7 @@
|
||||
<q-btn
|
||||
v-if="
|
||||
userStore.getMyCircuitsInCommonByUser(contact).length > 0 &&
|
||||
contact.username !== userStore.my.username &&
|
||||
userStore.my.profile.calc.numGoodsAndServices > 0
|
||||
((contact.username !== userStore.my.username) || userStore.hoContiComunitariDaAmministrare())
|
||||
"
|
||||
icon="fas fa-coins"
|
||||
color="green"
|
||||
|
||||
@@ -69,7 +69,7 @@ export default defineComponent({
|
||||
const remainingCoins = ref(0)
|
||||
const maxsendable = ref(0)
|
||||
const numstep = ref(0)
|
||||
const tipoConto = ref(0)
|
||||
const tipoConto = ref(costanti.AccountType.USER)
|
||||
|
||||
const priceLabel = computed(() => circuitloaded.value ? `${qty.value} ` + circuitloaded.value.symbol : '')
|
||||
const arrayMarkerLabel = ref(<any>[])
|
||||
@@ -222,7 +222,8 @@ export default defineComponent({
|
||||
|
||||
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 : ''
|
||||
|
||||
myrecsendcoin.grouporig = tipoConto.value === costanti.AccountType.COMMUNITY_ACCOUNT ? from_groupname.value : ''
|
||||
|
||||
if (myrecsendcoin) {
|
||||
tools.sendCoinsByCircuit($q, circuitloaded.value, myrecsendcoin)
|
||||
|
||||
@@ -24,74 +24,96 @@
|
||||
>
|
||||
</q-select>
|
||||
|
||||
<CSaldo
|
||||
v-if="circuitloaded"
|
||||
:symbol="circuitloaded.symbol"
|
||||
:color="circuitloaded.color"
|
||||
:saldo="accountloaded ? accountloaded.saldo : 0"
|
||||
:qtarem="
|
||||
accountloaded
|
||||
? circuitStore.getRemainingCoinsToSend(accountloaded)
|
||||
: 0
|
||||
"
|
||||
<q-banner
|
||||
rounded
|
||||
dense
|
||||
class="shadow-5 q-my-sm"
|
||||
color="primary q-title"
|
||||
style="text-align: center"
|
||||
>
|
||||
</CSaldo>
|
||||
|
||||
<div>
|
||||
<q-btn-toggle
|
||||
v-model="tipoConto"
|
||||
class="my-custom-toggle"
|
||||
no-caps
|
||||
rounded
|
||||
unelevated
|
||||
toggle-color="primary"
|
||||
color="white"
|
||||
text-color="primary"
|
||||
:options="[
|
||||
{ label: 'Utente', value: costanti.AccountType.USER },
|
||||
{
|
||||
label: 'Conto Comunitario',
|
||||
value: costanti.AccountType.COMMUNITY_ACCOUNT,
|
||||
},
|
||||
]"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<q-input
|
||||
v-if="tipoConto === costanti.AccountType.USER"
|
||||
v-model="from_username"
|
||||
label="Mittente"
|
||||
class="full-width"
|
||||
readonly
|
||||
>
|
||||
</q-input>
|
||||
<div v-else>
|
||||
<q-select
|
||||
v-model="from_groupname"
|
||||
:options="arrGroupsList"
|
||||
label="Gruppo"
|
||||
rounded
|
||||
emit-value
|
||||
map-options
|
||||
<div class="mybanner_left bg-blue text-white q-mb-sm">
|
||||
{{$t('circuit.sender')}}:
|
||||
</div>
|
||||
<div>
|
||||
<q-btn-toggle
|
||||
v-if="arrGroupsList.length > 0"
|
||||
v-model="tipoConto"
|
||||
class="my-custom-toggle"
|
||||
no-caps
|
||||
rounded
|
||||
unelevated
|
||||
toggle-color="primary"
|
||||
color="white"
|
||||
text-color="primary"
|
||||
:options="[
|
||||
{ label: $t('circuit.user'), value: costanti.AccountType.USER },
|
||||
{
|
||||
label: $t('circuit.contocom'),
|
||||
value: costanti.AccountType.COMMUNITY_ACCOUNT,
|
||||
},
|
||||
]"
|
||||
/>
|
||||
</div>
|
||||
<q-input
|
||||
v-if="tipoConto === costanti.AccountType.USER"
|
||||
v-model="from_username"
|
||||
class="full-width"
|
||||
readonly
|
||||
>
|
||||
<!-- Mostra i gruppi su cui sei Admin -->
|
||||
</q-select>
|
||||
</div>
|
||||
</q-input>
|
||||
<div v-else>
|
||||
<q-select
|
||||
v-model="from_groupname"
|
||||
:options="arrGroupsList"
|
||||
:label="$t('circuit.choosecontocom')"
|
||||
rounded
|
||||
emit-value
|
||||
map-options
|
||||
>
|
||||
<!-- Mostra i gruppi su cui sei Admin -->
|
||||
</q-select>
|
||||
</div>
|
||||
|
||||
<!-- Destination -->
|
||||
<CMyUserOnlyView
|
||||
v-if="to_user"
|
||||
:mycontact="to_user"
|
||||
:visu="costanti.FIND_PEOPLE"
|
||||
@setCmd="tools.setCmd"
|
||||
labelextra="Destinatario"
|
||||
<CSaldo
|
||||
v-if="circuitloaded"
|
||||
:symbol="circuitloaded.symbol"
|
||||
:color="circuitloaded.color"
|
||||
:saldo="accountloaded ? accountloaded.saldo : 0"
|
||||
:qtarem="
|
||||
accountloaded
|
||||
? circuitStore.getRemainingCoinsToSend(accountloaded)
|
||||
: 0
|
||||
"
|
||||
>
|
||||
</CSaldo>
|
||||
</q-banner>
|
||||
|
||||
<q-banner
|
||||
rounded
|
||||
dense
|
||||
class="shadow-5 q-my-sm"
|
||||
color="primary q-title"
|
||||
>
|
||||
</CMyUserOnlyView>
|
||||
<div class="mybanner_left bg-green text-white q-mb-sm">
|
||||
{{$t('circuit.dest')}}
|
||||
</div>
|
||||
|
||||
<CMyGroupOnlyView v-if="to_group" :mygrp="to_group" :visu="costanti.USER_GROUPS"
|
||||
:circuitname="circuitloaded.name"
|
||||
labelextra="Destinatario">
|
||||
</CMyGroupOnlyView>
|
||||
<!-- Destination -->
|
||||
<CMyUserOnlyView
|
||||
v-if="to_user"
|
||||
:mycontact="to_user"
|
||||
:visu="costanti.FIND_PEOPLE"
|
||||
@setCmd="tools.setCmd"
|
||||
>
|
||||
</CMyUserOnlyView>
|
||||
<CMyGroupOnlyView
|
||||
v-if="to_group"
|
||||
:mygrp="to_group"
|
||||
:visu="costanti.USER_GROUPS"
|
||||
:circuitname="circuitloaded.name"
|
||||
>
|
||||
</CMyGroupOnlyView>
|
||||
</q-banner>
|
||||
|
||||
<div v-if="circuitloaded">
|
||||
<q-banner
|
||||
@@ -148,7 +170,7 @@
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<q-slider
|
||||
<!--<q-slider
|
||||
class="q-ma-xs"
|
||||
v-if="
|
||||
qty !== '' &&
|
||||
@@ -168,12 +190,12 @@
|
||||
:min="0"
|
||||
:max="Number(maxsendable ? maxsendable : 0)"
|
||||
/>
|
||||
</div>
|
||||
--></div>
|
||||
|
||||
<q-input
|
||||
ref="causalRef"
|
||||
v-model="causal"
|
||||
label="Note"
|
||||
:label="$t('circuit.note')"
|
||||
class="q-my-sm full-width"
|
||||
>
|
||||
</q-input>
|
||||
|
||||
@@ -296,7 +296,6 @@
|
||||
size="lg"
|
||||
color="positive"
|
||||
@click="submitOk"
|
||||
:disabled="!allowSubmit()"
|
||||
:label="$t('reg.submit')"
|
||||
>
|
||||
</q-btn>
|
||||
|
||||
Reference in New Issue
Block a user