diff --git a/src/assets/languages/en.json b/src/assets/languages/en.json index 69e8ddec4302e8388497a37bc4fae7a8db4b37d3..f02d3e1ad7eedb16e3a696661f9fdaa33a880fce 100644 --- a/src/assets/languages/en.json +++ b/src/assets/languages/en.json @@ -1626,6 +1626,7 @@ "invitationAdminMsg": "You can't signup the event \"event_name\" as you are the host.", "invitationCancelMsg": "Event \"event_name\" has been canceled by the host.", "eventStartedMsg": "Event \"event_name\" is already started. You can not signup this event now.", + "allSlotsFullMsg":"All event slots are full you cannot signup the event now.", "slotTable": { "heading": "Time Slots", "title": "Title", diff --git a/src/containers/EventInvitation/InvitationScreen.js b/src/containers/EventInvitation/InvitationScreen.js index c7cab7a7986f58893983b5efd1f0400a711c0538..e9c3607b5063f427784d5181904fe5e1a4474945 100644 --- a/src/containers/EventInvitation/InvitationScreen.js +++ b/src/containers/EventInvitation/InvitationScreen.js @@ -208,6 +208,13 @@ class InvitationScreen extends PureComponent { } } + handleAllSlotFull = () => { + this.setState({ + responseText: this.props.t('eventSignup.allSlotsFullMsg'), + isEventSubmited: true + }); + } + UNSAFE_componentWillMount() { console.log("process.env.REACT_APP_EVENTSIGNUP_SERVICE_TOKEN"); @@ -421,7 +428,7 @@ class InvitationScreen extends PureComponent { {/* {t('eventSignup.slotTable.endDateTime')} */} - + } @@ -547,6 +554,7 @@ class InvitationScreen extends PureComponent { } function TimeslotRows(props) { let list = []; + let count = 0; if (props.datalist.length > 0) { list = props.datalist.map(function (v, k) { @@ -585,6 +593,12 @@ function TimeslotRows(props) { + } else { + count++; + } + + if (count === props.datalist.length) { + props.handleAllSlotFull(); } });