-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' into DES/enhancement/#732-vlc-refactor
- Loading branch information
Showing
14 changed files
with
63 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ import { alias } from '@ember/object/computed'; | |
import ModelWithModifier from 'frontend-kaleidos/models/model-with-modifier'; | ||
|
||
const { | ||
attr, hasMany, belongsTo, PromiseArray, PromiseObject, | ||
attr, hasMany, belongsTo, PromiseArray, | ||
} = DS; | ||
|
||
export default ModelWithModifier.extend({ | ||
|
@@ -144,25 +144,24 @@ export default ModelWithModifier.extend({ | |
return null; | ||
}), | ||
|
||
approved: computed('treatments', '[email protected]', function() { | ||
return PromiseObject.create({ | ||
promise: this.get('treatments').then((treatments) => { | ||
if (treatments && treatments.get('length') > 0) { | ||
const treatmentIds = treatments.map((treatment) => treatment.get('id')).join(','); | ||
const drcIds = ['56312c4b-9d2a-4735-b0b1-2ff14bb524fd', '9f342a88-9485-4a83-87d9-245ed4b504bf'].join(','); | ||
return this.store.query('agenda-item-treatment', { | ||
filter: { | ||
id: treatmentIds, | ||
'decision-result-code': { | ||
id: drcIds, | ||
}, | ||
}, | ||
include: 'decision-result-code', | ||
}).then((treatments) => treatments.get('firstObject')); | ||
} | ||
return null; | ||
}), | ||
}); | ||
approved: computed('treatments', '[email protected]', async function() { | ||
const meeting = await this.get('requestedForMeeting'); | ||
if (meeting.isFinal) { | ||
const treatments = await this.get('treatments'); | ||
if (treatments && treatments.get('length') > 0) { | ||
const treatmentIds = treatments.map((treatment) => treatment.get('id')).join(','); | ||
const approvedTreatment = await this.store.queryOne('agenda-item-treatment', { | ||
'filter[id]': treatmentIds, | ||
'filter[decision-result-code][:uri:]': CONFIG.DECISION_RESULT_CODE_URIS.GOEDGEKEURD, | ||
}); | ||
const acknowledgedTreatment = await this.store.queryOne('agenda-item-treatment', { | ||
'filter[id]': treatmentIds, | ||
'filter[decision-result-code][:uri:]': CONFIG.DECISION_RESULT_CODE_URIS.KENNISNAME, | ||
}); | ||
return !!approvedTreatment || !!acknowledgedTreatment; | ||
} | ||
} | ||
return false; | ||
}), | ||
|
||
subcasesFromCase: computed('case.subcases.@each', function() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters