Skip to content

Commit

Permalink
- pre-upgrade (lint and other misc cleanup)
Browse files Browse the repository at this point in the history
- app version = 4.2.1
  • Loading branch information
severinbeauvais committed Sep 14, 2022
1 parent 7390982 commit 3355305
Show file tree
Hide file tree
Showing 92 changed files with 1,000 additions and 966 deletions.
30 changes: 15 additions & 15 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": "4.2.0",
"version": "4.2.1",
"private": true,
"appName": "Create UI",
"sbcName": "SBC Common Components",
Expand Down Expand Up @@ -38,7 +38,7 @@
"array.prototype.move": "0.0.4",
"axios": "^0.21.1",
"core-js": "^3.6.5",
"http-status-codes": "^1.4.0",
"http-status-codes": "^2.2.0",
"launchdarkly-js-client-sdk": "^2.18.0",
"lodash": "^4.17.20",
"pdfjs-dist": "2.0.943",
Expand Down
31 changes: 17 additions & 14 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
import axios from 'axios'
import { Component, Mixins, Watch } from 'vue-property-decorator'
import { Action, Getter } from 'vuex-class'
import { PAYMENT_REQUIRED } from 'http-status-codes'
import { StatusCodes } from 'http-status-codes'
import { cloneDeep } from 'lodash'
import * as Sentry from '@sentry/browser'
import { getFeatureFlag, updateLdUser, navigate, sleep } from '@/utils'
Expand Down Expand Up @@ -368,7 +368,7 @@ export default class App extends Mixins(

/** Data for fee summary component. */
get feeFilingData (): Array<FilingDataIF> {
let filingData: Array<FilingDataIF> = []
let filingData = [] as Array<FilingDataIF>
if (this.getFilingData) {
filingData = cloneDeep(this.getFilingData)
if (this.isTypeCoop && this.getFilingData.length > 0) {
Expand Down Expand Up @@ -414,6 +414,7 @@ export default class App extends Mixins(
this.fileAndPayInvalidNameRequestDialog
)
}

/** The Fee Summary filing text for businesses. */
get filingLabelText (): string {
// text ovveride for firm dissolutions
Expand All @@ -433,6 +434,7 @@ export default class App extends Mixins(
case FilingTypes.VOLUNTARY_DISSOLUTION: return 'Filing'
}
}

// check to use stepper view or not
get isStepperView (): boolean {
return !this.$route.meta.noStepper
Expand All @@ -444,7 +446,7 @@ export default class App extends Mixins(
}

/** Called when component is created. */
async created (): Promise<void> {
protected async created (): Promise<void> {
// update Current Js Date now and every 1 minute thereafter
await this.updateCurrentJsDate()
this.updateCurrentJsDateId = setInterval(this.updateCurrentJsDate, 60000)
Expand All @@ -467,7 +469,7 @@ export default class App extends Mixins(
this.saveErrors = error?.response?.data?.errors || []
this.saveWarnings = error?.response?.data?.warnings || []

if (error?.response?.status === PAYMENT_REQUIRED) {
if (error?.response?.status === StatusCodes.PAYMENT_REQUIRED) {
// changes were saved if a 402 is received, so clear flag
this.setHaveChanges(false)
this.paymentErrorDialog = true
Expand Down Expand Up @@ -498,7 +500,7 @@ export default class App extends Mixins(
}

/** Called when component is destroyed. */
private destroyed (): void {
protected beforeDestroy (): void {
// stop Update Current Js Date timer
clearInterval(this.updateCurrentJsDateId)

Expand Down Expand Up @@ -530,7 +532,7 @@ export default class App extends Mixins(
}

/** Called to navigate to dashboard. */
private goToDashboard (force: boolean = false): void {
private goToDashboard (force = false): void {
// check if there are no data changes
if (!this.getHaveChanges || force) {
// navigate to dashboard
Expand Down Expand Up @@ -564,8 +566,8 @@ export default class App extends Mixins(
}

/** The list of completing parties. */
completingParties (): CompletingPartyIF {
let completingParty = null
private getCompletingParties (): CompletingPartyIF {
let completingParty = null as CompletingPartyIF
if (!this.isRoleStaff) { // if staff role set as null
completingParty = {
firstName: this.getUserFirstName,
Expand All @@ -583,18 +585,19 @@ export default class App extends Mixins(
phone: this.getUserPhone
}
} else {
// setting blank firstname an lastname for staff role
// set blank firstname and lastname for staff role
completingParty = {
firstName: '',
lastName: ''
lastName: '',
mailingAddress: null
}
}

return completingParty
}

/** Fetches NR data and fetches draft filing. */
private async fetchData (routeChanged: boolean = false): Promise<void> {
private async fetchData (routeChanged = false): Promise<void> {
// only fetch data on first route change
if (routeChanged && this.haveData) return

Expand Down Expand Up @@ -634,7 +637,7 @@ export default class App extends Mixins(
})

// set completing party before draft filing dissolution create
this.setCompletingParty(this.completingParties())
this.setCompletingParty(this.getCompletingParties())

// fetch the draft filing and resources
try {
Expand Down Expand Up @@ -905,7 +908,7 @@ export default class App extends Mixins(
// get auth org info for dissolution only
// (this data is not available for an IA)
if (this.isDissolutionFiling) {
let { contacts, folioNumber } = await AuthServices.fetchAuthInfo(this.getBusinessId)
const { contacts, folioNumber } = await AuthServices.fetchAuthInfo(this.getBusinessId)
if (contacts?.length > 0) {
this.setBusinessContact(contacts[0])
}
Expand Down Expand Up @@ -1058,7 +1061,7 @@ export default class App extends Mixins(
/** Gets and stores parties info . */
private async loadPartiesInformation (): Promise<any> {
// NB: will throw if API error
let parties = await LegalServices.fetchParties(this.getBusinessId)
const parties = await LegalServices.fetchParties(this.getBusinessId)

if (parties?.parties?.length > 0) {
this.setParties(parties.parties)
Expand Down
8 changes: 4 additions & 4 deletions src/components/Dissolution/AssociationDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,12 @@ export default class AssociationDetails extends Mixins(CommonMixin, EnumMixin, D
Any changes made will be applied immediately.`
/** The entity name. */
private get entityName (): string {
get entityName (): string {
return this.getBusinessLegalName || `${this.getCorpTypeNumberedDescription(this.getEntityType)}`
}
/** The entity description. */
private get entityDescription (): string {
get entityDescription (): string {
return `${this.getCorpTypeDescription(this.getEntityType)}`
}
Expand All @@ -161,12 +161,12 @@ export default class AssociationDetails extends Mixins(CommonMixin, EnumMixin, D
}
/** Whether the address object is empty. */
private isEmptyAddress (address: AddressIF): boolean {
protected isEmptyAddress (address: AddressIF): boolean {
return isEmpty(address)
}
/** Event handler for contact information changes. */
private async onContactInfoChange (event: ContactPointIF): Promise<void> {
protected async onContactInfoChange (event: ContactPointIF): Promise<void> {
// temporarily ignore data changes
this.setIgnoreChanges(true)
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dissolution/CareAndCustodySelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default class CareAndCustodySelect extends Vue {
readonly RoleTypes = RoleTypes
protected liquidatorOrCustodian: RoleTypes = null
protected liquidatorOrCustodian = null as RoleTypes
protected changeCareAndCustodyType (): void {
// Todo: Apply option to store when required
Expand Down
34 changes: 17 additions & 17 deletions src/components/Dissolution/CompleteAffidavit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@
:inputFile="uploadAffidavitDoc"
:showErrors="getShowErrors"
:customErrorMessage="fileUploadCustomErrorMsg"
@fileSelected="fileSelected"
@isFileValid="onFileUploadValid"
@fileSelected="fileSelected($event)"
@isFileValid="onFileUploadValid($event)"
/>
</v-col>
</v-row>
Expand Down Expand Up @@ -199,14 +199,14 @@ export default class CompleteAffidavit extends Mixins(CommonMixin, DocumentMixin
confirmAffidavitChk: FormIF
}
private INPUT_FILE_LABEL = 'Affidavit'
private hasValidUploadFile = false
private hasAffidavitConfirmed = false
private affidavitConfirmed = false
private fileUploadCustomErrorMsg: string = ''
private uploadAffidavitDoc: File = null
private uploadAffidavitDocKey: string = null
private helpToggle = false
readonly INPUT_FILE_LABEL = 'Affidavit'
protected hasValidUploadFile = false
protected hasAffidavitConfirmed = false
protected affidavitConfirmed = false
protected fileUploadCustomErrorMsg = ''
protected uploadAffidavitDoc = null as File
protected uploadAffidavitDocKey = null as string
protected helpToggle = false
// Global getters
@Getter getAffidavitResources!: AffidavitResourceIF
Expand Down Expand Up @@ -243,7 +243,7 @@ export default class CompleteAffidavit extends Mixins(CommonMixin, DocumentMixin
return this.isTypeCoop ? 'Cooperative Association' : 'Company'
}
private confirmCompletionAffidavit = [
readonly confirmCompletionAffidavit = [
(v) => { return !!v }
]
Expand All @@ -252,12 +252,12 @@ export default class CompleteAffidavit extends Mixins(CommonMixin, DocumentMixin
this.uploadAffidavitDocKey = null
}
private onFileUploadValid (val) {
protected onFileUploadValid (val) {
this.hasValidUploadFile = val
this.updateAffidavitStepValidity()
}
private async fileSelected (file) {
protected async fileSelected (file) {
// reset state of file uploader to ensure not in manual error mode
this.fileUploadCustomErrorMsg = ''
if (file) {
Expand Down Expand Up @@ -295,7 +295,7 @@ export default class CompleteAffidavit extends Mixins(CommonMixin, DocumentMixin
}
this.setAffidavit({
...this.getAffidavitStep,
affidavitDoc: affidavitDoc,
affidavitDoc,
docKey: doc.key
})
} else {
Expand Down Expand Up @@ -333,20 +333,20 @@ export default class CompleteAffidavit extends Mixins(CommonMixin, DocumentMixin
this.updateAffidavitStepValidity()
this.setAffidavit({
...this.getAffidavitStep,
affidavitConfirmed: affidavitConfirmed
affidavitConfirmed
})
}
/** Called when component is created. */
created (): void {
protected created (): void {
this.uploadAffidavitDoc = this.getAffidavitStep.affidavitDoc as File
this.uploadAffidavitDocKey = this.getAffidavitStep.docKey
this.affidavitConfirmed = this.getAffidavitStep.affidavitConfirmed
this.hasValidUploadFile = !!this.uploadAffidavitDocKey
this.hasAffidavitConfirmed = this.affidavitConfirmed
}
async mounted (): Promise<void> {
protected async mounted (): Promise<void> {
// wait for components to load/stabilize then update validation state in store
await this.$nextTick()
this.updateAffidavitStepValidity()
Expand Down
Loading

0 comments on commit 3355305

Please sign in to comment.