mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-07 10:28:59 +00:00
fix(work-orders): never attribute checklist completion to viewer
This commit is contained in:
parent
d2ff345965
commit
40c6e3cb3d
2 changed files with 2 additions and 5 deletions
|
|
@ -6,7 +6,6 @@ type DispatchChecklistSectionProps = {
|
||||||
items: DispatchChecklistItem[];
|
items: DispatchChecklistItem[];
|
||||||
isLocked: boolean;
|
isLocked: boolean;
|
||||||
isUpdating: boolean;
|
isUpdating: boolean;
|
||||||
userName: string;
|
|
||||||
newItem: string;
|
newItem: string;
|
||||||
onNewItemChange: (value: string) => void;
|
onNewItemChange: (value: string) => void;
|
||||||
onToggleItem: (itemId: string | number, isCompleted: boolean) => void;
|
onToggleItem: (itemId: string | number, isCompleted: boolean) => void;
|
||||||
|
|
@ -17,7 +16,6 @@ export function DispatchChecklistSection({
|
||||||
items,
|
items,
|
||||||
isLocked,
|
isLocked,
|
||||||
isUpdating,
|
isUpdating,
|
||||||
userName,
|
|
||||||
newItem,
|
newItem,
|
||||||
onNewItemChange,
|
onNewItemChange,
|
||||||
onToggleItem,
|
onToggleItem,
|
||||||
|
|
@ -44,9 +42,9 @@ export function DispatchChecklistSection({
|
||||||
/>
|
/>
|
||||||
<Box className="flex-1">
|
<Box className="flex-1">
|
||||||
<Typography variant="body2">{item.itemText}</Typography>
|
<Typography variant="body2">{item.itemText}</Typography>
|
||||||
{item.isCompleted && (
|
{item.isCompleted && (item.completedBy || item.completedAt) && (
|
||||||
<Typography variant="caption" color="text.secondary">
|
<Typography variant="caption" color="text.secondary">
|
||||||
{item.completedBy || userName}
|
{item.completedBy?.trim() || "Unknown"}
|
||||||
{item.completedAt ? ` · ${formatDateTime(item.completedAt)}` : ""}
|
{item.completedAt ? ` · ${formatDateTime(item.completedAt)}` : ""}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,6 @@ export function DispatchDetailModal({
|
||||||
items={dispatch.checklistItems}
|
items={dispatch.checklistItems}
|
||||||
isLocked={controller.isLocked}
|
isLocked={controller.isLocked}
|
||||||
isUpdating={controller.updateChecklistMutation.isPending}
|
isUpdating={controller.updateChecklistMutation.isPending}
|
||||||
userName={controller.userName}
|
|
||||||
newItem={controller.newChecklistItem}
|
newItem={controller.newChecklistItem}
|
||||||
onNewItemChange={controller.setNewChecklistItem}
|
onNewItemChange={controller.setNewChecklistItem}
|
||||||
onToggleItem={(itemId, isCompleted) =>
|
onToggleItem={(itemId, isCompleted) =>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue