issue-10 #17

Merged
sebastian merged 29 commits from issue-10 into master 2023-10-22 11:40:25 +02:00
5 changed files with 48 additions and 39 deletions
Showing only changes of commit 1c4b0f73b6 - Show all commits

View File

@ -4,7 +4,13 @@
<option name="autoReloadType" value="SELECTIVE" /> <option name="autoReloadType" value="SELECTIVE" />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="3a869f59-290a-4ab2-b036-a878ce801bc4" name="Changes" comment="Datastructure for Tasks" /> <list default="true" id="3a869f59-290a-4ab2-b036-a878ce801bc4" name="Changes" comment="Datastructure for Tasks">
<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/tasks/task-editor/task-editor.component.css" beforeDir="false" afterPath="$PROJECT_DIR$/../frontend/src/app/tasks/task-editor/task-editor.component.css" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../frontend/src/app/tasks/task-editor/task-editor.component.html" beforeDir="false" afterPath="$PROJECT_DIR$/../frontend/src/app/tasks/task-editor/task-editor.component.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../frontend/src/app/tasks/task-editor/task-editor.component.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../frontend/src/app/tasks/task-editor/task-editor.component.ts" afterDir="false" />
</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" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@ -35,30 +41,31 @@
<option name="hideEmptyMiddlePackages" value="true" /> <option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" /> <option name="showLibraryContents" value="true" />
</component> </component>
<component name="PropertiesComponent">{ <component name="PropertiesComponent"><![CDATA[{
&quot;keyToString&quot;: { "keyToString": {
&quot;RequestMappingsPanelOrder0&quot;: &quot;0&quot;, "RequestMappingsPanelOrder0": "0",
&quot;RequestMappingsPanelOrder1&quot;: &quot;1&quot;, "RequestMappingsPanelOrder1": "1",
&quot;RequestMappingsPanelWidth0&quot;: &quot;75&quot;, "RequestMappingsPanelWidth0": "75",
&quot;RequestMappingsPanelWidth1&quot;: &quot;75&quot;, "RequestMappingsPanelWidth1": "75",
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;, "RunOnceActivity.OpenProjectViewOnStart": "true",
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;, "RunOnceActivity.ShowReadmeOnStart": "true",
&quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;, "WebServerToolWindowFactoryState": "false",
&quot;git-widget-placeholder&quot;: &quot;issue-11-angular-update&quot;, "git-widget-placeholder": "issue-11-angular-update",
&quot;last_directory_selection&quot;: &quot;D:/Programmierprojekte/TimeManager/backend/src/main/java/core/api/models/timemanager&quot;, "last_directory_selection": "D:/Programmierprojekte/TimeManager/backend/src/main/java/core/api/models/timemanager",
&quot;last_opened_file_path&quot;: &quot;D:/Programmierprojekte/Dicewars/client&quot;, "last_opened_file_path": "D:/Programmierprojekte/Dicewars/client",
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;, "node.js.detected.package.eslint": "true",
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;, "node.js.detected.package.tslint": "true",
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;, "node.js.selected.package.eslint": "(autodetect)",
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;, "node.js.selected.package.tslint": "(autodetect)",
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot; "settings.editor.selected.configurable": "preferences.lookFeel",
"vue.rearranger.settings.migration": "true"
}, },
&quot;keyToStringList&quot;: { "keyToStringList": {
&quot;DatabaseDriversLRU&quot;: [ "DatabaseDriversLRU": [
&quot;mariadb&quot; "mariadb"
] ]
} }
}</component> }]]></component>
<component name="RunManager"> <component name="RunManager">
<configuration name="DemoApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true"> <configuration name="DemoApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<module name="demo" /> <module name="demo" />
@ -79,7 +86,8 @@
<workItem from="1695647249321" duration="397000" /> <workItem from="1695647249321" duration="397000" />
<workItem from="1696183811713" duration="4994000" /> <workItem from="1696183811713" duration="4994000" />
<workItem from="1696399523081" duration="666000" /> <workItem from="1696399523081" duration="666000" />
<workItem from="1696517800445" duration="1782000" /> <workItem from="1696517800445" duration="3887000" />
<workItem from="1696573678147" duration="111000" />
</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

