From 152250a3874939e47992d357eb1d287801ad9cb2 Mon Sep 17 00:00:00 2001 From: SepehrYahyaee <7heycallmegray@gmail.com> Date: Mon, 14 Sep 2026 16:48:34 +0330 Subject: [PATCH] Changed Price units to Rial --- src/expert-claim/dto/expert-claim-v2.dto.ts | 6 +++--- src/helpers/expert-reply-pricing.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/expert-claim/dto/expert-claim-v2.dto.ts b/src/expert-claim/dto/expert-claim-v2.dto.ts index bdc58eb..23df75e 100644 --- a/src/expert-claim/dto/expert-claim-v2.dto.ts +++ b/src/expert-claim/dto/expert-claim-v2.dto.ts @@ -58,7 +58,7 @@ export class PartPricingV2Dto { @ApiPropertyOptional({ example: "5000000", description: - "Required for change lines; omitted for repair lines. Every supplied amount must be between 100,000 and 10,000,000,000 Toman.", + "Required for change lines; omitted for repair lines. Every supplied amount must be between 1,000,000 and 100,000,000,000 Rial.", }) @ValidateIf( (part: PartPricingV2Dto) => @@ -74,7 +74,7 @@ export class PartPricingV2Dto { @ApiProperty({ example: "2000000", description: - "Labor in Toman (integer string; 100,000 to 10,000,000,000).", + "Labor in Rial (integer string; 1,000,000 to 100,000,000,000).", }) @IsString() @IsNotEmpty() @@ -84,7 +84,7 @@ export class PartPricingV2Dto { @ApiProperty({ example: "7000000", description: - "Line total in Toman (integer string; 100,000 to 10,000,000,000).", + "Line total in Rial (integer string; 1,000,000 to 100,000,000,000).", }) @IsString() @IsNotEmpty() diff --git a/src/helpers/expert-reply-pricing.ts b/src/helpers/expert-reply-pricing.ts index d44f1ee..0a7cc25 100644 --- a/src/helpers/expert-reply-pricing.ts +++ b/src/helpers/expert-reply-pricing.ts @@ -11,8 +11,8 @@ type ExpertReplyPricingPart = { daghi?: { option?: unknown; price?: unknown }; }; -export const EXPERT_REPLY_MIN_AMOUNT_TOMAN = 100_000; -export const EXPERT_REPLY_MAX_AMOUNT_TOMAN = 10_000_000_000; +export const EXPERT_REPLY_MIN_AMOUNT_TOMAN = 1_000_000; // It is Rial from now on but we managed to keep the variables named as *Toman so that we won't have conflicts elsewhere. +export const EXPERT_REPLY_MAX_AMOUNT_TOMAN = 100_000_000_000; // It it Rial from now on export type ExpertReplyPricingValidationError = { message: string; @@ -150,7 +150,7 @@ export function getExpertReplyPricingValidationError( ? "دستمزد" : "مبلغ کل"; return localizedError( - `${fieldName} قطعه ${String(part.partId)} باید به‌صورت مبلغ صحیح و غیرمنفی (تومان) وارد شود.`, + `${fieldName} قطعه ${String(part.partId)} باید به‌صورت مبلغ صحیح و غیرمنفی (ریال) وارد شود.`, `parts[${index}].${field}`, "invalid_amount", String(part.partId),