feat(M09-D4): 完成商品选购与运营工作台

This commit is contained in:
Codex
2026-08-11 08:06:13 +08:00
parent 60264cbd11
commit e91b979128
32 changed files with 1065 additions and 60 deletions
+10 -1
View File
@@ -9,11 +9,12 @@ import {
assert.deepEqual(
ADMIN_NAVIGATION.map(({ path }) => path),
['/overview', '/stores', '/orders', '/payments', '/third-party', '/people',
['/overview', '/stores', '/orders', '/products', '/payments', '/third-party', '/people',
'/cleaning', '/devices', '/apps', '/content', '/franchise', '/system']
);
assert.equal(pathForMenu('platformApps'), '/apps');
assert.equal(pathForMenu('thirdParty'), '/third-party');
assert.equal(pathForMenu('products'), '/products');
const storeOperator = {
roles: ['STORE_ADMIN'],
@@ -24,6 +25,14 @@ assert.equal(resolveAuthorizedPath(storeOperator, 'orders'), '/orders');
assert.equal(resolveAuthorizedPath(storeOperator, 'system'), '/overview');
assert.equal(firstAuthorizedPath(storeOperator), '/overview');
const goodsOperator = {
roles: ['STAFF'],
capabilities: ['goods.order.read'],
menus: ['products']
};
assert.equal(resolveAuthorizedPath(goodsOperator, 'products'), '/products');
assert.equal(firstAuthorizedPath(goodsOperator), '/products');
const forgedSystemMenu = {
roles: ['STORE_ADMIN'],
capabilities: ['store.operation.read'],