From cf108a5cee351c30dce6e3cd5a7c4ff1d3f74698 Mon Sep 17 00:00:00 2001 From: israel Date: Fri, 10 Apr 2026 12:39:32 +0100 Subject: [PATCH 1/5] fix(platform): refine toast icons, CSV header detection, and vendor bulk delete MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Simplify toaster to always show variant icons (info default) instead of conditional icon/no-icon layout - Remove explicit 'success' variant from delete/revoke toasts (default handles it) - Replace brittle heuristic-based CSV header detection with first-row-is-header approach and drop the COMMON_HEADER_NAMES dictionary - Unify product import mappers: rename excel→record, make CSV fallback return null so headerless files fail clearly instead of silently misaligning columns - Add expectedColumns hints to customer and vendor import forms - Add bulk delete support to vendors table with row selection --- .../ui/entity/entity-delete-dialog.tsx | 1 - .../app/components/ui/feedback/toaster.tsx | 54 +++++++------------ .../agents/components/agent-delete-dialog.tsx | 1 - .../components/customer-import-form.tsx | 1 + .../components/products-import-dialog.tsx | 21 ++------ .../components/api-key-revoke-dialog.tsx | 1 - .../providers/components/providers-table.tsx | 2 +- .../teams/components/team-delete-dialog.tsx | 1 - .../vendors/components/vendor-import-form.tsx | 2 +- .../vendors/components/vendors-table.tsx | 29 +++++++++- .../hooks/use-vendors-table-config.tsx | 1 + .../hooks/__tests__/use-file-import.test.ts | 12 ++--- .../platform/app/hooks/use-file-import.ts | 35 ++++++------ services/platform/lib/utils/file-parsing.ts | 51 +----------------- services/platform/messages/de.json | 7 +-- services/platform/messages/en.json | 7 +-- 16 files changed, 91 insertions(+), 135 deletions(-) diff --git a/services/platform/app/components/ui/entity/entity-delete-dialog.tsx b/services/platform/app/components/ui/entity/entity-delete-dialog.tsx index 42dfd62b1..d96bbfc23 100644 --- a/services/platform/app/components/ui/entity/entity-delete-dialog.tsx +++ b/services/platform/app/components/ui/entity/entity-delete-dialog.tsx @@ -80,7 +80,6 @@ export function EntityDeleteDialog({ await deleteMutation(entity); toast({ title: translations.successMessage, - variant: 'success', }); onClose(); onSuccess?.(); diff --git a/services/platform/app/components/ui/feedback/toaster.tsx b/services/platform/app/components/ui/feedback/toaster.tsx index 3ab4542a1..1c9c0cfbb 100644 --- a/services/platform/app/components/ui/feedback/toaster.tsx +++ b/services/platform/app/components/ui/feedback/toaster.tsx @@ -2,7 +2,7 @@ import * as ToastPrimitives from '@radix-ui/react-toast'; import { cva } from 'class-variance-authority'; -import { X, CheckCircle2, XCircle } from 'lucide-react'; +import { X, CheckCircle2, XCircle, Info } from 'lucide-react'; import { useToast } from '@/app/hooks/use-toast'; import { cn } from '@/lib/utils/cn'; @@ -34,7 +34,9 @@ function VariantIcon({ variant }: { variant?: ToastVariant }) { case 'destructive': return