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

1653/user invite flow frontend #1857

Merged
merged 14 commits into from
Sep 30, 2021
Merged

1653/user invite flow frontend #1857

merged 14 commits into from
Sep 30, 2021

Conversation

dominikx96
Copy link
Collaborator

@dominikx96 dominikx96 commented Sep 21, 2021

Pull Request Template

Issue

Addresses #1653

  • This change addresses the issue in full
  • This change addresses only certain aspects of the issue
  • This change is a dependency for another issue
  • This change has a dependency from another issue

Description

Adds the "Add user" drawer with form.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Prototype/POC (not to merge)
  • This change is a refactor/address technical debt
  • This change requires a documentation update
  • This change requires a SQL Script

How Can This Be Tested/Reviewed?

Use the newly created form to add a new user, then check if a user exists in the user table.
You can also test behavior if an email already exists (it should show a proper alert with an error message).

  • Desktop View
  • Mobile View
  • Test A
  • Test B

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have reviewed the changes in a desktop view
  • I have reviewed the changes in a mobile view
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have assigned reviewers
  • I have updated the changelog to include a description of my changes
  • I have run yarn generate:client if I made backend changes

@dominikx96 dominikx96 added the wip This PR is not ready for review, do not review it's a “Work In Progress” label Sep 21, 2021
@netlify
Copy link

netlify bot commented Sep 21, 2021

✔️ Deploy Preview for dev-partners-bloom ready!

🔨 Explore the source changes: f9d3483

🔍 Inspect the deploy log: https://app.netlify.com/sites/dev-partners-bloom/deploys/6153390bf84b640007b521d6

😎 Browse the preview: https://deploy-preview-1857--dev-partners-bloom.netlify.app

@netlify
Copy link

netlify bot commented Sep 21, 2021

✔️ Deploy Preview for dev-bloom ready!

🔨 Explore the source changes: f9d3483

🔍 Inspect the deploy log: https://app.netlify.com/sites/dev-bloom/deploys/6153390b59e7770007975860

😎 Browse the preview: https://deploy-preview-1857--dev-bloom.netlify.app

@netlify
Copy link

netlify bot commented Sep 21, 2021

✔️ Deploy Preview for dev-storybook-bloom ready!

🔨 Explore the source changes: f9d3483

🔍 Inspect the deploy log: https://app.netlify.com/sites/dev-storybook-bloom/deploys/6153390b95d44b0007b31ef1

😎 Browse the preview: https://deploy-preview-1857--dev-storybook-bloom.netlify.app

@dominikx96 dominikx96 added ready for review and removed wip This PR is not ready for review, do not review it's a “Work In Progress” ready for review labels Sep 23, 2021
Copy link
Collaborator

@emilyjablonski emilyjablonski left a comment

Choose a reason for hiding this comment

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

Small typo in the e-mail To complete your account creation, please the link below: just need the word click.
The e-mail subject should be Welcome to the Partners Portal and the content is a little different, but it's in the issue :)

@emilyjablonski
Copy link
Collaborator

When I click "Confirm my Account" from the email I'm taken to the partners sign-in page but I don't have a password yet so I'm not sure what the flow there should be. Maybe the "create a password" flow is a separate issue?

/* Fetch user list */
const { data: userList } = useUserList({
page: currentPage,
limit: itemsPerPage,
})

/* Fetch listings */
Copy link
Collaborator

Choose a reason for hiding this comment

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

@seanmalbert Might eventually be worth a new query that only retrieves name, jurisdiction, and ID

lastName,
email,
roles,
leasingAgentInListings: leasingAgentInListings,
Copy link
Collaborator

Choose a reason for hiding this comment

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

NB but don't need the colons here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

They're automagically added by linter ;D

@emilyjablonski
Copy link
Collaborator

emilyjablonski commented Sep 27, 2021

I'm curious about my two comments above still - the content and subject of the email is not quite right and the fact that I am redirected to sign-in without having set up a password (which is maybe a later ticket?)

@kathyccheng
Copy link
Collaborator

@emilyjablonski Flow for leasing agents to update their password is in a separate issue, #1654

Email copy from issues re-pasted below for reference :)

Email Copy

From: no-reply@housingbayarea.org
Subject Line: Welcome to the Partners Portal

Hello Name,

Welcome to the the Partners Portal on [URL]. You will now be able to manage listings and applications that you are a part of from one centralized location.

To complete your account creation, please click the link below:

Confirm my account

Thank you,
Alameda County - Housing and Community Development (HCD) Department

@dominikx96
Copy link
Collaborator Author

@emilyjablonski I updated translations and resolved conflict in the FieldGroup component, ready for review :)

inviteMessage:
"Thank you for setting up your account on %{appUrl}. It will now be easier for you to start, save, and submit online applications for listings that appear on the site.",
toCompleteAccountCreation: "To complete your account creation, please the link below:",
"Welcome to the the Partners Portal on %{appUrl}. You will now be able to manage listings and applications that you are a part of from one centralized location.",
Copy link
Collaborator

Choose a reason for hiding this comment

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

One small typo here the the

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks, fixed! :)

@emilyjablonski
Copy link
Collaborator

emilyjablonski commented Sep 28, 2021

I get a 400 if I try to add a user who already exists which I think is probably okay, but it means if anyone has ever created an account on the public site (and maybe even parters?) then we can't add them as a user on the partners site with the same email.

Copy link
Collaborator

@emilyjablonski emilyjablonski left a comment

Choose a reason for hiding this comment

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

LGTM apart from the existing user piece and it sounds like that's a separate PR :)

@seanmalbert
Copy link
Collaborator

@pbn4 , see Emily's comment above, can you fix the issue causing the 400 bad request to be thrown when a user who already exists in the system gets added. A more useful response is probably all that's needed, something like A user with that email already exists.

@dominikx96 dominikx96 merged commit 69199cb into dev Sep 30, 2021
seanmalbert pushed a commit to CityOfDetroit/bloom that referenced this pull request Jun 23, 2022
* Update field props

* Update translation

* Fix alert style

* Update hook to support 'all' option

* Create user add form

* Make user model dob field optional

* Update changelog

* Drop NOT NULL constraint in user model DOB column

* Fix code style issues with Prettier

* Fix type issue

* Fix typos in emails

* Update translations

* Fix typo

Co-authored-by: Michal Plebanski <michalp@airnauts.com>
Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
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

6 participants