fix: hide project and transaction sections for shared allocation account modal
This commit is contained in:
@@ -7052,76 +7052,80 @@
|
|||||||
</section>
|
</section>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<section className="mini-card">
|
{!Boolean(lifecycleAccountDetailModal.show_allocation_formula) && (
|
||||||
<div style={{ fontSize: 16, fontWeight: 700 }}>프로젝트별 금액</div>
|
<>
|
||||||
<div className="subtle" style={{ marginTop: 6 }}>연결된 프로젝트들 중 이 계정에 포함된 지출입니다.</div>
|
<section className="mini-card">
|
||||||
{(lifecycleAccountDetailModal.detail.projects || []).length ? (
|
<div style={{ fontSize: 16, fontWeight: 700 }}>프로젝트별 금액</div>
|
||||||
<div style={{ display: "grid", gap: 10, marginTop: 12 }}>
|
<div className="subtle" style={{ marginTop: 6 }}>연결된 프로젝트들 중 이 계정에 포함된 지출입니다.</div>
|
||||||
{(lifecycleAccountDetailModal.detail.projects || []).map((item) => (
|
{(lifecycleAccountDetailModal.detail.projects || []).length ? (
|
||||||
<div
|
<div style={{ display: "grid", gap: 10, marginTop: 12 }}>
|
||||||
key={`lifecycle-account-project-${item.project_code}`}
|
{(lifecycleAccountDetailModal.detail.projects || []).map((item) => (
|
||||||
style={{
|
<div
|
||||||
textAlign: "left",
|
key={`lifecycle-account-project-${item.project_code}`}
|
||||||
border: "1px solid var(--line)",
|
style={{
|
||||||
borderRadius: 14,
|
textAlign: "left",
|
||||||
background: "white",
|
border: "1px solid var(--line)",
|
||||||
padding: "12px 14px",
|
borderRadius: 14,
|
||||||
display: "grid",
|
background: "white",
|
||||||
gridTemplateColumns: "minmax(220px, 1fr) minmax(140px, 0.4fr)",
|
padding: "12px 14px",
|
||||||
gap: 12,
|
display: "grid",
|
||||||
alignItems: "center",
|
gridTemplateColumns: "minmax(220px, 1fr) minmax(140px, 0.4fr)",
|
||||||
}}
|
gap: 12,
|
||||||
>
|
alignItems: "center",
|
||||||
<div>
|
}}
|
||||||
<div style={{ fontWeight: 700 }}>{item.project_name || "(이름없음)"}</div>
|
>
|
||||||
<div className="subtle" style={{ marginTop: 4 }}>
|
<div>
|
||||||
{item.project_code || "-"} · {item.project_type || "미지정"}
|
<div style={{ fontWeight: 700 }}>{item.project_name || "(이름없음)"}</div>
|
||||||
|
<div className="subtle" style={{ marginTop: 4 }}>
|
||||||
|
{item.project_code || "-"} · {item.project_type || "미지정"}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style={{ textAlign: "right", fontWeight: 700 }}>{fmt(item.expense_supply_sum || 0)}원</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div style={{ textAlign: "right", fontWeight: 700 }}>{fmt(item.expense_supply_sum || 0)}원</div>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
<div className="empty-state">표시할 프로젝트가 없습니다.</div>
|
|
||||||
)}
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section className="mini-card">
|
|
||||||
<div style={{ fontSize: 16, fontWeight: 700 }}>거래내역</div>
|
|
||||||
<div className="subtle" style={{ marginTop: 6 }}>이 계정에 포함된 출금 거래를 확인합니다.</div>
|
|
||||||
{(lifecycleAccountDetailModal.detail.transactions || []).length ? (
|
|
||||||
<div className="table-wrap" style={{ marginTop: 12 }}>
|
|
||||||
<table className="data-table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>거래일</th>
|
|
||||||
<th>프로젝트</th>
|
|
||||||
<th>거래처</th>
|
|
||||||
<th>적요</th>
|
|
||||||
<th>공급가액</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{(lifecycleAccountDetailModal.detail.transactions || []).map((row, index) => (
|
|
||||||
<tr key={`lifecycle-account-transaction-${index}`}>
|
|
||||||
<td>{row.transaction_date || "-"}</td>
|
|
||||||
<td>
|
|
||||||
<div>{row.project_name || "프로젝트명 없음"}</div>
|
|
||||||
<div className="table-sub">{row.project_code || "-"}</div>
|
|
||||||
</td>
|
|
||||||
<td>{row.vendor_name || "-"}</td>
|
|
||||||
<td>{row.description || "-"}</td>
|
|
||||||
<td>{fmt(row.allocated_supply_amount ?? row.supply_amount ?? 0)}원</td>
|
|
||||||
</tr>
|
|
||||||
))}
|
))}
|
||||||
</tbody>
|
</div>
|
||||||
</table>
|
) : (
|
||||||
</div>
|
<div className="empty-state">표시할 프로젝트가 없습니다.</div>
|
||||||
) : (
|
)}
|
||||||
<div className="empty-state">표시할 거래내역이 없습니다.</div>
|
</section>
|
||||||
)}
|
|
||||||
</section>
|
<section className="mini-card">
|
||||||
|
<div style={{ fontSize: 16, fontWeight: 700 }}>거래내역</div>
|
||||||
|
<div className="subtle" style={{ marginTop: 6 }}>이 계정에 포함된 출금 거래를 확인합니다.</div>
|
||||||
|
{(lifecycleAccountDetailModal.detail.transactions || []).length ? (
|
||||||
|
<div className="table-wrap" style={{ marginTop: 12 }}>
|
||||||
|
<table className="data-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>거래일</th>
|
||||||
|
<th>프로젝트</th>
|
||||||
|
<th>거래처</th>
|
||||||
|
<th>적요</th>
|
||||||
|
<th>공급가액</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{(lifecycleAccountDetailModal.detail.transactions || []).map((row, index) => (
|
||||||
|
<tr key={`lifecycle-account-transaction-${index}`}>
|
||||||
|
<td>{row.transaction_date || "-"}</td>
|
||||||
|
<td>
|
||||||
|
<div>{row.project_name || "프로젝트명 없음"}</div>
|
||||||
|
<div className="table-sub">{row.project_code || "-"}</div>
|
||||||
|
</td>
|
||||||
|
<td>{row.vendor_name || "-"}</td>
|
||||||
|
<td>{row.description || "-"}</td>
|
||||||
|
<td>{fmt(row.allocated_supply_amount ?? row.supply_amount ?? 0)}원</td>
|
||||||
|
</tr>
|
||||||
|
))}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<div className="empty-state">표시할 거래내역이 없습니다.</div>
|
||||||
|
)}
|
||||||
|
</section>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|||||||
Reference in New Issue
Block a user