diff --git a/auth-web/package-lock.json b/auth-web/package-lock.json
index f3bd515a55..a18493b9b1 100644
--- a/auth-web/package-lock.json
+++ b/auth-web/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "auth-web",
- "version": "2.6.118",
+ "version": "2.6.119",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "auth-web",
- "version": "2.6.118",
+ "version": "2.6.119",
"dependencies": {
"@bcrs-shared-components/base-address": "2.0.3",
"@bcrs-shared-components/bread-crumb": "1.0.8",
diff --git a/auth-web/package.json b/auth-web/package.json
index 0e1f260e70..b9ccf534af 100644
--- a/auth-web/package.json
+++ b/auth-web/package.json
@@ -1,6 +1,6 @@
{
"name": "auth-web",
- "version": "2.6.118",
+ "version": "2.6.119",
"appName": "Auth Web",
"sbcName": "SBC Common Components",
"private": true,
diff --git a/auth-web/src/components/pay/eft/ShortNameFinancialDialog.vue b/auth-web/src/components/pay/eft/ShortNameFinancialDialog.vue
index 18f0095157..c6333651b4 100644
--- a/auth-web/src/components/pay/eft/ShortNameFinancialDialog.vue
+++ b/auth-web/src/components/pay/eft/ShortNameFinancialDialog.vue
@@ -18,6 +18,9 @@
Enter the supplier number created in CAS for this short name
+
@@ -90,8 +100,10 @@ export default defineComponent({
const state = reactive
({
email: '',
casSupplierNumber: '',
+ casSupplierSite: '',
isDialogTypeEmail: computed(() => props.shortNameFinancialDialogType === 'EMAIL'),
- isDialogTypeCasSupplierNumber: computed(() => props.shortNameFinancialDialogType === 'CAS_SUPPLIER_NUMBER')
+ isDialogTypeCasSupplierNumber: computed(() => props.shortNameFinancialDialogType === 'CAS_SUPPLIER_NUMBER'),
+ isDialogTypeCasSupplierSite: computed(() => props.shortNameFinancialDialogType === 'CAS_SUPPLIER_SITE')
})
function isFormInvalid () {
@@ -99,6 +111,8 @@ export default defineComponent({
return !state.email || emailAddressRules.some(rule => rule(state.email) !== true)
} else if (state.isDialogTypeCasSupplierNumber) {
return !state.casSupplierNumber
+ } else if (state.isDialogTypeCasSupplierSite) {
+ return !state.casSupplierSite
}
return true
}
@@ -109,6 +123,8 @@ export default defineComponent({
state.email = state.shortName.email
} else if (dialogType === 'CAS_SUPPLIER_NUMBER') {
state.casSupplierNumber = state.shortName.casSupplierNumber
+ } else if (dialogType === 'CAS_SUPPLIER_SITE') {
+ state.casSupplierSite = state.shortName.casSupplierSite
}
modalDialog.value.open()
}
@@ -118,12 +134,15 @@ export default defineComponent({
return 'Email'
} else if (state.isDialogTypeCasSupplierNumber) {
return 'CAS Supplier Number'
+ } else if (state.isDialogTypeCasSupplierSite) {
+ return 'CAS Supplier Site'
}
}
function resetAccountLinkingDialog () {
state.email = ''
state.casSupplierNumber = ''
+ state.casSupplierSite = ''
emit('close-short-name-email-dialog')
}
@@ -137,6 +156,8 @@ export default defineComponent({
await PaymentService.patchEFTShortName(state.shortName.id, { email: state.email })
} else if (state.isDialogTypeCasSupplierNumber) {
await PaymentService.patchEFTShortName(state.shortName.id, { casSupplierNumber: state.casSupplierNumber })
+ } else if (state.isDialogTypeCasSupplierSite) {
+ await PaymentService.patchEFTShortName(state.shortName.id, { casSupplierSite: state.casSupplierSite })
}
emit('on-patch')
cancelAndResetAccountLinkingDialog()
diff --git a/auth-web/src/components/pay/eft/ShortNameRefund.vue b/auth-web/src/components/pay/eft/ShortNameRefund.vue
index 2a51c58194..057353d7c4 100644
--- a/auth-web/src/components/pay/eft/ShortNameRefund.vue
+++ b/auth-web/src/components/pay/eft/ShortNameRefund.vue
@@ -206,6 +206,12 @@ export default defineComponent({
width: '240px',
value: 'CAS Supplier Number'
},
+ {
+ col: 'casSupplierSite',
+ hasFilter: false,
+ width: '240px',
+ value: 'CAS Supplier Site'
+ },
{
col: 'refundAmount',
hasFilter: false,
diff --git a/auth-web/src/models/pay/short-name.ts b/auth-web/src/models/pay/short-name.ts
index 066a0ca08d..d92f167b6d 100644
--- a/auth-web/src/models/pay/short-name.ts
+++ b/auth-web/src/models/pay/short-name.ts
@@ -89,6 +89,7 @@ export interface ShortNameDetails {
export interface EFTRefund {
id: number;
casSupplierNumber?: string;
+ casSupplierSite?: string;
comment?: string;
createdBy?: string;
createdName?: string;
diff --git a/auth-web/src/models/refund.ts b/auth-web/src/models/refund.ts
index d944dd0c43..fb8c314fec 100644
--- a/auth-web/src/models/refund.ts
+++ b/auth-web/src/models/refund.ts
@@ -13,6 +13,7 @@ export interface EftRefundRequest {
shortNameId: number
refundAmount: number
casSupplierNum: string
+ casSupplierSite: string
refundEmail: string
comment?: string
shortName?: string
diff --git a/auth-web/src/views/pay/eft/ShortNameDetailsView.vue b/auth-web/src/views/pay/eft/ShortNameDetailsView.vue
index 50d738da3c..a096b068af 100644
--- a/auth-web/src/views/pay/eft/ShortNameDetailsView.vue
+++ b/auth-web/src/views/pay/eft/ShortNameDetailsView.vue
@@ -40,6 +40,21 @@
Edit
+
+ CAS Supplier Site:
+ {{ shortName.casSupplierSite || 'N/A' }}
+
+ mdi-pencil-outline
+ Edit
+
+
Email:
{{ shortName.email || 'N/A' }}
@@ -207,6 +222,11 @@ export default defineComponent({
state.displayShortNameFinancialDialog = true
}
+ function openShortNameSupplierSiteDialog () {
+ state.shortNameFinancialDialogType = 'CAS_SUPPLIER_SITE'
+ state.displayShortNameFinancialDialog = true
+ }
+
async function onPaymentAction () {
await loadShortname(props.shortNameId)
updateState()
@@ -241,6 +261,7 @@ export default defineComponent({
onShortNamePatch,
openShortNameEmailDialog,
openShortNameSupplierNumberDialog,
+ openShortNameSupplierSiteDialog,
formatCurrency: CommonUtils.formatAmount,
unsettledAmountHeader,
closeShortNameLinkingDialog,
diff --git a/auth-web/src/views/pay/eft/ShortNameRefundView.vue b/auth-web/src/views/pay/eft/ShortNameRefundView.vue
index a42643aba4..dbf4830dcb 100644
--- a/auth-web/src/views/pay/eft/ShortNameRefundView.vue
+++ b/auth-web/src/views/pay/eft/ShortNameRefundView.vue
@@ -88,6 +88,29 @@
/>
+
+
+ CAS Supplier Site
+
+
+ {{ refundDetails.casSupplierSite }}
+
+
+
+
Email
@@ -249,6 +272,7 @@ export default defineComponent({
refundDetails: {} as EFTRefund,
refundAmount: undefined,
casSupplierNum: '',
+ casSupplierSite: '',
email: '',
staffComment: '',
isLoading: false,
@@ -262,6 +286,9 @@ export default defineComponent({
casSupplierNumRules: [
v => !!v || 'CAS Supplier Number is required'
],
+ casSupplierSiteRules: [
+ v => !!v || 'CAS Supplier Site is required'
+ ],
emailRules: [
v => !!v || 'Email is required',
v => {
@@ -339,6 +366,7 @@ export default defineComponent({
shortNameId: state.shortNameDetails.id,
refundAmount: state.refundAmount,
casSupplierNum: state.casSupplierNum,
+ casSupplierSite: state.casSupplierSite,
refundEmail: state.email,
comment: state.staffComment
}
diff --git a/auth-web/tests/unit/components/ShortNameRefund.spec.ts b/auth-web/tests/unit/components/ShortNameRefund.spec.ts
index 64605c7b8c..2590d68a42 100644
--- a/auth-web/tests/unit/components/ShortNameRefund.spec.ts
+++ b/auth-web/tests/unit/components/ShortNameRefund.spec.ts
@@ -14,7 +14,7 @@ Vue.use(Vuetify)
Vue.use(VueRouter)
// Selectors
const { header, headerTitles, itemRow, itemCell } = baseVdataTable
-const headers = ['Initiated By', 'Comment', 'CAS Supplier Number', 'Refund Amount', 'Actions']
+const headers = ['Initiated By', 'Comment', 'CAS Supplier Number', 'CAS Supplier Site', 'Refund Amount', 'Actions']
describe('ShortNameRefund.vue', () => {
let wrapper
@@ -28,6 +28,7 @@ describe('ShortNameRefund.vue', () => {
shortNameRefundResponse = [
{
'casSupplierNumber': '123456789',
+ 'casSupplierSite': '123456789',
'comment': 'A test',
'createdName': 'John Doe',
'createdOn': '2024-10-17 14:51:27.553425',
@@ -94,8 +95,9 @@ describe('ShortNameRefund.vue', () => {
expect(titles.at(0).text()).toBe('Initiated By')
expect(titles.at(1).text()).toBe('Comment')
expect(titles.at(2).text()).toBe('CAS Supplier Number')
- expect(titles.at(3).text()).toBe('Refund Amount')
- expect(titles.at(4).text()).toBe('Actions')
+ expect(titles.at(3).text()).toBe('CAS Supplier Site')
+ expect(titles.at(4).text()).toBe('Refund Amount')
+ expect(titles.at(5).text()).toBe('Actions')
// table items
const itemRows = wrapper.findComponent(BaseVDataTable).findAll(itemRow)
expect(itemRows.length).toBe(shortNameRefundResponse.length)
@@ -104,11 +106,11 @@ describe('ShortNameRefund.vue', () => {
expect(row1Cells.at(0).text()).toBe('John Doe')
expect(row1Cells.at(1).text()).toBe('A test')
expect(row1Cells.at(2).text()).toBe('123456789')
- expect(row1Cells.at(3).findAll('span').at(0).text()).toBe('$10.00')
- expect(row1Cells.at(3).findAll('span').at(1).text()).toBe('View Refund Detail')
- expect(row1Cells.at(4).findAll('button').exists()).toBe(true)
- expect(row1Cells.at(4).findAll('button').at(0).text()).toBe('Decline')
- expect(row1Cells.at(4).findAll('button').at(1).text()).toBe('Approve')
+ expect(row1Cells.at(4).findAll('span').at(0).text()).toBe('$10.00')
+ expect(row1Cells.at(4).findAll('span').at(1).text()).toBe('View Refund Detail')
+ expect(row1Cells.at(5).findAll('button').exists()).toBe(true)
+ expect(row1Cells.at(5).findAll('button').at(0).text()).toBe('Decline')
+ expect(row1Cells.at(5).findAll('button').at(1).text()).toBe('Approve')
// without roles
wrapper.destroy()
wrapper = mountComponent([])
diff --git a/auth-web/tests/unit/views/ShortNameRefundView.spec.ts b/auth-web/tests/unit/views/ShortNameRefundView.spec.ts
index 4d21ba7f2b..b889b91dc7 100644
--- a/auth-web/tests/unit/views/ShortNameRefundView.spec.ts
+++ b/auth-web/tests/unit/views/ShortNameRefundView.spec.ts
@@ -56,6 +56,7 @@ describe('ShortNameRefundView.vue', () => {
expect(wrapper.find('.view-header__title').text()).toBe('Refund Information')
expect(wrapper.find('[data-test="refundAmount"]').exists()).toBe(true)
expect(wrapper.find('[data-test="casSupplierNumber"]').exists()).toBe(true)
+ expect(wrapper.find('[data-test="casSupplierSite"]').exists()).toBe(true)
expect(wrapper.find('[data-test="email"]').exists()).toBe(true)
expect(wrapper.find('[data-test="staffComment"]').exists()).toBe(true)
})