@7365admin1/core 3.32.2-staging.34 → 3.32.2-staging.35

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.
package/dist/index.js CHANGED
@@ -25328,9 +25328,9 @@ function usePersonRepo() {
25328
25328
  { email: { $regex: search, $options: "i" } },
25329
25329
  { nric: { $regex: search, $options: "i" } },
25330
25330
  { "plates.plateNumber": { $regex: search, $options: "i" } },
25331
- { contact: { $regex: makeContainsRegex(contact) } },
25332
- { contacts: { $regex: makeContainsRegex(contact) } },
25333
- { plateNumbers: { $regex: makeContainsRegex(plateNumber) } }
25331
+ { contact: { $regex: makeContainsRegex(search) } },
25332
+ { contacts: { $regex: makeContainsRegex(search) } },
25333
+ { plateNumbers: { $regex: makeContainsRegex(search) } }
25334
25334
  ]
25335
25335
  },
25336
25336
  ...import_mongodb45.ObjectId.isValid(org) && { org: new import_mongodb45.ObjectId(org) },
@@ -35702,7 +35702,7 @@ function useVisitorTransactionService() {
35702
35702
  value.unitName = unit?.name;
35703
35703
  }
35704
35704
  const { nric = "", name = "", contact = "", plateNumber = "", email = "", site = "", type = "guest", company, createdBy } = value;
35705
- if (/^(guest|walk-in|contractor|delivery)$/.test(type)) {
35705
+ if (/^(guest|walk-in|contractor|delivery)$/.test(type) && site) {
35706
35706
  await addUpdateFromVisitor({
35707
35707
  nric,
35708
35708
  name,
@@ -35933,7 +35933,7 @@ function useVisitorTransactionService() {
35933
35933
  value.checkIn = isNaN(parsed.getTime()) ? null : parsed;
35934
35934
  }
35935
35935
  const { nric = "", name = "", contact = "", plateNumber = "", email = "", site = "", type = "guest", company, createdBy } = value;
35936
- if (/^(guest|walk-in|contractor|delivery)$/.test(type) && !value.checkOut) {
35936
+ if (/^(guest|walk-in|contractor|delivery)$/.test(type) && site) {
35937
35937
  await addUpdateFromVisitor({
35938
35938
  nric,
35939
35939
  name,
@@ -36117,7 +36117,9 @@ function useVisitorTransactionService() {
36117
36117
  value.site,
36118
36118
  session,
36119
36119
  void 0,
36120
- id
36120
+ id,
36121
+ void 0,
36122
+ true
36121
36123
  );
36122
36124
  item.receivedDate = /* @__PURE__ */ new Date();
36123
36125
  item.status = "Not Returned" /* NOT_RETURNED */;
@@ -36166,7 +36168,9 @@ function useVisitorTransactionService() {
36166
36168
  value.site,
36167
36169
  session,
36168
36170
  void 0,
36169
- id
36171
+ id,
36172
+ void 0,
36173
+ true
36170
36174
  );
36171
36175
  item.receivedDate = /* @__PURE__ */ new Date();
36172
36176
  item.status = "Not Returned" /* NOT_RETURNED */;