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:
seb
2026-08-01 06:12:24 +02:00
parent 54700a145e
commit 12e83a7ffb
16 changed files with 519 additions and 44 deletions

View File

@@ -17,6 +17,9 @@ import articleCreateUnderParent from './store/article/createUnderParent.js';
import articleGetBySku from './store/article/getBySku.js';
import articleUpdateBySku from './store/article/updateBySku.js';
import articleSetPricesBySku from './store/article/setPricesBySku.js';
import unitList from './store/unit/list.js';
import unitUpsert from './store/unit/upsert.js';
import unitDelete from './store/unit/delete.js';
import langCreate from './store/lang/create.js';
import langDelete from './store/lang/delete.js';
import langList from './store/lang/list.js';
@@ -86,6 +89,12 @@ export default class LibDashStore {
list: taxList(pool),
};
this.unit = {
list: unitList(pool),
upsert: unitUpsert(pool),
delete: unitDelete(pool),
};
this.google_auth = {
add: googleAuthAdd(pool),
getByEmail: googleAuthGetByEmail(pool),