2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-01 13:06:45 +00:00

[PUI] Barcode title (#8591)

* Increase query limit

* PUI: Barcode UI tweaks

- Small visual tweaks to barcode dialogs
This commit is contained in:
Oliver 2024-11-29 17:32:15 +11:00 committed by GitHub
parent 20d862e350
commit 327884ca26
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 27 additions and 14 deletions

View File

@ -163,7 +163,7 @@ export function BarcodeActionDropdown({
actions={[
GeneralBarcodeAction({
mdl_prop: prop,
title: t`View`,
title: t`View Barcode`,
icon: <IconQrcode />,
tooltip: t`View barcode`,
ChildItem: InvenTreeQRCode

View File

@ -4,6 +4,7 @@ import {
Box,
Button,
Code,
Divider,
Group,
Image,
Select,
@ -96,6 +97,8 @@ export const InvenTreeQRCode = ({
return (
<Stack>
<Divider />
{mdl_prop.hash ? (
<Alert variant='outline' color='red' title={t`Custom barcode`}>
<Trans>
@ -107,6 +110,8 @@ export const InvenTreeQRCode = ({
<QRCode data={data} ecl={ecl} {...props} />
<Divider />
{data && settings.getSetting('BARCODE_SHOW_TEXT', 'false') && (
<Group
justify={showEclSelector ? 'space-between' : 'center'}
@ -163,13 +168,16 @@ export const QRCodeLink = ({ mdl_prop }: { mdl_prop: QrCodeType }) => {
};
return (
<BarcodeInput
value={barcode}
onChange={(event) => setBarcode(event.currentTarget.value)}
onScan={actionSubmit}
onAction={handleLinkBarcode}
actionText={t`Link`}
/>
<Stack gap='xs'>
<Divider />
<BarcodeInput
value={barcode}
onChange={(event) => setBarcode(event.currentTarget.value)}
onScan={actionSubmit}
onAction={handleLinkBarcode}
actionText={t`Link`}
/>
</Stack>
);
};
@ -186,12 +194,17 @@ export const QRCodeUnlink = ({ mdl_prop }: { mdl_prop: QrCodeType }) => {
}
return (
<Box>
<Text>
<Trans>This will remove the link to the associated barcode</Trans>
</Text>
<Button color='red' onClick={unlinkBarcode}>
<Trans>Unlink Barcode</Trans>
</Button>
<Stack gap='xs'>
<Divider />
<Text>
<Trans>This will remove the link to the associated barcode</Trans>
</Text>
<Group grow>
<Button color='red' onClick={unlinkBarcode}>
<Trans>Unlink Barcode</Trans>
</Button>
</Group>
</Stack>
</Box>
);
};