mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-16 03:40:06 +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
@@ -38,6 +38,7 @@ export default function Suppliers() {
|
||||
phone: "",
|
||||
hasDlc: false,
|
||||
automaticReconciliation: false,
|
||||
requiresControl: false,
|
||||
});
|
||||
|
||||
const { data: suppliers = [], isLoading } = useQuery<Supplier[]>({
|
||||
@@ -191,6 +192,7 @@ export default function Suppliers() {
|
||||
phone: "",
|
||||
hasDlc: false,
|
||||
automaticReconciliation: false,
|
||||
requiresControl: false,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -227,6 +229,7 @@ export default function Suppliers() {
|
||||
phone: supplier.phone || "",
|
||||
hasDlc: supplier.hasDlc || false,
|
||||
automaticReconciliation: supplier.automaticReconciliation || false,
|
||||
requiresControl: supplier.requiresControl || false,
|
||||
});
|
||||
setShowEditModal(true);
|
||||
};
|
||||
@@ -410,10 +413,16 @@ export default function Suppliers() {
|
||||
<span className="text-xs font-medium">Auto-rapprochement</span>
|
||||
</div>
|
||||
)}
|
||||
{supplier.requiresControl && (
|
||||
<div className="flex items-center text-orange-600 bg-orange-50 px-2 py-1 rounded-full">
|
||||
<CheckCircle className="w-3 h-3 mr-1" />
|
||||
<span className="text-xs font-medium">Contrôle requis</span>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!supplier.hasDlc && !supplier.automaticReconciliation && (
|
||||
{!supplier.hasDlc && !supplier.automaticReconciliation && !supplier.requiresControl && (
|
||||
<div className="text-xs text-gray-500 mt-2">
|
||||
Aucune option activée
|
||||
</div>
|
||||
@@ -524,6 +533,18 @@ export default function Suppliers() {
|
||||
</Label>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center space-x-2">
|
||||
<Checkbox
|
||||
id="requiresControl"
|
||||
checked={formData.requiresControl}
|
||||
onCheckedChange={(checked) => handleChange('requiresControl', checked === true)}
|
||||
data-testid="checkbox-requires-control"
|
||||
/>
|
||||
<Label htmlFor="requiresControl" className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
|
||||
Fournisseur à contrôler
|
||||
</Label>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center space-x-3 pt-4">
|
||||
<Button
|
||||
type="button"
|
||||
|
||||
Reference in new issue
Block a user