Skip to content

Commit

Permalink
23520 - Handle Continuation Draft States (#696)
Browse files Browse the repository at this point in the history
Merging this code now. Additional changes can be made in a future PR. This is approved by Olga and Mihai (and me).
  • Loading branch information
ArwenQin authored Oct 11, 2024
1 parent 042b873 commit b5e22fb
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 22 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.3.25",
"version": "7.3.26",
"private": true,
"appName": "Filings UI",
"sbcName": "SBC Common Components",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<textarea
v-if="isShowTextarea"
v-auto-resize
class="font-16 font-italic"
class="grey-background px-5 py-3"
readonly
rows="1"
:value="filing.latestReviewComment || '[undefined staff change request message]'"
Expand Down Expand Up @@ -217,4 +217,8 @@ textarea {
// ref: https://developer.mozilla.org/en-US/docs/Web/CSS/field-sizing
// field-sizing: content;
}
.grey-background {
background-color: $gray1;
}
</style>
2 changes: 1 addition & 1 deletion src/components/Dashboard/PendingList/PendingTemplate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<div class="item-header-subtitle">
<span>PENDING STAFF REVIEW</span>
<span class="vert-pipe" />
<span>PAID (filed by {{ submitter }} on <DateTooltip :date="submittedDate" />)</span>
<span>Submitted on <DateTooltip :date="submittedDate" />)</span>
</div>
</slot>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
class="mb-0"
:class="{ 'mt-4': isFutureEffectivePast || isFutureEffective }"
>
This {{ entityType }} Continuation Application is paid. BC Registries will review your
BC Registries will review your
Continuation Authorization documents and contact you with the results within 2 business days.
</p>

Expand Down
51 changes: 47 additions & 4 deletions src/components/Dashboard/TodoList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,19 @@
<span class="vert-pipe" />
<span>PAID (filed by {{ item.submitter }} on <DateTooltip :date="item.submittedDate" />)</span>
</div>

<!-- approved continuation filing -->
<div
v-else-if="EnumUtilities.isStatusApproved(item)"
class="todo-subtitle pt-1"
>
<span
v-if="getNameRequest"
class="list-item__subtitle"
>
NR APPROVED - {{ expiresText(getNameRequest) }}
</span>
</div>
</div> <!-- end of other subtitles -->
</div> <!-- end of todo label -->

Expand Down Expand Up @@ -383,8 +396,7 @@
<span>Register using this NR</span>
</template>
<template v-else-if="EnumUtilities.isTypeContinuationIn(item) && item.isEmptyFiling">
<span v-if="getNameRequest">Continue In using this NR</span>
<span v-else>Continue In as a Numbered Company</span>
<span>Begin Continuation</span>
</template>
<span v-else>Resume</span>
</v-btn>
Expand Down Expand Up @@ -521,6 +533,18 @@
<!-- no action button in this case -->
</template>

<!-- authorization approved continuation filing -->
<template v-else-if="EnumUtilities.isStatusApproved(item)">
<v-btn
class="btn-draft-resume"
color="primary"
:disabled="!item.enabled"
@click.native.stop="doResumeFiling(item)"
>
<span>Resume</span>
</v-btn>
</template>

<!-- change-requested filing -->
<template v-else-if="EnumUtilities.isStatusChangeRequested(item)">
<v-btn
Expand Down Expand Up @@ -603,18 +627,29 @@
<PaymentPending v-else />
</template>

<!-- is this an authorization approved continuation item? -->
<template v-else-if="EnumUtilities.isStatusApproved(item)">
<NameRequestInfo :nameRequest="item.nameRequest" />
</template>

<!-- is this a change-requested item? -->
<template v-else-if="EnumUtilities.isStatusChangeRequested(item)">
<div class="todo-list-detail body-2">
<p
v-if="getNameRequest"
class="list-item__subtitle"
>
NR APPROVED - {{ expiresText(getNameRequest) }}
</p>
<p class="list-item__subtitle">
This {{ item.title }} is paid but requires you to make the following changes:
BC Registries staff require the following changes to your authorization documentation
</p>
<textarea
v-auto-resize
class="font-16 font-italic"
readonly
rows="1"
:value="item.latestReviewComment || '[undefined staff change request message]'"
class="grey-background px-5 py-3"
/>
</div>
</template>
Expand Down Expand Up @@ -853,6 +888,10 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin) {
if (EnumUtilities.isTypeContinuationIn(item)) return true
}
if (EnumUtilities.isStatusApproved(item)) {
if (EnumUtilities.isTypeContinuationIn(item)) return true
}
if (EnumUtilities.isStatusPending(item)) return true
if (this.isAffiliationInvitation(item)) return true
Expand Down Expand Up @@ -2448,4 +2487,8 @@ textarea {
// ref: https://developer.mozilla.org/en-US/docs/Web/CSS/field-sizing
// field-sizing: content;
}
.grey-background {
background-color: $gray1;
}
</style>
2 changes: 1 addition & 1 deletion src/views/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
>
<header>
<h2 class="mb-3">
<span>Pending Staff Review</span>&nbsp;<span class="section-count">({{ pendingCount }})</span>
<span>Pending</span>&nbsp;<span class="section-count">({{ pendingCount }})</span>
</h2>
</header>
<PendingList :highlightId="filingId" />
Expand Down
16 changes: 5 additions & 11 deletions tests/unit/ContinuationIn.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ describe('Continuation In - in To Do list', () => {
expect(wrapper.find('.list-item__actions .btn-draft-resume').text()).toBe('Make Changes')

// verify expansion panel content
expect(wrapper.find('.v-expansion-panel-content').text()).toContain('This BC Limited Company Continuation Application is')
expect(wrapper.find('.v-expansion-panel-content').text()).toContain('paid but requires you to make the following changes:')
expect(wrapper.find('.v-expansion-panel-content').text()).toContain('NR APPROVED - Expires in')
expect(wrapper.find('.v-expansion-panel-content').text()).toContain('BC Registries staff require the following changes to your')
expect((wrapper.find('textarea').element as any)._value).toBe('Authorization document is not legible.')

// cleanup
Expand Down Expand Up @@ -144,12 +144,10 @@ describe('Continuation In - in Pending list', () => {
expect(wrapper.find('.item-header-title').text()).toContain('BC Limited Company Continuation Application')
expect(wrapper.find('.expand-btn').text()).toBe('Hide Details') // open by default
expect(wrapper.find('.item-header-subtitle').text()).toContain('PENDING STAFF REVIEW')
expect(wrapper.find('.item-header-subtitle').text()).toContain('PAID')
expect(wrapper.find('.item-header-subtitle').text()).toContain('(filed by Joe Smith on')
expect(wrapper.find('.item-header-subtitle').text()).toContain('Submitted on')
expect(wrapper.find('.item-header-subtitle').text()).toContain('Jul 23, 2024')

// verify expansion panel content
expect(wrapper.find('.v-expansion-panel-content').text()).toContain('This BC Limited Company Continuation Application is paid.')
expect(wrapper.find('.v-expansion-panel-content').text()).toContain('BC Registries will review your Continuation Authorization documents')
expect(wrapper.find('.v-expansion-panel-content').text()).toContain('and contact you with the results within 2 business days.')

Expand Down Expand Up @@ -186,13 +184,11 @@ describe('Continuation In - in Pending list', () => {
expect(wrapper.find('.item-header-title').text()).toContain('BC Limited Company Continuation Application')
expect(wrapper.find('.expand-btn').text()).toBe('Hide Details') // open by default
expect(wrapper.find('.item-header-subtitle').text()).toContain('PENDING STAFF REVIEW')
expect(wrapper.find('.item-header-subtitle').text()).toContain('PAID')
expect(wrapper.find('.item-header-subtitle').text()).toContain('(filed by Joe Smith on')
expect(wrapper.find('.item-header-subtitle').text()).toContain('Submitted on')
expect(wrapper.find('.item-header-subtitle').text()).toContain('Jul 23, 2024')

// verify expansion panel content
expect(wrapper.find('h4').text()).toBe('Future Effective Incorporation')
expect(wrapper.find('.v-expansion-panel-content').text()).toContain('This BC Limited Company Continuation Application is paid.')
expect(wrapper.find('.v-expansion-panel-content').text()).toContain('BC Registries will review your Continuation Authorization documents')
expect(wrapper.find('.v-expansion-panel-content').text()).toContain('and contact you with the results within 2 business days.')
expect(wrapper.find('.v-expansion-panel-content').text()).toContain('If approved, the incorporation date and time for this company will be')
Expand Down Expand Up @@ -232,13 +228,11 @@ describe('Continuation In - in Pending list', () => {
expect(wrapper.find('.item-header-title').text()).toContain('BC Limited Company Continuation Application')
expect(wrapper.find('.expand-btn').text()).toBe('Hide Details') // open by default
expect(wrapper.find('.item-header-subtitle').text()).toContain('PENDING STAFF REVIEW')
expect(wrapper.find('.item-header-subtitle').text()).toContain('PAID')
expect(wrapper.find('.item-header-subtitle').text()).toContain('(filed by Joe Smith on')
expect(wrapper.find('.item-header-subtitle').text()).toContain('Submitted')
expect(wrapper.find('.item-header-subtitle').text()).toContain('Jul 23, 2024')

// verify expansion panel content
expect(wrapper.find('h4').text()).toBe('Future Effective Incorporation')
expect(wrapper.find('.v-expansion-panel-content').text()).toContain('This BC Limited Company Continuation Application is paid.')
expect(wrapper.find('.v-expansion-panel-content').text()).toContain('BC Registries will review your Continuation Authorization documents')
expect(wrapper.find('.v-expansion-panel-content').text()).toContain('and contact you with the results within 2 business days.')
expect(wrapper.find('.v-expansion-panel-content').text()).toContain('If approved, the incorporation date and time for this company will be recorded as')
Expand Down

0 comments on commit b5e22fb

Please sign in to comment.