Skip to content

Commit

Permalink
Merge pull request #139 from partio-scout/feature/loadspinner-for-par…
Browse files Browse the repository at this point in the history
…ticipant-details

Show load spinner on details page when loading
  • Loading branch information
pompost authored Jul 18, 2016
2 parents 3a1eba9 + cf8f571 commit 1b04479
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import _ from 'lodash';
import moment from 'moment';
import Spinner from 'react-spinner';
import { Row, Col, Panel, Button } from 'react-bootstrap';
import { Presence } from '../../components';
import { ParticipantDates } from './ParticipantDates';
Expand Down Expand Up @@ -223,7 +224,7 @@ export function getParticipantDetailsPage(participantStore, participantActions)
);
} else {
return (
<div></div>
<Spinner />
);
}
}
Expand Down
7 changes: 6 additions & 1 deletion src/client/stores/ParticipantStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export function getParticipantStore(alt, ParticipantActions, RegistryUserActions
this.resetAllData();

this.bindListeners({
handleFetchParticipantById: ParticipantActions.FETCH_PARTICIPANT_BY_ID,
handleUpdateParticipantById: ParticipantActions.UPDATE_PARTICIPANT_BY_ID,
handleLoadParticipantList: ParticipantActions.LOAD_PARTICIPANT_LIST,
handleParticipantListUpdated: ParticipantActions.PARTICIPANT_LIST_UPDATED,
Expand All @@ -12,6 +13,10 @@ export function getParticipantStore(alt, ParticipantActions, RegistryUserActions
});
}

handleFetchParticipantById() {
this.participantDetails = undefined;
}

handleUpdateParticipantById(participant) {
this.participantDetails = participant;
}
Expand Down Expand Up @@ -40,7 +45,7 @@ export function getParticipantStore(alt, ParticipantActions, RegistryUserActions

resetAllData() {
this.participants = undefined;
this.participantDetails = {};
this.participantDetails = undefined;
this.participantCount = undefined;

this.localGroups = [''];
Expand Down

0 comments on commit 1b04479

Please sign in to comment.