-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adjust copy and delete #174
Conversation
…lete modal, adjusted copy modal, added copy function to process list right hand icons
…creens starting breakpoint sm
… for both delete and copy
Popconfirm should be replaced by confirmation-button, for which you have to wait until this pr is merged. |
type="text" | ||
style={{ marginTop: '20px', marginLeft: '15px' }} | ||
icon={<MenuOutlined style={{ fontSize: '170%' }} />} | ||
/> | ||
onClick={() => !siderOpened} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does the onClick Function do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the onClick function as it's not used anymore
}); | ||
}); | ||
setSelection([]); | ||
}, [deleteProcess, selection]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing dependency: setSelection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing dependency was added
|
||
<AuthCan action="delete" resource={toCaslResource('Process', process)}> | ||
<Tooltip placement="top" title={'Delete'}> | ||
<Popconfirm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use ConfirmationButton instead of PopConfirm
@@ -103,6 +112,20 @@ const ProcessList: FC<ProcessListProps> = ({ | |||
onSettled: refreshData, | |||
}); | |||
|
|||
const deleteSelectedProcesses = useCallback(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could move this function to processes and use it together with ConfirmationButton, then you could delete the process-delete components
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used deleteSelectedProcesses function from processes.tsx and declared its type as "Dispatch<SetStateAction<Key[]>>" in process-list.tsx. However, this declaration shows the error "Expected 1 arguments, but got 0." Would there be a better type to declare it as?
Once @FelipeTrost is happy with his review, I can take care of the merge conflicts with main, since I changed a lot with the switch to Server Components. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I merged it with my server components/actions changes and simplified a lot of the code structure. All mutations now happen in processes.tsx
Summary
Added copy function to process-list's action bar and replaced process-delete module in processes.tsx and process-list.tsx with pop-confirmations --> resulting in error for both delete and copy (todo!)
Adjusted mobile view for screensize <= sm