Browse Source

Clean and safe message template added

main
kanimozhi 8 months ago
parent
commit
d61a07540f
  1. 27
      gcc_officer_portal/src/main/java/in/gov/chennaicorporation/gccoffice/vendor/controller/CreateEventAPIController.java
  2. 201
      gcc_officer_portal/src/main/java/in/gov/chennaicorporation/gccoffice/vendor/service/createventService.java
  3. 25
      gcc_officer_portal/src/main/java/in/gov/chennaicorporation/gccoffice/vtrack/service/VehicleService.java
  4. 42
      gcc_officer_portal/src/main/resources/templates/modules/vendors/EventList.html
  5. 46
      gcc_officer_portal/src/main/resources/templates/modules/vendors/RequestList.html
  6. 215
      gcc_officer_portal/src/main/resources/templates/modules/vendors/streetVendorRequestForm.html

27
gcc_officer_portal/src/main/java/in/gov/chennaicorporation/gccoffice/vendor/controller/CreateEventAPIController.java

@ -76,7 +76,6 @@ public class CreateEventAPIController {
return ResponseEntity.badRequest().body(response);
}
String eventFilePath = StreetVendorService.fileUpload(file, "event_file");
if (eventFilePath == null) {
@ -86,7 +85,6 @@ public class CreateEventAPIController {
return ResponseEntity.internalServerError().body(response);
}
String saveStatus = createventservices.insertEvent(eventName, eventDate, eventFilePath, cby);
if (saveStatus == null || saveStatus.equalsIgnoreCase("error")) {
@ -96,7 +94,6 @@ public class CreateEventAPIController {
return ResponseEntity.internalServerError().body(response);
}
response.put("status", true);
response.put("message", "success");
response.put("description", "Details saved successfully");
@ -112,8 +109,6 @@ public class CreateEventAPIController {
}
}
// save file and get path
// private String saveFile(MultipartFile file) throws IOException {
//
@ -121,7 +116,9 @@ public class CreateEventAPIController {
//
// String folderName = environment.getProperty("vending.foldername");
//
// String fileName = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd_HHmmss")) + "_" + file.getOriginalFilename();
// String fileName =
// LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd_HHmmss")) +
// "_" + file.getOriginalFilename();
//
// String folderPath = uploadDirectory + "/" + folderName + "/";
//
@ -138,11 +135,10 @@ public class CreateEventAPIController {
// return filePath.toAbsolutePath().toString();
// }
@GetMapping("/dropdown-Event")
public ResponseEntity<List<Map<String, Object>>> ViewDropdownEvent() {
public ResponseEntity<List<Map<String, Object>>> ViewDropdownEvent(@RequestParam String userId) {
try {
List<Map<String, Object>> result = createventservices.ViewDropdownEvent();
List<Map<String, Object>> result = createventservices.ViewDropdownEvent(userId);
return ResponseEntity.ok(result);
} catch (Exception e) {
Map<String, Object> error = new HashMap<>();
@ -153,11 +149,10 @@ public class CreateEventAPIController {
}
}
@GetMapping("/committedropdown")
public List<Map<String, Object>> ViewCommitteeDropdownEvent() {
public List<Map<String, Object>> ViewCommitteeDropdownEvent(@RequestParam String userId) {
return createventservices.ViewCommitteeDropdownEvent();
return createventservices.ViewCommitteeDropdownEvent(userId);
}
@ -170,15 +165,16 @@ public class CreateEventAPIController {
@RequestParam String userId) {
List<Map<String, Object>> streetdb = StreetVendorService.getdataforreport(zone, ward); // BASE LIST
List<Map<String, Object>> vendingdb = createventservices.getdataforreport(meeting, status,userId); // FILTERED REQUEST LIST
List<Map<String, Object>> vendingdb = createventservices.getdataforreport(meeting, status, userId); // FILTERED
// REQUEST
// LIST
// Convert vendingdb to map: vdid → vendor record
Map<Integer, Map<String, Object>> vendingMap = vendingdb.stream()
.filter(m -> m.get("vdid") != null)
.collect(Collectors.toMap(
m -> Integer.parseInt(m.get("vdid").toString()),
m -> m
));
m -> m));
List<Map<String, Object>> finalList = new ArrayList<>();
@ -213,5 +209,4 @@ public class CreateEventAPIController {
return createventservices.finalvendorDetailsById(requestId);
}
}

201
gcc_officer_portal/src/main/java/in/gov/chennaicorporation/gccoffice/vendor/service/createventService.java

@ -42,8 +42,10 @@ private JdbcTemplate jdbcTemplate;
// public boolean isFileExists(String originalFilename) {
// String sql = "SELECT COUNT(*) FROM create_event " +
// "WHERE file_url LIKE ?";
// String filenamePattern = "%" + originalFilename; // Match filename at the end of the path
// Integer count = jdbcTemplate.queryForObject(sql, Integer.class, filenamePattern);
// String filenamePattern = "%" + originalFilename; // Match filename at the end
// of the path
// Integer count = jdbcTemplate.queryForObject(sql, Integer.class,
// filenamePattern);
// return count != null && count > 0;
// }
@ -60,17 +62,17 @@ private JdbcTemplate jdbcTemplate;
}
// SELECT * FROM vendingcommitte.create_event
public List<Map<String, Object>> ViewDropdownEvent() {
String sql = "SELECT * FROM create_event WHERE isactive=1 AND isdelete=0";
return jdbcTemplate.queryForList(sql);
public List<Map<String, Object>> ViewDropdownEvent(String userId) {
String sql = "SELECT * FROM create_event WHERE cby=? AND isactive=1 AND isdelete=0 ";
return jdbcTemplate.queryForList(sql, userId);
}
public List<Map<String, Object>> ViewCommitteeDropdownEvent() {
public List<Map<String, Object>> ViewCommitteeDropdownEvent(String userId) {
String sql = "SELECT req_id,event_name,event_date,DATE_FORMAT(event_date, '%d-%m-%Y') as formated_date "
+ "FROM create_event "
+ "WHERE isactive=1 AND isdelete=0";
+ "WHERE isactive=1 AND isdelete=0 AND cby=?";
try {
return jdbcTemplate.queryForList(sql);
return jdbcTemplate.queryForList(sql, userId);
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
@ -96,16 +98,19 @@ private JdbcTemplate jdbcTemplate;
try {
/* ============================================================
/*
* ============================================================
* CHECK IF vendor is already inside vendor_postponed_list
* ============================================================ */
* ============================================================
*/
String checkPostponedSQL = "SELECT * FROM vendor_postponed_list WHERE vdid=? AND isactive=1";
List<Map<String, Object>> existingPostponed =
jdbcTemplate.queryForList(checkPostponedSQL, vendor_req_id);
List<Map<String, Object>> existingPostponed = jdbcTemplate.queryForList(checkPostponedSQL, vendor_req_id);
/* ============================================================
/*
* ============================================================
* BACKUP METHOD: insert into postponed_history_log
* ============================================================ */
* ============================================================
*/
if (!existingPostponed.isEmpty()) {
String backupSQL = "INSERT INTO postponed_history_log "
@ -116,9 +121,11 @@ private JdbcTemplate jdbcTemplate;
jdbcTemplate.update(backupSQL, vendor_req_id);
}
/* ============================================================
/*
* ============================================================
* CASE 1: POSTPONED
* ============================================================ */
* ============================================================
*/
if ("Postponed".equalsIgnoreCase(status)) {
if (existingPostponed.isEmpty()) {
@ -145,9 +152,11 @@ private JdbcTemplate jdbcTemplate;
return ResponseEntity.ok(response);
}
/* ============================================================
/*
* ============================================================
* CASE 2: APPROVED / REJECTED → Insert into vendor_request_list
* ============================================================ */
* ============================================================
*/
String insertRequestSQL = "INSERT INTO vendor_request_list "
+ "(vdid, status, remarks, event_req_id, cby) VALUES (?, ?, ?, ?, ?)";
@ -166,9 +175,11 @@ private JdbcTemplate jdbcTemplate;
int generatedId = keyHolder.getKey().intValue();
/* ============================================================
/*
* ============================================================
* Assign UID only for APPROVED
* ============================================================ */
* ============================================================
*/
if ("Approved".equalsIgnoreCase(status)) {
String currentYear = java.time.Year.now().toString();
String uid_no = zone + "_" + ward + "_" + currentYear + "_" + generatedId;
@ -176,9 +187,11 @@ private JdbcTemplate jdbcTemplate;
jdbcTemplate.update("UPDATE vendor_request_list SET uid_no=? WHERE id=?", uid_no, generatedId);
}
/* ============================================================
/*
* ============================================================
* If POSTPONED ENTRY already exists → update it (after backup)
* ============================================================ */
* ============================================================
*/
if (!existingPostponed.isEmpty()) {
String updSQL = "UPDATE vendor_postponed_list SET "
@ -188,9 +201,11 @@ private JdbcTemplate jdbcTemplate;
jdbcTemplate.update(updSQL, status, remarks, event_req_id, cby, vendor_req_id);
}
/* ============================================================
/*
* ============================================================
* Send WhatsApp notification
* ============================================================ */
* ============================================================
*/
String result = sendWhatsappMsg(mob_no, status, vendor_req_number);
response.put("status", "success");
@ -207,16 +222,19 @@ private JdbcTemplate jdbcTemplate;
}
}
private String sendWhatsappMsg(String mob_no, String status, String vendor_req_number) {
String urlString = "";
if ("Approved".equals(status)) {
urlString="https://media.smsgupshup.com/GatewayAPI/rest?userid=2000233507&password=h2YjFNcJ&send_to="+mob_no+"&v=1.1&format=json&msg_type=TEXT&method=SENDMESSAGE&msg=You+are+recognized+as+a+roadside+vendor.+Registration+number%3A+"+vendor_req_number+".&isTemplate=true&footer=GCC+-+IT+Cell";
}
else {
urlString="https://media.smsgupshup.com/GatewayAPI/rest?userid=2000233507&password=h2YjFNcJ&send_to="+mob_no+"&v=1.1&format=json&msg_type=TEXT&method=SENDMESSAGE&msg=Your+application+is+rejected+because+your+roadside+vendor+details+are+incorrect.+%0A%0ARegistration+Number%3A+"+vendor_req_number+".";
urlString = "https://media.smsgupshup.com/GatewayAPI/rest?userid=2000233507&password=h2YjFNcJ&send_to="
+ mob_no
+ "&v=1.1&format=json&msg_type=TEXT&method=SENDMESSAGE&msg=You+are+recognized+as+a+roadside+vendor.+Registration+number%3A+"
+ vendor_req_number + ".&isTemplate=true&footer=GCC+-+IT+Cell";
} else {
urlString = "https://media.smsgupshup.com/GatewayAPI/rest?userid=2000233507&password=h2YjFNcJ&send_to="
+ mob_no
+ "&v=1.1&format=json&msg_type=TEXT&method=SENDMESSAGE&msg=Your+application+is+rejected+because+your+roadside+vendor+details+are+incorrect.+%0A%0ARegistration+Number%3A+"
+ vendor_req_number + ".";
}
String res = hitURL(urlString);
@ -256,7 +274,8 @@ private JdbcTemplate jdbcTemplate;
}
// @Transactional
// public ResponseEntity<Map<String, Object>> saveBulkVendorDetails(Map<String, Object> payload) {
// public ResponseEntity<Map<String, Object>> saveBulkVendorDetails(Map<String,
// Object> payload) {
//
// Map<String, Object> response = new HashMap<>();
//
@ -276,7 +295,8 @@ private JdbcTemplate jdbcTemplate;
// }
//
// String insertSQL = "INSERT INTO vendor_request_list " +
// "(vdid, status, remarks, event_req_id, uid_no, cby) VALUES (?, ?, ?, ?, '', ?)";
// "(vdid, status, remarks, event_req_id, uid_no, cby) VALUES (?, ?, ?, ?, '',
// ?)";
//
// try {
// jdbcTemplate.batchUpdate(insertSQL, vendorList, vendorList.size(),
@ -291,7 +311,8 @@ private JdbcTemplate jdbcTemplate;
// } catch (Exception e) {
// e.printStackTrace();
// return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
// .body(Map.of("status", "Error", "message", "Batch insert failed: " + e.getMessage()));
// .body(Map.of("status", "Error", "message", "Batch insert failed: " +
// e.getMessage()));
// }
//
//
@ -304,7 +325,8 @@ private JdbcTemplate jdbcTemplate;
// } catch (Exception e) {
// e.printStackTrace();
// return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
// .body(Map.of("status", "Error", "message", "Failed to fetch inserted IDs: " + e.getMessage()));
// .body(Map.of("status", "Error", "message", "Failed to fetch inserted IDs: " +
// e.getMessage()));
// }
//
//
@ -328,7 +350,8 @@ private JdbcTemplate jdbcTemplate;
//
// // Send WhatsApp for Approved/Rejected
// try {
// if ("Approved".equalsIgnoreCase(status) || "Rejected".equalsIgnoreCase(status)) {
// if ("Approved".equalsIgnoreCase(status) ||
// "Rejected".equalsIgnoreCase(status)) {
// sendWhatsappMsg(
// vendor.get("mob_no").toString(),
// status,
@ -343,11 +366,13 @@ private JdbcTemplate jdbcTemplate;
//
// if (!updateParams.isEmpty()) {
// try {
// jdbcTemplate.batchUpdate("UPDATE vendor_request_list SET uid_no=? WHERE id=?", updateParams);
// jdbcTemplate.batchUpdate("UPDATE vendor_request_list SET uid_no=? WHERE
// id=?", updateParams);
// } catch (Exception e) {
// e.printStackTrace();
// return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
// .body(Map.of("status", "Error", "message", "Failed to update UID numbers: " + e.getMessage()));
// .body(Map.of("status", "Error", "message", "Failed to update UID numbers: " +
// e.getMessage()));
// }
// }
//
@ -359,7 +384,8 @@ private JdbcTemplate jdbcTemplate;
// } catch (Exception e) {
// e.printStackTrace();
// return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
// .body(Map.of("status", "Error", "message", "Unexpected error: " + e.getMessage()));
// .body(Map.of("status", "Error", "message", "Unexpected error: " +
// e.getMessage()));
// }
// }
@ -374,8 +400,7 @@ private JdbcTemplate jdbcTemplate;
int eventReqId = Integer.parseInt(payload.get("event_req_id").toString());
String cby = payload.get("cby").toString();
List<Map<String, Object>> vendorList =
(List<Map<String, Object>>) payload.get("vendorList");
List<Map<String, Object>> vendorList = (List<Map<String, Object>>) payload.get("vendorList");
if (vendorList == null || vendorList.isEmpty()) {
return ResponseEntity.badRequest()
@ -384,9 +409,11 @@ private JdbcTemplate jdbcTemplate;
int currentYear = java.time.Year.now().getValue();
/* ============================================================
/*
* ============================================================
* PROCESS EACH VENDOR ONE BY ONE
* ============================================================ */
* ============================================================
*/
for (Map<String, Object> vendor : vendorList) {
int vendorReqId = Integer.parseInt(vendor.get("vendor_req_id").toString());
@ -395,18 +422,21 @@ private JdbcTemplate jdbcTemplate;
String mob_no = vendor.get("mob_no").toString();
String vendor_req_number = vendor.get("vendor_req_number").toString();
/* ============================================================
/*
* ============================================================
* STEP 1: Check if vendor already exists in postponed list
* ============================================================ */
* ============================================================
*/
String checkSQL = "SELECT * FROM vendor_postponed_list WHERE vdid=? AND isactive=1";
List<Map<String, Object>> existingPostponed =
jdbcTemplate.queryForList(checkSQL, vendorReqId);
List<Map<String, Object>> existingPostponed = jdbcTemplate.queryForList(checkSQL, vendorReqId);
boolean postponedExists = !existingPostponed.isEmpty();
/* ============================================================
/*
* ============================================================
* STEP 2: BACKUP OLD POSTPONED ROW → postponed_history_log
* ============================================================ */
* ============================================================
*/
if (postponedExists) {
String backupSQL = "INSERT INTO postponed_history_log "
+ "(vdid, event_req_id, status, remarks, cby, cdate, updated_by, updated_date, isactive, isdelete) "
@ -416,23 +446,25 @@ private JdbcTemplate jdbcTemplate;
jdbcTemplate.update(backupSQL, vendorReqId);
}
/* ============================================================
/*
* ============================================================
* CASE 1: STATUS = POSTPONED
* ============================================================ */
* ============================================================
*/
if ("Postponed".equalsIgnoreCase(status)) {
if (!postponedExists) {
// INSERT NEW POSTPONED ROW
String insertPostSQL =
"INSERT INTO vendor_postponed_list (vdid, status, remarks, event_req_id, cby) " +
String insertPostSQL = "INSERT INTO vendor_postponed_list (vdid, status, remarks, event_req_id, cby) "
+
"VALUES (?, ?, ?, ?, ?)";
jdbcTemplate.update(insertPostSQL, vendorReqId, status, remarks, eventReqId, cby);
} else {
// UPDATE EXISTING POSTPONED ROW
String updatePostSQL =
"UPDATE vendor_postponed_list SET status=?, remarks=?, event_req_id=?, updated_by=?, updated_date=NOW() " +
String updatePostSQL = "UPDATE vendor_postponed_list SET status=?, remarks=?, event_req_id=?, updated_by=?, updated_date=NOW() "
+
"WHERE vdid=?";
jdbcTemplate.update(updatePostSQL, status, remarks, eventReqId, cby, vendorReqId);
@ -441,14 +473,15 @@ private JdbcTemplate jdbcTemplate;
continue; // SKIP REQUEST LIST INSERTION
}
/* ============================================================
/*
* ============================================================
* CASE 2: APPROVED / REJECTED → INSERT INTO vendor_request_list
* ============================================================ */
* ============================================================
*/
KeyHolder keyHolder = new GeneratedKeyHolder();
String insertReqSQL =
"INSERT INTO vendor_request_list (vdid, status, remarks, event_req_id, cby) " +
String insertReqSQL = "INSERT INTO vendor_request_list (vdid, status, remarks, event_req_id, cby) " +
"VALUES (?, ?, ?, ?, ?)";
jdbcTemplate.update(connection -> {
@ -463,33 +496,38 @@ private JdbcTemplate jdbcTemplate;
int generatedId = keyHolder.getKey().intValue();
/* ============================================================
/*
* ============================================================
* UID GENERATION FOR APPROVED
* ============================================================ */
* ============================================================
*/
if ("Approved".equalsIgnoreCase(status)) {
String uidNo = zone + "_" + ward + "_" + currentYear + "_" + generatedId;
jdbcTemplate.update(
"UPDATE vendor_request_list SET uid_no=? WHERE id=?",
uidNo, generatedId
);
uidNo, generatedId);
}
/* ============================================================
/*
* ============================================================
* UPDATE POSTPONED LIST ALSO IF VENDOR EXISTS (AFTER BACKUP)
* ============================================================ */
* ============================================================
*/
if (postponedExists) {
String updatePostSQL =
"UPDATE vendor_postponed_list SET status=?, remarks=?, event_req_id=?, updated_by=?, updated_date=NOW(),isactive=0,isdelete=1 " +
String updatePostSQL = "UPDATE vendor_postponed_list SET status=?, remarks=?, event_req_id=?, updated_by=?, updated_date=NOW(),isactive=0,isdelete=1 "
+
"WHERE vdid=?";
jdbcTemplate.update(updatePostSQL, status, remarks, eventReqId, cby, vendorReqId);
}
/* ============================================================
/*
* ============================================================
* SEND WHATSAPP (NON-BLOCKING)
* ============================================================ */
* ============================================================
*/
try {
if ("Approved".equalsIgnoreCase(status) || "Rejected".equalsIgnoreCase(status)) {
sendWhatsappMsg(mob_no, status, vendor_req_number);
@ -499,9 +537,11 @@ private JdbcTemplate jdbcTemplate;
}
}
/* ============================================================
/*
* ============================================================
* SUCCESS RESPONSE
* ============================================================ */
* ============================================================
*/
response.put("status", "success");
response.put("message", "Vendor details submitted successfully!");
@ -515,9 +555,6 @@ private JdbcTemplate jdbcTemplate;
}
}
public List<Map<String, Object>> getsavedids() {
String sql = "SELECT vdid FROM vendor_request_list WHERE isactive=1";
try {
@ -547,9 +584,7 @@ private JdbcTemplate jdbcTemplate;
" UNION ALL " +
" SELECT vdid, status, remarks, NULL AS uid_no, event_req_id, cdate,cby " +
" FROM vendor_postponed_list " +
") AS all_requests WHERE 1=1"
);
") AS all_requests WHERE 1=1");
List<Object> params = new ArrayList<>();
@ -578,7 +613,6 @@ private JdbcTemplate jdbcTemplate;
}
}
public List<Map<String, Object>> finalvendorDetailsById(String requestId) {
// Base vendor details (1 row)
@ -605,12 +639,9 @@ private JdbcTemplate jdbcTemplate;
return output;
}
private List<Map<String, Object>> getvendingfinaldata(String requestId) {
String sql =
"SELECT all_logs.vdid, " +
String sql = "SELECT all_logs.vdid, " +
" all_logs.vc_status, " +
" all_logs.vc_remarks, " +
" CONCAT_WS('- ', ce.event_name, DATE_FORMAT(ce.event_date, '%d-%m-%Y')) AS event_name, " +
@ -650,8 +681,6 @@ private JdbcTemplate jdbcTemplate;
}
}
public Map<String, Object> getLatestPostponed(String vdid) {
String sql = "SELECT status, remarks, DATE_FORMAT(cdate, '%d-%m-%Y %l:%i %p') AS date " +
@ -670,7 +699,6 @@ private JdbcTemplate jdbcTemplate;
return jdbcTemplate.queryForList(sql, vdid);
}
public Map<String, Object> checkVendorInVendingTables(Integer vdid) {
Map<String, Object> result = new HashMap<>();
@ -684,8 +712,7 @@ private JdbcTemplate jdbcTemplate;
}
// 2. Check vendor_request_list (latest status)
String sqlRequest =
"SELECT status FROM vendor_request_list WHERE vdid=? AND isactive=1 ORDER BY id DESC LIMIT 1";
String sqlRequest = "SELECT status FROM vendor_request_list WHERE vdid=? AND isactive=1 ORDER BY id DESC LIMIT 1";
List<Map<String, Object>> reqList = jdbcTemplate.queryForList(sqlRequest, vdid);
if (reqList.isEmpty()) {
@ -699,6 +726,4 @@ private JdbcTemplate jdbcTemplate;
return result;
}
}

25
gcc_officer_portal/src/main/java/in/gov/chennaicorporation/gccoffice/vtrack/service/VehicleService.java

@ -671,7 +671,7 @@ public class VehicleService {
break;
case "23":
System.out.println("TempID is 22 (1590940 - Green Committee Report - IMAGE - STATIC)");
System.out.println("TempID is 23 (1590940 - Green Committee Report - IMAGE - STATIC)");
urlString = "https://media.smsgupshup.com/GatewayAPI/rest?"
+ "userid=" + username
+ "&password=" + password
@ -693,6 +693,29 @@ public class VehicleService {
break;
case "24":
System.out.println("TempID is 24 (1590940 - Clean and Safe Guidelines - IMAGE - STATIC)");
urlString = "https://media.smsgupshup.com/GatewayAPI/rest?"
+ "userid=" + username
+ "&password=" + password
+ "&send_to=" + sendTo
+ "&v=1.1&format=json"
+ "&msg_type=IMAGE"
+ "&method=SENDMEDIAMESSAGE"
+ "&caption=%2AGCC+Enforcement+Team+Monitoring%2A%0A%0AToday%27s+%28" + msgDate
+ "%29+Zone+wise+Enforcement+Team+activity+details+shared+above+for+your+reference.%0A%0AFor+more+details%2C+please+click+the+link+below."
+ "&media_url=" + fileURL
+ "&isTemplate=true&footer=GCC+-+IT+Cell";
urlString = "https://sendapiv1.pinbot.ai/pinwa/sendMessage?type=template"
+ "&apikey=" + apikey
+ "&from=" + from
+ "&to={{to}}&templateid=2784943"
+ "&url=" + fileURL
+ "&placeholders=Clean%20and%20Safe%20Construction%20-%20Vehicle%20Violation";
break;
default:
System.out.println("TempID (" + tempid + ") is unknown");
}

42
gcc_officer_portal/src/main/resources/templates/modules/vendors/EventList.html

@ -1,22 +1,25 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{fragments/modules/base/head :: head}"></head>
<style>
.required {
color: red;
}
/* Mobile screens - targeting devices with a max width of 767px */
@media (max-width: 767px)
{
@media (max-width: 767px) {
#requestlistform label {
margin-top: 10px;
}
}
#viewModal .modal-body {
max-height: 70vh; /* Limit the height to 70% of the viewport */
overflow-y: auto; /* Enable vertical scrolling */
max-height: 70vh;
/* Limit the height to 70% of the viewport */
overflow-y: auto;
/* Enable vertical scrolling */
}
.custom-doc-btn {
@ -58,6 +61,7 @@ padding-bottom: 10px;
border-top: 1px solid #ccc;
}
</style>
<body>
<!--[if lt IE 8]>
@ -89,8 +93,8 @@ padding-bottom: 10px;
<div class="col-lg-4">
<nav class="breadcrumb-container" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/gcc/index"><i
class="ik ik-home"></i></a></li>
<li class="breadcrumb-item"><a href="/gcc/index"><i class="ik ik-home"></i></a>
</li>
<li class="breadcrumb-item" aria-current="page">Vending Committe</li>
<li class="breadcrumb-item active" aria-current="page">Meeting List</li>
</ol>
@ -105,7 +109,9 @@ padding-bottom: 10px;
<div class="col-md-12">
<div class="card">
<div class="card-header">
<span style="font-size: medium;font-weight: bold;">Reports Filters</span><span th:text="${LoginUserId}" id="userIdSpan" style="display: none;"></span><span th:text="${zone}" id="userzone" style="display: none;"></span>
<span style="font-size: medium;font-weight: bold;">Reports Filters</span><span
th:text="${LoginUserId}" id="userIdSpan" style="display: none;"></span><span
th:text="${zone}" id="userzone" style="display: none;"></span>
</div>
<div class="card-body">
<div class="row">
@ -153,8 +159,8 @@ padding-bottom: 10px;
<div class="col-12 d-flex justify-content-center">
<button class="btn btn-primary" id="submitBtn">Submit</button>
<button class="btn btn-danger mx-2" id="resetBtn"
name="reset" type="reset">Reset</button>
<button class="btn btn-danger mx-2" id="resetBtn" name="reset"
type="reset">Reset</button>
</div>
</div>
@ -162,11 +168,13 @@ padding-bottom: 10px;
<div class="card-block">
<div class="page-header-title">
<h5 style="margin: 0;font-weight: bold;">Vendors Meeting List</h5><hr>
<h5 style="margin: 0;font-weight: bold;">Vendors Meeting List</h5>
<hr>
</div>
<table id="RequestListDatatable" class="table table-striped table-bordered table-hover dataTable" role="grid">
<table id="RequestListDatatable"
class="table table-striped table-bordered table-hover dataTable" role="grid">
<thead class="thead-dark">
<tr role="row">
<th class="text-center">S.No</th>
@ -213,7 +221,8 @@ padding-bottom: 10px;
<!-- Modal -->
<div class="modal fade" id="viewModal" tabindex="-1" aria-labelledby="viewModalLabel" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
<div class="modal fade" id="viewModal" tabindex="-1" aria-labelledby="viewModalLabel" aria-hidden="true"
data-bs-backdrop="static" data-bs-keyboard="false">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
@ -245,7 +254,8 @@ padding-bottom: 10px;
</div>
<div id="pageLoader" style="display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.8); z-index: 9999; text-align: center;">
<div id="pageLoader"
style="display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.8); z-index: 9999; text-align: center;">
<div style="position: relative; top: 50%; transform: translateY(-50%);">
<div class="spinner-border text-primary" role="status" style="width: 3rem; height: 3rem;">
<span class="sr-only">Loading...</span>
@ -347,7 +357,7 @@ padding-bottom: 10px;
});
fetchEventDropdown();
fetchEventDropdown(userId);
let zoneString = userzone; // e.g. "01,02,03,04,05"
if (zoneString) {
@ -758,10 +768,11 @@ padding-bottom: 10px;
}
// Call this function on page load
function fetchEventDropdown() {
function fetchEventDropdown(userId) {
$.ajax({
url: '/gcc/api/vending/committedropdown',
type: 'GET',
data: { userId: userId },
dataType: 'json',
success: function (data) {
let eventDropdown = $('#meetingdropdown');
@ -790,4 +801,5 @@ padding-bottom: 10px;
</script>
</body>
</html>

46
gcc_officer_portal/src/main/resources/templates/modules/vendors/RequestList.html

@ -1,22 +1,25 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{fragments/modules/base/head :: head}"></head>
<style>
.required {
color: red;
}
/* Mobile screens - targeting devices with a max width of 767px */
@media (max-width: 767px)
{
@media (max-width: 767px) {
#requestlistform label {
margin-top: 10px;
}
}
#viewModal .modal-body {
max-height: 70vh; /* Limit the height to 70% of the viewport */
overflow-y: auto; /* Enable vertical scrolling */
max-height: 70vh;
/* Limit the height to 70% of the viewport */
overflow-y: auto;
/* Enable vertical scrolling */
}
.custom-doc-btn {
@ -58,6 +61,7 @@ padding-bottom: 10px;
border-top: 1px solid #ccc;
}
</style>
<body>
<!--[if lt IE 8]>
@ -89,8 +93,8 @@ padding-bottom: 10px;
<div class="col-lg-4">
<nav class="breadcrumb-container" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/gcc/index"><i
class="ik ik-home"></i></a></li>
<li class="breadcrumb-item"><a href="/gcc/index"><i class="ik ik-home"></i></a>
</li>
<li class="breadcrumb-item" aria-current="page">Vending Committe</li>
<li class="breadcrumb-item active" aria-current="page">Request List</li>
</ol>
@ -124,11 +128,16 @@ padding-bottom: 10px;
</div>
</div>
<div class="page-header-title">
<h5 style="margin: 0;font-weight: bold;"><span th:text="${zone}" id="userzone" style="display: none;"></span>Vendors Request List</h5><span th:text="${LoginUserId}" id="userIdSpan" style="display: none;"></span><hr>
<h5 style="margin: 0;font-weight: bold;"><span th:text="${zone}" id="userzone"
style="display: none;"></span>Vendors Request List</h5><span
th:text="${LoginUserId}" id="userIdSpan" style="display: none;"></span>
<hr>
</div>
<div>
<table id="RequestListDatatable" class="table table-striped table-bordered table-hover dataTable" role="grid">
<table id="RequestListDatatable"
class="table table-striped table-bordered table-hover dataTable"
role="grid">
<thead class="thead-dark">
<tr role="row">
<th class="text-center">S.No</th>
@ -167,7 +176,8 @@ padding-bottom: 10px;
<div class="card-block">
<div class="row">
<div class="col-md-6">
<label for="bulkstatus">Select Status<span class="text-danger">*</span> </label>
<label for="bulkstatus">Select Status<span class="text-danger">*</span>
</label>
<select id="bulkstatus" class="form-control">
<option value="">Select</option>
<option value="Approved">Approved</option>
@ -176,12 +186,14 @@ padding-bottom: 10px;
</select>
</div>
<div class="col-md-6">
<label for="bulkremarks">Remarks<span class="text-danger">*</span></label><br>
<label for="bulkremarks">Remarks<span
class="text-danger">*</span></label><br>
<textarea rows="2" id="bulkremarks" class="form-control"></textarea>
</div>
<div class="col-md-12">
<div class="text-center mt-4">
<button type="button" class="btn btn-primary" id="bulksubmitBtn">Submit</button>
<button type="button" class="btn btn-primary"
id="bulksubmitBtn">Submit</button>
</div>
</div>
</div>
@ -200,7 +212,8 @@ padding-bottom: 10px;
<!-- Modal -->
<!-- Modal -->
<div class="modal fade" id="viewModal" tabindex="-1" aria-labelledby="viewModalLabel" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
<div class="modal fade" id="viewModal" tabindex="-1" aria-labelledby="viewModalLabel" aria-hidden="true"
data-bs-backdrop="static" data-bs-keyboard="false">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
@ -232,7 +245,8 @@ padding-bottom: 10px;
</div>
<div id="pageLoader" style="display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.8); z-index: 9999; text-align: center;">
<div id="pageLoader"
style="display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.8); z-index: 9999; text-align: center;">
<div style="position: relative; top: 50%; transform: translateY(-50%);">
<div class="spinner-border text-primary" role="status" style="width: 3rem; height: 3rem;">
<span class="sr-only">Loading...</span>
@ -337,7 +351,7 @@ padding-bottom: 10px;
// Trigger on page load
fetchEventDropdown();
fetchEventDropdown(userId);
let zoneString = userzone; // e.g. "01,02,03,04,05"
@ -1096,10 +1110,11 @@ padding-bottom: 10px;
}
// Call this function on page load
function fetchEventDropdown() {
function fetchEventDropdown(userId) {
$.ajax({
url: '/gcc/api/vending/dropdown-Event',
type: 'GET',
data: { userId: userId },
dataType: 'json',
success: function (data) {
let eventDropdown = $('#dropdownevent');
@ -1125,4 +1140,5 @@ padding-bottom: 10px;
</script>
</body>
</html>

215
gcc_officer_portal/src/main/resources/templates/modules/vendors/streetVendorRequestForm.html

@ -1,10 +1,12 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{fragments/modules/base/head :: head}"></head>
<style>
.required {
color: red;
}
#modalBody h4 {
font-weight: bold;
margin-top: 15px;
@ -18,6 +20,7 @@
#modalBody hr {
margin: 15px 0;
}
.comment {
margin-bottom: 20px;
}
@ -39,7 +42,8 @@
/* Limit the height of the dropdown menu and make it scrollable */
.dropdown-menu {
max-height: 200px; /* Adjust this value as needed */
max-height: 200px;
/* Adjust this value as needed */
overflow-y: auto;
}
@ -71,10 +75,13 @@
text-decoration: underline;
color: #007bff;
}
/* Make the modal body scrollable */
#detailsModal .modal-body {
max-height: 70vh; /* Limit the height to 70% of the viewport */
overflow-y: auto; /* Enable vertical scrolling */
max-height: 70vh;
/* Limit the height to 70% of the viewport */
overflow-y: auto;
/* Enable vertical scrolling */
}
.card-box {
@ -83,13 +90,17 @@
}
#followupCard {
transition: transform 0.2s ease; /* Smooth scaling transition */
cursor: pointer; /* Default cursor change */
transition: transform 0.2s ease;
/* Smooth scaling transition */
cursor: pointer;
/* Default cursor change */
}
#followupCard:hover {
transform: scale(1.05); /* Slightly scale up on hover */
cursor: pointer; /* Change cursor to hand symbol */
transform: scale(1.05);
/* Slightly scale up on hover */
cursor: pointer;
/* Change cursor to hand symbol */
}
.card-block {
@ -119,6 +130,7 @@ padding-top: 2%;
border-radius: 5px;
margin-bottom: 20px;
}
.upload-box {
border: 2px dashed #999;
padding: 20px;
@ -230,6 +242,7 @@ padding-top: 2%;
line-height: 1.4;
}
</style>
<body>
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
@ -259,7 +272,8 @@ padding-top: 2%;
<div class="col-lg-4">
<nav class="breadcrumb-container" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/gcc/index"><i class="ik ik-home"></i></a></li>
<li class="breadcrumb-item"><a href="/gcc/index"><i class="ik ik-home"></i></a>
</li>
<li class="breadcrumb-item" aria-current="page">Vending Committe</li>
<li class="breadcrumb-item active" aria-current="page">Add Street vendor</li>
</ol>
@ -270,12 +284,14 @@ padding-top: 2%;
<div class="container my-4">
<div class="card p-4 shadow"><span th:text="${LoginUserId}" style="display:none;" id="userIdSpan"></span>
<div class="card p-4 shadow"><span th:text="${LoginUserId}" style="display:none;"
id="userIdSpan"></span>
<form id="vendorForm" enctype="multipart/form-data">
<!-- Business Details -->
<div class="section-header">
<h5>Business Details | வியாபார விவரங்கள்</h5></div>
<h5>Business Details | வியாபார விவரங்கள்</h5>
</div>
<div id="mapContainer" style="position: relative; height: 500px;">
<input id="pac-input" class="controls" type="text" placeholder="Search location">
<div id="googleMap" style="height: 90%; width: 100%;"></div>
@ -290,13 +306,15 @@ padding-top: 2%;
<!-- <label for="latitude_field">Latitide</label>
<input type="text" class="form-control" id="latitude_field"> -->
<label for="latitude_field">Latitude</label>
<input type="text" class="form-control" id="latitude_field" name="latitude_field" readonly >
<input type="text" class="form-control" id="latitude_field"
name="latitude_field" readonly>
</div>
<div class="col-md-6">
<!-- <label for="longitude_field">Longtitude</label>
<input type="text" class="form-control" id="longitude_field" name="longtitude"> -->
<label for="longitude_field">Longitude</label>
<input type="text" class="form-control" id="longitude_field" name="longitude_field" readonly >
<input type="text" class="form-control" id="longitude_field"
name="longitude_field" readonly>
</div>
</div>
@ -343,21 +361,26 @@ padding-top: 2%;
<div class="row mb-3">
<div class="col-md-6">
<label class="form-label">Landmark (maximum 255 characters)</label>
<textarea class="form-control" id="landmark" name="landmark" maxlength="255"></textarea>
<textarea class="form-control" id="landmark" name="landmark"
maxlength="255"></textarea>
</div>
<div class="col-md-6">
<label class="form-label">விற்பனை பகுதி</label>
<textarea class="form-control" id="landmark_tamil" name="landmark_tamil" placeholder="தமிழில் பதிவு செய்யவும்"></textarea>
<textarea class="form-control" id="landmark_tamil" name="landmark_tamil"
placeholder="தமிழில் பதிவு செய்யவும்"></textarea>
</div>
</div>
<div class="row mb-3">
<div class="col-md-6">
<label class="form-label">District</label>
<input type="text" class="form-control" id="vendor_district" name="vendor_district" oninput="this.value = this.value.replace(/[^a-zA-Z\s]/g, '')" >
<input type="text" class="form-control" id="vendor_district"
name="vendor_district"
oninput="this.value = this.value.replace(/[^a-zA-Z\s]/g, '')">
</div>
<div class="col-md-6">
<label class="form-label"> மாவட்டம்</label>
<input type="text" class="form-control" id="vendor_district_tamil" name="vendor_district_tamil" placeholder="தமிழில் பதிவு செய்யவும்">
<input type="text" class="form-control" id="vendor_district_tamil"
name="vendor_district_tamil" placeholder="தமிழில் பதிவு செய்யவும்">
</div>
</div>
@ -365,7 +388,8 @@ padding-top: 2%;
<div class="row mb-3">
<div class="col-md-6">
<label class="form-label">Pincode</label>
<input type="text" class="form-control" id="vendor_pincode" name="vendor_pincode" oninput="validatePincode(this)" >
<input type="text" class="form-control" id="vendor_pincode"
name="vendor_pincode" oninput="validatePincode(this)">
</div>
</div>
@ -373,12 +397,14 @@ padding-top: 2%;
<div class="row mb-3">
<div class="col-md-6">
<label for="businesstype" class="form-label">Type of Business <span class="text-danger">*</span>
<label for="businesstype" class="form-label">Type of Business <span
class="text-danger">*</span>
</label>
<select id="businesstype" name="businesstype" class="form-control" required>
<option value="">-- Select Business Type --</option>
<th:block th:each="vendingCategory : ${vendingCategories}">
<option th:value="${vendingCategory.id}" th:text="${vendingCategory.vending_category_name}"></option>
<option th:value="${vendingCategory.id}"
th:text="${vendingCategory.vending_category_name}"></option>
</th:block>
</select>
@ -386,12 +412,16 @@ padding-top: 2%;
<div class="col-md-6">
<label for="tamilbusinesstype" class="form-label"> வியாபார வகை <span class="text-danger">*</span>
<label for="tamilbusinesstype" class="form-label"> வியாபார வகை <span
class="text-danger">*</span>
</label>
<select id="tamilbusinesstype" name="tamilbusinesstype" class="form-control" required>
<select id="tamilbusinesstype" name="tamilbusinesstype" class="form-control"
required>
<option value="">-- வியாபார வகையைத் தேர்ந்தெடுக்கவும் --</option>
<th:block th:each="tamilvendingCategory : ${tamilvendingCategories}">
<option th:value="${tamilvendingCategory.id}" th:text="${tamilvendingCategory.tamil_vending_category_name}"></option>
<option th:value="${tamilvendingCategory.id}"
th:text="${tamilvendingCategory.tamil_vending_category_name}">
</option>
</th:block>
</select>
</div>
@ -400,27 +430,32 @@ padding-top: 2%;
<div class="row mb-3">
<div class="col-md-6">
<label class="form-label">Business Space (Sq ft)| வியாபார இடம் </label>
<input type="text" class="form-control" id="business_space" name="business_space">
<input type="text" class="form-control" id="business_space"
name="business_space">
</div>
</div>
<div class="row mb-3">
<div class="col-md-6">
<label class="form-label">Did you get SVANIDHI loan? | ஸ்வநிதி கடன் வாங்கினீங்களா? </label><br>
<label class="form-label">Did you get SVANIDHI loan? | ஸ்வநிதி கடன்
வாங்கினீங்களா? </label><br>
<input type="radio" name="svanidhi" value="Yes"> Yes
<input type="radio" name="svanidhi" value="No" class="ms-3"> No
</div>
<div class="col-md-6">
<label class="form-label">Do you have a Bank Account? | வங்கி கணக்கு உள்ளதா? </label><br>
<label class="form-label">Do you have a Bank Account? | வங்கி கணக்கு உள்ளதா?
</label><br>
<input type="radio" name="bank_account" value="Yes"> Yes
<input type="radio" name="bank_account" value="No" class="ms-3"> No
</div>
<div class="col-md-6" id="bank_passbook_container" style="display:none;">
<label for="bank_passbook" class="form-label">Upload Bank Passbook (jpg/jpeg/pdf)
<label for="bank_passbook" class="form-label">Upload Bank Passbook
(jpg/jpeg/pdf)
</label>
<input type="file" class="form-control" id="bank_passbook" name="bank_passbook" accept=".jpg,.jpeg,.pdf,application/pdf" >
<input type="file" class="form-control" id="bank_passbook" name="bank_passbook"
accept=".jpg,.jpeg,.pdf,application/pdf">
</div>
</div>
@ -440,21 +475,25 @@ padding-top: 2%;
<div class="row mb-3">
<div class="col-md-6">
<label class="form-label"> Name<span class="required">*</span></label>
<input type="text" class="form-control" id="name" name="name" oninput="this.value = this.value.replace(/[^a-zA-Z\s]/g, '')" required>
<input type="text" class="form-control" id="name" name="name"
oninput="this.value = this.value.replace(/[^a-zA-Z\s]/g, '')" required>
</div>
<div class="col-md-6">
<label class="form-label">பெயர் <span class="required">*</span></label>
<input type="text" class="form-control" id="name_tamil" name="name_tamil" placeholder="தமிழில் பதிவு செய்யவும்" required>
<input type="text" class="form-control" id="name_tamil" name="name_tamil"
placeholder="தமிழில் பதிவு செய்யவும்" required>
</div>
</div>
<div class="row mb-3">
<div class="col-md-6">
<label class="form-label">Father's / Husband's Name </label>
<input type="text" class="form-control" id="father_name" name="father_name" oninput="this.value = this.value.replace(/[^a-zA-Z\s]/g, '')" >
<input type="text" class="form-control" id="father_name" name="father_name"
oninput="this.value = this.value.replace(/[^a-zA-Z\s]/g, '')">
</div>
<div class="col-md-6">
<label class="form-label"> தந்தை/கணவர் பெயர் </label>
<input type="text" class="form-control" id="father_name_tamil" name="father_name_tamil" placeholder="தமிழில் பதிவு செய்யவும்" >
<input type="text" class="form-control" id="father_name_tamil"
name="father_name_tamil" placeholder="தமிழில் பதிவு செய்யவும்">
</div>
</div>
@ -471,14 +510,17 @@ padding-top: 2%;
<label class="form-label"> பாலினம் </label><br>
<input type="radio" name="gender_tamil" value="ஆண்"> ஆண்
<input type="radio" name="gender_tamil" value="பெண்" class="ms-3"> பெண்
<input type="radio" name="gender_tamil" value="பிற்பாலினர்" class="ms-3">பிற்பாலினர்
<input type="radio" name="gender_tamil" value="பிற்பாலினர்"
class="ms-3">பிற்பாலினர்
</div>
</div>
<div class="row mb-3">
<div class="col-md-6">
<label class="form-label">Mobile Number | மொபைல் எண் <span class="required">*</span></label>
<input type="text" class="form-control" id="mobile_no" name="mobile_no" oninput="validatePhoneNumber(this)" required>
<label class="form-label">Mobile Number | மொபைல் எண் <span
class="required">*</span></label>
<input type="text" class="form-control" id="mobile_no" name="mobile_no"
oninput="validatePhoneNumber(this)" required>
</div>
</div>
@ -509,7 +551,8 @@ padding-top: 2%;
<div class="col-md-6">
<label class="form-label">Street Vendor’s educational status | தெருவணிகரின் கல்வித்தகுதி </label>
<label class="form-label">Street Vendor’s educational status | தெருவணிகரின்
கல்வித்தகுதி </label>
<select class="form-control" id="education" name="education">
<option value="">-- Select Education Status--</option>
<th:block th:each="edu : ${educationList}">
@ -522,22 +565,27 @@ padding-top: 2%;
<div class="row mb-3">
<div class="col-md-6">
<label for="maritalstatus" class="form-label"> Marital Status | திருமண நிலை </label>
<label for="maritalstatus" class="form-label"> Marital Status | திருமண நிலை
</label>
<select class="form-control" id="maritalStatus" name="maritalStatus">
<option value="">-- Select Marital Status --</option>
<th:block th:each="status : ${maritalStatuses}">
<option th:value="${status.id}" th:text="${status.marital_status}"></option>
<option th:value="${status.id}" th:text="${status.marital_status}">
</option>
</th:block>
</select>
</div>
<div class="col-md-6">
<label for="familymembers" class="form-label">Number of Family Members | குடும்ப உறுப்பினர்கள் எண்ணிக்கை </label>
<input type="number" class="form-control" name="familymembers" id="familymembers">
<label for="familymembers" class="form-label">Number of Family Members | குடும்ப
உறுப்பினர்கள் எண்ணிக்கை </label>
<input type="number" class="form-control" name="familymembers"
id="familymembers">
</div>
</div>
<div class="mb-3">
<label class="form-label">Are any of your family member involved in street vending | உங்கள் குடும்ப உறுப்பினர் வியாபாரத்தில் உள்ளவரா? </label><br>
<label class="form-label">Are any of your family member involved in street vending |
உங்கள் குடும்ப உறுப்பினர் வியாபாரத்தில் உள்ளவரா? </label><br>
<input type="radio" name="fam_vendor" value="Yes"> Yes
<input type="radio" name="fam_vendor" value="No" class="ms-3"> No
</div>
@ -563,20 +611,23 @@ padding-top: 2%;
</div>
<div class="col-md-6">
<label class="form-label">District | மாவட்டம் </label>
<input type="text" class="form-control" name="district" id="district" oninput="this.value = this.value.replace(/[^a-zA-Z\s]/g, '')" >
<input type="text" class="form-control" name="district" id="district"
oninput="this.value = this.value.replace(/[^a-zA-Z\s]/g, '')">
</div>
</div>
<div class="row mb-3">
<div class="col-md-6">
<label class="form-label">Pincode | அஞ்சல் குறியீடு </label>
<input type="text" class="form-control" name="pincode" id="pincode" oninput="validatePincode(this)" >
<input type="text" class="form-control" name="pincode" id="pincode"
oninput="validatePincode(this)">
</div>
<div class="col-md-6">
<label class="form-label">Aadhaar Number | ஆதார் எண் </label>
<input type="text" class="form-control" id="aadhar_number" name="aadhar_number" maxlength="12" oninput="validateAadhar(this)" >
<input type="text" class="form-control" id="aadhar_number" name="aadhar_number"
maxlength="12" oninput="validateAadhar(this)">
</div>
</div>
@ -587,19 +638,22 @@ padding-top: 2%;
</div>
<div class="row mb-3">
<div class="col-md-6">
<label class="form-label">Aadhaar Front Image | ஆதார் முன்னணி படத்தை பதிவேற்றவும் (jpg/jpeg/pdf)</label>
<label class="form-label">Aadhaar Front Image | ஆதார் முன்னணி படத்தை
பதிவேற்றவும் (jpg/jpeg/pdf)</label>
<input type="file" class="form-control" id="aadharfrontimage"
accept=".jpg,.jpeg,.pdf,application/pdf" name="aadharfrontimage">
</div>
<div class="col-md-6">
<label class="form-label">Aadhaar Back Image | ஆதார் பின்னணி படத்தை பதிவேற்றவும் (jpg/jpeg/pdf)</label>
<label class="form-label">Aadhaar Back Image | ஆதார் பின்னணி படத்தை பதிவேற்றவும்
(jpg/jpeg/pdf)</label>
<input type="file" class="form-control" id="aadharbackimage"
accept=".jpg,.jpeg,.pdf,application/pdf" name="aadharbackimage">
</div>
</div>
<div class="row mb-3">
<div class="col-md-6">
<label class="form-label">Take Ration Card Front Image | ரேஷன் கார்டு முன்னணி படத்தை பதிவேற்றவும் (jpg/jpeg/pdf)</label>
<label class="form-label">Take Ration Card Front Image | ரேஷன் கார்டு முன்னணி
படத்தை பதிவேற்றவும் (jpg/jpeg/pdf)</label>
<input type="file" class="form-control" id="ration_card_photo"
accept=".jpg,.jpeg,.pdf,application/pdf" name="ration_card_photo">
</div>
@ -610,34 +664,45 @@ padding-top: 2%;
<div class="note-row">
<input type="checkbox">
<div class="note-text">I have no other means of livelihood except street vending / எனக்கு சாலையோர வியாபாரத்தைத் தவிர வேறு எந்த வாழ்வாதாரமும் இல்லை.</div>
<div class="note-text">I have no other means of livelihood except street vending
/ எனக்கு வேறு வாழ்வாதார வழிகள் எதுவும் இல்லை.</div>
</div>
<div class="note-row">
<input type="checkbox">
<div class="note-text">I am not carrying out vending at any other place at the same time / ஒரே நேரத்தில் வேறு எந்த இடத்திலும் வியாபாரம் செய்யவில்லை.</div>
<div class="note-text">I shall carry on the business of street vending myself or
through any of my family member / நான் அல்லது என்னுடைய குடும்ப உறுப்பினர்
வாயிலாக தெரு விற்பனை தொழிலை மேற்கொள்வேன்.</div>
</div>
<div class="note-row">
<input type="checkbox">
<div class="note-text">I and/or my family members are engaged only in this roadside vending activity / நானோ அல்லது எனது குடும்ப உறுப்பினர்கள் மூலம் சாலையோர வியாபாரம் செய்கிறேன்.</div>
<div class="note-text">I shall not transfer in any manner whatsoever, including
rent, the Certificate of Vending or the place specified therein to any other
person. / வாடகை, விற்பனைச் சான்றிதழ் அல்லது குறிப்பிடப்பட்டுள்ள இடம் உட்பட
எதையும் நான் வேறு எந்த நபருக்கும் எந்த வகையிலும் மாற்றம் செய்யமாட்டேன்.
</div>
</div>
<div class="note-row">
<input type="checkbox">
<div class="note-text">I have completed fourteen years of age / நான், பதினான்கு வயது பூர்த்தி அடைந்துள்ளேன்.</div>
<div class="note-text">I certify that I have attained the age of 14 (fourteen
years). / எனக்கு 14 வயது (பதினான்கு வயது) பூர்த்தி அடைந்துவிட்டது,என்று
உறுதி அளிக்கிறேன்.</div>
</div>
</div>
<div class="text-center mt-2">
<span class="text-danger">*</span>Note: Click all the checkboxes above to submit the form.
<span class="text-danger">*</span>Note: Click all the checkboxes above to submit the
form.
</div>
<!-- Submit -->
<div class="text-center mt-4">
<button type="submit" class="btn btn-success" name="submitBtn" id="submitBtn">Submit</button>
<button type="submit" class="btn btn-success" name="submitBtn"
id="submitBtn">Submit</button>
</div>
</form>
@ -652,7 +717,8 @@ padding-top: 2%;
</div>
</div>
</div>
<div id="pageLoader" style="display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.8); z-index: 9999; text-align: center;">
<div id="pageLoader"
style="display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.8); z-index: 9999; text-align: center;">
<div style="position: relative; top: 50%; transform: translateY(-50%);">
<div class="spinner-border text-primary" role="status" style="width: 3rem; height: 3rem;">
<span class="sr-only">Loading...</span>
@ -1192,7 +1258,12 @@ document.addEventListener("DOMContentLoaded", function () {
$('#submitBtn').prop('disabled', false).text('Submit');
return;
}
if (isBankYes) setFileIfPresent(formData, "bank_passbook", $('#bank_passbook')[0].files[0]);
if (isBankYes) {
setFileIfPresent(formData, "bank_passbook", $('#bank_passbook')[0]);
}
//if (isBankYes) setFileIfPresent(formData, "bank_passbook", $('#bank_passbook')[0]);
// Lat/Lng
const latitude = $('#latitude_field').val().trim();
@ -1258,6 +1329,20 @@ document.addEventListener("DOMContentLoaded", function () {
setIfPresent(formData, "name", $('#name').val());
setIfPresent(formData, "f_h_name", $('#father_name').val());
const dobValue = new Date($('#dob').val());
const today = new Date();
const age14Date = new Date(
today.getFullYear() - 14,
today.getMonth(),
today.getDate()
);
if (dobValue > age14Date) {
Swal.fire("Invalid Age", "Applicant must be at least 14 years old.", "error");
return;
}
setIfPresent(formData, "dob", $('#dob').val());
@ -1351,14 +1436,31 @@ document.addEventListener("DOMContentLoaded", function () {
// DOB max date
document.addEventListener("DOMContentLoaded", function () {
const dobInput = document.getElementById("dob");
const today = new Date().toISOString().split("T")[0];
dobInput.setAttribute("max", today);
const today = new Date();
// Subtract 14 years
const minAgeDate = new Date(
today.getFullYear() - 14,
today.getMonth(),
today.getDate()
);
// Format to yyyy-mm-dd
const formattedDate = minAgeDate.toISOString().split("T")[0];
// Set maximum allowed date
dobInput.setAttribute("max", formattedDate);
// Open picker on focus (optional)
dobInput.addEventListener("focus", function () {
if (typeof dobInput.showPicker === "function") {
dobInput.showPicker();
}
});
});
@ -1367,4 +1469,5 @@ document.addEventListener("DOMContentLoaded", function () {
</body>
</html>
Loading…
Cancel
Save