diff --git a/backend/.idea/workspace.xml b/backend/.idea/workspace.xml
index 0a3a9ee..9e500e1 100644
--- a/backend/.idea/workspace.xml
+++ b/backend/.idea/workspace.xml
@@ -4,11 +4,14 @@
-
-
-
-
+
+
+
+
+
+
+
@@ -19,6 +22,7 @@
- {
- "keyToString": {
- "RequestMappingsPanelOrder0": "0",
- "RequestMappingsPanelOrder1": "1",
- "RequestMappingsPanelWidth0": "75",
- "RequestMappingsPanelWidth1": "75",
- "RunOnceActivity.OpenProjectViewOnStart": "true",
- "RunOnceActivity.ShowReadmeOnStart": "true",
- "WebServerToolWindowFactoryState": "false",
- "git-widget-placeholder": "issue-11-angular-update",
- "last_directory_selection": "D:/Programmierprojekte/TimeManager/backend/src/main/java/core/api/models/timemanager",
- "last_opened_file_path": "D:/Programmierprojekte/Dicewars/client",
- "node.js.detected.package.eslint": "true",
- "node.js.detected.package.tslint": "true",
- "node.js.selected.package.eslint": "(autodetect)",
- "node.js.selected.package.tslint": "(autodetect)",
- "settings.editor.selected.configurable": "preferences.lookFeel",
- "vue.rearranger.settings.migration": "true"
+
+}]]>
@@ -94,7 +98,8 @@
-
+
+
@@ -136,7 +141,15 @@
1697962125518
-
+
+
+ 1697976314517
+
+
+
+ 1697976314517
+
+
@@ -149,7 +162,8 @@
-
+
+
@@ -162,4 +176,8 @@
+
+
+
+
\ No newline at end of file
diff --git a/backend/src/main/java/core/api/controller/ScheduleController.java b/backend/src/main/java/core/api/controller/ScheduleController.java
index 2c2e03b..29de764 100644
--- a/backend/src/main/java/core/api/controller/ScheduleController.java
+++ b/backend/src/main/java/core/api/controller/ScheduleController.java
@@ -1,22 +1,70 @@
package core.api.controller;
+import core.api.models.auth.SimpleStatusResponse;
+import core.api.models.timemanager.taskSchedule.BasicTaskScheduleEntityInfo;
+import core.api.models.timemanager.taskSchedule.BasicTaskScheduleFieldInfo;
+import core.entities.timemanager.BasicTaskSchedule;
import core.entities.timemanager.ScheduleType;
+import core.entities.timemanager.Task;
+import core.services.*;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
+import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.*;
+import javax.validation.Valid;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.List;
+
@CrossOrigin(origins = "*", maxAge = 3600)
@RestController
@RequestMapping("/api")
public class ScheduleController {
+ private final TaskService taskService;
+ private final TaskScheduleService taskScheduleService;
+
+ public ScheduleController(@Autowired TaskService taskService, @Autowired TaskScheduleService taskScheduleService) {
+ this.taskService = taskService;
+ this.taskScheduleService = taskScheduleService;
+ }
+
@GetMapping("/schedules/{taskID}/{scheduleType}")
public ResponseEntity> loadSchedulesOfTask(@PathVariable long taskID, @PathVariable ScheduleType scheduleType) {
+ PermissionResult taskPermissionResult = taskService.getTaskPermissions(taskID, SecurityContextHolder.getContext().getAuthentication().getName());
+ if(!taskPermissionResult.isHasPermissions()) {
+ return ResponseEntity.status(403).body(new SimpleStatusResponse("failed"));
+ }
+
+ if(taskPermissionResult.getExitCode() == ServiceExitCode.MISSING_ENTITY) {
+ return ResponseEntity.status(404).body(new SimpleStatusResponse("failed"));
+ }
+
+ switch (scheduleType) {
+ case BASIC -> {
+ List basicTaskScheduleList = new ArrayList<>(taskPermissionResult.getResult().getBasicTaskSchedules());
+ basicTaskScheduleList.sort(Comparator.comparing(BasicTaskSchedule::getScheduleDate));
+ return ResponseEntity.ok(basicTaskScheduleList.stream().map(BasicTaskScheduleEntityInfo::new));
+ }
+ case ADVANCED, MODERATE -> ResponseEntity.ok(new ArrayList<>());
+ }
return null;
}
- @PutMapping("/schedules/{taskID}")
- public ResponseEntity> scheduleTask(@PathVariable long taskID) {
- return null;
+ @PutMapping("/schedules/{taskID}/basic")
+ public ResponseEntity> basicScheduleTask(@PathVariable long taskID, @Valid @RequestBody BasicTaskScheduleFieldInfo basicTaskSchedule) {
+ PermissionResult taskPermissionResult = taskService.getTaskPermissions(taskID, SecurityContextHolder.getContext().getAuthentication().getName());
+ if(!taskPermissionResult.isHasPermissions()) {
+ return ResponseEntity.status(403).body(new SimpleStatusResponse("failed"));
+ }
+
+ if(taskPermissionResult.getExitCode() == ServiceExitCode.MISSING_ENTITY) {
+ return ResponseEntity.status(404).body(new SimpleStatusResponse("failed"));
+ }
+
+ ServiceResult creationResult = taskScheduleService.createBasicTaskSchedule(taskPermissionResult.getResult(), basicTaskSchedule);
+ return ResponseEntity.ok(new BasicTaskScheduleEntityInfo(creationResult.getResult()));
}
@PostMapping("/schedules/{scheduleID}/{scheduleType}")
@@ -24,7 +72,7 @@ public class ScheduleController {
return null;
}
- @PostMapping("/schedules/{scheduleID}/{scheduleType}")
+ @DeleteMapping("/schedules/{scheduleID}/{scheduleType}")
public ResponseEntity> deleteScheduledTask(@PathVariable long scheduleID, @PathVariable ScheduleType scheduleType) {
return null;
}
diff --git a/backend/src/main/java/core/api/controller/TaskController.java b/backend/src/main/java/core/api/controller/TaskController.java
index f80135a..093102b 100644
--- a/backend/src/main/java/core/api/controller/TaskController.java
+++ b/backend/src/main/java/core/api/controller/TaskController.java
@@ -96,4 +96,18 @@ public class TaskController {
taskService.deleteTask(taskPermissionResult.getResult());
return ResponseEntity.ok(new SimpleStatusResponse("success"));
}
+
+ @GetMapping("/tasks/{taskID}")
+ public ResponseEntity> loadTaskDetails(@PathVariable long taskID) {
+ PermissionResult taskPermissionResult = taskService.getTaskPermissions(taskID, SecurityContextHolder.getContext().getAuthentication().getName());
+ if (!taskPermissionResult.isHasPermissions()) {
+ return ResponseEntity.status(403).body(new SimpleStatusResponse("failed"));
+ }
+
+ if (taskPermissionResult.getExitCode() == ServiceExitCode.MISSING_ENTITY) {
+ return ResponseEntity.status(404).body(new SimpleStatusResponse("failed"));
+ }
+
+ return ResponseEntity.ok(new TaskEntityInfo(taskPermissionResult.getResult()));
+ }
}
diff --git a/backend/src/main/java/core/api/models/timemanager/taskSchedule/BasicTaskScheduleEntityInfo.java b/backend/src/main/java/core/api/models/timemanager/taskSchedule/BasicTaskScheduleEntityInfo.java
new file mode 100644
index 0000000..992b8a4
--- /dev/null
+++ b/backend/src/main/java/core/api/models/timemanager/taskSchedule/BasicTaskScheduleEntityInfo.java
@@ -0,0 +1,53 @@
+package core.api.models.timemanager.taskSchedule;
+
+import core.entities.timemanager.BasicTaskSchedule;
+
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+public class BasicTaskScheduleEntityInfo {
+
+ private long scheduleID;
+ private LocalDate scheduleDate;
+ private LocalDateTime startTime;
+ private LocalDateTime finishedTime;
+
+ public BasicTaskScheduleEntityInfo(BasicTaskSchedule basicTaskSchedule) {
+ this.scheduleID = basicTaskSchedule.getScheduleID();
+ this.scheduleDate = basicTaskSchedule.getScheduleDate();
+ this.startTime = basicTaskSchedule.getStartTime();
+ this.finishedTime = basicTaskSchedule.getFinishedTime();
+ }
+
+ public long getScheduleID() {
+ return scheduleID;
+ }
+
+ public void setScheduleID(long scheduleID) {
+ this.scheduleID = scheduleID;
+ }
+
+ public LocalDate getScheduleDate() {
+ return scheduleDate;
+ }
+
+ public void setScheduleDate(LocalDate scheduleDate) {
+ this.scheduleDate = scheduleDate;
+ }
+
+ public LocalDateTime getStartTime() {
+ return startTime;
+ }
+
+ public void setStartTime(LocalDateTime startTime) {
+ this.startTime = startTime;
+ }
+
+ public LocalDateTime getFinishedTime() {
+ return finishedTime;
+ }
+
+ public void setFinishedTime(LocalDateTime finishedTime) {
+ this.finishedTime = finishedTime;
+ }
+}
diff --git a/backend/src/main/java/core/api/models/timemanager/taskSchedule/BasicTaskScheduleFieldInfo.java b/backend/src/main/java/core/api/models/timemanager/taskSchedule/BasicTaskScheduleFieldInfo.java
new file mode 100644
index 0000000..d8b53d5
--- /dev/null
+++ b/backend/src/main/java/core/api/models/timemanager/taskSchedule/BasicTaskScheduleFieldInfo.java
@@ -0,0 +1,17 @@
+package core.api.models.timemanager.taskSchedule;
+
+import javax.validation.constraints.NotNull;
+import java.time.LocalDate;
+
+public class BasicTaskScheduleFieldInfo {
+ @NotNull
+ private LocalDate scheduleDate;
+
+ public LocalDate getScheduleDate() {
+ return scheduleDate;
+ }
+
+ public void setScheduleDate(LocalDate scheduleDate) {
+ this.scheduleDate = scheduleDate;
+ }
+}
diff --git a/backend/src/main/java/core/entities/timemanager/Task.java b/backend/src/main/java/core/entities/timemanager/Task.java
index dc39e91..aa8a9f4 100644
--- a/backend/src/main/java/core/entities/timemanager/Task.java
+++ b/backend/src/main/java/core/entities/timemanager/Task.java
@@ -109,4 +109,16 @@ public class Task {
public int hashCode() {
return Objects.hash(taskID);
}
+
+ public void setTaskID(long taskID) {
+ this.taskID = taskID;
+ }
+
+ public Set getBasicTaskSchedules() {
+ return basicTaskSchedules;
+ }
+
+ public void setBasicTaskSchedules(Set basicTaskSchedules) {
+ this.basicTaskSchedules = basicTaskSchedules;
+ }
}
diff --git a/backend/src/main/java/core/repositories/timemanager/BasicTaskScheduleRepository.java b/backend/src/main/java/core/repositories/timemanager/BasicTaskScheduleRepository.java
new file mode 100644
index 0000000..785f9ca
--- /dev/null
+++ b/backend/src/main/java/core/repositories/timemanager/BasicTaskScheduleRepository.java
@@ -0,0 +1,9 @@
+package core.repositories.timemanager;
+
+import core.entities.timemanager.BasicTaskSchedule;
+import org.springframework.data.repository.CrudRepository;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface BasicTaskScheduleRepository extends CrudRepository {
+}
diff --git a/backend/src/main/java/core/services/TaskScheduleService.java b/backend/src/main/java/core/services/TaskScheduleService.java
new file mode 100644
index 0000000..e3cffee
--- /dev/null
+++ b/backend/src/main/java/core/services/TaskScheduleService.java
@@ -0,0 +1,30 @@
+package core.services;
+
+import core.api.models.timemanager.taskSchedule.BasicTaskScheduleFieldInfo;
+import core.entities.timemanager.BasicTaskSchedule;
+import core.entities.timemanager.Task;
+import core.repositories.timemanager.BasicTaskScheduleRepository;
+import core.repositories.timemanager.TaskRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class TaskScheduleService {
+
+ private final BasicTaskScheduleRepository basicTaskScheduleRepository;
+ private final TaskRepository taskRepository;
+
+ public TaskScheduleService(@Autowired BasicTaskScheduleRepository basicTaskScheduleRepository,
+ @Autowired TaskRepository taskRepository) {
+ this.basicTaskScheduleRepository = basicTaskScheduleRepository;
+ this.taskRepository = taskRepository;
+ }
+
+ public ServiceResult createBasicTaskSchedule(Task task, BasicTaskScheduleFieldInfo basicTaskScheduleFieldInfo) {
+ BasicTaskSchedule basicTaskSchedule = new BasicTaskSchedule(task, basicTaskScheduleFieldInfo.getScheduleDate());
+ task.getBasicTaskSchedules().add(basicTaskSchedule);
+ basicTaskScheduleRepository.save(basicTaskSchedule);
+ taskRepository.save(task);
+ return new ServiceResult<>(basicTaskSchedule);
+ }
+}
diff --git a/frontend/src/api/.openapi-generator/FILES b/frontend/src/api/.openapi-generator/FILES
index 193e82b..e1d1e18 100644
--- a/frontend/src/api/.openapi-generator/FILES
+++ b/frontend/src/api/.openapi-generator/FILES
@@ -5,6 +5,7 @@ api/account.service.ts
api/api.ts
api/login.service.ts
api/properties.service.ts
+api/schedule.service.ts
api/task.service.ts
api/taskgroup.service.ts
api/users.service.ts
@@ -13,6 +14,8 @@ encoder.ts
git_push.sh
index.ts
model/accountDeleteRequest.ts
+model/basicScheduleEntityInfo.ts
+model/basicScheduleFieldInfo.ts
model/eMailChangeRequest.ts
model/inlineResponse200.ts
model/inlineResponse401.ts
diff --git a/frontend/src/api/api.module.ts b/frontend/src/api/api.module.ts
index eb73404..1781bef 100644
--- a/frontend/src/api/api.module.ts
+++ b/frontend/src/api/api.module.ts
@@ -5,6 +5,7 @@ import { HttpClient } from '@angular/common/http';
import { AccountService } from './api/account.service';
import { LoginService } from './api/login.service';
import { PropertiesService } from './api/properties.service';
+import { ScheduleService } from './api/schedule.service';
import { TaskService } from './api/task.service';
import { TaskgroupService } from './api/taskgroup.service';
import { UsersService } from './api/users.service';
diff --git a/frontend/src/api/api/api.ts b/frontend/src/api/api/api.ts
index 5df9774..15a0982 100644
--- a/frontend/src/api/api/api.ts
+++ b/frontend/src/api/api/api.ts
@@ -4,10 +4,12 @@ export * from './login.service';
import { LoginService } from './login.service';
export * from './properties.service';
import { PropertiesService } from './properties.service';
+export * from './schedule.service';
+import { ScheduleService } from './schedule.service';
export * from './task.service';
import { TaskService } from './task.service';
export * from './taskgroup.service';
import { TaskgroupService } from './taskgroup.service';
export * from './users.service';
import { UsersService } from './users.service';
-export const APIS = [AccountService, LoginService, PropertiesService, TaskService, TaskgroupService, UsersService];
+export const APIS = [AccountService, LoginService, PropertiesService, ScheduleService, TaskService, TaskgroupService, UsersService];
diff --git a/frontend/src/api/api/task.service.ts b/frontend/src/api/api/task.service.ts
index 36cdf7e..9a8fb4f 100644
--- a/frontend/src/api/api/task.service.ts
+++ b/frontend/src/api/api/task.service.ts
@@ -92,14 +92,13 @@ export class TaskService {
* edits an existing task
* edits an existing task
* @param taskID internal id of task
- * @param taskFieldInfo
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
- public tasksTaskIDDelete(taskID: number, taskFieldInfo?: TaskFieldInfo, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable;
- public tasksTaskIDDelete(taskID: number, taskFieldInfo?: TaskFieldInfo, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public tasksTaskIDDelete(taskID: number, taskFieldInfo?: TaskFieldInfo, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public tasksTaskIDDelete(taskID: number, taskFieldInfo?: TaskFieldInfo, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable {
+ public tasksTaskIDDelete(taskID: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable;
+ public tasksTaskIDDelete(taskID: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
+ public tasksTaskIDDelete(taskID: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
+ public tasksTaskIDDelete(taskID: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable {
if (taskID === null || taskID === undefined) {
throw new Error('Required parameter taskID was null or undefined when calling tasksTaskIDDelete.');
}
@@ -131,15 +130,6 @@ export class TaskService {
}
- // to determine the Content-Type header
- const consumes: string[] = [
- 'application/json'
- ];
- const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
- if (httpContentTypeSelected !== undefined) {
- localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
- }
-
let responseType_: 'text' | 'json' = 'json';
if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
@@ -157,6 +147,65 @@ export class TaskService {
);
}
+ /**
+ * gets taskdetails
+ * loads information about a given task
+ * @param taskID internal id of task
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
+ * @param reportProgress flag to report request and response progress.
+ */
+ public tasksTaskIDGet(taskID: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable;
+ public tasksTaskIDGet(taskID: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
+ public tasksTaskIDGet(taskID: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
+ public tasksTaskIDGet(taskID: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable {
+ if (taskID === null || taskID === undefined) {
+ throw new Error('Required parameter taskID was null or undefined when calling tasksTaskIDGet.');
+ }
+
+ let localVarHeaders = this.defaultHeaders;
+
+ let localVarCredential: string | undefined;
+ // authentication (API_TOKEN) required
+ localVarCredential = this.configuration.lookupCredential('API_TOKEN');
+ if (localVarCredential) {
+ localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
+ }
+
+ let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
+ if (localVarHttpHeaderAcceptSelected === undefined) {
+ // to determine the Accept header
+ const httpHeaderAccepts: string[] = [
+ 'application/json'
+ ];
+ localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ }
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
+ }
+
+ let localVarHttpContext: HttpContext | undefined = options && options.context;
+ if (localVarHttpContext === undefined) {
+ localVarHttpContext = new HttpContext();
+ }
+
+
+ let responseType_: 'text' | 'json' = 'json';
+ if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
+ responseType_ = 'text';
+ }
+
+ return this.httpClient.get(`${this.configuration.basePath}/tasks/${encodeURIComponent(String(taskID))}`,
+ {
+ context: localVarHttpContext,
+ responseType: responseType_,
+ withCredentials: this.configuration.withCredentials,
+ headers: localVarHeaders,
+ observe: observe,
+ reportProgress: reportProgress
+ }
+ );
+ }
+
/**
* edits an existing task
* edits an existing task
diff --git a/frontend/src/api/model/models.ts b/frontend/src/api/model/models.ts
index 6df1b66..780263c 100644
--- a/frontend/src/api/model/models.ts
+++ b/frontend/src/api/model/models.ts
@@ -1,4 +1,6 @@
export * from './accountDeleteRequest';
+export * from './basicScheduleEntityInfo';
+export * from './basicScheduleFieldInfo';
export * from './eMailChangeRequest';
export * from './inlineResponse200';
export * from './inlineResponse401';
diff --git a/frontend/src/app/app-routing.module.ts b/frontend/src/app/app-routing.module.ts
index 9777643..14d95c1 100644
--- a/frontend/src/app/app-routing.module.ts
+++ b/frontend/src/app/app-routing.module.ts
@@ -5,13 +5,15 @@ import {AdminDashboardComponent} from "./admin-dashboard/admin-dashboard.compone
import {MainComponent} from "./main/main.component";
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";
const routes: Routes = [
{path: '', component: MainComponent},
{path: 'admin', component: AdminDashboardComponent},
{path: 'user/settings', component: UserSettingsComponent},
{path: 'taskgroups', component: TaskgroupDashboardComponent},
- {path: 'taskgroups/:taskgroupID', component: TaskgroupDashboardComponent}
+ {path: 'taskgroups/:taskgroupID', component: TaskgroupDashboardComponent},
+ {path: 'taskgroups/:taskgroupID/tasks/:taskID', component: TaskDetailOverviewComponent}
];
@NgModule({
diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts
index a133b26..a0a7517 100644
--- a/frontend/src/app/app.module.ts
+++ b/frontend/src/app/app.module.ts
@@ -53,6 +53,9 @@ import {MatSortModule} from "@angular/material/sort";
import {MatPaginatorModule} from "@angular/material/paginator";
import { ClearTaskDialogComponent } from './tasks/clear-task-dialog/clear-task-dialog.component';
import { NavigationLinkListComponent } from './navigation-link-list/navigation-link-list.component';
+import { TaskDetailOverviewComponent } from './tasks/task-detail-overview/task-detail-overview.component';
+import {MatProgressBarModule} from "@angular/material/progress-bar";
+import {MatExpansionModule} from "@angular/material/expansion";
@NgModule({
declarations: [
@@ -76,7 +79,8 @@ import { NavigationLinkListComponent } from './navigation-link-list/navigation-l
TaskEditorComponent,
TaskDashboardComponent,
ClearTaskDialogComponent,
- NavigationLinkListComponent
+ NavigationLinkListComponent,
+ TaskDetailOverviewComponent
],
imports: [
BrowserModule,
@@ -107,7 +111,9 @@ import { NavigationLinkListComponent } from './navigation-link-list/navigation-l
FormsModule,
MatSlideToggleModule,
MatSortModule,
- MatPaginatorModule
+ MatPaginatorModule,
+ MatProgressBarModule,
+ MatExpansionModule
],
providers: [
HttpClientModule,
diff --git a/frontend/src/app/tasks/task-dashboard/task-dashboard.component.css b/frontend/src/app/tasks/task-dashboard/task-dashboard.component.css
index 481ebb4..532013d 100644
--- a/frontend/src/app/tasks/task-dashboard/task-dashboard.component.css
+++ b/frontend/src/app/tasks/task-dashboard/task-dashboard.component.css
@@ -35,3 +35,11 @@ td, th {
float: right;
margin-top: 10px;
}
+
+
+.navLink {
+ text-decoration: underline;
+ color: black;
+ margin-right: 5px;
+ margin-left: 3px;
+}
diff --git a/frontend/src/app/tasks/task-dashboard/task-dashboard.component.html b/frontend/src/app/tasks/task-dashboard/task-dashboard.component.html
index e9e1ace..030a157 100644
--- a/frontend/src/app/tasks/task-dashboard/task-dashboard.component.html
+++ b/frontend/src/app/tasks/task-dashboard/task-dashboard.component.html
@@ -10,7 +10,9 @@
Name |
- {{task.taskName}} |
+
+ {{task.taskName}}
+ |
ETA |
diff --git a/openapi.yaml b/openapi.yaml
index fe57c4d..b61ca75 100644
--- a/openapi.yaml
+++ b/openapi.yaml
@@ -1095,11 +1095,6 @@ paths:
schema:
type: number
example: 1
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TaskFieldInfo'
responses:
200:
description: Anfrage erfolgreich
@@ -1122,9 +1117,94 @@ paths:
schema:
type: object
$ref: "#/components/schemas/SimpleStatusResponse"
-
-
+ get:
+ security:
+ - API_TOKEN: []
+ tags:
+ - task
+ summary: gets taskdetails
+ description: loads information about a given task
+ parameters:
+ - name: taskID
+ in: path
+ description: internal id of task
+ required: true
+ schema:
+ type: number
+ example: 1
+ responses:
+ 200:
+ description: Anfrage erfolgreich
+ content:
+ 'application/json':
+ schema:
+ type: object
+ $ref: "#/components/schemas/TaskEntityInfo"
+ 403:
+ description: No permission
+ content:
+ 'application/json':
+ schema:
+ type: object
+ $ref: "#/components/schemas/SimpleStatusResponse"
+ 404:
+ description: Taskgroup does not exist
+ content:
+ 'application/json':
+ schema:
+ type: object
+ $ref: "#/components/schemas/SimpleStatusResponse"
+ /schedules/{taskID}/{scheduleType}:
+ get:
+ security:
+ - API_TOKEN: []
+ tags:
+ - schedule
+ description: gets schedules of task
+ summary: gets schedules of task
+ parameters:
+ - name: taskID
+ in: path
+ description: internal id of task
+ required: true
+ schema:
+ type: number
+ example: 1
+ - name: scheduleType
+ in: path
+ description: internal id of task
+ required: true
+ schema:
+ type: string
+ enum:
+ - BASIC
+ - MODERATE
+ - ADVANCED
+ responses:
+ 200:
+ description: operation successfull
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/BasicScheduleEntityInfo'
+ 403:
+ description: No permission
+ content:
+ 'application/json':
+ schema:
+ type: object
+ $ref: "#/components/schemas/SimpleStatusResponse"
+ 404:
+ description: Taskgroup does not exist
+ content:
+ 'application/json':
+ schema:
+ type: object
+ $ref: "#/components/schemas/SimpleStatusResponse"
+
components:
securitySchemes:
API_TOKEN:
@@ -1437,4 +1517,38 @@ components:
deadline:
type: string
format: date
- description: date until the task has to be finished
\ No newline at end of file
+ description: date until the task has to be finished
+ BasicScheduleEntityInfo:
+ required:
+ - scheduleID
+ - scheduleDate
+ - startTime
+ - finishedTime
+ additionalProperties: false
+ properties:
+ scheduleID:
+ type: number
+ description: internal id of schedule
+ example: 1
+ scheduleDate:
+ type: string
+ format: date
+ description: date on which the task is scheduled
+ startTime:
+ type: string
+ format: date-time
+ description: date on which the task schedule was started
+ finishedTime:
+ type: string
+ format: date-time
+ description: date on which the tasks schedule was finished
+ BasicScheduleFieldInfo:
+ required:
+ - scheduleDate
+ additionalProperties: false
+ properties:
+ scheduleDate:
+ type: string
+ format: date
+ description: date on which the task is scheduled
+
\ No newline at end of file