2026-10-04 18:16:39 +00:00
|
|
|
import { CompaniesWorkspace } from "@metis/companies/client";
|
feat(dashboard): implement dashboard schemas and API integration
- Added Zod schemas for dashboard queries, entries, summaries, and companies.
- Created dashboard API functions for fetching summary, work, attention, activity, and companies data.
- Developed dashboard components including BlockState, DashboardDetailsDialog, and DashboardPage for rendering dashboard information.
- Implemented quick create functionality for companies, tickets, interventions, assets, and resources.
- Introduced a new ResourceDashboardReader for querying resource-related data.
- Added a StatisticCard component for displaying key performance indicators in the dashboard.
2026-10-08 11:27:27 +00:00
|
|
|
import { IdentityWorkspace, identityApi, identityKeys } from "@metis/identity/client";
|
2026-10-25 16:47:54 +00:00
|
|
|
import { DialogHelpLabelsContext } from "@repo/rdx-ui/lib/dialog-help-context";
|
feat(dashboard): implement dashboard schemas and API integration
- Added Zod schemas for dashboard queries, entries, summaries, and companies.
- Created dashboard API functions for fetching summary, work, attention, activity, and companies data.
- Developed dashboard components including BlockState, DashboardDetailsDialog, and DashboardPage for rendering dashboard information.
- Implemented quick create functionality for companies, tickets, interventions, assets, and resources.
- Introduced a new ResourceDashboardReader for querying resource-related data.
- Added a StatisticCard component for displaying key performance indicators in the dashboard.
2026-10-08 11:27:27 +00:00
|
|
|
import { useQuery } from "@tanstack/react-query";
|
2026-10-25 16:47:54 +00:00
|
|
|
import { useTranslation } from "react-i18next";
|
2026-10-03 10:36:03 +00:00
|
|
|
|
2026-10-08 12:14:01 +00:00
|
|
|
import { LanguageSwitcher } from "./language-switcher";
|
2026-10-09 08:18:00 +00:00
|
|
|
import { useAppNavigation } from "./navigation/use-app-navigation";
|
feat(dashboard): implement dashboard schemas and API integration
- Added Zod schemas for dashboard queries, entries, summaries, and companies.
- Created dashboard API functions for fetching summary, work, attention, activity, and companies data.
- Developed dashboard components including BlockState, DashboardDetailsDialog, and DashboardPage for rendering dashboard information.
- Implemented quick create functionality for companies, tickets, interventions, assets, and resources.
- Introduced a new ResourceDashboardReader for querying resource-related data.
- Added a StatisticCard component for displaying key performance indicators in the dashboard.
2026-10-08 11:27:27 +00:00
|
|
|
|
|
|
|
|
export function App() {
|
2026-10-25 16:47:54 +00:00
|
|
|
const { t } = useTranslation("core");
|
feat(dashboard): implement dashboard schemas and API integration
- Added Zod schemas for dashboard queries, entries, summaries, and companies.
- Created dashboard API functions for fetching summary, work, attention, activity, and companies data.
- Developed dashboard components including BlockState, DashboardDetailsDialog, and DashboardPage for rendering dashboard information.
- Implemented quick create functionality for companies, tickets, interventions, assets, and resources.
- Introduced a new ResourceDashboardReader for querying resource-related data.
- Added a StatisticCard component for displaying key performance indicators in the dashboard.
2026-10-08 11:27:27 +00:00
|
|
|
const session = useQuery({
|
|
|
|
|
queryKey: identityKeys.session,
|
|
|
|
|
queryFn: identityApi.session,
|
|
|
|
|
retry: false,
|
|
|
|
|
});
|
2026-10-10 10:01:58 +00:00
|
|
|
|
2026-10-09 08:18:00 +00:00
|
|
|
useAppNavigation(session.data);
|
2026-10-10 10:01:58 +00:00
|
|
|
|
feat(dashboard): implement dashboard schemas and API integration
- Added Zod schemas for dashboard queries, entries, summaries, and companies.
- Created dashboard API functions for fetching summary, work, attention, activity, and companies data.
- Developed dashboard components including BlockState, DashboardDetailsDialog, and DashboardPage for rendering dashboard information.
- Implemented quick create functionality for companies, tickets, interventions, assets, and resources.
- Introduced a new ResourceDashboardReader for querying resource-related data.
- Added a StatisticCard component for displaying key performance indicators in the dashboard.
2026-10-08 11:27:27 +00:00
|
|
|
return (
|
2026-10-25 16:47:54 +00:00
|
|
|
<DialogHelpLabelsContext.Provider
|
|
|
|
|
value={{
|
|
|
|
|
help: t("dialogHelp.help"),
|
|
|
|
|
closeHelp: t("dialogHelp.closeHelp"),
|
|
|
|
|
backToForm: t("dialogHelp.backToForm"),
|
|
|
|
|
closeDialog: t("dialogHelp.closeDialog"),
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<div className="min-h-dvh bg-shell-content">
|
|
|
|
|
<IdentityWorkspace
|
|
|
|
|
renderWorkspace={(snapshot, accountNavigation, administrationContent) => (
|
|
|
|
|
<CompaniesWorkspace
|
|
|
|
|
accountNavigation={accountNavigation}
|
|
|
|
|
administrationContent={administrationContent}
|
|
|
|
|
canManageUsers={snapshot.user?.isInitialAdmin ?? false}
|
|
|
|
|
languageSwitcher={<LanguageSwitcher />}
|
|
|
|
|
userName={snapshot.user?.name ?? ""}
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
>
|
|
|
|
|
{null}
|
|
|
|
|
</IdentityWorkspace>
|
|
|
|
|
</div>
|
|
|
|
|
</DialogHelpLabelsContext.Provider>
|
2026-10-03 10:36:03 +00:00
|
|
|
);
|
|
|
|
|
}
|