From eb6cfefe3c03b94c52a2cbf70eae494fe00614b5 Mon Sep 17 00:00:00 2001 From: oysand Date: Tue, 18 Oct 2022 09:12:40 +0200 Subject: [PATCH] Fix mission name --- backend/api/Controllers/MissionController.cs | 1 + backend/api/Database/Models/Mission.cs | 2 ++ frontend/src/components/MissionOverview/OngoingMissionCard.tsx | 3 +-- .../src/components/MissionOverview/UpcomingMissionCard.tsx | 2 +- frontend/src/models/Mission.ts | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/backend/api/Controllers/MissionController.cs b/backend/api/Controllers/MissionController.cs index d06589f17..5f8cf57ea 100644 --- a/backend/api/Controllers/MissionController.cs +++ b/backend/api/Controllers/MissionController.cs @@ -118,6 +118,7 @@ [FromBody] ScheduledMissionQuery scheduledMissionQuery var scheduledMission = new Mission { + Name = echoMission.Name, Robot = robot, EchoMissionId = scheduledMissionQuery.EchoMissionId, MissionStatus = MissionStatus.Pending, diff --git a/backend/api/Database/Models/Mission.cs b/backend/api/Database/Models/Mission.cs index b95794ea4..895ef4955 100644 --- a/backend/api/Database/Models/Mission.cs +++ b/backend/api/Database/Models/Mission.cs @@ -11,6 +11,8 @@ public class Mission [Required] public string Id { get; set; } + public string Name { get; set; } + public string AssetCode { get; set; } [Required] diff --git a/frontend/src/components/MissionOverview/OngoingMissionCard.tsx b/frontend/src/components/MissionOverview/OngoingMissionCard.tsx index 0ab8af493..8a12bc4b5 100644 --- a/frontend/src/components/MissionOverview/OngoingMissionCard.tsx +++ b/frontend/src/components/MissionOverview/OngoingMissionCard.tsx @@ -28,8 +28,7 @@ export function OngoingMissionCard({ mission }: MissionProps) { } return ( - INSPECTION - {mission.name} + {mission.name} diff --git a/frontend/src/components/MissionOverview/UpcomingMissionCard.tsx b/frontend/src/components/MissionOverview/UpcomingMissionCard.tsx index f474f1fe4..ea5b4dd3e 100644 --- a/frontend/src/components/MissionOverview/UpcomingMissionCard.tsx +++ b/frontend/src/components/MissionOverview/UpcomingMissionCard.tsx @@ -43,7 +43,7 @@ export function UpcomingMissionCard({ mission }: MissionProps) { > - Mission name + {mission.name} Tasks: {numberOfTasks} diff --git a/frontend/src/models/Mission.ts b/frontend/src/models/Mission.ts index 0af0cc20d..67ba9e7ea 100644 --- a/frontend/src/models/Mission.ts +++ b/frontend/src/models/Mission.ts @@ -14,7 +14,7 @@ export enum MissionStatus { export interface Mission { id: string - name?: string + name: string assetCode?: string robot: Robot isarMissionId?: string