|
|
|
|
@ -123,18 +123,203 @@ export class AuthService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async sendMail(email: string, data: string, flag: string) {
|
|
|
|
|
async sendMail(email: string, custName: string, tenderName: string, bidOpenDate: string, data: string, flag: string) {
|
|
|
|
|
|
|
|
|
|
let content: string;
|
|
|
|
|
let subject: string = "Login Credentials";
|
|
|
|
|
if (flag == 'otp') {
|
|
|
|
|
content = `Your one time password(OTP) for Tender Registration is, ${data} `;
|
|
|
|
|
content = `
|
|
|
|
|
<!doctype html>
|
|
|
|
|
<html lang="en-US">
|
|
|
|
|
|
|
|
|
|
<head>
|
|
|
|
|
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
|
|
|
|
<title>OTP</title>
|
|
|
|
|
<meta name="description" content="New Account Email Template.">
|
|
|
|
|
<style type="text/css">
|
|
|
|
|
a:hover {text-decoration: underline !important;}
|
|
|
|
|
</style>
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
<body marginheight="0" topmargin="0" marginwidth="0" style="margin: 0px; background-color: #f2f3f8;" leftmargin="0">
|
|
|
|
|
<!-- 100% body table -->
|
|
|
|
|
<table cellspacing="0" border="0" cellpadding="0" width="100%" bgcolor="#f2f3f8"
|
|
|
|
|
style="@import url(https://fonts.googleapis.com/css?family=Rubik:300,400,500,700|Open+Sans:300,400,600,700); font-family: 'Open Sans', sans-serif;">
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
<table style="background-color: #f2f3f8; max-width:800px; margin:0 auto;" width="100%" border="0"
|
|
|
|
|
align="center" cellpadding="0" cellspacing="0">
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="height:80px;"> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="text-align:center;">
|
|
|
|
|
<a href="https://www.thrickodithanamscb.in/" title="logo" target="_blank">
|
|
|
|
|
<img width="60" src="https://www.thrickodithanamscb.in/assets/img/emblemwithoutbg.png" title="logo" alt="logo">
|
|
|
|
|
</a>
|
|
|
|
|
<h3 style="font-family: "Lucida Console", "Courier New", monospace;">THRICKODITHANAM SCB</h3>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="height:20px;"> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0"
|
|
|
|
|
style="max-width:670px; background:#fff; border-radius:3px; text-align:center;-webkit-box-shadow:0 6px 18px 0 rgba(0,0,0,.06);-moz-box-shadow:0 6px 18px 0 rgba(0,0,0,.06);box-shadow:0 6px 18px 0 rgba(0,0,0,.06);">
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="height:40px;"> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="padding:0 35px;">
|
|
|
|
|
<h1 style="color:#1e1e2d; font-weight:500; margin:0;font-size:32px;font-family:'Rubik',sans-serif;">OTP
|
|
|
|
|
</h1>
|
|
|
|
|
<p style="font-size:15px; color:#455056; margin:8px 0 0; line-height:24px;">
|
|
|
|
|
Please Register immediately after getting OTP , <br>
|
|
|
|
|
<strong>Your one time password(OTP) for register in tenders is</strong>.</p>
|
|
|
|
|
<span
|
|
|
|
|
style="display:inline-block; vertical-align:middle; margin:29px 0 26px; border-bottom:1px solid #cecece; width:100px;"></span>
|
|
|
|
|
<p
|
|
|
|
|
style="color:#455056; font-size:18px;line-height:20px; margin:0; font-weight: 500;">
|
|
|
|
|
|
|
|
|
|
<strong
|
|
|
|
|
style="display: block; font-size: 13px; margin: 24px 0 4px 0; font-weight:normal; color:rgba(0,0,0,.64);">OTP</strong>
|
|
|
|
|
|
|
|
|
|
<h1 style="font-family: "Lucida Console", "Courier New", monospace;"> ${data}</h1>
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="height:40px;"> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="height:20px;"> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="text-align:center;">
|
|
|
|
|
<p style="font-size:14px; color:rgba(69, 80, 86, 0.7411764705882353); line-height:18px; margin:0 0 0;">©<strong> <a href="https://www.thrickodithanamscb.in/" >www.thrickodithanamscb.in</a></strong> </p>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="height:80px;"> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
<!--/100% body table-->
|
|
|
|
|
</body>
|
|
|
|
|
|
|
|
|
|
</html> `;
|
|
|
|
|
subject = 'OTP'
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (flag == 'uDocSub') {
|
|
|
|
|
content = `Dear ${custName},<br><br>
|
|
|
|
|
We hope this email finds you well. We would like to express our sincere gratitude for your participation in the tender process for <a style="color:red;">${tenderName}</a>. We are pleased to inform you that your tender documents have been successfully submitted. Thank you for your meticulous efforts in preparing and submitting all the necessary documents within the specified timeframe.<br><br>
|
|
|
|
|
The bid opening for the tender you have participated in is scheduled for <a style="color:red;">${bidOpenDate}</a>. During this process, all submitted tenders will be carefully reviewed and assessed. We will diligently consider each proposal and evaluate it against the criteria outlined in the tender documentation.<br>
|
|
|
|
|
Should any additional information or documents be required, we will promptly reach out to you via the contact details provided during the submission process.<br><br>
|
|
|
|
|
Should you have any queries or require any clarification regarding the tender process or your submission, please contact our dedicated tender support team. You can reach us via email at tscb178@gmail.com or by calling our helpline at tel:04812441062 or tel:04812443452.<br><br>
|
|
|
|
|
Once again, we extend our heartfelt appreciation for your participation in this tender. Your interest and contribution are highly valued, and we look forward to the possibility of working together in the future.<br><br>
|
|
|
|
|
Best regards,<br>
|
|
|
|
|
Thrickodithanam Service Co-operative Bank LTD No 178,<br>
|
|
|
|
|
Kunnumpuram, Thrickodithanam,<br> Kottayam, Kerala, 686105.`;
|
|
|
|
|
subject = 'Tender Submission Successful - Thank you for your participation!'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (flag == 'fpwd') {
|
|
|
|
|
content = `Your one time password(OTP) for Password reset is, ${data}`;
|
|
|
|
|
content = ` <!doctype html>
|
|
|
|
|
<html lang="en-US">
|
|
|
|
|
|
|
|
|
|
<head>
|
|
|
|
|
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
|
|
|
|
<title>OTP</title>
|
|
|
|
|
<meta name="description" content="New Account Email Template.">
|
|
|
|
|
<style type="text/css">
|
|
|
|
|
a:hover {text-decoration: underline !important;}
|
|
|
|
|
</style>
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
<body marginheight="0" topmargin="0" marginwidth="0" style="margin: 0px; background-color: #f2f3f8;" leftmargin="0">
|
|
|
|
|
<!-- 100% body table -->
|
|
|
|
|
<table cellspacing="0" border="0" cellpadding="0" width="100%" bgcolor="#f2f3f8"
|
|
|
|
|
style="@import url(https://fonts.googleapis.com/css?family=Rubik:300,400,500,700|Open+Sans:300,400,600,700); font-family: 'Open Sans', sans-serif;">
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
<table style="background-color: #f2f3f8; max-width:670px; margin:0 auto;" width="100%" border="0"
|
|
|
|
|
align="center" cellpadding="0" cellspacing="0">
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="height:80px;"> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="text-align:center;">
|
|
|
|
|
<a href="https://www.thrickodithanamscb.in/" title="logo" target="_blank">
|
|
|
|
|
<img width="60" src="https://www.thrickodithanamscb.in/assets/img/emblemwithoutbg.png" title="logo" alt="logo">
|
|
|
|
|
</a>
|
|
|
|
|
<h3 style="font-family: "Lucida Console", "Courier New", monospace;">THRICKODITHANAM SCB</h3>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="height:20px;"> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0"
|
|
|
|
|
style="max-width:670px; background:#fff; border-radius:3px; text-align:center;-webkit-box-shadow:0 6px 18px 0 rgba(0,0,0,.06);-moz-box-shadow:0 6px 18px 0 rgba(0,0,0,.06);box-shadow:0 6px 18px 0 rgba(0,0,0,.06);">
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="height:40px;"> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="padding:0 35px;">
|
|
|
|
|
<h1 style="color:#1e1e2d; font-weight:500; margin:0;font-size:32px;font-family:'Rubik',sans-serif;">OTP
|
|
|
|
|
</h1>
|
|
|
|
|
<p style="font-size:15px; color:#455056; margin:8px 0 0; line-height:24px;">
|
|
|
|
|
Please Register immediately after getting OTP , <br>
|
|
|
|
|
<strong>Your one time password(OTP) for Reset Password is</strong>.</p>
|
|
|
|
|
<span
|
|
|
|
|
style="display:inline-block; vertical-align:middle; margin:29px 0 26px; border-bottom:1px solid #cecece; width:100px;"></span>
|
|
|
|
|
<p
|
|
|
|
|
style="color:#455056; font-size:18px;line-height:20px; margin:0; font-weight: 500;">
|
|
|
|
|
|
|
|
|
|
<strong
|
|
|
|
|
style="display: block; font-size: 13px; margin: 24px 0 4px 0; font-weight:normal; color:rgba(0,0,0,.64);">OTP</strong>
|
|
|
|
|
<h1 style="font-family: "Lucida Console", "Courier New", monospace;"> ${data}</h1>
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="height:40px;"> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="height:20px;"> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="text-align:center;">
|
|
|
|
|
<p style="font-size:14px; color:rgba(69, 80, 86, 0.7411764705882353); line-height:18px; margin:0 0 0;">©
|
|
|
|
|
<strong> <a href="https://www.thrickodithanamscb.in/" >www.thrickodithanamscb.in</a></strong> </p>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="height:80px;"> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
<!--/100% body table-->
|
|
|
|
|
</body>
|
|
|
|
|
|
|
|
|
|
</html> `;
|
|
|
|
|
subject = 'OTP'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -144,10 +329,10 @@ export class AuthService {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async sendOtp(body: { email: string}, flag: string): Promise<void> {
|
|
|
|
|
async sendOtp(body: { email: string, custName: string, tenderName: string, bidOpenDate: string }, flag: string): Promise<void> {
|
|
|
|
|
|
|
|
|
|
if (body.email) {
|
|
|
|
|
if (flag == 'F' || flag == 'R'){
|
|
|
|
|
if (flag == 'F' || flag == 'R' || flag == 'UD') {
|
|
|
|
|
|
|
|
|
|
let isUserExist = await this.pcduserRepository.findOne({ where: { email: body.email } });
|
|
|
|
|
|
|
|
|
|
@ -161,10 +346,13 @@ export class AuthService {
|
|
|
|
|
} else {
|
|
|
|
|
let newOtp = await this.generateOtp(body.email, flag);
|
|
|
|
|
if (body.email && flag == 'R') {
|
|
|
|
|
await this.sendMail(body.email, newOtp, 'otp');
|
|
|
|
|
await this.sendMail(body.email, body.custName, body.tenderName, body.bidOpenDate, newOtp, 'otp');
|
|
|
|
|
}
|
|
|
|
|
if (body.email && flag == 'F') {
|
|
|
|
|
await this.sendMail(body.email, newOtp, 'fpwd');
|
|
|
|
|
await this.sendMail(body.email, body.custName, body.tenderName, body.bidOpenDate, newOtp, 'fpwd');
|
|
|
|
|
}
|
|
|
|
|
if (body.email && flag == 'UD') {
|
|
|
|
|
await this.sendMail(body.email, body.custName, body.tenderName, body.bidOpenDate, newOtp, 'uDocSub');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
@ -178,7 +366,6 @@ export class AuthService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async tempSignUp(pcdUserDto: PcduserDto): Promise<any> {
|
|
|
|
|
const filter: FindManyOptions = { where: { "refCode": pcdUserDto.email, "status": "I" }, order: { code: "DESC" } };
|
|
|
|
|
const newOtp = await this.pcdotpRepository.find(filter);
|
|
|
|
|
@ -190,7 +377,6 @@ export class AuthService {
|
|
|
|
|
throw new UnauthorizedException('Unauthorized Access');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Creating Random User_Id for every user registered
|
|
|
|
|
const lastUser: PcduserDto = await this.pcduserRepository.findOne({
|
|
|
|
|
where: {},
|
|
|
|
|
|