This commit is contained in:
fjrodriguez
2022-11-30 08:44:59 -06:00
parent e2121905d6
commit 2d55c0974a
13 changed files with 370 additions and 46 deletions

View File

@@ -1,17 +1,24 @@
{% extends "base.html" %}
{% extends "base.html" %}
{% block titlePage %}
{% endblock titlePage %}
{% block content %}
<table class="table">
<thead>
<tr>
<th scope="col">UUID</th>
<th scope="col">
<input id="table_name" name="name" value="True" type="checkbox" class="form-check-input" >
RFC Cliente
<input id="table_rfcc" name="rfcc" value="True" type="checkbox" class="form-check-input" >
Cliente RFC
</th>
<th scope="col">PAC</th>
<th scope="col">Tipo CFDI</th>
<th scope="col">actions</th>
</tr>
@@ -19,15 +26,10 @@
<tbody>
{% for obj in timbres %}
<tr class="">
<th scope="row">{{obj.uuid}}</th>
<td>{{obj.rfcc}}</td>
<td>{{obj.rfcp}}</td>
<td>{{obj.tipo}}</td>
<td>{{obj.rfcc}}</td>
<td>
{% if request.user.is_staff %}
<a href="#" class="btn btn-info">View</a>
<a href="{% url 'timbres_cliente' obj.rfcc %}" class="btn btn-info">View Timbres</a>
{% endif %}
</td>
</tr>
@@ -35,4 +37,12 @@
</tbody>
</table>
{% endblock content %}
{% block scripts %}
<script>
table_rfcc.addEventListener('click',(event)=>{
document.getElementById('rfcc').checked= table_rfcc.checked? true:false;
})
</script>
{% endblock scripts %}

View File

@@ -0,0 +1,118 @@
{% extends 'base.html' %}
{% block content %}
<h1>Timbres <strong>{{RFC}}</strong> </h1>
<h2>Timbres totales: <strong></strong>{{conteo}}</strong></h2>
<br><br>
<table class="table">
<thead>
<tr>
<th scope="col">UUID</th>
<th scope="col">PAC</th>
<th scope="col">
<input id="table_tipo" name="tipo" value="True" type="checkbox" class="form-check-input" >
Tipo CFDI
</th>
<th scope="col">Serie/Folio</th>
<th scope="col">
<input id="table_fecha" name="fecha" value="True" type="checkbox" class="form-check-input" >
Fecha
</th>
</tr>
</thead>
<tbody>
{% for obj in lista %}
<tr class="">
<th scope="row">{{obj.uuid}}</th>
<td>{{obj.rfcp}}</td>
<td>{{obj.tipo}}</td>
<td>{{obj.serie}}/{{obj.folio}}</td>
<td>{{obj.created_at|date:"d M Y"}}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% if lista.has_other_pages %}
<nav>
<ul class="pagination justify-content-center">
{% if lista.has_previous %}
<li class="page-item">
<a class="page-link" href="?page={{ lista.previous_page_number }}" aria-label="Previous">
<span aria-hidden="true">&laquo;</span>
</a>
</li>
{% else %}
<li class="page-item disabled">
<span class="page-link" aria-hidden="true">&laquo;</span>
</li>
{% endif %}
{% for p in lista.paginator.page_range %}
{% if lista.number == p %}
<li class="page-item"><a class="page-link" style="color: red;" href="#">{{ p }}</a></li>
{% else %}
<li class="page-item"><a class="page-link" href="?page={{ p }}">{{ p }}</a></li>
{% endif %}
{% endfor %}
{% if lista.has_next %}
<li class="page-item">
<a class="page-link" href="?page={{ lista.next_page_number }}" aria-label="Next">
<span aria-hidden="true">&raquo;</span>
</a>
</li>
{% else %}
<li class="page-item disabled">
<span class="page-link" aria-hidden="true">&raquo;</span>
</li>
{% endif %}
</ul>
</nav>
{% endif %}
</div>
{% endblock content %}
{% block scripts %}
<script>
table_tipo.addEventListener('click', (event)=>{
document.getElementById('tipo').checked = table_tipo.checked? true:false;
if(table_fecha.checked){
table_fecha.click()
}
})
table_fecha.addEventListener('click', (event)=>{
if(dates.hasAttribute("style")){
dates.removeAttribute('style')
datepicker.value=''
datepicker.setAttribute("required",'')
datepickerFin.value=''
datepickerFin.setAttribute('required','')
search.setAttribute("style","display:none;")
search.value=''
}else{
dates.setAttribute("style","display:none;")
search.removeAttribute('style')
datepicker.removeAttribute('required')
datepickerFin.removeAttribute('required')
}
if(table_tipo.checked && table_fecha.checked){
table_tipo.checked=false
}
})
</script>
{% endblock scripts %}

View File

