feat(admin): move work schedule from profile to appointment settings

Export ScheduleSection from DoctorDetailPage and render the full
weekly/overrides/holidays editor in AppointmentSettingsPage. Gate the
profile's schedule render on !isOwnProfile so it no longer appears in the
doctor's own profile while the admin doctor-detail view keeps it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
hamed
2026-07-17 10:53:51 +03:30
co-authored by Claude Fable 5
parent fcd7a0596d
commit 3e5d61e280
2 changed files with 7 additions and 21 deletions
+2 -2
View File
@@ -2055,7 +2055,7 @@ const SCHEDULE_TABS = [
{ id: 'holidays' as const, label: 'تعطیلات' },
];
function ScheduleSection({ doctorUuid, readOnly = false }: { doctorUuid: string; readOnly?: boolean }) {
export function ScheduleSection({ doctorUuid, readOnly = false }: { doctorUuid: string; readOnly?: boolean }) {
const [tab, setTab] = useState<'weekly' | 'overrides' | 'holidays'>('weekly');
const locationsQ = useQuery({
@@ -2896,7 +2896,7 @@ export default function DoctorDetailPage({ isOwnProfile = false }: { isOwnProfil
)}
</div>
{uuid && <ScheduleSection doctorUuid={uuid} readOnly={isReadOnly} />}
{uuid && !isOwnProfile && <ScheduleSection doctorUuid={uuid} readOnly={isReadOnly} />}
{isOwnProfile && <ClinicInvitationsSection />}