Skip to content

Commit

Permalink
re-do feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
seeker25 committed Jan 25, 2024
1 parent 06671dd commit 5e329e6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion auth-api/src/auth_api/services/affiliation.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ def _affiliation_details_url(affiliation: AffiliationModel) -> str:
if affiliation.entity.corp_type_code == CorpType.NR.value:
return current_app.config.get('NAMEX_AFFILIATION_DETAILS_URL')
# Temporary until legal names is implemented.
if flags.is_on('USE_ALTERNATIVE_NAMES_MBR', default=False):
if flags.is_on('enable-alternate-names-mbr', default=False):
return current_app.config.get('LEAR_ALTERNATE_AFFILIATION_DETAILS_URL')
return current_app.config.get('LEAR_AFFILIATION_DETAILS_URL')

Expand Down
3 changes: 3 additions & 0 deletions auth-web/src/stores/business.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ export const useBusinessStore = defineStore('business', () => {
})

function determineDisplayName (resp: AffiliationResponse): string {
if (!LaunchDarklyService.getFlag(LDFlags.AlternateNamesMbr, false)) {
return resp.legalName
}
if ([CorpTypes.SOLE_PROP, CorpTypes.PARTNERSHIP].includes(resp.legalType)) {
// Intentionally show blank, if the alternate name is not found. This is to avoid showing the legal name.
return resp.alternateNames?.find(alt => alt.identifier === resp.identifier)?.operatingName
Expand Down
1 change: 1 addition & 0 deletions auth-web/src/util/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ export enum Permission {
}

export enum LDFlags {
AlternateNamesMbr = 'enable-alternate-names-mbr',
AffiliationInvitationRequestAccess = 'enable-affiliation-invitation-request-access',
BannerText = 'banner-text',
BusSearchLink = 'bus-search-staff-link',
Expand Down

0 comments on commit 5e329e6

Please sign in to comment.