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";
|
|
|
|
|
import { useQuery } from "@tanstack/react-query";
|
2026-10-03 10:36:03 +00:00
|
|
|
|
2026-10-08 12:14:01 +00:00
|
|
|
import { LanguageSwitcher } from "./language-switcher";
|
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() {
|
|
|
|
|
const session = useQuery({
|
|
|
|
|
queryKey: identityKeys.session,
|
|
|
|
|
queryFn: identityApi.session,
|
|
|
|
|
retry: false,
|
|
|
|
|
});
|
|
|
|
|
return (
|
2026-10-08 16:31:46 +00:00
|
|
|
<div className="min-h-dvh bg-shell-content">
|
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
|
|
|
{!session.data?.user && (
|
2026-10-08 16:31:46 +00:00
|
|
|
<header className="flex items-center justify-between px-[30px] py-5">
|
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
|
|
|
<strong>Metis Desk</strong>
|
2026-10-08 16:31:46 +00:00
|
|
|
<LanguageSwitcher className="mt-0" />
|
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
|
|
|
</header>
|
|
|
|
|
)}
|
2026-10-03 10:36:03 +00:00
|
|
|
<IdentityWorkspace
|
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
|
|
|
renderWorkspace={(snapshot, accountNavigation) => (
|
|
|
|
|
<CompaniesWorkspace
|
|
|
|
|
accountNavigation={accountNavigation}
|
|
|
|
|
csrfToken={snapshot.csrfToken}
|
|
|
|
|
languageSwitcher={<LanguageSwitcher />}
|
|
|
|
|
userName={snapshot.user?.name ?? ""}
|
|
|
|
|
/>
|
2026-10-04 18:16:39 +00:00
|
|
|
)}
|
2026-10-03 10:36:03 +00:00
|
|
|
>
|
2026-10-04 18:16:39 +00:00
|
|
|
{null}
|
2026-10-03 10:36:03 +00:00
|
|
|
</IdentityWorkspace>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|