@7365admin1/layer-common 4.97.1-staging.704 → 4.97.1-staging.705

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,8 +20,8 @@
20
20
  </v-btn-toggle>
21
21
  <div v-if="mode === 'blank'" data-test="vehicle-qr-blank">
22
22
  <p class="text-body-2 mb-3">
23
- Make QR stickers before you know which car each is for. Each sticker has its own code printed on it. Paste it
24
- on a car, then link it to that vehicle in Vehicles &gt; Link QR sticker - or scan it with iMA365 / iSecure365
23
+ Make QR stickers before you know which car each is for. Each sticker has its own QR code and sticker number. Paste
24
+ it on a car, then link it to that vehicle by its number in Vehicles &gt; Link QR sticker - or scan it with iMA365 / iSecure365
25
25
  and pick the vehicle there. Until it is linked, scanning it shows "not linked yet".
26
26
  </p>
27
27
  <p v-if="blankSummary" class="text-body-2 font-weight-medium mb-3" data-test="vehicle-qr-blank-summary">
@@ -219,7 +219,7 @@
219
219
  <v-alert type="info" variant="tonal" density="compact" class="mt-2" data-test="vehicle-qr-cut-guide">
220
220
  How to cut: first cut the sheet into pieces through the middle of the gaps (the small + marks show where),
221
221
  then cut round each sticker {{ design.cutLines ? "on the light-grey line" : "along its edge" }} - with scissors
222
- or a cutting machine. Cut off the strip with the unit and owner before pasting.
222
+ or a cutting machine.{{ blankQrSerialOnly ? "" : " Cut off the strip under each sticker before pasting." }}
223
223
  </v-alert>
224
224
  <v-alert type="info" variant="tonal" density="compact" class="mt-2" data-test="vehicle-qr-save-guide">
225
225
  To print the same stickers again later: <b>Save sheet file</b> keeps this exact sheet on your computer - open
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@7365admin1/layer-common",
3
3
  "license": "MIT",
4
4
  "type": "module",
5
- "version": "4.97.1-staging.704",
5
+ "version": "4.97.1-staging.705",
6
6
  "author": "7365admin1",
7
7
  "main": "./nuxt.config.ts",
8
8
  "//files": "What a consumer extending this layer actually loads. Without this npm ships the whole working tree - the changesets, the CI workflows, the render harness in tools/ and any scratch directory that happened to exist at publish time. Nuxt resolves a layer by directory, so every runtime directory below has to stay listed; adding a new top-level runtime directory means adding it here too.",
@@ -211,14 +211,15 @@ export function stickerSerial(item: Pick<StickerItem, "serialNo" | "serialLabel"
211
211
  /**
212
212
  * A blank sticker printed with its sticker number in place of the long code
213
213
  * (design "Sticker code: Hide"). Only when it HAS a number - a sticker never
214
- * goes out with neither the code nor a number on it.
214
+ * goes out with neither the code nor a number on it. Also a vehicle's sticker
215
+ * that came from a blank one (its "plate" is that blank code) when reprinted.
215
216
  */
216
- export function blankCodeHidden(item: Pick<StickerItem, "blank" | "serialNo" | "serialLabel">, design: Pick<StickerDesign, "blankCode">): boolean {
217
- return !!item.blank && design.blankCode === "hide" && !!stickerSerial(item);
217
+ export function blankCodeHidden(item: Pick<StickerItem, "blank" | "serialNo" | "serialLabel" | "plateNumber">, design: Pick<StickerDesign, "blankCode">): boolean {
218
+ return (!!item.blank || isBlankCode(text(item.plateNumber))) && design.blankCode === "hide" && !!stickerSerial(item);
218
219
  }
219
220
 
220
221
  /** The strip under a blank sticker: link by number when the code is not on it. */
221
- export function blankStripNote(item: Pick<StickerItem, "blank" | "serialNo" | "serialLabel">, design: Pick<StickerDesign, "blankCode">): string {
222
+ export function blankStripNote(item: Pick<StickerItem, "blank" | "serialNo" | "serialLabel" | "plateNumber">, design: Pick<StickerDesign, "blankCode">): string {
222
223
  return blankCodeHidden(item, design) ? BLANK_STRIP_NOTE_NUMBER : BLANK_STRIP_NOTE;
223
224
  }
224
225
 
@@ -501,7 +502,7 @@ export function buildStickerDocument(
501
502
  const [noteHead, noteRest] = blankStripNote(item, design).split(" - ");
502
503
  const sn = stripSerial(item) ? `<span class="sn">${escapeHtml(stickerSerial(item))}</span>` : "";
503
504
  // QR + number only: the strip stays blank (the number is on the sticker; link it by that number)
504
- const strip = blankCodeHidden(item, design)
505
+ const strip = item.blank && blankCodeHidden(item, design)
505
506
  ? `<div class="cut${c.bare ? " free" : ""} blank"></div>`
506
507
  : item.blank
507
508
  ? `<div class="cut${c.bare ? " free" : ""} blank"><div>${sn}<b>${escapeHtml(noteHead)}</b></div><div>${escapeHtml(noteRest)}</div></div>`