Added fixed height to table elements

This commit is contained in:
ashutosh.nehete 2025-05-26 11:25:13 +05:30 committed by Vikas Nale
parent 7e70297e7c
commit 276b253e2d
3 changed files with 66 additions and 63 deletions

View File

@ -389,82 +389,86 @@
Project Status Reported - Generated at {{TIMESTAMP}} Project Status Reported - Generated at {{TIMESTAMP}}
</span> </span>
<table cellpadding="1" cellspacing="0" width="100%" <table cellpadding="1" cellspacing="0" width="100%"
border="0"> border="0" style="margin-top: 15px">
<tr style="vertical-align:middle"> <tr style="vertical-align:middle">
<td class="column" style="text-align:center"> <td class="column" style="text-align:center">
<div style="border: 1px solid #d5d5d5; border-radius: 10px; margin: 10px 10px; padding: 10px;"> <div style="border: 1px solid #d5d5d5; border-radius: 10px; margin: 10px 10px; padding: 10px; height: 135px !important">
<div style="font-size: 18px; color: #525b75 "> <div style="font-size: 18px; color: #525b75 ">
Todays Attendane Todays Attendane
</div> </div>
<div style="font-size: 25px; color: #bc3803;margin:20px!important; font-weight:bold; "> <div style="font-size: 25px; color: #bc3803;margin:20px 20px 0px!important; font-weight:bold; ">
{{TODAYS_ATTENDANCES}} / {{TODAYS_ATTENDANCES}} /
{{TOTAL_EMPLOYEES}} {{TOTAL_EMPLOYEES}}
</div> </div>
<span style="font-size: 10px; color: #0984e3; font-weight: bold;"> <span style="font-size: 10px; color: #0984e3; font-weight: bold;">
* Checked-in / Assigned Checked-in / Assigned
</span> </span>
</div> </div>
</td> </td>
<td class="column" style="text-align:center"> <td class="column" style="text-align:center">
<div style="border: 1px solid #d5d5d5; border-radius: 10px; margin: 10px 10px; padding: 10px;"> <div style="border: 1px solid #d5d5d5; border-radius: 10px; margin: 10px 10px; padding: 10px; height: 135px !important">
<div style="font-size: 18px; color: #525b75 "> <div style="font-size: 18px; color: #525b75 ">
Daily Tasks Completed Daily Tasks Completed
</div> </div>
<div style="font-size: 25px; color: #bc3803; margin: 20px !important; font-weight: bold;"> <div style="font-size: 25px; color: #bc3803; margin: 20px 20px 0px !important; font-weight: bold;">
{{TODAYS_COMPLETED}} / {{TODAYS_COMPLETED}} /
{{TODAYS_PLANNED}} {{TODAYS_PLANNED}}
</div> </div>
<span style="font-size: 10px; color: #0984e3; font-weight: bold;"> <span style="font-size: 10px; color: #0984e3; font-weight: bold;">
* Today's Completed Task / Today's Planned Task Today's Completed Task / Today's Planned Task
</span> </span>
</div> </div>
</td> </td>
<td class="column" style="text-align:center"> <td class="column" style="text-align:center">
<div style="border: 1px solid #d5d5d5; border-radius: 10px; margin: 10px 10px; padding: 10px;"> <div style="border: 1px solid #d5d5d5; border-radius: 10px; margin: 10px 10px; padding: 10px; height: 135px !important">
<div style="font-size: 18px; color: #525b75 "> <div style="font-size: 18px; color: #525b75 ">
Project Completion Status Project Completion Status
</div> </div>
<div style="font-size: 25px; color: #bc3803; margin: 20px !important; font-weight: bold; "> <div style="font-size: 25px; color: #bc3803; margin: 20px 20px 0px !important; font-weight: bold; ">
{{TOTAL_COMPLETED}} / {{TOTAL_COMPLETED}} /
{{TOTAL_PLANNED}} ({{PROJECT_STATUS}}) {{TOTAL_PLANNED}}
<div style="padding-top: 5px;"> ({{PROJECT_STATUS}})</div>
</div> </div>
<span style="font-size: 10px; color: #0984e3; font-weight: bold;"> <span style="font-size: 10px; color: #0984e3; font-weight: bold;">
* Total Completed Task / Total Planned Task Total Completed Task / Total Planned Task
</span> </span>
</div> </div>
</td> </td>
</tr> </tr>
<tr style="vertical-align:middle"> <tr style="vertical-align:middle">
<td class="column" style="text-align:center"> <td class="column" style="text-align:center">
<div style="border: 1px solid #d5d5d5; border-radius: 10px; margin: 10px 10px; padding: 10px;"> <div style="border: 1px solid #d5d5d5; border-radius: 10px; margin: 10px 10px; padding: 10px; height: 100px !important">
<div style="font-size: 18px; color: #525b75 "> <div style="font-size: 18px; color: #525b75 ">
Regularization Pending Regularization Pending
</div> </div>
<div style="font-size: 25px; color: #bc3803; margin: 20px !important; font-weight: bold;"> <div style="font-size: 25px; color: #bc3803; margin: 20px 20px 0px !important; font-weight: bold;">
{{REGULRIZATION_PENDING}} {{REGULRIZATION_PENDING}}
</div> </div>
</div> </div>
</td> </td>
<td class="column" style="text-align:center"> <td class="column" style="text-align:center">
<div style="border: 1px solid #d5d5d5; border-radius: 10px; margin: 10px 10px; padding: 10px;"> <div style="border: 1px solid #d5d5d5; border-radius: 10px; margin: 10px 10px; padding: 10px; height: 100px !important">
<div style="font-size: 18px; color: #525b75 "> <div style="font-size: 18px; color: #525b75 ">
Checkout Pending Checkout Pending
</div> </div>
<div style="font-size: 25px; color: #bc3803; margin: 20px !important; font-weight: bold;"> <div style="font-size: 25px; color: #bc3803; margin: 20px 20px 0px !important; font-weight: bold;">
{{CHECKOUT_PRNDING}} {{CHECKOUT_PRNDING}}
</div> </div>
</div> </div>
</td> </td>
<td class="column" style="text-align:center"> <td class="column" style="text-align:center">
<div style="border: 1px solid #d5d5d5; border-radius: 10px; margin: 10px 10px; padding: 10px;"> <div style="border: 1px solid #d5d5d5; border-radius: 10px; margin: 10px 10px; padding: 10px; height: 100px !important">
<div style="font-size: 18px; color: #525b75 "> <div style="font-size: 18px; color: #525b75 ">
Activity Report Pending Activity Report Pending
</div> </div>
<div style="font-size: 25px; color: #bc3803; margin: 20px !important; font-weight: bold;"> <div style="font-size: 25px; color: #bc3803; margin: 20px 20px 0px !important; font-weight: bold;">
{{REPORT_PENDING}} / {{REPORT_PENDING}} /
{{TODAYS_ASSIGNED}} {{TODAYS_ASSIGNED}}
</div> </div>
<span style="font-size: 10px; color: #0984e3; font-weight: bold;">
Total Pending Report / Today's' Assigned Task
</span>
</div> </div>
</td> </td>
@ -499,28 +503,27 @@
(Tasks) Performed Today (Tasks) Performed Today
</span> <br /> </span> <br />
<table cellpadding="1" cellspacing="0" width="100%" <table cellpadding="1" cellspacing="0" width="100%"
border="1"> border="1">
<tr style="vertical-align:middle"> <tr style="vertical-align:middle">
<th style="text-align:center"> <th style="text-align:center">
Activity/ <br /> Activity/ <br />
Location Location
</th> </th>
<th style="text-align:center"> <th style="text-align:center">
Assigned Assigned
Today/<br /> Pending Today/<br /> Pending
</th> </th>
<th style="text-align:center"> <th style="text-align:center">
Completed Today Completed Today
</th> </th>
<th style="text-align:center">Date </th> <th style="text-align:center">Date </th>
<th style="text-align:center">Team Members</th> <th style="text-align:center">Team Members</th>
<th style="text-align:center">Comment</th> <th style="text-align:center">Comment</th>
</tr> </tr>
<tr></tr> <tr></tr>
{{PERFORMED_TASK}} {{PERFORMED_TASK}}
</table>
</table>
</div> </div>
</td> </td>
</tr> </tr>
@ -535,18 +538,18 @@
Performed Today Performed Today
</span> <br /> </span> <br />
<table cellpadding="1" cellspacing="0" width="100%" <table cellpadding="1" cellspacing="0" width="100%"
border="1"> border="1">
<tr style="vertical-align:middle"> <tr style="vertical-align:middle">
<th style="text-align:center">Name</th> <th style="text-align:center">Name</th>
<th style="text-align:center">Job Role</th> <th style="text-align:center">Job Role</th>
<th style="text-align:center">Check In</th> <th style="text-align:center">Check In</th>
<th style="text-align:center">Check Out </th> <th style="text-align:center">Check Out </th>
<th style="text-align:center">Comment</th> <th style="text-align:center">Comment</th>
</tr> </tr>
<tr></tr> <tr></tr>
{{PERFORMED_ATTENDANCE}} {{PERFORMED_ATTENDANCE}}
</table> </table>
</div> </div>
</td> </td>
</tr> </tr>

