19 changed files with 3806 additions and 0 deletions
-
BINsrc/main/.DS_Store
-
107src/main/java/in/gov/chennaicorporation/gccoffice/petregistration/controller/APIController.java
-
168src/main/java/in/gov/chennaicorporation/gccoffice/petregistration/controller/MainController.java
-
46src/main/java/in/gov/chennaicorporation/gccoffice/petregistration/data/PetCountInfo.java
-
150src/main/java/in/gov/chennaicorporation/gccoffice/petregistration/data/RequestList.java
-
15src/main/java/in/gov/chennaicorporation/gccoffice/petregistration/data/ResponseWrapper.java
-
1src/main/java/in/gov/chennaicorporation/gccoffice/petregistration/data/package-info.java
-
1src/main/java/in/gov/chennaicorporation/gccoffice/petregistration/package-info.java
-
5src/main/java/in/gov/chennaicorporation/gccoffice/petregistration/service/API.java
-
BINsrc/main/resources/.DS_Store
-
BINsrc/main/resources/templates/.DS_Store
-
BINsrc/main/resources/templates/modules/.DS_Store
-
BINsrc/main/resources/templates/modules/petregistration/.DS_Store
-
638src/main/resources/templates/modules/petregistration/accepted-list.html
-
845src/main/resources/templates/modules/petregistration/index.html
-
536src/main/resources/templates/modules/petregistration/license-issued.html
-
607src/main/resources/templates/modules/petregistration/rejected.html
-
687src/main/resources/templates/modules/petregistration/request-list.html
-
BINsrc/main/resources/templates/modules/qrfeedback/.DS_Store
@ -0,0 +1,107 @@ |
|||
package in.gov.chennaicorporation.gccoffice.petregistration.controller; |
|||
|
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.http.HttpEntity; |
|||
import org.springframework.http.HttpHeaders; |
|||
import org.springframework.http.MediaType; |
|||
import org.springframework.http.ResponseEntity; |
|||
import org.springframework.util.LinkedMultiValueMap; |
|||
import org.springframework.util.MultiValueMap; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RequestParam; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
import org.springframework.web.client.RestTemplate; |
|||
import org.springframework.web.util.UriComponentsBuilder; |
|||
|
|||
import in.gov.chennaicorporation.gccoffice.configuration.AppConfig; |
|||
|
|||
@RequestMapping("/api/petregistration") |
|||
@RestController("petRegistrationRest") |
|||
public class APIController { |
|||
private final RestTemplate restTemplate; |
|||
private final AppConfig appConfig; |
|||
String bodyMessage = ""; |
|||
|
|||
@Autowired |
|||
public APIController(RestTemplate restTemplate, AppConfig appConfig) { |
|||
this.restTemplate = restTemplate; |
|||
this.appConfig = appConfig; |
|||
} |
|||
|
|||
@GetMapping(value = "/getpetimg") |
|||
public String getPetImage(@RequestParam String mobno,@RequestParam String uniqueid) { |
|||
String baseURL = appConfig.petRegistration+"/api/getpetimg"; |
|||
UriComponentsBuilder uriComponentsBuilder = UriComponentsBuilder.fromUriString(baseURL) |
|||
.queryParam("mobno", mobno) |
|||
.queryParam("uniqueid", uniqueid ); |
|||
|
|||
ResponseEntity<String> response = restTemplate.getForEntity(uriComponentsBuilder.toUriString(),String.class); |
|||
bodyMessage = response.getBody().trim(); |
|||
return bodyMessage; |
|||
} |
|||
|
|||
@GetMapping(value = "/getvaccineimg") |
|||
public String getVaccineImage(@RequestParam String mobno,@RequestParam String uniqueid) { |
|||
String baseURL = appConfig.petRegistration+"/api/getvacimg"; |
|||
UriComponentsBuilder uriComponentsBuilder = UriComponentsBuilder.fromUriString(baseURL) |
|||
.queryParam("mobno", mobno) |
|||
.queryParam("uniqueid", uniqueid ); |
|||
|
|||
ResponseEntity<String> response = restTemplate.getForEntity(uriComponentsBuilder.toUriString(),String.class); |
|||
bodyMessage = response.getBody().trim(); |
|||
return bodyMessage; |
|||
} |
|||
|
|||
@GetMapping(value = "/getapplicantimg") |
|||
public String getApplicantImage(@RequestParam String mobno,@RequestParam String uniqueid) { |
|||
String baseURL = appConfig.petRegistration+"/api/getapplicantimg"; |
|||
UriComponentsBuilder uriComponentsBuilder = UriComponentsBuilder.fromUriString(baseURL) |
|||
.queryParam("mobno", mobno) |
|||
.queryParam("uniqueid", uniqueid ); |
|||
|
|||
ResponseEntity<String> response = restTemplate.getForEntity(uriComponentsBuilder.toUriString(),String.class); |
|||
bodyMessage = response.getBody().trim(); |
|||
return bodyMessage; |
|||
} |
|||
|
|||
@GetMapping(value = "/getaddressproofimg") |
|||
public String getAddressProofImage(@RequestParam String mobno,@RequestParam String uniqueid) { |
|||
String baseURL = appConfig.petRegistration+"/api/getaddproofimg"; |
|||
UriComponentsBuilder uriComponentsBuilder = UriComponentsBuilder.fromUriString(baseURL) |
|||
.queryParam("mobno", mobno) |
|||
.queryParam("uniqueid", uniqueid ); |
|||
|
|||
ResponseEntity<String> response = restTemplate.getForEntity(uriComponentsBuilder.toUriString(),String.class); |
|||
bodyMessage = response.getBody().trim(); |
|||
return bodyMessage; |
|||
} |
|||
|
|||
// Example Delete after Code complete |
|||
@GetMapping(value = "/getFeedbackAssetdetails") |
|||
public String getFeedbackAssetdetails(@RequestParam String fbId) { |
|||
String feedbackId = fbId; |
|||
ResponseEntity<String> response = restTemplate.getForEntity(appConfig.qrAssetFeedback+"/api/feedback/{feedbackId}",String.class,feedbackId); |
|||
bodyMessage = response.getBody().trim(); |
|||
return bodyMessage; |
|||
} |
|||
|
|||
|
|||
@PostMapping(value = "/category/checkbyname") |
|||
public int checkByName(@RequestParam("catName") String catName) { |
|||
HttpHeaders headers = new HttpHeaders(); |
|||
headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); |
|||
|
|||
MultiValueMap<String, String> params = new LinkedMultiValueMap<>(); |
|||
params.add("catName", catName); |
|||
|
|||
HttpEntity<MultiValueMap<String, String>> request = new HttpEntity<>(params, headers); |
|||
|
|||
ResponseEntity<Integer> response = restTemplate.postForEntity(appConfig.qrAssetFeedback + "/api/category/checkbyname", request, Integer.class); |
|||
|
|||
return response.getBody(); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,168 @@ |
|||
package in.gov.chennaicorporation.gccoffice.petregistration.controller; |
|||
|
|||
import java.text.SimpleDateFormat; |
|||
import java.util.Calendar; |
|||
import java.util.Date; |
|||
|
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.beans.factory.annotation.Lookup; |
|||
|
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.ui.Model; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RequestParam; |
|||
import org.springframework.web.client.RestTemplate; |
|||
import org.springframework.web.util.UriComponentsBuilder; |
|||
|
|||
import in.gov.chennaicorporation.gccoffice.configuration.AppConfig; |
|||
import in.gov.chennaicorporation.gccoffice.petregistration.data.PetCountInfo; |
|||
import in.gov.chennaicorporation.gccoffice.petregistration.data.RequestList; |
|||
import in.gov.chennaicorporation.gccoffice.service.LoginUserInfo; |
|||
|
|||
@RequestMapping("/petregistration") |
|||
@Controller("petregistration") |
|||
public class MainController { |
|||
private final RestTemplate restTemplate; |
|||
private final LoginUserInfo loginUserInfo; |
|||
private final AppConfig appConfig; |
|||
|
|||
@Autowired |
|||
public MainController(RestTemplate restTemplate,LoginUserInfo loginUserInfo, AppConfig appConfig) { |
|||
this.restTemplate = restTemplate; |
|||
this.loginUserInfo = loginUserInfo; |
|||
this.appConfig = appConfig; |
|||
} |
|||
|
|||
@Lookup |
|||
public static String[] getDates() { |
|||
Calendar calendar = Calendar.getInstance(); |
|||
calendar.add(Calendar.MONTH, -1); |
|||
|
|||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
|||
|
|||
String formattedDate = dateFormat.format(calendar.getTime()); |
|||
|
|||
String currentDate = dateFormat.format(new Date()); |
|||
System.out.println("formattedDate : "+formattedDate); |
|||
return new String[] { formattedDate, currentDate }; |
|||
} |
|||
|
|||
|
|||
@GetMapping({"", "/", "/index", "/dashboard"}) |
|||
public String main(Model model,@RequestParam(required=false) String zone) { |
|||
String userId = LoginUserInfo.getLoginUserId(); |
|||
String baseUrl = appConfig.petRegistration + "/api/admin/dashboard"; |
|||
UriComponentsBuilder builder = UriComponentsBuilder.fromUriString(baseUrl).queryParam("zone",zone); |
|||
PetCountInfo dash = restTemplate.getForObject(builder.toUriString(),PetCountInfo.class); |
|||
if (userId != null && !userId.isEmpty()) { |
|||
System.out.println("String UserID: " + userId); |
|||
} |
|||
model.addAttribute("dash",dash); |
|||
return "modules/petregistration/index"; |
|||
} |
|||
|
|||
@GetMapping("/requestlist") |
|||
public String viewRequest(Model model, |
|||
@RequestParam(required=false) String fromDate, |
|||
@RequestParam(required =false) String toDate, |
|||
@RequestParam(required=false) String zone) { |
|||
|
|||
if(fromDate==null && toDate==null) { |
|||
String[] dates = getDates(); |
|||
fromDate=dates[0]; |
|||
toDate=dates[1]; |
|||
model.addAttribute(fromDate); |
|||
model.addAttribute(toDate); |
|||
} |
|||
|
|||
String baseUrl = appConfig.petRegistration + "/api/admin/licenserequest"; |
|||
UriComponentsBuilder builder = UriComponentsBuilder.fromUriString(baseUrl) |
|||
.queryParam("zone",zone) |
|||
.queryParam("fromDate",fromDate) |
|||
.queryParam("toDate",toDate); |
|||
|
|||
RequestList[] requestList = restTemplate.getForObject(builder.toUriString(), RequestList[].class); |
|||
model.addAttribute("petlist",requestList); |
|||
|
|||
return "modules/petregistration/request-list"; |
|||
} |
|||
|
|||
@GetMapping("/acceptedlist") |
|||
public String viewAccepted(Model model, |
|||
@RequestParam(required=false) String fromDate, |
|||
@RequestParam(required =false) String toDate, |
|||
@RequestParam(required=false) String zone) { |
|||
|
|||
if(fromDate==null && toDate==null) { |
|||
String[] dates = getDates(); |
|||
fromDate=dates[0]; |
|||
toDate=dates[1]; |
|||
model.addAttribute(fromDate); |
|||
model.addAttribute(toDate); |
|||
} |
|||
|
|||
String baseUrl = appConfig.petRegistration + "/api/admin/acceptedlist"; |
|||
UriComponentsBuilder builder = UriComponentsBuilder.fromUriString(baseUrl) |
|||
.queryParam("zone",zone) |
|||
.queryParam("fromDate",fromDate) |
|||
.queryParam("toDate",toDate); |
|||
|
|||
RequestList[] requestList = restTemplate.getForObject(builder.toUriString(), RequestList[].class); |
|||
model.addAttribute("petlist",requestList); |
|||
|
|||
return "modules/petregistration/accepted-list"; |
|||
} |
|||
|
|||
@GetMapping("/rejectedlist") |
|||
public String viewRejected(Model model, |
|||
@RequestParam(required=false) String fromDate, |
|||
@RequestParam(required =false) String toDate, |
|||
@RequestParam(required=false) String zone) { |
|||
|
|||
if(fromDate==null && toDate==null) { |
|||
String[] dates = getDates(); |
|||
fromDate=dates[0]; |
|||
toDate=dates[1]; |
|||
model.addAttribute(fromDate); |
|||
model.addAttribute(toDate); |
|||
} |
|||
|
|||
String baseUrl = appConfig.petRegistration + "/api/admin/rejectedlist"; |
|||
UriComponentsBuilder builder = UriComponentsBuilder.fromUriString(baseUrl) |
|||
.queryParam("zone",zone) |
|||
.queryParam("fromDate",fromDate) |
|||
.queryParam("toDate",toDate); |
|||
|
|||
RequestList[] requestList = restTemplate.getForObject(builder.toUriString(), RequestList[].class); |
|||
model.addAttribute("petlist",requestList); |
|||
|
|||
return "modules/petregistration/accepted-list"; |
|||
} |
|||
|
|||
@GetMapping("/licenseissued") |
|||
public String viewLicenseIssued(Model model, |
|||
@RequestParam(required=false) String fromDate, |
|||
@RequestParam(required =false) String toDate, |
|||
@RequestParam(required=false) String zone) { |
|||
|
|||
if(fromDate==null && toDate==null) { |
|||
String[] dates = getDates(); |
|||
fromDate=dates[0]; |
|||
toDate=dates[1]; |
|||
model.addAttribute(fromDate); |
|||
model.addAttribute(toDate); |
|||
} |
|||
|
|||
String baseUrl = appConfig.petRegistration + "/api/admin/licenseIssued"; |
|||
UriComponentsBuilder builder = UriComponentsBuilder.fromUriString(baseUrl) |
|||
.queryParam("zone",zone) |
|||
.queryParam("fromDate",fromDate) |
|||
.queryParam("toDate",toDate); |
|||
|
|||
RequestList[] requestList = restTemplate.getForObject(builder.toUriString(), RequestList[].class); |
|||
model.addAttribute("petlist",requestList); |
|||
|
|||
return "modules/petregistration/accepted-list"; |
|||
} |
|||
} |
|||
@ -0,0 +1,46 @@ |
|||
package in.gov.chennaicorporation.gccoffice.petregistration.data; |
|||
|
|||
import java.util.Map; |
|||
|
|||
public class PetCountInfo { |
|||
|
|||
private Map<String, Integer> dog; |
|||
private Map<String, Integer> cat; |
|||
private int userCount; |
|||
private int licCount; |
|||
|
|||
// Getters and setters |
|||
|
|||
public Map<String, Integer> getDog() { |
|||
return dog; |
|||
} |
|||
|
|||
public void setDog(Map<String, Integer> dog) { |
|||
this.dog = dog; |
|||
} |
|||
|
|||
public Map<String, Integer> getCat() { |
|||
return cat; |
|||
} |
|||
|
|||
public void setCat(Map<String, Integer> cat) { |
|||
this.cat = cat; |
|||
} |
|||
|
|||
public int getUserCount() { |
|||
return userCount; |
|||
} |
|||
|
|||
public void setUserCount(int userCount) { |
|||
this.userCount = userCount; |
|||
} |
|||
|
|||
public int getLicCount() { |
|||
return licCount; |
|||
} |
|||
|
|||
public void setLicCount(int licCount) { |
|||
this.licCount = licCount; |
|||
} |
|||
} |
|||
|
|||
@ -0,0 +1,150 @@ |
|||
package in.gov.chennaicorporation.gccoffice.petregistration.data; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonCreator; |
|||
import com.fasterxml.jackson.annotation.JsonProperty; |
|||
|
|||
public class RequestList { |
|||
private int uniqueid; |
|||
private long mobilenum; |
|||
private String petname; |
|||
private String species; |
|||
private String breed; |
|||
private String gender; |
|||
private String registerdate; |
|||
private int status; |
|||
private String rejectreason; |
|||
private String zone; |
|||
private String statusdate; |
|||
private String updatedby; |
|||
|
|||
|
|||
// Constructor |
|||
public RequestList() { |
|||
|
|||
} |
|||
|
|||
@JsonCreator |
|||
public RequestList(@JsonProperty("uniqueid") int uniqueid, |
|||
@JsonProperty("mobilenum") long mobilenum, |
|||
@JsonProperty("petname") String petname, |
|||
@JsonProperty("species") String species, |
|||
@JsonProperty("breed") String breed, |
|||
@JsonProperty("gender") String gender, |
|||
@JsonProperty("registerdate") String registerdate, |
|||
@JsonProperty("status") int status, |
|||
@JsonProperty("rejectreason") String rejectreason, |
|||
@JsonProperty("zone") String zone, |
|||
@JsonProperty("statusdate") String statusdate, |
|||
@JsonProperty("updatedby") String updatedby) { |
|||
|
|||
this.uniqueid = uniqueid; |
|||
this.mobilenum = mobilenum; |
|||
this.petname = petname; |
|||
this.species = species; |
|||
this.breed = breed; |
|||
this.gender = gender; |
|||
this.registerdate = registerdate; |
|||
this.status = status; |
|||
this.rejectreason = rejectreason; |
|||
this.zone = zone; |
|||
this.statusdate = statusdate; |
|||
this.updatedby = updatedby; |
|||
} |
|||
|
|||
// Getters and setters for each field |
|||
public int getUniqueid() { |
|||
return uniqueid; |
|||
} |
|||
|
|||
public void setUniqueid(int uniqueid) { |
|||
this.uniqueid = uniqueid; |
|||
} |
|||
|
|||
public long getMobilenum() { |
|||
return mobilenum; |
|||
} |
|||
|
|||
public void setMobilenum(long mobilenum) { |
|||
this.mobilenum = mobilenum; |
|||
} |
|||
|
|||
public String getPetname() { |
|||
return petname; |
|||
} |
|||
|
|||
public void setPetname(String petname) { |
|||
this.petname = petname; |
|||
} |
|||
|
|||
public String getSpecies() { |
|||
return species; |
|||
} |
|||
|
|||
public void setSpecies(String species) { |
|||
this.species = species; |
|||
} |
|||
|
|||
public String getBreed() { |
|||
return breed; |
|||
} |
|||
|
|||
public void setBreed(String breed) { |
|||
this.breed = breed; |
|||
} |
|||
|
|||
public String getGender() { |
|||
return gender; |
|||
} |
|||
|
|||
public void setGender(String gender) { |
|||
this.gender = gender; |
|||
} |
|||
|
|||
public String getRegisterdate() { |
|||
return registerdate; |
|||
} |
|||
|
|||
public void setRegisterdate(String registerdate) { |
|||
this.registerdate = registerdate; |
|||
} |
|||
|
|||
public int getStatus() { |
|||
return status; |
|||
} |
|||
|
|||
public void setStatus(int status) { |
|||
this.status = status; |
|||
} |
|||
|
|||
public String getRejectreason() { |
|||
return rejectreason; |
|||
} |
|||
|
|||
public void setRejectreason(String rejectreason) { |
|||
this.rejectreason = rejectreason; |
|||
} |
|||
|
|||
public String getZone() { |
|||
return zone; |
|||
} |
|||
|
|||
public void setZone(String zone) { |
|||
this.zone = zone; |
|||
} |
|||
|
|||
public String getStatusdate() { |
|||
return statusdate; |
|||
} |
|||
|
|||
public void setStatusdate(String statusdate) { |
|||
this.statusdate = statusdate; |
|||
} |
|||
|
|||
public String getUpdatedby() { |
|||
return updatedby; |
|||
} |
|||
|
|||
public void setUpdatedby(String updatedby) { |
|||
this.updatedby = updatedby; |
|||
} |
|||
} |
|||
@ -0,0 +1,15 @@ |
|||
package in.gov.chennaicorporation.gccoffice.petregistration.data; |
|||
|
|||
import java.util.List; |
|||
|
|||
public class ResponseWrapper { |
|||
private List<RequestList> data; |
|||
|
|||
public List<RequestList> getData() { |
|||
return data; |
|||
} |
|||
|
|||
public void setData(List<RequestList> data) { |
|||
this.data = data; |
|||
} |
|||
} |
|||
@ -0,0 +1 @@ |
|||
package in.gov.chennaicorporation.gccoffice.petregistration.data; |
|||
@ -0,0 +1 @@ |
|||
package in.gov.chennaicorporation.gccoffice.petregistration; |
|||
@ -0,0 +1,5 @@ |
|||
package in.gov.chennaicorporation.gccoffice.petregistration.service; |
|||
|
|||
public class API { |
|||
|
|||
} |
|||
@ -0,0 +1,638 @@ |
|||
<!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-check-circle' style='font-size:24px; color: #1aafd4'></i> |
|||
<div class="d-inline"> |
|||
<h5>Accepted 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">Accepted</li> |
|||
</ol> |
|||
</nav> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
<hr> |
|||
<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}]])">Accepted</span> |
|||
|
|||
</p> |
|||
</td> |
|||
<td class="text-center"> |
|||
<!-- <a th:href="@{#}" th:onclick="return callview( [[${list.status}]] );" data-bs-toggle="tooltip" data-bs-animation="true" data-bs-placement="top" title="View Pet info"><i class="far fa-bookmark" style="font-size: 18px;"></i></a> --> |
|||
<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;"></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> |
|||
|
|||
<!-- 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> |
|||
</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: '/pet/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){ |
|||
console.log(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; |
|||
} |
|||
function rejectsubmit(){ |
|||
var reason = $("#reason").val(); |
|||
var id = $("#uniqid").val(); |
|||
|
|||
Swal.fire({ |
|||
title: 'Do you want to Reject 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: '/pet/reject', |
|||
data: {'id':id,'reason':reason}, |
|||
success: function(bodyMessage) { |
|||
if(bodyMessage=="success"){ |
|||
console.log("done"); |
|||
Swal.fire( |
|||
'Done', |
|||
'Successfully Rejected to the ID:'+id, |
|||
'success' |
|||
).then(() => { |
|||
location.reload(); |
|||
}); |
|||
} |
|||
|
|||
} |
|||
|
|||
}); |
|||
|
|||
} else if (result.isDenied) { |
|||
Swal.fire('Changes are not saved', '', 'info') |
|||
} |
|||
}) |
|||
|
|||
return false; |
|||
|
|||
} |
|||
|
|||
function viewOwner(mobilenum){ |
|||
|
|||
$.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/acceptedPets?fromDate='+x+'&toDate='+y; |
|||
window.location.href=url; |
|||
|
|||
} |
|||
function resetDate(){ |
|||
var url= '/pet/acceptedPets'; |
|||
window.location.href=url; |
|||
} |
|||
|
|||
</script> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,845 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="en" dir=""> |
|||
<html xmlns:th="http://www.thymeleaf.org"> |
|||
|
|||
<head th:replace="~{fragments/modules/base/head :: head}"></head> |
|||
|
|||
<body> |
|||
<style> |
|||
html { |
|||
-webkit-text-size-adjust: none; |
|||
/* Prevent font scaling in landscape */ |
|||
width: 100%; |
|||
height: 100%; |
|||
-webkit-font-smoothing: antialiased; |
|||
-moz-font-smoothing: antialiased; |
|||
-moz-osx-font-smoothing: grayscale; |
|||
} |
|||
|
|||
input[type="submit"] { |
|||
-webkit-appearance: none; |
|||
} |
|||
|
|||
*, |
|||
*:after, |
|||
*:before { |
|||
box-sizing: border-box; |
|||
margin: 0; |
|||
padding: 0; |
|||
} |
|||
|
|||
body { |
|||
margin: 0; |
|||
padding: 0; |
|||
-webkit-font-smoothing: antialiased; |
|||
font-family: 'Muli', sans-serif; |
|||
font-weight: 400; |
|||
width: 100%; |
|||
min-height: 100%; |
|||
color: #333333; |
|||
width: 100%; |
|||
height: 100%; |
|||
background: #ecf0f4; |
|||
} |
|||
|
|||
a { |
|||
outline: none; |
|||
text-decoration: none; |
|||
color: #555; |
|||
} |
|||
|
|||
a:hover, |
|||
a:focus { |
|||
outline: none; |
|||
text-decoration: none; |
|||
} |
|||
|
|||
img { |
|||
border: 0; |
|||
} |
|||
|
|||
input, |
|||
textarea, |
|||
select { |
|||
outline: none; |
|||
resize: none; |
|||
font-family: 'Muli', sans-serif; |
|||
} |
|||
|
|||
a, |
|||
input, |
|||
button { |
|||
outline: none !important; |
|||
} |
|||
|
|||
button::-moz-focus-inner { |
|||
border: 0; |
|||
} |
|||
|
|||
h1, |
|||
h2, |
|||
h3, |
|||
h4, |
|||
h5, |
|||
h6 { |
|||
margin: 0; |
|||
padding: 0; |
|||
font-weight: 700; |
|||
color: #202342; |
|||
font-family: 'Muli', sans-serif; |
|||
} |
|||
|
|||
img { |
|||
border: 0; |
|||
vertical-align: top; |
|||
max-width: 100%; |
|||
height: auto; |
|||
} |
|||
|
|||
ul, |
|||
ol { |
|||
margin: 0; |
|||
padding: 0; |
|||
list-style: none; |
|||
} |
|||
|
|||
p { |
|||
margin: 0 0 15px 0; |
|||
padding: 0; |
|||
} |
|||
|
|||
.container-fluid { |
|||
max-width: 1900px; |
|||
} |
|||
|
|||
/* Common Class */ |
|||
.pd-5 { |
|||
padding: 5px; |
|||
} |
|||
|
|||
.pd-10 { |
|||
padding: 10px; |
|||
} |
|||
|
|||
.pd-20 { |
|||
padding: 20px; |
|||
} |
|||
|
|||
.pd-30 { |
|||
padding: 30px; |
|||
} |
|||
|
|||
.pb-10 { |
|||
padding-bottom: 10px; |
|||
} |
|||
|
|||
.pb-20 { |
|||
padding-bottom: 20px; |
|||
} |
|||
|
|||
.pb-30 { |
|||
padding-bottom: 30px; |
|||
} |
|||
|
|||
.pt-10 { |
|||
padding-top: 10px; |
|||
} |
|||
|
|||
.pt-20 { |
|||
padding-top: 20px; |
|||
} |
|||
|
|||
.pt-30 { |
|||
padding-top: 30px; |
|||
} |
|||
|
|||
.pr-10 { |
|||
padding-right: 10px; |
|||
} |
|||
|
|||
.pr-20 { |
|||
padding-right: 20px; |
|||
} |
|||
|
|||
.pr-30 { |
|||
padding-right: 30px; |
|||
} |
|||
|
|||
.pl-10 { |
|||
padding-left: 10px; |
|||
} |
|||
|
|||
.pl-20 { |
|||
padding-left: 20px; |
|||
} |
|||
|
|||
.pl-30 { |
|||
padding-left: 30px; |
|||
} |
|||
|
|||
.px-30 { |
|||
padding-left: 30px; |
|||
padding-right: 30px; |
|||
} |
|||
|
|||
.px-20 { |
|||
padding-left: 20px; |
|||
padding-right: 20px; |
|||
} |
|||
|
|||
.py-30 { |
|||
padding-top: 30px; |
|||
padding-bottom: 30px; |
|||
} |
|||
|
|||
.py-20 { |
|||
padding-top: 20px; |
|||
padding-bottom: 20px; |
|||
} |
|||
|
|||
.mb-30 { |
|||
margin-bottom: 30px; |
|||
} |
|||
|
|||
.mb-50 { |
|||
margin-bottom: 50px; |
|||
} |
|||
|
|||
.font-30 { |
|||
font-size: 30px; |
|||
line-height: 1.46em; |
|||
} |
|||
|
|||
.font-24 { |
|||
font-size: 24px; |
|||
line-height: 1.5em; |
|||
} |
|||
|
|||
.font-20 { |
|||
font-size: 20px; |
|||
line-height: 1.5em; |
|||
} |
|||
|
|||
.font-18 { |
|||
font-size: 18px; |
|||
line-height: 1.6em; |
|||
} |
|||
|
|||
.font-16 { |
|||
font-size: 16px; |
|||
line-height: 1.75em; |
|||
} |
|||
|
|||
.font-14 { |
|||
font-size: 14px; |
|||
line-height: 1.85em; |
|||
} |
|||
|
|||
.font-12 { |
|||
font-size: 12px; |
|||
line-height: 2em; |
|||
} |
|||
|
|||
.weight-300 { |
|||
font-weight: 300; |
|||
} |
|||
|
|||
.weight-400 { |
|||
font-weight: 400; |
|||
} |
|||
|
|||
.weight-500 { |
|||
font-weight: 500; |
|||
} |
|||
|
|||
.weight-600 { |
|||
font-weight: 600; |
|||
} |
|||
|
|||
.weight-700 { |
|||
font-weight: 700; |
|||
} |
|||
|
|||
.weight-800 { |
|||
font-weight: 800; |
|||
} |
|||
|
|||
.text-blue { |
|||
color: #1b00ff; |
|||
} |
|||
|
|||
.text-dark { |
|||
color: #000000; |
|||
} |
|||
|
|||
.text-white { |
|||
color: #ffffff; |
|||
} |
|||
|
|||
.height-100-p { |
|||
height: 100%; |
|||
} |
|||
|
|||
.bg-white { |
|||
background: #ffffff; |
|||
} |
|||
|
|||
.border-radius-10 { |
|||
-webkit-border-radius: 10px; |
|||
-moz-border-radius: 10px; |
|||
border-radius: 10px; |
|||
} |
|||
|
|||
.border-radius-100 { |
|||
-webkit-border-radius: 100%; |
|||
-moz-border-radius: 100%; |
|||
border-radius: 100%; |
|||
} |
|||
|
|||
.box-shadow { |
|||
-webkit-box-shadow: 0px 0px 28px rgba(0, 0, 0, .08); |
|||
-moz-box-shadow: 0px 0px 28px rgba(0, 0, 0, .08); |
|||
box-shadow: 0px 0px 28px rgba(0, 0, 0, .08); |
|||
} |
|||
|
|||
.gradient-style1 { |
|||
background-image: linear-gradient(135deg, #43CBFF 10%, #9708CC 100%); |
|||
} |
|||
|
|||
.gradient-style2 { |
|||
background-image: linear-gradient(135deg, #72EDF2 10%, #5151E5 100%); |
|||
} |
|||
|
|||
.gradient-style3 { |
|||
background-image: radial-gradient(circle 732px at 96.2% 89.9%, rgba(70, 66, 159, 1) 0%, rgba(187, 43, 107, 1) 92%); |
|||
} |
|||
|
|||
.gradient-style4 { |
|||
background-image: linear-gradient(135deg, #FF9D6C 10%, #BB4E75 100%); |
|||
} |
|||
|
|||
/* widget style 1 */ |
|||
|
|||
.widget-style1 { |
|||
padding: 20px 10px; |
|||
} |
|||
|
|||
.widget-style1 .circle-icon { |
|||
width: 60px; |
|||
} |
|||
|
|||
.widget-style1 .circle-icon .icon { |
|||
width: 60px; |
|||
height: 60px; |
|||
background: #ecf0f4; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
} |
|||
|
|||
.widget-style1 .widget-data { |
|||
width: calc(100% - 150px); |
|||
padding: 0 15px; |
|||
} |
|||
|
|||
.widget-style1 .progress-data { |
|||
width: 90px; |
|||
} |
|||
|
|||
.widget-style1 .progress-data .apexcharts-canvas { |
|||
margin: 0 auto; |
|||
} |
|||
|
|||
.widget-style2 .widget-data { |
|||
padding: 20px; |
|||
} |
|||
|
|||
.widget-style3 { |
|||
padding: 30px 20px; |
|||
} |
|||
|
|||
.widget-style3 .widget-data { |
|||
width: calc(100% - 60px); |
|||
} |
|||
|
|||
.widget-style3 .widget-icon { |
|||
width: 60px; |
|||
font-size: 45px; |
|||
line-height: 1; |
|||
} |
|||
|
|||
.apexcharts-legend-marker { |
|||
margin-right: 6px !important; |
|||
} |
|||
</style> |
|||
<!--[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-4"> |
|||
<div class="page-header-title"> |
|||
<i class='fa fa-tachometer-alt' style='font-size:24px; color: #1aafd4'></i> |
|||
<div class="d-inline"> |
|||
<h6>Pet Dashboard</h6> |
|||
<span>Pet Registration</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
<div class="col-1"> |
|||
<i class="fa fa-user" aria-hidden="true"><p id="UserCount"></p></i> |
|||
</div> |
|||
<!-- <div class="col-2"> |
|||
<p class="block-title">Users</p> |
|||
</div> --> |
|||
<div class="col-2"> |
|||
<select type="text" class="form-control text-center" name="zone" id="zone"> |
|||
<option value="0">All Zone</option> |
|||
<option value="1" th:selected="${zone=='1'}">Zone 1</option> |
|||
<option value="2" th:selected="${zone=='2'}">Zone 2</option> |
|||
<option value="3" th:selected="${zone=='3'}">Zone 3</option> |
|||
<option value="4" th:selected="${zone=='4'}">Zone 4</option> |
|||
<option value="5" th:selected="${zone=='5'}">Zone 5</option> |
|||
<option value="6" th:selected="${zone=='6'}">Zone 6</option> |
|||
<option value="7" th:selected="${zone=='7'}">Zone 7</option> |
|||
<option value="8" th:selected="${zone=='8'}">Zone 8</option> |
|||
<option value="9" th:selected="${zone=='9'}">Zone 9</option> |
|||
<option value="10" th:selected="${zone=='10'}">Zone 10</option> |
|||
<option value="11" th:selected="${zone=='11'}">Zone 11</option> |
|||
<option value="12" th:selected="${zone=='12'}">Zone 12</option> |
|||
<option value="13" th:selected="${zone=='13'}">Zone 13</option> |
|||
<option value="14" th:selected="${zone=='14'}">Zone 14</option> |
|||
<option value="15" th:selected="${zone=='15'}">Zone 15</option> |
|||
</select> |
|||
</div> |
|||
<div class="col-2"> |
|||
<button type="submit" class="btn btn-sm btn-primary" onclick="getByZone()" |
|||
id="submit">Submit</button> |
|||
</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">Dashboard</li> |
|||
</ol> |
|||
</nav> |
|||
</div> |
|||
|
|||
|
|||
</div> |
|||
<br> |
|||
<br> |
|||
<div class="content"> |
|||
<div class="block block-rounded"> |
|||
|
|||
|
|||
</div> |
|||
<div class="block-content p-0"> |
|||
<div class="row"> |
|||
|
|||
<div class="col-sm-6 col-lg-6 mb-50"> |
|||
|
|||
<div class="row"> |
|||
<div class="col-sm-12 col-lg-6 mb-50"> |
|||
<div |
|||
class="bg-white box-shadow border-radius-10 height-100-p widget-style1"> |
|||
<div class="d-flex flex-wrap align-items-center"> |
|||
<div class="circle-icon"> |
|||
<div class="icon border-radius-100 font-24 text-blue"> |
|||
<i class="far fa-file" aria-hidden="true"></i> |
|||
</div> |
|||
</div> |
|||
<div class="widget-data"> |
|||
<div class="weight-800 font-18" id="totalRegPets"></div> |
|||
<div class="weight-500">Reg Pets</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="col-sm-12 col-lg-6 mb-50"> |
|||
<div |
|||
class="bg-white box-shadow border-radius-10 height-100-p widget-style1"> |
|||
<div class="d-flex flex-wrap align-items-center"> |
|||
<div class="circle-icon"> |
|||
<div class="icon border-radius-100 font-24 text-blue"><i |
|||
class='fas fa-calendar-minus'></i></div> |
|||
</div> |
|||
<div class="widget-data"> |
|||
<div class="weight-800 font-18" id="totalInprogcount"></div> |
|||
<div class="weight-500">Review Pending</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
<div class="row"> |
|||
|
|||
<div class="col-sm-6 col-lg-6 mb-50"> |
|||
<div |
|||
class="bg-white box-shadow border-radius-10 height-100-p widget-style1"> |
|||
<div class="d-flex flex-wrap align-items-center"> |
|||
<div class="circle-icon"> |
|||
<div class="icon border-radius-100 font-24 text-blue"> |
|||
<i class="fa fa-times-circle"></i> |
|||
</div> |
|||
</div> |
|||
<div class="widget-data"> |
|||
<div class="weight-800 font-18" id="totalRejCount"></div> |
|||
<div class="weight-500">Rejected Pets</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
<div class="col-sm-6 col-lg-6 mb-50"> |
|||
<div |
|||
class="bg-white box-shadow border-radius-10 height-100-p widget-style1"> |
|||
<div class="d-flex flex-wrap align-items-center"> |
|||
<div class="circle-icon"> |
|||
<div class="icon border-radius-100 font-24 text-blue"><i |
|||
class="fa fa-paw" aria-hidden="true"></i> |
|||
</div> |
|||
</div> |
|||
<div class="widget-data"> |
|||
<div class="weight-800 font-18" id="totalpets"></div> |
|||
<div class="weight-500">Total Pets</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
|
|||
<div class="row"> |
|||
<div class="col-sm-6 col-lg-6 mb-50" id="licIssuedHide"> |
|||
<div |
|||
class="bg-white box-shadow border-radius-10 height-100-p widget-style1"> |
|||
<div class="d-flex flex-wrap align-items-center"> |
|||
<div class="circle-icon"> |
|||
<div class="icon border-radius-100 font-24 text-blue"><i |
|||
class="fa fa-paper-plane" aria-hidden="true"></i> |
|||
</div> |
|||
</div> |
|||
<div class="widget-data"> |
|||
<div class="weight-800 font-18" id="totallicCount"></div> |
|||
<div class="weight-500">Licensed issued</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="col-sm-6 col-lg-6 mb-50"> |
|||
<div |
|||
class="bg-white box-shadow border-radius-10 height-100-p widget-style1"> |
|||
<div class="d-flex flex-wrap align-items-center"> |
|||
<div class="circle-icon"> |
|||
<div class="icon border-radius-100 font-24 text-blue"><i |
|||
class="fas fa-file-excel" |
|||
aria-hidden="true"></i></div> |
|||
</div> |
|||
<div class="widget-data"> |
|||
<div class="weight-800 font-18" id="explicCount"></div> |
|||
<div class="weight-500">License expired</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
<div class="col-md-6 mb-4"> |
|||
<div class="card"> |
|||
<div class="card-body"> |
|||
<div id="totalpetpiechart"></div> |
|||
<div class="weight-800 font-18" id="totalpet"></div> |
|||
<div class="weight-500">Total Pet Status count</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
</div> |
|||
|
|||
<div class="row"> |
|||
<div class="col-md-5"> |
|||
<div class="card"> |
|||
<div class="card-body"> |
|||
<div id="Dogpiechart"></div> |
|||
<!-- <div class="weight-800 font-18" th:text="${dogTotalCount}"></div> --> |
|||
<div class="weight-800 font-18" id="dogTotal"></div> |
|||
<div class="weight-500">Total Dog count</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-5"> |
|||
<div class="card"> |
|||
<div class="card-body"> |
|||
<div id="Catpiechart"></div> |
|||
<!-- <div class="weight-800 font-18" th:text="${catTotalCount}" id="catTotal"></div> --> |
|||
<div class="weight-800 font-18" id="catTotal"></div> |
|||
<div class="weight-500">Total cat count</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
|
|||
|
|||
</div> |
|||
|
|||
|
|||
|
|||
|
|||
</div> |
|||
<!-- END Page Content --> |
|||
</main> |
|||
<!-- END Main Container --> |
|||
<!-- Footer --> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
</body> |
|||
<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" src="https://www.gstatic.com/charts/loader.js"></script> |
|||
|
|||
<script th:inline="javascript"> |
|||
|
|||
var x, y,userCount,licCount; |
|||
convert(); |
|||
function convert() { |
|||
var m = /*[[${dash}]]*/ {}; |
|||
console.log(m); |
|||
x = /*[[${dash.dog}]]*/ {}; |
|||
y = /*[[${dash.cat}]]*/ {}; |
|||
userCount = /*[[${dash.userCount}]]*/ {}; |
|||
licCount= /*[[${dash.licCount}]]*/ {}; |
|||
} |
|||
|
|||
var totalexpired = x['4'] + y['4']; |
|||
var totalrejected = x['3'] + y['3']; |
|||
var totalLicensed = x['2'] + y['2']; |
|||
var totalPayment = x['1'] + y['1']; |
|||
var totalinprog = x['0'] + y['0']; |
|||
document.getElementById("totalpet").innerHTML = x['200'] + y['200']; |
|||
|
|||
var catexpired = y['4']; |
|||
var catrejected = y['3']; |
|||
var catLicensed = y['2']; |
|||
var catPayment = y['1']; |
|||
var catinprog = y['0']; |
|||
var catTotal = y['200']; |
|||
document.getElementById("catTotal").innerHTML = catTotal; |
|||
|
|||
var dogexpired = x['4']; |
|||
var dogrejected = x['3']; |
|||
var dogLicensed = x['2']; |
|||
var dogPayment = x['1']; |
|||
var doginprog = x['0']; |
|||
var dogTotal = x['200']; |
|||
document.getElementById("dogTotal").innerHTML = dogTotal; |
|||
|
|||
document.getElementById("UserCount").innerHTML = userCount; |
|||
document.getElementById("totalRegPets").innerHTML = x['200'] + y['200']; |
|||
document.getElementById("totalInprogcount").innerHTML = totalinprog; |
|||
document.getElementById("totalRejCount").innerHTML = totalrejected; |
|||
document.getElementById("totalpets").innerHTML = totalLicensed; |
|||
document.getElementById("explicCount").innerHTML = totalexpired; |
|||
document.getElementById("totallicCount").innerHTML = licCount; |
|||
|
|||
|
|||
google.charts.load('current', { 'packages': ['corechart'] }); |
|||
google.charts.setOnLoadCallback(drawChart2); |
|||
|
|||
// Draw the chart and set the chart values |
|||
function drawChart2() { |
|||
var data = google.visualization.arrayToDataTable([ |
|||
['Total', 'Hours per Day'], |
|||
['InProgress', totalinprog], |
|||
['Payment', totalPayment], |
|||
['License Issued', totalLicensed], |
|||
['Rejected', totalrejected], |
|||
['Expired', totalexpired], |
|||
//['Total Pets', totalInCount] |
|||
]); |
|||
// Optional; add a title and set the width and height of the chart |
|||
var options = { |
|||
'title': 'OverAll pet Info', legend: 'bottom', 'height': 500, |
|||
colors: ['#f4ca47', '#0ebce0', '#aae00e', '#053a4c', '#0ee0ad'], |
|||
|
|||
}; |
|||
// Display the chart inside the <div> element with id="piechart" |
|||
var chart = new google.visualization.PieChart(document.getElementById('totalpetpiechart')); |
|||
chart.draw(data, options); |
|||
} |
|||
|
|||
|
|||
|
|||
//total Dog count piechart |
|||
|
|||
//console.log("dogTotal:"+dogTotal); |
|||
|
|||
google.charts.load('current', { 'packages': ['corechart'] }); |
|||
google.charts.setOnLoadCallback(drawChart); |
|||
|
|||
// Draw the chart and set the chart values |
|||
function drawChart() { |
|||
var data = google.visualization.arrayToDataTable([ |
|||
['Dog Info', 'Hours per Day'], |
|||
['InProgress', doginprog], |
|||
['Payment', dogPayment], |
|||
['License Issued', dogLicensed], |
|||
['Rejected', dogrejected], |
|||
['Expired', dogexpired] |
|||
|
|||
]); |
|||
|
|||
// Optional; add a title and set the width and height of the chart |
|||
var options = { |
|||
'title': 'OverAll Dog Info', legend: 'bottom', 'height': 400, |
|||
colors: ['#f4ca47', '#0ebce0', '#aae00e', '#053a4c', '#0ee0ad'], |
|||
}; |
|||
|
|||
// Display the chart inside the <div> element with id="piechart" |
|||
var chart = new google.visualization.PieChart(document.getElementById('Dogpiechart')); |
|||
chart.draw(data, options); |
|||
} |
|||
|
|||
//total cat piechart |
|||
|
|||
// $('#catTotal').val(catTotal); |
|||
|
|||
google.charts.load('current', { 'packages': ['corechart'] }); |
|||
google.charts.setOnLoadCallback(drawChart1); |
|||
|
|||
// Draw the chart and set the chart values |
|||
function drawChart1() { |
|||
var data = google.visualization.arrayToDataTable([ |
|||
['Cat Info', 'Hours per Day'], |
|||
['InProgress', catinprog], |
|||
['Payment', catPayment], |
|||
['License Issued', catLicensed], |
|||
['Rejected', catrejected], |
|||
['Expired', catexpired] |
|||
]); |
|||
|
|||
var options = { |
|||
'title': 'OverAll Cat Info', |
|||
legend: 'bottom', |
|||
'height': 400, |
|||
colors: ['#f4ca47', '#0ebce0', '#aae00e', '#053a4c', '#0ee0ad'], |
|||
}; |
|||
var chart = new google.visualization.PieChart(document.getElementById('Catpiechart')); |
|||
chart.draw(data, options); |
|||
} |
|||
// total cat count piechar end |
|||
function getByZone() { |
|||
|
|||
var zone = $("#zone").val() |
|||
if (zone == "0") { |
|||
window.location.href = "/petregistration/"; |
|||
return false; |
|||
} |
|||
else{ |
|||
window.location.href = "/petregistration/?zone="+zone; |
|||
return false; |
|||
} |
|||
} |
|||
function getPieChartByZone(x) { |
|||
console.log(x); |
|||
totalexpired = x.cat[4] + x.dog[4]; |
|||
totalrejected = x.cat[3] + x.dog[3]; |
|||
totalLicensed = x.cat[2] + x.dog[2]; |
|||
totalPayment = x.cat[1] + x.dog[1]; |
|||
totalinprog = x.cat[0] + x.dog[0]; |
|||
document.getElementById("totalpet").innerHTML = x.cat[200] + x.dog[200]; |
|||
drawChart2(); |
|||
|
|||
catexpired = x.cat[4]; |
|||
catrejected = x.cat[3]; |
|||
catLicensed = x.cat[2]; |
|||
catPayment = x.cat[1]; |
|||
catinprog = x.cat[0]; |
|||
catTotal = x.cat[200]; |
|||
document.getElementById("catTotal").innerHTML = catTotal; |
|||
drawChart1(); |
|||
dogexpired = x.dog[4]; |
|||
dogrejected = x.dog[3]; |
|||
dogLicensed = x.dog[2]; |
|||
dogPayment = x.dog[1]; |
|||
doginprog = x.dog[0]; |
|||
dogTotal = x.dog[200]; |
|||
document.getElementById("dogTotal").innerHTML = dogTotal; |
|||
|
|||
drawChart(); |
|||
|
|||
var UserCount = x.userCount; |
|||
//var zone= |
|||
var totalRegPets = x.dog[200] + x.cat[200]; |
|||
var totalInprogcount = x.dog[0] + x.cat[0]; |
|||
var totalRejCount = x.dog[3] + x.cat[3]; |
|||
var totalpets = x.dog[2] + x.cat[2]; |
|||
//var totallicCount |
|||
var explicCount = x.dog[4] + x.cat[4]; |
|||
|
|||
document.getElementById("UserCount").innerHTML = UserCount; |
|||
document.getElementById("totalRegPets").innerHTML = totalRegPets; |
|||
document.getElementById("totalInprogcount").innerHTML = totalInprogcount; |
|||
document.getElementById("totalRejCount").innerHTML = totalRejCount; |
|||
document.getElementById("totalpets").innerHTML = totalpets; |
|||
document.getElementById("explicCount").innerHTML = explicCount; |
|||
|
|||
} |
|||
|
|||
function resetDate() { |
|||
window.location.href = "/admin/home"; |
|||
} |
|||
|
|||
function getZoneDashboard() { |
|||
var z = $('#zone').val(); |
|||
if (z == 0) { |
|||
window.location.href = "/pet/dashboard"; |
|||
} |
|||
} |
|||
</script> |
|||
</html> |
|||
@ -0,0 +1,536 @@ |
|||
<!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-paper-plane' style='font-size:24px; color: #1aafd4'></i> |
|||
<div class="d-inline"> |
|||
<h5>License Issued Info</h5> |
|||
<span>Pet Registration</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- <div class="col-lg-4"> |
|||
<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">Asset QR Feedback</li> |
|||
<li class="breadcrumb-item">Master</li> |
|||
<li class="breadcrumb-item active" aria-current="page">Category</li> |
|||
</ol> |
|||
</nav> |
|||
</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">Lisense</li> |
|||
</ol> |
|||
</nav> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<hr> |
|||
<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>Type</th> |
|||
<th>Issued By</th> |
|||
<th>UpDated Date</th> |
|||
<th>Pet Photo</th> |
|||
<th>Rabies certi</th> |
|||
<th>License Info</th> |
|||
<th class="text-center no-sort">Owner Info</th> |
|||
</tr> |
|||
</theadclass="thead-dark"> |
|||
<tbody> |
|||
<tr th:each="list, i : ${petlist}" class="${petlist}"> |
|||
<td th:text="${i.count}">0</td> |
|||
<td th:text="${list.species}"></td> |
|||
<td th:text="${list.updatedby}"></td> |
|||
<td th:text="${list.statusdate}"></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> |
|||
<p> |
|||
<span class="badge bg-success" |
|||
th:onclick="licenceInfo([[${list.mobilenum}]],[[${list.uniqueid}]])" |
|||
style="cursor: pointer;">Info</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>Type</th> |
|||
<th>Issued By</th> |
|||
<th>UpDated Date</th> |
|||
<th>Pet Photo</th> |
|||
<th>Rabies certi</th> |
|||
<th>License Info</th> |
|||
<th>Owner Info</th> |
|||
|
|||
</tr> |
|||
</tfoot> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
|
|||
|
|||
<!-- Modal --> |
|||
<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> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
<footer th:replace="~{fragments/modules/base/footer :: footer}"></footer> |
|||
</div> |
|||
</div> |
|||
|
|||
<!--license info State --> |
|||
<div class="modal fade" id="licForm" tabindex="-1" role="dialog" aria-labelledby="licFormCenterLabel" |
|||
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="licFormCenterLabel">License 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 Id:</strong> |
|||
<p class="text-muted form-control showInputValue" id="uniqueid"></p> |
|||
</div> |
|||
<div class="col-xl-6 col-md-12"> <strong>License No:</strong> |
|||
<p class="text-muted form-control showInputValue" id="licno"></p> |
|||
</div> |
|||
<div class="col-xl-6 col-md-12"> <strong>Phone No:</strong> |
|||
<p class="text-muted form-control showInputValue" id="phonee"></p> |
|||
</div> |
|||
<div class="col-xl-6 col-md-12"> <strong>validity:</strong> |
|||
<p class="text-muted form-control showInputValue" id="valid"></p> |
|||
</div> |
|||
<!-- <div class="block-content block-content-full text-end bg-body" id="mbutton3"> |
|||
<button type="button" class="btn btn-sm btn-alt-primary" onclick="viewfulllicense()">View</button> |
|||
<button type="button" class="btn btn-sm btn-alt-secondary" data-bs-dismiss="modal">Close</button> |
|||
</div> --> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- owner Info --> |
|||
<div class="modal fade" id="ownerForm" 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">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 --> |
|||
<!-- pet License --> |
|||
<!-- <div class="modal fade backdrop" id="getpetlic" data-backdrop="static" tabindex="-1" role="dialog" |
|||
aria-labelledby="staticBackdropLabel" aria-hidden="true"> |
|||
<div class="modal-dialog modal-xl" role="document"> |
|||
<div class="modal-content"> |
|||
<div class="block block-rounded block-themed block-transparent mb-0"> |
|||
<div class="block-header bg-primary-dark"> |
|||
<h3 class="block-title" id="lic">Download License</h3> |
|||
<button onclick="printme()" class="btn btn-sm btn-primary">Print</button> |
|||
<div class="block-options"> |
|||
<button onclick="closeme()" class="btn-block-option"> |
|||
<i class="fa fa-fw fa-times"></i> |
|||
</button> |
|||
</div> |
|||
</div> |
|||
<div id="htmldatatxt"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
--> |
|||
<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'); |
|||
} |
|||
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 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'); |
|||
} |
|||
function licenceInfo(mobno, uniqueid) { |
|||
$.ajax({ |
|||
type: "GET", |
|||
url: '/api/pet/getlicenseinfo', |
|||
data: { |
|||
'mobilenum': mobno, |
|||
'uniqueid': uniqueid |
|||
}, |
|||
success: function (list) { |
|||
$('#licForm').modal({ |
|||
backdrop: 'static', |
|||
keyboard: false |
|||
}); |
|||
$('#licForm').modal('show'); |
|||
document.getElementById("uniqueid").innerHTML = list.uniqueid; |
|||
document.getElementById("licno").innerHTML = list.licenseNo; |
|||
document.getElementById("phonee").innerHTML = list.phone; |
|||
document.getElementById("valid").innerHTML = list.validity; |
|||
|
|||
} |
|||
|
|||
}); |
|||
} |
|||
|
|||
|
|||
function viewfulllicense() { |
|||
var id = document.getElementById("uniqueid").value;; |
|||
var phone = document.getElementById("phone").value; |
|||
//window.open('/owners/getlicensebymobo/'+id+'/'+phone,'_blank'); |
|||
$.ajax({ |
|||
type: "GET", |
|||
url: '/owners/ /' + id + '/' + phone, |
|||
success: function (bodyMessage) { |
|||
$("#htmldatatxt").html(bodyMessage); |
|||
$('#getpetlic').modal({ |
|||
backdrop: 'static', |
|||
keyboard: false |
|||
}); |
|||
$('#getpetlic').modal('show'); |
|||
} |
|||
}) |
|||
} |
|||
function closeme() { |
|||
window.location.reload(); |
|||
} |
|||
function printme() { |
|||
var printContent = document.getElementById('htmldatatxt').innerHTML; |
|||
var originalContent = document.body.innerHTML; |
|||
document.body.innerHTML = printContent; |
|||
window.print(); |
|||
document.body.innerHTML = originalContent; |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
function getbydate() { |
|||
var x = document.getElementById("fromdate").value; |
|||
var y = document.getElementById("todate").value; |
|||
|
|||
var url = '/pet/licenseIssued?fromDate=' + x + '&toDate=' + y; |
|||
window.location.href = url; |
|||
|
|||
} |
|||
function resetDate() { |
|||
var url = '/pet/licenseIssued'; |
|||
window.location.href = url; |
|||
} |
|||
|
|||
</script> |
|||
</body> |
|||
|
|||
</html> |
|||
@ -0,0 +1,607 @@ |
|||
<!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> |
|||
@ -0,0 +1,687 @@ |
|||
<!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-3"> |
|||
<div class="page-header-title"> |
|||
<i class='fa fa-envelope' style='font-size:24px; color: #1aafd4'></i> |
|||
<div class="d-inline"> |
|||
<h5>Request 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">Request</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="100%"> |
|||
<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">Status</th> |
|||
<th class="text-center text-center no-sort">Action</th> |
|||
</tr> |
|||
</theadclass="thead-dark"> |
|||
|
|||
<tbody> |
|||
<tr th:each="list, i : ${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 th:if="${list.status}"><span class="badge bg-success">Active</span></td> |
|||
<td th:unless="${list.status}"><span class="badge bg-warning">InActive</span></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}]])">pending</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">Status</th> |
|||
<th class="text-center text-center no-sort">Action</th> |
|||
</tr> |
|||
</tfoot> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
<footer th:replace="~{fragments/modules/base/footer :: footer}"></footer> |
|||
|
|||
|
|||
<!-- 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"> |
|||
<form id="petform" onsubmit="return rejectsubmit();"> |
|||
|
|||
<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 /> |
|||
<input type="hidden" class="form-control text-center" name="Mobii" id="Mobii" 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"> |
|||
<label class="form-label" for="reason">Reason:<span class="text-danger"></span></label> |
|||
<textarea class="form-control " name="reason" id="reason" required></textarea> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="modal-footer"> |
|||
<button type="button" class="btn btn-success" onclick="accept()">Accept</button> |
|||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> |
|||
<button type="submit" class="btn btn-primary">Reject</button> |
|||
</div> |
|||
</form> |
|||
|
|||
</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> |
|||
|
|||
<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) { |
|||
alert(mobno + " "+uniqueid); |
|||
$.ajax({ |
|||
type: "GET", |
|||
url: '/api/petregistration/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/petregistration/getapplicantimg', |
|||
data: { |
|||
'mobno': mobno, |
|||
'uniqueid': uniqueid |
|||
}, |
|||
success: function (x) { |
|||
document.getElementById("myImg").src = "data:image/jpeg;base64," + x; |
|||
} |
|||
}); |
|||
//document.getElementById("myImg").src ="data:image/jpeg;base64,"+x.applicantphoto; |
|||
$('#exampleModal').modal({ |
|||
backdrop: 'static', |
|||
keyboard: false |
|||
}); |
|||
$('#exampleModal').modal('show'); |
|||
} |
|||
function certificateimg(mobno, uniqueid) { |
|||
$.ajax({ |
|||
type: "GET", |
|||
url: '/api/petregistration/getvaccineimg', |
|||
data: { |
|||
'mobno': mobno, |
|||
'uniqueid': uniqueid |
|||
}, |
|||
success: function (x) { |
|||
document.getElementById("myImg").src = "data:image/jpeg;base64," + x; |
|||
} |
|||
}); |
|||
//document.getElementById("myImg").src ="data:image/jpeg;base64,"+x.rabiesvacCerti; |
|||
$('#exampleModal').modal({ |
|||
backdrop: 'static', |
|||
keyboard: false |
|||
}); |
|||
$('#exampleModal').modal('show'); |
|||
} |
|||
function proofimg(mobno, uniqueid) { |
|||
$.ajax({ |
|||
type: "GET", |
|||
url: '/api/petregistration/getaddressproofimg', |
|||
data: { |
|||
'mobno': mobno, |
|||
'uniqueid': uniqueid |
|||
}, |
|||
success: function (x) { |
|||
document.getElementById("myImg").src = "data:image/jpeg;base64," + x; |
|||
} |
|||
}); |
|||
//document.getElementById("myImg").src ="data:image/jpeg;base64,"+x.addressproof; |
|||
$('#exampleModal').modal({ |
|||
backdrop: 'static', |
|||
keyboard: false |
|||
}); |
|||
$('#exampleModal').modal('show'); |
|||
} |
|||
function accept() { |
|||
let id = document.getElementById("uniqid").value; |
|||
let mobileNo = document.getElementById("Mobii").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/pet/accept', |
|||
data: { 'id': id, 'mobileNo': mobileNo }, |
|||
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'); |
|||
console.log(list); |
|||
document.getElementById("Mobii").value = list.mobilenum; |
|||
document.getElementById("uniqid").value = 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; |
|||
} |
|||
|
|||
function rejectsubmit() { |
|||
var reason = $("#reason").val(); |
|||
var id = $("#uniqid").val(); |
|||
var mobileNo = $("#Mobii").val(); |
|||
|
|||
// alert(reason+" "+id+" "+mobileNo); |
|||
Swal.fire({ |
|||
title: 'Do you want to Reject 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/pet/reject', |
|||
data: { 'id': id, 'reason': reason, 'mobileNo': mobileNo }, |
|||
success: function (bodyMessage) { |
|||
if (bodyMessage == "success") { |
|||
console.log("done"); |
|||
Swal.fire( |
|||
'Done', |
|||
'Successfully Rejected to the ID:' + id, |
|||
'success' |
|||
).then(() => { |
|||
location.reload(); |
|||
}); |
|||
} |
|||
|
|||
} |
|||
|
|||
}); |
|||
|
|||
} else if (result.isDenied) { |
|||
Swal.fire('Changes are not saved', '', 'info') |
|||
} |
|||
}) |
|||
|
|||
return false; |
|||
|
|||
} |
|||
|
|||
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 = '/petregistration/requestlist?fromDate=' + x + '&toDate=' + y; |
|||
window.location.href = url; |
|||
|
|||
} |
|||
function resetDate() { |
|||
var url = '/petregistration/requestlist'; |
|||
window.location.href = url; |
|||
} |
|||
</script> |
|||
</body> |
|||
|
|||
</html> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue