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

20148 Updated to accommodate alternate name changes #642

Conversation

JazzarKarim
Copy link
Collaborator

Issue #: /bcgov/entity#20148

Description of changes:

  • Updated to accommodate alternate name changes in business response

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).

@JazzarKarim JazzarKarim self-assigned this Apr 2, 2024
@JazzarKarim
Copy link
Collaborator Author

/gcbrun

},

getOperatingName (state: BusinessStateIF): string {
getAlternateName (state: BusinessStateIF): string {
Copy link
Collaborator Author

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.

Copy link
Collaborator

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).

@bcregistry-sre
Copy link
Collaborator

bcregistry-sre commented Apr 2, 2024

nameRegisteredDate: ApiDateTimeUtc
nameStartDate: IsoDatePacific
operatingName: string
nameType: string
Copy link
Collaborator

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?

Copy link
Collaborator Author

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"
  }
}

Copy link
Collaborator

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.

Copy link
Collaborator

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...

Copy link
Collaborator

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done! I've added the enum so that it looks like the BE:
nametype in BE

Basically, two values, DBA and TRANSLATION.

Copy link
Collaborator

@severinbeauvais severinbeauvais left a 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?

@JazzarKarim
Copy link
Collaborator Author

You've just renamed things, right?

Yes, basically.

Copy link
Collaborator

@severinbeauvais severinbeauvais left a comment

Choose a reason for hiding this comment

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

Pre-emptive approval!

Copy link
Contributor

@tshyun24 tshyun24 left a 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!

Copy link

sonarqubecloud bot commented Apr 2, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@JazzarKarim JazzarKarim merged commit 32fc62e into bcgov:feature-legal-name Apr 2, 2024
5 of 6 checks passed
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.

4 participants