@7365admin1/layer-common 4.97.1-staging.534 → 4.97.1-staging.535

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.
@@ -61,6 +61,9 @@
61
61
  <v-chip size="small" variant="tonal" :color="qrStickerSummary(rowPlates(item)).color" data-test="vehicle-qr-cell">
62
62
  {{ qrStickerSummary(rowPlates(item)).label }}
63
63
  </v-chip>
64
+ <div v-for="plate in rowPlates(item).filter((p: any) => p.qrCode)" :key="plate._id ?? plate.plateNumber">
65
+ <VehicleStickerCode :code="plate.qrCode" :label="rowPlates(item).length > 1 ? plate.plateNumber : ''" />
66
+ </div>
64
67
  </template>
65
68
 
66
69
  <template #item.category="{ value }">
@@ -221,6 +224,7 @@
221
224
  <template #item.plateNumber="{ value, item: plateNumberItem }">
222
225
  <span class="d-inline-flex align-center ga-2">
223
226
  {{ value }}
227
+ <VehicleStickerCode v-if="qrEnabled && (plateNumberItem as any).qrCode" :code="(plateNumberItem as any).qrCode" />
224
228
  <AnprCameraBadge :cameras="(plateNumberItem as any).anprCameras ?? []" :plate-number="value"
225
229
  :plate-id="(plateNumberItem as any)._id ?? ''" :status="(plateNumberItem as any).status ?? ''"
226
230
  :type="(plateNumberItem as any).type ?? ''" :end="(plateNumberItem as any).end ?? null"
@@ -0,0 +1,27 @@
1
+ <template>
2
+ <span class="d-inline-flex align-center ga-1 text-caption" data-test="vehicle-sticker-code">
3
+ <span v-if="label" class="text-medium-emphasis">{{ label }}</span>
4
+ <code class="vehicle-sticker-code">{{ code }}</code>
5
+ <v-btn :icon="copied ? 'mdi-check' : 'mdi-content-copy'" flat size="x-small" density="compact"
6
+ aria-label="Copy sticker code" @click.stop="copy" />
7
+ </span>
8
+ </template>
9
+
10
+ <script setup lang="ts">
11
+ // A blank sticker's printed code, with a copy button. Shown only when the server sent it.
12
+ const props = defineProps<{ code: string; label?: string }>();
13
+ const copied = ref(false);
14
+ async function copy() {
15
+ try {
16
+ await navigator.clipboard.writeText(props.code);
17
+ copied.value = true;
18
+ setTimeout(() => (copied.value = false), 1500);
19
+ } catch {
20
+ /* clipboard blocked: the code is still readable on screen */
21
+ }
22
+ }
23
+ </script>
24
+
25
+ <style scoped>
26
+ .vehicle-sticker-code { font-size: 0.75rem; letter-spacing: 0.02em; }
27
+ </style>
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.534",
5
+ "version": "4.97.1-staging.535",
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.",