Skip to content

Commit

Permalink
Make desiredstartime optional in frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
andchiind committed Feb 20, 2024
1 parent 55a2679 commit 2e27b78
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/api/Controllers/MissionSchedulingController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ [FromBody] ScheduledMissionQuery scheduledMissionQuery
MissionId = scheduledMissionDefinition.Id,
Status = MissionStatus.Pending,
MissionRunPriority = MissionRunPriority.Normal,
DesiredStartTime = scheduledMissionQuery.DesiredStartTime,
DesiredStartTime = scheduledMissionQuery.DesiredStartTime ?? DateTime.UtcNow,
Tasks = missionTasks,
InstallationCode = scheduledMissionQuery.InstallationCode,
Area = area,
Expand Down
2 changes: 1 addition & 1 deletion backend/api/Controllers/Models/ScheduledMissionQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ public struct ScheduledMissionQuery
{
public string RobotId { get; set; }
public int EchoMissionId { get; set; }
public DateTime DesiredStartTime { get; set; }
public DateTime? DesiredStartTime { get; set; }
public string InstallationCode { get; set; }
public string? AreaName { get; set; }
public TimeSpan? InspectionFrequency { get; set; }
Expand Down
1 change: 0 additions & 1 deletion frontend/src/api/ApiCaller.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,6 @@ export class BackendAPICaller {
const body = {
robotId: desiredRobot[0].id,
echoMissionId: echoMissionId,
desiredStartTime: new Date(),
installationCode: installationCode,
areaName: '',
}
Expand Down

0 comments on commit 2e27b78

Please sign in to comment.