|
|
|
@ -6,9 +6,9 @@ |
|
|
|
<meta charset="utf-8"> |
|
|
|
<meta name="viewport" content="width=device-width,initial-scale=1.0" > |
|
|
|
|
|
|
|
<title>GCC Grabage Collection Request</title> |
|
|
|
<title>GCC Feedback</title> |
|
|
|
|
|
|
|
<meta name="description" content="GCC Public Garbage collection request application"> |
|
|
|
<meta name="description" content="GCC Feedback request application"> |
|
|
|
<meta name="author" content="gcc"> |
|
|
|
<meta name="robots" content="noindex, nofollow"> |
|
|
|
|
|
|
|
@ -26,11 +26,11 @@ |
|
|
|
<link rel="apple-touch-icon" sizes="180x180" href="assets/media/favicons/apple-touch-icon-180x180.png"> |
|
|
|
|
|
|
|
<link rel="stylesheet" id="css-main" href="assets/css/dashmix.min.css"> |
|
|
|
|
|
|
|
|
|
|
|
</head> |
|
|
|
|
|
|
|
<body> |
|
|
|
<style> |
|
|
|
<style> |
|
|
|
.otp-input-box { |
|
|
|
/*display: flex; |
|
|
|
justify-content: space-between;*/ |
|
|
|
@ -51,7 +51,7 @@ |
|
|
|
<div id="page-container" class="page-header-dark main-content-boxed"> |
|
|
|
|
|
|
|
<!-- Header --> |
|
|
|
<header id="page-header"> |
|
|
|
<header id="page-header" style="background-color:#1e6a7f"> |
|
|
|
<!-- Header Content --> |
|
|
|
<div class="content-header"> |
|
|
|
<!-- Left Section --> |
|
|
|
@ -75,69 +75,9 @@ |
|
|
|
</div> |
|
|
|
<!-- END Left Section --> |
|
|
|
|
|
|
|
<!-- Right Section --> |
|
|
|
<div> |
|
|
|
<!-- User Dropdown --> |
|
|
|
<div class="dropdown d-inline-block"> |
|
|
|
<button type="button" class="btn btn-alt-secondary" id="page-header-user-dropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
|
|
|
<i class="fa fa-bars"></i> |
|
|
|
<i class="fa fa-angle-down opacity-50 ms-1"></i> |
|
|
|
</button> |
|
|
|
<div class="dropdown-menu dropdown-menu-lg dropdown-menu-end p-0" aria-labelledby="page-header-user-dropdown"> |
|
|
|
<div class="rounded-top fw-semibold text-white bg-image" style="background-image: url('assets/media/photos/photo20.jpg');"> |
|
|
|
<div class="p-3 bg-black-50 rounded-top"> |
|
|
|
<div class="d-flex align-items-center"> |
|
|
|
<img class="img-avatar img-avatar48 img-avatar-thumb" src="assets/media/avatars/avatar3.jpg" alt=""> |
|
|
|
<div class="ms-3"> |
|
|
|
<a class="text-white fw-semibold" href="">Mobile No</a> |
|
|
|
<div class="fs-sm text-white-75" id="userNo"></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="p-2"> |
|
|
|
<a class="dropdown-item d-flex justify-content-between align-items-center" href="javascript:getrequest()"> |
|
|
|
<div> |
|
|
|
<i class="fa fa-fw fa-globe opacity-50 me-1"></i> |
|
|
|
Request Status |
|
|
|
</div> |
|
|
|
<span class="badge rounded-pill bg-primary"></span> |
|
|
|
</a> |
|
|
|
<a class="dropdown-item d-flex justify-content-between align-items-center" href="/"> |
|
|
|
<div> |
|
|
|
<i class="fa fa-fw fa-sync-alt opacity-50 me-1"></i> |
|
|
|
Create New Request |
|
|
|
</div> |
|
|
|
</a> |
|
|
|
|
|
|
|
<div role="separator" class="dropdown-divider"></div> |
|
|
|
<div id="logout" > |
|
|
|
<a class="dropdown-item d-flex align-items-center mb-0" href="javascript:logout();"> |
|
|
|
<i class="fa fa-fw fa-sign-out-alt text-danger me-1"></i> |
|
|
|
Log Out |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
<div id="login"> |
|
|
|
<a class="dropdown-item d-flex align-items-center mb-0" href="javascript:showAndHide();"> |
|
|
|
<i class="fa fa-fw fa-sign-in-alt text-danger me-1"></i> |
|
|
|
Log In |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- END User Dropdown --> |
|
|
|
</div> |
|
|
|
<!-- END Right Section --> |
|
|
|
</div> |
|
|
|
<!-- END Header Content --> |
|
|
|
|
|
|
|
<!-- Header Search --> |
|
|
|
|
|
|
|
<!-- END Header Search --> |
|
|
|
|
|
|
|
<!-- Header Loader --> |
|
|
|
<!-- Please check out the Loaders page under Components category to see examples of showing/hiding it --> |
|
|
|
<div id="page-header-loader" class="overlay-header bg-sidebar-dark"> |
|
|
|
<div class="content-header"> |
|
|
|
@ -154,11 +94,13 @@ |
|
|
|
<main id="main-container"> |
|
|
|
<!-- Hero --> |
|
|
|
<div class="bg-image" style="background-image: url('assets/media/photos/photo15@2x.jpg');"> |
|
|
|
<div class="bg-primary-dark-op"> |
|
|
|
<div class="bg-primary-dark-op" style="background-color:rgb(4 128 146 / 80%)!important"> |
|
|
|
<div class="content content-full"> |
|
|
|
<div class="py-3 text-center"> |
|
|
|
<h2 class="text-white mb-2">Government of Tamil Nadu</h2> |
|
|
|
<h3 class="h4 fw-normal text-white-75 mb-0">தமிழ்நாடு அரசு பெருநகர சென்னை மாநகராட்சி</h3> |
|
|
|
<br> |
|
|
|
<h4 class="text-white mb-2">Namma Chennai Support</h4> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -167,13 +109,10 @@ |
|
|
|
|
|
|
|
|
|
|
|
<!-- Page Content --> |
|
|
|
<div class="content"> |
|
|
|
<!-- Dummy content --> |
|
|
|
<div class="row"> |
|
|
|
<!-- <a><button class="btn btn-primary btn-sm" onclick="getrequest()">My Request</button></a> --> |
|
|
|
|
|
|
|
<div class="content" > |
|
|
|
<div class="row" id="req" style="display: block;"> |
|
|
|
<div class="col-12"> |
|
|
|
<form action="#" id="garbageform" th:action="@{/request_save}" th:object="${request_save}" method="post" onsubmit="return login();" enctype="multipart/form-data"> |
|
|
|
<form action="" id="reqForm" onsubmit="return newUserCall();" > |
|
|
|
<div class="block block-rounded"> |
|
|
|
<div class="block-header block-header-default"> |
|
|
|
<h3 class="block-title">New Request Form</h3> |
|
|
|
@ -182,146 +121,121 @@ |
|
|
|
<div class="block-content"> |
|
|
|
|
|
|
|
<div class="row"> |
|
|
|
<div class="col-md-12 alert-light border-0"> |
|
|
|
<div class="col-md-6 alert-light border-0"> |
|
|
|
<div class="mb-3"> |
|
|
|
<label class="form-check-label" for="name">Name</label> |
|
|
|
<input type="text" class="form-control" id="name" required="" name="name"> |
|
|
|
<input type="text" class="form-control" id="name" name="name" required> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="col-md-6 alert-light border-0"> |
|
|
|
<div class="mb-3"> |
|
|
|
<label class="form-check-label" for="mobile">Mobile No</label> |
|
|
|
<input type="text" class="form-control" id="mobile" minlength="10" maxlength="10" required="" name="mobile"> |
|
|
|
<input type="text" class="form-control" id="mobile" minlength="10" maxlength="10" name="mobile" required> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
<hr class="m-0"> |
|
|
|
<div class="block-content block-content-full text-end"> |
|
|
|
<button type="button" class="btn btn-de-secondary btn-sm" onclick="reset()">Reset</button> |
|
|
|
<button type="submit" class="btn btn-primary btn-sm" >Submit</button> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- --> |
|
|
|
<div class="content" > |
|
|
|
<div class="row" id="req1" style="display: none;"> |
|
|
|
<div class="col-12"> |
|
|
|
<form action="" id="reqForm1" onsubmit="return deactive();"> |
|
|
|
<div class="block block-rounded"> |
|
|
|
<div class="block-header block-header-default"> |
|
|
|
<h3 class="block-title">Request Details</h3> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="block-content"> |
|
|
|
|
|
|
|
<div class="row"> |
|
|
|
<div class="col-md-6 alert-light border-0"> |
|
|
|
<div class="mb-3"> |
|
|
|
<label class="form-check-label" for="email">Email ID</label> |
|
|
|
<input type="text" class="form-control" id="email" required="" name="email"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="col-md-12 alert-light border-0"> |
|
|
|
<div class="mb-3"> |
|
|
|
<label class="form-check-label" for="address">Address</label> |
|
|
|
<textarea id="address" class="form-control" name="address" rows="3" required=""></textarea> |
|
|
|
|
|
|
|
<label class="form-check-label" for="name">Name</label> |
|
|
|
<input type="text" class="form-control" id="name1" name="name1" readonly> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="col-md-12 alert-light border-0"> |
|
|
|
<div class="col-md-6 alert-light border-0"> |
|
|
|
<div class="mb-3"> |
|
|
|
<label class="form-check-label" for="landmark">Nearest Landmark</label> |
|
|
|
<input type="text" class="form-control" id="landmark" required="" name="landmark"> |
|
|
|
<label class="form-check-label" for="mobile">Mobile No</label> |
|
|
|
<input type="text" class="form-control" id="mobile1" minlength="10" maxlength="10" name="mobile1" readonly> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="col-md-6 alert-light border-0"> |
|
|
|
<div class="mb-3"> |
|
|
|
<label class="form-check-label" for="request_type">Select Request Type</label> |
|
|
|
<select class="form-select" name="request_type" id="request_type"> |
|
|
|
<option value="">---Select Request Type---</option> |
|
|
|
<option value="Residential">Residential</option> |
|
|
|
<option value="Commercial">Commercial</option> |
|
|
|
<option value="Regigious">Religious</option> |
|
|
|
<option value="Industrial">Industrial</option> |
|
|
|
<option value="Others">Others</option> |
|
|
|
</select> |
|
|
|
<label class="form-check-label" for="mobile">Email</label> |
|
|
|
<input type="text" class="form-control" id="email" minlength="10" maxlength="10" name="mobile1" readonly> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="col-md-6 alert-light border-0"> |
|
|
|
<div class="mb-3"> |
|
|
|
<label class="form-check-label" for="garbage_category">Select Garbage Type</label> |
|
|
|
<select class="form-select" name="garbage_category" id="garbage_category"> |
|
|
|
<option value="">---Select Garbage Type---</option> |
|
|
|
<option value="Plastic">Plastic</option> |
|
|
|
<option value="Organic">Organic</option> |
|
|
|
<option value="Paper">Paper</option> |
|
|
|
<option value="Glass">Glass</option> |
|
|
|
<option value="Metel">Metel</option> |
|
|
|
<option value="E-Waste">E-Waste</option> |
|
|
|
<option value="All">All</option> |
|
|
|
<option value="Others">Others</option> |
|
|
|
</select> |
|
|
|
<label class="form-check-label" for="mobile">Door No</label>/label> |
|
|
|
<input type="text" class="form-control" id="doorno" minlength="10" maxlength="10" name="mobile1"readonly > |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="col-md-4 alert-light border-0"> |
|
|
|
<div class="col-md-6 alert-light border-0"> |
|
|
|
<div class="mb-3"> |
|
|
|
<label class="form-check-label" for="zone">Select Zone</label> |
|
|
|
<select class="form-select" name="zone" id="zone" required="" onchange="getDiv(this);"> |
|
|
|
<option value="">---Select Zone---</option> |
|
|
|
</select> |
|
|
|
<label class="form-check-label" for="mobile">Area</label> |
|
|
|
<input type="text" class="form-control" id="area" minlength="10" maxlength="10" name="mobile1" readonly> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="col-md-4 alert-light border-0"> |
|
|
|
<div class="col-md-6 alert-light border-0"> |
|
|
|
<div class="mb-3"> |
|
|
|
<label class="form-check-label" for="division">Select Division</label> |
|
|
|
<select class="form-select" name="division" id="division" required="" onchange="getArea(this);"> |
|
|
|
<option value="">---Select Div---</option> |
|
|
|
</select> |
|
|
|
<label class="form-check-label" for="mobile">aadhar No</label> |
|
|
|
<input type="text" class="form-control" id="aadhar" minlength="10" maxlength="10" name="mobile1"readonly > |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="col-md-4 alert-light border-0"> |
|
|
|
<div class="col-md-6 alert-light border-0"> |
|
|
|
<div class="mb-3"> |
|
|
|
<label class="form-check-label" for="area">Select Area</label> |
|
|
|
<select class="form-select" name="area" id="area" onchange="getLocation(this);"> |
|
|
|
<option value="">---Select Area---</option> |
|
|
|
</select> |
|
|
|
<label class="form-check-label" for="mobile">pincode</label> |
|
|
|
<input type="text" class="form-control" id="pincode" minlength="10" maxlength="10" name="mobile1" readonly> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="col-md-6 alert-light border-0"> |
|
|
|
<div class="mb-3"> |
|
|
|
<label class="form-check-label" for="locality">Select Location</label> |
|
|
|
<select class="form-select" name="locality" id="locality" onchange="getStreet(this);"> |
|
|
|
<option value="">---Select Location---</option> |
|
|
|
</select> |
|
|
|
<label class="form-check-label" for="mobile">property No</label> |
|
|
|
<input type="text" class="form-control" id="property" minlength="10" maxlength="10" name="mobile1" readonly> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="col-md-6 alert-light border-0"> |
|
|
|
<div class="mb-3"> |
|
|
|
<label class="form-check-label" for="street">Select Street</label> |
|
|
|
<select class="form-select" name="street" id="street"> |
|
|
|
<option value="">---Select Street---</option> |
|
|
|
</select> |
|
|
|
<label class="form-check-label" for="mobile">Street</label> |
|
|
|
<input type="text" class="form-control" id="Street" minlength="10" maxlength="10" name="mobile1" readonly > |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- |
|
|
|
<div class="col-md-3 alert-light border-0"> |
|
|
|
<div class="mb-3"> |
|
|
|
<label class="form-check-label" for="assetLatitude">Latitude</label> |
|
|
|
<input type="text" class="form-control" id="assetLatitude" name="assetLatitude"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="col-md-3 alert-light border-0"> |
|
|
|
<div class="mb-3"> |
|
|
|
<label class="form-check-label" for="assetLongitude">Longitude</label> |
|
|
|
<input type="text" class="form-control" id="assetLongitude" name="assetLongitude"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
--> |
|
|
|
<div class="col-md-12 alert-light border-0"> |
|
|
|
<div class="col-md-6 alert-light border-0"> |
|
|
|
<div class="mb-3"> |
|
|
|
<label class="form-check-label" for="garbageFile">Select Garbage Photo</label> |
|
|
|
<input type="file" accept="image/*" class="form-control" name="garbagePhoto" id="garbageFile"> |
|
|
|
<label class="form-check-label" for="name">Remark</label> |
|
|
|
<input type="text" class="form-control" id="Remark" name="Remark" required> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div id="viewimg"></div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
<hr class="m-0"> |
|
|
|
<div class="block-content block-content-full text-end"> |
|
|
|
<button type="button" class="btn btn-de-secondary btn-sm" data-bs-dismiss="modal">Close</button> |
|
|
|
<button type="submit" class="btn btn-primary btn-sm">Save</button> |
|
|
|
</div> |
|
|
|
<button type="button" class="btn btn-de-secondary btn-sm" onclick="back()">Back</button> |
|
|
|
<button type="submit" class="btn btn-danger btn-sm" >Deactive</button> |
|
|
|
|
|
|
|
</div> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
<!-- END Dummy content --> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- END Page Content --> |
|
|
|
</div> |
|
|
|
<!-- --> |
|
|
|
</main> |
|
|
|
</div> |
|
|
|
|
|
|
|
@ -342,385 +256,87 @@ |
|
|
|
<!-- END Footer --> |
|
|
|
</div> |
|
|
|
<!-- END Page Container --> |
|
|
|
<div class="modal fade backdrop" id="getMobileNo" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="staticBackdropLabel" aria-hidden="true"> |
|
|
|
<div class="modal-dialog" role="document"> |
|
|
|
<div class="modal-content"> |
|
|
|
<form action="javascript:newUserCall();" > |
|
|
|
<div class="block block-rounded block-themed block-transparent mb-0"> |
|
|
|
|
|
|
|
<div class="block-content"> |
|
|
|
<div class="mb-4"> |
|
|
|
<label class="form-label">Registed Mobile Number <span class="text-danger">*</span></label> |
|
|
|
<input type="number" minlength="10" maxlength="10" class="form-control text-center" id="mobii" placeholder="Numbers Only" required /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="block-content block-content-full text-end bg-body" id="mbutton"> |
|
|
|
<button type="button" class="btn btn-sm btn-alt-secondary" data-bs-dismiss="modal">Close</button> |
|
|
|
<button type="submit" class="btn btn-sm btn-primary">Submit</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!--end modal--> |
|
|
|
|
|
|
|
<!-- PopUp Modal OTP Form --> |
|
|
|
<div class="modal fade" id="otpForm" tabindex="-1" role="dialog" aria-labelledby="otpFormLabel" aria-hidden="true"> |
|
|
|
<div class="modal-dialog" role="document"> |
|
|
|
<div class="modal-content"> |
|
|
|
<form action="#" th:action="@{/otpForm}" th:object="${otpForm}" method="post" onsubmit="return verifyOtp();"> |
|
|
|
<div class="modal-header"> |
|
|
|
<h6 class="modal-title m-0" id="exampleModalDefaultLabel">OTP Login</h6> |
|
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> |
|
|
|
</div><!--end modal-header--> |
|
|
|
<div class="modal-body"> |
|
|
|
<div class="row"> |
|
|
|
<div class="mb-3 text-center"> |
|
|
|
<img src="assets/media/images/mobileotp.png" width="50%" alt="Mobileotp"> |
|
|
|
</div> |
|
|
|
<div class="mb-0 text-center"> |
|
|
|
<h4>OTP Verification</h4> |
|
|
|
<p class="text-mute">Enter the OTP sent to <b class="text-info" id="mobilenotxt"></b></p> |
|
|
|
<p class="text-danger" id="otperror"></p> |
|
|
|
</div> |
|
|
|
<div class="mb-3 text-center"> |
|
|
|
<div class="otp-input-box"> |
|
|
|
<input type="text" maxlength="1" class="otp-input" id="otp1" required/> |
|
|
|
<input type="text" maxlength="1" class="otp-input" id="otp2" required/> |
|
|
|
<input type="text" maxlength="1" class="otp-input" id="otp3" required/> |
|
|
|
<input type="text" maxlength="1" class="otp-input" id="otp4" required/> |
|
|
|
<input type="text" maxlength="1" class="otp-input" id="otp5" required/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="mb-3 text-center"> |
|
|
|
<div id="resend-container"> |
|
|
|
<p class="mb-0">Didn't receive OTP?</p> |
|
|
|
<p class="mb-0 text-info" id="resendlink">Please wait..<span id="countdown">60</span>s</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div><!--end row--> |
|
|
|
</div><!--end modal-body--> |
|
|
|
<div class="modal-footer"> |
|
|
|
<button type="button" class="btn btn-de-secondary btn-sm" data-bs-dismiss="modal">Close</button> |
|
|
|
<button type="submit" class="btn btn-primary btn-sm">Verify OTP</button> |
|
|
|
</div><!--end modal-footer--> |
|
|
|
</form> |
|
|
|
</div><!--end modal-content--> |
|
|
|
</div><!--end modal-dialog--> |
|
|
|
</div><!--end modal--> |
|
|
|
|
|
|
|
<!-- |
|
|
|
Dashmix JS |
|
|
|
|
|
|
|
Core libraries and functionality |
|
|
|
webpack is putting everything together at assets/_js/main/app.js |
|
|
|
--> |
|
|
|
|
|
|
|
<script th:replace="fragments/script :: script"></script> |
|
|
|
<script> |
|
|
|
// ERP DATA CALL via API |
|
|
|
|
|
|
|
//Getting Zone No |
|
|
|
var x= localStorage.getItem("Garbage_App_user"); |
|
|
|
|
|
|
|
if(x!=null){ |
|
|
|
var hide = document.getElementById("login"); |
|
|
|
hide.style.display = "none"; |
|
|
|
document.getElementById("userNo").innerHTML=x; |
|
|
|
}else{ |
|
|
|
var hide = document.getElementById("logout"); |
|
|
|
hide.style.display = "none"; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function getrequest(){ |
|
|
|
if(x!=null){ |
|
|
|
window.location.href="complaintList?mobile="+x; |
|
|
|
} |
|
|
|
else{ |
|
|
|
$('#getMobileNo').modal({ |
|
|
|
backdrop: 'static', |
|
|
|
keyboard: false |
|
|
|
}); |
|
|
|
$('#getMobileNo').modal('show'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
function newUserCall(){ |
|
|
|
var mob=$("#mobii").val(); |
|
|
|
localStorage.setItem("Garbage_App_user",mob); |
|
|
|
window.location.href="complaintList?mobile="+mob; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
function showAndHide(){ |
|
|
|
getrequest(); |
|
|
|
|
|
|
|
var hide =document.getElementById("logout"); |
|
|
|
hide.style.display = "block"; |
|
|
|
|
|
|
|
var hi =document.getElementById("login"); |
|
|
|
hi.style.display = "none"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
function logout(){ |
|
|
|
localStorage.removeItem("Garbage_App_user"); |
|
|
|
var hide =document.getElementById("logout"); |
|
|
|
hide.style.display = "none"; |
|
|
|
location.reload(); |
|
|
|
} |
|
|
|
//alert(x); |
|
|
|
|
|
|
|
|
|
|
|
function getZoneNo() { |
|
|
|
|
|
|
|
$.ajax({ |
|
|
|
type: "GET", |
|
|
|
url: '/api/getZoneNo', |
|
|
|
dataType: 'json', |
|
|
|
success: function(bodyMessage) { |
|
|
|
var tempJson = bodyMessage['ZoneDetailsResult']; |
|
|
|
//alert("tempJson---:"+tempJson); |
|
|
|
for (var i = 0; i < tempJson.length; i++) { |
|
|
|
var tempJsonValue = tempJson[i]['ZoneId']; |
|
|
|
//var tempJsonValue = tempJson[i]['ZoneName'].replace('N', ''); |
|
|
|
var tempJsonLabel = tempJson[i]['ZoneName'].replace('N', ''); |
|
|
|
$('#zone').append("<option value='" + tempJsonValue + "'>" + tempJsonLabel + "</option>"); |
|
|
|
} |
|
|
|
}, error: function(e, ts, et) |
|
|
|
{ |
|
|
|
// alert(ts) |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
//Getting Div |
|
|
|
function getDiv($this) { |
|
|
|
|
|
|
|
$('#division option:not(:first)').remove(); |
|
|
|
var zoneId = $this.value; |
|
|
|
alert("zoneId---:"+zoneId); |
|
|
|
$.ajax({ |
|
|
|
type: "GET", |
|
|
|
url: '/api/getDiv', |
|
|
|
data: {'zoneId':zoneId}, |
|
|
|
dataType: 'json', |
|
|
|
success: function(bodyMessage) { |
|
|
|
var tempJson = bodyMessage['DivisionDetailsResult']; |
|
|
|
for (var i = 0; i < tempJson.length; i++) { |
|
|
|
var tempJsonValue = tempJson[i]['DivisionName'].replace('N', ''); |
|
|
|
//var tempJsonValue = tempJson[i]['DivisionId']; |
|
|
|
var tempJsonLabel = tempJson[i]['DivisionName'].replace('N', ''); |
|
|
|
$('#division').append("<option value='" + tempJsonValue + "'>" + tempJsonLabel + "</option>"); |
|
|
|
} |
|
|
|
}, error: function(e, ts, et) |
|
|
|
{ |
|
|
|
// alert(ts) |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
//Getting Area |
|
|
|
function getArea($this) { |
|
|
|
|
|
|
|
$('#area option:not(:first)').remove(); |
|
|
|
var divId = $this.value; |
|
|
|
alert("DIVIDION---"+divId); |
|
|
|
|
|
|
|
$.ajax({ |
|
|
|
type: "GET", |
|
|
|
url: '/api/getArea', |
|
|
|
data: {'divId':divId}, |
|
|
|
dataType: 'json', |
|
|
|
success: function(bodyMessage) { |
|
|
|
var tempJson = bodyMessage['AreaDetailsResult']; |
|
|
|
for (var i = 0; i < tempJson.length; i++) { |
|
|
|
var tempJsonValue = tempJson[i]['AreaId']; |
|
|
|
var tempJsonLabel = tempJson[i]['AreaName']; |
|
|
|
$('#area').append("<option value='" + tempJsonValue + "'>" + tempJsonLabel + "</option>"); |
|
|
|
} |
|
|
|
}, error: function(e, ts, et) |
|
|
|
{ |
|
|
|
// alert(ts) |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
//Getting Location |
|
|
|
function getLocation($this) { |
|
|
|
|
|
|
|
$('#locality option:not(:first)').remove(); |
|
|
|
var areaId = $this.value; |
|
|
|
|
|
|
|
$.ajax({ |
|
|
|
type: "GET", |
|
|
|
url: '/api/getLocation', |
|
|
|
data: {'areaId':areaId}, |
|
|
|
dataType: 'json', |
|
|
|
success: function(bodyMessage) { |
|
|
|
var tempJson = bodyMessage['LocationDetailsResult']; |
|
|
|
for (var i = 0; i < tempJson.length; i++) { |
|
|
|
var tempJsonValue = tempJson[i]['LocationId']; |
|
|
|
var tempJsonLabel = tempJson[i]['LocationName']; |
|
|
|
$('#locality').append("<option value='" + tempJsonValue + "'>" + tempJsonLabel + "</option>"); |
|
|
|
} |
|
|
|
}, error: function(e, ts, et) |
|
|
|
{ |
|
|
|
// alert(ts) |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
//Getting Street |
|
|
|
function getStreet($this) { |
|
|
|
|
|
|
|
$('#street option:not(:first)').remove(); |
|
|
|
var locationId = $this.value; |
|
|
|
|
|
|
|
$.ajax({ |
|
|
|
type: "GET", |
|
|
|
url: '/api/getStreet', |
|
|
|
data: {'locationId':locationId}, |
|
|
|
dataType: 'json', |
|
|
|
success: function(bodyMessage) { |
|
|
|
var tempJson = bodyMessage['StreetDetailsResult']; |
|
|
|
for (var i = 0; i < tempJson.length; i++) { |
|
|
|
var tempJsonValue = tempJson[i]['StreetId']; |
|
|
|
var tempJsonLabel = tempJson[i]['StreetName']; |
|
|
|
$('#street').append("<option value='" + tempJsonValue + "'>" + tempJsonLabel + "</option>"); |
|
|
|
} |
|
|
|
}, error: function(e, ts, et) |
|
|
|
{ |
|
|
|
// alert(ts) |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function login(){ |
|
|
|
if (confirm("We sending you OTP.\nPress yes If Mobile No Is Correct ! ")) { |
|
|
|
var mob = $('#mobile').val(); |
|
|
|
// alert(mob+"---"); |
|
|
|
sendOTP(); |
|
|
|
$('#otpForm').modal({ |
|
|
|
backdrop: 'static', |
|
|
|
keyboard: false |
|
|
|
}); |
|
|
|
$('#otpForm').modal('show'); |
|
|
|
return false; |
|
|
|
} else { |
|
|
|
alert("Please help us.\nTo make City clean and green"); |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
function sendOTP(){ |
|
|
|
var x = document.getElementById("mobile").value |
|
|
|
|
|
|
|
var mobileNo = $("#mobile").val(); |
|
|
|
$("#mobile").val(mobileNo); // Set final mobile number after request otp |
|
|
|
$("#mobilenotxt").html(mobileNo); |
|
|
|
$('#newForm').modal('hide'); |
|
|
|
|
|
|
|
$.ajax({ |
|
|
|
type: "GET", |
|
|
|
url: '/api/sendOTP', |
|
|
|
data: {'mobileNo':mobileNo,'purpose':'New User'}, |
|
|
|
dataType: 'json', |
|
|
|
success: function(bodyMessage) { |
|
|
|
if(bodyMessage!="Error"){ |
|
|
|
$('#otpForm').modal({ |
|
|
|
backdrop: 'static', |
|
|
|
keyboard: false |
|
|
|
}); |
|
|
|
$('#otpForm').modal('show'); |
|
|
|
// Resend OTP Link function ///////////////////// |
|
|
|
var resendTimeout; |
|
|
|
var resendLink = $("#resend-link"); |
|
|
|
$("#resend-link").html('Please wait..<span id="countdown">60</span>s'); |
|
|
|
var countdown = $("#countdown"); |
|
|
|
// Function to start the countdown timer |
|
|
|
function startCountdown() { |
|
|
|
var timeleft = 60; |
|
|
|
countdown.text(timeleft); |
|
|
|
|
|
|
|
resendTimeout = setInterval(function () { |
|
|
|
timeleft--; |
|
|
|
countdown.text(timeleft); |
|
|
|
|
|
|
|
if (timeleft <= 0) { |
|
|
|
clearInterval(resendTimeout); |
|
|
|
$("#resendlink").html('<a href="#" id="resend-link" class="text-info" onclick="return sendOTP();">Resend OTP</a>'); |
|
|
|
} |
|
|
|
}, 1000); |
|
|
|
} |
|
|
|
startCountdown(); // Start Resend OTP count |
|
|
|
///////////////////////////////////////////////// |
|
|
|
}else{ |
|
|
|
alert("OTP Not Send!!!"); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
//Verify OTP |
|
|
|
function verifyOtp(){ |
|
|
|
|
|
|
|
|
|
|
|
// Get all the input fields with class `otp-input` |
|
|
|
var otpInputs = $('.otp-input'); |
|
|
|
|
|
|
|
// Get the OTP value as a string |
|
|
|
var otpValue = ''; |
|
|
|
otpInputs.each(function() { |
|
|
|
otpValue += $(this).val(); |
|
|
|
}); |
|
|
|
<script th:replace="fragments/script :: script"></script> |
|
|
|
<script> |
|
|
|
|
|
|
|
//document.getElementById("saveFeedbackForm").submit(); |
|
|
|
|
|
|
|
$.ajax({ |
|
|
|
type: "GET", |
|
|
|
url: '/api/verifyOTP', |
|
|
|
data: {'otp':otpValue}, |
|
|
|
dataType: 'text', |
|
|
|
success: function(bodyMessage) { |
|
|
|
if(bodyMessage.trim() == "Success"){ |
|
|
|
console.log("OTP is Verified!!!"); |
|
|
|
localStorage.setItem("Garbage_App_user", $("#mobile").val()); |
|
|
|
|
|
|
|
document.getElementById("garbageform").submit(); |
|
|
|
} else { |
|
|
|
$("#otperror").html("OTP is Incorrect!!!"); |
|
|
|
// do something here |
|
|
|
} |
|
|
|
}, |
|
|
|
error: function() { |
|
|
|
console.log("Error");// Handle error here |
|
|
|
} |
|
|
|
function reset(){ |
|
|
|
document.getElementById("reqForm").reset(); |
|
|
|
document.getElementById("reqForm1").reset(); |
|
|
|
|
|
|
|
} |
|
|
|
function back(){ |
|
|
|
document.getElementById("req1").style.display="none"; |
|
|
|
document.getElementById("req").style.display="block"; |
|
|
|
} |
|
|
|
function newUserCall(){ |
|
|
|
var mobile= document.getElementById('mobile').value; |
|
|
|
$.ajax({ |
|
|
|
type: "GET", |
|
|
|
url: "/feedback/api/user", |
|
|
|
data:{'mobile':mobile}, |
|
|
|
success: function(response) { |
|
|
|
UserDetails(response) ; |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(function(){ |
|
|
|
|
|
|
|
getZoneNo(); |
|
|
|
//callmodal(0); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
function UserDetails(res) { |
|
|
|
console.log(res); |
|
|
|
if(res.Message=="Success"){ |
|
|
|
document.getElementById("name1").value=res.Profile[0].NAME; |
|
|
|
document.getElementById("mobile1").value=res.Profile[0].MOBILE; |
|
|
|
document.getElementById("email").value=res.Profile[0].EMAIL; |
|
|
|
document.getElementById("doorno").value=res.Profile[0].DOORNO; |
|
|
|
document.getElementById("area").value=res.Profile[0].AREA; |
|
|
|
document.getElementById("aadhar").value=res.Profile[0].AADHAA_NO; |
|
|
|
document.getElementById("pincode").value=res.Profile[0].PINCODE; |
|
|
|
document.getElementById("property").value=res.Profile[0].PROPERTYTAXNO; |
|
|
|
document.getElementById("Street").value=res.Profile[0].STREET; |
|
|
|
document.getElementById("req").style.display="none"; |
|
|
|
document.getElementById("req1").style.display="block"; |
|
|
|
}else if(res.ResultStatus=="false"){ |
|
|
|
alert("No Data Found"); |
|
|
|
} |
|
|
|
else{ |
|
|
|
alert("your Account is already Deactived "); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
function deactive(){ |
|
|
|
var mobile= document.getElementById('mobile1').value; |
|
|
|
if(confirm("Are you sure to Deactive the Account ?")){ |
|
|
|
$.ajax({ |
|
|
|
type: "GET", |
|
|
|
url: "/feedback/api/deactive", |
|
|
|
data:{'mobile':mobile}, |
|
|
|
success: function(response) { |
|
|
|
console.log(response) |
|
|
|
alert("Successfully deactived") ; |
|
|
|
window.location.reload(); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
else{ |
|
|
|
alert("We are here to help you.") |
|
|
|
} |
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
</body> |
|
|
|
</html> |