forked from Yara724/api
Changed Price units to Rial
This commit is contained in:
@@ -58,7 +58,7 @@ export class PartPricingV2Dto {
|
|||||||
@ApiPropertyOptional({
|
@ApiPropertyOptional({
|
||||||
example: "5000000",
|
example: "5000000",
|
||||||
description:
|
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(
|
@ValidateIf(
|
||||||
(part: PartPricingV2Dto) =>
|
(part: PartPricingV2Dto) =>
|
||||||
@@ -74,7 +74,7 @@ export class PartPricingV2Dto {
|
|||||||
@ApiProperty({
|
@ApiProperty({
|
||||||
example: "2000000",
|
example: "2000000",
|
||||||
description:
|
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()
|
@IsString()
|
||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
@@ -84,7 +84,7 @@ export class PartPricingV2Dto {
|
|||||||
@ApiProperty({
|
@ApiProperty({
|
||||||
example: "7000000",
|
example: "7000000",
|
||||||
description:
|
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()
|
@IsString()
|
||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ type ExpertReplyPricingPart = {
|
|||||||
daghi?: { option?: unknown; price?: unknown };
|
daghi?: { option?: unknown; price?: unknown };
|
||||||
};
|
};
|
||||||
|
|
||||||
export const EXPERT_REPLY_MIN_AMOUNT_TOMAN = 100_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 = 10_000_000_000;
|
export const EXPERT_REPLY_MAX_AMOUNT_TOMAN = 100_000_000_000; // It it Rial from now on
|
||||||
|
|
||||||
export type ExpertReplyPricingValidationError = {
|
export type ExpertReplyPricingValidationError = {
|
||||||
message: string;
|
message: string;
|
||||||
@@ -150,7 +150,7 @@ export function getExpertReplyPricingValidationError(
|
|||||||
? "دستمزد"
|
? "دستمزد"
|
||||||
: "مبلغ کل";
|
: "مبلغ کل";
|
||||||
return localizedError(
|
return localizedError(
|
||||||
`${fieldName} قطعه ${String(part.partId)} باید بهصورت مبلغ صحیح و غیرمنفی (تومان) وارد شود.`,
|
`${fieldName} قطعه ${String(part.partId)} باید بهصورت مبلغ صحیح و غیرمنفی (ریال) وارد شود.`,
|
||||||
`parts[${index}].${field}`,
|
`parts[${index}].${field}`,
|
||||||
"invalid_amount",
|
"invalid_amount",
|
||||||
String(part.partId),
|
String(part.partId),
|
||||||
|
|||||||
Reference in New Issue
Block a user