- Center RO / Justify Alerts
- Prevent Height redraw in Vertical mode - add default setting for model_info - cleanup renderDroppable Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -68,39 +68,62 @@ export default function ProductionBoardCard({ technician, card, bodyshop, cardSe
|
||||
const bgColor = useMemo(() => cardColor(bodyshop.ssbuckets, totalHrs), [bodyshop.ssbuckets, totalHrs]);
|
||||
const contrastYIQ = useMemo(() => getContrastYIQ(bgColor), [bgColor]);
|
||||
|
||||
const isBodyEmpty = !(
|
||||
cardSettings?.ownr_nm ||
|
||||
cardSettings?.model_info ||
|
||||
(cardSettings?.ins_co_nm && metadata.ins_co_nm) ||
|
||||
(cardSettings?.clm_no && metadata.clm_no) ||
|
||||
cardSettings?.employeeassignments ||
|
||||
(cardSettings?.actual_in && metadata.actual_in) ||
|
||||
(cardSettings?.scheduled_completion && metadata.scheduled_completion) ||
|
||||
(cardSettings?.ats && metadata.alt_transport) ||
|
||||
cardSettings?.sublets ||
|
||||
cardSettings?.production_note ||
|
||||
cardSettings?.partsstatus
|
||||
);
|
||||
|
||||
const headerContent = (
|
||||
<Space>
|
||||
<ProductionAlert
|
||||
record={{
|
||||
id: card.id,
|
||||
production_vars: card?.metadata.production_vars,
|
||||
refetch: card?.refetch
|
||||
}}
|
||||
key="alert"
|
||||
/>
|
||||
{metadata?.suspended && <PauseCircleOutlined style={{ color: "orangered" }} />}
|
||||
{metadata?.iouparent && (
|
||||
<EllipsesToolTip title={t("jobs.labels.iou")}>
|
||||
<BranchesOutlined style={{ color: "orangered" }} />
|
||||
</EllipsesToolTip>
|
||||
)}
|
||||
<span style={{ fontWeight: "bolder" }}>
|
||||
<div className="header-content-container">
|
||||
<div className="inner-container">
|
||||
<ProductionAlert
|
||||
record={{
|
||||
id: card.id,
|
||||
production_vars: card?.metadata.production_vars,
|
||||
refetch: card?.refetch
|
||||
}}
|
||||
key="alert"
|
||||
/>
|
||||
{metadata?.suspended && <PauseCircleOutlined className="circle-outline" key="suspended" />}
|
||||
{metadata?.iouparent && (
|
||||
<EllipsesToolTip title={t("jobs.labels.iou")} key="iouparent" className="iouparent">
|
||||
<BranchesOutlined className="branches-outlined" />
|
||||
</EllipsesToolTip>
|
||||
)}
|
||||
</div>
|
||||
<span className="tech-container">
|
||||
<Link to={technician ? `/tech/joblookup?selected=${card.id}` : `/manage/jobs/${card.id}`}>
|
||||
{metadata?.ro_number || t("general.labels.na")}
|
||||
</Link>
|
||||
</span>
|
||||
</Space>
|
||||
{isBodyEmpty && (
|
||||
<div className="body-empty-container">
|
||||
<Link to={{ search: `?selected=${card.id}` }}>
|
||||
<EyeFilled />
|
||||
</Link>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
||||
const bodyContent = (
|
||||
<Row>
|
||||
{cardSettings?.ownr_nm && (
|
||||
<Col span={24}>
|
||||
<EllipsesToolTip title={`${metadata.ownr_ln || ""} ${metadata.ownr_co_nm || ""}`}>
|
||||
<EllipsesToolTip title={<OwnerNameDisplay ownerObject={metadata} />}>
|
||||
{cardSettings.compact ? (
|
||||
`${metadata.ownr_ln || ""} ${metadata.ownr_co_nm || ""}`
|
||||
) : (
|
||||
<OwnerNameDisplay ownerObject={card} />
|
||||
<OwnerNameDisplay ownerObject={metadata} />
|
||||
)}
|
||||
</EllipsesToolTip>
|
||||
</Col>
|
||||
@@ -192,7 +215,7 @@ export default function ProductionBoardCard({ technician, card, bodyshop, cardSe
|
||||
<Col span={24}>
|
||||
<ProductionListColumnProductionNote
|
||||
record={{
|
||||
production_vars: card?.metadata.production_vars,
|
||||
production_vars: metadata?.production_vars,
|
||||
id: card?.id,
|
||||
refetch: card?.refetch
|
||||
}}
|
||||
@@ -207,19 +230,6 @@ export default function ProductionBoardCard({ technician, card, bodyshop, cardSe
|
||||
</Row>
|
||||
);
|
||||
|
||||
const isBodyEmpty = !(
|
||||
cardSettings?.ownr_nm ||
|
||||
cardSettings?.model_info ||
|
||||
(cardSettings?.ins_co_nm && metadata.ins_co_nm) ||
|
||||
(cardSettings?.clm_no && metadata.clm_no) ||
|
||||
cardSettings?.employeeassignments ||
|
||||
(cardSettings?.actual_in && metadata.actual_in) ||
|
||||
(cardSettings?.scheduled_completion && metadata.scheduled_completion) ||
|
||||
(cardSettings?.ats && metadata.alt_transport) ||
|
||||
cardSettings?.sublets ||
|
||||
cardSettings?.production_note ||
|
||||
cardSettings?.partsstatus
|
||||
);
|
||||
return (
|
||||
<Card
|
||||
className="react-trello-card"
|
||||
@@ -228,7 +238,7 @@ export default function ProductionBoardCard({ technician, card, bodyshop, cardSe
|
||||
backgroundColor: cardSettings?.cardcolor && `rgba(${bgColor.r},${bgColor.g},${bgColor.b},${bgColor.a})`,
|
||||
color: cardSettings?.cardcolor && contrastYIQ
|
||||
}}
|
||||
title={isBodyEmpty ? null : headerContent}
|
||||
title={!isBodyEmpty ? headerContent : null}
|
||||
extra={
|
||||
!isBodyEmpty && (
|
||||
<Link to={{ search: `?selected=${card.id}` }}>
|
||||
|
||||
Reference in New Issue
Block a user