Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions Assumptions and Techs used.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
Used Technologies
----------------------
Client : Angular v10
Server: NodeJS, Framework: SailsJS
SQL: MySQL

Installation:
Client: /employeeAdmin
Server: /employeeApi
DB: /DB

1. Install nodejs, sails js, angular cli, mysql
2. Import the sql file from the /DB folder and enable msql.
3. Navigate to /employeeApi
4. type 'npm install' to install dependencies
5. run the server with 'sails lift'
Server will run with default port 1337
6. Navigate to /employeeAdmin
7. type 'npm install' to install dependencies
8. run the server with 'ng serve'
Client will run with the default port 4200
RUN 'localhost:4200' to run the application now.

Login:

For Admin,
username: admin
password: 12345

For Employee
username: vishnu
password: 12345

Assumptions made:

Login as admin
1. view/add/edit/delete employee.
2. view list of reviews for employees.
3. assign reviewer to a employee.
4. review a employee with star rating.

Login as employee
1. view his profile.
2. view list of reviews admin and reviewers made.
3. view list of employees who need to reviewed by him/her.
4. review a employee with star rating.

note: Implemented authguard, toast notifications, modals, bootstrap.
108 changes: 108 additions & 0 deletions employee.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
-- phpMyAdmin SQL Dump
-- version 4.1.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 26, 2021 at 10:38 PM
-- Server version: 5.6.16
-- PHP Version: 5.5.11

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `employee`
--

-- --------------------------------------------------------

--
-- Table structure for table `archive`
--

CREATE TABLE IF NOT EXISTS `archive` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`createdAt` bigint(20) DEFAULT NULL,
`fromModel` varchar(255) DEFAULT NULL,
`originalRecord` longtext,
`originalRecordId` longtext,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `review`
--

CREATE TABLE IF NOT EXISTS `review` (
`createdAt` varchar(255) DEFAULT NULL,
`updatedAt` varchar(255) DEFAULT NULL,
`id` int(11) NOT NULL AUTO_INCREMENT,
`userId` double DEFAULT NULL,
`fromUserId` double DEFAULT NULL,
`comment` varchar(255) DEFAULT NULL,
`review` varchar(255) DEFAULT NULL,
`status` tinyint(1) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ;

--
-- Dumping data for table `review`
--

INSERT INTO `review` (`createdAt`, `updatedAt`, `id`, `userId`, `fromUserId`, `comment`, `review`, `status`) VALUES
('1622047358718', '1622047358718', 5, 2, 3, 'This person needs a good applause for his dedication.', '5', 1),
('1622050496504', '1622050496504', 6, 2, 1, 'test', '3', 1),
('1622050711744', '1622050711744', 7, 3, 1, 'vvv', '4', 1),
('1622051293265', '1622051293265', 8, 7, 1, '', '', 0),
('1622051402345', '1622051402345', 9, 4, 1, '', '', 0),
('1622051469679', '1622051469679', 10, 5, 1, '', '', 0);

-- --------------------------------------------------------

--
-- Table structure for table `user`
--

CREATE TABLE IF NOT EXISTS `user` (
`createdAt` varchar(255) DEFAULT NULL,
`updatedAt` varchar(255) DEFAULT NULL,
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(255) DEFAULT NULL,
`displayName` varchar(255) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
`age` int(20) NOT NULL,
`gender` varchar(100) NOT NULL,
`department` varchar(100) NOT NULL,
`address` varchar(100) NOT NULL,
`userType` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ;

--
-- Dumping data for table `user`
--

INSERT INTO `user` (`createdAt`, `updatedAt`, `id`, `username`, `displayName`, `password`, `age`, `gender`, `department`, `address`, `userType`) VALUES
(NULL, NULL, 1, 'admin', 'Administrator', '827ccb0eea8a706c4c34a16891f84e7b', 30, 'male', 'owner', 'kochi', 'admin'),
(NULL, NULL, 2, 'vishnu', 'Vishnu S Babu', '827ccb0eea8a706c4c34a16891f84e7b', 28, 'male', 'Marketting', 'punalur', 'user'),
('1621701112193', '1621701112193', 3, 'abinhm', 'Abin HM', '827ccb0eea8a706c4c34a16891f84e7b', 25, 'male', 'business', 'bangalore', 'user'),
('1622048511846', '1622048511846', 4, 'johndoe', 'John Doe', 'e10adc3949ba59abbe56e057f20f883e', 22, 'male', 'Enterprise', 'London', 'user'),
('1622048678071', '1622048678071', 5, 'Krishnakumar', 'KKR', '827ccb0eea8a706c4c34a16891f84e7b', 56, 'male', 'Marketting', 'Ireland', 'user'),
('1622048851207', '1622048851207', 6, 'jk', 'Jack', 'e10adc3949ba59abbe56e057f20f883e', 26, 'male', 'marketting', 'ireland', 'user'),
('1622049118421', '1622049118421', 7, 'hungraydane', 'Hungry', '827ccb0eea8a706c4c34a16891f84e7b', 66, 'male', 'Enterprise', 'Jakarta', 'user'),
('1622061226363', '1622061226363', 8, 'dawnbos', 'Dawn', '827ccb0eea8a706c4c34a16891f84e7b', 56, 'male', 'operations', 'Tokyo', 'user');

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
18 changes: 18 additions & 0 deletions employeeAdmin/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support

# You can see what browsers were selected by your queries by running:
# npx browserslist

last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major version
last 2 iOS major versions
Firefox ESR
not IE 9-10 # Angular support for IE 9-10 has been deprecated and will be removed as of Angular v11. To opt-in, remove the 'not' prefix on this line.
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
16 changes: 16 additions & 0 deletions employeeAdmin/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false
46 changes: 46 additions & 0 deletions employeeAdmin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out

# dependencies
/node_modules

# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db
27 changes: 27 additions & 0 deletions employeeAdmin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# EmployeeAdmin

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.0.1.

## 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](https://karma-runner.github.io).

## Running end-to-end tests

Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
Loading