UNPKG

trc-client-core

Version:
40 lines (38 loc) 1.08 kB
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;