Register
Submit a solution
The challenge is finished.

Challenge Overview

Welcome to the Topcoder challenge. You may implement this task and submit your solution until the deadline. Reviewers would score it and 2 people with higher scores (not less than minimal) would get the prizes. Learn "How to compete" and read the task below.

Context

Project Context

Topcoder Admin is an internal Topcoder tool that lets Topcoder admins perform various operations like manage users, groups, clients, devices, and so on.

Challenge Context

We have various Terms of Use and users may sign them when required. We need to provide the UI for administrators to sing and unsign Terms of Use for other users. Existent codebase already has example for many features, so new functionality could be implemented in a similar way.

Expected Outcome

Functionality to manage terms of the particular user and to manage users of the particular terms.

Challenge Details

Technology Stack

  • AngularJS 1.4

  • Bootstrap

  • CSS

Code access

The work for this challenge has to be done in one repository:

- Admin App repo https://github.com/topcoder-platform/admin-app branch `feature/terms-management` commit `9290aa1982cc515da452fd332422014d700f7ce2` or later.

- To start the application locally, please use Node v6 with npm v3 and follow section Start the Application in the README.

- Demo user is provided on the forum.

Individual requirements

1. Update Terms List

We have the functionality to list Terms of Use, see screenshot.

  • Remove the filter by "Legacy ID" and add filter by "Title" instead, see screenshot. See how to call API here.

  • Update columns in the Terms list, the column should be:
    - "Title" - link to "edit" page
    - "Agreeability Type" - same as now
    - "Info" - should be based on "Agreeability Type". If it's "Electronically-agreeable", it should show the "URL". If it's "Docusign-template", it should show the "Docusign UUID", otherwise, it's empty
    - "Action" column with 3 buttons "Delete Terms", "View Users" and "Add User"

2. Add a user to Terms

When we click "Add User" on Terms List Page we should show a popup with title 'Sign Terms "<terms title>"' similar to the Create Group Popup, see screenshot.

  • There should be a text input where we can enter a user handle and buttons "Close" and "Sign Terms".

  • When we click "Sign Terms" we should show a loader indicator and wait until the operation is complete.

  • To sing Terms for the user, first we should get "userId" by user "handle" by calling "GET https://api.topcoder-dev.com/v3/users?fields=id%2Chandle&filter=handle%3D<USER_HANDLE>" and after call "POST https://api.topcoder-dev.com/v5/terms/:termsOfUseId/users/" with JSON body '{ "userId": 123456789 }'

  • If there is a server error during signing terms it should be shown inside the popup similar to the Create Group Popup, see screenshot. Also, show error if user if not found by "handle".

3. List and Remove users who signed Terms

When we click "View Users" on Terms List Page (screenshot) we should show a new page which would list users who signed this terms. It should be implemented similar to the Role Members page, see screenshot and link.

  • Use texts as per screenshot.

  • We should be able to filter users by "User Id", "Handle", "Signed From" and "Signed To". "Signed From" and "Signed To" should use a calendar widget same like we do inside groups, see screenshot and link.

  • Use server-side pagination.

  • In the list of users show columns "User Id", "Handle" and "Sign Date".

  • When we click "Remove" button next to some user, we should "unsign" the Terms for that user. We should be also able to select several users and click "Remove Selected" to "unsign" terms for several users.

  • If we click "Add User" button we should open the same popup for adding a user as above.

  • See how to use API for this page here.

4. Add ability to filter users by "userId"

Currently, we can filter users by "handle", "email" and "status", see screenshot and link.

  • Add one more filter field "User Id" which only allows entering numbers, see screenshot.

  • When we enter "User Id", we should search for the user with such id on the server. API already supports it by adding filter "id=<userId>", example: "https://api.topcoder-dev.com/v3/users?filter=id%3D40153913".

5. Manage Terms of a User

We already have menu to manage various stuff for the users, see screenshot

  • Add one more item "Terms" to the "Edit" menu, see screenshot and link.

  • When we click "Terms" we should open a popup similar to what we see when we click "Roles" but rename the texts according to the next screenshot.

  • This popup would show 2 lists of Terms:
    - first list would show all the Terms signed by the user. This list could be obtained by calling "GET https://api.topcoder-dev.com/v5/terms?userId=123456".

  • Under the list of signed terms we should list available terms, so the user can sign them. As we might have a lot of Terms we cannot show a dropdown with all the terms as we do for roles. Instead of dropdown show the list similar to Terms List Page (screenshot and link).
    - We should be able to filter available Terms by "Title".
    - Use server-side pagination. Show 10 Terms per page.
    - In the table show only "Title" column (without link) and button which says "Sing Terms". Don't show this button if terms are already signed by the user.
    - If we click "Sing Terms" we should show the loading indicator and sign terms for the user. After that signed Terms should be added in the first list of signed terms and "Sing Terms" button disappear.

  • If there is a server error during signing terms it should be shown inside the popup similar to the Create Group Popup, see screenshot.

General requirements

  • Show errors from the server if they happen during any of the requests.

  • Use UI State router best practices - separate states for list / detail / new and other best practices of Angular.js.

  • Follow the existent code structure and practices.

  • Make sure the newly added pages have consistent look and feel with the admin-app. Reuse existent styles for inputs, buttons and so on.

  • Use different base API URLs for production and development environments.

  • Don't delete or edit any existing terms of use records. But you may still add new terms of use, edit and delete the records you've added for testing.

Scorecard Aid

  • This challenge would be scored using the Basic Code Challenge 0.0.5 scorecard.

  • The major requirement here is that we can successfully perform all the new operations with singing/unsigning Terms for users.

If you have any questions or concerns, feel free to raise a question on the forum.



Final Submission Guidelines

Submit a zip file which would include:

  • Git patch with changes you’ve made to the code in our repository.

Additionally, the winner would be required to raise a pull request to the repository after the challenge is completed.

 

ELIGIBLE EVENTS:

2021 Topcoder(R) Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30144270