Skip to content

Commit

Permalink
- app version = 5.12.0
Browse files Browse the repository at this point in the history
- generalized page blurb functionality
- always show fee summary
- added special case for page header
- added special case for filing label
- added special route check
- replaced status Change Requested with Approved (FOR TESTING ONLY)
- added special continuation in authorization steps
- added special case for file and pay button label
- reverted some previous changes
- renamed first step/ route/ view
- removed Business Home (authorization) summary page validation
- renamed a store getter
- added special case for dialog filing title
- added page blurbs to continuation in resource files
- separated auth step from the rest
- deleted obsolete dissolution resource objects
- added some store getters
- misc cleanup
- misc WIP

- updated layouts per new designs
- removed confirmation checkbox from extrapro registration component
- removed isConfirmed
- added Authorization Contact Information to step 0 page
- fixed lint issues
- updated unit tests

wip

- imported updated shared date picker
- updated breadcrumb to match header
- allow filing of continuation authorization
- cleared date picker append icon
- more WIP

wip

- implemented validation
- renamed ContinuationAuthorization -> AuthorizationProof
- misc cleanup

wip
  • Loading branch information
Severin Beauvais committed Sep 24, 2024
1 parent 9863699 commit d5905f1
Show file tree
Hide file tree
Showing 41 changed files with 526 additions and 621 deletions.
40 changes: 32 additions & 8 deletions 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 package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "business-create-ui",
"version": "5.11.19",
"version": "5.12.0",
"private": true,
"appName": "Create UI",
"sbcName": "SBC Common Components",
Expand All @@ -25,7 +25,7 @@
"@bcrs-shared-components/corp-type-module": "1.0.16",
"@bcrs-shared-components/correct-name": "1.0.55",
"@bcrs-shared-components/court-order-poa": "3.0.11",
"@bcrs-shared-components/date-picker": "1.3.1",
"@bcrs-shared-components/date-picker": "1.3.3",
"@bcrs-shared-components/document-delivery": "1.2.0",
"@bcrs-shared-components/effective-date-time": "1.1.15",
"@bcrs-shared-components/enums": "1.1.11",
Expand Down
79 changes: 58 additions & 21 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,10 @@
</header>

<p
v-if="isFirmDissolution"
v-if="getPageBlurb"
class="mt-4"
>
Confirm the following information, select the dissolution date and certify
your dissolution before filing.
{{ getPageBlurb }}
</p>

