diff --git a/src/app/components/backlog/backlog.component.html b/src/app/components/backlog/backlog.component.html index 441a4db..0579765 100644 --- a/src/app/components/backlog/backlog.component.html +++ b/src/app/components/backlog/backlog.component.html @@ -74,10 +74,10 @@

{{ story.content }}

Category: {{ story.categoryid || "N/A" }}Category: {{ story.categoryId || "N/A" }} Status: {{ story.statusid || "N/A" }}Status: {{ story.statusId || "N/A" }}
{{ story.content }}

Category: {{ story.categoryid || "N/A" }}Category: {{ story.categoryId || "N/A" }} Status: {{ story.statusid || "N/A" }}Status: {{ story.statusId || "N/A" }}
diff --git a/src/app/components/backlog/backlog.component.ts b/src/app/components/backlog/backlog.component.ts index 110058a..f966f3d 100644 --- a/src/app/components/backlog/backlog.component.ts +++ b/src/app/components/backlog/backlog.component.ts @@ -74,22 +74,22 @@ export class BacklogComponent { /** * Getter that returns an array with all userstories that are in the currently selected sprint. - * The relation to the sprint is determined by the userstory's sprintid. + * The relation to the sprint is determined by the userstory's sprintId. * If no sprint is selected it just returns an empty array. */ public get choosen(): ScrumUserstory[] { if (this.selectedSprint === undefined) { return null; } - return this.storys.filter((u) => u.sprintid == this.selectedSprint.id); + return this.storys.filter((u) => u.sprintId == this.selectedSprint.id); } /** * Getter that returns an array with all userstories that aren't in any sprint. - * The relation to no sprint is determined by the userstory's sprintid being undefined. + * The relation to no sprint is determined by the userstory's sprintId being undefined. */ public get backlog(): ScrumUserstory[] { - return this.storys.filter((u) => u.sprintid === undefined); + return this.storys.filter((u) => u.sprintId === undefined); } /** @@ -108,11 +108,11 @@ export class BacklogComponent { //#region backlogFunctions /** - * Adds a userstory to the currently selected sprint by changing it's sprintid to the current sprint's id + * Adds a userstory to the currently selected sprint by changing it's sprintId to the current sprint's id * @param userstory userstory object that shall be added to the selected sprint's backlog */ public addToSprintBacklog(userstory: ScrumUserstory) { - userstory.sprintid = this.selectedSprint.id; + userstory.sprintId = this.selectedSprint.id; this.backendService.putUserstory(userstory).subscribe((response) => { if (response.status > 399) { alert('Fehler'); @@ -121,11 +121,11 @@ export class BacklogComponent { } /** - * Deletes a userstory from the currently selected sprint by changing it's sprintid to undefined + * Deletes a userstory from the currently selected sprint by changing it's sprintId to undefined * @param userstory userstory object that shall be removed from the selected sprint's backlog */ public deleteFromSprintBacklog(userstory: ScrumUserstory) { - userstory.sprintid = undefined; + userstory.sprintId = undefined; this.backendService.putUserstory(userstory).subscribe((response) => { if (response.status > 399) { alert('Fehler'); diff --git a/src/app/components/dashboard/dashboard.component.ts b/src/app/components/dashboard/dashboard.component.ts index e6710ce..be46283 100644 --- a/src/app/components/dashboard/dashboard.component.ts +++ b/src/app/components/dashboard/dashboard.component.ts @@ -15,7 +15,7 @@ export class DashboardComponent { public get usedStatus(): ScrumStatus[] { return this.status.filter( (s) => - this.selectedSprintUserstories.find((us) => us.statusid === s.id) !== + this.selectedSprintUserstories.find((us) => us.statusId === s.id) !== undefined ); } @@ -28,7 +28,7 @@ export class DashboardComponent { return this.userstories; } return this.userstories.filter( - (us) => us.sprintid === this.selectedSprint.id + (us) => us.sprintId === this.selectedSprint.id ); } @@ -181,7 +181,7 @@ export class DashboardComponent { */ public getNumberOfUserstoriesByStatus(status: ScrumStatus): number { return this.selectedSprintUserstories.filter( - (us) => us.statusid === status.id + (us) => us.statusId === status.id ).length; } diff --git a/src/app/components/sprint-form/sprint-form.component.ts b/src/app/components/sprint-form/sprint-form.component.ts index 06e2b3f..9a1028c 100644 --- a/src/app/components/sprint-form/sprint-form.component.ts +++ b/src/app/components/sprint-form/sprint-form.component.ts @@ -13,7 +13,7 @@ import { BackendService, ScrumSprint } from '../../services/backend.service'; export class SprintFormComponent implements OnInit { @Input() public sprint: ScrumSprint; public editing: Boolean; - public sprintid: string; + public sprintId: string; constructor( private backendService: BackendService, diff --git a/src/app/components/tabels/task/task-table.component.html b/src/app/components/tabels/task/task-table.component.html index ebe6f20..978b207 100644 --- a/src/app/components/tabels/task/task-table.component.html +++ b/src/app/components/tabels/task/task-table.component.html @@ -66,13 +66,13 @@ Status - - - @@ -127,13 +127,13 @@ Category - - - @@ -150,24 +150,24 @@ {{ task.id }} {{ task.title }} - - US #{{ task.userstoryid }} + + US #{{ task.userstoryId }} - - {{ getStatusTitleById(task.statusid) }} + + {{ getStatusTitleById(task.statusId) }} {{ task.priority }} - - {{ getUserNameById(task.assignedtoid) }} + + {{ getUserNameById(task.assignedtoId) }} - - {{ getCategoryTitleById(task.categoryid) }} + + {{ getCategoryTitleById(task.categoryId) }} diff --git a/src/app/components/tabels/task/task-table.component.ts b/src/app/components/tabels/task/task-table.component.ts index 8a25550..09e18c0 100644 --- a/src/app/components/tabels/task/task-table.component.ts +++ b/src/app/components/tabels/task/task-table.component.ts @@ -76,7 +76,7 @@ export class TaskTableComponent extends TableComponentBase { return this.items.filter( (task) => (this.filterUserstoryId === null || - task.userstoryid === this.filterUserstoryId) && + task.userstoryId === this.filterUserstoryId) && (this.filterPriority === null || task.priority === this.filterPriority) ); } @@ -148,31 +148,31 @@ export class TaskTableComponent extends TableComponentBase { } /** - * Sorts the tabel's items by userstoryid. + * Sorts the tabel's items by userstoryId. */ sortByTasks() { - this.doNumericSort('userstory', (task) => task.userstoryid); + this.doNumericSort('userstory', (task) => task.userstoryId); } /** - * Sorts the tabel's items by statusid + * Sorts the tabel's items by statusId */ sortByStatus() { - this.doNumericSort('statusid', (task) => task.statusid); + this.doNumericSort('statusId', (task) => task.statusId); } /** * Sorts the tabel's items by assignedtoid */ sortByAssigned() { - this.doNumericSort('assignedtoid', (task) => task.assignedtoid); + this.doNumericSort('assignedtoid', (task) => task.assignedtoId); } /** - * Sorts the tabel's items by categoryid + * Sorts the tabel's items by categoryId */ sortByCategory() { - this.doNumericSort('categoryid', (task) => task.categoryid); + this.doNumericSort('categoryId', (task) => task.categoryId); } //#endregion sorters diff --git a/src/app/components/tabels/userstory-inner-table/userstory-inner-table.component.html b/src/app/components/tabels/userstory-inner-table/userstory-inner-table.component.html index ea775a7..b876b5e 100644 --- a/src/app/components/tabels/userstory-inner-table/userstory-inner-table.component.html +++ b/src/app/components/tabels/userstory-inner-table/userstory-inner-table.component.html @@ -48,13 +48,13 @@ Status - - - @@ -94,13 +94,13 @@ Category - - - @@ -122,14 +122,14 @@ - - {{ getStatusTitleById(userstory.statusid) }} + + {{ getStatusTitleById(userstory.statusId) }} {{ userstory.priority }} - - {{ getCategoryTitleById(userstory.categoryid) }} + + {{ getCategoryTitleById(userstory.categoryId) }} diff --git a/src/app/components/tabels/userstory-inner-table/userstory-inner-table.component.ts b/src/app/components/tabels/userstory-inner-table/userstory-inner-table.component.ts index 1f2643f..ecd92cf 100644 --- a/src/app/components/tabels/userstory-inner-table/userstory-inner-table.component.ts +++ b/src/app/components/tabels/userstory-inner-table/userstory-inner-table.component.ts @@ -17,9 +17,7 @@ import { ActivatedRoute, ParamMap, Router } from '@angular/router'; templateUrl: './userstory-inner-table.component.html', styleUrls: ['./userstory-inner-table.component.css'], }) -export class UserstoryInnerTableComponent extends TableComponentBase< - ScrumUserstory -> { +export class UserstoryInnerTableComponent extends TableComponentBase { public tasks: ScrumTask[] = []; public filterPriority: string | null = null; public status: ScrumStatus[] = []; @@ -40,14 +38,14 @@ export class UserstoryInnerTableComponent extends TableComponentBase< protected route: ActivatedRoute ) { super(route); - - backendService.getUserstories().subscribe((response) => { - if (response.status > 399) { - alert('Fehler'); - } else { - this.items.push(...response.body); - } - }); + + backendService.getUserstories().subscribe((response) => { + if (response.status > 399) { + alert('Fehler'); + } else { + this.items.push(...response.body); + } + }); backendService.getTasks().subscribe((response) => { if (response.status > 399) { alert('Fehler'); @@ -86,11 +84,11 @@ export class UserstoryInnerTableComponent extends TableComponentBase< /** * Returns the number of related tasks of a given userstory. - * The relation is defined by the userstoryid property of the task object and the id property of the userstory object. + * The relation is defined by the userstoryId property of the task object and the id property of the userstory object. * @param userstory The userstory for which the number of related tasks gets calculated */ public getNumberOfTasks(userstory: ScrumUserstory) { - return this.tasks.filter((t) => t.userstoryid === userstory.id).length; + return this.tasks.filter((t) => t.userstoryId === userstory.id).length; } /** @@ -116,6 +114,7 @@ export class UserstoryInnerTableComponent extends TableComponentBase< } return category.title; } + //#endregion getters //#region userstoryTableFunctions @@ -134,6 +133,7 @@ export class UserstoryInnerTableComponent extends TableComponentBase< this.items.splice(index, 1); } } + //#endregion userstoryTableFunctions //#region sorters @@ -152,18 +152,19 @@ export class UserstoryInnerTableComponent extends TableComponentBase< } /** - * Sorts the tabel's items by statusid + * Sorts the tabel's items by statusId */ public sortByStatus() { - this.doNumericSort('statusid', (us) => us.statusid); + this.doNumericSort('statusId', (us) => us.statusId); } /** - * Sorts the tabel's items by categoryid + * Sorts the tabel's items by categoryId */ public sortByCategory() { - this.doNumericSort('categoryid', (us) => us.categoryid); + this.doNumericSort('categoryId', (us) => us.categoryId); } + //#endregion sorters //#region modals @@ -184,5 +185,6 @@ export class UserstoryInnerTableComponent extends TableComponentBase< } modalRef.componentInstance.userstory = editUserstory; } + //#endregion modals } diff --git a/src/app/components/task-form/task-form.component.html b/src/app/components/task-form/task-form.component.html index fcb670b..8fcb870 100644 --- a/src/app/components/task-form/task-form.component.html +++ b/src/app/components/task-form/task-form.component.html @@ -19,7 +19,7 @@ aria-expanded="false" > Gehört zu Story: - {{ getUserstoryTitleById(task.userstoryid) || "Keine" }} + {{ getUserstoryTitleById(task.userstoryId) || "Keine" }}
{{ userstory.title }}
@@ -104,7 +104,7 @@ aria-haspopup="true" aria-expanded="false" > - Status: {{ getStatusTitleById(task.statusid) }} + Status: {{ getStatusTitleById(task.statusId) }}
{{ status.title }} @@ -145,7 +145,7 @@ ngbDropdownItem class="dropdown-item" type="button" - (click)="deleteStatus(task.statusid)" + (click)="deleteStatus(task.statusId)" > Status löschen @@ -157,7 +157,7 @@ id="status" required name="status" - [(ngModel)]="task.statusid" + [(ngModel)]="task.statusId" >