issue-25 #27

Merged
sebastian merged 32 commits from issue-25 into issue-18 2023-10-28 19:33:06 +02:00
7 changed files with 180 additions and 10 deletions
Showing only changes of commit 5b6e42e93f - Show all commits

View File

@ -4,12 +4,7 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="3a869f59-290a-4ab2-b036-a878ce801bc4" name="Changes" comment="Removed unused TaskgroupShortInfo.java">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/core/repositories/timemanager/BasicTaskScheduleRepository.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/core/repositories/timemanager/BasicTaskScheduleRepository.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/core/services/TaskScheduleService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/core/services/TaskScheduleService.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/core/services/TaskService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/core/services/TaskService.java" afterDir="false" />
</list>
<list default="true" id="3a869f59-290a-4ab2-b036-a878ce801bc4" name="Changes" comment="Fix Foreign Key Constraint Fail when deleting Taskgroups" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@ -99,7 +94,7 @@
<workItem from="1698067098771" duration="4770000" />
<workItem from="1698127431684" duration="2039000" />
<workItem from="1698164397550" duration="2329000" />
<workItem from="1698246651541" duration="766000" />
<workItem from="1698246651541" duration="1537000" />
</task>
<task id="LOCAL-00001" summary="Structure Taskgroups in Hierarchies">
<option name="closed" value="true" />
@ -165,7 +160,15 @@
<option name="project" value="LOCAL" />
<updated>1698168406655</updated>
</task>
<option name="localTasksCounter" value="9" />
<task id="LOCAL-00009" summary="Fix Foreign Key Constraint Fail when deleting Taskgroups">
<option name="closed" value="true" />
<created>1698247531000</created>
<option name="number" value="00009" />
<option name="presentableId" value="LOCAL-00009" />
<option name="project" value="LOCAL" />
<updated>1698247531000</updated>
</task>
<option name="localTasksCounter" value="10" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
@ -182,7 +185,8 @@
<MESSAGE value="Delete Schedules" />
<MESSAGE value="Deliver Schedule Path Info when fetching Schedules" />
<MESSAGE value="Removed unused TaskgroupShortInfo.java" />
<option name="LAST_COMMIT_MESSAGE" value="Removed unused TaskgroupShortInfo.java" />
<MESSAGE value="Fix Foreign Key Constraint Fail when deleting Taskgroups" />
<option name="LAST_COMMIT_MESSAGE" value="Fix Foreign Key Constraint Fail when deleting Taskgroups" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>

View File

@ -62,6 +62,7 @@ import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
import {MatSelectModule} from "@angular/material/select";
import { BasicSchedulerComponent } from './schedules/basic-scheduler/basic-scheduler.component';
import { ScheduleDashboardComponent } from './schedules/schedule-dashboard/schedule-dashboard.component';
import { DashboardComponent } from './dashboard/dashboard.component';
@NgModule({
declarations: [
AppComponent,
@ -88,7 +89,8 @@ import { ScheduleDashboardComponent } from './schedules/schedule-dashboard/sched
TaskDetailOverviewComponent,
SchedulerComponent,
BasicSchedulerComponent,
ScheduleDashboardComponent
ScheduleDashboardComponent,
DashboardComponent
],
imports: [
BrowserModule,

View File

@ -0,0 +1,94 @@
.container {
margin: 20px auto;
width: 70%;
display: flex;
}
.spacer {
margin-bottom: 2.5%;
}
@media screen and (max-width: 600px) {
.container {
width: 100%;
margin: 20px 10px;
}
}
.today-worked-info {
margin-left: 20px;
background-color: #e1e1e1;
padding-right: 5px;
padding-left: 5px;
border-radius: 5px;
}
.red-card {
background-color: #e54c3c;
color: white;
}
.green-card {
background-color: #00bc8c;
color: white;
}
.main-container {
width: 45%;
margin-right: 20px;
}
.btn-link {
text-decoration: underline;
color: white;
margin-left: 20px;
}
.dashboard-heading {
margin-top: 20px;
font-size: 2.5em;
}
.today-worked-info {
font-size: .8em;
}
.lightBlueBtn {
background-color: #3498db;
color: white;
}
.grayBtn {
background-color: #444444;
color: white;
border-radius: 0;
}
::ng-deep .mat-mdc-list-base {
--mdc-list-list-item-label-text-color: white
}
::ng-deep .mat-mdc-list-base .taskgroup-btn, ::ng-deep .mat-mdc-list-base .taskgroup-last-btn {
--mdc-list-list-item-label-text-color: black
}
.taskgroup-overview {
width: 25%;
float: right;
}
.spacer {
flex: 1 1 auto;
}
.taskgroup-btn {
background-color: #f3f3f3;
border: 0 solid #000000;
border-bottom-width: 1px;
}
.taskgroup-last-btn {
background-color: #f3f3f3;
}

View File

@ -0,0 +1,34 @@
<div class="container">
<div class="main-container">
<mat-card *ngIf="missedSchedules" class="red-card">
<mat-card-content>
<p>There are missed schedules. Please reschedule them.</p>
<a class="btn-link" routerLink="/">Reschedule</a>
</mat-card-content>
</mat-card>
<h1 class="dashboard-heading">Now<b class="today-worked-info">Today: 0 min</b></h1>
<mat-card class="green-card" *ngIf="!taskRunning">
<mat-card-content>
<p>Currently there is no task in progress.</p>
<a class="btn-link" routerLink="/">Did you forget to start an activity?</a>
</mat-card-content>
</mat-card>
<h1 class="dashboard-heading">Scheduled for today</h1>
<mat-card class="green-card" *ngIf="schedules.length == 0">
<mat-card-content>
<p>There is no scheduled Task for today</p>
</mat-card-content>
</mat-card>
</div>
<span class="spacer"></span>
<div class="taskgroup-overview">
<mat-action-list>
<button mat-list-item class="lightBlueBtn">Manage Taskgroups</button>
<button mat-list-item class="taskgroup-btn">Algorithmen II</button>
<button mat-list-item class="taskgroup-last-btn">Computer Grafik</button>
</mat-action-list>
</div>
</div>

View File

@ -0,0 +1,21 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { DashboardComponent } from './dashboard.component';
describe('DashboardComponent', () => {
let component: DashboardComponent;
let fixture: ComponentFixture<DashboardComponent>;
beforeEach(() => {
TestBed.configureTestingModule({
declarations: [DashboardComponent]
});
fixture = TestBed.createComponent(DashboardComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,14 @@
import { Component } from '@angular/core';
import {ScheduleInfo} from "../../api";
@Component({
selector: 'app-dashboard',
templateUrl: './dashboard.component.html',
styleUrls: ['./dashboard.component.css']
})
export class DashboardComponent {
missedSchedules: boolean = true
taskRunning: boolean = false
schedules: ScheduleInfo[] = []
}

View File

@ -0,0 +1 @@
<app-dashboard></app-dashboard>