From fdf646109f3986a0690f313125825beca0d7e987 Mon Sep 17 00:00:00 2001 From: Jia Xu Date: Wed, 13 Dec 2023 14:56:26 -0800 Subject: [PATCH 1/4] bug fix - show resolution section when it's not correction filing --- .../SpecialResolution/Memorandum.vue | 12 +++++----- src/components/SpecialResolution/Rules.vue | 24 +++++++++---------- src/store/store.ts | 7 +++++- src/views/Correction/CoopCorrection.vue | 4 ++-- tests/unit/Memorandum.spec.ts | 5 +++- 5 files changed, 30 insertions(+), 22 deletions(-) diff --git a/src/components/SpecialResolution/Memorandum.vue b/src/components/SpecialResolution/Memorandum.vue index af063991..8108a199 100644 --- a/src/components/SpecialResolution/Memorandum.vue +++ b/src/components/SpecialResolution/Memorandum.vue @@ -103,7 +103,7 @@ class="pt-0 section-container" > Upload a new full set of the memorandum PDF document @@ -288,7 +288,7 @@ export default class Memorandum extends Vue { @Getter(useStore) getEntitySnapshot!: EntitySnapshotIF @Getter(useStore) getSpecialResolutionMemorandum!: RulesMemorandumIF @Getter(useStore) hasSpecialResolutionMemorandumChanged!: boolean - @Getter(useStore) hasResolutionOnFile!: boolean + @Getter(useStore) hasResolutionSection!: boolean @Action(useStore) setEditingMemorandum!: (x: boolean) => void @Action(useStore) setSpecialResolutionMemorandumValid!: (x: boolean) => void @@ -375,7 +375,7 @@ export default class Memorandum extends Vue { this.hasChanged = true this.isEditing = false let memorandum = this.getSpecialResolutionMemorandum - if (!this.hasResolutionOnFile) { + if (!this.hasResolutionSection) { memorandum = { ...memorandum, ...this.$refs.uploadMemorandumRef.getNewRulesNameAndKey(), @@ -395,7 +395,7 @@ export default class Memorandum extends Vue { validate (includeIsEditing: boolean): boolean { // This validates the checkbox. - let memorandumValid = this.$refs.memorandumForm.validate() || !this.hasResolutionOnFile + let memorandumValid = this.$refs.memorandumForm.validate() || !this.hasResolutionSection if (includeIsEditing) { memorandumValid = memorandumValid && !this.isEditing } diff --git a/src/components/SpecialResolution/Rules.vue b/src/components/SpecialResolution/Rules.vue index e8c1e526..15e8dfbf 100644 --- a/src/components/SpecialResolution/Rules.vue +++ b/src/components/SpecialResolution/Rules.vue @@ -89,18 +89,18 @@
You can update the rules of association in one of the following ways:
-
+
Upload a new full set of the rules PDF document - + {{ uploadDropdown ? 'mdi-menu-up' : 'mdi-menu-down' }} @@ -198,7 +198,7 @@
@@ -370,7 +370,7 @@ export default class Rules extends Vue { @Getter(useStore) getSpecialResolutionRulesValid!: boolean @Getter(useStore) getNameRequestLegalName!: string @Getter(useStore) hasSpecialResolutionRulesChanged!: boolean - @Getter(useStore) hasResolutionOnFile!: boolean + @Getter(useStore) hasResolutionSection!: boolean @Action(useStore) setEditingRules!: (x: boolean) => void @Action(useStore) setSpecialResolutionRules!: (x: RulesMemorandumIF) => void @@ -461,7 +461,7 @@ export default class Rules extends Vue { this.hasChanged = true this.isEditing = false let rules = this.getSpecialResolutionRules - if (this.uploadDropdown || !this.hasResolutionOnFile) { + if (this.uploadDropdown || !this.hasResolutionSection) { rules = { ...rules, ...this.$refs.uploadRulesRef.getNewRulesNameAndKey(), @@ -482,7 +482,7 @@ export default class Rules extends Vue { validate (includeIsEditing: boolean): boolean { // Show error in section, if no option is selected. // No options when there is no resolution on file. - this.noOptionSelected = this.hasResolutionOnFile + this.noOptionSelected = this.hasResolutionSection ? (this.isEditing && !this.rulesInResolution && !this.rulesInUpload) : false // Validate the form. let rulesValid = this.$refs.rulesForm.validate() && !this.noOptionSelected diff --git a/src/store/store.ts b/src/store/store.ts index 71ef7716..208b7a2d 100644 --- a/src/store/store.ts +++ b/src/store/store.ts @@ -920,7 +920,12 @@ export const useStore = defineStore('store', { /** Check if the original filing includes resolutions. */ hasResolutionOnFile (): boolean { - return this.getEntitySnapshot?.resolutions.length > 0 + return this.getEntitySnapshot?.resolutions?.length > 0 + }, + + /** Display resolution text section when a correction filing has existing resolution or not correction filing. */ + hasResolutionSection (): boolean { + return this.hasResolutionOnFile || !this.isCoopCorrectionFiling }, /** True if (registered) mailing address has changed. */ diff --git a/src/views/Correction/CoopCorrection.vue b/src/views/Correction/CoopCorrection.vue index e46a43f1..183411a8 100644 --- a/src/views/Correction/CoopCorrection.vue +++ b/src/views/Correction/CoopCorrection.vue @@ -36,7 +36,7 @@ @@ -124,7 +124,7 @@ export default class CoopCorrection extends Mixins(CommonMixin, DateMixin, FeeMi // Global getters @Getter(useStore) isPartnership!: boolean @Getter(useStore) isSoleProp!: boolean - @Getter(useStore) hasResolutionOnFile!: boolean + @Getter(useStore) hasResolutionSection!: boolean // Global actions @Action(useStore) setHaveUnsavedChanges!: (x: boolean) => void diff --git a/tests/unit/Memorandum.spec.ts b/tests/unit/Memorandum.spec.ts index 374b21e7..c9ef2a6a 100644 --- a/tests/unit/Memorandum.spec.ts +++ b/tests/unit/Memorandum.spec.ts @@ -6,6 +6,7 @@ import { mount } from '@vue/test-utils' import Memorandum from '@/components/SpecialResolution/Memorandum.vue' import UploadRulesOrMemorandum from '@/components/SpecialResolution/UploadRulesOrMemorandum.vue' import flushPromises from 'flush-promises' +import { CorpTypeCd, FilingTypes } from '@/enums' const vuetify = new Vuetify({}) @@ -113,7 +114,9 @@ describe('Memorandum', () => { }) it('saveMemorandum - valid - memorandum in upload', async () => { - store.stateModel.entitySnapshot.resolutions = [] + store.stateModel.entitySnapshot.resolutions = null + store.stateModel.tombstone.entityType = CorpTypeCd.COOP + store.stateModel.tombstone.filingType = FilingTypes.CORRECTION await wrapper.vm.$nextTick() await wrapper.find('#btn-change-memorandum').trigger('click') const uploadRules = wrapper.findComponent(UploadRulesOrMemorandum) From 07b5f3fa4f170daad97b52177878cb85e814a3a5 Mon Sep 17 00:00:00 2001 From: Jia Xu Date: Wed, 13 Dec 2023 14:59:48 -0800 Subject: [PATCH 2/4] 4.7.14 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6397f218..f910b90c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "business-edit-ui", - "version": "4.7.13", + "version": "4.7.14", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "business-edit-ui", - "version": "4.7.13", + "version": "4.7.14", "dependencies": { "@babel/compat-data": "^7.21.5", "@bcrs-shared-components/action-chip": "1.1.5", diff --git a/package.json b/package.json index 6fdf5b38..6b0d19ce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "business-edit-ui", - "version": "4.7.13", + "version": "4.7.14", "private": true, "appName": "Edit UI", "sbcName": "SBC Common Components", From 93cfbb594c8a6bfc422adfd5e472309b8892f2a2 Mon Sep 17 00:00:00 2001 From: Jia Xu Date: Thu, 14 Dec 2023 10:23:43 -0800 Subject: [PATCH 3/4] UXA fix --- .../SpecialResolution/Memorandum.vue | 9 +- .../SpecialResolution/Resolution.vue | 85 ++++++++++--------- src/components/SpecialResolution/Rules.vue | 7 +- 3 files changed, 59 insertions(+), 42 deletions(-) diff --git a/src/components/SpecialResolution/Memorandum.vue b/src/components/SpecialResolution/Memorandum.vue index 8108a199..8edf93bd 100644 --- a/src/components/SpecialResolution/Memorandum.vue +++ b/src/components/SpecialResolution/Memorandum.vue @@ -168,7 +168,6 @@ >
{{ getSpecialResolutionMemorandum.name }} @@ -203,11 +204,13 @@ {{ lastUploadedDetails }} mdi-check @@ -450,6 +453,10 @@ ul { color: black; } +.dropdown-active { + color: rgba(0,0,0,.87) !important; cursor: auto; +} + .last-modified-details { display: inline-flex; font-size: .75rem; diff --git a/src/components/SpecialResolution/Resolution.vue b/src/components/SpecialResolution/Resolution.vue index 1a1ca06f..da921398 100644 --- a/src/components/SpecialResolution/Resolution.vue +++ b/src/components/SpecialResolution/Resolution.vue @@ -5,59 +5,64 @@ flat > -
+
mdi-handshake -
- + - - - - - Correction to the special resolution text is not required. - - - - - + + Correction to the special resolution text is not required. + + + - - mdi-undo - - Undo - - - +
+ + + mdi-undo + + Undo + +
+ + +
@@ -209,7 +214,7 @@
- + diff --git a/src/components/SpecialResolution/Rules.vue b/src/components/SpecialResolution/Rules.vue index 15e8dfbf..c074513e 100644 --- a/src/components/SpecialResolution/Rules.vue +++ b/src/components/SpecialResolution/Rules.vue @@ -139,6 +139,7 @@ />
Upload a new full set of the rules PDF document @@ -158,6 +159,9 @@ {{ uploadDropdown ? 'mdi-menu-up' : 'mdi-menu-down' }} + + Upload a new full set of the rules PDF document + mdi-file-pdf-outline + Date: Thu, 14 Dec 2023 10:27:34 -0800 Subject: [PATCH 4/4] lint fix --- src/components/SpecialResolution/Memorandum.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/SpecialResolution/Memorandum.vue b/src/components/SpecialResolution/Memorandum.vue index 8edf93bd..bfb95244 100644 --- a/src/components/SpecialResolution/Memorandum.vue +++ b/src/components/SpecialResolution/Memorandum.vue @@ -180,9 +180,9 @@ {{ getSpecialResolutionMemorandum.name }}