Mix box and canister labels on shared sheets

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-11 12:53:57 +03:30
parent 7b9255d31c
commit 08b234c254
5 changed files with 30 additions and 26 deletions

View File

@@ -46,14 +46,12 @@ document.addEventListener('DOMContentLoaded', () => {
const cpb = parseInt(canistersPerBoxInput.value) || 1;
const cc = Math.ceil(tw / cw);
const cp = Math.ceil(cc / 4);
const bc = Math.ceil(cc / cpb);
const bp = Math.ceil(bc / 4);
const pages = Math.ceil((cc + bc) / 4) || 0;
const t = translations[currentLang] || translations.en;
previewDisplay.textContent =
`${t.canisters_unit}: ${cc} (${cp} ${t.preview_pages}) | ${t.boxes_unit}: ${bc} (${bp} ${t.preview_pages})`;
`${t.canisters_unit}: ${cc} | ${t.boxes_unit}: ${bc} | ${pages} ${t.preview_pages}`;
}
window.updateLabelsPreview = updatePreview;