Send Coins
This commit is contained in:
0
src/components/CCurrencyValue/CCurrencyValue.scss
Executable file
0
src/components/CCurrencyValue/CCurrencyValue.scss
Executable file
64
src/components/CCurrencyValue/CCurrencyValue.ts
Executable file
64
src/components/CCurrencyValue/CCurrencyValue.ts
Executable file
@@ -0,0 +1,64 @@
|
||||
import { defineComponent, onMounted, PropType, ref, watch } from 'vue'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
|
||||
import { date, useQuasar } from 'quasar'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CCurrencyValue',
|
||||
props: {
|
||||
label: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
tips: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
readonly: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
symbol: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
icon: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
value: {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
components: {},
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
|
||||
const showingtooltip = ref(false)
|
||||
|
||||
function created() {
|
||||
// created
|
||||
}
|
||||
|
||||
|
||||
onMounted(created)
|
||||
|
||||
return {
|
||||
showingtooltip,
|
||||
t,
|
||||
$q,
|
||||
}
|
||||
},
|
||||
})
|
||||
51
src/components/CCurrencyValue/CCurrencyValue.vue
Executable file
51
src/components/CCurrencyValue/CCurrencyValue.vue
Executable file
@@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<div v-if="value !== null" class="text-h5 bordo_stondato_stretto full-width">
|
||||
<div class="text-center text-h7-dense text-italic text-grey-14">
|
||||
{{ label }}
|
||||
</div>
|
||||
<div>
|
||||
<q-field
|
||||
dense
|
||||
borderless
|
||||
:readonly="readonly"
|
||||
type="number"
|
||||
rounded
|
||||
class="q-px-sm text-h5"
|
||||
color="green"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<!--<img src="https://cdn.quasar.dev/logo-v2/svg/logo.svg">-->
|
||||
<q-btn v-if="tips"
|
||||
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="sm"/>
|
||||
</template>
|
||||
<template v-slot:control>
|
||||
<div class="align_elem_right">{{ value }}
|
||||
<q-tooltip :offset="[10, 10]" v-model="showingtooltip">{{tips}}</q-tooltip>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:append>
|
||||
<div class="text-h5">
|
||||
<em class="q-px-sm text-white rounded-borders" :style="`background-color: ` + (color ? color : '#ff5500')">{{ symbol }}</em>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</q-field>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CCurrencyValue.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CCurrencyValue.scss';
|
||||
</style>
|
||||
1
src/components/CCurrencyValue/index.ts
Executable file
1
src/components/CCurrencyValue/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CCurrencyValue} from './CCurrencyValue.vue'
|
||||
@@ -881,7 +881,13 @@ export default defineComponent({
|
||||
try {
|
||||
numRecLoaded.value = numRecLoaded.value + (returnedData.value ? returnedData.value.length : 0)
|
||||
// console.log(' ...numRecLoaded.value', numRecLoaded.value)
|
||||
serverData.value = [...serverData.value, ...returnedData.value]
|
||||
let toadd = []
|
||||
for (const elem of returnedData.value) {
|
||||
if (serverData.value.findIndex((rec: any) => rec._id === elem._id) < 0) {
|
||||
toadd.push(elem)
|
||||
}
|
||||
}
|
||||
serverData.value = [...serverData.value, ...toadd]
|
||||
} catch (e) {
|
||||
serverData.value = []
|
||||
}
|
||||
|
||||
@@ -9,3 +9,8 @@
|
||||
.clpopupVisuCard{
|
||||
/*border-radius: $generic-border-radius */
|
||||
}
|
||||
.extrafield{
|
||||
color: black;
|
||||
font-size: 1rem;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import { CDateTime } from '../CDateTime'
|
||||
import { CLabel } from '../CLabel'
|
||||
import { CMyToggleList } from '../CMyToggleList'
|
||||
import { CMySelect } from '../CMySelect'
|
||||
import { CCurrencyValue } from '../CCurrencyValue'
|
||||
import { CMyEditor } from '../CMyEditor'
|
||||
import { CGallery } from '../CGallery'
|
||||
import { CAccomodation } from '../CAccomodation'
|
||||
@@ -185,7 +186,8 @@ export default defineComponent({
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
components: { CMyChipList, CDateTime, CDate, CMyToggleList, CMySelect, CMyEditor, CGallery, CLabel, CAccomodation },
|
||||
components: { CMyChipList, CDateTime, CDate, CMyToggleList, CMySelect, CMyEditor, CGallery,
|
||||
CCurrencyValue, CLabel, CAccomodation },
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
|
||||
@@ -10,13 +10,14 @@
|
||||
<div v-if="col.fieldtype === costanti.FieldType.boolean">
|
||||
<div v-if="isInModif">
|
||||
<q-toggle
|
||||
:disable="!isInModif"
|
||||
dark color="green" v-model="myvalue" :label="col.title ? col.title : col.label"
|
||||
@update:model-value="changevalRec"></q-toggle>
|
||||
</div>
|
||||
<div v-else>
|
||||
<q-toggle
|
||||
dark color="green" v-model="myvalue" :label="col.title"
|
||||
:disable="disable && col.name !== 'profile.saw_zoom_presentation'"
|
||||
:disable="disable && (col.name !== 'profile.saw_zoom_presentation') || !isInModif"
|
||||
@update:model-value="Savedb"></q-toggle>
|
||||
</div>
|
||||
</div>
|
||||
@@ -53,6 +54,9 @@
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.username_chip">
|
||||
<div class="q-ma-xs">
|
||||
<span v-if="col.extrafield">
|
||||
<span class="extrafield">{{t(col.extrafield)}}</span>
|
||||
</span>
|
||||
<q-btn v-if="col.tipovisu === costanti.TipoVisu.LINK && myvalue"
|
||||
rounded size="md"
|
||||
:class="{disabled: disable }"
|
||||
@@ -115,7 +119,7 @@
|
||||
<span v-else :class="{disabled: disable }" v-html="visuValByType(myvalue, col, row)"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.number">
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.number || col.fieldtype === costanti.FieldType.currency">
|
||||
<div v-if="canEdit || isInModif">
|
||||
<q-input
|
||||
v-bind="$attrs"
|
||||
@@ -129,6 +133,15 @@
|
||||
|
||||
</q-input>
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.currency">
|
||||
<CCurrencyValue
|
||||
:symbol="tools.getSymbolByCircuit(row)"
|
||||
:color="tools.getColorByCircuit(row)"
|
||||
:value="myvalue"
|
||||
:label="t(col.label_trans)">
|
||||
|
||||
</CCurrencyValue>
|
||||
</div>
|
||||
<div v-else>
|
||||
<span v-html="visuValByType(myvalue, col, row)"></span>
|
||||
</div>
|
||||
@@ -640,6 +653,16 @@
|
||||
<span v-html="visuValByType(myvalue, col, row)"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.currency">
|
||||
|
||||
<CCurrencyValue
|
||||
:symbol="tools.getSymbolByCircuit(row)"
|
||||
:color="tools.getColorByCircuit(row)"
|
||||
:value="scope.value"
|
||||
:label="t(col.label_trans)">
|
||||
|
||||
</CCurrencyValue>
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.hours">
|
||||
<div v-if="visulabel">
|
||||
<q-input
|
||||
|
||||
@@ -9,11 +9,12 @@ import { toolsext } from '@store/Modules/toolsext'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
import { CMyCardPopup } from '@/components/CMyCardPopup'
|
||||
import { CCurrencyValue } from '@/components/CCurrencyValue'
|
||||
// import { useRouter } from 'vue-router'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CMyRecCircuitCard',
|
||||
components: { CMyCardPopup },
|
||||
components: { CMyCardPopup, CCurrencyValue },
|
||||
emits: ['setCmd', 'cmdext'],
|
||||
props: {
|
||||
table: {
|
||||
|
||||
@@ -21,6 +21,17 @@
|
||||
</q-item-label>
|
||||
<q-item-label lines="3" v-if="myrec.longdescr">{{ myrec.longdescr }}<br>
|
||||
</q-item-label>
|
||||
<!--
|
||||
<CCurrencyValue
|
||||
:symbol="myrec.symbol"
|
||||
:tips="t('account.saldo_tips')"
|
||||
:color="myrec.color"
|
||||
:value="myrec.account.saldo"
|
||||
label="Saldo">
|
||||
|
||||
</CCurrencyValue>
|
||||
-->
|
||||
|
||||
</q-item-section>
|
||||
<q-item-section side v-if="tools.canModifyThisRec(myrec, table)">
|
||||
<q-item-label>
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { computed, defineComponent, onMounted, PropType, ref, watch } from 'vue'
|
||||
|
||||
import { ICircuit, IOperators, ISendCoin, ISpecialField, IUserFields } from '../../model'
|
||||
import { IAccount, ICircuit, IOperators, ISendCoin, ISpecialField, IUserFields } from '../../model'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { CCurrencyValue } from '@/components/CCurrencyValue'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useCircuitStore } from '@store/CircuitStore'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CSendCoins',
|
||||
@@ -19,9 +21,11 @@ export default defineComponent({
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
components: { CCurrencyValue },
|
||||
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
const show = ref(false)
|
||||
const userStore = useUserStore()
|
||||
const circuitStore = useCircuitStore()
|
||||
@@ -33,8 +37,16 @@ export default defineComponent({
|
||||
const causal = ref('')
|
||||
const bothcircuits = ref(<any>[])
|
||||
|
||||
const circuitloaded = ref(<ICircuit|undefined>undefined)
|
||||
const circuitloaded = ref(<ICircuit | undefined>undefined)
|
||||
const circuitdest = ref(<ICircuit | undefined>undefined)
|
||||
const accountloaded = ref(<IAccount | undefined>undefined)
|
||||
const accountdest = ref(<IAccount | undefined>undefined)
|
||||
const remainingCoins = ref(0)
|
||||
|
||||
const priceLabel = computed(() => circuitloaded.value ? `${qty.value} ` + circuitloaded.value.symbol : '')
|
||||
const arrayMarkerLabel = ref(<any>[])
|
||||
|
||||
const qtyRef = ref(null)
|
||||
|
||||
watch(() => circuitsel.value, (newval, oldval) => {
|
||||
aggiorna()
|
||||
@@ -47,7 +59,28 @@ export default defineComponent({
|
||||
|
||||
function aggiorna() {
|
||||
circuitloaded.value = circuitStore.listcircuits.find((rec: ICircuit) => rec.name === circuitsel.value)
|
||||
if (circuitloaded.value) {
|
||||
accountloaded.value = userStore.getAccountByCircuitId(circuitloaded.value._id)
|
||||
// accountdest.value = userStore.getAccountByCircuitId(circuitloaded.value._id)
|
||||
if (accountloaded.value) {
|
||||
remainingCoins.value = tools.getRemainingCoinsToSend(accountloaded.value)
|
||||
const quanti = [ ...Array(100).keys() ].map( i => i+1)
|
||||
for (const ind of quanti) {
|
||||
let value = ind * 10
|
||||
if (value > remainingCoins.value) {
|
||||
break
|
||||
} else {
|
||||
const label = value.toString()
|
||||
arrayMarkerLabel.value.push({value, label})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
console.log('circuitStore.listcircuits', circuitStore.listcircuits, 'aggiorna', circuitloaded.value)
|
||||
console.log('userStore.my.profile.mycircuits', userStore.my.profile.mycircuits)
|
||||
}
|
||||
|
||||
function mounted() {
|
||||
@@ -95,16 +128,23 @@ export default defineComponent({
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
t,
|
||||
tools,
|
||||
show,
|
||||
bothcircuits,
|
||||
from_username,
|
||||
circuitsel,
|
||||
circuitloaded,
|
||||
accountloaded,
|
||||
accountdest,
|
||||
qty,
|
||||
hide,
|
||||
sendCoin,
|
||||
causal,
|
||||
priceLabel,
|
||||
arrayMarkerLabel,
|
||||
remainingCoins,
|
||||
qtyRef,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -13,6 +13,15 @@
|
||||
<q-select rounded outlined v-model="circuitsel" :options="bothcircuits" label="Circuito">
|
||||
</q-select>
|
||||
|
||||
<CCurrencyValue
|
||||
:symbol="circuitloaded.symbol"
|
||||
:tips="t('account.saldo_tips')"
|
||||
:color="circuitloaded.color"
|
||||
:value="accountloaded ? accountloaded.saldo : 0"
|
||||
:label="t('account.saldo')">
|
||||
|
||||
</CCurrencyValue>
|
||||
|
||||
<q-input v-model="from_username" label="Mittente" class="full-width" disable>
|
||||
</q-input>
|
||||
<q-input v-model="to_user.username" label="Destinatario" class="full-width" disable>
|
||||
@@ -21,21 +30,39 @@
|
||||
</q-input>
|
||||
|
||||
|
||||
<q-input outlined v-model="qty" type="number"
|
||||
|
||||
label="Quantità"
|
||||
:prefix="circuitloaded.symbol">
|
||||
<q-input
|
||||
ref="qtyRef"
|
||||
class="q-px-sm text-h5"
|
||||
outlined v-model="qty" type="number"
|
||||
:rules="[ val => val < tools.getRemainingCoinsToSend(accountloaded) || t('circuit.qta_remaining_to_send', { maxqta: tools.getRemainingCoinsToSend(accountloaded), symbol: circuitloaded.symbol })]" :label="t('movement.amount')"
|
||||
>
|
||||
<!--val => val > tools.getMaxCoinsToSend(accountloaded) || t('circuit.qta_max_to_send', { maxqta: tools.getRemainingCoinsToSend(accountloaded), symbol: circuitloaded.symbol })]" -->
|
||||
<template v-slot:append>
|
||||
<q-avatar>
|
||||
<img src="https://cdn.quasar.dev/logo-v2/svg/logo.svg">
|
||||
</q-avatar>
|
||||
<div class="text-h5">
|
||||
<em class="q-px-sm text-white rounded-borders" :style="`background-color: ` + (circuitloaded.color ? circuitloaded.color : '#ff5500')">{{ circuitloaded.symbol }}</em>
|
||||
</div>
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<q-slider
|
||||
v-model="qty"
|
||||
color="green"
|
||||
markers
|
||||
:step="5"
|
||||
:marker-labels="arrayMarkerLabel"
|
||||
label-always
|
||||
:label-value="priceLabel"
|
||||
switch-label-side
|
||||
switch-marker-labels-side
|
||||
:inner-max="remainingCoins"
|
||||
:min="0"
|
||||
:max="accountloaded.fidoConcesso"
|
||||
/>
|
||||
|
||||
</q-card-section>
|
||||
<q-card-actions align="center">
|
||||
<q-btn
|
||||
:disable="qtyRef ? qtyRef.hasError : false"
|
||||
:label="$t('circuit.sendcoinsto', {qty, coin: circuitsel, dest: to_user.username })" color="primary"
|
||||
@click="sendCoin()"></q-btn>
|
||||
<q-btn flat :label="$t('dialog.cancel')" color="primary" v-close-popup></q-btn>
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
.q-tab__label {
|
||||
font-size: 0.7rem !important;
|
||||
}
|
||||
|
||||
.q-tab {
|
||||
padding-left: 2px;
|
||||
padding-right: 2px;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
>
|
||||
<q-tabs
|
||||
dense
|
||||
class="text-grey-10 mylabfooter"
|
||||
class="text-grey-10 mylabfooter mysmalltabs"
|
||||
style="padding: 0px !important;"
|
||||
content-class="mysmalltabs"
|
||||
active-color="primary"
|
||||
no-caps
|
||||
indicator-color="transparent"
|
||||
@@ -24,6 +26,13 @@
|
||||
to="/groups"
|
||||
icon="fas fa-users"
|
||||
/>
|
||||
<q-route-tab
|
||||
v-if="static_data.functionality.ENABLE_CIRCUITS"
|
||||
class="mylabfooter"
|
||||
:label="$t('tabdown.circuits')"
|
||||
to="/circuits"
|
||||
icon="fas fa-coins"
|
||||
/>
|
||||
<q-route-tab
|
||||
v-if="static_data.functionality.ENABLE_VIEW_USERS"
|
||||
class="mylabfooter"
|
||||
@@ -52,6 +61,6 @@
|
||||
<script lang="ts" src="./MyFooter.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
@import './MyFooter.scss';
|
||||
</style>
|
||||
|
||||
@@ -61,3 +61,4 @@ export * from './CKeyAndValue'
|
||||
export * from './CNotifSettings'
|
||||
// export * from './CPreloadImages'
|
||||
export * from './CSendCoins'
|
||||
export * from './CCurrencyValue'
|
||||
|
||||
@@ -671,6 +671,13 @@ $heightBtn: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.text-h7-dense {
|
||||
font-size: 1rem;
|
||||
font-weight: 400;
|
||||
line-height: 1.25rem;
|
||||
letter-spacing: normal;
|
||||
}
|
||||
|
||||
.clBorderSmall {
|
||||
border: #dfe3f6 solid 1px;
|
||||
border-radius: 16px;
|
||||
@@ -749,6 +756,27 @@ $heightBtn: 100%;
|
||||
border: solid 3px #49b502;
|
||||
}
|
||||
|
||||
.bordo_stondato_stretto{
|
||||
margin: 4px;
|
||||
border-radius: 3rem;
|
||||
padding-left: 14px;
|
||||
padding-right: 14px;
|
||||
padding-top: 0px;
|
||||
padding-bottom: 0px;
|
||||
border: solid 3px #49b502;
|
||||
}
|
||||
|
||||
.bordo_quadrato{
|
||||
margin: 1px;
|
||||
border-radius: 0.5rem;
|
||||
padding-left: 2px;
|
||||
padding-right: 2px;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
border: solid 2px #2d3e88;
|
||||
}
|
||||
|
||||
|
||||
.bordo_stondato_blu2 {
|
||||
border: solid 3px #0f01b5;
|
||||
}
|
||||
@@ -1065,3 +1093,21 @@ $heightBtn: 100%;
|
||||
padding: 8px !important;
|
||||
}
|
||||
}
|
||||
.align_elem_right {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.text-section{
|
||||
font-size: 1.15rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.sezioni{
|
||||
vertical-align: center;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.mysmalltabs {
|
||||
padding-left: 1px !important;
|
||||
padding-right: 1px !important;
|
||||
}
|
||||
|
||||
@@ -222,6 +222,7 @@ export default defineComponent({
|
||||
t,
|
||||
username,
|
||||
userStore,
|
||||
$q,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<q-drawer v-model="open" side="right" elevated class="text-black"
|
||||
:overlay="true"
|
||||
:breakpoint="1200"
|
||||
:width="$q.screen.lt.sm ? 370 : 450"
|
||||
:width="$q.screen.lt.sm ? tools.getwidth($q) : 450"
|
||||
>
|
||||
<q-bar class="bg-primary text-white">
|
||||
{{ $t('notifs.notifs') }}
|
||||
|
||||
@@ -602,6 +602,7 @@ export interface IColGridTable {
|
||||
subfield_extra1?: string
|
||||
allowNewValue?: boolean
|
||||
showpicprofile_ifnotset?: boolean
|
||||
extrafield?: string
|
||||
}
|
||||
|
||||
export interface ITableRec {
|
||||
@@ -922,6 +923,7 @@ export interface ICircuit {
|
||||
totTransato?: number
|
||||
nome_valuta: string
|
||||
symbol: string
|
||||
color: string
|
||||
abbrev: string
|
||||
compara_valuta?: number
|
||||
compara_euro?: number
|
||||
@@ -960,6 +962,8 @@ export interface IMovVisu {
|
||||
transactionDate: Date
|
||||
userfrom: IUserFields
|
||||
userto: IUserFields
|
||||
circuitfrom: ICircuit
|
||||
circuitto: ICircuit
|
||||
amount: number
|
||||
causal: string
|
||||
residual: number
|
||||
@@ -971,9 +975,9 @@ export interface IAccount {
|
||||
circuitId: number
|
||||
circuit: ICircuit[]
|
||||
name: string
|
||||
deperibile?: boolean
|
||||
fidoConcesso?: number
|
||||
qta_maxConcessa?: number
|
||||
deperibile: boolean
|
||||
fidoConcesso: number
|
||||
qta_maxConcessa: number
|
||||
importo_iniziale?: number
|
||||
saldo?: number
|
||||
saldo: number
|
||||
}
|
||||
|
||||
@@ -577,6 +577,7 @@ const msg_it = {
|
||||
user_aportador_not_valid: 'Il link di registrazione non sembra risultare valido.',
|
||||
rec_already_exist_name: 'Esiste già con questo Nome',
|
||||
rec_already_exist_code: 'Esiste già con questo Link Pagina',
|
||||
rec_already_exist_symbol: 'Esiste già con questo Simbolo',
|
||||
duplicate_username: 'L\'Username è stato già utilizzato',
|
||||
username_not_valid: 'L\'Username non é valido',
|
||||
aportador_not_exist: 'L\'Username di chi ti ha invitato non è presente. Contattaci.',
|
||||
@@ -1105,12 +1106,15 @@ const msg_it = {
|
||||
totTransato: 'Totale Transato',
|
||||
nome_valuta: 'Nome Valuta',
|
||||
symbol: 'Simbolo',
|
||||
color: 'Colore',
|
||||
abbrev: 'Abbreviaz.',
|
||||
compara_valuta: 'Compara Valuta',
|
||||
compara_euro: 'Compara Euro',
|
||||
valuta_per_euro: 'Valuta per Euro',
|
||||
fido_scoperto_default: 'Capacità di finanziamento concessa',
|
||||
qta_max_default: 'Quantità massima concessa',
|
||||
fido_scoperto_default: 'Fiducia concessa',
|
||||
fido_scoperto_default_tips: 'Rappresenta quanta moneta puoi creare autonomamente',
|
||||
qta_max_default: 'Massimo accumulo',
|
||||
qta_max_default_tips: 'Rappresenta quanta moneta ti è concesso accumulare temporaneamente. Incentiviamo di utilizzarla...',
|
||||
data_costituz: 'Data Costituzione',
|
||||
deperimento: 'Deperimento',
|
||||
freq_deper: 'Frequenza Deperimento',
|
||||
@@ -1122,8 +1126,8 @@ const msg_it = {
|
||||
durata_deper: 'Durata Dep.',
|
||||
img_logo: 'NomeFile Logo',
|
||||
regulation: 'Regolamento',
|
||||
|
||||
domanda_ask: 'Chiedere l\'invito al Circuito {circuitname}?',
|
||||
acceptregulation: 'Accetta il Regolamento',
|
||||
domanda_ask: 'Chiedere l\'invito al Circuito {circuitname} accettando il suo Regolamento?',
|
||||
domanda_revoke: 'Revocare la richiesta al Circuito {circuitname}?',
|
||||
askedto: 'Chiesto l\'invito al Circuito {circuitname}',
|
||||
revoketo: 'Revocato la richiesta d\'invito al Circuito {circuitname}',
|
||||
@@ -1143,7 +1147,7 @@ const msg_it = {
|
||||
cancel_req: 'Annullata la richiesta al Circuito {circuitname}',
|
||||
remove_from_mylist: 'Rimuovi dal Circuito',
|
||||
reject_ask: 'Rifiuta l\'ingresso dal Circuito',
|
||||
domanda_exit_fromcircuit: 'Uscire dal CIrcuito {groupname} ?',
|
||||
domanda_exit_fromcircuit: 'Uscire dal CIrcuito {circuitname} ?',
|
||||
domanda_addadminofcircuit: 'Aggiungere {username} come Amministratore del CIrcuito {circuitname} ?',
|
||||
domanda_removeadminofcircuit: 'Rimuovere {username} dall\' incarico di Amministratore del CIrcuito {circuitname} ?',
|
||||
domanda_refuse_circuit: 'Rifiutare la richiesta di {username} per entrare nel Circuito {circuitname}?',
|
||||
@@ -1158,6 +1162,8 @@ const msg_it = {
|
||||
accept_coins: 'Accetta Monete',
|
||||
refuse_coins: 'Rifiuta Monete',
|
||||
movements: 'Movimenti',
|
||||
qta_remaining_to_send: 'Quantità massima inviabile {maxqta} {symbol}',
|
||||
qta_max_to_send: 'Quantità massima inviabile {maxqta} {symbol}',
|
||||
},
|
||||
|
||||
account: {
|
||||
@@ -1166,6 +1172,7 @@ const msg_it = {
|
||||
qta_maxConcessa: 'Capacità massima accumulabile',
|
||||
importo_iniziale: 'Importo Iniziale',
|
||||
saldo: 'Saldo',
|
||||
saldo_tips: 'Rappresenta quanta moneta ho accumulato. Ma posso andare anche sotto ',
|
||||
user: 'Utente',
|
||||
},
|
||||
|
||||
@@ -1173,14 +1180,16 @@ const msg_it = {
|
||||
transactionDate: 'Data Transazione',
|
||||
accountFromId: 'Dal Conto',
|
||||
accountToId: 'Al Conto',
|
||||
amount: 'Quantità',
|
||||
amount: 'Quantità da inviare',
|
||||
causal: 'Note',
|
||||
causal_table: 'Tabella Causale',
|
||||
causal_IdRec: 'Id Record Causale',
|
||||
residual: 'Residuo',
|
||||
expiringDate: 'Data Scadenza',
|
||||
movin: 'In Entrata',
|
||||
movout: 'In Uscita',
|
||||
movin: 'Monete Ricevute',
|
||||
movout: 'Monete Inviate',
|
||||
from: 'Inviate da:',
|
||||
to: 'A favore di:',
|
||||
},
|
||||
editor: {
|
||||
showtool: 'Mostra strumenti per formattare il testo',
|
||||
@@ -1193,6 +1202,7 @@ const msg_it = {
|
||||
friends: 'Amici',
|
||||
bookings: 'Prenotaz.',
|
||||
profile: 'Profilo',
|
||||
circuits: 'Circuiti',
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -275,6 +275,7 @@ export const costanti = {
|
||||
link: 12500,
|
||||
listobj: 13000,
|
||||
label: 14000,
|
||||
currency: 15000,
|
||||
|
||||
},
|
||||
|
||||
|
||||
@@ -65,6 +65,7 @@ function AddCol(params: IColGridTable) {
|
||||
subfield_extra1: (params.subfield_extra1 === undefined) ? '' : params.subfield_extra1,
|
||||
allowNewValue: (params.allowNewValue === undefined) ? false : params.allowNewValue,
|
||||
showpicprofile_ifnotset: (params.showpicprofile_ifnotset === undefined) ? false : params.showpicprofile_ifnotset,
|
||||
extrafield: (params.extrafield === undefined) ? '' : params.extrafield,
|
||||
visible: (params.visible === undefined) ? true : params.visible,
|
||||
icon: (params.icon === undefined) ? '' : params.icon,
|
||||
action: (params.action === undefined) ? '' : params.action,
|
||||
@@ -531,6 +532,7 @@ export const colmyMovement = [
|
||||
fieldtype: costanti.FieldType.username_chip,
|
||||
link: '/my/userfrom.username',
|
||||
noshowlabel: true,
|
||||
extrafield: 'movement.from',
|
||||
}),
|
||||
AddCol({
|
||||
name: 'userto.username',
|
||||
@@ -541,11 +543,12 @@ export const colmyMovement = [
|
||||
tipovisu: costanti.TipoVisu.LINK,
|
||||
fieldtype: costanti.FieldType.username_chip,
|
||||
link: '/my/userto.username',
|
||||
extrafield: 'movement.to',
|
||||
noshowlabel: true,
|
||||
}),
|
||||
|
||||
AddCol({ name: 'amount', label_trans: 'movement.amount',
|
||||
fieldtype: costanti.FieldType.string, required: true, tipovisu: costanti.TipoVisu.TESTO_BORDATO }),
|
||||
fieldtype: costanti.FieldType.currency, required: true, tipovisu: costanti.TipoVisu.TESTO_BORDATO }),
|
||||
AddCol({ name: 'causal', label_trans: 'movement.causal', tipovisu: costanti.TipoVisu.TESTO_BORDATO }),
|
||||
|
||||
]
|
||||
@@ -2415,11 +2418,13 @@ export const colTableSubCashCategory = [
|
||||
|
||||
export const colTableCircuitComplete = [
|
||||
AddCol({ name: 'Num', label_trans: 'circuit.num', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'groupnameId', label_trans: 'circuit.groupnameId', fieldtype: costanti.FieldType.select, jointable: 'mygroups' }), // da togliere poi
|
||||
// AddCol({ name: 'groupnameId', label_trans: 'circuit.groupnameId', fieldtype: costanti.FieldType.select, jointable: 'mygroups' }), // da togliere poi
|
||||
AddCol({ name: 'name', label_trans: 'circuit.name',
|
||||
maxlength: 40,
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage }),
|
||||
AddCol({ name: 'path', label_trans: 'circuit.path' }),
|
||||
AddCol({ name: 'path', label_trans: 'circuit.path',
|
||||
allowchar: costanti.ALLOWCHAR_CODE,
|
||||
}),
|
||||
AddCol({ name: 'subname', label_trans: 'circuit.subname' }),
|
||||
AddCol({ name: 'longdescr', label_trans: 'circuit.descr', fieldtype: costanti.FieldType.html }),
|
||||
AddCol({ name: 'regulation', label_trans: 'circuit.regulation', fieldtype: costanti.FieldType.html }),
|
||||
@@ -2428,14 +2433,15 @@ export const colTableCircuitComplete = [
|
||||
AddCol({ name: 'createdBy', label_trans: 'circuit.founder', fieldtype: costanti.FieldType.select, jointable: 'users', }),
|
||||
AddCol({ name: 'totCircolante', label_trans: 'circuit.totCircolante', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'totTransato', label_trans: 'circuit.totTransato', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'nome_valuta', label_trans: 'circuit.nome_valuta' }),
|
||||
// AddCol({ name: 'nome_valuta', label_trans: 'circuit.nome_valuta' }),
|
||||
AddCol({ name: 'symbol', label_trans: 'circuit.symbol' }),
|
||||
AddCol({ name: 'color', label_trans: 'circuit.color' }),
|
||||
AddCol({ name: 'abbrev', label_trans: 'circuit.abbrev' }),
|
||||
AddCol({ name: 'compara_valuta', label_trans: 'circuit.compara_valuta', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'compara_euro', label_trans: 'circuit.compara_euro', fieldtype: costanti.FieldType.number }),
|
||||
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.number }),
|
||||
AddCol({ name: 'qta_max_default', label_trans: 'circuit.qta_max_default', 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: 'data_costituz', label_trans: 'circuit.data_costituz', fieldtype: costanti.FieldType.date }),
|
||||
AddCol({ name: 'deperimento', label_trans: 'circuit.deperimento', fieldtype: costanti.FieldType.boolean }),
|
||||
AddCol({ name: 'freq_deper', label_trans: 'circuit.freq_deper' }),
|
||||
@@ -2480,12 +2486,16 @@ export const colTableCircuitComplete = [
|
||||
]
|
||||
|
||||
export const colTableCircuit = [
|
||||
AddCol({ name: 'groupnameId', label_trans: 'circuit.groupnameId', fieldtype: costanti.FieldType.select, jointable: 'mygroups' }), // da togliere poi
|
||||
// AddCol({ name: 'groupnameId', label_trans: 'circuit.groupnameId', fieldtype: costanti.FieldType.select, jointable: 'mygroups' }), // da togliere poi
|
||||
AddCol({ name: 'name', label_trans: 'circuit.name',
|
||||
required: true,
|
||||
maxlength: 40,
|
||||
maxlength: 30,
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InView }),
|
||||
AddCol({ name: 'path', label_trans: 'circuit.path', required: true }),
|
||||
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,
|
||||
}),
|
||||
AddCol({ name: 'subname', label_trans: 'circuit.subname' }),
|
||||
AddCol({ name: 'longdescr', label_trans: 'circuit.descr', fieldtype: costanti.FieldType.html }),
|
||||
AddCol({ name: 'systemUserId', label_trans: 'circuit.systemUserId', fieldtype: costanti.FieldType.select, jointable: 'users', }),
|
||||
@@ -2504,12 +2514,15 @@ export const colTableCircuit = [
|
||||
sortable: true,
|
||||
showWhen: 0
|
||||
}),
|
||||
AddCol({ name: 'nome_valuta', label_trans: 'circuit.nome_valuta', required: true }),
|
||||
// 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.number, required: true, visulabel: true }),
|
||||
fieldtype: costanti.FieldType.currency, required: true, visulabel: true }),
|
||||
AddCol({ name: 'qta_max_default', label_trans: 'circuit.qta_max_default',
|
||||
fieldtype: costanti.FieldType.number, required: true, visulabel: true }),
|
||||
fieldtype: costanti.FieldType.currency, required: true, visulabel: true }),
|
||||
AddCol({ name: 'regulation', label_trans: 'circuit.regulation', fieldtype: costanti.FieldType.html }),
|
||||
AddCol({ name: 'deperimento', label_trans: 'circuit.deperimento', fieldtype: costanti.FieldType.boolean }),
|
||||
AddCol({ name: 'data_costituz', label_trans: 'circuit.data_costituz', fieldtype: costanti.FieldType.date }),
|
||||
AddCol({
|
||||
name: 'photos',
|
||||
@@ -2531,7 +2544,7 @@ export const colmyUserCircuit = [
|
||||
AddCol({ name: 'fidoConcesso', label_trans: 'account.fidoConcesso', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'qta_maxConcessa', label_trans: 'account.qta_maxConcessa', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'importo_iniziale', label_trans: 'account.importo_iniziale', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'saldo', label_trans: 'account.saldo', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'saldo', label_trans: 'account.saldo', fieldtype: costanti.FieldType.currency }),
|
||||
AddCol({ name: 'deleted', label_trans: 'reg.deleted', fieldtype: costanti.FieldType.boolean }),
|
||||
AddCol(DeleteRec),
|
||||
AddCol(DuplicateRec),
|
||||
|
||||
@@ -6,6 +6,7 @@ export const serv_constants = {
|
||||
RIS_CODE_EMAIL_ALREADY_VERIFIED: -5,
|
||||
RIS_CODE_EMAIL_VERIFIED: 1,
|
||||
|
||||
RIS_CODE_REC_ALREADY_EXIST_SYMBOL: -102,
|
||||
RIS_CODE_REC_ALREADY_EXIST_CODE: -101,
|
||||
RIS_CODE_REC_ALREADY_EXIST_NAME: -100,
|
||||
RIS_CODE_USER_APORTADOR_NOT_VALID: -75,
|
||||
|
||||
@@ -3154,6 +3154,8 @@ export const tools = {
|
||||
this.showNegativeNotif(mythisq, t('reg.err.rec_already_exist_name') + ' ' + msg)
|
||||
} else if (riscode === serv_constants.RIS_CODE_REC_ALREADY_EXIST_CODE) {
|
||||
this.showNegativeNotif(mythisq, t('reg.err.rec_already_exist_code') + ' ' + msg)
|
||||
} else if (riscode === serv_constants.RIS_CODE_REC_ALREADY_EXIST_SYMBOL) {
|
||||
this.showNegativeNotif(mythisq, t('reg.err.rec_already_exist_symbol') + ' ' + msg)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -4791,7 +4793,11 @@ export const tools = {
|
||||
userStore.setCircuitCmd($q, t, username, recsendcoin.circuitname, shared_consts.CIRCUITCMD.SENDCOINS_ACCEPT, 0, recsendcoin)
|
||||
.then((res: any) => {
|
||||
if (res) {
|
||||
if (res.cansend) {
|
||||
tools.showPositiveNotif($q, t('circuit.coins_accepted'))
|
||||
} else {
|
||||
tools.showNegativeNotif($q, res.errormsg)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -5282,13 +5288,15 @@ export const tools = {
|
||||
|
||||
return userStore.setCircuitCmd($q, t, username, sendcoinrec.circuitname, shared_consts.CIRCUITCMD.SENDCOINS_REQ, true, sendcoinrec)
|
||||
.then((res: any) => {
|
||||
if (res) {
|
||||
if (res.cansend) {
|
||||
tools.showPositiveNotif($q, t('circuit.coins_sendrequest_sent'))
|
||||
} else {
|
||||
tools.showNegativeNotif($q, t('circuit.coins_sendrequest_failed'))
|
||||
tools.showNegativeNotif($q, res.errormsg)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
return null
|
||||
},
|
||||
|
||||
cancelReqCircuit($q: any, username: string, circuitname: string) {
|
||||
@@ -6264,13 +6272,15 @@ export const tools = {
|
||||
},
|
||||
isTypeByRecMov(rec: IMovVisu) {
|
||||
|
||||
const userStore = useUserStore()
|
||||
let type = costanti.TypeMov.Nessuno
|
||||
if (rec && rec.userfrom) {
|
||||
const userStore = useUserStore()
|
||||
if (userStore.my.username === rec.userfrom.username) {
|
||||
type = rec.amount > 0 ? costanti.TypeMov.Uscita : (rec.amount < 0 ? costanti.TypeMov.Entrata : costanti.TypeMov.Nessuno)
|
||||
} else if (userStore.my.username === rec.userto.username) {
|
||||
type = rec.amount > 0 ? costanti.TypeMov.Entrata : (rec.amount < 0 ? costanti.TypeMov.Uscita : costanti.TypeMov.Nessuno)
|
||||
}
|
||||
}
|
||||
|
||||
return type
|
||||
},
|
||||
@@ -6278,6 +6288,35 @@ export const tools = {
|
||||
|
||||
return this.isTypeByRecMov(rec) === costanti.TypeMov.Entrata
|
||||
},
|
||||
|
||||
getSymbolByCircuit(circuit: any) {
|
||||
try {
|
||||
if (circuit.symbol) {
|
||||
return circuit.symbol
|
||||
} else {
|
||||
if (circuit.circuitfrom.symbol) {
|
||||
return circuit.circuitfrom.symbol
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}catch (e) {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
getColorByCircuit(circuit: any) {
|
||||
if (circuit.color) {
|
||||
return circuit.color
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
getRemainingCoinsToSend(account: IAccount) {
|
||||
return account.saldo + account.fidoConcesso;
|
||||
},
|
||||
getMaxCoinsToSend(account: IAccount) {
|
||||
return account.qta_maxConcessa - account.saldo;
|
||||
},
|
||||
// getLocale() {
|
||||
// if (navigator.languages && navigator.languages.length > 0) {
|
||||
// return navigator.languages[0]
|
||||
|
||||
@@ -1676,7 +1676,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
myserv = window.location.host
|
||||
|
||||
if (process.env.DEBUGGING) {
|
||||
myserv = 'http://localhost:3000'; // 'http://192.168.1.54:3000'
|
||||
myserv = 'http://192.168.1.103:3000'; // 'http://192.168.1.54:3000'
|
||||
}
|
||||
|
||||
if (!myserv) {
|
||||
|
||||
@@ -5,6 +5,7 @@ import { CTitleBanner } from '@/components/CTitleBanner'
|
||||
import { CProfile } from '@/components/CProfile'
|
||||
import { CCheckIfIsLogged } from '@/components/CCheckIfIsLogged'
|
||||
import { CMyFieldRec } from '@/components/CMyFieldRec'
|
||||
import { CCurrencyValue } from '@/components/CCurrencyValue'
|
||||
import { CSkill } from '@/components/CSkill'
|
||||
import { CDateTime } from '@/components/CDateTime'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
@@ -25,7 +26,7 @@ import { useNotifStore } from '@store/NotifStore'
|
||||
export default defineComponent({
|
||||
name: 'mycircuit',
|
||||
components: { CProfile, CTitleBanner, CMyFieldRec, CSkill, CDateTime, CMyFriends,
|
||||
CGridTableRec, CMyUser, CCheckIfIsLogged },
|
||||
CGridTableRec, CMyUser, CCheckIfIsLogged, CCurrencyValue },
|
||||
props: {},
|
||||
setup() {
|
||||
const userStore = useUserStore()
|
||||
@@ -48,6 +49,7 @@ export default defineComponent({
|
||||
const users_in_circuit = ref(<IFriends[]>[])
|
||||
|
||||
const loading = ref(false)
|
||||
const requestToEnterCircuit = ref(false)
|
||||
|
||||
const tabgrp = ref('info')
|
||||
const tabmembers = ref('all')
|
||||
@@ -222,6 +224,7 @@ export default defineComponent({
|
||||
mystatus,
|
||||
cities,
|
||||
path,
|
||||
requestToEnterCircuit,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -39,43 +39,21 @@
|
||||
<em style="font-weight: bold">{{ $t('db.youarerefusedcircuit') }}</em><br>
|
||||
</q-banner>
|
||||
|
||||
<div v-if="account" style="width: 300px;" class="text-h5">
|
||||
<q-field outlined
|
||||
dense
|
||||
:type="number"
|
||||
rounded
|
||||
class="q-pa-sm text-h5"
|
||||
color="green"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-avatar>
|
||||
<!--<img src="https://cdn.quasar.dev/logo-v2/svg/logo.svg">-->
|
||||
<q-icon name="fas fa-coins" size="sm"/>
|
||||
</q-avatar>
|
||||
<div class="text-h6">
|
||||
Saldo
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:control>
|
||||
<div>{{account.saldo ? account.saldo.toFixed(2) : 'N/D'}}</div>
|
||||
</template>
|
||||
<template v-slot:append>
|
||||
<div class="text-h5">
|
||||
<em class="q-px-sm bg-deep-orange text-white rounded-borders">{{ account.circuit[0].symbol }}</em>
|
||||
</div>
|
||||
</template>
|
||||
<CCurrencyValue
|
||||
:symbol="circuit.symbol"
|
||||
:tips="t('account.saldo_tips')"
|
||||
:color="circuit.color"
|
||||
:value="account ? account.saldo : 0"
|
||||
:label="t('account.saldo')">
|
||||
|
||||
|
||||
</q-field>
|
||||
|
||||
</div>
|
||||
</CCurrencyValue>
|
||||
|
||||
<div>
|
||||
<q-btn
|
||||
v-if="!userStore.IsMyCircuitByName(circuit.name) && !userStore.IsAskedCircuitByName(circuit.name) && !userStore.IsRefusedCircuitByName(circuit.name)"
|
||||
icon="fas fa-user-plus"
|
||||
color="primary" :label="$t('circuit.ask')"
|
||||
@click="tools.setRequestCircuit($q, userStore.my.username, circuit.name, true)"
|
||||
@click="requestToEnterCircuit = true"
|
||||
/>
|
||||
<q-btn
|
||||
v-if="userStore.IsMyCircuitByName(circuit.name)"
|
||||
@@ -83,7 +61,7 @@
|
||||
<q-menu>
|
||||
<q-list v-if="true" style="min-width: 150px">
|
||||
<q-item clickable v-close-popup
|
||||
@click="tools.removeFromMyCircuits($q, userStore.my.username, circuit.name, $t('circuit.domanda_exit_fromcircuit', {name: circuit.name }))">
|
||||
@click="tools.removeFromMyCircuits($q, userStore.my.username, circuit.name, $t('circuit.domanda_exit_fromcircuit', {circuitname: circuit.name }))">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="negative" name="fas fa-user-minus"/>
|
||||
</q-item-section>
|
||||
@@ -117,7 +95,7 @@
|
||||
|
||||
<q-tabs v-model="tabgrp" class="text-blue">
|
||||
<q-tab :label="t('shared.info1')" name="info" icon="fas fa-info"></q-tab>
|
||||
<q-tab :label="t('circuit.movements')" name="mov" icon="fas fa-coins"></q-tab>
|
||||
<q-tab v-if="userStore.IsMyCircuitByName(circuit.name)" :label="t('circuit.movements')" name="mov" icon="fas fa-coins"></q-tab>
|
||||
<q-tab v-if="!!circuit.note" :label="t('circuit.page')" name="page" icon="fas fa-file-word"></q-tab>
|
||||
<q-tab v-if="tools.iCanShowCircuitsMember(circuit) || tools.iAmAdminCircuit(circuit.name)"
|
||||
:label="t('shared.subscribes')" name="members" icon="fas fa-users"></q-tab>
|
||||
@@ -201,18 +179,48 @@
|
||||
>
|
||||
</CMyUser>
|
||||
</div>
|
||||
<div v-if="circuit.fido_scoperto_default" class="members">
|
||||
<q-icon name="fas fa-battery-quarter"></q-icon>
|
||||
{{ circuit.fido_scoperto_default }} {{ t('circuit.fido_scoperto_default') }}
|
||||
<div class="sezioni">
|
||||
<q-icon name="fas fa-coins"></q-icon>
|
||||
{{ t('circuit.symbol') }}:
|
||||
<span class="text-h5">
|
||||
<em class="q-px-sm text-white rounded-borders"
|
||||
:style="`background-color: ` + tools.getColorByCircuit(circuit)">{{ tools.getSymbolByCircuit(circuit) }}</em>
|
||||
</span>
|
||||
</div>
|
||||
<div v-if="circuit.qta_max_default" class="members">
|
||||
<div v-if="circuit.fido_scoperto_default" class="sezioni">
|
||||
<CCurrencyValue
|
||||
:symbol="tools.getSymbolByCircuit(circuit)"
|
||||
:color="tools.getColorByCircuit(circuit)"
|
||||
:value="circuit.fido_scoperto_default"
|
||||
icon="fas fa-battery-quarter"
|
||||
:label="t('circuit.fido_scoperto_default')"
|
||||
:tips="t('circuit.fido_scoperto_default_tips')"
|
||||
>
|
||||
</CCurrencyValue>
|
||||
</div>
|
||||
<div v-if="circuit.fido_scoperto_default" class="sezioni">
|
||||
<CCurrencyValue
|
||||
:symbol="tools.getSymbolByCircuit(circuit)"
|
||||
:color="tools.getColorByCircuit(circuit)"
|
||||
:value="circuit.qta_max_default"
|
||||
icon="fas fa-battery-quarter"
|
||||
:label="t('circuit.qta_max_default')"
|
||||
:tips="t('circuit.qta_max_default_tips')"
|
||||
>
|
||||
</CCurrencyValue>
|
||||
</div>
|
||||
<div class="sezioni">
|
||||
<q-icon name="fas fa-battery-full"></q-icon>
|
||||
{{ circuit.qta_max_default }} {{ t('circuit.qta_max_default') }}
|
||||
{{ t('circuit.deperimento') }}: <span class="text-section">{{ circuit.deperimento ? t('dialog.yes') : t('dialog.no') }} {{ }}</span>
|
||||
</div>
|
||||
<div v-if="circuit.deperimento" class="members">
|
||||
<q-icon name="fas fa-battery-full"></q-icon>
|
||||
{{ t('circuit.deperimento') }}{{ circuit.deperimento ? t('dialog.yes') : t('dialog.no') }} {{ }}
|
||||
|
||||
<div class="sezioni">
|
||||
<q-icon name="fas fa-file-signature"></q-icon>
|
||||
{{ t('circuit.regulation') }}: <br>
|
||||
<div class="bordo_quadrato" v-html="circuit.regulation"></div>
|
||||
</div>
|
||||
|
||||
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
||||
@@ -387,6 +395,44 @@
|
||||
<img :src="getImgCircuit()" :alt="circuit.name" class="full-width">
|
||||
|
||||
</q-dialog>
|
||||
|
||||
<q-dialog v-model="requestToEnterCircuit" maximized transition-show="slide-up"
|
||||
transition-hide="slide-down">
|
||||
<q-card v-if="circuit" class="dialog_card">
|
||||
<q-toolbar class="bg-primary text-white" dense>
|
||||
<!--<q-toolbar :class="tools.displayClasses(myevent)"-->
|
||||
<!--:style="tools.displayStyles(myevent) + ` min-width: `+ tools.myheight_dialog() + `px;`">-->
|
||||
<q-toolbar-title>
|
||||
{{ circuit.name }}
|
||||
</q-toolbar-title>
|
||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||
</q-toolbar>
|
||||
<q-card-section class="inset-shadow">
|
||||
<q-banner
|
||||
rounded
|
||||
class="bg-green text-white"
|
||||
style="text-align: center;"
|
||||
>
|
||||
<em style="font-weight: bold">Regolamento:</em><br>
|
||||
</q-banner>
|
||||
<div v-html="circuit.regulation">
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-card-actions align="center">
|
||||
<q-btn
|
||||
class="centeritems"
|
||||
icon="fas fa-user-plus"
|
||||
color="positive" :label="$t('circuit.acceptregulation')"
|
||||
@click="requestToEnterCircuit = false; tools.setRequestCircuit($q, userStore.my.username, circuit.name, true)"
|
||||
/>
|
||||
<q-btn flat round color="negative"
|
||||
:label="$t('friends.refuse')"
|
||||
icon="close" v-close-popup></q-btn>
|
||||
|
||||
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -152,10 +152,12 @@
|
||||
</q-btn>
|
||||
|
||||
</div>
|
||||
userStore.IsMyCircuitByUser(myuser): {{ userStore.IsMyCircuitByUser(myuser) }}
|
||||
<div class="col-md-6 col-sm-6 q-ma-xs col-xs-12">
|
||||
<q-btn
|
||||
v-if="userStore.IsMyCircuitByUser(myuser).length > 0 && myuser.username !== myusername()" icon="fab fa-telegram"
|
||||
color="blue"
|
||||
v-if="userStore.IsMyCircuitByUser(myuser).length > 0 && myuser.username !== myusername()"
|
||||
icon="fas fa-coins"
|
||||
color="green"
|
||||
size="md"
|
||||
rounded
|
||||
:label="$t('circuit.sendcoins')"
|
||||
@@ -192,7 +194,7 @@
|
||||
|
||||
<CTitleBanner
|
||||
v-if="static_data.functionality.SHOW_COMPETENZE"
|
||||
class="" :title="$t('profile.skills')" bgcolor="bg-positive" clcolor="text-white"
|
||||
class="" :title="$t('profile.skills')" bgcolor="bg-primary" clcolor="text-white"
|
||||
myclass="myshad" :canopen="true">
|
||||
|
||||
<q-tabs v-model="actualcard" class="text-blue">
|
||||
|
||||
Reference in New Issue
Block a user