refactor(ui): unify remaining native selects (claims/sms/wallet/secretaries)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
hamed
2026-06-23 21:06:45 +03:30
co-authored by Claude Opus 4.8
parent 0bc1b4a2e9
commit f41314a3ad
4 changed files with 36 additions and 41 deletions
+9 -5
View File
@@ -6,6 +6,7 @@ import { api } from '../lib/api';
import { formatRial, formatNumber } from '../lib/utils';
import PageHeader from '../components/ui/PageHeader';
import Modal from '../components/ui/Modal';
import SearchableSelect from '../components/ui/SearchableSelect';
interface ClaimItem {
invoice_item_id: number;
@@ -105,11 +106,14 @@ export default function ClaimsPage() {
<div className="card" style={{ padding: 18 }}>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 12 }}>
<h2 style={{ fontSize: 14, fontWeight: 700, margin: 0 }}>مطالبات</h2>
<select className="input" style={{ maxWidth: 160 }} value={statusFilter} onChange={(e) => setStatusFilter(e.target.value)}>
{STATUS_FILTERS.map((s) => (
<option key={s} value={s}>{s === '' ? 'همه وضعیت‌ها' : STATUS_META[s]?.label}</option>
))}
</select>
<div style={{ minWidth: 160 }}>
<SearchableSelect
options={STATUS_FILTERS.map((s) => ({ value: s, label: s === '' ? 'همه وضعیت‌ها' : STATUS_META[s]?.label ?? s }))}
value={statusFilter}
onChange={(v) => setStatusFilter(v ? String(v) : '')}
placeholder="همه وضعیت‌ها"
/>
</div>
</div>
{claimsQuery.isLoading ? (