fix: fixed key letter in residual qr codes

This commit is contained in:
2025-01-17 17:01:02 +04:00
parent 1b9880a65a
commit a4279edda9
4 changed files with 10 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
import { Button, Flex, Stack, Title } from "@mantine/core";
import { Button, Flex, Stack, Text, Title } from "@mantine/core";
import useReceiptBox from "../hooks/useReceiptBox.tsx";
import ReceiptProducts from "./ReceiptProducts.tsx";
import InlineButton from "../../../../../components/InlineButton/InlineButton.tsx";
@@ -16,6 +16,8 @@ const ReceiptBoxEditor = ({ boxId }: Props) => {
onCreateProductClick,
} = useReceiptBox({ boxId });
if (!box) return <Text>Короб c ID K{boxId} не найден</Text>;
const backButton = (
<Button
variant={"default"}

View File

@@ -18,7 +18,7 @@ const ReceiptPalletEditor = ({ palletId }: Props) => {
onCreateBoxClick,
} = useReceiptPallet({ palletId });
if (!pallet) return <Text>Паллет c ID П{palletId} не найден</Text>;
if (!pallet) return <Text>Паллет c ID P{palletId} не найден</Text>;
const createButtons = () => {
const isBoxes = pallet.boxes.length > 0;

View File

@@ -22,7 +22,7 @@ const ReceiptQrCodeScan = () => {
const checkQrScannedCorrectly = () => {
if (
scannedValue.length < 2
|| (scannedValue[0] !== "П" && scannedValue[0] !== "К")
|| (scannedValue[0] !== "P" && scannedValue[0] !== "K")
|| Number.isNaN(getId())
) {
notifications.error({ message: `Считанный ID ${scannedValue} некорректный` });
@@ -55,7 +55,7 @@ const ReceiptQrCodeScan = () => {
);
}
if (scannedValue.length > 0 && scannedValue[0] === "К") {
if (scannedValue.length > 0 && scannedValue[0] === "K") {
return <ReceiptBoxEditor boxId={getId()} />;
}
return <ReceiptPalletEditor palletId={getId()} />;