From cd32f6c8bdecbf12c8f6b0225c527e537b476b09 Mon Sep 17 00:00:00 2001 From: hamed <15238-genius.ha@users.noreply.drupalcode.org> Date: Thu, 23 Jul 2026 19:38:01 +0330 Subject: [PATCH 1/2] fix(doctor): 404 deactivated doctor profile page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Deactivated doctors are now absent from the public list, but their /doctor/{uuid} page still loaded. getDoctor() now treats the backend's raw `is_active === false` as not-found, so the profile 404s like the list — matching the site's "hide inactive doctors" behavior. Co-Authored-By: Claude Opus 4.8 (1M context) --- app/doctor/[slug]/page.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/doctor/[slug]/page.js b/app/doctor/[slug]/page.js index 3507261..c02d64a 100644 --- a/app/doctor/[slug]/page.js +++ b/app/doctor/[slug]/page.js @@ -22,7 +22,11 @@ const getDoctor = cache(async (slug) => { if (res.status === 404 || res.status === 400) return null; if (!res.ok) throw new Error(`Failed to fetch doctor: ${res.status}`); const json = await res.json(); - return json?.data?.data ?? null; + const doctor = json?.data?.data ?? null; + // پزشک غیرفعال (ادمین فلگ فعال را خاموش کرده) نباید در سایت نمایش داده شود؛ + // صفحهٔ تکی هم مثل لیست عمومی 404 می‌شود. + if (doctor?.is_active === false) return null; + return doctor; }); const getDoctorAddresses = cache(async (doctorId) => { From 0a2a2bfba3414e0581aa628617c877e905f0be28 Mon Sep 17 00:00:00 2001 From: hamed <15238-genius.ha@users.noreply.drupalcode.org> Date: Thu, 23 Jul 2026 19:43:02 +0330 Subject: [PATCH 2/2] fix(datePicker): hide next button for inactive months on larger screens --- app/component/date/datePicker/index.js | 5 ++++- components/common/InlineJalaliMonth.js | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/component/date/datePicker/index.js b/app/component/date/datePicker/index.js index 51331c2..97c3b7f 100644 --- a/app/component/date/datePicker/index.js +++ b/app/component/date/datePicker/index.js @@ -119,7 +119,10 @@ function DatePicker({ setDate, clinicUuid = null }) { selectedDate={selectedDate} onSelectDay={selectDay} isDisabled={isDisabled} - showNext={false} + // وقتی تقویم ماه بعد در کنار این نمایش داده می‌شود (md و xl) دکمهٔ «بعد» + // این تقویم پنهان می‌ماند تا دوتا نشود؛ در موبایل و lg که تنها همین تقویم + // دیده می‌شود، دکمهٔ «بعد» فعال است تا کاربر بتواند به ماه بعد برود. + nextBtnClass="md:invisible lg:visible xl:invisible" onPrev={() => setBaseMonth(moment(baseMonth).subtract(1, "jMonth"))} onNext={() => setBaseMonth(moment(baseMonth).add(1, "jMonth"))} /> diff --git a/components/common/InlineJalaliMonth.js b/components/common/InlineJalaliMonth.js index bc19560..b91154b 100644 --- a/components/common/InlineJalaliMonth.js +++ b/components/common/InlineJalaliMonth.js @@ -42,6 +42,8 @@ function InlineJalaliMonth({ onNext, showPrev = true, showNext = true, + prevBtnClass = "", + nextBtnClass = "", }) { const days = buildDays(displayDate); @@ -51,7 +53,7 @@ function InlineJalaliMonth({