Manage Timesheet update

This commit is contained in:
=bhagwanSingh 2025-12-02 13:20:04 +05:30
parent b085a88579
commit 7ac50fe720
2 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ async function va_timesheet_manage_adjustment_request(req, res) {
});
}
if (action === "approve") {
if (action === "APPROVE") {
// Create new log entries in LoggedModel
const loginLog = new LoggedModel({
loggedType: "LOGIN",
@ -78,7 +78,7 @@ async function va_timesheet_manage_adjustment_request(req, res) {
}
});
} else if (action === "reject") {
} else if (action === "REJECT") {
// Update adjustment record as rejected
adjustment.status = "REJECTED";
adjustment.reviewedAt = new Date();

View File

@ -437,7 +437,7 @@ const adjustedHoursSchema = new Schema({
}],
status: {
type: String,
enum: ["PENDING", "APPROVE", "REJECT"],
enum: ["PENDING", "APPROVED", "REJECTED"],
default: "PENDING"
},
reviewedAt: {