Skip to content

Commit

Permalink
addingCapacityErrorMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
Vino4 committed Jun 7, 2017
1 parent 3f038e5 commit 861ee8a
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ export default class EditActivityInfoModal extends React.Component {
return;
}

if (this.props.activityHolder.get('currentCapacity') >=
this.props.activityHolder.get('totalCapacity')) {
this.props.updateActivityFailedToEdit(true);
this.props.updateActivityEditError('TOTAL CAPACITY MUST NOT BE BIGGER THAN CURRENT CAPACITY');
return;
}

this.props.updateActivityFailedToEdit(false);
this.props.updateActivityEditError('');
Expand Down Expand Up @@ -80,8 +86,8 @@ export default class EditActivityInfoModal extends React.Component {
Cancel
</Button>
<Button positive
disabled={this.props.isCreating}
loading={this.props.isCreating}
disabled={this.props.isLoading}
loading={this.props.isLoading}
content='Save Changes'
onClick={ this.updateActivityHandler }
/>
Expand Down

0 comments on commit 861ee8a

Please sign in to comment.