feat: Add note when client field is updated in permits

This commit is contained in:
2026-01-06 11:18:59 +05:30
parent d6480bdb5f
commit 46c07e23ad
2 changed files with 18 additions and 0 deletions

View File

@@ -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(

View File

@@ -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(