- aggiornamento Cataloghi
- Gestione delle versioni del prodotto ("Nuovi","Usati","Epub", ecc..)
This commit is contained in:
@@ -335,6 +335,7 @@ export const tools = {
|
||||
},
|
||||
],
|
||||
|
||||
|
||||
SelectListColors: [
|
||||
{ label: '[Nessuno]', value: '' },
|
||||
{ label: 'aliceblue', value: '#f0f8ff' },
|
||||
@@ -1391,6 +1392,13 @@ export const tools = {
|
||||
|
||||
},
|
||||
|
||||
SelectListVersione: [
|
||||
{ label: '[Tutti]', value: 0 },
|
||||
{ label: 'Nuovi', value: shared_consts.PRODUCTTYPE.NUOVO },
|
||||
{ label: 'Usati', value: shared_consts.PRODUCTTYPE.USATO },
|
||||
{ label: 'DVD', value: shared_consts.PRODUCTTYPE.DVD },
|
||||
],
|
||||
|
||||
INDEX_MENU_DELETE: 4,
|
||||
|
||||
menuPopupTodo:
|
||||
@@ -8644,8 +8652,9 @@ export const tools = {
|
||||
},
|
||||
|
||||
// get the last 2 digit fraction part, of a decimal number
|
||||
getDecPart2Digit(number: number) {
|
||||
return Math.round(number * 100) % 100
|
||||
getDecPart2Digit(number: number): string {
|
||||
let parts = number.toFixed(2).split('.');
|
||||
return parts.length > 1 ? parts[1] : '00';
|
||||
},
|
||||
|
||||
getRecordByField(field: any, record: any) {
|
||||
|
||||
@@ -2096,5 +2096,38 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
})
|
||||
},
|
||||
|
||||
prepareAddNewElem(order: any, $q: any, t: any, myelem: any, newtype: any) {
|
||||
|
||||
const newrec: IMyElem = {
|
||||
_id: undefined,
|
||||
type: newtype,
|
||||
path: myelem.path,
|
||||
order: order ? order : 1000,
|
||||
active: true,
|
||||
container: ''
|
||||
}
|
||||
|
||||
if (newrec.type === shared_consts.ELEMTYPE.CAROUSEL_IMGS) {
|
||||
newrec.container2 = '8'
|
||||
newrec.height = 600
|
||||
} else if (newrec.type === shared_consts.ELEMTYPE.CARD) {
|
||||
newrec.class2 = 'row justify-center'
|
||||
} else if (newrec.type === shared_consts.ELEMTYPE.CATALOGO) {
|
||||
newrec.catalogo = {
|
||||
//++AddCATALOGO_FIELDS
|
||||
productTypes: [0],
|
||||
excludeproductTypes: [],
|
||||
formato: [],
|
||||
Categoria: [],
|
||||
Editore: [],
|
||||
}
|
||||
}
|
||||
|
||||
this.addNewElem($q, t, newrec)
|
||||
|
||||
return newrec
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user