@7365admin1/layer-common 4.97.1-staging.728 → 4.97.1-staging.730
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.
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
/>
|
|
59
59
|
<v-text-field
|
|
60
60
|
v-model="model"
|
|
61
|
-
:rules="[
|
|
61
|
+
:rules="[nameRequiredRule]"
|
|
62
62
|
class="filter-field mb-0"
|
|
63
63
|
/>
|
|
64
64
|
</v-col>
|
|
@@ -149,7 +149,6 @@
|
|
|
149
149
|
|
|
150
150
|
<script setup lang="ts">
|
|
151
151
|
import useUnits from '../composables/useUnits';
|
|
152
|
-
import useUtils from '../composables/useUtils';
|
|
153
152
|
|
|
154
153
|
const model = defineModel("name", { type: String, default: "" });
|
|
155
154
|
const typeModel = defineModel("type", { type: String, default: "Common" });
|
|
@@ -185,7 +184,8 @@ const valid = ref(false);
|
|
|
185
184
|
const submitting = ref(false);
|
|
186
185
|
const show = ref(false);
|
|
187
186
|
|
|
188
|
-
|
|
187
|
+
// Spaces only is still an empty name.
|
|
188
|
+
const nameRequiredRule = (v: any) => !!String(v ?? "").trim() || "Required";
|
|
189
189
|
|
|
190
190
|
const unitsRequiredRule = (v: any) => {
|
|
191
191
|
if (Array.isArray(v)) return v.length > 0 || "Select at least one unit";
|
|
@@ -237,7 +237,11 @@ async function submit() {
|
|
|
237
237
|
let ok = valid.value;
|
|
238
238
|
if (form && typeof form.validate === "function") {
|
|
239
239
|
try {
|
|
240
|
-
|
|
240
|
+
// Vuetify 3 resolves to `{ valid, errors }`, an object that is always
|
|
241
|
+
// truthy: reading it as the result let an empty name through and closed
|
|
242
|
+
// the popup without saving or saying anything (DV-1872).
|
|
243
|
+
const result = await form.validate();
|
|
244
|
+
ok = typeof result === "object" && result !== null ? !!result.valid : !!result;
|
|
241
245
|
} catch (e) {
|
|
242
246
|
ok = false;
|
|
243
247
|
}
|
|
@@ -366,8 +366,10 @@ const { getAvailableContractorCards, generateQrVms } = useAccessManagement();
|
|
|
366
366
|
const { debounce } = useUtils();
|
|
367
367
|
|
|
368
368
|
const nfcEnabled = computed(() => props.settings?.data?.settings?.nfcPass ?? false);
|
|
369
|
+
// HID QR Code pass type is hidden for now. Set to true to show it again.
|
|
370
|
+
const SHOW_HID_QR_PASS_TYPE = false;
|
|
369
371
|
const hidQrCodeEnabled = computed(() => {
|
|
370
|
-
return props.hidQrCodeEnabled &&
|
|
372
|
+
return SHOW_HID_QR_PASS_TYPE && props.hidQrCodeEnabled &&["guest", "contractor", "walk-in"].includes(String(props.visitorType || ""));
|
|
371
373
|
});
|
|
372
374
|
const printer = computed(() => props.settings?.data?.settings?.printer ?? { vendorId: null, productId: null });
|
|
373
375
|
const hasPrinter = computed(() => !!printer.value.vendorId && !!printer.value.productId);
|
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.
|
|
5
|
+
"version": "4.97.1-staging.730",
|
|
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.",
|