合入主线登录和营业时段策略,对齐旧界面与 React 访问流程

This commit is contained in:
黄健铭 committed 2026-12-05 21:46:55 -08:00
commit 42395de23a
113 files changed
+1915 -558

No files matched your search

+14
View File
@@ -8,6 +8,20 @@ const { notFound } = require('../http');
const EMPLOYEE_ACTION = '/api/employees/:member(member)/:action(update|deactivate|reactivate|delete)';
module.exports = [
{
method: 'POST',
path: '/api/business-hours/setup',
auth: 'session',
role: 'owner',
direct: true,
handler: async ({ app, ledger, actor, readBody }) => {
const body = await readBody();
if (app.access.currentWindow()?.state !== 'unset') fail('营业时间已设置,请重新打开台账。', 409);
if (!body.businessHours) fail('请填写营业时间。');
ShopSettings.update(ledger, { revision: body.revision, businessHours: body.businessHours }, actor);
return { ok: true };
},
},
{
method: 'GET',
path: '/api/shop-settings',