Add company-scoped unit list/upsert/delete and article unit patches.
Units are isolated per company; article detail exposes full unit shape, and unused units can be deleted safely via FK NO ACTION.
This commit is contained in:
@@ -14,7 +14,13 @@ function shapeArticleDetail(row, categoryIds, photos, eans, prices) {
|
||||
slug: row.slug,
|
||||
unitamount: row.unitamount,
|
||||
weight: row.weight,
|
||||
unit: { si: row.unitSi },
|
||||
unit: {
|
||||
si: row.unitSi,
|
||||
basesi: row.unitBasesi,
|
||||
basesifactor: row.unitBasesifactor,
|
||||
symbol: row.unitSymbol ?? null,
|
||||
name: row.unitName ?? null,
|
||||
},
|
||||
brand: row.brandName
|
||||
? {
|
||||
name: row.brandName,
|
||||
|
||||
Reference in New Issue
Block a user