feat: Setup project with Vite and React
Initializes the Condopay frontend project using Vite, React, and TypeScript. Includes basic project structure, dependencies, and configuration for Tailwind CSS and React Router.
This commit is contained in:
50
types.ts
Normal file
50
types.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
export interface Family {
|
||||
id: string;
|
||||
name: string;
|
||||
unitNumber: string; // Internal apartment number
|
||||
contactEmail?: string;
|
||||
balance: number; // Calculated balance (positive = credit, negative = debt)
|
||||
}
|
||||
|
||||
export interface Payment {
|
||||
id: string;
|
||||
familyId: string;
|
||||
amount: number;
|
||||
datePaid: string; // ISO Date string
|
||||
forMonth: number; // 1-12
|
||||
forYear: number;
|
||||
notes?: string;
|
||||
}
|
||||
|
||||
export interface AppSettings {
|
||||
defaultMonthlyQuota: number;
|
||||
condoName: string;
|
||||
currentYear: number; // The active fiscal year
|
||||
}
|
||||
|
||||
export enum PaymentStatus {
|
||||
PAID = 'PAID',
|
||||
UNPAID = 'UNPAID', // Past due
|
||||
UPCOMING = 'UPCOMING', // Future
|
||||
PENDING = 'PENDING'
|
||||
}
|
||||
|
||||
export interface MonthStatus {
|
||||
monthIndex: number; // 0-11
|
||||
status: PaymentStatus;
|
||||
payment?: Payment;
|
||||
}
|
||||
|
||||
export interface User {
|
||||
id: string;
|
||||
email: string;
|
||||
name?: string;
|
||||
role?: 'admin' | 'poweruser' | 'user';
|
||||
phone?: string;
|
||||
familyId?: string | null;
|
||||
}
|
||||
|
||||
export interface AuthResponse {
|
||||
token: string;
|
||||
user: User;
|
||||
}
|
||||
Reference in New Issue
Block a user