@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 +12 -0
- package/dist/index.js +21 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -21270,7 +21270,7 @@ function useVisitorTransactionRepo() {
|
|
|
21270
21270
|
pipeline: [
|
|
21271
21271
|
{
|
|
21272
21272
|
$match: {
|
|
21273
|
-
$expr: { $eq: [
|
|
21273
|
+
$expr: { $eq: ["$_id", "$$blockId"] }
|
|
21274
21274
|
}
|
|
21275
21275
|
},
|
|
21276
21276
|
{ $project: { _id: 1, name: 1, block: 1 } }
|
|
@@ -21286,7 +21286,7 @@ function useVisitorTransactionRepo() {
|
|
|
21286
21286
|
pipeline: [
|
|
21287
21287
|
{
|
|
21288
21288
|
$match: {
|
|
21289
|
-
$expr: { $eq: [
|
|
21289
|
+
$expr: { $eq: ["$_id", "$$levelId"] }
|
|
21290
21290
|
}
|
|
21291
21291
|
},
|
|
21292
21292
|
{ $project: { _id: 1, name: 1 } }
|
|
@@ -21298,11 +21298,11 @@ function useVisitorTransactionRepo() {
|
|
|
21298
21298
|
{
|
|
21299
21299
|
$lookup: {
|
|
21300
21300
|
from: "building-units",
|
|
21301
|
-
let: { unitId:
|
|
21301
|
+
let: { unitId: "$unit" },
|
|
21302
21302
|
pipeline: [
|
|
21303
21303
|
{
|
|
21304
21304
|
$match: {
|
|
21305
|
-
$expr: { $eq: [
|
|
21305
|
+
$expr: { $eq: ["$_id", "$$unitId"] }
|
|
21306
21306
|
}
|
|
21307
21307
|
},
|
|
21308
21308
|
{ $project: { _id: 1, name: 1 } }
|
|
@@ -21557,7 +21557,9 @@ function useVisitorTransactionRepo() {
|
|
|
21557
21557
|
}
|
|
21558
21558
|
}
|
|
21559
21559
|
async function resendEmailInvitedResident(visitorId, updatedBy) {
|
|
21560
|
-
const updatedDocument = await collection.findOne({
|
|
21560
|
+
const updatedDocument = await collection.findOne({
|
|
21561
|
+
_id: await convertObjectIdUtil(visitorId)
|
|
21562
|
+
});
|
|
21561
21563
|
if (!updatedDocument?.email)
|
|
21562
21564
|
return;
|
|
21563
21565
|
if (!updatedDocument?._id)
|
|
@@ -21592,7 +21594,12 @@ function useVisitorTransactionRepo() {
|
|
|
21592
21594
|
});
|
|
21593
21595
|
let response = null;
|
|
21594
21596
|
if (updatedDocument?.email) {
|
|
21595
|
-
await sendEmail({
|
|
21597
|
+
await sendEmail({
|
|
21598
|
+
to: updatedDocument.email,
|
|
21599
|
+
subject: "Visitor Invitation",
|
|
21600
|
+
text: html,
|
|
21601
|
+
html
|
|
21602
|
+
}).then(async (msg) => {
|
|
21596
21603
|
response = { success: true, message: `Email Sent Successfully` };
|
|
21597
21604
|
console.log(msg);
|
|
21598
21605
|
const emailSending = {
|
|
@@ -21615,7 +21622,10 @@ function useVisitorTransactionRepo() {
|
|
|
21615
21622
|
]);
|
|
21616
21623
|
}).catch(async (err) => {
|
|
21617
21624
|
console.log("catch error sending email: ", err);
|
|
21618
|
-
response = {
|
|
21625
|
+
response = {
|
|
21626
|
+
success: false,
|
|
21627
|
+
message: `Failed Sending Email. Verify if email is correct then try again.`
|
|
21628
|
+
};
|
|
21619
21629
|
console.log(err);
|
|
21620
21630
|
const emailSending = {
|
|
21621
21631
|
status: "failed",
|
|
@@ -22063,7 +22073,7 @@ function useVehicleRepo() {
|
|
|
22063
22073
|
pipeline: [
|
|
22064
22074
|
{
|
|
22065
22075
|
$match: {
|
|
22066
|
-
$expr: { $eq: [
|
|
22076
|
+
$expr: { $eq: ["$_id", "$$blockId"] }
|
|
22067
22077
|
}
|
|
22068
22078
|
},
|
|
22069
22079
|
{ $project: { _id: 1, name: 1, block: 1 } }
|
|
@@ -22079,7 +22089,7 @@ function useVehicleRepo() {
|
|
|
22079
22089
|
pipeline: [
|
|
22080
22090
|
{
|
|
22081
22091
|
$match: {
|
|
22082
|
-
$expr: { $eq: [
|
|
22092
|
+
$expr: { $eq: ["$_id", "$$levelId"] }
|
|
22083
22093
|
}
|
|
22084
22094
|
},
|
|
22085
22095
|
{ $project: { _id: 1, name: 1 } }
|
|
@@ -22091,11 +22101,11 @@ function useVehicleRepo() {
|
|
|
22091
22101
|
{
|
|
22092
22102
|
$lookup: {
|
|
22093
22103
|
from: "building-units",
|
|
22094
|
-
let: { unitId:
|
|
22104
|
+
let: { unitId: "$unit" },
|
|
22095
22105
|
pipeline: [
|
|
22096
22106
|
{
|
|
22097
22107
|
$match: {
|
|
22098
|
-
$expr: { $eq: [
|
|
22108
|
+
$expr: { $eq: ["$_id", "$$unitId"] }
|
|
22099
22109
|
}
|
|
22100
22110
|
},
|
|
22101
22111
|
{ $project: { _id: 1, name: 1 } }
|