Skip to content

Commit

Permalink
21194 Added handling for pending filing with completed payment (bcgov…
Browse files Browse the repository at this point in the history
…#665)

- app version = 7.2.14
- added pending filing sub-title when payment is completed
- do not show actions when filing is pending but payment is completed
- show PaymentPaid sub-component when payment is completed
- added contact info to PaymentPaid sub-component

Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>
  • Loading branch information
severinbeauvais and Severin Beauvais authored Jun 12, 2024
1 parent 9ef473c commit 87c2fe5
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 17 deletions.
4 changes: 2 additions & 2 deletions 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 package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "business-filings-ui",
"version": "7.2.13",
"version": "7.2.14",
"private": true,
"appName": "Filings UI",
"sbcName": "SBC Common Components",
Expand Down
51 changes: 39 additions & 12 deletions src/components/Dashboard/TodoList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,16 @@
<!-- NB: blocks below are mutually exclusive, and order is important -->

<!-- affiliation invitation todo task -->
<div
v-if="isAffiliationInvitation(item)"
class="todo-subtitle"
>
<span v-if="!!item.subtitle">{{ item.subtitle }}</span>
</div>

<!-- new todo task -->
<div
v-if="isStatusNew(item) || isAffiliationInvitation(item)"
v-else-if="isStatusNew(item)"
class="todo-subtitle"
>
<span v-if="!!item.subtitle">{{ item.subtitle }}</span>
Expand Down Expand Up @@ -220,6 +227,7 @@
<span class="vert-pipe" />
<span v-if="inProcessFiling === item.filingId">PROCESSING...</span>
<span v-else-if="EnumUtilities.isPayMethodOnlineBanking(item)">ONLINE BANKING PAYMENT PENDING</span>
<span v-else-if="item.isPayCompleted">PAYMENT COMPLETED</span>
<span v-else>PAYMENT INCOMPLETE</span>
</template>
</div>
Expand Down Expand Up @@ -271,6 +279,7 @@
</v-btn>
</div>

<!-- Not affiliation invite (ie, rest of the todo actions) -->
<div
v-else
class="list-item__actions"
Expand Down Expand Up @@ -423,7 +432,7 @@
</template>

<!-- pending filing -->
<template v-else-if="isStatusPending(item)">
<template v-else-if="isStatusPending(item) && !item.isPayCompleted">
<v-btn
v-if="EnumUtilities.isPayMethodOnlineBanking(item)"
class="btn-change-payment-type"
Expand Down Expand Up @@ -556,7 +565,7 @@
</template>

<!-- does this item have a pending payment? -->
<template v-else-if="isStatusPending(item)">
<template v-else-if="isStatusPending(item) && !item.isPayCompleted">
<PaymentPendingOnlineBanking
v-if="EnumUtilities.isPayMethodOnlineBanking(item)"
:filing="item"
Expand All @@ -572,8 +581,8 @@
<PaymentUnsuccessful />
</template>

<!-- does this item have a paid payment? -->
<template v-else-if="isStatusPaid(item)">
<!-- does this item have a paid or completed payment? -->
<template v-else-if="isStatusPaid(item) || item.isPayCompleted">
<PaymentPaid />
</template>
</v-expansion-panel-content>
Expand Down Expand Up @@ -1159,7 +1168,8 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
order: task.order,
paymentMethod: header.paymentMethod || null,
paymentToken: header.paymentToken || null,
payErrorObj
payErrorObj,
isPayCompleted: (paymentStatusCode === 'COMPLETED')
}
this.todoItems.push(item)
} else {
Expand Down Expand Up @@ -1206,7 +1216,8 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
order: task.order,
paymentMethod: header.paymentMethod || null,
paymentToken: header.paymentToken || null,
payErrorObj
payErrorObj,
isPayCompleted: (paymentStatusCode === 'COMPLETED')
}
this.todoItems.push(item)
} else {
Expand Down Expand Up @@ -1244,7 +1255,8 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
nextArDate: annualReport.nextARDate, // BEN/BC/CCC/ULC only
paymentMethod: header.paymentMethod || null,
paymentToken: header.paymentToken || null,
payErrorObj
payErrorObj,
isPayCompleted: (paymentStatusCode === 'COMPLETED')
}
this.todoItems.push(item)
} else {
Expand Down Expand Up @@ -1273,7 +1285,8 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
order: task.order,
paymentMethod: header.paymentMethod || null,
paymentToken: header.paymentToken || null,
payErrorObj
payErrorObj,
isPayCompleted: (paymentStatusCode === 'COMPLETED')
}
this.todoItems.push(item)
} else {
Expand Down Expand Up @@ -1302,7 +1315,8 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
order: task.order,
paymentMethod: header.paymentMethod || null,
paymentToken: header.paymentToken || null,
payErrorObj
payErrorObj,
isPayCompleted: (paymentStatusCode === 'COMPLETED')
}
this.todoItems.push(item)
} else {
Expand Down Expand Up @@ -1338,6 +1352,7 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
paymentMethod: header.paymentMethod || null,
paymentToken: header.paymentToken || null,
payErrorObj,
isPayCompleted: (paymentStatusCode === 'COMPLETED'),
comment: correction.comment
}
this.todoItems.push(item)
Expand Down Expand Up @@ -1387,6 +1402,7 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
paymentMethod: header.paymentMethod || null,
paymentToken: header.paymentToken || null,
payErrorObj,
isPayCompleted: (paymentStatusCode === 'COMPLETED'),
isEmptyFiling: !haveData,
nameRequest: this.getNameRequest
}
Expand Down Expand Up @@ -1437,6 +1453,7 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
paymentMethod: header.paymentMethod || null,
paymentToken: header.paymentToken || null,
payErrorObj,
isPayCompleted: (paymentStatusCode === 'COMPLETED'),
isEmptyFiling: !haveData,
nameRequest: this.getNameRequest
}
Expand Down Expand Up @@ -1486,6 +1503,7 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
paymentMethod: header.paymentMethod || null,
paymentToken: header.paymentToken || null,
payErrorObj,
isPayCompleted: (paymentStatusCode === 'COMPLETED'),
isEmptyFiling: !haveData,
nameRequest: this.getNameRequest
}
Expand Down Expand Up @@ -1536,6 +1554,7 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
paymentMethod: header.paymentMethod || null,
paymentToken: header.paymentToken || null,
payErrorObj,
isPayCompleted: (paymentStatusCode === 'COMPLETED'),
isEmptyFiling: !haveData,
nameRequest: this.getNameRequest
}
Expand Down Expand Up @@ -1579,6 +1598,7 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
paymentMethod: header.paymentMethod || null,
paymentToken: header.paymentToken || null,
payErrorObj,
isPayCompleted: (paymentStatusCode === 'COMPLETED'),
nameRequest: this.getNameRequest
}
this.todoItems.push(item)
Expand Down Expand Up @@ -1608,6 +1628,7 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
paymentMethod: header.paymentMethod || null,
paymentToken: header.paymentToken || null,
payErrorObj,
isPayCompleted: (paymentStatusCode === 'COMPLETED'),
// FUTURE: ideally, this would come from the filing:
warnings: this.getBusinessWarnings.map(warning => warning.message)
} as TodoItemIF
Expand Down Expand Up @@ -1638,6 +1659,7 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
paymentMethod: header.paymentMethod || null,
paymentToken: header.paymentToken || null,
payErrorObj,
isPayCompleted: (paymentStatusCode === 'COMPLETED'),
// FUTURE: ideally, this would come from the filing:
warnings: this.getBusinessWarnings.map(warning => warning.message)
} as TodoItemIF
Expand Down Expand Up @@ -1668,6 +1690,7 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
paymentMethod: header.paymentMethod || null,
paymentToken: header.paymentToken || null,
payErrorObj,
isPayCompleted: (paymentStatusCode === 'COMPLETED'),
// FUTURE: ideally, this would come from the filing:
warnings: this.getBusinessWarnings.map(warning => warning.message)
} as TodoItemIF
Expand Down Expand Up @@ -1698,6 +1721,7 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
paymentMethod: header.paymentMethod || null,
paymentToken: header.paymentToken || null,
payErrorObj,
isPayCompleted: (paymentStatusCode === 'COMPLETED'),
// FUTURE: ideally, this would come from the filing:
warnings: this.getBusinessWarnings.map(warning => warning.message)
} as TodoItemIF
Expand Down Expand Up @@ -1728,6 +1752,7 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
paymentMethod: header.paymentMethod || null,
paymentToken: header.paymentToken || null,
payErrorObj,
isPayCompleted: (paymentStatusCode === 'COMPLETED'),
// FUTURE: ideally, this would come from the filing:
warnings: this.getBusinessWarnings.map(warning => warning.message)
} as TodoItemIF
Expand Down Expand Up @@ -1761,7 +1786,8 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
order: task.order,
paymentMethod: header.paymentMethod || null,
paymentToken: header.paymentToken || null,
payErrorObj
payErrorObj,
isPayCompleted: (paymentStatusCode === 'COMPLETED')
}
this.todoItems.push(item)
} else {
Expand Down Expand Up @@ -1796,7 +1822,8 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
order: task.order,
paymentMethod: header.paymentMethod || null,
paymentToken: header.paymentToken || null,
payErrorObj
payErrorObj,
isPayCompleted: (paymentStatusCode === 'COMPLETED')
}
this.todoItems.push(item)
} else {
Expand Down
19 changes: 17 additions & 2 deletions src/components/Dashboard/TodoList/PaymentPaid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,27 @@
<p class="pt-3 mb-2">
This filing is paid but the filing is not yet complete. Please check again later.
</p>

<template v-if="!isRoleStaff">
<p>
If this error persists, please contact us.
</p>
<ContactInfo class="mt-5" />
</template>
</div>
</template>

<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
import { Getter } from 'pinia-class'
import { ContactInfo } from '@/components/common'
import { useRootStore } from '@/stores'
@Component({})
export default class PaymentPaid extends Vue {}
@Component({
components: { ContactInfo }
})
export default class PaymentPaid extends Vue {
// Getter to check if logged in user is Staff.
@Getter(useRootStore) isRoleStaff!: boolean
}
</script>
1 change: 1 addition & 0 deletions src/interfaces/todo-item-interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export interface TodoItemIF {
paymentMethod?: PaymentMethod
paymentToken?: number
payErrorObj?: PaymentErrorIF
isPayCompleted?: boolean

// ARs only
ARFilingYear?: number // YYYY
Expand Down

0 comments on commit 87c2fe5

Please sign in to comment.