feat: add Settlements, SMS, User detail, and Users management pages
- Implement SettlementsPage for managing settlement requests with approval and rejection functionalities. - Create SmsPage for handling SMS templates, including creation, approval, rejection, and logging. - Add UserDetailPage to display detailed information about users. - Develop UsersPage for listing users with search, view, edit, and delete options. - Introduce new types for User, SmsTemplate, SmsLog, and Settlement to support the new features.
This commit is contained in:
@@ -0,0 +1,235 @@
|
||||
export interface User {
|
||||
uuid: string;
|
||||
id: number;
|
||||
mobile_number: string;
|
||||
first_name: string | null;
|
||||
last_name: string | null;
|
||||
email: string | null;
|
||||
roles: string[];
|
||||
is_active: boolean;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
export interface UserProfile {
|
||||
uuid: string;
|
||||
blood_group: string | null;
|
||||
weight: number | null;
|
||||
height: number | null;
|
||||
diseases: string | null;
|
||||
medications: string | null;
|
||||
allergies: string | null;
|
||||
insurance_type: string | null;
|
||||
}
|
||||
|
||||
export interface Doctor {
|
||||
uuid: string;
|
||||
first_name: string;
|
||||
last_name: string;
|
||||
medical_code: string;
|
||||
gender: 'male' | 'female';
|
||||
degree: string;
|
||||
bio: string | null;
|
||||
profile_image: string | null;
|
||||
is_active: boolean;
|
||||
specialties: Specialty[];
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export interface Clinic {
|
||||
uuid: string;
|
||||
name: string;
|
||||
phone: string | null;
|
||||
description: string | null;
|
||||
logo: string | null;
|
||||
is_active: boolean;
|
||||
doctors_count: number;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export type AppointmentStatus =
|
||||
| 'waiting_for_payment'
|
||||
| 'reserved'
|
||||
| 'checked_in'
|
||||
| 'waiting'
|
||||
| 'in_progress'
|
||||
| 'visited'
|
||||
| 'completed'
|
||||
| 'cancelled_by_user'
|
||||
| 'cancelled_by_doctor'
|
||||
| 'cancelled_by_admin'
|
||||
| 'auto_cancel_unpaid'
|
||||
| 'no_show';
|
||||
|
||||
export interface Appointment {
|
||||
uuid: string;
|
||||
patient_name: string;
|
||||
patient_mobile: string;
|
||||
doctor_name: string;
|
||||
clinic_name: string | null;
|
||||
appointment_date: string;
|
||||
appointment_time: string;
|
||||
status: AppointmentStatus;
|
||||
amount: number;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export type PaymentStatus = 'pending' | 'received' | 'canceled' | 'refund';
|
||||
export type PaymentGateway = 'mellat' | 'sep';
|
||||
|
||||
export interface Payment {
|
||||
uuid: string;
|
||||
amount: number;
|
||||
status: PaymentStatus;
|
||||
gateway: PaymentGateway;
|
||||
ref_id: string | null;
|
||||
patient_mobile: string;
|
||||
appointment_uuid: string | null;
|
||||
paid_at: string | null;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export type SettlementStatus = 'pending' | 'approved' | 'rejected';
|
||||
|
||||
export interface Settlement {
|
||||
uuid: string;
|
||||
representation_name: string;
|
||||
amount: number;
|
||||
status: SettlementStatus;
|
||||
bank_card: string | null;
|
||||
bank_name: string | null;
|
||||
reject_reason: string | null;
|
||||
requested_at: string;
|
||||
processed_at: string | null;
|
||||
}
|
||||
|
||||
export interface Representation {
|
||||
uuid: string;
|
||||
domain: string;
|
||||
city: string;
|
||||
commission_percent: number;
|
||||
wallet_balance: number;
|
||||
is_active: boolean;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export interface Comment {
|
||||
uuid: string;
|
||||
patient_name: string;
|
||||
doctor_name: string;
|
||||
title: string;
|
||||
body: string;
|
||||
is_approved: boolean;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export interface Rating {
|
||||
uuid: string;
|
||||
patient_name: string;
|
||||
doctor_name: string;
|
||||
diagnosis_accuracy: number;
|
||||
skill: number;
|
||||
behavior: number;
|
||||
cleanliness: number;
|
||||
waiting_time: number;
|
||||
overall: number;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export type SmsTemplateStatus = 'draft' | 'pending_approval' | 'approved' | 'rejected';
|
||||
|
||||
export interface SmsTemplate {
|
||||
uuid: string;
|
||||
name: string;
|
||||
category: string;
|
||||
content: string;
|
||||
status: SmsTemplateStatus;
|
||||
owner_name: string | null;
|
||||
reject_reason: string | null;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export interface SmsLog {
|
||||
uuid: string;
|
||||
recipient: string;
|
||||
message: string;
|
||||
status: 'queued' | 'sent' | 'failed';
|
||||
provider: string;
|
||||
sent_at: string | null;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export type CategoryBundle =
|
||||
| 'state'
|
||||
| 'city'
|
||||
| 'specialty'
|
||||
| 'doctor_service'
|
||||
| 'insurance_type'
|
||||
| 'supplementary_insurance'
|
||||
| 'tag';
|
||||
|
||||
export interface Category {
|
||||
uuid: string;
|
||||
name: string;
|
||||
code: string | null;
|
||||
bundle: CategoryBundle;
|
||||
parent_uuid: string | null;
|
||||
parent_name: string | null;
|
||||
sort_order: number;
|
||||
}
|
||||
|
||||
export interface Blog {
|
||||
uuid: string;
|
||||
title: string;
|
||||
slug: string;
|
||||
summary: string | null;
|
||||
content: string;
|
||||
cover_image: string | null;
|
||||
status: 'draft' | 'published';
|
||||
author_name: string;
|
||||
views_count: number;
|
||||
tags: string[];
|
||||
published_at: string | null;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export interface Secretary {
|
||||
uuid: string;
|
||||
user_name: string;
|
||||
mobile_number: string;
|
||||
doctor_name: string;
|
||||
doctor_uuid: string;
|
||||
is_active: boolean;
|
||||
permissions: SecretaryPermissions;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export interface SecretaryPermissions {
|
||||
appointments: {
|
||||
view: boolean;
|
||||
create: boolean;
|
||||
cancel: boolean;
|
||||
update_status: boolean;
|
||||
};
|
||||
addresses: {
|
||||
view: boolean;
|
||||
create: boolean;
|
||||
update: boolean;
|
||||
delete: boolean;
|
||||
};
|
||||
clinic_info: {
|
||||
view: boolean;
|
||||
update: boolean;
|
||||
};
|
||||
insurances: {
|
||||
view: boolean;
|
||||
create: boolean;
|
||||
update: boolean;
|
||||
delete: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export interface Specialty {
|
||||
uuid: string;
|
||||
name: string;
|
||||
}
|
||||
Reference in New Issue
Block a user