This commit is contained in:
=bhagwanSingh 2025-11-24 13:43:23 +05:30
parent 0b9d6f801e
commit 52e4eb8133
7 changed files with 25 additions and 32 deletions

View File

@ -80,7 +80,7 @@ body {
padding: 0 1.5rem;
gap: 1rem;
width: 100%;
max-width: 1024px;
/* max-width: 1024px; */
flex-direction: row;
align-items: center;
justify-content: space-between;

View File

@ -26,19 +26,6 @@ const app = express();
const server = new createServer(app);
const io = new Server(server);
app.on('certificate-error', (event, webContents, url, error, certificate, callback) => {
console.log("⚠️ Certificate error:", url);
// Allow for ngrok only
if (url.includes("ngrok")) {
event.preventDefault();
callback(true); // approve the certificate
} else {
callback(false); // reject others
}
});
app.on('certificate-error', (event, webContents, url, error, certificate, callback) => {
console.log("⚠️ Certificate error:", url);
@ -93,7 +80,8 @@ app.get('/varegister/:sf_token?', (req, res) => {
const decoded = jwt.verify(sf_token, process.env.JWT_SECRET_SF_TOKEN);
if (decoded) {
res.render('va_register', { title: "VA Registration" });
const email = decoded.email;
res.render('va_register', { title: "VA Registration", email });
} else {
res.render('not_found', { title: "VA Registration" });
}
@ -114,7 +102,8 @@ app.get('/clientregister/:sf_token?', (req, res) => {
const decoded = jwt.verify(sf_token, process.env.JWT_SECRET_SF_TOKEN);
if (decoded) {
res.render('va_client_register', { title: "Client Registration" });
const email = decoded.email;
res.render('va_client_register', { title: "Client Registration", email });
} else {
res.render('not_found', { title: "Client Registration" });
}

View File

@ -256,7 +256,7 @@
</td>
<td>
<div class="va-info">
<div class="va-name">${va.firstName} ${va.lastName}</div>
<div class="va-name">${va.name}</div>
<div class="va-email">${va.email || 'N/A'}</div>
</div>
</td>
@ -304,14 +304,14 @@
vaEmptyState.style.display = 'none';
// Add event listeners to view links
document.querySelectorAll('.view-link').forEach(link => {
link.addEventListener('click', function(e) {
e.preventDefault();
const vaId = this.getAttribute('data-va-id');
// You can update this link as needed
window.location.href = `/client/virtual-assistants/${vaId}`;
});
});
// document.querySelectorAll('.view-link').forEach(link => {
// link.addEventListener('click', function(e) {
// e.preventDefault();
// const vaId = this.getAttribute('data-va-id');
// // You can update this link as needed
// window.location.href = `/client/virtual-assistants/${vaId}`;
// });
// });
} else {
vaTableBody.innerHTML = '';
vaTableBody.style.display = 'none';

View File

@ -213,7 +213,7 @@
<body>
<div class="logo">
<img src="/public/images/logo-white-vertical.svg" alt="DocVA Logo" />
<img id="logo-img" src="/public/images/logo-white-vertical.svg" alt="DocVA Logo" />
</div>
<div class="login-card">
@ -224,7 +224,7 @@
<input type="password" name="password" placeholder="Enter your password *" required />
<a href="/client/forgot-password" class="forgot">Forgot password?</a>
<button type="submit" class="btn btn-primary">🔒 Log in using password</button>
<button type="submit" class="btn btn-primary">Log in using password</button>
<!-- <div class="divider">OR</div>
@ -236,6 +236,10 @@
const root = document.documentElement;
function setTheme(theme) {
document.getElementById("logo-img").src =
theme === "dark"
? "/public/images/logo-white-vertical.svg"
: "/public/images/logo-colored-vertical.svg";
root.setAttribute("data-theme", theme);
}

View File

@ -101,7 +101,7 @@
</div>
<div class="form-group">
<div class="input-container">
<input type="email" id="email" class="input-field" placeholder=" " required>
<input type="email" id="email" class="input-field" placeholder=" " value="<%= email %>" readonly disabled required>
<label for="email" class="input-label">Email *</label>
</div>
</div>

View File

@ -168,7 +168,7 @@
<form id="account-form">
<div class="form-group">
<div class="input-container">
<input type="email" id="email" class="input-field" placeholder=" " required>
<input type="email" id="email" class="input-field" placeholder=" " value="<%= email %>" readonly disabled required>
<label for="email" class="input-label">Email Address *</label>
</div>
</div>