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:
@@ -28,7 +28,7 @@ export default function createUnderParent(pool) {
|
||||
await tx.begin();
|
||||
|
||||
try {
|
||||
const unitId = await ensureUnit(tx);
|
||||
const unitId = await ensureUnit(tx, languageId, companyId);
|
||||
const sku = await allocateSku(companyId, tx);
|
||||
const slug = slugify(name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user