diff --git a/src/assets/languages/en.json b/src/assets/languages/en.json
index f02d3e1ad7eedb16e3a696661f9fdaa33a880fce..392e3b6f78e458966cd263efa5810d569ddef7c4 100644
--- a/src/assets/languages/en.json
+++ b/src/assets/languages/en.json
@@ -1626,7 +1626,9 @@
"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.",
+ "allSlotsFullMsg": "All event slots are full. You cannot signup the event now.",
+ "slotFullMsg": "Event slot is full. You cannot signup this event now.",
+ "slotsFullMsg": "Event slots are full. You cannot signup this event now.",
"slotTable": {
"heading": "Time Slots",
"title": "Title",
diff --git a/src/componets/SignupEventComponents/SignupEventHistory/SignupEventHistoryRightPanel/SignupEventHistoryRightPanel.js b/src/componets/SignupEventComponents/SignupEventHistory/SignupEventHistoryRightPanel/SignupEventHistoryRightPanel.js
index a902f17ee53daef69ec4d0b655a7035a94b90003..832914e57afe28322ddb07eb9b3a89f8c2f2e72d 100644
--- a/src/componets/SignupEventComponents/SignupEventHistory/SignupEventHistoryRightPanel/SignupEventHistoryRightPanel.js
+++ b/src/componets/SignupEventComponents/SignupEventHistory/SignupEventHistoryRightPanel/SignupEventHistoryRightPanel.js
@@ -233,6 +233,18 @@ class SignupEventHistoryRightPanel extends React.Component {
{moment(currentEventProfile.eventProfile.eventSlotsList[0].endDate + " " + currentEventProfile.eventProfile.eventSlotsList[0].endTime).format("DD-MMM-YYYY hh:mm A")}
+
+
+
{t('eventSignup.eventSignupHistory.totalAllowed')}
+
{currentEventProfile.eventProfile.eventSlotsList[0].maxAllowed === 0 ? t('eventSignup.eventSignupHistory.noLimit') : currentEventProfile.eventProfile.eventSlotsList[0].maxAllowed}
+
+
+
+
+
{t('eventSignup.eventSignupHistory.totalSignedup')}
+
{currentEventProfile.eventProfile.eventSlotsList[0].totalSignedup}
+
+
:
diff --git a/src/componets/SignupEventComponents/SignupEventInvitation/SignupEventInvitationMiddlePanel/SignupEventInvitationMiddlePanel.js b/src/componets/SignupEventComponents/SignupEventInvitation/SignupEventInvitationMiddlePanel/SignupEventInvitationMiddlePanel.js
index 7c74ed7aaa9bc686efe07b2f1a16f60fc57bb3e7..f611a9ddb69430cdd12b40297ab7597c7c72501c 100644
--- a/src/componets/SignupEventComponents/SignupEventInvitation/SignupEventInvitationMiddlePanel/SignupEventInvitationMiddlePanel.js
+++ b/src/componets/SignupEventComponents/SignupEventInvitation/SignupEventInvitationMiddlePanel/SignupEventInvitationMiddlePanel.js
@@ -23,7 +23,7 @@ class SignupEventInvitationMiddlePanel extends React.Component {
};
render() {
- const { classes, showSlotDetail, isShowEdit, editInvitation, showEdit, t, currentEventInvitation, handleNoteChange, invitationNote, activeSection } = this.props;
+ const { classes, showSlotDetail, isShowEdit, isAllSlotsFull, editInvitation, showEdit, t, currentEventInvitation, handleNoteChange, invitationNote, activeSection } = this.props;
return (
@@ -42,9 +42,11 @@ class SignupEventInvitationMiddlePanel extends React.Component {
} */}
{currentEventInvitation.isEditable &&
<>
-
showEdit(true)}>
- {t('edit')}
-
+ {!isShowEdit &&
+
showEdit(true)}>
+ {t('edit')}
+
+ }
{currentEventInvitation.rsvp !== 1 &&
editInvitation(1)}>
{t('cancel')}
@@ -123,13 +125,13 @@ class SignupEventInvitationMiddlePanel extends React.Component {
{t('eventSignup.eventSignupInvitation.notes')}
- {!isShowEdit &&
+ {(!isShowEdit || isAllSlotsFull) &&
{currentEventInvitation.note}
}
- {isShowEdit &&
+ {(isShowEdit && !isAllSlotsFull) &&
diff --git a/src/componets/SignupEventComponents/SignupEventInvitation/SignupEventInvitationRightPanel/SignupEventInvitationRightPanel.js b/src/componets/SignupEventComponents/SignupEventInvitation/SignupEventInvitationRightPanel/SignupEventInvitationRightPanel.js
index 11857f48e54a11307adeded70866b5b0636087a9..06bc9f181dc7351c5efeda01a0373d7f54f15aab 100644
--- a/src/componets/SignupEventComponents/SignupEventInvitation/SignupEventInvitationRightPanel/SignupEventInvitationRightPanel.js
+++ b/src/componets/SignupEventComponents/SignupEventInvitation/SignupEventInvitationRightPanel/SignupEventInvitationRightPanel.js
@@ -70,19 +70,19 @@ class SignupEventInvitationRightPanel extends React.Component {
{t('eventSignup.slotTable.startDateTime')}
-
{moment(slotList[0].startDate + " " + slotList[0].startTime).format("DD-MMM-YYYY hh:mm A")}
+
{moment(currentEventInvitation.event.eventSlotsList[0].startDate + " " + currentEventInvitation.event.eventSlotsList[0].startTime).format("DD-MMM-YYYY hh:mm A")}
{t('eventSignup.slotTable.endDateTime')}
-
{moment(slotList[0].endDate + " " + slotList[0].endTime).format("DD-MMM-YYYY hh:mm A")}
+
{moment(currentEventInvitation.event.eventSlotsList[0].endDate + " " + currentEventInvitation.event.eventSlotsList[0].endTime).format("DD-MMM-YYYY hh:mm A")}
}
- {currentEventInvitation.event.eventSlotsList.length !== 1 &&
+ {(currentEventInvitation.event.eventSlotsList.length > 0 && currentEventInvitation.event.eventSlotsList.length !== 1) &&
@@ -134,6 +134,9 @@ class SignupEventInvitationRightPanel extends React.Component {
}
+ {currentEventInvitation.event.eventSlotsList.length === 0 &&
+ {t('eventSignup.slotsFullMsg')}
+ }
diff --git a/src/containers/EventInvitation/InvitationScreen.js b/src/containers/EventInvitation/InvitationScreen.js
index e9c3607b5063f427784d5181904fe5e1a4474945..bcdcc98577782c0564a288da36acbb6f113d2f6e 100644
--- a/src/containers/EventInvitation/InvitationScreen.js
+++ b/src/containers/EventInvitation/InvitationScreen.js
@@ -50,7 +50,7 @@ const styles = theme => (stylesFunc(
));
const allSlotsFullMsg = "All event slots are full you cannot signup the event now.";
-const slotsFulllMsg = "You cannot signup these slots.";
+const slotsFulllMsg = "You cannot signup";
class InvitationScreen extends PureComponent {
static propTypes = {
@@ -112,6 +112,7 @@ class InvitationScreen extends PureComponent {
});
}
+ let eventSlotsLength = nextProps.eventProfileDetail.eventProfileDetail.eventSlotsList.length;
let currentTime = (moment().valueOf()) / 1000;
currentTime = parseInt(currentTime);
@@ -135,6 +136,21 @@ class InvitationScreen extends PureComponent {
isEventSubmited: true
});
+ } else if (eventSlotsLength === 1) {
+
+ let selectedSlots = this.state.selectedSlot;
+ selectedSlots.push(nextProps.eventProfileDetail.eventProfileDetail.eventSlotsList[0].eventSlotId);
+ this.setState({
+ selectedSlot: selectedSlots
+ })
+ let maxAllowed = nextProps.eventProfileDetail.eventProfileDetail.eventSlotsList[0].maxAllowed;
+ let totalSignedup = nextProps.eventProfileDetail.eventProfileDetail.eventSlotsList[0].totalSignedup;
+ if (totalSignedup >= maxAllowed) {
+ this.setState({
+ responseText: this.props.t('eventSignup.slotFullMsg'),
+ isEventSubmited: true
+ });
+ }
}
this.setState({
@@ -165,7 +181,20 @@ class InvitationScreen extends PureComponent {
}
}
- if (nextProps.updateInvitationResError !== null) {
+ if (nextProps.updateInvitationRes !== null) {
+
+ console.log("nextProps.updateInvitationRes, ",nextProps.updateInvitationRes);
+ this.setState({
+ isUpdateEvent: false,
+ isInvBtnDisable: false,
+ // isShowDashboardBtn: true,
+ responseText: this.props.t('eventSignup.eventSignupInvitation.invitationMsg'),
+ isEventSubmited: true
+ });
+
+ } else if (nextProps.updateInvitationResError !== null) {
+
+ console.log("nextProps.updateInvitationResError, ",nextProps.updateInvitationResError);
this.setState({
isUpdateEvent: false,
@@ -196,16 +225,6 @@ class InvitationScreen extends PureComponent {
});
}
}
-
- if (nextProps.updateInvitationRes !== null) {
- this.setState({
- isUpdateEvent: false,
- isInvBtnDisable: false,
- // isShowDashboardBtn: true,
- responseText: this.props.t('eventSignup.eventSignupInvitation.invitationMsg'),
- isEventSubmited: true
- });
- }
}
handleAllSlotFull = () => {
@@ -276,9 +295,15 @@ class InvitationScreen extends PureComponent {
console.log("");
let eventId = this.state.eventProfileDetail.eventProfileDetail.eventId;
- // const eventId = '92ce7c9e-f9a6-4c7c-b6aa-fe6e78e01df8';
let userType = 4;
- this.props.navigateToUpdateEventInvitation(eventId, false, this.state.invitationNote, rsvp, userType, this.state.selectedSlot, this.state.userName, this.state.token);
+
+ if (rsvp === 1) {
+ this.setState({ selectedSlot: [] }, () => {
+ this.props.navigateToUpdateEventInvitation(eventId, false, this.state.invitationNote, rsvp, userType, this.state.selectedSlot, this.state.userName, this.state.token);
+ })
+ } else {
+ this.props.navigateToUpdateEventInvitation(eventId, false, this.state.invitationNote, rsvp, userType, this.state.selectedSlot, this.state.userName, this.state.token);
+ }
}
}
diff --git a/src/core/resource/signupevent/SignupEventReducer.js b/src/core/resource/signupevent/SignupEventReducer.js
index a7f67d2359a367a094b3fef84b7c5555011520f8..e9b7ddaaab017a8d42cc827def337efe83ad81df 100644
--- a/src/core/resource/signupevent/SignupEventReducer.js
+++ b/src/core/resource/signupevent/SignupEventReducer.js
@@ -206,7 +206,11 @@ const handleGetEventInvitationError = state => ({
//updateEventInvitation
const handleUpdateEventInvitationRequest = state => ({
...state,
- ...{ isUpdateEventInvitationPending: true }
+ ...{
+ isUpdateEventInvitationPending: true,
+ updateInvitationRes: null,
+ updateInvitationResError: null
+ }
});
const handleUpdateEventInvitationSuccess = (state, payload) => {
@@ -374,7 +378,7 @@ const handleCancelEventError = (state, payload) => ({
});
const handleClearStoreRequest = (state, payload) => {
let resetStartVars = {};
- if(payload.isClear == 'createEventSteps'){
+ if (payload.isClear == 'createEventSteps') {
resetStartVars = { isCreateEventStep1: false, isCreateEventStep2: false, isCreateEventStep3: false };
}
return ({
diff --git a/src/layouts/EventSignupInvitation/EventSignupInvitation.js b/src/layouts/EventSignupInvitation/EventSignupInvitation.js
index b9297661ac54cb5c343514fc552d66ee1fda76b4..de4094dbc57210c51dfc75e3e3a5227b5eb0b515 100644
--- a/src/layouts/EventSignupInvitation/EventSignupInvitation.js
+++ b/src/layouts/EventSignupInvitation/EventSignupInvitation.js
@@ -17,7 +17,8 @@ import { bindActionCreators } from 'redux';
const styles = theme => (stylesFunc(theme, contactAvatarImg));
const allSlotsFullMsg = "All event slots are full you cannot signup the event now.";
-const slotsFulllMsg = "You cannot signup these slots.";
+const slotsFulllMsg = "You cannot signup";
+const slotFulllMsg = "Event slot is full you cannot signup this event now.";
class EventSignupInvitation extends React.Component {
@@ -42,7 +43,8 @@ class EventSignupInvitation extends React.Component {
eventSlotDetails: {},
activeSection: 0,
isShowCancel: false,
- isCancelling: false
+ isCancelling: false,
+ isAllSlotsFull: false
};
this.invitationRightRef = React.createRef();
@@ -98,13 +100,20 @@ class EventSignupInvitation extends React.Component {
selectedSlot: [...selectedSlots]
});
- value.event.eventSlotsList.forEach(element => {
- let eventSlotDetails = this.state.eventSlotDetails;
- eventSlotDetails[element.eventSlotId] = element;
- this.setState({
- eventSlotDetails: eventSlotDetails
- })
- });
+ if (value.event.eventSlotsList.length > 0) {
+
+ this.setState({ isAllSlotsFull: false });
+
+ value.event.eventSlotsList.forEach(element => {
+ let eventSlotDetails = this.state.eventSlotDetails;
+ eventSlotDetails[element.eventSlotId] = element;
+ this.setState({
+ eventSlotDetails: eventSlotDetails
+ })
+ });
+ } else {
+ this.setState({ isAllSlotsFull: true });
+ }
this.handleShowSlotDetail(true);
@@ -157,7 +166,12 @@ class EventSignupInvitation extends React.Component {
})
}
else {
- this.props.navigateToUpdateEventInvitation(eventId, isGoogleCalendar, note, rsvp, userType, this.state.selectedSlot, this.state.userName);
+
+ let eventSlots = this.state.currentEventInvitation.event.eventSlotsList.length !== 0 ? [this.state.currentEventInvitation.event.eventSlotsList[0].eventSlotId] : [];
+ let selectedSlots = this.state.currentEventInvitation.event.eventSlotsList.length === 1 ?
+ eventSlots
+ : this.state.selectedSlot;
+ this.props.navigateToUpdateEventInvitation(eventId, isGoogleCalendar, note, rsvp, userType, selectedSlots, this.state.userName);
}
}
}
@@ -219,7 +233,7 @@ class EventSignupInvitation extends React.Component {
if (nextProps.updateInvitationResError.data && nextProps.updateInvitationResError.data.error) {
let responseText = nextProps.updateInvitationResError.data.error.message;
- if (responseText.includes(slotsFulllMsg) || responseText.includes(allSlotsFullMsg)) {
+ if (responseText.includes(slotsFulllMsg) || responseText.includes(allSlotsFullMsg) || responseText.includes(slotFulllMsg)) {
this.props.actions.showToast({
text: nextProps.updateInvitationResError.data.error.message,
duration: 5000,
@@ -302,7 +316,7 @@ class EventSignupInvitation extends React.Component {
- {this.state.isShowEdit &&
+ {(this.state.isShowEdit) &&
{/* this.handleEditEventInvitation(0)} className={`${classes.headerButton} invitation_button`}>
{t('yes')}
@@ -314,9 +328,11 @@ class EventSignupInvitation extends React.Component {
{t('mayBe')}
*/}
- this.handleEditEventInvitation(0)} className={`${classes.headerButton} invitation_button`}>
- {t('eventSignup.btns.save')}
-
+ {!this.state.isAllSlotsFull &&
+ this.handleEditEventInvitation(0)} className={`${classes.headerButton} invitation_button`}>
+ {t('eventSignup.btns.save')}
+
+ }
this.handleEditEventInvitation(false)} className={`${classes.headerButton} invitation_button`}>
{t('eventSignup.btns.cancelChanges')}
@@ -341,6 +357,7 @@ class EventSignupInvitation extends React.Component {
handleNoteChange={this.handleNoteChange}
showSlotDetail={this.handleShowSlotDetail}
isShowEdit={this.state.isShowEdit}
+ isAllSlotsFull={this.state.isAllSlotsFull}
invitationNote={this.state.invitationNote}
showEdit={this.handleShowEdit}
t={t} currentEventInvitation={this.state.currentEventInvitation}
diff --git a/src/layouts/EventSignupInvitation/EventSignupInvitation.styles.js b/src/layouts/EventSignupInvitation/EventSignupInvitation.styles.js
index 2e54b5ac3c7d4b6d9a15f07c3c1d6771255e8971..c39f3281e2130f45312cf9454e30a55cfdc0188e 100644
--- a/src/layouts/EventSignupInvitation/EventSignupInvitation.styles.js
+++ b/src/layouts/EventSignupInvitation/EventSignupInvitation.styles.js
@@ -232,6 +232,16 @@ export default (theme, contactAvatarImg) => ({
maxWidth: 100,
},
},
+ slotFullMsg: {
+ overflow: 'hidden',
+ display: 'inline-block',
+ fontSize: 14,
+ textOverflow: 'ellipsis',
+ fontWeight: 600,
+ '&.small': {
+ maxWidth: 100,
+ },
+ },
eventName: {
margin: "0",
fontSize: "12px",
diff --git a/src/layouts/EventSignupNew/EventSignupNew.js b/src/layouts/EventSignupNew/EventSignupNew.js
index 5cb8d8767af514eaa57214bbc6160989136a3374..b85c48772ce63035949d36da5c50f90813066ced 100644
--- a/src/layouts/EventSignupNew/EventSignupNew.js
+++ b/src/layouts/EventSignupNew/EventSignupNew.js
@@ -974,7 +974,7 @@ class EventSignupNew extends Component {
eveventTimeslots = [
{
title: this.state.eventTitle,
- maxAllowed: 0,
+ maxAllowed: this.state.maxAllowed.value,
startDate: this.state.startDate.format("YYYY-MM-DD"),
startTime: slotStartTimeArr[1] + ":" + slotStartTimeArr[2],
endDate: this.state.endDate.format("YYYY-MM-DD"),
@@ -1140,6 +1140,12 @@ class EventSignupNew extends Component {
inviterName
);
} else if (this.state.eventAddFormStep === 2) {
+
+ if ((emailIds.length === 0 || mobileNoArr.length === 0) && !isCalledByEmailSms) {
+ this.setState({ displayEmailSmsMsgModel: true, isLoader: false });
+ return;
+ }
+
//if event already published, no call api
if (this.state.editModeInternalUse && this.state.isPublishTs > 0) {
let step = this.state.eventAddFormStep;
@@ -1148,11 +1154,6 @@ class EventSignupNew extends Component {
return;
}
- if ((emailIds.length === 0 || mobileNoArr.length === 0) && !isCalledByEmailSms) {
- this.setState({ displayEmailSmsMsgModel: true, isLoader: false });
- return;
- }
-
this.saveEventApiCall(
action,
eventId,
@@ -1571,11 +1572,13 @@ class EventSignupNew extends Component {
let endHour = "";
let endHour12 = "";
let endMinute = "";
+ let singleSlotMaxAllowed = AllowParticipantOptions[0];
if (data.eventSlotsList.length > 0) {
const firstSlot = data.eventSlotsList[0];
const splitStartTime = firstSlot.startTime.split(":");
const splitEndTime = firstSlot.endTime.split(":");
-
+
+ singleSlotMaxAllowed = { value: firstSlot.maxAllowed, label: firstSlot.maxAllowed };
startDate = moment(firstSlot.startDate);
startHour = splitStartTime[0];
startHour12 = parseInt(splitStartTime[0]) % 12;
@@ -1690,7 +1693,8 @@ class EventSignupNew extends Component {
label: endMinute.toString(),
value: endMinute.toString()
},
-
+ maxAllowed: singleSlotMaxAllowed,
+
//step 2
isSelectedParticipents: isSelectedParticipents,
inviteBy: "by_contacts",
@@ -1963,8 +1967,6 @@ class EventSignupNew extends Component {
this.setState({ maxAllowed: selectedVal });
}
validateMaxAllowed = (val) => {
-
- console.log("val, ", val);
const firstObj = AllowParticipantOptions[0];
if (val && val.trim() !== '' && Number(val) < AllowParticipantOptions.length) {
let alowedvalues = [];
@@ -2170,6 +2172,24 @@ class EventSignupNew extends Component {
{!this.state.isMultiTimeSlot && (
<>
+
+
+ {t("eventSignup.labels.allowedParticipants")}
+
+
+
+
>
)}