@7365admin1/layer-common 4.0.4-staging.237 → 4.0.4-staging.239
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.
|
@@ -960,7 +960,6 @@ async function checkPeopleById() {
|
|
|
960
960
|
if (!vehicle.unit || prop.mode === "edit" || prefillingRecords.value) return;
|
|
961
961
|
|
|
962
962
|
checkingUnit.value = true;
|
|
963
|
-
showMatchingPeopleDialog.value = true;
|
|
964
963
|
// Lock editable fields while we verify if this NRIC has existing records.
|
|
965
964
|
disablePrefilledInputs.value = true;
|
|
966
965
|
try {
|
|
@@ -971,15 +970,19 @@ async function checkPeopleById() {
|
|
|
971
970
|
|
|
972
971
|
if (Array.isArray(res) && res.length > 0) {
|
|
973
972
|
matchingPeople.value = res || [];
|
|
973
|
+
showMatchingPeopleDialog.value = true;
|
|
974
974
|
// Force selection from matched records.
|
|
975
975
|
disablePrefilledInputs.value = true;
|
|
976
976
|
} else {
|
|
977
977
|
matchingPeople.value = [];
|
|
978
|
+
showMatchingPeopleDialog.value = false;
|
|
978
979
|
// No match found, allow manual input.
|
|
979
980
|
disablePrefilledInputs.value = false;
|
|
980
981
|
}
|
|
981
982
|
} catch (error) {
|
|
982
983
|
console.error("Unit search failed:", error);
|
|
984
|
+
matchingPeople.value = [];
|
|
985
|
+
showMatchingPeopleDialog.value = false;
|
|
983
986
|
// disablePrefilledInputs.value = false;
|
|
984
987
|
} finally {
|
|
985
988
|
checkingUnit.value = false;
|
|
@@ -46,7 +46,6 @@
|
|
|
46
46
|
<span class="text-1-4rem mr-2">{{ snackBarMessage.text }}</span>
|
|
47
47
|
</div>
|
|
48
48
|
<v-btn
|
|
49
|
-
v-if="snackBarMessage.isUnregistered"
|
|
50
49
|
rounded="md"
|
|
51
50
|
variant="text"
|
|
52
51
|
color="primary"
|
|
@@ -120,7 +119,7 @@ const props = defineProps({
|
|
|
120
119
|
|
|
121
120
|
const config = useRuntimeConfig();
|
|
122
121
|
const publicConfig = config.public as Record<string, string | undefined>;
|
|
123
|
-
const route
|
|
122
|
+
const route = useRoute();
|
|
124
123
|
const { tab } = useVisitor();
|
|
125
124
|
const { enableUnregistered, ensureANPRSettings } = useANPRSettings(
|
|
126
125
|
props.siteId
|
|
@@ -200,7 +199,7 @@ const isVisitorRoute = computed(
|
|
|
200
199
|
isVisitorManagementPath(path.value)
|
|
201
200
|
);
|
|
202
201
|
const isUnregisteredVisitorRoute = computed(
|
|
203
|
-
() => isVisitorRoute.value && route.query.tab === "unregistered"
|
|
202
|
+
() => isVisitorRoute.value && (route.query as any).tab === "unregistered"
|
|
204
203
|
);
|
|
205
204
|
|
|
206
205
|
const socketBaseUrl = computed(
|
|
@@ -311,7 +310,7 @@ const goToUnregistered = async () => {
|
|
|
311
310
|
socketUnregisteredVisitorTrigger.value = true;
|
|
312
311
|
snackBarMessage.modal = false;
|
|
313
312
|
|
|
314
|
-
if (route.params
|
|
313
|
+
if ((route.params as any)?.org && (route.params as any)?.site) {
|
|
315
314
|
const defaultDateQuery = getDefaultDateQuery();
|
|
316
315
|
|
|
317
316
|
if(!APP_NAME) return;
|
|
@@ -320,8 +319,8 @@ const goToUnregistered = async () => {
|
|
|
320
319
|
path: `/${route.params.org}/${route.params.site}/${APP_NAME === "security_agency" ? "visitor-management" : APP_NAME === "property_management_agency" ? "visitor-mgmt" : "visitor-management"}`,
|
|
321
320
|
query: {
|
|
322
321
|
tab: "unregistered",
|
|
323
|
-
dateFrom: route.query.dateFrom || defaultDateQuery.dateFrom,
|
|
324
|
-
dateTo: route.query.dateTo || defaultDateQuery.dateTo,
|
|
322
|
+
dateFrom: (route.query as any).dateFrom || defaultDateQuery.dateFrom,
|
|
323
|
+
dateTo: (route.query as any).dateTo || defaultDateQuery.dateTo,
|
|
325
324
|
},
|
|
326
325
|
});
|
|
327
326
|
return;
|
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.0.4-staging.
|
|
5
|
+
"version": "4.0.4-staging.239",
|
|
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.",
|