Skip to content

Commit

Permalink
[frontend] Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RomuDeuxfois authored and damgouj committed Oct 1, 2024
1 parent f243bc7 commit b19b555
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion openbas-front/src/admin/components/common/Context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const UpdateTeams: React.FC<Props> = ({
entityPrefix="team"
availableFilterNames={availableFilterNames}
queryableHelpers={queryableHelpers}
/>;
/>;

return (
<>
Expand Down Expand Up @@ -150,7 +150,7 @@ const UpdateTeams: React.FC<Props> = ({
buttonComponent={<CreateTeam
inline
onCreate={(team) => setSelectedTeamValues([...selectedTeamValues, team])}
/>}
/>}
/>
</Box>
</DialogContent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -94,7 +100,7 @@ const ScenarioTeams: React.FC<Props> = ({ scenarioTeamsUsers }) => {
&& <UpdateTeams
addedTeamIds={teams.map((team: TeamStore) => team.team_id)}
setTeams={(ts: TeamStore[]) => setTeams(ts)}
/>
/>
}
<div className="clearfix" />
<Paper sx={{ minHeight: '100%', padding: 2 }} variant="outlined">
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -95,7 +94,7 @@ const ExerciseTeams: React.FC<Props> = ({ exerciseTeamsUsers }) => {
&& <UpdateTeams
addedTeamIds={teams.map((team: TeamStore) => team.team_id)}
setTeams={(ts: TeamStore[]) => setTeams(ts)}
/>
/>
}
<div className="clearfix" />
<Paper sx={{ minHeight: '100%', padding: 2 }} variant="outlined">
Expand Down

0 comments on commit b19b555

Please sign in to comment.