Improve table to include post office
Diff
faq.md | 7 +++++++
index.html | 1 +
assets/script.js | 34 ++++++++++++++++++++++++----------
3 files changed, 28 insertions(+), 14 deletions(-)
@@ -33,4 +33,9 @@
**I don't have a pre existing voter Id, help?**
Fill Form 6 with the same details instead of Form 8. Make sure you were born
before 1st January 2006, or you will be too young to vote this time.
before 1st January 2006, or you will be too young to vote this time.
**Bangalore isn't a tehsil/taluka**
Yes, but the boundaries for Bangalore's various talukas are unclear, and it is okay
to just submit Bangalore. If you have any suggestions on how to get a taluka from
an address, please let us know.
@@ -196,6 +196,7 @@
const textToCopy = "Hey! Check out this neat guide that helps you change your address for the voter id so you can vote from Bangalore! https://blr.vote";
navigator.clipboard.writeText(textToCopy)
.then(() => {
// TODO: Flash the copyButton
// Success message or action
})
.catch(err => {
@@ -217,7 +217,7 @@
}
features = findFeaturesContainingPoint(window.geojson, turf.point([lng, lat]));
let details = "Not in a Bangalore Constituency"
let details = "Couldn't find a Bangalore Constituency, check FAQ"
let tehsil = "Bangalore";
if (features.length == 1) {
ward = window.ward = wardLookup[features[0].properties['id'].toString()]
@@ -225,27 +225,35 @@
let pcId = CONSTITUENCY_MAP[acID][0];
let pcName = CONSTITUENCY_MAP[acID][1];
let eciDistrict = CONSTITUENCY_MAP[acID][2];
let commonDetails = `<tr>
<td><strong>District</strong></td>
<td>${eciDistrict}</td>
</tr>
<tr>
<td><strong>Assembly Constituency (AC)</strong></td>
<td>${ward['ac_id']} - ${ward['ac_name']}</td>
</tr>`;
details = `
<table>
<tbody>
<tr>
<td><strong>District</strong></td>
<td>${eciDistrict}</td>
</tr>
${commonDetails}
</tbody>
</table>`;
document.getElementById('location-details').innerHTML = `
<table>
<tbody>
${commonDetails}
<tr>
<td><strong>Assembly Constituency (AC)</strong></td>
<td>${ward['ac_id']} - ${ward['ac_name']}</td>
<td><strong>Tehsil/Taluka</strong></td>
<td>${tehsil}</td>
</tr>
<tr>
<td><strong>Tehsil</strong></td>
<td>${tehsil}</td>
<td><strong>Post Office (Pick One)</strong></td>
<td><ul>${window.postOffice}</ul></td>
</tr>
</tbody>
</table>`;
console.log(details)
document.getElementById('location-details').innerHTML = details;
}
infowindow.setContent(details);
infowindow.open(map, marker);