Files
clinicpro/assets/admin/pages/MyClinicPage.tsx
T
hamedandClaude Opus 4.8 0b3aed0813 feat(settings): render doctor/clinic settings pages inside the settings shell
Wrap the existing settings-area pages — doctor profile (مدیریت پزشک),
insurance pricing (بیمه), payment report (پرداخت), SMS wallet (پیامک‌ها),
secretaries (منشی) and clinic info (مطب) — in SettingsLayout so they appear
under the settings sub-navigation like the Figma design, with the matching
menu item highlighted. Wire the doctor/clinic menu entries to their routes.

The نوبت‌دهی / برچسب‌ها / حساب کاربری entries stay as disabled placeholders
until they have their own pages/designs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-13 13:44:02 +03:30

35 lines
992 B
TypeScript

import { useEffect } from 'react';
import { useNavigate } from 'react-router-dom';
import { useAuthStore } from '../stores/authStore';
import SettingsLayout from '../components/layout/SettingsLayout';
function MyClinicPageContent() {
const { dbUuid, fetchMe } = useAuthStore();
const navigate = useNavigate();
useEffect(() => {
if (dbUuid) {
navigate(`/admin/clinics/${dbUuid}`, { replace: true });
} else {
fetchMe().then(() => {
const uuid = useAuthStore.getState().dbUuid;
if (uuid) navigate(`/admin/clinics/${uuid}`, { replace: true });
});
}
}, [dbUuid, fetchMe, navigate]);
return (
<div style={{ padding: 40, textAlign: 'center' }}>
<p style={{ color: 'var(--text-3)', fontSize: 14 }}>در حال بارگذاری اطلاعات کلینیک...</p>
</div>
);
}
export default function MyClinicPage() {
return (
<SettingsLayout active="clinic">
<MyClinicPageContent />
</SettingsLayout>
);
}