CEC-3360 Magna should not see archive control (#302)

* CEC-3360 Magna should  not see archive control

* fixes
This commit is contained in:
John Wu
2023-03-24 16:00:05 -07:00
committed by GitHub
parent 897d1e9869
commit 234252a100
3 changed files with 16 additions and 517 deletions

View File

@@ -31,6 +31,7 @@ import {
import { useStatusContext } from "../../Contexts/StatusContext";
import { useUserContext } from "../../Contexts/UserContext";
import ECUList from "../../Controls/ECUList";
import { RoleWrap } from "../../Controls/RoleWrap";
import SearchField from "../../Controls/SearchField";
import DeleteConfirmation from "../../DeleteConfirmation";
import TableHeaderSortable from "../../Table/HeaderSortable";
@@ -136,7 +137,7 @@ const MainForm = () => {
order: `${orderBy} ${order}`,
manifest_type: TYPE_MANIFEST_SOFTWARE,
search,
active: active,
active,
},
token
);
@@ -246,15 +247,21 @@ const MainForm = () => {
<Grid item md={4} className={classes.textJustifyAlign}></Grid>
<Grid item md={4} className={classes.textCenterAlign}>
<SearchField classes={classes} onSearch={handleSearch} />
<ToggleButtonGroup
value={active}
exclusive
aria-label="Active"
onChange={handleActiveChange}
<RoleWrap
groups={groups}
providers={providers}
rolesPerProvider={Permissions.FiskerCreate}
>
<ToggleButton value={true}>Active</ToggleButton>
<ToggleButton value={false}>Archived</ToggleButton>
</ToggleButtonGroup>
<ToggleButtonGroup
value={active}
exclusive
aria-label="Active"
onChange={handleActiveChange}
>
<ToggleButton value={true}>Active</ToggleButton>
<ToggleButton value={false}>Archived</ToggleButton>
</ToggleButtonGroup>
</RoleWrap>
</Grid>
<Grid item md={4} className={classes.textRightAlign}></Grid>
</Grid>