Skip to content

Conversation

@Arsamat
Copy link

@Arsamat Arsamat commented Apr 10, 2021

No description provided.

@Arsamat Arsamat requested a review from ROODAY as a code owner April 10, 2021 23:12
@Arsamat Arsamat requested a review from vitorvicente April 10, 2021 23:21
@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.

4 participants