Skip to content

Commit

Permalink
19034 rebase legal name branch (#556)
Browse files Browse the repository at this point in the history
* Add small rendering delay for Firefox, that way the review and confirm scrolls to the top of the screen. (#535)

* 17347 - Add in directors for corrections for CP. (#536)

* Add in directors for corrections for CP.

* Fix unit tests for director change for CP.

* Add in COOP.

* Add in appointmentDate for co-op corrections. (#537)

* Bump postcss from 8.4.30 to 8.4.31 (#533)

Bumps [postcss](https://github.com/postcss/postcss) from 8.4.30 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](postcss/postcss@8.4.30...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* - app version = 4.7.5 (#541)

- moved director workaround to LegalServices
- moved parties workaround to LegalServices
- removed workaround from Change
- removed workaround from Conversion
- updated unit tests

* - app version = 4.7.6 (#542)

- deleted obsolete "alteration-ui-enabled" FF
- deleted obsolete "change-ui-enabled" FF
- deleted obsolete "conversion-ui-enabled" FF
- removed flag usage from Alteration.vue
- removed flag usage from Change.vue
- removed flag usage from Conversion.vue
- removed flag usage from SpecialResolution.vue

* - app version = 4.7.7 (#543)

- uninstalled v-sanitize
- installed vue-sanitize-directive
- updated imports
- added "basic" option (same as default with old package)

* 17158 update fetchNameRequest (#540)

* 17158 update fetchNameRequest

* add debug code

* add debug --wip

* add debug --wip

* update error handling

* update NR status

* update version

* 18277 - Don't pre select no fee option for co-op correction. (#539)

* Don't pre select no fee option for co-op correction.

* Set to FAS, this way it will display $20.

* Update package version.

* Add in dropdown option for BEN when alterating from ULC (#545)

* add in dropdown option for BEN when going from ULC

* Name request check error update

* Update comment and package versions

* 18716 added phone number and email address to name request correction… (#547)

* 18716 added phone number and email address to name request correction on file and pay

* updated package json

* removed debug code

* 18728 - COOP Bug: Payment shows up as #3 when it should be #5 (#548)

* fix csr index bug

* 4.7.11

* 18735 - Fix rules showing up as being changed, when it's on paper (#549)

* Fix rules being changed, when it's on paper

* Fix bad code

* add in extra || null

* 18622 - Correction - Blank Special Resolution (#550)

* 18495 - Coop Correction Changes when the Resolution is Absent (#551)

* 18495 - Bug Fix - Show Resolution Section when not Correction Filing (#552)

* 19069 - Special Resolution - Validation on blank association type (#553)

* Bump vite from 4.3.9 to 4.5.2 (#555)

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.3.9 to 4.5.2.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v4.5.2/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.5.2/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* major package version update

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Travis Semple <travis8814@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Séverin Beauvais <severinbeauvais@users.noreply.github.com>
Co-authored-by: Kevin Zhang <54437031+kzdev420@users.noreply.github.com>
Co-authored-by: Paul <144158015+PaulGarewal@users.noreply.github.com>
Co-authored-by: Jia Xu <Jia.Xu@gov.bc.ca>
  • Loading branch information
7 people authored Jan 26, 2024
1 parent 2b4793d commit a2c3f8e
Show file tree
Hide file tree
Showing 49 changed files with 823 additions and 399 deletions.
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

0 comments on commit a2c3f8e

Please sign in to comment.