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

19034 rebase legal name branch #556

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
23a8472
Add small rendering delay for Firefox, that way the review and confir…
seeker25 Oct 12, 2023
90ee1f5
17347 - Add in directors for corrections for CP. (#536)
seeker25 Oct 16, 2023
5bd343a
Add in appointmentDate for co-op corrections. (#537)
seeker25 Oct 19, 2023
ee0b986
Bump postcss from 8.4.30 to 8.4.31 (#533)
dependabot[bot] Oct 23, 2023
fd95f6a
- app version = 4.7.5 (#541)
severinbeauvais Nov 9, 2023
e1722d4
- app version = 4.7.6 (#542)
severinbeauvais Nov 9, 2023
68ab51f
- app version = 4.7.7 (#543)
severinbeauvais Nov 10, 2023
93386f1
17158 update fetchNameRequest (#540)
kzdev420 Nov 14, 2023
3801592
18277 - Don't pre select no fee option for co-op correction. (#539)
seeker25 Nov 16, 2023
468dee6
Add in dropdown option for BEN when alterating from ULC (#545)
seeker25 Nov 16, 2023
d9d1490
18716 added phone number and email address to name request correction…
PaulGarewal Nov 28, 2023
804ebf3
18728 - COOP Bug: Payment shows up as #3 when it should be #5 (#548)
Jxio Nov 29, 2023
b89765a
18735 - Fix rules showing up as being changed, when it's on paper (#549)
seeker25 Nov 29, 2023
5279ded
18622 - Correction - Blank Special Resolution (#550)
Jxio Dec 6, 2023
41bba64
18495 - Coop Correction Changes when the Resolution is Absent (#551)
Jxio Dec 11, 2023
362cc19
18495 - Bug Fix - Show Resolution Section when not Correction Filing …
Jxio Dec 14, 2023
e1e137f
19069 - Special Resolution - Validation on blank association type (#553)
Jxio Dec 22, 2023
f8611e1
Bump vite from 4.3.9 to 4.5.2 (#555)
dependabot[bot] Jan 20, 2024
1e980cf
major package version update
JazzarKarim Jan 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
243 changes: 122 additions & 121 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "business-edit-ui",
"version": "4.8.0",
"version": "5.0.0",
"private": true,
"appName": "Edit UI",
"sbcName": "SBC Common Components",
Expand Down Expand Up @@ -52,11 +52,11 @@
"sbc-common-components": "3.0.8",
"tiptap-vuetify": "^2.24.0",
"uuid": "^9.0.0",
"v-sanitize": "^0.0.11",
"vue": "2.7.14",
"vue-affix": "^0.5.2",
"vue-hotjar": "^1.4.0",
"vue-router": "^3.6.5",
"vue-sanitize-directive": "^0.2.1",
"vue-the-mask": "^0.11.1",
"vue2-filters": "^0.14.0",
"vuelidate": "0.6.2",
Expand Down Expand Up @@ -85,7 +85,7 @@
"sass": "~1.32.13",
"sinon": "^14.0.2",
"typescript": "4.5.5",
"vite": "4.3.9",
"vite": "4.5.2",
"vite-plugin-environment": "^1.1.3",
"vitest": "0.33.0",
"vue-property-decorator": "^9.1.2",
Expand Down
1 change: 0 additions & 1 deletion src/components/SpecialResolution/HelpResolution.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<template>
<div
v-if="isSpecialResolutionFiling"
id="help-resolution"
class="mb-4"
>
Expand Down
4 changes: 2 additions & 2 deletions src/components/SpecialResolution/InstructionalText.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<template>
<article
v-if="isSpecialResolutionFiling"
class="instructional-text section-container"
>
You have made changes that require a
<span v-if="isSpecialResolutionFiling">You have made changes that require a </span>
<span v-else>If you have made changes that require a </span>
<v-tooltip
top
content-class="top-tooltip"
Expand Down
69 changes: 58 additions & 11 deletions src/components/SpecialResolution/Memorandum.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
class="pt-0 section-container"
>
<v-checkbox
v-if="hasResolutionSection"
id="chk-memorandum-in-resolution"
v-model="memorandumInResolution"
hide-details
Expand All @@ -117,8 +118,18 @@
</span>
</template>
</v-checkbox>
<span
v-if="!hasResolutionSection"
class="black-bold-font"
>
Upload a new full set of the memorandum PDF document
</span>
<v-spacer class="spacer" />
<UploadRulesOrMemorandum
v-if="!hasResolutionSection"
ref="uploadMemorandumRef"
/>
</div>

<v-row
v-if="isEditing"
id="memorandum-confirmation-buttons"
Expand Down Expand Up @@ -157,7 +168,6 @@
>
<div
v-if="getSpecialResolutionMemorandum && getSpecialResolutionMemorandum.key"
:key="getSpecialResolutionMemorandum.key"
>
<v-icon
color="primary"
Expand All @@ -168,7 +178,9 @@

<!-- New Memorandum -->
<a
:key="getSpecialResolutionMemorandum.key"
class="ml-1"
:class=" {'dropdown-active': (!getSpecialResolutionMemorandum.url)}"
download
@click="openPdf()"
>
Expand All @@ -192,11 +204,13 @@
{{ lastUploadedDetails }}
</span>
<v-icon
v-if="hasResolutionSection"
color="green darken-2"
>
mdi-check
</v-icon>
<span
v-if="hasResolutionSection"
id="memorandum-changes-included-resolution"
class="ml-1 d-inline-block info-text"
>
Expand Down Expand Up @@ -260,12 +274,14 @@ import DateUtilities from '@/services/date-utilities'
import { FormIF } from '@bcrs-shared-components/interfaces'
import { Component, Watch } from 'vue-property-decorator'
import { Action, Getter } from 'pinia-class'
import UploadRulesOrMemorandum from './UploadRulesOrMemorandum.vue'
import { useStore } from '@/store/store'
import { LegalServices } from '@/services'

@Component({
components: {
HelpSection
HelpSection,
UploadRulesOrMemorandum
}
})
export default class Memorandum extends Vue {
Expand All @@ -274,13 +290,15 @@ export default class Memorandum extends Vue {
@Getter(useStore) getEditLabel!: string
@Getter(useStore) getSpecialResolutionMemorandum!: RulesMemorandumIF
@Getter(useStore) hasSpecialResolutionMemorandumChanged!: boolean
@Getter(useStore) hasResolutionSection!: boolean

@Action(useStore) setEditingMemorandum!: (x: boolean) => void
@Action(useStore) setSpecialResolutionMemorandumValid!: (x: boolean) => void
@Action(useStore) setSpecialResolutionMemorandum!: (x: RulesMemorandumIF) => void

$refs!: {
memorandumForm: FormIF
uploadMemorandumRef: FormIF
}

hasChanged = false
Expand Down Expand Up @@ -332,29 +350,54 @@ export default class Memorandum extends Vue {
})
}

/** Initial memorandum for the business, this is loaded in when undo or cancel is pressed. */
initialMemorandum (): RulesMemorandumIF {
const documentsInfo = this.getEntitySnapshot?.businessDocuments?.documentsInfo
const documents = this.getEntitySnapshot?.businessDocuments?.documents
return {
includedInResolution: false,
key: documentsInfo?.certifiedMemorandum?.key || null,
name: documentsInfo?.certifiedMemorandum?.name,
previouslyInResolution: documentsInfo?.certifiedMemorandum?.includedInResolution,
uploaded: documentsInfo?.certifiedMemorandum?.uploaded,
url: documents?.certifiedMemorandum
}
}

resetMemorandum (): void {
this.hasChanged = false
this.isEditing = false
this.setSpecialResolutionMemorandum({
...this.getSpecialResolutionMemorandum,
includedInResolution: false
...this.initialMemorandum()
})
}

saveMemorandum (): void {
async saveMemorandum (): Promise<void> {
if (this.validate(false)) {
this.hasChanged = true
this.isEditing = false
this.setSpecialResolutionMemorandum({
...this.getSpecialResolutionMemorandum,
includedInResolution: true
})
let memorandum = this.getSpecialResolutionMemorandum
if (!this.hasResolutionSection) {
memorandum = {
...memorandum,
...this.$refs.uploadMemorandumRef.getNewRulesNameAndKey(),
includedInResolution: false,
uploaded: DateUtilities.dateToApi(new Date()),
url: null // No URL, because we can't currently re-download drafts securely from Minio.
}
} else {
memorandum = {
...this.getSpecialResolutionMemorandum,
includedInResolution: true
}
}
await this.setSpecialResolutionMemorandum(memorandum)
}
}

validate (includeIsEditing: boolean): boolean {
// This validates the checkbox.
let memorandumValid = this.$refs.memorandumForm.validate()
let memorandumValid = this.$refs.memorandumForm.validate() || !this.hasResolutionSection
if (includeIsEditing) {
memorandumValid = memorandumValid && !this.isEditing
}
Expand Down Expand Up @@ -409,6 +452,10 @@ ul {
color: black;
}

.dropdown-active {
color: rgba(0,0,0,.87) !important; cursor: auto;
}

.last-modified-details {
display: inline-flex;
font-size: .75rem;
Expand Down
83 changes: 74 additions & 9 deletions src/components/SpecialResolution/Resolution.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,71 @@
flat
>
<!-- Header -->
<article class="header-container section-container">
<div class="section-container header-container">
<v-icon color="appDkBlue">
mdi-handshake
</v-icon>
<label class="font-weight-bold pl-2">Special Resolution</label>
</article>

<v-card
</div>
<v-form
ref="resolutionTextForm"
flat
:class="{'invalid-section': invalidResolutionSection}"
:class="{'invalid-section':
isCoopCorrectionFiling ?
(invalidResolutionSection && requireCorrectionCheck) :
invalidResolutionSection}"
>
<InstructionalText />
<div
class="section-container"
>
<v-row
no-gutters
>
<v-col
cols="auto"
>
<v-checkbox
v-if="requireCorrectionCheck && isCoopCorrectionFiling"
id="resolution-text-not-require-chkbx"
class="inherit-checkbox"
label="Correction to the special resolution text is not required."
hide-details
@change="onResolutionCorrectionChk"
/>
<v-label
v-if="!requireCorrectionCheck && isCoopCorrectionFiling"
>
Correction to the special resolution text is not required.
</v-label>
</v-col>
<v-col
cols="1"
class="pt-0 mt-n2 align-right"
>
<div class="actions mr-4">
<v-btn
v-if="!requireCorrectionCheck && isCoopCorrectionFiling"
id="btn-resolution-correction-undo"
text
color="primary"
@click="requireCorrectionCheck = !requireCorrectionCheck"
>
<v-icon small>
mdi-undo
</v-icon>
<span>Undo</span>
</v-btn>
</div>
</v-col>
</v-row>
</div>

<InstructionalText v-if="shouldDisplayResolution" />

<HelpResolution />
<HelpResolution v-if="shouldDisplayResolution" />

<section
v-if="shouldDisplayResolution"
id="resolution-section"
class="section-container"
>
Expand Down Expand Up @@ -120,7 +169,7 @@
</div>

<p
v-if="isEditing"
v-if="isEditing || isCoopCorrectionFiling"
class="section-description mt-2 info-text"
>
Enter the date the special resolution passed and the text as it appears on your printed form.
Expand All @@ -145,6 +194,7 @@
>
<v-btn
id="btn-resolution-done"
class="mr-2"
large
color="primary"
@click="updateSpecialResolutionStore()"
Expand All @@ -164,7 +214,7 @@
</div>
</v-form>
</section>
</v-card>
</v-form>
</v-card>
</template>

Expand Down Expand Up @@ -212,6 +262,14 @@ export default class Resolution extends Vue {
hasChanged = false
dropdown = false
changedResolutionDate = ''
requireCorrectionCheck = true

/** Resolution section should display:
* 1.special resolution
* 2.coop correction with checkbox unchecked (require resolution) */
get shouldDisplayResolution () {
return (this.requireCorrectionCheck && this.isCoopCorrectionFiling) || this.isSpecialResolutionFiling
}

/** Displays an invalid section to user if form is invalid. */
get invalidResolutionSection (): boolean {
Expand Down Expand Up @@ -264,6 +322,13 @@ export default class Resolution extends Vue {
onResolutionDate (date: string) {
this.changedResolutionDate = date
}

async onResolutionCorrectionChk (isChecked) {
this.requireCorrectionCheck = !isChecked
if (!this.requireCorrectionCheck && this.hasChanged) {
await this.undoSpecialResolutionStore()
}
}
}
</script>

Expand Down
Loading
Loading