diff --git a/ui/src/app/admin/roles/roles.component.ts b/ui/src/app/admin/roles/roles.component.ts
index 8cc2e36..354cd19 100644
--- a/ui/src/app/admin/roles/roles.component.ts
+++ b/ui/src/app/admin/roles/roles.component.ts
@@ -1,6 +1,6 @@
import {Component, OnInit, Inject} from '@angular/core';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
-import {RolesService} from '../roles.service';
+import {RolesService} from './roles.service';
import {Role, FeatureEntry} from '../../models/role';
import {DeleteDialogComponent} from '../../timetable/slider-menu/slider-menu.component';
@@ -97,7 +97,7 @@ export class RolesComponent implements OnInit {
} as Role;
const roleRef = this.dialog.open(AddRoleDialogComponent, {
width: '300px',
- data: {},
+ data: {message: 'Name:'},
});
roleRef.afterClosed().subscribe(result => {
if (result) {
@@ -110,8 +110,8 @@ export class RolesComponent implements OnInit {
featuresRef.afterClosed().subscribe(res => {
if (res) {
role.entries = role.entries.concat(res);
- this.executeAddRole(role);
}
+ this.executeAddRole(role);
});
}
});
@@ -124,7 +124,7 @@ export class RolesComponent implements OnInit {
changeName(role): void {
const roleRef = this.dialog.open(AddRoleDialogComponent, {
width: '300px',
- data: {},
+ data: {message: 'New name is:'},
});
roleRef.afterClosed().subscribe(result => {
if (result) {
diff --git a/ui/src/app/admin/roles.service.spec.ts b/ui/src/app/admin/roles/roles.service.spec.ts
similarity index 100%
rename from ui/src/app/admin/roles.service.spec.ts
rename to ui/src/app/admin/roles/roles.service.spec.ts
diff --git a/ui/src/app/admin/roles.service.ts b/ui/src/app/admin/roles/roles.service.ts
similarity index 95%
rename from ui/src/app/admin/roles.service.ts
rename to ui/src/app/admin/roles/roles.service.ts
index 9dacf4e..afa31a1 100644
--- a/ui/src/app/admin/roles.service.ts
+++ b/ui/src/app/admin/roles/roles.service.ts
@@ -2,7 +2,7 @@ import {Injectable} from '@angular/core';
import {HttpClient, HttpHeaders} from '@angular/common/http';
import {Observable} from 'rxjs';
-import {Role, FeatureEntry} from '../models/role';
+import {Role, FeatureEntry} from '../../models/role';
@Injectable({
providedIn: 'root',
diff --git a/ui/src/app/admin/users-management/users-management.component.html b/ui/src/app/admin/users-management/users-management.component.html
new file mode 100644
index 0000000..4e14488
--- /dev/null
+++ b/ui/src/app/admin/users-management/users-management.component.html
@@ -0,0 +1 @@
+users-management works!
diff --git a/ui/src/app/admin/users-management/users-management.component.sass b/ui/src/app/admin/users-management/users-management.component.sass
new file mode 100644
index 0000000..e69de29
diff --git a/ui/src/app/admin/users-management/users-management.component.spec.ts b/ui/src/app/admin/users-management/users-management.component.spec.ts
new file mode 100644
index 0000000..75e2b70
--- /dev/null
+++ b/ui/src/app/admin/users-management/users-management.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { UsersManagementComponent } from './users-management.component';
+
+describe('UsersManagementComponent', () => {
+ let component: UsersManagementComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ UsersManagementComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(UsersManagementComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/ui/src/app/admin/users-management/users-management.component.ts b/ui/src/app/admin/users-management/users-management.component.ts
new file mode 100644
index 0000000..d81a51f
--- /dev/null
+++ b/ui/src/app/admin/users-management/users-management.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-users-management',
+ templateUrl: './users-management.component.html',
+ styleUrls: ['./users-management.component.sass']
+})
+export class UsersManagementComponent implements OnInit {
+
+ constructor() { }
+
+ ngOnInit(): void {
+ }
+
+}
diff --git a/ui/src/app/app.module.ts b/ui/src/app/app.module.ts
index 18fcde4..e59456f 100644
--- a/ui/src/app/app.module.ts
+++ b/ui/src/app/app.module.ts
@@ -8,31 +8,10 @@ import {TimetableModule} from './timetable/timetable.module';
import {SignInModule} from './sign-in/sign-in.module';
import {LandingPageModule} from './landing-page/landing-page.module';
import {ErrorPageModule} from './error-page/error-page.module';
-<<<<<<< HEAD
-import {AdminModule} from './admin/admin.module';
-
-import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
-import {AppComponent} from './app.component';
-=======
+import {AdminModule} from './admin/admin.module';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
-import {MatDatepickerModule} from '@angular/material/datepicker';
-import {MatFormFieldModule} from '@angular/material/form-field';
-import {MatNativeDateModule} from '@angular/material/core';
-import {MatInputModule} from '@angular/material/input';
-import {MatSelectModule} from '@angular/material/select';
-import {MatSliderModule} from '@angular/material/slider';
-import {MatSlideToggleModule} from '@angular/material/slide-toggle';
-import {MatButtonModule} from '@angular/material/button';
-import {MatBottomSheetModule} from '@angular/material/bottom-sheet';
-import {MatIconModule} from '@angular/material/icon';
-import {MatProgressBarModule} from '@angular/material/progress-bar';
-import {MatCardModule} from '@angular/material/card';
-import {MatSidenavModule} from '@angular/material/sidenav';
-import {MatDialogModule} from '@angular/material/dialog';
-import {MatExpansionModule} from '@angular/material/expansion';
->>>>>>> issue-96, ui structure of component rewrited, created sign-in/up, error and landing pages
import {AppComponent} from './app.component';
@@ -43,11 +22,7 @@ import {AppComponent} from './app.component';
TimetableModule,
LandingPageModule,
ErrorPageModule,
-<<<<<<< HEAD
AdminModule,
-=======
->>>>>>> issue-96, ui structure of component rewrited, created sign-in/up, error and landing pages
-
BrowserModule,
HttpClientModule,
AppRoutingModule,
diff --git a/ui/src/app/landing-page/landing-page.component.html b/ui/src/app/landing-page/landing-page.component.html
index d5ba659..2b4a475 100644
--- a/ui/src/app/landing-page/landing-page.component.html
+++ b/ui/src/app/landing-page/landing-page.component.html
@@ -1,7 +1,3 @@
-<<<<<<< HEAD
-=======
-landing-page works!
->>>>>>> issue-96, ui structure of component rewrited, created sign-in/up, error and landing pages
diff --git a/ui/src/app/models/Group.ts b/ui/src/app/models/Group.ts
index ab568b1..4316199 100644
--- a/ui/src/app/models/Group.ts
+++ b/ui/src/app/models/Group.ts
@@ -1,4 +1,9 @@
+import {User} from './User';
export interface Group {
- id: string;
- name: string;
+ id: number;
+ specialisation: string;
+ yearOfEducation: number;
+ groupNumber: number;
+ curator: User;
+ students: User[];
}
diff --git a/ui/src/app/models/GroupAsResource.ts b/ui/src/app/models/GroupAsResource.ts
new file mode 100644
index 0000000..0e0a795
--- /dev/null
+++ b/ui/src/app/models/GroupAsResource.ts
@@ -0,0 +1,4 @@
+export interface GroupAsResource {
+ id: string;
+ name: string;
+}
diff --git a/ui/src/app/models/Lesson.ts b/ui/src/app/models/Lesson.ts
index 868cc07..b743fb2 100644
--- a/ui/src/app/models/Lesson.ts
+++ b/ui/src/app/models/Lesson.ts
@@ -1,13 +1,13 @@
import * as moment from 'moment';
-import {Group} from './Group';
-import {User} from './User';
+import {GroupAsResource} from './GroupAsResource';
+import {UserAsResource} from './UserAsResource';
import {Room} from './Room';
import {iSubject} from './Subject';
export interface Lesson {
readonly id: string;
subject: iSubject;
- lecturer: User;
- group: Group;
+ lecturer: UserAsResource;
+ group: GroupAsResource;
startAt: moment.Moment;
endAt: moment.Moment;
room: Room;
diff --git a/ui/src/app/models/Resource.ts b/ui/src/app/models/Resource.ts
new file mode 100644
index 0000000..1b2c123
--- /dev/null
+++ b/ui/src/app/models/Resource.ts
@@ -0,0 +1,5 @@
+export interface Resource {
+ readonly resourceId: number;
+ resourceName: string;
+ resourceDescription: string;
+}
diff --git a/ui/src/app/models/User.ts b/ui/src/app/models/User.ts
index 93da7e7..447460d 100644
--- a/ui/src/app/models/User.ts
+++ b/ui/src/app/models/User.ts
@@ -1,8 +1,13 @@
-type Role = 'student' | 'lecturer' | 'parent' | 'director';
+import * as moment from 'moment';
+
export interface User {
- id: string;
+ userId: number;
firstName: string;
lastName: string;
- surname: string;
- role: Role;
+ dateOFBirth: moment.Moment;
+ email: string;
+ mobilePhone: string;
+ createdAt: moment.Moment;
+ modifiedAt: moment.Moment;
+ userPhoto: any;
}
diff --git a/ui/src/app/models/UserAsResource.ts b/ui/src/app/models/UserAsResource.ts
new file mode 100644
index 0000000..c5633d3
--- /dev/null
+++ b/ui/src/app/models/UserAsResource.ts
@@ -0,0 +1,8 @@
+type Role = 'student' | 'lecturer' | 'parent' | 'director';
+export interface UserAsResource {
+ id: string;
+ firstName: string;
+ lastName: string;
+ surname: string;
+ role: Role;
+}
diff --git a/ui/src/app/sign-in/autorisation.service.ts b/ui/src/app/sign-in/autorisation.service.ts
index 5a9c059..749f5e7 100644
--- a/ui/src/app/sign-in/autorisation.service.ts
+++ b/ui/src/app/sign-in/autorisation.service.ts
@@ -10,12 +10,14 @@ export class AutorisationService {
httpOptions = {
headers: new HttpHeaders({'Content-Type': 'application/json'}),
};
+
constructor(private http: HttpClient) {}
signIn(value: SignIn): Observable {
console.log('sign in');
return this.http.post('api/signIn', value, this.httpOptions);
}
+
signUp(value): Observable {
console.log('sign up');
return this.http.post('api/signUp', value, this.httpOptions);
diff --git a/ui/src/app/sign-in/sign-in/sign-in.component.html b/ui/src/app/sign-in/sign-in/sign-in.component.html
index 91ccf59..98bdf81 100644
--- a/ui/src/app/sign-in/sign-in/sign-in.component.html
+++ b/ui/src/app/sign-in/sign-in/sign-in.component.html
@@ -8,6 +8,7 @@
Login is required
You have more than 60 characters
+
{{ hide ? 'visibility_off' : 'visibility' }}
+
Not more then 255 characters long.
Password is required
You have more than 255 characters
+
+
Not registered yet? Please, Sign up
diff --git a/ui/src/app/timetable/in-memory-data.service.ts b/ui/src/app/timetable/in-memory-data.service.ts
index bea43f8..7c58f44 100644
--- a/ui/src/app/timetable/in-memory-data.service.ts
+++ b/ui/src/app/timetable/in-memory-data.service.ts
@@ -3,10 +3,12 @@ import {InMemoryDbService} from 'angular-in-memory-web-api';
import * as moment from 'moment';
import {Lesson} from '../models/Lesson';
-import {Group} from '../models/Group';
+import {GroupAsResource} from '../models/GroupAsResource';
import {Room} from '../models/Room';
import {iSubject} from '../models/Subject';
-import {User} from '../models/User';
+import {UserAsResource} from '../models/UserAsResource';
+import {Role, FeatureEntry, Endpoint} from '../models/role';
+import {Resource} from '../models/Resource';
@Injectable({
providedIn: 'root',
@@ -183,7 +185,7 @@ export class InMemoryDataService implements InMemoryDbService {
},
},
];
- const users: User[] = [
+ const users: UserAsResource[] = [
{
id: '1',
firstName: 'Andriy',
@@ -220,7 +222,7 @@ export class InMemoryDataService implements InMemoryDbService {
role: 'parent',
},
];
- const groups: Group[] = [
+ const groups: GroupAsResource[] = [
{
id: '131',
name: 'SD-31',
@@ -336,8 +338,403 @@ export class InMemoryDataService implements InMemoryDbService {
'22',
'23',
];
-
- return {lessons, groups, rooms, subjects, users, timestamp1};
+ // ------------------------------------------Roles--------------------------------------------------
+ const roles: Role[] = [
+ {
+ id: 0,
+ name: 'Administrator',
+ entries: [
+ {
+ id: 1,
+ name: 'roles managenent',
+ description: 'ffffffffffffffff dddddddd f df dfffdfsd sfgsdfsdf sdfsdfsd vvvsvsd vvdfs',
+ endpoints: [
+ {
+ id: 2,
+ name: 'Del role',
+ path: '/www/exe',
+ method: 'post',
+ },
+ ],
+ },
+ ],
+ },
+ {
+ id: 2,
+ name: 'Manager',
+ entries: [
+ {
+ id: 1,
+ name: 'smth managenent',
+ description: 'ffffffffffffffff dddddddd f df dfffdfsd sfgsdfsdf sdfsdfsd vvvsvsd vvdfs',
+ endpoints: [
+ {
+ id: 2,
+ name: 'Del role',
+ path: '/www/exe',
+ method: 'post',
+ },
+ {
+ id: 3,
+ name: 'post role',
+ path: '/www/nnn',
+ method: 'delete',
+ },
+ ],
+ },
+ {
+ id: 2,
+ name: 'smth222 managenent',
+ description:
+ 'ffffffffffffff vvdfs ffffffffffffffff dddddddd f df dfffdfsd sfgsdfsdf sdfsdfsd vvvsvsd vvdfs',
+ endpoints: [
+ {
+ id: 2,
+ name: 'Del role',
+ path: '/www/exe',
+ method: 'post',
+ },
+ ],
+ },
+ ],
+ },
+ {
+ id: 3,
+ name: 'Lecturer',
+ entries: [
+ {
+ id: 7,
+ name: 'roles managenent',
+ description: 'ffffffffffffffff dddddddd f df dfffdfsd sfgsdfsdf sdfsdfsd vvvsvsd vvdfs',
+ endpoints: [
+ {
+ id: 2,
+ name: 'Del role',
+ path: '/www/exe',
+ method: 'post',
+ },
+ ],
+ },
+ ],
+ },
+ {
+ id: 4,
+ name: 'Student',
+ entries: [
+ {
+ id: 1,
+ name: 'smth managenent',
+ description: 'ffffffffffffffff dddddddd f df dfffdfsd sfgsdfsdf sdfsdfsd vvvsvsd vvdfs',
+ endpoints: [
+ {
+ id: 2,
+ name: 'Del role',
+ path: '/www/exe',
+ method: 'post',
+ },
+ {
+ id: 3,
+ name: 'post role',
+ path: '/www/nnn',
+ method: 'delete',
+ },
+ ],
+ },
+ {
+ id: 2,
+ name: 'smth222 managenent',
+ description: 'ffffffffffffff df dfffdfsd sfgsdfsdf f sdfsdfsd vvvsvsd vvdfs',
+ endpoints: [
+ {
+ id: 2,
+ name: 'Del role',
+ path: '/www/exe',
+ method: 'post',
+ },
+ ],
+ },
+ ],
+ },
+ {
+ id: 0,
+ name: 'Administrator',
+ entries: [
+ {
+ id: 1,
+ name: 'roles managenent',
+ description: 'ffffffffffffffff dddddddd f df dfffdfsd sfgsdfsdf sdfsdfsd vvvsvsd vvdfs',
+ endpoints: [
+ {
+ id: 2,
+ name: 'Del role',
+ path: '/www/exe',
+ method: 'post',
+ },
+ ],
+ },
+ ],
+ },
+ {
+ id: 2,
+ name: 'Manager',
+ entries: [
+ {
+ id: 1,
+ name: 'smth managenent',
+ description: 'ffffffffffffffff dddddddd f df dfffdfsd sfgsdfsdf sdfsdfsd vvvsvsd vvdfs',
+ endpoints: [
+ {
+ id: 2,
+ name: 'Del role',
+ path: '/www/exe',
+ method: 'post',
+ },
+ {
+ id: 3,
+ name: 'post role',
+ path: '/www/nnn',
+ method: 'delete',
+ },
+ ],
+ },
+ {
+ id: 2,
+ name: 'smth222 managenent',
+ description: 'fffffffffdddd f dffdfsd sfgsdfsdf sdfsdfsd vvvsvsd vvdfs',
+ endpoints: [
+ {
+ id: 2,
+ name: 'Del role',
+ path: '/www/exe',
+ method: 'post',
+ },
+ ],
+ },
+ ],
+ },
+ {
+ id: 3,
+ name: 'Lecturer',
+ entries: [
+ {
+ id: 1,
+ name: 'roles managenent',
+ description: 'ffffffffffffffff dddddddd f df dfffdfsd sfgsdfsdf sdfsdfsd vvvsvsd vvdfs',
+ endpoints: [
+ {
+ id: 2,
+ name: 'Del role',
+ path: '/www/exe',
+ method: 'post',
+ },
+ ],
+ },
+ ],
+ },
+ {
+ id: 4,
+ name: 'Student',
+ entries: [
+ {
+ id: 1,
+ name: 'smth managenent',
+ description: 'ffffffffffffffff dddddddd f df dfffdfsd sfgsdfsdf sdfsdfsd vvvsvsd vvdfs',
+ endpoints: [
+ {
+ id: 2,
+ name: 'Del role',
+ path: '/www/exe',
+ method: 'post',
+ },
+ {
+ id: 3,
+ name: 'post role',
+ path: '/www/nnn',
+ method: 'delete',
+ },
+ ],
+ },
+ {
+ id: 2,
+ name: 'smth222 managenent',
+ description: 'fffffffffffffdd f df dfffdfsd sfgsdfsd f df dfffdfsd sfgsdfsdf sdfsdfsd vvvsvsd vvdfs',
+ endpoints: [
+ {
+ id: 2,
+ name: 'Del role',
+ path: '/www/exe',
+ method: 'post',
+ },
+ ],
+ },
+ ],
+ },
+ ];
+ const endpoints: Endpoint[] = [
+ {
+ id: 1,
+ name: 'Delete Lesson',
+ path: '/timetable',
+ method: 'delete',
+ },
+ {
+ id: 2,
+ name: 'Add Lesson',
+ path: '/timetable',
+ method: 'post',
+ },
+ {
+ id: 3,
+ name: 'Update Lesson',
+ path: '/timetable',
+ method: 'put',
+ },
+ {
+ id: 4,
+ name: 'Get Lesson',
+ path: '/timetable',
+ method: 'get',
+ },
+ {
+ id: 5,
+ name: 'Delete lecturer',
+ path: '/admin',
+ method: 'delete',
+ },
+ {
+ id: 6,
+ name: 'Add lecturer',
+ path: '/admin',
+ method: 'delete',
+ },
+ {
+ id: 7,
+ name: 'Update lecturer',
+ path: '/admin',
+ method: 'put',
+ },
+ {
+ id: 8,
+ name: 'Get lecturer',
+ path: '/admin',
+ method: 'get',
+ },
+ ];
+ const featureEntry: FeatureEntry[] = [
+ {
+ id: 7,
+ name: 'roles managenent',
+ description: 'ffffffffffffffff dddddddd f df dfffdfsd sfgsdfsdf sdfsdfsd vvvsvsd vvdfs',
+ endpoints: [
+ {
+ id: 2,
+ name: 'Del role',
+ path: '/www/exe',
+ method: 'post',
+ },
+ ],
+ },
+ {
+ id: 8,
+ name: 'Full access to lessons',
+ description: 'c r u d',
+ endpoints: [
+ {
+ id: 1,
+ name: 'Delete Lesson',
+ path: '/timetable',
+ method: 'delete',
+ },
+ {
+ id: 2,
+ name: 'Add Lesson',
+ path: '/timetable',
+ method: 'post',
+ },
+ {
+ id: 3,
+ name: 'Update Lesson',
+ path: '/timetable',
+ method: 'put',
+ },
+ {
+ id: 4,
+ name: 'Get Lesson',
+ path: '/timetable',
+ method: 'get',
+ },
+ ],
+ },
+ {
+ id: 9,
+ name: 'Full acess to lecturers',
+ description: 'c r u d',
+ endpoints: [
+ {
+ id: 5,
+ name: 'Delete lecturer',
+ path: '/admin',
+ method: 'delete',
+ },
+ {
+ id: 6,
+ name: 'Add lecturer',
+ path: '/admin',
+ method: 'delete',
+ },
+ {
+ id: 7,
+ name: 'Update lecturer',
+ path: '/admin',
+ method: 'put',
+ },
+ {
+ id: 8,
+ name: 'Get lecturer',
+ path: '/admin',
+ method: 'get',
+ },
+ ],
+ },
+ ];
+ const resources = [
+ {
+ resourceId: 0,
+ resourceName: 'Projector',
+ resourceDescription: 'Required when you are needed to show presentation',
+ },
+ {
+ resourceId: 1,
+ resourceName: 'Projector 2',
+ resourceDescription: 'Required when you are needed to show presentation',
+ },
+ {
+ resourceId: 2,
+ resourceName: 'Projector 3',
+ resourceDescription: 'Required when you are needed to show presentation',
+ },
+ {
+ resourceId: 3,
+ resourceName: 'Projector 4',
+ resourceDescription: 'Required when you are needed to show presentation',
+ },
+ {
+ resourceId: 4,
+ resourceName: 'Projector 5',
+ resourceDescription: 'Required when you are needed to show presentation',
+ },
+ {
+ resourceId: 5,
+ resourceName: 'Projector 6',
+ resourceDescription: 'Required when you are needed to show presentation',
+ },
+ {
+ resourceId: 6,
+ resourceName: 'Projector 7',
+ resourceDescription: 'Required when you are needed to show presentation',
+ },
+ ];
+ return {lessons, groups, rooms, subjects, users, timestamp1, roles, endpoints, featureEntry, resources};
}
// Overrides the genId method to ensure that a hero always has an id.
diff --git a/ui/src/app/timetable/search-result/search-result.component.ts b/ui/src/app/timetable/search-result/search-result.component.ts
index 7779892..7ea88da 100644
--- a/ui/src/app/timetable/search-result/search-result.component.ts
+++ b/ui/src/app/timetable/search-result/search-result.component.ts
@@ -2,8 +2,8 @@ import {Component, OnInit, Inject} from '@angular/core';
import {MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import {TimetableHttpService} from '../shared/timetable-http.service';
-import {Group} from '../../models/Group';
-import {User} from '../../models/User';
+import {GroupAsResource} from '../../models/GroupAsResource';
+import {UserAsResource} from '../../models/UserAsResource';
import {iSubject} from '../../models/Subject';
import {Room} from '../../models/Room';
@Component({
@@ -16,8 +16,8 @@ export class SearchResultComponent implements OnInit {
private roomsUrl = 'api/rooms';
private subjectsUrl = 'api/subjects';
private usersUrl = 'api/users';
- groups: Group[] = [];
- lecturers: User[] = [];
+ groups: GroupAsResource[] = [];
+ lecturers: UserAsResource[] = [];
subjects: iSubject[] = [];
rooms: Room[] = [];
constructor(
diff --git a/ui/src/app/timetable/sidebar/sidebar.component.ts b/ui/src/app/timetable/sidebar/sidebar.component.ts
index 75c7bdf..f7ecb4b 100644
--- a/ui/src/app/timetable/sidebar/sidebar.component.ts
+++ b/ui/src/app/timetable/sidebar/sidebar.component.ts
@@ -6,8 +6,8 @@ import {FormControl, FormGroup} from '@angular/forms';
import {MatDialog} from '@angular/material/dialog';
import {SearchResultComponent} from '../search-result/search-result.component';
-import {Group} from '../../models/Group';
-import {User} from '../../models/User';
+import {GroupAsResource} from '../../models/GroupAsResource';
+import {UserAsResource} from '../../models/UserAsResource';
import {iSubject} from '../../models/Subject';
import {Room} from '../../models/Room';
import {Error} from '../../models/Error';
@@ -27,8 +27,8 @@ export class SidebarComponent implements OnInit {
showProgressBar = false;
findForm: FormGroup;
- groups: Group[] = [];
- lecturers: User[] = [];
+ groups: GroupAsResource[] = [];
+ lecturers: UserAsResource[] = [];
subjects: iSubject[] = [];
rooms: Room[] = [];
constructor(
diff --git a/ui/src/app/timetable/slider-menu/slider-menu.component.ts b/ui/src/app/timetable/slider-menu/slider-menu.component.ts
index 6e8a13c..bbfea60 100644
--- a/ui/src/app/timetable/slider-menu/slider-menu.component.ts
+++ b/ui/src/app/timetable/slider-menu/slider-menu.component.ts
@@ -8,8 +8,8 @@ import {FormControl, FormGroup, Validators} from '@angular/forms';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import {Lesson} from '../../models/Lesson';
-import {Group} from '../../models/Group';
-import {User} from '../../models/User';
+import {GroupAsResource} from '../../models/GroupAsResource';
+import {UserAsResource} from '../../models/UserAsResource';
import {iSubject} from '../../models/Subject';
import {Room} from '../../models/Room';
@@ -34,8 +34,8 @@ export class SliderMenuComponent implements OnInit {
isChange = false;
addNewForm: FormGroup;
- groups: Group[] = [];
- lecturers: User[] = [];
+ groups: GroupAsResource[] = [];
+ lecturers: UserAsResource[] = [];
subjects: iSubject[] = [];
rooms: Room[] = [];
constructor(
@@ -126,8 +126,8 @@ export class SliderMenuComponent implements OnInit {
updateLesson(
subject: iSubject,
room: Room,
- lecturer: User,
- group: Group,
+ lecturer: UserAsResource,
+ group: GroupAsResource,
dateFrom: Date,
dateTo: Date,
timeFrom: string,
diff --git a/ui/src/app/timetable/timetable.service.ts b/ui/src/app/timetable/timetable.service.ts
index 20759c9..0f0d801 100644
--- a/ui/src/app/timetable/timetable.service.ts
+++ b/ui/src/app/timetable/timetable.service.ts
@@ -1,10 +1,9 @@
import {Injectable} from '@angular/core';
import {Observable, Subject} from 'rxjs';
-import {TimetableHttpService} from './shared/timetable-http.service';
import {Lesson} from '../models/Lesson';
-import {Group} from '../models/Group';
-import {User} from '../models/User';
+import {GroupAsResource} from '../models/GroupAsResource';
+import {UserAsResource} from '../models/UserAsResource';
import {iSubject} from '../models/Subject';
import {Room} from '../models/Room';
@@ -17,9 +16,9 @@ export class TimetableService {
private searchResult$: Subject
= new Subject();
private selectedDate$: Subject = new Subject();
- private lecturers$: Subject = new Subject();
+ private lecturers$: Subject = new Subject();
private subjects$: Subject = new Subject();
- private groups$: Subject = new Subject();
+ private groups$: Subject = new Subject();
private rooms$: Subject = new Subject();
getSelectedDate(): Observable {
@@ -54,19 +53,19 @@ export class TimetableService {
return this.rooms$;
}
- setLecturers(lecturer: User[]): void {
+ setLecturers(lecturer: UserAsResource[]): void {
this.lecturers$.next(lecturer);
}
- getLecturers(): Observable {
+ getLecturers(): Observable {
return this.lecturers$;
}
- setGroups(groups: Group[]): void {
+ setGroups(groups: GroupAsResource[]): void {
this.groups$.next(groups);
}
- getGroups(): Observable {
+ getGroups(): Observable {
return this.groups$;
}
diff --git a/ui/src/assets/img/projector.jpg b/ui/src/assets/img/projector.jpg
new file mode 100644
index 0000000..7f8387e
Binary files /dev/null and b/ui/src/assets/img/projector.jpg differ