mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Small style fixes (#7117)
* small style fixes * fix typescript:S1854 * remove unused function handleCellClick * disable cov
This commit is contained in:
parent
b711291beb
commit
d728b11655
@ -1090,19 +1090,21 @@ if SITE_URL and SITE_URL not in CSRF_TRUSTED_ORIGINS:
|
|||||||
if DEBUG:
|
if DEBUG:
|
||||||
for origin in [
|
for origin in [
|
||||||
'http://localhost',
|
'http://localhost',
|
||||||
'http://*.localhost' 'http://*localhost:8000',
|
'http://*.localhost',
|
||||||
|
'http://*localhost:8000',
|
||||||
'http://*localhost:5173',
|
'http://*localhost:5173',
|
||||||
]:
|
]:
|
||||||
if origin not in CSRF_TRUSTED_ORIGINS:
|
if origin not in CSRF_TRUSTED_ORIGINS:
|
||||||
CSRF_TRUSTED_ORIGINS.append(origin)
|
CSRF_TRUSTED_ORIGINS.append(origin)
|
||||||
|
|
||||||
if not TESTING and len(CSRF_TRUSTED_ORIGINS) == 0:
|
if (
|
||||||
if isInMainThread():
|
not TESTING and len(CSRF_TRUSTED_ORIGINS) == 0 and isInMainThread()
|
||||||
# Server thread cannot run without CSRF_TRUSTED_ORIGINS
|
): # pragma: no cover
|
||||||
logger.error(
|
# Server thread cannot run without CSRF_TRUSTED_ORIGINS
|
||||||
'No CSRF_TRUSTED_ORIGINS specified. Please provide a list of trusted origins, or specify INVENTREE_SITE_URL'
|
logger.error(
|
||||||
)
|
'No CSRF_TRUSTED_ORIGINS specified. Please provide a list of trusted origins, or specify INVENTREE_SITE_URL'
|
||||||
sys.exit(-1)
|
)
|
||||||
|
sys.exit(-1)
|
||||||
|
|
||||||
# Additional CSRF settings
|
# Additional CSRF settings
|
||||||
CSRF_HEADER_NAME = 'HTTP_X_CSRFTOKEN'
|
CSRF_HEADER_NAME = 'HTTP_X_CSRFTOKEN'
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
import { Trans, t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
ActionIcon,
|
ActionIcon,
|
||||||
Anchor,
|
Anchor,
|
||||||
Badge,
|
Badge,
|
||||||
CopyButton,
|
CopyButton,
|
||||||
Group,
|
|
||||||
Paper,
|
Paper,
|
||||||
Skeleton,
|
Skeleton,
|
||||||
Stack,
|
Stack,
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
import { Paper, SimpleGrid } from '@mantine/core';
|
import { Paper, SimpleGrid } from '@mantine/core';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import { DetailImageButtonProps } from './DetailsImage';
|
|
||||||
|
|
||||||
export function ItemDetailsGrid(props: React.PropsWithChildren<{}>) {
|
export function ItemDetailsGrid(props: React.PropsWithChildren<{}>) {
|
||||||
return (
|
return (
|
||||||
<Paper p="xs">
|
<Paper p="xs">
|
||||||
|
@ -14,7 +14,6 @@ import {
|
|||||||
IconAlertTriangle,
|
IconAlertTriangle,
|
||||||
IconDeviceFloppy,
|
IconDeviceFloppy,
|
||||||
IconExclamationCircle,
|
IconExclamationCircle,
|
||||||
IconProps,
|
|
||||||
IconRefresh
|
IconRefresh
|
||||||
} from '@tabler/icons-react';
|
} from '@tabler/icons-react';
|
||||||
import Split from '@uiw/react-split';
|
import Split from '@uiw/react-split';
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
Alert,
|
Alert,
|
||||||
|
Button,
|
||||||
DefaultMantineColor,
|
DefaultMantineColor,
|
||||||
|
Divider,
|
||||||
|
Group,
|
||||||
LoadingOverlay,
|
LoadingOverlay,
|
||||||
Paper,
|
Paper,
|
||||||
|
Stack,
|
||||||
Text
|
Text
|
||||||
} from '@mantine/core';
|
} from '@mantine/core';
|
||||||
import { Button, Divider, Group, Stack } from '@mantine/core';
|
|
||||||
import { useId } from '@mantine/hooks';
|
import { useId } from '@mantine/hooks';
|
||||||
import { notifications } from '@mantine/notifications';
|
import { notifications } from '@mantine/notifications';
|
||||||
import { useQuery } from '@tanstack/react-query';
|
import { useQuery } from '@tanstack/react-query';
|
||||||
import { useCallback, useEffect, useMemo, useRef } from 'react';
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
||||||
import { useState } from 'react';
|
|
||||||
import {
|
import {
|
||||||
FieldValues,
|
FieldValues,
|
||||||
FormProvider,
|
FormProvider,
|
||||||
|
@ -30,7 +30,6 @@ export default function DateField({
|
|||||||
// Convert the returned date object to a string
|
// Convert the returned date object to a string
|
||||||
if (value) {
|
if (value) {
|
||||||
value = value.toString();
|
value = value.toString();
|
||||||
let date = new Date(value);
|
|
||||||
value = dayjs(value).format(valueFormat);
|
value = dayjs(value).format(valueFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ export function RelatedModelField({
|
|||||||
|
|
||||||
// Search input query
|
// Search input query
|
||||||
const [value, setValue] = useState<string>('');
|
const [value, setValue] = useState<string>('');
|
||||||
const [searchText, cancelSearchText] = useDebouncedValue(value, 250);
|
const [searchText] = useDebouncedValue(value, 250);
|
||||||
|
|
||||||
const [filters, setFilters] = useState<any>({});
|
const [filters, setFilters] = useState<any>({});
|
||||||
|
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import { Anchor, Group, Text } from '@mantine/core';
|
import { Anchor, Group } from '@mantine/core';
|
||||||
import { IconLink, IconPhoto } from '@tabler/icons-react';
|
|
||||||
import {
|
import {
|
||||||
IconFile,
|
IconFile,
|
||||||
IconFileTypeCsv,
|
IconFileTypeCsv,
|
||||||
IconFileTypeDoc,
|
IconFileTypeDoc,
|
||||||
IconFileTypePdf,
|
IconFileTypePdf,
|
||||||
IconFileTypeXls,
|
IconFileTypeXls,
|
||||||
IconFileTypeZip
|
IconFileTypeZip,
|
||||||
|
IconLink,
|
||||||
|
IconPhoto
|
||||||
} from '@tabler/icons-react';
|
} from '@tabler/icons-react';
|
||||||
import { ReactNode, useMemo } from 'react';
|
import { ReactNode, useMemo } from 'react';
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import { useDisclosure } from '@mantine/hooks';
|
|||||||
import { IconBell, IconSearch } from '@tabler/icons-react';
|
import { IconBell, IconSearch } from '@tabler/icons-react';
|
||||||
import { useQuery } from '@tanstack/react-query';
|
import { useQuery } from '@tanstack/react-query';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { useMatch, useNavigate, useParams } from 'react-router-dom';
|
import { useMatch, useNavigate } from 'react-router-dom';
|
||||||
|
|
||||||
import { api } from '../../App';
|
import { api } from '../../App';
|
||||||
import { navTabs as mainNavTabs } from '../../defaults/links';
|
import { navTabs as mainNavTabs } from '../../defaults/links';
|
||||||
|
@ -8,7 +8,7 @@ import {
|
|||||||
IconPackage,
|
IconPackage,
|
||||||
IconPhone
|
IconPhone
|
||||||
} from '@tabler/icons-react';
|
} from '@tabler/icons-react';
|
||||||
import { useEffect, useMemo, useState } from 'react';
|
import { useMemo } from 'react';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ApiFormAdjustFilterType,
|
ApiFormAdjustFilterType,
|
||||||
|
@ -19,8 +19,7 @@ import { InvenTreeIcon } from '../functions/icons';
|
|||||||
import {
|
import {
|
||||||
ApiFormModalProps,
|
ApiFormModalProps,
|
||||||
useCreateApiFormModal,
|
useCreateApiFormModal,
|
||||||
useDeleteApiFormModal,
|
useDeleteApiFormModal
|
||||||
useEditApiFormModal
|
|
||||||
} from '../hooks/UseForm';
|
} from '../hooks/UseForm';
|
||||||
import { apiUrl } from '../states/ApiState';
|
import { apiUrl } from '../states/ApiState';
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
|
Icon,
|
||||||
Icon123,
|
Icon123,
|
||||||
|
IconArrowBigDownLineFilled,
|
||||||
IconArrowMerge,
|
IconArrowMerge,
|
||||||
IconBinaryTree2,
|
IconBinaryTree2,
|
||||||
IconBookmarks,
|
IconBookmarks,
|
||||||
@ -10,7 +12,7 @@ import {
|
|||||||
IconBusinessplan,
|
IconBusinessplan,
|
||||||
IconCalendar,
|
IconCalendar,
|
||||||
IconCalendarStats,
|
IconCalendarStats,
|
||||||
IconCategory,
|
IconCalendarTime,
|
||||||
IconCheck,
|
IconCheck,
|
||||||
IconCircleCheck,
|
IconCircleCheck,
|
||||||
IconCircleMinus,
|
IconCircleMinus,
|
||||||
@ -23,13 +25,14 @@ import {
|
|||||||
IconCornerUpRightDouble,
|
IconCornerUpRightDouble,
|
||||||
IconCurrencyDollar,
|
IconCurrencyDollar,
|
||||||
IconDots,
|
IconDots,
|
||||||
IconDotsCircleHorizontal,
|
|
||||||
IconExternalLink,
|
IconExternalLink,
|
||||||
IconFileUpload,
|
IconFileUpload,
|
||||||
|
IconFlag,
|
||||||
IconFlagShare,
|
IconFlagShare,
|
||||||
IconGitBranch,
|
IconGitBranch,
|
||||||
IconGridDots,
|
IconGridDots,
|
||||||
IconHash,
|
IconHash,
|
||||||
|
IconInfoCircle,
|
||||||
IconLayersLinked,
|
IconLayersLinked,
|
||||||
IconLink,
|
IconLink,
|
||||||
IconList,
|
IconList,
|
||||||
@ -48,12 +51,15 @@ import {
|
|||||||
IconPhoto,
|
IconPhoto,
|
||||||
IconPrinter,
|
IconPrinter,
|
||||||
IconProgressCheck,
|
IconProgressCheck,
|
||||||
|
IconProps,
|
||||||
IconQrcode,
|
IconQrcode,
|
||||||
IconQuestionMark,
|
IconQuestionMark,
|
||||||
IconRulerMeasure,
|
IconRulerMeasure,
|
||||||
IconShoppingCart,
|
IconShoppingCart,
|
||||||
IconShoppingCartHeart,
|
IconShoppingCartHeart,
|
||||||
|
IconShoppingCartPlus,
|
||||||
IconSitemap,
|
IconSitemap,
|
||||||
|
IconSquareXFilled,
|
||||||
IconStack2,
|
IconStack2,
|
||||||
IconStatusChange,
|
IconStatusChange,
|
||||||
IconTag,
|
IconTag,
|
||||||
@ -65,6 +71,7 @@ import {
|
|||||||
IconTrash,
|
IconTrash,
|
||||||
IconTruck,
|
IconTruck,
|
||||||
IconTruckDelivery,
|
IconTruckDelivery,
|
||||||
|
IconTruckReturn,
|
||||||
IconUnlink,
|
IconUnlink,
|
||||||
IconUser,
|
IconUser,
|
||||||
IconUserStar,
|
IconUserStar,
|
||||||
@ -74,14 +81,6 @@ import {
|
|||||||
IconWorldCode,
|
IconWorldCode,
|
||||||
IconX
|
IconX
|
||||||
} from '@tabler/icons-react';
|
} from '@tabler/icons-react';
|
||||||
import { IconFlag } from '@tabler/icons-react';
|
|
||||||
import { IconSquareXFilled } from '@tabler/icons-react';
|
|
||||||
import { IconShoppingCartPlus } from '@tabler/icons-react';
|
|
||||||
import { IconArrowBigDownLineFilled } from '@tabler/icons-react';
|
|
||||||
import { IconTruckReturn } from '@tabler/icons-react';
|
|
||||||
import { IconInfoCircle } from '@tabler/icons-react';
|
|
||||||
import { IconCalendarTime } from '@tabler/icons-react';
|
|
||||||
import { Icon, IconProps } from '@tabler/icons-react';
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
const icons = {
|
const icons = {
|
||||||
|
@ -399,7 +399,6 @@ function HistoryTable({
|
|||||||
);
|
);
|
||||||
|
|
||||||
const rows = data.map((item) => {
|
const rows = data.map((item) => {
|
||||||
const selected = selection.includes(item.id);
|
|
||||||
return (
|
return (
|
||||||
<tr key={item.id}>
|
<tr key={item.id}>
|
||||||
<td>
|
<td>
|
||||||
|
@ -19,7 +19,6 @@ import {
|
|||||||
} from '@tabler/icons-react';
|
} from '@tabler/icons-react';
|
||||||
import { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
|
|
||||||
import { StylishText } from '../../../components/items/StylishText';
|
|
||||||
import { PanelGroup, PanelType } from '../../../components/nav/PanelGroup';
|
import { PanelGroup, PanelType } from '../../../components/nav/PanelGroup';
|
||||||
import { SettingsHeader } from '../../../components/nav/SettingsHeader';
|
import { SettingsHeader } from '../../../components/nav/SettingsHeader';
|
||||||
import { GlobalSettingList } from '../../../components/settings/SettingList';
|
import { GlobalSettingList } from '../../../components/settings/SettingList';
|
||||||
|
@ -25,7 +25,6 @@ import { ApiEndpoints } from '../../enums/ApiEndpoints';
|
|||||||
import { ModelType } from '../../enums/ModelType';
|
import { ModelType } from '../../enums/ModelType';
|
||||||
import { UserRoles } from '../../enums/Roles';
|
import { UserRoles } from '../../enums/Roles';
|
||||||
import { useManufacturerPartFields } from '../../forms/CompanyForms';
|
import { useManufacturerPartFields } from '../../forms/CompanyForms';
|
||||||
import { getDetailUrl } from '../../functions/urls';
|
|
||||||
import {
|
import {
|
||||||
useCreateApiFormModal,
|
useCreateApiFormModal,
|
||||||
useEditApiFormModal
|
useEditApiFormModal
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import { Grid, Group, LoadingOverlay, Skeleton, Stack } from '@mantine/core';
|
import { Grid, LoadingOverlay, Skeleton, Stack } from '@mantine/core';
|
||||||
import {
|
import {
|
||||||
IconDots,
|
IconDots,
|
||||||
IconInfoCircle,
|
IconInfoCircle,
|
||||||
@ -32,7 +32,6 @@ import { ApiEndpoints } from '../../enums/ApiEndpoints';
|
|||||||
import { ModelType } from '../../enums/ModelType';
|
import { ModelType } from '../../enums/ModelType';
|
||||||
import { UserRoles } from '../../enums/Roles';
|
import { UserRoles } from '../../enums/Roles';
|
||||||
import { usePurchaseOrderFields } from '../../forms/PurchaseOrderForms';
|
import { usePurchaseOrderFields } from '../../forms/PurchaseOrderForms';
|
||||||
import { getDetailUrl } from '../../functions/urls';
|
|
||||||
import {
|
import {
|
||||||
useCreateApiFormModal,
|
useCreateApiFormModal,
|
||||||
useEditApiFormModal
|
useEditApiFormModal
|
||||||
@ -51,7 +50,6 @@ export default function PurchaseOrderDetail() {
|
|||||||
const { id } = useParams();
|
const { id } = useParams();
|
||||||
|
|
||||||
const user = useUserState();
|
const user = useUserState();
|
||||||
const navigate = useNavigate();
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
instance: order,
|
instance: order,
|
||||||
|
@ -16,7 +16,6 @@ import { ItemDetailsGrid } from '../../components/details/ItemDetails';
|
|||||||
import {
|
import {
|
||||||
ActionDropdown,
|
ActionDropdown,
|
||||||
CancelItemAction,
|
CancelItemAction,
|
||||||
DeleteItemAction,
|
|
||||||
DuplicateItemAction,
|
DuplicateItemAction,
|
||||||
EditItemAction
|
EditItemAction
|
||||||
} from '../../components/items/ActionDropdown';
|
} from '../../components/items/ActionDropdown';
|
||||||
@ -44,7 +43,6 @@ export default function ReturnOrderDetail() {
|
|||||||
const { id } = useParams();
|
const { id } = useParams();
|
||||||
|
|
||||||
const user = useUserState();
|
const user = useUserState();
|
||||||
const navigate = useNavigate();
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
instance: order,
|
instance: order,
|
||||||
|
@ -19,7 +19,6 @@ import { ItemDetailsGrid } from '../../components/details/ItemDetails';
|
|||||||
import {
|
import {
|
||||||
ActionDropdown,
|
ActionDropdown,
|
||||||
CancelItemAction,
|
CancelItemAction,
|
||||||
DeleteItemAction,
|
|
||||||
DuplicateItemAction,
|
DuplicateItemAction,
|
||||||
EditItemAction
|
EditItemAction
|
||||||
} from '../../components/items/ActionDropdown';
|
} from '../../components/items/ActionDropdown';
|
||||||
@ -31,7 +30,6 @@ import { ApiEndpoints } from '../../enums/ApiEndpoints';
|
|||||||
import { ModelType } from '../../enums/ModelType';
|
import { ModelType } from '../../enums/ModelType';
|
||||||
import { UserRoles } from '../../enums/Roles';
|
import { UserRoles } from '../../enums/Roles';
|
||||||
import { useSalesOrderFields } from '../../forms/SalesOrderForms';
|
import { useSalesOrderFields } from '../../forms/SalesOrderForms';
|
||||||
import { getDetailUrl } from '../../functions/urls';
|
|
||||||
import {
|
import {
|
||||||
useCreateApiFormModal,
|
useCreateApiFormModal,
|
||||||
useEditApiFormModal
|
useEditApiFormModal
|
||||||
@ -49,7 +47,6 @@ export default function SalesOrderDetail() {
|
|||||||
const { id } = useParams();
|
const { id } = useParams();
|
||||||
|
|
||||||
const user = useUserState();
|
const user = useUserState();
|
||||||
const navigate = useNavigate();
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
instance: order,
|
instance: order,
|
||||||
|
@ -15,7 +15,6 @@ import { ItemDetailsGrid } from '../../components/details/ItemDetails';
|
|||||||
import {
|
import {
|
||||||
ActionDropdown,
|
ActionDropdown,
|
||||||
BarcodeActionDropdown,
|
BarcodeActionDropdown,
|
||||||
DeleteItemAction,
|
|
||||||
EditItemAction,
|
EditItemAction,
|
||||||
LinkBarcodeAction,
|
LinkBarcodeAction,
|
||||||
UnlinkBarcodeAction,
|
UnlinkBarcodeAction,
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import { Group, Text } from '@mantine/core';
|
import { Group, Text } from '@mantine/core';
|
||||||
import {
|
import { IconCircleCheck, IconCircleX } from '@tabler/icons-react';
|
||||||
IconCircleCheck,
|
|
||||||
IconCircleX,
|
|
||||||
IconExclamationCircle
|
|
||||||
} from '@tabler/icons-react';
|
|
||||||
import { useQuery } from '@tanstack/react-query';
|
import { useQuery } from '@tanstack/react-query';
|
||||||
import { useCallback, useMemo } from 'react';
|
import { useCallback, useMemo } from 'react';
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import { Group, Text } from '@mantine/core';
|
import { Group, Text } from '@mantine/core';
|
||||||
import { access } from 'fs';
|
|
||||||
import { useCallback, useMemo, useState } from 'react';
|
import { useCallback, useMemo, useState } from 'react';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import { ActionIcon, Group, Text, Tooltip } from '@mantine/core';
|
import { ActionIcon, Group, Tooltip } from '@mantine/core';
|
||||||
import { useHover } from '@mantine/hooks';
|
import { useHover } from '@mantine/hooks';
|
||||||
import { IconEdit } from '@tabler/icons-react';
|
import { IconEdit } from '@tabler/icons-react';
|
||||||
import { useQuery } from '@tanstack/react-query';
|
import { useQuery } from '@tanstack/react-query';
|
||||||
@ -246,35 +246,6 @@ export default function ParametricPartTable({
|
|||||||
return [...partColumns, ...parameterColumns];
|
return [...partColumns, ...parameterColumns];
|
||||||
}, [parameterColumns]);
|
}, [parameterColumns]);
|
||||||
|
|
||||||
// Callback when a parameter cell is clicked - either edit or add a new parameter
|
|
||||||
const handleCellClick = useCallback(
|
|
||||||
(record: any, column: any) => {
|
|
||||||
let template_id = column?.extra?.template;
|
|
||||||
|
|
||||||
if (!template_id) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
setSelectedPart(record.pk);
|
|
||||||
setSelectedTemplate(template_id);
|
|
||||||
|
|
||||||
// Find the associated parameter
|
|
||||||
let parameter = record?.parameters?.find(
|
|
||||||
(p: any) => p.template == template_id
|
|
||||||
);
|
|
||||||
|
|
||||||
if (parameter) {
|
|
||||||
// Parameter exists - open edit dialog
|
|
||||||
setSelectedParameter(parameter.pk);
|
|
||||||
editParameter.open();
|
|
||||||
} else {
|
|
||||||
// Parameter does not exist - create it!
|
|
||||||
addParameter.open();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
[user]
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{addParameter.modal}
|
{addParameter.modal}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import { Group, Text } from '@mantine/core';
|
import { Group, Text } from '@mantine/core';
|
||||||
import { useCallback, useMemo, useState } from 'react';
|
import { useCallback, useMemo, useState } from 'react';
|
||||||
import { set } from 'react-hook-form';
|
|
||||||
|
|
||||||
import { AddItemButton } from '../../components/buttons/AddItemButton';
|
import { AddItemButton } from '../../components/buttons/AddItemButton';
|
||||||
import { ApiFormFieldSet } from '../../components/forms/fields/ApiFormField';
|
import { ApiFormFieldSet } from '../../components/forms/fields/ApiFormField';
|
||||||
|
@ -10,7 +10,6 @@ import { ModelType } from '../../enums/ModelType';
|
|||||||
import { UserRoles } from '../../enums/Roles';
|
import { UserRoles } from '../../enums/Roles';
|
||||||
import { usePartFields } from '../../forms/PartForms';
|
import { usePartFields } from '../../forms/PartForms';
|
||||||
import { shortenString } from '../../functions/tables';
|
import { shortenString } from '../../functions/tables';
|
||||||
import { getDetailUrl } from '../../functions/urls';
|
|
||||||
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';
|
||||||
@ -269,7 +268,6 @@ export function PartListTable({ props }: { props: InvenTreeTableProps }) {
|
|||||||
|
|
||||||
const table = useTable('part-list');
|
const table = useTable('part-list');
|
||||||
const user = useUserState();
|
const user = useUserState();
|
||||||
const navigate = useNavigate();
|
|
||||||
|
|
||||||
const newPart = useCreateApiFormModal({
|
const newPart = useCreateApiFormModal({
|
||||||
url: ApiEndpoints.part_list,
|
url: ApiEndpoints.part_list,
|
||||||
|
@ -8,7 +8,6 @@ import { ApiEndpoints } from '../../enums/ApiEndpoints';
|
|||||||
import { ModelType } from '../../enums/ModelType';
|
import { ModelType } from '../../enums/ModelType';
|
||||||
import { UserRoles } from '../../enums/Roles';
|
import { UserRoles } from '../../enums/Roles';
|
||||||
import { useSupplierPartFields } from '../../forms/CompanyForms';
|
import { useSupplierPartFields } from '../../forms/CompanyForms';
|
||||||
import { openDeleteApiForm, openEditApiForm } from '../../functions/forms';
|
|
||||||
import {
|
import {
|
||||||
useCreateApiFormModal,
|
useCreateApiFormModal,
|
||||||
useDeleteApiFormModal,
|
useDeleteApiFormModal,
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { test } from '../baseFixtures.js';
|
import { test } from '../baseFixtures.js';
|
||||||
import { baseUrl } from '../defaults.js';
|
|
||||||
import { doQuickLogin } from '../login.js';
|
import { doQuickLogin } from '../login.js';
|
||||||
|
|
||||||
const newPartName = 'UITESTIN123';
|
const newPartName = 'UITESTIN123';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { expect, test } from './baseFixtures.js';
|
import { expect, test } from './baseFixtures.js';
|
||||||
import { baseUrl, loginUrl, logoutUrl, user } from './defaults.js';
|
import { baseUrl, user } from './defaults.js';
|
||||||
import { doLogin, doQuickLogin } from './login.js';
|
import { doLogin, doQuickLogin } from './login.js';
|
||||||
|
|
||||||
test('PUI - Basic Login Test', async ({ page }) => {
|
test('PUI - Basic Login Test', async ({ page }) => {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { expect, test } from './baseFixtures.js';
|
import { test } from './baseFixtures.js';
|
||||||
import { baseUrl } from './defaults.js';
|
import { baseUrl } from './defaults.js';
|
||||||
import { doQuickLogin } from './login.js';
|
import { doQuickLogin } from './login.js';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { expect, test } from './baseFixtures.js';
|
import { test } from './baseFixtures.js';
|
||||||
import { baseUrl, user } from './defaults.js';
|
import { baseUrl } from './defaults.js';
|
||||||
import { doQuickLogin } from './login.js';
|
import { doQuickLogin } from './login.js';
|
||||||
|
|
||||||
test('PUI - Stock', async ({ page }) => {
|
test('PUI - Stock', async ({ page }) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user