fix: use task work order data in service report context
Ensure /putni-nalozi/racuni reads service-report context from the selected task's own work order instead of reusing the parent page work-order data for every task. - task-service-context now returns task_work_order metadata per task - work hours modal reads location and travel data from task_work_order - tasks without a linked work order fall back to None Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -554,8 +554,8 @@ export default function WorkOrderInvoicesPdfPage() {
|
||||
<TaskWorkHoursTableModal
|
||||
open={!!editingTask}
|
||||
task={editingTask}
|
||||
workOrder={workOrder}
|
||||
defaultLocation={workOrder?.location || ''}
|
||||
workOrder={editingTask?.task_work_order ?? null}
|
||||
defaultLocation={editingTask?.task_work_order?.location ?? ''}
|
||||
saving={savingWorkHours}
|
||||
onClose={() => setEditingTask(null)}
|
||||
onSave={handleSaveWorkHoursTable}
|
||||
|
||||
Reference in New Issue
Block a user