Compare commits
17
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b3b06226ee | ||
|
|
19081e3bd3
|
||
|
|
7269814501
|
||
|
|
16f267bcd4 | ||
|
|
8998283552 | ||
|
|
5b6ce3b09d | ||
|
|
e45b7ca946
|
||
|
|
c0e2d01ea6
|
||
|
|
3d55a2b0d0 | ||
|
|
ec309fbafd | ||
|
|
c1adb31657 | ||
|
|
05fa5558e3 | ||
|
|
d2e69f230f | ||
|
|
0672981e69 | ||
|
|
d6425043cf
|
||
|
|
cf3d3738f1
|
||
|
|
cc6fd937db |
No files matched your search
@@ -47,7 +47,7 @@ module.exports = (users) => {
|
|||||||
$set: { resetToken: token, resetTokenExpires: expiration }
|
$set: { resetToken: token, resetTokenExpires: expiration }
|
||||||
});
|
});
|
||||||
|
|
||||||
const resetUrl = `http://localhost:${PORT}/reset/${token}`;
|
const resetUrl = `https://rcalculator.sowinski.dev/${PORT}/reset/${token}`;
|
||||||
|
|
||||||
const mailSend = {
|
const mailSend = {
|
||||||
from: process.env.EMAIL_USER,
|
from: process.env.EMAIL_USER,
|
||||||
|
|||||||
@@ -6,6 +6,13 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
const newPlanError = document.getElementById('newPlanError');
|
const newPlanError = document.getElementById('newPlanError');
|
||||||
const resetNewPlanFormBtn = document.getElementById('resetNewPlanFormBtn');
|
const resetNewPlanFormBtn = document.getElementById('resetNewPlanFormBtn');
|
||||||
|
|
||||||
|
let url = new URLSearchParams(window.location.search);
|
||||||
|
let modalValue = url.get('openModal');
|
||||||
|
|
||||||
|
if (modalValue === 'true') {
|
||||||
|
newPlanDialog.showModal();
|
||||||
|
}
|
||||||
|
|
||||||
openModalBtn.addEventListener('click', () => {
|
openModalBtn.addEventListener('click', () => {
|
||||||
newPlanDialog.showModal();
|
newPlanDialog.showModal();
|
||||||
// Error reset is now handled by 'close' event, but good to clear on open too
|
// Error reset is now handled by 'close' event, but good to clear on open too
|
||||||
|
|||||||
+31
-13
@@ -24,7 +24,7 @@ const getAssetSchema = (type) => {
|
|||||||
assetSchema = joi.object({
|
assetSchema = joi.object({
|
||||||
type: joi.string().valid("other", "stock", "saving").required(),
|
type: joi.string().valid("other", "stock", "saving").required(),
|
||||||
icon: joi.string().alphanum().required(),
|
icon: joi.string().alphanum().required(),
|
||||||
name: joi.string().alphanum().min(3).max(30).required(),
|
name: joi.string().min(3).max(30).required(),
|
||||||
value: joi.number().min(0).required(),
|
value: joi.number().min(0).required(),
|
||||||
year: joi.number().min(1900).max(new Date().getFullYear()),
|
year: joi.number().min(1900).max(new Date().getFullYear()),
|
||||||
purchaseDate: joi.date().required(),
|
purchaseDate: joi.date().required(),
|
||||||
@@ -36,7 +36,7 @@ const getAssetSchema = (type) => {
|
|||||||
case "saving":
|
case "saving":
|
||||||
assetSchema = joi.object({
|
assetSchema = joi.object({
|
||||||
type: joi.string().valid("other", "stock", "saving").required(),
|
type: joi.string().valid("other", "stock", "saving").required(),
|
||||||
name: joi.string().alphanum().min(3).max(30).required(),
|
name: joi.string().min(3).max(30).required(),
|
||||||
value: joi.number().min(0).required(),
|
value: joi.number().min(0).required(),
|
||||||
id: joi.string().alphanum(), // May be passed when updating existing asset
|
id: joi.string().alphanum(), // May be passed when updating existing asset
|
||||||
userId: joi.string().alphanum(),
|
userId: joi.string().alphanum(),
|
||||||
@@ -45,7 +45,7 @@ const getAssetSchema = (type) => {
|
|||||||
case "stock":
|
case "stock":
|
||||||
assetSchema = joi.object({
|
assetSchema = joi.object({
|
||||||
type: joi.string().valid("other", "stock", "saving").required(),
|
type: joi.string().valid("other", "stock", "saving").required(),
|
||||||
ticker: joi.string().alphanum().min(3).max(5).required(),
|
ticker: joi.string().min(3).max(5).required(),
|
||||||
price: joi.number().min(0).required(),
|
price: joi.number().min(0).required(),
|
||||||
quantity: joi.number().min(1).required(),
|
quantity: joi.number().min(1).required(),
|
||||||
purchaseDate: joi.date().required(),
|
purchaseDate: joi.date().required(),
|
||||||
@@ -109,6 +109,12 @@ module.exports = (middleware, users, plans, assets) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
router.get('/assets', async (req, res) => {
|
router.get('/assets', async (req, res) => {
|
||||||
|
|
||||||
|
if (!req.session.user.financialData || !req.session.user) {
|
||||||
|
req.session.errMessage = "Please complete your financial data before creating a plan.";
|
||||||
|
return res.status(status.Unauthorized).redirect('/questionnaire');
|
||||||
|
}
|
||||||
|
|
||||||
let userAssets = await assets.find({ userId: new ObjectId(req.session.userId) }).toArray();
|
let userAssets = await assets.find({ userId: new ObjectId(req.session.userId) }).toArray();
|
||||||
let totalUserAssetValue = await calculateTotalAssetValue(userAssets);
|
let totalUserAssetValue = await calculateTotalAssetValue(userAssets);
|
||||||
|
|
||||||
@@ -124,6 +130,12 @@ module.exports = (middleware, users, plans, assets) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
router.get('/plans', async (req, res) => {
|
router.get('/plans', async (req, res) => {
|
||||||
|
|
||||||
|
if (!req.session.user.financialData || !req.session.user) {
|
||||||
|
req.session.errMessage = "Please complete your financial data before creating a plan.";
|
||||||
|
return res.status(status.Unauthorized).redirect('/questionnaire');
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
const updatedUserPlans = await updateProgress(plans, assets, users, req.session.user._id);
|
const updatedUserPlans = await updateProgress(plans, assets, users, req.session.user._id);
|
||||||
@@ -177,21 +189,27 @@ module.exports = (middleware, users, plans, assets) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
router.get('/newPlan', (req, res) => {
|
// router.get('/newPlan', (req, res) => {
|
||||||
|
// if (!req.session.user.financialData || !req.session.user) {
|
||||||
|
// req.session.errMessage = "Please complete your financial data before creating a plan.";
|
||||||
|
// return res.status(status.Unauthorized).redirect('/questionnaire');
|
||||||
|
// }
|
||||||
|
// const errMessage = req.session.errMessage;
|
||||||
|
// req.session.errMessage = "";
|
||||||
|
// res.render('newPlan', {
|
||||||
|
// user: req.session.user,
|
||||||
|
// errMessage: errMessage,
|
||||||
|
// geoData: req.session.geoData
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
|
||||||
|
router.post('/newPlan', async (req, res) => {
|
||||||
|
|
||||||
if (!req.session.user.financialData || !req.session.user) {
|
if (!req.session.user.financialData || !req.session.user) {
|
||||||
req.session.errMessage = "Please complete your financial data before creating a plan.";
|
req.session.errMessage = "Please complete your financial data before creating a plan.";
|
||||||
return res.status(status.Unauthorized).redirect('/questionnaire');
|
return res.status(status.Unauthorized).redirect('/questionnaire');
|
||||||
}
|
}
|
||||||
const errMessage = req.session.errMessage;
|
|
||||||
req.session.errMessage = "";
|
|
||||||
res.render('newPlan', {
|
|
||||||
user: req.session.user,
|
|
||||||
errMessage: errMessage,
|
|
||||||
geoData: req.session.geoData
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
router.post('/newPlan', async (req, res) => {
|
|
||||||
const planSchema = joi.object({
|
const planSchema = joi.object({
|
||||||
name: joi.string().min(3).max(100).required(),
|
name: joi.string().min(3).max(100).required(),
|
||||||
retirementAge: joi.number().min(18).max(120).required(),
|
retirementAge: joi.number().min(18).max(120).required(),
|
||||||
|
|||||||
@@ -45,17 +45,27 @@ async function updatePlanProgressInDB(planId, percentage, plans) {
|
|||||||
async function calculateTotalAssetValue(assets) {
|
async function calculateTotalAssetValue(assets) {
|
||||||
if (!assets || typeof assets.find !== 'function') {
|
if (!assets || typeof assets.find !== 'function') {
|
||||||
console.error("Error with the assets collection");
|
console.error("Error with the assets collection");
|
||||||
return;
|
return 0;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let totalAssetValue = 0;
|
let totalAssetValue = 0;
|
||||||
|
const today = new Date();
|
||||||
|
|
||||||
for (const asset of assets) {
|
for (const asset of assets) {
|
||||||
if(asset.icon == "Motorcycle" || asset.icon == "Car"){
|
if (asset.icon === "Motorcycle" || asset.icon === "Car") {
|
||||||
today = new Date();
|
if (asset.value < 1000) {
|
||||||
asset.year = new Date(asset.year).getFullYear();
|
totalAssetValue += asset.value;
|
||||||
let age = today.getFullYear() - asset.year;
|
} else {
|
||||||
let value = asset.value * Math.pow(0.85, age);
|
const assetYear = new Date(asset.year).getFullYear();
|
||||||
totalAssetValue += value;
|
const age = today.getFullYear() - assetYear;
|
||||||
|
let depreciatedValue = asset.value * Math.pow(0.85, age);
|
||||||
|
|
||||||
|
if (depreciatedValue < 1000) {
|
||||||
|
totalAssetValue += 1000;
|
||||||
|
} else {
|
||||||
|
totalAssetValue += depreciatedValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
totalAssetValue += asset.value;
|
totalAssetValue += asset.value;
|
||||||
}
|
}
|
||||||
@@ -119,6 +129,10 @@ async function calculateProgress(plan, assets, users, userId) {
|
|||||||
|
|
||||||
const percentageCalculated = (totalUserAssetValue / (totalUserPlanValue + totalCostOfRetirement)) * 100;
|
const percentageCalculated = (totalUserAssetValue / (totalUserPlanValue + totalCostOfRetirement)) * 100;
|
||||||
|
|
||||||
|
if (monthsUntilRetirement <= 0) {
|
||||||
|
return { monthlyInvestment: 0, totalCostOfRetirement: totalCostOfRetirement, monthsUntilRetirement: 0, yearsRetired: yearsRetired, yearsUntilRetirement: 0, percentage: 0 };
|
||||||
|
}
|
||||||
|
|
||||||
const progress = {};
|
const progress = {};
|
||||||
|
|
||||||
progress.monthlyInvestment = Math.round(monthlyInvestment);
|
progress.monthlyInvestment = Math.round(monthlyInvestment);
|
||||||
|
|||||||
@@ -25,11 +25,14 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="w-md my-6 max-w-md mx-auto px-4 flex flex-row justify-between">
|
<div class="w-md my-6 max-w-md mx-auto px-4 flex flex-row justify-between">
|
||||||
<a href="/home" class="text-center w-sm py-2 mx-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
|
<a href="/home" class="text-center w-sm py-2 mx-2 px-4 border
|
||||||
|
border-transparent rounded-md shadow-sm text-sm font-medium
|
||||||
|
text-white bg-blue-600 hover:bg-blue-700 focus:outline-none">
|
||||||
Back to Dashboard
|
Back to Dashboard
|
||||||
</a>
|
</a>
|
||||||
<button
|
<button
|
||||||
class="text-center w-sm py-2 py-2 mx-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-pointer"
|
class="text-center w-sm py-2 py-2 mx-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600
|
||||||
|
hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-pointer"
|
||||||
onclick="document.getElementById('create-asset-modal').showModal()"
|
onclick="document.getElementById('create-asset-modal').showModal()"
|
||||||
>
|
>
|
||||||
Add New Asset
|
Add New Asset
|
||||||
|
|||||||
@@ -3,26 +3,27 @@
|
|||||||
|
|
||||||
<main class="pt-24 pb-14">
|
<main class="pt-24 pb-14">
|
||||||
<!-- Buttons -->
|
<!-- Buttons -->
|
||||||
<div class="flex justify-end gap-4 px-5 py-6">
|
<div class="flex md:justify-end justify-center gap-4 px-5 py-6 md:py-0">
|
||||||
<a href="/assets?popup"
|
<a href="/assets?popup"
|
||||||
class="text-center cursor-pointer min-w-[150px] bg-green-600 px-4 py-2 text-white rounded hover:bg-green-800"
|
id="addAss" class="text-center cursor-pointer min-w-[150px] bg-green-600 px-4 py-2 text-white rounded hover:bg-green-800"
|
||||||
type="button">Add Asset</a>
|
type="button">Add Asset</a>
|
||||||
<a href="/newPlan"
|
<a href="/plans?openModal=true"
|
||||||
class="text-center cursor-pointer min-w-[150px] bg-green-600 px-4 py-2 text-white rounded hover:bg-green-800"
|
class="text-center cursor-pointer min-w-[150px] bg-green-600 px-4 py-2 text-white rounded hover:bg-green-800"
|
||||||
type="button">Create new plan </a>
|
type="button">Create new plan </a>
|
||||||
</div>
|
</div>
|
||||||
<div class="w-full">
|
<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">
|
<div class="mb-12 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-y-4 gap-x-6">
|
||||||
<% if (plans.length === 0) { %>
|
<% if (plans.length === 0) { %>
|
||||||
<div class="col-span-1 col-start-2 ml-28 mt-25">
|
<div class="flex justify-center md:col-start-2">
|
||||||
|
<div class="col-span-1 mt-25">
|
||||||
<div class="w-86 p-4 bg-white rounded-lg shadow-xl border border-slate-200">
|
<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>
|
<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 items-center">
|
||||||
<div class="mt-4 flex justify-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
|
<a href="/plans" class="cursor-pointer border-2 border-blue-600 bg-blue-600 text-white py-2 px-6
|
||||||
rounded-md hover:bg-indigo-700 hover:border-indigo-700 font-semibold
|
rounded-md hover:bg-blue-700 hover:border-blue-700 font-semibold
|
||||||
transition-colors duration-200 focus:outline-none focus:ring-2
|
transition-colors duration-200 focus:outline-none ">Make one</a>
|
||||||
focus:ring-indigo-500 focus:ring-offset-2">Make one</a>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -10,44 +10,44 @@
|
|||||||
<div>
|
<div>
|
||||||
<label for="name" class="block text-sm font-medium text-gray-300">Plan Name <span class="text-red-500">*</span></label>
|
<label for="name" class="block text-sm font-medium text-gray-300">Plan Name <span class="text-red-500">*</span></label>
|
||||||
<input type="text" name="name" id="name" value="<%= plan.name %>" required
|
<input type="text" name="name" id="name" value="<%= plan.name %>" required
|
||||||
class="mt-1 block w-full px-4 py-2 border border-gray-600 rounded-md shadow-sm bg-gray-700 text-white focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm placeholder-gray-400">
|
class="mt-1 block w-full px-4 py-2 border border-gray-600 rounded-md shadow-sm bg-gray-700 text-white focus:ring-blue-500 focus:border-blue-500 sm:text-sm placeholder-gray-400">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label for="retirementAge" class="block text-sm font-medium text-gray-300">Desired Retirement Age <span class="text-red-500">*</span></label>
|
<label for="retirementAge" class="block text-sm font-medium text-gray-300">Desired Retirement Age <span class="text-red-500">*</span></label>
|
||||||
<input type="number" name="retirementAge" id="retirementAge" value="<%= plan.retirementAge %>" required min="18"
|
<input type="number" name="retirementAge" id="retirementAge" value="<%= plan.retirementAge %>" required min="18"
|
||||||
class="mt-1 block w-full px-4 py-2 border border-gray-600 rounded-md shadow-sm bg-gray-700 text-white focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm placeholder-gray-400">
|
class="mt-1 block w-full px-4 py-2 border border-gray-600 rounded-md shadow-sm bg-gray-700 text-white focus:ring-blue-500 focus:border-blue-500 sm:text-sm placeholder-gray-400">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label for="retirementExpenses" class="block text-sm font-medium text-gray-300">Estimated Monthly Expenses at Retirement (<%= geoData.currency || 'CAD' %>) <span class="text-red-500">*</span></label>
|
<label for="retirementExpenses" class="block text-sm font-medium text-gray-300">Estimated Monthly Expenses at Retirement (<%= geoData.currency || 'CAD' %>) <span class="text-red-500">*</span></label>
|
||||||
<input type="number" name="retirementExpenses" id="retirementExpenses" value="<%= plan.retirementExpenses %>" required min="0" step="any"
|
<input type="number" name="retirementExpenses" id="retirementExpenses" value="<%= plan.retirementExpenses %>" required min="0" step="any"
|
||||||
class="mt-1 block w-full px-4 py-2 border border-gray-600 rounded-md shadow-sm bg-gray-700 text-white focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm placeholder-gray-400">
|
class="mt-1 block w-full px-4 py-2 border border-gray-600 rounded-md shadow-sm bg-gray-700 text-white focus:ring-blue-500 focus:border-blue-500 sm:text-sm placeholder-gray-400">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label for="retirementAssets" class="block text-sm font-medium text-gray-300">Target Retirement Assets (<%= geoData.currency || 'CAD' %>) <span class="text-red-500">*</span></label>
|
<label for="retirementAssets" class="block text-sm font-medium text-gray-300">Target Retirement Assets (<%= geoData.currency || 'CAD' %>) <span class="text-red-500">*</span></label>
|
||||||
<input type="number" name="retirementAssets" id="retirementAssets" value="<%= plan.retirementAssets %>" required min="0" step="any"
|
<input type="number" name="retirementAssets" id="retirementAssets" value="<%= plan.retirementAssets %>" required min="0" step="any"
|
||||||
class="mt-1 block w-full px-4 py-2 border border-gray-600 rounded-md shadow-sm bg-gray-700 text-white focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm placeholder-gray-400">
|
class="mt-1 block w-full px-4 py-2 border border-gray-600 rounded-md shadow-sm bg-gray-700 text-white focus:ring-blue-500 focus:border-blue-500 sm:text-sm placeholder-gray-400">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label for="retirementLiabilities" class="block text-sm font-medium text-gray-300">Estimated Monthly Liabilities at Retirement (<%= geoData.currency || 'CAD' %>) <span class="text-red-500">*</span></label>
|
<label for="retirementLiabilities" class="block text-sm font-medium text-gray-300">Estimated Monthly Liabilities at Retirement (<%= geoData.currency || 'CAD' %>) <span class="text-red-500">*</span></label>
|
||||||
<input type="number" name="retirementLiabilities" id="retirementLiabilities" value="<%= plan.retirementLiabilities %>" required min="0" step="any"
|
<input type="number" name="retirementLiabilities" id="retirementLiabilities" value="<%= plan.retirementLiabilities %>" required min="0" step="any"
|
||||||
class="mt-1 block w-full px-4 py-2 border border-gray-600 rounded-md shadow-sm bg-gray-700 text-white focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm placeholder-gray-400">
|
class="mt-1 block w-full px-4 py-2 border border-gray-600 rounded-md shadow-sm bg-gray-700 text-white focus:ring-blue-500 focus:border-blue-500 sm:text-sm placeholder-gray-400">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="formErrorMessages" class="text-red-400 text-sm my-2" style="display: none;"></div>
|
<div id="formErrorMessages" class="text-red-400 text-sm my-2" style="display: none;"></div>
|
||||||
|
|
||||||
<div class="flex items-center justify-center space-x-4 pt-4">
|
<div class="flex items-center justify-center space-x-4 pt-4">
|
||||||
<button type="submit"
|
<button type="submit"
|
||||||
class="inline-flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-indigo-500">
|
class="inline-flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-blue-500">
|
||||||
Save Changes
|
Save Changes
|
||||||
</button>
|
</button>
|
||||||
<button type="button" id="resetButton" class="inline-flex justify-center py-2 px-4 border border-gray-600 rounded-md shadow-sm bg-gray-600 text-sm font-medium text-white hover:bg-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-indigo-500">
|
<button type="button" id="resetButton" class="inline-flex justify-center py-2 px-4 border border-gray-600 rounded-md shadow-sm bg-gray-600 text-sm font-medium text-white hover:bg-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-blue-500">
|
||||||
Reset
|
Reset
|
||||||
</button>
|
</button>
|
||||||
<a href="/plans/<%= plan._id %>" class="inline-flex justify-center py-2 px-4 border border-gray-600 rounded-md shadow-sm bg-gray-600 text-sm font-medium text-white hover:bg-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-indigo-500">
|
<a href="/plans/<%= plan._id %>" class="inline-flex justify-center py-2 px-4 border border-gray-600 rounded-md shadow-sm bg-gray-600 text-sm font-medium text-white hover:bg-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-blue-500">
|
||||||
Cancel
|
Cancel
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<label for="email" class="block text-base mb-2 text-slate-600">Email</label>
|
<label for="email" class="block text-base mb-2 text-slate-600">Email</label>
|
||||||
<input type="text" id="email" name="email"
|
<input type="text" id="email" name="email"
|
||||||
class="border border-slate-300 focus:border-indigo-500 w-full rounded-md text-base px-3 py-2 focus:outline-none focus:ring-1 focus:ring-indigo-500 transition-colors duration-200"
|
class="border border-slate-300 focus:border-blue-500 w-full rounded-md text-base px-3 py-2 focus:outline-none focus:ring-1 focus:ring-blue-500 transition-colors duration-200"
|
||||||
placeholder="Enter Email" />
|
placeholder="Enter Email" />
|
||||||
</div>
|
</div>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
<% if (!reset) { %>
|
<% if (!reset) { %>
|
||||||
<div class="mt-6">
|
<div class="mt-6">
|
||||||
<button type="submit"
|
<button type="submit"
|
||||||
class="border-2 border-indigo-600 bg-indigo-600 text-white py-2 w-full 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">Send Reset Link</button>
|
class="border-2 border-blue-600 bg-blue-600 text-white py-2 w-full rounded-md hover:bg-blue-700 hover:border-blue-700 font-semibold transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2">Send Reset Link</button>
|
||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+6
-6
@@ -11,13 +11,13 @@
|
|||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<label for="email" class="block text-base mb-2 text-slate-600">Email <span class="text-red-500">*</span></label>
|
<label for="email" class="block text-base mb-2 text-slate-600">Email <span class="text-red-500">*</span></label>
|
||||||
<input required type="text" id="email" name="email"
|
<input required type="text" id="email" name="email"
|
||||||
class="border border-slate-300 focus:border-indigo-500 w-full rounded-md text-base px-3 py-2 focus:outline-none focus:ring-1 focus:ring-indigo-500 transition-colors duration-200"
|
class="border border-slate-300 focus:border-blue-500 w-full rounded-md text-base px-3 py-2 focus:outline-none focus:ring-1 focus:ring-blue-500 transition-colors duration-200"
|
||||||
placeholder="Enter Email" value="<%= typeof email != 'undefined' ? email : '' %>"/>
|
placeholder="Enter Email" value="<%= typeof email != 'undefined' ? email : '' %>"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<label for="password" class="block text-base mb-2 text-slate-600">Password <span class="text-red-500">*</span></label>
|
<label for="password" class="block text-base mb-2 text-slate-600">Password <span class="text-red-500">*</span></label>
|
||||||
<input required type="password" id="password" name="password"
|
<input required type="password" id="password" name="password"
|
||||||
class="border border-slate-300 focus:border-indigo-500 w-full rounded-md text-base px-3 py-2 focus:outline-none focus:ring-1 focus:ring-indigo-500 transition-colors duration-200"
|
class="border border-slate-300 focus:border-blue-500 w-full rounded-md text-base px-3 py-2 focus:outline-none focus:ring-1 focus:ring-blue-500 transition-colors duration-200"
|
||||||
placeholder="Enter Password" />
|
placeholder="Enter Password" />
|
||||||
</div>
|
</div>
|
||||||
<% if (errMessage && errMessage.length > 0) { %>
|
<% if (errMessage && errMessage.length > 0) { %>
|
||||||
@@ -27,20 +27,20 @@
|
|||||||
<% } %>
|
<% } %>
|
||||||
<div class="mt-4 flex justify-between items-center">
|
<div class="mt-4 flex justify-between items-center">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<input type="checkbox" id="rememberMe" class="h-4 w-4 text-indigo-600 border-slate-300 rounded focus:ring-indigo-500">
|
<input type="checkbox" id="rememberMe" class="h-4 w-4 text-blue-600 border-slate-300 rounded focus:ring-blue-500">
|
||||||
<label for="rememberMe" class="ml-2 text-sm text-slate-600">Remember me</label>
|
<label for="rememberMe" class="ml-2 text-sm text-slate-600">Remember me</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<a href="/forgotPassword" class="text-sm text-indigo-600 hover:text-indigo-500 font-semibold transition-colors duration-200">Forgot Password? </a>
|
<a href="/forgotPassword" class="text-sm text-blue-600 hover:text-blue-500 font-semibold transition-colors duration-200">Forgot Password? </a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-6">
|
<div class="mt-6">
|
||||||
<button type="submit"
|
<button type="submit"
|
||||||
class="border-2 border-indigo-600 bg-indigo-600 text-white py-2 w-full 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">Login</button>
|
class="border-2 border-blue-600 bg-blue-600 text-white py-2 w-full rounded-md hover:bg-blue-700 hover:border-blue-700 font-semibold transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2">Login</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-6 text-center">
|
<div class="mt-6 text-center">
|
||||||
<span class="text-sm text-slate-600">Don't have an account?</span>
|
<span class="text-sm text-slate-600">Don't have an account?</span>
|
||||||
<a href="/signup" class="text-sm text-indigo-600 hover:text-indigo-500 font-semibold ml-1 transition-colors duration-200">Register</a>
|
<a href="/signup" class="text-sm text-blue-600 hover:text-blue-500 font-semibold ml-1 transition-colors duration-200">Register</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -8,7 +8,8 @@
|
|||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
onclick="lockAsset('<%= asset._id %>', '<%= asset.icon %>')"
|
onclick="lockAsset('<%= asset._id %>', '<%= asset.icon %>')"
|
||||||
type="submit"
|
type="submit"
|
||||||
class="text-center w-sm py-2 py-2 mx-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-pointer"
|
class="text-center w-sm py-2 py-2 mx-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white
|
||||||
|
bg-blue-600 hover:bg-blue-700 focus:outline-none "
|
||||||
>
|
>
|
||||||
Close
|
Close
|
||||||
</button>
|
</button>
|
||||||
@@ -34,7 +35,7 @@
|
|||||||
id="dropdown-icon-button-<%= asset._id %>"
|
id="dropdown-icon-button-<%= asset._id %>"
|
||||||
value=""
|
value=""
|
||||||
data-dropdown-toggle="dropdown-icons-<%= asset._id %>"
|
data-dropdown-toggle="dropdown-icons-<%= asset._id %>"
|
||||||
class="shrink-0 z-10 inline-flex items-center py-2.5 px-4 text-sm font-medium text-center border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none"
|
class="shrink-0 z-10 inline-flex items-center py-2.5 px-4 text-sm font-medium text-center border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<img src="/static/svgs/icons/<%= asset.icon %>.svg" class="h-4 w-4 me-2" alt="<%= asset.icon %>"> <%= asset.icon %>
|
<img src="/static/svgs/icons/<%= asset.icon %>.svg" class="h-4 w-4 me-2" alt="<%= asset.icon %>"> <%= asset.icon %>
|
||||||
@@ -59,7 +60,7 @@
|
|||||||
<% } else { %>
|
<% } else { %>
|
||||||
<button
|
<button
|
||||||
disabled
|
disabled
|
||||||
class="inline-flex items-center py-2.5 px-10 text-sm font-medium text-center border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none"
|
class="inline-flex items-center py-2.5 px-10 text-sm font-medium text-center border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<img src="/static/svgs/icons/<%= asset.icon %>.svg" class="h-4 w-4" alt="<%= asset.icon %>">
|
<img src="/static/svgs/icons/<%= asset.icon %>.svg" class="h-4 w-4" alt="<%= asset.icon %>">
|
||||||
@@ -71,7 +72,7 @@
|
|||||||
<button
|
<button
|
||||||
id="edit-<%= asset._id %>"
|
id="edit-<%= asset._id %>"
|
||||||
onclick="unlockAsset('<%= asset._id %>')"
|
onclick="unlockAsset('<%= asset._id %>')"
|
||||||
class="py-3 px-8 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-pointer"
|
class="py-3 px-8 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 cursor-pointer"
|
||||||
>
|
>
|
||||||
Edit
|
Edit
|
||||||
</button>
|
</button>
|
||||||
@@ -93,7 +94,7 @@
|
|||||||
type="text"
|
type="text"
|
||||||
name="name"
|
name="name"
|
||||||
value="<%= asset.name %>"
|
value="<%= asset.name %>"
|
||||||
class="mt-1 mb-2 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none"
|
class="mt-1 mb-2 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none"
|
||||||
>
|
>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<label for="ticker" class="block text-sm font-medium text-gray-700 mt-2">Stock Ticker <span class="text-red-500">*</span></label>
|
<label for="ticker" class="block text-sm font-medium text-gray-700 mt-2">Stock Ticker <span class="text-red-500">*</span></label>
|
||||||
@@ -103,7 +104,7 @@
|
|||||||
type="text"
|
type="text"
|
||||||
name="ticker"
|
name="ticker"
|
||||||
value="<%= asset.ticker %>"
|
value="<%= asset.ticker %>"
|
||||||
class="mt-1 mb-2 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none"
|
class="mt-1 mb-2 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none"
|
||||||
>
|
>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
@@ -118,7 +119,7 @@
|
|||||||
step=".01"
|
step=".01"
|
||||||
name="value"
|
name="value"
|
||||||
value="<%= asset.value %>"
|
value="<%= asset.value %>"
|
||||||
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none"
|
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none"
|
||||||
>
|
>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
@@ -137,7 +138,7 @@
|
|||||||
max="<% new Date().getFullYear() %>"
|
max="<% new Date().getFullYear() %>"
|
||||||
type="number"
|
type="number"
|
||||||
name="year"
|
name="year"
|
||||||
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none"
|
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none"
|
||||||
value="<%= asset.year %>"
|
value="<%= asset.year %>"
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
@@ -150,7 +151,7 @@
|
|||||||
step=".01"
|
step=".01"
|
||||||
name="price"
|
name="price"
|
||||||
value="<%= asset.price %>"
|
value="<%= asset.price %>"
|
||||||
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none"
|
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none"
|
||||||
>
|
>
|
||||||
|
|
||||||
<label for="quantity" class="block text-sm font-medium text-gray-700 mt-2">Quantity of Shares <span class="text-red-500">*</span></label>
|
<label for="quantity" class="block text-sm font-medium text-gray-700 mt-2">Quantity of Shares <span class="text-red-500">*</span></label>
|
||||||
@@ -160,7 +161,7 @@
|
|||||||
type="number"
|
type="number"
|
||||||
name="quantity"
|
name="quantity"
|
||||||
value="<%= asset.quantity %>"
|
value="<%= asset.quantity %>"
|
||||||
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none"
|
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none"
|
||||||
>
|
>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
@@ -173,7 +174,7 @@
|
|||||||
name="description"
|
name="description"
|
||||||
rows="4"
|
rows="4"
|
||||||
cols="50"
|
cols="50"
|
||||||
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none"
|
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none"
|
||||||
><%= asset.description %></textarea>
|
><%= asset.description %></textarea>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
@@ -185,7 +186,7 @@
|
|||||||
type="date"
|
type="date"
|
||||||
name="purchaseDate"
|
name="purchaseDate"
|
||||||
value="<%= asset.purchaseDate %>"
|
value="<%= asset.purchaseDate %>"
|
||||||
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none"
|
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none"
|
||||||
>
|
>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
@@ -199,7 +200,7 @@
|
|||||||
id="save-<%= asset._id %>"
|
id="save-<%= asset._id %>"
|
||||||
disabled
|
disabled
|
||||||
type="submit"
|
type="submit"
|
||||||
class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-not-allowed"
|
class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 cursor-not-allowed"
|
||||||
>
|
>
|
||||||
Save
|
Save
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<button
|
<button
|
||||||
onclick="resetAll()"
|
onclick="resetAll()"
|
||||||
type="submit"
|
type="submit"
|
||||||
class="text-center py-2 mx-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-pointer"
|
class="text-center py-2 mx-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none cursor-pointer"
|
||||||
>
|
>
|
||||||
Cancel
|
Cancel
|
||||||
</button>
|
</button>
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
type="radio"
|
type="radio"
|
||||||
name="type"
|
name="type"
|
||||||
value="other"
|
value="other"
|
||||||
class="form-radio h-4 w-4 text-indigo-600 border-gray-300 focus:ring-indigo-500 cursor-pointer"
|
class="form-radio h-4 w-4 text-blue-600 border-gray-300 focus:ring-blue-500 cursor-pointer"
|
||||||
>
|
>
|
||||||
<span class="ml-2 text-sm text-gray-700">Other Assets</span>
|
<span class="ml-2 text-sm text-gray-700">Other Assets</span>
|
||||||
</label>
|
</label>
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
type="radio"
|
type="radio"
|
||||||
name="type"
|
name="type"
|
||||||
value="saving"
|
value="saving"
|
||||||
class="form-radio h-4 w-4 text-indigo-600 border-gray-300 focus:ring-indigo-500 cursor-pointer"
|
class="form-radio h-4 w-4 text-blue-600 border-gray-300 focus:ring-blue-500 cursor-pointer"
|
||||||
>
|
>
|
||||||
<span class="ml-2 text-sm text-gray-700">Savings</span>
|
<span class="ml-2 text-sm text-gray-700">Savings</span>
|
||||||
</label>
|
</label>
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
type="radio"
|
type="radio"
|
||||||
name="type"
|
name="type"
|
||||||
value="stock"
|
value="stock"
|
||||||
class="form-radio h-4 w-4 text-indigo-600 border-gray-300 focus:ring-indigo-500 cursor-pointer"
|
class="form-radio h-4 w-4 text-blue-600 border-gray-300 focus:ring-blue-500 cursor-pointer"
|
||||||
>
|
>
|
||||||
<span class="ml-2 text-sm text-gray-700">Stocks</span>
|
<span class="ml-2 text-sm text-gray-700">Stocks</span>
|
||||||
</label>
|
</label>
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
<button
|
<button
|
||||||
id="dropdown-icon-button"
|
id="dropdown-icon-button"
|
||||||
data-dropdown-toggle="dropdown-icons"
|
data-dropdown-toggle="dropdown-icons"
|
||||||
class="shrink-0 z-10 inline-flex items-center py-2.5 px-4 text-sm font-medium text-center border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"
|
class="shrink-0 z-10 inline-flex items-center py-2.5 px-4 text-sm font-medium text-center border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<img src="/static/svgs/icons/Other.svg" class="h-4 w-4 me-2" alt="Other"> Other
|
<img src="/static/svgs/icons/Other.svg" class="h-4 w-4 me-2" alt="Other"> Other
|
||||||
@@ -101,10 +101,10 @@
|
|||||||
name="name"
|
name="name"
|
||||||
minlength="3"
|
minlength="3"
|
||||||
maxlength="30"
|
maxlength="30"
|
||||||
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"
|
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm"
|
||||||
>
|
>
|
||||||
|
|
||||||
<div id="year-create">
|
<div style="display: none;" id="year-create">
|
||||||
<label for="year" class="block text-sm font-medium text-gray-700 mt-2">Year <span class="text-red-500">*</span></label>
|
<label for="year" class="block text-sm font-medium text-gray-700 mt-2">Year <span class="text-red-500">*</span></label>
|
||||||
<input
|
<input
|
||||||
id="year-input"
|
id="year-input"
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
max="<% new Date().getFullYear() %>"
|
max="<% new Date().getFullYear() %>"
|
||||||
type="number"
|
type="number"
|
||||||
name="year"
|
name="year"
|
||||||
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"
|
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm"
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -128,7 +128,7 @@
|
|||||||
id="value"
|
id="value"
|
||||||
type="number"
|
type="number"
|
||||||
name="value"
|
name="value"
|
||||||
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"
|
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm"
|
||||||
>
|
>
|
||||||
|
|
||||||
<label for="purchaseDate" class="block text-sm font-medium text-gray-700 mt-2">Date of Purchase <span class="text-red-500">*</span></label>
|
<label for="purchaseDate" class="block text-sm font-medium text-gray-700 mt-2">Date of Purchase <span class="text-red-500">*</span></label>
|
||||||
@@ -137,7 +137,7 @@
|
|||||||
type="date"
|
type="date"
|
||||||
id="purchaseDate"
|
id="purchaseDate"
|
||||||
name="purchaseDate"
|
name="purchaseDate"
|
||||||
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"
|
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm"
|
||||||
>
|
>
|
||||||
|
|
||||||
<label for="description" class="block text-sm font-medium text-gray-700 mt-2">Description</label>
|
<label for="description" class="block text-sm font-medium text-gray-700 mt-2">Description</label>
|
||||||
@@ -147,20 +147,20 @@
|
|||||||
name="description"
|
name="description"
|
||||||
rows="4"
|
rows="4"
|
||||||
cols="50"
|
cols="50"
|
||||||
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"
|
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm"
|
||||||
></textarea>
|
></textarea>
|
||||||
|
|
||||||
<div class="mt-6 flex flex-row justify-between">
|
<div class="mt-6 flex flex-row justify-between">
|
||||||
<button
|
<button
|
||||||
type="reset"
|
type="reset"
|
||||||
onclick="document.getElementById('create-other-asset-form').reset()"
|
onclick="document.getElementById('create-other-asset-form').reset()"
|
||||||
class="text-center w-sm py-2 mx-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-pointer"
|
class="text-center w-sm py-2 mx-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 cursor-pointer"
|
||||||
>
|
>
|
||||||
Clear
|
Clear
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
class="text-center w-sm py-2 mx-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-pointer"
|
class="text-center w-sm py-2 mx-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 cursor-pointer"
|
||||||
>
|
>
|
||||||
Create
|
Create
|
||||||
</button>
|
</button>
|
||||||
@@ -179,7 +179,7 @@
|
|||||||
name="name"
|
name="name"
|
||||||
minlength="3"
|
minlength="3"
|
||||||
maxlength="30"
|
maxlength="30"
|
||||||
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"
|
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm"
|
||||||
>
|
>
|
||||||
|
|
||||||
<label for="value" class="block text-sm font-medium text-gray-700 mt-2">Savings Value <span class="text-red-500">*</span></label>
|
<label for="value" class="block text-sm font-medium text-gray-700 mt-2">Savings Value <span class="text-red-500">*</span></label>
|
||||||
@@ -191,20 +191,20 @@
|
|||||||
id="value"
|
id="value"
|
||||||
type="number"
|
type="number"
|
||||||
name="value"
|
name="value"
|
||||||
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"
|
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm"
|
||||||
>
|
>
|
||||||
|
|
||||||
<div class="mt-6 flex flex-row justify-between">
|
<div class="mt-6 flex flex-row justify-between">
|
||||||
<button
|
<button
|
||||||
type="reset"
|
type="reset"
|
||||||
onclick="document.getElementById('create-saving-asset-form').reset()"
|
onclick="document.getElementById('create-saving-asset-form').reset()"
|
||||||
class="text-center w-sm py-2 mx-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-pointer"
|
class="text-center w-sm py-2 mx-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 cursor-pointer"
|
||||||
>
|
>
|
||||||
Clear
|
Clear
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
class="text-center w-sm py-2 mx-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-pointer"
|
class="text-center w-sm py-2 mx-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 cursor-pointer"
|
||||||
>
|
>
|
||||||
Create
|
Create
|
||||||
</button>
|
</button>
|
||||||
@@ -223,7 +223,7 @@
|
|||||||
name="ticker"
|
name="ticker"
|
||||||
minlength="3"
|
minlength="3"
|
||||||
maxlength="5"
|
maxlength="5"
|
||||||
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"
|
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm"
|
||||||
>
|
>
|
||||||
|
|
||||||
<label for="price" class="block text-sm font-medium text-gray-700 mt-2">Price per Share <span class="text-red-500">*</span></label>
|
<label for="price" class="block text-sm font-medium text-gray-700 mt-2">Price per Share <span class="text-red-500">*</span></label>
|
||||||
@@ -235,7 +235,7 @@
|
|||||||
id="price"
|
id="price"
|
||||||
type="number"
|
type="number"
|
||||||
name="price"
|
name="price"
|
||||||
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"
|
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm"
|
||||||
>
|
>
|
||||||
|
|
||||||
<label for="quantity" class="block text-sm font-medium text-gray-700 mt-2">Quantity of Shares <span class="text-red-500">*</span></label>
|
<label for="quantity" class="block text-sm font-medium text-gray-700 mt-2">Quantity of Shares <span class="text-red-500">*</span></label>
|
||||||
@@ -245,7 +245,7 @@
|
|||||||
min="1"
|
min="1"
|
||||||
id="quantity"
|
id="quantity"
|
||||||
name="quantity"
|
name="quantity"
|
||||||
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"
|
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm"
|
||||||
>
|
>
|
||||||
|
|
||||||
<label for="purchaseDate" class="block text-sm font-medium text-gray-700 mt-2">Date of Purchase <span class="text-red-500">*</span></label>
|
<label for="purchaseDate" class="block text-sm font-medium text-gray-700 mt-2">Date of Purchase <span class="text-red-500">*</span></label>
|
||||||
@@ -254,20 +254,20 @@
|
|||||||
type="date"
|
type="date"
|
||||||
id="purchaseDate"
|
id="purchaseDate"
|
||||||
name="purchaseDate"
|
name="purchaseDate"
|
||||||
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"
|
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm"
|
||||||
>
|
>
|
||||||
|
|
||||||
<div class="mt-6 flex flex-row justify-between">
|
<div class="mt-6 flex flex-row justify-between">
|
||||||
<button
|
<button
|
||||||
type="reset"
|
type="reset"
|
||||||
onclick="document.getElementById('create-stock-asset-form').reset()"
|
onclick="document.getElementById('create-stock-asset-form').reset()"
|
||||||
class="text-center w-sm py-2 mx-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-pointer"
|
class="text-center w-sm py-2 mx-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 cursor-pointer"
|
||||||
>
|
>
|
||||||
Clear
|
Clear
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
class="text-center w-sm py-2 mx-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-pointer"
|
class="text-center w-sm py-2 mx-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 cursor-pointer"
|
||||||
>
|
>
|
||||||
Create
|
Create
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -88,7 +88,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center justify-center space-x-2">
|
<div class="flex items-center justify-center space-x-2">
|
||||||
<button type="button" class="py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-pointer" onclick="editPlan('<%= plan._id %>')">Edit Plan</button>
|
<button type="button" class="py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 cursor-pointer" onclick="editPlan('<%= plan._id %>')">Edit Plan</button>
|
||||||
<button type="button" class="py-2 px-4 border border-red-600 rounded-md shadow-sm text-sm font-medium text-white bg-red-600 hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 cursor-pointer" onclick="deletePlan('<%= plan._id %>')">Delete Plan</button>
|
<button type="button" class="py-2 px-4 border border-red-600 rounded-md shadow-sm text-sm font-medium text-white bg-red-600 hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 cursor-pointer" onclick="deletePlan('<%= plan._id %>')">Delete Plan</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
+8
-8
@@ -24,7 +24,7 @@
|
|||||||
<div class="flex flex-row justify-between items-center">
|
<div class="flex flex-row justify-between items-center">
|
||||||
<h3 class="text-lg font-bold text-gray-900">Create New Retirement Plan</h3>
|
<h3 class="text-lg font-bold text-gray-900">Create New Retirement Plan</h3>
|
||||||
<form method="dialog" id="cancelNewPlanDialogForm">
|
<form method="dialog" id="cancelNewPlanDialogForm">
|
||||||
<button type="submit" class="py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-pointer">Cancel</button>
|
<button type="submit" class="py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 cursor-pointer">Cancel</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -34,29 +34,29 @@
|
|||||||
<p class="text-sm text-gray-400 text-left mb-4"><span class="text-red-500">*</span> Indicates a required field</p>
|
<p class="text-sm text-gray-400 text-left mb-4"><span class="text-red-500">*</span> Indicates a required field</p>
|
||||||
<div>
|
<div>
|
||||||
<label for="name" class="block text-sm font-medium text-gray-700 text-left">Plan Name <span class="text-red-500">*</span></label>
|
<label for="name" class="block text-sm font-medium text-gray-700 text-left">Plan Name <span class="text-red-500">*</span></label>
|
||||||
<input type="text" name="name" id="planName" placeholder="e.g., My Awesome Plan" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" required>
|
<input type="text" name="name" id="planName" placeholder="e.g., My Awesome Plan" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm" required>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label for="retirementAge" class="block text-sm font-medium text-gray-700 text-left">Desired Retirement Age <span class="text-red-500">*</span></label>
|
<label for="retirementAge" class="block text-sm font-medium text-gray-700 text-left">Desired Retirement Age <span class="text-red-500">*</span></label>
|
||||||
<input type="number" name="retirementAge" id="retirementAge" placeholder="e.g., 65" min="18" max="120" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" required>
|
<input type="number" name="retirementAge" id="retirementAge" placeholder="e.g., 65" min="18" max="120" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm" required>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label for="retirementExpenses" class="block text-sm font-medium text-gray-700 text-left">Estimated Monthly Retirement Expenses <span class="text-red-500">*</span></label>
|
<label for="retirementExpenses" class="block text-sm font-medium text-gray-700 text-left">Estimated Monthly Retirement Expenses <span class="text-red-500">*</span></label>
|
||||||
<input title="Ongoing spending. Rent, bills, subscriptions, etc." type="number" name="retirementExpenses" id="retirementExpenses" min="0" placeholder="e.g., 3000" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" required>
|
<input title="Ongoing spending. Rent, bills, subscriptions, etc." type="number" name="retirementExpenses" id="retirementExpenses" min="0" placeholder="e.g., 3000" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm" required>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label for="retirementAssets" class="block text-sm font-medium text-gray-700 text-left">Estimated Retirement Assets <span class="text-red-500">*</span></label>
|
<label for="retirementAssets" class="block text-sm font-medium text-gray-700 text-left">Estimated Retirement Assets <span class="text-red-500">*</span></label>
|
||||||
<input title="Owned valuables. Physical items, investments, etc." type="number" name="retirementAssets" id="retirementAssets" min="0" placeholder="e.g., 500000" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" required>
|
<input title="Owned valuables. Physical items, investments, etc." type="number" name="retirementAssets" id="retirementAssets" min="0" placeholder="e.g., 500000" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm" required>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label for="retirementLiabilities" class="block text-sm font-medium text-gray-700 text-left">Estimated Retirement Liabilities <span class="text-red-500">*</span></label>
|
<label for="retirementLiabilities" class="block text-sm font-medium text-gray-700 text-left">Estimated Retirement Liabilities <span class="text-red-500">*</span></label>
|
||||||
<input title="Owed amounts. Loans, credit card balance, etc." type="number" name="retirementLiabilities" id="retirementLiabilities" min="0" placeholder="e.g., 50000" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" required>
|
<input title="Owed amounts. Loans, credit card balance, etc." type="number" name="retirementLiabilities" id="retirementLiabilities" min="0" placeholder="e.g., 50000" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm" required>
|
||||||
</div>
|
</div>
|
||||||
<div id="newPlanError" class="text-red-500 text-sm mt-2" style="display: none;"></div>
|
<div id="newPlanError" class="text-red-500 text-sm mt-2" style="display: none;"></div>
|
||||||
<!-- Form Buttons: Save Plan and Reset -->
|
<!-- Form Buttons: Save Plan and Reset -->
|
||||||
<div class="mt-6 flex flex-row justify-between">
|
<div class="mt-6 flex flex-row justify-between">
|
||||||
<button type="button" id="resetNewPlanFormBtn" class="py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">Reset</button>
|
<button type="button" id="resetNewPlanFormBtn" class="py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">Reset</button>
|
||||||
<button id="submitNewPlanBtn" type="submit" class="py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">Save Plan</button>
|
<button id="submitNewPlanBtn" type="submit" class="py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">Save Plan</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+21
-19
@@ -51,24 +51,24 @@
|
|||||||
<div class="max-w-md mx-auto bg-white p-8 mb-10 rounded-lg shadow-md">
|
<div class="max-w-md mx-auto bg-white p-8 mb-10 rounded-lg shadow-md">
|
||||||
<div class="flex flex-row justify-between">
|
<div class="flex flex-row justify-between">
|
||||||
<h3 class="pt-2 pr-2 pb-2">Account settings</h3>
|
<h3 class="pt-2 pr-2 pb-2">Account settings</h3>
|
||||||
<button id="edit-account" onclick="unlockAccount()" class="py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">Edit</button>
|
<button id="edit-account" onclick="unlockAccount()" class="py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">Edit</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="/updateAccount" method="post" class="space-y-4 mt-4" id="account-form">
|
<form action="/updateAccount" method="post" class="space-y-4 mt-4" id="account-form">
|
||||||
|
|
||||||
<label for="email" class="block text-sm font-medium text-gray-700">Email</label>
|
<label for="email" class="block text-sm font-medium text-gray-700">Email</label>
|
||||||
<input id="email" disabled type="email" name="email" value="<%= user.email %>" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none">
|
<input id="email" disabled type="email" name="email" value="<%= user.email %>" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none">
|
||||||
|
|
||||||
<label for="name" class="block text-sm font-medium text-gray-700">Name</label>
|
<label for="name" class="block text-sm font-medium text-gray-700">Name</label>
|
||||||
<input id="name" disabled type="text" name="name" value="<%= user.name %>" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none">
|
<input id="name" disabled type="text" name="name" value="<%= user.name %>" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none">
|
||||||
|
|
||||||
<label for="password" class="block text-sm font-medium text-gray-700">New password</label>
|
<label for="password" class="block text-sm font-medium text-gray-700">New password</label>
|
||||||
<input id="password" disabled type="password" name="password" minlength="8" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none">
|
<input id="password" disabled type="password" name="password" minlength="8" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none">
|
||||||
|
|
||||||
<label for="repassword" class="block text-sm font-medium text-gray-700">Confirm new password</label>
|
<label for="repassword" class="block text-sm font-medium text-gray-700">Confirm new password</label>
|
||||||
<input id="repassword" disabled type="password" name="repassword" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none">
|
<input id="repassword" disabled type="password" name="repassword" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none">
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<button id="save-account" disabled type="submit" class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-not-allowed">Save</button>
|
<button id="save-account" disabled type="submit" class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 cursor-not-allowed">Save</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
<div class="flex flex-row justify-between">
|
<div class="flex flex-row justify-between">
|
||||||
<h3 class="pt-2 pr-2 pb-2">Personal information</h3>
|
<h3 class="pt-2 pr-2 pb-2">Personal information</h3>
|
||||||
<% if (user.financialData) { %>
|
<% if (user.financialData) { %>
|
||||||
<button id="edit-personal" onclick="unlockPersonal()" class="py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">Edit</button>
|
<button id="edit-personal" onclick="unlockPersonal()" class="py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">Edit</button>
|
||||||
<% } %>
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -91,17 +91,19 @@
|
|||||||
id="dob"
|
id="dob"
|
||||||
type="date"
|
type="date"
|
||||||
name="dob"
|
name="dob"
|
||||||
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none"
|
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none"
|
||||||
<% let year = typeof(user.dob) == "object" ? user.dob.getFullYear() : user.dob.split('-')[0]; %>
|
<% let year = typeof(user.dob) == "object" ? user.dob.getFullYear() : user.dob.split('-')[0]; %>
|
||||||
<% let month = typeof(user.dob) == "object" ? user.dob.getMonth() : user.dob.split('-')[1] - 1; %>
|
<% let month = typeof(user.dob) == "object" ? user.dob.getMonth() : user.dob.split('-')[1] - 1; %>
|
||||||
<% let day = typeof(user.dob) == "object" ? user.dob.getDate() + 1 : user.dob.split('-')[2].split('T')[0];%>
|
<% let day = typeof(user.dob) == "object" ? user.dob.getDate() + 1 : user.dob.split('-')[2].split('T')[0];%>
|
||||||
<% let d = new Date(parseInt(year), parseInt(month), parseInt(day)); %>
|
<% let d = new Date(parseInt(year), parseInt(month), parseInt(day)); %>
|
||||||
value="<%= d.getFullYear() + "-" + ("0"+(d.getMonth()+1)).slice(-2) + "-" + ("0" + d.getDate()).slice(-2); %>"
|
value="<%= d.getFullYear() + "-" + ("0"+(d.getMonth()+1)).slice(-2) + "-" + ("0" + d.getDate()).slice(-2); %>"
|
||||||
|
<% let d1 = new Date(); %>
|
||||||
|
max="<%= (d1.getFullYear() - 18) + "-" +("0"+(d1.getMonth()+1)).slice(-2) + "-" + ("0" + d1.getDate()).slice(-2); %>"
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label for="education" class="block text-sm font-medium text-gray-700">Education</label>
|
<label for="education" class="block text-sm font-medium text-gray-700">Education</label>
|
||||||
<select disabled id="education" name="education" id="education" class="mt-1 block w-full px-3 py-2 border border-gray-300 bg-white rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none">
|
<select disabled id="education" name="education" id="education" class="mt-1 block w-full px-3 py-2 border border-gray-300 bg-white rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none">
|
||||||
<option <%= user.education == "primary" ? 'selected' : '' %> value="primary">Primary (Elementary)</option>
|
<option <%= user.education == "primary" ? 'selected' : '' %> value="primary">Primary (Elementary)</option>
|
||||||
<option <%= user.education == "secondary" ? 'selected' : '' %> value="secondary">Secondary (High School)</option>
|
<option <%= user.education == "secondary" ? 'selected' : '' %> value="secondary">Secondary (High School)</option>
|
||||||
<option <%= user.education == "tertiary" ? 'selected' : '' %> value="tertiary">Tertiary (College/University)</option>
|
<option <%= user.education == "tertiary" ? 'selected' : '' %> value="tertiary">Tertiary (College/University)</option>
|
||||||
@@ -112,19 +114,19 @@
|
|||||||
<label class="block text-sm font-medium text-gray-700">Marital Status</label>
|
<label class="block text-sm font-medium text-gray-700">Marital Status</label>
|
||||||
<div class="mt-1 space-x-4">
|
<div class="mt-1 space-x-4">
|
||||||
<label class="inline-flex items-center">
|
<label class="inline-flex items-center">
|
||||||
<input disabled <%= user.maritalStatus == "single" ? 'checked' : '' %> id="ms-single" type="radio" name="maritalStatus" value="single" class="form-radio h-4 w-4 text-indigo-600 border-gray-300 focus:ring-indigo-500 disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none">
|
<input disabled <%= user.maritalStatus == "single" ? 'checked' : '' %> id="ms-single" type="radio" name="maritalStatus" value="single" class="form-radio h-4 w-4 text-blue-600 border-gray-300 focus:ring-blue-500 disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none">
|
||||||
<span class="ml-2 text-sm text-gray-700">Single</span>
|
<span class="ml-2 text-sm text-gray-700">Single</span>
|
||||||
</label>
|
</label>
|
||||||
<label class="inline-flex items-center">
|
<label class="inline-flex items-center">
|
||||||
<input disabled <%= user.maritalStatus == "married" ? 'checked' : '' %> id="ms-married" type="radio" name="maritalStatus" value="married" class="form-radio h-4 w-4 text-indigo-600 border-gray-300 focus:ring-indigo-500 disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none">
|
<input disabled <%= user.maritalStatus == "married" ? 'checked' : '' %> id="ms-married" type="radio" name="maritalStatus" value="married" class="form-radio h-4 w-4 text-blue-600 border-gray-300 focus:ring-blue-500 disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none">
|
||||||
<span class="ml-2 text-sm text-gray-700">Married</span>
|
<span class="ml-2 text-sm text-gray-700">Married</span>
|
||||||
</label>
|
</label>
|
||||||
<label class="inline-flex items-center">
|
<label class="inline-flex items-center">
|
||||||
<input disabled <%= user.maritalStatus == "divorced" ? 'checked' : '' %> id="ms-divorced" type="radio" name="maritalStatus" value="divorced" class="form-radio h-4 w-4 text-indigo-600 border-gray-300 focus:ring-indigo-500 disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none">
|
<input disabled <%= user.maritalStatus == "divorced" ? 'checked' : '' %> id="ms-divorced" type="radio" name="maritalStatus" value="divorced" class="form-radio h-4 w-4 text-blue-600 border-gray-300 focus:ring-blue-500 disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none">
|
||||||
<span class="ml-2 text-sm text-gray-700">Divorced</span>
|
<span class="ml-2 text-sm text-gray-700">Divorced</span>
|
||||||
</label>
|
</label>
|
||||||
<label class="inline-flex items-center">
|
<label class="inline-flex items-center">
|
||||||
<input disabled <%= user.maritalStatus == "widowed" ? 'checked' : '' %> id="ms-widowed" type="radio" name="maritalStatus" value="widowed" class="form-radio h-4 w-4 text-indigo-600 border-gray-300 focus:ring-indigo-500 disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none">
|
<input disabled <%= user.maritalStatus == "widowed" ? 'checked' : '' %> id="ms-widowed" type="radio" name="maritalStatus" value="widowed" class="form-radio h-4 w-4 text-blue-600 border-gray-300 focus:ring-blue-500 disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none">
|
||||||
<span class="ml-2 text-sm text-gray-700">Widowed</span>
|
<span class="ml-2 text-sm text-gray-700">Widowed</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@@ -132,31 +134,31 @@
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label for="income" class="block text-sm font-medium text-gray-700">Annual Gross Income</label>
|
<label for="income" class="block text-sm font-medium text-gray-700">Annual Gross Income</label>
|
||||||
<input disabled value="<%= user.income %>" id="income" type="number" name="income" min="0" placeholder="e.g., 50000" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none">
|
<input disabled value="<%= user.income %>" id="income" type="number" name="income" min="0" placeholder="e.g., 50000" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label for="expenses" class="block text-sm font-medium text-gray-700">Monthly Expenses</label>
|
<label for="expenses" class="block text-sm font-medium text-gray-700">Monthly Expenses</label>
|
||||||
<input disabled value="<%= user.expenses %>" id="expenses" type="number" name="expenses" min="0" placeholder="e.g., 2000" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none">
|
<input disabled value="<%= user.expenses %>" id="expenses" type="number" name="expenses" min="0" placeholder="e.g., 2000" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label for="assets" class="block text-sm font-medium text-gray-700">Net Worth</label>
|
<label for="assets" class="block text-sm font-medium text-gray-700">Net Worth</label>
|
||||||
<input disabled value="<%= user.assets %>" id="assets" type="number" name="assets" min="0" placeholder="Estimated Net Worth" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none">
|
<input disabled value="<%= user.assets %>" id="assets" type="number" name="assets" min="0" placeholder="Estimated Net Worth" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label for="liabilities" class="block text-sm font-medium text-gray-700">Liabilities</label>
|
<label for="liabilities" class="block text-sm font-medium text-gray-700">Liabilities</label>
|
||||||
<input disabled value="<%= user.liabilities %>" id="liabilities" type="number" name="liabilities" min="0" placeholder="Estimated Liabilities" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none">
|
<input disabled value="<%= user.liabilities %>" id="liabilities" type="number" name="liabilities" min="0" placeholder="Estimated Liabilities" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 disabled:shadow-none">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<button id="save-personal" disabled type="submit" class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-not-allowed">Save</button>
|
<button id="save-personal" disabled type="submit" class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 cursor-not-allowed">Save</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<div>
|
<div>
|
||||||
<a href="/questionnaire?profile" class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-pointer">Answer Questionnare</a>
|
<a href="/questionnaire?profile" class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 cursor-pointer">Answer Questionnare</a>
|
||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
|
|||||||
+12
-11
@@ -8,11 +8,12 @@
|
|||||||
<form action="/questionnaire" method="post" class="space-y-4">
|
<form action="/questionnaire" method="post" class="space-y-4">
|
||||||
<div>
|
<div>
|
||||||
<label for="dob" class="block text-sm font-medium text-gray-700">Date of Birth <span class="text-red-500">*</span></label>
|
<label for="dob" class="block text-sm font-medium text-gray-700">Date of Birth <span class="text-red-500">*</span></label>
|
||||||
<input type="date" name="dob" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
|
<% let d = new Date(); %>
|
||||||
|
<input max="<%= (d.getFullYear() - 18) + "-" + ("0"+(d.getMonth()+1)).slice(-2) + "-" + ("0" + d.getDate()).slice(-2); %>" type="date" name="dob" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label for="education" class="block text-sm font-medium text-gray-700">Education <span class="text-red-500">*</span></label>
|
<label for="education" class="block text-sm font-medium text-gray-700">Education <span class="text-red-500">*</span></label>
|
||||||
<select name="education" id="education" class="mt-1 block w-full px-3 py-2 border border-gray-300 bg-white rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
|
<select name="education" id="education" class="mt-1 block w-full px-3 py-2 border border-gray-300 bg-white rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm">
|
||||||
<option value="primary">Primary (Elementary)</option>
|
<option value="primary">Primary (Elementary)</option>
|
||||||
<option value="secondary">Secondary (High School)</option>
|
<option value="secondary">Secondary (High School)</option>
|
||||||
<option value="tertiary">Tertiary (College/University)</option>
|
<option value="tertiary">Tertiary (College/University)</option>
|
||||||
@@ -23,19 +24,19 @@
|
|||||||
<label class="block text-sm font-medium text-gray-700">Marital Status <span class="text-red-500">*</span></label>
|
<label class="block text-sm font-medium text-gray-700">Marital Status <span class="text-red-500">*</span></label>
|
||||||
<div class="mt-1 space-x-4">
|
<div class="mt-1 space-x-4">
|
||||||
<label class="inline-flex items-center">
|
<label class="inline-flex items-center">
|
||||||
<input type="radio" name="maritalStatus" value="single" class="form-radio h-4 w-4 text-indigo-600 border-gray-300 focus:ring-indigo-500">
|
<input type="radio" name="maritalStatus" value="single" class="form-radio h-4 w-4 text-blue-600 border-gray-300 focus:ring-blue-500">
|
||||||
<span class="ml-2 text-sm text-gray-700">Single</span>
|
<span class="ml-2 text-sm text-gray-700">Single</span>
|
||||||
</label>
|
</label>
|
||||||
<label class="inline-flex items-center">
|
<label class="inline-flex items-center">
|
||||||
<input type="radio" name="maritalStatus" value="married" class="form-radio h-4 w-4 text-indigo-600 border-gray-300 focus:ring-indigo-500">
|
<input type="radio" name="maritalStatus" value="married" class="form-radio h-4 w-4 text-blue-600 border-gray-300 focus:ring-blue-500">
|
||||||
<span class="ml-2 text-sm text-gray-700">Married</span>
|
<span class="ml-2 text-sm text-gray-700">Married</span>
|
||||||
</label>
|
</label>
|
||||||
<label class="inline-flex items-center">
|
<label class="inline-flex items-center">
|
||||||
<input type="radio" name="maritalStatus" value="divorced" class="form-radio h-4 w-4 text-indigo-600 border-gray-300 focus:ring-indigo-500">
|
<input type="radio" name="maritalStatus" value="divorced" class="form-radio h-4 w-4 text-blue-600 border-gray-300 focus:ring-blue-500">
|
||||||
<span class="ml-2 text-sm text-gray-700">Divorced</span>
|
<span class="ml-2 text-sm text-gray-700">Divorced</span>
|
||||||
</label>
|
</label>
|
||||||
<label class="inline-flex items-center">
|
<label class="inline-flex items-center">
|
||||||
<input type="radio" name="maritalStatus" value="widowed" class="form-radio h-4 w-4 text-indigo-600 border-gray-300 focus:ring-indigo-500">
|
<input type="radio" name="maritalStatus" value="widowed" class="form-radio h-4 w-4 text-blue-600 border-gray-300 focus:ring-blue-500">
|
||||||
<span class="ml-2 text-sm text-gray-700">Widowed</span>
|
<span class="ml-2 text-sm text-gray-700">Widowed</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@@ -43,26 +44,26 @@
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label for="income" class="block text-sm font-medium text-gray-700">Annual Gross Income <span class="text-red-500">*</span></label>
|
<label for="income" class="block text-sm font-medium text-gray-700">Annual Gross Income <span class="text-red-500">*</span></label>
|
||||||
<input type="number" name="income" min="0" placeholder="e.g., 50000" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
|
<input type="number" name="income" min="0" placeholder="e.g., 50000" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label for="expenses" class="block text-sm font-medium text-gray-700">Monthly Expenses <span class="text-red-500">*</span></label>
|
<label for="expenses" class="block text-sm font-medium text-gray-700">Monthly Expenses <span class="text-red-500">*</span></label>
|
||||||
<input type="number" name="expenses" min="0" placeholder="e.g., 2000" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
|
<input type="number" name="expenses" min="0" placeholder="e.g., 2000" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label for="assets" class="block text-sm font-medium text-gray-700">Net Worth <span class="text-red-500">*</span></label>
|
<label for="assets" class="block text-sm font-medium text-gray-700">Net Worth <span class="text-red-500">*</span></label>
|
||||||
<input type="number" name="assets" min="0" placeholder="Estimated Net Worth" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
|
<input type="number" name="assets" min="0" placeholder="Estimated Net Worth" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label for="liabilities" class="block text-sm font-medium text-gray-700">Liabilities <span class="text-red-500">*</span></label>
|
<label for="liabilities" class="block text-sm font-medium text-gray-700">Liabilities <span class="text-red-500">*</span></label>
|
||||||
<input type="number" name="liabilities" min="0" placeholder="Estimated Liabilities" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
|
<input type="number" name="liabilities" min="0" placeholder="Estimated Liabilities" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<button type="submit" class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">Submit Questionnaire</button>
|
<button type="submit" class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">Submit Questionnaire</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<% } %>
|
<% } %>
|
||||||
<div class="mt-5">
|
<div class="mt-5">
|
||||||
<button type="submit"
|
<button type="submit"
|
||||||
class="cursor-pointer border-2 border-gray-600 bg-blue-600 text-white py-1 w-full rounded-md hover:bg-transparent hover:text-indigo-700 font-semibold">Change
|
class="cursor-pointer border-2 border-gray-600 bg-blue-600 text-white py-1 w-full rounded-md hover:bg-transparent hover:text-blue-700 font-semibold">Change
|
||||||
Password</button>
|
Password</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,23 +11,23 @@
|
|||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<label for="name" class="block text-base mb-2 text-slate-600">Name <span class="text-red-500">*</span></label>
|
<label for="name" class="block text-base mb-2 text-slate-600">Name <span class="text-red-500">*</span></label>
|
||||||
<input required type="text" id="name" name="name"
|
<input required type="text" id="name" name="name"
|
||||||
class="border border-slate-300 focus:border-indigo-500 w-full rounded-md text-base px-3 py-2 focus:outline-none focus:ring-1 focus:ring-indigo-500 transition-colors duration-200"
|
class="border border-slate-300 focus:border-blue-500 w-full rounded-md text-base px-3 py-2 focus:outline-none focus:ring-1 focus:ring-blue-500 transition-colors duration-200"
|
||||||
placeholder="Enter Name" value="<%= typeof name != 'undefined' ? name : '' %>"/>
|
placeholder="Enter Name" value="<%= typeof name != 'undefined' ? name : '' %>"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<label for="email" class="block text-base mb-2 text-slate-600">Email <span class="text-red-500">*</span></label>
|
<label for="email" class="block text-base mb-2 text-slate-600">Email <span class="text-red-500">*</span></label>
|
||||||
<input required type="email" id="email" name="email"
|
<input required type="email" id="email" name="email"
|
||||||
class="border border-slate-300 focus:border-indigo-500 w-full rounded-md text-base px-3 py-2 focus:outline-none focus:ring-1 focus:ring-indigo-500 transition-colors duration-200"
|
class="border border-slate-300 focus:border-blue-500 w-full rounded-md text-base px-3 py-2 focus:outline-none focus:ring-1 focus:ring-blue-500 transition-colors duration-200"
|
||||||
placeholder="Enter Email" value="<%= typeof email != 'undefined' ? email : '' %>"/>
|
placeholder="Enter Email" value="<%= typeof email != 'undefined' ? email : '' %>"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<label for="password" class="block text-base mb-2 text-slate-600">Password <span class="text-red-500">*</span></label>
|
<label for="password" class="block text-base mb-2 text-slate-600">Password <span class="text-red-500">*</span></label>
|
||||||
<input required type="password" id="password" name="password"
|
<input required type="password" id="password" name="password"
|
||||||
class="border border-slate-300 focus:border-indigo-500 w-full rounded-md text-base px-3 py-2 focus:outline-none focus:ring-1 focus:ring-indigo-500 transition-colors duration-200"
|
class="border border-slate-300 focus:border-blue-500 w-full rounded-md text-base px-3 py-2 focus:outline-none focus:ring-1 focus:ring-blue-500 transition-colors duration-200"
|
||||||
placeholder="Enter Password" />
|
placeholder="Enter Password" />
|
||||||
<label for="repassword" class="block text-base mb-2 mt-3 text-slate-600">Re-type Password <span class="text-red-500">*</span></label>
|
<label for="repassword" class="block text-base mb-2 mt-3 text-slate-600">Re-type Password <span class="text-red-500">*</span></label>
|
||||||
<input required type="password" id="repassword" name="repassword"
|
<input required type="password" id="repassword" name="repassword"
|
||||||
class="border border-slate-300 focus:border-indigo-500 w-full rounded-md text-base px-3 py-2 focus:outline-none focus:ring-1 focus:ring-indigo-500 transition-colors duration-200"
|
class="border border-slate-300 focus:border-blue-500 w-full rounded-md text-base px-3 py-2 focus:outline-none focus:ring-1 focus:ring-blue-500 transition-colors duration-200"
|
||||||
placeholder="Enter Password" />
|
placeholder="Enter Password" />
|
||||||
</div>
|
</div>
|
||||||
<% if (errMessage && errMessage.length > 0) { %>
|
<% if (errMessage && errMessage.length > 0) { %>
|
||||||
@@ -37,11 +37,11 @@
|
|||||||
<% } %>
|
<% } %>
|
||||||
<div class="mt-6">
|
<div class="mt-6">
|
||||||
<button type="submit"
|
<button type="submit"
|
||||||
class="border-2 border-indigo-600 bg-indigo-600 text-white py-2 w-full 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">Signup</button>
|
class="border-2 border-blue-600 bg-blue-600 text-white py-2 w-full rounded-md hover:bg-blue-700 hover:border-blue-700 font-semibold transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2">Signup</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-6 text-center">
|
<div class="mt-6 text-center">
|
||||||
<span class="text-sm text-slate-600">Already have an account?</span>
|
<span class="text-sm text-slate-600">Already have an account?</span>
|
||||||
<a href="/login" class="text-sm text-indigo-600 hover:text-indigo-500 font-semibold ml-1 transition-colors duration-200">Login</a>
|
<a href="/login" class="text-sm text-blue-600 hover:text-blue-500 font-semibold ml-1 transition-colors duration-200">Login</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
Reference in new issue
Block a user