Skip to content

Commit

Permalink
Merge branch 'main' into feature-gcp-migration
Browse files Browse the repository at this point in the history
  • Loading branch information
bolyachevets committed Sep 17, 2024
2 parents fac5536 + 9078259 commit 0d1878f
Show file tree
Hide file tree
Showing 25 changed files with 443 additions and 197 deletions.
18 changes: 9 additions & 9 deletions auth-web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions auth-web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "auth-web",
"version": "2.6.79",
"version": "2.6.89",
"appName": "Auth Web",
"sbcName": "SBC Common Components",
"private": true,
Expand Down Expand Up @@ -39,7 +39,7 @@
"pinia": "^2.1.6",
"pinia-class": "^0.0.3",
"sanitize-html": "^2.13.0",
"sbc-common-components": "3.0.12",
"sbc-common-components": "3.0.15",
"vue": "2.6.14",
"vue-auto-resize": "^1.0.1",
"vue-debounce-decorator": "^1.0.1",
Expand Down
19 changes: 15 additions & 4 deletions auth-web/src/components/auth/account-freeze/AccountOverview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
outlined
flat
class="suspended-info-card mb-12"
:loading="loading"
>
<v-card-text class="py-2 px-6">
<v-row>
Expand All @@ -36,9 +37,12 @@
:key="statement.id"
>
<v-col class="pt-0">
<div class="link">
<a
class="text-decoration-underline"
@click="downloadStatement(statement)"
>
{{ formatDateRange(statement.fromDate, statement.toDate) }}
</div>
</a>
</v-col>
</v-row>
<v-divider class="my-2" />
Expand Down Expand Up @@ -79,6 +83,7 @@
import { computed, defineComponent, onMounted, reactive, toRefs } from '@vue/composition-api'
import CommonUtils from '@/util/common-util'
import { FailedInvoice } from '@/models/invoice'
import { useDownloader } from '@/composables/downloader'
import { useOrgStore } from '@/stores/org'
export default defineComponent({
Expand All @@ -93,11 +98,12 @@ export default defineComponent({
const formatDate = CommonUtils.formatDisplayDate
const formatDateRange = CommonUtils.formatDateRange
const suspendedDate = (currentOrganization.value?.suspendedOn) ? formatDate(new Date(currentOrganization.value.suspendedOn)) : ''
const state = reactive({
statements: [],
totalAmountDue: 0
totalAmountDue: 0,
loading: false
})
const { downloadStatement } = useDownloader(orgStore, state)
const goNext = () => {
emit('step-forward')
Expand All @@ -113,6 +119,7 @@ export default defineComponent({
...toRefs(state),
currentOrganization,
currentMembership,
downloadStatement,
suspendedDate,
downloadNSFInvoicesPDF,
goNext,
Expand All @@ -126,6 +133,10 @@ export default defineComponent({
<style lang="scss" scoped>
@import "$assets/scss/theme.scss";
.text-decoration-underline {
text-decoration: underline;
}
.link {
color: var(--v-primary-base) !important;
text-decoration: underline;
Expand Down
21 changes: 16 additions & 5 deletions auth-web/src/components/auth/account-freeze/MakePayment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<v-row class="mb-6">
<v-col
class="card d-flex selected"
class="card d-flex"
>
<label
class="d-flex"
Expand All @@ -30,7 +30,10 @@
<div>
<h2>Electronic Funds Transfer</h2>
<p>
Follow the <span class="link">payment instruction</span> to make a payment.
Follow the <a
class="text-decoration-underline"
@click="downloadEFTInstructions"
>payment instructions </a>to make a payment.
Processing may take 2-5 business days after you paid.
You will receive an email notification once your account is unlocked.
</p>
Expand All @@ -50,7 +53,6 @@
class="radio ml-6 mr-12"
name="payment-method"
value="CC"
checked
@change="onPaymentMethodChange"
>
<div>
Expand Down Expand Up @@ -86,6 +88,7 @@
large
color="primary"
:loading="isLoading"
:disabled="isLoading"
data-test="btn-reviewbank-next"
@click="goNext"
>
Expand All @@ -103,6 +106,7 @@
import { CreateRequestBody, OrgPaymentDetails, PADInfo, PADInfoValidation } from '@/models/Organization'
import { defineComponent, onMounted, reactive, toRefs } from '@vue/composition-api'
import { PaymentTypes } from '@/util/constants'
import { useDownloader } from '@/composables/downloader'
import { useOrgStore } from '@/stores/org'
export default defineComponent({
Expand Down Expand Up @@ -161,7 +165,7 @@ export default defineComponent({
async function goNext () {
if (!state.isTouched) {
emit('final-step-action')
emit('final-step-action', state.paymentMethod === PaymentTypes.EFT ? 'eft-payment-instructions' : '')
} else {
state.isLoading = true
let isValid = state.isTouched ? await verifyPAD() : true
Expand All @@ -176,11 +180,11 @@ export default defineComponent({
}
try {
await updateOrg(createRequestBody)
state.isLoading = false
emit('final-step-action')
} catch (error) {
// eslint-disable-next-line no-console
console.error(error)
} finally {
state.isLoading = false
}
}
Expand All @@ -191,8 +195,11 @@ export default defineComponent({
emit('step-back')
}
const { downloadEFTInstructions } = useDownloader(orgStore, state)
return {
...toRefs(state),
downloadEFTInstructions,
onPaymentMethodChange,
goNext,
goBack
Expand All @@ -204,6 +211,10 @@ export default defineComponent({
<style lang="scss" scoped>
@import '@/assets/styles/theme.scss';
.text-decoration-underline {
text-decoration: underline;
}
.radio {
transform: scale(1.5);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,14 @@

<script lang="ts">
import { AccessType, Account, LoginSource, Pages, PaymentTypes, Permission, Role } from '@/util/constants'
import { CreateRequestBody, OrgPaymentDetails, PADInfo, PADInfoValidation } from '@/models/Organization'
import {
CreateRequestBody, Member, MembershipType, OrgPaymentDetails, Organization, PADInfo, PADInfoValidation
} from '@/models/Organization'
import { computed, defineComponent, onMounted, reactive, ref, toRefs, watch } from '@vue/composition-api'
import { BcolProfile } from '@/models/bcol'
import ModalDialog from '@/components/auth/common/ModalDialog.vue'
import PaymentMethods from '@/components/auth/common/PaymentMethods.vue'
import { StatementNotificationSettings } from '@/models/statement'
import { useAccount } from '@/composables/account-factory'
import { useOrgStore } from '@/stores/org'
import { useUserStore } from '@/stores/user'
Expand Down Expand Up @@ -146,7 +149,9 @@ export default defineComponent({
ejvValid: false,
paymentMethodChanged: props.hasPaymentChanged,
isFuturePaymentMethodAvailable: false, // set true if in between 3 days cooling period
isTOSandAcknowledgeCompleted: false // set true if TOS already accepted
isTOSandAcknowledgeCompleted: false, // set true if TOS already accepted
activeOrgMembers: computed<Member[]>(() => orgStore.activeOrgMembers),
currentOrganization: computed<Organization>(() => orgStore.currentOrganization)
})
const errorDialog = ref<InstanceType<typeof ModalDialog>>()
Expand Down Expand Up @@ -331,6 +336,7 @@ export default defineComponent({
state.isLoading = true
const { isValid, createRequestBody } = await getCreateRequestBody()
const selectedPaymentMethod = state.selectedPaymentMethod
if (isValid) {
try {
Expand All @@ -339,7 +345,27 @@ export default defineComponent({
state.isLoading = false
state.paymentMethodChanged = false
initialize()
orgStore.setCurrentOrganizationPaymentType(state.selectedPaymentMethod)
orgStore.setCurrentOrganizationPaymentType(selectedPaymentMethod)
if (selectedPaymentMethod === PaymentTypes.EFT) {
const recipientList = []
await orgStore.syncActiveOrgMembers()
state.activeOrgMembers.forEach((member) => {
if (member.membershipTypeCode !== MembershipType.User) {
recipientList.push({
authUserId: member.user?.id,
firstname: member.user?.firstname,
lastname: member.user?.lastname,
email: member.user?.contacts[0]?.email
})
}
})
const statementNotification: StatementNotificationSettings = {
statementNotificationEnabled: true,
recipients: recipientList,
accountName: state.currentOrganization.name
}
await orgStore.updateStatementNotifications(statementNotification)
}
} catch (error) {
console.error(error)
state.isLoading = false
Expand Down
Loading

0 comments on commit 0d1878f

Please sign in to comment.