Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

[$20] - Changes for buttons at the Challenge Details page #1054

Closed
birdofpreyru opened this issue Feb 22, 2017 · 7 comments · Fixed by topcoder-archive/appirio_tech-tc-site#484
Assignees

Comments

@birdofpreyru
Copy link
Collaborator

Check the ticket #1040 and the corresponding PR topcoder-archive/appirio_tech-tc-site#480. We have re-factored the code behind user actions button at the Challenge Details page for Design track (those Register, Unregister, Submit, etc. buttons).

Under this ticket I want:

  1. To make similar changes for similar buttons at Design track. Inside the HTML template buttons for the both page will be handled by the same simple template we already have, while description and logic behind the buttons for Design page should be moved into the controller, inside initButtons().

  2. Use the ability to check for user roles (see the ticket [$40] - Preparing for role-dependent customization of the challenge details page #1002 and the corresponding PR TC App Issue 1002: role-dependent customization of the challenge details page appirio_tech-tc-site#479) to make the following changes to the buttons logic:

Unregister and Complete Appeals buttons (Dev track) should be shown only when user has Submitter role.

If user has any role beside Submitter, we should always show him the active View Scorecards button.

@rushikesh90
Copy link

I want to work on this

@rushikesh90
Copy link

So I may be missing something but "similar changes for similar buttons at Design track" do you mean the earlier changes are not there or you are referring to some other track?
Can you extend the time for bug bash as there is very little time left

@birdofpreyru
Copy link
Collaborator Author

Check the HTML template. Originally it had two large if sections. One was producing the buttons for the page with a Design challenge, and another for the page with a Development challenge. In that previous ticket and PR we have refactored the Development buttons, not touching the other branch of that if in the template.

Now we should get rid of that if in the template, just using the same new button template (which renders an array of buttons provided by controller, using ng-repeat) in both cases. Inside the controller, you should add all those buttons from the Design page, and all corresponding logic, into the function which generates the array of buttons, in the way it is done currently for the Development page buttons. + those role-based additions to the logic.

Can you extend the time for bug bash as there is very little time left

Don't worry about it. If you don't complete it time till the moment we process payments for this Bug Bash, we just roll it over to the next Bug Bash (our plan is to have them running quite regularly). Sure, if something changes in our plans, or the next Bug Bash delays for too much time, we can always handle your payment for this ticket separately.

@birdofpreyru
Copy link
Collaborator Author

@rushikesh90 Any news on this one? I am preparing to start another Bug Bash this weekend. If you are not interested in this ticket anymore, I'll open it for that Bug Bash.

@rushikesh90
Copy link

Ok Sure you can open this for bug bash. I had some system problem.

@shubhendusaurabh
Copy link
Contributor

@birdofpreyru Is userrole method working? I get undefined while debugging.
Also if a user has submitted unregister button is useless as there is check in controller which does not allow a submitter to unregister.

@birdofpreyru
Copy link
Collaborator Author

@shubhendusaurabh

Also if a user has submitted unregister button is useless...

You are right, if user has submitted, we should not show the Unregister button. I believe in current implementation it is checked already, but it is not hidden, just disabled. Let's hide it. Though, the main focus here is that if user has no Submitter role, we should not show the button at all.

Is userrole method working?

Well, as I have accepted the fix which implemented it, I believe, I has checked and it looked functional to me. Though, probably I have overlooked something. Anyway, if there are any issues with the method, they should be fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants