Hide "consume" action when not viewed from build page (#10378) (#10379)

(cherry picked from commit a7b1b9d523)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
github-actions[bot] 2025-09-23 21:08:54 +10:00 committed by GitHub
parent 24b2401f6a
commit da3ebacf6b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -231,7 +231,7 @@ export default function BuildAllocatedStockTable({
icon: <IconCircleDashedCheck />,
title: t`Consume`,
tooltip: t`Consume Stock`,
hidden: !user.hasChangeRole(UserRoles.build),
hidden: !buildId || !user.hasChangeRole(UserRoles.build),
onClick: () => {
setSelectedItems([record]);
consumeStock.open();