This commit is contained in:
parent
0b9d6f801e
commit
52e4eb8133
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ async function removeEntityRelationships(data) {
|
|||
}}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Remove projectId from VAs
|
||||
if (vaId && Array.isArray(vaId)) {
|
||||
await VAModel.updateMany(
|
||||
|
|
@ -220,7 +220,7 @@ async function removeEntityRelationships(data) {
|
|||
{ $pull: {
|
||||
projectIds: projectId,
|
||||
// 🐞🐞🐞 Here before removing we need to check if VA is still assigned to other projects of the same client
|
||||
clientIds: clientId
|
||||
clientIds: clientId
|
||||
}}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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" });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
@ -276,7 +280,7 @@
|
|||
if (!res.ok) {
|
||||
throw new Error(data.message || "Login failed");
|
||||
}
|
||||
|
||||
|
||||
if (data.success) {
|
||||
// 🟢 Save token
|
||||
localStorage.setItem("knoptpq", data.accessToken);
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue