diff --git a/frontend/src/app/app-routing.module.ts b/frontend/src/app/app-routing.module.ts index 076bea8..66a658a 100644 --- a/frontend/src/app/app-routing.module.ts +++ b/frontend/src/app/app-routing.module.ts @@ -7,6 +7,7 @@ import {UserSettingsComponent} from "./user-settings/user-settings.component"; import {TaskgroupDashboardComponent} from "./taskgroups/taskgroup-dashboard/taskgroup-dashboard.component"; import {TaskDetailOverviewComponent} from "./tasks/task-detail-overview/task-detail-overview.component"; import {SchedulerComponent} from "./schedules/scheduler/scheduler.component"; +import {MissedSchedulesComponent} from "./missed-schedules/missed-schedules.component"; const routes: Routes = [ {path: '', component: MainComponent}, @@ -16,7 +17,8 @@ const routes: Routes = [ {path: 'taskgroups/:taskgroupID', component: TaskgroupDashboardComponent}, {path: 'taskgroups/:taskgroupID/tasks/:taskID', component: TaskDetailOverviewComponent}, {path: 'taskgroups/:taskgroupID/tasks/:taskID/schedule', component: SchedulerComponent}, - {path: 'taskgroups/:taskgroupID/tasks/:taskID/schedule/:scheduleID', component: SchedulerComponent} + {path: 'taskgroups/:taskgroupID/tasks/:taskID/schedule/:scheduleID', component: SchedulerComponent}, + {path: 'reschedule', component: MissedSchedulesComponent} ]; @NgModule({ diff --git a/frontend/src/app/app.component.html b/frontend/src/app/app.component.html index b4f5177..e37af02 100644 --- a/frontend/src/app/app.component.html +++ b/frontend/src/app/app.component.html @@ -4,6 +4,7 @@ + diff --git a/frontend/src/app/missed-schedules/missed-schedules.component.css b/frontend/src/app/missed-schedules/missed-schedules.component.css new file mode 100644 index 0000000..2b618a5 --- /dev/null +++ b/frontend/src/app/missed-schedules/missed-schedules.component.css @@ -0,0 +1,37 @@ +.container { + margin: 20px auto; + width: 70%; +} + +.spacer { + margin-bottom: 2.5%; +} + + +@media screen and (max-width: 600px) { + .container { + width: 100%; + margin: 20px 10px; + } +} + +.originally-planned-container { + border-style: solid; + border-color: #e1e1e1; + border-width: 1px; + margin-top: 10px; + border-radius: 5px; + padding: 10px; + +} + +.reschedule-actions-container { + display: flex; + justify-content: space-between; + flex-direction: row; + text-align: center; +} + +.forget-all-btn { + margin-top: 20px; +} diff --git a/frontend/src/app/missed-schedules/missed-schedules.component.html b/frontend/src/app/missed-schedules/missed-schedules.component.html new file mode 100644 index 0000000..39c5ec8 --- /dev/null +++ b/frontend/src/app/missed-schedules/missed-schedules.component.html @@ -0,0 +1,19 @@ +
+ + + +

{{taskgroup.taskgroupName}} / {{schedule.task.taskName}}

+ +
+
+

Originally planned: {{schedule.schedule.scheduleDate}}

+
+
+ + +
+
+
+
+ +
diff --git a/frontend/src/app/missed-schedules/missed-schedules.component.spec.ts b/frontend/src/app/missed-schedules/missed-schedules.component.spec.ts new file mode 100644 index 0000000..4547946 --- /dev/null +++ b/frontend/src/app/missed-schedules/missed-schedules.component.spec.ts @@ -0,0 +1,21 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { MissedSchedulesComponent } from './missed-schedules.component'; + +describe('MissedSchedulesComponent', () => { + let component: MissedSchedulesComponent; + let fixture: ComponentFixture; + + beforeEach(() => { + TestBed.configureTestingModule({ + declarations: [MissedSchedulesComponent] + }); + fixture = TestBed.createComponent(MissedSchedulesComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/frontend/src/app/missed-schedules/missed-schedules.component.ts b/frontend/src/app/missed-schedules/missed-schedules.component.ts new file mode 100644 index 0000000..2e7ebba --- /dev/null +++ b/frontend/src/app/missed-schedules/missed-schedules.component.ts @@ -0,0 +1,33 @@ +import {Component, OnInit} from '@angular/core'; +import {ScheduleInfo, ScheduleService} from "../../api"; +import {NavigationLink} from "../navigation-link-list/navigation-link-list.component"; + +@Component({ + selector: 'app-missed-schedules', + templateUrl: './missed-schedules.component.html', + styleUrls: ['./missed-schedules.component.css'] +}) +export class MissedSchedulesComponent implements OnInit{ + + missedSchedules: ScheduleInfo[] = [] + defaultNavigationLinkPath: NavigationLink[] = [ + { + linkText: "Dashboard", + routerLink: ['/'] + }, + { + linkText: "Missed Schedules", + routerLink: ["/reschedule"] + } + ] + constructor(private scheduleService: ScheduleService) { + } + + ngOnInit() { + this.scheduleService.schedulesMissedGet().subscribe({ + next: resp => { + this.missedSchedules = resp; + } + }) + } +}