Skip to content

Commit

Permalink
Merge branch 'acceptance' of https://github.com/kanselarij-vlaanderen…
Browse files Browse the repository at this point in the history
…/kaleidos-frontend into development
  • Loading branch information
ValenberghsSven committed Mar 22, 2021
2 parents 56e001f + c697013 commit 55360cf
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions app/components/agenda/agenda-header.js
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,20 @@ export default Component.extend(FileSaverMixin, {
}
},

/**
* ensureAgendaDataIsRecent
*
* This method will reload the agendaitems of the current agenda and show a loader while in progress
* Any new agendaitem or changed formallity is picked up by this, preventing the triggering the relevant agenda actions with stale date
* created by concurrent edits of agendaitem formally ok status by other uses
*
*/
async ensureAgendaDataIsRecent() {
this.toggleLoadingOverlayWithMessage(this.intl.t('agendaitems-loading-text'));
await this.currentAgenda.hasMany('agendaitems').reload();
this.toggleLoadingOverlayWithMessage(null);
},

actions: {
print() {
window.print();
Expand Down Expand Up @@ -656,7 +670,8 @@ export default Component.extend(FileSaverMixin, {
this.toggleProperty('editingSession');
},

openConfirmApproveAgenda() {
async openConfirmApproveAgenda() {
await this.ensureAgendaDataIsRecent();
this.set('showConfirmForApprovingAgenda', true);
},

Expand All @@ -669,7 +684,8 @@ export default Component.extend(FileSaverMixin, {
this.set('showConfirmForApprovingAgenda', false);
},

openConfirmApproveAgendaAndCloseMeeting() {
async openConfirmApproveAgendaAndCloseMeeting() {
await this.ensureAgendaDataIsRecent();
this.set('showConfirmForApprovingAgendaAndClosingMeeting', true);
},

Expand Down

0 comments on commit 55360cf

Please sign in to comment.