commentAction()

in src/app/goals/goals.component.ts [140:185]


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


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

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


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


  }