-
isAppRunning: {{ isAppRunning }} -
-
deferredPrompt: {{ deferredPrompt }} -
-
homescreen: {{ homescreen }}
+
+ isAppRunning: {{ isAppRunning }} • deferredPrompt: {{ !!deferredPrompt }} •
+ homescreen: {{ homescreen }} isInRestrictedWebView:
+ {{ isInRestrictedWebView }} isInTelegramWebView: {{ tools.isInTelegramWebView() }}
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ Stai usando il browser interno di {{ webViewName }}.
+ Per installare l’app Clicca sui tre puntini "⋮" in alto e
+ scegli “Apri con...”
+
-
-
-
-
-
-
-
1) Cliccare sui 3 puntini verticali
- 2) Cliccare sulla voce 'Installa App' o 'Schermata Home'
- 3) Andare sulla schermata HOME e cliccare sull'icona di RISO.
-
-
-
- >
-
-
-
+
+
+ Stai usando il browser interno di {{ webViewName }}.
+ Per installare l’app, apri questo link nel browser esterno.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1) Clicca sui tre puntini â‹®
+ 2) Scegli “Installa app” o
+ “Aggiungi alla home”
+ 3) Apri l’app dalla schermata Home.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Apri questa pagina in Brave o Chrome per
+ installare l’app.
+
+
+
+
-
-
+
-
diff --git a/src/components/CMyElem/CMyElem.ts b/src/components/CMyElem/CMyElem.ts
index 2bbefe33..e44d0afc 100755
--- a/src/components/CMyElem/CMyElem.ts
+++ b/src/components/CMyElem/CMyElem.ts
@@ -197,6 +197,10 @@ export default defineComponent({
const isAppRunning = computed(() => globalStore.isAppRunning);
+ const cardGroupMaxWidth = computed(() => {
+ return tools.getwidth($q) + ' px';
+ });
+
const currentCardsPerSlide = computed(() => {
return myel.value.num2 ? myel.value.num2 : 2; // cardsPerSlide
});
@@ -229,6 +233,7 @@ export default defineComponent({
const speedSafe = computed(() => (myel.value as any).speed ?? 0);
const carouselRef = ref(
null);
+ const cardScroller = ref(null);
const isAtStart = ref(true);
const isAtEnd = ref(false);
const activeIndex = ref(0);
@@ -379,6 +384,16 @@ export default defineComponent({
}
}
+ function scrollCards(delta: number) {
+ const scroller = cardScroller.value?.[0] || cardScroller.value;
+ if (scroller) {
+ scroller.scrollBy({
+ left: delta,
+ behavior: 'smooth',
+ });
+ }
+ }
+
onMounted(mounted);
return {
@@ -426,6 +441,9 @@ export default defineComponent({
naviga,
speedSafe,
t,
+ cardGroupMaxWidth,
+ cardScroller,
+ scrollCards,
};
},
});
diff --git a/src/components/CMyElem/CMyElem.vue b/src/components/CMyElem/CMyElem.vue
index fa8f4868..3316b0d4 100755
--- a/src/components/CMyElem/CMyElem.vue
+++ b/src/components/CMyElem/CMyElem.vue
@@ -81,7 +81,7 @@
:color="$q.dark.isActive ? `black` : `white`"
:text-color="$q.dark.isActive ? `white` : `black`"
icon="keyboard_arrow_left"
- @click="$refs.carousel.previous()"
+ @click="scrollCards(-300)"
>
@@ -106,59 +106,68 @@
:key="groupIndex"
:name="groupIndex"
>
-
-
-
@@ -1160,10 +1169,7 @@
:features="myel.features"
:isDark="myel.parambool2"
>
-
-
-
diff --git a/src/components/CMyPageElem/CMyPageElem.vue b/src/components/CMyPageElem/CMyPageElem.vue
index ee2dd19a..3ee3632c 100755
--- a/src/components/CMyPageElem/CMyPageElem.vue
+++ b/src/components/CMyPageElem/CMyPageElem.vue
@@ -65,7 +65,7 @@
diff --git a/src/components/CMyPopupEdit/CMyPopupEdit.vue b/src/components/CMyPopupEdit/CMyPopupEdit.vue
index 708f6c2a..27172bc7 100755
--- a/src/components/CMyPopupEdit/CMyPopupEdit.vue
+++ b/src/components/CMyPopupEdit/CMyPopupEdit.vue
@@ -50,6 +50,7 @@
-
+
diff --git a/src/components/CMyUser/CMyUser.ts b/src/components/CMyUser/CMyUser.ts
index 368f5ee9..70795126 100755
--- a/src/components/CMyUser/CMyUser.ts
+++ b/src/components/CMyUser/CMyUser.ts
@@ -153,7 +153,6 @@ export default defineComponent({
showsendCoinTo,
showsendCoin,
clickToUser,
- $q,
}
},
})
diff --git a/src/components/CNotifAtTop/CNotifAtTop.ts b/src/components/CNotifAtTop/CNotifAtTop.ts
index 0bbec432..bf6cd72c 100755
--- a/src/components/CNotifAtTop/CNotifAtTop.ts
+++ b/src/components/CNotifAtTop/CNotifAtTop.ts
@@ -66,7 +66,6 @@ export default defineComponent({
onMounted(mounted)
return {
- q,
t,
getImgByNotif,
getNotifText,
diff --git a/src/components/CSaldo/CSaldo.vue b/src/components/CSaldo/CSaldo.vue
index 3179bb6a..d1dc43c4 100755
--- a/src/components/CSaldo/CSaldo.vue
+++ b/src/components/CSaldo/CSaldo.vue
@@ -6,7 +6,7 @@
:color_border="saldo > 0 ? `green` : `red`"
:color="color"
v-model="saldo"
- :label="t('account.saldo')"
+ :label="$q.screen.lt.sm ? '' : t('account.saldo')"
:paramTypeAccount="paramTypeAccount"
:myrecparam="account"
:valueextra="
@@ -30,7 +30,7 @@
: (valueextra ? valueextra : '')
"
:label="
- `(` + t('account.dispon') + `: ` + qtarem + ` ` + symbol + `)`
+ `(${ $q.screen.lt.sm ? t('account.dispon_small') : t('account.dispon') }: ${ qtarem } ${ symbol })`
"
:paramTypeAccount="paramTypeAccount"
:myrecparam="account"
diff --git a/src/components/CStatMacro/CStatMacro.ts b/src/components/CStatMacro/CStatMacro.ts
index b1c77558..56a327b5 100755
--- a/src/components/CStatMacro/CStatMacro.ts
+++ b/src/components/CStatMacro/CStatMacro.ts
@@ -29,7 +29,6 @@ export default defineComponent({
return {
tools,
- q,
}
},
})
diff --git a/src/components/CStatusReg/CStatusReg.ts b/src/components/CStatusReg/CStatusReg.ts
index 919182fa..1caaa36d 100755
--- a/src/components/CStatusReg/CStatusReg.ts
+++ b/src/components/CStatusReg/CStatusReg.ts
@@ -157,7 +157,7 @@ export default defineComponent({
}
async function load() {
- // console.log('load')
+ console.log('load CStatusReg')
myloadingload.value = true
datastat.value = await globalStore.getStatSite()
@@ -210,7 +210,7 @@ export default defineComponent({
$router.push(link)
}
- created()
+ onMounted(created)
onBeforeUnmount(beforeDestroy)
diff --git a/src/components/CStatusReg/CStatusReg.vue b/src/components/CStatusReg/CStatusReg.vue
index e2248ded..462f8150 100755
--- a/src/components/CStatusReg/CStatusReg.vue
+++ b/src/components/CStatusReg/CStatusReg.vue
@@ -11,19 +11,19 @@
-
-
-
-
@@ -54,7 +54,7 @@
-
@@ -91,7 +91,7 @@
}}
-
+
@@ -148,7 +148,7 @@
-
@@ -183,7 +183,7 @@
-
+
@@ -205,7 +205,7 @@
alla RETE Solidale di RISO.
-
@@ -244,7 +244,7 @@
-
+
@@ -266,7 +266,7 @@
Rete di fiducia.
-
@@ -311,7 +311,7 @@
-
+
diff --git a/src/components/CUserNonVerif/CUserNonVerif.ts b/src/components/CUserNonVerif/CUserNonVerif.ts
index 83119766..46007ff2 100755
--- a/src/components/CUserNonVerif/CUserNonVerif.ts
+++ b/src/components/CUserNonVerif/CUserNonVerif.ts
@@ -29,6 +29,10 @@ export default defineComponent({
const site = ref(globalStore.site)
const username_telegram_aportador = ref('')
+ const isLogged = computed(() => userStore.isLogged)
+ const isEmailVerified = computed(() => userStore.my.verified_email)
+ const telegVerificato = computed(() => userStore.my.profile.teleg_id > 0 && userStore.my.profile.teleg_id_old > 0)
+
function load() {
///
}
@@ -41,6 +45,9 @@ export default defineComponent({
tools,
site,
username_telegram_aportador,
+ isLogged,
+ isEmailVerified,
+ telegVerificato,
}
},
})
diff --git a/src/components/CUserNonVerif/CUserNonVerif.vue b/src/components/CUserNonVerif/CUserNonVerif.vue
index 451cc539..2b7a3b04 100755
--- a/src/components/CUserNonVerif/CUserNonVerif.vue
+++ b/src/components/CUserNonVerif/CUserNonVerif.vue
@@ -5,11 +5,11 @@
>
-
+
diff --git a/src/components/MyHeader/MyHeader.ts b/src/components/MyHeader/MyHeader.ts
index 607fa70c..02ef994f 100755
--- a/src/components/MyHeader/MyHeader.ts
+++ b/src/components/MyHeader/MyHeader.ts
@@ -531,8 +531,8 @@ export default defineComponent({
}, 100);
}
- function logoutHandler() {
- userStore.logout().then(() => {
+ async function logoutHandler() {
+ await userStore.logout().then(() => {
// $router.replace('/logout')
//
// setTimeout(() => {
diff --git a/src/css/app.scss b/src/css/app.scss
index 9d192b2d..808160f7 100755
--- a/src/css/app.scss
+++ b/src/css/app.scss
@@ -2,6 +2,24 @@
@import 'variables.scss';
+/* blocco scroll orizzontale a ogni livello “pagina” */
+html,
+body,
+#q-app {
+ width: 100%;
+ max-width: 100%;
+ overflow-x: hidden !important;
+}
+
+.q-layout,
+.q-page-container,
+.q-page {
+ max-width: 100%;
+ overflow-x: hidden;
+ /* evita barre X su page container */
+}
+
+
body {
font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
-webkit-font-smoothing: antialiased;
@@ -345,9 +363,14 @@ h3 {
.my-card {
width: 100%;
- min-width: 350px;
+ min-width: 280px;
padding: 1rem 1rem;
+ /* piĂą sicuro su mobile */
+ @media (max-width: 360px) {
+ min-width: 240px;
+ }
+
@media (max-width: 1024px) {
/* Versione Mobile */
max-width: 1024px !important;
@@ -974,7 +997,8 @@ h3 {
width: 100%;
margin-left: auto;
margin-right: auto;
- min-width: 800px;
+ min-width: 0;
+ /* lascia che si adatti */
padding-bottom: 20px;
margin-top: 1rem;
@@ -1109,7 +1133,7 @@ h3 {
}
.dialog_card {
- min-width: 100%;
+ min-width: auto;
width: 100% !important;
margin-left: 2px !important;
margin-right: 2px !important;
@@ -2234,7 +2258,7 @@ $coloreprincipale: lightblue;
}
.card-carousel-container {
- width: 100%;
+ max-width: 100%;
overflow: hidden;
position: relative;
}
@@ -2249,6 +2273,11 @@ $coloreprincipale: lightblue;
padding: 1rem 0;
}
+.card-carousel .row.no-wrap {
+ flex-wrap: nowrap !important;
+ /* solo dentro il carousel */
+}
+
.card-carousel::-webkit-scrollbar {
display: none;
}
@@ -2304,7 +2333,9 @@ $coloreprincipale: lightblue;
}
.row.no-wrap {
- flex-wrap: nowrap !important;
+ flex-wrap: nowrap;
+ min-width: 0;
+ /* consenti ai figli di restringersi */
// gap: 1rem;
}
@@ -2813,3 +2844,31 @@ body.body--dark {
opacity: 0.6;
}
}
+#q-app, .q-page, .q-page-container {
+ word-break: break-word;
+ overflow-wrap: anywhere;
+}
+
+.card-group-scrollable {
+ width: 100%;
+ overflow-x: auto;
+ overflow-y: hidden;
+ -webkit-overflow-scrolling: touch; // smooth scroll su iOS
+ scrollbar-width: none; // nasconde scrollbar su Firefox
+ -ms-overflow-style: none; // nasconde scrollbar su IE/Edge
+}
+
+.card-group-scrollable::-webkit-scrollbar {
+ display: none; // nasconde scrollbar su WebKit
+}
+
+.flex-card {
+ flex: 0 0 auto !important; // evita che si restringano
+ margin: 0 0.5rem;
+ max-width: none;
+}
+
+.row.no-wrap {
+ min-width: fit-content; // permette alla riga di espandersi oltre il container
+ flex-wrap: nowrap !important;
+}
\ No newline at end of file
diff --git a/src/layouts/toolbar/notifPopover/notifPopover.ts b/src/layouts/toolbar/notifPopover/notifPopover.ts
index 28e4b99c..c1845ccc 100755
--- a/src/layouts/toolbar/notifPopover/notifPopover.ts
+++ b/src/layouts/toolbar/notifPopover/notifPopover.ts
@@ -70,7 +70,7 @@ export default defineComponent({
return props.modelValue
},
- set(value) {
+ set(value) {s
return emit('update:modelValue', value)
}
})
diff --git a/src/layouts/toolbar/notifPopover/notifPopover.vue b/src/layouts/toolbar/notifPopover/notifPopover.vue
index 833a95ad..03272864 100755
--- a/src/layouts/toolbar/notifPopover/notifPopover.vue
+++ b/src/layouts/toolbar/notifPopover/notifPopover.vue
@@ -134,7 +134,7 @@
:class="!notif.read ? 'unread' : 'read'"
@click="clickNotif(notif)"
>
-
+
@@ -214,7 +214,7 @@
size="sm"
icon="fas fa-user-plus"
color="positive"
- :label="$t('friends.accept')"
+ :label="t('friends.accept')"
@click="
tools.addToMyGroups(q, notif.sender, notif.extrafield)
"
@@ -225,7 +225,7 @@
size="sm"
icon="fas fa-user-minus"
color="negative"
- :label="$t('friends.refuse')"
+ :label="t('friends.refuse')"
@click="
tools.refuseReqGroup(q, notif.sender, notif.extrafield)
"
diff --git a/src/mixins/mixin-users.ts b/src/mixins/mixin-users.ts
index 70159a8d..f0cfb853 100755
--- a/src/mixins/mixin-users.ts
+++ b/src/mixins/mixin-users.ts
@@ -156,7 +156,7 @@ export default function () {
return ris
}
- function getNotifText($t: any, notif: INotif) {
+ function getNotifText(t: any, notif: INotif) {
let descr = notif.descr
let status = notif.status
diff --git a/src/model/GlobalStore.ts b/src/model/GlobalStore.ts
index d8b8ee6c..5b9a91f4 100755
--- a/src/model/GlobalStore.ts
+++ b/src/model/GlobalStore.ts
@@ -1091,6 +1091,10 @@ export interface IColGridTable {
tipoconto?: number
path?: string
onlyforAdmin?: boolean
+ showifIsStatusDiPersona?: boolean
+ showifIsStatusOnLine?: boolean
+ requiredifIsStatusDiPersona?: boolean
+ requiredifIsStatusOnLine?: boolean
}
export interface ITableRec {
@@ -1368,7 +1372,7 @@ export interface IMyBacheca extends IMyMain {
idStatusSkill: number[]
idContribType: string[]
dateTimeStart: Date
- dateTimeEnd: Date
+ dateTimeEnd: Date | null
idCity: number[]
photos: IGallery[]
NumLevel: number
@@ -1384,6 +1388,7 @@ export interface IMyBacheca extends IMyMain {
// **ADDFIELD_MYBACHECAS
website: string
+ link_conference?: string,
descr: string
date_created?: Date,
date_updated?: Date,
diff --git a/src/model/other.ts b/src/model/other.ts
index 63eebf08..0c3a2da3 100755
--- a/src/model/other.ts
+++ b/src/model/other.ts
@@ -1,6 +1,6 @@
export interface IToken {
access: string
- // browser: string
+ browser?: string
token: string
refreshToken: string
data_login: Date
diff --git a/src/statics/lang/it.js b/src/statics/lang/it.js
index f6290279..68e668ff 100755
--- a/src/statics/lang/it.js
+++ b/src/statics/lang/it.js
@@ -628,6 +628,7 @@ const msg_it = {
email_reg_collettivo: 'Email dell\'Amministratore',
website: 'Sito Web',
link_maplocation: 'Link posizione su mappa',
+ link_conference: 'Link alla video-conferenza',
intcode_cell: 'Prefisso Int.',
cell: 'Cellulare',
cell2: 'Altro telefono',
@@ -1659,6 +1660,7 @@ const msg_it = {
importo_iniziale: 'Importo Iniziale',
saldo: 'Saldo',
dispon: 'DisponibilitĂ ',
+ dispon_small: 'Dispon.',
saldo_tips: 'Rappresenta quanto credito ho accumulato. Ma posso andare anche sotto fino a {fido} {symbol}',
fido_casa: 'I residenti della provincia del circuito hanno la Fiducia Concesso abilitato. (Fiducia: {fido} {symbol})',
user: 'Utente',
diff --git a/src/store/Api/Instance.ts b/src/store/Api/Instance.ts
index b4ffe829..e2ed70bd 100755
--- a/src/store/Api/Instance.ts
+++ b/src/store/Api/Instance.ts
@@ -1,61 +1,66 @@
import type { AxiosRequestConfig, AxiosInstance, AxiosResponse } from 'axios';
-import axios from 'axios'
+import axios from 'axios';
// import LoginModule from '../Modules/Auth/LoginStore'
-import { toolsext } from '@src/store/Modules/toolsext'
-import { serv_constants } from '@src/store/Modules/serv_constants'
-import { useGlobalStore } from '@store/globalStore'
-import { useUserStore } from '@store/UserStore'
-import { tools } from '@src/store/Modules/tools'
-import * as Types from './ApiTypes'
+import { toolsext } from '@src/store/Modules/toolsext';
+import { serv_constants } from '@src/store/Modules/serv_constants';
+import { useGlobalStore } from '@store/globalStore';
+import { useUserStore } from '@store/UserStore';
+import { tools } from '@src/store/Modules/tools';
+import * as Types from './ApiTypes';
import type { Observable } from 'rxjs';
import { from } from 'rxjs';
import { mergeMap, toArray } from 'rxjs/operators';
-export let API_URL = ''
+export let API_URL = '';
export const axiosInstance: AxiosInstance = axios.create({
baseURL: API_URL,
headers: {
Accept: 'application/json',
},
-})
-
-
-axiosInstance.interceptors.response.use(
+});
+/*axiosInstance.interceptors.response.use(
(response) => {
- if (import.meta.env.VITE_DEBUG === '1') console.log(response)
- return response
+ if (import.meta.env.VITE_DEBUG === '1') console.log(response);
+ return response;
},
(error) => {
- const globalStore = useGlobalStore()
+ const globalStore = useGlobalStore();
// console.log('error', error)
if (error.response) {
- if (import.meta.env.VITE_DEBUG === '1') console.log('Status = ', error.response.status)
- console.log('Request Error: ', error.response)
+ if (import.meta.env.VITE_DEBUG === '1')
+ console.log('Status = ', error.response.status);
+ console.log('Request Error: ', error.response);
if (error.response.status !== 0) {
- globalStore.setStateConnection('online')
+ globalStore.setStateConnection('online');
} else {
- globalStore.setStateConnection('offline')
+ globalStore.setStateConnection('offline');
}
} else {
- globalStore.setStateConnection('offline')
+ globalStore.setStateConnection('offline');
}
- return Promise.reject(error)
- },
-)
+ return Promise.reject(error);
+ }
+);
+*/
export const addAuthHeaders = () => {
// axiosInstance.defaults.headers.Authorization = `Bearer ${LoginModule.userInfos.userToken}`
-}
+};
//export const removeAuthHeaders = () => {
// delete axiosInstance.defaults.headers.Authorization
//}
-async function generateStream(path: string, payload: any, config?: RequestInit, options?: any): Promise
> {
- const userStore = useUserStore()
+async function generateStream(
+ path: string,
+ payload: any,
+ config?: RequestInit,
+ options?: any
+): Promise> {
+ const userStore = useUserStore();
const mieiparam: any = {
method: 'POST',
@@ -66,16 +71,13 @@ async function generateStream(path: string, payload: any, config?: RequestInit,
},
body: JSON.stringify(payload),
signal: options?.signal,
- ...config
- }
+ ...config,
+ };
- console.log('marams: ', mieiparam)
+ console.log('marams: ', mieiparam);
- const response = await fetch(
- path,
- mieiparam,
- );
- console.log('USCITA DA FETCH... !!!!!')
+ const response = await fetch(path, mieiparam);
+ console.log('USCITA DA FETCH... !!!!!');
if (response.status !== 200) throw new Error(response.status.toString());
return getIterableStream(response);
}
@@ -112,17 +114,25 @@ function getIterableStream(stream: NodeJS.ReadableStream): AsyncIterable {
}
// Funzione helper per inviare la richiesta HTTP
-async function Request(type: string, path: string, payload: any, responsedata = {}, options: any = {}) {
+async function Request(
+ type: string,
+ path: string,
+ payload: any,
+ responsedata = {},
+ options: any = {}
+) {
const userStore = useUserStore();
const globalStore = useGlobalStore();
const baseURL = globalStore.getServerHost();
try {
- if (tools.isDebug()) console.log('Axios Request', path, type, tools.notshowPwd(payload));
+ if (tools.isDebug())
+ console.log('Axios Request', path, type, tools.notshowPwd(payload));
const isFormData = type === 'postFormData';
- const config = {
+ let config: AxiosRequestConfig = {
baseURL,
+ timeout: 60000,
headers: {
'Content-Type': isFormData ? 'multipart/form-data' : 'application/json',
'x-auth': userStore.x_auth_token,
@@ -138,7 +148,7 @@ async function Request(type: string, path: string, payload: any, responsedata =
if (options?.stream) config.responseType = 'stream';
- let response;
+ let response: any;
const method = type.toLowerCase();
// Gestione dinamica del metodo HTTP
@@ -149,7 +159,7 @@ async function Request(type: string, path: string, payload: any, responsedata =
return new Promise((resolve, reject) => {
from(stream)
.pipe(
- mergeMap(event => from([event])),
+ mergeMap((event) => from([event])),
toArray()
)
.subscribe(
@@ -174,7 +184,21 @@ async function Request(type: string, path: string, payload: any, responsedata =
response = await axiosInstance[method](path, payload, config);
}
} else if (['get', 'delete'].includes(method)) {
- response = await axiosInstance[method](path, {
+ config.params = payload;
+ config.headers = {
+ ...config.headers,
+ 'Content-Type': 'application/json',
+ };
+
+ //console.log('FACCIO LA CHIAMATA axiosInstance' + method)
+ //console.log('. path', path);
+ //console.log('. config', config);
+
+ response = await axiosInstance[method](path, config ? config : {}); // âś… CORRETTO
+
+ //console.log('. USCITO DALLA CHIAMATA !', response);
+
+ /* response = await axiosInstance[method](path, {
baseURL,
params: payload,
headers: {
@@ -183,7 +207,8 @@ async function Request(type: string, path: string, payload: any, responsedata =
'x-refrtok': userStore.refreshToken,
},
...responsedata,
- });
+ });*/
+
} else if (type === 'postFormData') {
response = await axiosInstance.post(path, payload, config);
} else {
@@ -191,15 +216,19 @@ async function Request(type: string, path: string, payload: any, responsedata =
}
// Gestione aggiornamento token se necessario
- const setAuthToken = (path === '/updatepwd' || path === '/users/login');
- if (response && response.status === 200 && (setAuthToken || path === '/users/login')) {
+ const setAuthToken = path === '/updatepwd' || path === '/users/login';
+ if (
+ response &&
+ response.status === 200 &&
+ (setAuthToken || path === '/users/login')
+ ) {
const x_auth_token = String(response.headers['x-auth'] || '');
const refreshToken = String(response.headers['x-refrtok'] || '');
if (!x_auth_token) {
userStore.setServerCode(toolsext.ERR_AUTHENTICATION);
}
if (setAuthToken) {
- userStore.UpdatePwd(x_auth_token, refreshToken);
+ userStore.updatePwd(x_auth_token, refreshToken);
localStorage.setItem(toolsext.localStorage.token, x_auth_token);
localStorage.setItem(toolsext.localStorage.refreshToken, refreshToken);
}
@@ -213,28 +242,42 @@ async function Request(type: string, path: string, payload: any, responsedata =
return new Types.AxiosSuccess(response.data, response.status);
} catch (error) {
// Aggiornamento asincrono dello stato di connessione (setTimeout per dare tempo a eventuali animazioni)
+ console.error('Errore funzione Request', error)
setTimeout(() => {
if (['get'].includes(type.toLowerCase())) {
- globalStore.connData.downloading_server = (globalStore.connData.downloading_server === 1) ? -1 : globalStore.connData.downloading_server;
+ globalStore.connData.downloading_server =
+ globalStore.connData.downloading_server === 1
+ ? -1
+ : globalStore.connData.downloading_server;
} else {
- globalStore.connData.uploading_server = (globalStore.connData.uploading_server === 1) ? -1 : globalStore.connData.uploading_server;
- globalStore.connData.downloading_server = (globalStore.connData.downloading_server === 1) ? -1 : globalStore.connData.downloading_server;
+ globalStore.connData.uploading_server =
+ globalStore.connData.uploading_server === 1
+ ? -1
+ : globalStore.connData.uploading_server;
+ globalStore.connData.downloading_server =
+ globalStore.connData.downloading_server === 1
+ ? -1
+ : globalStore.connData.downloading_server;
}
}, 1000);
if (import.meta.env.DEV) {
console.log('ERROR using', path);
- console.log('error.response=', error.response);
+ if (error && error.response) {
+ console.log('error.response=', JSON.stringify(error.response, null, 2));
+ }
}
let mycode = 0;
if (error.response) {
const code = error.response.data?.code || 0;
mycode = code;
userStore.setServerCode(mycode);
- return Promise.reject(new Types.AxiosError(error.response.status, error.response.data, code));
+ return Promise.reject(
+ new Types.AxiosError(error.response.status, error.response.data, code)
+ );
}
return Promise.reject(new Types.AxiosError(0, null, mycode, error));
}
}
-export default Request
+export default Request;
diff --git a/src/store/Api/index.ts b/src/store/Api/index.ts
index ff35b7e1..5e300480 100755
--- a/src/store/Api/index.ts
+++ b/src/store/Api/index.ts
@@ -122,10 +122,10 @@ export const Api = {
}
},
- async checkTokenScaduto(status: number, evitaloop: boolean, url: string, method: string, mydata: any, setAuthToken: boolean = false) {
+ async checkTokenScaduto(status: number, evitaloop: boolean, url: string, method: string, mydata: any, setAuthToken: boolean = false, statuscode2: number = 0) {
const userStore = useUserStore();
- if (status === serv_constants.RIS_CODE__HTTP_FORBIDDEN_TOKEN_EXPIRED) {
+ if (status === serv_constants.RIS_CODE__HTTP_FORBIDDEN_TOKEN_EXPIRED || statuscode2 === serv_constants.RIS_CODE__HTTP_FORBIDDEN_TOKEN_EXPIRED) {
try {
console.log('Token scaduto. Tentativo di refresh...');
const newAccessToken = await this.refreshToken();
@@ -157,7 +157,7 @@ export const Api = {
// Gestione di altri errori critici
throw err2 || {status: serv_constants.RIS_CODE__HTTP_FORBIDDEN_INVALID_TOKEN} ;
}
- } else if (status === serv_constants.RIS_CODE__HTTP_FORBIDDEN_INVALID_TOKEN) {
+ } else if (status === serv_constants.RIS_CODE__HTTP_FORBIDDEN_INVALID_TOKEN || statuscode2 === serv_constants.RIS_CODE__HTTP_FORBIDDEN_INVALID_TOKEN) {
userStore.setAuth('', '');
const $router = useRouter()
throw { status: toolsext.ERR_RETRY_LOGIN };
@@ -199,7 +199,7 @@ export const Api = {
}
// Verifica sul token (funzione custom)
- const ret: any = await this.checkTokenScaduto(res.status, evitaloop, url, method, mydata, setAuthToken);
+ const ret: any = await this.checkTokenScaduto(res.status, evitaloop, url, method, mydata, setAuthToken, res.data!.statuscode2!);
if (ret) return ret;
if (tools.isDebug()) console.log(' ----> ', res);
@@ -255,12 +255,12 @@ export const Api = {
},
// Funzione che gestisce la chiamata con retry
- async SendReq(url: string, method: string, mydata: any, setAuthToken = false, evitaloop = false, retryCount = 1, retryDelay = 5000, myformdata = null, responsedata = null, options = null) {
+ async SendReq(url: string, method: string, mydata: any, setAuthToken = false, evitaloop = false, retryCount = 1, retryDelay = 5000, myformdata: any = null, responsedata: any = null, options: any = null) {
try {
return await this.SendReqBase(url, method, mydata, setAuthToken, evitaloop, myformdata, responsedata, options);
} catch (error) {
// Se lo status non è 403 e sono rimasti tentativi, eseguo il retry
- const riprova = error.status !== 403 && error.status !== toolsext.ERR_RETRY_LOGIN;
+ const riprova = error && error.status !== 403 && error.status !== toolsext.ERR_RETRY_LOGIN;
if (retryCount > 0 && riprova) {
console.log(`❌❌❌ Retrying request. Attempts remaining: ${retryCount}`);
await this.delay(retryDelay);
diff --git a/src/store/Modules/fieldsTable.ts b/src/store/Modules/fieldsTable.ts
index 7d24d66c..d8f3a0ca 100755
--- a/src/store/Modules/fieldsTable.ts
+++ b/src/store/Modules/fieldsTable.ts
@@ -134,6 +134,10 @@ function AddCol(params: IColGridTable) {
path: params.path === undefined ? '' : params.path,
onlyforAdmin: params.onlyforAdmin === undefined ? false : params.onlyforAdmin,
dont_clone: params.dont_clone === undefined ? false : params.dont_clone,
+ showifIsStatusDiPersona: params.showifIsStatusDiPersona,
+ showifIsStatusOnLine: params.showifIsStatusOnLine,
+ requiredifIsStatusDiPersona: params.requiredifIsStatusDiPersona,
+ requiredifIsStatusOnLine: params.requiredifIsStatusOnLine,
};
}
@@ -3259,6 +3263,7 @@ export const colmyBachecas = [
icon: 'mood',
sortable: false,
typeobj: 'checkbox',
+ required: true,
}),
AddCol({
name: 'descr',
@@ -3316,25 +3321,10 @@ export const colmyBachecas = [
name: 'dateTimeStart',
name2: 'dateTimeEnd',
label_trans: 'event.dateTimeStart',
- // jointable: toolsext.TABCALALLDATE,
fieldtype: costanti.FieldType.date2startend,
- // fieldtype: costanti.FieldType.select,
- // fieldtype_real: costanti.FieldType.onlydate,
- // fieldtype: costanti.FieldType.onlydate,
icon: 'fas fa-calendar-day',
required: true,
}),
- /*AddCol({
- name: 'dateTimeEnd',
- label_trans: 'event.dateTimeEnd',
- fieldtype: costanti.FieldType.date,
- // jointable: toolsext.TABCALALLDATE,
- // fieldtype: costanti.FieldType.select,
- // fieldtype_real: costanti.FieldType.onlydate,
- icon: 'fas fa-calendar-day',
- sortable: false,
- required: true,
- }),*/
AddCol({
name: 'idCity',
label_trans: 'skill.cityorprovince',
@@ -3352,7 +3342,9 @@ export const colmyBachecas = [
remote_key: '_id',
remote_field: 'comune',
sortable: false,
- required: true,
+ requiredifIsStatusDiPersona: true,
+ showifIsStatusDiPersona: true,
+ showifIsStatusOnLine: false,
}),
AddCol({
name: 'idSector',
@@ -3401,10 +3393,22 @@ export const colmyBachecas = [
required: false,
sortable: false,
}),
+ AddCol({
+ name: 'link_conference',
+ label_trans: 'reg.link_conference',
+ fieldtype: costanti.FieldType.link,
+ showWhen:
+ costanti.showWhen.NewRec +
+ costanti.showWhen.InEdit +
+ costanti.showWhen.InView_OnlyifExist,
+ sortable: false,
+ showifIsStatusOnLine: true,
+ }),
AddCol({
name: 'address',
label_trans: 'event.address',
fieldtype: costanti.FieldType.string,
+ showifIsStatusDiPersona: true,
}),
AddCol({
name: 'organisedBy',
@@ -3431,6 +3435,7 @@ export const colmyBachecas = [
costanti.showWhen.InView_OnlyifExist,
sortable: false,
isadvanced_field: true,
+ showifIsStatusDiPersona: true,
}),
AddCol({
name: 'website',
@@ -3495,14 +3500,14 @@ export const colmyBachecas = [
fieldtype: costanti.FieldType.string,
isadvanced_field: true,
}),
- AddCol({
+ /*AddCol({
name: 'pub_to_share',
label_trans: 'skill.pub_to_share',
fieldtype: costanti.FieldType.select,
icon: 'fas fa-users',
jointable: 'pub_to_share',
isadvanced_field: true,
- }),
+ }),*/
AddCol({
name: 'date_created',
label_trans: 'event.dateCreated',
diff --git a/src/store/Modules/tools.ts b/src/store/Modules/tools.ts
index 57253e17..07b6dd60 100644
--- a/src/store/Modules/tools.ts
+++ b/src/store/Modules/tools.ts
@@ -8250,10 +8250,10 @@ export const tools = {
return {
idSector: tools.getSelectionByTable('sectors', 0, true),
idSkill: tools.getSelectionByTable('skills', 0, true),
- idStatusSkill: tools.getSelectionByTable('statusSkills', []),
+ idStatusSkill: tools.getSelectionByTable('statusSkills', [shared_consts.STATUSSKILL_DI_PERSONA]),
idContribType: tools.getSelectionByTable('contribtypes', []),
dateTimeStart: tools.getDateTomorrowByTime(21),
- dateTimeEnd: tools.getDateTomorrowByTime(23),
+ dateTimeEnd: null,
idCity: tools.getCitySel(),
NumLevel: 0,
adType: tools.getSelectionByTable('adtypes', costanti.AdType.OFFRO),
@@ -9153,20 +9153,19 @@ export const tools = {
// console.log('checkApp (homescreen=', globalStore.homescreen)
try {
- let displayMode = 'browser';
- const mqStandAlone = '(display-mode: standalone)';
- // @ts-ignore
- if (
- (navigator && navigator.standalone) ||
- window.matchMedia(mqStandAlone).matches
- ) {
- // console.log('navigator.standalone')
- displayMode = 'standalone';
- }
- // prova altro 2
- // console.log('displayMode = ', displayMode)
+ // Rileva iOS
+ const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent);
- globalStore.isAppRunning = displayMode === 'standalone' || globalStore.homescreen;
+ // ModalitĂ standalone su iOS (Safari)
+ const isStandaloneIOS = isIOS && (navigator as any).standalone === true;
+
+ // ModalitĂ standalone su altri browser (Chromium, Firefox, ecc.)
+ const isStandaloneOther = window.matchMedia('(display-mode: standalone)').matches;
+
+ const isStandalone = isStandaloneIOS || isStandaloneOther;
+
+ // Imposta lo stato
+ globalStore.isAppRunning = isStandalone || globalStore.homescreen;
} catch (e) {
console.log('error navigator.standalone ?!', e);
}
@@ -9175,10 +9174,11 @@ export const tools = {
try {
// console.log('initprompt')
const globalStore = useGlobalStore();
+ console.log('ADD: beforeinstallprompt');
window.addEventListener('beforeinstallprompt', (event) => {
+ console.log('*** ESSGUI: beforeinstallprompt');
event.preventDefault();
- console.log('beforeinstallprompt !');
// Stash the event so it can be triggered later.
globalStore.deferredPrompt = event;
@@ -11194,7 +11194,9 @@ export const tools = {
getmenuByPath(path: string) {
const myroutes = static_data.routes;
- const norm = path ? (path.startsWith('/') ? path : `/${path}`).trim().toLowerCase() : undefined;
+ const norm = path
+ ? (path.startsWith('/') ? path : `/${path}`).trim().toLowerCase()
+ : undefined;
const mymenus = myroutes.find((menu: any) => menu.path === norm);
@@ -11203,9 +11205,21 @@ export const tools = {
return mymenus;
},
norm(path?: string): string | undefined {
- return typeof path === 'string' ? path.trim().replace(/^\/+|\/+$/g, '').toLowerCase() : undefined;
+ return typeof path === 'string'
+ ? path
+ .trim()
+ .replace(/^\/+|\/+$/g, '')
+ .toLowerCase()
+ : undefined;
},
+ isInTelegramWebView() {
+ try {
+ return /Telegram/.test(navigator.userAgent);
+ } catch (e) {
+ return false
+ }
+ },
// FINE !
// getLocale() {
diff --git a/src/store/Products.ts b/src/store/Products.ts
index bdf21e8e..5160a799 100755
--- a/src/store/Products.ts
+++ b/src/store/Products.ts
@@ -191,8 +191,8 @@ export const useProducts = defineStore('Products', {
(product: IProduct): boolean => {
return (
product?.arrvariazioni?.[0]?.quantita <= 0 &&
- !state.isProssimaUscitaById(product.productInfo.idStatoProdotto) &&
- !state.isPrevenditaById(product.productInfo.idStatoProdotto)
+ !state.isProssimaUscitaById(product.productInfo?.idStatoProdotto) &&
+ !state.isPrevenditaById(product.productInfo?.idStatoProdotto)
);
},
@@ -1388,7 +1388,7 @@ export const useProducts = defineStore('Products', {
const userStore = useUserStore();
const globalStore = useGlobalStore();
- if (!globalStore.site.confpages.enableEcommerce) return null;
+ if (!globalStore.site.confpages.enableEcommerce || !tools.isLogged()) return null;
if (!this.userActive._id) return null;
@@ -2118,7 +2118,7 @@ export const useProducts = defineStore('Products', {
break;
case '{stato}':
replacements[key] = this.getDescrStatiProdottoByIdStatoProdotto(
- myproduct.productInfo?.idStatoProdotto || ''
+ myproduct.productInfo?.idStatoProdotto || 0
);
break;
case '{scalex}':
diff --git a/src/store/UserStore.ts b/src/store/UserStore.ts
index c0f44849..6f720b44 100755
--- a/src/store/UserStore.ts
+++ b/src/store/UserStore.ts
@@ -991,6 +991,7 @@ export const useUserStore = defineStore('UserStore', {
this.isLogged = false;
this.x_auth_token = '';
this.refreshToken = '';
+ console.log('SBIANCA VUOTO ------------ x_auth_token');
return true;
},
@@ -1503,18 +1504,27 @@ export const useUserStore = defineStore('UserStore', {
});
},
- UpdatePwd(x_auth_token: string, refreshToken: string) {
+ updatePwd(x_auth_token: string, refreshToken: string) {
this.x_auth_token = x_auth_token;
+ console.log('SET ------------ x_auth_token', x_auth_token);
this.refreshToken = refreshToken;
if (!this.my.tokens) {
this.my.tokens = [];
}
- this.my.tokens.push({
+
+ const newToken = {
access: 'auth',
token: x_auth_token,
refreshToken,
data_login: tools.getDateNow(),
- });
+ };
+
+ const index = this.my.tokens.findIndex((token) => token.access === 'auth' && token.token === x_auth_token);
+ if (index === -1) {
+ this.my.tokens.push(newToken);
+ } else {
+ this.my.tokens[index] = newToken;
+ }
},
setServerCode(num: number) {
@@ -1695,7 +1705,7 @@ export const useUserStore = defineStore('UserStore', {
tools.checkApp();
- return Api.SendReq('/users/me/token', 'DELETE', null)
+ return await Api.SendReq('/users/me/token', 'DELETE', null)
.then((res) => {
console.log(res);
})
diff --git a/src/store/globalStore.ts b/src/store/globalStore.ts
index 6cb56df5..2b9e4059 100644
--- a/src/store/globalStore.ts
+++ b/src/store/globalStore.ts
@@ -2223,18 +2223,18 @@ export const useGlobalStore = defineStore('GlobalStore', {
if (isLogged) {
// Fai Logout
// console.log('Fai Logout', 'isLogged', isLogged)
- userStore.logout();
+ await userStore.logout();
this.rightDrawerOpen = true;
- return false;
+ return { ris: false, status };
} else {
console.log('NON SONO LOGGATO... MYUSER NON TORNATO dal SRV');
const token = localStorage.getItem(toolsext.localStorage.token);
if (token) {
console.log('Sbianca cmq i dati');
// Sbianca cmq i dati
- userStore.logout();
+ await userStore.logout();
this.rightDrawerOpen = true;
- return false;
+ return { ris: false, status };
}
}
}
@@ -2444,6 +2444,8 @@ export const useGlobalStore = defineStore('GlobalStore', {
username: userStore.my.username,
};
+ console.log('getStatSite')
+
return Api.SendReq('/site/load', 'POST', paramquery)
.then((res) => {
// console.log('datastat', res)
diff --git a/src/views/admin/dbopmacro/dbopmacro.vue b/src/views/admin/dbopmacro/dbopmacro.vue
index b57ed436..37254c11 100755
--- a/src/views/admin/dbopmacro/dbopmacro.vue
+++ b/src/views/admin/dbopmacro/dbopmacro.vue
@@ -134,6 +134,20 @@
})
"
>
+
+