-
Notifications
You must be signed in to change notification settings - Fork 45
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
21718 Updated list of legal types to search #574
Conversation
- refactored BusinessLookupServices.search() to use legalTypes parameter (same as in Create UI) - updated unit tests
static async search (query: string, status: string): Promise<BusinessLookupResultIF[]> { | ||
const legalType = 'BC,A,ULC,C,S,XP,GP,LP,CUL,XS,LLC,LL,BEN,CP,CC,XL,FI,XCP,PA' | ||
|
||
static async search (query: string, status: string, legalTypes: string): Promise<BusinessLookupResultIF[]> { |
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.
This method is called by the Business Lookup shared component, which passed in the full list of legal types (unless overridden by a prop, not used in this case).
The call to search: https://github.com/bcgov/bcrs-shared-components/blob/83cfe9c8dbe19714567814eb3efd7e08f35faf49/src/components/business-lookup/BusinessLookup.vue#L237
The default prop: https://github.com/bcgov/bcrs-shared-components/blob/83cfe9c8dbe19714567814eb3efd7e08f35faf49/src/components/business-lookup/BusinessLookup.vue#L170
Where the Business Lookup component is used:
<BusinessLookupShared |
legalTypes
is not passed in, so we use the default)
}).then(response => { | ||
} | ||
|
||
return axios.get(url, config).then(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.
Just some cleanup to match Create UI.
.returns(new Promise(resolve => resolve({ data: { searchResults: { results: [result] } } }))) | ||
|
||
// search and look at results | ||
const results = await BusinessLookupServices.search('FM1000002', 'ACTIVE') | ||
const results = await BusinessLookupServices.search('FM1000002', 'ACTIVE', 'SP') |
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.
Just some simplifications so we don't have to carry around the whole list of legal types multiple times.
/gcbrun |
Temporary Url for review: https://business-edit-dev--pr-574-bcy9fle8.web.app SB says, try this: https://business-edit-dev--pr-574-bcy9fle8.web.app/FM1079097/conversion/?conversion-id=149368&accountid=3040 |
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 Sev!
Issue #: bcgov/entity#21718
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 bcrs-entities-create-ui license (Apache 2.0).