commit 3fcf8b6739f637f3305af8676485e84ff6336ee8
Author: Hung Hoang <hoanghun5@gmail.com>
Date:   Sun May 26 14:05:10 2019 +0200

    Refactored all models

diff --git a/webapp/src/app/dashboard/employer-dashboard/employer-dashboard.component.ts b/webapp/src/app/dashboard/employer-dashboard/employer-dashboard.component.ts
index b6e7ed0..3da38cc 100644
--- a/webapp/src/app/dashboard/employer-dashboard/employer-dashboard.component.ts
+++ b/webapp/src/app/dashboard/employer-dashboard/employer-dashboard.component.ts
@@ -1,12 +1,11 @@
 import {Component, Input, OnInit} from '@angular/core';
-import { MatDialog } from '@angular/material';
-import { AddDaysOffDialogComponent } from '../../add-days-off-dialog/add-days-off-dialog.component';
+import {MatDialog} from '@angular/material';
+import {AddDaysOffDialogComponent} from '../../add-days-off-dialog/add-days-off-dialog.component';
 import {UsersService} from '../../services/users.service';
 import {Requests} from '../../models/requests.model';
-import {UserProfile} from '../../models/user-profile.model';
 import {UserService} from '../../services/user.service';
 import {ProfileService} from '../../services/profile.service';
