feat(platform): add ops quality workspace

This commit is contained in:
lingniu
2026-07-04 16:31:51 +08:00
parent c060317fb0
commit 318beccaaf
7 changed files with 221 additions and 8 deletions

View File

@@ -55,6 +55,13 @@ describe('parseAppHash', () => {
});
});
test('parses ops quality page', () => {
expect(parseAppHash('#/ops-quality')).toEqual({
page: 'ops-quality',
filters: {}
});
});
test('ignores unknown pages', () => {
expect(parseAppHash('#/unknown?keyword=VIN001')).toEqual({});
});
@@ -81,6 +88,10 @@ describe('buildAppHash', () => {
expect(buildAppHash({ page: 'notification-rules' })).toBe('#/notification-rules');
});
test('builds ops quality page hash', () => {
expect(buildAppHash({ page: 'ops-quality' })).toBe('#/ops-quality');
});
test('builds page-only hash when keyword is empty', () => {
expect(buildAppHash({ page: 'quality', keyword: '' })).toBe('#/quality');
});

View File

@@ -1,6 +1,6 @@
import type { PageKey } from '../layout/AppShell';
const pageKeys = new Set<PageKey>(['dashboard', 'vehicles', 'realtime', 'detail', 'history', 'mileage', 'quality', 'notification-rules']);
const pageKeys = new Set<PageKey>(['dashboard', 'vehicles', 'realtime', 'detail', 'history', 'mileage', 'quality', 'notification-rules', 'ops-quality']);
export type AppRoute = {
page?: PageKey;