Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kit assembly now enforces uppercase and checks for matching ID numbers #642

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

amber-emmes
Copy link
Contributor

@amber-emmes amber-emmes commented Sep 9, 2024

Provides back-end enforcement of changes requested by 1089.

@amber-emmes amber-emmes requested review from a team September 9, 2024 17:27
@amber-emmes amber-emmes self-assigned this Sep 9, 2024
@amber-emmes amber-emmes requested review from anthonypetersen and Gbarra9 and removed request for a team September 9, 2024 17:27
@amber-emmes amber-emmes changed the title Kit assembly now enforces uppercase and checks for matching ID number… Kit assembly now enforces uppercase and checks for matching ID numbers Sep 9, 2024
const validateKitAssemblyData = (data) => {
// Ensure that values are uppercase and that the appropriate values match
if(data[fieldMapping.returnKitId]) {
data[fieldMapping.returnKitId] = ('' + data[fieldMapping.returnKitId]).toUpperCase();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of adding the empty strings in all these statements?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do it to make 100% sure it's a string before running toUpperCase, in case we end up with a number.

@amber-emmes amber-emmes merged commit af5bff2 into dev Sep 10, 2024
@amber-emmes amber-emmes deleted the 1089-fix branch September 10, 2024 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Supply Kit and Return Kit- Consistency check and force uppercase- Biospecimen (September release)
3 participants