21439 - Fixed Unknown Name when registration is in draft #661
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #: /bcgov/entity#21439
Description of changes:
When the registration is draft, the code was checking for the name from alternate names but that doesn't exist at that point. When that is the case, we need to use the legal name as before. So, I simply added that check.
Before:
![before sp](https://private-user-images.githubusercontent.com/122301442/336930813-b6074446-cf31-4df0-9672-f5153d063564.PNG?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNDA4MjUsIm5iZiI6MTczOTM0MDUyNSwicGF0aCI6Ii8xMjIzMDE0NDIvMzM2OTMwODEzLWI2MDc0NDQ2LWNmMzEtNGRmMC05NjcyLWY1MTUzZDA2MzU2NC5QTkc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQwNjA4NDVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iZGY2N2U1YjY0NzA0NGEyNzgzYTQ5Y2RmOTlhNzAyZDk2YTBmMDhkMDViYzg1N2NmZWM3YTAwMmViYWMwY2YzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.cOt1f4l23sCSWV20JujCUqEfrKozQYb4pEvQFsMKvLY)
After:
![after sp](https://private-user-images.githubusercontent.com/122301442/336930839-96841865-d63b-43b3-8a8b-e837eaaeb215.PNG?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNDA4MjUsIm5iZiI6MTczOTM0MDUyNSwicGF0aCI6Ii8xMjIzMDE0NDIvMzM2OTMwODM5LTk2ODQxODY1LWQ2M2ItNDNiMy04YThiLWU4MzdlYWFlYjIxNS5QTkc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQwNjA4NDVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00ZjAwYmIzMjYxNTM0NjRkMTBjMGEzN2U1YjViNWE4YjgyMTY4ZGY1NzUxYzdiZjczZDQzZTRlOWE1MTNlYzUyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.3dO4zgzsc5H3RzfW_uimLWGKqa0Vx4p221zoZbrwVRs)
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the business-filings-ui license (Apache 2.0).