Commit c7132ce
committed
Resolves #3490 ([FR-826](https://lablup.atlassian.net/browse/FR-826))
# Refactor form handling in FolderCreateModal and fix UserSettingModal role check
This PR makes two improvements:
1. In `FolderCreateModal.tsx`, simplifies the mutation function by using the spread operator to pass form values instead of explicitly listing each field.
2. In `UserSettingModal.tsx`, fixes a potential bug by removing an unnecessary check for `user?.role` when determining whether to display the role selection dropdown. The condition now only depends on `currentUserRole` being defined and having appropriate permissions.
**Checklist:**
- [ ] Documentation
- [ ] Minium required manager version
- [ ] Specific setting for review (eg., KB link, endpoint or how to setup)
- [ ] Minimum requirements to check during review
- [ ] Test case(s) to demonstrate the difference of before/after
[FR-826]: https://lablup.atlassian.net/browse/FR-826?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent f9fe4e4 commit c7132ce
2 files changed
Lines changed: 2 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
| 118 | + | |
123 | 119 | | |
124 | 120 | | |
125 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
430 | | - | |
431 | | - | |
| 430 | + | |
432 | 431 | | |
433 | 432 | | |
434 | 433 | | |
| |||
0 commit comments