issue-18 #28

Merged
sebastian merged 55 commits from issue-18 into master 2023-10-28 19:36:14 +02:00
7 changed files with 88 additions and 8 deletions
Showing only changes of commit 662277c237 - Show all commits

View File

@ -5,9 +5,8 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="3a869f59-290a-4ab2-b036-a878ce801bc4" name="Changes" comment="Define Entity BasicTaskSchedule and Taskcontroller"> <list default="true" id="3a869f59-290a-4ab2-b036-a878ce801bc4" name="Changes" comment="Define Entity BasicTaskSchedule and Taskcontroller">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../frontend/src/app/app.module.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../frontend/src/app/app.module.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../frontend/src/app/schedules/scheduler/scheduler.component.html" beforeDir="false" afterPath="$PROJECT_DIR$/../frontend/src/app/schedules/scheduler/scheduler.component.html" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../frontend/src/app/tasks/task-detail-overview/task-detail-overview.component.html" beforeDir="false" afterPath="$PROJECT_DIR$/../frontend/src/app/tasks/task-detail-overview/task-detail-overview.component.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../frontend/src/app/schedules/scheduler/scheduler.component.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../frontend/src/app/schedules/scheduler/scheduler.component.ts" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -95,7 +94,7 @@
<workItem from="1697958118995" duration="5749000" /> <workItem from="1697958118995" duration="5749000" />
<workItem from="1697969480767" duration="6407000" /> <workItem from="1697969480767" duration="6407000" />
<workItem from="1697989716016" duration="3814000" /> <workItem from="1697989716016" duration="3814000" />
<workItem from="1698067098771" duration="2156000" /> <workItem from="1698067098771" duration="2794000" />
</task> </task>
<task id="LOCAL-00001" summary="Structure Taskgroups in Hierarchies"> <task id="LOCAL-00001" summary="Structure Taskgroups in Hierarchies">
<option name="closed" value="true" /> <option name="closed" value="true" />

View File

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

View File

@ -0,0 +1,14 @@
.basicScheduleContainer {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.basicScheduleContent {
display: inline;
}
.scheduleContainer {
margin-bottom: 5px;
}

View File

@ -0,0 +1,17 @@
<mat-card *ngFor="let schedule of schedules" class="scheduleContainer">
<mat-card-content>
<div class="basicScheduleContainer">
<p class="basicScheduleContent">{{schedule.scheduleDate | date:'EEEE, d MMM. y'}}</p>
<div class="basicScheduleContent">
<button mat-icon-button color="primary"><mat-icon>edit</mat-icon></button>
<button mat-icon-button color="warn"><mat-icon>delete</mat-icon></button>
</div>
</div>
</mat-card-content>
</mat-card>
<button style="float: right" mat-raised-button color="primary" [routerLink]="['/taskgroups', taskgroup!.taskgroupID, 'tasks', task!.taskID, 'schedule']">Add</button>

View File

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

View File

@ -0,0 +1,27 @@
import {Component, Input, OnInit} from '@angular/core';
import {BasicScheduleEntityInfo, ScheduleService, TaskEntityInfo, TaskgroupEntityInfo} from "../../../api";
@Component({
selector: 'app-schedule-dashboard',
templateUrl: './schedule-dashboard.component.html',
styleUrls: ['./schedule-dashboard.component.css']
})
export class ScheduleDashboardComponent implements OnInit{
@Input('taskgroup') taskgroup: TaskgroupEntityInfo | undefined
@Input('task') task: TaskEntityInfo | undefined
schedules: BasicScheduleEntityInfo[] = []
constructor(private scheduleService: ScheduleService) {
}
ngOnInit() {
this.scheduleService.schedulesTaskIDScheduleTypeGet(this.task!.taskID, "BASIC").subscribe({
next: resp => {
this.schedules = resp;
}
})
}
}

View File

@ -35,10 +35,11 @@
</mat-card-actions> </mat-card-actions>
</mat-card> </mat-card>
<mat-expansion-panel *ngIf="taskgroup != undefined && task != undefined">
<mat-expansion-panel *ngIf="taskgroup != undefined && task != undefined" style="margin-top: 20px" expanded>
<mat-expansion-panel-header>Schedules</mat-expansion-panel-header> <mat-expansion-panel-header>Schedules</mat-expansion-panel-header>
<div> <div>
<button style="float: right" mat-raised-button color="primary" [routerLink]="['/taskgroups', taskgroup!.taskgroupID, 'tasks', task!.taskID, 'schedule']">Add</button> <app-schedule-dashboard [taskgroup]="taskgroup" [task]="task"></app-schedule-dashboard>
</div> </div>
</mat-expansion-panel> </mat-expansion-panel>
</div> </div>