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

Update admin approval process #218

Draft
wants to merge 17 commits into
base: dev
Choose a base branch
from
Draft

Update admin approval process #218

wants to merge 17 commits into from

Conversation

GiuliaTeggi
Copy link
Collaborator

@GiuliaTeggi GiuliaTeggi commented May 8, 2024

Ticket:

Description

Spike into adding multiple stages of approval in the life events admin side for the digital wallet onboarding applications.

⚠️ TLDR: DO NOT MERGE this as is.
The data structure of the GetDigitalWallet workflow on this pr is quite different from all of the other workflows (given it has an approvalStages array prop). The updates I made to the admin side (creating new components not to mess with the other workflows ones) only expect and work with this new data structure, so be careful not to complete other workflows (e.g. renew driving licence) whilst you have the digitalWallet FF enabled on this pr, or the admin side will be broken. You can manage other workflows disabling the digitalWallet FF. In that case the digital wallet flow won't work, but you can still manage the other with the existing components.

⚠️ this was done as a quick spike in a couple of days so refactoring is definitely needed 😄

Type

  • Dependency upgrade
  • Bug fix
  • New feature
  • Dev change

Checklist:

  • I have added tests that prove my fix is effective or that my feature works

Screenshots:

Screenshot 2024-05-10 at 14 56 11 Screenshot 2024-05-10 at 14 57 12

Base automatically changed from setupDigitalWalletOnboarding to dev May 9, 2024 08:16
@@ -0,0 +1,171 @@
import Link from "next/link";
Copy link
Collaborator Author

@GiuliaTeggi GiuliaTeggi May 9, 2024

Choose a reason for hiding this comment

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

This is an updated copy of the RejectReasonForm component. It is used only for the digital wallet onboarding flow right now, given that's the only flow with the new data structure including approvalStages

@@ -0,0 +1,213 @@
import { getTranslations } from "next-intl/server";
Copy link
Collaborator Author

@GiuliaTeggi GiuliaTeggi May 9, 2024

Choose a reason for hiding this comment

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

This is an updated copy of the EventsTable component. It handles the digital walltet onboarding flow only atm given it's the only one with approvalStages

return (
<tr key={row.userId} className="govie-table__row">
<td className="govie-table__cell govie-table__cell--vertical-centralized govie-body-s">
{row.userId.slice(0, 6)}
Copy link
Collaborator Author

@GiuliaTeggi GiuliaTeggi May 9, 2024

Choose a reason for hiding this comment

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

This was only to quickly demo the prototype, but an actual ID needs to be setup for each application. Right now the user_flow_data table doesn't have any id column.

"use server";

const url = new URL(
`${headers().get("x-pathname")}/reject-new`,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is just to redirect to the NewRejectReasonForm instead of the exisrting RejectReasonForm

/>
) : (
<EventTable params={props.params} searchParams={props.searchParams} />
)}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is where I check whether to show the new submissions table (when the digitalWallet FF is enabled) or whether to show the old submissions table which handles all other workflows submissions.

@@ -1,53 +1,219 @@
import { GetObjectCommand } from "@aws-sdk/client-s3";
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This component right now handles both the readonly 'view' case - where admins can just see the current status of the application - and the 'review' case - where admins can click on approve or reject. When refactored it could potentially be split into separate components, one with and one without the review form.

digitalWalletAccess: {
name: "Digital Wallet Pilot Access",
description: "Grant access to the digital wallet pilot",
allowedReviewerRoles: [],
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These fields (name, description, allowedReviewerRoles) are not used, but wanted to give an idea of the fact that each stage can have multiple properties.

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.

1 participant