diff --git a/src/main/java/com/gcc/publicgrievance/controller/ComplaintController.java b/src/main/java/com/gcc/publicgrievance/controller/ComplaintController.java index 562fd42..0ecd90c 100644 --- a/src/main/java/com/gcc/publicgrievance/controller/ComplaintController.java +++ b/src/main/java/com/gcc/publicgrievance/controller/ComplaintController.java @@ -1,29 +1,35 @@ package com.gcc.publicgrievance.controller; -import java.io.IOException; import java.util.Base64; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; + import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; + import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.client.RestTemplate; -import org.springframework.web.multipart.MultipartFile; -import org.springframework.web.util.UriComponentsBuilder; -import java.io.File; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.net.HttpURLConnection; +import java.net.URL; +import java.net.URLEncoder; + + import com.gcc.publicgrievance.Service.ComplaintService; + @CrossOrigin @RestController public class ComplaintController { @@ -53,91 +59,253 @@ public class ComplaintController { } // save api + /*@PostMapping("/register") + public ResponseEntity registerComplaint( + + @RequestParam("ComplainantName") String complainantName, + + @RequestParam("ComplainantAddr") String complainantAddr, + + @RequestParam("MobileNo") String mobileNo, + + @RequestParam("Email") String email, + + @RequestParam("ComplaintType") String complaintType, + + @RequestParam("ComplaintTitle") String complaintTitle, + + @RequestParam("ComplaintDetails") String complaintDetails, + + @RequestParam("StreetId") String streetId, + + @RequestParam("Comp_Image") String compImage, + + @RequestParam("latitude") String latitude, + + @RequestParam("longtitude") String longtitude, + + @RequestParam("Landmark") String landmark, + + @RequestParam("gender") String gender) { + + String externalUrl = "https://erp.chennaicorporation.gov.in/pgr/external/mobileservice"; // // // + // Build the URI with parameters + UriComponentsBuilder uriBuilder = UriComponentsBuilder.fromHttpUrl(externalUrl) + .queryParam("serviceId", "RegComplaint").queryParam("ComplainantName", complainantName) + .queryParam("ComplainantAddr", complainantAddr).queryParam("MobileNo", mobileNo) + .queryParam("Email", email).queryParam("ComplaintType", complaintType) + .queryParam("ComplaintTitle", complaintTitle).queryParam("ComplaintDetails", complaintDetails) + .queryParam("StreetId", streetId).queryParam("Comp_Image", compImage).queryParam("latitude", latitude) + .queryParam("longtitude", longtitude).queryParam("Landmark", landmark).queryParam("gender", gender); // // + // the + // external API + ResponseEntity response = restTemplate.postForEntity(uriBuilder.toUriString(), null, String.class); // + // // Return the response from the external API + return ResponseEntity.status(response.getStatusCode()).body(response.getBody()); + }*/ + /* - * @PostMapping("/register") public ResponseEntity registerComplaint( - * - * @RequestParam("ComplainantName") String complainantName, + * @PostMapping("/register") public ResponseEntity + * registerComplaint(@RequestParam("ComplainantName") String complainantName, * - * @RequestParam("ComplainantAddr") String complainantAddr, + * @RequestParam("ComplainantAddr") String + * complainantAddr, @RequestParam("MobileNo") String mobileNo, * - * @RequestParam("MobileNo") String mobileNo, + * @RequestParam("Email") String email, @RequestParam("ComplaintType") String + * complaintType, * - * @RequestParam("Email") String email, + * @RequestParam("ComplaintTitle") String complaintTitle, * - * @RequestParam("ComplaintType") String complaintType, + * @RequestParam("ComplaintDetails") String + * complaintDetails, @RequestParam("StreetId") String streetId, * - * @RequestParam("ComplaintTitle") String complaintTitle, + * @RequestParam("Comp_Image") MultipartFile + * compImage, @RequestParam("latitude") String latitude, * - * @RequestParam("ComplaintDetails") String complaintDetails, + * @RequestParam("longtitude") String longtitude, @RequestParam("Landmark") + * String landmark, * - * @RequestParam("StreetId") String streetId, + * @RequestParam("gender") String gender) { * - * @RequestParam("Comp_Image") String compImage, + * String externalUrl = + * "https://erp.chennaicorporation.gov.in/pgr/external/mobileservice"; * - * @RequestParam("latitude") String latitude, + * // Convert the image to a Base64 string String base64Image = ""; if + * (!compImage.isEmpty()) { try { byte[] imageBytes = compImage.getBytes(); + * base64Image = Base64.getEncoder().encodeToString(imageBytes); } catch + * (IOException e) { return + * ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR). + * body("Error encoding image."); } } * - * @RequestParam("longtitude") String longtitude, + * // Build the URI with parameters UriComponentsBuilder uriBuilder = + * UriComponentsBuilder.fromHttpUrl(externalUrl) .queryParam("serviceId", + * "RegComplaint").queryParam("ComplainantName", complainantName) + * .queryParam("ComplainantAddr", complainantAddr).queryParam("MobileNo", + * mobileNo) .queryParam("Email", email).queryParam("ComplaintType", + * complaintType) .queryParam("ComplaintTitle", + * complaintTitle).queryParam("ComplaintDetails", complaintDetails) + * .queryParam("StreetId", streetId).queryParam("Comp_Image", base64Image) // + * Use base64 image here .queryParam("latitude", + * latitude).queryParam("longtitude", longtitude).queryParam("Landmark", + * landmark) .queryParam("gender", gender); * - * @RequestParam("Landmark") String landmark, + * // Make a POST request to the external API ResponseEntity response = + * restTemplate.postForEntity(uriBuilder.toUriString(), null, String.class); * - * @RequestParam("gender") String gender) { + * // Return the response from the external API return + * ResponseEntity.status(response.getStatusCode()).body(response.getBody()); * - * String externalUrl = - * "https://erp.chennaicorporation.gov.in/pgr/external/mobileservice"; // // // - * Build the URI with parameters UriComponentsBuilder uriBuilder = - * UriComponentsBuilder.fromHttpUrl(externalUrl) .queryParam("serviceId", - * "RegComplaint") .queryParam("ComplainantName", complainantName) - * .queryParam("ComplainantAddr", complainantAddr) .queryParam("MobileNo", - * mobileNo) .queryParam("Email", email) .queryParam("ComplaintType", - * complaintType) .queryParam("ComplaintTitle", complaintTitle) - * .queryParam("ComplaintDetails", complaintDetails) .queryParam("StreetId", - * streetId) .queryParam("Comp_Image", compImage) .queryParam("latitude", - * latitude) .queryParam("longtitude", longtitude) .queryParam("Landmark", - * landmark) .queryParam("gender", gender); // // // Make a POST request to the - * external API ResponseEntity response = - * restTemplate.postForEntity(uriBuilder.toUriString(), null, String.class); // - * // // Return the response from the external API return - * ResponseEntity.status(response.getStatusCode()).body(response.getBody()); } + * } */ + /*@PostMapping("/register") + public ResponseEntity registerComplaint( + @RequestParam("ComplainantName") String complainantName, + @RequestParam("ComplainantAddr") String complainantAddr, + @RequestParam("MobileNo") String mobileNo, + @RequestParam("Email") String email, + @RequestParam("ComplaintType") String complaintType, + @RequestParam("ComplaintTitle") String complaintTitle, + @RequestParam("ComplaintDetails") String complaintDetails, + @RequestParam("StreetId") String streetId, + @RequestParam("Comp_Image") String compImage, + @RequestParam("latitude") String latitude, + @RequestParam("longtitude") String longtitude, + @RequestParam("Landmark") String landmark, + @RequestParam("gender") String gender) { + + String externalUrl = "https://erp.chennaicorporation.gov.in/pgr/external/mobileservice"; + + try { + // Create the URL object + URL url = new URL(externalUrl); + + // Create the HttpURLConnection object + HttpURLConnection conn = (HttpURLConnection) url.openConnection(); + conn.setRequestMethod("POST"); + conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); + conn.setDoOutput(true); + + // Create the parameters string + String params = "serviceId=RegComplaint" + + "&ComplainantName=" + URLEncoder.encode(complainantName, "UTF-8") + + "&ComplainantAddr=" + URLEncoder.encode(complainantAddr, "UTF-8") + + "&MobileNo=" + URLEncoder.encode(mobileNo, "UTF-8") + + "&Email=" + URLEncoder.encode(email, "UTF-8") + + "&ComplaintType=" + URLEncoder.encode(complaintType, "UTF-8") + + "&ComplaintTitle=" + URLEncoder.encode(complaintTitle, "UTF-8") + + "&ComplaintDetails=" + URLEncoder.encode(complaintDetails, "UTF-8") + + "&StreetId=" + URLEncoder.encode(streetId, "UTF-8") + + "&Comp_Image=" + URLEncoder.encode(compImage, "UTF-8") + + "&latitude=" + URLEncoder.encode(latitude, "UTF-8") + + "&longtitude=" + URLEncoder.encode(longtitude, "UTF-8") + + "&Landmark=" + URLEncoder.encode(landmark, "UTF-8") + + "&gender=" + URLEncoder.encode(gender, "UTF-8"); + + // Write parameters to request body + try (OutputStream os = conn.getOutputStream()) { + byte[] input = params.getBytes("UTF-8"); + os.write(input, 0, input.length); + } + + // Read the response + int responseCode = conn.getResponseCode(); + BufferedReader reader; + if (responseCode == HttpURLConnection.HTTP_OK) { + reader = new BufferedReader(new InputStreamReader(conn.getInputStream())); + } else { + reader = new BufferedReader(new InputStreamReader(conn.getErrorStream())); + } + StringBuilder response = new StringBuilder(); + String line; + while ((line = reader.readLine()) != null) { + response.append(line); + } + reader.close(); + + // Return the response from the external API + return ResponseEntity.status(responseCode).body(response.toString()); + + } catch (IOException e) { + e.printStackTrace(); + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("An error occurred while processing the request."); + } + } + +*/ @PostMapping("/register") - public ResponseEntity registerComplaint(@RequestParam("ComplainantName") String complainantName, - @RequestParam("ComplainantAddr") String complainantAddr, @RequestParam("MobileNo") String mobileNo, - @RequestParam("Email") String email, @RequestParam("ComplaintType") String complaintType, - @RequestParam("ComplaintTitle") String complaintTitle, - @RequestParam("ComplaintDetails") String complaintDetails, @RequestParam("StreetId") String streetId, - @RequestParam("Comp_Image") MultipartFile compImage, @RequestParam("latitude") String latitude, - @RequestParam("longtitude") String longtitude, @RequestParam("Landmark") String landmark, - @RequestParam("gender") String gender) { + public ResponseEntity registerComplaint( + @RequestParam(value = "ComplainantName", required = false) String complainantName, + @RequestParam(value = "ComplainantAddr", required = false) String complainantAddr, + @RequestParam(value = "MobileNo", required = false) String mobileNo, + @RequestParam(value = "Email", required = false) String email, + @RequestParam(value = "ComplaintType", required = false) String complaintType, + @RequestParam(value = "ComplaintTitle", required = false) String complaintTitle, + @RequestParam(value = "ComplaintDetails", required = false) String complaintDetails, + @RequestParam(value = "StreetId", required = false) String streetId, + @RequestParam(value = "Comp_Image", required = false) String compImage, + @RequestParam(value = "latitude", required = false) String latitude, + @RequestParam(value = "longtitude", required = false) String longtitude, + @RequestParam(value = "Landmark", required = false) String landmark, + @RequestParam(value = "gender", required = false) String gender) { - String externalUrl = "https://erp.chennaicorporation.gov.in/pgr/external/mobileservice"; + String externalUrl = "https://erp.chennaicorporation.gov.in/pgr/external/mobileservice"; - // Convert the image to a Base64 string - String base64Image = ""; - if (!compImage.isEmpty()) { - try { - byte[] imageBytes = compImage.getBytes(); - base64Image = Base64.getEncoder().encodeToString(imageBytes); - } catch (IOException e) { - return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("Error encoding image."); - } - } + try { + // Create the URL object + URL url = new URL(externalUrl); - // Build the URI with parameters - UriComponentsBuilder uriBuilder = UriComponentsBuilder.fromHttpUrl(externalUrl) - .queryParam("serviceId", "RegComplaint").queryParam("ComplainantName", complainantName) - .queryParam("ComplainantAddr", complainantAddr).queryParam("MobileNo", mobileNo) - .queryParam("Email", email).queryParam("ComplaintType", complaintType) - .queryParam("ComplaintTitle", complaintTitle).queryParam("ComplaintDetails", complaintDetails) - .queryParam("StreetId", streetId).queryParam("Comp_Image", base64Image) // Use base64 image here - .queryParam("latitude", latitude).queryParam("longtitude", longtitude).queryParam("Landmark", landmark) - .queryParam("gender", gender); + // Create the HttpURLConnection object + HttpURLConnection conn = (HttpURLConnection) url.openConnection(); + conn.setRequestMethod("POST"); + conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); + conn.setDoOutput(true); - // Make a POST request to the external API - ResponseEntity response = restTemplate.postForEntity(uriBuilder.toUriString(), null, String.class); + // Create the parameters string, handling null values + String params = "serviceId=RegComplaint" + + "&ComplainantName=" + URLEncoder.encode(complainantName != null ? complainantName : "", "UTF-8") + + "&ComplainantAddr=" + URLEncoder.encode(complainantAddr != null ? complainantAddr : "", "UTF-8") + + "&MobileNo=" + URLEncoder.encode(mobileNo != null ? mobileNo : "", "UTF-8") + + "&Email=" + URLEncoder.encode(email != null ? email : "", "UTF-8") + + "&ComplaintType=" + URLEncoder.encode(complaintType != null ? complaintType : "", "UTF-8") + + "&ComplaintTitle=" + URLEncoder.encode(complaintTitle != null ? complaintTitle : "", "UTF-8") + + "&ComplaintDetails=" + URLEncoder.encode(complaintDetails != null ? complaintDetails : "", "UTF-8") + + "&StreetId=" + URLEncoder.encode(streetId != null ? streetId : "", "UTF-8") + + "&Comp_Image=" + URLEncoder.encode(compImage != null ? compImage : "", "UTF-8") + + "&latitude=" + URLEncoder.encode(latitude != null ? latitude : "", "UTF-8") + + "&longtitude=" + URLEncoder.encode(longtitude != null ? longtitude : "", "UTF-8") + + "&Landmark=" + URLEncoder.encode(landmark != null ? landmark : "", "UTF-8") + + "&gender=" + URLEncoder.encode(gender != null ? gender : "", "UTF-8"); - // Return the response from the external API - return ResponseEntity.status(response.getStatusCode()).body(response.getBody()); + // Write parameters to request body + try (OutputStream os = conn.getOutputStream()) { + byte[] input = params.getBytes("UTF-8"); + os.write(input, 0, input.length); + } + + // Read the response + int responseCode = conn.getResponseCode(); + BufferedReader reader; + if (responseCode == HttpURLConnection.HTTP_OK) { + reader = new BufferedReader(new InputStreamReader(conn.getInputStream())); + } else { + reader = new BufferedReader(new InputStreamReader(conn.getErrorStream())); + } + + StringBuilder response = new StringBuilder(); + String line; + while ((line = reader.readLine()) != null) { + response.append(line); + } + reader.close(); + + // Return the response from the external API + return ResponseEntity.status(responseCode).body(response.toString()); + + } catch (IOException e) { + e.printStackTrace(); + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("An error occurred while processing the request."); + } } } diff --git a/src/main/java/com/gcc/publicgrievance/controller/UserController.java b/src/main/java/com/gcc/publicgrievance/controller/UserController.java index 28a94de..411ed10 100644 --- a/src/main/java/com/gcc/publicgrievance/controller/UserController.java +++ b/src/main/java/com/gcc/publicgrievance/controller/UserController.java @@ -48,4 +48,9 @@ public class UserController { public String appoinment(Model model) { return "staff/appoinment"; } + //tradelicence + @GetMapping("/tradelicence") + public String tradelicence(Model model) { + return "Tradelicence/tradelicence"; + } } diff --git a/src/main/resources/static/images/Thin broken ring.gif b/src/main/resources/static/images/Thin broken ring.gif new file mode 100644 index 0000000..463d627 Binary files /dev/null and b/src/main/resources/static/images/Thin broken ring.gif differ diff --git a/src/main/resources/static/images/ack.pdf b/src/main/resources/static/images/ack.pdf new file mode 100644 index 0000000..9376387 --- /dev/null +++ b/src/main/resources/static/images/ack.pdf @@ -0,0 +1,494 @@ +%PDF-1.3 +%ºß¬à +3 0 obj +<> +endobj +4 0 obj +<< +/Length 4438 +>> +stream +0.5670000000000001 w +0 G +BT +/F9 10 Tf +11.5 TL +0 g +56.6929133858267775 813.5435433070865656 Td +(Information) Tj +ET +0.09 0.63 0.52 rg +0.78 G +0. w +40. 785.1970866141731449 265.9382208588956473 -21.4999999999999964 re +f +BT +/F10 10 Tf +11.5 TL +1. g +45. 771.6970866141732586 Td +(Company) Tj +ET +0.09 0.63 0.52 rg +0.78 G +0. w +305.9382208588956473 785.1970866141731449 156.283159509202477 -21.4999999999999964 re +f +BT +/F10 10 Tf +11.5 TL +1. g +310.9382208588956473 771.6970866141732586 Td +(Contact) Tj +ET +0.09 0.63 0.52 rg +0.78 G +0. w +462.2213803680980959 785.1970866141731449 93.0586196319018342 -21.4999999999999964 re +f +BT +/F10 10 Tf +11.5 TL +1. g +467.2213803680980959 771.6970866141732586 Td +(Country) Tj +ET +1. g +0.78 G +0.2834645669291339 w +40. 763.6970866141731449 265.9382208588956473 -21.4999999999999964 re +B +BT +/F9 10 Tf +11.5 TL +0.314 g +45. 750.1970866141732586 Td +(Alfreds Futterkiste) Tj +ET +1. g +0.78 G +0.2834645669291339 w +305.9382208588956473 763.6970866141731449 156.283159509202477 -21.4999999999999964 re +B +BT +/F9 10 Tf +11.5 TL +0.314 g +310.9382208588956473 750.1970866141732586 Td +( ’ ª Í ª Á • È) Tj +ET +1. g +0.78 G +0.2834645669291339 w +462.2213803680980959 763.6970866141731449 93.0586196319018342 -21.4999999999999964 re +B +BT +/F9 10 Tf +11.5 TL +0.314 g +467.2213803680980959 750.1970866141732586 Td +(Germany) Tj +ET +1. g +0.78 G +0.2834645669291339 w +40. 742.1970866141732586 265.9382208588956473 -21.4999999999999964 re +B +BT +/F9 10 Tf +11.5 TL +0.314 g +45. 728.6970866141732586 Td +(Centro comercial Moctezuma) Tj +ET +1. g +0.78 G +0.2834645669291339 w +305.9382208588956473 742.1970866141732586 156.283159509202477 -21.4999999999999964 re +B +BT +/F9 10 Tf +11.5 TL +0.314 g +310.9382208588956473 728.6970866141732586 Td +(Francisco Chang) Tj +ET +1. g +0.78 G +0.2834645669291339 w +462.2213803680980959 742.1970866141732586 93.0586196319018342 -21.4999999999999964 re +B +BT +/F9 10 Tf +11.5 TL +0.314 g +467.2213803680980959 728.6970866141732586 Td +( ’ ª Í ª Á • È) Tj +ET +1. g +0.78 G +0.2834645669291339 w +40. 720.6970866141731449 265.9382208588956473 -21.4999999999999964 re +B +BT +/F9 10 Tf +11.5 TL +0.314 g +45. 707.1970866141732586 Td +(Ernst Handel) Tj +ET +1. g +0.78 G +0.2834645669291339 w +305.9382208588956473 720.6970866141731449 156.283159509202477 -21.4999999999999964 re +B +BT +/F9 10 Tf +11.5 TL +0.314 g +310.9382208588956473 707.1970866141732586 Td +(Roland Mendel) Tj +ET +1. g +0.78 G +0.2834645669291339 w +462.2213803680980959 720.6970866141731449 93.0586196319018342 -21.4999999999999964 re +B +BT +/F9 10 Tf +11.5 TL +0.314 g +467.2213803680980959 707.1970866141732586 Td +(Austria) Tj +ET +1. g +0.78 G +0.2834645669291339 w +40. 699.1970866141732586 265.9382208588956473 -21.4999999999999964 re +B +BT +/F9 10 Tf +11.5 TL +0.314 g +45. 685.6970866141732586 Td +(Island Trading) Tj +ET +1. g +0.78 G +0.2834645669291339 w +305.9382208588956473 699.1970866141732586 156.283159509202477 -21.4999999999999964 re +B +BT +/F9 10 Tf +11.5 TL +0.314 g +310.9382208588956473 685.6970866141732586 Td +(Helen Bennett) Tj +ET +1. g +0.78 G +0.2834645669291339 w +462.2213803680980959 699.1970866141732586 93.0586196319018342 -21.4999999999999964 re +B +BT +/F9 10 Tf +11.5 TL +0.314 g +467.2213803680980959 685.6970866141732586 Td +(UK) Tj +ET +1. g +0.78 G +0.2834645669291339 w +40. 677.6970866141732586 265.9382208588956473 -21.4999999999999964 re +B +BT +/F9 10 Tf +11.5 TL +0.314 g +45. 664.1970866141732586 Td +(Laughing Bacchus Winecellars) Tj +ET +1. g +0.78 G +0.2834645669291339 w +305.9382208588956473 677.6970866141732586 156.283159509202477 -21.4999999999999964 re +B +BT +/F9 10 Tf +11.5 TL +0.314 g +310.9382208588956473 664.1970866141732586 Td +(Yoshi Tannamuri) Tj +ET +1. g +0.78 G +0.2834645669291339 w +462.2213803680980959 677.6970866141732586 93.0586196319018342 -21.4999999999999964 re +B +BT +/F9 10 Tf +11.5 TL +0.314 g +467.2213803680980959 664.1970866141732586 Td +(Canada) Tj +ET +1. g +0.78 G +0.2834645669291339 w +40. 656.1970866141732586 265.9382208588956473 -21.4999999999999964 re +B +BT +/F9 10 Tf +11.5 TL +0.314 g +45. 642.6970866141732586 Td +(Magazzini Alimentari Riuniti) Tj +ET +1. g +0.78 G +0.2834645669291339 w +305.9382208588956473 656.1970866141732586 156.283159509202477 -21.4999999999999964 re +B +BT +/F9 10 Tf +11.5 TL +0.314 g +310.9382208588956473 642.6970866141732586 Td +(Giovanni Rovelli) Tj +ET +1. g +0.78 G +0.2834645669291339 w +462.2213803680980959 656.1970866141732586 93.0586196319018342 -21.4999999999999964 re +B +BT +/F9 10 Tf +11.5 TL +0.314 g +467.2213803680980959 642.6970866141732586 Td +(Italy) Tj +ET +0.78 G +0. w +endstream +endobj +1 0 obj +<> +endobj +5 0 obj +<< +/Type /Font +/BaseFont /Helvetica +/Subtype /Type1 +/Encoding /WinAnsiEncoding +/FirstChar 32 +/LastChar 255 +>> +endobj +6 0 obj +<< +/Type /Font +/BaseFont /Helvetica-Bold +/Subtype /Type1 +/Encoding /WinAnsiEncoding +/FirstChar 32 +/LastChar 255 +>> +endobj +7 0 obj +<< +/Type /Font +/BaseFont /Helvetica-Oblique +/Subtype /Type1 +/Encoding /WinAnsiEncoding +/FirstChar 32 +/LastChar 255 +>> +endobj +8 0 obj +<< +/Type /Font +/BaseFont /Helvetica-BoldOblique +/Subtype /Type1 +/Encoding /WinAnsiEncoding +/FirstChar 32 +/LastChar 255 +>> +endobj +9 0 obj +<< +/Type /Font +/BaseFont /Courier +/Subtype /Type1 +/Encoding /WinAnsiEncoding +/FirstChar 32 +/LastChar 255 +>> +endobj +10 0 obj +<< +/Type /Font +/BaseFont /Courier-Bold +/Subtype /Type1 +/Encoding /WinAnsiEncoding +/FirstChar 32 +/LastChar 255 +>> +endobj +11 0 obj +<< +/Type /Font +/BaseFont /Courier-Oblique +/Subtype /Type1 +/Encoding /WinAnsiEncoding +/FirstChar 32 +/LastChar 255 +>> +endobj +12 0 obj +<< +/Type /Font +/BaseFont /Courier-BoldOblique +/Subtype /Type1 +/Encoding /WinAnsiEncoding +/FirstChar 32 +/LastChar 255 +>> +endobj +13 0 obj +<< +/Type /Font +/BaseFont /Times-Roman +/Subtype /Type1 +/Encoding /WinAnsiEncoding +/FirstChar 32 +/LastChar 255 +>> +endobj +14 0 obj +<< +/Type /Font +/BaseFont /Times-Bold +/Subtype /Type1 +/Encoding /WinAnsiEncoding +/FirstChar 32 +/LastChar 255 +>> +endobj +15 0 obj +<< +/Type /Font +/BaseFont /Times-Italic +/Subtype /Type1 +/Encoding /WinAnsiEncoding +/FirstChar 32 +/LastChar 255 +>> +endobj +16 0 obj +<< +/Type /Font +/BaseFont /Times-BoldItalic +/Subtype /Type1 +/Encoding /WinAnsiEncoding +/FirstChar 32 +/LastChar 255 +>> +endobj +17 0 obj +<< +/Type /Font +/BaseFont /ZapfDingbats +/Subtype /Type1 +/FirstChar 32 +/LastChar 255 +>> +endobj +18 0 obj +<< +/Type /Font +/BaseFont /Symbol +/Subtype /Type1 +/FirstChar 32 +/LastChar 255 +>> +endobj +2 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/Font << +/F1 5 0 R +/F2 6 0 R +/F3 7 0 R +/F4 8 0 R +/F5 9 0 R +/F6 10 0 R +/F7 11 0 R +/F8 12 0 R +/F9 13 0 R +/F10 14 0 R +/F11 15 0 R +/F12 16 0 R +/F13 17 0 R +/F14 18 0 R +>> +/XObject << +>> +>> +endobj +19 0 obj +<< +/Producer (jsPDF 2.4.0) +/CreationDate (D:20240904105942+05'30') +>> +endobj +20 0 obj +<< +/Type /Catalog +/Pages 1 0 R +/OpenAction [3 0 R /FitH null] +/PageLayout /OneColumn +>> +endobj +xref +0 21 +0000000000 65535 f +0000004642 00000 n +0000006459 00000 n +0000000015 00000 n +0000000152 00000 n +0000004699 00000 n +0000004824 00000 n +0000004954 00000 n +0000005087 00000 n +0000005224 00000 n +0000005347 00000 n +0000005476 00000 n +0000005608 00000 n +0000005744 00000 n +0000005872 00000 n +0000005999 00000 n +0000006128 00000 n +0000006261 00000 n +0000006363 00000 n +0000006707 00000 n +0000006793 00000 n +trailer +<< +/Size 21 +/Root 20 0 R +/Info 19 0 R +/ID [ <3A32A17A0E0AEAFDBC2A7A55641F52D9> <3A32A17A0E0AEAFDBC2A7A55641F52D9> ] +>> +startxref +6897 +%%EOF \ No newline at end of file diff --git a/src/main/resources/static/images/minus.png b/src/main/resources/static/images/minus.png new file mode 100644 index 0000000..c617d14 Binary files /dev/null and b/src/main/resources/static/images/minus.png differ diff --git a/src/main/resources/static/images/plus.png b/src/main/resources/static/images/plus.png new file mode 100644 index 0000000..077193c Binary files /dev/null and b/src/main/resources/static/images/plus.png differ diff --git a/src/main/resources/templates/Tradelicence/tradelicence.html b/src/main/resources/templates/Tradelicence/tradelicence.html new file mode 100644 index 0000000..5ebbc81 --- /dev/null +++ b/src/main/resources/templates/Tradelicence/tradelicence.html @@ -0,0 +1,1505 @@ + + + + + + Main Page + + + + + + + + + + + + +
+
+ Greater Chennai Corporation Logo + +
+
+

Trade License New Registration

+
+ +
+ Tamil Nadu Logo + bonton Logo +
+
+ + + +
+ +
+
+ + +

Today Date:

+
+
+
+
+
1. Applicant Details:
+
+
+ + +
+ +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
Address of the Applicant:
+
+
+ + +
+ +
+ + +
+
+ + +
+
+ + +
+ +
+
2. Trade Details:
+
+ +
+ + +
+ +
+ + +
+
+ + +
+ + +
+ + + + + + + + + + + + + + + + + +
3. Trade Location Details:
+
+
+ + +
+ +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+
+ + + + +
+ + + + +
+ + + + +
+ + + + + +
+ +
+ + +
4. Trade License Fee Details:
+
+
+ + +
+
+ +
+
+ + +
+
+ + +
+
+
+
+ + +
+ + +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ + +
+ + + +
+
+ + + + +
+ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/User/home.html b/src/main/resources/templates/User/home.html index 94a6afc..30e4cd2 100644 --- a/src/main/resources/templates/User/home.html +++ b/src/main/resources/templates/User/home.html @@ -178,6 +178,8 @@
+ + -
+
= @@ -250,24 +252,7 @@ - - - - - - - +
@@ -309,6 +294,8 @@ diff --git a/src/main/resources/templates/User/registercomplaints.html b/src/main/resources/templates/User/registercomplaints.html index 80ffc0e..6ae3903 100644 --- a/src/main/resources/templates/User/registercomplaints.html +++ b/src/main/resources/templates/User/registercomplaints.html @@ -256,6 +256,109 @@ font-size: 14px; cursor: pointer; } + + .loader { + border: 16px solid #f3f3f3; + /* Light grey */ + border-top: 16px solid #3498db; + /* Blue */ + border-radius: 50%; + width: 120px; + height: 120px; + animation: spin 2s linear infinite; + position: absolute; + top: 50%; + left: 50%; + margin: -60px 0 0 -100px; + /* Center the loader */ + z-index: 9999; + /* Ensure it's on top of everything */ + display: none; + /* Initially hidden */ + } + + @keyframes spin { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } + } + + /*for snack bar*/ + #snackbar { + visibility: hidden; + min-width: 250px; + background-color: #333; + color: #fff; + text-align: center; + border-radius: 2px; + padding: 16px; + position: fixed; + z-index: 1; + left: 50%; + bottom: 30px; + font-size: 17px; + transform: translateX(-50%); + } + + #snackbar.show { + visibility: visible; + -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s; + animation: fadein 0.5s, fadeout 0.5s 2.5s; + } + + @-webkit-keyframes fadein { + from { + bottom: 0; + opacity: 0; + } + + to { + bottom: 30px; + opacity: 1; + } + } + + @keyframes fadein { + from { + bottom: 0; + opacity: 0; + } + + to { + bottom: 30px; + opacity: 1; + } + } + + @-webkit-keyframes fadeout { + from { + bottom: 30px; + opacity: 1; + } + + to { + bottom: 0; + opacity: 0; + } + } + + @keyframes fadeout { + from { + bottom: 30px; + opacity: 1; + } + + to { + bottom: 0; + opacity: 0; + } + } + + /*for snack bar*/ @@ -263,6 +366,7 @@
+
@@ -298,27 +402,9 @@
-
- -
- -
@@ -351,13 +437,15 @@ style="background-color: #414f69;">Next
-
2. Complaint Location Details:
+ + +
@@ -388,12 +476,8 @@
-
- -
-
- -
-
Aug 25
10.00 am
-
Citizen
Lorem ipsum dolor sit amet, consectetur adipiscing elit. - Ullamcorper ullamcorper quis.
-
-
-
-
Aug 26
3.00 pm
-
Officer - AE Zone 15
Lorem ipsum dolor sit amet, consectetur adipiscing - elit. In sit arcu aliquet ut dui egestas.
-
+ + +
+ + +
+
+ +
+ +
+ + +
+ @@ -244,15 +249,18 @@ diff --git a/src/main/resources/templates/staff/appoinment.html b/src/main/resources/templates/staff/appoinment.html index 2d45a53..c62a512 100644 --- a/src/main/resources/templates/staff/appoinment.html +++ b/src/main/resources/templates/staff/appoinment.html @@ -3,7 +3,7 @@ - Appoinment + Create Order @@ -18,6 +18,54 @@ font-weight: 700; color: #2d5263; } + + /*for uploading fields*/ + .custom-file-upload { + position: relative; + display: flex; + align-items: center; + border: 1px solid #d9dde4; + border-radius: 5px; + padding: 5px; + background-color: #f9fafb; + cursor: pointer; + margin-top: 5px; + } + + .custom-file-upload input[type="file"] { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + opacity: 0; + cursor: pointer; + } + + .custom-file-upload label { + display: flex; + justify-content: space-between; + width: 100%; + align-items: center; + } + + .upload-text { + color: #a6adb5; + + font-weight: 700; + } + + .upload-icon i { + color: #a6adb5; + font-size: 18px; + } + + .file-name { + margin-left: 10px; + color: #414f69; + font-size: 14px; + + } @@ -26,110 +74,68 @@
-

Appoinment

+

Create Order

- +
+ +
- - +
- +
Order Details
- - + +
- - + +
- -
-
- - +
- - + +
- - + +
- - + +
+ + + +
-
- - -
-
- - -
- - - -
-
- - - + Order
- - -
+ @@ -139,21 +145,72 @@ diff --git a/src/main/resources/templates/staff/createorder.html b/src/main/resources/templates/staff/createorder.html index 51a9fe1..905ab3e 100644 --- a/src/main/resources/templates/staff/createorder.html +++ b/src/main/resources/templates/staff/createorder.html @@ -71,14 +71,15 @@ - -
-

Create Order

-
+ +
+

Create Order

+
- +
@@ -92,27 +93,31 @@
- + +
- + +
- + +
-
- + +
+
-
@@ -124,15 +129,18 @@ +
+
- + @@ -158,18 +166,63 @@ const fileName = fileInput.files[0].name; fileNameSpan.textContent = fileName; } - $(document).ready(function () { - $('#createorder').click(function () { - Swal.fire({ - title: 'Success!', - text: 'Order Created Successfully', - icon: 'success', - confirmButtonText: 'OK', - background: '#f5f5f5', - confirmButtonColor: '#414f69' - }); - }); - }); + $(document).ready(function () { + $('#createorder').click(function () { + let isValid = true; + + // Clear previous error messages + $('.text-danger').text(''); + + // Validate Order Number + if ($('#orderNumber').val().trim() == '') { + $('#orderNumberError').text('Enter the Order Number.'); + isValid = false; + } + + // Validate Order Date + if ($('#orderDate').val().trim() === '') { + $('#orderDateError').text('Enter the Order Date.'); + isValid = false; + } + + // Validate Order Title + if ($('#orderTitle').val().trim() === '') { + $('#orderTitleError').text('Enter the Order Title.'); + isValid = false; + } + + // Validate Number Of Staff Required + if ($('#staffRequired').val().trim() === '') { + $('#staffRequiredError').text('Enter the Number Of Staff Required.'); + isValid = false; + } + + // Validate Order Description + if ($('#details').val().trim() === '') { + $('#detailsError').text('Enter the Order Description.'); + isValid = false; + } + + // Validate Order Document + if ($('#file-upload').val().trim() === '') { + $('#fileUploadError').text('Upload the Order Document.'); + isValid = false; + } + + // If all fields are valid, show success message + if (isValid) { + Swal.fire({ + title: 'Success!', + text: 'Order Created Successfully', + icon: 'success', + confirmButtonText: 'OK', + background: '#f5f5f5', + confirmButtonColor: '#414f69' + }); + } + }); + }); + diff --git a/src/main/resources/templates/staff/schemegroup.html b/src/main/resources/templates/staff/schemegroup.html index f2b4a38..bc18022 100644 --- a/src/main/resources/templates/staff/schemegroup.html +++ b/src/main/resources/templates/staff/schemegroup.html @@ -3,7 +3,7 @@ - Scheme Group + CheckList User @@ -11,99 +11,176 @@ - - - + + +
-
-

Add Scheme Group

-
-
- -
- -
- -
- -
-
-
-
- - -
-
- - -
-
- - -
-
- - +
+
-
+

Acknowledgement

+
+
+ +
+ +
+ +
+
+
+ 1. User Details +
+
+ + + + + + + + + + + + + + + + + + + +
Name:Yogesh
Complainant Name:John Doe
Complainant Email:john.doe@example.com
Gender:Male
+
+
+
+
+
+
+ 2. Complaint Location Details +
+
+ + + + + + + + + + + + + + + + + + + +
Name:Yogesh
Complainant Name:John Doe
Complainant Email:john.doe@example.com
Gender:Male
+
+
+
+
+ +
+
+
+
+ 3. Complaint Type +
+
+ + + + + + + + + + + + + + + + + + + +
Name:Yogesh
Complainant Name:John Doe
Complainant Email:john.doe@example.com
Gender:Male
+
+
+
+
+
+
+ 3. Complaint Type +
+
+ + + + + + + + + + + + + + + + + + + +
Name:Yogesh
Complainant Name:John Doe
Complainant Email:john.doe@example.com
Gender:Male
+
+
- +
+ +
-
-
- - - + + \ No newline at end of file