Add POS terminal category visibility system
Add posterminal and posterminalcategory tables to control which categories are visible on each POS terminal. The existence of a row in posterminalcategory means the category is visible on that terminal. Store methods: - posterminal.list/upsert/delete - CRUD for terminals - posterminal.setOn/setOff - toggle single category on a terminal - posterminal.setOnAll/setOffAll - toggle all categories on a terminal - posterminal.getCategoryPosterminalIds - internal, used by category tree The category tree (getTreeForCompany) now includes a posterminalIds array on each node listing which terminals have that category enabled.
This commit is contained in:
19
src/index.js
19
src/index.js
@@ -34,6 +34,14 @@ 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 posterminalList from './store/posterminal/list.js';
|
||||
import posterminalUpsert from './store/posterminal/upsert.js';
|
||||
import posterminalDelete from './store/posterminal/delete.js';
|
||||
import posterminalSetOn from './store/posterminal/setOn.js';
|
||||
import posterminalSetOff from './store/posterminal/setOff.js';
|
||||
import posterminalSetOnAll from './store/posterminal/setOnAll.js';
|
||||
import posterminalSetOffAll from './store/posterminal/setOffAll.js';
|
||||
import posterminalGetCategoryPosterminalIds from './store/posterminal/getCategoryPosterminalIds.js';
|
||||
import langCreate from './store/lang/create.js';
|
||||
import langDelete from './store/lang/delete.js';
|
||||
import langList from './store/lang/list.js';
|
||||
@@ -129,6 +137,17 @@ export default class LibDashStore {
|
||||
delete: brandDelete(pool),
|
||||
};
|
||||
|
||||
this.posterminal = {
|
||||
list: posterminalList(pool),
|
||||
upsert: posterminalUpsert(pool),
|
||||
delete: posterminalDelete(pool),
|
||||
setOn: posterminalSetOn(pool),
|
||||
setOff: posterminalSetOff(pool),
|
||||
setOnAll: posterminalSetOnAll(pool),
|
||||
setOffAll: posterminalSetOffAll(pool),
|
||||
getCategoryPosterminalIds: posterminalGetCategoryPosterminalIds(pool),
|
||||
};
|
||||
|
||||
this.google_auth = {
|
||||
add: googleAuthAdd(pool),
|
||||
getByEmail: googleAuthGetByEmail(pool),
|
||||
|
||||
Reference in New Issue
Block a user