Skip to content

Commit

Permalink
updated in response to Travis' and Sev's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JazzarKarim committed May 2, 2024
1 parent ad0c7a9 commit 988a48b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 19 deletions.
4 changes: 2 additions & 2 deletions auth-web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion auth-web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "auth-web",
"version": "2.5.23",
"version": "2.6.0",
"appName": "Auth Web",
"sbcName": "SBC Common Components",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion auth-web/src/models/business.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,6 @@ export interface LearBusiness {
identifier: string
legalName: string
legalType: string
alternateNames: AlternateNameIF[]
alternateNames?: AlternateNameIF[]
taxId?: string
}
16 changes: 1 addition & 15 deletions auth-web/src/stores/business.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
CreateNRAffiliationRequestBody,
NameRequestResponse
} from '@/models/affiliation'
import { AmalgamationTypes, EntityStates, FilingTypes } from '@bcrs-shared-components/enums'
import { AmalgamationTypes, FilingTypes } from '@bcrs-shared-components/enums'
import { BNRequest, RequestTracker, ResubmitBNRequest } from '@/models/request-tracker'
import { Business, BusinessRequest, CorpType, FolioNumberload, LearBusiness, LoginPayload,
PasscodeResetLoad } from '@/models/business'
Expand Down Expand Up @@ -209,20 +209,6 @@ export const useBusinessStore = defineStore('business', () => {
const entityResponse: AffiliationResponse[] = await OrgService.getAffiliatedEntities(currentOrganization.value.id)
let affiliatedEntities: Business[] = []

// do a lear search on firms to fetch the latest names (alternate names array)
// set that array to firm entries in the entityResponse array
for (const response of entityResponse) {
if ([CorpTypes.SOLE_PROP, CorpTypes.PARTNERSHIP].includes(response.legalType) &&
(response.state === EntityStates.ACTIVE || response.state === EntityStates.HISTORICAL)) {
await BusinessService.searchBusiness(response.identifier).then(result => {
response.legalName = result.data.business.legalName
response.alternateNames = result.data.business.alternateNames
}).catch(error => {
console.log(error)
})
}
}

// push entities from the entityResponse array after properly building them to the store
entityResponse.forEach((resp) => {
const entity: Business = buildBusinessObject(resp)
Expand Down

0 comments on commit 988a48b

Please sign in to comment.