🏡 index : github.com/shreyas-satish/govote.git

author Nemo <me@captnemo.in> 2023-12-08 11:39:22.0 +05:30:00
committer Nemo <me@captnemo.in> 2023-12-08 11:39:22.0 +05:30:00
commit
9b0a075af37196c996ec1fc709e044b2e3f02221 [patch]
tree
b899915af238821cf06ee6ee5e83b055c1fb9473
parent
7df89fd7b85ec876693414074758c9b8059e1712
download
9b0a075af37196c996ec1fc709e044b2e3f02221.tar.gz

add ward details



Diff

 index.html       |  2 ++
 assets/script.js | 10 +++++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/index.html b/index.html
index 8e71dad..8238477 100644
--- a/index.html
+++ a/index.html
@@ -140,6 +140,8 @@
            <p>2. Go <a href="https://voters.eci.gov.in/login" target="_blank">here</a>, and submit Form 8 (or Form 6 if you've never had a voter ID) using the credentials you signed up with.</p>
            <p>Keep these details handy for the form:</p>
            <div id="location-details"></div>

            <p>Once you've filled the form, you will get a form reference id. Keep this safe, so you can follow the form's progress. You can use your ward details to find your Booth Level Officer and follow up on the progress.</p>
        </p>
        {% include stuck.html %}
        <button class="prev-button" onclick="navigate('prev', 5)">Previous</button>
diff --git a/assets/script.js b/assets/script.js
index 4f1b504..78a5def 100644
--- a/assets/script.js
+++ a/assets/script.js
@@ -206,8 +206,6 @@
    map.setZoom(18);
    marker.setPosition(location);

    JSON.stringify(window.wardLookup)

    if (typeof location.lat == 'function') {
      lat = location.lat()
      lng = location.lng()
@@ -219,6 +217,7 @@
    features = findFeaturesContainingPoint(window.geojson, turf.point([lng, lat]));
    let details = "Couldn't find a Bangalore Constituency, check FAQ"
    let tehsil = "Bangalore"; // until we have more clarity, this works
    let wardDetails = "";
    if (features.length == 1) {
      ward = window.ward = wardLookup[features[0].properties['id'].toString()]
      let acID = ward['ac_id'];
@@ -233,6 +232,12 @@
          <td><strong>Assembly Constituency (AC)</strong></td>
          <td>${ward['ac_id']} - ${ward['ac_name']}</td>
        </tr>`;


      wardDetails = `<tr>
        <td><strong>Ward</strong></td>
        <td>${ward['id']} - ${ward['name']}</td>
      </tr>`;
      details = `
      <table>
        <tbody>
@@ -252,6 +257,7 @@
            <td><strong>Post Office (Pick One)</strong></td>
            <td><ul>${window.postOffice}</ul></td>
          </tr>
          ${wardDetails}
        </tbody>
      </table>`;
    }