Skip to content

Commit

Permalink
Add logic to handle new ConversionTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
meawong committed Nov 12, 2024
1 parent a607267 commit a828b7b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/src/mixins/search-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ export class SearchMixin extends Mixins(CommonMixin) {
)
}

get origin_entity_type_cd (): EntityTypes {
return this.getOriginEntityTypeCd
}

get entity_type_cd (): EntityTypes {
return this.getEntityTypeCd
}
Expand Down Expand Up @@ -140,7 +144,10 @@ export class SearchMixin extends Mixins(CommonMixin) {
// special case for conversion
if (this.getEntityTypeCd && this.isConversion && type) {
const nrRequestType = type as unknown as NrRequestTypeCodes
const entityType = ConversionTypes.find(conv => conv.value === nrRequestType)?.entity_type_cd || null
const entityType = ConversionTypes.find(conv =>
conv.value === nrRequestType && conv.origin_entity_type_cd === this.origin_entity_type_cd
)?.entity_type_cd || null

this.setEntityTypeCd(entityType)
this.setConversionType(type)
return
Expand Down

0 comments on commit a828b7b

Please sign in to comment.