add assignedTo field to unique fields endpoint

This commit is contained in:
2025-05-13 13:49:39 +05:30
parent d9397e572b
commit 4028c05d5f
6 changed files with 65 additions and 4 deletions

View File

@@ -334,7 +334,7 @@ export async function getUniqueValuesPermit(field: string, tenenatId: string) {
} else if (field === "client") {
matchedValues = await orgModel.find().where("_id").in(values).exec();
} else if (field === "assignedTo") {
matchedValues = await userModel.find().where("name").in(values).exec();
matchedValues = await userModel.find().where("_id").in(values).exec();
}
if (matchedValues.length > 0) {