2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-17 12:35:46 +00:00

Merge branch 'master' of https://github.com/inventree/InvenTree into matmair/issue6281

This commit is contained in:
Matthias Mair
2025-01-14 19:28:25 +01:00
29 changed files with 267 additions and 214 deletions

View File

@ -130,7 +130,7 @@ jobs:
rm -rf InvenTree/_testfolder rm -rf InvenTree/_testfolder
- name: Set up QEMU - name: Set up QEMU
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # pin@v3.2.0 uses: docker/setup-qemu-action@53851d14592bedcffcf25ea515637cff71ef929a # pin@v3.3.0
- name: Set up Docker Buildx - name: Set up Docker Buildx
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # pin@v3.8.0 uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # pin@v3.8.0

View File

@ -148,7 +148,7 @@ jobs:
- name: Export API Documentation - name: Export API Documentation
run: invoke dev.schema --ignore-warnings --filename src/backend/InvenTree/schema.yml run: invoke dev.schema --ignore-warnings --filename src/backend/InvenTree/schema.yml
- name: Upload schema - name: Upload schema
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # pin@v4.5.0 uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # pin@v4.6.0
with: with:
name: schema.yml name: schema.yml
path: src/backend/InvenTree/schema.yml path: src/backend/InvenTree/schema.yml
@ -219,7 +219,7 @@ jobs:
echo "Version: $version" echo "Version: $version"
mkdir export/${version} mkdir export/${version}
mv schema.yml export/${version}/api.yaml mv schema.yml export/${version}/api.yaml
- uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # pin@v5.0.1 - uses: stefanzweifel/git-auto-commit-action@e348103e9026cc0eee72ae06630dbe30c8bf7a79 # pin@v5.1.0
name: Commit schema changes name: Commit schema changes
with: with:
commit_message: "Update API schema for ${{ env.version }} / ${{ github.sha }}" commit_message: "Update API schema for ${{ env.version }} / ${{ github.sha }}"
@ -550,7 +550,7 @@ jobs:
- name: Run Playwright tests - name: Run Playwright tests
id: tests id: tests
run: cd src/frontend && npx nyc playwright test run: cd src/frontend && npx nyc playwright test
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # pin@v4.5.0 - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # pin@v4.6.0
if: ${{ !cancelled() && steps.tests.outcome == 'failure' }} if: ${{ !cancelled() && steps.tests.outcome == 'failure' }}
with: with:
name: playwright-report name: playwright-report
@ -597,7 +597,7 @@ jobs:
run: | run: |
cd src/backend/InvenTree/web/static cd src/backend/InvenTree/web/static
zip -r frontend-build.zip web/ web/.vite zip -r frontend-build.zip web/ web/.vite
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # pin@v4.5.0 - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # pin@v4.6.0
with: with:
name: frontend-build name: frontend-build
path: src/backend/InvenTree/web/static/web path: src/backend/InvenTree/web/static/web
@ -622,7 +622,7 @@ jobs:
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload SARIF file - name: Upload SARIF file
uses: github/codeql-action/upload-sarif@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # pin@v3 uses: github/codeql-action/upload-sarif@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # pin@v3
with: with:
sarif_file: results.sarif sarif_file: results.sarif
category: zizmor category: zizmor

View File

@ -59,7 +59,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab. # format to the repository Actions tab.
- name: "Upload artifact" - name: "Upload artifact"
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with: with:
name: SARIF file name: SARIF file
path: results.sarif path: results.sarif
@ -67,6 +67,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard. # Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning" - name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0 uses: github/codeql-action/upload-sarif@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
with: with:
sarif_file: results.sarif sarif_file: results.sarif

View File

