From 800df74f3f507d2009b1485627ede6e4e560e9d6 Mon Sep 17 00:00:00 2001 From: Surya Paolo Date: Tue, 20 Jun 2023 01:08:08 +0200 Subject: [PATCH] l'admin non riesce a cambiare il fido degli utenti... --- .env.development | 2 +- .env.example.production | 2 +- .env.test.risosrv | 2 +- _ALL_SITES/riso.app/.env.development | 2 +- _ALL_SITES/riso.app/.env.production | 2 +- .../terradellavisione.app/.env.development | 2 +- src/db/static_data.ts | 22 ++++++------- src/store/Modules/fieldsTable.ts | 4 +-- src/store/NotifStore.ts | 2 +- src/store/UserStore.ts | 32 ++++++++++++------- src/store/globalStore.ts | 2 +- 11 files changed, 42 insertions(+), 32 deletions(-) diff --git a/.env.development b/.env.development index e61b771e..c87b0062 100755 --- a/.env.development +++ b/.env.development @@ -1,4 +1,4 @@ -APP_VERSION="1.0.11" +APP_VERSION="1.0.13" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL="newfreeplanet" diff --git a/.env.example.production b/.env.example.production index 6edc34f8..542a34bb 100755 --- a/.env.example.production +++ b/.env.example.production @@ -1,4 +1,4 @@ -APP_VERSION="1.0.11" +APP_VERSION="1.0.13" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL=newfreeplanet diff --git a/.env.test.risosrv b/.env.test.risosrv index 438e256a..6928fd74 100755 --- a/.env.test.risosrv +++ b/.env.test.risosrv @@ -1,4 +1,4 @@ -APP_VERSION="1.0.11" +APP_VERSION="1.0.13" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL=newfreeplanet diff --git a/_ALL_SITES/riso.app/.env.development b/_ALL_SITES/riso.app/.env.development index e61b771e..c87b0062 100755 --- a/_ALL_SITES/riso.app/.env.development +++ b/_ALL_SITES/riso.app/.env.development @@ -1,4 +1,4 @@ -APP_VERSION="1.0.11" +APP_VERSION="1.0.13" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL="newfreeplanet" diff --git a/_ALL_SITES/riso.app/.env.production b/_ALL_SITES/riso.app/.env.production index 5330a5bf..27e93422 100644 --- a/_ALL_SITES/riso.app/.env.production +++ b/_ALL_SITES/riso.app/.env.production @@ -1,4 +1,4 @@ -APP_VERSION="1.0.11" +APP_VERSION="1.0.13" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL=newfreeplanet diff --git a/_ALL_SITES/terradellavisione.app/.env.development b/_ALL_SITES/terradellavisione.app/.env.development index f2d23beb..138db6a6 100755 --- a/_ALL_SITES/terradellavisione.app/.env.development +++ b/_ALL_SITES/terradellavisione.app/.env.development @@ -1,4 +1,4 @@ -APP_VERSION="1.0.11" +APP_VERSION="1.0.13" SERVICE_WORKER_FILE="service-worker.js" APP_ID="14" DIRECTORY_LOCAL="newfreeplanet" diff --git a/src/db/static_data.ts b/src/db/static_data.ts index 05acef5d..7e2b8ad0 100755 --- a/src/db/static_data.ts +++ b/src/db/static_data.ts @@ -101,6 +101,17 @@ function getDynamicPages(site: ISites): IListRoutes[] { inmenu: true, infooter: true, }, + { + active: site.confpages && site.confpages.enableCircuits, + order: 16, + path: '/circuits', + materialIcon: 'fas fa-coins', + name: 'mypages.circuits', + component: () => import('@/views/user/mycircuits/mycircuits.vue'), + meta: { requiresAuth: true }, + inmenu: true, + infooter: true, + }, { active: true, order: 20, @@ -156,17 +167,6 @@ function getDynamicPages(site: ISites): IListRoutes[] { inmenu: false, infooter: false, }, - { - active: site.confpages && site.confpages.enableCircuits, - order: 133, - path: '/circuits', - materialIcon: 'fas fa-coins', - name: 'mypages.circuits', - component: () => import('@/views/user/mycircuits/mycircuits.vue'), - meta: { requiresAuth: true }, - inmenu: false, - infooter: false, - }, { active: true, order: 136, diff --git a/src/store/Modules/fieldsTable.ts b/src/store/Modules/fieldsTable.ts index 0135c81a..578774d7 100755 --- a/src/store/Modules/fieldsTable.ts +++ b/src/store/Modules/fieldsTable.ts @@ -3052,12 +3052,12 @@ export const colTableCircuit = [ AddCol({ name: 'name', label_trans: 'circuit.name', required: true, - maxlength: 30, + maxlength: 40, showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InView }), AddCol({ name: 'path', label_trans: 'circuit.path', required: true, - maxlength: 30, + maxlength: 40, showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InView, allowchar: costanti.ALLOWCHAR_CODE, }), diff --git a/src/store/NotifStore.ts b/src/store/NotifStore.ts index e51d9f72..b334c5d5 100755 --- a/src/store/NotifStore.ts +++ b/src/store/NotifStore.ts @@ -232,7 +232,7 @@ export const useNotifStore = defineStore('NotifStore', { return Api.SendReq('/sendnotif', 'POST', data) .then((res) => { - console.log('res', res) + // console.log('res', res) if (res.status === 200) { if (res.data.code === serv_constants.RIS_CODE_OK && res.data.record) { if (res.data.record.dest === userStore.my.username) { diff --git a/src/store/UserStore.ts b/src/store/UserStore.ts index 36446fc4..b97a74de 100755 --- a/src/store/UserStore.ts +++ b/src/store/UserStore.ts @@ -488,6 +488,7 @@ export const useUserStore = defineStore('UserStore', { getMyCircuitsInCommonByUser(user: IUserFields): any[] { let arrout = [] + let arrfinale = [] let vuoto = false const circuitStore = useCircuitStore() @@ -497,21 +498,30 @@ export const useUserStore = defineStore('UserStore', { else arrout = tools.getCommon([...this.my.profile.mycircuits], [...user.profile.mycircuits], 'circuitname') - // se non ho neanche 1 circuito in comune, metto il mio preferito - if (arrout.length <= 0) { - const circuit = circuitStore.getCircuitByProvince(this.my.profile.resid_province) - if (circuit) - arrout.push(circuit.name) - else { - if (this.my.profile.mycircuits.length > 0) { - arrout.push(this.my.profile.mycircuits[0].circuitname) - } + // controlla che il circuito sia Abilitato! + for (const circuitname of arrout) { + const circuit = circuitStore.getCircuitByName(circuitname) + if (circuit && circuit.transactionsEnabled) { + arrfinale.push(circuitname) } } - console.log('arrout', arrout) + // se non ho neanche 1 circuito in comune, metto il mio preferito + if (arrfinale.length <= 0) { + const circuit = circuitStore.getCircuitByProvince(this.my.profile.resid_province) + if (circuit) + arrfinale.push(circuit.name) + else { + if (this.my.profile.mycircuits.length > 0) { + arrfinale.push(this.my.profile.mycircuits[0].circuitname) + } + } + } else { + } - return arrout + console.log('arrout', arrfinale) + + return arrfinale }, getMyCircuits(): any[] { diff --git a/src/store/globalStore.ts b/src/store/globalStore.ts index 3fad6c69..354a8b24 100644 --- a/src/store/globalStore.ts +++ b/src/store/globalStore.ts @@ -1093,7 +1093,7 @@ export const useGlobalStore = defineStore('GlobalStore', { return Api.SendReq('/settable', 'POST', mydata) .then((res) => { this.serverError = false - console.log('res', res) + // console.log('res', res) if (res && res.data) { tools.updateMyData(res.data.ris) if (res.data.rec) {