Skip to content

Commit

Permalink
cleanup of unused load heavy computeds from old via MR code
Browse files Browse the repository at this point in the history
  • Loading branch information
ValenberghsSven committed May 5, 2021
1 parent 17af015 commit 2f46a1a
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions app/models/agendaitem.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,40 +162,6 @@ export default ModelWithModifier.extend({
return documentContainers && documentContainers.some((documentContainers) => documentContainers.checkAdded);
}),

case: computed('treatments.firstObject.subcase.case', async function() {
const agendaItemTreatments = await this.get('treatments');
const agendaItemTreatment = agendaItemTreatments.firstObject; // TODO: Agendaitem can have many treatments (decisions)
const subcase = await agendaItemTreatment.get('subcase');
if (!subcase) {
return false;
}
const _case = await subcase.get('case');
if (!_case) {
return false;
}
return _case;
}),

publicationFlow: computed('treatments.firstObject.subcase.case.publicationFlow', async function() {
const _case = await this.get('case');
if (!_case) {
return false;
}
const publicationFlow = await _case.get('publicationFlow');
// Preload case.
await publicationFlow.get('case');
await publicationFlow.reload();
if (!publicationFlow) {
return false;
}
return publicationFlow;
}),

publicationFlowId: computed('treatments.firstObject.subcase.case.publicationFlow', async function() {
const publicationFlow = await this.get('publicationFlow');
return publicationFlow.id;
}),

sortedApprovals: computed('approvals.@each', async function() {
return PromiseArray.create({
promise: this.store.query('approval', {
Expand Down

0 comments on commit 2f46a1a

Please sign in to comment.