feat: featured doctor toggle
This commit is contained in:
@@ -9,6 +9,7 @@ export interface Doctor {
|
||||
workingStatus?: string;
|
||||
qualification?: string;
|
||||
isActive: boolean;
|
||||
isFeatured: boolean;
|
||||
globalSortOrder: number;
|
||||
|
||||
departments?: {
|
||||
@@ -53,7 +54,7 @@ export const createDoctorApi = async (data: Doctor) => {
|
||||
export const updateDoctorApi = async (
|
||||
doctorId: string,
|
||||
data: Partial<Doctor>,
|
||||
action: 'toggleStatus' | 'updateDetails' = 'updateDetails'
|
||||
action: 'toggleStatus' | 'toggleFeatured' | 'updateDetails' = 'updateDetails'
|
||||
) => {
|
||||
try {
|
||||
const res = await apiClient.patch(`/doctors/${doctorId}/${action}`, data);
|
||||
|
||||
Reference in New Issue
Block a user