Skip to content

Commit

Permalink
allowWaitListing
Browse files Browse the repository at this point in the history
  • Loading branch information
qiyundai committed Sep 11, 2024
1 parent a4ef8f6 commit b790c6f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ecc/blocks/ecc-dashboard/ecc-dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function cloneFilter(obj) {
'showVenueImage',
'attendeeLimit',
'rsvpDescription',
'allowWaitlisting',
'allowWaitListing',
'hostEmail',
'rsvpFormFields',
'relatedProducts',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ function prefillFields(component, props) {
if (eventData) {
const {
attendeeLimit,
allowWaitlisting,
allowWaitListing,
hostEmail,
rsvpDescription,
} = eventData;

if (attendeeLimitEl && attendeeLimit) attendeeLimitEl.value = attendeeLimit;
if (allowWaitlistEl && allowWaitlisting) allowWaitlistEl.checked = allowWaitlisting;
if (allowWaitlistEl && allowWaitListing) allowWaitlistEl.checked = allowWaitListing;
if (descriptionEl && rsvpDescription) descriptionEl.value = rsvpDescription;
if (hostEmail) {
if (contactHostEl) contactHostEl.checked = true;
if (hostEmailEl) hostEmailEl.value = hostEmail;
}

if (attendeeLimit || allowWaitlisting || hostEmail || rsvpDescription) {
if (attendeeLimit || allowWaitListing || hostEmail || rsvpDescription) {
component.classList.add('prefilled');
}
}
Expand All @@ -42,7 +42,7 @@ export function onSubmit(component, props) {
if (component.closest('.fragment')?.classList.contains('hidden')) return;

const attendeeLimitVal = component.querySelector('#attendee-count-input')?.value;
const allowWaitlisting = component.querySelector('#registration-allow-waitlist')?.checked;
const allowWaitListing = component.querySelector('#registration-allow-waitlist')?.checked;
const contactHost = component.querySelector('#registration-contact-host')?.checked;
const hostEmail = component.querySelector('#event-host-email-input')?.value;
const rsvpDescription = component.querySelector('#rsvp-form-detail-description')?.value;
Expand All @@ -54,7 +54,7 @@ export function onSubmit(component, props) {
if (rsvpDescription) rsvpData.rsvpDescription = rsvpDescription;
if (contactHost && hostEmail) rsvpData.hostEmail = hostEmail;
if (attendeeLimit) rsvpData.attendeeLimit = attendeeLimit;
if (allowWaitlisting) rsvpData.allowWaitlisting = allowWaitlisting;
if (allowWaitListing) rsvpData.allowWaitListing = allowWaitListing;

props.payload = { ...props.payload, ...rsvpData };
}
Expand Down
2 changes: 1 addition & 1 deletion ecc/blocks/form-handler/data-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const submissionFilter = [
'relatedProducts',
'rsvpDescription',
'attendeeLimit',
'allowWaitlisting',
'allowWaitListing',
'hostEmail',
'eventId',
'published',
Expand Down

0 comments on commit b790c6f

Please sign in to comment.