descripcion reportes

parent d4000c93
...@@ -251,7 +251,8 @@ ...@@ -251,7 +251,8 @@
<div class="chart "> <div class="chart ">
<!-- Sales Chart Canvas --> <!-- Sales Chart Canvas -->
<canvas id="salesChart" style="height: 142px; width: 814px;" width="814" height="170"></canvas> <canvas id="salesChart" style="height: 142px; width: 814px;" width="814"
height="170"></canvas>
</div> </div>
<!-- /.chart-responsive --> <!-- /.chart-responsive -->
</div> </div>
...@@ -330,8 +331,11 @@ ...@@ -330,8 +331,11 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="box box-success"> <div class="box box-success">
<div class="box-header with-border"> <div class="box-header with-border">
{% if request.user.username == "demo" %}
<h3 class="box-title" id="purchases_in">Reports Per Month</h3>
{% else %}
<h3 class="box-title" id="purchases_in">Purchases Per Month</h3> <h3 class="box-title" id="purchases_in">Purchases Per Month</h3>
{% endif %}
<div class="box-tools pull-right"> <div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i <button type="button" class="btn btn-box-tool" data-widget="collapse"><i
class="fa fa-minus"></i> class="fa fa-minus"></i>
...@@ -505,7 +509,11 @@ ...@@ -505,7 +509,11 @@
var label = myChart.data.labels[firstPoint._index]; var label = myChart.data.labels[firstPoint._index];
//if (!firstPoint) return; //if (!firstPoint) return;
$('#purchases_in').empty(); $('#purchases_in').empty();
$('#purchases_in').append("Purchases in " + label); {% if request.user.username == "demo" %}
$('#purchases_in').append("Reports in " + label);
{% else %}
$('#purchases_in').append("Reports in " + label);
{% endif %}
$.ajax({ $.ajax({
...@@ -523,7 +531,7 @@ ...@@ -523,7 +531,7 @@
"<th class=\"text-center\">User ID</th>" + "<th class=\"text-center\">User ID</th>" +
"<th class=\"text-center\">User</th>" + "<th class=\"text-center\">User</th>" +
"<th class=\"text-center\">E-Mail</th>" + "<th class=\"text-center\">E-Mail</th>" +
"<th class=\"text-center\">Purchases</th>" + "<th class=\"text-center\">Concluded</th>" +
//"<th class=\"text-center\">Storage</th>" + //"<th class=\"text-center\">Storage</th>" +
"<th class=\"text-center\">Downloads in process</th>" + "<th class=\"text-center\">Downloads in process</th>" +
"</tr>" + "</tr>" +
......
...@@ -91,11 +91,15 @@ ...@@ -91,11 +91,15 @@
{% block user %}{% endblock %} {% block user %}{% endblock %}
</li> </li>
<!-- Control Sidebar Toggle Button --> <!-- Control Sidebar Toggle Button -->
<li id="panelShowCart">{% if showcart %} {% if request.user.username == "demo" %}
{% else %}
<li id="panelShowCart">
{% if showcart %}
<a id="product-list-toggle" href="#" data-toggle="control-sidebar"><i <a id="product-list-toggle" href="#" data-toggle="control-sidebar"><i
class="fa fa-shopping-cart"></i></a> class="fa fa-shopping-cart"></i></a>
{% endif %} {% endif %}
</li> </li>
{% endif %}
</ul> </ul>
</div> </div>
{% endif %} {% endif %}
......
...@@ -28,12 +28,18 @@ ...@@ -28,12 +28,18 @@
<li> <li>
<a class="treeview " href="{% url 'reports' %}"> <a class="treeview " href="{% url 'reports' %}">
<i class="fa fa-history"></i> <i class="fa fa-history"></i>
{% if request.user.username == "demo" %}
<span>Reports</span>
{% else %}
<span>Shopping History</span> <span>Shopping History</span>
{% endif %}
<span class="pull-right-container"> <span class="pull-right-container">
<span class="label label-primary pull-right"></span> <span class="label label-primary pull-right"></span>
</span> </span>
</a> </a>
</li> </li>
{% if request.user.username == "demo" %}
{% else %}
<li> <li>
<a class="treeview " href="{% url 'show-cart' %}"> <a class="treeview " href="{% url 'show-cart' %}">
<i class="fa fa-shopping-cart"></i> <i class="fa fa-shopping-cart"></i>
...@@ -43,6 +49,7 @@ ...@@ -43,6 +49,7 @@
</span> </span>
</a> </a>
</li> </li>
{% endif %}
<li> <li>
<a class="treeview " href="{% url 'logout' %}?next={{ request.path }}"> <a class="treeview " href="{% url 'logout' %}?next={{ request.path }}">
<i class="glyphicon glyphicon-log-out"></i> <i class="glyphicon glyphicon-log-out"></i>
......
...@@ -157,7 +157,11 @@ ...@@ -157,7 +157,11 @@
</li> </li>
<!-- timeline item --> <!-- timeline item -->
<li> <li>
{% if request.user.username == "demo" %}
<i class="fa fa-file-text bg-green-active"></i>
{% else %}
<i class="fa fa-cart-arrow-down bg-green-active"></i> <i class="fa fa-cart-arrow-down bg-green-active"></i>
{% endif %}
<div class="timeline-item"> <div class="timeline-item">
<span class="time"> <span class="time">
...@@ -169,7 +173,7 @@ ...@@ -169,7 +173,7 @@
</a> </a>
</span> </span>
<h3 class="timeline-header no-border">You bought <h3 class="timeline-header no-border">
<br>Process: <b>{{ product.process }}</b> <br>Process: <b>{{ product.process }}</b>
<br>Area: <b>{{ product.search_name }}</b> <br>Area: <b>{{ product.search_name }}</b>
<br>Size: <b>{{ product.size }}</b> <br>Size: <b>{{ product.size }}</b>
...@@ -200,7 +204,12 @@ ...@@ -200,7 +204,12 @@
<hr> <hr>
</div> </div>
<div class="container"> <div class="container">
{% if request.user.username == "demo" %}
<h3 class="box-title" id="purchases_in">Reports Per Month</h3>
{% else %}
<h3 class="box-title" id="purchases_in">Purchases Per Month</h3> <h3 class="box-title" id="purchases_in">Purchases Per Month</h3>
{% endif %}
<div id="mostrar"> <div id="mostrar">
</div> </div>
...@@ -364,7 +373,12 @@ ...@@ -364,7 +373,12 @@
var label = myChart.data.labels[firstPoint._index]; var label = myChart.data.labels[firstPoint._index];
//if (!firstPoint) return; //if (!firstPoint) return;
$('#purchases_in').empty(); $('#purchases_in').empty();
$('#purchases_in').append("Purchases in " + label); {% if request.user.username == "demo" %}
$('#purchases_in').append("Reports in " + label);
{% else %}
$('#purchases_in').append("Reports in " + label);
{% endif %}
$.ajax({ $.ajax({
...@@ -382,7 +396,7 @@ ...@@ -382,7 +396,7 @@
"<tr>" + "<tr>" +
"<th class=\"text-center\">Zone</th>" + "<th class=\"text-center\">Zone</th>" +
"<th class=\"text-center\">Process</th>" + "<th class=\"text-center\">Process</th>" +
"<th class=\"text-center\">Purchase Date</th>" + "<th class=\"text-center\">Consultation Date</th>" +
"<th class=\"text-center\">Start Date</th>" + "<th class=\"text-center\">Start Date</th>" +
"<th class=\"text-center\">End Date</th>" + "<th class=\"text-center\">End Date</th>" +
"</tr>" + "</tr>" +
......
...@@ -80,9 +80,16 @@ ...@@ -80,9 +80,16 @@
<i class="fa fa-search margin-r-5"></i> <b>Searches</b> <a <i class="fa fa-search margin-r-5"></i> <b>Searches</b> <a
class="pull-right">{{ data.searches }}</a> class="pull-right">{{ data.searches }}</a>
</li> </li>
<li class="list-group-item"> <li class="list-group-item">
<i class="fa fa-shopping-cart margin-r-5"></i> <b>Purchases</b> <a <i class="fa fa-shopping-cart margin-r-5"></i>
class="pull-right">{{ data.purchases }}</a> {% if request.user.username == "demo" %}
<b>Reports</b>
{% else %}
<b>Purchases</b>
{% endif %}
<a class="pull-right">{{ data.purchases }}</a>
</li> </li>
<li class="list-group-item"> <li class="list-group-item">
<i class="fa fa-download margin-r-5"></i> <b>In Process</b> <a <i class="fa fa-download margin-r-5"></i> <b>In Process</b> <a
...@@ -148,16 +155,16 @@ ...@@ -148,16 +155,16 @@
<script> <script>
function change_permission(user_id) { function change_permission(user_id) {
var checkBox = document.getElementById(user_id); var checkBox = document.getElementById(user_id);
if (checkBox.checked == true) { if (checkBox.checked == true) {
permission(user_id, 'True'); permission(user_id, 'True');
} else { } else {
permission(user_id, 'False'); permission(user_id, 'False');
} }
} }
function permission(user_id, status) { function permission(user_id, status) {
$.ajax({ $.ajax({
dataType: "json", dataType: "json",
url: 'ws/change_permission', url: 'ws/change_permission',
...@@ -166,6 +173,6 @@ function permission(user_id, status) { ...@@ -166,6 +173,6 @@ function permission(user_id, status) {
alert(data); alert(data);
} }
}); });
} }
</script> </script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment