@@ -72,6 +72,7 @@
|
|||||||
"showBorder": "Show Border",
|
"showBorder": "Show Border",
|
||||||
"previewScale": "Preview Scale",
|
"previewScale": "Preview Scale",
|
||||||
"skipItems": "Skip Items",
|
"skipItems": "Skip Items",
|
||||||
|
"itemCopies": "Item Copies",
|
||||||
"contentSettings": "Content Settings",
|
"contentSettings": "Content Settings",
|
||||||
"layoutSettings": "Layout Settings",
|
"layoutSettings": "Layout Settings",
|
||||||
"horizontalSpacing": "Horizontal Spacing",
|
"horizontalSpacing": "Horizontal Spacing",
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ const PrintingDialog: React.FC<PrintingDialogProps> = ({ items, style, extraSett
|
|||||||
const [paperColumns, setPaperColumns] = useSavedState("print-itemsPerRow", 3);
|
const [paperColumns, setPaperColumns] = useSavedState("print-itemsPerRow", 3);
|
||||||
const [paperRows, setPaperRows] = useSavedState("print-rowsPerPage", 8);
|
const [paperRows, setPaperRows] = useSavedState("print-rowsPerPage", 8);
|
||||||
const [skipItems, setSkipItems] = useSavedState("print-skipItems", 0);
|
const [skipItems, setSkipItems] = useSavedState("print-skipItems", 0);
|
||||||
|
const [itemCopies, setItemCopies] = useSavedState("print-itemCopies", 1);
|
||||||
const [paperSize, setPaperSize] = useSavedState("print-paperSize", "A4");
|
const [paperSize, setPaperSize] = useSavedState("print-paperSize", "A4");
|
||||||
const [customPaperWidth, setCustomPaperWidth] = useSavedState("print-customPaperWidth", 210);
|
const [customPaperWidth, setCustomPaperWidth] = useSavedState("print-customPaperWidth", 210);
|
||||||
const [customPaperHeight, setCustomPaperHeight] = useSavedState("print-customPaperHeight", 297);
|
const [customPaperHeight, setCustomPaperHeight] = useSavedState("print-customPaperHeight", 297);
|
||||||
@@ -92,7 +93,12 @@ const PrintingDialog: React.FC<PrintingDialogProps> = ({ items, style, extraSett
|
|||||||
const itemsPerRow = paperColumns;
|
const itemsPerRow = paperColumns;
|
||||||
const rowsPerPage = paperRows;
|
const rowsPerPage = paperRows;
|
||||||
|
|
||||||
const itemsIncludingSkipped = [...Array(skipItems).fill(<></>), ...items];
|
const itemsIncludingSkipped = [...Array(skipItems).fill(<></>)];
|
||||||
|
for (const item of items) {
|
||||||
|
for (let i = 0; i < itemCopies; i += 1) {
|
||||||
|
itemsIncludingSkipped.push(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const rowsOfItems = [];
|
const rowsOfItems = [];
|
||||||
for (let row_idx = 0; row_idx < itemsIncludingSkipped.length / itemsPerRow; row_idx += 1) {
|
for (let row_idx = 0; row_idx < itemsIncludingSkipped.length / itemsPerRow; row_idx += 1) {
|
||||||
@@ -272,6 +278,30 @@ const PrintingDialog: React.FC<PrintingDialogProps> = ({ items, style, extraSett
|
|||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item label={t("printing.generic.itemCopies")}>
|
||||||
|
<Row>
|
||||||
|
<Col span={12}>
|
||||||
|
<Slider
|
||||||
|
min={1}
|
||||||
|
max={3}
|
||||||
|
value={itemCopies}
|
||||||
|
onChange={(value) => {
|
||||||
|
setItemCopies(value);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={12}>
|
||||||
|
<InputNumber
|
||||||
|
min={1}
|
||||||
|
style={{ margin: "0 16px" }}
|
||||||
|
value={itemCopies}
|
||||||
|
onChange={(value) => {
|
||||||
|
setItemCopies(value ?? 1);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
</Form.Item>
|
||||||
<Form.Item label={t("printing.generic.showBorder")}>
|
<Form.Item label={t("printing.generic.showBorder")}>
|
||||||
<Radio.Group
|
<Radio.Group
|
||||||
options={[
|
options={[
|
||||||
|
|||||||
Reference in New Issue
Block a user