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