Add company-scoped brand and company settings API.

brand now carries a NOT NULL company_id (unique per (company_id, name))
with brand.list/upsert/delete backed by resolveCompanyAccess. Adds
companysetting key-value store (list/get/set/delete, frontend flag).
This commit is contained in:
seb
2026-08-01 06:59:27 +02:00
parent c839b2ba35
commit 787e411547
18 changed files with 1810 additions and 1192 deletions

View File

@@ -20,6 +20,13 @@ 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 companysettingList from './store/companysetting/list.js';
import companysettingGet from './store/companysetting/get.js';
import companysettingSet from './store/companysetting/set.js';
import companysettingDelete from './store/companysetting/delete.js';
import brandList from './store/brand/list.js';
import brandUpsert from './store/brand/upsert.js';
import brandDelete from './store/brand/delete.js';
import langCreate from './store/lang/create.js';
import langDelete from './store/lang/delete.js';
import langList from './store/lang/list.js';
@@ -95,6 +102,19 @@ export default class LibDashStore {
delete: unitDelete(pool),
};
this.companysetting = {
list: companysettingList(pool),
get: companysettingGet(pool),
set: companysettingSet(pool),
delete: companysettingDelete(pool),
};
this.brand = {
list: brandList(pool),
upsert: brandUpsert(pool),
delete: brandDelete(pool),
};
this.google_auth = {
add: googleAuthAdd(pool),
getByEmail: googleAuthGetByEmail(pool),