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

fixed bug with toggle timeslot #134

wants to merge 1 commit into from

Conversation

Arsamat
Copy link

@Arsamat Arsamat commented Apr 10, 2021

No description provided.

@ROODAY
Copy link
Member

ROODAY commented Apr 11, 2021

@Arsamat This seems to just be removing some logic (and in doing so the confirm flag will always be true), is this the intended fix? Is there an issue that this is tied to that I could reference?

@vitorvicente
Copy link
Member

vitorvicente commented Apr 11, 2021

Yup! This is an issue, there is a logic change with sending emails, its no longer done on the toggle, rather there is a separate button. That logic was making it so we couldn't toggle timeslots for applicants on/off

For reference #107

@ROODAY
Copy link
Member

ROODAY commented Apr 11, 2021

@vitorvicente Ah so is removing the logic the intended fix? If so, shouldn't this also be modified? (starting on line 185)

    let confirm = true;

    if (confirm) {
      // TODO actually send an email for this
      await this.props.firebase.generalSettings().set(settings);
      this.setState({ showToast: true, preSaveSettings: settings });
    } else {
      this.setState({ settings: preSaveSettings });
    }

If the swal never pops and confirm is always true we can remove confirm and simplify the if statement to just be the code in the true case. Then we can also remove preSaveSettings from line 160 as it won't be used in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants