feat: add note when requests field is updated
This commit is contained in:
@@ -241,7 +241,7 @@ export async function updatePermit(
|
||||
|
||||
if (updatePermitResult) {
|
||||
for (const key in input) {
|
||||
if (["manualStatus", "utility", "assignedTo"].includes(key)) {
|
||||
if (["manualStatus", "utility", "assignedTo", "requests"].includes(key)) {
|
||||
let msg = "";
|
||||
|
||||
if (input[key] === null) {
|
||||
@@ -251,6 +251,8 @@ export async function updatePermit(
|
||||
if (!user) continue;
|
||||
|
||||
msg = `Assigned to ${user.firstName + " " + user.lastName}`;
|
||||
} else if (key == "requests") {
|
||||
msg = `Updated ${key} to '${input[key].join(", ")}'`;
|
||||
} else {
|
||||
msg = `Updated ${key} to '${input[key]}'`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user