Skip to content

Commit

Permalink
Correction
Browse files Browse the repository at this point in the history
  • Loading branch information
AbrahamRostampoor committed Nov 27, 2023
1 parent 490ba34 commit 73cf8bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
6 changes: 1 addition & 5 deletions src/mixins/filing-template-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -791,11 +791,7 @@ export default class FilingTemplateMixin extends DateMixin {
signatory: filing.correction?.signatory
}
} else {
const latestResolution = this.getLatestResolutionForBusiness

if (latestResolution !== null) {
specialResolution = latestResolution
}
specialResolution = this.getLatestResolutionForBusiness
}
this.setSpecialResolution(cloneDeep(specialResolution))
}
Expand Down
11 changes: 5 additions & 6 deletions src/store/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,7 @@ export const useStore = defineStore('store', {
const resolutions = this.getEntitySnapshot.resolutions

if (resolutions.length === 0) {
return null
return {}
}
// Obtain latest resolution ID. Assumes that the latest resolution is the one to be corrected.
const latestResolution = resolutions.reduce((prev, current) => (prev.id > current.id) ? prev : current)
Expand All @@ -1320,11 +1320,10 @@ export const useStore = defineStore('store', {
const entitySnapshotResolution = this.getLatestResolutionForBusiness

return (
(!!entitySnapshotResolution !== !!this.getSpecialResolution) ||
entitySnapshotResolution.resolution !== this.getSpecialResolution.resolution ||
!isEqual(entitySnapshotResolution.signatory, this.getSpecialResolution.signatory) ||
entitySnapshotResolution.resolutionDate !== this.getSpecialResolution.resolutionDate ||
entitySnapshotResolution.signingDate !== this.getSpecialResolution.signingDate
entitySnapshotResolution.resolution !== this.getSpecialResolution.resolution ||
!isEqual(entitySnapshotResolution.signatory, this.getSpecialResolution.signatory) ||
entitySnapshotResolution.resolutionDate !== this.getSpecialResolution.resolutionDate ||
entitySnapshotResolution.signingDate !== this.getSpecialResolution.signingDate
)
},

Expand Down

0 comments on commit 73cf8bd

Please sign in to comment.