diff --git a/js/actions/notification_actions.js b/js/actions/notification_actions.js index 5d80e1e7..dd396baf 100644 --- a/js/actions/notification_actions.js +++ b/js/actions/notification_actions.js @@ -12,8 +12,8 @@ class NotificationActions { 'flushPieceListNotifications', 'updateEditionListNotifications', 'flushEditionListNotifications', - 'updateEditionNotifications', 'updatePieceNotifications', + 'updateEditionNotifications', 'updateContractAgreementListNotifications', 'flushContractAgreementListNotifications' ); diff --git a/js/fetchers/notification_fetcher.js b/js/fetchers/notification_fetcher.js index 48606b70..8be00f29 100644 --- a/js/fetchers/notification_fetcher.js +++ b/js/fetchers/notification_fetcher.js @@ -16,7 +16,7 @@ let NotificationFetcher = { fetchEditionListNotifications() { return requests.get('notification_editionlist'); }, - + fetchEditionNotifications(editionId) { return requests.get('notification_edition', {'edition_id': editionId}); }, diff --git a/js/stores/notification_store.js b/js/stores/notification_store.js index 515a3730..856f9981 100644 --- a/js/stores/notification_store.js +++ b/js/stores/notification_store.js @@ -8,13 +8,15 @@ import NotificationActions from '../actions/notification_actions'; class NotificationStore { constructor() { - this.pieceListNotifications = {}; - this.editionListNotifications = {}; + this.pieceListNotifications = []; + this.pieceNotifications = null; + this.editionListNotifications = []; + this.editionNotifications = null; + // Need to determine if contract agreement notifications have been loaded or not, // so we use null here instead of an empty array this.contractAgreementListNotifications = null; - this.editionNotifications = null; - this.pieceNotifications = null; + this.bindActions(NotificationActions); }