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

16079 Fixed Approval Type component and other bugs #587

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

severinbeauvais
Copy link
Collaborator

@severinbeauvais severinbeauvais commented Sep 10, 2024

Issue #: bcgov/entity#16079

Description of changes:

  • rebuilt package lock file (clean install)
  • 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

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the bcrs-entities-create-ui license (Apache 2.0).

@severinbeauvais severinbeauvais self-assigned this Sep 10, 2024
"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",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

To match latest vue-template-compiler and fix a npm warning.

@@ -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",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Lodash's recommendation is to no longer use the per-method packages so I removed this and simply use omit from the main lodash package.

@@ -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()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This doesn't wait long enough for some components to complete validation.

@@ -23,7 +23,7 @@ export enum ComponentsCompanyInfo {
'memorandum',
'special-resolution-editor',
'special-resolution-signing-party',
'applicant-relationship-section',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Renamed and fixed order. (See comment at top of this file.)

approvalType: ApprovalTypes
approvalTypeValid: boolean
businessNameValid: boolean
Copy link
Collaborator Author

@severinbeauvais severinbeauvais Sep 10, 2024

Choose a reason for hiding this comment

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

These are totally "decoys" and wasted a good chunk of my time. Instead of these, the companyFlags object is used.

}
if (filing.restoration.applicationDate) {
this.getRestoration.applicationDate = filing.restoration.applicationDate
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was missed initially.

@@ -1094,20 +1099,20 @@ export default class FilingTemplateMixin extends DateMixin {
})

// store Folio Number
// FUTURE: should we store correction.folioNumber instead?
this.setFolioNumber(entitySnapshot?.authInfo?.folioNumber || '')
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Instead of falling back to save the default value (which isn't our job; the defaults should be in one place only), I rewrote this. (Also below.)


// store File Number and POA
this.setFileNumber(filing.restoration.courtOrder?.fileNumber)
this.setHasPlanOfArrangement(filing.restoration.courtOrder?.hasPlanOfArrangement)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We already store the court order object on line 436, and we don't care about POA.

@@ -7,6 +7,7 @@
"strictNullChecks": false,
"jsx": "preserve",
"importHelpers": true,
"resolveJsonModule": true,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

To match Filings UI.

@Getter(useStore) hasBusinessNameChanged!: boolean
@Getter(useStore) haveNameTranslationsChanged!: boolean
@Getter(useStore) isLimitedRestorationExtension!: boolean
@Getter(useStore) isLimitedRestorationToFull!: boolean

get isApprovalTypeCourtOrder (): boolean {
return !!this.getRestorationApprovalCourtOrderNumber
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the only place this is needed, so I moved it here from the store.

- 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
@severinbeauvais
Copy link
Collaborator Author

/gcbrun

@bcregistry-sre
Copy link
Collaborator

Temporary Url for review: https://business-edit-dev--pr-587-eiza1jnf.web.app

Copy link
Collaborator

@ArwenQin ArwenQin left a comment

Choose a reason for hiding this comment

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

Looks good

Copy link
Collaborator

@JazzarKarim JazzarKarim left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@severinbeauvais severinbeauvais merged commit d17ff63 into bcgov:main Sep 11, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants