Creazione tabella Product
This commit is contained in:
@@ -163,6 +163,22 @@ const colTableWhere = [
|
||||
AddCol(DeleteRec)
|
||||
]
|
||||
|
||||
const colTableProducts = [
|
||||
AddCol({ name: 'name', label_trans: 'products.name' }),
|
||||
AddCol({ name: 'description', label_trans: 'products.description' }),
|
||||
AddCol({ name: 'icon', label_trans: 'products.icon' }),
|
||||
AddCol({ name: 'img', label_trans: 'products.img' }),
|
||||
AddCol({ name: 'department', label_trans: 'products.department' }),
|
||||
AddCol({ name: 'idProducer', label_trans: 'products.idProducer' }),
|
||||
AddCol({ name: 'category', label_trans: 'products.category' }),
|
||||
AddCol({ name: 'price', label_trans: 'products.price', fieldtype: tools.FieldType.number }),
|
||||
AddCol({ name: 'color', label_trans: 'products.color' }),
|
||||
AddCol({ name: 'size', label_trans: 'products.size' }),
|
||||
AddCol({ name: 'quantity', label_trans: 'products.quantity', fieldtype: tools.FieldType.number }),
|
||||
AddCol({ name: 'date', label_trans: 'products.date', fieldtype: tools.FieldType.date }),
|
||||
AddCol(DeleteRec)
|
||||
]
|
||||
|
||||
const colcontribtype = [
|
||||
AddCol({ name: 'label', label_trans: 'proj.longdescr' }),
|
||||
AddCol({ name: 'showprice', label_trans: 'event.showprice', fieldtype: tools.FieldType.boolean }),
|
||||
@@ -296,7 +312,6 @@ const colTablePermission = [
|
||||
AddCol(DeleteRec)
|
||||
]
|
||||
|
||||
|
||||
const colTableOperator = [
|
||||
AddCol({ name: 'username', label_trans: 'reg.username_short' }),
|
||||
AddCol({ name: 'name', label_trans: 'reg.name' }),
|
||||
@@ -838,6 +853,13 @@ export const fieldsTable = {
|
||||
colkey: 'username',
|
||||
collabel: (rec) => rec.name + ' ' + rec.surname
|
||||
},
|
||||
{
|
||||
value: 'products',
|
||||
label: 'Prodotti',
|
||||
columns: colTableProducts,
|
||||
colkey: 'id',
|
||||
collabel: 'name'
|
||||
},
|
||||
{
|
||||
value: 'wheres',
|
||||
label: 'Luoghi',
|
||||
|
||||
@@ -6,3 +6,4 @@ export {default as MessageStore} from './MessageStore'
|
||||
export {default as Todos} from './Todos'
|
||||
export {default as Projects} from './Projects'
|
||||
export {default as CalendarStore} from './Store/calendar/CalendarStore'
|
||||
export {default as Products} from './Products'
|
||||
|
||||
@@ -67,6 +67,7 @@ export const tools = {
|
||||
|
||||
IDAPP_AYNI: '7',
|
||||
IDAPP_SIP: '9',
|
||||
IDAPP_CNM: '10',
|
||||
|
||||
TipoMsg: {
|
||||
SEND_LINK_CHAT_DONATORI: 1,
|
||||
@@ -78,7 +79,7 @@ export const tools = {
|
||||
SEND_MSG_A_MEDIATORI: 1010,
|
||||
SEND_MSG_A_SOGNATORE: 1020,
|
||||
SEND_MSG_A_UTENTE_SOSTITUITO: 1030,
|
||||
SEND_MSG_DONO_RICEVUTO_CORRETTAMENTE: 1040,
|
||||
SEND_MSG_DONO_RICEVUTO_CORRETTAMENTE: 1040
|
||||
},
|
||||
|
||||
listBestColor: [
|
||||
@@ -1491,7 +1492,7 @@ export const tools = {
|
||||
myfunc: func,
|
||||
data: par.param2,
|
||||
username: par.param2.username,
|
||||
notifBot: null,
|
||||
notifBot: null
|
||||
}
|
||||
|
||||
// if (par.param2.notifBot)
|
||||
@@ -3242,16 +3243,19 @@ export const tools = {
|
||||
|
||||
isBitActive(bit, whattofind) {
|
||||
if (whattofind > 0)
|
||||
// tslint:disable-next-line:no-bitwise
|
||||
return ((bit & whattofind) === whattofind)
|
||||
else
|
||||
return false
|
||||
},
|
||||
|
||||
SetBit(myval, bit) {
|
||||
// tslint:disable-next-line:no-bitwise
|
||||
myval |= bit
|
||||
return myval
|
||||
},
|
||||
UnSetBit(myval, bit) {
|
||||
// tslint:disable-next-line:no-bitwise
|
||||
myval &= ~bit
|
||||
return myval
|
||||
},
|
||||
@@ -3407,7 +3411,7 @@ export const tools = {
|
||||
|
||||
CapitalizeAllWords(str) {
|
||||
const splitStr = str.toLowerCase().split(' ')
|
||||
for (var i = 0; i < splitStr.length; i++) {
|
||||
for (let i = 0; i < splitStr.length; i++) {
|
||||
// You do not need to check if i is larger than splitStr length, as your for does that for you
|
||||
// Assign it back to the array
|
||||
splitStr[i] = splitStr[i].charAt(0).toUpperCase() + splitStr[i].substring(1)
|
||||
|
||||
Reference in New Issue
Block a user