diff --git a/assets/admin/pages/AppointmentCreatePage.tsx b/assets/admin/pages/AppointmentCreatePage.tsx
index d544f06c..9601dca7 100644
--- a/assets/admin/pages/AppointmentCreatePage.tsx
+++ b/assets/admin/pages/AppointmentCreatePage.tsx
@@ -1,7 +1,7 @@
import { useEffect, useMemo, useState } from 'react';
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
import { useNavigate, useSearchParams } from 'react-router-dom';
-import { PlusIcon, ChevronRightIcon } from '@heroicons/react/24/outline';
+import { PlusIcon, ChevronRightIcon, MagnifyingGlassIcon } from '@heroicons/react/24/outline';
import { toast } from 'sonner';
import { api } from '../lib/api';
import type { ApiResponse } from '../lib/api';
@@ -31,7 +31,7 @@ const addMinutes = (time: string, min: number) => {
};
const label = { fontSize: 12.5, color: 'var(--text-3)', display: 'block' } as const;
-const sectionTitle: React.CSSProperties = { fontSize: 14, fontWeight: 700, color: 'var(--text)', margin: '18px 0 12px' };
+const sectionTitle: React.CSSProperties = { fontSize: 18, fontWeight: 700, color: 'var(--text)', margin: '22px 0 14px' };
export default function AppointmentCreatePage() {
const navigate = useNavigate();
@@ -140,7 +140,7 @@ export default function AppointmentCreatePage() {
});
return (
-
+
{/* بردکرامب */}
-
+
{/* پزشک — فقط برای admin/clinic */}
{!isDoctor && (
<>
پزشک:
-
+
setDoctorUuid(v ? String(v) : '')}
placeholder="انتخاب پزشک..."
isClearable
- height={38}
+ height={44}
/>
>
)}
{/* مراجعه کننده */}
-
اطلاعات مراجعه کننده:
+
اطلاعات مراجعه کننده :
-
-
{ setPicked(null); setPatientSearch(e.target.value); }}
- placeholder="جستجوی نام، شماره تماس، شماره پرونده..." />
+
+
+
+ { setPicked(null); setPatientSearch(e.target.value); }}
+ placeholder="جستجوی نام، شماره تماس، شماره پرونده..." />
+
+
{!picked && patients.length > 0 && (
-
+
{patients.map(p => (
)}
{picked === null && (
- <>
-
-
- مراجعه کننده جدید
-
-
-
-
-
-
- setName(e.target.value)} placeholder="نام و نام خانوادگی مراجعه کننده" />
-
-
-
-
-
- setMobile(e.target.value)} placeholder="شماره تماس مراجعه کننده" dir="ltr" />
-
-
-
-
-
- setNationalCode(e.target.value.replace(/\D/g, '').slice(0, 10))}
- placeholder="کد ملی مراجعه کننده" dir="ltr" inputMode="numeric" maxLength={10} />
-
+
+
+
+
+ setName(e.target.value)} placeholder="نام و نام خانوادگی مراجعه کننده" />
- >
+
+
+
+ setMobile(e.target.value)} placeholder="شماره تماس مراجعه کننده" dir="ltr" />
+
+
+
+
+
+ setNationalCode(e.target.value.replace(/\D/g, '').slice(0, 10))}
+ placeholder="کد ملی مراجعه کننده" dir="ltr" inputMode="numeric" maxLength={10} />
+
+
+
)}
{/* مشخصات سرویس */}
-
مشخصات سرویس:
- {!serviceMode && (
-
+
مشخصات سرویس
+ {!serviceMode ? (
+
@@ -235,7 +235,7 @@ export default function AppointmentCreatePage() {
placeholder="انتخاب بخش"
isLoading={sectionsQ.isLoading}
isClearable
- height={38}
+ height={44}
/>
@@ -250,97 +250,134 @@ export default function AppointmentCreatePage() {
isDisabled={!sectionUuid}
isLoading={itemsQ.isLoading}
isClearable
- height={38}
+ height={44}
+ />
+
+
+
+
+
+ ({ value: o.uuid, label: o.full_name ?? '' }))}
+ value={staffUuid || null}
+ onChange={v => setStaffUuid(v ? String(v) : '')}
+ placeholder="انتخاب پرسنل"
+ isLoading={staffQ.isLoading}
+ isClearable
+ height={44}
/>
+ ) : (
+
+
+
+ ({ value: o.uuid, label: o.full_name ?? '' }))}
+ value={staffUuid || null}
+ onChange={v => setStaffUuid(v ? String(v) : '')}
+ placeholder="انتخاب پرسنل"
+ isLoading={staffQ.isLoading}
+ isClearable
+ height={44}
+ />
+
+
)}
-
-
- ({ value: o.uuid, label: o.full_name ?? '' }))}
- value={staffUuid || null}
- onChange={v => setStaffUuid(v ? String(v) : '')}
- placeholder="انتخاب..."
- isLoading={staffQ.isLoading}
- isClearable
- height={38}
- />
-
{/* زمان نوبت */}
-
زمان نوبت:
-
-
+
زمان نوبت
{serviceMode ? (
-
- {doctorUuid ? (
-
- ) : (
-
ابتدا پزشک را انتخاب کنید.
- )}
-
+ <>
+
+
+
+ {doctorUuid ? (
+
+ ) : (
+
ابتدا پزشک را انتخاب کنید.
+ )}
+
+ >
) : (
-
+
+
)}
{/* بیعانه */}
-
بیعانه:
-
-
);