report.html 1.1 KB

123456789101112131415161718192021222324252627282930
  1. {% extends 'base.html' %}
  2. {% block report %}
  3. <h2 align="center" class="mt-2 mb-4">App Report</h2>
  4. <table class="table">
  5. <thead class="thead-dark" style="text-align: center">
  6. <tr>
  7. <th scope="col">Location Name</th>
  8. <th scope="col">Average Rating</th>
  9. <th scope="col">Total Review (Google API)</th>
  10. <th scope="col">Total Review (on DB)</th>
  11. <th scope="col">Status</th>
  12. </tr>
  13. </thead>
  14. <tbody style="text-align: center">
  15. {% for loc in location_report %}
  16. <tr>
  17. <th scope="row">{{ loc.care_name }}</th>
  18. <td>{{ loc.average_rating }}</td>
  19. <td>{{ loc.total_review }}</td>
  20. <td>{{ loc.total_review_DB }}</td>
  21. {% if loc.total_review <= loc.total_review_DB %}
  22. <td><i class="fa fa-check-square-o" style="font-size:36px;color:green"></i></td>
  23. {% else %}
  24. <td><a href="{% url 'sync-location' loc.location_id %}"><i class="fa fa-refresh" style="font-size:36px;color:#fc9003"></i></span></a></td>
  25. {% endif %}
  26. </tr>
  27. {% endfor %}
  28. </tbody>
  29. </table>
  30. {% endblock %}