Skip to content

Mrinalaot/Angular-Task3-User-Management-HTTP

Repository files navigation

User Management System

  1. Use built in pipes, Title case pipe, Date pipe to transform data (‘Manage’ page) Write a custom pure pipe to combine and give full name given user (‘Manage’ page) Write a custom pure pipe to show ‘Active’ or ‘Deleted’ based on ‘isDeleted’ property of user

  2. Create http services for below and replace existing mock service data with http service Get all users

    • Get active users (use pipe to transform or filter data)
    • Get inactive users (use pipe to transform or filter data)
    • Create user
    • Update user Delete User
  3. Make changes to application button clicks in ‘Active’, ‘Deleted’ to use delete and activate through API

  4. Use Angular Reactive forms for Create/Update user forms implementation

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.

Running unit tests

Run ng test to execute the unit tests via Karma.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

Backend Server Installation :

Run npm install

Running the app :

Execute "npm run start loadUsersData" to run the app with initial data

OR

Execute "npm run start" to run the app with existing data in the database

Testing the APIs using Postman:

Get All Users 
    (GET) http://localhost:8080/users

Get User By Id 
    (GET) http://localhost:8080/users/:id

Create User 
    (POST) http://localhost:8080/users/
    body : {
        firstName: string;
        lastName: string;
        login: string;
        password: string;
        age: number;
        isDeleted?: boolean;
    }

Update User 
    (PUT) http://localhost:8080/users/:id
    body : {
        password: string;
        age: number;
        isDeleted?: boolean;
    }

Delete User 
    (DELETE) http://localhost:8080/users/:id

Search Users ( case insensitive ) 
    (POST) http://localhost:8080/users/search
    body : {
        key: string;
        limit: number;
    }   

Get All Groups 
    (GET) http://localhost:8080/groups

Get Group By Id 
    (GET) http://localhost:8080/groups/:id

Create Group 
    (POST) http://localhost:8080/groups/
    body : {
        name: string;
        permissions: Array<string>;
    }

Update Group
    (PUT) http://localhost:8080/groups/:id
    body : {
        permissions: Array<string>;
    }

Delete Group
    (DELETE) http://localhost:8080/groups/:id


Get All Users Groups
    (Get) http://localhost:8080/groups/users

Add Users To Groups
    (POST) http://localhost:8080/groups/:id/users
    body : Array<userId>

Running Unit tests:

yarn test OR npm run test 

About

Angular-Task3-User-Management-HTTP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published