diff --git a/src/common/shared_vuejs.ts b/src/common/shared_vuejs.ts
index 48c5a733..0ba713e0 100755
--- a/src/common/shared_vuejs.ts
+++ b/src/common/shared_vuejs.ts
@@ -17,6 +17,23 @@ export const shared_consts = {
},
LIMIT_NOTIF_FOR_USER: 200,
+ CallFunz: {
+ SOSTITUISCI: 345,
+ AGGIUNGI_NUOVO_IMBARCO: 380,
+ CANCELLA_IMBARCO: 385,
+ DAMMI_PRIMO_UTENTE_LIBERO: 390,
+ GET_VALBYTABLE: 400,
+ SET_VALBYTABLE: 410,
+ ZOOM_GIA_PARTECIPATO: 510,
+ REGISTRATION: 6,
+ RICHIESTA_GRUPPO: 10,
+ RICHIESTA_AMICIZIA: 15,
+ RICHIESTA_HANDSHAKE: 16,
+ RICHIESTA_CIRCUIT: 20,
+ RICHIESTA_FIDO: 25,
+ ENTRA_RIS_ITALIA: 30,
+ },
+
ELEMTYPE: {
TITLE: 5,
MARGINI: 6,
diff --git a/src/components/CCardDiscipline/CCardDiscipline.vue b/src/components/CCardDiscipline/CCardDiscipline.vue
index 6abbe6fd..f2a5890d 100755
--- a/src/components/CCardDiscipline/CCardDiscipline.vue
+++ b/src/components/CCardDiscipline/CCardDiscipline.vue
@@ -5,7 +5,7 @@
{{ discipline.label }}
-
+
diff --git a/src/components/CCheckCircuitsEnabled/CCheckCircuitsEnabled.scss b/src/components/CCheckCircuitsEnabled/CCheckCircuitsEnabled.scss
new file mode 100755
index 00000000..64cfa721
--- /dev/null
+++ b/src/components/CCheckCircuitsEnabled/CCheckCircuitsEnabled.scss
@@ -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%;
+}
diff --git a/src/components/CCheckCircuitsEnabled/CCheckCircuitsEnabled.ts b/src/components/CCheckCircuitsEnabled/CCheckCircuitsEnabled.ts
new file mode 100755
index 00000000..66f12638
--- /dev/null
+++ b/src/components/CCheckCircuitsEnabled/CCheckCircuitsEnabled.ts
@@ -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,
+ required: false,
+ default: null
+ },
+ to_group: {
+ type: Object as PropType,
+ 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,
+ }
+ }
+})
diff --git a/src/components/CCheckCircuitsEnabled/CCheckCircuitsEnabled.vue b/src/components/CCheckCircuitsEnabled/CCheckCircuitsEnabled.vue
new file mode 100755
index 00000000..434f3d8a
--- /dev/null
+++ b/src/components/CCheckCircuitsEnabled/CCheckCircuitsEnabled.vue
@@ -0,0 +1,49 @@
+
+
+
+
+ {{ $t('circuit.non_hai_circuito_nazionale') }}
+
+
+
+
+
+
+
+
+
+ {{ $t('circuit.destin_non_ha_circuito_naz') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/CCheckCircuitsEnabled/index.ts b/src/components/CCheckCircuitsEnabled/index.ts
new file mode 100755
index 00000000..175b7105
--- /dev/null
+++ b/src/components/CCheckCircuitsEnabled/index.ts
@@ -0,0 +1 @@
+export {default as CCheckCircuitsEnabled} from './CCheckCircuitsEnabled.vue'
diff --git a/src/components/CContactUser/CContactUser.ts b/src/components/CContactUser/CContactUser.ts
index b94e3257..fcdb1b81 100755
--- a/src/components/CContactUser/CContactUser.ts
+++ b/src/components/CContactUser/CContactUser.ts
@@ -19,6 +19,11 @@ export default defineComponent({
showBtnActivities: {
type: Boolean,
required: true,
+ },
+ sendRIS: {
+ type: Number,
+ required: false,
+ default: 0,
}
},
components: { CLabel, CSendCoins },
diff --git a/src/components/CContactUser/CContactUser.vue b/src/components/CContactUser/CContactUser.vue
index b373b572..c701bae7 100755
--- a/src/components/CContactUser/CContactUser.vue
+++ b/src/components/CContactUser/CContactUser.vue
@@ -68,10 +68,11 @@
-
+
diff --git a/src/components/CMyCircuit/CMyCircuit.ts b/src/components/CMyCircuit/CMyCircuit.ts
index 83e9bd9b..25ca31fb 100755
--- a/src/components/CMyCircuit/CMyCircuit.ts
+++ b/src/components/CMyCircuit/CMyCircuit.ts
@@ -62,7 +62,7 @@ export default defineComponent({
const globalStore = useGlobalStore()
- const circuit = ref(
null)
+ const circuit = ref(null)
const account = computed(() => circuit.value ? userStore.getAccountByCircuitId(circuit.value._id) : null )
const qtarem = computed(() => account.value ? circuitStore.getRemainingCoinsToSend(account.value) : 0)
diff --git a/src/components/CMyCircuit/CMyCircuit.vue b/src/components/CMyCircuit/CMyCircuit.vue
index f7e46c26..4df248d5 100755
--- a/src/components/CMyCircuit/CMyCircuit.vue
+++ b/src/components/CMyCircuit/CMyCircuit.vue
@@ -387,7 +387,7 @@
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
diff --git a/src/components/CSendCoins/CSendCoins.vue b/src/components/CSendCoins/CSendCoins.vue
index 6cc2ab82..f82bfff6 100755
--- a/src/components/CSendCoins/CSendCoins.vue
+++ b/src/components/CSendCoins/CSendCoins.vue
@@ -12,6 +12,12 @@
+
+
+
-
+
+
circ.showAlways)
+
+ for (const circ of circNazionali) {
+ const trovato = userStore.my.profile.mycircuits.findIndex((mycirc: any) => mycirc.circuitname === circ.name) >= 0
+ if (trovato){
+ return true
+ }
+ }
+
+ return false
+
+ },
+
+ EDentroAlCircuitoNazionale(user: IUserFields) {
+
+ const circNazionali: any = this.listcircuits.filter((circ: any) => circ.showAlways)
+
+ for (const circ of circNazionali) {
+ const trovato = user.profile.mycircuits.findIndex((mycirc: any) => mycirc.circuitname === circ.name) >= 0
+ if (trovato){
+ return true
+ }
+ }
+
+ return false
+
+ },
+
+ isCircuitNational(circuitname: string): boolean {
+ return this.listcircuits.findIndex((rec: ICircuit) => rec.name === circuitname && rec.showAlways) >= 0
+ },
+
+ IsNationalAndNotEnterInLocal(circuitname: string): boolean {
+ const userStore = useUserStore()
+
+ return this.isCircuitNational(circuitname) && userStore.my.profile.mycircuits.length <= 0
+
+ },
+
getCircuitClass(circuit: ICircuit) {
if (circuit.status === shared_consts.CIRCUIT_STATUS.FASE3_MONETA_ABILITATA)
return 'circuito_abilitato'
@@ -61,6 +103,7 @@ export const useCircuitStore = defineStore('CircuitStore', {
return 'circuito_in_creazione'
},
+
getColorCircuitClass(circuit: ICircuit) {
if (circuit.status === shared_consts.CIRCUIT_STATUS.FASE3_MONETA_ABILITATA)
return 'green'
diff --git a/src/store/Modules/tools.ts b/src/store/Modules/tools.ts
index d73ec06c..c305b451 100644
--- a/src/store/Modules/tools.ts
+++ b/src/store/Modules/tools.ts
@@ -6117,6 +6117,22 @@ export const tools = {
})
})
},
+
+ SendMsgRisItalia($q: any, usernameDest: string) {
+
+ const userStore = useUserStore()
+
+ const username = userStore.my.username
+
+ userStore.setSendCmd($q, t, username, usernameDest, shared_consts.CallFunz.ENTRA_RIS_ITALIA, null)
+ .then((res: any) => {
+ if (res && res.result) {
+ this.updateMyData(res)
+ tools.showPositiveNotif($q, res.popupOnApp)
+ }
+ })
+ },
+
setRequestGroup($q: any, username: string, groupnameDest: string, value: boolean) {
const userStore = useUserStore()
diff --git a/src/store/UserStore.ts b/src/store/UserStore.ts
index 82f0fcd8..b5d6efa4 100755
--- a/src/store/UserStore.ts
+++ b/src/store/UserStore.ts
@@ -100,6 +100,7 @@ export const DefaultUser: IUserFields = {
stepTutorial: 0,
noNameSurname: false,
noCircuit: false,
+ noCircIta: false,
noFoto: false,
asked_circuits: [],
refused_circuits: [],
@@ -168,6 +169,7 @@ export const DefaultProfile: IUserProfile = {
stepTutorial: 0,
noNameSurname: false,
noCircuit: false,
+ noCircIta: false,
noFoto: false,
asked_circuits: [],
refused_circuits: [],
@@ -500,7 +502,7 @@ export const useUserStore = defineStore('UserStore', {
}
// se non ho neanche 1 circuito in comune, metto il mio preferito
- if (arrfinale.length <= 0) {
+ /*if (arrfinale.length <= 0) {
const circuit = circuitStore.getCircuitByProvince(this.my.profile.resid_province)
if (circuit)
arrfinale.push(circuit.name)
@@ -510,7 +512,7 @@ export const useUserStore = defineStore('UserStore', {
}
}
} else {
- }
+ } */
console.log('arrout', arrfinale)
@@ -953,6 +955,17 @@ export const useUserStore = defineStore('UserStore', {
return await this.execDbOpUser({ mydata })
}
},
+ async savenoCircIta(val: boolean) {
+ const mydata = {
+ _id: this.my._id,
+ dbop: 'noCircIta',
+ value: val,
+ }
+ if (this.my.profile.noCircIta !== val) {
+ this.my.profile.noCircIta = val
+ return await this.execDbOpUser({ mydata })
+ }
+ },
async savenoFoto(val: boolean) {
const mydata = {
_id: this.my._id,
@@ -1626,6 +1639,21 @@ export const useUserStore = defineStore('UserStore', {
},
+ async setSendCmd($q: any, t: any, usernameOrig: string, usernameDest: string, cmd: number, value: any) {
+ return Api.SendReq('/users/sendcmd', 'POST', { usernameOrig, usernameDest, cmd, value })
+ .then((res) => {
+ this.updateTables = true
+ // const notifStore = useNotifStore()
+
+ // notifStore.updateNotification = true
+ return res.data
+ }).catch((error) => {
+ tools.showNegativeNotif($q, t('db.recfailed'))
+ return {}
+ })
+
+ },
+
async setCircuitCmd($q: any, t: any, usernameOrig: string, circuitname: string, cmd: number, value: any, extrarec?: any) {
return await Api.SendReq('/users/circuits/cmd', 'POST', { usernameOrig, circuitname, cmd, value, extrarec })
.then((res) => {
@@ -1849,12 +1877,15 @@ export const useUserStore = defineStore('UserStore', {
let yes = true
- // Check if I have at least 1 Circuit
- yes = yes && (this.my.profile.mycircuits.length > 0)
+ if (this.my.profile && this.my.profile.mycircuits) {
- if (myuser && myuser.profile && myuser.profile.mycircuits) {
- // Check if myuser has at least 1 Circuit
- yes = yes && (myuser.profile.mycircuits.length > 0)
+ // Check if I have at least 1 Circuit
+ yes = yes && (this.my.profile.mycircuits.length > 0)
+
+ if (myuser && myuser.profile && myuser.profile.mycircuits) {
+ // Check if myuser has at least 1 Circuit
+ yes = yes && (myuser.profile.mycircuits.length > 0)
+ }
}
return yes
@@ -1902,7 +1933,7 @@ export const useUserStore = defineStore('UserStore', {
const dateold = tools.addDays(tools.getDateNow(), -(30 * 6))
if (this.my)
return this.my.date_reg! && new Date(this.my.date_reg).getTime() < dateold.getTime()
- else
+ else
return true
} catch (e) {
return false
diff --git a/src/views/user/mycircuit/mycircuit.vue b/src/views/user/mycircuit/mycircuit.vue
index d86bdf26..940ab2a2 100755
--- a/src/views/user/mycircuit/mycircuit.vue
+++ b/src/views/user/mycircuit/mycircuit.vue
@@ -312,6 +312,29 @@
>
+
+
+
+
+
+ {{
+ $t('circuit.beforeentertolocalcircuit')
+ }}
+
+
+
+
$route.query.idnotif ? $route.query.idnotif.toString() : '')
const isDebugOn = computed(() => tools.isDebugOn())
+ const sendRIS = computed(() => !!$route.query.sendris ? $route.query.sendris : 0)
+
const $router = useRouter()
const filtroutente = ref([])
const showPic = ref(false)
@@ -210,6 +212,7 @@ export default defineComponent({
globalStore,
getLinkWebSite,
gotoPage,
+ sendRIS,
}
}
})
diff --git a/src/views/user/myprofile/myprofile.vue b/src/views/user/myprofile/myprofile.vue
index 3c34e830..2168e1b4 100755
--- a/src/views/user/myprofile/myprofile.vue
+++ b/src/views/user/myprofile/myprofile.vue
@@ -641,6 +641,7 @@