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:
@@ -758,9 +758,14 @@ model SalesGoal {
|
||||
userId String?
|
||||
user User? @relation("SalesGoalUser", fields: [userId], references: [id], onDelete: Cascade)
|
||||
title String
|
||||
/// sales|customer|revenue|deal|activity|quality
|
||||
type String @default("sales")
|
||||
periodStart DateTime
|
||||
periodEnd DateTime
|
||||
targetAmount Decimal @db.Decimal(18, 2)
|
||||
forecastAmount Decimal? @db.Decimal(18, 2)
|
||||
/// 0-100
|
||||
probability Decimal? @db.Decimal(5, 2)
|
||||
currency String @default("IRR")
|
||||
notes String?
|
||||
createdAt DateTime @default(now())
|
||||
@@ -768,6 +773,7 @@ model SalesGoal {
|
||||
|
||||
@@index([organizationId, periodStart, periodEnd])
|
||||
@@index([userId])
|
||||
@@index([organizationId, type])
|
||||
}
|
||||
|
||||
model ExchangeRate {
|
||||
|
||||
Reference in New Issue
Block a user