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:
20
src/index.js
20
src/index.js
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user