From 8a223e1a49874878dbdce1c84b67fa97daa43b37 Mon Sep 17 00:00:00 2001 From: Leo Dube Date: Mon, 24 Jul 2023 15:49:11 -0700 Subject: [PATCH 1/3] Updated store action types --- src/App.vue | 38 +++++----- .../Alteration/AlterationSummary.vue | 4 +- .../Alteration/Articles/Articles.vue | 8 +-- .../Alteration/Articles/ResolutionDates.vue | 4 +- src/components/Conversion/ConversionNOB.vue | 6 +- .../Restoration/ExtendTimeLimit.vue | 10 +-- .../SpecialResolution/Memorandum.vue | 8 +-- .../SpecialResolution/Resolution.vue | 5 +- .../SpecialResolution/ResolutionEditor.vue | 5 +- .../SpecialResolution/ResolutionSummary.vue | 6 +- src/components/SpecialResolution/Rules.vue | 8 +-- .../SpecialResolution/SigningParty.vue | 5 +- .../SpecialResolution/UploadRules.vue | 4 +- src/components/ViewWrapper.vue | 14 ++-- src/components/common/Actions.vue | 9 ++- src/components/common/CertifySection.vue | 6 +- src/components/common/CompletingParty.vue | 5 +- src/components/common/CourtOrderPoa.vue | 8 +-- src/components/common/Detail.vue | 3 +- src/components/common/DocumentsDelivery.vue | 6 +- .../common/PeopleAndRoles/PeopleAndRoles.vue | 12 ++-- .../common/ShareStructure/ShareStructures.vue | 12 ++-- src/components/common/StaffPayment.vue | 6 +- .../common/TransactionalFolioNumber.vue | 6 +- .../common/YourCompany/AssociationType.vue | 8 +-- .../YourCompany/BusinessContactInfo.vue | 6 +- .../common/YourCompany/BusinessStartDate.vue | 6 +- .../common/YourCompany/BusinessType.vue | 4 +- .../common/YourCompany/ChangeBusinessType.vue | 8 +-- .../CorrectName/CorrectCompanyName.vue | 4 +- .../CorrectName/CorrectNameRequest.vue | 8 +-- .../CorrectName/CorrectNameToNumber.vue | 4 +- .../common/YourCompany/EntityName.vue | 14 ++-- .../common/YourCompany/FolioInformation.vue | 8 +-- .../NameTranslations/NameTranslation.vue | 8 +-- .../common/YourCompany/NatureOfBusiness.vue | 6 +- .../common/YourCompany/OfficeAddresses.vue | 8 +-- src/dialogs/ResolutionDateDialog.vue | 3 +- .../alteration-interface.ts | 2 +- .../restoration-interface.ts | 2 +- .../store-interfaces/action-interface.ts | 11 --- .../name-request-interface.ts | 2 +- src/mixins/fee-mixin.ts | 8 +-- src/mixins/filing-template-mixin.ts | 72 +++++++++---------- src/store/store.ts | 27 +++---- src/views/Alteration.vue | 10 +-- src/views/Change.vue | 10 +-- src/views/Conversion.vue | 10 +-- src/views/Correction.vue | 6 +- src/views/Correction/CoopCorrection.vue | 7 +- src/views/Correction/CorpCorrection.vue | 7 +- src/views/Correction/FirmCorrection.vue | 7 +- src/views/LimitedRestorationExtension.vue | 12 ++-- src/views/LimitedRestorationToFull.vue | 14 ++-- src/views/SpecialResolution.vue | 10 +-- 55 files changed, 246 insertions(+), 264 deletions(-) diff --git a/src/App.vue b/src/App.vue index 73d96a651..b69eb54ef 100644 --- a/src/App.vue +++ b/src/App.vue @@ -139,10 +139,10 @@ import * as Views from '@/views/' import * as Dialogs from '@/dialogs/' import { AuthServices } from '@/services/' import { CommonMixin, FilingTemplateMixin } from '@/mixins/' -import { ActionBindingIF, ConfirmDialogType } from '@/interfaces/' +import { AccountInformationIF, ConfirmDialogType } from '@/interfaces/' import { BreadcrumbIF, CompletingPartyIF } from '@bcrs-shared-components/interfaces/' import { SessionStorageKeys } from 'sbc-common-components/src/util/constants' -import { RouteNames } from '@/enums/' +import { FilingTypes, RouteNames } from '@/enums/' import { getEntityDashboardBreadcrumb, getMyBusinessRegistryBreadcrumb, getRegistryDashboardBreadcrumb, getStaffDashboardBreadcrumb } from '@/resources/BreadCrumbResources' import DateUtilities from '@/services/date-utilities' @@ -188,22 +188,22 @@ export default class App extends Mixins(CommonMixin, FilingTemplateMixin) { @Getter(useStore) showFeeSummary!: boolean // Global actions - @Action(useStore) setAccountInformation!: ActionBindingIF - @Action(useStore) setAppValidate!: ActionBindingIF - @Action(useStore) setBusinessId!: ActionBindingIF - @Action(useStore) setCompletingParty!: ActionBindingIF - @Action(useStore) setComponentValidate!: ActionBindingIF - @Action(useStore) setCurrentDate!: ActionBindingIF - @Action(useStore) setCurrentJsDate!: ActionBindingIF - @Action(useStore) setFilingId!: ActionBindingIF - @Action(useStore) setFilingType!: ActionBindingIF - @Action(useStore) setHaveUnsavedChanges!: ActionBindingIF - @Action(useStore) setIsFilingPaying!: ActionBindingIF - @Action(useStore) setIsSaving!: ActionBindingIF - @Action(useStore) setKeycloakRoles!: ActionBindingIF - @Action(useStore) setOrgInfo!: ActionBindingIF - @Action(useStore) setSummaryMode!: ActionBindingIF - @Action(useStore) setUserInfo!: ActionBindingIF + @Action(useStore) setAccountInformation!: (x: AccountInformationIF) => void + @Action(useStore) setAppValidate!: (x: boolean) => void + @Action(useStore) setBusinessId!: (x: string) => void + @Action(useStore) setCompletingParty!: (x: CompletingPartyIF) => void + @Action(useStore) setComponentValidate!: (x: boolean) => void + @Action(useStore) setCurrentDate!: (x: string) => void + @Action(useStore) setCurrentJsDate!: (x: Date) => void + @Action(useStore) setFilingId!: (x: number) => void + @Action(useStore) setFilingType!: (x: FilingTypes) => void + @Action(useStore) setHaveUnsavedChanges!: (x: boolean) => void + @Action(useStore) setIsFilingPaying!: (x: boolean) => void + @Action(useStore) setIsSaving!: (x: boolean) => void + @Action(useStore) setKeycloakRoles!: (x: string[]) => void + @Action(useStore) setOrgInfo!: (x: any) => void + @Action(useStore) setSummaryMode!: (x: boolean) => void + @Action(useStore) setUserInfo!: (x: any) => void // Local properties accountAuthorizationDialog = false @@ -563,6 +563,7 @@ export default class App extends Mixins(CommonMixin, FilingTemplateMixin) { const orgInfo = await AuthServices.fetchOrgInfo(currentAccount?.id).catch(() => null) if (orgInfo) { + console.log(orgInfo) this.setOrgInfo(orgInfo) } else { throw new Error('Invalid org info') @@ -588,6 +589,7 @@ export default class App extends Mixins(CommonMixin, FilingTemplateMixin) { const response = await AuthServices.fetchUserInfo() const userInfo = response?.data if (userInfo) { + console.log(userInfo) this.setUserInfo(userInfo) } else { throw new Error('Invalid user info') diff --git a/src/components/Alteration/AlterationSummary.vue b/src/components/Alteration/AlterationSummary.vue index fc0bb3eaa..b23b5c10c 100644 --- a/src/components/Alteration/AlterationSummary.vue +++ b/src/components/Alteration/AlterationSummary.vue @@ -171,7 +171,7 @@