- Categorie

- ProductInfo
This commit is contained in:
Surya Paolo
2023-12-27 02:58:23 +01:00
parent c27c293fbf
commit 6be8ccc906
30 changed files with 612 additions and 198 deletions

View File

@@ -417,6 +417,13 @@ export const colTablecategories = [
AddCol(DuplicateRec),
]
export const colTableCatProd = [
AddCol({ name: 'name', label_trans: 'categories.name' }),
AddCol({ name: 'img', label_trans: 'categories.img' }),
AddCol(DeleteRec),
AddCol(DuplicateRec),
]
export const colTableStorehouse = [
AddCol({ name: 'name', label_trans: 'store.name' }),
AddCol({ name: 'description', label_trans: 'store.description' }),
@@ -1955,8 +1962,7 @@ export const colTableIscrittiArcadei = [
AddCol(DuplicateRec),
]
export const colTableProducts = [
AddCol({ name: 'active', label_trans: 'products.active', fieldtype: costanti.FieldType.boolean }),
export const colTableProductInfos = [
AddCol({ name: 'code', label_trans: 'products.code', required: true }),
AddCol({ name: 'codice_EAN', label_trans: 'products.codice_EAN' }),
AddCol({ name: 'barcode', label_trans: 'products.barcode' }),
@@ -1964,7 +1970,41 @@ export const colTableProducts = [
AddCol({ name: 'description', label_trans: 'products.description', fieldtype: costanti.FieldType.html }),
AddCol({ name: 'icon', label_trans: 'products.icon' }),
AddCol({ name: 'img', label_trans: 'products.img' }),
// AddCol({ name: 'idProducer', label_trans: 'products.idProducer' }),
AddCol({
name: 'department',
label_trans: 'products.department',
fieldtype: costanti.FieldType.select,
jointable: 'departments',
}),
AddCol({
name: 'idCatProds',
label_trans: 'products.category',
fieldtype: costanti.FieldType.multiselect,
jointable: 'catprods',
}),
AddCol({ name: 'color', label_trans: 'products.color' }),
AddCol({ name: 'size', label_trans: 'products.size' }),
AddCol({ name: 'weight', label_trans: 'products.weight', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'vegan', label_trans: 'products.vegan', fieldtype: costanti.FieldType.boolean }),
AddCol({ name: 'unit', label_trans: 'products.unit',
fieldtype: costanti.FieldType.select, jointable: 'units', }),
AddCol({ name: 'stars', label_trans: 'products.stars', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'date', label_trans: 'products.date', fieldtype: costanti.FieldType.date }),
AddCol({ name: 'ingredienti', label_trans: 'products.ingredienti' }),
AddCol({ name: 'valori_nutrizionali', label_trans: 'products.valori_nutrizionali' }),
AddCol({ name: 'note', label_trans: 'products.note' }),
AddCol(DeleteRec),
AddCol(DuplicateRec),
]
export const colTableProducts = [
AddCol({ name: 'active', label_trans: 'products.active', fieldtype: costanti.FieldType.boolean }),
AddCol({
name: 'idProductInfo',
label_trans: 'products.productInfo',
fieldtype: costanti.FieldType.select,
jointable: 'productinfos',
}),
AddCol({
name: 'idProducer',
label_trans: 'products.producer',
@@ -1995,39 +2035,19 @@ export const colTableProducts = [
fieldtype: costanti.FieldType.multiselect,
jointable: 'scontisticas',
}),
AddCol({
name: 'department',
label_trans: 'products.department',
fieldtype: costanti.FieldType.select,
jointable: 'departments',
}),
// AddCol({ name: 'department', label_trans: 'products.department' }),
AddCol({
name: 'category',
label_trans: 'products.category',
fieldtype: costanti.FieldType.multiselect,
jointable: 'categorys',
}),
AddCol({ name: 'price', label_trans: 'products.price', fieldtype: costanti.FieldType.number, required: true }),
AddCol({ name: 'price_acquistato', label_trans: 'products.price_acquistato', fieldtype: costanti.FieldType.number, required: true }),
AddCol({ name: 'after_price', label_trans: 'products.after_price' }),
AddCol({ name: 'color', label_trans: 'products.color' }),
AddCol({ name: 'size', label_trans: 'products.size' }),
/*AddCol({
name: 'quantityAvailable',
label_trans: 'products.quantityAvailable',
fieldtype: costanti.FieldType.number
}),
AddCol({
name: 'bookableAvailableQty',
label_trans: 'products.bookableAvailableQty',
fieldtype: costanti.FieldType.number
}), */
AddCol({
name: 'minBuyQty',
label_trans: 'products.minBuyQty',
fieldtype: costanti.FieldType.number
}),
AddCol({
name: 'maxBookableQty',
label_trans: 'products.maxBookableQty',
fieldtype: costanti.FieldType.number
}),
AddCol({
name: 'stockQty',
label_trans: 'products.stockQty',
@@ -2040,15 +2060,6 @@ export const colTableProducts = [
}),
AddCol({ name: 'canBeShipped', label_trans: 'products.canBeShipped', fieldtype: costanti.FieldType.boolean }),
AddCol({ name: 'canBeBuyOnline', label_trans: 'products.canBeBuyOnline', fieldtype: costanti.FieldType.boolean }),
AddCol({ name: 'weight', label_trans: 'products.weight', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'vegan', label_trans: 'products.vegan', fieldtype: costanti.FieldType.boolean }),
AddCol({ name: 'unit', label_trans: 'products.unit',
fieldtype: costanti.FieldType.select, jointable: 'units', }),
AddCol({ name: 'stars', label_trans: 'products.stars', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'date', label_trans: 'products.date', fieldtype: costanti.FieldType.date }),
AddCol({ name: 'ingredienti', label_trans: 'products.ingredienti' }),
AddCol({ name: 'valori_nutrizionali', label_trans: 'products.valori_nutrizionali' }),
AddCol({ name: 'note', label_trans: 'products.note' }),
AddCol(DeleteRec),
AddCol(DuplicateRec),
]
@@ -3560,7 +3571,14 @@ export const fieldsTable = {
label: 'Prodotti',
columns: colTableProducts,
colkey: '_id',
collabel: 'name',
collabel: '_id',
},
{
value: 'productinfos',
label: 'Info Prodotti',
columns: colTableProductInfos,
colkey: '_id',
collabel: (rec: any) => `${rec.name} (${rec.code})`,
},
{
value: 'producers',
@@ -3597,6 +3615,13 @@ export const fieldsTable = {
colkey: '_id',
collabel: 'name',
},
{
value: 'catprods',
label: 'Categorie',
columns: colTableCatProd,
colkey: '_id',
collabel: 'name',
},
{
value: 'gasordines',
label: 'Gas Ordini',