-
-
+
{
+ e.currentTarget.style.boxShadow = "0 4px 12px rgba(0, 0, 0, 0.1)";
+ e.currentTarget.style.borderColor = "var(--mantine-color-blue-3)";
+ }}
+ onMouseLeave={(e) => {
+ e.currentTarget.style.boxShadow = "none";
+ e.currentTarget.style.borderColor = "var(--mantine-color-gray-2)";
+ }}
+ >
+
+
+
{cardInitials(title)}
-
-
-
{title}
- {presentation.statusKey
- ? formatCell(statusValue, "activeBadge")
- : null}
-
- {(code || subtitle) && (
-
- {code ? formatCell(code, "code") : null}
- {subtitle ? (
-
- {presentation.subtitleKey === "stepOrder"
- ? `Step ${subtitle}`
- : subtitle}
-
- ) : null}
-
+
+
+ {title}
+
+ {code && (
+
+ {code}
+
)}
-
-
+
+ {presentation.statusKey && (
+
{formatCell(statusValue, "activeBadge")}
+ )}
+
- {presentation.detailColumns.length > 0 ? (
-
- {presentation.detailColumns.map((col) => (
-
-
- {col.header}
- -
- {formatCell(record[col.accessorKey], col.format)}
-
-
- ))}
-
- ) : (
-
+ {(subtitle || presentation.detailColumns.length > 0) && (
+
+ {subtitle && (
+
+
+ {presentation.subtitleKey === "stepOrder" ? "Step" : "Type"}:
+
+
+ {subtitle}
+
+
+ )}
+ {presentation.detailColumns.map((col) => {
+ const displayValue = getSmartValue(record, col.accessorKey);
+ return (
+
+
+ {col.header}:
+
+
+ {formatCell(displayValue, col.format)}
+
+
+ );
+ })}
+
)}
-
+
-
-
+
+
);
})}
-
+
-
-
-
- >
+ {pagination.pageCount > 1 && (
+
+
+ Showing {Math.min(rows.length, pagination.pageSize)} of {pagination.totalCount} {itemLabel}
+
+
+
+ )}
+
);
};
diff --git a/apps/edr-freight-web/backoffice/src/components/ruleEngine/RuleEngineFormDialog.tsx b/apps/edr-freight-web/backoffice/src/components/ruleEngine/RuleEngineFormDialog.tsx
index 2628eadb8..2cb57d8bc 100644
--- a/apps/edr-freight-web/backoffice/src/components/ruleEngine/RuleEngineFormDialog.tsx
+++ b/apps/edr-freight-web/backoffice/src/components/ruleEngine/RuleEngineFormDialog.tsx
@@ -1,27 +1,18 @@
import { useEffect, useState } from "react";
import { Loader2 } from "lucide-react";
-
import {
+ Modal,
Button,
- Dialog,
- DialogContent,
- DialogDescription,
- DialogFooter,
- DialogHeader,
- DialogTitle,
- Field,
- FieldContent,
- FieldLabel,
- Input,
- Select,
- SelectContent,
- SelectItem,
- SelectTrigger,
- SelectValue,
- Separator,
- Switch,
+ TextInput,
Textarea,
-} from "@edr/ui-common";
+ Select,
+ Switch,
+ Stack,
+ Group,
+ Divider,
+ Text,
+ Box,
+} from "@mantine/core";
import {
RULE_ENGINE_SELECT_NONE,
@@ -29,8 +20,6 @@ import {
} from "@/pages/ruleEngine/config/resources";
import type { RuleEngineRecord } from "@/types/rule-engine";
-import { ruleEngineField, ruleEngineSurface } from "./ruleEngineStyles";
-
export interface RuleEngineFormDialogProps {
open: boolean;
onOpenChange: (open: boolean) => void;
@@ -142,133 +131,174 @@ const RuleEngineFormDialog = ({
};
return (
-