Initial commit: Port Nimara CRM (Layers 0-4)
Full CRM rebuild with Next.js 15, TypeScript, Tailwind, Drizzle ORM, PostgreSQL, Redis, BullMQ, MinIO, and Socket.io. Includes 461 source files covering clients, berths, interests/pipeline, documents/EOI, expenses/invoices, email, notifications, dashboard, admin, and client portal. CI/CD via Gitea Actions with Docker builds. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
128
src/lib/constants.ts
Normal file
128
src/lib/constants.ts
Normal file
@@ -0,0 +1,128 @@
|
||||
// ─── Pipeline Stages ─────────────────────────────────────────────────────────
|
||||
|
||||
export const PIPELINE_STAGES = [
|
||||
'open',
|
||||
'details_sent',
|
||||
'in_communication',
|
||||
'visited',
|
||||
'signed_eoi_nda',
|
||||
'deposit_10pct',
|
||||
'contract',
|
||||
'completed',
|
||||
] as const;
|
||||
|
||||
export type PipelineStage = (typeof PIPELINE_STAGES)[number];
|
||||
|
||||
// ─── Berth Statuses ──────────────────────────────────────────────────────────
|
||||
|
||||
export const BERTH_STATUSES = ['available', 'under_offer', 'sold'] as const;
|
||||
|
||||
export type BerthStatus = (typeof BERTH_STATUSES)[number];
|
||||
|
||||
// ─── Lead Categories ─────────────────────────────────────────────────────────
|
||||
|
||||
export const LEAD_CATEGORIES = [
|
||||
'general_interest',
|
||||
'specific_qualified',
|
||||
'hot_lead',
|
||||
] as const;
|
||||
|
||||
export type LeadCategory = (typeof LEAD_CATEGORIES)[number];
|
||||
|
||||
// ─── Document Types ──────────────────────────────────────────────────────────
|
||||
|
||||
export const DOCUMENT_TYPES = [
|
||||
'eoi',
|
||||
'contract',
|
||||
'nda',
|
||||
'reservation_agreement',
|
||||
'other',
|
||||
] as const;
|
||||
|
||||
export type DocumentType = (typeof DOCUMENT_TYPES)[number];
|
||||
|
||||
// ─── Document Statuses ───────────────────────────────────────────────────────
|
||||
|
||||
export const DOCUMENT_STATUSES = [
|
||||
'draft',
|
||||
'sent',
|
||||
'partially_signed',
|
||||
'completed',
|
||||
'expired',
|
||||
'cancelled',
|
||||
] as const;
|
||||
|
||||
export type DocumentStatus = (typeof DOCUMENT_STATUSES)[number];
|
||||
|
||||
// ─── Expense Categories ──────────────────────────────────────────────────────
|
||||
|
||||
export const EXPENSE_CATEGORIES = [
|
||||
'fuel',
|
||||
'maintenance',
|
||||
'cleaning',
|
||||
'docking',
|
||||
'insurance',
|
||||
'utilities',
|
||||
'marina_fees',
|
||||
'repairs',
|
||||
'equipment',
|
||||
'crew',
|
||||
'administration',
|
||||
'marketing',
|
||||
'travel',
|
||||
'entertainment',
|
||||
'other',
|
||||
] as const;
|
||||
|
||||
export type ExpenseCategory = (typeof EXPENSE_CATEGORIES)[number];
|
||||
|
||||
// ─── Payment Methods ─────────────────────────────────────────────────────────
|
||||
|
||||
export const PAYMENT_METHODS = [
|
||||
'bank_transfer',
|
||||
'credit_card',
|
||||
'debit_card',
|
||||
'cash',
|
||||
'cheque',
|
||||
'crypto',
|
||||
'other',
|
||||
] as const;
|
||||
|
||||
export type PaymentMethod = (typeof PAYMENT_METHODS)[number];
|
||||
|
||||
// ─── Notification Types ──────────────────────────────────────────────────────
|
||||
|
||||
export const NOTIFICATION_TYPES = [
|
||||
// Interest / pipeline
|
||||
'interest_stage_changed',
|
||||
'interest_created',
|
||||
'interest_assigned',
|
||||
// Documents
|
||||
'document_sent',
|
||||
'document_signed',
|
||||
'document_completed',
|
||||
'document_expired',
|
||||
'document_reminder',
|
||||
// Reminders
|
||||
'reminder_due',
|
||||
'reminder_overdue',
|
||||
'reminder_assigned',
|
||||
// Financial
|
||||
'invoice_sent',
|
||||
'invoice_paid',
|
||||
'invoice_overdue',
|
||||
// Notes
|
||||
'mention',
|
||||
// Email
|
||||
'email_received',
|
||||
// System
|
||||
'system_alert',
|
||||
'job_failed',
|
||||
'bulk_operation_complete',
|
||||
'export_ready',
|
||||
// Berths
|
||||
'berth_status_changed',
|
||||
'berth_waiting_list_update',
|
||||
] as const;
|
||||
|
||||
export type NotificationType = (typeof NOTIFICATION_TYPES)[number];
|
||||
Reference in New Issue
Block a user