Browse Source

Changes in backend logics in wastecollectors

master
Hariprasath S 4 months ago
parent
commit
ff84918167
  1. BIN
      cd_waste_docs/cdwaste_aadhar/1_adhaar.jpg
  2. BIN
      cd_waste_docs/cdwaste_aadhar/2_aadhaar card.jpg
  3. BIN
      cd_waste_docs/cdwaste_aadhar/3_adhaar.jpg
  4. BIN
      cd_waste_docs/cdwaste_aadhar/4_adhaar.jpg
  5. BIN
      cd_waste_docs/cdwaste_aadhar/5_adhaar.jpg
  6. BIN
      cd_waste_docs/cdwaste_aadhar/6_IMG_20250212_151602.jpg
  7. BIN
      cd_waste_docs/cdwaste_aadhar/6_adhaar.jpg
  8. BIN
      cd_waste_docs/cdwaste_aadhar/7_IMG_20250212_151602.jpg
  9. BIN
      cd_waste_docs/cdwaste_aadhar/7_adhaar.jpg
  10. BIN
      cd_waste_docs/cdwaste_aadhar/8_IMG_20250212_151602.jpg
  11. BIN
      cd_waste_docs/cdwaste_aadhar/8_adhaar.jpg
  12. BIN
      cd_waste_docs/cdwaste_leasedoc/3_vehicle rc book.jpg
  13. BIN
      cd_waste_docs/cdwaste_rcbookdoc/1_rc book.jpg
  14. BIN
      cd_waste_docs/cdwaste_rcbookdoc/2_rc book.jpg
  15. BIN
      cd_waste_docs/cdwaste_rcbookdoc/3_rc book.jpg
  16. BIN
      cd_waste_docs/cdwaste_rcbookdoc/4_rc book.jpg
  17. BIN
      cd_waste_docs/cdwaste_rcbookdoc/5_rc book.jpg
  18. BIN
      cd_waste_docs/cdwaste_rcbookdoc/6_IMG_20250212_151602.jpg
  19. BIN
      cd_waste_docs/cdwaste_rcbookdoc/6_rc book.jpg
  20. BIN
      cd_waste_docs/cdwaste_rcbookdoc/7_IMG_20250212_151602.jpg
  21. BIN
      cd_waste_docs/cdwaste_rcbookdoc/7_rc book.jpg
  22. BIN
      cd_waste_docs/cdwaste_rcbookdoc/8_IMG_20250212_151602.jpg
  23. BIN
      cd_waste_docs/cdwaste_rcbookdoc/8_rc book.jpg
  24. BIN
      cd_waste_docs/cdwaste_userphoto/1_baby.jpg
  25. BIN
      cd_waste_docs/cdwaste_userphoto/2_baby.jpg
  26. BIN
      cd_waste_docs/cdwaste_userphoto/3_baby.jpg
  27. BIN
      cd_waste_docs/cdwaste_userphoto/4_baby.jpg
  28. BIN
      cd_waste_docs/cdwaste_userphoto/5_baby.jpg
  29. BIN
      cd_waste_docs/cdwaste_userphoto/6_IMG_20250212_151602.jpg
  30. BIN
      cd_waste_docs/cdwaste_userphoto/6_baby.jpg
  31. BIN
      cd_waste_docs/cdwaste_userphoto/7_IMG_20250212_151602.jpg
  32. BIN
      cd_waste_docs/cdwaste_userphoto/7_baby.jpg
  33. BIN
      cd_waste_docs/cdwaste_userphoto/8_IMG_20250212_151602.jpg
  34. BIN
      cd_waste_docs/cdwaste_userphoto/8_bby.jpg
  35. 2
      pom.xml
  36. 8
      src/main/java/com/volunteersregistration/config/AppConstants.java
  37. 16
      src/main/java/com/volunteersregistration/controller/ApiController.java
  38. 6
      src/main/java/com/volunteersregistration/controller/VolunteerController.java
  39. 6
      src/main/java/com/volunteersregistration/repository/VolunteerRegistrationRepo.java
  40. 6
      src/main/java/com/volunteersregistration/service/VolunteerRegistrationService.java
  41. 40
      src/main/java/com/volunteersregistration/wasteCollector/controller/ApiController.java
  42. 1
      src/main/java/com/volunteersregistration/wasteCollector/controller/MainController.java
  43. 10
      src/main/java/com/volunteersregistration/wasteCollector/repository/CdlicenseRepository.java
  44. 16
      src/main/java/com/volunteersregistration/wasteCollector/repository/WasteRegistrationRepo.java
  45. 8
      src/main/resources/application-dev.properties
  46. 9
      src/main/resources/application-prod.properties
  47. BIN
      src/main/resources/static/images/full_ripon.png
  48. BIN
      src/main/resources/static/images/gcc_logo.png
  49. BIN
      src/main/resources/static/images/sample1.jpg
  50. 68
      src/main/resources/templates/allreports.html
  51. 164
      src/main/resources/templates/index.html
  52. 471
      src/main/resources/templates/kynreportlogin.html
  53. 9
      src/main/resources/templates/modules/wastecollectors/noidcard.html
  54. 3
      src/main/resources/templates/modules/wastecollectors/otp.html
  55. 6
      src/main/resources/templates/modules/wastecollectors/register.html

BIN
cd_waste_docs/cdwaste_aadhar/1_adhaar.jpg

After

Width: 288  |  Height: 175  |  Size: 12 KiB

BIN
cd_waste_docs/cdwaste_aadhar/2_aadhaar card.jpg

After

Width: 259  |  Height: 194  |  Size: 5.4 KiB

BIN
cd_waste_docs/cdwaste_aadhar/3_adhaar.jpg

After

Width: 288  |  Height: 175  |  Size: 12 KiB

BIN
cd_waste_docs/cdwaste_aadhar/4_adhaar.jpg

After

Width: 288  |  Height: 175  |  Size: 12 KiB

BIN
cd_waste_docs/cdwaste_aadhar/5_adhaar.jpg

After

Width: 288  |  Height: 175  |  Size: 12 KiB

BIN
cd_waste_docs/cdwaste_aadhar/6_IMG_20250212_151602.jpg

After

Width: 4000  |  Height: 3000  |  Size: 4.3 MiB

BIN
cd_waste_docs/cdwaste_aadhar/6_adhaar.jpg

After

Width: 288  |  Height: 175  |  Size: 12 KiB

BIN
cd_waste_docs/cdwaste_aadhar/7_IMG_20250212_151602.jpg

After

Width: 4000  |  Height: 3000  |  Size: 4.3 MiB

BIN
cd_waste_docs/cdwaste_aadhar/7_adhaar.jpg

After

Width: 288  |  Height: 175  |  Size: 12 KiB

BIN
cd_waste_docs/cdwaste_aadhar/8_IMG_20250212_151602.jpg

After

Width: 4000  |  Height: 3000  |  Size: 4.3 MiB

BIN
cd_waste_docs/cdwaste_aadhar/8_adhaar.jpg

After

Width: 288  |  Height: 175  |  Size: 12 KiB

BIN
cd_waste_docs/cdwaste_leasedoc/3_vehicle rc book.jpg

