Skip to content

Commit

Permalink
Merge pull request #588 from ArwenQin/16500-Fix-Restoration-Applicati…
Browse files Browse the repository at this point in the history
…on-Bug

16500 - Fixed Restoration People Section Bug
  • Loading branch information
ArwenQin authored Sep 18, 2024
2 parents d17ff63 + b94c8c5 commit 06cdbb1
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "business-edit-ui",
"version": "4.10.10",
"version": "4.10.11",
"private": true,
"appName": "Edit UI",
"sbcName": "SBC Common Components",
Expand Down
14 changes: 13 additions & 1 deletion src/mixins/filing-template-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,12 +389,24 @@ export default class FilingTemplateMixin extends DateMixin {
identifier: this.getBusinessId,
legalType: this.getEntityType
},
parties: this.getOrgPeople,
parties: null, // applied below
offices: this.getOfficeAddresses,
contactPoint: this.getContactPoint
}
}
// Apply parties to filing
{
// make a copy so we don't change original array
let parties = cloneDeep(this.getOrgPeople)

// prepare parties
parties = isDraft ? parties : this.prepareParties(parties)

// fix schema issues
parties = this.fixPartySchemaIssues(parties)

filing.restoration.parties = parties
}
// Set relationships object for a full restoration only
if (this.isLimitedRestorationToFull) {
filing.restoration.relationships = this.getRestoration.relationships
Expand Down
5 changes: 1 addition & 4 deletions src/views/LimitedRestorationExtension.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@
<script lang="ts">
import { Component, Emit, Mixins, Prop, Watch } from 'vue-property-decorator'
import { Action, Getter } from 'pinia-class'
import { v4 as uuidv4 } from 'uuid'
import { cloneDeep } from 'lodash'
import { GetFeatureFlag } from '@/utils/'
import RestorationSummary from '@/components/Restoration/RestorationSummary.vue'
Expand Down Expand Up @@ -335,10 +334,8 @@ export default class LimitedRestorationExtension extends Mixins(
throw new Error(`Applicant not found for ${this.getBusinessId}`)
}
// make a copy of the original object and assign a new id (for UI use only)
// make a copy of the original object
const copy = cloneDeep(applicant)
copy.officer.id = uuidv4()
return copy
}
Expand Down
5 changes: 1 addition & 4 deletions src/views/LimitedRestorationToFull.vue
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@
<script lang="ts">
import { Component, Emit, Mixins, Prop, Watch } from 'vue-property-decorator'
import { Action, Getter } from 'pinia-class'
import { v4 as uuidv4 } from 'uuid'
import { cloneDeep } from 'lodash'
import { GetFeatureFlag } from '@/utils/'
import RestorationSummary from '@/components/Restoration/RestorationSummary.vue'
Expand Down Expand Up @@ -364,10 +363,8 @@ export default class LimitedRestorationToFull extends Mixins(
throw new Error(`Applicant not found for ${this.getBusinessId}`)
}
// make a copy of the original object and assign a new id (for UI use only)
// make a copy of the original object
const copy = cloneDeep(applicant)
copy.officer.id = uuidv4()
return copy
}
Expand Down

0 comments on commit 06cdbb1

Please sign in to comment.