feat: implement admin API for user and representation management
- Updated UsersPage to fetch users from the new admin endpoint. - Enhanced user data structure to include 'name' and modified rendering logic. - Added RepresentationDetailPage for detailed representation management. - Created AdminApiController to handle user and representation CRUD operations. - Implemented pagination and search functionality for users and representations. - Updated user and representation data models to reflect new API structure.
This commit is contained in:
+22
-19
@@ -2,13 +2,14 @@ export interface User {
|
||||
uuid: string;
|
||||
id: number;
|
||||
mobile_number: string;
|
||||
first_name: string | null;
|
||||
last_name: string | null;
|
||||
name?: string | null;
|
||||
first_name?: string | null;
|
||||
last_name?: string | null;
|
||||
email: string | null;
|
||||
roles: string[];
|
||||
is_active: boolean;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
export interface UserProfile {
|
||||
@@ -105,11 +106,15 @@ export interface Settlement {
|
||||
|
||||
export interface Representation {
|
||||
uuid: string;
|
||||
domain: string;
|
||||
city: string;
|
||||
full_name: string;
|
||||
domain?: string;
|
||||
mobile_number: string | null;
|
||||
city: string | null;
|
||||
commission_percent: number;
|
||||
wallet_balance: number;
|
||||
is_active: boolean;
|
||||
bank_account: { card?: string; bank_name?: string; iban?: string } | null;
|
||||
wallet_balance?: number;
|
||||
active?: boolean;
|
||||
is_active?: boolean;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
@@ -136,16 +141,15 @@ export interface Rating {
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export type SmsTemplateStatus = 'draft' | 'pending_approval' | 'approved' | 'rejected';
|
||||
export type SmsTemplateStatus = 'draft' | 'pending' | 'approved' | 'rejected';
|
||||
|
||||
export interface SmsTemplate {
|
||||
uuid: string;
|
||||
name: string;
|
||||
category: string;
|
||||
content: string;
|
||||
body: string;
|
||||
provider_code: string | null;
|
||||
status: SmsTemplateStatus;
|
||||
owner_name: string | null;
|
||||
reject_reason: string | null;
|
||||
admin_note: string | null;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
@@ -162,20 +166,19 @@ export interface SmsLog {
|
||||
export type CategoryBundle =
|
||||
| 'state'
|
||||
| 'city'
|
||||
| 'specialty'
|
||||
| 'doctor_service'
|
||||
| 'specially_doctor'
|
||||
| 'doctor_services'
|
||||
| 'insurance_type'
|
||||
| 'supplementary_insurance'
|
||||
| 'tag';
|
||||
|
||||
export interface Category {
|
||||
id: number;
|
||||
uuid: string;
|
||||
name: string;
|
||||
code: string | null;
|
||||
label: string;
|
||||
bundle: CategoryBundle;
|
||||
parent_uuid: string | null;
|
||||
parent_name: string | null;
|
||||
sort_order: number;
|
||||
status: number;
|
||||
weight: number;
|
||||
}
|
||||
|
||||
export interface Blog {
|
||||
|
||||
Reference in New Issue
Block a user