buildCopyConfig and buildEditConfig now called using await and with row as parameter
UTableEntity
buildCopyConfig
and buildEditConfig
now called using await (so can be async) and with the
second argument row - content of row been edited (copied). This allows to open a form based on current row values
and possible asynchronously retrieved information. For example - navshortcut what shows form based on detailed itemID
{
cmdType: 'showList',
cmdData: {
repository: () => UB.Repository('up_invoiceitem')
.attrs(["enclosure_id", "enclosure_id.date_reg","pay_sum"]),
buildEditConfig: async function (cfg, row) {
cfg.entity = 'up_enclosure'
let additionalInfo = await something() // can await for data
cfg.instanceID = row.enclosure_id // can use row to get some value
return cfg
}
}
}