-
Notifications
You must be signed in to change notification settings - Fork 55
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
20148 Updated to accommodate alternate name changes #642
20148 Updated to accommodate alternate name changes #642
Conversation
/gcbrun |
}, | ||
|
||
getOperatingName (state: BusinessStateIF): string { | ||
getAlternateName (state: BusinessStateIF): 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.
Since we moved from operatingName
to just name
, I could've named this getName
but I felt like that was very generic and might be misleading. So, I opted for getAlternateName
instead.
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 like it. It's explicit (like legalName).
nameRegisteredDate: ApiDateTimeUtc | ||
nameStartDate: IsoDatePacific | ||
operatingName: string | ||
nameType: 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.
So this is what now comes from Legal API in a business response?
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.
Yup, this is a sample:
{
"business": {
"alternateNames": [
{
"name": "SOME NAME TRANSLATION 1",
"nameStartDate": "2022-05-01",
"nameType": "TRANSLATION"
},
{
"name": "SOME NAME TRANSLATION 2",
"nameStartDate": "2022-05-03",
"nameType": "TRANSLATION"
},
{
"entityType": "GP",
"identifier": "FM1000019",
"name": "FOX FOOD CHAIN",
"nameRegisteredDate": "2021-04-28T00:00:00+00:00",
"nameStartDate": "2022-04-29",
"nameType": "DBA"
},
{
"entityType": "SP",
"identifier": "FM1111111",
"name": "SWIFT FOX SNACKS",
"nameRegisteredDate": "2023-05-10T00:00:00+00:00",
"nameStartDate": "2023-05-10",
"nameType": "DBA"
}
],
"identifier": "FM1000019",
"legalName": "FOX2 DO2, FOX3 DO3",
"legalType": "GP"
}
}
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 recommend creating an enum for the different type values.
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.
Even though the UI doesn't nothing with the name type? Hmm...
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.
Yeah, use an enum. It's good practicse.
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.
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.
You've just renamed things, right?
Yes, basically. |
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.
Pre-emptive approval!
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 enum NameType looks good to me!
Quality Gate passedIssues Measures |
Issue #: /bcgov/entity#20148
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the business-filings-ui license (Apache 2.0).