forked from Yara724/api
fanavaran rate bugs fixed + sms of claimId and claimNo added
This commit is contained in:
@@ -18,6 +18,8 @@ const PARSIAN_TEMPLATE_BODIES: Record<string, string> = {
|
||||
"لطفاً مدارک پرونده {token} ({token2}) را مجدداً ارسال کنید.\nلینک: {token3}",
|
||||
"yara-signature":
|
||||
"امضای پرونده {token} ({token2}) توسط کارشناس {token3} بررسی شد.\nلینک: {token10}",
|
||||
"yara-fanavaran-claim":
|
||||
"کاربر گرامی پرونده شما به شماره {token3} در فناوران با شناسه {token2} و شماره {token} ثبت شده است. جهت پیگیری های آتی پرونده خود باید از این اطلاعات استفاده کنید.",
|
||||
};
|
||||
|
||||
function applyTokens(
|
||||
|
||||
@@ -191,6 +191,40 @@ export class SmsOrchestrationService implements OnModuleInit {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify the claim owner (damaged party) that the Fanavaran base claim was
|
||||
* created. Uses the same SMS gateway/provider as login for this deployment.
|
||||
*
|
||||
* token = ClaimNo, token2 = claimId (Fanavaran Id), token3 = Yara publicId
|
||||
*
|
||||
* Parsian body:
|
||||
* کاربر گرامی پرونده شما به شماره {publicId} در فناوران با شناسه {claimId}
|
||||
* و شماره {claimNo} ثبت شده است. جهت پیگیری های آتی پرونده خود باید از این
|
||||
* اطلاعات استفاده کنید.
|
||||
*/
|
||||
async sendFanavaranBaseClaimRegisteredNotice(params: {
|
||||
receptor: string;
|
||||
publicId: string;
|
||||
claimNo?: string | number | null;
|
||||
claimId?: string | number | null;
|
||||
}): Promise<boolean> {
|
||||
const claimNo =
|
||||
params.claimNo != null && String(params.claimNo).trim()
|
||||
? String(params.claimNo)
|
||||
: "-";
|
||||
const claimId =
|
||||
params.claimId != null && String(params.claimId).trim()
|
||||
? String(params.claimId)
|
||||
: "-";
|
||||
return this.sendTemplate({
|
||||
template: "yara-fanavaran-claim",
|
||||
receptor: params.receptor,
|
||||
token: params.publicId || "-",
|
||||
token2: claimId,
|
||||
token3: claimNo,
|
||||
});
|
||||
}
|
||||
|
||||
private async sendTemplate(args: TemplateArgs): Promise<boolean> {
|
||||
try {
|
||||
await this.smsGatewayService.verifyLookUp(args);
|
||||
|
||||
Reference in New Issue
Block a user