- Invia e Ricevi RIS (grafica aggiornata)

- Visualizzazione Movimenti (ultimi e successivi), per singolo e di tutti
This commit is contained in:
Surya Paolo
2024-10-11 02:29:29 +02:00
parent f9277f3a01
commit ec356c70d9
123 changed files with 3595218 additions and 638 deletions

View File

@@ -3598,11 +3598,11 @@ export const tools = {
if (!this.isMobile())
// if (globalStore.leftDrawerOpen)
// myw -= 300
if (!this.isMobile())
// if (globalStore.rightDrawerOpen)
// myw -= 300
if (!this.isMobile())
// if (globalStore.rightDrawerOpen)
// myw -= 300
maxh2 = (myw / coeff) + 20
maxh2 = (myw / coeff) + 20
if (maxh2 > 500)
maxh2 = 500
@@ -4208,7 +4208,7 @@ export const tools = {
if (withright)
//if (globalStore.rightDrawerOpen)
// myw -= 300
return myw
return myw
},
@@ -7356,7 +7356,7 @@ export const tools = {
// console.log('arrimage', arrimage)
if (shared_consts.TABLES_IMAGEFILE_SINGOLO.includes(table)) {
return costanti.DIR_UPLOAD + `products/` + imagefile
return costanti.DIR_UPLOAD + `products/` + imagefile
}
return imagefile
},
@@ -8148,19 +8148,20 @@ export const tools = {
return link
},
async receiveRis($q: any, t: any) {
async addToTemporaryReceiverRIS(t: any) {
const userStore = useUserStore()
let username = userStore.my.username
await userStore.setUserReceiveRIS(username, '').then((data) => {
if (data.code === serv_constants.RIS_CODE_OK) {
this.showPositiveNotif($q, t('circuit.coins_requestedris', { username }), 6000)
} else {
this.showNegativeNotif($q, t('db.recfailed'))
}
return await userStore.setUserReceiveRIS(username, '')
.then((data) => {
if (data.code === serv_constants.RIS_CODE_OK) {
return { msg: t('circuit.coins_requestedris', { username }), ris: true }
} else {
return { msg: t('db.recfailed'), ris: false }
}
})
})
},
@@ -8519,10 +8520,6 @@ export const tools = {
return Object.keys(obj).length === 0;
},
strToVal(mystr: string) {
return parseInt(mystr)
},
pad(value: any) {
// Helper function to pad single-digit values with leading zeros
return value < 10 ? `0${value}` : value;
@@ -9018,7 +9015,7 @@ export const tools = {
if (mov.userfrom) {
mystrfrom = mov.userfrom.username
}
return mystrfrom
} else {
@@ -9034,7 +9031,7 @@ export const tools = {
return mystrto
}
},
getTitleAnnuncio(table: string) {
@@ -9060,6 +9057,33 @@ export const tools = {
},
isNumeric(value: any) {
// Controlla se il valore è un numero e non è NaN (Not-a-Number)
return typeof value === 'number' && !isNaN(value) ||
typeof value === 'string' && value.trim() !== '' && !isNaN(Number(value));
},
strToVal(mystr: string, abs: boolean = false): number | null {
try {
if (this.isNumeric(mystr)) {
let num = parseFloat(mystr);
if (num) {
num = Math.abs(num)
}
return num
} else {
return null
}
} catch (e) {
return null
}
},
convertStringToUrl(str: string) {
return encodeURIComponent(str); // Codifica la stringa per URL
}
// FINE !
// getLocale() {