Closed KonnorThatcher closed 1 month ago
I added a review in the PR
I added a code review
[ ] We should filter the mentorship services that the users have access to in the mentorship widget, by the consumables of mentorship services that they have access to.
[x] We should always include the mentorship services with balance 0, as we use it to allow them to buy more
[x] We should check the event types associated to the event type set of the consumables of the user, if the consumables of the user don't include the event type of the event, then we should tell them: "This is a private event, you don't have access to this event".
Note: tested with this User and this consumables for the workshops. The subscription doesn't include the type of event esGeekforce Gratis so an event with that type was created event with that type was created; during the free trial or as long as the user doesn't belong to a bootcamp we get this message "This is a private event; you don't have access to this event". Once the user belongs to a bootcamp, they give access to join. (Event is free for bootcamps)
This change was already included in: https://github.com/breatheco-de/app/pull/1607#pullrequestreview-2325554659
Bug description
With a user created from a basic plan that I then upgraded to a paid plan, I am unable to join a workshop or schedule a mentorship if the amount of the workshop/mentorship consumable generated from the basic plan is set to 0, even if I have available consumables that were generated from the paid plan.
In the example above, I set the amount of this workshop consumable that was generated from the basic plan to 0, and the other workshop consumable from the paid plan to -1 (infinite). Even though I have an infinite amount of workshop tokens available thanks to the paid plan consumable, I get told that I've run out of workshops.
If instead I set the amount of the paid plan consumables for workshops/mentorships to 0 and the basic plan consumables to any number, this doesn't happen; it will still let me click the button to join the meeting or schedule a mentorship. This also doesn't seem to be an issue with paid plan consumables themselves, as this isn't an issue at all if I have a user that only has the paid plan.
Steps to reproduce
Expected behavior
I should still be able to click the button to join an event or schedule a mentoring session if I still have consumables available, even if I have none from the basic plan.
Anything else?
No response