-
Notifications
You must be signed in to change notification settings - Fork 235
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
Add option to add and update additional scan profile details #5660
Conversation
…le details to the onerep_profiles table
Preview URL 🚀 : https://blurts-server-pr-5660-mgjlpikfea-uk.a.run.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't closely review the admin UI code since it's running locally only anyway, but it's looking really neat! And the functionality seemed to work here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm overall, I reviewed but did not test this locally, @flozia do you want me to help with that?
The only really important question I have is how you intend to enforce the limits on the number of allowable fields, since this involves both DB storage and external API calls it is probably more complex, but I included a reference to some prior art we have in this area (the limit on secondary emails in the settings screen).
...ated)/user/(dashboard)/dashboard/fix/data-broker-profiles/removal-under-maintenance/page.tsx
Outdated
Show resolved
Hide resolved
"phone_numbers", | ||
"addresses", | ||
] as const; | ||
export const CONST_DATA_BROKER_PROFILE_DETAIL_LIMITS = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How are these limits enforced? We found in the past that is was insufficient to do this on the front-end, and we ended up enforcing this at the database level using transactions with a strong isolation level
await trx.raw("SET TRANSACTION ISOLATION LEVEL SERIALIZABLE"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/knex-tables.d.ts
Outdated
@@ -320,7 +320,6 @@ declare module "knex/types/tables" { | |||
interface OnerepProfileRow { | |||
id: number; | |||
onerep_profile_id: null | number; | |||
name_suffix: null | string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I missed the memo on this, are we deprecating the name_suffix
field entirely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we are keeping it for now: 41912ff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good to me too. (Except the transaction level stuff, since I don't know what that is, but I'll leave that to you and Rob :) )
The Deploy Preview Action is also stuck for this PR. Closing in favor of PR #5697. |
Cleanup completed - database 'blurts-server-pr-5660' destroyed, cloud run service 'blurts-server-pr-5660' destroyed |
Cleanup completed - database 'blurts-server-pr-5660' destroyed, cloud run service 'blurts-server-pr-5660' destroyed |
References:
Jira: MNTOR-4065
Figma: https://www.figma.com/design/2iCgADpFXKOFZTEgCPkQsR/Settings?node-id=597-10052&t=c2UkGyKPdbvneuz5-4
Description
Adds additional scan profile details and the option to update them:
/admin/dev
panel to add the option to test the backend changes.How to test
npm run db:migrate
EditScanProfileDetails
/admin/dev
onerep_profiles
and also show for the remote profileChecklist (Definition of Done)