Skip to content

Instantly share code, notes, and snippets.

@wabson
Last active December 5, 2019 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wabson/2a0cae5c0494a7875b168d1918dc6bf4 to your computer and use it in GitHub Desktop.
Save wabson/2a0cae5c0494a7875b168d1918dc6bf4 to your computer and use it in GitHub Desktop.
Add bonus points about deleting chips

Alfresco Content Services exposes a RESTful endpoint where you can retrieve the list of the users inside the system:

The endpoint URI is the following:

https://api-explorer.alfresco.com/alfresco/api/-default-/public/alfresco/versions/1/people

username and password of the endpoint are: admin/admin

Using the data returned from the endpoint you are requested to create a chips list to show a list of users

You may implement the solution using Angular 2+, React or any other modern object-oriented framework using TypeScript or ES6/7 syntax. The UI should adhere to the Material Design layout, for which there are libraries available for Angular and React, please choose whichever implementation makes sense to you.

Each user should appear as a separate chip and the name of the user should appear in the chip.

As a bonus please consider the following extra capabilities

  • The users with the property enabled: true should display the chips green
  • The users with the properties enabled: false should display the chips gray
  • It should be able to delete a user from the list by clicking on a X icon
  • The users with the property enabled: false should be read-only and it should not be possible to delete them

Other important points

  • You may create a copy of the JSON data in your project rather than rely on the live URL
  • You must add appropriate tests for the functionality you deliver
  • Please add a brief README that explains how to run the project
  • Clean coding criteria will be considered
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment