Browse Source

last commit

master
kirubaasagar.R 2 years ago
parent
commit
6e64ff2663
  1. 20
      src/main/resources/templates/User/registercomplaints.html
  2. 4
      src/main/resources/templates/checklistofficer/checklistofficer.html

20
src/main/resources/templates/User/registercomplaints.html

@ -1392,7 +1392,7 @@
var streetId = $('#summaryStreetId').text().trim();
var landmark = $('#summaryLandmark').text().trim();
var latitude = $('#summaryLatitude').text().trim();
var longtitude = $('#summaryLongitude').text().trim(); // Note the misspelling: it should match the controller parameter
var longtitude = $('#summaryLongitude').text().trim(); // Note the misspelling
var gender = $('#summaryGender').text().trim();
var imageSrc = $('#summaryImage').attr('src');
@ -1427,15 +1427,23 @@
StreetId: streetId,
Comp_Image: imageSrc,
latitude: latitude,
longtitude: longtitude, // Ensure this matches the controller parameter name
longtitude: longtitude,
Landmark: landmark,
gender: gender
},
success: function (response) {
// Handle success response
console.log('Success:', response);
alert('Complaint registered successfully!');
// You can also redirect or reset the form here
// SweetAlert upon success
Swal.fire({
title: 'Success!',
text: 'Your complaint has been submitted.',
icon: 'success',
confirmButtonText: 'OK'
}).then((result) => {
if (result.isConfirmed) {
// Redirect to home.html after clicking 'OK'
window.location.href = 'home';
}
});
},
error: function (xhr, status, error) {
// Improved error handling

4
src/main/resources/templates/checklistofficer/checklistofficer.html

@ -8,7 +8,9 @@
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap" rel="stylesheet">
<!-- Bootstrap CSS -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css" integrity="sha512-Kc323vGBEqzTmouAECnVceyQqyqdsSiqLQISBL29aUW4U/M7pSPA/gEUZQqv1cwx4OnYxTxve5UMg5GT6L4JJg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css"
integrity="sha512-Kc323vGBEqzTmouAECnVceyQqyqdsSiqLQISBL29aUW4U/M7pSPA/gEUZQqv1cwx4OnYxTxve5UMg5GT6L4JJg=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>

Loading…
Cancel
Save