[PUI] Report print timeout (#7899)

* Enable printing actions for part

* Increase default timeout for printing
This commit is contained in:
Oliver 2024-08-16 15:53:15 +10:00 committed by GitHub
parent e91d741785
commit 09c4710107
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 3 deletions

View File

@ -92,7 +92,7 @@ export function PrintingActions({
url: apiUrl(ApiEndpoints.label_print),
title: t`Print Label`,
fields: labelFields,
timeout: (items.length + 1) * 1000,
timeout: (items.length + 1) * 5000,
onClose: () => {
setPluginKey('');
},
@ -121,7 +121,7 @@ export function PrintingActions({
const reportModal = useCreateApiFormModal({
title: t`Print Report`,
url: apiUrl(ApiEndpoints.report_print),
timeout: (items.length + 1) * 1000,
timeout: (items.length + 1) * 5000,
fields: {
template: {
filters: {

View File

@ -11,7 +11,6 @@ import {
IconListNumbers,
IconNotes,
IconPaperclip,
IconQrcode,
IconReportAnalytics,
IconSitemap
} from '@tabler/icons-react';

View File

@ -38,6 +38,7 @@ import Select from 'react-select';
import { api } from '../../App';
import AdminButton from '../../components/buttons/AdminButton';
import { PrintingActions } from '../../components/buttons/PrintingActions';
import { DetailsField, DetailsTable } from '../../components/details/Details';
import DetailsBadge from '../../components/details/DetailsBadge';
import { DetailsImage } from '../../components/details/DetailsImage';
@ -980,6 +981,12 @@ export default function PartDetail() {
]}
key="action_dropdown"
/>,
<PrintingActions
modelType={ModelType.part}
items={[part.pk]}
enableReports
enableLabels
/>,
<ActionDropdown
tooltip={t`Stock Actions`}
icon={<IconPackages />}