Compare commits

..

No commits in common. "e96986923e33781842bf4f4da0673dc63c430d41" and "bc3b81e12fc0bcf61724efd09fdbf1726b243c2d" have entirely different histories.

3 changed files with 11 additions and 31 deletions

View File

@ -4,17 +4,11 @@ const API_BASE = '/api/v1/client';
const vaCreditsTableBody = document.getElementById("vaCreditTableBody"); const vaCreditsTableBody = document.getElementById("vaCreditTableBody");
const vaCreditsEmptyState = document.getElementById("vaEmptyCreditState"); const vaCreditsEmptyState = document.getElementById("vaEmptyCreditState");
function formatDateTime(dateTimeStr) {
const date = new Date(dateTimeStr);
return date.toLocaleDateString();
// return date.toLocaleDateString() + ' ' + date.toLocaleTimeString();
}
function createCreditRow(credit) { function createCreditRow(credit) {
return ` return `
<tr data-credit-id="${credit.id}"> <tr data-credit-id="${credit.id}">
<td><span class="status ${credit.status.toLowerCase()}">${credit.status}</span></td> <td><span class="status ${credit.status.toLowerCase()}">${credit.status}</span></td>
<td>${formatDateTime(credit.date)}</td> <td>${credit.date}</td>
<td>${credit.comment}</td> <td>${credit.comment}</td>
<td>$${credit.creditAmount}</td> <td>$${credit.creditAmount}</td>
</tr> </tr>

View File

@ -591,6 +591,14 @@ io.on("connection", (socket) => {
}); });
// app.get("/", (req, res) => {
// res.render("client_login")
// })
// app.get("/forgot-password", (req, res) => {
// res.render("forgot_password")
// })
app.get("/health", (req, res) => { app.get("/health", (req, res) => {
return res.status(200).json({ "success": true, "message": "Server is Healthy" }) return res.status(200).json({ "success": true, "message": "Server is Healthy" })
}) })
@ -607,7 +615,7 @@ app.get("/tnyk/:sf_token", (req, res) => {
try { try {
const decoded = jwt.verify(sf_token, process.env.JWT_SECRET_SF_TOKEN); const decoded = jwt.verify(sf_token, process.env.JWT_SECRET_SF_TOKEN);
if (decoded) { if (decoded) {
res.render('client/dashboard-dashboard', { sf_token, title: "Client" }); res.render('client/dashboard-dashboard', { sf_token: sf_token });
} else { } else {
res.render('not_found', { title: "Client" }); res.render('not_found', { title: "Client" });
} }
@ -618,21 +626,6 @@ app.get("/tnyk/:sf_token", (req, res) => {
}); });
app.get("/", (req, res) => {
// res.render("client_login")
res.render("client/client_login", {
layout: "layouts/auth", // ⬅️ override layout
title: "DocVA | Login"
});
})
app.get("/forgot-password", (req, res) => {
res.render("forgot_password", {
title: "Forgot Password",
layout: "layouts/forgotpasswordlayout"
});
})
app.use((req, res) => { app.use((req, res) => {
res.status(404).render("not_found", { res.status(404).render("not_found", {
layout: "layouts/error", layout: "layouts/error",

View File

@ -66,11 +66,4 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<script>
const tnyk = "<%= typeof sf_token !== 'undefined' ? sf_token : '' %>";
if (tnyk) {
localStorage.setItem('knoptpq', tnyk);
}
</script>