gdgfresno / valleydevfest2018

A Professional Template for large GDG events. This project has been designed to continue to be your DevFest/IWD website solution without having to create a new site or Firebase project every year.
https://delorean-demo.firebaseapp.com
MIT License
0 stars 1 forks source link

Cannot add session to my schedule if it doesn't have a speaker #12

Closed MrCsabaToth closed 4 years ago

MrCsabaToth commented 5 years ago

Cannot add session to my schedule if it doesn't have a speaker

Expected Behavior

I want to be able to add session to my schedule even if it doesn't have a speaker

Current Behavior

The session is not added, on the debug console we can see some JS errors when the button clicked

Possible Solution

Either hide the button if there's no speaker or make it work

Possible Implementation

Button hiding can be like this:

<button *ngIf="!schedule.value && session?.speakers" (click)="addToSchedule()" ...

Or make it work

  addToSchedule() {
    this.mySchedule.set({
      id: this.session.$key,
      title: this.session.title,
      time: this.session.time,
      tag: this.session.tag ? this.session.tag : null,
      speakers: this.session.speakers ? this.session.speakers : null,
      room: this.session.room,
      section: this.session.section,
      value: true
    });
  }