Skip to content

Commit

Permalink
Merge pull request #35 from ECLK/dev
Browse files Browse the repository at this point in the history
district centers report update + example update
  • Loading branch information
MrClemRkz authored Jul 1, 2020
2 parents 8c5c87a + 7506a88 commit e1dfe17
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
2 changes: 2 additions & 0 deletions templates/incidents/complaints/daily_summary_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Use the following JSON as request body to populate report.
{
"file": {
"template": "incidents/complaints/daily_summary_report.js",
"date": "2020/07/01",
"dateInfo": "2020/06/30 4:00pm - 2020/07/01 4:00pm",
"complaintsPast24hours": {
"national": {
"disputes": 21,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ module.exports = data => {
<hr />
<div class="row text-center">
<div class="col-12">
<span><u>${data.dateInfo}</u></span>
<span>${data.dateInfo}</span>
</div>
</div>
Expand Down Expand Up @@ -208,7 +208,8 @@ function generateRows(complaintByDistrict) {
"බදුල්ල/பதுளை/Badulla",
"මොනරාගල/மொனராகலை/Monaragala",
"රත්නපුර/இரத்தினபரி/Ratnapura",
"කෑගල්ල/கேகாலை/Kegalle"
"කෑගල්ල/கேகாலை/Kegalle",
"ප්‍රධාන කාර්යාලය/பிரதான அலுவலகம்/Main Office"
];

return districts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Use the following JSON as request body to populate report.
"file": {
"template": "incidents/complaints/daily_summary_report_districtwise.js",
"electionDate": "2020-04-16T07:22Z",
"date": "2020/07/01",
"dateInfo": "2020/06/30 4:00pm - 2020/07/01 4:00pm",
"complaintTotalsByType": {
"violence": 54,
"breachOfElectionLaws": 23,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const config = require("../../../config");
const baseURL = config("BASE_URL");

module.exports = data => {
let date = data.date;
let date = new Date(data.date);
let categories = data.categories;
let otherComplaintCount = data.other;
let totalComplaintCount = data.total;
Expand Down Expand Up @@ -63,9 +63,9 @@ module.exports = data => {
/>
</th>
<th style="border: none">
<div class="bold">පාර්ලිමේන්තු මැතිවරණය - 2020</div>
<div class="bold">பாராளுமன்றத் தேர்தல் - 2020</div>
<div class="bold">Parliamentary Election - 2020</div>
<div class="bold">පාර්ලිමේන්තු මැතිවරණය - ${date.getFullYear}</div>
<div class="bold">பாராளுமன்றத் தேர்தல் - ${date.getFullYear}</div>
<div class="bold">Parliamentary Election - ${date.getFullYear}</div>
</th>
<th style="border: none; width: 150px">
<img
Expand All @@ -90,8 +90,8 @@ module.exports = data => {
</tr>
<tr>
<th colspan="3">
<span>දිනය/திகதி/Date</span>
<span>${date}</span>
<!-- <span>දිනය/திகதி/Date</span> -->
<span>${data.dateInfo}</span>
</th>
</tr>
<tr class="grey">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
{
"file": {
"template": "/incidents/complaints/daily_summery_report_categorywise.js",
"date": "2020/05/18",
"date": "2020/07/01",
"dateInfo": "2020/06/30 4:00pm - 2020/07/01 4:00pm",
"categories": [
{
"categoryNameSinhala": "ප්‍රචණ්ඩ ක්‍රියා",
Expand Down

0 comments on commit e1dfe17

Please sign in to comment.