- Aggiornamento dal DB di GM al DB Locale
This commit is contained in:
@@ -26,7 +26,8 @@ import type {
|
||||
IAreaDiStampa,
|
||||
IOptCatalogo,
|
||||
IPagina,
|
||||
IMyScheda
|
||||
IMyScheda,
|
||||
ICollana
|
||||
} from '@model';
|
||||
import {
|
||||
Privacy,
|
||||
@@ -63,6 +64,7 @@ import type { AxiosResponse } from 'axios';
|
||||
import { default as Axios } from 'axios'
|
||||
import { PayloadMessageTypes } from '@src/common'
|
||||
import { useNotifStore } from '@store/NotifStore'
|
||||
import { useProducts } from '../Products';
|
||||
|
||||
const { t } = i18n.global;
|
||||
|
||||
@@ -3556,6 +3558,11 @@ export const tools = {
|
||||
}
|
||||
},
|
||||
|
||||
getDateFromISOString(mydate): Date {
|
||||
const mydate2 = new Date(mydate)
|
||||
return mydate2
|
||||
},
|
||||
|
||||
getDateNow() {
|
||||
const mydate = new Date()
|
||||
return mydate
|
||||
@@ -9870,6 +9877,28 @@ export const tools = {
|
||||
.join(", ");
|
||||
},
|
||||
|
||||
formatCollane(collane: number[] | number | undefined | null): string {
|
||||
if (!collane) {
|
||||
return "";
|
||||
}
|
||||
|
||||
const products = useProducts()
|
||||
if (Array.isArray(collane)) {
|
||||
// Estrai le collane e uniscile con ', '
|
||||
return collane
|
||||
.map((idcollana) => {
|
||||
const reccoll: ICollana | undefined = products.collane!.find((coll: ICollana) => coll.idCollana === idcollana)
|
||||
return reccoll ? `${reccoll.title ?? ""}`.trim() : ""
|
||||
})
|
||||
.filter((name) => name.length > 0) // Filtra eventuali nomi vuoti
|
||||
.join(", ");
|
||||
} else {
|
||||
const reccoll: ICollana | undefined = products.collane!.find((coll: ICollana) => coll.idCollana === collane)
|
||||
return reccoll ? `${reccoll.title}` : ''
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
// FINE !
|
||||
|
||||
Reference in New Issue
Block a user