Click per mandare un messaggio al Destinatario dei RIS, se non è entrato ancora in RIS ITALIA.
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<div class="absolute-bottom text-spacetrans">
|
||||
<q-btn rounded :to="discipline.linkpage">
|
||||
<div class="text-h5 disc__title shadow-max">{{ discipline.label }}</div>
|
||||
</q-btn>
|
||||
</q-btn>
|
||||
</div>
|
||||
</q-img>
|
||||
|
||||
|
||||
42
src/components/CCheckCircuitsEnabled/CCheckCircuitsEnabled.scss
Executable file
42
src/components/CCheckCircuitsEnabled/CCheckCircuitsEnabled.scss
Executable file
@@ -0,0 +1,42 @@
|
||||
.text-cls{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.my-text {
|
||||
font-size: 1rem;
|
||||
font-weight: bold;
|
||||
line-height: 1.5rem;
|
||||
letter-spacing: 0.0125em;
|
||||
}
|
||||
|
||||
.my-text_3 {
|
||||
font-size: 1rem;
|
||||
font-weight: bold;
|
||||
line-height: 1.5rem;
|
||||
letter-spacing: 0.0125em;
|
||||
}
|
||||
|
||||
.my-text-small {
|
||||
font-size: 1rem;
|
||||
line-height: 1rem;
|
||||
letter-spacing: 0.0125em;
|
||||
}
|
||||
|
||||
.mybox_3 {
|
||||
min-width: 100px;
|
||||
min-height: 100px;
|
||||
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mybox {
|
||||
min-width: 112px;
|
||||
min-height: 112px;
|
||||
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mybox_small {
|
||||
min-width: 110px;
|
||||
width: 100%;
|
||||
}
|
||||
57
src/components/CCheckCircuitsEnabled/CCheckCircuitsEnabled.ts
Executable file
57
src/components/CCheckCircuitsEnabled/CCheckCircuitsEnabled.ts
Executable file
@@ -0,0 +1,57 @@
|
||||
import { defineComponent, ref, computed, PropType, toRef, onMounted } from 'vue'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useCircuitStore } from '@store/CircuitStore'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { IAccount, ICircuit, IMyGroup, IOperators, ISendCoin, ISpecialField, IUserFields } from '../../model'
|
||||
import { useQuasar } from 'quasar'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CCheckCircuitsEnabled',
|
||||
components: {},
|
||||
props: {
|
||||
to_user: {
|
||||
type: Object as PropType<IUserFields>,
|
||||
required: false,
|
||||
default: null
|
||||
},
|
||||
to_group: {
|
||||
type: Object as PropType<IMyGroup>,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
to_contocom: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
const userStore = useUserStore()
|
||||
const circuitStore = useCircuitStore()
|
||||
const $router = useRouter()
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
const non_hai_circuito_nazionale = ref(false)
|
||||
const destin_non_ha_circuito_naz = ref(false)
|
||||
|
||||
function load() {
|
||||
non_hai_circuito_nazionale.value = !circuitStore.sonoDentroAlCircuitoNazionale()
|
||||
destin_non_ha_circuito_naz.value = !circuitStore.EDentroAlCircuitoNazionale(props.to_user)
|
||||
}
|
||||
|
||||
onMounted(load)
|
||||
|
||||
return {
|
||||
userStore,
|
||||
tools,
|
||||
non_hai_circuito_nazionale,
|
||||
destin_non_ha_circuito_naz,
|
||||
$q,
|
||||
}
|
||||
}
|
||||
})
|
||||
49
src/components/CCheckCircuitsEnabled/CCheckCircuitsEnabled.vue
Executable file
49
src/components/CCheckCircuitsEnabled/CCheckCircuitsEnabled.vue
Executable file
@@ -0,0 +1,49 @@
|
||||
<template>
|
||||
<div class="q-ma-xs q-pa-xs row">
|
||||
<div v-if="non_hai_circuito_nazionale" class="q-py-sm">
|
||||
<q-banner rounded class="bg-red text-white" style="text-align: center">
|
||||
{{ $t('circuit.non_hai_circuito_nazionale') }}
|
||||
<br />
|
||||
</q-banner>
|
||||
|
||||
<div class="text-center">
|
||||
<q-btn
|
||||
glossy
|
||||
size="md"
|
||||
:label="$t('circuit.ask_italia')"
|
||||
icon="fas fa-key"
|
||||
color="green"
|
||||
text-color="white"
|
||||
rounded
|
||||
:to="tools.updateLink('/circuit/ris_italia')"
|
||||
></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="destin_non_ha_circuito_naz" class="q-py-sm">
|
||||
<q-banner rounded class="bg-red text-white" style="text-align: center">
|
||||
{{ $t('circuit.destin_non_ha_circuito_naz') }}
|
||||
<br />
|
||||
</q-banner>
|
||||
|
||||
<div class="text-center">
|
||||
<q-btn
|
||||
glossy
|
||||
size="md"
|
||||
:label="$t('circuit.invia_msg_dest', {name: to_user.username})"
|
||||
icon="fas fa-paper-plane"
|
||||
color="blue"
|
||||
text-color="white"
|
||||
rounded
|
||||
@click="tools.SendMsgRisItalia($q, to_user.username)"
|
||||
></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CCheckCircuitsEnabled.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CCheckCircuitsEnabled.scss';
|
||||
</style>
|
||||
1
src/components/CCheckCircuitsEnabled/index.ts
Executable file
1
src/components/CCheckCircuitsEnabled/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CCheckCircuitsEnabled} from './CCheckCircuitsEnabled.vue'
|
||||
@@ -19,6 +19,11 @@ export default defineComponent({
|
||||
showBtnActivities: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
},
|
||||
sendRIS: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 0,
|
||||
}
|
||||
},
|
||||
components: { CLabel, CSendCoins },
|
||||
|
||||
@@ -68,10 +68,11 @@
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="showsendCoinTo">
|
||||
<div v-if="showsendCoinTo || sendRIS > 0">
|
||||
<CSendCoins
|
||||
:showprop="showsendCoinTo"
|
||||
:to_user="myuser"
|
||||
:sendRIS="sendRIS"
|
||||
@close="showsendCoinTo = false"
|
||||
>
|
||||
</CSendCoins>
|
||||
|
||||
@@ -62,7 +62,7 @@ export default defineComponent({
|
||||
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
const circuit = ref(<ICircuit | IMyCircuit | null>null)
|
||||
const circuit = ref(<IMyCircuit | ICircuit | null>null)
|
||||
const account = computed(() => circuit.value ? userStore.getAccountByCircuitId(circuit.value._id) : null )
|
||||
|
||||
const qtarem = computed(() => account.value ? circuitStore.getRemainingCoinsToSend(account.value) : 0)
|
||||
|
||||
@@ -387,7 +387,7 @@
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
v-if="saldo === 0"
|
||||
v-if="saldo === 0 || !saldo"
|
||||
@click="
|
||||
tools.removeFromMyCircuits(
|
||||
$q,
|
||||
|
||||
@@ -9,6 +9,7 @@ import { useQuasar } from 'quasar'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
import { CMyUserOnlyView } from '@/components/CMyUserOnlyView'
|
||||
import { CMyGroupOnlyView } from '@/components/CMyGroupOnlyView'
|
||||
import { CCheckCircuitsEnabled } from '@/components/CCheckCircuitsEnabled'
|
||||
import { costanti } from '@costanti'
|
||||
|
||||
export default defineComponent({
|
||||
@@ -48,8 +49,13 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
sendRIS: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 1,
|
||||
},
|
||||
},
|
||||
components: { CSaldo, CMyUserOnlyView, CMyGroupOnlyView },
|
||||
components: { CSaldo, CMyUserOnlyView, CMyGroupOnlyView, CCheckCircuitsEnabled },
|
||||
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
@@ -257,7 +263,9 @@ export default defineComponent({
|
||||
if (props.circuitname) {
|
||||
circuitsel.value = props.circuitname
|
||||
} else {
|
||||
circuitsel.value = tools.getCookie(tools.CIRCUIT_USE, bothcircuits.value[0])
|
||||
const circcookie = tools.getCookie(tools.CIRCUIT_USE, bothcircuits.value[0])
|
||||
if (circcookie && bothcircuits.value.findIndex((circ: ICircuit) => circ.name === circcookie) >= 0)
|
||||
circuitsel.value = circcookie
|
||||
}
|
||||
if (bothcircuits.value && bothcircuits.value.find((name: any) => name !== circuitsel.value)) {
|
||||
circuitsel.value = bothcircuits.value[0]
|
||||
@@ -265,6 +273,10 @@ export default defineComponent({
|
||||
|
||||
qty.value = props.qtydefault
|
||||
|
||||
if (props.sendRIS) {
|
||||
qty.value = props.sendRIS
|
||||
}
|
||||
|
||||
await aggiorna()
|
||||
|
||||
showpage.value = true
|
||||
|
||||
@@ -12,6 +12,12 @@
|
||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||
</q-bar>
|
||||
<q-card-section class="q-px-xs inset-shadow">
|
||||
<CCheckCircuitsEnabled
|
||||
:to_user="to_user"
|
||||
:to_group="to_group"
|
||||
>
|
||||
</CCheckCircuitsEnabled>
|
||||
|
||||
<q-select
|
||||
v-if="!circuitname"
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
@@ -132,7 +138,7 @@
|
||||
>
|
||||
</CMyGroupOnlyView>
|
||||
<CMyGroupOnlyView
|
||||
v-if="circuitloaded && to_contocom"
|
||||
v-if="circuitloaded && !!circuitloaded._id && to_contocom"
|
||||
:mygrp="{ groupname: to_contocom }"
|
||||
:visu="costanti.USER_GROUPS"
|
||||
:circuitname="circuitloaded.name"
|
||||
@@ -144,7 +150,7 @@
|
||||
<q-spinner-tail size="6em" color="primary" />
|
||||
</q-inner-loading>
|
||||
|
||||
<div v-if="circuitloaded">
|
||||
<div v-if="circuitloaded && !!circuitloaded._id">
|
||||
<q-banner
|
||||
v-if="!circuitloaded.transactionsEnabled"
|
||||
rounded
|
||||
@@ -230,10 +236,12 @@
|
||||
>
|
||||
</q-input>
|
||||
</q-card-section>
|
||||
|
||||
<q-card-actions align="center">
|
||||
<q-btn
|
||||
v-if="
|
||||
circuitloaded &&
|
||||
!!circuitloaded._id &&
|
||||
(qtyRef
|
||||
? !(
|
||||
qtyRef.hasError ||
|
||||
|
||||
Reference in New Issue
Block a user