dynamic locations

This commit is contained in:
2026-11-11 14:10:01 +03:30
parent 5e3bd02243
commit 658a8a74cc
18 changed files with 454 additions and 111 deletions
@@ -172,6 +172,9 @@ describe("management accounts, optional Fanavaran fields and tenant boundaries",
it.each([
["file_maker", "ThirdPartyClaimExpertId", "CarBodyClaimExpertId"],
["file_reviewer", "ThirdPartyExpertiseClaim", "CarBodyExpertiseClaim"],
["expert", "ThirdPartyClaimExpertId", "CarBodyClaimExpertId"],
["damage_expert", "ThirdPartyClaimExpertId", "CarBodyClaimExpertId"],
["field_expert", "ThirdPartyClaimExpertId", "CarBodyClaimExpertId"],
])(
"persists and edits %s Fanavaran IDs and locations using the real schemas",
async (role, first, second) => {
@@ -187,6 +190,7 @@ describe("management accounts, optional Fanavaran fields and tenant boundaries",
);
expect(row[first]).toBe("100");
expect(row[second]).toBe("200");
expect(row.locations).toMatchObject([{ id: "1", name: "تهران" }]);
const edited = await service.updateStaff(tenant, role, String(row._id), {
[first]: "300",
[second]: null,