diff --git a/src/admin/modules/application/components/ApplicationList.tsx b/src/admin/modules/application/components/ApplicationList.tsx index 2e7737c11..940aa6307 100644 --- a/src/admin/modules/application/components/ApplicationList.tsx +++ b/src/admin/modules/application/components/ApplicationList.tsx @@ -1,4 +1,4 @@ -import { Divider, Stack, Typography } from "@mui/material"; +import { Stack } from "@mui/material"; import { useState } from "react"; import { AutocompleteInput, @@ -17,6 +17,10 @@ import { import ListActions from "@/admin/components/Actions/ListActions"; import ApplicationsExportModal from "@/admin/modules/application/components/ApplicationsExportModal"; +import Menu from "@/components/elements/Menu/Menu"; +import { MENU_PLACEMENT_BOTTOM_LEFT } from "@/components/elements/Menu/MenuVariant"; +import Text from "@/components/elements/Text/Text"; +import Icon, { IconNames } from "@/components/extensive/Icon/Icon"; import { V2OrganisationRead } from "@/generated/apiSchemas"; import modules from "../.."; @@ -29,6 +33,17 @@ export const statusChoices = [ { id: "rejected", name: "Rejected" } ]; +const tableMenu = [ + { + id: "1", + render: () => + }, + { + id: "2", + render: () => + } +]; + const ApplicationDataGrid = () => { return ( @@ -61,8 +76,9 @@ const ApplicationDataGrid = () => { /> - - + + + ); }; @@ -71,27 +87,33 @@ export const ApplicationList = () => { const [exportModalOpen, setExportModalOpen] = useState(false); const filters = [ - , + , - + , - + , - + ]; return ( <> - - Applications - - + + + Applications + setExportModalOpen(true)} />} filters={filters}> diff --git a/src/admin/modules/form/components/FormList.tsx b/src/admin/modules/form/components/FormList.tsx index 7b9e61059..057f247c8 100644 --- a/src/admin/modules/form/components/FormList.tsx +++ b/src/admin/modules/form/components/FormList.tsx @@ -1,21 +1,39 @@ -import { Divider, Stack, Typography } from "@mui/material"; -import { BooleanField, Datagrid, ImageField, List, TextField } from "react-admin"; +import { Stack } from "@mui/material"; +import { useState } from "react"; +import { BooleanField, Datagrid, ImageField, List, TextField, useDataProvider } from "react-admin"; -export const FormList = () => ( - <> - - Forms +import { UserDataProvider } from "@/admin/apiProvider/dataProviders/userDataProvider"; +import ListActionsCreate from "@/admin/components/Actions/ListActionsCreate"; +import ExportProcessingAlert from "@/admin/components/Alerts/ExportProcessingAlert"; +import Text from "@/components/elements/Text/Text"; - - +import modules from "../.."; - - - - - - - - - -); +export const FormList = () => { + const [exporting, setExporting] = useState(false); + const userDataProvider = useDataProvider(); + const handleExport = () => { + setExporting(true); + + userDataProvider.export(modules.user.ResourceName).finally(() => setExporting(false)); + }; + return ( + <> + + + Forms + + + + }> + + + + + + + + + + ); +}; diff --git a/src/admin/modules/fundingProgrammes/components/FundingProgrammeList.tsx b/src/admin/modules/fundingProgrammes/components/FundingProgrammeList.tsx index 64ff71ec0..a38dff916 100644 --- a/src/admin/modules/fundingProgrammes/components/FundingProgrammeList.tsx +++ b/src/admin/modules/fundingProgrammes/components/FundingProgrammeList.tsx @@ -1,25 +1,56 @@ -import { Divider, Stack, Typography } from "@mui/material"; -import { Datagrid, DateField, EditButton, List, ShowButton, TextField } from "react-admin"; +import { Stack } from "@mui/material"; +import { useState } from "react"; +import { Datagrid, DateField, EditButton, List, ShowButton, TextField, useDataProvider } from "react-admin"; + +import { UserDataProvider } from "@/admin/apiProvider/dataProviders/userDataProvider"; +import ListActionsCreate from "@/admin/components/Actions/ListActionsCreate"; +import ExportProcessingAlert from "@/admin/components/Alerts/ExportProcessingAlert"; +import Menu from "@/components/elements/Menu/Menu"; +import { MENU_PLACEMENT_BOTTOM_LEFT } from "@/components/elements/Menu/MenuVariant"; +import Text from "@/components/elements/Text/Text"; +import Icon, { IconNames } from "@/components/extensive/Icon/Icon"; + +import modules from "../.."; + +const tableMenu = [ + { + id: "1", + render: () => + }, + { + id: "2", + render: () => + } +]; export const FundingProgrammeList = () => { + const [exporting, setExporting] = useState(false); + const userDataProvider = useDataProvider(); + const handleExport = () => { + setExporting(true); + + userDataProvider.export(modules.user.ResourceName).finally(() => setExporting(false)); + }; return ( <> - - Funding Programmes - - + + + Funding Programmes + - - + } filters={[]}> + - - + + + + ); }; diff --git a/src/admin/modules/nurseries/components/NurseriesList.tsx b/src/admin/modules/nurseries/components/NurseriesList.tsx index 17f64de3a..b668d2f7a 100644 --- a/src/admin/modules/nurseries/components/NurseriesList.tsx +++ b/src/admin/modules/nurseries/components/NurseriesList.tsx @@ -1,4 +1,4 @@ -import { Divider, Stack, Typography } from "@mui/material"; +import { Stack } from "@mui/material"; import { FC } from "react"; import { AutocompleteInput, @@ -21,6 +21,10 @@ import ExportProcessingAlert from "@/admin/components/Alerts/ExportProcessingAle import CustomBulkDeleteWithConfirmButton from "@/admin/components/Buttons/CustomBulkDeleteWithConfirmButton"; import CustomDeleteWithConfirmButton from "@/admin/components/Buttons/CustomDeleteWithConfirmButton"; import FrameworkSelectionDialog, { useFrameworkExport } from "@/admin/components/Dialogs/FrameworkSelectionDialog"; +import Menu from "@/components/elements/Menu/Menu"; +import { MENU_PLACEMENT_BOTTOM_LEFT } from "@/components/elements/Menu/MenuVariant"; +import Text from "@/components/elements/Text/Text"; +import Icon, { IconNames } from "@/components/extensive/Icon/Icon"; import { getCountriesOptions } from "@/constants/options/countries"; import { useFrameworkChoices } from "@/constants/options/frameworks"; import { getChangeRequestStatusOptions, getStatusOptions } from "@/constants/options/status"; @@ -28,6 +32,25 @@ import { optionToChoices } from "@/utils/options"; import modules from "../.."; +const tableMenu = [ + { + id: "1", + render: () => + }, + { + id: "2", + render: () => + }, + { + id: "3", + render: () => ( + + + + ) + } +]; + const NurseryDataGrid: FC = () => { const frameworkChoices = useFrameworkChoices(); @@ -53,11 +76,9 @@ const NurseryDataGrid: FC = () => { } sortable={false} /> - - - - - + + + ); }; @@ -66,8 +87,14 @@ export const NurseriesList: FC = () => { const frameworkChoices = useFrameworkChoices(); const filters = [ - , - , + , + , { order: "ASC" }} > - + , - , - , + , + , , { order: "ASC" }} > - + ]; @@ -106,10 +146,10 @@ export const NurseriesList: FC = () => { return ( <> - - Nurseries - - + + + Nurseries + } filters={filters}> diff --git a/src/admin/modules/nurseryReports/components/NurseryReportsList.tsx b/src/admin/modules/nurseryReports/components/NurseryReportsList.tsx index 15c08c148..67d58b44f 100644 --- a/src/admin/modules/nurseryReports/components/NurseryReportsList.tsx +++ b/src/admin/modules/nurseryReports/components/NurseryReportsList.tsx @@ -1,4 +1,4 @@ -import { Divider, Stack, Typography } from "@mui/material"; +import { Stack } from "@mui/material"; import { FC } from "react"; import { AutocompleteInput, @@ -19,6 +19,10 @@ import ListActions from "@/admin/components/Actions/ListActions"; import ExportProcessingAlert from "@/admin/components/Alerts/ExportProcessingAlert"; import CustomBulkDeleteWithConfirmButton from "@/admin/components/Buttons/CustomBulkDeleteWithConfirmButton"; import FrameworkSelectionDialog, { useFrameworkExport } from "@/admin/components/Dialogs/FrameworkSelectionDialog"; +import Menu from "@/components/elements/Menu/Menu"; +import { MENU_PLACEMENT_BOTTOM_LEFT } from "@/components/elements/Menu/MenuVariant"; +import Text from "@/components/elements/Text/Text"; +import Icon, { IconNames } from "@/components/extensive/Icon/Icon"; import { getCountriesOptions } from "@/constants/options/countries"; import { useFrameworkChoices } from "@/constants/options/frameworks"; import { getChangeRequestStatusOptions, getReportStatusOptions } from "@/constants/options/status"; @@ -26,6 +30,17 @@ import { optionToChoices } from "@/utils/options"; import modules from "../.."; +const tableMenu = [ + { + id: "1", + render: () => + }, + { + id: "2", + render: () => + } +]; + const NurseryReportDataGrid: FC = () => { const frameworkChoices = useFrameworkChoices(); @@ -53,8 +68,9 @@ const NurseryReportDataGrid: FC = () => { } sortable={false} /> - - + + + ); }; @@ -63,7 +79,7 @@ export const NurseryReportsList: FC = () => { const frameworkChoices = useFrameworkChoices(); const filters = [ - , + , { order: "ASC" }} > - + , { order: "ASC" }} > - + , - , - , - , + , + , + , ]; @@ -103,10 +138,10 @@ export const NurseryReportsList: FC = () => { return ( <> - - Nursery Reports - - + + + Nursery Reports + } filters={filters}> diff --git a/src/admin/modules/organisations/components/OrganisationsList.tsx b/src/admin/modules/organisations/components/OrganisationsList.tsx index 0262a38ef..c32574285 100644 --- a/src/admin/modules/organisations/components/OrganisationsList.tsx +++ b/src/admin/modules/organisations/components/OrganisationsList.tsx @@ -1,4 +1,4 @@ -import { Divider, Stack, Tab, Tabs, Typography } from "@mui/material"; +import { Divider, Stack, Tab, Tabs } from "@mui/material"; import { Fragment, useCallback, useState } from "react"; import { Datagrid, @@ -18,6 +18,10 @@ import { OrganisationDataProvider } from "@/admin/apiProvider/dataProviders/orga import ListActions from "@/admin/components/Actions/ListActions"; import ExportProcessingAlert from "@/admin/components/Alerts/ExportProcessingAlert"; import FundingProgrammesArrayField from "@/admin/components/Fields/FundingProgrammesArrayField"; +import Menu from "@/components/elements/Menu/Menu"; +import { MENU_PLACEMENT_BOTTOM_LEFT } from "@/components/elements/Menu/MenuVariant"; +import Text from "@/components/elements/Text/Text"; +import Icon, { IconNames } from "@/components/extensive/Icon/Icon"; import { getOrganisationTypeOptions } from "@/constants/options/organisations"; import { optionToChoices } from "@/utils/options"; @@ -32,11 +36,12 @@ const tabs = [ ]; const filters = [ - , + , ]; @@ -59,6 +64,17 @@ const ApplicationDataGrid = () => { [displayedFilters, filterValues, setFilters] ); + const tableMenu = [ + { + id: "1", + render: () => + }, + { + id: "2", + render: () => + } + ]; + return ( @@ -83,8 +99,9 @@ const ApplicationDataGrid = () => { - - + + + ); @@ -103,12 +120,11 @@ export const OrganisationsList = () => { return ( <> - - Organisations - - + + + Organisations + - } filters={filters} diff --git a/src/admin/modules/pitch/components/PitchesList.tsx b/src/admin/modules/pitch/components/PitchesList.tsx index 4ec4702d2..6c5595914 100644 --- a/src/admin/modules/pitch/components/PitchesList.tsx +++ b/src/admin/modules/pitch/components/PitchesList.tsx @@ -1,4 +1,4 @@ -import { Divider, Stack, Typography } from "@mui/material"; +import { Stack } from "@mui/material"; import { useState } from "react"; import { Datagrid, @@ -18,6 +18,10 @@ import { PitchDataProvider } from "@/admin/apiProvider/dataProviders/pitchDataPr import ListActions from "@/admin/components/Actions/ListActions"; import ExportProcessingAlert from "@/admin/components/Alerts/ExportProcessingAlert"; import SimpleChipFieldArray from "@/admin/components/Fields/SimpleChipFieldArray"; +import Menu from "@/components/elements/Menu/Menu"; +import { MENU_PLACEMENT_BOTTOM_LEFT } from "@/components/elements/Menu/MenuVariant"; +import Text from "@/components/elements/Text/Text"; +import Icon, { IconNames } from "@/components/extensive/Icon/Icon"; import { getCountriesOptions } from "@/constants/options/countries"; import { getRestorationInterventionTypeOptions } from "@/constants/options/restorationInterventionTypes"; import { optionToChoices } from "@/utils/options"; @@ -25,24 +29,37 @@ import { optionToChoices } from "@/utils/options"; import modules from "../.."; const filters = [ - , + , , ]; +const tableMenu = [ + { + id: "1", + render: () => + }, + { + id: "2", + render: () => + } +]; + const ApplicationDataGrid = () => { return ( - + { /> - - + + + ); }; @@ -78,10 +96,10 @@ export const PitchesList = () => { return ( <> - - Pitches - - + + + Pitches + } filters={filters}> diff --git a/src/admin/modules/projectReports/components/ProjectReportsList.tsx b/src/admin/modules/projectReports/components/ProjectReportsList.tsx index 9ad50a205..e1cece667 100644 --- a/src/admin/modules/projectReports/components/ProjectReportsList.tsx +++ b/src/admin/modules/projectReports/components/ProjectReportsList.tsx @@ -1,4 +1,4 @@ -import { Divider, Stack, Typography } from "@mui/material"; +import { Stack } from "@mui/material"; import { FC } from "react"; import { AutocompleteInput, @@ -19,6 +19,10 @@ import ListActions from "@/admin/components/Actions/ListActions"; import ExportProcessingAlert from "@/admin/components/Alerts/ExportProcessingAlert"; import CustomBulkDeleteWithConfirmButton from "@/admin/components/Buttons/CustomBulkDeleteWithConfirmButton"; import FrameworkSelectionDialog, { useFrameworkExport } from "@/admin/components/Dialogs/FrameworkSelectionDialog"; +import Menu from "@/components/elements/Menu/Menu"; +import { MENU_PLACEMENT_BOTTOM_LEFT } from "@/components/elements/Menu/MenuVariant"; +import Text from "@/components/elements/Text/Text"; +import Icon, { IconNames } from "@/components/extensive/Icon/Icon"; import { getCountriesOptions } from "@/constants/options/countries"; import { useFrameworkChoices } from "@/constants/options/frameworks"; import { getChangeRequestStatusOptions, getReportStatusOptions } from "@/constants/options/status"; @@ -29,6 +33,17 @@ import modules from "../.."; const ProjectReportDataGrid: FC = () => { const frameworkChoices = useFrameworkChoices(); + const tableMenu = [ + { + id: "1", + render: () => + }, + { + id: "2", + render: () => + } + ]; + return ( }> @@ -53,8 +68,9 @@ const ProjectReportDataGrid: FC = () => { - - + + + ); }; @@ -62,7 +78,7 @@ const ProjectReportDataGrid: FC = () => { export const ProjectReportsList: FC = () => { const frameworkChoices = useFrameworkChoices(); const filters = [ - , + , { order: "ASC" }} > - + , - , - , + , + , , - + ]; const { exporting, openExportDialog, frameworkDialogProps } = useFrameworkExport("project-reports"); return ( <> - - Project Reports - - + + + Project Reports + } filters={filters}> diff --git a/src/admin/modules/projects/components/ProjectsList.tsx b/src/admin/modules/projects/components/ProjectsList.tsx index 357448002..4dd7dbc5c 100644 --- a/src/admin/modules/projects/components/ProjectsList.tsx +++ b/src/admin/modules/projects/components/ProjectsList.tsx @@ -1,4 +1,4 @@ -import { Divider, Stack, Typography } from "@mui/material"; +import { Stack } from "@mui/material"; import { FC } from "react"; import { AutocompleteInput, @@ -22,6 +22,10 @@ import ExportProcessingAlert from "@/admin/components/Alerts/ExportProcessingAle import CustomBulkDeleteWithConfirmButton from "@/admin/components/Buttons/CustomBulkDeleteWithConfirmButton"; import CustomDeleteWithConfirmButton from "@/admin/components/Buttons/CustomDeleteWithConfirmButton"; import FrameworkSelectionDialog, { useFrameworkExport } from "@/admin/components/Dialogs/FrameworkSelectionDialog"; +import Menu from "@/components/elements/Menu/Menu"; +import { MENU_PLACEMENT_BOTTOM_LEFT } from "@/components/elements/Menu/MenuVariant"; +import Text from "@/components/elements/Text/Text"; +import Icon, { IconNames } from "@/components/extensive/Icon/Icon"; import { getCountriesOptions } from "@/constants/options/countries"; import { useFrameworkChoices } from "@/constants/options/frameworks"; import { getChangeRequestStatusOptions, getStatusOptions } from "@/constants/options/status"; @@ -40,6 +44,25 @@ const monitoringDataChoices = [ } ]; +const tableMenu = [ + { + id: "1", + render: () => + }, + { + id: "2", + render: () => + }, + { + id: "3", + render: () => ( + + + + ) + } +]; + const ProjectDataGrid = () => { const frameworkChoices = useFrameworkChoices(); @@ -65,11 +88,9 @@ const ProjectDataGrid = () => { sortable={false} /> - - - - - + + + ); }; @@ -78,12 +99,19 @@ export const ProjectsList: FC = () => { const frameworkChoices = useFrameworkChoices(); const filters = [ - , - , + , + , , { source="organisation_uuid" reference={modules.organisation.ResourceName} label="Organization" + className="select-page-admin" sort={{ field: "name", order: "ASC" }} > - + , - , + , , - + ]; const { exporting, openExportDialog, frameworkDialogProps } = useFrameworkExport("projects"); return ( <> - - Projects - - + + + Projects + } filters={filters}> diff --git a/src/admin/modules/reportingFramework/components/ReportingFrameworkList.tsx b/src/admin/modules/reportingFramework/components/ReportingFrameworkList.tsx index 1eec0c260..0475d0252 100644 --- a/src/admin/modules/reportingFramework/components/ReportingFrameworkList.tsx +++ b/src/admin/modules/reportingFramework/components/ReportingFrameworkList.tsx @@ -1,34 +1,72 @@ -import { Divider, Stack, Typography } from "@mui/material"; -import { FC } from "react"; -import { Datagrid, EditButton, List, ShowButton, TextField, WrapperField } from "react-admin"; +import { Stack } from "@mui/material"; +import { FC, useState } from "react"; +import { Datagrid, EditButton, List, ShowButton, TextField, useDataProvider, WrapperField } from "react-admin"; +import { UserDataProvider } from "@/admin/apiProvider/dataProviders/userDataProvider"; +import ListActionsCreate from "@/admin/components/Actions/ListActionsCreate"; +import ExportProcessingAlert from "@/admin/components/Alerts/ExportProcessingAlert"; import CustomDeleteWithConfirmButton from "@/admin/components/Buttons/CustomDeleteWithConfirmButton"; import { useGetUserRole } from "@/admin/hooks/useGetUserRole"; +import Menu from "@/components/elements/Menu/Menu"; +import { MENU_PLACEMENT_BOTTOM_LEFT } from "@/components/elements/Menu/MenuVariant"; +import Text from "@/components/elements/Text/Text"; +import Icon, { IconNames } from "@/components/extensive/Icon/Icon"; + +import modules from "../.."; export const ReportingFrameworkList: FC = () => { + const [exporting, setExporting] = useState(false); + const userDataProvider = useDataProvider(); + const handleExport = () => { + setExporting(true); + userDataProvider.export(modules.user.ResourceName).finally(() => setExporting(false)); + }; const { isSuperAdmin } = useGetUserRole(); + + const commonMenu = [ + { + id: "1", + render: () => + }, + { + id: "2", + render: () => + } + ]; + + const tableMenu = isSuperAdmin + ? [ + ...commonMenu, + { + id: "3", + render: () => ( + + + + ) + } + ] + : commonMenu; + return ( <> - - Reporting Frameworks - - + + + Reporting Frameworks + - - + }> + - - - {isSuperAdmin && ( - - - - )} + + + + ); }; diff --git a/src/admin/modules/siteReports/components/SiteReportsList.tsx b/src/admin/modules/siteReports/components/SiteReportsList.tsx index 6eacb997c..64b7d71d0 100644 --- a/src/admin/modules/siteReports/components/SiteReportsList.tsx +++ b/src/admin/modules/siteReports/components/SiteReportsList.tsx @@ -1,4 +1,4 @@ -import { Divider, Stack, Typography } from "@mui/material"; +import { Stack } from "@mui/material"; import { FC } from "react"; import { AutocompleteInput, @@ -19,6 +19,10 @@ import ListActions from "@/admin/components/Actions/ListActions"; import ExportProcessingAlert from "@/admin/components/Alerts/ExportProcessingAlert"; import CustomBulkDeleteWithConfirmButton from "@/admin/components/Buttons/CustomBulkDeleteWithConfirmButton"; import FrameworkSelectionDialog, { useFrameworkExport } from "@/admin/components/Dialogs/FrameworkSelectionDialog"; +import Menu from "@/components/elements/Menu/Menu"; +import { MENU_PLACEMENT_BOTTOM_LEFT } from "@/components/elements/Menu/MenuVariant"; +import Text from "@/components/elements/Text/Text"; +import Icon, { IconNames } from "@/components/extensive/Icon/Icon"; import { getCountriesOptions } from "@/constants/options/countries"; import { useFrameworkChoices } from "@/constants/options/frameworks"; import { getChangeRequestStatusOptions, getReportStatusOptions } from "@/constants/options/status"; @@ -29,6 +33,17 @@ import modules from "../.."; const SiteReportDataGrid: FC = () => { const frameworkChoices = useFrameworkChoices(); + const tableMenu = [ + { + id: "1", + render: () => + }, + { + id: "2", + render: () => + } + ]; + return ( }> @@ -53,8 +68,9 @@ const SiteReportDataGrid: FC = () => { - - + + + ); }; @@ -63,7 +79,7 @@ export const SiteReportsList: FC = () => { const frameworkChoices = useFrameworkChoices(); const filters = [ - , + , { order: "ASC" }} > - + , { order: "ASC" }} > - + , - , - , + , + , , - + ]; const { exporting, openExportDialog, frameworkDialogProps } = useFrameworkExport("site-reports"); return ( <> - - Site Reports - - + + + Site Reports + } filters={filters}> diff --git a/src/admin/modules/sites/components/SitesList.tsx b/src/admin/modules/sites/components/SitesList.tsx index 1dd4aeed4..a4033982b 100644 --- a/src/admin/modules/sites/components/SitesList.tsx +++ b/src/admin/modules/sites/components/SitesList.tsx @@ -1,4 +1,4 @@ -import { Divider, Stack, Typography } from "@mui/material"; +import { Stack } from "@mui/material"; import { FC } from "react"; import { AutocompleteInput, @@ -22,6 +22,10 @@ import ExportProcessingAlert from "@/admin/components/Alerts/ExportProcessingAle import CustomBulkDeleteWithConfirmButton from "@/admin/components/Buttons/CustomBulkDeleteWithConfirmButton"; import CustomDeleteWithConfirmButton from "@/admin/components/Buttons/CustomDeleteWithConfirmButton"; import FrameworkSelectionDialog, { useFrameworkExport } from "@/admin/components/Dialogs/FrameworkSelectionDialog"; +import Menu from "@/components/elements/Menu/Menu"; +import { MENU_PLACEMENT_BOTTOM_LEFT } from "@/components/elements/Menu/MenuVariant"; +import Text from "@/components/elements/Text/Text"; +import Icon, { IconNames } from "@/components/extensive/Icon/Icon"; import { getCountriesOptions } from "@/constants/options/countries"; import { useFrameworkChoices } from "@/constants/options/frameworks"; import { getChangeRequestStatusOptions, getStatusOptions } from "@/constants/options/status"; @@ -39,6 +43,24 @@ const monitoringDataChoices = [ name: "Yes" } ]; +const tableMenu = [ + { + id: "1", + render: () => + }, + { + id: "2", + render: () => + }, + { + id: "3", + render: () => ( + + + + ) + } +]; const SiteDataGrid: FC = () => { const frameworkChoices = useFrameworkChoices(); @@ -65,11 +87,9 @@ const SiteDataGrid: FC = () => { sortable={false} /> - - - - - + + + ); }; @@ -77,8 +97,14 @@ const SiteDataGrid: FC = () => { export const SitesList: FC = () => { const frameworkChoices = useFrameworkChoices(); const filters = [ - , - , + , + , { order: "ASC" }} > - + , { order: "ASC" }} > - + , - , - , + , + , , ]; @@ -123,10 +163,10 @@ export const SitesList: FC = () => { return ( <> - - Sites - - + + + Sites + } filters={filters}> diff --git a/src/admin/modules/user/components/UserList.tsx b/src/admin/modules/user/components/UserList.tsx index dcd6f026a..2dcd41ec8 100644 --- a/src/admin/modules/user/components/UserList.tsx +++ b/src/admin/modules/user/components/UserList.tsx @@ -1,4 +1,4 @@ -import { Divider, Stack, Typography } from "@mui/material"; +import { Stack } from "@mui/material"; import { useState } from "react"; import { BooleanField, @@ -19,17 +19,22 @@ import { import { UserDataProvider } from "@/admin/apiProvider/dataProviders/userDataProvider"; import ListActions from "@/admin/components/Actions/ListActions"; import ExportProcessingAlert from "@/admin/components/Alerts/ExportProcessingAlert"; +import Menu from "@/components/elements/Menu/Menu"; +import { MENU_PLACEMENT_BOTTOM_LEFT } from "@/components/elements/Menu/MenuVariant"; +import Text from "@/components/elements/Text/Text"; +import Icon, { IconNames } from "@/components/extensive/Icon/Icon"; import { V2AdminUserRead } from "@/generated/apiSchemas"; import modules from "../.."; import { userTypesChoices } from "../const"; const filters = [ - , + , ]; +const tableMenu = [ + { + id: "1", + render: () => + }, + { + id: "2", + render: () => + } +]; + const UserDataGrid = () => { return ( - + `${record?.first_name || ""} ${record?.last_name || ""}`} /> @@ -63,10 +79,11 @@ const UserDataGrid = () => { - + - - + + + ); }; @@ -78,16 +95,15 @@ export const UserList = () => { const handleExport = () => { setExporting(true); - userDataProvider.export(modules.user.ResourceName).finally(() => setExporting(false)); }; return ( <> - - Users - - + + + Users + } filters={filters}> diff --git a/src/styles/custom-admin-page-styles.css b/src/styles/custom-admin-page-styles.css index a0d7212e1..aa6a90bc4 100644 --- a/src/styles/custom-admin-page-styles.css +++ b/src/styles/custom-admin-page-styles.css @@ -26,6 +26,10 @@ @apply !bg-white !rounded-lg } +.select-page-admin label{ + @apply pr-[14px] + } + .button-aside-page-admin { @apply !w-full !bg-white !border !border-solid !border-primary-500 !uppercase !leading-[normal] !px-4 !py-[10.5px] !rounded-lg hover:!bg-grey-900 disabled:!border-transparent disabled:!bg-grey-750 !text-primary-500 disabled:!text-grey-730 !text-xs !font-bold lg:!text-sm wide:!text-base; } @@ -47,7 +51,7 @@ } .RaCreateButton-root{ - @apply !text-blueCustom-900 !bg-white !text-sm !font-bold lg:text-base wide:text-md !tracking-normal !px-4 !py-2 !rounded-lg !border !border-solid !border-neutral-300 !mb-4; + @apply !text-blueCustom-900 !bg-white !text-sm !font-bold lg:!text-base wide:!text-md !tracking-normal !px-4 !py-2 !rounded-lg !border !border-solid !border-neutral-300 !mb-4 !font-primary !leading-[normal] !h-[42px] } .RaCreateButton-root:hover {