From a828b7bb2ed150d0efae679199c39afcc8dff495 Mon Sep 17 00:00:00 2001 From: meganwong Date: Tue, 12 Nov 2024 11:53:14 -0800 Subject: [PATCH] Add logic to handle new ConversionTypes --- app/src/mixins/search-mixin.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/src/mixins/search-mixin.ts b/app/src/mixins/search-mixin.ts index 77eba1ccd..783e0aa2e 100644 --- a/app/src/mixins/search-mixin.ts +++ b/app/src/mixins/search-mixin.ts @@ -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 } @@ -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