no plan form/ check

This commit is contained in:
knighthawk4227 committed 2025-05-20 12:57:17 -07:00
1 parent de99301738
commit ef858bcf00
3 files changed
+29 -4

No files matched your search

+10 -3
View File
@@ -3,7 +3,9 @@ const crypto = require('crypto');
const joi = require('joi');
const nodeMail = require('nodemailer');
const bcrypt = require('bcrypt');
const path = require('path');
require('dotenv').config();
const PATH = path.join(__dirname, '..', 'public', 'images', 'wallet.png');
const PORT = process.env.PORT;
@@ -40,7 +42,7 @@ module.exports = (users) => {
const token = crypto.randomBytes(32).toString('hex');
console.log(`The reset token is ${token}`)
const expiration = Date.now() + 360000;
const expiration = Date.now() + 3600000;
await users.updateOne({ email }, {
$set: { resetToken: token, resetTokenExpires: expiration }
@@ -52,8 +54,13 @@ module.exports = (users) => {
from: process.env.EMAIL_USER,
to: email,
subject: 'Password reset',
text: `reset your password here ${resetUrl} this link will expire within 1 hour`,
text: `reset your password here ${resetUrl} this link will expire within 1 hour, \n Do not share this link with anyone
\n \n Thankyou, The RCalculator team.`,
html: `
<p>Reset your password <a href="${resetUrl}">here</a>. This link will expire in 1 hour.</p>
<p><img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/rekor.png" alt="wallet icon" width="150"/></p>
<p>Thank you,<br/>The RCalculator team</p>`,
};
try {
Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

+19 -1
View File
@@ -13,9 +13,27 @@
</div>
<div class="w-full">
<div class="mb-12 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-y-4 gap-x-6">
<% plans.forEach(plan=> { %>
<% if (plans.length === 0) { %>
<div class="col-span-1 col-start-2 ml-28 mt-25">
<div class="w-86 p-4 bg-white rounded-lg shadow-xl border border-slate-200">
<h1 class="text-2xl block text-center font-semibold text-slate-700">Don't have any retirement plans? </h1>
<div class="mt-4 flex justify-center items-center">
<div class="mt-4 flex justify-center">
<a href="/plans" class="cursor-pointer border-2 border-indigo-600 bg-indigo-600 text-white py-2 px-6
rounded-md hover:bg-indigo-700 hover:border-indigo-700 font-semibold
transition-colors duration-200 focus:outline-none focus:ring-2
focus:ring-indigo-500 focus:ring-offset-2">Make one</a>
</div>
</div>
</div>
</div>
<% } %>
<% plans.forEach(plan=> { %>
<%- include('./partials/dashboardBox.ejs', {thing: plan}) %>
<% }); %>
</div>
</div>
</main>