@7365admin1/core 3.0.0 → 3.0.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @iservice365/core
2
2
 
3
+ ## 3.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - b35fe2a: fix block level unit vehicle
8
+
9
+ ## 3.0.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 3ff8697: Fix block level lookup
14
+
3
15
  ## 3.0.0
4
16
 
5
17
  ### Major Changes
package/dist/index.js CHANGED
@@ -21505,7 +21505,7 @@ function useVisitorTransactionRepo() {
21505
21505
  pipeline: [
21506
21506
  {
21507
21507
  $match: {
21508
- $expr: { $eq: [{ $toString: "$_id" }, "$$blockId"] }
21508
+ $expr: { $eq: ["$_id", "$$blockId"] }
21509
21509
  }
21510
21510
  },
21511
21511
  { $project: { _id: 1, name: 1, block: 1 } }
@@ -21521,7 +21521,7 @@ function useVisitorTransactionRepo() {
21521
21521
  pipeline: [
21522
21522
  {
21523
21523
  $match: {
21524
- $expr: { $eq: [{ $toString: "$_id" }, "$$levelId"] }
21524
+ $expr: { $eq: ["$_id", "$$levelId"] }
21525
21525
  }
21526
21526
  },
21527
21527
  { $project: { _id: 1, name: 1 } }
@@ -21533,11 +21533,11 @@ function useVisitorTransactionRepo() {
21533
21533
  {
21534
21534
  $lookup: {
21535
21535
  from: "building-units",
21536
- let: { unitId: { $toString: "$unit" } },
21536
+ let: { unitId: "$unit" },
21537
21537
  pipeline: [
21538
21538
  {
21539
21539
  $match: {
21540
- $expr: { $eq: [{ $toString: "$_id" }, "$$unitId"] }
21540
+ $expr: { $eq: ["$_id", "$$unitId"] }
21541
21541
  }
21542
21542
  },
21543
21543
  { $project: { _id: 1, name: 1 } }
@@ -21792,7 +21792,9 @@ function useVisitorTransactionRepo() {
21792
21792
  }
21793
21793
  }
21794
21794
  async function resendEmailInvitedResident(visitorId, updatedBy) {
21795
- const updatedDocument = await collection.findOne({ _id: await convertObjectIdUtil(visitorId) });
21795
+ const updatedDocument = await collection.findOne({
21796
+ _id: await convertObjectIdUtil(visitorId)
21797
+ });
21796
21798
  if (!updatedDocument?.email)
21797
21799
  return;
21798
21800
  if (!updatedDocument?._id)
@@ -21827,7 +21829,12 @@ function useVisitorTransactionRepo() {
21827
21829
  });
21828
21830
  let response = null;
21829
21831
  if (updatedDocument?.email) {
21830
- await sendEmail({ to: updatedDocument.email, subject: "Visitor Invitation", text: html, html }).then(async (msg) => {
21832
+ await sendEmail({
21833
+ to: updatedDocument.email,
21834
+ subject: "Visitor Invitation",
21835
+ text: html,
21836
+ html
21837
+ }).then(async (msg) => {
21831
21838
  response = { success: true, message: `Email Sent Successfully` };
21832
21839
  console.log(msg);
21833
21840
  const emailSending = {
@@ -21850,7 +21857,10 @@ function useVisitorTransactionRepo() {
21850
21857
  ]);
21851
21858
  }).catch(async (err) => {
21852
21859
  console.log("catch error sending email: ", err);
21853
- response = { success: false, message: `Failed Sending Email. Verify if email is correct then try again.` };
21860
+ response = {
21861
+ success: false,
21862
+ message: `Failed Sending Email. Verify if email is correct then try again.`
21863
+ };
21854
21864
  console.log(err);
21855
21865
  const emailSending = {
21856
21866
  status: "failed",
@@ -22289,7 +22299,7 @@ function useVehicleRepo() {
22289
22299
  pipeline: [
22290
22300
  {
22291
22301
  $match: {
22292
- $expr: { $eq: [{ $toString: "$_id" }, "$$blockId"] }
22302
+ $expr: { $eq: ["$_id", "$$blockId"] }
22293
22303
  }
22294
22304
  },
22295
22305
  { $project: { _id: 1, name: 1, block: 1 } }
@@ -22305,7 +22315,7 @@ function useVehicleRepo() {
22305
22315
  pipeline: [
22306
22316
  {
22307
22317
  $match: {
22308
- $expr: { $eq: [{ $toString: "$_id" }, "$$levelId"] }
22318
+ $expr: { $eq: ["$_id", "$$levelId"] }
22309
22319
  }
22310
22320
  },
22311
22321
  { $project: { _id: 1, name: 1 } }
@@ -22317,11 +22327,11 @@ function useVehicleRepo() {
22317
22327
  {
22318
22328
  $lookup: {
22319
22329
  from: "building-units",
22320
- let: { unitId: { $toString: "$unit" } },
22330
+ let: { unitId: "$unit" },
22321
22331
  pipeline: [
22322
22332
  {
22323
22333
  $match: {
22324
- $expr: { $eq: [{ $toString: "$_id" }, "$$unitId"] }
22334
+ $expr: { $eq: ["$_id", "$$unitId"] }
22325
22335
  }
22326
22336
  },
22327
22337
  { $project: { _id: 1, name: 1 } }