diff --git a/backend/src/app/controllers/doctor.controller.ts b/backend/src/app/controllers/doctor.controller.ts index 8128b538..a0e4bb32 100644 --- a/backend/src/app/controllers/doctor.controller.ts +++ b/backend/src/app/controllers/doctor.controller.ts @@ -71,6 +71,7 @@ doctorsRouter.get( educationalBackground: doctor.educationalBackground, speciality: doctor.speciality, requestStatus: doctor.requestStatus as DoctorStatus, + documents: doctor.documents as [string], })), } satisfies GetPendingDoctorsResponse) }) @@ -144,6 +145,7 @@ doctorsRouter.get( availableTimes: doctor.availableTimes as [Date], requestStatus: doctor.requestStatus as DoctorStatus, hasDiscount: hasDiscountOnDoctorSession({ patient }), + documents: doctor.documents as [string], })), } satisfies GetApprovedDoctorsResponse) }) @@ -169,6 +171,7 @@ doctorsRouter.get( availableTimes: doctor.availableTimes as [Date], contractStatus: doctor.contractStatus as ContractStatus, employmentContract: doctor.employmentContract as [string], + documents: doctor.documents as [string], } satisfies GetDoctorResponse) }) ) @@ -268,6 +271,7 @@ doctorsRouter.patch( availableTimes: doctor.availableTimes as [Date], contractStatus: doctor.contractStatus as ContractStatus, employmentContract: doctor.employmentContract as [string], + documents: doctor.documents as [string], } satisfies AcceptOrRejectContractResponse) }) ) @@ -291,6 +295,7 @@ doctorsRouter.patch( availableTimes: doctor.availableTimes as [Date], contractStatus: doctor.contractStatus as ContractStatus, employmentContract: doctor.employmentContract as [string], + documents: doctor.documents as [string], } satisfies AcceptOrRejectContractResponse) }) ) diff --git a/clinic-common/types/doctor.types.ts b/clinic-common/types/doctor.types.ts index 06266921..f9ad722e 100644 --- a/clinic-common/types/doctor.types.ts +++ b/clinic-common/types/doctor.types.ts @@ -45,6 +45,7 @@ export interface AcceptOrRejectContractResponse extends DoctorResponseBase { contractStatus: ContractStatus availableTimes: [Date] employmentContract: [string] + documents: [string] } export interface ApproveDoctorResponse extends DoctorResponseBase { @@ -56,6 +57,7 @@ export interface GetDoctorResponse extends DoctorResponseBase { contractStatus: ContractStatus availableTimes: [Date] employmentContract: [string] + documents: [string] } export interface GetApprovedDoctorsResponse { diff --git a/frontend/src/features/admin-dashboard/routes/PendingDoctorDetails.tsx b/frontend/src/features/admin-dashboard/routes/PendingDoctorDetails.tsx index 0ec4d2a7..00a150d0 100644 --- a/frontend/src/features/admin-dashboard/routes/PendingDoctorDetails.tsx +++ b/frontend/src/features/admin-dashboard/routes/PendingDoctorDetails.tsx @@ -17,25 +17,32 @@ export function PendingDoctorDetails() { } return ( - +
+ +
Documents
+ {query.data?.documents?.map((document) => ( +