Lifecycle Dashboard
One enquiry flows through six linked stages. Everything below is live from your Supabase project and updates in realtime as records change.
Lifecycle chain
Danger zone
Sales Tracker — Enquiry Data Sheet
Capture the enquiry, products, and run the 6-question feasibility analysis. Score ≥ 14 of 18 → GO AHEAD.
Purchase Requisition
Raised against an approved EDS, per vendor. Extension = price × qty; Total = extension × (1 + GST).
QC Checklist — Inward / Pre-dispatch
Pre-process gating (links PP & PR refs), then per-branding-process inspection across the two QA phases.
Production Plan
Per-process schedule and cost monitoring. Planned dates accumulate from PO date; variance = actual ÷ planned.
Dispatch Tracker
Supports single or multi-point delivery — one leg per destination.
Feedback Form
NPS plus four structured ratings, feeding the feedback analytics view.
CMS Directory
Unified directory across the Spentacorp database — Customers, Vendors (suppliers & service providers), Team and Tasks. Enquiry contacts (Sales Tracker → Prospect) are sourced from Customers; a customer must exist here before an enquiry can be saved.
One-time Supabase setup SQL (create the four cms_* tables)
-- Spentacorp CMS Directory — run once in Supabase SQL editor
create table if not exists public.cms_customers(
id text primary key default gen_random_uuid()::text,
first_name text,last_name text,designation text,company text,
mobile1 text,mobile2 text,email text,address text,city text,state text,
pincode text,gst_number text,tags text,source text,notes text,
status text default 'active',added_by text,date_added date,
created_at timestamptz not null default now());
create table if not exists public.cms_vendors(
id text primary key default gen_random_uuid()::text,
company_name text,category text,sub_category text,
contact1_name text,contact1_mobile text,contact2_name text,contact2_mobile text,
contact3_name text,contact3_mobile text,contact4_name text,contact4_mobile text,
address text,city text,state text,pincode text,gst_number text,
brands text,remarks text,status text default 'active',added_by text,date_added date,
created_at timestamptz not null default now());
create table if not exists public.cms_team(
id text primary key default gen_random_uuid()::text,
full_name text,email text,mobile text,role text,status text default 'Active',
added_by text,date_added date,created_at timestamptz not null default now());
create table if not exists public.cms_tasks(
id text primary key default gen_random_uuid()::text,
task_title text,description text,assigned_to text,priority text,
status text default 'Not Started',due_date date,source text,checker text,
date_completed date,added_by text,date_added date,
created_at timestamptz not null default now());
do $$ declare t text; begin
foreach t in array array['cms_customers','cms_vendors','cms_team','cms_tasks'] loop
execute format('alter table public.%I enable row level security;',t);
execute format('drop policy if exists "%s auth all" on public.%I;',t,t);
execute format('create policy "%s auth all" on public.%I for all to authenticated using (true) with check (true);',t,t);
begin execute format('alter publication supabase_realtime add table public.%I;',t); exception when others then null; end;
end loop;
end $$;