-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
127 lines (114 loc) · 2.38 KB
/
Copy pathtypes.ts
File metadata and controls
127 lines (114 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
export enum UserRole {
OWNER = 'OWNER',
MANAGER = 'MANAGER',
STAFF = 'STAFF'
}
export enum BusinessType {
SALON = 'SALON',
MEDICAL = 'MEDICAL', // Future
SCHOOL = 'SCHOOL', // Future
GYM = 'GYM' // Future
}
export enum PaymentMethod {
CASH = 'CASH',
UPI = 'UPI',
CARD = 'CARD',
PENDING = 'PENDING'
}
export enum AppointmentStatus {
SCHEDULED = 'SCHEDULED',
COMPLETED = 'COMPLETED',
CANCELLED = 'CANCELLED',
NOSHOW = 'NOSHOW'
}
export interface Service {
id: string;
name: string;
price: number;
durationMinutes: number;
description?: string;
image?: string;
}
export interface Staff {
id: string;
name: string;
role: string; // Changed from UserRole to string to allow manual entry
phone: string;
commissionRate: number; // percentage
avatar?: string;
status: 'active' | 'inactive';
attendanceToday?: boolean;
}
export interface Customer {
id: string;
name: string;
phone: string;
email?: string;
notes?: string;
totalVisits: number;
loyaltyPoints: number;
lastVisit?: string;
photo?: string;
}
export interface InventoryItem {
id: string;
name: string;
category: string;
stock: number;
unit: string;
minStockAlert: number;
vendor?: string;
lastRestocked?: string;
image?: string;
}
export interface Appointment {
id: string;
customerId: string;
staffId: string;
serviceId: string;
date: string; // ISO Date string YYYY-MM-DD
time: string; // HH:mm
status: AppointmentStatus;
notes?: string;
}
export interface Invoice {
id: string;
appointmentId: string;
customerId: string;
date: string;
amount: number;
tax: number;
total: number;
method: PaymentMethod;
generatedAt: string;
}
export interface NotificationSettings {
emailAppt: boolean;
whatsappAppt: boolean;
emailPayment: boolean;
whatsappPayment: boolean;
}
export interface BusinessProfile {
id: string;
name: string;
type: BusinessType;
address: string;
phone: string;
email: string; // Owner email
password?: string; // Added for Supabase Auth Sync
upiId: string;
isSubscribed: boolean;
subscriptionPlan: string;
gstIn?: string;
logo?: string;
approved: boolean;
invoiceTerms?: string;
notificationSettings: NotificationSettings;
}
// Stats for dashboard
export interface DashboardStats {
revenueToday: number;
appointmentsToday: number;
pendingPayments: number;
staffOnDuty: number;
}