@ -38,11 +38,6 @@ import { TaskgroupCreationComponent } from './taskgroups/taskgroup-creation/task
import { TaskgroupDeletionComponent } from './taskgroups/taskgroup-deletion/taskgroup-deletion.component'; import { TaskgroupDeletionComponent } from './taskgroups/taskgroup-deletion/taskgroup-deletion.component';
import { TaskEditorComponent } from './tasks/task-editor/task-editor.component'; import { TaskEditorComponent } from './tasks/task-editor/task-editor.component';
import {MatDatepickerModule} from "@angular/material/datepicker"; import {MatDatepickerModule} from "@angular/material/datepicker";
import {
NgxMatMomentAdapter,
NgxMatMomentModule,
NgxMomentDateModule
} from "@angular-material-components/moment-adapter";
import {MatButtonModule} from "@angular/material/button"; import {MatButtonModule} from "@angular/material/button";
import {MatMenuModule} from "@angular/material/menu"; import {MatMenuModule} from "@angular/material/menu";
import {MatTabsModule} from "@angular/material/tabs"; import {MatTabsModule} from "@angular/material/tabs";
@ -51,7 +46,6 @@ import {MatCheckboxModule} from "@angular/material/checkbox";
import {MatCardModule} from "@angular/material/card"; import {MatCardModule} from "@angular/material/card";
import {MatListModule} from "@angular/material/list"; import {MatListModule} from "@angular/material/list";
import {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE, MatNativeDateModule} from "@angular/material/core"; import {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE, MatNativeDateModule} from "@angular/material/core";
import {MomentDateAdapter} from "@angular/material-moment-adapter";
@NgModule({ @NgModule({
declarations: [ declarations: [
@ -99,7 +93,8 @@ import {MomentDateAdapter} from "@angular/material-moment-adapter";
MatDatepickerModule, MatDatepickerModule,
MatInputModule, MatInputModule,
MatDatepickerModule, MatDatepickerModule,
MatNativeDateModule MatNativeDateModule,
FormsModule
], ],
providers: [ providers: [
HttpClientModule, HttpClientModule,

View File

@ -1,3 +1,8 @@
.long-form { .long-form {
width: 100%; width: 100%;
} }
.date-form {
width: 49%;
margin-right: 9px;
}

View File

@ -9,16 +9,16 @@
<mat-label>ETA</mat-label> <mat-label>ETA</mat-label>
<input matInput type="number" [formControl]="etaCtrl" min="0"> <input matInput type="number" [formControl]="etaCtrl" min="0">
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field class="date-form">
<mat-label>Startdate</mat-label> <mat-label>Startdate</mat-label>
<input matInput [matDatepicker]="startpicker"> <input matInput [matDatepicker]="startpicker" [formControl]="startDate">
<mat-hint>MM/DD/YYYY</mat-hint> <mat-hint>MM/DD/YYYY</mat-hint>
<mat-datepicker-toggle matIconSuffix [for]="startpicker"></mat-datepicker-toggle> <mat-datepicker-toggle matIconSuffix [for]="startpicker"></mat-datepicker-toggle>
<mat-datepicker #startpicker></mat-datepicker> <mat-datepicker #startpicker></mat-datepicker>
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field class="date-form">
<mat-label>Deadline</mat-label> <mat-label>Deadline</mat-label>
<input matInput [matDatepicker]="deadlinepicker"> <input matInput [matDatepicker]="deadlinepicker" [formControl]="endDate">
<mat-hint>MM/DD/YYYY</mat-hint> <mat-hint>MM/DD/YYYY</mat-hint>
<mat-datepicker-toggle matIconSuffix [for]="deadlinepicker"></mat-datepicker-toggle> <mat-datepicker-toggle matIconSuffix [for]="deadlinepicker"></mat-datepicker-toggle>
<mat-datepicker #deadlinepicker></mat-datepicker> <mat-datepicker #deadlinepicker></mat-datepicker>

View File

@ -1,10 +1,10 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import {UntypedFormControl, Validators} from "@angular/forms"; import {FormControl, UntypedFormControl, Validators} from "@angular/forms";
import * as _moment from 'moment'; import * as _moment from 'moment';
import {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE} from "@angular/material/core"; import {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE} from "@angular/material/core";
import {MomentDateAdapter} from "@angular/material-moment-adapter"; import {MomentDateAdapter} from "@angular/material-moment-adapter";
const moment = _moment;
@Component({ @Component({
selector: 'app-task-editor', selector: 'app-task-editor',
templateUrl: './task-editor.component.html', templateUrl: './task-editor.component.html',
@ -12,9 +12,10 @@ const moment = _moment;
}) })
export class TaskEditorComponent implements OnInit { export class TaskEditorComponent implements OnInit {
nameCtrl = new UntypedFormControl('', [Validators.required, Validators.maxLength(255)]) nameCtrl: FormControl = new FormControl('', [Validators.required, Validators.maxLength(255)])
etaCtrl = new UntypedFormControl(0, [Validators.required, Validators.min(0)]) etaCtrl: FormControl = new FormControl(0, [Validators.required, Validators.min(0)])
startDate = new UntypedFormControl(moment.now, [Validators.required]) startDate: FormControl = new FormControl(Date.now(), [Validators.required])
endDate: FormControl = new FormControl('');
constructor() { } constructor() { }
ngOnInit(): void { ngOnInit(): void {