@@ -4,11 +4,11 @@
<head>
<meta charset="UTF-8">
<!--link rel="apple-touch-icon" type="image/png" href="https://cpwebassets.codepen.io/assets/favicon/apple-touch-icon-5ae1a0698dcc2402e9712f7d01ed509a57814f994c660df9f7a952f3060705ee.png"-->
<link rel="apple-touch-icon" type="image/png" href="https://aduanasoft.com/wp-content/uploads/2019/01/aslogo-1.png">
<meta name="apple-mobile-web-app-title" content="CodePen">
<!--link rel="shortcut icon" type="image/x-icon" href="https://cpwebassets.codepen.io/assets/favicon/favicon-aec34940fbc1a6e787974dcd360f2c6b63348d4b1f4e06c77743096d55480f33.ico"-->
<link rel="icon" type="image/png" href="{% static 'favicon.ico' %}"/>
<link rel="shortcut icon" type="image/x-icon" href="https://aduanasoft.com/wp-content/uploads/2019/01/aslogo-1.png">
<link rel="icon" type="image/png" href="https://aduanasoft.com/wp-content/uploads/2019/01/aslogo-1.png"/>
<link rel="mask-icon" type="" href="https://cpwebassets.codepen.io/assets/favicon/logo-pin-8f3771b1072e3c38bd662872f6b673a722f4b3ca2421637d5596661b4e2132cc.svg" color="#111">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
@@ -16,7 +16,7 @@
<!--link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"-->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
<script src="{% static 'functions.js' %}" defer></script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
{% block extra_head %}
@@ -182,8 +182,7 @@
{% endblock %}
{% block extra_body %}
{% endblock %}
<!--script src="{% static 'js/auth.js' %}"></script-->
</body>

View File

@@ -27,12 +27,16 @@
{{form.password|add_class:"form-control"}}
{{form.password.errors}}
<!-- <span class="fa fa-lock"></span> -->
<!--input type="password" name="password" id="password" class="form__input" placeholder="Password"-->
</div>
<div class="form-check">
{% comment %}
<input type="checkbox" name="remember_me" id="remember_me" class="">
<label for="remember_me">Remember Me!</label>
{% endcomment %}
</div>
<div class="row">
<input type="submit" value="Submit" class="btn">
@@ -40,7 +44,11 @@
</form>
</div>
{% comment %}
<div class="row">
<p>Don't have an account? <a href="{{ signup_url }}">Register Here</a></p>
</div>
{% endcomment %}
{% endblock %}

View File

@@ -4,29 +4,22 @@
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.1.3/dist/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://unpkg.com/gijgo@1.9.14/js/gijgo.min.js" type="text/javascript"></script>
<link href="https://unpkg.com/gijgo@1.9.14/css/gijgo.min.css" rel="stylesheet" type="text/css" />
<title>
{% block title %}{% endblock title %}
{% block title %}{% endblock title %}
</title>
</head>
<body>
{% include 'sidebar.html' %}
<div class="container-fluid">
{% include 'sidebar.html' %}
<h1>{% block titlePage %}{% endblock titlePage %}</h1>
<div class="">
{% comment %}
{% include "Profiles/partials/messages.html" %}
{% endcomment %}
</div>
{% block content %}
{% endblock content %}
{% block content %}{% endblock content %}
{% include 'paginator.html' %}
</div>
@@ -36,6 +29,8 @@
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.14.3/dist/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.1.3/dist/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script>
window.addEventListener('load', (event) => {
setTimeout(()=>{
//console.log('page is fully loaded');

58
Templates/base2.html Normal file
View File

@@ -0,0 +1,58 @@
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
{% comment "" %}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.1.3/dist/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
{% endcomment %}
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://unpkg.com/gijgo@1.9.14/js/gijgo.min.js" type="text/javascript"></script>
<link href="https://unpkg.com/gijgo@1.9.14/css/gijgo.min.css" rel="stylesheet" type="text/css" />
<title>
{% block title %}{% endblock title %}
</title>
</head>
<body>
<div class="container-fluid">
<h1>{% block titlePage %}{% endblock titlePage %}</h1>
{% block content %}
{% endblock content %}
{% include 'paginator.html' %}
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.14.3/dist/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.1.3/dist/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script>
window.addEventListener('load', (event) => {
setTimeout(()=>{
//console.log('page is fully loaded');
let ale = document.getElementsByClassName("alert")
if(ale.length> 0 )
{
$(ale).alert('close')
$(ale).alert('dispose')
}
},5000)
});
</script>
{% block scripts %}
{% endblock scripts %}
</body>
</html>

View File

@@ -0,0 +1,25 @@
<form action="{{request.path}}" method="get" class="form-inline my-2 my-lg-0">
<input id="search" class="form-control mr-sm-2" name="search" type="search" placeholder="Search" aria-label="Search">
<div class="form-group form-check">
<input style="display:none" name="rfcc" type="checkbox" class="form-check-input" id="rfcc">
</div>
<div class="form-group form-check">
<input style="display:none" name="tipo" type="checkbox" class="form-check-input" id="tipo">
</div>
<div id="dates" style="display:none;" class="group-form mr-2" >
<input class="form-control sm-2" name = "datepicker" id="datepicker" placeholder="Initial Date" />
<input class="form-control sm-2" name = "datepickerFin" id="datepickerFin" placeholder="End Date" />
<script>
$('#datepicker').datepicker({
uiLibrary: 'bootstrap4'
});
$('#datepickerFin').datepicker({
uiLibrary: 'bootstrap4'
});
</script>
</div>
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
</form>

View File

@@ -35,9 +35,9 @@
</li>
</ul>
{% comment %}
{% include "Profiles/partials/search_form.html" %}
{% endcomment %}
{% include "partials/search_form.html" %}
</div>