refactor(work-orders): extract inline type/severity cell under function line cap

This commit is contained in:
arthur.bassi 2026-08-11 15:42:29 -03:00
parent 26add2e57c
commit a50c17b260

View file

@ -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