forked from Yara724/api
Fixed resend blame and claim sms start
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user