mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-09-30 06:53:12 +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[];
|
||||
isLocked: boolean;
|
||||
isUpdating: boolean;
|
||||
userName: string;
|
||||
newItem: string;
|
||||
onNewItemChange: (value: string) => void;
|
||||
onToggleItem: (itemId: string | number, isCompleted: boolean) => void;
|
||||
|
|
@ -17,7 +16,6 @@ export function DispatchChecklistSection({
|
|||
items,
|
||||
isLocked,
|
||||
isUpdating,
|
||||
userName,
|
||||
newItem,
|
||||
onNewItemChange,
|
||||
onToggleItem,
|
||||
|
|
@ -44,9 +42,9 @@ export function DispatchChecklistSection({
|
|||
/>
|
||||
<Box className="flex-1">
|
||||
<Typography variant="body2">{item.itemText}</Typography>
|
||||
{item.isCompleted && (
|
||||
{item.isCompleted && (item.completedBy || item.completedAt) && (
|
||||
<Typography variant="caption" color="text.secondary">
|
||||
{item.completedBy || userName}
|
||||
{item.completedBy?.trim() || "Unknown"}
|
||||
{item.completedAt ? ` · ${formatDateTime(item.completedAt)}` : ""}
|
||||
</Typography>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -72,7 +72,6 @@ export function DispatchDetailModal({
|
|||
items={dispatch.checklistItems}
|
||||
isLocked={controller.isLocked}
|
||||
isUpdating={controller.updateChecklistMutation.isPending}
|
||||
userName={controller.userName}
|
||||
newItem={controller.newChecklistItem}
|
||||
onNewItemChange={controller.setNewChecklistItem}
|
||||
onToggleItem={(itemId, isCompleted) =>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue