From 1d1c3d5f30ffcc9fb4032ba3fff5217ff6aa9781 Mon Sep 17 00:00:00 2001 From: hamed <15238-genius.ha@users.noreply.drupalcode.org> Date: Thu, 23 Jul 2026 15:18:59 +0330 Subject: [PATCH] Update community IDs and source locations in graph.json and manifest.json - Adjusted source location for mockPricing() in AppointmentBookingModal.test.tsx from L144 to L149. - Updated community IDs for various migration entries and commands in graph.json to reflect new community associations. - Modified timestamps and AST hashes for AppointmentBookingModal.test.tsx and AppointmentsPage.tsx in manifest.json. --- .../pages/AppointmentBookingModal.test.tsx | 5 + assets/admin/pages/AppointmentsPage.tsx | 6 +- graphify-out/.graphify_labels.json | 3 +- graphify-out/GRAPH_REPORT.md | 81 ++--- graphify-out/graph.json | 278 +++++++++--------- graphify-out/manifest.json | 8 +- 6 files changed, 196 insertions(+), 185 deletions(-) diff --git a/assets/admin/pages/AppointmentBookingModal.test.tsx b/assets/admin/pages/AppointmentBookingModal.test.tsx index 4c8e4e95..bd68f090 100644 --- a/assets/admin/pages/AppointmentBookingModal.test.tsx +++ b/assets/admin/pages/AppointmentBookingModal.test.tsx @@ -26,6 +26,7 @@ beforeEach(() => { describe('NewAppointmentModal — جستجوی موبایل‌محور', () => { it('submit stays disabled until a mobile search is done', () => { renderWithProviders( {}} onSuccess={() => {}} />); + fireEvent.click(screen.getByRole('button', { name: 'شماره موبایل' })); fireEvent.change(screen.getByPlaceholderText('مثال: 09123456789'), { target: { value: '09121234567' } }); // بدون جستجو، ثبت نوبت غیرفعال است expect(screen.getByRole('button', { name: 'ثبت نوبت' })).toBeDisabled(); @@ -34,6 +35,7 @@ describe('NewAppointmentModal — جستجوی موبایل‌محور', () => { it('converts Persian digits to English and searches by the normalized mobile', async () => { get.mockResolvedValue({ success: true, data: { found: false } }); renderWithProviders( {}} onSuccess={() => {}} />); + fireEvent.click(screen.getByRole('button', { name: 'شماره موبایل' })); const input = screen.getByPlaceholderText('مثال: 09123456789') as HTMLInputElement; fireEvent.change(input, { target: { value: '۰۹۱۲۳۴۵۶۷۸۹' } }); @@ -46,6 +48,7 @@ describe('NewAppointmentModal — جستجوی موبایل‌محور', () => { it('searches on Enter key in the mobile field', async () => { get.mockResolvedValue({ success: true, data: { found: false } }); renderWithProviders( {}} onSuccess={() => {}} />); + fireEvent.click(screen.getByRole('button', { name: 'شماره موبایل' })); const input = screen.getByPlaceholderText('مثال: 09123456789'); fireEvent.change(input, { target: { value: '09121234567' } }); @@ -57,6 +60,7 @@ describe('NewAppointmentModal — جستجوی موبایل‌محور', () => { it('found patient with national code books directly without extra fields', async () => { get.mockResolvedValue({ success: true, data: { found: true, name: 'علی محمدی', mobile: '09121234567', national_code: '0012345678' } }); renderWithProviders( {}} onSuccess={() => {}} />); + fireEvent.click(screen.getByRole('button', { name: 'شماره موبایل' })); fireEvent.change(screen.getByPlaceholderText('مثال: 09123456789'), { target: { value: '09121234567' } }); fireEvent.click(screen.getByRole('button', { name: 'جستجو' })); @@ -78,6 +82,7 @@ describe('NewAppointmentModal — جستجوی موبایل‌محور', () => { it('unknown mobile reveals national code + name fields and books the new patient', async () => { get.mockResolvedValue({ success: true, data: { found: false } }); renderWithProviders( {}} onSuccess={() => {}} />); + fireEvent.click(screen.getByRole('button', { name: 'شماره موبایل' })); fireEvent.change(screen.getByPlaceholderText('مثال: 09123456789'), { target: { value: '09990001122' } }); fireEvent.click(screen.getByRole('button', { name: 'جستجو' })); diff --git a/assets/admin/pages/AppointmentsPage.tsx b/assets/admin/pages/AppointmentsPage.tsx index 6c5a13cf..c69616db 100644 --- a/assets/admin/pages/AppointmentsPage.tsx +++ b/assets/admin/pages/AppointmentsPage.tsx @@ -118,8 +118,8 @@ export function NewAppointmentModal({ const [lookup, setLookup] = useState(null); const [patientName, setPatientName] = useState(''); const [nationalCode, setNationalCode] = useState(''); - // معیار جستجوی بیمار: موبایل یا کد ملی. - const [searchBy, setSearchBy] = useState<'mobile' | 'national'>('mobile'); + // معیار جستجوی بیمار: کد ملی (پیش‌فرض) یا موبایل. + const [searchBy, setSearchBy] = useState<'mobile' | 'national'>('national'); const [pick, setPick] = useState<{ serviceUuids: string[]; slot: { start: number; end: number } | null }>({ serviceUuids: [], slot: null }); const role = useAuthStore(s => s.primaryRole); @@ -292,7 +292,7 @@ export function NewAppointmentModal({ {/* انتخاب معیار جستجو: موبایل یا کد ملی */}
- {(['mobile', 'national'] as const).map(mode => ( + {(['national', 'mobile'] as const).map(mode => (