Skip to content

Commit

Permalink
fix: coderabbitai
Browse files Browse the repository at this point in the history
  • Loading branch information
Innocent-Akim committed Dec 11, 2024
1 parent d532588 commit b0782fb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,11 @@ export function AddTaskModal({ closeModal, isOpen }: IAddTaskModalProps) {
startedAt,
stoppedAt,
}).then(() => {
console.log('succes')
closeModal()
}).catch((error) => {
console.error(error)
if (!error) {
closeModal();
}
})
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,9 @@ export function EditTaskModal({ isOpen, closeModal, dataTimesheet }: IEditTaskMo
variant: 'destructive',
className: 'bg-red-50 text-red-600 border-red-500 z-[10000px]'
});
if (error) {
return;
if (!error) {
closeModal();
}
closeModal();
});
}, [dateRange, timeRange, timesheetData, dataTimesheet, updateTimesheet]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export const TimeSheetFilterPopover = React.memo(function TimeSheetFilterPopover
<MultiSelect
localStorageKey="timesheet-select-filter-status"
removeItems={shouldRemoveItems}
items={statusTable?.flatMap((status) => status)}
items={statusTable?.flat()}
itemToString={(status) => (status ? status.label : '')}
itemId={(item) => item.label}
onValueChange={(selectedItems) => setStatusState(selectedItems as any)}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/hooks/features/useTimesheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export function useTimesheet({
const response = await queryUpdateTimesheet(timesheet);
setTimesheet(prevTimesheet =>
prevTimesheet.map(item =>
item.timesheet.id === response.data.id
item.timesheet?.id === response.data.id
? response.data
: item
)
Expand Down

0 comments on commit b0782fb

Please sign in to comment.