After

Width: 1200  |  Height: 630  |  Size: 90 KiB

BIN
cd_waste_docs/cdwaste_rcbookdoc/1_rc book.jpg

After

Width: 301  |  Height: 167  |  Size: 14 KiB

BIN
cd_waste_docs/cdwaste_rcbookdoc/2_rc book.jpg

After

Width: 301  |  Height: 167  |  Size: 14 KiB

BIN
cd_waste_docs/cdwaste_rcbookdoc/3_rc book.jpg

After

Width: 301  |  Height: 167  |  Size: 14 KiB

BIN
cd_waste_docs/cdwaste_rcbookdoc/4_rc book.jpg

After

Width: 301  |  Height: 167  |  Size: 14 KiB

BIN
cd_waste_docs/cdwaste_rcbookdoc/5_rc book.jpg

After

Width: 301  |  Height: 167  |  Size: 14 KiB

BIN
cd_waste_docs/cdwaste_rcbookdoc/6_IMG_20250212_151602.jpg

After

Width: 4000  |  Height: 3000  |  Size: 4.3 MiB

BIN
cd_waste_docs/cdwaste_rcbookdoc/6_rc book.jpg

After

Width: 301  |  Height: 167  |  Size: 14 KiB

BIN
cd_waste_docs/cdwaste_rcbookdoc/7_IMG_20250212_151602.jpg

After

Width: 4000  |  Height: 3000  |  Size: 4.3 MiB

BIN
cd_waste_docs/cdwaste_rcbookdoc/7_rc book.jpg

After

Width: 301  |  Height: 167  |  Size: 14 KiB

BIN
cd_waste_docs/cdwaste_rcbookdoc/8_IMG_20250212_151602.jpg

After

Width: 4000  |  Height: 3000  |  Size: 4.3 MiB

BIN
cd_waste_docs/cdwaste_rcbookdoc/8_rc book.jpg

After

Width: 301  |  Height: 167  |  Size: 14 KiB

BIN
cd_waste_docs/cdwaste_userphoto/1_baby.jpg

After

Width: 360  |  Height: 360  |  Size: 48 KiB

BIN
cd_waste_docs/cdwaste_userphoto/2_baby.jpg

After

Width: 360  |  Height: 360  |  Size: 48 KiB

BIN
cd_waste_docs/cdwaste_userphoto/3_baby.jpg

After

Width: 360  |  Height: 360  |  Size: 48 KiB

BIN
cd_waste_docs/cdwaste_userphoto/4_baby.jpg

After

Width: 360  |  Height: 360  |  Size: 48 KiB

BIN
cd_waste_docs/cdwaste_userphoto/5_baby.jpg

After

Width: 360  |  Height: 360  |  Size: 48 KiB

BIN
cd_waste_docs/cdwaste_userphoto/6_IMG_20250212_151602.jpg

After

Width: 4000  |  Height: 3000  |  Size: 4.3 MiB

BIN
cd_waste_docs/cdwaste_userphoto/6_baby.jpg

After

Width: 360  |  Height: 360  |  Size: 48 KiB

BIN
cd_waste_docs/cdwaste_userphoto/7_IMG_20250212_151602.jpg

After

Width: 4000  |  Height: 3000  |  Size: 4.3 MiB

BIN
cd_waste_docs/cdwaste_userphoto/7_baby.jpg

After

Width: 360  |  Height: 360  |  Size: 48 KiB

BIN
cd_waste_docs/cdwaste_userphoto/8_IMG_20250212_151602.jpg

After

Width: 4000  |  Height: 3000  |  Size: 4.3 MiB

BIN
cd_waste_docs/cdwaste_userphoto/8_bby.jpg

After

Width: 225  |  Height: 225  |  Size: 8.6 KiB

2
pom.xml

@ -10,7 +10,7 @@
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>com</groupId>
<artifactId>volunteersregistration</artifactId>
<artifactId>volunteer</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>volunteersregistration</name>
<description>volunteers registration</description>

8
src/main/java/com/volunteersregistration/config/AppConstants.java

@ -1,11 +1,11 @@
package com.volunteersregistration.config;
public final class AppConstants {
// public static String key_id="rzp_live_ySI5Ns54Y7qOcJ";
// public static String key_secret="Nwf1TjhUtaskof8vePkRR8Sb";
public static String key_id="rzp_live_ySI5Ns54Y7qOcJ";
public static String key_secret="Nwf1TjhUtaskof8vePkRR8Sb";
//uncomment for testing payment
public static String key_id="rzp_test_tDkHFEqWXmuEi8";
public static String key_secret="cBQUjMcKZ4J6vmOKSyNZ92py";
// public static String key_id="rzp_test_tDkHFEqWXmuEi8";
// public static String key_secret="cBQUjMcKZ4J6vmOKSyNZ92py";
}

16
src/main/java/com/volunteersregistration/controller/ApiController.java

@ -20,7 +20,7 @@ import com.volunteersregistration.config.UserSession;
import com.volunteersregistration.entity.LoginDetail;
import com.volunteersregistration.repository.LoginDetailRepo;
import com.volunteersregistration.repository.VolunteerRegistrationRepo;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpSession;
@ -56,7 +56,8 @@ public class ApiController {
private AppConfigur appConfig;
@Autowired
private VolunteerRegistrationRepo volunteerRegistrationRepo;
//for login
@ -136,4 +137,15 @@ public class ApiController {
}
}
@GetMapping(value = "/getAllCategory")
public List<Map<String, Object>> getAllCategory() {
return volunteerRegistrationRepo.getAllCategory();
}
@GetMapping(value = "/getSubCategoryById")
public List<Map<String, Object>> getSubCategoryById(@RequestParam int category_id) {
return volunteerRegistrationRepo.getSubCategoryById(category_id);
}
}

6
src/main/java/com/volunteersregistration/controller/VolunteerController.java