-import {TimeUnit} from '../../enums/common.enum';
+import {UserProfile} from '../../models/user.model';
 
 @Component({
   selector: 'app-employer-dashboard',
@@ -38,25 +37,25 @@ export class EmployerDashboardComponent implements OnInit {
     //   .subscribe((data: Requests) => this.daysOffRequests = data);
 
     // Tmp mock
-    this.profile = {
-      id: 1,
-      name: {
-        first: 'Jon',
-        last: 'Doe',
-      },
-      photo: 'http://mosaddek.com/theme/diverse/assets/img/user1.png',
-      settings: {
-        notification: new Date(2019, 3, 25, 18, 0)
-      },
-      vacation: {
-        value: 5,
-        unit: TimeUnit.DAY,
-      },
-      sickDay: {
-        value: 10,
-        unit: TimeUnit.DAY
-      }
-    };
+    // this.profile = {
+    //   id: 1,
+    //   name: {
+    //     first: 'Jon',
+    //     last: 'Doe',
+    //   },
+    //   photo: 'http://mosaddek.com/theme/diverse/assets/img/user1.png',
+    //   settings: {
+    //     notification: new Date(2019, 3, 25, 18, 0)
+    //   },
+    //   vacation: {
+    //     value: 5,
+    //     unit: TimeUnit.DAY,
+    //   },
+    //   sickDay: {
+    //     value: 10,
+    //     unit: TimeUnit.DAY
+    //   }
+    // };
   }
 
   private userApproved(requestId: number, approved: boolean) {
diff --git a/webapp/src/app/employees/employees-list.component.ts b/webapp/src/app/employees/employees-list.component.ts
index b984b8f..85df523 100644
--- a/webapp/src/app/employees/employees-list.component.ts
+++ b/webapp/src/app/employees/employees-list.component.ts
@@ -1,11 +1,10 @@
 import {Component, OnInit} from '@angular/core';
-import {UserBasicInformation} from '../models/user-basic-information.model';
 import {UsersService} from '../services/users.service';
 import {VacationType} from '../enums/common.enum';
 import {MatDialog} from '@angular/material';
 import {EditEmployeeDialogComponent} from './edit-employee-dialog/edit-employee-dialog.component';
 import {DayInfo, User} from './user.model';
-import {AuthorizationRequest} from '../models/requests.model';
+import {UserBasicInformation} from '../models/user.model';
 
 const daysOfWeek: string[] = [
   'po',
diff --git a/webapp/src/app/header/header.component.ts b/webapp/src/app/header/header.component.ts
index 5b1a4dd..f7f7764 100644
--- a/webapp/src/app/header/header.component.ts
+++ b/webapp/src/app/header/header.component.ts
@@ -1,9 +1,8 @@
-import { Component, Input } from '@angular/core';
-import { MatDialog } from '@angular/material';
-import { ProfileSettingsComponent } from '../profile-settings/profile-settings.component';
-import { ProfileService } from '../services/profile.service';
-import { UserProfile } from '../models/user-profile.model';
-import {LocalizationService} from "../localization/localization.service";
+import {Component, Input} from '@angular/core';
+import {MatDialog} from '@angular/material';
+import {ProfileSettingsComponent} from '../profile-settings/profile-settings.component';
+import {ProfileService} from '../services/profile.service';
+import {LocalizationService} from '../localization/localization.service';
 
 @Component({
   selector: 'app-header',
diff --git a/webapp/src/app/models/post-requests.model.ts b/webapp/src/app/models/post-requests.model.ts
deleted file mode 100644
index 0939a24..0000000
--- a/webapp/src/app/models/post-requests.model.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import {RequestStatus} from '../enums/common.enum';
-
-export interface UserRequest {
-  id: number;
-  status: RequestStatus;
-}
diff --git a/webapp/src/app/models/requests.model.ts b/webapp/src/app/models/requests.model.ts
index fd6f305..8f0497d 100644
--- a/webapp/src/app/models/requests.model.ts
+++ b/webapp/src/app/models/requests.model.ts
@@ -53,3 +53,8 @@ export interface Requests {
     }
   ];
 }
+
+export interface UserRequest {
+  id: number;
+  status: RequestStatus;
+}
diff --git a/webapp/src/app/models/user-basic-information.model.ts b/webapp/src/app/models/user-basic-information.model.ts
deleted file mode 100644
index 65dfc6a..0000000
--- a/webapp/src/app/models/user-basic-information.model.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import {VacationType} from '../enums/common.enum';
-import {Time} from '@angular/common';
-
-export interface UserBasicInformation {
-  id: number;
-  firstName: string;
-  lastName: string;
-  photo: string;
-  calendar: [
-    {
-      id: number,
-      date: Date,
-      from: Time,
-      to: Time,
-      type: VacationType;
-    }
-  ];
-}
diff --git a/webapp/src/app/models/user-profile.model.ts b/webapp/src/app/models/user-profile.model.ts
deleted file mode 100644
index 0bd7b48..0000000
--- a/webapp/src/app/models/user-profile.model.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import {RequestStatus, UserType} from '../enums/common.enum';
-
-export interface UserProfile {
-  id: number;
-  firstName: string;
-  lastName: string;
-  photo: string;
-  vacationCount: number;
-  sickdayCount: number;
-  status: RequestStatus;
-  role: UserType;
-  notification: Date;
-}
-
diff --git a/webapp/src/app/models/user.model.ts b/webapp/src/app/models/user.model.ts
new file mode 100644
index 0000000..5285d8c
--- /dev/null
+++ b/webapp/src/app/models/user.model.ts
@@ -0,0 +1,30 @@
+import {Time} from '@angular/common';
+import {RequestStatus, UserType, VacationType} from '../enums/common.enum';
+
+export interface UserBasicInformation {
+  id: number;
+  firstName: string;
+  lastName: string;
+  photo: string;
+  calendar: [
+    {
+      id: number,
+      date: Date,
+      from: Time,
+      to: Time,
+      type: VacationType;
+    }
+    ];
+}
+
+export interface UserProfile {
+  id: number;
+  firstName: string;
+  lastName: string;
+  photo: string;
+  vacationCount: number;
+  sickdayCount: number;
+  status: RequestStatus;
+  role: UserType;
+  notification: Date;
+}
diff --git a/webapp/src/app/services/profile.service.ts b/webapp/src/app/services/profile.service.ts
index d3578fc..1902aae 100644
--- a/webapp/src/app/services/profile.service.ts
+++ b/webapp/src/app/services/profile.service.ts
@@ -1,7 +1,7 @@
-import { Injectable } from '@angular/core';
-import {UserProfile} from '../models/user-profile.model';
+import {Injectable} from '@angular/core';
 import {UserService} from './user.service';
 import {Observable} from 'rxjs';
+import {UserProfile} from '../models/user.model';
 
 @Injectable({
   providedIn: 'root'
diff --git a/webapp/src/app/services/user.service.ts b/webapp/src/app/services/user.service.ts
index 0e44fe8..46f32b1 100644
--- a/webapp/src/app/services/user.service.ts
+++ b/webapp/src/app/services/user.service.ts
@@ -1,13 +1,13 @@
 import {Injectable} from '@angular/core';
 import {HttpClient, HttpParams} from '@angular/common/http';
 
-import {UserProfile} from '../models/user-profile.model';
 import {Calendar, CalendarEdit, PostCalendar} from '../models/calendar.model';
 import {BasicService} from './basic.service';
 import {catchError} from 'rxjs/operators';
 import {Languages, RequestStatus, RequestTypes} from '../enums/common.enum';
-import {UserRequest} from '../models/post-requests.model';
 import {PostUserSettings} from '../models/settings.model';
+import {UserProfile} from '../models/user.model';
+import {UserRequest} from '../models/requests.model';
 
 @Injectable({
   providedIn: 'root'
diff --git a/webapp/src/app/services/users.service.ts b/webapp/src/app/services/users.service.ts
index 5d960a9..cd0de06 100644
--- a/webapp/src/app/services/users.service.ts
+++ b/webapp/src/app/services/users.service.ts
@@ -3,10 +3,10 @@ import {HttpClient, HttpParams} from '@angular/common/http';
 import {BasicService} from './basic.service';
 import {catchError} from 'rxjs/operators';
 
-import {UserBasicInformation} from '../models/user-basic-information.model';
 import {AuthorizationRequest, VacationRequest} from '../models/requests.model';
 import {Languages, ProfileStatus} from '../enums/common.enum';
 import {Observable} from 'rxjs';
+import {UserBasicInformation} from '../models/user.model';
 
 @Injectable({
   providedIn: 'root'