<Stepper
Expand Down Expand Up @@ -199,9 +198,8 @@
cols="12"
lg="3"
>
<!-- Render fee summary only after data is loaded, -->
<!-- and if this isn't a change-requested filing. -->
<aside v-if="haveData && getFilingStatus !== FilingStatus.CHANGE_REQUESTED">
<!-- Render fee summary only after data is loaded. -->
<aside v-if="haveData">
<affix
relative-element-selector=".col-lg-9"
:offset="{ top: 100, bottom: -100 }"
Expand Down Expand Up @@ -273,6 +271,7 @@ import { EntityStates, ErrorTypes, FilingCodes, FilingNames, FilingStatus, Filin
StaffPaymentOptions } from '@/enums'
import { SessionStorageKeys } from 'sbc-common-components/src/util/constants'
import { CorpTypeCd } from '@bcrs-shared-components/corp-type-module'
import { ContinuationInStepsAuthorization } from './resources/ContinuationIn/steps'
@Component({
components: {
Expand Down Expand Up @@ -302,6 +301,7 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
@Getter(useStore) getFilingType!: FilingTypes
@Getter(useStore) getHaveChanges!: boolean
@Getter(useStore) getOrgInformation!: OrgInformationIF
@Getter(useStore) getPageBlurb!: string
@Getter(useStore) getSteps!: Array<StepIF>
@Getter(useStore) getUserFirstName!: string
@Getter(useStore) getUserLastName!: string
Expand All @@ -310,6 +310,8 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
// @Getter(useStore) isAmalgamationFilingHorizontal!: boolean
// @Getter(useStore) isAmalgamationFilingRegular!: boolean
// @Getter(useStore) isAmalgamationFilingVertical!: boolean
@Getter(useStore) isAuthorizationStatus!: boolean
// @Getter(useStore) isContinuationInAuthorization!: boolean
@Getter(useStore) isContinuationInFiling!: boolean
@Getter(useStore) isDissolutionFiling!: boolean
@Getter(useStore) isIncorporationFiling!: boolean
Expand Down Expand Up @@ -389,7 +391,7 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
const crumbs: Array<BreadcrumbIF> = [
getEntityDashboardBreadcrumb(),
{
text: this.getFilingName,
text: this.header,
to: { name: this.$route.name }
}
]
Expand Down Expand Up @@ -417,9 +419,10 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
return `${this.getFilingName} (Horizontal Short-form)`
} else if (this.isAmalgamationFilingVertical) {
return `${this.getFilingName} (Vertical Short-form)`
} else {
return this.getFilingName
} else if (this.isContinuationInAuthorization) {
return 'Continuation Authorization'
}
return this.getFilingName
}
/** Data for fee summary component. */
Expand Down Expand Up @@ -475,15 +478,13 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
)
}
/** Whether the current filing is a firm dissolution. */
get isFirmDissolution (): boolean {
return (this.isEntityFirm && this.isDissolutionFiling)
}
/** The fee summary filing label. */
get filingLabel (): string {
// text override for firm dissolutions
return this.isFirmDissolution ? 'Dissolution' : null
if (this.isEntityFirm && this.isDissolutionFiling) return 'Dissolution'
// text override for continuation in authorizations
if (this.isContinuationInAuthorization) return 'Continuation Authorization'
return null
}
/** The About text. */
Expand Down Expand Up @@ -771,6 +772,24 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
await this.loadPartiesInformation(this.getBusinessId)
}
// special route check for Continuation In filing
if (this.isContinuationInFiling) {
if (this.isAuthorizationStatus) {
// make sure user is on the Continuation In Authorization route
if (this.$route.name !== RouteNames.CONTINUATION_IN_AUTHORIZATION) {
this.$router.replace(RouteNames.CONTINUATION_IN_AUTHORIZATION).catch(() => {})
return
}
} else {
// make sure user is on Continuation In Business BC route
if (this.$route.name !== RouteNames.CONTINUATION_IN_BUSINESS_BC) {
this.$router.replace(RouteNames.CONTINUATION_IN_BUSINESS_BC).catch(() => {})
return
}
}
}
// default route check:
// if user is on a route not valid for the current filing type
// then try to re-route them
if (this.$route.meta.filingType !== this.getFilingType) {
Expand All @@ -785,8 +804,8 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
}
return
case FilingTypes.CONTINUATION_IN:
this.$router.replace(RouteNames.CONTINUATION_IN_BUSINESS_HOME).catch(() => {})
return
// should never get here -- already handled above
throw new Error('Invalid code path for Continuation In')
case FilingTypes.DISSOLUTION:
if (this.isEntityFirm) {
this.$router.replace(RouteNames.DISSOLUTION_FIRM).catch(() => {})
Expand Down Expand Up @@ -867,7 +886,9 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
// NB: will throw if API error
let draftFiling = await LegalServices.fetchFirstTask(businessId)
// set filing type and status
this.setFilingType(draftFiling.header.name)
this.setFilingStatus(draftFiling.header.status)
// check if filing is in a valid state to be edited
this.filingNotExistDialog = (draftFiling?.header?.status !== FilingStatus.DRAFT)
Expand Down Expand Up @@ -924,13 +945,21 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
// NB: will throw if API error
let draftFiling = await LegalServices.fetchFirstOrOnlyFiling(tempId)
// set filing type and status
this.setFilingType(draftFiling.header.name)
this.setFilingStatus(draftFiling.header.status)
// *** TODO: remove after testing
if (draftFiling.header.status === FilingStatus.CHANGE_REQUESTED) {
this.setFilingStatus(FilingStatus.APPROVED)
} else {
this.setFilingStatus(draftFiling.header.status)
}
// check if filing is in a valid state to be edited
this.filingNotExistDialog = (
draftFiling?.header?.status !== FilingStatus.DRAFT &&
draftFiling?.header?.status !== FilingStatus.CHANGE_REQUESTED
draftFiling?.header?.status !== FilingStatus.CHANGE_REQUESTED &&
draftFiling?.header?.status !== FilingStatus.APPROVED
)
if (this.filingNotExistDialog) return null // don't continue
Expand Down Expand Up @@ -958,6 +987,10 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
}
this.parseContinuationInDraft(draftFiling)
resources = ContinuationInResources.find(x => x.entityType === this.getEntityType) as ResourceIF
// special case for Continuation In Authorizations
if (this.isAuthorizationStatus) {
resources.steps = ContinuationInStepsAuthorization
}
break
case FilingTypes.INCORPORATION_APPLICATION:
draftFiling = {
Expand Down Expand Up @@ -1320,7 +1353,10 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
}
}
/** Called initially and when $route property changes (ie, on step changes). */
/**
* Called when $route property changes (ie, on step changes).
* Is also called initially without needing { immediate: true }.
*/
@Watch('$route', { immediate: false })
private async onRouteChanged (): Promise<void> {
// init only if we are not on signin or signout route
Expand Down Expand Up @@ -1368,7 +1404,8 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
this.setShowErrors(true)
}
// enable validation right away if user is changing a submitted filing
// enable validation right away if user is editing a submitted filing
// used for continuation in filings only atm
if (this.getFilingStatus === FilingStatus.CHANGE_REQUESTED) {
this.setShowErrors(true)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-->
<div
v-if="authorization"
id="continuation-authorization"
id="authorization-proof"
>
<v-card
flat
Expand Down Expand Up @@ -43,6 +43,7 @@
:inputRules="getShowErrors ? authorizationDateRules : []"
:minDate="minAuthorizationDate"
:maxDate="getCurrentDate"
:appendIcon="null"
@emitDateSync="authorization.date = $event"
/>
</v-col>
Expand Down Expand Up @@ -173,7 +174,7 @@ import { Action, Getter } from 'pinia-class'
import { StatusCodes } from 'http-status-codes'
import { useStore } from '@/store/store'
import { DocumentMixin } from '@/mixins'
import { ContinuationAuthorizationIF, ExistingBusinessInfoIF, FormIF, PresignedUrlIF } from '@/interfaces'
import { AuthorizationProofIF, ExistingBusinessInfoIF, FormIF, PresignedUrlIF } from '@/interfaces'
import { FilingStatus, PdfPageSize } from '@/enums'
import { VuetifyRuleFunction } from '@/types'
import FileUploadPreview from '@/components/common/FileUploadPreview.vue'
Expand All @@ -191,7 +192,7 @@ import MessageBox from '@/components/common/MessageBox.vue'
AutoResize
}
})
export default class ExtraproRegistration extends Mixins(DocumentMixin) {
export default class AuthorizationProof extends Mixins(DocumentMixin) {
// Refs
$refs!: {
authorizationDateRef: DatePickerShared,
Expand All @@ -200,17 +201,17 @@ export default class ExtraproRegistration extends Mixins(DocumentMixin) {
readonly PdfPageSize = PdfPageSize
@Getter(useStore) getContinuationAuthorization!: ContinuationAuthorizationIF
@Getter(useStore) getContinuationInAuthorizationProof!: AuthorizationProofIF
@Getter(useStore) getCurrentDate!: string
@Getter(useStore) getExistingBusinessInfo!: ExistingBusinessInfoIF
@Getter(useStore) getFilingStatus!: FilingStatus
@Getter(useStore) getKeycloakGuid!: string
@Getter(useStore) getShowErrors!: boolean
@Action(useStore) setContinuationAuthorization!: (x: ContinuationAuthorizationIF) => void
@Action(useStore) setContinuationAuthorization!: (x: AuthorizationProofIF) => void
// Local properties
authorization = null as ContinuationAuthorizationIF
authorization = null as AuthorizationProofIF
authorizationDateValid = false
fileValidity = false
customErrorMessage = ['', '', '', '', ''] // max 5 files
Expand Down Expand Up @@ -277,8 +278,8 @@ export default class ExtraproRegistration extends Mixins(DocumentMixin) {
/** Called when this component is mounted. */
mounted (): void {
this.authorization = this.getContinuationAuthorization ||
{ files: [], date: null } as ContinuationAuthorizationIF
this.authorization = this.getContinuationInAuthorizationProof ||
{ files: [], date: null } as AuthorizationProofIF
}
/**
Expand Down
Loading

0 comments on commit d5905f1

Please sign in to comment.