trc-client-core
Version:
The core of the TRC Client
40 lines (38 loc) • 1.08 kB
JavaScript
var Reflux = require('reflux');
var ImmutableStoreMixin = require('reflux-immutable/ImmutableStoreMixin');
var ParticipantActions = require('trc-client-core/src/participant/ParticipantActions');
var ParticipantStore = Reflux.createStore({
listenables: ParticipantActions,
mixins: [ImmutableStoreMixin],
localStorageKey: 'SoData',
init() {
this.setState({
currentParticipant: null,
searchResults: null,
managers: null,
technicalTrainers: [],
technicalStaff: []
});
},
onFetchManagersCompleted(data) {
this.setState({
managers: data
});
},
onSearchCompleted(participants) {
this.setState({
searchResults: participants
});
},
onFetchTechnicalTrainersCompleted(items) {
this.setState({
technicalTrainers: items
});
},
onFetchTechnicalStaffCompleted(staff) {
this.setState({
technicalStaff: staff
});
}
});
module.exports = ParticipantStore;