Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 

50 rindas
1.2 KiB

  1. // 'use client';
  2. import { preloadClaims } from "@/app/api/claims";
  3. import { preloadStaff, preloadTeamLeads } from "@/app/api/staff";
  4. import StaffSearch from "@/components/StaffSearch";
  5. import { getServerI18n } from "@/i18n";
  6. import Add from "@mui/icons-material/Add";
  7. import Button from "@mui/material/Button";
  8. import Stack from "@mui/material/Stack";
  9. import Typography from "@mui/material/Typography";
  10. import { Metadata } from "next";
  11. import Link from "next/link";
  12. import { Suspense } from "react";
  13. export const metadata: Metadata = {
  14. title: "Staff",
  15. };
  16. const Staff: React.FC = async () => {
  17. const { t } = await getServerI18n("projects");
  18. preloadTeamLeads()
  19. preloadStaff()
  20. return (
  21. <>
  22. <Stack
  23. direction="row"
  24. justifyContent="space-between"
  25. flexWrap="wrap"
  26. rowGap={2}
  27. >
  28. <Typography variant="h4" marginInlineEnd={2}>
  29. {t("Staff")}
  30. </Typography>
  31. <Button
  32. variant="contained"
  33. startIcon={<Add />}
  34. LinkComponent={Link}
  35. href="/staff/create"
  36. >
  37. {t("Create Staff")}
  38. </Button>
  39. </Stack>
  40. <Suspense fallback={<StaffSearch.Loading />}>
  41. <StaffSearch />
  42. </Suspense>
  43. </>
  44. );
  45. };
  46. export default Staff;