Skip to content

Commit

Permalink
Staff Payment Validation Update (bcgov#1830)
Browse files Browse the repository at this point in the history
* Update Staff Payment validation for Priority checkbox
  • Loading branch information
dimak1 authored Apr 16, 2024
1 parent 6a3dfcc commit aa6e57b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ppr-ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ppr-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ppr-ui",
"version": "3.0.85",
"version": "3.0.86",
"private": true,
"appName": "Assets UI",
"sbcName": "SBC Common Components",
Expand Down
7 changes: 7 additions & 0 deletions ppr-ui/src/components/common/StaffPayment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,13 @@ export default defineComponent({
validatePaymentType()
})
/** Trigger validation separately for Priority checkbox because after Staff Payment data update */
watch(() => localState.staffPaymentData.isPriority, async () => {
await nextTick()
validatePaymentType()
context.emit('valid', localState.isValid)
})
/** Watches for changes to Staff Payment Data Validation flag. */
watch(() => localState.isValid, async (isValid: boolean): Promise<void> => {
context.emit('valid', isValid)
Expand Down
2 changes: 1 addition & 1 deletion ppr-ui/src/views/newMhrRegistration/MhrReviewConfirm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ export default defineComponent({
!getValidation(MhrSectVal.REVIEW_CONFIRM_VALID, MhrCompVal.AUTHORIZATION_VALID)
}),
validateStaffPayment: computed(() => {
return isRoleStaffReg && localState.isValidatingApp &&
return isRoleStaffReg.value && localState.isValidatingApp &&
!getValidation(MhrSectVal.REVIEW_CONFIRM_VALID, MhrCompVal.STAFF_PAYMENT_VALID)
}),
hasStaffPaymentValues: computed(() => {
Expand Down

0 comments on commit aa6e57b

Please sign in to comment.