mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 03:56:43 +00:00
Hide "Expiry Date" column if feature not enabled (#8172)
This commit is contained in:
parent
752b33177b
commit
1522d1e615
@ -25,6 +25,7 @@ import { notYetImplemented } from '../../functions/notifications';
|
|||||||
import { useCreateApiFormModal } from '../../hooks/UseForm';
|
import { useCreateApiFormModal } from '../../hooks/UseForm';
|
||||||
import { useTable } from '../../hooks/UseTable';
|
import { useTable } from '../../hooks/UseTable';
|
||||||
import { apiUrl } from '../../states/ApiState';
|
import { apiUrl } from '../../states/ApiState';
|
||||||
|
import { useGlobalSettingsState } from '../../states/SettingsState';
|
||||||
import { useUserState } from '../../states/UserState';
|
import { useUserState } from '../../states/UserState';
|
||||||
import { TableColumn } from '../Column';
|
import { TableColumn } from '../Column';
|
||||||
import {
|
import {
|
||||||
@ -234,7 +235,8 @@ function stockItemTableColumns(): TableColumn[] {
|
|||||||
}),
|
}),
|
||||||
DateColumn({
|
DateColumn({
|
||||||
title: t`Expiry Date`,
|
title: t`Expiry Date`,
|
||||||
accessor: 'expiry_date'
|
accessor: 'expiry_date',
|
||||||
|
hidden: !useGlobalSettingsState.getState().isSet('STOCK_ENABLE_EXPIRY')
|
||||||
}),
|
}),
|
||||||
DateColumn({
|
DateColumn({
|
||||||
title: t`Last Updated`,
|
title: t`Last Updated`,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user