Skip to content
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

feat(mrf): response link with key #6967

Merged
merged 5 commits into from
Dec 20, 2023

Conversation

KenLSM
Copy link
Contributor

@KenLSM KenLSM commented Dec 19, 2023

Problem

  1. Admins gave feedback on their disdain on manually entering the form "submission level key".
  2. Admins would like to send a link to their users without manually passing them two separate sets of information.
  3. "Submission level key" should be embedded on the URL and should not require the user to manually enter it

Closes FRM-1604

Solution

  1. On Admin Response Results Page, the response link is combined with submission level key
  2. On public form, the key is prefilled
  3. On public form, if the key is valid, the form will be automatically unlocked

Submission level key is stored on search params as key

Before & After Screenshots

Component Before After
Admin Response Results Page Screenshot 2023-12-19 at 5 45 34 PM Screenshot 2023-12-19 at 5 42 48 PM

Auto-prefill + Unlock

  1. Unlock with valid key passed in
  2. Fall back to "prefill" when key is invalid
Screen.Recording.2023-12-19.at.5.42.54.PM.mov

@KenLSM KenLSM changed the title Feat/mrf response link with key feat(mrf): response link with key Dec 19, 2023
@KenLSM KenLSM requested a review from wanlingt December 19, 2023 09:50
Copy link
Contributor

@wanlingt wanlingt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! left one suggestion for getMultirespondentSubmissionEditPath

@KenLSM KenLSM merged commit a29bb07 into feat/mrf-links Dec 20, 2023
11 checks passed
@KenLSM KenLSM deleted the feat/mrf-response-link-with-key branch December 20, 2023 06:26
KenLSM added a commit that referenced this pull request Dec 21, 2023
* feat: multi-respondent form prototype with edit response links

* chore: fix build errors

* fix: guard against editing authtype

* feat: MRF encryption scheme

* test: fix test files

* chore: fix build error

* chore: update copy for form creation modal

* chore: update variable name in frontend public form provider

* feat: attachment handling in multi-respondent forms for respondent 1+

* chore: fix build errors

* chore: move some stuff around

* test: fix backend tests

* test: update test suite

* chore: copy changes

* chore: more copy changes, add test mock clearing so that tests pass

* fix: nits

* chore: add linear ticket labels to all TODOs

* feat: gate mrf form creation on frontend and backend

* fix: require publicKey on form creation for multi-respondent forms

* chore(frm-1599): update multiparty create form modal icon

* fix: typing issues

* fix: remove unused import

* fix: update joi validator to array

* fix: column cell not respecting disable required validation

* fix: mislabelled test name

* fix: model ux issue when admin without mrf flag creates new form

* feat(mrf): response link with key (#6967)

* feat: append key in response link

* refactor: extract iskeypairvalid to fe utils

* feat: add prefilling of key

* feat: add auto decryption if key is correct

* refactor: extract key into getmultirespondentsubmissioneditpath utils

---------

Co-authored-by: Ken <ken@open.gov.sg>
wanlingt added a commit that referenced this pull request Jan 3, 2024
* feat: multi-respondent form prototype with edit response links

* chore: fix build errors

* fix: guard against editing authtype

* feat: MRF encryption scheme

* test: fix test files

* chore: fix build error

* chore: update copy for form creation modal

* chore: update variable name in frontend public form provider

* feat: attachment handling in multi-respondent forms for respondent 1+

* chore: fix build errors

* chore: move some stuff around

* test: fix backend tests

* test: update test suite

* chore: copy changes

* chore: more copy changes, add test mock clearing so that tests pass

* fix: nits

* chore: add linear ticket labels to all TODOs

* feat: gate mrf form creation on frontend and backend

* fix: require publicKey on form creation for multi-respondent forms

* feat: add workflowStep to submission schema

* chore(frm-1599): update multiparty create form modal icon

* fix: typing issues

* fix: remove unused import

* fix: update joi validator to array

* fix: column cell not respecting disable required validation

* fix: mislabelled test name

* feat: add workflow emails to form

* feat: add workflow run to multirespondent form processing

* feat: add error state for invalid emails in frontend workflow settings

* feat: use featureflag to conditionally render workflow icon

* fix: add placeholder text to input

* fix: remove multiparty icon

* fix: add multiparty icon

* fix: run next workflow step instead of current workflow

* fix: model ux issue when admin without mrf flag creates new form

* feat(mrf): response link with key (#6967)

* feat: append key in response link

* refactor: extract iskeypairvalid to fe utils

* feat: add prefilling of key

* feat: add auto decryption if key is correct

* refactor: extract key into getmultirespondentsubmissioneditpath utils

* test: add workflowStep to form schema

* ref: check for responsemode once

* fix: use strokeWidth in svg

* fix: reset error state

* ref: remove unused component and simplify if condition

* fix: remove console.log

* fix: use react-hook-form for workflow details

* fix: remove duplicate body version

* fix: reorder workflow in settings page

* fix: copy changes

* fix: display previous workflow emails in settings

* feat: always fetch response when MRF is enabled

* fix: remove comment

---------

Co-authored-by: Justyn Oh <justynoh@gmail.com>
Co-authored-by: Ken <ken@open.gov.sg>
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.

None yet

2 participants