commentAction()

in src/app/weeklytasks/weeklytasks.component.ts [185:228]


  commentAction() {
    //throw new Error("Method not implemented.");
    this.api.OnCreateCommentListener.subscribe(async (comment) => {
      //console.log('new comment', comment);
      console.log('while refreshing ', this.month);
      if (this.week != undefined) {
        const response = await this.api.ListReminders({
          user: {
            eq: this.appcomponent.user.attributes.email
          },
          type: {
            eq: frequency.WEEKLY
          },
          week: {
            eq: this.week
          }


        });
        this.allReminders = response.items;
      }
    });

    this.api.OnDeleteCommentListener.subscribe(async (comment) => {
      //console.log('new comment', comment);
      console.log('while refreshing ', this.month);
      if (this.week != undefined) {
        const response = await this.api.ListReminders({
          user: {
            eq: this.appcomponent.user.attributes.email
          },
          type: {
            eq: frequency.WEEKLY
          },
          week: {
            eq: this.week
          }


        });
        this.allReminders = response.items;
      }
    });
  }