Merge pull request #624 from bdchik/fix
Bug Fix: Ensure the QR code favicon.svg honors the base path, when configured.
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import { getBasePath } from "../../utils/url";
|
||||||
import { useTranslate } from "@refinedev/core";
|
import { useTranslate } from "@refinedev/core";
|
||||||
import { Col, Form, InputNumber, QRCode, Radio, RadioChangeEvent, Row, Slider, Switch, Typography } from "antd";
|
import { Col, Form, InputNumber, QRCode, Radio, RadioChangeEvent, Row, Slider, Switch, Typography } from "antd";
|
||||||
import { QRCodePrintSettings } from "./printing";
|
import { QRCodePrintSettings } from "./printing";
|
||||||
@@ -47,7 +48,7 @@ const QRCodePrintingDialog: React.FC<QRCodePrintingDialogProps> = ({
|
|||||||
<div className="print-qrcode-container">
|
<div className="print-qrcode-container">
|
||||||
<QRCode
|
<QRCode
|
||||||
className="print-qrcode"
|
className="print-qrcode"
|
||||||
icon={showQRCodeMode === "withIcon" ? "/favicon.svg" : undefined}
|
icon={showQRCodeMode === "withIcon" ? getBasePath() + "/favicon.svg" : undefined}
|
||||||
value={item.value}
|
value={item.value}
|
||||||
errorLevel={item.errorLevel}
|
errorLevel={item.errorLevel}
|
||||||
type="svg"
|
type="svg"
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { getBasePath } from "../../utils/url";
|
||||||
import { InboxOutlined, PrinterOutlined, ToTopOutlined } from "@ant-design/icons";
|
import { InboxOutlined, PrinterOutlined, ToTopOutlined } from "@ant-design/icons";
|
||||||
import { DateField, NumberField, Show, TextField } from "@refinedev/antd";
|
import { DateField, NumberField, Show, TextField } from "@refinedev/antd";
|
||||||
import { IResourceComponentsProps, useInvalidate, useShow, useTranslate } from "@refinedev/core";
|
import { IResourceComponentsProps, useInvalidate, useShow, useTranslate } from "@refinedev/core";
|
||||||
@@ -117,7 +118,7 @@ export const SpoolShow: React.FC<IResourceComponentsProps> = () => {
|
|||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon={<PrinterOutlined />}
|
icon={<PrinterOutlined />}
|
||||||
href={"/spool/print?spools=" + record?.id + "&return=" + encodeURIComponent(window.location.pathname)}
|
href={getBasePath() + "/spool/print?spools=" + record?.id + "&return=" + encodeURIComponent(window.location.pathname)}
|
||||||
>
|
>
|
||||||
{t("printing.qrcode.button")}
|
{t("printing.qrcode.button")}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user