descripcion reportes

parent d4000c93
......@@ -251,7 +251,8 @@
<div class="chart ">
<!-- 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>
<!-- /.chart-responsive -->
</div>
......@@ -330,8 +331,11 @@
<div class="col-md-12">
<div class="box box-success">
<div class="box-header with-border">
<h3 class="box-title" id="purchases_in">Purchases Per Month</h3>
{% 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>
{% endif %}
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i
class="fa fa-minus"></i>
......@@ -505,7 +509,11 @@
var label = myChart.data.labels[firstPoint._index];
//if (!firstPoint) return;
$('#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({
......@@ -514,7 +522,7 @@
data: {'title': label},
url: '../administration/ws/report_table',
success: function (data) {
console.log("hola");
console.log("hola");
$('#mostrar').empty();
$('#mostrar').append("<table class=\"table table-hover\" id=\"example\">" +
......@@ -523,7 +531,7 @@
"<th class=\"text-center\">User ID</th>" +
"<th class=\"text-center\">User</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\">Downloads in process</th>" +
"</tr>" +
......
......@@ -91,11 +91,15 @@
{% block user %}{% endblock %}
</li>
<!-- Control Sidebar Toggle Button -->
<li id="panelShowCart">{% if showcart %}
<a id="product-list-toggle" href="#" data-toggle="control-sidebar"><i
class="fa fa-shopping-cart"></i></a>
{% if request.user.username == "demo" %}
{% else %}
<li id="panelShowCart">
{% if showcart %}
<a id="product-list-toggle" href="#" data-toggle="control-sidebar"><i
class="fa fa-shopping-cart"></i></a>
{% endif %}
</li>
{% endif %}
</li>
</ul>
</div>
{% endif %}
......
......@@ -28,12 +28,18 @@
<li>
<a class="treeview " href="{% url 'reports' %}">
<i class="fa fa-history"></i>
<span>Shopping History</span>
{% if request.user.username == "demo" %}
<span>Reports</span>
{% else %}
<span>Shopping History</span>
{% endif %}
<span class="pull-right-container">
<span class="label label-primary pull-right"></span>
</span>
</a>
</li>
{% if request.user.username == "demo" %}
{% else %}
<li>
<a class="treeview " href="{% url 'show-cart' %}">
<i class="fa fa-shopping-cart"></i>
......@@ -43,6 +49,7 @@
</span>
</a>
</li>
{% endif %}
<li>
<a class="treeview " href="{% url 'logout' %}?next={{ request.path }}">
<i class="glyphicon glyphicon-log-out"></i>
......
......@@ -157,7 +157,11 @@
</li>
<!-- timeline item -->
<li>
<i class="fa fa-cart-arrow-down bg-green-active"></i>
{% 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>
{% endif %}
<div class="timeline-item">
<span class="time">
......@@ -169,7 +173,7 @@
</a>
</span>
<h3 class="timeline-header no-border">You bought
<h3 class="timeline-header no-border">
<br>Process: <b>{{ product.process }}</b>
<br>Area: <b>{{ product.search_name }}</b>
<br>Size: <b>{{ product.size }}</b>
......@@ -200,7 +204,12 @@
<hr>
</div>
<div class="container">
<h3 class="box-title" id="purchases_in">Purchases Per Month</h3>
{% 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>
{% endif %}
<div id="mostrar">
</div>
......@@ -364,7 +373,12 @@
var label = myChart.data.labels[firstPoint._index];
//if (!firstPoint) return;
$('#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({
......@@ -382,7 +396,7 @@
"<tr>" +
"<th class=\"text-center\">Zone</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\">End Date</th>" +
"</tr>" +
......
......@@ -80,9 +80,16 @@
<i class="fa fa-search margin-r-5"></i> <b>Searches</b> <a
class="pull-right">{{ data.searches }}</a>
</li>
<li class="list-group-item">
<i class="fa fa-shopping-cart margin-r-5"></i> <b>Purchases</b> <a
class="pull-right">{{ data.purchases }}</a>
<i class="fa fa-shopping-cart margin-r-5"></i>
{% if request.user.username == "demo" %}
<b>Reports</b>
{% else %}
<b>Purchases</b>
{% endif %}
<a class="pull-right">{{ data.purchases }}</a>
</li>
<li class="list-group-item">
<i class="fa fa-download margin-r-5"></i> <b>In Process</b> <a
......@@ -148,24 +155,24 @@
<script>
function change_permission(user_id) {
var checkBox = document.getElementById(user_id);
if (checkBox.checked == true) {
permission(user_id, 'True');
} else {
permission(user_id, 'False');
}
}
function permission(user_id, status) {
$.ajax({
dataType: "json",
url: 'ws/change_permission',
data: {'user_id': user_id, 'status': status},
success: function (data) {
alert(data);
function change_permission(user_id) {
var checkBox = document.getElementById(user_id);
if (checkBox.checked == true) {
permission(user_id, 'True');
} else {
permission(user_id, 'False');
}
});
}
}
function permission(user_id, status) {
$.ajax({
dataType: "json",
url: 'ws/change_permission',
data: {'user_id': user_id, 'status': status},
success: function (data) {
alert(data);
}
});
}
</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