@ -378,18 +378,22 @@ export function DetailsTableField({
return ( return (
<Table.Tr style={{ verticalAlign: 'top' }}> <Table.Tr style={{ verticalAlign: 'top' }}>
<Table.Td style={{ minWidth: 75, lineBreak: 'auto', flex: 2 }}>
<Group gap='xs' wrap='nowrap'>
<InvenTreeIcon
icon={field.icon ?? (field.name as InvenTreeIconType)}
/>
<Text style={{ paddingLeft: 10 }}>{field.label}</Text>
</Group>
</Table.Td>
<Table.Td <Table.Td
style={{ style={{
width: '50', lineBreak: 'anywhere',
maxWidth: '50' minWidth: 100,
flex: 10,
display: 'inline-block'
}} }}
> >
<InvenTreeIcon icon={field.icon ?? (field.name as InvenTreeIconType)} />
</Table.Td>
<Table.Td style={{ maxWidth: '65%', lineBreak: 'auto' }}>
<Text>{field.label}</Text>
</Table.Td>
<Table.Td style={{ lineBreak: 'anywhere' }}>
<FieldType field_data={field} field_value={fieldValue} /> <FieldType field_data={field} field_value={fieldValue} />
</Table.Td> </Table.Td>
<Table.Td style={{ width: '50' }}> <Table.Td style={{ width: '50' }}>
@ -409,7 +413,11 @@ export function DetailsTable({
title?: string; title?: string;
}>) { }>) {
return ( return (
<Paper p='xs' withBorder radius='xs'> <Paper
p='xs'
withBorder
style={{ overflowX: 'hidden', width: '100%', minWidth: 200 }}
>
<Stack gap='xs'> <Stack gap='xs'>
{title && <StylishText size='lg'>{title}</StylishText>} {title && <StylishText size='lg'>{title}</StylishText>}
<Table striped verticalSpacing={5} horizontalSpacing='sm'> <Table striped verticalSpacing={5} horizontalSpacing='sm'>

View File

@ -2,6 +2,7 @@ import { Trans, t } from '@lingui/macro';
import { import {
AspectRatio, AspectRatio,
Button, Button,
Grid,
Group, Group,
Image, Image,
Overlay, Overlay,
@ -421,7 +422,14 @@ export function DetailsImage(props: Readonly<DetailImageProps>) {
return ( return (
<> <>
{downloadImage.modal} {downloadImage.modal}
<AspectRatio ref={ref} maw={IMAGE_DIMENSION} ratio={1} pos='relative'> <Grid.Col span={{ base: 12, sm: 4 }}>
<AspectRatio
ref={ref}
maw={IMAGE_DIMENSION}
ratio={1}
pos='relative'
visibleFrom='xs'
>
<> <>
<ApiImage <ApiImage
src={img} src={img}
@ -446,6 +454,7 @@ export function DetailsImage(props: Readonly<DetailImageProps>) {
)} )}
</> </>
</AspectRatio> </AspectRatio>
</Grid.Col>
</> </>
); );
} }

View File

@ -1,16 +1,15 @@
import { Paper, SimpleGrid } from '@mantine/core'; import { Paper, SimpleGrid } from '@mantine/core';
import { useElementSize } from '@mantine/hooks';
import type React from 'react'; import type React from 'react';
import { useMemo } from 'react';
export function ItemDetailsGrid(props: React.PropsWithChildren<{}>) { export function ItemDetailsGrid(props: React.PropsWithChildren<{}>) {
const { ref, width } = useElementSize();
const cols = useMemo(() => (width > 700 ? 2 : 1), [width]);
return ( return (
<Paper p='xs'> <Paper p='xs'>
<SimpleGrid cols={cols} spacing='xs' verticalSpacing='xs' ref={ref}> <SimpleGrid
cols={{ base: 1, '900px': 2 }}
type='container'
spacing='xs'
verticalSpacing='xs'
>
{props.children} {props.children}
</SimpleGrid> </SimpleGrid>
</Paper> </Paper>

View File

@ -53,7 +53,12 @@ export function MenuLinks({
<Divider /> <Divider />
<StylishText size='md'>{title}</StylishText> <StylishText size='md'>{title}</StylishText>
<Divider /> <Divider />
<SimpleGrid cols={2} spacing={0} p={3}> <SimpleGrid
cols={{ base: 1, '400px': 2 }}
type='container'
spacing={0}
p={3}
>
{visibleLinks.map((item) => ( {visibleLinks.map((item) => (
<Tooltip <Tooltip
key={`menu-link-tooltip-${item.id}`} key={`menu-link-tooltip-${item.id}`}

View File

@ -1,7 +1,8 @@
import { Group, Paper, Space, Stack, Text } from '@mantine/core'; import { Group, Paper, SimpleGrid, Stack, Text } from '@mantine/core';
import { useHotkeys } from '@mantine/hooks'; import { useHotkeys } from '@mantine/hooks';
import { Fragment, type ReactNode } from 'react'; import { Fragment, type ReactNode, useMemo } from 'react';
import { shortenString } from '../../functions/tables';
import { ApiImage } from '../images/ApiImage'; import { ApiImage } from '../images/ApiImage';
import { StylishText } from '../items/StylishText'; import { StylishText } from '../items/StylishText';
import { type Breadcrumb, BreadcrumbList } from './BreadcrumbList'; import { type Breadcrumb, BreadcrumbList } from './BreadcrumbList';
@ -51,9 +52,41 @@ export function PageDetail({
] ]
]); ]);
const pageTitleString = useMemo(
() =>
shortenString({
str: title,
len: 50
}),
[title]
);
const description = useMemo(
() =>
shortenString({
str: subtitle,
len: 75
}),
[subtitle]
);
const maxCols = useMemo(() => {
let cols = 1;
if (!!detail) {
cols++;
}
if (!!badges) {
cols++;
}
return cols;
}, [detail, badges]);
return ( return (
<> <>
<PageTitle title={title} /> <PageTitle title={pageTitleString} />
<Stack gap='xs'> <Stack gap='xs'>
{breadcrumbs && breadcrumbs.length > 0 && ( {breadcrumbs && breadcrumbs.length > 0 && (
<BreadcrumbList <BreadcrumbList
@ -62,8 +95,19 @@ export function PageDetail({
/> />
)} )}
<Paper p='xs' radius='xs' shadow='xs'> <Paper p='xs' radius='xs' shadow='xs'>
<Stack gap='xs'> <Group
<Group justify='space-between' wrap='nowrap'> justify='space-between'
gap='xs'
wrap='nowrap'
align='flex-start'
>
<SimpleGrid
cols={{
base: 1,
md: Math.min(2, maxCols),
lg: Math.min(3, maxCols)
}}
>
<Group justify='left' wrap='nowrap'> <Group justify='left' wrap='nowrap'>
{imageUrl && ( {imageUrl && (
<ApiImage <ApiImage
@ -72,6 +116,7 @@ export function PageDetail({
miw={42} miw={42}
mah={42} mah={42}
maw={42} maw={42}
visibleFrom='sm'
/> />
)} )}
<Stack gap='xs'> <Stack gap='xs'>
@ -79,30 +124,33 @@ export function PageDetail({
{subtitle && ( {subtitle && (
<Group gap='xs'> <Group gap='xs'>
{icon} {icon}
<Text size='sm' truncate> <Text size='sm'>{description}</Text>
{subtitle}
</Text>
</Group> </Group>
)} )}
</Stack> </Stack>
</Group> </Group>
<Space /> {detail && <div>{detail}</div>}
{detail} {badges && (
<Group justify='right' gap='xs' wrap='nowrap'> <Group
justify='center'
gap='xs'
align='flex-start'
wrap='nowrap'
>
{badges?.map((badge, idx) => ( {badges?.map((badge, idx) => (
<Fragment key={idx}>{badge}</Fragment> <Fragment key={idx}>{badge}</Fragment>
))} ))}
</Group> </Group>
<Space /> )}
</SimpleGrid>
{actions && ( {actions && (
<Group gap={5} justify='right'> <Group gap={5} justify='right' wrap='nowrap' align='flex-start'>
{actions.map((action, idx) => ( {actions.map((action, idx) => (
<Fragment key={idx}>{action}</Fragment> <Fragment key={idx}>{action}</Fragment>
))} ))}
</Group> </Group>
)} )}
</Group> </Group>
</Stack>
</Paper> </Paper>
</Stack> </Stack>
</> </>

View File

@ -10,7 +10,15 @@ export function FactCollection({
minItems?: number; minItems?: number;
}>) { }>) {
return ( return (
<SimpleGrid cols={minItems} spacing='xs'> <SimpleGrid
cols={{
base: 1,
sm: Math.min(2, minItems),
md: Math.min(3, minItems),
lg: minItems
}}
spacing='xs'
>
{items.map((item, index) => ( {items.map((item, index) => (
<FactItem <FactItem
key={`${index}-${item.value}`} key={`${index}-${item.value}`}

View File

@ -9,7 +9,7 @@ export function AccountContent() {
return ( return (
<div> <div>
<SimpleGrid cols={2} spacing='md'> <SimpleGrid cols={{ base: 1, md: 2 }} spacing='md'>
<Container w='100%'> <Container w='100%'>
<AccountDetailPanel /> <AccountDetailPanel />
</Container> </Container>

View File

@ -239,16 +239,14 @@ export default function BuildDetail() {
return ( return (
<ItemDetailsGrid> <ItemDetailsGrid>
<Grid> <Grid grow>
<Grid.Col span={4}>
<DetailsImage <DetailsImage
appRole={UserRoles.part} appRole={UserRoles.part}
apiPath={ApiEndpoints.part_list} apiPath={ApiEndpoints.part_list}
src={build.part_detail?.image ?? build.part_detail?.thumbnail} src={build.part_detail?.image ?? build.part_detail?.thumbnail}
pk={build.part} pk={build.part}
/> />
</Grid.Col> <Grid.Col span={{ base: 12, sm: 8 }}>
<Grid.Col span={8}>
<DetailsTable fields={tl} item={build} /> <DetailsTable fields={tl} item={build} />
</Grid.Col> </Grid.Col>
</Grid> </Grid>

View File

@ -145,8 +145,7 @@ export default function CompanyDetail(props: Readonly<CompanyDetailProps>) {
return ( return (
<ItemDetailsGrid> <ItemDetailsGrid>
<Grid> <Grid grow>
<Grid.Col span={4}>
<DetailsImage <DetailsImage
appRole={UserRoles.purchase_order} appRole={UserRoles.purchase_order}
apiPath={apiUrl(ApiEndpoints.company_list, company.pk)} apiPath={apiUrl(ApiEndpoints.company_list, company.pk)}
@ -159,8 +158,7 @@ export default function CompanyDetail(props: Readonly<CompanyDetailProps>) {
deleteFile: true deleteFile: true
}} }}
/> />
</Grid.Col> <Grid.Col span={{ base: 12, sm: 8 }}>
<Grid.Col span={8}>
<DetailsTable item={company} fields={tl} /> <DetailsTable item={company} fields={tl} />
</Grid.Col> </Grid.Col>
</Grid> </Grid>

View File

@ -133,8 +133,7 @@ export default function ManufacturerPartDetail() {
return ( return (
<ItemDetailsGrid> <ItemDetailsGrid>
<Grid> <Grid grow>
<Grid.Col span={4}>
<DetailsImage <DetailsImage
appRole={UserRoles.part} appRole={UserRoles.part}
src={manufacturerPart?.part_detail?.image} src={manufacturerPart?.part_detail?.image}
@ -144,8 +143,7 @@ export default function ManufacturerPartDetail() {
)} )}
pk={manufacturerPart?.part_detail?.pk} pk={manufacturerPart?.part_detail?.pk}
/> />
</Grid.Col> <Grid.Col span={{ base: 12, sm: 8 }}>
<Grid.Col span={8}>
<DetailsTable title={t`Part Details`} fields={tl} item={data} /> <DetailsTable title={t`Part Details`} fields={tl} item={data} />
</Grid.Col> </Grid.Col>
</Grid> </Grid>

View File

@ -217,8 +217,7 @@ export default function SupplierPartDetail() {
return ( return (
<ItemDetailsGrid> <ItemDetailsGrid>
<Grid> <Grid grow>
<Grid.Col span={4}>
<DetailsImage <DetailsImage
appRole={UserRoles.part} appRole={UserRoles.part}
src={supplierPart?.part_detail?.image} src={supplierPart?.part_detail?.image}
@ -228,7 +227,6 @@ export default function SupplierPartDetail() {
)} )}
pk={supplierPart?.part_detail?.pk} pk={supplierPart?.part_detail?.pk}
/> />
</Grid.Col>
<Grid.Col span={8}> <Grid.Col span={8}>
<DetailsTable title={t`Part Details`} fields={tl} item={data} /> <DetailsTable title={t`Part Details`} fields={tl} item={data} />
</Grid.Col> </Grid.Col>

View File

@ -5,7 +5,6 @@ import {
Grid, Grid,
Loader, Loader,
Skeleton, Skeleton,
Space,
Stack, Stack,
Text Text
} from '@mantine/core'; } from '@mantine/core';
@ -439,8 +438,7 @@ export default function PartDetail() {
return part ? ( return part ? (
<ItemDetailsGrid> <ItemDetailsGrid>
<Grid> <Grid grow>
<Grid.Col span={4}>
<DetailsImage <DetailsImage
appRole={UserRoles.part} appRole={UserRoles.part}
imageActions={{ imageActions={{
@ -454,8 +452,7 @@ export default function PartDetail() {
refresh={refreshInstance} refresh={refreshInstance}
pk={part.pk} pk={part.pk}
/> />
</Grid.Col> <Grid.Col span={{ base: 12, sm: 8 }}>
<Grid.Col span={8}>
<DetailsTable fields={tl} item={data} /> <DetailsTable fields={tl} item={data} />
</Grid.Col> </Grid.Col>
</Grid> </Grid>
@ -1040,9 +1037,7 @@ export default function PartDetail() {
}} }}
/> />
</Stack> </Stack>
) : ( ) : null
<Space />
)
} }
/> />
<PanelGroup <PanelGroup

View File

@ -243,7 +243,7 @@ export default function PartSchedulingDetail({
<Text>{t`There is no scheduling information available for the selected part`}</Text> <Text>{t`There is no scheduling information available for the selected part`}</Text>
</Alert> </Alert>
)} )}
<SimpleGrid cols={2}> <SimpleGrid cols={{ base: 1, md: 2 }}>
<InvenTreeTable <InvenTreeTable
url={apiUrl(ApiEndpoints.part_scheduling, part.pk)} url={apiUrl(ApiEndpoints.part_scheduling, part.pk)}
tableState={table} tableState={table}

View File

@ -209,7 +209,7 @@ export default function PartStocktakeDetail({
{generateReport.modal} {generateReport.modal}
{editStocktakeEntry.modal} {editStocktakeEntry.modal}
{deleteStocktakeEntry.modal} {deleteStocktakeEntry.modal}
<SimpleGrid cols={2}> <SimpleGrid cols={{ base: 1, md: 2 }}>
<InvenTreeTable <InvenTreeTable
url={apiUrl(ApiEndpoints.part_stocktake_list)} url={apiUrl(ApiEndpoints.part_stocktake_list)}
tableState={table} tableState={table}

View File

@ -219,7 +219,7 @@ export default function BomPricingPanel({
return ( return (
<Stack gap='xs'> <Stack gap='xs'>
<SimpleGrid cols={2}> <SimpleGrid cols={{ base: 1, md: 2 }}>
<InvenTreeTable <InvenTreeTable
tableState={table} tableState={table}
url={apiUrl(ApiEndpoints.bom_list)} url={apiUrl(ApiEndpoints.bom_list)}

View File

@ -151,7 +151,7 @@ export default function PriceBreakPanel({
{newPriceBreak.modal} {newPriceBreak.modal}
{editPriceBreak.modal} {editPriceBreak.modal}
{deletePriceBreak.modal} {deletePriceBreak.modal}
<SimpleGrid cols={2}> <SimpleGrid cols={{ base: 1, md: 2 }}>
<InvenTreeTable <InvenTreeTable
tableState={table} tableState={table}
url={tableUrl} url={tableUrl}

View File

@ -240,7 +240,7 @@ export default function PricingOverviewPanel({
<> <>
{editPricing.modal} {editPricing.modal}
<Stack gap='xs'> <Stack gap='xs'>
<SimpleGrid cols={2}> <SimpleGrid cols={{ base: 1, md: 2 }}>
<Stack gap='xs'> <Stack gap='xs'>
<Paper p='xs'> <Paper p='xs'>
<Group justify='space-between' wrap='nowrap'> <Group justify='space-between' wrap='nowrap'>

View File

@ -103,7 +103,7 @@ export default function PurchaseHistoryPanel({
}, [table.records]); }, [table.records]);
return ( return (
<SimpleGrid cols={2}> <SimpleGrid cols={{ base: 1, md: 2 }}>
<InvenTreeTable <InvenTreeTable
tableState={table} tableState={table}
url={apiUrl(ApiEndpoints.purchase_order_line_list)} url={apiUrl(ApiEndpoints.purchase_order_line_list)}

View File

@ -63,7 +63,7 @@ export default function SaleHistoryPanel({
}, [table.records]); }, [table.records]);
return ( return (
<SimpleGrid cols={2}> <SimpleGrid cols={{ base: 1, md: 2 }}>
<InvenTreeTable <InvenTreeTable
tableState={table} tableState={table}
url={apiUrl(ApiEndpoints.sales_order_line_list)} url={apiUrl(ApiEndpoints.sales_order_line_list)}

View File

@ -45,7 +45,7 @@ export default function SupplierPricingPanel({
}, [table.records]); }, [table.records]);
return ( return (
<SimpleGrid cols={2}> <SimpleGrid cols={{ base: 1, md: 2 }}>
<InvenTreeTable <InvenTreeTable
url={apiUrl(ApiEndpoints.supplier_part_pricing_list)} url={apiUrl(ApiEndpoints.supplier_part_pricing_list)}
columns={columns} columns={columns}

View File

@ -73,7 +73,7 @@ export default function VariantPricingPanel({
return ( return (
<Stack gap='xs'> <Stack gap='xs'>
<SimpleGrid cols={2}> <SimpleGrid cols={{ base: 1, md: 2 }}>
<InvenTreeTable <InvenTreeTable
tableState={table} tableState={table}
url={apiUrl(ApiEndpoints.part_list)} url={apiUrl(ApiEndpoints.part_list)}

View File

@ -263,16 +263,14 @@ export default function PurchaseOrderDetail() {
return ( return (
<ItemDetailsGrid> <ItemDetailsGrid>
<Grid> <Grid grow>
<Grid.Col span={4}>
<DetailsImage <DetailsImage
appRole={UserRoles.purchase_order} appRole={UserRoles.purchase_order}
apiPath={ApiEndpoints.company_list} apiPath={ApiEndpoints.company_list}
src={order.supplier_detail?.image} src={order.supplier_detail?.image}
pk={order.supplier} pk={order.supplier}
/> />
</Grid.Col> <Grid.Col span={{ base: 12, sm: 8 }}>
<Grid.Col span={8}>
<DetailsTable fields={tl} item={order} /> <DetailsTable fields={tl} item={order} />
</Grid.Col> </Grid.Col>
</Grid> </Grid>

View File

@ -233,16 +233,14 @@ export default function ReturnOrderDetail() {
return ( return (
<ItemDetailsGrid> <ItemDetailsGrid>
<Grid> <Grid grow>
<Grid.Col span={4}>
<DetailsImage <DetailsImage
appRole={UserRoles.purchase_order} appRole={UserRoles.purchase_order}
apiPath={ApiEndpoints.company_list} apiPath={ApiEndpoints.company_list}
src={order.customer_detail?.image} src={order.customer_detail?.image}
pk={order.customer} pk={order.customer}
/> />
</Grid.Col> <Grid.Col span={{ base: 12, sm: 8 }}>
<Grid.Col span={8}>
<DetailsTable fields={tl} item={order} /> <DetailsTable fields={tl} item={order} />
</Grid.Col> </Grid.Col>
</Grid> </Grid>

View File

@ -243,16 +243,14 @@ export default function SalesOrderDetail() {
return ( return (
<ItemDetailsGrid> <ItemDetailsGrid>
<Grid> <Grid grow>
<Grid.Col span={4}>
<DetailsImage <DetailsImage
appRole={UserRoles.purchase_order} appRole={UserRoles.purchase_order}
apiPath={ApiEndpoints.company_list} apiPath={ApiEndpoints.company_list}
src={order.customer_detail?.image} src={order.customer_detail?.image}
pk={order.customer} pk={order.customer}
/> />
</Grid.Col> <Grid.Col span={{ base: 12, sm: 8 }}>
<Grid.Col span={8}>
<DetailsTable fields={tl} item={order} /> <DetailsTable fields={tl} item={order} />
</Grid.Col> </Grid.Col>
</Grid> </Grid>

View File

@ -175,8 +175,7 @@ export default function SalesOrderShipmentDetail() {
return ( return (
<> <>
<ItemDetailsGrid> <ItemDetailsGrid>
<Grid> <Grid grow>
<Grid.Col span={4}>
<DetailsImage <DetailsImage
appRole={UserRoles.sales_order} appRole={UserRoles.sales_order}
apiPath={ApiEndpoints.company_list} apiPath={ApiEndpoints.company_list}
@ -189,8 +188,7 @@ export default function SalesOrderShipmentDetail() {
deleteFile: false deleteFile: false
}} }}
/> />
</Grid.Col> <Grid.Col span={{ base: 12, sm: 8 }}>
<Grid.Col span={8}>
<DetailsTable fields={tl} item={data} /> <DetailsTable fields={tl} item={data} />
</Grid.Col> </Grid.Col>
</Grid> </Grid>

View File

@ -346,19 +346,16 @@ export default function StockDetail() {
return ( return (
<ItemDetailsGrid> <ItemDetailsGrid>
<Grid> <Grid grow>
<Grid.Col span={4}>
<DetailsImage <DetailsImage
appRole={UserRoles.part} appRole={UserRoles.part}
apiPath={ApiEndpoints.part_list} apiPath={ApiEndpoints.part_list}
src={ src={
stockitem.part_detail?.image ?? stockitem.part_detail?.image ?? stockitem?.part_detail?.thumbnail
stockitem?.part_detail?.thumbnail
} }
pk={stockitem.part} pk={stockitem.part}
/> />
</Grid.Col> <Grid.Col span={{ base: 12, sm: 8 }}>
<Grid.Col span={8}>
<DetailsTable fields={tl} item={data} /> <DetailsTable fields={tl} item={data} />
</Grid.Col> </Grid.Col>
</Grid> </Grid>