diff --git a/frontend/eslint.config.js b/frontend/eslint.config.js
index 96d94911..2a8f45e1 100644
--- a/frontend/eslint.config.js
+++ b/frontend/eslint.config.js
@@ -14,9 +14,7 @@ export default [
{
rules: {
"react/react-in-jsx-scope": "off",
- "react/no-unescaped-entities": "off",
"react/display-name": "off",
- "@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/no-explicit-any": "off",
}
}
diff --git a/frontend/src/components/Alerts/FailedMissionAlert.tsx b/frontend/src/components/Alerts/FailedMissionAlert.tsx
index c1844b80..549ca50b 100644
--- a/frontend/src/components/Alerts/FailedMissionAlert.tsx
+++ b/frontend/src/components/Alerts/FailedMissionAlert.tsx
@@ -33,8 +33,8 @@ const FailedMission = ({ missions }: MissionsProps) => {
return (
- '{mission.name}' {TranslateText('failed on robot')}{' '}
- '{mission.robot.name}': {mission.statusReason}
+ {`'${mission.name}'`} {TranslateText('failed on robot')}{' '}
+ {`'${mission.robot.name}'`}: {mission.statusReason}
)
}
diff --git a/frontend/src/components/Displays/MissionButtons/MissionRestartButton.tsx b/frontend/src/components/Displays/MissionButtons/MissionRestartButton.tsx
index 68ed0652..9a6c1622 100644
--- a/frontend/src/components/Displays/MissionButtons/MissionRestartButton.tsx
+++ b/frontend/src/components/Displays/MissionButtons/MissionRestartButton.tsx
@@ -66,6 +66,11 @@ export const MissionRestartButton = ({ mission, hasFailedTasks, smallButton }: M
setIsLocationVerificationOpen(false)
}
+ const selectRerunOption = (rerunOption: ReRunOptions) => {
+ setSelectedRerunOption(rerunOption)
+ setIsLocationVerificationOpen(true)
+ }
+
return (
{
- hasFailedTasks ? setIsOpen(!isOpen) : setSelectedRerunOption(ReRunOptions.ReRun)
- !hasFailedTasks && setIsLocationVerificationOpen(true)
+ return hasFailedTasks ? setIsOpen(!isOpen) : selectRerunOption(ReRunOptions.ReRun)
}}
>
@@ -93,8 +97,7 @@ export const MissionRestartButton = ({ mission, hasFailedTasks, smallButton }: M
>
{
- setSelectedRerunOption(ReRunOptions.ReRun)
- setIsLocationVerificationOpen(true)
+ selectRerunOption(ReRunOptions.ReRun)
}}
>
{TranslateText('Rerun full mission')}
@@ -102,8 +105,7 @@ export const MissionRestartButton = ({ mission, hasFailedTasks, smallButton }: M
{hasFailedTasks && (
{
- setSelectedRerunOption(ReRunOptions.ReRunFailed)
- setIsLocationVerificationOpen(true)
+ selectRerunOption(ReRunOptions.ReRunFailed)
}}
>
{TranslateText('Rerun failed and cancelled tasks in the mission')}
diff --git a/frontend/src/components/Pages/AssetSelectionPage/AssetSelectionPage.tsx b/frontend/src/components/Pages/AssetSelectionPage/AssetSelectionPage.tsx
index d50ab2d8..40756725 100644
--- a/frontend/src/components/Pages/AssetSelectionPage/AssetSelectionPage.tsx
+++ b/frontend/src/components/Pages/AssetSelectionPage/AssetSelectionPage.tsx
@@ -140,14 +140,10 @@ const InstallationPicker = () => {
placeholder={TranslateText('Select installation')}
onOptionsChange={({ selectedItems }) => {
const selectedName = selectedItems[0]
- validateInstallation(selectedName)
- ? setSelectedInstallation(selectedName)
- : setSelectedInstallation('')
+ setSelectedInstallation(validateInstallation(selectedName) ? selectedName : '')
}}
onInput={(e: React.ChangeEvent) => {
- validateInstallation(e.target.value)
- ? setSelectedInstallation(e.target.value)
- : setSelectedInstallation('')
+ setSelectedInstallation(validateInstallation(e.target.value) ? e.target.value : '')
}}
autoWidth={true}
onFocus={(e) => {