@7365admin1/core 3.37.0 → 3.38.0

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.mjs CHANGED
@@ -25675,7 +25675,7 @@ function usePersonRepo() {
25675
25675
  const data = await collection.find(query, { session }).limit(10).toArray();
25676
25676
  return data;
25677
25677
  } catch (error) {
25678
- throw new InternalServerError26("Failed to find many persons.");
25678
+ throw new InternalServerError26("Failed to find persons" + error);
25679
25679
  }
25680
25680
  }
25681
25681
  async function addFromVisitor(value, session) {
@@ -35718,7 +35718,7 @@ function useVisitorTransactionService() {
35718
35718
  value.checkIn = isNaN(parsed.getTime()) ? null : parsed;
35719
35719
  }
35720
35720
  const { nric = "", name = "", contact = "", plateNumber = "", email = "", site = "", type = "guest", company, createdBy } = value;
35721
- if (/^(guest|walk-in|contractor|delivery)$/.test(type)) {
35721
+ if (/^(guest|walk-in|contractor|delivery)$/.test(type) && !value.checkOut) {
35722
35722
  await addUpdateFromVisitor({
35723
35723
  nric,
35724
35724
  name,