Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed bug with toggle timeslot #134

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions src/components/Admin/GeneralSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,41 +183,6 @@ class GeneralSettings extends Component {
}

let confirm = true;
if (
(settings.timeslotsOpenForApplicants &&
!preSaveSettings.timeslotsOpenForApplicants) ||
(!settings.timeslotsOpenForApplicants &&
preSaveSettings.timeslotsOpenForApplicants)
) {
const action = settings.timeslotsOpenForApplicants
? "opening"
: "closing";
const msg =
action === "opening"
? "mean that applicants can start selecting their interview timeslots. This will trigger sending emails to every applicant to let them know."
: "close timeslot selection for applicants i.e. if there are those who have not yet picked a timeslot, they will no longer be able to do so.";
confirm = await swal({
title: "Modifying Timeslot Selection!",
text: `Saving these settings will ${msg} Are you sure you want to do this?`,
icon: "warning",
buttons: {
cancel: {
text: "No",
value: false,
visible: true,
},
confirm: {
text: "Yes",
value: true,
visible: true,
},
},
});

action === "opening"
? this.props.firebase.notifyTimeslotsAreOpen()
: this.props.firebase.notifyTimeslotsAreClosed();
}

if (confirm) {
// TODO actually send an email for this
Expand Down