Verified with the coordinated workspace changes by devkit full run 2026-09-08T225814-186389-0000-3e3ed7cd (all seven phases passed). This shared UI pass does not mark the individual module reviews complete.
27 lines
1.6 KiB
TypeScript
Executable File
27 lines
1.6 KiB
TypeScript
Executable File
import DashboardPage from "../../../govoplan-dashboard/webui/src/features/dashboard/DashboardPage";
|
|
import { dashboardModule } from "../../../govoplan-dashboard/webui/src/module";
|
|
import { generatedTranslations } from "../../../govoplan-dashboard/webui/src/i18n/generatedTranslations";
|
|
import { schedulingModule } from "../../../govoplan-scheduling/webui/src/module";
|
|
import { PlatformLanguageProvider } from "../src/i18n/LanguageContext";
|
|
import { PlatformModulesProvider } from "../src/platform/ModuleContext";
|
|
import type { AuthInfo } from "../src/types";
|
|
|
|
const auth: AuthInfo = {
|
|
user: { id: "dashboard-user", account_id: "dashboard-account", email: "dashboard@example.test" },
|
|
tenant: { id: "dashboard-tenant", name: "Dashboard fixture", slug: "dashboard" },
|
|
scopes: ["dashboard:dashboard:read"], roles: [], groups: [],
|
|
profile_loaded: true, roles_loaded: true, groups_loaded: true
|
|
};
|
|
|
|
export default function DashboardConfigurationScenario() {
|
|
const widgetHelp = new URLSearchParams(location.search).has("widget-help");
|
|
const modules = widgetHelp ? [dashboardModule, schedulingModule] : [dashboardModule];
|
|
return <PlatformModulesProvider modules={modules}>
|
|
<PlatformLanguageProvider
|
|
preferredLanguageCode={new URLSearchParams(location.search).get("language") ?? "en"}
|
|
moduleTranslations={[generatedTranslations, ...(widgetHelp ? [schedulingModule.translations] : [])]}>
|
|
<DashboardPage settings={{ apiBaseUrl: "", apiKey: "", accessToken: "" }} auth={widgetHelp ? { ...auth, scopes: [...auth.scopes, "scheduling:schedule:read"] } : auth} />
|
|
</PlatformLanguageProvider>
|
|
</PlatformModulesProvider>;
|
|
}
|