diego2013 / CSR_Meteor

CSR prototype III. Implementation using the Meteor platform
1 stars 1 forks source link

not showing "you ACKed this scenario" #137

Closed diego2013 closed 8 years ago

diego2013 commented 8 years ago

Review the logic to display this label. It is not showing properly (but at the same time is not allowing user to ACK).

image

diego2013 commented 8 years ago

Maybe we should revisit the allowedToACK function to make sure that has the prober behavior in itself, instead of using all those ifs.

image

We could use a function to know if the user can ACK the scenario (Scenario is approved, user is logged in and has not already approved the scenario). Then another function would say if the current user has acked this scenario. This latter function could be an aux. function for the former fuctionality and probably would make the life easier in the HTML.

diego2013 commented 8 years ago

or, maybe the ACK (or ACKed) button is not showing when it should.

diego2013 commented 8 years ago

It seems that the feature is working well. With the data from the post we see that scenario ze77cjbew3ycdDvdf has been AKCed twice. Checking the dev database these ACKers are

image

IDs: kkWsjmCvsfEtnGvDN and KCC4CpHtGWfNQNSPi (which are users Enrique and Pablo). Diego can't ACK because this is his own scenario, and thus he would not be seeing a "you acked this scn" message.

The code can be refactored, though, and made smarter functions (maybe isNotScenarioOwner should also be used to see if user is logged in?)