2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-28 11:36:44 +00:00

[UI] Edit fix (#9367)

* Fix for editing stock location

* Fix for editing part category
This commit is contained in:
Oliver 2025-03-24 19:24:23 +11:00 committed by GitHub
parent fc5b8479cb
commit 8997f193c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -342,7 +342,9 @@ export default function CategoryDetail() {
}}
actions={categoryActions}
editAction={editCategory.open}
editEnabled={user.hasChangePermission(ModelType.partcategory)}
editEnabled={
!!category?.pk && user.hasChangePermission(ModelType.partcategory)
}
/>
<PanelGroup
pageKey='partcategory'

View File

@ -382,7 +382,10 @@ export default function Stock() {
icon={location?.icon && <ApiIcon name={location?.icon} />}
actions={locationActions}
editAction={editLocation.open}
editEnabled={user.hasChangePermission(ModelType.stocklocation)}
editEnabled={
!!location?.pk &&
user.hasChangePermission(ModelType.stocklocation)
}
breadcrumbs={breadcrumbs}
lastCrumb={[
{