You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
607 lines
30 KiB
607 lines
30 KiB
<!DOCTYPE html>
|
|
<html lang="en" dir="">
|
|
<html xmlns:th="http://www.thymeleaf.org">
|
|
<head th:replace="~{fragments/modules/base/head :: head}"></head>
|
|
<body>
|
|
<!--[if lt IE 8]>
|
|
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
|
|
<![endif]-->
|
|
|
|
<div class="wrapper">
|
|
<!-- header top menu Start -->
|
|
<header th:replace="~{fragments/modules/base/header :: header}"></header>
|
|
<!-- header top menu end -->
|
|
|
|
<div class="page-wrap">
|
|
<!--=============== Left Menu side Start ================-->
|
|
<div th:replace="~{fragments/modules/base/menu :: menu}"></div>
|
|
<!--=============== Left side End ================-->
|
|
<div class="main-content">
|
|
<div class="container-fluid">
|
|
<div class="page-header">
|
|
<div class="row align-items-end">
|
|
<div class="col-lg-4">
|
|
<div class="page-header-title">
|
|
<i class='fa fa-times-circle' style='font-size:24px; color: #1aafd4'></i>
|
|
<div class="d-inline">
|
|
<h5>Rejected Info</h5>
|
|
<span>Pet Registration</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-5">
|
|
<div class="content">
|
|
<div class="block block-rounded">
|
|
<div class="block-header block-header-default" style="display: block;">
|
|
<form class="row" action="javascript:getbydate()">
|
|
|
|
<div class="row">
|
|
<div class="col-4">
|
|
<input type="date" th:value="${fromDate}" class="form-control" name="FromDate" id="fromdate" data-date-format="yyyy-mm-dd" />
|
|
</div>
|
|
<div class="col-4">
|
|
<input type="date" th:value="${toDate}" class="form-control" name="ToDate" id="todate" data-date-format="yyyy-mm-dd" />
|
|
</div>
|
|
<div class="col-2 p-0 text-center">
|
|
<button type="submit" class="btn btn-sm btn-primary" name="submit" id="submit" onclick="getbydate()" >Submit</button>
|
|
|
|
<br>
|
|
</div>
|
|
<div class="col-2 p-0 text-center">
|
|
<button class="btn btn-danger" onclick="resetDate()" name="reset" type="reset">Reset</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-3">
|
|
<nav class="breadcrumb-container" aria-label="breadcrumb">
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item">
|
|
<a href="/index"><i class="ik ik-home"></i></a>
|
|
</li>
|
|
<li class="breadcrumb-item">Pet Registration</li>
|
|
<li class="breadcrumb-item">Rejected</li>
|
|
</ol>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="card">
|
|
|
|
<div class="card-block">
|
|
<div>
|
|
<table id="assetDatatable" class="table table-striped table-bordered table-hover dataTable" role="grid" width="99.5%">
|
|
<thead class="thead-dark">
|
|
<tr role="row">
|
|
<th>S.No</th>
|
|
<th>Name</th>
|
|
<th>Type</th>
|
|
<th>Breed</th>
|
|
<th>sex</th>
|
|
<th>pet photo</th>
|
|
<th>Rabies certi</th>
|
|
<th>Application photo</th>
|
|
<th>Address Proof</th>
|
|
<th class="text-center" width="10%">Status</th>
|
|
<th class="text-center text-center no-sort" width="10%">Action</th>
|
|
</tr>
|
|
</theadclass="thead-dark">
|
|
|
|
<tbody>
|
|
<tr th:each="list, i : ${petlist}" class="${petlist}">
|
|
<td th:text="${i.count}">0</td>
|
|
<td class="text-center" th:text="${list.petname}"></td>
|
|
<td th:text="${list.species}"></td>
|
|
<td th:text="${list.breed}"></td>
|
|
<td th:text="${list.gender}"></td>
|
|
<!-- <td th:text="${list.gender}"></td>-->
|
|
<td class="text-center">
|
|
<button type="button" th:onclick="petimg([[${list.mobilenum}]],[[${list.uniqueid}]])" class="btn btn-primary">
|
|
view
|
|
</button>
|
|
</td>
|
|
|
|
<td class="text-center">
|
|
<button type="button" th:onclick="certificateimg([[${list.mobilenum}]],[[${list.uniqueid}]])" class="btn btn-primary">
|
|
view
|
|
</button>
|
|
</td>
|
|
|
|
<td class="text-center">
|
|
<button type="button" th:onclick="applicantimg([[${list.mobilenum}]],[[${list.uniqueid}]])" class="btn btn-primary">
|
|
view
|
|
</button>
|
|
</td>
|
|
<td class="text-center">
|
|
<button type="button" th:onclick="proofimg([[${list.mobilenum}]],[[${list.uniqueid}]])" class="btn btn-primary">
|
|
view
|
|
</button>
|
|
</td>
|
|
<td >
|
|
<p >
|
|
<!-- <span class="badge bg-success" th:onclick="accept([[${list.uniqueid}]])">Accept</span> -->
|
|
<span class="badge bg-warning" style="cursor: pointer;" th:onclick="reject([[${list.uniqueid}]])">Rejected</span>
|
|
|
|
</p>
|
|
</td>
|
|
<td class="text-center">
|
|
<a th:onclick="viewOwner( [[${list.mobilenum}]] );" data-bs-toggle="tooltip" data-bs-animation="true" data-bs-placement="top" title="View PetOwner info"><i class="fa-regular fa-user" style="font-size: 18px;cursor: pointer;"></i></a>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
|
|
|
|
<tfoot class="thead-dark">
|
|
<tr>
|
|
<th>S.No</th>
|
|
<th>Name</th>
|
|
<th>Type</th>
|
|
<th>Breed</th>
|
|
<th>sex</th>
|
|
<th>pet photo</th>
|
|
<th>Rabies certi</th>
|
|
<th>Application photo</th>
|
|
<th>Address Proof</th>
|
|
<th class="text-center" width="10%">Status</th>
|
|
<th class="text-center text-center no-sort" width="10%">Action</th>
|
|
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<footer th:replace="~{fragments/modules/base/footer :: footer}"></footer>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- Modal image -->
|
|
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterLabel" aria-hidden="true">
|
|
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title" id="exampleModalCenterLabel">Photo</h5>
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<img alt="" id="myImg" src="" style="width:100%">
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- end of modal image -->
|
|
<!-- Pet Info Form -->
|
|
<div class="modal fade" id="rejectForm" tabindex="-1" role="dialog" aria-labelledby="rejectFormCenterLabel" aria-hidden="true">
|
|
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title" id="rejectFormCenterLabel">Pet Information</h5>
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="row">
|
|
<input type="hidden" class="form-control text-center" name="uniqid" id="uniqid" disabled />
|
|
<div class="col-xl-6 col-md-12"> <strong>Pet Name</strong>
|
|
<p class="text-muted form-control showInputValue" id="petna"></p>
|
|
</div>
|
|
<div class="col-xl-6 col-md-12"> <strong>Pet Type</strong>
|
|
<p class="text-muted form-control showInputValue" id="speci" ></p>
|
|
</div>
|
|
<div class="col-xl-6 col-md-12"> <strong>Breed</strong>
|
|
<p class="text-muted form-control showInputValue" id="bre" ></p>
|
|
</div>
|
|
<div class="col-xl-6 col-md-12"> <strong>Sex</strong>
|
|
<p class="text-muted form-control showInputValue" id="gend" ></p>
|
|
</div>
|
|
|
|
<div class="col-xl-6 col-md-12"> <strong>Age</strong>
|
|
<p class="text-muted form-control showInputValue" id="age"></p>
|
|
</div>
|
|
|
|
<div class="col-xl-6 col-md-12"> <strong>ARV Date</strong>
|
|
<p class="text-muted form-control showInputValue" id="arvd"></p>
|
|
</div>
|
|
<div class="col-xl-6 col-md-12"> <strong>Last Date Of De-Worming</strong>
|
|
<p class="text-muted form-control showInputValue" id="dewormdate"></p>
|
|
</div>
|
|
<div class="col-xl-6 col-md-12"> <strong>Other Vaccination Given</strong>
|
|
<p class="text-muted form-control showInputValue" id="othervac"></p>
|
|
</div>
|
|
<div class="col-xl-6 col-md-12"> <strong>Previous License No</strong>
|
|
<p class="text-muted form-control showInputValue" id="previoslicenseNo"></p>
|
|
</div>
|
|
<div class="col-xl-6 col-md-12"> <strong>Name of Veterinary doctor</strong>
|
|
<p class="text-muted form-control showInputValue" id="VeterinaryConsultant"></p>
|
|
</div>
|
|
<div class="col-xl-6 col-md-12"> <strong>Veterinary Council Number</strong>
|
|
<p class="text-muted form-control showInputValue" id="TNVCNo"></p>
|
|
</div>
|
|
<div class="col-xl-6 col-md-12"> <strong>Register Date</strong>
|
|
<p class="text-muted form-control showInputValue" id="registerdate"></p>
|
|
</div>
|
|
<div class="col-xl-6 col-md-12"> <strong>Rejected Reason</strong>
|
|
<p class="text-muted form-control showInputValue" id="rejectedreason"></p>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- owner Info -->
|
|
<div class="modal fade" id="ownerForm" tabindex="-1" role="dialog" aria-labelledby="ownerFormCenterLabel" aria-hidden="true">
|
|
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title" id="ownerFormCenterLabel">Pet Owner information</h5>
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="row">
|
|
<input type="hidden" class="form-control text-center" name="uniqid" id="uniqid" disabled />
|
|
<div class="col-xl-6 col-md-12"> <strong>Tittle</strong>
|
|
<p class="text-muted form-control showInputValue" id="title"></p>
|
|
</div>
|
|
<div class="col-xl-6 col-md-12"> <strong>Pet Owner Name</strong>
|
|
<p class="text-muted form-control showInputValue" id="fname" ></p>
|
|
</div>
|
|
<div class="col-xl-6 col-md-12"> <strong>Door No</strong>
|
|
<p class="text-muted form-control showInputValue" id="doornumber" ></p>
|
|
</div>
|
|
<div class="col-xl-6 col-md-12"> <strong>Street</strong>
|
|
<p class="text-muted form-control showInputValue" id="street" ></p>
|
|
</div>
|
|
|
|
<div class="col-xl-6 col-md-12"> <strong>Area</strong>
|
|
<p class="text-muted form-control showInputValue" id="area"></p>
|
|
</div>
|
|
|
|
<div class="col-xl-6 col-md-12"> <strong>City</strong>
|
|
<p class="text-muted form-control showInputValue" id="city"></p>
|
|
</div>
|
|
<div class="col-xl-6 col-md-12"> <strong>Pincode</strong>
|
|
<p class="text-muted form-control showInputValue" id="pincode"></p>
|
|
</div>
|
|
<div class="col-xl-6 col-md-12"> <strong>Zone</strong>
|
|
<p class="text-muted form-control showInputValue" id="zone"></p>
|
|
</div>
|
|
<div class="col-xl-6 col-md-12"> <strong>Ward</strong>
|
|
<p class="text-muted form-control showInputValue" id="ward"></p>
|
|
</div>
|
|
<div class="col-xl-6 col-md-12"> <strong>Contact No</strong>
|
|
<p class="text-muted form-control showInputValue" id="phone"></p>
|
|
</div>
|
|
<div class="col-xl-6 col-md-12"> <strong>Email Id</strong>
|
|
<p class="text-muted form-control showInputValue" id="email"></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- End owner Info -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Script -->
|
|
<!-- <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> -->
|
|
<!-- <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> -->
|
|
<div th:replace="~{fragments/modules/base/app_module_menu_box :: div}"></div>
|
|
|
|
<script th:replace="~{fragments/modules/base/script :: script}"></script>
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function() {
|
|
|
|
// DataTables buttons configuration
|
|
var buttons = [
|
|
{
|
|
extend: 'pageLength',
|
|
className: 'btn btn-warning'
|
|
},
|
|
{
|
|
title: 'Data export',
|
|
extend: 'copyHtml5',
|
|
text: 'Copy',
|
|
className: 'btn btn-secondary',
|
|
id: 'copyBtn'
|
|
},
|
|
{
|
|
extend: 'excelHtml5',
|
|
text: 'Excel',
|
|
className: 'btn btn-secondary',
|
|
id: 'excelBtn'
|
|
},
|
|
{
|
|
extend: 'csvHtml5',
|
|
text: 'CSV',
|
|
className: 'btn btn-secondary',
|
|
id: 'csvBtn'
|
|
},
|
|
{
|
|
extend: 'pdfHtml5',
|
|
text: 'PDF',
|
|
className: 'btn btn-secondary',
|
|
id: 'pdfBtn'
|
|
},
|
|
|
|
];
|
|
|
|
$('#assetDatatable').DataTable( {
|
|
dom: 'Bftip',
|
|
columnDefs: [
|
|
{ targets: 'no-sort', orderable: false }
|
|
],
|
|
lengthMenu: [
|
|
[ 50, 100, 200, 500, -1 ],
|
|
[ '50 rows', '100 rows', '200 rows','500 rows', 'Show all' ]
|
|
],
|
|
scrollY: '50vh',
|
|
fixedColumns: {
|
|
left: 1,
|
|
right: 1
|
|
},
|
|
buttons: [buttons],
|
|
responsive: true,
|
|
searching: true,
|
|
select: false,
|
|
processing: false,
|
|
} );
|
|
$('#searchInput').on('keyup', function() {
|
|
dataTable.search(this.value).draw();
|
|
});
|
|
} );
|
|
|
|
|
|
|
|
function petimg(mobno,uniqueid){
|
|
$.ajax({
|
|
type: "GET",
|
|
url: '/api/pet/getpetimg',
|
|
data: {
|
|
'mobno':mobno,
|
|
'uniqueid':uniqueid
|
|
},
|
|
success: function(x) {
|
|
document.getElementById("myImg").src ="data:image/jpeg;base64,"+x;
|
|
|
|
}
|
|
});
|
|
$('#exampleModal').modal({
|
|
backdrop: 'static',
|
|
keyboard: false
|
|
});
|
|
$('#exampleModal').modal('show');
|
|
return false;
|
|
}
|
|
function applicantimg(mobno,uniqueid){
|
|
$.ajax({
|
|
type: "GET",
|
|
url: '/api/pet/getapplicantimg',
|
|
data: {
|
|
'mobno':mobno,
|
|
'uniqueid':uniqueid
|
|
},
|
|
success: function(x) {
|
|
document.getElementById("myImg").src ="data:image/jpeg;base64,"+x;
|
|
}
|
|
});
|
|
$('#exampleModal').modal({
|
|
backdrop: 'static',
|
|
keyboard: false
|
|
});
|
|
$('#exampleModal').modal('show');
|
|
//document.getElementById("myImg").src ="data:image/jpeg;base64,"+x.applicantphoto;
|
|
}
|
|
function certificateimg(mobno,uniqueid){
|
|
$.ajax({
|
|
type: "GET",
|
|
url: '/api/pet/getvacimg',
|
|
data: {
|
|
'mobno':mobno,
|
|
'uniqueid':uniqueid
|
|
},
|
|
success: function(x) {
|
|
document.getElementById("myImg").src ="data:image/jpeg;base64,"+x;
|
|
}
|
|
});
|
|
$('#exampleModal').modal({
|
|
backdrop: 'static',
|
|
keyboard: false
|
|
});
|
|
$('#exampleModal').modal('show');
|
|
//document.getElementById("myImg").src ="data:image/jpeg;base64,"+x.rabiesvacCerti;
|
|
}
|
|
function proofimg(mobno,uniqueid){
|
|
$.ajax({
|
|
type: "GET",
|
|
url: '/api/pet/getaddproofimg',
|
|
data: {
|
|
'mobno':mobno,
|
|
'uniqueid':uniqueid
|
|
},
|
|
success: function(x) {
|
|
document.getElementById("myImg").src ="data:image/jpeg;base64,"+x;
|
|
}
|
|
});
|
|
$('#exampleModal').modal({
|
|
backdrop: 'static',
|
|
keyboard: false
|
|
});
|
|
$('#exampleModal').modal('show');
|
|
//document.getElementById("myImg").src ="data:image/jpeg;base64,"+x.addressproof;
|
|
}
|
|
|
|
function accept(){
|
|
let id = document.getElementById("uniqid").value;
|
|
Swal.fire({
|
|
title: 'Do you want to Accept this Pet ?',
|
|
showDenyButton: true,
|
|
showCancelButton: true,
|
|
confirmButtonText: 'YES',
|
|
denyButtonText: `NO`,
|
|
}).then((result) => {
|
|
/* Read more about isConfirmed, isDenied below */
|
|
if (result.isConfirmed) {
|
|
$.ajax({
|
|
type: "GET",
|
|
url: '/api/accept',
|
|
data: {'id':id},
|
|
success: function(bodyMessage) {
|
|
|
|
if(bodyMessage=="success"){
|
|
Swal.fire(
|
|
'Done',
|
|
'Successfully Accepted to the ID:'+id,
|
|
'success'
|
|
).then(() => {
|
|
location.reload();
|
|
});
|
|
}
|
|
}
|
|
});
|
|
} else if (result.isDenied) {
|
|
Swal.fire('Changes are not saved', '', 'info')
|
|
}
|
|
})
|
|
}
|
|
|
|
|
|
|
|
function reject(uniqueid){
|
|
$.ajax({
|
|
type: "GET",
|
|
url: '/api/pet/getpetInfo',
|
|
data: {
|
|
'petid':uniqueid
|
|
},
|
|
success: function(x) {
|
|
showPetInfo(x)
|
|
}
|
|
});
|
|
|
|
}
|
|
function showPetInfo(list){
|
|
$('#rejectForm').modal({
|
|
backdrop: 'static',
|
|
keyboard: false
|
|
});
|
|
$('#rejectForm').modal('show');
|
|
document.getElementById("uniqid").innerHTML =list.uniqueid;
|
|
document.getElementById("petna").innerHTML =list.petname;
|
|
document.getElementById("speci").innerHTML =list.species;
|
|
document.getElementById("bre").innerHTML =list.breed;
|
|
document.getElementById("gend").innerHTML =list.gender;
|
|
document.getElementById("age").innerHTML =list.age;
|
|
|
|
document.getElementById("arvd").innerHTML =list.arvdate;
|
|
document.getElementById("dewormdate").innerHTML =list.dewormdate;
|
|
document.getElementById("othervac").innerHTML =list.othervac;
|
|
document.getElementById("previoslicenseNo").innerHTML =list.previoslicenseNo;
|
|
document.getElementById("VeterinaryConsultant").innerHTML =list.veterinaryConsultant;
|
|
document.getElementById("TNVCNo").innerHTML =list.tnvcno;
|
|
document.getElementById("registerdate").innerHTML =list.registerdate;
|
|
document.getElementById("rejectedreason").innerHTML=list.rejectreason;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
function viewOwner(mobilenum){
|
|
let own;
|
|
$.ajax({
|
|
type: "GET",
|
|
url: '/api/pet/getpetOwner',
|
|
data: {'mobilenum':mobilenum },
|
|
success: function(bodyMessage) {
|
|
ownercall(bodyMessage);
|
|
}
|
|
});
|
|
}
|
|
function ownercall(list){
|
|
$('#ownerForm').modal({
|
|
backdrop: 'static',
|
|
keyboard: false
|
|
});
|
|
$('#ownerForm').modal('show');
|
|
document.getElementById("title").innerHTML =list.title;
|
|
document.getElementById("fname").innerHTML =list.fname;
|
|
document.getElementById("doornumber").innerHTML =list.doornumber;
|
|
document.getElementById("street").innerHTML =list.street;
|
|
document.getElementById("area").innerHTML =list.area;
|
|
document.getElementById("city").innerHTML =list.city;
|
|
document.getElementById("pincode").innerHTML =list.pincode;
|
|
document.getElementById("zone").innerHTML =list.zone;
|
|
document.getElementById("ward").innerHTML =list.ward;
|
|
document.getElementById("phone").innerHTML =list.phone;
|
|
document.getElementById("email").innerHTML =list.email;
|
|
document.getElementById("pancard").innerHTML =list.pancard;
|
|
document.getElementById("aadhar").innerHTML =list.aadhar;
|
|
document.getElementById("voterid").innerHTML =list.voterid;
|
|
|
|
}
|
|
// Function to call modal for New pet registration
|
|
callAdd = function(){
|
|
$('#addForm').modal({
|
|
backdrop: 'static',
|
|
keyboard: false
|
|
})
|
|
$('#addForm').modal('show');
|
|
}
|
|
// $(document).ready(function () {
|
|
// var today = new Date();
|
|
// $('.datepicker').datepicker({
|
|
// dateFormat: 'yy-mm-dd',
|
|
// maxDate: '1'
|
|
// })
|
|
// $('.datepicker').keyup(function () {
|
|
// if (this.value.match(/[^0-9]/g)) {
|
|
// this.value = this.value.replace(/[^0-9^-]/g, '');
|
|
// }
|
|
// });
|
|
// });
|
|
|
|
function getbydate(){
|
|
var x= document.getElementById("fromdate").value;
|
|
var y= document.getElementById("todate").value;
|
|
|
|
var url= '/pet/rejectedPets?fromDate='+x+'&toDate='+y;
|
|
window.location.href=url;
|
|
|
|
}
|
|
function resetDate(){
|
|
var url= '/pet/rejectedPets';
|
|
window.location.href=url;
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|