Add tests and implementation for ServiceDetailPage and PriceInput components
- Implement PriceInput component tests to validate Persian and Arabic numeral handling, input formatting, and controlled behavior. - Create ServiceDetailPage component with detailed service information, including pricing, insurance coverage, and editing capabilities. - Add API tests for service item detail retrieval and coverage synchronization with insurance contracts. - Ensure proper error handling and user feedback for service item retrieval and coverage management.
This commit is contained in:
@@ -38,6 +38,7 @@ function ClinicAppointmentSettingsContent() {
|
||||
}, [doctorsQ.data]);
|
||||
|
||||
const selected = activeUuid ?? doctorList[0]?.uuid ?? null;
|
||||
const selectedDoctor = doctorList.find(d => d.uuid === selected) ?? null;
|
||||
|
||||
if (!clinicUuid) {
|
||||
return (
|
||||
@@ -54,7 +55,9 @@ function ClinicAppointmentSettingsContent() {
|
||||
<div className="card-title-row">
|
||||
<div>
|
||||
<h1 className="section-title">مدیریت نوبت دهی</h1>
|
||||
<div className="muted">تنظیمات نوبتدهی پزشکان کلینیک</div>
|
||||
<div className="muted">
|
||||
{selectedDoctor ? `تنظیمات نوبتدهی ${selectedDoctor.name}` : 'تنظیمات نوبتدهی پزشکان کلینیک'}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -88,6 +91,14 @@ function ClinicAppointmentSettingsContent() {
|
||||
{/* key اجباری است: بدون آن state ویرایشِ برنامه بین پزشکان نشت میکند */}
|
||||
{selected && (
|
||||
<div key={selected}>
|
||||
{/* نام پزشک انتخابشده، تا هنگام اسکرول هم مشخص باشد تنظیمات مربوط به کیست */}
|
||||
<div
|
||||
className="card card-pad"
|
||||
style={{ display: 'flex', alignItems: 'center', gap: 8, marginBottom: 'var(--gap)' }}
|
||||
>
|
||||
<UserGroupIcon style={{ width: 18, height: 18, color: 'var(--primary)' }} />
|
||||
<span style={{ fontWeight: 600 }}>{selectedDoctor?.name}</span>
|
||||
</div>
|
||||
<FreeVisitPrice doctorUuid={selected} />
|
||||
<ScheduleSection doctorUuid={selected} />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user