@7365admin1/layer-common 4.97.1-staging.589 → 4.97.1-staging.590

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.
@@ -37,7 +37,7 @@
37
37
  <v-card-text class="screen-modal__body">
38
38
  <v-form ref="formRef" v-model="valid">
39
39
  <v-row no-gutters class="pa-0">
40
- <v-col v-if="prop.showType" cols="12" class="pa-0 mb-2">
40
+ <v-col v-if="prop.showType && !prop.hideTypeField" cols="12" class="pa-0 mb-2">
41
41
  <InputLabel for="type" title="Type" required class="mb-1" />
42
42
  <v-select
43
43
  v-model="typeModel"
@@ -169,6 +169,9 @@ const prop = defineProps({
169
169
  label: { type: String, default: "Name" },
170
170
  entityType: { type: String, default: "Area" }, // values: "Area", "Unit"
171
171
  showType: { type: Boolean, default: true },
172
+ // Keeps the type in the saved payload (as loaded, or "Common") but does not
173
+ // offer the Common / Toilet choice - for apps where it means nothing.
174
+ hideTypeField: { type: Boolean, default: false },
172
175
  showOptional: { type: Boolean, default: true },
173
176
  showUnits: { type: Boolean, default: false },
174
177
  site: { type: String, default: "" },
@@ -17,7 +17,7 @@
17
17
  @create="onCreateItem"
18
18
  @row-click="handleRowClick"
19
19
  >
20
- <template #extension>
20
+ <template v-if="props.showAreaType" #extension>
21
21
  <v-row no-gutters class="w-100 d-flex flex-column">
22
22
  <!--
23
23
  A bare `v-card` here paints Vuetify's own `surface`, a slab a
@@ -138,6 +138,7 @@
138
138
  :label="formLabel"
139
139
  :entityType="entityTypeLabel"
140
140
  :showUnits="true"
141
+ :hideTypeField="!props.showAreaType"
141
142
  :site="props.site"
142
143
  :serviceType="props.serviceType"
143
144
  @saved="_createArea"
@@ -314,7 +315,9 @@
314
315
  title="Import Areas from Excel"
315
316
  noun="areas"
316
317
  name-label="Area"
317
- fill-hint="One area per row: its name, Type (Common or Toilet, from the dropdown), Set and the units to check, separated by commas."
318
+ :fill-hint="props.showAreaType
319
+ ? 'One area per row: its name, Type (Common or Toilet, from the dropdown), Set and the units to check, separated by commas.'
320
+ : 'One area per row: its name, Set and the units to check, separated by commas. Leave Type as Common.'"
318
321
  duplicate-note="Areas already on the list (same name and type) are skipped and left unchanged."
319
322
  template-file-name="areas-import-template.xlsx"
320
323
  :download-template="() => downloadTemplate('areas', importQuery)"
@@ -345,6 +348,10 @@ const props = defineProps({
345
348
  canUpdateArea: { type: Boolean, default: false },
346
349
  canDeleteArea: { type: Boolean, default: false },
347
350
  canImportArea: { type: Boolean, default: false },
351
+ // Common / Toilet is a cleaning distinction (Toilet areas get the toilet
352
+ // checklist QR). Apps without it hide the Type filter, column and field;
353
+ // the saved `type` value is untouched (new areas stay "common").
354
+ showAreaType: { type: Boolean, default: true },
348
355
  });
349
356
 
350
357
  const isCleanerArea = computed(() => {
@@ -403,7 +410,7 @@ const isDownloading = ref(false);
403
410
 
404
411
  const headers = [
405
412
  { title: "AREA", value: "name" },
406
- { title: "TYPE", value: "type" },
413
+ ...(props.showAreaType ? [{ title: "TYPE", value: "type" }] : []),
407
414
  { title: "SETS", value: "set" },
408
415
  ];
409
416
 
@@ -120,7 +120,7 @@
120
120
 
121
121
 
122
122
  <v-col cols="12" class="px-6">
123
- <InputLabel class="text-capitalize font-weight-bold" title="Building Floor plan" />
123
+ <InputLabel class="text-capitalize font-weight-bold" title="Block floor plan" />
124
124
  <InputFileV2 v-model="building.buildingFiles" :multiple="true" accept="*" :max-length="10"
125
125
  title="Upload Files" />
126
126
  </v-col>
@@ -97,13 +97,13 @@
97
97
  <v-list class="pa-0">
98
98
  <v-list-item v-if="canUpdateBuilding" @click="openEditDialog()">
99
99
  <v-list-item-title class="text-subtitle-2">
100
- Edit Building
100
+ Edit Block
101
101
  </v-list-item-title>
102
102
  </v-list-item>
103
103
 
104
104
  <v-list-item v-if="canDeleteBuilding" @click="openDeleteDialog()" class="text-red">
105
105
  <v-list-item-title class="text-subtitle-2">
106
- Delete Building
106
+ Delete Block
107
107
  </v-list-item-title>
108
108
  </v-list-item>
109
109
  </v-list>
@@ -144,7 +144,7 @@
144
144
  <v-col cols="6">
145
145
  <v-btn tile block size="48" color="black" variant="flat" class="text-none" @click="handleDeleteBuilding"
146
146
  :loading="deleteLoading">
147
- Delete Building
147
+ Delete Block
148
148
  </v-btn>
149
149
  </v-col>
150
150
  </v-row>
@@ -56,6 +56,7 @@
56
56
  />
57
57
 
58
58
  <v-select
59
+ v-if="props.showAreaType"
59
60
  v-model="areaTypeFilter"
60
61
  :items="typeOptions"
61
62
  density="compact"
@@ -155,6 +156,9 @@ const props = defineProps({
155
156
  canGenerateChecklist: { type: Boolean, default: false },
156
157
  canViewHistory: { type: Boolean, default: false },
157
158
  canManageScheduleTasks: { type: Boolean, default: false },
159
+ // Common / Toilet is a cleaning distinction; apps without it hide the Type
160
+ // filter and column (saved `type` values are untouched).
161
+ showAreaType: { type: Boolean, default: true },
158
162
  });
159
163
 
160
164
  // "Daily Checklist – Cleaning" / "– Landscape" / ... (same title as the day list)
@@ -172,7 +176,7 @@ const pageRange = ref("-- - -- of --");
172
176
  const headers = [
173
177
  { title: "Area", value: "name" },
174
178
  { title: "Status", value: "status" },
175
- { title: "Type", value: "type" },
179
+ ...(props.showAreaType ? [{ title: "Type", value: "type" }] : []),
176
180
  { title: "Visits per day", value: "set" },
177
181
  ];
178
182
 
@@ -187,7 +187,9 @@
187
187
  title="Import Units from Excel"
188
188
  noun="units"
189
189
  name-label="Unit"
190
- fill-hint="One unit per row, e.g. Toilet Bowl, Sofa."
190
+ :fill-hint="/mechanical/i.test(props.serviceType)
191
+ ? 'One unit per row, e.g. Air-con Unit, Water Pump.'
192
+ : 'One unit per row, e.g. Toilet Bowl, Sofa.'"
191
193
  duplicate-note="Units already on the list are skipped and left unchanged."
192
194
  template-file-name="units-import-template.xlsx"
193
195
  :download-template="() => downloadTemplate('units', importQuery)"
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.589",
5
+ "version": "4.97.1-staging.590",
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.",