Skip to content

Conversation

@flutistar
Copy link
Contributor

Issue #: /bcgov/entity#30748
Description of changes:

  • Review Decision Component
  • Updates on updateQueuePayload
image image

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the PPR license (Apache 2.0).

@flutistar flutistar self-assigned this Oct 8, 2025
Comment on lines +35 to +39
isValidate.value = false
// await updateQueuedTransfer(
// reviewId.value,
// reviewDecision.value
// )
Copy link
Collaborator

Choose a reason for hiding this comment

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

Future state, to be done in our 'Submission' ticket?
Is this where you would validate if the current user is the assignee and/or self assign if there is no assigned user?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  • Yep, I just picked up the submission ticket.
  • For validation, we now have the isReviewable flag, which handles showing/hiding the decision component.
  • For submission, I think I’ll need to add one more step — self-assignment.

Comment on lines 27 to 134
<template>
<div
:class="validationErrors.general || validationErrors.declineReasonType ? 'border-error-left' : ''">
<div :class="'font-bold text-gray-900 bg-bcGovColor-gray2 px-[1.4rem] py-[12px] rounded-t'">
<div class="flex justify-between">
<div class="flex">
<UIcon name="i-mdi-stamper" class="w-6 h-6 text-blue-350" />
<div class="ml-2">Review Decision</div>
</div>
</div>
</div>
<div class="w-full border-t bg-white pa-6">
<div class="grid grid-cols-12 gap-4">
<div class="col-span-3 flex">
<span class="text-gray-700 font-bold">Review Decision</span>
</div>

<div class="col-span-9">
<div class="flex gap-[10px]">
<UButton
size="md"
color="error"
:class="[
'rounded-sm flex-1 h-[44px] justify-center',
reviewDecision.statusType === ReviewStatusTypes.DECLINED ? 'bg-error/10' : ''
]"
variant="outline"
icon="i-mdi-close"
@click="updateReviewDecision(ReviewStatusTypes.DECLINED)"
>
Decline
</UButton>
<UButton
color="success"
size="md"
:class="[
'rounded-sm flex-1 h-[44px] justify-center text-bcGovGray-900',
reviewDecision.statusType === ReviewStatusTypes.APPROVED ? 'bg-success/10' : ''
]"
variant="outline"
icon="i-mdi-check"
@click="updateReviewDecision(ReviewStatusTypes.APPROVED)"
>
Approve
</UButton>
</div>

<div v-if="validationErrors.general" class="text-red-600 text-sm mt-2">
{{ validationErrors.general }}
</div>

<div v-if="showHiddenComponent" class="mt-4 rounded animate-slide-down">

<div class="space-y-4">
<div v-if="reviewDecision.statusType === ReviewStatusTypes.DECLINED">
<USelect
v-model="reviewDecision.declineReasonType"
:items="Object.values(ReviewDecisionTypes)"
item-title="text"
item-value="value"
placeholder="Reason for decline (will be included in client email)"
size="lg"
:ui="{
base: [
'border-b-[1px] w-full h-[60px] focus:shadow-none data-[state=open]:shadow-none',
'data-[state=open]:border-blue-350',
validationErrors.declineReasonType ? 'border-error' : ''
],
item: 'hover:text-blue-500 hover:bg-bcGovGray-100',
placeholder: validationErrors.declineReasonType ? 'text-error' : 'text-bcGovGray-700'
}"
/>
<div v-if="validationErrors.declineReasonType" class="text-red-600 text-sm mt-1">
{{ validationErrors.declineReasonType }}
</div>
</div>

<div>
<UTextarea
v-model="reviewDecision.staffNote"
placeholder="Staff note (internal)"
size="lg"
:rows="4"
:maxlength="2000"
class="w-full"
:ui="{
slots:{
base: [
'border-bcGovGray-700 focus:shadow-none',
'focus:border-blue-350 placeholder:text-bcGovGray-700'
],
},
base: 'border-b-1 placeholder:text-bcGovGray-700'
}"
/>
<div class="text-xs text-gray-500 mt-1 text-end">
{{ reviewDecision.staffNote?.length }} / 2000
</div>
</div>
</div>
</div>
</div>
</div>
</div>

</div>

</template>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Very minor but some spacing is off here!

Copy link
Collaborator

@cameron-eyds cameron-eyds left a comment

Choose a reason for hiding this comment

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

Looks fantastic sir, just some minor comments

@flutistar flutistar merged commit 1bc71c7 into bcgov:main Oct 30, 2025
6 of 8 checks passed
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