Skip to content

Commit

Permalink
24667 - fix missing body for filing when bootstrap business (#108)
Browse files Browse the repository at this point in the history
* 24817 - fix: wrong redirect; missing start date for filngs.

* chore: remove comment.

* 24667 - fix missing body for retrieve business information button when bootsrap business.

* fix: eslint

* fix: lang texts.

* fix: boostrapName missing.

* fix: cleanup log out.
  • Loading branch information
hfekete authored Dec 11, 2024
1 parent 4fece54 commit 4ab05b3
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 24 deletions.
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 || bootstrapName }}&nbsp;{{ $t('text.filing.amalgamation.successfullyAmalgamated') }}.
</p>

<p>{{ $t('text.filing.amalgamation.systemCompletedProcessing') }}</p>
<p class="my-4">
{{ $t('text.filing.common.systemCompletedProcessingFiling') }}
</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, bootstrapName } = 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 || bootstrapName }} {{ $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, bootstrapName } = storeToRefs(useBcrosBusinessBootstrap())
</script>
14 changes: 8 additions & 6 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>
{{ currentBusinessName }}&nbsp;
{{ $t('text.filing.common.hasBeenSuccessfullyIncorporated') }}.
<p class="my-4">
{{ currentBusinessName || bootstrapName }}&nbsp;
{{ $t('text.filing.incorporationApplication.hasBeenSuccessfullyIncorporated') }}.
</p>

<p>{{ $t('text.filing.incorporationApplication.systemCompletedProcessingFiling') }}.</p>
<p class="my-4">
{{ $t('text.filing.common.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, bootstrapName } = storeToRefs(useBcrosBusinessBootstrap())
</script>
12 changes: 7 additions & 5 deletions src/components/bcros/filing/item/RegistrationFiling.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
<template>
<BcrosFilingCommonTemplate :filing="filing" data-cy="registration-filing">
<template #body>
<div v-if="!!tempRegNumber && isStatusCompleted" class="completed-registration-details">
<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 +29,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())
}

0 comments on commit 4ab05b3

Please sign in to comment.