@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import com.volunteersregistration.config.UserSession;
import com.volunteersregistration.repository.VolunteerRegistrationRepo;
import com.volunteersregistration.service.VolunteerRegistrationService;
import jakarta.servlet.http.HttpServletRequest;
@ -32,6 +33,8 @@ public class VolunteerController {
@Autowired
private UserSession usersession;
@Autowired
public VolunteerRegistrationService volunteerRegistrationService;
@ -39,6 +42,8 @@ public class VolunteerController {
public String register(@RequestParam(required = false) String ref, Model model) {
System.out.println("indesx page....." + ref);
model.addAttribute("ref", ref);
return "index";
}
@ -56,6 +61,7 @@ public class VolunteerController {
return "kynreport"; // Render page if logged in
}
@GetMapping(value = {"/allreports"})
public String allreports(Model model, HttpServletRequest request) {
if (!isLoggedIn()) {

6
src/main/java/com/volunteersregistration/repository/VolunteerRegistrationRepo.java

@ -23,4 +23,10 @@ public interface VolunteerRegistrationRepo extends JpaRepository<VolunteerInform
+ "AND DATE(v.cdate) < :toDate", nativeQuery = true)
List<Map<String, Object>> findByDateRange(@Param("fromDate") String fromDate, @Param("toDate") String toDate);
@Query(value = "SELECT * FROM category_master WHERE is_active=1 AND is_delete=0", nativeQuery = true)
List<Map<String, Object>> getAllCategory();
@Query(value ="SELECT * FROM sub_category_master WHERE is_active=1 AND is_delete=0 AND category_id=:category_id", nativeQuery = true)
List<Map<String, Object>> getSubCategoryById(@Param("category_id") int category_id);
}

6
src/main/java/com/volunteersregistration/service/VolunteerRegistrationService.java

@ -16,6 +16,7 @@ import java.util.List;
import java.util.Map;
import java.util.StringJoiner;
@Service
public class VolunteerRegistrationService {
@Autowired
@ -155,4 +156,9 @@ public class VolunteerRegistrationService {
return new ArrayList<>();
}
public List<Map<String, Object>> getAllCategory() {
return volunteerRegistrationRepo.getAllCategory();
}
}

40
src/main/java/com/volunteersregistration/wasteCollector/controller/ApiController.java

@ -285,12 +285,17 @@ public class ApiController {
}
@PostMapping("/accept")
public ResponseEntity<Map<String, String>> acceptuserById(@RequestParam("registerId") Long registerId) {
int rowsAffected = registrationService.updateUseraccept(registerId);
String refnum= wasteregistrationrepo.getreferencenumbyidforsms(registerId);
System.out.println("Register ID--------->"+registerId);
String mobilenum= wasteregistrationrepo.getmobilenumByRefnum(refnum);
System.out.println("Mobile Num--------->"+mobilenum);
// Fetch the WasteRegistration entity by registerId to get cdate
WasteRegistration waste = wasteregistrationrepo.findByRegisterId(registerId);
if (waste == null) {
@ -302,15 +307,11 @@ public class ApiController {
// Get the creation date (cdate) from the retrieved WasteRegistration
LocalDateTime cdate = waste.getCdate();
// Extract the year from cdate for firstnum
int firstnum = cdate.getYear();
Cdlicense cdlicense= new Cdlicense();
cdlicense.setCdate(LocalDateTime.now());
cdlicense.setRegister_id(registerId);
String formattedRegisterId = String.format("%05d", registerId);
cdlicense.setLicense_num(firstnum + "/" + formattedRegisterId);
@ -327,10 +328,29 @@ public class ApiController {
return ResponseEntity.ok(response);
}
@PostMapping("/reject")
public ResponseEntity<Map<String, String>> rejectuserById(@RequestParam("registerId") Long registerId,@RequestParam("reason")String reason) {
int rowsAffected = registrationService.updateUserreject(reason,registerId);
String refnum= wasteregistrationrepo.getreferencenumbyidforsms(registerId);
System.out.println("Register ID--------->"+registerId);
String mobilenum= wasteregistrationrepo.getmobilenumByRefnum(refnum);
System.out.println("Mobile Num--------->"+mobilenum);
// Fetch the WasteRegistration entity by registerId to get cdate
WasteRegistration waste = wasteregistrationrepo.findByRegisterId(registerId);
if (waste == null) {
Map<String, String> errorResponse = new HashMap<>();
errorResponse.put("status", "error");
errorResponse.put("message", "No WasteRegistration found for RegisterId: " + registerId);
return ResponseEntity.ok(errorResponse);
}
Map<String, String> response = new HashMap<>();
if (rowsAffected > 0) {
response.put("status", "success");
@ -343,13 +363,17 @@ public class ApiController {
}
@GetMapping("/generateQRCode")
public ResponseEntity<String> generateQRCodeForUser(@RequestParam("registerId") String registerId) {
try {
// Base URL and full URL construction
//String baseUrl = "https://gccservices.chennaicorporation.gov.in/volunteer/wastecollectors";
String baseUrl ="http://localhost:8071/volunteer/wastecollectors";
String baseUrl = "https://gccservices.in/volunteer/wastecollectors";
// String baseUrl ="http://localhost:8071/volunteer/wastecollectors";
String refNum=wasteregistrationrepo.getreferencenumbyid(registerId);
@ -396,7 +420,7 @@ public class ApiController {
public ResponseEntity<List<Map<String, Object>>> viewapprovedList() {
// Assuming a service method to fetch the data by register_id
List<Map<String, Object>> approvedDetails = registrationService.viewapprovedList();
System.out.println(approvedDetails);
System.out.println("approvedDetails====="+approvedDetails);
return ResponseEntity.ok(approvedDetails);
}

1
src/main/java/com/volunteersregistration/wasteCollector/controller/MainController.java

@ -78,6 +78,7 @@ public class MainController {
public String wastecollectorsnew(Model model, @RequestParam("register_id") String reference_num) {
WasteRegistration refnum=registrationRepo.findByReferenceNum(reference_num);
System.out.println("-----------Ref---------------"+refnum);
if (refnum == null) {
// If not found, add a message to the model and return a specific view
model.addAttribute("message", "Sorry, your details not found...");

10
src/main/java/com/volunteersregistration/wasteCollector/repository/CdlicenseRepository.java

@ -10,8 +10,12 @@ import com.volunteersregistration.wasteCollector.entity.Cdlicense;
@Repository
public interface CdlicenseRepository extends JpaRepository<Cdlicense, Long>
{
@Query(value="SELECT license_num\r\n"
+ "FROM cdlicense\r\n"
+ "where register_id=:register_id", nativeQuery = true)
// @Query(value="SELECT license_num\r\n"
// + "FROM cdlicense\r\n"
// + "where register_id=:register_id", nativeQuery = true)
// String findlicensenumber(@Param("register_id") String register_id);
@Query(value="SELECT license_num FROM cdlicense WHERE register_id=:register_id LIMIT 1", nativeQuery = true)
String findlicensenumber(@Param("register_id") String register_id);
}

16
src/main/java/com/volunteersregistration/wasteCollector/repository/WasteRegistrationRepo.java

@ -20,7 +20,10 @@ import com.volunteersregistration.wasteCollector.entity.WasteRegistration;
@Repository
public interface WasteRegistrationRepo extends JpaRepository<WasteRegistration, Long> {
@Query(value = "SELECT * FROM waste_collectors_registration WHERE vehicle_num = :vehicle_num", nativeQuery = true)
// @Query(value = "SELECT * FROM waste_collectors_registration WHERE vehicle_num = :vehicle_num", nativeQuery = true)
// Optional<WasteRegistration> findByVehicleNum(@Param("vehicle_num") String vehicle_num);
@Query(value = "SELECT * FROM waste_collectors_registration WHERE vehicle_num = :vehicle_num ORDER BY cdate DESC LIMIT 1", nativeQuery = true)
Optional<WasteRegistration> findByVehicleNum(@Param("vehicle_num") String vehicle_num);
@Query(value = "SELECT * FROM waste_collectors_registration WHERE reference_num = :reference_num", nativeQuery = true)
@ -90,10 +93,10 @@ List<Map<String, Object>> findUserDetailsById(@Param("registerId") Long register
@Query(value = "SELECT name, vehicle_num,vehicletype,register_id,CONCAT(:baseUrl,user_photourl) as user_photourl FROM waste_collectors_registration where register_id=:register_id ", nativeQuery = true)
List<Map<String, Object>> viewIdDetails(@Param("register_id") String register_id,String baseUrl);
@Query(value = "SELECT register_id, name, mobile_no, acceptedby, accepteddate, address, vehicletype , vehicle_num FROM waste_collectors_registration WHERE application_status = 'APPROVED'", nativeQuery = true)
@Query(value = "SELECT register_id, name, mobile_no, acceptedby, date(accepteddate)as accept, address, vehicletype , vehicle_num FROM waste_collectors_registration WHERE application_status = 'APPROVED'", nativeQuery = true)
List<Map<String, Object>> approvedDetails();
@Query(value = "SELECT register_id, name, mobile_no, acceptedby, accepteddate, address, vehicletype , vehicle_num, reason FROM waste_collectors_registration WHERE application_status = 'REJECTED'", nativeQuery = true)
@Query(value = "SELECT register_id, name, mobile_no, acceptedby, date(accepteddate)as reject, address, vehicletype , vehicle_num, reason FROM waste_collectors_registration WHERE application_status = 'REJECTED'", nativeQuery = true)
List<Map<String, Object>> rejectedDetails();
@Query(value="select mobile_no\r\n"
@ -110,7 +113,12 @@ List<Map<String, Object>> findUserDetailsById(@Param("registerId") Long register
@Query(value="select reference_num\r\n"
+ "from waste_collectors_registration\r\n"
+ "where register_id=:register_id",nativeQuery = true)
String getreferencenumbyid(@Param("register_id") String register_id);
String getreferencenumbyid(String register_id);
@Query(value="select reference_num\r\n"
+ "from waste_collectors_registration\r\n"
+ "where register_id=:registerId",nativeQuery = true)
String getreferencenumbyidforsms(Long registerId);
@Query(value="select register_id\r\n"

8
src/main/resources/application-dev.properties

@ -2,16 +2,16 @@ spring.application.name=volunteersregistration
spring.datasource.url=jdbc:mysql://localhost:3306/volunteer
spring.datasource.username=root
spring.datasource.password=Anto
spring.datasource.password=root
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
server.port=8071
server.servlet.session.timeout=1m
server.servlet.session.timeout=5m
spring.servlet.multipart.max-file-size=20MB
spring.servlet.multipart.max-request-size=100MB
spring.servlet.multipart.max-file-size=30MB
spring.servlet.multipart.max-request-size=120MB
app.baseUrl=http://localhost:8071
app.getOtpUrl=https://tmegov.onex-aura.com/api/sms?

9
src/main/resources/application-prod.properties

@ -1,19 +1,20 @@
spring.application.name=volunteersregistration
spring.datasource.url=jdbc:mysql://localhost:3306/volunteer
spring.datasource.url=jdbc:mysql://gcc-facial-db-instance-1.cf48eqcciziq.ap-south-1.rds.amazonaws.com:3306/volunteer
spring.datasource.username=root
spring.datasource.password=gccroot
spring.datasource.password=gcc-facial-password
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
server.port=8071
server.servlet.session.timeout=1m
server.servlet.session.timeout=5m
spring.servlet.multipart.max-file-size=30MB
spring.servlet.multipart.max-request-size=120MB
app.baseUrl=https://gccservices.chennaicorporation.gov.in/volunteer
#app.baseUrl=https://gccservices.chennaicorporation.gov.in/volunteer
app.baseUrl=https://gccservices.in/volunteer
app.getOtpUrl=https://tmegov.onex-aura.com/api/sms?
app.title=GREATER CHENNAI CORPORATION - volunteers
app.erpUrl=https://erp.chennaicorporation.gov.in/pgr/external/mobileservice?

BIN
src/main/resources/static/images/full_ripon.png

After

Width: 512  |  Height: 342  |  Size: 277 KiB

BIN
src/main/resources/static/images/gcc_logo.png

After

Width: 300  |  Height: 401  |  Size: 159 KiB

BIN
src/main/resources/static/images/sample1.jpg

After

Width: 1181  |  Height: 781  |  Size: 278 KiB

68
src/main/resources/templates/allreports.html

@ -152,12 +152,12 @@
<div class="col-md-4">
<label class="form-label" for="fromdate">From:<span class="text-danger">*</span></label>
<input type="date" th:value="${fromdate}" class="form-control" name="fromDate" id="fromdate"
placeholder="From Date" />
placeholder="From Date" onclick="this.showPicker()"/>
</div>
<div class="col-md-4">
<label class="form-label" for="todate">To:<span class="text-danger">*</span></label>
<input type="date" th:value="${todate}" class="form-control" name="toDate" id="todate"
placeholder="To Date" />
placeholder="To Date" onclick="this.showPicker()"/>
</div>
<div class="col-md-4">
<label class="form-label" for="request">Category:<span class="text-danger">*</span></label>
@ -173,7 +173,7 @@
<div class="col-12 d-flex justify-content-center">
<button type="submit" class="btn btn-primary mr-2">Submit</button>
<button type="reset" class="btn btn-danger">Reset</button>
<!-- <button type="reset" class="btn btn-danger" id="resetBtn" onclick="reloadPage()">Reset</button> -->
</div>
</div>
</form>
@ -228,15 +228,15 @@
<td th:text="${volunteer.dob}"></td>
<td th:text="${volunteer.email}"></td>
<td th:text="${volunteer.gender}"></td>
<td th:text="${volunteer.landline_no}"></td>
<td th:text="${volunteer.landline_no == null or volunteer.landline_no == 0} ? 'NA' : volunteer.landline_no"></td>
<td th:text="${volunteer.ngo_associated}"></td>
<td th:text="${volunteer.occupation}"></td>
<td th:text="${volunteer.pin_code}"></td>
<td th:text="${volunteer.preferred_area}"></td>
<td th:text="${volunteer.preferred_zones}"></td>
<td th:text="${volunteer.previous_volunteered}"></td>
<td th:text="${volunteer.vol_ncc}"></td>
<td th:text="${volunteer.vol_nss}"></td>
<td th:text="${volunteer.previous_volunteered} ? 'Yes' : 'No'"></td>
<td th:text="${volunteer.vol_ncc} ? 'Yes' : 'No'"></td>
<td th:text="${volunteer.vol_nss} ? 'Yes' : 'No'"></td>
<td th:text="${volunteer.refer_by}"></td>
<td th:text="${volunteer.cdate}"></td>
@ -310,12 +310,12 @@
<td th:text="${corporate.cnt_per_email}"></td>
<td th:text="${corporate.contact_per_mobile}"></td>
<td th:text="${corporate.contact_person}"></td>
<td th:text="${corporate.landline}"></td>
<td th:text="${corporate.landline == null or corporate.landline == 0} ? 'NA' : corporate.landline"></td>
<td th:text="${corporate.no_of_vol}"></td>
<td th:text="${corporate.pin_code}"></td>
<td th:text="${corporate.preferred_area}"></td>
<td th:text="${corporate.preferred_zones}"></td>
<td th:text="${corporate.previous_volunteered}"></td>
<td th:text="${corporate.previous_volunteered}? 'Yes' : 'No'"></td>
<td th:text="${corporate.sub_category}"></td>
<td th:text="${corporate.refer_by}"></td>
<td th:text="${corporate.cdate}"></td>
@ -368,6 +368,7 @@
<th>Org Email</th>
<th>Pincode</th>
<th>Preferred Area</th>
<th>Preferred Zone</th>
<th>Previous Volunteered</th>
<th>Sub Category</th>
<th>Refer By</th>
@ -385,14 +386,15 @@
<td th:text="${ngo.cnt_per_design}">0</td>
<td th:text="${ngo.cnt_per_email}">0</td>
<td th:text="${ngo.contact_person}">0</td>
<td th:text="${ngo.landline}">0</td>
<td th:text="${ngo.landline == null or ngo.landline == 0} ? 'NA' : ngo.landline"></td>
<td th:text="${ngo.mobile_no}">0</td>
<td th:text="${ngo.no_of_vol}">0</td>
<td th:text="${ngo.org_email}">0</td>
<td th:text="${ngo.pin_code}">0</td>
<td th:text="${ngo.preferred_area}">0</td>
<td th:text="${ngo.preferred_zones}">0</td>
<td th:text="${ngo.previous_volunteered}">0</td>
<td th:text="${ngo.previous_volunteered}? 'Yes' : 'No'"></td>
<td th:text="${ngo.sub_category}">0</td>
<td th:text="${ngo.refer_by}"></td>
<td th:text="${ngo.cdate}"></td>
@ -414,6 +416,7 @@
<th>Org Email</th>
<th>Pincode</th>
<th>Preferred Area</th>
<th>Preferred Zone</th>
<th>Previous Volunteered</th>
<th>Sub Category</th>
<th>Refer By</th>
@ -514,6 +517,49 @@
document.getElementById('logoutButton').addEventListener('click', function () {
window.location.href = 'kynreportlogin'
});
document.addEventListener("DOMContentLoaded", function () {
const fromDateInput = document.getElementById("fromdate");
const toDateInput = document.getElementById("todate");
const form = document.getElementById("myForm");
if (fromDateInput.value) {
toDateInput.min = fromDateInput.value;
}
if (toDateInput.value) {
fromDateInput.max = toDateInput.value;
}
fromDateInput.addEventListener("change", function () {
if (fromDateInput.value) {
toDateInput.min = fromDateInput.value;
} else {
toDateInput.removeAttribute("min");
}
});
toDateInput.addEventListener("change", function () {
if (toDateInput.value) {
fromDateInput.max = toDateInput.value;
} else {
fromDateInput.removeAttribute("max");
}
});
form.addEventListener("reset", function () {
setTimeout(function () {
fromDateInput.removeAttribute("max");
toDateInput.removeAttribute("min");
}, 0);
});
});
/* function reloadPage() {
location.reload();
} */
</script>

164
src/main/resources/templates/index.html

@ -201,10 +201,11 @@
</div>
<div class="container mt-5">
<div id="loader" style="display: none; text-align: center;">
<img src="images/Thin broken ring.gif" alt="Loading..." />
<img src="/images/Thin broken ring.gif" alt="Loading..." />
</div>
<form onsubmit="return validateForm();" id="myForm">
<!-- <form onsubmit="return validateForm();" id="myForm"> -->
<form id="myForm">
<!-- Dropdowns for selecting category and subcategory -->
@ -220,17 +221,17 @@
<div class="col-lg-6 col-md-12 mb-3">
<label for="category">Choose Category<span class="req">*</span></label>
<select class="form-control" id="category" onchange="handleCategoryChange()">
<option value="-1">Select</option>
<!-- <option value="-1">Select</option>
<option value="Individual">Individual</option>
<option value="Corporate">Corporate</option>
<option value="NGO">NGO/Other Associations</option>
<option value="NGO">NGO/Other Associations</option> -->
</select>
<span class="text-danger" id="categoryError"></span>
</div>
<div class="col-lg-6 col-md-12 mb-3">
<label for="subcategory">Choose Sub Category<span class="req">*</span></label>
<select class="form-control" id="subcategory">
<!-- <option value="-1">Select</option> -->
</select>
<span class="text-danger" id="subcategoryError"></span>
</div>
@ -880,7 +881,9 @@
</div>
<center>
<button type="submit" class="btn btn-primary" id="submitBtn">Submit</button>
<!-- <button type="submit" class="btn btn-primary" id="submitBtn">Submit</button> -->
<button type="button" class="btn btn-primary" id="submitBtn" onclick="validateForm()">Submit</button>
</center>
</div>
</div>
@ -895,16 +898,18 @@
onsubmit="return verifyOtp();">
<div class="modal-header">
<h6 class="modal-title m-0" id="exampleModalDefaultLabel">OTP Login</h6>
<button type="button" class="close" data-bs-dismiss="modal" aria-label="Close"
<button type="button" class="close" data-dismiss="modal" aria-label="Close"
style="color:black;border: white;background-color: white;">
<span aria-hidden="true">&times;</span>
</button>
</div>
<!-- End modal-header -->
<div class="modal-body">
<div class="row ">
<div class="mb-3" style="text-align: center;">
<img src="/volunteer/images/otp.png" width="50%" alt="Mobileotp">
<img src="https://gccservices.in/gcc/files/c_d/otp.png" width="50%" alt="Mobileotp">
</div>
</div>
<!-- End row -->
@ -942,8 +947,8 @@
</div>
<!-- End modal-body -->
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<button type="submit" class="btn btn-primary btn-sm" id="but">Verify OTP</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="submit" class="btn btn-primary" id="but">Verify OTP</button>
</div>
<!-- End modal-footer -->
</form>
@ -961,7 +966,7 @@
document.querySelector('.individual-form').style.display = 'none';
document.querySelector('.corporate-form').style.display = 'none';
document.querySelector('.ngo-form').style.display = 'none';
function handleCategoryChange() {
/* function handleCategoryChange() {
// Get selected category
var category = document.getElementById("category").value;
@ -994,7 +999,58 @@
document.querySelector('.ngo-form').style.display = 'block';
subcategory.innerHTML += `<option value="N/A">N/A</option>`;
}
} */
$(document).ready(function () {
$.ajax({
url: "/volunteer/api/registration/getAllCategory",
type: "GET",
success: function (categories) {
let categoryDropdown = $('#category');
categoryDropdown.append(`<option value="-1">Select</option>`);
categories.forEach(function (cat) {
categoryDropdown.append(`<option value="${cat.id}">${cat.category}</option>`);
});
}
});
});
function handleCategoryChange() {
var categoryId = $('#category').val();
// Hide all forms
$('.individual-form, .corporate-form, .ngo-form').hide();
// Clear and reset subcategory dropdown
let subcategory = $('#subcategory');
subcategory.empty().append('<option value="-1">Select</option>');
// Determine form visibility based on selected category name
let selectedText = $('#category option:selected').text();
if (selectedText === "Individual") {
$('.individual-form').show();
} else if (selectedText === "Corporate") {
$('.corporate-form').show();
} else if (selectedText === "NGO/Other Associations") {
$('.ngo-form').show();
}
// Fetch subcategories
if (categoryId !== "-1") {
$.ajax({
url: "/volunteer/api/registration/getSubCategoryById",
type: "GET",
data: { category_id: categoryId },
success: function (subcategories) {
subcategories.forEach(function (sub) {
subcategory.append(`<option value="${sub.id}">${sub.sub_category}</option>`);
});
}
});
}
}
function uncheckAnyArea() {
}
@ -1010,8 +1066,11 @@
let emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/;
let mobilePattern = /^[0-9]{10}$/;
let pincodePattern = /^[0-9]{6}$/;
function validateForm() {
var isValid = true;
$('.text-danger').text('');
var i = 0;
@ -1020,13 +1079,23 @@
i++;
};
});
var category = document.getElementById("category").value;
if (category == undefined || category === "-1") {
var category = document.getElementById("category");
var selectedTextcategory = category.options[category.selectedIndex].text;
//console.log("selectedTextcategory=="+selectedTextcategory);
if (selectedTextcategory === "Select") {
$("#categoryError").text("Please Select Category");
isValid = false;
}
if (category === "Individual") {
var subcategory = document.getElementById("subcategory").value;
var subcategory = document.getElementById("subcategory");
var selectedTextsubcategory = subcategory.options[subcategory.selectedIndex].text;
//console.log("selectedTextsubcategory=="+selectedTextsubcategory);
if (selectedTextsubcategory === "Select") {
$("#subcategoryError").text("Please Select SubCategory !");
isValid = false;
}
if (selectedTextcategory === "Individual") {
var name = document.getElementById("name").value = document.getElementById("name").value.trim();
var email = document.getElementById("email").value = document.getElementById("email").value.trim();
let genderSelected = document.querySelector('input[name="gender"]:checked');
@ -1044,10 +1113,9 @@
var dob = document.getElementById("dob").value = document.getElementById("dob").value.trim();
var aadhar = document.getElementById("aadhar").value = document.getElementById("aadhar").value.trim();
var bloodgroup = document.getElementById("bloodgroup").value;
if (subcategory == -1) {
$("#subcategoryError").text("Please Select SubCategory !");
isValid = false;
}
if (name == undefined || name == "") {
$("#nameError").text("Please Enter Name !");
isValid = false;
@ -1064,9 +1132,9 @@
// Check if verifiedOTP is disabled only during form submission
if ($('#verifiedOTP').prop('disabled')) {
Swal.fire({
title: "Error!",
title: "Warning!",
text: "OTP not Verified",
icon: "error",
icon: "warning",
confirmButtonText: "OK"
});
isValid = false; // Set isValid to false if verifiedOTP is disabled
@ -1126,14 +1194,12 @@
if (isValid) {
$("#submitBtn").prop("disabled", true);
//document.getElementById("submitBtn").disabled = true;
saveTheIndividualForm();
return false;
}
return false;
}
else if (category === "Corporate") {
else if (selectedTextcategory === "Corporate") {
var cmpName = document.getElementById("cmpName").value = document.getElementById("cmpName").value.trim();
var cmpEmail = document.getElementById("cmpEmail").value = document.getElementById("cmpEmail").value.trim();
var cmpLandline = document.getElementById("cmpLandline").value = document.getElementById("cmpLandline").value.trim();
@ -1182,20 +1248,18 @@
alert("Please select Preferred Area details !");
isValid = false;
}
if (isValid) {
/* if (isValid) {
saveCorporateDetails();
}
} */
if (isValid) {
// Disable the submit button
$("#submitBtn").prop("disabled", true);
//$("#submitBtn").prop("disabled", true);
saveCorporateDetails();
return false;
}
return false;
}
else if (category === "NGO") {
else if (selectedTextcategory === "NGO/Other Associations") {
var cmpName = document.getElementById("ngoOrgName").value = document.getElementById("ngoOrgName").value.trim();
var ngoOrgEmail = document.getElementById("ngoOrgEmail").value = document.getElementById("ngoOrgEmail").value.trim();
var cmpLandline = document.getElementById("oLandline").value = document.getElementById("oLandline").value.trim();
@ -1208,8 +1272,8 @@
var cmpPVolSelect = document.querySelector('input[name="oPvolY"]:checked');
var oPoE = document.getElementById("oPoE").value = document.getElementById("oPoE").value.trim();
if (cmpName == undefined || cmpName == "") {
$("#ngoOrgNameError").text("Please Enter Organisation Name");
if (cmpName == ""|| cmpName == undefined ) {
$("#ngoOrgNameError").text("Please Enter Organization Name");
isValid = false;
}
if (cmpAddress == undefined || cmpAddress == "") {
@ -1245,21 +1309,16 @@
isValid = false;
}
if (isValid) {
$("#submitBtn").prop("disabled", true);
saveNGODetails();
return false;
}
return false;
}
if (isValid) {
// Disable the submit button
//$("#submitBtn").prop("disabled", true);
$("#submitBtn").prop("disabled", true);
saveNGODetails();
return isValid; // Prevent default form submit in all cases
}
return false;
}
function saveTheIndividualForm() {
@ -1270,8 +1329,8 @@
// Create JSON object with form data
var volunteerData = {
category: $("#category").val(),
subCategory: $("#subcategory").val(),
category: $("#category option:selected").text(),
subCategory: $("#subcategory option:selected").text(),
name: $("#name").val(),
email: $("#email").val(),
dob: $("#dob").val(),
@ -1327,8 +1386,8 @@
preferredAreas.push($(this).val());
});
var copInfo = {
category: $("#category").val(),
subCategory: $("#subcategory").val(),
category: $("#category option:selected").text(),
subCategory: $("#subcategory option:selected").text(),
compName: $("#cmpName").val(),
compEmail: $("#cmpEmail").val(),
landline: $("#cmpLandline").val(),
@ -1377,18 +1436,18 @@
preferredAreas.push($(this).val());
});
var ngoInfo = {
category: $("#category").val(),
subCategory: $("#subcategory").val(),
category: $("#category option:selected").text(),
subCategory: $("#subcategory option:selected").text(),
orgName: $("#ngoOrgName").val(),
orgEmail: $("#ngoOrgEmail").val(),
landline: $("#oLandline").val(),
mobileNo: $("#oMobile").val(),
/* landline: $("#oLandline").val(),
mobileNo: $("#oMobile").val(), */
district: $("#oDistrict").val(),
address: $("#oAddress").val(),
pinCode: $("#oPincode").val(),
no_of_vol: $("#oNvol").val(),
contactPerson: $("#oPoc").val(),
contactPerMobile: $("#oPom").val(),
mobileNo: $("#oPom").val(),
cntPerEmail: $("#oPoE").val(),
cntPerDesign: $("#oPod").val(),
previous_volunteered: $("input[name='oPvolY']:checked").val(),
@ -1421,6 +1480,7 @@
}
function successPopup(id) {
$("#submitBtn").prop("disabled", true);
@ -1607,6 +1667,10 @@
}
}
</script>
</body>

471
src/main/resources/templates/kynreportlogin.html

@ -1,438 +1,189 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>GCC - Volunteers</title>
<!-- Bootstrap CSS -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<!-- SweetAlert CSS -->
<link
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
rel="stylesheet">
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<!-- SweetAlert2 CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.css">
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.css">
<!-- SweetAlert2 JavaScript -->
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<!-- Bootstrap JS -->
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.3.5/css/buttons.dataTables.min.css">
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.3.5/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/2.3.5/js/buttons.html5.min.js"></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/pdfmake.min.js"></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts.js"></script>
</head>
<style>
/* Header Styling */
.header {
background-color: #1d495a;
padding: 10px 20px;
display: flex;
align-items: center;
justify-content: space-between;
color: white;
font-family: Arial, sans-serif;
}
.header .logo {
display: flex;
align-items: center;
}
.header .logo img {
height: 60px;
}
.header .menu {
display: flex;
justify-content: center;
align-items: center;
flex-grow: 1;
margin-left: 20px;
}
.header .menu a {
color: white;
margin: 0 15px;
text-decoration: none;
}
.header .menu a:hover {
text-decoration: underline;
}
.footer {
background-color: #1d4859;
color: white;
position: fixed;
bottom: 0;
width: 100%;
padding: 20px;
}
.footer-content {
position: relative;
text-align: center;
font-size: 14px;
}
.footer-image {
position: absolute;
top: 50%;
transform: translateY(-50%);
opacity: 0.2;
/* Light opacity */
}
.left-image {
left: 10px;
}
.right-image {
right: 10px;
}
/* login CSS */
@import url('https://fonts.googleapis.com/css?family=Raleway:400,700');
* {
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: Raleway, sans-serif;
box-sizing: border-box;
}
body {
background: linear-gradient(90deg, #C7C5F4, #776BCC);
}
.container {
display: flex;
align-items: center;
justify-content: center;
font-family: 'Inter', sans-serif;
background: url('https://gccservices.in/volunteer/cd_waste_docs/images/web_bg1.jpeg') no-repeat center center/cover;
min-height: 100vh;
}
.screen {
background: linear-gradient(90deg, #5D54A4, #7C78B8);
position: relative;
height: 600px;
width: 360px;
box-shadow: 0px 0px 24px #5C5696;
}
.screen__content {
z-index: 1;
.login-container {
position: relative;
height: 100%;
}
.screen__background {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 0;
-webkit-clip-path: inset(0 0 0 0);
clip-path: inset(0 0 0 0);
}
.screen__background__shape {
transform: rotate(45deg);
position: absolute;
}
.screen__background__shape1 {
height: 520px;
width: 520px;
background: #FFF;
top: -50px;
right: 120px;
border-radius: 0 72px 0 0;
}
.screen__background__shape2 {
height: 220px;
width: 220px;
background: #6C63AC;
top: -172px;
right: 0;
border-radius: 32px;
width: 100%;
height: 100vh;
background: rgba(0, 72, 102, 0.65); /* Overlay blue tint */
display: flex;
justify-content: center;
align-items: center;
}
.screen__background__shape3 {
height: 540px;
width: 190px;
background: linear-gradient(270deg, #5D54A4, #6A679E);
top: -24px;
right: 0;
border-radius: 32px;
.login-box {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
/* padding: 3.5rem; */
padding-bottom:3.5rem;
padding-left:3.5rem;
padding-right:3.5rem;
padding-top:2rem;
border-radius: 16px;
/* width: 90%; */
max-width: 600px;
box-shadow: 0 8px 24px rgba(0,0,0,0.2);
text-align: center;
color: #fff;
}
.screen__background__shape4 {
height: 400px;
width: 200px;
background: #7E7BB9;
top: 420px;
right: 50px;
border-radius: 60px;
.login-box h2 {
margin-bottom: 1.5rem;
color: #000;
}
.login {
width: 320px;
padding: 30px;
padding-top: 156px;
.login-box form input[type="text"],
.login-box form input[type="password"] {
width: 100%;
padding: 0.8rem;
margin-bottom: 1rem;
border: none;
border-radius: 8px;
font-size: 1rem;
}
.login__field {
padding: 20px 0px;
.password-field {
position: relative;
}
.login__icon {
.password-field .toggle-password {
position: absolute;
top: 30px;
color: #7875B5;
}
.login__input {
border: none;
border-bottom: 2px solid #D1D1D4;
background: none;
padding: 10px;
padding-left: 24px;
font-weight: 700;
width: 75%;
transition: .2s;
right: 10px;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
}
.login__input:active,
.login__input:focus,
.login__input:hover {
outline: none;
border-bottom-color: #6A679E;
.forgot {
display: block;
margin-bottom: 1rem;
font-size: 0.9rem;
color: #f0f0f0;
text-decoration: none;
}
.login__submit {
background: #fff;
font-size: 14px;
margin-top: 30px;
padding: 16px 20px;
border-radius: 26px;
border: 1px solid #D4D3E8;
text-transform: uppercase;
font-weight: 700;
display: flex;
align-items: center;
button[type="submit"] {
background-color: #007bff;
color: white;
padding: 0.8rem;
width: 100%;
color: #4C489D;
box-shadow: 0px 2px 2px #5C5696;
border: none;
border-radius: 8px;
font-weight: bold;
cursor: pointer;
transition: .2s;
transition: background-color 0.3s ease;
}
.login__submit:active,
.login__submit:focus,
.login__submit:hover {
border-color: #6A679E;
outline: none;
button[type="submit"]:hover {
background-color: #0056b3;
}
.button__icon {
font-size: 24px;
margin-left: auto;
color: #7875B5;
}
.social-login {
position: absolute;
height: 140px;
width: 160px;
text-align: center;
bottom: 0px;
right: 0px;
color: #fff;
/* Responsive */
@media (max-width: 600px) {
.login-box {
padding: 1.5rem;
}
.social-icons {
display: flex;
align-items: center;
justify-content: center;
}
.social-login__icon {
padding: 20px 10px;
color: #fff;
text-decoration: none;
text-shadow: 0px 0px 8px #7875B5;
}
.social-login__icon:hover {
transform: scale(1.5);
}
</style>
</head>
<body style="background-color: #ebf1fa;">
<!-- Header Section -->
<!-- <div class="header">
Left Logo
<div class="logo">
<img src="https://gccservices.in/gcc/assets/images/logo.png" alt="Greater Chennai Corporation Logo">
<span class="ml-2">GREATER CHENNAI CORPORATION</span>
</div>
Center Menu
<div class="menu">
<a href="https://chennaicorporation.gov.in/gcc/">Home</a>
<a href="https://chennaicorporation.gov.in/gcc/about-GCC/">About GCC</a>
<a href="https://chennaicorporation.gov.in/gcc/who-is-who/index_data.jsp">Who'sWho</a>
<a href="https://chennaicorporation.gov.in/gcc/council/about-council/">Council</a>
<a href="https://chennaicorporation.gov.in/gcc/tender/">Tender</a>
<a href="https://chennaicorporation.gov.in/gcc/department/">Departments</a>
<a href="https://chennaicorporation.gov.in/gcc/online-services/">Online Services</a>
</div>
</div>-->
<div class="container">
<div class="screen">
<div class="screen__content">
<body>
<div class="login-container">
<div class="overlay">
<div class="login-box">
<img alt="No image" src="https://gccservices.in/gcc/assets/images/logo.png" style="height: 20%; width: 20%;margin-bottom: 5%;" class="mr-2">
<h2 style="color: white;font-weight: bold;">Volunteer Admin Portal</h2>
<form class="login" action="/login" method="post" onsubmit="return login();">
<div class="login__field">
<i class="login__icon fas fa-user"></i>
<input type="text" class="login__input" placeholder="Mobile Number" id="login-username"
name="login-username" maxlength="10" required>
</div>
<div class="login__field">
<i class="login__icon fas fa-lock"></i>
<input type="password" class="login__input" placeholder="Password" maxlength="4"
<input type="text"
class="login__input" placeholder="Mobile Number"
id="login-username" name="login-username" maxlength="10" required>
<div class="password-field">
<input type="password"
class="login__input" placeholder="Password" maxlength="4"
id="login-password" name="login-password" value="" required>
<!-- <span class="toggle-password">👁️</span> -->
</div>
<button class="button login__submit" type="submit">
<span class="button__text">Log In Now</span>
<i class="button__icon fas fa-chevron-right"></i>
</button>
<!-- <a href="#" class="forgot">Forgot Password?</a> -->
<button type="submit">Login</button>
</form>
<div th:if="${error}" class="error">
<p th:text="${error}"></p>
</div>
</div>
<div class="screen__background">
<span class="screen__background__shape screen__background__shape4"></span>
<span class="screen__background__shape screen__background__shape3"></span>
<span class="screen__background__shape screen__background__shape2"></span>
<span class="screen__background__shape screen__background__shape1"></span>
</div>
</div>
</div>
<!--<div class="container">
<section id="content" style="margin-top: 20%;">
<form action="/login" method="post" onsubmit="return login();">
<div>
<input type="number" maxlength="10" class="form-control" id="login-username" name="login-username"
placeholder="Mobile Number" value="" required>
</div>
<div>
<input type="password" maxlength="4" class="form-control" id="login-password" name="login-password"
placeholder="PIN Number" value="" required>
</div>
<div>
<button type="submit">Login</button>
</div>
</form>
Display error if login fails
<div th:if="${error}" class="error">
<p th:text="${error}"></p>
</div>
</section>
</div>-->
<!--<div class="footer">
<div class="footer-content">
<img src="/images/ripon.jpg" style="height: 51px; width: 155px;margin-top: 10px;" alt="Left Image"
class="footer-image left-image">
<p>Volunteer Registration System provided to Greater Chennai Corporation by Bonton Software Private Limited.
</p>
<img src="/images/ripon.jpg" style="height: 51px; width: 155px;margin-top: 10px;" alt="Right Image"
class="footer-image right-image">
</div>
</div>-->
<script>
/*function handleLogin(event) {
event.preventDefault(); // Prevent the default form submission
// Get username and password values
const username = document.getElementById('username').value;
const password = document.getElementById('password').value;
// Check credentials for different users
if (username === 'kynreport' && password === '1234') {
// Successful login for kynreport
Swal.fire({
title: 'Success!',
text: 'You have successfully logged in.',
icon: 'success',
}).then(() => {
window.location.href = 'kynreport'; // Redirect to kynreport page
});
} else if (username === 'admin' && password === '1234') {
// Successful login for admin
Swal.fire({
title: 'Success!',
text: 'You have successfully logged in.',
icon: 'success',
}).then(() => {
window.location.href = 'allreports'; // Redirect to allreports page
});
} else {
// Failed login
Swal.fire({
title: 'Error!',
text: 'Incorrect username or password.',
icon: 'error',
});
}
}*/
function login() {
var uname = $("#login-username").val();
var upass = $("#login-password").val();
$.ajax({
$
.ajax({
type : "GET",
url : '/volunteer/api/registration/login',
data : {
'uname' : uname,
'upass' : upass
},
}).done(function (response) {
})
.done(
function(response) {
// Handle the response here
if (response == "Error") {
console.error("Error:" + response);
$("#error").html("<p class='text-danger'>Invalid PIN or Mobile Number!<br>If you are a new user, please register as a new user.</p>");
/* $("#error")
.html(
"<p class='text-danger'>Invalid PIN or Mobile Number!<br>If you are a new user, please register as a new user.</p>"); */
Swal.fire({
icon: 'warning',
title: 'Invalid PIN or Mobile Number!',
text: 'If you are a new user, please register as a new user.'
});
} else {
if (response == "kyn") {
window.location.href = "kynreport";
} else if (response == "admin") {
window.location.href = "allreports";
}
else {
if (response == "kyn") {window.location.href = "kynreport";}
else if (response == "admin") {window.location.href = "allreports";}
}
}).fail(function(jqXHR, textStatus, errorThrown) {
@ -444,5 +195,5 @@
</script>
</body>
</html>

9
src/main/resources/templates/modules/wastecollectors/noidcard.html

@ -85,8 +85,17 @@
<div class="row justify-content-center align-items-center" style="height: 80vh;">
<div class="col-md-6 text-center">
<h3 th:text="${message}"></h3>
<button type="button" class="btn btn-success mt-2" onclick="goBack()">Back to Home</button>
</div>
</div>
</div>
<script type="text/javascript">
function goBack() {
window.location.href = '/volunteer/wastecollectors/index'; // Update the URL as per your project's structure
}
</script>
</body>
</html>

3
src/main/resources/templates/modules/wastecollectors/otp.html

@ -149,7 +149,8 @@
</div>
<input type="text" class="form-control" id="mobile"
placeholder="Enter Mobile Number" aria-label="Mobile"
aria-describedby="basic-addon1">
aria-describedby="basic-addon1"
title="Please enter a valid 10-digit mobile number">
<!-- <button class="btn btn-success" id="verifiedOTP" style="display:none" disabled>
<i class="fa fa-mobile-phone"></i> OTP Verified

6
src/main/resources/templates/modules/wastecollectors/register.html

@ -103,7 +103,7 @@
</div>
<div class="col-sm-12 col-md-6">
<label for="mobileNo">Your Mobile No<span
<label for="mobileNo">Your Mobile Number<span
class="required">*</span></label>
<input type="tel" class="form-control" id="mobileNo" name="mobileNo"
placeholder="Mobile No" required="required" minlength="10" maxlength="10"
@ -134,7 +134,7 @@
<div class="form-group">
<label for="vehicle_num">Your Vehicle Number (Fill without space)<span class="required">*</span></label>
<input type="text" class="form-control" id="vehicle_num" name="vehicle_num" required
minlength="9" maxlength="10" pattern="^[A-Za-z][A-Za-z0-9]{7,8}[0-9]$">
minlength="8" maxlength="10" pattern="^[A-Za-z]{1,2}[A-Za-z0-9]{5,7}[0-9]$">
</div>
<div class="form-group">
@ -176,7 +176,7 @@
</div>
</div>
<button type="button" class="btn btn-success ml-2"
<button type="button" class="btn btn-success ml-2 mt-2"
onclick="goBack()">Back</button>
</form>
</div>

Loading…
Cancel
Save