mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 09:23:13 +01:00
Use empty array as initial state of piece and edition list notifications
This commit is contained in:
parent
5e6b483149
commit
874aad05b8
@ -12,8 +12,8 @@ class NotificationActions {
|
|||||||
'flushPieceListNotifications',
|
'flushPieceListNotifications',
|
||||||
'updateEditionListNotifications',
|
'updateEditionListNotifications',
|
||||||
'flushEditionListNotifications',
|
'flushEditionListNotifications',
|
||||||
'updateEditionNotifications',
|
|
||||||
'updatePieceNotifications',
|
'updatePieceNotifications',
|
||||||
|
'updateEditionNotifications',
|
||||||
'updateContractAgreementListNotifications',
|
'updateContractAgreementListNotifications',
|
||||||
'flushContractAgreementListNotifications'
|
'flushContractAgreementListNotifications'
|
||||||
);
|
);
|
||||||
|
@ -16,7 +16,7 @@ let NotificationFetcher = {
|
|||||||
fetchEditionListNotifications() {
|
fetchEditionListNotifications() {
|
||||||
return requests.get('notification_editionlist');
|
return requests.get('notification_editionlist');
|
||||||
},
|
},
|
||||||
|
|
||||||
fetchEditionNotifications(editionId) {
|
fetchEditionNotifications(editionId) {
|
||||||
return requests.get('notification_edition', {'edition_id': editionId});
|
return requests.get('notification_edition', {'edition_id': editionId});
|
||||||
},
|
},
|
||||||
|
@ -8,13 +8,15 @@ import NotificationActions from '../actions/notification_actions';
|
|||||||
|
|
||||||
class NotificationStore {
|
class NotificationStore {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.pieceListNotifications = {};
|
this.pieceListNotifications = [];
|
||||||
this.editionListNotifications = {};
|
this.pieceNotifications = null;
|
||||||
|
this.editionListNotifications = [];
|
||||||
|
this.editionNotifications = null;
|
||||||
|
|
||||||
// Need to determine if contract agreement notifications have been loaded or not,
|
// Need to determine if contract agreement notifications have been loaded or not,
|
||||||
// so we use null here instead of an empty array
|
// so we use null here instead of an empty array
|
||||||
this.contractAgreementListNotifications = null;
|
this.contractAgreementListNotifications = null;
|
||||||
this.editionNotifications = null;
|
|
||||||
this.pieceNotifications = null;
|
|
||||||
this.bindActions(NotificationActions);
|
this.bindActions(NotificationActions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user