IO-2599 Remove Space and put Div in to space components

This commit is contained in:
Allan Carr
2024-01-19 12:19:07 -08:00
parent f4908ed265
commit ca3145ce0f

View File

@@ -105,85 +105,89 @@ export function ProductionListDetail({
{error && <AlertComponent error={JSON.stringify(error)} />} {error && <AlertComponent error={JSON.stringify(error)} />}
{!loading && data && ( {!loading && data && (
<div> <div>
<Space direction="vertical"> <CardTemplate
<CardTemplate title={t("jobs.labels.employeeassignments")}
title={t("jobs.labels.employeeassignments")} loading={loading}
loading={loading} >
> <JobEmployeeAssignments job={data.jobs_by_pk} refetch={refetch} />
<JobEmployeeAssignments job={data.jobs_by_pk} refetch={refetch} /> </CardTemplate>
</CardTemplate> <div style={{ height: "8px" }} />
<Descriptions bordered column={1}> <Descriptions bordered column={1}>
<Descriptions.Item label={t("jobs.fields.ro_number")}> <Descriptions.Item label={t("jobs.fields.ro_number")}>
{theJob.ro_number || ""} {theJob.ro_number || ""}
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item label={t("jobs.fields.alt_transport")}> <Descriptions.Item label={t("jobs.fields.alt_transport")}>
<Space> <Space>
{data.jobs_by_pk.alt_transport || ""} {data.jobs_by_pk.alt_transport || ""}
<JobAtChange job={data.jobs_by_pk} /> <JobAtChange job={data.jobs_by_pk} />
</Space> </Space>
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item label={t("jobs.fields.clm_no")}> <Descriptions.Item label={t("jobs.fields.clm_no")}>
{theJob.clm_no || ""} {theJob.clm_no || ""}
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item label={t("jobs.fields.ins_co_nm")}> <Descriptions.Item label={t("jobs.fields.ins_co_nm")}>
{theJob.ins_co_nm || ""} {theJob.ins_co_nm || ""}
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item label={t("jobs.fields.owner")}> <Descriptions.Item label={t("jobs.fields.owner")}>
<Space> <Space>
<OwnerNameDisplay ownerObject={theJob} /> <OwnerNameDisplay ownerObject={theJob} />
{!technician ? ( {!technician ? (
<> <>
<StartChatButton <StartChatButton
phone={data.jobs_by_pk.ownr_ph1} phone={data.jobs_by_pk.ownr_ph1}
jobid={data.jobs_by_pk.id} jobid={data.jobs_by_pk.id}
/> />
<StartChatButton <StartChatButton
phone={data.jobs_by_pk.ownr_ph2} phone={data.jobs_by_pk.ownr_ph2}
jobid={data.jobs_by_pk.id} jobid={data.jobs_by_pk.id}
/> />
</> </>
) : ( ) : (
<> <>
<PhoneNumberFormatter> <PhoneNumberFormatter>
{data.jobs_by_pk.ownr_ph1} {data.jobs_by_pk.ownr_ph1}
</PhoneNumberFormatter> </PhoneNumberFormatter>
<PhoneNumberFormatter> <PhoneNumberFormatter>
{data.jobs_by_pk.ownr_ph2} {data.jobs_by_pk.ownr_ph2}
</PhoneNumberFormatter> </PhoneNumberFormatter>
</> </>
)} )}
</Space> </Space>
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item label={t("jobs.fields.vehicle")}> <Descriptions.Item label={t("jobs.fields.vehicle")}>
{`${theJob.v_model_yr || ""} ${theJob.v_color || ""} ${ {`${theJob.v_model_yr || ""} ${theJob.v_color || ""} ${
theJob.v_make_desc || "" theJob.v_make_desc || ""
} ${theJob.v_model_desc || ""}`} } ${theJob.v_model_desc || ""}`}
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item label={t("jobs.fields.clm_total")}> <Descriptions.Item label={t("jobs.fields.clm_total")}>
<CurrencyFormatter>{theJob.clm_total}</CurrencyFormatter> <CurrencyFormatter>{theJob.clm_total}</CurrencyFormatter>
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item label={t("jobs.fields.actual_in")}> <Descriptions.Item label={t("jobs.fields.actual_in")}>
<DateFormatter>{theJob.actual_in}</DateFormatter> <DateFormatter>{theJob.actual_in}</DateFormatter>
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item label={t("jobs.fields.scheduled_completion")}> <Descriptions.Item label={t("jobs.fields.scheduled_completion")}>
<DateFormatter>{theJob.scheduled_completion}</DateFormatter> <DateFormatter>{theJob.scheduled_completion}</DateFormatter>
</Descriptions.Item> </Descriptions.Item>
</Descriptions> </Descriptions>
<JobDetailCardsPartsComponent <div style={{ height: "8px" }} />
loading={loading} <JobDetailCardsPartsComponent
data={data ? data.jobs_by_pk : null} loading={loading}
/> data={data ? data.jobs_by_pk : null}
<JobDetailCardsNotesComponent />
loading={loading} <div style={{ height: "8px" }} />
data={data ? data.jobs_by_pk : null} <JobDetailCardsNotesComponent
/> loading={loading}
{!bodyshop.uselocalmediaserver && ( data={data ? data.jobs_by_pk : null}
/>
{!bodyshop.uselocalmediaserver && (
<>
<div style={{ height: "8px" }} />
<JobDetailCardsDocumentsComponent <JobDetailCardsDocumentsComponent
loading={loading} loading={loading}
data={data ? data.jobs_by_pk : null} data={data ? data.jobs_by_pk : null}
/> />
)} </>
</Space> )}
</div> </div>
)} )}
</Drawer> </Drawer>