CEC-464 can filters forms (#118)
* can filters forms and lists * unit tests * updating warnings and tests * merge develop * fixed snapshots * update jest mocks * updating tests
This commit is contained in:
@@ -147,20 +147,19 @@ const MainForm = () => {
|
||||
});
|
||||
}
|
||||
if (hasRole([Roles.CREATE], groups)) {
|
||||
actions = actions.concat([
|
||||
{
|
||||
tip: `Deploy "${row.name} ${row.version}"`,
|
||||
link: `/package-deploy/${row.id}`,
|
||||
icon: <SendIcon aria-label={`Deploy ${row.name} ${row.version}`} />,
|
||||
},
|
||||
{
|
||||
tip: `Delete "${row.name} ${row.version}"`,
|
||||
id: row.id,
|
||||
icon: <DeleteIcon aria-label={`Delete ${row.name} ${row.version}`} />,
|
||||
},
|
||||
]);
|
||||
actions.push({
|
||||
tip: `Deploy "${row.name} ${row.version}"`,
|
||||
link: `/package-deploy/${row.id}`,
|
||||
icon: <SendIcon aria-label={`Deploy ${row.name} ${row.version}`} />
|
||||
})
|
||||
}
|
||||
if (hasRole([Roles.DELETE], groups)) {
|
||||
actions.push({
|
||||
tip: `Delete "${row.name} ${row.version}"`,
|
||||
id: row.id,
|
||||
icon: <DeleteIcon aria-label={`Delete ${row.name} ${row.version}`} />
|
||||
})
|
||||
}
|
||||
|
||||
if (actions.length === 0) return ["No actions"];
|
||||
|
||||
return actions.map((action) => {
|
||||
|
||||
Reference in New Issue
Block a user