From a956fc379708b11c00eb7db040a63ef9feb8985a Mon Sep 17 00:00:00 2001 From: Chetna Joshi Date: Fri, 19 Jun 2020 14:16:08 +0530 Subject: [PATCH 1/7] added some new text for event signup --- src/assets/languages/en.json | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/assets/languages/en.json b/src/assets/languages/en.json index b5bb6f41a..e1ee8fbfe 100644 --- a/src/assets/languages/en.json +++ b/src/assets/languages/en.json @@ -1498,6 +1498,8 @@ "pending": "Pending", "eventSignup": { "inviteEmailSmsMsg": "You can also invite participants by email and sms", + "inviteEmailMsg": "You can also invite participants by email", + "inviteSmsMsg": "You can also invite participants by sms", "noThanks": "No, Thanks", "inviteBySMS": "Invite by SMS", "inviteByEmail": "Invite by Email", @@ -1532,7 +1534,8 @@ "startDateTime": "Start Date & Time", "endDateTime": "End Date & Time", "addMultileSlot": "Add Multiple Time Slots", - "inviter": "Inviter" + "inviter": "Inviter", + "allowedParticipants": "Total participants allowed" }, "btns": { "saveAndNext": "Save & Next", @@ -1560,6 +1563,7 @@ "requireNumber": "Phone number is required", "requireEmail": "Email is required", "invalidEmail": "Email is invalid", + "alreadyExistEmail": "Email is already added", "emptyLocation": "Location is required", "selectTimeslot": "Please select at least 2 timeslot", "selectEventSlot": "Please select at least 1 timeslot", @@ -1632,7 +1636,10 @@ "scheduled": "Scheduled", "canceled": "Canceled" }, - "signupDetails": "Event Details" + "signupDetails": "Event Details", + "noLimit": "No Limit", + "totalAllowed": "Total Allowed", + "totalSignedup": "Total Signedup" }, "eventSignupInvitation": { "tabs": { -- GitLab From e0314fdfde7f86a54cb31ddd4b8d052625d94657 Mon Sep 17 00:00:00 2001 From: Chetna Joshi Date: Fri, 19 Jun 2020 14:18:18 +0530 Subject: [PATCH 2/7] implemented new changes in signup event panels --- .../SignupEventHistoryRightPanel.js | 17 +- .../EventInvitation/InvitationScreen.js | 83 +++--- .../EventSignupHistory.styles.js | 9 + src/layouts/EventSignupNew/EventSignupNew.js | 264 ++++++++++++------ .../styles/EventSignupNew.styles.js | 55 +++- .../subcomponents/InviteByEmail.js | 20 +- .../subcomponents/LocationUpload.js | 9 +- 7 files changed, 312 insertions(+), 145 deletions(-) diff --git a/src/componets/SignupEventComponents/SignupEventHistory/SignupEventHistoryRightPanel/SignupEventHistoryRightPanel.js b/src/componets/SignupEventComponents/SignupEventHistory/SignupEventHistoryRightPanel/SignupEventHistoryRightPanel.js index 15e158ee7..a902f17ee 100644 --- a/src/componets/SignupEventComponents/SignupEventHistory/SignupEventHistoryRightPanel/SignupEventHistoryRightPanel.js +++ b/src/componets/SignupEventComponents/SignupEventHistory/SignupEventHistoryRightPanel/SignupEventHistoryRightPanel.js @@ -239,19 +239,26 @@ class SignupEventHistoryRightPanel extends React.Component {
{/*
{t('eventSignup.timeSlot')}
*/} - + {/* - + */} {currentEventProfile.eventProfile.eventSlotsList.map((slot, index) => { return ( - - + ) } diff --git a/src/containers/EventInvitation/InvitationScreen.js b/src/containers/EventInvitation/InvitationScreen.js index b34cc8477..c7cab7a79 100644 --- a/src/containers/EventInvitation/InvitationScreen.js +++ b/src/containers/EventInvitation/InvitationScreen.js @@ -49,6 +49,9 @@ const styles = theme => (stylesFunc( bgImageMob )); +const allSlotsFullMsg = "All event slots are full you cannot signup the event now."; +const slotsFulllMsg = "You cannot signup these slots."; + class InvitationScreen extends PureComponent { static propTypes = { classes: PropTypes.object.isRequired, @@ -172,10 +175,18 @@ class InvitationScreen extends PureComponent { if (nextProps.updateInvitationResError.data && nextProps.updateInvitationResError.data.error) { // ${i18n.t('err')}: ${res.data.error.message} - this.setState({ - responseText: nextProps.updateInvitationResError.data.error.message, - isEventSubmited: true - }); + let responseText = nextProps.updateInvitationResError.data.error.message; + if (responseText.includes(slotsFulllMsg) || responseText.includes(allSlotsFullMsg)) { + this.setState({ + msgText: nextProps.updateInvitationResError.data.error.message, + isConfirmationModalOpen: true + }); + } else { + this.setState({ + responseText: responseText, + isEventSubmited: true + }); + } } else { this.props.actions.showToast({ @@ -539,40 +550,42 @@ function TimeslotRows(props) { if (props.datalist.length > 0) { list = props.datalist.map(function (v, k) { - return - - + + - - - - + + } }); return {list} diff --git a/src/layouts/EventSignupHistory/EventSignupHistory.styles.js b/src/layouts/EventSignupHistory/EventSignupHistory.styles.js index 08c56f0ab..f972b4cb7 100644 --- a/src/layouts/EventSignupHistory/EventSignupHistory.styles.js +++ b/src/layouts/EventSignupHistory/EventSignupHistory.styles.js @@ -897,6 +897,15 @@ export default (theme, contactAvatarImg) => ({ minWidth:'100px', textOverflow: 'ellipsis', overflow: 'hidden', + '& div':{ + marginBottom:"4px", + '& span':{ + display: 'inline-block', + width: '100px', + fontWeight: '600', + fontSize: '13px', + }, + } }, '& th': { borderBottom: "1px solid #454d55", diff --git a/src/layouts/EventSignupNew/EventSignupNew.js b/src/layouts/EventSignupNew/EventSignupNew.js index 1ca8c0735..5cb8d8767 100644 --- a/src/layouts/EventSignupNew/EventSignupNew.js +++ b/src/layouts/EventSignupNew/EventSignupNew.js @@ -54,6 +54,7 @@ import { profileSelectors } from 'Resource/profile'; import RemindMeSettings, { convertToMs } from "../../core/utils/RemindMeSettings"; +import AllowParticipantOptions from "../../core/utils/AllowParticipantOptions"; import { signupEventSelectors, signupEventActions @@ -69,7 +70,7 @@ moment.tz.add(constants.americaPacicZoneInfo); const validTitleLength = 200; const validInviterNameLength = 30; -const validSlotTitleLength = 10; +const validSlotTitleLength = 20; const validEmailRegex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; const styles = theme => stylesFunc(theme, backArrow, forwardArrow); const filterMyProfile = (users, myId) => { @@ -119,6 +120,7 @@ class EventSignupNew extends Component { isNotifyAdmin: false, historyPage: false, timeslotTitle: "", + maxAllowed: AllowParticipantOptions[0], reminder: { value: "", label: "", ms: 0 }, timezone: { value: "", label: "" }, scheduleTimezone: { value: "", label: "" }, @@ -194,8 +196,8 @@ class EventSignupNew extends Component { eventProfileResponseData, accountsDetails } = newProps; - - console.log('UNSAFE_componentWillReceiveProps',{ + + console.log('UNSAFE_componentWillReceiveProps', { isCreateEventPending: isCreateEventPending, isCreateEventStep1: isCreateEventStep1, isCreateEventStep2: isCreateEventStep2, @@ -312,6 +314,7 @@ class EventSignupNew extends Component { isNotifyAdmin: false, historyPage: false, timeslotTitle: "", + maxAllowed: AllowParticipantOptions[0], reminder: { value: "", label: "", ms: 0 }, timezone: { value: "", label: "" }, scheduleTimezone: { value: "", label: "" }, @@ -477,7 +480,7 @@ class EventSignupNew extends Component { if (value.length > validSlotTitleLength) { value = this.state.timeslotTitle; } - }else if(name == 'inviterName'){ + } else if (name == 'inviterName') { if (value.length > validInviterNameLength) { value = this.state.inviterName; } @@ -502,21 +505,47 @@ class EventSignupNew extends Component { updateEndDate = startDate => { this.setState({ endDate: startDate }); }; + updateEndTime = () => { + let startHur = parseInt(this.state.startTimeHours.value); + let startMin = parseInt(this.state.startTimeMinutes.value); + if (this.state.startTimeMode == 'PM') { + if (startHur < 12) { + startHur = startHur + 12; + } + } + const dateTime = moment().format('YYYY-MM-DD') + ' ' + startHur + ':' + startMin; + + const endTimeMoment = moment(dateTime).add(0.25, "hours"); + const { date, hours, minutes, hours12 } = getDateFormatted( + endTimeMoment.unix() * 1000 + ); + this.setState({ + endTimeMode: hours >= 12 ? "PM" : "AM", + endTimeHours: { + label: hours12, + value: hours12 + }, + endTimeMinutes: { + label: minutes.toString(), + value: minutes.toString() + } + }); + } handleStartDatePikerChange = date => { this.setState({ startDate: moment(date), isClaendarOpen: false }, () => { this.updateEndDate(this.state.startDate); }); }; - handleChangeStartTimeHours = hours => { + handleChangeStartTimeHours = hour => { if ( - hours && - hours.value && - Number(hours.value) <= 12 && - Number(hours.value) >= 0 + hour && + hour.value && + Number(hour.value) <= 12 && + Number(hour.value) >= 0 ) { - this.setState({ startTimeHours: hours }); - this.updateTimeStamp('start'); + this.setState({ startTimeHours: hour }, this.updateEndTime); + //this.updateTimeStamp('start'); } else { this.setState({ startTimeHours: '' }); } @@ -528,7 +557,7 @@ class EventSignupNew extends Component { Number(mins.value) <= 59 && Number(mins.value) >= 0 ) { - this.setState({ startTimeMinutes: mins }); + this.setState({ startTimeMinutes: mins }, this.updateEndTime); } else { this.setState({ startTimeMinutes: '' }); } @@ -539,7 +568,7 @@ class EventSignupNew extends Component { mode.value && (mode.value.toLowerCase() === "am" || mode.value.toLowerCase() === "pm") ) { - this.setState({ startTimeMode: mode.value }); + this.setState({ startTimeMode: mode.value }, this.updateEndTime); } else { this.setState({ startTimeMode: '' }); } @@ -575,7 +604,7 @@ class EventSignupNew extends Component { if ( mode && mode.value && - mode.value.length <=2 && + mode.value.length <= 2 && (mode.value.toLowerCase() === "am" || mode.value.toLowerCase() === "pm") ) { this.setState({ endTimeMode: mode.value }); @@ -615,7 +644,7 @@ class EventSignupNew extends Component { if ( mode && mode.value && - mode.value.length <=2 && + mode.value.length <= 2 && (mode.value.toLowerCase() === "am" || mode.value.toLowerCase() === "pm") ) { this.setState({ scheduleTimeMode: mode.value }); @@ -633,8 +662,7 @@ class EventSignupNew extends Component { let alowedvalues = this.getAllowedValues('hours'); if (hours && hours !== '') { if (alowedvalues.indexOf(Number(hours)) !== -1) { - this.setState({ startTimeHours: { label: hours, value: hours } }, () => { - }); + this.setState({ startTimeHours: { label: hours, value: hours } }, this.updateEndTime); } else { this.setState({ startTimeHours: { label: '', value: '' } }); } @@ -643,9 +671,8 @@ class EventSignupNew extends Component { validateStartMinutes = (minutes) => { let alowedvalues = this.getAllowedValues(); if (minutes && minutes !== '') { - if (alowedvalues.indexOf(Number(minutes)) !== -1 || minutes == '00'){ - this.setState({ startTimeMinutes: { label: minutes, value: minutes } }, () => { - }); + if (alowedvalues.indexOf(Number(minutes)) !== -1 || minutes == '00') { + this.setState({ startTimeMinutes: { label: minutes, value: minutes } }, this.updateEndTime); } else { this.setState({ startTimeMinutes: { label: '', value: '' } }); } @@ -655,9 +682,9 @@ class EventSignupNew extends Component { if (timeFormat && timeFormat.length <= 2) { let format = timeFormat.charAt(0).toUpperCase(); if (format === 'A') { - this.setState({ startTimeMode: 'AM' }); + this.setState({ startTimeMode: 'AM' }, this.updateEndTime); } else { - this.setState({ startTimeMode: 'PM' }); + this.setState({ startTimeMode: 'PM' }, this.updateEndTime); } } else if (timeFormat && timeFormat.length > 2) { this.setState({ startTimeMode: '' }); @@ -675,10 +702,10 @@ class EventSignupNew extends Component { } } } - validateEndMinutes = (minutes) => { + validateEndMinutes = (minutes) => { let alowedvalues = this.getAllowedValues(); if (minutes && minutes !== '') { - if (alowedvalues.indexOf(Number(minutes)) !== -1 || minutes == '00') { + if (alowedvalues.indexOf(Number(minutes)) !== -1 || minutes == '00') { this.setState({ endTimeMinutes: { label: minutes, value: minutes } }, () => { }); } else { @@ -713,14 +740,14 @@ class EventSignupNew extends Component { validateScheduleMinutes = (minutes) => { let alowedvalues = this.getAllowedValues(); if (minutes && minutes !== '') { - if (alowedvalues.indexOf(Number(minutes)) !== -1 || minutes == '00') { + if (alowedvalues.indexOf(Number(minutes)) !== -1 || minutes == '00') { this.setState({ scheduleTimeMinutes: { label: minutes, value: minutes } }, () => { }); } else { this.setState({ scheduleTimeMinutes: { label: '', value: '' } }); } } - } + } validateScheduleTimeMode = (timeFormat) => { if (timeFormat && timeFormat.length <= 2) { let format = timeFormat.charAt(0).toUpperCase(); @@ -736,9 +763,9 @@ class EventSignupNew extends Component { updateTimeStamp = (type) => { } - getAllowedValues = (type='min') =>{ + getAllowedValues = (type = 'min') => { let values = ScheduleMinutesOptions; - if(type=='hours'){ + if (type == 'hours') { values = ScheduleHoursOptions; } let alowedvalues = []; @@ -789,6 +816,7 @@ class EventSignupNew extends Component { duration: 5000, position: "top" }); + return false; } else if (!isEmailValid) { //check email field isValid actions.showToast({ @@ -796,19 +824,26 @@ class EventSignupNew extends Component { duration: 5000, position: "top" }); + return false; } else { let emailsArr = this.state.inviteEmails; //check email already exist or not if (emailsArr.length > 0) { let arrRes = emailsArr.filter(item => item.email == data.email); if (arrRes.length > 0) { - return; + actions.showToast({ + text: t("eventSignup.validateion.alreadyExistEmail"), + duration: 5000, + position: "top" + }); + return false; } } //add new email emailsArr.push(data); this.setState({ inviteEmails: emailsArr }, this.toggleParticipents); + return true; } } else if (type == "users") { let usersArr = this.state.inviteUsers; @@ -865,10 +900,8 @@ class EventSignupNew extends Component { }; saveNewEvent = async (btn, isCalledByEmailSms, event) => { - console.log("btn"); console.log(btn); - if (isCalledByEmailSms) { this.setState({ displayEmailSmsMsgModel: false }); } @@ -884,7 +917,7 @@ class EventSignupNew extends Component { this.state.endTimeMode ); this.setState({ showScheduleLaterModal: false }); - if (this.formValidation()) { + if (this.formvalidateion()) { return false; } if ( @@ -919,7 +952,7 @@ class EventSignupNew extends Component { ); eveventTimeslots.push({ title: v.title, - maxAllowed: 0, + maxAllowed: v.maxAllowed, startDate: v.startDate, startTime: slotStartTimeArr[1] + ":" + slotStartTimeArr[2], endDate: v.endDate, @@ -1027,24 +1060,24 @@ class EventSignupNew extends Component { // if(this.state.editModeInternalUse && this.state.isScheduleTs > 0){ // isUpdateSchedule = !this.state.isSchedule ? true : false; // } - - let isUpdateReminder = this.state.isReminder; - let reminderBeforeSec = this.state.reminder.ms > 0 ? this.state.reminder.ms / 1000 : 0; - if(this.state.editModeInternalUse && this.state.isPublishTs>0){ - if(this.state.isReminderTs > 0){ - isUpdateReminder = false; - if(!this.state.isReminder){ - isUpdateReminder = true; - reminderBeforeSec = 0; - } else { - isUpdateReminder = ( parseInt(reminderBeforeSec)===parseInt(this.state.remindBeforeTmp) ) ? false : true; - reminderBeforeSec = (isUpdateReminder) ? reminderBeforeSec : 0; - } + + let isUpdateReminder = this.state.isReminder; + let reminderBeforeSec = this.state.reminder.ms > 0 ? this.state.reminder.ms / 1000 : 0; + if (this.state.editModeInternalUse && this.state.isPublishTs > 0) { + if (this.state.isReminderTs > 0) { + isUpdateReminder = false; + if (!this.state.isReminder) { + isUpdateReminder = true; + reminderBeforeSec = 0; } else { - if(this.state.isReminder){ - isUpdateReminder = true; - } + isUpdateReminder = (parseInt(reminderBeforeSec) === parseInt(this.state.remindBeforeTmp)) ? false : true; + reminderBeforeSec = (isUpdateReminder) ? reminderBeforeSec : 0; + } + } else { + if (this.state.isReminder) { + isUpdateReminder = true; } + } } else { isUpdateReminder = false; } @@ -1053,7 +1086,7 @@ class EventSignupNew extends Component { isUpdateSchedule: isUpdateSchedule, isUpdateReminder: isUpdateReminder, reminderBeforeSec: reminderBeforeSec, - state:this.state + state: this.state } ); const eventId = this.state.eventId; @@ -1115,7 +1148,7 @@ class EventSignupNew extends Component { return; } - if (emailIds.length === 0 && mobileNoArr.length === 0 && !isCalledByEmailSms) { + if ((emailIds.length === 0 || mobileNoArr.length === 0) && !isCalledByEmailSms) { this.setState({ displayEmailSmsMsgModel: true, isLoader: false }); return; } @@ -1261,7 +1294,7 @@ class EventSignupNew extends Component { const timeZone = countryValue; return validateScheduleTime(date, hours, minutes, timeZone, vMode); }; - formValidation = (fromFunc = "") => { + formvalidateion = (fromFunc = "") => { const { actions, t, countryValue } = this.props; //current date time const twoHoursFromNow = moment().add(2, "hours"); @@ -1556,8 +1589,8 @@ class EventSignupNew extends Component { data.eventSlotsList.map(function (v) { const splitStartTime = v.startTime.split(":"); const splitEndTime = v.endTime.split(":"); + //const maxAllowedObj = (parseInt(v.maxAllowed)===0) ? AllowParticipantOptions[0] : { value: v.maxAllowed, label: v.maxAllowed }; eventSlots.push({ - maxAllowed: 0, startDate: v.startDate, startTime: v.startTime, endDate: v.endDate, @@ -1573,7 +1606,9 @@ class EventSignupNew extends Component { endDateMoment: moment(v.endDate), endTimeMode: parseInt(splitEndTime[0]) >= 12 ? "PM" : "AM", endTimeHours: parseInt(splitEndTime[0]) % 12, - endTimeMinutes: splitEndTime[1] + endTimeMinutes: splitEndTime[1], + + maxAllowed: v.maxAllowed, }); }); //eventSlots = data.eventSlotsList; @@ -1614,7 +1649,7 @@ class EventSignupNew extends Component { scheduleObj.scheduleTimezone = { value: data.scheduleTimezone, label: data.scheduleTimezone }; } /* ***** end set schedules dateTime ***** */ - + /* ***** start set location obj ***** */ let location = data.location; location.lat = data.location.latitude; @@ -1737,11 +1772,11 @@ class EventSignupNew extends Component { if (this.state.shouldLeave) { return; } - - let step = this.state.eventAddFormStep; - step = step >= 3 ? step : step + 1; - this.setState({ eventAddFormStep: step, isLoader: false }); - + + let step = this.state.eventAddFormStep; + step = step >= 3 ? step : step + 1; + this.setState({ eventAddFormStep: step, isLoader: false }); + return; }; backStep = () => { @@ -1752,7 +1787,7 @@ class EventSignupNew extends Component { return; }; onAddTimeSlot = e => { - if (this.formValidation("addSlot")) { + if (this.formvalidateion("addSlot")) { return false; } let timeSlotArr = this.state.timeSlotArr; @@ -1803,9 +1838,11 @@ class EventSignupNew extends Component { endDate: this.state.endDate.format("YYYY-MM-DD"), endTimeMode: this.state.endTimeMode, endTimeHours: this.state.endTimeHours.value, - endTimeMinutes: this.state.endTimeMinutes.value + endTimeMinutes: this.state.endTimeMinutes.value, + + maxAllowed: this.state.maxAllowed.value, }); - this.setState({ timeSlotArr, timeslotTitle: "" }); + this.setState({ timeSlotArr, timeslotTitle: "", maxAllowed: AllowParticipantOptions[0] }); }; removeTimeSlot = k => { let timeSlotArr = this.state.timeSlotArr; @@ -1922,6 +1959,28 @@ class EventSignupNew extends Component { }); } } + onChangeMaxAllowed = (selectedVal) => { + this.setState({ maxAllowed: selectedVal }); + } + validateMaxAllowed = (val) => { + + console.log("val, ", val); + const firstObj = AllowParticipantOptions[0]; + if (val && val.trim() !== '' && Number(val) < AllowParticipantOptions.length) { + let alowedvalues = []; + AllowParticipantOptions.forEach((element, index) => { + alowedvalues.push(element.value); + }); + if (alowedvalues.indexOf(Number(val)) !== -1) { + this.setState({ maxAllowed: { label: parseInt(val), value: parseInt(val) } }); + } else { + this.setState({ maxAllowed: firstObj }); + } + } else { + this.setState({ maxAllowed: firstObj }); + } + } + render() { const { eventAddFormStep, @@ -2055,6 +2114,9 @@ class EventSignupNew extends Component { onClick={() => { this.setState({ showLocationModal: true }); }} + onFocus={() => { + this.setState({ showLocationModal: true }); + }} />
@@ -2071,7 +2133,7 @@ class EventSignupNew extends Component { native={false} children={CountryOptionsSettings} onChange={timezone => { - this.setState({ timezone: (timezone===null) ? { value: "", label: "" } : timezone }); + this.setState({ timezone: (timezone === null) ? { value: "", label: "" } : timezone }); }} disabled={isDisabledTimes} /> @@ -2206,6 +2268,24 @@ class EventSignupNew extends Component { inputType={t("eventSignup.labels.title")} />
+
+ +
{t('eventSignup.slotTable.title')} {t('eventSignup.eventSignupInvitation.dateTime')} ({currentEventProfile.eventProfile.timezone})
{slot.title}{moment(slot.startDate + " " + slot.startTime).format("DD-MMM-YYYY hh:mm A")}
- {moment(slot.endDate + " " + slot.endTime).format("DD-MMM-YYYY hh:mm A")}
+
{t('eventSignup.labels.title')}:{slot.title}
+
+ {t('eventSignup.timezone')}:{currentEventProfile.eventProfile.timezone}
+ {t('startDate')}:{moment(slot.startDate + " " + slot.startTime).format("DD-MMM-YYYY hh:mm A")}
+ {t('endDate')}:{moment(slot.endDate + " " + slot.endTime).format("DD-MMM-YYYY hh:mm A")} +
+
{t('eventSignup.eventSignupHistory.totalAllowed')}:{slot.maxAllowed === 0 ? t('eventSignup.eventSignupHistory.noLimit') : slot.maxAllowed}
+
{t('eventSignup.eventSignupHistory.totalSignedup')}:{slot.totalSignedup}
+
{v.title} -
-
- Start : {moment(v.startDate + " " + v.startTime).format("DD-MMM-YYYY hh:mm A")}
- - End : - {moment(v.endDate + " " + v.endTime).format("DD-MMM-YYYY hh:mm A")} - -
+ if (v.maxAllowed === 0 || v.totalSignedup < v.maxAllowed) { + return
{v.title} +
+
+ Start : {moment(v.startDate + " " + v.startTime).format("DD-MMM-YYYY hh:mm A")}
+ + End : + {moment(v.endDate + " " + v.endTime).format("DD-MMM-YYYY hh:mm A")} + +
+ + {props.datalist.length > 1 && + <> +
+ +
+ + } - {props.datalist.length > 1 && - <> -
- -
- - } +
+
- + {/* - + */} { - this.setState({ scheduleTimezone: (scheduleTimezone===null) ? { value: "", label: "" } : scheduleTimezone }); + this.setState({ scheduleTimezone: (scheduleTimezone === null) ? { value: "", label: "" } : scheduleTimezone }); }} /> @@ -2915,18 +2995,31 @@ class EventSignupNew extends Component { }} center> -

{t("eventSignup.inviteEmailSmsMsg")}

+ {(this.state.inviteNumbers.length === 0 && this.state.inviteEmails.length === 0) ? +

{t("eventSignup.inviteEmailSmsMsg")}

+ : + + this.state.inviteNumbers.length === 0 ? +

{t("eventSignup.inviteSmsMsg")}

+ : + this.state.inviteEmails.length === 0 && +

{t("eventSignup.inviteEmailMsg")}

+ }
- - + {this.state.inviteNumbers.length === 0 && + + } + {this.state.inviteEmails.length === 0 && + + } )} @@ -2941,16 +3034,21 @@ function TimeslotRows(props) { list = props.datalist.map(function (v, k) { return (
- - ); diff --git a/src/layouts/EventSignupNew/styles/EventSignupNew.styles.js b/src/layouts/EventSignupNew/styles/EventSignupNew.styles.js index 5c0e5d379..b0e99c4e0 100644 --- a/src/layouts/EventSignupNew/styles/EventSignupNew.styles.js +++ b/src/layouts/EventSignupNew/styles/EventSignupNew.styles.js @@ -683,6 +683,17 @@ export default (theme, backArrow, forwardArrow) => ({ padding: ".75rem", verticalAlign: "top", borderBottomWidth: "1px", + position:'relative', + display: 'flex', + justifyContent: 'space-between', + alignItems: 'center', + '& span':{ + display: 'inline-block', + width: '112px', + fontWeight: '600', + fontSize: '13px', + }, + '& button': { '& i': { padding: "3px", @@ -698,15 +709,15 @@ export default (theme, backArrow, forwardArrow) => ({ }, }, }, - '&:first-child': { - maxWidth: "110px", - minWidth: "100px", - overflow: 'hidden', - textOverflow: 'ellipsis', - }, - '&:last-child': { - width: "9%", - }, + // '&:first-child': { + // maxWidth: "110px", + // minWidth: "100px", + // overflow: 'hidden', + // textOverflow: 'ellipsis', + // }, + // '&:last-child': { + // width: "9%", + // }, }, '& th': { borderBottom: "1px solid #454d55", @@ -1047,6 +1058,30 @@ export default (theme, backArrow, forwardArrow) => ({ }, scheduleDate: { position: "absolute" + }, + totalParticipents:{ + marginBottom: '15px', + borderBottom: '1px solid #000', + '& label':{fontSize:"13px"}, + }, + selectNumber:{ + position: 'relative', + transition: 'border-bottom-color 0.2s ease-out', + '&:before': { + position: 'absolute', + fontFamily: 'icomoon !important', + speak: 'none', + fontStyle: 'normal', + fontWeight: 'normal', + fontVariant: 'normal', + textTransform: 'none', + color: theme.palette.themeColors.scheduleMessage.textColor, + transition: 'all 0.2s ease-out', + zIndex:'-1', + top: '-2 !important', + left: 0, + content: '"\\e916"', + fontSize: 16 + }, } - }); diff --git a/src/layouts/EventSignupNew/subcomponents/InviteByEmail.js b/src/layouts/EventSignupNew/subcomponents/InviteByEmail.js index 28492232c..82ac2fbfa 100644 --- a/src/layouts/EventSignupNew/subcomponents/InviteByEmail.js +++ b/src/layouts/EventSignupNew/subcomponents/InviteByEmail.js @@ -18,23 +18,25 @@ class InviteByEmail extends Component { inputValue: '', }; } - - handleChange = (e)=>{ + + handleChange = (e) => { this.setState({ inputValue: e.target.value }); - } + } handleAdd = (data) => { const val = {email: this.state.inputValue }; - this.props.addParticipents('emails',val); - this.setState({ inputValue: "" }); + const res = this.props.addParticipents('emails',val); + if(res){ + this.setState({ inputValue: "" }); + } } render() { - const { + const { inputValue, ...passThroughState } = this.state; const { - t, i18n,classes, ...passThroughProps + t, i18n, classes, ...passThroughProps } = this.props; - + return (
{t('eventSignup.inviteEmailTitle')}
@@ -57,7 +59,7 @@ class InviteByEmail extends Component {
) } - + } export default (withStyles(styles)(withRouter(withTranslation()(InviteByEmail)))); diff --git a/src/layouts/EventSignupNew/subcomponents/LocationUpload.js b/src/layouts/EventSignupNew/subcomponents/LocationUpload.js index b670ac051..75123a0d2 100644 --- a/src/layouts/EventSignupNew/subcomponents/LocationUpload.js +++ b/src/layouts/EventSignupNew/subcomponents/LocationUpload.js @@ -223,8 +223,8 @@ class LocationUpload extends Component { } goToMyLocation = () => { - const latLng = this.myLocation ? this.myLocation : this.coordinates; - + //const latLng = this.myLocation ? this.myLocation : this.coordinates; + const latLng = this.state.myLocLatlng ? this.state.myLocLatlng : this.coordinates; this.placeMarkerAndPanTo(latLng); this.setState({ selectedPlace: '', showPlaces: false }); } @@ -357,7 +357,10 @@ class LocationUpload extends Component { - */} +
{t("eventSignup.slotTable.title")} {t("eventSignup.slotTable.startDateTime")}
{v.title} - Start : {v.startDateMoment.format('DD-MMM-YYYY')}  {v.startTimeHours + ":" + v.startTimeMinutes + "" + v.startTimeMode} -
- End : {v.endDateMoment.format('DD-MMM-YYYY')}  {v.endTimeHours + ":" + v.endTimeMinutes + "" + v.endTimeMode} -
- {!props.isDisabled && } +
+
Title:{v.title}
+
+ Start Date:{v.startDateMoment.format('DD-MMM-YYYY')}  {v.startTimeHours + ":" + v.startTimeMinutes + "" + v.startTimeMode} +
+ End Date:{v.endDateMoment.format('DD-MMM-YYYY')}  {v.endTimeHours + ":" + v.endTimeMinutes + "" + v.endTimeMode} +
+
Total Participants:{(v.maxAllowed > 0) ? v.maxAllowed : 'No Limit'}
+
+
+ {!props.isDisabled && } +