Skip to content

Commit

Permalink
21536 - Approval/rejection review (#3079)
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigo-barraza authored Oct 21, 2024
1 parent 3fab69c commit c6e3692
Show file tree
Hide file tree
Showing 14 changed files with 451 additions and 61 deletions.
4 changes: 2 additions & 2 deletions auth-web/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 auth-web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "auth-web",
"version": "2.6.98",
"version": "2.6.99",
"appName": "Auth Web",
"sbcName": "SBC Common Components",
"private": true,
Expand Down
10 changes: 5 additions & 5 deletions auth-web/src/components/pay/ShortNameSummaryTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@
<template #item-slot-creditsRemaining="{ item }">
<span class="pr-2">{{ formatAmount(item.creditsRemaining) }}</span>
<v-chip
v-if="item.refundStatus === ShortNameRefundStatus.PENDING_APPROVAL"
small
label
text-color="white"
class="primary pl-2 pr-2"
v-if="item.refundStatus === ShortNameRefundStatus.PENDING_APPROVAL"
small
label
text-color="white"
class="primary pl-2 pr-2"
>
{{ ShortNameRefundLabel.PENDING_APPROVAL }}
</v-chip>
Expand Down
19 changes: 16 additions & 3 deletions auth-web/src/components/pay/eft/ShortNamePaymentHistory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
</template>
<template v-if="showRefundDetailAction(item)">
<v-btn
v-if="isEftRefundApprover"
small
color="primary"
min-width="5rem"
Expand All @@ -151,8 +152,9 @@
</div>
</template>
<script lang="ts">
import { Ref, defineComponent, nextTick, reactive, ref, toRefs, watch } from '@vue/composition-api'
import { Ref, computed, defineComponent, nextTick, reactive, ref, toRefs, watch } from '@vue/composition-api'
import {
Role,
ShortNameHistoryType,
ShortNameHistoryTypeDescription,
ShortNamePaymentActions,
Expand All @@ -161,10 +163,10 @@ import {
import { BaseVDataTable } from '@/components'
import CommonUtils from '@/util/common-util'
import { DEFAULT_DATA_OPTIONS } from '../../datatable/resources'
import { EFTTransactionState } from '@/models/eft-transaction'
import ModalDialog from '@/components/auth/common/ModalDialog.vue'
import PaymentService from '@/services/payment.services'
import _ from 'lodash'
import { useUserStore } from '@/stores/user'
export default defineComponent({
name: 'ShortNamePaymentHistory',
Expand All @@ -175,9 +177,14 @@ export default defineComponent({
default: () => ({
shortName: null
})
},
lastRefundId: {
type: Number,
default: null
}
},
setup (props, { emit, root }) {
const userStore = useUserStore()
const dateDisplayFormat = 'MMMM D, YYYY'
const enum ConfirmationType {
REVERSE_PAYMENT = 'reversePayment',
Expand Down Expand Up @@ -222,7 +229,8 @@ export default defineComponent({
}
]
const state = reactive<EFTTransactionState>({
const state = reactive({
isEftRefundApprover: computed(() => userStore.currentUser.roles.includes(Role.EftRefundApprover)),
errorDialogTitle: '',
errorDialogText: '',
confirmDialogTitle: '',
Expand All @@ -243,6 +251,11 @@ export default defineComponent({
return loadTransactions(props.shortNameDetails.id, false)
}, { deep: true })
watch(() => props.lastRefundId, () => {
state.filters.pageNumber = 1
return loadTransactions(props.shortNameDetails.id, false)
}, { deep: true })
async function loadTransactions (shortnameId: string, appendToResults: boolean = false): Promise<void> {
try {
state.loading = true
Expand Down
Loading

0 comments on commit c6e3692

Please sign in to comment.