From 82b158c1709666afd4b611e4d588dab6c04dd288 Mon Sep 17 00:00:00 2001 From: Albrecht Degering Date: Tue, 21 Jul 2026 21:17:26 +0200 Subject: [PATCH] feat(scheduling-webui): build two-pane request workspace --- .../test-scheduling-page-structure.mjs | 114 +- webui/src/api/scheduling.ts | 159 +- .../features/scheduling/SchedulingPage.tsx | 1510 ++++++++++++----- .../scheduling/schedulingViewModel.ts | 45 +- webui/src/i18n/generatedTranslations.ts | 68 +- webui/src/styles/scheduling.css | 227 ++- webui/tests/scheduling-view-model.test.ts | 63 + 7 files changed, 1559 insertions(+), 627 deletions(-) diff --git a/webui/scripts/test-scheduling-page-structure.mjs b/webui/scripts/test-scheduling-page-structure.mjs index 6a55a6d..6b7e28f 100644 --- a/webui/scripts/test-scheduling-page-structure.mjs +++ b/webui/scripts/test-scheduling-page-structure.mjs @@ -11,42 +11,60 @@ assert.match(page, /usePlatformUiCapability\("calend assert.match(page, /hasScope\(auth, "calendar:calendar:read"\)/); assert.match(page, /Boolean\(calendarPickerCapability\) && canReadCalendars && canReadAvailability && canWriteCalendarEvent/); assert.doesNotMatch(page, /@govoplan\/calendar-webui|govoplan-calendar\/webui/); -assert.match(page, /Card,[\s\S]*DataGrid,[\s\S]*DataGridEmptyAction,[\s\S]*DataGridRowActions,[\s\S]*ModuleSubnav,[\s\S]*ToggleSwitch,[\s\S]*from "@govoplan\/core-webui"/); -assert.match(page, /SelectionList,[\s\S]*SelectionListItem,[\s\S]*from "@govoplan\/core-webui"/); +assert.match(page, /Card,[\s\S]*DataGrid,[\s\S]*DataGridEmptyAction,[\s\S]*DataGridRowActions,[\s\S]*FormField,[\s\S]*MetricCard,[\s\S]*PasswordField,[\s\S]*SelectionList,[\s\S]*ToggleSwitch,[\s\S]*from "@govoplan\/core-webui"/); assert.doesNotMatch(page, /@govoplan\/core-webui\/src\//); -assert.match(page, /className="scheduling-full-editor"/); -assert.match(page, /className="scheduling-page-actions"/); -const editorActions = page.slice( - page.indexOf('
'), - page.indexOf('
', page.indexOf('
')) -); -assert.ok(editorActions.indexOf("I18N.discard") < editorActions.indexOf("I18N.save")); -assert.match(editorActions, /form="scheduling-create-form"/); - -const createBranchStart = page.indexOf(" if (creating) {"); -const createReturnStart = page.indexOf("\n return (", createBranchStart); -const browseBranchStart = page.indexOf("\n return (", createReturnStart + 1); -const createBranch = page.slice(createBranchStart, browseBranchStart); -const browseBranch = page.slice(browseBranchStart); -assert.match(createBranch, /\{I18N\.requests\}<\/h1>/); -assert.match(browseBranch, /