fix: recover saved photo uploads and lower car-body description minimum

Read saved document status from maps and plain objects, acknowledge verified document retries without replacing stored images, and preserve upload authorization and resend behavior. Lower the car-body narrative minimum to 30 characters with Persian errors and boundary regression coverage.
This commit is contained in:
SepehrYahyaee
2026-11-21 12:35:49 +03:30
parent 8f15040080
commit e33f5736a2
12 changed files with 202 additions and 29 deletions
@@ -220,9 +220,9 @@ export class RequestManagementService {
): void {
if (requestType !== BlameRequestType.CAR_BODY) return;
const length = String(description ?? "").trim().length;
if (length < 100) {
if (length < 30) {
throw new BadRequestException(
"CAR_BODY description must contain at least 100 non-whitespace characters.",
"شرح حادثه باید حداقل ۳۰ کاراکتر باشد.",
);
}
}
@@ -8627,6 +8627,8 @@ export class RequestManagementService {
const idx = this.getPartyIndex(req, role);
if (idx === -1) throw new BadRequestException(`${role} party not found`);
this.assertCarBodyDescriptionMinimum(req.type, body.desc);
const party = req.parties[idx];
if (!party.statement) party.statement = {} as any;
party.statement.description = body.desc;