@7365admin1/core 3.0.0 → 3.0.1
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 +6 -0
- package/dist/index.js +17 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -21505,7 +21505,7 @@ function useVisitorTransactionRepo() {
|
|
|
21505
21505
|
pipeline: [
|
|
21506
21506
|
{
|
|
21507
21507
|
$match: {
|
|
21508
|
-
$expr: { $eq: [
|
|
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: [
|
|
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:
|
|
21536
|
+
let: { unitId: "$unit" },
|
|
21537
21537
|
pipeline: [
|
|
21538
21538
|
{
|
|
21539
21539
|
$match: {
|
|
21540
|
-
$expr: { $eq: [
|
|
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({
|
|
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({
|
|
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 = {
|
|
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",
|