mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-02 03:30:54 +00:00
[UI] Build test results fix (#9906)
* Fix event handler * Make icon more clickable
This commit is contained in:
@ -7,6 +7,7 @@ import { type ReactNode, useEffect, useMemo, useState } from 'react';
|
||||
import { ApiEndpoints } from '@lib/enums/ApiEndpoints';
|
||||
import { ModelType } from '@lib/enums/ModelType';
|
||||
import { apiUrl } from '@lib/functions/Api';
|
||||
import { cancelEvent } from '@lib/functions/Events';
|
||||
import type { TableFilter } from '@lib/types/Filters';
|
||||
import type { ApiFormFieldSet } from '@lib/types/Forms';
|
||||
import { PassFailButton } from '../../components/buttons/YesNoButton';
|
||||
@ -16,7 +17,6 @@ import { formatDate } from '../../defaults/formatters';
|
||||
import { useTestResultFields } from '../../forms/StockForms';
|
||||
import { useCreateApiFormModal } from '../../hooks/UseForm';
|
||||
import { useTable } from '../../hooks/UseTable';
|
||||
import { useUserState } from '../../states/UserState';
|
||||
import type { TableColumn } from '../Column';
|
||||
import { LocationColumn } from '../ColumnRenderers';
|
||||
import { InvenTreeTable } from '../InvenTreeTable';
|
||||
@ -33,7 +33,6 @@ export default function BuildOrderTestTable({
|
||||
partId: number;
|
||||
}>) {
|
||||
const table = useTable('build-tests');
|
||||
const user = useUserState();
|
||||
const api = useApi();
|
||||
|
||||
// Fetch the test templates required for this build order
|
||||
@ -111,10 +110,11 @@ export default function BuildOrderTestTable({
|
||||
<Badge color='lightblue' variant='filled'>{t`No Result`}</Badge>
|
||||
<Tooltip label={t`Add Test Result`}>
|
||||
<ActionIcon
|
||||
size='xs'
|
||||
size='lg'
|
||||
color='green'
|
||||
variant='transparent'
|
||||
onClick={() => {
|
||||
onClick={(event: any) => {
|
||||
cancelEvent(event);
|
||||
setSelectedOutput(record.pk);
|
||||
setSelectedTemplate(template.pk);
|
||||
createTestResult.open();
|
||||
|
Reference in New Issue
Block a user