feat: Introduce multi-condo management and notices
This commit refactors the application to support managing multiple condominiums. Key changes include: - Introduction of `Condo` and `Notice` data types. - Implementation of multi-condo selection and management, including active condo context. - Addition of a notice system to inform users about important updates or events within a condo. - Styling adjustments to ensure better visibility of form elements. - Mock database updates to accommodate new entities and features.
This commit is contained in:
38
types.ts
38
types.ts
@@ -1,9 +1,21 @@
|
||||
|
||||
export interface Condo {
|
||||
id: string;
|
||||
name: string;
|
||||
address?: string;
|
||||
iban?: string;
|
||||
defaultMonthlyQuota: number;
|
||||
image?: string; // Optional placeholder for logo
|
||||
}
|
||||
|
||||
export interface Family {
|
||||
id: string;
|
||||
condoId: string; // Link to specific condo
|
||||
name: string;
|
||||
unitNumber: string; // Internal apartment number
|
||||
contactEmail?: string;
|
||||
balance: number; // Calculated balance (positive = credit, negative = debt)
|
||||
customMonthlyQuota?: number; // Optional override for default quota
|
||||
}
|
||||
|
||||
export interface Payment {
|
||||
@@ -36,10 +48,28 @@ export interface AlertDefinition {
|
||||
lastSent?: string; // ISO Date of last execution
|
||||
}
|
||||
|
||||
export type NoticeIconType = 'info' | 'warning' | 'maintenance' | 'event';
|
||||
|
||||
export interface Notice {
|
||||
id: string;
|
||||
condoId: string;
|
||||
title: string;
|
||||
content: string;
|
||||
type: NoticeIconType;
|
||||
link?: string;
|
||||
date: string; // ISO Date
|
||||
active: boolean;
|
||||
}
|
||||
|
||||
export interface NoticeRead {
|
||||
userId: string;
|
||||
noticeId: string;
|
||||
readAt: string;
|
||||
}
|
||||
|
||||
export interface AppSettings {
|
||||
defaultMonthlyQuota: number;
|
||||
condoName: string;
|
||||
currentYear: number; // The active fiscal year
|
||||
// Global settings only
|
||||
currentYear: number; // The active fiscal year (could be per-condo, but global for simplicity now)
|
||||
smtpConfig?: SmtpConfig;
|
||||
}
|
||||
|
||||
@@ -69,4 +99,4 @@ export interface User {
|
||||
export interface AuthResponse {
|
||||
token: string;
|
||||
user: User;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user