feature/IO-3160 - RC-COLLAPSE-ISSUE:

This commit is contained in:
Dave Richer
2025-02-27 13:01:23 -05:00
parent 01b18a4a02
commit 3877462eed
10 changed files with 2182 additions and 1999 deletions

View File

@@ -27,7 +27,7 @@ const colSpan = {
export function JobsTotalsTableComponent({ jobRO, currentUser, job }) {
const { t } = useTranslation();
if (!!!job.job_totals) {
if (!job.job_totals) {
return (
<Card>
<Result title={t("jobs.errors.nofinancial")} extra={<JobCalculateTotals job={job} disabled={jobRO} />} />
@@ -35,6 +35,29 @@ export function JobsTotalsTableComponent({ jobRO, currentUser, job }) {
);
}
// Define collapse items
const collapseItems = [
{
key: "json-tree-totals",
label: "JSON Tree Totals",
children: (
<div>
<pre>
{JSON.stringify(
{
CIECA: job.cieca_ttl && job.cieca_ttl.data,
CIECASTL: job.cieca_stl && job.cieca_stl.data,
ImEXCalc: job.job_totals
},
null,
2
)}
</pre>
</div>
)
}
];
return (
<div>
<Row gutter={[16, 16]}>
@@ -68,23 +91,7 @@ export function JobsTotalsTableComponent({ jobRO, currentUser, job }) {
<Col span={24}>
<Card title="DEVELOPMENT USE ONLY">
<JobCalculateTotals job={job} disabled={jobRO} />
<Collapse>
<Collapse.Panel header="JSON Tree Totals">
<div>
<pre>
{JSON.stringify(
{
CIECA: job.cieca_ttl && job.cieca_ttl.data,
CIECASTL: job.cieca_stl && job.cieca_stl.data,
ImEXCalc: job.job_totals
},
null,
2
)}
</pre>
</div>
</Collapse.Panel>
</Collapse>
<Collapse items={collapseItems} />
</Card>
</Col>
)}