issue-25 #27
@ -4,10 +4,9 @@
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="3a869f59-290a-4ab2-b036-a878ce801bc4" name="Changes" comment="Fix starting schedule and returning active time of schedule after stop">
|
||||
<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/entities/timemanager/BasicTaskSchedule.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/core/entities/timemanager/BasicTaskSchedule.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../frontend/src/app/dashboard/active-schedule/active-schedule.component.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../frontend/src/app/dashboard/active-schedule/active-schedule.component.ts" afterDir="false" />
|
||||
<list default="true" id="3a869f59-290a-4ab2-b036-a878ce801bc4" name="Changes" comment="Remove update spamming in console">
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/core/api/controller/ScheduleController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/core/api/controller/ScheduleController.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" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@ -101,7 +100,7 @@
|
||||
<workItem from="1698127431684" duration="2039000" />
|
||||
<workItem from="1698164397550" duration="2329000" />
|
||||
<workItem from="1698246651541" duration="5106000" />
|
||||
<workItem from="1698298897364" duration="3234000" />
|
||||
<workItem from="1698298897364" duration="3634000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="Structure Taskgroups in Hierarchies">
|
||||
<option name="closed" value="true" />
|
||||
@ -199,7 +198,15 @@
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1698306442833</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="13" />
|
||||
<task id="LOCAL-00013" summary="Remove update spamming in console">
|
||||
<option name="closed" value="true" />
|
||||
<created>1698306889808</created>
|
||||
<option name="number" value="00013" />
|
||||
<option name="presentableId" value="LOCAL-00013" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1698306889808</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="14" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
@ -220,7 +227,8 @@
|
||||
<MESSAGE value="Stop and Finish TaskSchedules" />
|
||||
<MESSAGE value="Include TaskScheduleStopResponse" />
|
||||
<MESSAGE value="Fix starting schedule and returning active time of schedule after stop" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="Fix starting schedule and returning active time of schedule after stop" />
|
||||
<MESSAGE value="Remove update spamming in console" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="Remove update spamming in console" />
|
||||
</component>
|
||||
<component name="XDebuggerManager">
|
||||
<breakpoint-manager>
|
||||
|
@ -180,7 +180,7 @@ public class ScheduleController {
|
||||
return ResponseEntity.status(404).body(new SimpleStatusResponse("failed"));
|
||||
}
|
||||
|
||||
ServiceResult<Integer> stopResult = taskScheduleService.stopSchedule(schedulePermissionResult.getResult());
|
||||
ServiceResult<Integer> stopResult = taskScheduleService.stopSchedule(schedulePermissionResult.getResult(), finish);
|
||||
if(stopResult.getExitCode() == ServiceExitCode.INVALID_OPERATION) {
|
||||
return ResponseEntity.status(400).body(new SimpleStatusResponse("failed"));
|
||||
} else {
|
||||
|
@ -115,7 +115,7 @@ public class TaskScheduleService {
|
||||
}
|
||||
}
|
||||
|
||||
public ServiceResult<Integer> stopSchedule(BasicTaskSchedule taskSchedule) {
|
||||
public ServiceResult<Integer> stopSchedule(BasicTaskSchedule taskSchedule, boolean finish) {
|
||||
if(taskSchedule.getStartTime() == null || taskSchedule.getFinishedTime() != null) {
|
||||
return new ServiceResult<>(ServiceExitCode.INVALID_OPERATION);
|
||||
}
|
||||
@ -125,6 +125,9 @@ public class TaskScheduleService {
|
||||
long workTime = (taskSchedule.getTask().getWorkTime() + activeTime);
|
||||
int workTime_i = (int) (workTime);
|
||||
taskSchedule.getTask().setWorkTime(workTime_i);
|
||||
if(finish) {
|
||||
taskSchedule.getTask().setFinished(true);
|
||||
}
|
||||
basicTaskScheduleRepository.save(taskSchedule);
|
||||
taskRepository.save(taskSchedule.getTask());
|
||||
return new ServiceResult<>((int) activeTime);
|
||||
|
@ -29,7 +29,7 @@
|
||||
<ng-container matColumnDef="finished">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Finished </th>
|
||||
<td mat-cell *matCellDef="let task">
|
||||
<mat-checkbox [value]="task.finished" [contentEditable]="false" disableRipple="true" (click)="$event.preventDefault()"></mat-checkbox>
|
||||
<mat-checkbox [checked]="task.finished" [contentEditable]="false" disableRipple="true" (click)="$event.preventDefault()"></mat-checkbox>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="status">
|
||||
|
@ -22,6 +22,8 @@ export class TaskDashboardComponent implements OnChanges{
|
||||
this.datasource = new MatTableDataSource<TaskEntityInfo>(resp);
|
||||
this.datasource.paginator = this.paginator!;
|
||||
this.datasource.sort = this.sort!;
|
||||
|
||||
resp.forEach(task => console.log(task))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user