Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

24667 - fix missing body for filing when bootstrap business #108

Merged
merged 10 commits into from
Dec 11, 2024
6 changes: 4 additions & 2 deletions src/components/bcros/filing/CommonTemplate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
</slot>
</div>
</div>

<div v-if="isShowBody" data-cy="filingHistoryItem-body">
<slot name="body">
<!-- is this a generic paid (not yet completed) filing? -->
Expand Down Expand Up @@ -107,7 +106,10 @@ if (filing.value.commentsCount && filing.value.commentsLink) {

const isStatusPaid = computed(() => isFilingStatus(filing.value, FilingStatusE.PAID))
const isStatusApproved = computed(() => isFilingStatus(filing.value, FilingStatusE.APPROVED))
const isShowBody = ref(false)

const url = useRequestURL()
const expandedFilingId = url.searchParams.get('filing_id')
const isShowBody = ref(expandedFilingId && expandedFilingId === filing?.value?.filingId?.toString())

const showDetails = () => {
if (filing.value.documents === undefined && filing.value.documentsLink) {
Expand Down
13 changes: 9 additions & 4 deletions src/components/bcros/filing/item/AmalgamationFiling.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,19 @@
<BcrosFilingCommonFutureEffective v-else-if="isFutureEffective(filing)" :filing="filing" />

<div
v-else-if="!!tempRegNumber && isFilingStatus(props.filing, FilingStatusE.COMPLETED)"
v-else-if="isBootstrapFiling && isFilingStatus(props.filing, FilingStatusE.COMPLETED)"
data-cy="completed-amalgamation-details"
class="pt=5"
>
<strong>{{ $t('text.filing.amalgamation.complete') }}</strong>

<p>{{ currentBusinessName }}&nbsp;{{ $t('text.filing.amalgamation.successfullyAmalgamated') }}.</p>
<p class="my-4">
{{ currentBusinessName }}&nbsp;{{ $t('text.filing.amalgamation.successfullyAmalgamated') }}.
</p>

<p>{{ $t('text.filing.amalgamation.systemCompletedProcessing') }}</p>
<p class="my-4">
{{ $t('text.filing.amalgamation.systemCompletedProcessing') }}
</p>

<BcrosFilingCommonReloadPageWithBizIdBttn :filing="filing" />
</div>
Expand All @@ -40,5 +45,5 @@ const props = defineProps({
filing: { type: Object as PropType<ApiResponseFilingI>, required: true }
})

const tempRegNumber = !!sessionStorage.getItem('TEMP_REG_NUMBER')
const { isBootstrapFiling } = storeToRefs(useBcrosBusinessBootstrap())
</script>
12 changes: 8 additions & 4 deletions src/components/bcros/filing/item/ContinuationIn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,14 @@
</div>

<!-- completed bootstrap filing -->
<div v-else-if="!!tempRegNumber && isStatusCompleted" class="completed-continuation-in-details">
<div v-else-if="isBootstrapFiling && isStatusCompleted" class="pt-5">
<strong>{{ $t('text.filing.continuation.incorporationComplete') }}</strong>
<p>{{ currentBusinessName }} {{ $t('text.filing.continuation.hasBeenSuccessfullyContinuedIn') }}</p>
<p>{{ $t('text.filing.common.systemCompletedProcessingFiling') }}</p>
<p class="my-4">
{{ currentBusinessName }} {{ $t('text.filing.continuation.hasBeenSuccessfullyContinuedIn') }}
</p>
<p class="my-4">
{{ $t('text.filing.common.systemCompletedProcessingFiling') }}
</p>

<BcrosFilingCommonReloadPageWithBizIdBttn :filing="filing" />
</div>
Expand All @@ -54,5 +58,5 @@ const props = defineProps({

const isStatusRejected = isFilingStatus(props.filing, FilingStatusE.REJECTED)
const isStatusCompleted = isFilingStatus(props.filing, FilingStatusE.COMPLETED)
const tempRegNumber = !!sessionStorage.getItem('TEMP_REG_NUMBER')
const { isBootstrapFiling } = storeToRefs(useBcrosBusinessBootstrap())
</script>
10 changes: 6 additions & 4 deletions src/components/bcros/filing/item/IncorporationApplication.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@
<template #body>
<BcrosFilingCommonFutureEffectivePending v-if="isFutureEffectivePending(filing)" :filing="filing" />
<BcrosFilingCommonFutureEffective v-else-if="isFutureEffective(filing)" :filing="filing" />
<div v-else-if="!!tempRegNumber && isStatusCompleted" data-cy="completed-ia-details">
<div v-else-if="isBootstrapFiling && isStatusCompleted" data-cy="completed-ia-details" class="pt-5">
<strong>{{ $t('text.filing.incorporationApplication.completed') }}</strong>

<p>
<p class="my-4">
{{ currentBusinessName }}&nbsp;
{{ $t('text.filing.common.hasBeenSuccessfullyIncorporated') }}.
</p>

<p>{{ $t('text.filing.incorporationApplication.systemCompletedProcessingFiling') }}.</p>
<p class="my-4">
{{ $t('text.filing.incorporationApplication.systemCompletedProcessingFiling') }}.
</p>

<BcrosFilingCommonReloadPageWithBizIdBttn :filing="filing" />
</div>
Expand All @@ -38,5 +40,5 @@ const props = defineProps({
})

const isStatusCompleted = isFilingStatus(props.filing, FilingStatusE.COMPLETED)
const tempRegNumber = !!sessionStorage.getItem('TEMP_REG_NUMBER')
const { isBootstrapFiling } = storeToRefs(useBcrosBusinessBootstrap())
</script>
13 changes: 8 additions & 5 deletions src/components/bcros/filing/item/RegistrationFiling.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
<template>
<BcrosFilingCommonTemplate :filing="filing" data-cy="registration-filing">
<template #body>
<div v-if="!!tempRegNumber && isStatusCompleted" class="completed-registration-details">
{{ bootstrapName }}
<div v-if="isBootstrapFiling && isStatusCompleted" class="pt-5">
<strong>{{ $t('text.filing.registration.completed') }}</strong>

<p>
{{ currentBusinessName || 'This company' }}&nbsp;
<p class="my-4">
{{ currentBusinessName || bootstrapName || 'This company' }}&nbsp;
{{ $t('text.filing.registration.hasBeenSuccessfullyRegistered') }}
</p>

<p>{{ $t('text.filing.common.systemCompletedProcessingFiling') }}</p>
<p class="my-4">
{{ $t('text.filing.common.systemCompletedProcessingFiling') }}
</p>

<BcrosFilingCommonReloadPageWithBizIdBttn :filing="filing" />
</div>
Expand All @@ -27,5 +30,5 @@ const props = defineProps({
})

const isStatusCompleted = isFilingStatus(props.filing, FilingStatusE.COMPLETED)
const tempRegNumber = !!sessionStorage.getItem('TEMP_REG_NUMBER')
const { isBootstrapFiling, bootstrapName } = storeToRefs(useBcrosBusinessBootstrap())
</script>
8 changes: 5 additions & 3 deletions src/utils/navigate.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/** Reloads Filings UI using business id instead of temporary registration number. */
export const reloadWithBusinessId = () => {
export const reloadWithBusinessId = (filing: ApiResponseFilingI) => {
// build the URL to the business dashboard with the business id and any URL parameters
// const url = getDashboardUrl + filing.businessIdentifier // + this.$route.fullPath
const url = window.location.href
window.location.assign(url)
const businessIdentifier = filing.businessIdentifier
const url = new URL(window.location.href)
url.pathname = `/${businessIdentifier}`
window.location.assign(url.toString())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can I test this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

waiting for Patricks PR to get merged in

}