1
0
forked from Yara724/api

Fixed resend blame and claim sms start

This commit is contained in:
SepehrYahyaee
2026-05-30 16:18:11 +03:30
parent 7aada14551
commit 3b0db0d250
5 changed files with 87 additions and 45 deletions

View File

@@ -51,11 +51,14 @@ export function cloneResendUploadedDocuments(
}
/** How the mobile/web client should collect each resend item (no workflow-step manager). */
export type ResendItemInputKind = "document_camera" | "voice" | "video" | "text";
export type ResendItemInputKind =
| "document_camera"
| "voice"
| "video"
| "text";
export function getResendItemInputKind(item: string): ResendItemInputKind {
if (item === ResendItemType.VOICE) return "voice";
if (item === ResendItemType.VIDEO) return "video";
if (item === ResendItemType.DESCRIPTION) return "text";
return "document_camera";
}
@@ -80,13 +83,15 @@ export function isResendPartyItemSatisfied(
): boolean {
const uploaded = row.uploadedDocuments || {};
if (item === ResendItemType.DESCRIPTION) {
return !!(row.userTextDescription && String(row.userTextDescription).trim());
return !!(
row.userTextDescription && String(row.userTextDescription).trim()
);
}
if (item === ResendItemType.VOICE) {
return !!row.resendVoiceId;
}
if (item === ResendItemType.VIDEO) {
return !!row.resendVideoId;
}
// if (item === ResendItemType.VIDEO) {
// return !!row.resendVideoId;
// }
return !!uploaded[item];
}

View File

@@ -5,12 +5,11 @@ export enum ResendItemType {
CAR_CERTIFICATE = "carCertificate",
DRIVING_LICENSE = "drivingLicense",
CAR_GREEN_CARD = "carGreenCard",
PLATE = "plate",
CAR_PLATE = "carPlate",
CHASSIS_NUMBER = "chassisNumber",
// Media evidence
VOICE = "voice",
VIDEO = "video",
/** Written / text party description (maps to FIRST_DESCRIPTION / SECOND_DESCRIPTION workflow steps) */
DESCRIPTION = "description",
}
}