@7365admin1/layer-common 4.0.4-staging.237 → 4.0.4-staging.238

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;
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.237",
5
+ "version": "4.0.4-staging.238",
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.",