Skip to content

Commit

Permalink
24334-EFT refund fixes (#3174)
Browse files Browse the repository at this point in the history
  • Loading branch information
ochiu authored Dec 9, 2024
1 parent 30e0d08 commit 9f611e2
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 8 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.123",
"version": "2.6.124",
"appName": "Auth Web",
"sbcName": "SBC Common Components",
"private": true,
Expand Down
4 changes: 2 additions & 2 deletions auth-web/src/components/auth/common/StaffAccountsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<span
v-if="index === 0"
class="columns-to-show"
>Columns to show</span>
>Columns to Show</span>
</template>
</v-select>
</v-col>
Expand Down Expand Up @@ -621,7 +621,7 @@ export default defineComponent({
function getHeaderPlaceHolderText (header: any): string {
if (header.text === 'Team Member') {
return 'Name or username'
return 'Name or Username'
}
return header.text
}
Expand Down
13 changes: 10 additions & 3 deletions auth-web/src/components/pay/eft/ShortNameRefund.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
color="primary"
class="open-action-btn pr-4 pl-4"
:loading="loading"
:disabled="disableApproveRefund(item)"
@click="approveRefund(item)"
>
<v-icon
Expand Down Expand Up @@ -167,6 +168,7 @@ export default defineComponent({
emits: ['on-short-name-refund'],
setup (props, { emit, root }) {
const userStore = useUserStore()
const currentUser = computed(() => userStore.currentUser)
const state = reactive({
declineReason: '',
actionDropdown: [],
Expand All @@ -191,7 +193,7 @@ export default defineComponent({
{
col: 'createdName',
hasFilter: false,
width: '300px',
width: '290px',
value: 'Initiated By'
},
{
Expand All @@ -215,14 +217,14 @@ export default defineComponent({
{
col: 'refundAmount',
hasFilter: false,
width: '260px',
width: '240px',
value: 'Refund Amount'
},
{
col: 'actions',
hasFilter: false,
value: 'Actions',
width: '300px'
width: '340px'
}
]
Expand Down Expand Up @@ -304,11 +306,16 @@ export default defineComponent({
})
}
function disableApproveRefund(item) {
return item?.createdBy?.toUpperCase() === currentUser.value?.userName?.toUpperCase()
}
return {
...toRefs(state),
state,
headers,
confirmationDialog,
disableApproveRefund,
approveRefund,
declineRefund,
dialogDecline,
Expand Down
8 changes: 8 additions & 0 deletions auth-web/src/views/pay/eft/ShortNameRefundView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,17 @@ export default defineComponent({
if (props.shortNameId && props.eftRefundId) {
state.readOnly = true
await loadShortnameRefund()
} else {
prepopulateRefund()
}
})
function prepopulateRefund() {
state.email = state.shortNameDetails.email
state.casSupplierNum = state.shortNameDetails.casSupplierNumber
state.casSupplierSite = state.shortNameDetails.casSupplierSite
}
async function loadShortnameDetails (): Promise<void> {
try {
const response = await PaymentService.getEFTShortnameSummary(props.shortNameId)
Expand Down

0 comments on commit 9f611e2

Please sign in to comment.