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

fix: [#188172536] add userId to business object #9292

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aadedejifearless
Copy link
Contributor

@aadedejifearless aadedejifearless commented Dec 19, 2024

Description

This PR introduces a major change by adding a userId field to the business object. This addition ensures that each business is associated with a specific user, which will support future features involving the business-user relationship. The generateBusiness method has been updated to take an argument of UserData to include the userId in the business object

Ticket

This pull request resolves #188172536.

Approach

Updated the generateBusiness method to accept UserData as an argument, allowing the userId to be added to the business object.
All instances where generateBusiness is used have been updated to reflect this change, ensuring that the userId is properly included in the business object.
This ensures consistency across the codebase and sets up the necessary foundation for future work that depends on the userId field in the business object

Steps to Test

n/A

Notes

Code author checklist

  • I have rebased this branch from the latest main branch
  • I have performed a self-review of my code
  • I have created and/or updated relevant documentation on the engineering documentation website
  • I have not used any relative imports
  • I have pruned any instances of unused code
  • I have not added any markdown to labels, titles and button text in config
  • If I added/updated any values in userData (including profileData, formationData etc), then I added a new migration file
  • I have checked for and removed instances of unused config from CMS
  • If I added any new collections to the CMS config, then I updated the search tool and cmsCollections.ts (see CMS Additions in Engineering Reference/FAQ on the engineering documentation site)
  • I have updated relevant .env values in both .env-template and in Bitwarden

@aadedejifearless aadedejifearless force-pushed the ade_adduserIdtoBusinessObject branch 2 times, most recently from c4c82b9 to 36eeadf Compare December 19, 2024 17:09
@@ -30,6 +30,7 @@ export interface Business {
readonly formationData: FormationData;
readonly environmentData: EnvironmentData | undefined;
readonly version: number;
readonly userId: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

Just kindof a musing... How would y'all think about making this into an array value? This could potentially allow us to have a 1:many relationship between business:user. Maybe a little bit of YAGNI, but I could see this being a nice support feature in the future even if we don't want to work on building user permissions into the system at this present time.

@aadedejifearless @seidior

@aadedejifearless aadedejifearless force-pushed the ade_adduserIdtoBusinessObject branch 4 times, most recently from a65140d to 85d2824 Compare December 20, 2024 01:53
@aadedejifearless aadedejifearless force-pushed the ade_adduserIdtoBusinessObject branch from 85d2824 to 91bce2a Compare December 20, 2024 15:24
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.

2 participants