-
Notifications
You must be signed in to change notification settings - Fork 33
Review decision component #2260
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
Review decision component #2260
Conversation
| isValidate.value = false | ||
| // await updateQueuedTransfer( | ||
| // reviewId.value, | ||
| // reviewDecision.value | ||
| // ) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
| <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> |
There was a problem hiding this comment.
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!
cameron-eyds
left a comment
There was a problem hiding this 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
Issue #: /bcgov/entity#30748
Description of changes:
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).