mirror of
https://github.com/inventree/InvenTree.git
synced 2025-11-09 09:35:42 +00:00
Move "view" actions to the end of the list (#10749)
This commit is contained in:
@@ -102,12 +102,6 @@ export function BuildLineSubTable({
|
|||||||
const rowActions = useCallback(
|
const rowActions = useCallback(
|
||||||
(record: any): RowAction[] => {
|
(record: any): RowAction[] => {
|
||||||
return [
|
return [
|
||||||
RowViewAction({
|
|
||||||
title: t`View Stock Item`,
|
|
||||||
modelType: ModelType.stockitem,
|
|
||||||
modelId: record.stock_item,
|
|
||||||
navigate: navigate
|
|
||||||
}),
|
|
||||||
RowEditAction({
|
RowEditAction({
|
||||||
hidden: !onEditAllocation || !user.hasChangeRole(UserRoles.build),
|
hidden: !onEditAllocation || !user.hasChangeRole(UserRoles.build),
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
@@ -119,6 +113,12 @@ export function BuildLineSubTable({
|
|||||||
onClick: () => {
|
onClick: () => {
|
||||||
onDeleteAllocation?.(record.pk);
|
onDeleteAllocation?.(record.pk);
|
||||||
}
|
}
|
||||||
|
}),
|
||||||
|
RowViewAction({
|
||||||
|
title: t`View Stock Item`,
|
||||||
|
modelType: ModelType.stockitem,
|
||||||
|
modelId: record.stock_item,
|
||||||
|
navigate: navigate
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -494,12 +494,6 @@ export default function BuildOutputTable({
|
|||||||
const production = build?.status == buildStatus.PRODUCTION;
|
const production = build?.status == buildStatus.PRODUCTION;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
RowViewAction({
|
|
||||||
title: t`View Build Output`,
|
|
||||||
modelId: record.pk,
|
|
||||||
modelType: ModelType.stockitem,
|
|
||||||
navigate: navigate
|
|
||||||
}),
|
|
||||||
{
|
{
|
||||||
title: t`Allocate`,
|
title: t`Allocate`,
|
||||||
tooltip: t`Allocate stock to build output`,
|
tooltip: t`Allocate stock to build output`,
|
||||||
@@ -575,7 +569,13 @@ export default function BuildOutputTable({
|
|||||||
setSelectedOutputs([record]);
|
setSelectedOutputs([record]);
|
||||||
cancelBuildOutputsForm.open();
|
cancelBuildOutputsForm.open();
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
RowViewAction({
|
||||||
|
title: t`View Build Output`,
|
||||||
|
modelId: record.pk,
|
||||||
|
modelType: ModelType.stockitem,
|
||||||
|
navigate: navigate
|
||||||
|
})
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
[buildStatus, user, partId, hasTrackedItems]
|
[buildStatus, user, partId, hasTrackedItems]
|
||||||
|
|||||||
@@ -355,13 +355,6 @@ export function PurchaseOrderLineItemTable({
|
|||||||
receiveLineItems.open();
|
receiveLineItems.open();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
RowViewAction({
|
|
||||||
hidden: !record.build_order,
|
|
||||||
title: t`View Build Order`,
|
|
||||||
modelType: ModelType.build,
|
|
||||||
modelId: record.build_order,
|
|
||||||
navigate: navigate
|
|
||||||
}),
|
|
||||||
RowEditAction({
|
RowEditAction({
|
||||||
hidden: !canEdit,
|
hidden: !canEdit,
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
@@ -382,6 +375,13 @@ export function PurchaseOrderLineItemTable({
|
|||||||
setSelectedLine(record.pk);
|
setSelectedLine(record.pk);
|
||||||
deleteLine.open();
|
deleteLine.open();
|
||||||
}
|
}
|
||||||
|
}),
|
||||||
|
RowViewAction({
|
||||||
|
hidden: !record.build_order,
|
||||||
|
title: t`View Build Order`,
|
||||||
|
modelType: ModelType.build,
|
||||||
|
modelId: record.build_order,
|
||||||
|
navigate: navigate
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -395,13 +395,6 @@ export default function SalesOrderLineItemTable({
|
|||||||
const virtual = record?.part_detail?.virtual ?? false;
|
const virtual = record?.part_detail?.virtual ?? false;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
RowViewAction({
|
|
||||||
title: t`View Part`,
|
|
||||||
modelType: ModelType.part,
|
|
||||||
modelId: record.part,
|
|
||||||
navigate: navigate,
|
|
||||||
hidden: !user.hasViewRole(UserRoles.part)
|
|
||||||
}),
|
|
||||||
{
|
{
|
||||||
hidden:
|
hidden:
|
||||||
allocated ||
|
allocated ||
|
||||||
@@ -487,6 +480,13 @@ export default function SalesOrderLineItemTable({
|
|||||||
setSelectedLineId(record.pk);
|
setSelectedLineId(record.pk);
|
||||||
deleteLine.open();
|
deleteLine.open();
|
||||||
}
|
}
|
||||||
|
}),
|
||||||
|
RowViewAction({
|
||||||
|
title: t`View Part`,
|
||||||
|
modelType: ModelType.part,
|
||||||
|
modelId: record.part,
|
||||||
|
navigate: navigate,
|
||||||
|
hidden: !user.hasViewRole(UserRoles.part)
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user