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:
michaelschal committed 2025-09-30 08:22:02 +00:00
1 parent b643ea5fa8
commit a2ab38a412
7 files changed
+97 -6

No files matched your search

+6 -1
View File
@@ -23,6 +23,9 @@ CREATE TABLE "deliveries" (
"scheduled_date" date NOT NULL,
"notes" text,
"validated_at" timestamp,
"control_validated" boolean DEFAULT false,
"control_validated_by" varchar,
"control_validated_at" timestamp,
CONSTRAINT "deliveries_status_check_fixed" CHECK ((status)::text = ANY ((ARRAY['planned'::character varying, 'delivered'::character varying])::text[]))
);
@@ -66,7 +69,9 @@ CREATE TABLE "suppliers" (
"phone" varchar,
"created_at" timestamp DEFAULT now(),
"updated_at" timestamp DEFAULT now(),
"has_dlc" boolean DEFAULT false
"has_dlc" boolean DEFAULT false,
"automatic_reconciliation" boolean DEFAULT false,
"requires_control" boolean DEFAULT false
);
CREATE TABLE "user_groups" (