@7365admin1/layer-common 4.139.0 → 4.140.0

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @iservice365/layer-common
2
2
 
3
+ ## 4.140.0
4
+
5
+ ### Minor Changes
6
+
7
+ - e99d972: QR Tagging: explain what the screen does and add a `canGenerate` prop (default true) so an app can hide Generate QR Code from roles without the right. Blocks screen: delete dialog and messages say "Block" (the screen's own name) instead of "Building" / "region".
8
+
3
9
  ## 4.139.0
4
10
 
5
11
  ### Minor Changes
@@ -3389,11 +3395,11 @@ Monthly report: a month that had patrols opens the list of that month's patrol r
3389
3395
  `utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
3390
3396
  own rule from two endpoints the console already calls, unprojected:
3391
3397
 
3392
- GET /api/members/user/:user/app/admin the Seven365 staff membership
3393
- GET /api/roles/id/:role that membership's role document
3398
+ GET /api/members/user/:user/app/admin the Seven365 staff membership
3399
+ GET /api/roles/id/:role that membership's role document
3394
3400
 
3395
- owner = member.type === "admin" && role.type === "admin" && role.default === true
3396
- staff = member.type === "admin" && role.type === "admin"
3401
+ owner = member.type === "admin" && role.type === "admin" && role.default === true
3402
+ staff = member.type === "admin" && role.type === "admin"
3397
3403
 
3398
3404
  `role.default` is the marker because it is the only property of a platform
3399
3405
  staff role no API caller can set - `role.controller.ts` validates create and
@@ -9,7 +9,10 @@
9
9
  tokens. Same three clicks, same `disabled` rules; the primary action
10
10
  sits rightmost, where the design puts it.
11
11
  -->
12
- <PageHeader title="QR Tagging">
12
+ <PageHeader
13
+ title="QR Tagging"
14
+ subtitle="Make a printable QR sticker for each access card, so a card can be identified by scanning its QR. Tick the cards, then Generate QR Code; Print QR Code prints the ones that already have a QR."
15
+ >
13
16
  <template #actions>
14
17
  <AppButton
15
18
  variant="ghost"
@@ -26,6 +29,7 @@
26
29
  Print QR Code
27
30
  </AppButton>
28
31
  <AppButton
32
+ v-if="canGenerate"
29
33
  :disabled="!qrCodeAccessCards.length"
30
34
  @click="generateQrCodes"
31
35
  >
@@ -186,6 +190,12 @@ const props = defineProps({
186
190
  type: Boolean,
187
191
  default: false,
188
192
  },
193
+ // Generate writes a QR tag onto each selected card. Default true keeps
194
+ // every consumer that does not pass it unchanged.
195
+ canGenerate: {
196
+ type: Boolean,
197
+ default: true,
198
+ },
189
199
  });
190
200
 
191
201
  const tableHeaders = [
@@ -117,12 +117,12 @@
117
117
  <v-dialog v-model="confirmDialog" :loading="deleteLoading" width="450" persistent>
118
118
  <v-card width="100%">
119
119
  <v-toolbar density="compact" class="pl-4">
120
- <span class="font-weight-medium text-h5">Delete Building</span>
120
+ <span class="font-weight-medium text-h5">Delete Block</span>
121
121
  </v-toolbar>
122
122
 
123
123
  <v-card-text>
124
124
  <p class="text-subtitle-2 text-center">
125
- Are you sure you want to delete this building? This action cannot be
125
+ Are you sure you want to delete this block? This action cannot be
126
126
  undone.
127
127
  </p>
128
128
 
@@ -288,14 +288,14 @@ function tableRowClickHandler(_: any, data: any) {
288
288
  function successCreate() {
289
289
  createDialog.value = false;
290
290
  getBuildings();
291
- showMessage("Building created successfully!", "success");
291
+ showMessage("Block created successfully!", "success");
292
292
  }
293
293
 
294
294
  function successUpdate() {
295
295
  editDialog.value = false;
296
296
  previewDialog.value = false;
297
297
  getBuildings();
298
- showMessage("Building updated successfully!", "success");
298
+ showMessage("Block updated successfully!", "success");
299
299
  }
300
300
 
301
301
  function openEditDialog() {
@@ -327,7 +327,7 @@ async function handleDeleteBuilding() {
327
327
  previewDialog.value = false
328
328
  } catch (error: any) {
329
329
  message.value =
330
- error?.response?._data?.message || "Failed to delete region";
330
+ error?.response?._data?.message || "Failed to delete block";
331
331
  } finally {
332
332
  deleteLoading.value = false;
333
333
  }
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.139.0",
5
+ "version": "4.140.0",
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.",