Skip to content

Commit

Permalink
22420 - Removed Director's Affidavit from Review Page (#2933)
Browse files Browse the repository at this point in the history
Signed-off-by: Qin <[email protected]>
  • Loading branch information
ArwenQin authored Jul 24, 2024
1 parent 74aa7b5 commit 85de22b
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 65 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.55",
"version": "2.6.56",
"appName": "Auth Web",
"sbcName": "SBC Common Components",
"private": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,28 +157,6 @@
sm="9"
class="pt-4 pt-sm-0"
>
<!-- the director's affidavit file -->
<template v-if="isContinuationInAffidavitRequired">
<v-btn
v-if="continuationIn?.foreignJurisdiction?.affidavitFileName"
text
color="primary"
class="download-affidavit-btn mt-sm-n2 d-block ml-n4"
:disabled="isDownloading"
:loading="isDownloading"
@click="downloadAffidavitDocument()"
>
<v-icon>mdi-file-pdf-outline</v-icon>
<span>{{ continuationIn?.foreignJurisdiction?.affidavitFileName }}</span>
</v-btn>
<div v-else>
<v-icon color="error">
mdi-close
</v-icon>
<span class="pl-2">Missing Affidavit</span>
</div>
</template>

<!-- the proof of authorization file(s) -->
<v-btn
v-for="item in authorizationFiles"
Expand Down Expand Up @@ -234,7 +212,6 @@ import { CanJurisdictions, IntlJurisdictions, UsaJurisdiction } from '@bcrs-shar
import { ContinuationFilingIF, ContinuationReviewIF } from '@/models/continuation-review'
import { computed, defineComponent, reactive, ref, toRefs } from '@vue/composition-api'
import BusinessService from '@/services/business.services'
import { CorpTypes } from '@/util/constants'
import { JurisdictionLocation } from '@bcrs-shared-components/enums'
import ModalDialog from '@/components/auth/common/ModalDialog.vue'
import moment from 'moment-timezone'
Expand Down Expand Up @@ -305,31 +282,9 @@ export default defineComponent({
authorizationDate: computed<string>(() => {
return strToPacificDate(state.continuationIn?.authorization?.date)
}),
/**
* Whether a continuation in director affidavit is required.
* Is true if the business is a Continued In ULC from Alberta or Nova Scotia.
*/
isContinuationInAffidavitRequired: computed<boolean>(() => {
const entityType = state.continuationIn?.nameRequest?.legalType
const country = state.continuationIn?.foreignJurisdiction?.country
const region = state.continuationIn?.foreignJurisdiction?.region
return (
entityType === CorpTypes.ULC_CONTINUE_IN &&
country === 'CA' &&
(region === 'AB' || region === 'NS')
)
})
})
/** Downloads the director affidavit document. */
async function downloadAffidavitDocument (): Promise<void> {
await download(state.continuationIn?.foreignJurisdiction?.affidavitFileKey,
state.continuationIn?.foreignJurisdiction?.affidavitFileName)
}
/** Downloads the specified authorization document. */
async function downloadAuthorizationDocument (item: { fileKey: string, fileName: string }): Promise<void> {
await download(item.fileKey, item.fileName)
Expand Down Expand Up @@ -362,7 +317,6 @@ export default defineComponent({
return {
errorDialogComponent,
downloadAffidavitDocument,
downloadAuthorizationDocument,
...toRefs(state)
}
Expand Down Expand Up @@ -394,7 +348,6 @@ section:not(:last-child) {
padding-bottom: 0;
}
.download-affidavit-btn,
.download-authorization-btn {
// nudge icon down a bit to line up with text
.v-icon {
Expand Down
15 changes: 0 additions & 15 deletions auth-web/tests/unit/components/HomeJurisdictionInformation.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ describe('HomeJurisdictionInformation component', () => {
expect(wrapper.vm.filing).toEqual(filing)
})

it('computed "isContinuationInAffidavitRequired"', () => {
expect(wrapper.vm.isContinuationInAffidavitRequired).toBe(true)
})

it('rendered the component', () => {
expect(wrapper.findComponent(HomeJurisdictionInformation).exists()).toBe(true)
expect(wrapper.find('#home-jurisdiction-information').exists()).toBe(true)
Expand Down Expand Up @@ -125,17 +121,6 @@ describe('HomeJurisdictionInformation component', () => {
// expect(section.find('#authorization-date').text()).toBe('July 1, 2024')
})

it('rendered a functional affidavit download button', () => {
BusinessService.downloadDocument = vi.fn().mockResolvedValue(null)

const button = wrapper.findAll('section').at(5).find('.download-affidavit-btn')
button.trigger('click')
expect(BusinessService.downloadDocument).toHaveBeenCalledWith('007bd7bd-d421-49a9-9925-03ce561d044f.pdf',
'My Director Affidavit.pdf')

vi.clearAllMocks()
})

it('rendered a functional authorization download button', () => {
BusinessService.downloadDocument = vi.fn().mockResolvedValue(null)

Expand Down

0 comments on commit 85de22b

Please sign in to comment.