feat(ui-kit): patient detail tab bar (info / sessions)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -109,6 +109,7 @@ function MyPatientsPageInner() {
|
||||
const [page, setPage] = useState(1);
|
||||
const [search, setSearch] = useState("");
|
||||
const [viewMode, setViewMode] = useState<"grid" | "list">("grid");
|
||||
const [detailTab, setDetailTab] = useState<"info" | "sessions">("info");
|
||||
const [sessionPage, setSessionPage] = useState(1);
|
||||
const [sessionModal, setSessionModal] = useState(false);
|
||||
const [editSession, setEditSession] = useState<PatientSession | null>(null);
|
||||
@@ -907,7 +908,25 @@ function MyPatientsPageInner() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{patientProfile && (
|
||||
<div className="cp-tabs" style={{ display: "flex", gap: 4, borderBottom: "1px solid var(--border)", marginBottom: 16 }}>
|
||||
{([["info", "اطلاعات پرونده"], ["sessions", `تاریخچه مراجعات (${totalSes})`]] as const).map(([key, label]) => (
|
||||
<button
|
||||
key={key}
|
||||
onClick={() => setDetailTab(key)}
|
||||
style={{
|
||||
padding: "10px 16px", fontSize: 13.5, fontWeight: 600, cursor: "pointer",
|
||||
background: "none", border: "none",
|
||||
color: detailTab === key ? "var(--primary)" : "var(--text-2)",
|
||||
borderBottom: `2px solid ${detailTab === key ? "var(--primary)" : "transparent"}`,
|
||||
marginBottom: -1,
|
||||
}}
|
||||
>
|
||||
{label}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{detailTab === "info" && patientProfile && (
|
||||
<div className="card" style={{ padding: 16, marginBottom: 16 }}>
|
||||
<div style={{ fontWeight: 600, fontSize: 14, marginBottom: 12 }}>اطلاعات بیمار</div>
|
||||
<div style={{ display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(180px, 1fr))", gap: 12 }}>
|
||||
@@ -936,6 +955,7 @@ function MyPatientsPageInner() {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{detailTab === "sessions" && (
|
||||
<div className="card">
|
||||
<div
|
||||
style={{
|
||||
@@ -1016,6 +1036,7 @@ function MyPatientsPageInner() {
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Modal مراجعه جدید */}
|
||||
<Modal
|
||||
|
||||
Reference in New Issue
Block a user