fix(admin): correct two design-system mismatches found by looking at the pages
Screenshotting the pages under dark mode and compact density (rather than trusting that design tokens were enough) turned up two mistakes repeated across every page this feature set added: - `.card` carries only the surface, border and radius — padding comes from the separate `.card-pad`. Fifteen cards were rendering with their content flush against the edges. - `.field` *is* the input box, a 40px-tall flex row. Wrapping a label plus a control in it produced a joined addon rather than a label above its field. `.field-block` is the label-above layout, and thirty-seven wrappers now use it. Both were invisible to type-checking and to the tests, which is exactly why the visual pass was worth running. Numbers in the new UI now go through formatNumber so they render as Persian digits, and the utilization page's header no longer repeats the sentence that appears under its filters verbatim. The QA driver gained a `--ui` flag: theme and density live in localStorage['clinicpro-ui'], so without seeding them dark mode and compact density cannot be screenshotted at all. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -49,10 +49,10 @@ export default function CancellationPolicyPage() {
|
||||
backTo="/admin/settings-menu"
|
||||
/>
|
||||
|
||||
<div className="card" style={{ display: 'flex', flexDirection: 'column', gap: 16, maxWidth: 640 }}>
|
||||
<div className="card card-pad" style={{ display: 'flex', flexDirection: 'column', gap: 16, maxWidth: 640 }}>
|
||||
{loading && <span style={{ fontSize: 13, color: 'var(--text-3)' }}>در حال بارگذاری…</span>}
|
||||
|
||||
<div className="field" style={{ maxWidth: 220 }}>
|
||||
<div className="field-block" style={{ maxWidth: 220 }}>
|
||||
<label htmlFor="cp-window">پنجرهٔ لغو رایگان (ساعت)</label>
|
||||
<input
|
||||
id="cp-window"
|
||||
@@ -67,7 +67,7 @@ export default function CancellationPolicyPage() {
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div className="field" style={{ maxWidth: 260 }}>
|
||||
<div className="field-block" style={{ maxWidth: 260 }}>
|
||||
<label>نوع جریمه پس از پنجرهٔ رایگان</label>
|
||||
<SearchableSelect
|
||||
value={mode}
|
||||
@@ -77,7 +77,7 @@ export default function CancellationPolicyPage() {
|
||||
</div>
|
||||
|
||||
{mode === 'percent' && (
|
||||
<div className="field" style={{ maxWidth: 200 }}>
|
||||
<div className="field-block" style={{ maxWidth: 200 }}>
|
||||
<label htmlFor="cp-percent">درصد جریمه</label>
|
||||
<input
|
||||
id="cp-percent"
|
||||
@@ -95,7 +95,7 @@ export default function CancellationPolicyPage() {
|
||||
)}
|
||||
|
||||
{mode === 'fixed' && (
|
||||
<div className="field" style={{ maxWidth: 260 }}>
|
||||
<div className="field-block" style={{ maxWidth: 260 }}>
|
||||
<label>مبلغ جریمه</label>
|
||||
<PriceInput value={value} onChange={setValue} suffix="ریال" />
|
||||
</div>
|
||||
@@ -123,7 +123,7 @@ export default function CancellationPolicyPage() {
|
||||
اعتبار پکیج پس از لغو برمیگردد
|
||||
</label>
|
||||
|
||||
<div className="field" style={{ maxWidth: 220 }}>
|
||||
<div className="field-block" style={{ maxWidth: 220 }}>
|
||||
<label htmlFor="cp-threshold">آستانهٔ عدم حضور</label>
|
||||
<input
|
||||
id="cp-threshold"
|
||||
|
||||
Reference in New Issue
Block a user