mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-07 16:19:01 +00:00
refactor(work-orders): extract inline type/severity cell under function line cap
This commit is contained in:
parent
26add2e57c
commit
a50c17b260
1 changed files with 19 additions and 7 deletions
|
|
@ -28,6 +28,24 @@ type WoTableInlineRowCellsProps = {
|
|||
onPatch: (patch: Partial<WorkOrderTableDraft>) => void;
|
||||
};
|
||||
|
||||
function InlineTypeSeverityCell({
|
||||
draft,
|
||||
onPatch,
|
||||
}: {
|
||||
draft: WorkOrderTableDraft;
|
||||
onPatch: (patch: Partial<WorkOrderTableDraft>) => void;
|
||||
}) {
|
||||
return (
|
||||
<td className="group/cell" style={{ padding: "0 14px" }}>
|
||||
<TypeCell
|
||||
value={draft.type}
|
||||
severity={draft.severity}
|
||||
onSave={(t, sev) => onPatch({ type: t, severity: sev })}
|
||||
/>
|
||||
</td>
|
||||
);
|
||||
}
|
||||
|
||||
export function WoTableInlineRowCells({
|
||||
draft,
|
||||
weekDefault,
|
||||
|
|
@ -77,13 +95,7 @@ export function WoTableInlineRowCells({
|
|||
/>
|
||||
</td>
|
||||
|
||||
<td className="group/cell" style={{ padding: "0 14px" }}>
|
||||
<TypeCell
|
||||
value={draft.type}
|
||||
severity={draft.severity}
|
||||
onSave={(t, sev) => onPatch({ type: t, severity: sev })}
|
||||
/>
|
||||
</td>
|
||||
<InlineTypeSeverityCell draft={draft} onPatch={onPatch} />
|
||||
|
||||
<td className="group/cell" style={{ padding: "0 14px" }}>
|
||||
<AssignedToCell
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue