@7365admin1/layer-common 4.97.1-staging.650 → 4.97.1-staging.652
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.
|
@@ -194,6 +194,8 @@
|
|
|
194
194
|
</v-card>
|
|
195
195
|
</template>
|
|
196
196
|
<script setup lang="ts">
|
|
197
|
+
import { describeEntryPassFailure, entryPassFailureToast } from "../utils/entrypass-failure";
|
|
198
|
+
|
|
197
199
|
const props = defineProps({
|
|
198
200
|
siteId: {
|
|
199
201
|
type: String,
|
|
@@ -378,17 +380,17 @@ onMounted(async () => {
|
|
|
378
380
|
]);
|
|
379
381
|
accessLevelItems.value = [NO_SELECTION, ...(doorLevels.data ?? [])];
|
|
380
382
|
liftAccessLevelItems.value = [NO_SELECTION, ...(liftLevels.data ?? [])];
|
|
381
|
-
} catch {
|
|
383
|
+
} catch (error) {
|
|
384
|
+
// DV-0887: say what failed rather than one generic message.
|
|
382
385
|
emit(
|
|
383
386
|
"error",
|
|
384
|
-
|
|
387
|
+
entryPassFailureToast(
|
|
388
|
+
describeEntryPassFailure(error, ["door locations", "lift access levels"])
|
|
389
|
+
)
|
|
385
390
|
);
|
|
386
391
|
}
|
|
387
392
|
} else {
|
|
388
|
-
emit(
|
|
389
|
-
"error",
|
|
390
|
-
"EntryPass server is unavailable. Please contact your administrator."
|
|
391
|
-
);
|
|
393
|
+
emit("error", entryPassFailureToast(describeEntryPassFailure(acmResult.reason)));
|
|
392
394
|
}
|
|
393
395
|
levelsLoading.value = false;
|
|
394
396
|
});
|
|
@@ -835,8 +835,9 @@ async function confirmAssign() {
|
|
|
835
835
|
emit("refresh");
|
|
836
836
|
} catch (e: any) {
|
|
837
837
|
const rawMsg = e?.data?.message ?? "";
|
|
838
|
+
// DV-0887: EntryPass's own answer is shown rather than one generic message.
|
|
838
839
|
const msg = rawMsg.includes("500")
|
|
839
|
-
?
|
|
840
|
+
? `EntryPass could not assign the card. It answered: "${rawMsg}".`
|
|
840
841
|
: rawMsg || "Failed to assign. Please try again.";
|
|
841
842
|
assignError.value = msg;
|
|
842
843
|
showToast(msg, "error");
|
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.652",
|
|
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.",
|
|
@@ -57,7 +57,7 @@ export function describeEntryPassFailure(
|
|
|
57
57
|
return {
|
|
58
58
|
kind: "not-set-up",
|
|
59
59
|
title: "EntryPass is not set up for this site.",
|
|
60
|
-
body: "Door locations and access groups come from EntryPass, so a physical card can't be added yet. Ask an administrator to set the
|
|
60
|
+
body: "Door locations and access groups come from EntryPass, so a physical card can't be added yet. Ask an administrator to set the Entrypass URL in Site Settings > Entry Pass > Entrypass.",
|
|
61
61
|
detail: "",
|
|
62
62
|
};
|
|
63
63
|
}
|