2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-05-07 17:58:56 +00:00

Adds placeholder for action to delete part

This commit is contained in:
Oliver 2021-08-10 16:58:59 +10:00
parent fcc5bf8c30
commit 0d11af002b
3 changed files with 28 additions and 1 deletions

@ -1 +1 @@
Subproject commit ad2e43ea5e105b776e9eba81f0295cfda2cb0451
Subproject commit 0e304cc16fad68baa84204fea0b2eaf64f07c817

View File

@ -297,6 +297,20 @@ class _CategoryDisplayState extends RefreshableState<CategoryDisplayWidget> {
}
}
if (tiles.length == 0) {
tiles.add(
ListTile(
title: Text(
L10().actionsNone
),
subtitle: Text(
L10().permissionAccountDenied,
),
leading: FaIcon(FontAwesomeIcons.userTimes),
)
);
}
return tiles;
}

View File

@ -400,6 +400,19 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
},
),
);
if (false && !part.isActive && InvenTreeAPI().checkPermission('part', 'delete')) {
tiles.add(
ListTile(
title: Text(L10().deletePart),
subtitle: Text(L10().deletePartDetail),
leading: FaIcon(FontAwesomeIcons.trashAlt, color: COLOR_DANGER),
onTap: () {
// TODO
},
)
);
}
return tiles;
}