manage group

This commit is contained in:
Abin Toppo
2025-09-18 13:45:39 +05:30
26 changed files with 2044 additions and 501 deletions
+45
View File
@@ -36,3 +36,48 @@ export interface JoinRequest {
status: "PENDING";
userAvatar?: string;
}
// src/types.ts
// Type for the data received from the GET group details API
export interface GroupDetails {
id: string;
groupName: string;
description: string;
startDate: [number, number, number];
endDate: [number, number, number] | null;
contributionAmount: number;
minParticipants: number;
maxParticipants: number;
portalCharge: number | null;
latePaymentCharge: number | null;
cycleType: 'QUARTERLY' | 'MONTHLY' | 'WEEKLY' | 'CUSTOM';
customCycleDays: number;
withdrawalMethod: 'RANDOM' | 'SEQUENTIAL';
status: 'PENDING' | 'ACTIVE' | 'COMPLETED';
visibility: 'PUBLIC' | 'PRIVATE';
organizerId: string;
organizerFirstName: string;
organizerLastName: string;
organizerMobile: string;
organizerEmail: string;
organizerRole: 'ORGANIZER';
organizerUserId: number;
isActive: boolean;
}
// Type for the payload sent to the edit group API
export interface EditGroupPayload {
groupName: string;
description: string;
visibility: 'PUBLIC' | 'PRIVATE';
cycleType: 'QUARTERLY' | 'MONTHLY' | 'WEEKLY' | 'CUSTOM';
contributionAmount: number;
maxParticipants: number;
latePaymentCharge: number;
customCycleDays: number;
startDate: string; // "YYYY-MM-DD"
endDate: string | null; // "YYYY-MM-DD"
}