mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
[PUI] Tweaks (#6750)
* Remove extraneous header * Update checkbox column in PartParameterTemplateTable * Render boolean values for checkbox parameter columns * Fix for table column names query - Ensure it always fires
This commit is contained in:
parent
6a7ea919e1
commit
303cbb6864
@ -132,7 +132,6 @@ export default function SystemSettings() {
|
||||
<GlobalSettingList
|
||||
keys={['CURRENCY_UPDATE_PLUGIN', 'CURRENCY_UPDATE_INTERVAL']}
|
||||
/>
|
||||
<StylishText size="xl">{t`Exchange Rates`}</StylishText>
|
||||
</>
|
||||
)
|
||||
},
|
||||
|
@ -133,9 +133,10 @@ export function InvenTreeTable<T = any>({
|
||||
|
||||
// Request OPTIONS data from the API, before we load the table
|
||||
const tableOptionQuery = useQuery({
|
||||
enabled: false,
|
||||
enabled: true,
|
||||
queryKey: ['options', url, tableState.tableKey],
|
||||
retry: 3,
|
||||
refetchOnMount: true,
|
||||
queryFn: async () => {
|
||||
return api
|
||||
.options(url, {
|
||||
|
@ -4,6 +4,7 @@ import { useMemo } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
import { api } from '../../App';
|
||||
import { YesNoButton } from '../../components/items/YesNoButton';
|
||||
import { ApiEndpoints } from '../../enums/ApiEndpoints';
|
||||
import { ModelType } from '../../enums/ModelType';
|
||||
import { getDetailUrl } from '../../functions/urls';
|
||||
@ -73,9 +74,15 @@ export default function ParametricPartTable({
|
||||
extra.push(`${parameter.data_numeric} [${template.units}]`);
|
||||
}
|
||||
|
||||
let value: any = parameter.data;
|
||||
|
||||
if (template?.checkbox) {
|
||||
value = <YesNoButton value={parameter.data} />;
|
||||
}
|
||||
|
||||
return (
|
||||
<TableHoverCard
|
||||
value={parameter.data}
|
||||
value={value}
|
||||
extra={extra}
|
||||
title={t`Internal Units`}
|
||||
/>
|
||||
|
@ -14,7 +14,7 @@ import { useTable } from '../../hooks/UseTable';
|
||||
import { apiUrl } from '../../states/ApiState';
|
||||
import { useUserState } from '../../states/UserState';
|
||||
import { TableColumn } from '../Column';
|
||||
import { DescriptionColumn } from '../ColumnRenderers';
|
||||
import { BooleanColumn, DescriptionColumn } from '../ColumnRenderers';
|
||||
import { TableFilter } from '../Filter';
|
||||
import { InvenTreeTable } from '../InvenTreeTable';
|
||||
import { RowDeleteAction, RowEditAction } from '../RowActions';
|
||||
@ -61,9 +61,9 @@ export default function PartParameterTemplateTable() {
|
||||
sortable: true
|
||||
},
|
||||
DescriptionColumn({}),
|
||||
{
|
||||
BooleanColumn({
|
||||
accessor: 'checkbox'
|
||||
},
|
||||
}),
|
||||
{
|
||||
accessor: 'choices'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user