|
@@ -78,32 +78,18 @@
|
|
<span style="font-size: larger; font-family: sans-serif; font-weight: bold;">{{ loc.care_name }}</span>
|
|
<span style="font-size: larger; font-family: sans-serif; font-weight: bold;">{{ loc.care_name }}</span>
|
|
<span style="float: right;">
|
|
<span style="float: right;">
|
|
<i class="fa fa-hospital-o mr-2" aria-hidden="true"></i>
|
|
<i class="fa fa-hospital-o mr-2" aria-hidden="true"></i>
|
|
- <spen>{{ loc.location_name }}</spen>
|
|
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="card-body">
|
|
- <table class="table">
|
|
|
|
- <tr>
|
|
|
|
- <td><i class="fa fa-google" aria-hidden="true" style="color: #ff7700; margin-left: 1rem;">oogle</i></td>
|
|
|
|
- <td style="color: {% if loc.last_week_pos_google_review_count == 0 %} grey {% else %} #212F3D {% endif %}"><i class="fa fa-thumbs-o-up" style="color: green;" aria-hidden="true"></i> {{ loc.last_week_pos_google_review_count }}</td>
|
|
|
|
- <td style="color: {% if loc.last_week_neg_google_review_count == 0 %} grey {% else %} #212F3D {% endif %}"><i class="fa fa-thumbs-o-down" style="color: red;" aria-hidden="true"></i> {{ loc.last_week_neg_google_review_count }}</td>
|
|
|
|
- </tr>
|
|
|
|
- <tr>
|
|
|
|
- <td><i class="fa fa-facebook" aria-hidden="true" style="color: blue; margin-left: 2rem;">acebook</i></td>
|
|
|
|
- <td style="color: {% if loc.last_week_pos_facebook_review_count == 0 %} grey {% else %} #212F3D {% endif %}"><i class="fa fa-thumbs-o-up" style="color: green;" aria-hidden="true"></i> {{ loc.last_week_pos_facebook_review_count }}</td>
|
|
|
|
- <td style="color: {% if loc.last_week_neg_facebook_review_count == 0 %} grey {% else %} #212F3D {% endif %}"><i class="fa fa-thumbs-o-down" style="color: red;" aria-hidden="true"></i> {{ loc.last_week_neg_facebook_review_count }}</td>
|
|
|
|
- </tr>
|
|
|
|
- <tr>
|
|
|
|
- <td><i class="fa fa-yelp" aria-hidden="true" style="color: red; margin-left: 2rem;"> Yelp</i></td>
|
|
|
|
- <td style="color: {% if loc.last_week_pos_yelp_review_count == 0 %} grey {% else %} #212F3D {% endif %}"><i class="fa fa-thumbs-o-up" style="color: green;" aria-hidden="true"></i> {{ loc.last_week_pos_yelp_review_count }}</td>
|
|
|
|
- <td style="color: {% if loc.last_week_neg_yelp_review_count == 0 %} grey {% else %} #212F3D {% endif %}"><i class="fa fa-thumbs-o-down" style="color: red;" aria-hidden="true"></i> {{ loc.last_week_neg_yelp_review_count }}</td>
|
|
|
|
- </tr>
|
|
|
|
- </table>
|
|
|
|
|
|
+ <canvas class="my-4" id="id_canvas_{{ loc.care_name }}" width="250" height="150"></canvas>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
{% endfor %}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
<!-- Modal -->
|
|
<!-- Modal -->
|
|
<div class="modal fade" id="fileUploadModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
|
<div class="modal fade" id="fileUploadModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
|
@@ -133,6 +119,91 @@
|
|
</div>
|
|
</div>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
|
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
|
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
|
|
|
|
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
|
|
|
|
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.bundle.min.js" integrity="sha256-TQq84xX6vkwR0Qs1qH5ADkP+MvH0W+9E7TdHJsoIQiM=" crossorigin="anonymous"></script>
|
|
|
|
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.min.js"></script>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+ var endpoint = 'graphs/all_location';
|
|
|
|
+
|
|
|
|
+ params = {
|
|
|
|
+ "days": 10
|
|
|
|
+ }
|
|
|
|
+ $.ajax({
|
|
|
|
+ type: "get",
|
|
|
|
+ url: endpoint,
|
|
|
|
+ data: params,
|
|
|
|
+ dataType: 'json',
|
|
|
|
+ success: function(data) {
|
|
|
|
+ review_counts = data.review_counts;
|
|
|
|
+ for (let i = 0; i < review_counts.length; i++) {
|
|
|
|
+ var ctx = document.getElementById("id_canvas_"+review_counts[i].name);
|
|
|
|
+ var myBarChart = new Chart(ctx, {
|
|
|
|
+ type: 'bar',
|
|
|
|
+ data: {
|
|
|
|
+ labels: data.labels,
|
|
|
|
+ datasets: [
|
|
|
|
+ {
|
|
|
|
+ label: 'Positive',
|
|
|
|
+ data: review_counts[i].positive,
|
|
|
|
+ borderColor: 'rgb(52, 128, 0 )',
|
|
|
|
+ backgroundColor: 'rgb(52, 128, 0 )',
|
|
|
|
+ borderWidth: 1,
|
|
|
|
+ fill: false
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: 'Negative',
|
|
|
|
+ data: review_counts[i].negative,
|
|
|
|
+ borderColor: 'rgb(200, 0, 21)',
|
|
|
|
+ backgroundColor: 'rgb(200, 0, 21)',
|
|
|
|
+ borderWidth: 1,
|
|
|
|
+ fill: false
|
|
|
|
+ }]
|
|
|
|
+ },
|
|
|
|
+ options: {
|
|
|
|
+ scales: {
|
|
|
|
+ yAxes: [{
|
|
|
|
+ display: true,
|
|
|
|
+ scaleLabel: {
|
|
|
|
+ display: true,
|
|
|
|
+ fontSize: 12,
|
|
|
|
+ fontStyle: 'italic',
|
|
|
|
+ labelString: 'Review count'
|
|
|
|
+ },
|
|
|
|
+ ticks: {
|
|
|
|
+ beginAtZero: true,
|
|
|
|
+ stepSize: 1
|
|
|
|
+ }
|
|
|
|
+ }],
|
|
|
|
+ xAxes: [{
|
|
|
|
+ display: true,
|
|
|
|
+ scaleLabel: {
|
|
|
|
+ display: false,
|
|
|
|
+ fontSize: 16,
|
|
|
|
+ fontStyle: 'italic',
|
|
|
|
+ labelString: 'Day of the month'
|
|
|
|
+ },
|
|
|
|
+ gridLines: {
|
|
|
|
+ drawOnChartArea:false
|
|
|
|
+ }
|
|
|
|
+ }]
|
|
|
|
+ },
|
|
|
|
+ title: {
|
|
|
|
+ display: false,
|
|
|
|
+ fontSize: 16,
|
|
|
|
+ text: "Review of this month in all platforms."
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ error: function(error_data) {
|
|
|
|
+ console.log(error_data);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+</script>
|
|
|
|
+
|
|
<nav class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap mt-4">
|
|
<nav class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap mt-4">
|
|
<span style="color: white;">©2020 SignatureCare Review Portal. - Developed by Byte Trek Ltd. </span>
|
|
<span style="color: white;">©2020 SignatureCare Review Portal. - Developed by Byte Trek Ltd. </span>
|
|
</nav>
|
|
</nav>
|