-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add empty UT for approvals * feat: add approval outcome email template * feat: create common FormStepWithHeader component for editBlock items * feat: approval toggle and field in edit workflow step block * feat: enable saving of approval_step * feat: add validation of approval field selection * feat: add use for approvals badge for yes/no field * feat: implement sending of approval emails in BE * feat: validate that approval fields are yes/no on update * fix: out of bounds index error when re-submitting mrf via response link * fix: watch values needed for validation * fix: add default values for sendMrfOutcomeEmails isApproval and isRejected * feat: validate that approval field must be in same step's edit fields * feat: log error when checkIsStepRejected fails * fix: remove duplicates in email sending using uniq * feat: create REST api for workflow steps * feat: implement workflow step validation * feat: display field deleted state * chore: remove stray comment * feat: clear value if deleted * feat: add joi validation for mongodb objectId of hex and 24 length string * fix: remove workflow from updateSettings * feat: implement mrf builder v8 * feat: handle error message when admin does not select respondent type radio * chore: improve rationale comment for getValueIfNotDeleted * feat: make error badge more explicit by making it red * feat: only display use for approvals badge for mrf * feat: add storybook for FieldListDrawer to visual test use for approvals * feat: add chromatic stories for mrf edit step block * feat: add chromatic stories for inactive workflow builder state * feat: add BE validation that first step of MRF workflow cannot be approval * feat: add BE unit tests for approvals * chore: add beta flags for approvals * fix: chromatic visual nits * feat: add header to mrf email notif * fix: make workflow content info box 44px * chore: Remove capitalisations for Outcome and Notifications to comply with design * chore: remove unused props * chore: remove stray _ in log action * chore: remove unused imports * fix: pr comments * fix: use edit name across form * feat: refactor mrf controller to move business logic to service * feat: add UT for controller and service for mrf * fix: remove throw error in map * fix: allow empty lcov --------- Co-authored-by: Ken <[email protected]>
- Loading branch information
1 parent
369495a
commit c046c43
Showing
46 changed files
with
3,870 additions
and
1,065 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
...ate/builder-and-design/BuilderAndDesignDrawer/FieldListDrawer/FieldListDrawer.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { DragDropContext } from 'react-beautiful-dnd' | ||
import { StoryFn } from '@storybook/react' | ||
|
||
import { FormResponseMode } from '~shared/types' | ||
|
||
import { getAdminFormView } from '~/mocks/msw/handlers/admin-form' | ||
|
||
import { StoryRouter } from '~utils/storybook' | ||
|
||
import { CreatePageSidebarProvider } from '~features/admin-form/create/common' | ||
|
||
import { FieldListDrawer } from '..' | ||
|
||
export default { | ||
component: FieldListDrawer, | ||
title: | ||
'Features/AdminForm/create/builder-and-design/BuilderAndDesignDrawer/FieldListDrawer', | ||
parameters: { | ||
msw: [getAdminFormView({ mode: FormResponseMode.Encrypt })], | ||
}, | ||
decorators: [ | ||
StoryRouter({ initialEntries: ['/12345'], path: '/:formId' }), | ||
(Story: StoryFn) => ( | ||
// eslint-disable-next-line @typescript-eslint/no-empty-function | ||
<DragDropContext onDragEnd={() => {}}> | ||
<CreatePageSidebarProvider> | ||
<Story /> | ||
</CreatePageSidebarProvider> | ||
</DragDropContext> | ||
), | ||
], | ||
} | ||
|
||
const encryptModeHandlers = [ | ||
getAdminFormView({ mode: FormResponseMode.Encrypt }), | ||
] | ||
|
||
const mrfModeHandlers = [ | ||
getAdminFormView({ mode: FormResponseMode.Multirespondent }), | ||
] | ||
|
||
export const EncryptMode = { | ||
parameters: { | ||
msw: encryptModeHandlers, | ||
}, | ||
} | ||
|
||
export const MrfMode = { | ||
parameters: { | ||
msw: mrfModeHandlers, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.