mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 00:52:50 +00:00
fix data table
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
import { useEffect, useMemo, useState } from "react";
|
||||
import { Navigate, useLocation } from "react-router-dom";
|
||||
import type { ColumnDef } from "@edr/ui-common";
|
||||
import { Box, Button, Card, Group, Modal, Stack, Text } from "@mantine/core";
|
||||
import { Box, Button, Card, Container, Group, Modal, Stack, Text, Title } from "@mantine/core";
|
||||
import { Badge } from "@mantine/core";
|
||||
import { Plus } from "lucide-react";
|
||||
|
||||
import Breadcrumbs from "@/components/ui/Breadcrumbs";
|
||||
|
||||
import FleetCardGrid from "@/components/fleet/FleetCardGrid";
|
||||
import FleetFormDialog from "@/components/fleet/FleetFormDialog";
|
||||
@@ -295,19 +298,24 @@ const FleetResourcePage = () => {
|
||||
const itemLabel = config.label.toLowerCase();
|
||||
|
||||
return (
|
||||
<Stack gap="lg" style={{ maxWidth: "100%" }}>
|
||||
<Box>
|
||||
<Stack gap="xs">
|
||||
<Container size="xxl" py="lg">
|
||||
<Breadcrumbs items={[{ label: config.label }]} />
|
||||
|
||||
<Stack gap="lg" mt="sm">
|
||||
<Group justify="space-between" align="flex-end">
|
||||
<div>
|
||||
<Text size="lg" fw={700} c="dark">
|
||||
{config.label}
|
||||
</Text>
|
||||
<Text size="sm" c="dimmed">
|
||||
<Title order={2}>{config.label}</Title>
|
||||
<Text c="dimmed" size="sm">
|
||||
{config.subtitle}
|
||||
</Text>
|
||||
</div>
|
||||
</Stack>
|
||||
</Box>
|
||||
<Button leftSection={<Plus size={16} />} onClick={() => {
|
||||
setEditing(null);
|
||||
setFormOpen(true);
|
||||
}}>
|
||||
{config.addLabel}
|
||||
</Button>
|
||||
</Group>
|
||||
|
||||
<Card radius="lg" padding={0} withBorder style={{ borderColor: "var(--mantine-color-gray-2)" }}>
|
||||
<Stack gap={0}>
|
||||
@@ -317,11 +325,6 @@ const FleetResourcePage = () => {
|
||||
onSearchChange={setSearch}
|
||||
searchPlaceholder={config.searchPlaceholder}
|
||||
showSearch={config.supportsSearch}
|
||||
addLabel={config.addLabel}
|
||||
onAdd={() => {
|
||||
setEditing(null);
|
||||
setFormOpen(true);
|
||||
}}
|
||||
viewMode={viewMode}
|
||||
onViewModeChange={setViewMode}
|
||||
filters={
|
||||
@@ -436,6 +439,8 @@ const FleetResourcePage = () => {
|
||||
)}
|
||||
</Stack>
|
||||
</Card>
|
||||
</Stack>
|
||||
</Container>
|
||||
|
||||
<FleetFormDialog
|
||||
open={formOpen}
|
||||
|
||||
Reference in New Issue
Block a user