Redesign sales goals and forecast with typed targets and live progress.

Match desktop/mobile mockups and compute current amounts, status, and KPIs from real CRM data.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-05 18:38:11 +03:30
co-authored by Cursor
parent 1c1b77e74a
commit 32af147237
8 changed files with 1287 additions and 385 deletions
@@ -0,0 +1,6 @@
-- AlterTable SalesGoal: typed goals + forecast fields
ALTER TABLE "SalesGoal" ADD COLUMN IF NOT EXISTS "type" TEXT NOT NULL DEFAULT 'sales';
ALTER TABLE "SalesGoal" ADD COLUMN IF NOT EXISTS "forecastAmount" DECIMAL(18,2);
ALTER TABLE "SalesGoal" ADD COLUMN IF NOT EXISTS "probability" DECIMAL(5,2);
CREATE INDEX IF NOT EXISTS "SalesGoal_organizationId_type_idx" ON "SalesGoal"("organizationId", "type");