feat: Add note when client field is updated in permits
This commit is contained in:
@@ -339,6 +339,15 @@ export async function updatePermit(
|
||||
|
||||
updatePermitResult.markModified("clientData");
|
||||
await updatePermitResult.save();
|
||||
|
||||
await createNote(
|
||||
{
|
||||
content: `Updated client to ${orgInDb.name}`,
|
||||
},
|
||||
permitId,
|
||||
"permits",
|
||||
user
|
||||
);
|
||||
}
|
||||
} else if (key == "assignedTo") {
|
||||
const newAssignees = arrayDiff(
|
||||
|
||||
@@ -90,6 +90,15 @@ export async function updateProcessed(
|
||||
|
||||
updateProcessedResult.markModified("clientData");
|
||||
await updateProcessedResult.save();
|
||||
|
||||
await createNote(
|
||||
{
|
||||
content: `Updated client to ${orgInDb.name}`,
|
||||
},
|
||||
permitId,
|
||||
"permits",
|
||||
user
|
||||
);
|
||||
}
|
||||
} else if (key == "assignedTo") {
|
||||
const newAssignees = arrayDiff(
|
||||
|
||||
Reference in New Issue
Block a user