mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-12 01:37:40 +02:00
Add quality control process for supplier deliveries
Introduce a new 'requires_control' flag for suppliers, enabling a quality control workflow for deliveries. This includes UI updates, database schema changes, and API endpoints to manage and track control validation. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/e7P7sOc
This commit is contained in:
1 parent
b643ea5fa8
commit
a2ab38a412
7 files changed
+97
-6
No files matched your search
@@ -10,7 +10,7 @@ import { Input } from "@/components/ui/input";
|
||||
import { useToast } from "@/hooks/use-toast";
|
||||
import { apiRequest } from "@/lib/queryClient";
|
||||
import { isUnauthorizedError } from "@/lib/authUtils";
|
||||
import { Check, X } from "lucide-react";
|
||||
import { Check, X, AlertTriangle } from "lucide-react";
|
||||
|
||||
const validateDeliverySchema = z.object({
|
||||
blNumber: z.string().min(1, "Le numéro de bon de livraison est obligatoire"),
|
||||
@@ -110,6 +110,21 @@ export default function ValidateDeliveryModal({
|
||||
</p>
|
||||
</DialogHeader>
|
||||
|
||||
{/* Alerte si le fournisseur nécessite un contrôle */}
|
||||
{delivery.supplier?.requiresControl && (
|
||||
<div className="bg-orange-50 border border-orange-200 rounded-lg p-3 flex items-start space-x-3">
|
||||
<AlertTriangle className="w-5 h-5 text-orange-600 flex-shrink-0 mt-0.5" />
|
||||
<div className="flex-1">
|
||||
<h4 className="text-sm font-semibold text-orange-800">
|
||||
⚠️ Contrôle à effectuer sur cette livraison
|
||||
</h4>
|
||||
<p className="text-xs text-orange-700 mt-1">
|
||||
Ce fournisseur nécessite un contrôle qualité lors de la réception de la livraison.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<Form {...form}>
|
||||
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-4">
|
||||
{/* Informations de la livraison */}
|
||||
|
||||
Reference in new issue
Block a user