planet icon indicating copy to clipboard operation
planet copied to clipboard

clear ratings button (fixes #7727)

Open Gavinp14 opened this issue 1 year ago • 2 comments

Working on implementing the clear rating feature. Was able to add a button but still working on actually clearing the rating in the database and on the screen. Help would be appreciated if anyone knows exactly how to do this. ongoingIssue

Gavinp14 avatar Nov 07 '24 15:11 Gavinp14

Hello, so I work with #7737, so i have a bit knowledge on this, so if you have more question just let me know.

So I think the relevant code you're looking for is at planet-rating.component.ts, where the relevant function is updateRating. the function updates the rating with the new one, so you could probably trigger it and set it to 0. I don't think you can use the entire function by itself, but you do want to use the updateDocument so that it save the rating into the database.

hope this helps!

RheuX avatar Nov 07 '24 17:11 RheuX

bigIssue I have been getting this error when I try to call a clearRatings function.

Gavinp14 avatar Nov 11 '24 18:11 Gavinp14