From a4854d51df0339f37c5ede3fc910f521248d763d Mon Sep 17 00:00:00 2001 From: Romuald Lemesle Date: Mon, 30 Sep 2024 10:17:00 +0200 Subject: [PATCH] [frontend] Fix --- openbas-front/src/admin/components/common/Context.ts | 2 +- .../components/components/teams/ContextualTeams.tsx | 1 - .../admin/components/components/teams/UpdateTeams.tsx | 4 ++-- .../scenarios/scenario/teams/ScenarioTeams.tsx | 10 ++++++++-- .../simulations/simulation/teams/ExerciseTeams.tsx | 3 +-- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/openbas-front/src/admin/components/common/Context.ts b/openbas-front/src/admin/components/common/Context.ts index 44a0363808..b19976499d 100644 --- a/openbas-front/src/admin/components/common/Context.ts +++ b/openbas-front/src/admin/components/common/Context.ts @@ -33,7 +33,7 @@ import type { import type { UserStore } from '../teams/players/Player'; import type { InjectOutputType, InjectStore } from '../../../actions/injects/Inject'; import { Page } from '../../../components/common/queryable/Page'; -import { TeamStore } from '../../../actions/teams/Team'; +import type { TeamStore } from '../../../actions/teams/Team'; export type PermissionsContextType = { permissions: { readOnly: boolean, canWrite: boolean, isRunning: boolean } diff --git a/openbas-front/src/admin/components/components/teams/ContextualTeams.tsx b/openbas-front/src/admin/components/components/teams/ContextualTeams.tsx index c0874d5c3d..3a9b0cd5be 100644 --- a/openbas-front/src/admin/components/components/teams/ContextualTeams.tsx +++ b/openbas-front/src/admin/components/components/teams/ContextualTeams.tsx @@ -7,7 +7,6 @@ import ItemTags from '../../../../components/ItemTags'; import TeamPopover from './TeamPopover'; import useSearchAnFilter from '../../../../utils/SortingFiltering'; import type { TeamStore } from '../../../../actions/teams/Team'; -import type { Team } from '../../../../utils/api-types'; import TeamPlayers from './TeamPlayers'; import { PermissionsContext, TeamContext } from '../../common/Context'; diff --git a/openbas-front/src/admin/components/components/teams/UpdateTeams.tsx b/openbas-front/src/admin/components/components/teams/UpdateTeams.tsx index 5819d69dfe..b2c7ebd305 100644 --- a/openbas-front/src/admin/components/components/teams/UpdateTeams.tsx +++ b/openbas-front/src/admin/components/components/teams/UpdateTeams.tsx @@ -109,7 +109,7 @@ const UpdateTeams: React.FC = ({ entityPrefix="team" availableFilterNames={availableFilterNames} queryableHelpers={queryableHelpers} - />; + />; return ( <> @@ -150,7 +150,7 @@ const UpdateTeams: React.FC = ({ buttonComponent={ setSelectedTeamValues([...selectedTeamValues, team])} - />} + />} /> diff --git a/openbas-front/src/admin/components/scenarios/scenario/teams/ScenarioTeams.tsx b/openbas-front/src/admin/components/scenarios/scenario/teams/ScenarioTeams.tsx index 02c5fd90ba..085d25fff3 100644 --- a/openbas-front/src/admin/components/scenarios/scenario/teams/ScenarioTeams.tsx +++ b/openbas-front/src/admin/components/scenarios/scenario/teams/ScenarioTeams.tsx @@ -4,7 +4,13 @@ import { Paper, Typography } from '@mui/material'; import { useHelper } from '../../../../../store'; import useDataLoader from '../../../../../utils/hooks/useDataLoader'; import { useAppDispatch } from '../../../../../utils/hooks'; -import { addScenarioTeamPlayers, disableScenarioTeamPlayers, enableScenarioTeamPlayers, fetchScenarioTeams, removeScenarioTeamPlayers, } from '../../../../../actions/scenarios/scenario-actions'; +import { + addScenarioTeamPlayers, + disableScenarioTeamPlayers, + enableScenarioTeamPlayers, + fetchScenarioTeams, + removeScenarioTeamPlayers, +} from '../../../../../actions/scenarios/scenario-actions'; import type { ScenariosHelper } from '../../../../../actions/scenarios/scenario-helper'; import type { ScenarioStore } from '../../../../../actions/scenarios/Scenario'; import type { TeamStore } from '../../../../../actions/teams/Team'; @@ -94,7 +100,7 @@ const ScenarioTeams: React.FC = ({ scenarioTeamsUsers }) => { && team.team_id)} setTeams={(ts: TeamStore[]) => setTeams(ts)} - /> + /> }
diff --git a/openbas-front/src/admin/components/simulations/simulation/teams/ExerciseTeams.tsx b/openbas-front/src/admin/components/simulations/simulation/teams/ExerciseTeams.tsx index eb050ce0a6..243879a1cc 100644 --- a/openbas-front/src/admin/components/simulations/simulation/teams/ExerciseTeams.tsx +++ b/openbas-front/src/admin/components/simulations/simulation/teams/ExerciseTeams.tsx @@ -1,7 +1,6 @@ import { useParams } from 'react-router-dom'; import React, { useContext, useEffect, useState } from 'react'; import { Paper, Typography } from '@mui/material'; -import { makeStyles } from '@mui/styles'; import { useHelper } from '../../../../../store'; import useDataLoader from '../../../../../utils/hooks/useDataLoader'; import { useAppDispatch } from '../../../../../utils/hooks'; @@ -95,7 +94,7 @@ const ExerciseTeams: React.FC = ({ exerciseTeamsUsers }) => { && team.team_id)} setTeams={(ts: TeamStore[]) => setTeams(ts)} - /> + /> }