Skip to content

Commit

Permalink
- rebuilt package lock file (clean install) (#587)
Browse files Browse the repository at this point in the history
- app version = 4.10.10
- misc package updates
- updated tsconfig.json to match other UI projects
- fixed validation issue (changed nextTick to flushPromises)
- updated use of ApprovalType in ExtendTimeLimit.vue
- added validation in ExtendTimeLimit.vue
- moved getter from store into YourCompanySummary.vue
- fixed section validation order
- deleted obsolete (decoy!) state variables
- now save and restore notice date and application date in restoration filing!
- deleted obsolete POA from filing
- removed / cleaned up some store getters
- updated use of ApprovalType in LimitedRestorationToFull.vue
- added validation in LimitedRestorationToFull.vue
- misc whitespace fixes
- misc cleanup
- updated unit tests

Co-authored-by: Severin Beauvais <[email protected]>
  • Loading branch information
severinbeauvais and Severin Beauvais authored Sep 11, 2024
1 parent 63c91c1 commit d17ff63
Show file tree
Hide file tree
Showing 18 changed files with 2,545 additions and 1,154 deletions.
3,416 changes: 2,405 additions & 1,011 deletions package-lock.json

Large diffs are not rendered by default.

11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "business-edit-ui",
"version": "4.10.9",
"version": "4.10.10",
"private": true,
"appName": "Edit UI",
"sbcName": "SBC Common Components",
Expand All @@ -15,7 +15,7 @@
"dependencies": {
"@babel/compat-data": "^7.21.5",
"@bcrs-shared-components/action-chip": "1.1.5",
"@bcrs-shared-components/approval-type": "1.0.19",
"@bcrs-shared-components/approval-type": "1.1.0",
"@bcrs-shared-components/base-address": "2.0.3",
"@bcrs-shared-components/breadcrumb": "2.1.5",
"@bcrs-shared-components/business-lookup": "1.3.4",
Expand Down Expand Up @@ -44,15 +44,14 @@
"http-status-codes": "^2.2.0",
"launchdarkly-js-client-sdk": "^2.24.2",
"lodash": "^4.17.21",
"lodash.omit": "^4.5.0",
"pdfjs-dist": "3.9.179",
"pinia": "^2.0.35",
"pinia-class": "^0.0.3",
"regenerator-runtime": "^0.13.11",
"sbc-common-components": "3.0.13",
"tiptap-vuetify": "^2.24.0",
"uuid": "^9.0.0",
"vue": "2.7.14",
"vue": "2.7.16",
"vue-affix": "^0.5.2",
"vue-hotjar": "^1.4.0",
"vue-router": "^3.6.5",
Expand All @@ -66,7 +65,7 @@
"devDependencies": {
"@esbuild-plugins/node-modules-polyfill": "0.2.2",
"@pinia/testing": "^0.0.16",
"@types/lodash": "^4.14.194",
"@types/lodash": "^4.17.7",
"@types/sinon": "^10.0.14",
"@types/vue-the-mask": "^0.11.1",
"@types/vuelidate": "^0.7.16",
Expand All @@ -87,7 +86,7 @@
"vite": "4.5.2",
"vite-plugin-environment": "^1.1.3",
"vitest": "0.33.0",
"volar-service-vetur": "^0.0.54",
"volar-service-vetur": "^0.0.62",
"vue-property-decorator": "^9.1.2",
"vue-test-utils-helpers": "git+https://github.com/bcgov/vue-test-utils-helpers.git",
"vuelidate-property-decorators": "1.0.28",
Expand Down
20 changes: 12 additions & 8 deletions src/components/Restoration/ExtendTimeLimit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,21 @@
</v-row>
</section>

<!-- Vuetify Divider Line to separate approval type -->
<v-divider />

<!-- Approval Type -->
<section
v-if="showApprovalType"
id="approval-type-section"
class="section-container"
:class="{ 'invalid-section': !getApprovalTypeValid }"
>
<ApprovalType
:courtOrderNumber="getCourtOrderNumberText"
:isCourtOrderOnly="true"
class="pa-8"
:courtOrderNumber="getRestorationCourtOrderNumber"
:approvedByCourtOrder="true"
:isCourtOrderRadio="false"
:invalidSection="!getApprovalTypeValid"
@courtNumberChange="setRestorationCourtOrder({ fileNumber: $event })"
:validate="getComponentValidate"
@courtNumberChange="onCourtNumberChange($event)"
@valid="setApprovalTypeValid($event)"
/>
</section>
Expand Down Expand Up @@ -75,9 +74,10 @@ import { useStore } from '@/store/store'
})
export default class ExtendTimeLimit extends Mixins(DateMixin) {
@Getter(useStore) getApprovalTypeValid!: boolean
@Getter(useStore) getCourtOrderNumberText!: string
@Getter(useStore) getComponentValidate!: boolean
@Getter(useStore) getCurrentDate!: string
@Getter(useStore) getExpiryValid!: boolean
@Getter(useStore) getRestorationCourtOrderNumber!: string
@Getter(useStore) getRestorationExpiryDate!: string
@Getter(useStore) getStateFilingRestoration!: StateFilingRestorationIF
Expand All @@ -88,7 +88,7 @@ export default class ExtendTimeLimit extends Mixins(DateMixin) {
/** Whether to show the Approval Type component. */
get showApprovalType (): boolean {
// was previously filed limited restoration approved via court order?
// was original limited restoration approved via court order?
return (this.getStateFilingRestoration?.approvalType === ApprovalTypes.VIA_COURT_ORDER)
}
Expand Down Expand Up @@ -120,6 +120,10 @@ export default class ExtendTimeLimit extends Mixins(DateMixin) {
// add the new expiry months to the original expiry date
this.setRestorationExpiryDate(DateUtilities.addMonthsToDate(months, this.stateFilingExpiry))
}
onCourtNumberChange (fileNumber: string): void {
this.setRestorationCourtOrder({ fileNumber })
}
}
</script>

Expand Down
17 changes: 11 additions & 6 deletions src/components/Restoration/YourCompanySummary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@
<div>Applicant's relationship: {{ relationshipString }}</div>
</v-col>
</v-row>

<v-row
v-if="getIsRestorationTypeCourtOrder"
v-if="isApprovalTypeCourtOrder"
no-gutters
class="mt-3"
>
Expand All @@ -86,11 +87,12 @@
Approved by Court Order
</div>
<div v-if="courtOrder">
Court Order Number: {{ getCourtOrderNumberText }}
Court Order Number: {{ getRestorationCourtOrderNumber }}
</div>
</v-col>
</v-row>
</div>

<v-divider class="mx-4 my-1" />

<!-- Office Addresses -->
Expand Down Expand Up @@ -119,18 +121,21 @@ export default class YourCompanySummary extends Vue {
readonly ApprovalTypes = ApprovalTypes
@Getter(useStore) getBusinessNumber!: string
@Getter(useStore) getCourtOrderNumberText!: string
@Getter(useStore) getIsRestorationTypeCourtOrder!: boolean
@Getter(useStore) getNameRequestLegalName!: string
@Getter(useStore) getNameRequestNumber!: string
@Getter(useStore) getRelationships!: RelationshipTypes[]
@Getter(useStore) getRestoration!: RestorationStateIF
@Getter(useStore) getRestorationCourtOrderNumber!: string
@Getter(useStore) getRestorationExpiryText!: string
@Getter(useStore) getRestorationRelationships!: RelationshipTypes[]
@Getter(useStore) hasBusinessNameChanged!: boolean
@Getter(useStore) haveNameTranslationsChanged!: boolean
@Getter(useStore) isLimitedRestorationExtension!: boolean
@Getter(useStore) isLimitedRestorationToFull!: boolean
get isApprovalTypeCourtOrder (): boolean {
return !!this.getRestorationCourtOrderNumber
}
get courtOrder (): CourtOrderIF {
return this.getRestoration.courtOrder
}
Expand All @@ -141,7 +146,7 @@ export default class YourCompanySummary extends Vue {
}
get relationshipString (): string {
return this.getRelationships.join(', ') || '[Unknown]'
return this.getRestorationRelationships.join(', ') || '[Unknown]'
}
}
</script>
Expand Down
3 changes: 2 additions & 1 deletion src/components/ViewWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ import { SessionStorageKeys } from 'sbc-common-components/src/util/constants'
import { ComponentsCompanyInfo, ComponentsReviewCertify } from '@/enums/'
import { FeeSummaryActions } from '@bcrs-shared-components/enums/'
import { useStore } from '@/store/store'
import flushPromises from 'flush-promises'
@Component({
components: {
Expand Down Expand Up @@ -288,7 +289,7 @@ export default class ViewWrapper extends Mixins(CommonMixin, FilingTemplateMixin
this.setComponentValidate(true)
// Wait to allow component validation to complete.
await this.$nextTick()
await flushPromises()
// Evaluate valid flags. Scroll to invalid components or continue to review.
if (this.validateAndScroll(this.getFlagsCompanyInfo, ComponentsCompanyInfo)) {
Expand Down
2 changes: 1 addition & 1 deletion src/enums/componentsCompanyInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export enum ComponentsCompanyInfo {
'memorandum',
'special-resolution-editor',
'special-resolution-signing-party',
'applicant-relationship-section',
'approval-type-section',
'relationships-panel',
'extension-time-section'
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface FlagsCompanyInfoIF {
isValidMemorandum: boolean
isValidSpecialResolution: boolean
isValidSpecialResolutionSignature: boolean
isValidApprovalType: boolean
isValidRelationship: boolean
isValidApprovalType: boolean
isValidExtensionTime: boolean
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,18 @@ import { ApprovalTypes, RestorationTypes, RelationshipTypes } from '@/enums'
import { CourtOrderIF } from '@/interfaces/alteration-interfaces'

export interface RestorationStateIF {
applicationDate?: string // YYYY-MM-DD
approvalType: ApprovalTypes
approvalTypeValid: boolean
businessNameValid: boolean
courtOrder?: CourtOrderIF
type: RestorationTypes
expiry?: string // YYYY-MM-DD
expiryValid: boolean
noticeDate?: string // YYYY-MM-DD
relationships: RelationshipTypes[]
}

export interface StateFilingRestorationIF {
applicationDate?: string // YYYY-MM-DD
approvalType: ApprovalTypes
approvalTypeValid: boolean
businessNameValid: boolean
courtOrder?: CourtOrderIF
expiry?: string // YYYY-MM-DD
noticeDate?: string // YYYY-MM-DD
Expand Down
2 changes: 1 addition & 1 deletion src/mixins/common-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default class CommonMixin extends Vue {
}

/**
* Identifies the first invalid flag and scrolls to the component.
* Identifies the first invalid flag and scrolls to the respective component.
* @param flags list of current component validity flags
* @param components list of current component IDs
* @return whether all components are valid
Expand Down
Loading

0 comments on commit d17ff63

Please sign in to comment.