mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-02-21 18:42:00 +00:00
- Updated `next.config.ts` to include remote image patterns for user verification. - Introduced `VerifyUserDetails` function in `lib/person.ts` to validate user data against national records. - Added `usePerson` hook for fetching national data based on ID card. - Enhanced `signup` and `signin` functions in `auth-actions.ts` to handle user verification status and send notifications for pending verifications. - Refactored `VerifyUser` function in `user-actions.ts` to incorporate national data validation. - Improved UI components in the user verification page to display both database and national information. - Updated `InputReadOnly` component to support customizable label classes for better styling. These changes improve the user verification process, ensuring data integrity and enhancing the overall user experience.
71 lines
1.2 KiB
TypeScript
71 lines
1.2 KiB
TypeScript
export type PaymentType = {
|
|
numberOfMonths: number;
|
|
userId: string;
|
|
deviceIds: string[];
|
|
amount: number;
|
|
paid: boolean;
|
|
};
|
|
|
|
export type TopupType = {
|
|
amount: number;
|
|
userId: string;
|
|
paid: boolean;
|
|
};
|
|
|
|
interface IpAddress {
|
|
ip: string;
|
|
mask: number;
|
|
}
|
|
|
|
interface Ipv6Address {
|
|
ip: string;
|
|
prefix: number;
|
|
}
|
|
|
|
export interface MacAddress {
|
|
ruleId?: number;
|
|
name: string;
|
|
macAddress: string;
|
|
}
|
|
|
|
export interface GroupProfile {
|
|
groupId: string;
|
|
site?: string;
|
|
name: string;
|
|
buildIn?: boolean;
|
|
ipList?: IpAddress[];
|
|
ipv6List?: Ipv6Address[];
|
|
macAddressList?: MacAddress[];
|
|
count: number;
|
|
type: number;
|
|
resource: number;
|
|
}
|
|
|
|
export interface OmadaResponse {
|
|
errorCode: number;
|
|
msg: string;
|
|
result: {
|
|
data: GroupProfile[];
|
|
};
|
|
}
|
|
|
|
export interface TNationalPerson {
|
|
nic: string;
|
|
name: string;
|
|
name_en: string;
|
|
dob: string;
|
|
gender: "M" | "F"; // Assuming gender can only be Male or Female
|
|
house_name: string;
|
|
house_name_en: string;
|
|
island_name: string;
|
|
island_name_en: string;
|
|
atoll: string;
|
|
atoll_en: string;
|
|
constituency: string;
|
|
district_en: string | null;
|
|
block_no: string | null;
|
|
email: string | null;
|
|
primary_contact: string;
|
|
image_url: string;
|
|
}
|