2015-09-03 14:15:00 +02:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
import React from 'react';
|
|
|
|
import alt from '../alt';
|
|
|
|
|
|
|
|
import NotificationActions from '../actions/notification_actions';
|
|
|
|
|
|
|
|
|
|
|
|
class NotificationStore {
|
|
|
|
constructor() {
|
|
|
|
this.pieceListNotifications = {};
|
|
|
|
this.editionListNotifications = {};
|
2015-09-04 11:49:55 +02:00
|
|
|
this.contractAgreementListNotifications = {};
|
2015-09-03 15:17:12 +02:00
|
|
|
this.editionNotifications = null;
|
|
|
|
this.pieceNotifications = null;
|
2015-09-03 14:15:00 +02:00
|
|
|
this.bindActions(NotificationActions);
|
|
|
|
}
|
|
|
|
|
|
|
|
onUpdatePieceListNotifications(res) {
|
|
|
|
this.pieceListNotifications = res.notifications;
|
|
|
|
}
|
|
|
|
|
2015-09-03 15:17:12 +02:00
|
|
|
onUpdatePieceNotifications(res) {
|
|
|
|
this.pieceNotifications = res.notification;
|
|
|
|
}
|
|
|
|
|
2015-09-03 14:15:00 +02:00
|
|
|
onUpdateEditionListNotifications(res) {
|
|
|
|
this.editionListNotifications = res.notifications;
|
|
|
|
}
|
|
|
|
|
2015-09-03 15:17:12 +02:00
|
|
|
onUpdateEditionNotifications(res) {
|
|
|
|
this.editionNotifications = res.notification;
|
|
|
|
}
|
|
|
|
|
2015-09-04 11:49:55 +02:00
|
|
|
onUpdateContractAgreementListNotifications(res) {
|
|
|
|
this.contractAgreementListNotifications = res.notifications;
|
|
|
|
}
|
|
|
|
|
2015-09-03 14:15:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export default alt.createStore(NotificationStore, 'NotificationStore');
|