fix(admin): give the service catalog a real page header
The visual pass over the older screens found one inconsistency worth fixing: the service catalog opened with a hand-rolled bold line and a button. No back button, no description — the one page in the panel that does not say what it is or how to leave it. It uses PageHeader now, like every other page. Everything else on the task 01-04 screens held up under dark mode and compact density: branches, resource types, skills, pools and the catalog all read from tokens and none of them broke. The only remaining mobile findings are the shared shell's Latin phone number and one small tap target, both of which predate this work and appear on the dashboard too. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,7 @@ import type { ApiResponse } from '../lib/api';
|
||||
import type { ServiceSection, ServiceItem } from '../types';
|
||||
import { formatRial, formatNumber } from '../lib/utils';
|
||||
import { usePermissions } from '../hooks/usePermissions';
|
||||
import PageHeader from '../components/ui/PageHeader';
|
||||
import Modal from '../components/ui/Modal';
|
||||
import ConfirmDialog from '../components/ui/ConfirmDialog';
|
||||
import ServiceTariffModal from '../components/ServiceTariffModal';
|
||||
@@ -129,14 +130,20 @@ function ClinicServicesPageInner() {
|
||||
{!selectedSection ? (
|
||||
/* ═════════ نمای بخشها ═════════ */
|
||||
<>
|
||||
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginBottom: 16, flexWrap: 'wrap', gap: 12 }}>
|
||||
<b style={{ fontSize: 16 }}>بخشها</b>
|
||||
{canCreate && (
|
||||
<button className="cp-btn-primary" onClick={() => { sectionForm.reset({ name: '' }); setSectionModal('create'); }}>
|
||||
<PlusIcon style={{ width: 16 }} /> بخش جدید
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
{/* تیتر دستساز جای `PageHeader` بود: بدون آن این صفحه تنها فهرستِ پنل است
|
||||
که نه دکمهٔ بازگشت دارد و نه میگوید چیست. */}
|
||||
<PageHeader
|
||||
title="سرویسها"
|
||||
description="بخشها و سرویسهای قابل رزرو. مدت و قیمت هر سرویس از همینجا میآید."
|
||||
backTo="/admin/settings-menu"
|
||||
action={
|
||||
canCreate ? (
|
||||
<button className="cp-btn-primary" onClick={() => { sectionForm.reset({ name: '' }); setSectionModal('create'); }}>
|
||||
<PlusIcon style={{ width: 16 }} /> بخش جدید
|
||||
</button>
|
||||
) : undefined
|
||||
}
|
||||
/>
|
||||
|
||||
{sectionsLoading ? (
|
||||
<div style={{ color: 'var(--text-3)', fontSize: 13, padding: 16 }}>در حال بارگذاری...</div>
|
||||
|
||||
Reference in New Issue
Block a user