Skip to content

fixed bug with toggle timeslot#134

Open
Arsamat wants to merge 1 commit into
masterfrom
azamat
Open

fixed bug with toggle timeslot#134
Arsamat wants to merge 1 commit into
masterfrom
azamat

Conversation

@Arsamat

@Arsamat Arsamat commented Apr 10, 2021

Copy link
Copy Markdown

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

ROODAY commented Apr 11, 2021

Copy link
Copy Markdown
Member

@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

vitorvicente commented Apr 11, 2021

Copy link
Copy Markdown
Member

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

ROODAY commented Apr 11, 2021

Copy link
Copy Markdown
Member

@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