Skip to content

Conversation

@marcbon
Copy link
Collaborator

@marcbon marcbon commented Nov 14, 2023

Add validation for custom status drawer + various improvements

marcbon and others added 30 commits November 3, 2023 16:10
…-system and app/theme respectively

✨ feat(Drawer/index.tsx): add CustomStatusForm component to Drawer.Body
🔥 chore(Drawer/index.tsx): remove unused import Button from unguess-design-system
🔧 fix(Drawer/index.tsx): add isBasic prop to Button component in Drawer.FooterItem
…nction to retrieve custom status phase name

🔀 diff --git a/src/pages/Bug/Drawer/getCustomStatusPhaseName.ts b/src/pages/Bug/Drawer/getCustomStatusPhaseName.ts
🆕 new file mode 100644
🔢 index 00000000..188cd63b
📄 --- /dev/null
📄 +++ b/src/pages/Bug/Drawer/getCustomStatusPhaseName.ts
📝 Add getCustomStatusPhaseName function to retrieve custom status phase name. The function takes in a phase object and a translation function (t) and returns the corresponding custom status phase name based on the phase id. If the phase id is 1, it returns the translation of '__BUGS_PAGE_CUSTOM_STATUS_DRAWER_PHASE_1_NAME', and if the phase id is 2, it returns the translation of '__BUGS
This commit adds the `CustomStatusForm` component to the project. The
component is responsible for rendering a form to manage custom statuses
for a campaign. It includes functionality to fetch custom statuses from
the API, split them by phase, and display them in the form. The form
allows users to create, edit, and delete custom statuses.
…options

🔥 chore(DotsMenu.tsx): remove commented out code and newline at end of file
✨ feat(CustomStatusForm.tsx): add functionality to update custom status name
✨ feat(BugStateDropdown.tsx): refactor custom status options rendering and selection logic
The Circle component is added to the Bug Drawer to display a colored circle. It is styled using styled-components and takes a color prop to determine the color of the circle. The component is used to represent a status indicator in the Bug Drawer.
…ed component

✨ feat(CustomStatusForm.tsx): add useEffect hook to update custom status with new custom statuses with is_default === 0
✨ feat(DotsMenu.tsx): add dispatch and useSelector hooks for Redux state management
✨ feat(CustomStatusDrawer): close drawer on reset button click
…g customStatus variable in useAppSelector

✨ feat(Drawer/index.tsx): add functionality to delete and patch custom statuses
🔧 fix(Drawer/index.tsx): fix incorrect variable name in deleteCustomStatus array
🔧 fix(Drawer/index.tsx): fix incorrect type in deleteCustomStatus array
🔧 fix(Drawer/index.tsx): fix incorrect type in patchCustomStatus array
🔧 fix(Drawer/index.tsx): fix incorrect type in deleteCustomStatusUsed array
🔧 fix(Drawer/index.tsx): fix incorrect type in deleteCustomStatusUnused array
🔧 fix(Drawer/index.tsx): fix incorrect type in deleteCustomStatusUsed filter
🔧 fix(Drawer/index.tsx): fix incorrect type in deleteCustomStatusUnused filter
🔧 fix(Drawer/index.tsx): fix incorrect type in deleteCustomStatusUsed find
🔧 fix(Drawer/index.tsx): fix incorrect type in deleteCustomStatusUnused find
🔧 fix
fetures: added modals for custom status
…tialSimpleState interface

🔧 fix(bugsPageSlice.ts): add setCustomStatusDrawerTouched reducer to bugPageSlice
…nd modals

✨ feat(Drawer/index.tsx): add confirmation modal for closing drawer when changes are made
✨ feat(Drawer/index.tsx): add migration modal for custom status migration
… touched

✨ feat(CustomStatusForm.tsx): add setCustomStatusDrawerTouched action to dispatch when form is submitted
…ctionality

✨ feat(ClosingDrawerConfirmationModal/index.tsx): add functionality to quit button
✨ feat(BugStateDropdown.tsx): add BugStateDropdownMenu and BugStateDropdownItem components
marcbon and others added 27 commits November 13, 2023 16:51
…essary code

✨ feat(StatusValidationMessage.tsx): add comments to clarify code functionality
…BUGS_PAGE_CUSTOM_STATUS_DRAWER_BODY_DESCRIPTION
…y/unguess-design-system'

🐛 fix(mapBugsToTableData.tsx): add textTransform and fontWeight styles to custom status tag
🐛 fix(mapBugsToTableData.tsx): fix indentation in borderColor assignment
…sage

✨ feat(translation.json): add validation message for maximum length of custom status name
🐛 fix(translation.json): update error toast message for invalid input fields
🌐 chore(translation.json): update Italian translation for custom status messages
…Styles from @zendeskgarden/react-theming

🔧 fix(BugStateDropdown.tsx): add styling for disabled ManageItem component
…ace.sm for width, height, min-width, and min-height
…mStatusUsed

✨ feat(MigrationModal/index.tsx): add support for calculating bugs count for deleteCustomStatusUsed
…tion modal

The translation for the text "Before confirming and deleting, choose how to handle {{custom_statuses_num}} bugs in this campaign associated with these status:" was updated in both the English and Italian translation files. The word "status" was changed to "statuses" to reflect the plural form correctly.
🔧 chore(apiTags.ts): update invalidatesTags and providesTags for API endpoints
@cannarocks cannarocks merged commit 21bdce7 into develop Nov 14, 2023
@cannarocks cannarocks deleted the check-validation branch November 14, 2023 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants