fix: fixed key letter in residual qr codes
This commit is contained in:
@@ -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"}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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()} />;
|
||||
|
||||
Reference in New Issue
Block a user