View File

@ -123,17 +123,17 @@ namespace MarcoBMS.Services.Service
{"DATE",date }, {"DATE",date },
{"PROJECT_NAME",report.ProjectName }, {"PROJECT_NAME",report.ProjectName },
{"TIMESTAMP",report.TimeStamp }, {"TIMESTAMP",report.TimeStamp },
{"TODAYS_ATTENDANCES", report.TodaysAttendances.ToString()}, {"TODAYS_ATTENDANCES", report.TodaysAttendances.ToString("N0")},
{"TOTAL_EMPLOYEES",report.TotalEmployees.ToString() }, {"TOTAL_EMPLOYEES",report.TotalEmployees.ToString("N0") },
{"TODAYS_PLANNED",report.TotalPlannedTask.ToString() }, {"TODAYS_PLANNED",report.TotalPlannedTask.ToString("N0") },
{"TODAYS_COMPLETED",report.TotalCompletedTask.ToString() }, {"TODAYS_COMPLETED",report.TotalCompletedTask.ToString("N0") },
{"REGULRIZATION_PENDING", report.RegularizationPending.ToString() }, {"REGULRIZATION_PENDING", report.RegularizationPending.ToString("N0") },
{"CHECKOUT_PRNDING",report.CheckoutPending.ToString() }, {"CHECKOUT_PRNDING",report.CheckoutPending.ToString("N0") },
{"TOTAL_PLANNED",report.TotalPlannedWork.ToString() }, {"TOTAL_PLANNED",report.TotalPlannedWork.ToString("N0") },
{"TOTAL_COMPLETED",report.TotalCompletedWork.ToString() }, {"TOTAL_COMPLETED",report.TotalCompletedWork.ToString() },
{"PROJECT_STATUS",report.CompletionStatus.ToString("P") }, {"PROJECT_STATUS",report.CompletionStatus.ToString("P") },
{"TODAYS_ASSIGNED",report.TodaysAssignTasks.ToString() }, {"TODAYS_ASSIGNED",report.TodaysAssignTasks.ToString("N0") },
{"REPORT_PENDING",report.ReportPending.ToString() } {"REPORT_PENDING",report.ReportPending.ToString("N0") }
}; };
string emailBody = await GetEmailTemplate("project-report", replacements); string emailBody = await GetEmailTemplate("project-report", replacements);
@ -173,7 +173,7 @@ namespace MarcoBMS.Services.Service
} }
else else
{ {
taskHtml.Append("<tr><td colspan=\"6\"><span style=\"font-size: 18px; line-height: 25.2px; color: #666666;margin:10px\">No Activities (Tasks) Performed Today</span></td></tr>"); taskHtml.Append("<tr><td style=\"padding: 10px 0px 5px;\" colspan=\"6\"><span style=\"line-height: 25.2px; color: #666666;margin:10px\">No Activities (Tasks) Performed Today</span></td></tr>");
} }
emailBody = emailBody.Replace("{{PERFORMED_TASK}}", taskHtml.ToString()); emailBody = emailBody.Replace("{{PERFORMED_TASK}}", taskHtml.ToString());
@ -189,7 +189,7 @@ namespace MarcoBMS.Services.Service
} }
else else
{ {
attendanceHtml.Append("<tr><td colspan=\"5\"><span style=\"font-size: 18px; line-height: 25.2px; color: #666666;margin:10px\">No Attendance Performed Today</span></td></tr>"); attendanceHtml.Append("<tr><td style=\"padding: 10px 0px 5px;\" colspan=\"5\"><span style=\"line-height: 25.2px; color: #666666;margin:10px\">No Attendance Performed Today</span></td></tr>");
} }
emailBody = emailBody.Replace("{{PERFORMED_ATTENDANCE}}", attendanceHtml.ToString()); emailBody = emailBody.Replace("{{PERFORMED_ATTENDANCE}}", attendanceHtml.ToString());

View File

@ -7,7 +7,7 @@
"ConnectionStrings": { "ConnectionStrings": {
//"DefaultConnectionString": "Server=localhost;port=3306;User ID=root;Password=root;Database=MarcoBMS2" //"DefaultConnectionString": "Server=localhost;port=3306;User ID=root;Password=root;Database=MarcoBMS2"
"DefaultConnectionString": "Server=147.93.98.152;User ID=devuser;Password=AppUser@123$;Database=MarcoBMSProd" "DefaultConnectionString": "Server=147.93.98.152;User ID=devuser;Password=AppUser@123$;Database=MarcoBMSGuid"
}, },
"SmtpSettings": { "SmtpSettings": {
"SmtpServer": "smtp.gmail.com", "SmtpServer": "smtp.gmail.com",