Manage Timesheet update
This commit is contained in:
parent
b085a88579
commit
7ac50fe720
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -437,7 +437,7 @@ const adjustedHoursSchema = new Schema({
|
|||
}],
|
||||
status: {
|
||||
type: String,
|
||||
enum: ["PENDING", "APPROVE", "REJECT"],
|
||||
enum: ["PENDING", "APPROVED", "REJECTED"],
|
||||
default: "PENDING"
|
||||
},
|
||||
reviewedAt: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue