diff --git a/public/css/dashboard.css b/public/css/dashboard.css index 4bfd24f..f1bf39d 100644 --- a/public/css/dashboard.css +++ b/public/css/dashboard.css @@ -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; diff --git a/src/helper/updateEntityRelationships.js b/src/helper/updateEntityRelationships.js index a689f87..060ce63 100644 --- a/src/helper/updateEntityRelationships.js +++ b/src/helper/updateEntityRelationships.js @@ -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 }} ); } diff --git a/src/server.js b/src/server.js index 17cc29a..5e7972b 100644 --- a/src/server.js +++ b/src/server.js @@ -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" }); } diff --git a/views/client/dashboard-dashboard.ejs b/views/client/dashboard-dashboard.ejs index 091dc6b..12481a8 100644 --- a/views/client/dashboard-dashboard.ejs +++ b/views/client/dashboard-dashboard.ejs @@ -256,7 +256,7 @@