This commit is contained in:
=bhagwanSingh 2025-12-10 20:24:38 +05:30
parent 140b669bdb
commit 6fd3da0837
5 changed files with 136 additions and 130 deletions

View File

@ -22,6 +22,9 @@ async function va_register_client(req, res) {
const created = await vaClientService.registerClient(payload); const created = await vaClientService.registerClient(payload);
logger.info(`ClientController - Client registered successfully: ${userDetails.email}`); logger.info(`ClientController - Client registered successfully: ${userDetails.email}`);
await passwordResetService.requestPasswordReset(userDetails.email, 'client');
logger.info(`Client password reset requested for: ${email}`);
return res.status(201).json({ return res.status(201).json({
success: true, success: true,
data: created, data: created,
@ -284,8 +287,8 @@ async function update_client_password(req, res) {
} }
if (error.message.includes("Current password is incorrect") || if (error.message.includes("Current password is incorrect") ||
error.message.includes("New passwords do not match") || error.message.includes("New passwords do not match") ||
error.message.includes("All password fields are required")) { error.message.includes("All password fields are required")) {
return res.status(400).json({ return res.status(400).json({
success: false, success: false,
message: error.message message: error.message

View File

@ -69,13 +69,13 @@ async function checkDailyHoursAndLogout(vaId, vaEmail, projectId, project, curre
try { try {
const salesforceUrl = `${process.env.SF_DOCTRACKER_API_URL}services/apexrest/docva/api/va-project-log`; const salesforceUrl = `${process.env.SF_DOCTRACKER_API_URL}services/apexrest/docva/api/va-project-log`;
const sfDataSync = { const sfDataSync = {
"_id": logoutLog._id, "_id": logoutLog._id,
"loggedType": "LOGOUT", "loggedType": "LOGOUT",
"vaId": vaId, "vaId": vaId,
"vaEmail": vaEmail, "vaEmail": vaEmail,
"projectId": projectId, "projectId": projectId,
"time": logoutLog.time, "time": logoutLog.time,
} }
const response = await fetch(salesforceUrl, { const response = await fetch(salesforceUrl, {
method: 'POST', method: 'POST',
@ -147,7 +147,12 @@ async function va_log_track_work_callback(req, res) {
const vaId = vaUser._id; const vaId = vaUser._id;
const payload = req.body || {}; const payload = req.body || {};
const { projectId, logId, title, appName, url = null } = payload;
let { projectId, logId, title, appName, url = null } = payload;
if (title === "") {
title = ""
}
const project = await ProjectModel.findById(projectId); const project = await ProjectModel.findById(projectId);
if (!project) return res.status(400).json({ success: false, message: "Project not found" }); if (!project) return res.status(400).json({ success: false, message: "Project not found" });

View File

@ -31,8 +31,6 @@ clientRoutes.delete("/tips/:tipId", clientAuthValidator, va_tips_delete);
// clientRoutes.get("/:clientID?", va_clients_callback); // VA Clients Callback for getting all VA's or specific client by ID (NC) // clientRoutes.get("/:clientID?", va_clients_callback); // VA Clients Callback for getting all VA's or specific client by ID (NC)
clientRoutes.get("/:clientId/projects/:projectId", va_clients_projects_callback); // VA Clients Projects Callback (NC) clientRoutes.get("/:clientId/projects/:projectId", va_clients_projects_callback); // VA Clients Projects Callback (NC)
// dashboard API's // dashboard API's
clientRoutes.get("/dashboard", clientAuthValidator, client_dashboard); // VA Clients Projects Callback clientRoutes.get("/dashboard", clientAuthValidator, client_dashboard); // VA Clients Projects Callback
clientRoutes.post("/dashboard/va-report", clientAuthValidator, client_dashboard_va_log); // VA details clientRoutes.post("/dashboard/va-report", clientAuthValidator, client_dashboard_va_log); // VA details

View File

@ -11,14 +11,14 @@
<style> <style>
.void-btn-a { .void-btn-a {
background: #394059; background: tomato;
text-decoration: none; text-decoration: none;
color: #2b8efc !important; color: #ffffff !important;
border: none; border: none;
padding: 0.5rem 1rem; padding: 0.5rem 1rem;
border-radius: 5px; border-radius: 5px;
font-weight: bold; font-weight: bold;
text-decoration: underline; text-decoration: none;
cursor: pointer; cursor: pointer;
} }
</style> </style>

View File

@ -224,7 +224,7 @@
<input type="password" name="password" placeholder="Enter your password *" required /> <input type="password" name="password" placeholder="Enter your password *" required />
<a href="/forgot-password" class="forgot">Forgot password?</a> <a href="/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</button>
<!-- <div class="divider">OR</div> <!-- <div class="divider">OR</div>