diff --git a/src/app/(protected)/workorders/_components/dispatch/dispatch-detail/dispatch-checklist-section.tsx b/src/app/(protected)/workorders/_components/dispatch/dispatch-detail/dispatch-checklist-section.tsx index efb88761..1eb41674 100644 --- a/src/app/(protected)/workorders/_components/dispatch/dispatch-detail/dispatch-checklist-section.tsx +++ b/src/app/(protected)/workorders/_components/dispatch/dispatch-detail/dispatch-checklist-section.tsx @@ -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({ /> {item.itemText} - {item.isCompleted && ( + {item.isCompleted && (item.completedBy || item.completedAt) && ( - {item.completedBy || userName} + {item.completedBy?.trim() || "Unknown"} {item.completedAt ? ` ยท ${formatDateTime(item.completedAt)}` : ""} )} diff --git a/src/app/(protected)/workorders/_components/dispatch/dispatch-detail/index.tsx b/src/app/(protected)/workorders/_components/dispatch/dispatch-detail/index.tsx index 8a9a4fb4..487cfcd5 100644 --- a/src/app/(protected)/workorders/_components/dispatch/dispatch-detail/index.tsx +++ b/src/app/(protected)/workorders/_components/dispatch/dispatch-detail/index.tsx @@ -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) =>