Added default template
This commit is contained in:
@@ -31,9 +31,9 @@ const QRCodePrintingDialog: React.FC<QRCodePrintingDialogProps> = ({
|
|||||||
}) => {
|
}) => {
|
||||||
const t = useTranslate();
|
const t = useTranslate();
|
||||||
|
|
||||||
const showContent = printSettings?.showContent;
|
const showContent = printSettings?.showContent === undefined ? true : printSettings?.showContent;
|
||||||
const textSize = printSettings?.textSize || 5;
|
const textSize = printSettings?.textSize || 5;
|
||||||
const showSpoolmanIcon = printSettings?.showSpoolmanIcon;
|
const showSpoolmanIcon = printSettings?.showSpoolmanIcon === undefined ? true : printSettings?.showSpoolmanIcon;
|
||||||
|
|
||||||
const elements = items.map((item) => {
|
const elements = items.map((item) => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -131,7 +131,17 @@ const SpoolQRCodePrintingDialog: React.FC<SpoolQRCodePrintingDialog> = ({ visibl
|
|||||||
}
|
}
|
||||||
|
|
||||||
const [templateHelpOpen, setTemplateHelpOpen] = useState(false);
|
const [templateHelpOpen, setTemplateHelpOpen] = useState(false);
|
||||||
const template = selectedPrintSetting.template ?? "";
|
const template =
|
||||||
|
selectedPrintSetting.template ??
|
||||||
|
`**{filament.vendor.name} - {filament.name}
|
||||||
|
#{id} - {filament.material}**
|
||||||
|
Spool Weight: {filament.spool_weight} g
|
||||||
|
ET: {filament.settings_extruder_temp} °C
|
||||||
|
BT: {filament.settings_bed_temp} °C
|
||||||
|
Lot Nr: {lot_nr}
|
||||||
|
{comment}
|
||||||
|
{filament.comment}
|
||||||
|
{filament.vendor.comment}`;
|
||||||
|
|
||||||
const spoolTags = [
|
const spoolTags = [
|
||||||
{ tag: "id" },
|
{ tag: "id" },
|
||||||
|
|||||||
Reference in New Issue
Block a user