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

feat: Include VendorApprovalStatus table #1328

Open
wants to merge 13 commits into
base: development
Choose a base branch
from

Conversation

howard-e
Copy link
Contributor

Address #1310

@howard-e
Copy link
Contributor Author

howard-e commented Mar 4, 2025

#1329 should fix the build error happening here.

@howard-e howard-e requested a review from stalgiag March 6, 2025 18:42
# Conflicts:
#	client/tests/e2e/snapshots/saved/_data-management.html
#	client/tests/e2e/snapshots/saved/_test-queue.html
@howard-e howard-e changed the title Include VendorApprovalStatus table feat: Include VendorApprovalStatus table Mar 6, 2025
Copy link
Contributor

@stalgiag stalgiag left a comment

Choose a reason for hiding this comment

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

This is a great improvement! I am especially happy about the removal of viewers. I didn't realize that this value wasn't being used to track viewed tests in normal runs as well.

I looked through the code and tested everything manually. Everything works great for the most part. I am a bit on the fence about the loss of information about reviewed tests for admins. It doesn't feel like a major problem but in the current version of the app when an admin views candidate reports they can see tests they have already looked at in the test nav. This doesn't seem too important but it does make me wander if we want that test nav to always show tests that have been viewed by the vendor reviewer since that is the most important info.

Other than that, just a few small comments inline. I'll pass back to you to address any that you think are appropriate

@@ -295,12 +285,13 @@ const updatePhaseResolver = async (
recommendedPhaseTargetDate: recommendedPhaseTargetDateValue,
deprecatedAt: null
};
} else if (phase === 'RECOMMENDED')
} else if (phase === 'RECOMMENDED') {
Copy link
Contributor

Choose a reason for hiding this comment

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

Wild that these were missing.

vendorId: user.vendorId || user.company?.id,
values: {
reviewStatus,
approvedAt: reviewStatus === 'APPROVED' ? new Date() : null
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: does modification of this value need to be exposed outside of the service?

testPlanReportId,
userId,
vendorId
},
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be that status sometimes applies to a plural or it might be that Ids is plural in the function name but it took a second for me to understand that this is the get single function and the below is the get all function. Maybe do a quick check to make sure all ids were passed in to prevent that confusion in the future?

)
.map(({ id }) => id);
const isApproved = testPlanReport.vendorReviewStatus === 'APPROVED';
const date = new Date();
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this matter? It seems that there was no tracking of the approval date previously so I guess it is fine to use the current date but curious your thoughts

{ transaction }
);

await queryInterface.createTable(
Copy link
Contributor

Choose a reason for hiding this comment

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

I appreciate the frozen table definition

});
}
} catch (error) {
// console.error('addViewerResolver.error', error);
Copy link
Contributor

@stalgiag stalgiag Mar 6, 2025

Choose a reason for hiding this comment

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

Did you mean to leave this in? I wouldn't mind leaving uncommented error logging in

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.

2 participants