12 changed files with 2193 additions and 4 deletions
-
36src/main/java/com/metro/community/config/DBConnection.java
-
14src/main/java/com/metro/community/controller/CommunityController.java
-
160src/main/java/com/metro/community/controller/CommunityHallController.java
-
90src/main/java/com/metro/community/dto/HallRegistration.java
-
169src/main/java/com/metro/community/service/CommunityHallService.java
-
99src/main/java/com/metro/community/service/DataEntry.java
-
59src/main/java/com/metro/community/service/HallDto.java
-
4src/main/java/com/metro/component/UserSessionInterceptor.java
-
13src/main/java/com/metro/feedback/controller/FeedbackController.java
-
4src/main/resources/application.properties
-
823src/main/resources/templates/community/communityhall.html
-
726src/main/resources/templates/feedback/RequestForm.html
@ -0,0 +1,36 @@ |
|||||
|
package com.metro.community.config; |
||||
|
|
||||
|
import java.sql.Connection; |
||||
|
import java.sql.DriverManager; |
||||
|
import java.sql.SQLException; |
||||
|
|
||||
|
public class DBConnection { |
||||
|
private static Connection dbcon; |
||||
|
|
||||
|
static String l_sErpUrl = "jdbc:oracle:thin:@10.1.0.14:1521:chncorp"; |
||||
|
static String l_sErpdriver = "oracle.jdbc.driver.OracleDriver"; |
||||
|
|
||||
|
public static Connection getConnection() { |
||||
|
try { |
||||
|
if(dbcon==null) { |
||||
|
Class.forName(l_sErpdriver); |
||||
|
Connection erp_conn = DriverManager.getConnection(l_sErpUrl,"coc","coc"); |
||||
|
System.out.println("erp_conn Con :"+ erp_conn ); |
||||
|
System.out.println("erp_conn Con "); |
||||
|
dbcon=erp_conn; |
||||
|
return erp_conn; |
||||
|
} |
||||
|
else { |
||||
|
return dbcon; |
||||
|
} |
||||
|
|
||||
|
} catch (ClassNotFoundException e) { |
||||
|
e.printStackTrace(); |
||||
|
//throw new SqlExcaptionClass("Sql"); |
||||
|
} catch (SQLException e) { |
||||
|
e.printStackTrace(); |
||||
|
|
||||
|
} |
||||
|
return dbcon; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,14 @@ |
|||||
|
package com.metro.community.controller; |
||||
|
|
||||
|
import org.springframework.stereotype.Controller; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
|
||||
|
@Controller |
||||
|
public class CommunityController { |
||||
|
@RequestMapping("/community") |
||||
|
public String getmypage(){ |
||||
|
return "community/communityhall"; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,160 @@ |
|||||
|
package com.metro.community.controller; |
||||
|
|
||||
|
import java.text.SimpleDateFormat; |
||||
|
import java.util.*; |
||||
|
|
||||
|
import com.metro.community.dto.HallRegistration; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestMethod; |
||||
|
import org.springframework.web.bind.annotation.RequestParam; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import com.metro.community.service.CommunityHallService; |
||||
|
|
||||
|
|
||||
|
@RestController |
||||
|
@RequestMapping("/community/api") |
||||
|
public class CommunityHallController { |
||||
|
|
||||
|
|
||||
|
@Autowired |
||||
|
private CommunityHallService communityHallService; |
||||
|
|
||||
|
// @RequestMapping(value = "/division", method = RequestMethod.GET) |
||||
|
// public List<?> getDivision(@RequestParam String zone) { |
||||
|
// communityHallService.setZone(zone); |
||||
|
// return communityHallService.getList("zone"); |
||||
|
// } |
||||
|
|
||||
|
@RequestMapping(value = "/getHall", method = RequestMethod.GET) |
||||
|
public List<?> getSelectCommunityHallByZone(@RequestParam String zone) { |
||||
|
communityHallService.setZone(zone); |
||||
|
return communityHallService.getList("communityHall"); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "/getHallById", method = RequestMethod.GET) |
||||
|
public List<?> getSelectCommunityHall(@RequestParam String hallId) { |
||||
|
communityHallService.setHallId(hallId); |
||||
|
return communityHallService.getList("hallId"); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "/getHallByName", method = RequestMethod.GET) |
||||
|
public List<?> getSelectCommunityHallName(@RequestParam String hallName) { |
||||
|
communityHallService.setHallName(hallName); |
||||
|
return communityHallService.getList("hallName"); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "/getHallByMonthAndYear", method = RequestMethod.GET) |
||||
|
public List<?> getCommunityHallByMonthAndYear(@RequestParam String hallId, @RequestParam String fromDay, @RequestParam String toDay) { |
||||
|
communityHallService.setHallId(hallId); |
||||
|
communityHallService.setFromDay(fromDay); |
||||
|
communityHallService.setToDay(toDay); |
||||
|
System.out.println(fromDay+"..."+toDay); |
||||
|
List<HallRegistration> hall = communityHallService.getHallRegistration("MonthAndYear"); |
||||
|
if(hall==null||hall.isEmpty()) { |
||||
|
return null; |
||||
|
} |
||||
|
else{ |
||||
|
List<ResultEntry> output = processInputData(hall); |
||||
|
Collections.sort(output, Comparator.comparing(ResultEntry::getDate)); |
||||
|
return output; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "/getHallByBookingStatus", method = RequestMethod.GET) |
||||
|
public List<?> getSelectCommunityHallIdBookingStatus(@RequestParam String hallId) { |
||||
|
communityHallService.setHallId(hallId); |
||||
|
return communityHallService.getList("BookingStatus"); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
private static List<ResultEntry> processInputData(List<HallRegistration> data) { |
||||
|
Map<String, ResultEntry> outputMap = new HashMap<>(); |
||||
|
|
||||
|
for (HallRegistration entry : data) { |
||||
|
String date1 = extractDate(entry.getDATE1()); |
||||
|
String date2 = extractDate(entry.getDATE2()); |
||||
|
String date3 = extractDate(entry.getDATE3()); |
||||
|
|
||||
|
// Add entries to the map, combining if the date already exists |
||||
|
addToOutputMap(outputMap, date1,Integer.parseInt(entry.getMORNINGHALF1()) , Integer.parseInt(entry.getEVENINGHALF1())); |
||||
|
addToOutputMap(outputMap, date2,Integer.parseInt(entry.getMORNINGHALF2()),Integer.parseInt(entry.getEVENINGHALF2())); |
||||
|
addToOutputMap(outputMap, date3, Integer.parseInt(entry.getMORNINGHALF3()), Integer.parseInt(entry.getEVENINGHALF3())); |
||||
|
} |
||||
|
|
||||
|
return new ArrayList<>(outputMap.values()); |
||||
|
} |
||||
|
|
||||
|
private static String extractDate (String dateString){ |
||||
|
if (dateString != null) { |
||||
|
try { |
||||
|
return new SimpleDateFormat("dd").format(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(dateString)); |
||||
|
} catch (Exception e) { |
||||
|
e.printStackTrace(); |
||||
|
} |
||||
|
} |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
private static void addToOutputMap(Map<String, ResultEntry> outputMap, String date, int morningHalf, int eveningHalf) { |
||||
|
if (date != null) { |
||||
|
ResultEntry existingEntry = outputMap.get(date); |
||||
|
if (existingEntry != null) { |
||||
|
// Combine morningHalf and eveningHalf if the date already exists |
||||
|
existingEntry.setMorningHalf(existingEntry.getMorningHalf() + morningHalf); |
||||
|
existingEntry.setEveningHalf(existingEntry.getEveningHalf() + eveningHalf); |
||||
|
} else { |
||||
|
// Add a new entry to the map if the date does not exist |
||||
|
outputMap.put(date, new ResultEntry(date, morningHalf, eveningHalf)); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
||||
|
class ResultEntry { |
||||
|
private String date; |
||||
|
private int morningHalf; |
||||
|
private int eveningHalf; |
||||
|
|
||||
|
public ResultEntry(String date, int morningHalf, int eveningHalf) { |
||||
|
this.date = date; |
||||
|
this.morningHalf = morningHalf; |
||||
|
this.eveningHalf = eveningHalf; |
||||
|
} |
||||
|
|
||||
|
public String getDate() { |
||||
|
return date; |
||||
|
} |
||||
|
|
||||
|
public int getMorningHalf() { |
||||
|
return morningHalf; |
||||
|
} |
||||
|
|
||||
|
public int getEveningHalf() { |
||||
|
return eveningHalf; |
||||
|
} |
||||
|
|
||||
|
public void setMorningHalf(int morningHalf) { |
||||
|
this.morningHalf = morningHalf; |
||||
|
} |
||||
|
|
||||
|
public void setEveningHalf(int eveningHalf) { |
||||
|
this.eveningHalf = eveningHalf; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String toString() { |
||||
|
return "{" + date + ",{" + morningHalf + "," + eveningHalf + "}}"; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
@ -0,0 +1,90 @@ |
|||||
|
package com.metro.community.dto; |
||||
|
|
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
@Component |
||||
|
public class HallRegistration { |
||||
|
private String MORNINGHALF1; |
||||
|
private String EVENINGHALF1; |
||||
|
private String MORNINGHALF2; |
||||
|
private String EVENINGHALF2; |
||||
|
private String MORNINGHALF3; |
||||
|
private String EVENINGHALF3; |
||||
|
|
||||
|
private String DATE3; |
||||
|
private String DATE2; |
||||
|
private String DATE1; |
||||
|
|
||||
|
public String getMORNINGHALF1() { |
||||
|
return MORNINGHALF1; |
||||
|
} |
||||
|
|
||||
|
public void setMORNINGHALF1(String MORNINGHALF1) { |
||||
|
this.MORNINGHALF1 = MORNINGHALF1; |
||||
|
} |
||||
|
|
||||
|
public String getEVENINGHALF1() { |
||||
|
return EVENINGHALF1; |
||||
|
} |
||||
|
|
||||
|
public void setEVENINGHALF1(String EVENINGHALF1) { |
||||
|
this.EVENINGHALF1 = EVENINGHALF1; |
||||
|
} |
||||
|
|
||||
|
public String getMORNINGHALF2() { |
||||
|
return MORNINGHALF2; |
||||
|
} |
||||
|
|
||||
|
public void setMORNINGHALF2(String MORNINGHALF2) { |
||||
|
this.MORNINGHALF2 = MORNINGHALF2; |
||||
|
} |
||||
|
|
||||
|
public String getEVENINGHALF2() { |
||||
|
return EVENINGHALF2; |
||||
|
} |
||||
|
|
||||
|
public void setEVENINGHALF2(String EVENINGHALF2) { |
||||
|
this.EVENINGHALF2 = EVENINGHALF2; |
||||
|
} |
||||
|
|
||||
|
public String getMORNINGHALF3() { |
||||
|
return MORNINGHALF3; |
||||
|
} |
||||
|
|
||||
|
public void setMORNINGHALF3(String MORNINGHALF3) { |
||||
|
this.MORNINGHALF3 = MORNINGHALF3; |
||||
|
} |
||||
|
|
||||
|
public String getEVENINGHALF3() { |
||||
|
return EVENINGHALF3; |
||||
|
} |
||||
|
|
||||
|
public void setEVENINGHALF3(String EVENINGHALF3) { |
||||
|
this.EVENINGHALF3 = EVENINGHALF3; |
||||
|
} |
||||
|
|
||||
|
public String getDATE3() { |
||||
|
return DATE3; |
||||
|
} |
||||
|
|
||||
|
public void setDATE3(String DATE3) { |
||||
|
this.DATE3 = DATE3; |
||||
|
} |
||||
|
|
||||
|
public String getDATE2() { |
||||
|
return DATE2; |
||||
|
} |
||||
|
|
||||
|
public void setDATE2(String DATE2) { |
||||
|
this.DATE2 = DATE2; |
||||
|
} |
||||
|
|
||||
|
public String getDATE1() { |
||||
|
return DATE1; |
||||
|
} |
||||
|
|
||||
|
public void setDATE1(String DATE1) { |
||||
|
this.DATE1 = DATE1; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,169 @@ |
|||||
|
package com.metro.community.service; |
||||
|
|
||||
|
import java.sql.Connection; |
||||
|
import java.sql.ResultSet; |
||||
|
import java.sql.ResultSetMetaData; |
||||
|
import java.sql.Statement; |
||||
|
import java.util.*; |
||||
|
|
||||
|
import com.metro.community.config.DBConnection; |
||||
|
import com.metro.community.dto.HallRegistration; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
|
||||
|
@Service |
||||
|
public class CommunityHallService extends HallDto{ |
||||
|
|
||||
|
|
||||
|
|
||||
|
public String getDivi(String zone) { |
||||
|
return "select * from tbl_online_division where zone_id ="+zone+" order by divison_id "; |
||||
|
} |
||||
|
|
||||
|
public String getSelectCommunityHall(String zone) { |
||||
|
return "select * from tbl_communityhall Where COMMUNITYHALLZONEID ="+zone; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public String getSelectCommunityHallName(String hallName) { |
||||
|
return "select * from tbl_communityhall Where COMMUNITYHALLADDRESS LIKE '"+hallName+"%'"; |
||||
|
} |
||||
|
|
||||
|
public String getSelectCommunityHallRegistration(String hallId, String fromDay ,String toDay){ |
||||
|
return "SELECT COMMUNITYHALLID, DATE1, MORNINGHALF1, EVENINGHALF1, DATE2, MORNINGHALF2, EVENINGHALF2, DATE3, MORNINGHALF3, EVENINGHALF3" + |
||||
|
" FROM TBL_COMMUNITYHALLREGISTRATION WHERE COMMUNITYHALLID = "+hallId+" AND (DATE1 BETWEEN TO_DATE('"+fromDay+"','YYYY-MM-DD') AND TO_DATE('"+toDay+"','YYYY-MM-DD'))"; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public String getSelectCommunityHallId(String hallId) { |
||||
|
return "SELECT communityhallhalfdayrate, communityhallhalfsurcharge," + |
||||
|
" nvl(CLEAN_CHRG_HALF,0)+nvl(PA_SYS_HALF,0)+nvl(EB_HALF,0) pa_eb_half," + |
||||
|
" round((nvl(CLEAN_CHRG_HALF,0)+nvl(PA_SYS_HALF,0)+nvl(EB_HALF,0))*18/100,0) pa_eb_serv_half," + |
||||
|
" communityhalldeposit, communityhallcapacity, communityhalladvance,evemorn_twodaysamount," + |
||||
|
" communityhallfulldayrate," + |
||||
|
" nvl(CLEAN_CHRG_FULL,0) +nvl(PA_SYS_FULL,0)+nvl(EB_FULL,0) pa_eb_full ," + |
||||
|
" round((nvl(CLEAN_CHRG_FULL,0) +nvl(PA_SYS_FULL,0)+nvl(EB_FULL,0))*18/100,0) pa_eb_serv_full," + |
||||
|
" SOUND_SERVICE_AMT,VESSEL_AMT,OTHER_AMT FROM coc.tbl_communityhall where communityhallid=" + hallId; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public List<Map<String, Object>> getList(String type){ |
||||
|
Connection con =DBConnection.getConnection(); |
||||
|
Statement stmt3; |
||||
|
try { |
||||
|
System.out.println(getQuery(type)); |
||||
|
stmt3 = con.createStatement(); |
||||
|
ResultSet rs3 = stmt3.executeQuery(getQuery(type)); |
||||
|
List<Map<String, Object>> rows = new ArrayList<>(); |
||||
|
if ( rows.isEmpty() && rs3==null) { |
||||
|
return rows; |
||||
|
} |
||||
|
while (rs3.next()) { |
||||
|
Map<String, Object> row = new HashMap<>(); |
||||
|
|
||||
|
ResultSetMetaData metaData = rs3.getMetaData(); |
||||
|
int columnCount = metaData.getColumnCount(); |
||||
|
|
||||
|
for (int i = 1; i <= columnCount; i++) { |
||||
|
String columnName = metaData.getColumnName(i); |
||||
|
Object columnValue = rs3.getObject(i); |
||||
|
row.put(columnName, columnValue); |
||||
|
} |
||||
|
|
||||
|
// Add the row to the List |
||||
|
rows.add(row); |
||||
|
} |
||||
|
return rows; |
||||
|
} |
||||
|
catch (Exception e){ |
||||
|
e.printStackTrace(); |
||||
|
} |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
public String getQuery(String type){ |
||||
|
if(type.equals("zone")){ |
||||
|
return getDivi(getZone()); |
||||
|
} |
||||
|
else if(type.equals("communityHall")){ |
||||
|
return getSelectCommunityHall(getZone()); |
||||
|
} |
||||
|
else if(type.equals("hallId")){ |
||||
|
return getSelectCommunityHallId(getHallId()); |
||||
|
} |
||||
|
else if(type.equals("hallName")){ |
||||
|
return getSelectCommunityHallName(getHallName()); |
||||
|
}else if(type.equals("BookingStatus")){ |
||||
|
return getSelectCommunityHallId(getHallId()); |
||||
|
}else if(type.equals("MonthAndYear")){ |
||||
|
return getSelectCommunityHallRegistration(getHallId(), getFromDay(),getToDay()); |
||||
|
} |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
public List<HallRegistration> getHallRegistration(String type){ |
||||
|
Connection con =DBConnection.getConnection(); |
||||
|
Statement stmt3; |
||||
|
try { |
||||
|
System.out.println(getQuery(type)); |
||||
|
stmt3 = con.createStatement(); |
||||
|
ResultSet rs3 = stmt3.executeQuery(getQuery(type)); |
||||
|
List<HallRegistration> rows = new ArrayList<>(); |
||||
|
if (rs3==null) { |
||||
|
return rows; |
||||
|
} |
||||
|
while (rs3.next()) { |
||||
|
HallRegistration row = new HallRegistration(); |
||||
|
|
||||
|
ResultSetMetaData metaData = rs3.getMetaData(); |
||||
|
int columnCount = metaData.getColumnCount(); |
||||
|
|
||||
|
for (int i = 1; i <= columnCount; i++) { |
||||
|
String columnName = metaData.getColumnName(i); |
||||
|
Object columnValue = rs3.getObject(i); |
||||
|
|
||||
|
switch (columnName) { |
||||
|
case "MORNINGHALF1": |
||||
|
row.setMORNINGHALF1(columnValue!=null?columnValue.toString():null); |
||||
|
break; |
||||
|
case "MORNINGHALF2": |
||||
|
row.setMORNINGHALF2(columnValue!=null?columnValue.toString():null); |
||||
|
break; |
||||
|
case "MORNINGHALF3": |
||||
|
row.setMORNINGHALF3(columnValue!=null?columnValue.toString():null); |
||||
|
break; |
||||
|
case "EVENINGHALF1": |
||||
|
row.setEVENINGHALF1(columnValue!=null?columnValue.toString():null); |
||||
|
break; |
||||
|
case "EVENINGHALF2": |
||||
|
row.setEVENINGHALF2(columnValue!=null?columnValue.toString():null); |
||||
|
break; |
||||
|
case "EVENINGHALF3": |
||||
|
row.setEVENINGHALF3(columnValue!=null?columnValue.toString():null); |
||||
|
break; |
||||
|
case "DATE1": |
||||
|
row.setDATE1(columnValue!=null?columnValue.toString():null); |
||||
|
break; |
||||
|
case "DATE2": |
||||
|
row.setDATE2(columnValue!=null?columnValue.toString():null); |
||||
|
break; |
||||
|
case "DATE3": |
||||
|
row.setDATE3(columnValue!=null?columnValue.toString():null); |
||||
|
break; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
||||
|
rows.add(row); |
||||
|
} |
||||
|
return rows; |
||||
|
} |
||||
|
catch (Exception e){ |
||||
|
e.printStackTrace(); |
||||
|
} |
||||
|
return null; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,99 @@ |
|||||
|
package com.metro.community.service; |
||||
|
|
||||
|
public class DataEntry { |
||||
|
private String date1; |
||||
|
private int morningHalf1; |
||||
|
private int eveningHalf1; |
||||
|
private String date2; |
||||
|
private int morningHalf2; |
||||
|
private int eveningHalf2; |
||||
|
private String date3; |
||||
|
private int morningHalf3; |
||||
|
private int eveningHalf3; |
||||
|
|
||||
|
public DataEntry(String date1, int morningHalf1, int eveningHalf1, |
||||
|
String date2, int morningHalf2, int eveningHalf2, |
||||
|
String date3, int morningHalf3, int eveningHalf3) { |
||||
|
this.date1 = date1; |
||||
|
this.morningHalf1 = morningHalf1; |
||||
|
this.eveningHalf1 = eveningHalf1; |
||||
|
this.date2 = date2; |
||||
|
this.morningHalf2 = morningHalf2; |
||||
|
this.eveningHalf2 = eveningHalf2; |
||||
|
this.date3 = date3; |
||||
|
this.morningHalf3 = morningHalf3; |
||||
|
this.eveningHalf3 = eveningHalf3; |
||||
|
} |
||||
|
|
||||
|
public String getDate1() { |
||||
|
return date1; |
||||
|
} |
||||
|
|
||||
|
public void setDate1(String date1) { |
||||
|
this.date1 = date1; |
||||
|
} |
||||
|
|
||||
|
public int getMorningHalf1() { |
||||
|
return morningHalf1; |
||||
|
} |
||||
|
|
||||
|
public void setMorningHalf1(int morningHalf1) { |
||||
|
this.morningHalf1 = morningHalf1; |
||||
|
} |
||||
|
|
||||
|
public int getEveningHalf1() { |
||||
|
return eveningHalf1; |
||||
|
} |
||||
|
|
||||
|
public void setEveningHalf1(int eveningHalf1) { |
||||
|
this.eveningHalf1 = eveningHalf1; |
||||
|
} |
||||
|
|
||||
|
public String getDate2() { |
||||
|
return date2; |
||||
|
} |
||||
|
|
||||
|
public void setDate2(String date2) { |
||||
|
this.date2 = date2; |
||||
|
} |
||||
|
|
||||
|
public int getMorningHalf2() { |
||||
|
return morningHalf2; |
||||
|
} |
||||
|
|
||||
|
public void setMorningHalf2(int morningHalf2) { |
||||
|
this.morningHalf2 = morningHalf2; |
||||
|
} |
||||
|
|
||||
|
public int getEveningHalf2() { |
||||
|
return eveningHalf2; |
||||
|
} |
||||
|
|
||||
|
public void setEveningHalf2(int eveningHalf2) { |
||||
|
this.eveningHalf2 = eveningHalf2; |
||||
|
} |
||||
|
|
||||
|
public String getDate3() { |
||||
|
return date3; |
||||
|
} |
||||
|
|
||||
|
public void setDate3(String date3) { |
||||
|
this.date3 = date3; |
||||
|
} |
||||
|
|
||||
|
public int getMorningHalf3() { |
||||
|
return morningHalf3; |
||||
|
} |
||||
|
|
||||
|
public void setMorningHalf3(int morningHalf3) { |
||||
|
this.morningHalf3 = morningHalf3; |
||||
|
} |
||||
|
|
||||
|
public int getEveningHalf3() { |
||||
|
return eveningHalf3; |
||||
|
} |
||||
|
|
||||
|
public void setEveningHalf3(int eveningHalf3) { |
||||
|
this.eveningHalf3 = eveningHalf3; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,59 @@ |
|||||
|
package com.metro.community.service; |
||||
|
|
||||
|
public class HallDto { |
||||
|
private String zone; |
||||
|
private String division; |
||||
|
private String hallId; |
||||
|
private String toDay; |
||||
|
private String fromDay; |
||||
|
|
||||
|
private String hallName; |
||||
|
|
||||
|
public String getHallName() { |
||||
|
return hallName; |
||||
|
} |
||||
|
|
||||
|
public void setHallName(String hallName) { |
||||
|
this.hallName = hallName; |
||||
|
} |
||||
|
|
||||
|
public String getZone() { |
||||
|
return zone; |
||||
|
} |
||||
|
|
||||
|
public void setZone(String zone) { |
||||
|
this.zone = zone; |
||||
|
} |
||||
|
|
||||
|
public String getDivision() { |
||||
|
return division; |
||||
|
} |
||||
|
|
||||
|
public void setDivision(String division) { |
||||
|
this.division = division; |
||||
|
} |
||||
|
|
||||
|
public String getHallId() { |
||||
|
return hallId; |
||||
|
} |
||||
|
|
||||
|
public void setHallId(String hallId) { |
||||
|
this.hallId = hallId; |
||||
|
} |
||||
|
|
||||
|
public String getToDay() { |
||||
|
return toDay; |
||||
|
} |
||||
|
|
||||
|
public void setToDay(String toDay) { |
||||
|
this.toDay = toDay; |
||||
|
} |
||||
|
|
||||
|
public String getFromDay() { |
||||
|
return fromDay; |
||||
|
} |
||||
|
|
||||
|
public void setFromDay(String fromDay) { |
||||
|
this.fromDay = fromDay; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,13 @@ |
|||||
|
package com.metro.feedback.controller; |
||||
|
|
||||
|
import org.springframework.stereotype.Controller; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
|
||||
|
@RequestMapping("/feedback") |
||||
|
@Controller |
||||
|
public class FeedbackController { |
||||
|
@RequestMapping(value={"/",""}) |
||||
|
public String getmypage(){ |
||||
|
return "feedback/RequestForm"; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,823 @@ |
|||||
|
<!doctype html> |
||||
|
<html xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/html"> |
||||
|
|
||||
|
|
||||
|
<head> |
||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
||||
|
|
||||
|
<meta charset="UTF-8"> |
||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" |
||||
|
integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous"> |
||||
|
<script src="assets/js/lib/jquery.min.js"></script> |
||||
|
|
||||
|
|
||||
|
<title>Community Hall Availability</title> |
||||
|
|
||||
|
<style> |
||||
|
body { |
||||
|
background-color: #f8f9fa; |
||||
|
} |
||||
|
|
||||
|
.card { |
||||
|
border-radius: 15px; |
||||
|
box-shadow: 0 0 15px rgba(0, 0, 0, 0.1); |
||||
|
} |
||||
|
|
||||
|
.community-hall-title { |
||||
|
color: #007bff; |
||||
|
} |
||||
|
|
||||
|
/* Add your custom styles here */ |
||||
|
|
||||
|
@media (max-width: 576px) { |
||||
|
|
||||
|
/* Small devices (576px and down) */ |
||||
|
.community-hall-title { |
||||
|
font-size: 1.5rem; |
||||
|
} |
||||
|
} |
||||
|
.custom-select { |
||||
|
position: relative; |
||||
|
display: inline-block; |
||||
|
} |
||||
|
|
||||
|
.custom-select select { |
||||
|
appearance: none; |
||||
|
-webkit-appearance: none; |
||||
|
-moz-appearance: none; |
||||
|
padding: 8px; |
||||
|
border: 1px solid #ccc; |
||||
|
border-radius: 4px; |
||||
|
width: 200px; /* Adjust the width as needed */ |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
|
||||
|
.custom-select:after { |
||||
|
content: '\25BC'; /* Unicode character for down arrow */ |
||||
|
position: absolute; |
||||
|
top: 50%; |
||||
|
right: 10px; |
||||
|
transform: translateY(-50%); |
||||
|
} |
||||
|
|
||||
|
</style> |
||||
|
</head> |
||||
|
|
||||
|
<body> |
||||
|
<div class="container mt-3"> |
||||
|
<div class="card"> |
||||
|
<div class="card-body"> |
||||
|
<form> |
||||
|
<h3 class="community-hall-title-sub">Select Your Community Hall:</h3> |
||||
|
<div class="row"> |
||||
|
<div class="col-sm-6 " id="zoneSection"> |
||||
|
<label class="form-label" for="zone">Select Zone<span class="text-danger">*</span></label> |
||||
|
|
||||
|
<select class="form-control text-center" name="zone" id="zone" onchange="getdivision()" required> |
||||
|
<option value="0">....Select zone.... </option> |
||||
|
|
||||
|
<option value="01">01_Thiruvottyur </option> |
||||
|
<option value="02">02-Manali</option> |
||||
|
<option value="03">03-Madhavaram</option> |
||||
|
<option value="04">04-Tondiarpet</option> |
||||
|
<option value="05">05-Royapuram</option> |
||||
|
<option value="06">06-Thiru-vi-ka</option> |
||||
|
<option value="07">07-Ambttur</option> |
||||
|
<option value="08">08-Anna Nagar</option> |
||||
|
<option value="09">09-teynampet</option> |
||||
|
<option value="10">10-Kodambakkam</option> |
||||
|
<option value="11">11-Valasaravakkam</option> |
||||
|
<option value="12">12-Alandaur</option> |
||||
|
<option value="13">13-Adyar</option> |
||||
|
<option value="14">14-perungudi</option> |
||||
|
<option value="15">15-Sholiganallur</option> |
||||
|
|
||||
|
</select> |
||||
|
</div> |
||||
|
<div class="col-12 col-md-6" > |
||||
|
|
||||
|
<label for="divs" class="form-label">Division</label> |
||||
|
<select id="divs" name="divs" class="form-control text-center" onchange="getHall()" required> |
||||
|
<option value="01">....select division....</option> |
||||
|
<!-- Your options go here --> |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="row mt-3"> |
||||
|
<div class="col-12 col-md-6" id="divisionSection"> |
||||
|
|
||||
|
<label for="hall" class="form-label"> Community Hall *</label> |
||||
|
<select id="hall" name="hall" class="form-control text-center" onchange="changediv()" required> |
||||
|
<option value="">Select Community Hall *:</option> |
||||
|
<!-- Your options go here --> |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
<div class="row mt-3"> |
||||
|
<div class="col-12"> |
||||
|
<label class="form-label">Select month and Year *</label> |
||||
|
<select id="month" class="form-control text-center" size="1" tabindex="2" required> |
||||
|
<option value="">....Select Month....</option> |
||||
|
<option value="1">January </option> |
||||
|
<option value="2">February</option> |
||||
|
<option value="3">March</option> |
||||
|
<option value="4">April</option> |
||||
|
<option value="5">May</option> |
||||
|
<option value="6">June</option> |
||||
|
<option value="7">July</option> |
||||
|
<option value="8">August</option> |
||||
|
<option value="9">September</option> |
||||
|
<option value="10">October</option> |
||||
|
<option value="11">November</option> |
||||
|
<option value="12">December</option> |
||||
|
</select> |
||||
|
<br> |
||||
|
|
||||
|
<select id="sel_year" class="form-control text-center" size="1" tabindex="3" required> |
||||
|
<option value="">.....Select Year...</option> |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
<br> |
||||
|
<div class="row mt-3 justify-content-end"> |
||||
|
<div class="col-12"> |
||||
|
<a class="nav-link" href="/assets/media/images/Community_Centers_list.pdf" |
||||
|
target="Gcc-Community Centers"> List Of Community Centres - Details Of Rent, Gst And |
||||
|
Security Deposit </a> |
||||
|
<input type="button" value="Check" onclick="chk_code()" name="B1" tabindex="5" |
||||
|
class="btn btn-primary" id="Button1" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div id="DETAILS" style="display: none;"> |
||||
|
<div class="row"> |
||||
|
<div class="col-12"> |
||||
|
<div id="legend1" class="textContent"> |
||||
|
<p> |
||||
|
<img src="/assets/media/images/booked.png"> - Blocked, |
||||
|
<img src="/assets/media/images/Not-booked.png"> - Not Booked, |
||||
|
<img src="/assets/media/images/resgister.png"> - Registered, |
||||
|
<input class="avail-date-icon" type="checkbox" disabled=""> - Available<br> |
||||
|
Mor - Morning, Eve - Evening<br><br> |
||||
|
For a full day, select both "Mor" (Morning slot) and "Eve" (Evening Slot). |
||||
|
</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-12"> |
||||
|
<div align="center" id="" class="table-responsive"> |
||||
|
<table width="80%" border="0" cellpadding="4" cellspacing="0" class="tableBorder"> |
||||
|
<tbody> |
||||
|
<tr> |
||||
|
<td class="tableRow" width="20%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">1</font> |
||||
|
</b><br> |
||||
|
<input type="checkbox" id="morningHalf01" onclick="calcAmount(this)" name="chkbox2m30"> |
||||
|
<input type="checkbox" id="eveningHalf01" name="chkbox2e30"><br>Mor Eve |
||||
|
</div> |
||||
|
</td> |
||||
|
|
||||
|
<td class="tableRow" width="20%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">2</font> |
||||
|
</b><br><input type="checkbox" id="morningHalf02" name="chkbox2m30"> <input |
||||
|
type="checkbox" id="eveningHalf02" name="chkbox2e30"><br>Mor Eve |
||||
|
</div> |
||||
|
</td> |
||||
|
|
||||
|
<td class="tableRow" width="20%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">3</font> |
||||
|
</b><br><input type="checkbox" id="morningHalf03" name="chkbox3m30"> <input |
||||
|
type="checkbox" id="eveningHalf03" name="chkbox3e30"><br>Mor Eve |
||||
|
</div> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td class="tableRow" width="20%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">4</font> |
||||
|
</b><br><input type="checkbox" id="morningHalf04" name="chkbox4m30"> <input |
||||
|
type="checkbox" id="eveningHalf04" name="chkbox4e30"><br>Mor Eve |
||||
|
</div> |
||||
|
</td> |
||||
|
|
||||
|
<td class="tableRow" width="20%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">5</font> |
||||
|
</b><br><input type="checkbox" id="morningHalf05" name="chkbox5m30"> <input |
||||
|
type="checkbox" id="eveningHalf05" name="chkbox5e30"><br>Mor Eve |
||||
|
</div> |
||||
|
</td> |
||||
|
<td class="tableRow" width="20%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">6</font> |
||||
|
</b><br><input type="checkbox" id="morningHalf06" name="chkbox6m30"> <input |
||||
|
type="checkbox" id="eveningHalf06" name="chkbox6e30"><br>Mor Eve |
||||
|
</div> |
||||
|
</td> |
||||
|
|
||||
|
<tr> |
||||
|
<td class="tableRow" width="20%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">7</font> |
||||
|
</b><br><input type="checkbox" id="morningHalf07" name="chkbox7m30"> <input |
||||
|
type="checkbox" id="eveningHalf07" name="chkbox7e30"><br>Mor Eve |
||||
|
</div> |
||||
|
</td> |
||||
|
|
||||
|
<td class="tableRow" width="20%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">8</font> |
||||
|
</b><br><input type="checkbox" id="morningHalf08" name="chkbox8m30"> <input |
||||
|
type="checkbox" id="eveningHalf08" name="chkbox8e30"><br>Mor Eve |
||||
|
</div> |
||||
|
</td> |
||||
|
<td class="tableRow" width="20%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">9</font> |
||||
|
</b><br><input type="checkbox" id="morningHalf09" name="chkbox9m30"> <input |
||||
|
type="checkbox" id="eveningHalf09" name="chkbox9e30"><br>Mor Eve |
||||
|
</div> |
||||
|
</td> |
||||
|
|
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td class="tableRow" width="20%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">10</font> |
||||
|
</b><br><input type="checkbox" id="morningHalf10" name="chkbox10m30"> <input |
||||
|
type="checkbox" id="eveningHalf10" name="chkbox10e30"><br>Mor Eve |
||||
|
</div> |
||||
|
</td> |
||||
|
|
||||
|
<td class="tableRow" width="20%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">11</font> |
||||
|
</b><br><input type="checkbox" id="morningHalf11" name="chkbox11m30"> <input |
||||
|
type="checkbox" id="eveningHalf11" name="chkbox11e30"><br>Mor Eve |
||||
|
</div> |
||||
|
</td> |
||||
|
<td class="tableRow" width="20%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">12</font> |
||||
|
</b><br><input type="checkbox" id="morningHalf12" name="chkbox12m30"> <input |
||||
|
type="checkbox" id="eveningHalf12" name="chkbox12e30"><br>Mor Eve |
||||
|
</div> |
||||
|
</td> |
||||
|
|
||||
|
</tr> |
||||
|
|
||||
|
|
||||
|
<tr> |
||||
|
<td class="tableRow" width="20%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">13</font> |
||||
|
</b><br><input type="checkbox" id="morningHalf13" name="chkbox13m30"> <input |
||||
|
type="checkbox" id="eveningHalf13" name="chkbox13e30"><br>Mor Eve |
||||
|
</div> |
||||
|
</td> |
||||
|
<td class="tableRow" width="20%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">14</font> |
||||
|
</b><br><input type="checkbox" id="morningHalf14" name="chkbox14m30"> <input |
||||
|
type="checkbox" id="eveningHalf14" name="chkbox14e30"><br>Mor Eve |
||||
|
</div> |
||||
|
</td> |
||||
|
<td class="tableRow" width="20%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">15</font> |
||||
|
</b><br><input type="checkbox" id="morningHalf15" name="chkbox15m30"> <input |
||||
|
type="checkbox" id="eveningHalf15" name="chkbox15e30"><br>Mor Eve |
||||
|
</div> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td class="tableRow" width="20%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">16</font> |
||||
|
</b><br><input type="checkbox" id="morningHalf16" name="chkbox16m30"> <input |
||||
|
type="checkbox" id="eveningHalf16" name="chkbox16e30"><br>Mor Eve |
||||
|
</div> |
||||
|
</td> |
||||
|
<td class="tableRow" width="20%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">17</font> |
||||
|
</b><br><input type="checkbox" id="morningHalf17" name="chkbox17m30"> <input |
||||
|
type="checkbox" id="eveningHalf17" name="chkbox17e30"><br>Mor Eve |
||||
|
</div> |
||||
|
</td> |
||||
|
<td class="tableRow" width="20%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">18</font> |
||||
|
</b><br><input type="checkbox" id="morningHalf18" name="chkbox18m30"> <input |
||||
|
type="checkbox" id="eveningHalf18" name="chkbox18e30"><br>Mor Eve |
||||
|
</div> |
||||
|
</td> |
||||
|
</tr> |
||||
|
|
||||
|
<tr> |
||||
|
<td class="tableRow" width="20%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">19</font> |
||||
|
</b><br><input type="checkbox" id="morningHalf19" name="chkbox19m30"> <input |
||||
|
type="checkbox" id="eveningHalf19" name="chkbox19e30"><br>Mor Eve |
||||
|
</div> |
||||
|
</td> |
||||
|
<td class="tableRow" width="20%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">20</font> |
||||
|
</b><br><input type="checkbox" id="morningHalf20" name="chkbox20m30"> <input |
||||
|
type="checkbox" id="eveningHalf20" name="chkbox20e30"><br>Mor Eve |
||||
|
</div> |
||||
|
</td> |
||||
|
<td class="tableRow" width="20%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">21</font> |
||||
|
</b><br><input type="checkbox" id="morningHalf21" name="chkbox21m30"> |
||||
|
<input type="checkbox" id="eveningHalf21" name="chkbox21e30"><br>Mor Eve |
||||
|
</div> |
||||
|
</td> |
||||
|
</tr> |
||||
|
|
||||
|
<tr> |
||||
|
<td class="tableRow" width="20%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">22</font> |
||||
|
</b><br><input type="checkbox" id="morningHalf22" name="chkbo22m30"> <input |
||||
|
type="checkbox" id="eveningHalf22" name="chkbox22e30"><br>Mor Eve |
||||
|
</div> |
||||
|
</td> |
||||
|
<td class="tableRow" width="20%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">23</font> |
||||
|
</b><br><input type="checkbox" id="morningHalf23" name="chkbox23m30"> <input |
||||
|
type="checkbox" id="eveningHalf23" name="chkbox23e30"><br>Mor Eve |
||||
|
</div> |
||||
|
</td> |
||||
|
<td class="tableRow" width="20%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">24</font> |
||||
|
</b><br><input type="checkbox" id="morningHalf24" name="chkbox24m30"> <input |
||||
|
type="checkbox" id="eveningHalf24" name="chkbox24e30"><br>Mor Eve |
||||
|
</div> |
||||
|
</td> |
||||
|
</tr> |
||||
|
|
||||
|
<tr> |
||||
|
<td class="tableRow" width="20%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">25</font> |
||||
|
</b><br><input type="checkbox" id="morningHalf25" name="chkbox25m30"> <input |
||||
|
type="checkbox" id="eveningHalf25" name="chkbox25e30"><br>Mor Eve |
||||
|
</div> |
||||
|
</td> |
||||
|
<td class="tableRow" width="20%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">26</font> |
||||
|
</b><br><input type="checkbox" id="morningHalf26" name="chkbox26m30"> <input |
||||
|
type="checkbox" id="eveningHalf26" name="chkbox26e30"><br>Mor Eve </div> |
||||
|
</td> |
||||
|
<td class="tableRow" width="20%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">27</font> |
||||
|
</b><br><input type="checkbox" id="morningHalf27" name="chkbox27m30"> <input |
||||
|
type="checkbox" id="eveningHalf27" name="chkbox27e30"><br>Mor Eve |
||||
|
</div> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td class="tableRow" width="20%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">28</font> |
||||
|
</b><br><input type="checkbox" id="morningHalf28" name="chkbox28m30"> <input |
||||
|
type="checkbox" id="eveningHalf28" name="chkbox28e30"><br>Mor Eve |
||||
|
</div> |
||||
|
</td> |
||||
|
<td class="tableRow" width="40%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">29</font> |
||||
|
</b><br><input type="checkbox" id="morningHalf29" name="chkbox29m30"> <input |
||||
|
type="checkbox" id="eveningHalf29" name="chkbox29e30"><br>Mor Eve |
||||
|
</div> |
||||
|
</td> |
||||
|
<td class="tableRow" width="40%"> |
||||
|
<div align="center"> |
||||
|
<b> |
||||
|
<font size="3+">30</font> |
||||
|
</b><br><input type="checkbox" id="morningHalf30" name="chkbox30m30"> <input |
||||
|
type="checkbox" id="eveningHalf30" name="chkbox30e30"><br>Mor Eve |
||||
|
</div> |
||||
|
</td> |
||||
|
|
||||
|
|
||||
|
|
||||
|
</tr> |
||||
|
|
||||
|
|
||||
|
</tr> |
||||
|
</tbody> |
||||
|
</table> |
||||
|
<!-- Your table with checkboxes goes here --> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-12"> |
||||
|
<div align="center" id="availTab" class="table-responsive"> |
||||
|
<table class="table tableBorder"> |
||||
|
<tbody> |
||||
|
<tr> |
||||
|
<td align="left" valign="top" class="tableRow"><strong>Community Hall Details |
||||
|
</strong> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td align="right" valign="top" class="tableRow"> |
||||
|
<table border="0" cellpadding="4" cellspacing="0"> |
||||
|
<tbody> |
||||
|
<tr> |
||||
|
<td width="23%">HALF DAY RATE</td> |
||||
|
<td width="30%">: |
||||
|
<input type="text" name="halfdayamt" id="halfdayamt" class="bgListTextArea" readonly="true" size="12" fdprocessedid="tekels" value="800.0"> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td width="18%">SURCHARGES</td> |
||||
|
<td width="29%">: |
||||
|
<input type="text" name="halfdaysurcharge" id="halfdaysurcharge" |
||||
|
class="bgListTextArea" readonly="true" size="12" |
||||
|
fdprocessedid="2nghg"> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td>FULL DAY RATE</td> |
||||
|
<td>: |
||||
|
<input type="text" name="fulldayamt" id="fulldayamt" |
||||
|
class="bgListTextArea" readonly="true" size="12" |
||||
|
fdprocessedid="vinum" value="1500.0"> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td>SURCHARGES</td> |
||||
|
<td>: |
||||
|
<input type="text" name="fulldaysurcharge" id="fulldaysurcharge" |
||||
|
class="bgListTextArea" readonly="true" size="12" |
||||
|
fdprocessedid="6uydm9"> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td>ADVANCE</td> |
||||
|
<td>: |
||||
|
<input type="text" name="advanceamt" id="advanceamt" |
||||
|
class="bgListTextArea" readonly="true" size="12" |
||||
|
fdprocessedid="7799zc" value="0.0"> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td>DEPOSIT</td> |
||||
|
<td>: |
||||
|
<input type="text" name="depositeamt" id="depositeamt" |
||||
|
class="bgListTextArea" readonly="true" size="12" |
||||
|
fdprocessedid="td0q6q" value="1500.0"> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td>CAPACITY</td> |
||||
|
<td>: |
||||
|
<input name="capacity" type="text" id="capacity" class="bgListTextArea" |
||||
|
size="12" readonly="true" fdprocessedid="esnsa9" |
||||
|
value="300 Seats"> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td>RENTAL</td> |
||||
|
<td>:<input name="rental" type="text" class="bgListTextArea" |
||||
|
size="12" readonly="true" fdprocessedid="2o3ddc" value="0"> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td>GST</td> |
||||
|
<td>: |
||||
|
<input name="servicetax" type="text" class="bgListTextArea" |
||||
|
size="12" readonly="true" fdprocessedid="1ba8jj" value="0"> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td> </td> |
||||
|
<td> </td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td>FULL DAY EB , CLEANING AND PA SYSTEM CHARGES</td> |
||||
|
<td>: |
||||
|
<input name="eb_pa_full_amt" id="eb_pa_full_amt" type="text" |
||||
|
class="bgListTextArea" size="12" readonly="true" |
||||
|
fdprocessedid="gbcxpd" value="0"> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td> GST</td> |
||||
|
<td> <input name="eb_pa_full_serv" id="eb_pa_full_serv" |
||||
|
type="text" class="bgListTextArea" size="12" readonly="true" |
||||
|
fdprocessedid="ujdozo" value="0"></td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td>HALF DAY EB , CLEANING AND PA SYSTEM CHARGES</td> |
||||
|
<td>: |
||||
|
<input name="eb_pa_half_amt" id="eb_pa_half_amt" type="text" |
||||
|
class="bgListTextArea" size="12" readonly="true" |
||||
|
fdprocessedid="i7hpg" value="0"> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td> GST</td> |
||||
|
<td> <input name="eb_pa_halft_serv" id="eb_pa_halft_serv" |
||||
|
type="text" class="bgListTextArea" size="12" readonly="true" |
||||
|
fdprocessedid="0tnm04" value="0"></td> |
||||
|
</tr> |
||||
|
</tbody> |
||||
|
</table> |
||||
|
</td> |
||||
|
</tr> |
||||
|
</tbody> |
||||
|
</table> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
</div> |
||||
|
</form> |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
<script> |
||||
|
|
||||
|
|
||||
|
|
||||
|
function toggleDetails() { |
||||
|
var hallCheckbox = document.getElementById("hallCheckbox"); |
||||
|
var communityHallSection = document.getElementById("TR_COMM"); |
||||
|
|
||||
|
if (hallCheckbox.checked) { |
||||
|
communityHallSection.style.display = "block"; |
||||
|
} else { |
||||
|
communityHallSection.style.display = "none"; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
function chk_code() { |
||||
|
// var z = document.getElementById("zone").value; |
||||
|
var h =document.getElementById("hall").value; |
||||
|
var y =document.getElementById("sel_year").value; |
||||
|
var m =document.getElementById("month").value; |
||||
|
var ld=getDaysInMonth(2023, 11); |
||||
|
var fromdate = y+"-" |
||||
|
alert("status....call:"+h); |
||||
|
$.ajax({ |
||||
|
url: '/community/api/getHallByMonthAndYear', // Replace with the actual URL to retrieve division data |
||||
|
method: 'GET', |
||||
|
data: { |
||||
|
hallId: 43, |
||||
|
fromDay: '2023-10-01' , |
||||
|
toDay: '2023-10-28'}, |
||||
|
success: function (data) { |
||||
|
setCalendarStatus(data); |
||||
|
}, |
||||
|
error: function (error) { |
||||
|
} |
||||
|
}); |
||||
|
document.getElementById("DETAILS").style.display = "block"; |
||||
|
} |
||||
|
|
||||
|
var calendar; |
||||
|
function setCalendarStatus(data) { |
||||
|
//console.log(data); |
||||
|
calendar=data; |
||||
|
// Create an object to store status information |
||||
|
var statusInformation = {}; |
||||
|
|
||||
|
for (var i = 0; i < data.length; i++) { |
||||
|
var currentDate = data[i].date; |
||||
|
var morningHalfValue = data[i].morningHalf; |
||||
|
var eveningHalfValue = data[i].eveningHalf; |
||||
|
//console.log(data[i].date); |
||||
|
//console.log(document.getElementById("morningHalf" + currentDate).value); |
||||
|
//Set the status for morningHalf |
||||
|
document.getElementById("morningHalf" + currentDate).checked = morningHalfValue === 1; |
||||
|
document.getElementById("eveningHalf" + currentDate).checked = eveningHalfValue === 1; |
||||
|
|
||||
|
// Store the status information in the object |
||||
|
statusInformation[currentDate] = { |
||||
|
morningHalf: morningHalfValue, |
||||
|
eveningHalf: eveningHalfValue |
||||
|
}; |
||||
|
} |
||||
|
|
||||
|
// Now you can use statusInformation object for further processing |
||||
|
//console.log(statusInformation); |
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
|
||||
|
|
||||
|
<script> |
||||
|
function getDaysInMonth(year, month) { |
||||
|
// Adjust the month to be 0-based if your calendar starts with December |
||||
|
const adjustedMonth = (month + 11) % 12; |
||||
|
|
||||
|
const isLeap = (year % 4 === 0 && year % 100 !== 0) || (year % 400 === 0); |
||||
|
const daysInMonth = new Date(year, adjustedMonth + 1, 0).getDate(); |
||||
|
|
||||
|
if (adjustedMonth === 1 && isLeap) { |
||||
|
return 29; // February has 29 days in a leap year |
||||
|
} else { |
||||
|
return daysInMonth; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
function populateYears() { |
||||
|
var currentYear = new Date().getFullYear(); |
||||
|
var string=""; |
||||
|
for (let i=0;i<2;i++) { |
||||
|
string = string + "<option value=" + currentYear + ">" + currentYear + "</option>"; |
||||
|
currentYear=currentYear+1; |
||||
|
} |
||||
|
document.getElementById("sel_year").innerHTML = string; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
// Call the functions to populate months and years |
||||
|
populateYears(); |
||||
|
|
||||
|
|
||||
|
|
||||
|
function getdivision() { |
||||
|
var z = document.getElementById("zone").value; |
||||
|
$.ajax({ |
||||
|
url: '/community/api/getHall', // Replace with the actual URL to retrieve division data |
||||
|
method: 'GET', |
||||
|
data: { zone: z }, |
||||
|
success: function (data) { |
||||
|
setDivisionAndHall(data) |
||||
|
}, |
||||
|
error: function (error) { |
||||
|
console.error('Error fetching division data:', error); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
var hallInfo; |
||||
|
var hallIndex; |
||||
|
function setDivisionAndHall(data) { |
||||
|
var string = ""; |
||||
|
hallInfo=data; |
||||
|
console.log(data); |
||||
|
for (let i = 0; i < data.length; i++) { |
||||
|
|
||||
|
string = string + "<option value=" + data[i].COMMUNITYHALLDIVID + ">" + data[i].COMMUNITYHALLDIVID + "</option>"; |
||||
|
} |
||||
|
document.getElementById("divs").innerHTML = string; |
||||
|
|
||||
|
var hallName = ""; |
||||
|
for (let i = 0; i < data.length; i++) { |
||||
|
|
||||
|
hallName = hallName + "<option value=" + data[i].COMMUNITYHALLCODE + ">" + data[i].COMMUNITYHALLPLACE + "</option>"; |
||||
|
} |
||||
|
document.getElementById("hall").innerHTML = hallName; |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
function getHall() { |
||||
|
var z = document.getElementById("zone").value; |
||||
|
var d = document.getElementById("divs").value; |
||||
|
for(let i=0;i<hallInfo.length;i++){ |
||||
|
if(hallInfo[i].COMMUNITYHALLDIVID==d) |
||||
|
{ |
||||
|
document.getElementById("hall").value=hallInfo[i].COMMUNITYHALLCODE; |
||||
|
setHallAmount(i); |
||||
|
hallIndex=i; |
||||
|
break; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
function changediv() { |
||||
|
var hallValue = document.getElementById("hall").value; |
||||
|
for (let i = 0; i <hallInfo.length; i++) { |
||||
|
if (hallInfo[i].COMMUNITYHALLCODE == hallValue) { |
||||
|
document.getElementById("divs").value = hallInfo[i].COMMUNITYHALLDIVID; |
||||
|
setHallAmount(i); |
||||
|
hallIndex=i; |
||||
|
break; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
function setHallAmount(i){ |
||||
|
let fa =hallInfo[i].COMMUNITYHALLFULLDAYRATE; |
||||
|
let ha =hallInfo[i].COMMUNITYHALLHALFDAYRATE; |
||||
|
let fs =hallInfo[i].COMMUNITYHALLFULLSURCHARGE; |
||||
|
let hs =hallInfo[i].COMMUNITYHALLHALFSURCHARGE; |
||||
|
let hd =hallInfo[i].COMMUNITYHALLDEPOSIT; |
||||
|
let had =hallInfo[i].COMMUNITYHALLADVANCE; |
||||
|
let hc =hallInfo[i].COMMUNITYHALLCAPACITY; |
||||
|
let eb =hallInfo[i].EB_FULL; |
||||
|
let eh =hallInfo[i].EB_HALF; |
||||
|
let cf =hallInfo[i].CLEAN_CHRG_FULL; |
||||
|
let ch =hallInfo[i].CLEAN_CHRG_HALF; |
||||
|
|
||||
|
document.getElementById("fulldayamt").value=fa; |
||||
|
document.getElementById("halfdayamt").value=ha; |
||||
|
document.getElementById("fulldaysurcharge").value=fs; |
||||
|
document.getElementById("halfdaysurcharge").value=fs; |
||||
|
document.getElementById("depositeamt").value=hd; |
||||
|
document.getElementById("advanceamt").value=had; |
||||
|
document.getElementById("capacity").value=hc; |
||||
|
document.getElementById("eb_pa_full_amt").value=eb; |
||||
|
document.getElementById("eb_pa_half_amt").value=eh; |
||||
|
document.getElementById("eb_pa_full_serv").value=cf; |
||||
|
document.getElementById("eb_pa_halft_serv").value=ch; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
function setHall(data) { |
||||
|
var string = ""; |
||||
|
|
||||
|
|
||||
|
if (data.length == 0) { |
||||
|
alert("OOps!! \nThere Is No Community Hall In This Division") |
||||
|
} else { |
||||
|
for (let i = 0; i < data.length; i++) { |
||||
|
|
||||
|
string = string + "<option value=" + data[i].COMMUNITYHALLCODE + ">" + data[i].COMMUNITYHALLPLACE + "</option>"; |
||||
|
} |
||||
|
document.getElementById("hall").innerHTML = string; |
||||
|
} |
||||
|
console.log(data); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
var count=0; |
||||
|
function calcAmount(checked){ |
||||
|
alert(checked.id); |
||||
|
fa=document.getElementById("fulldayamt").value; |
||||
|
ha=document.getElementById("halfdayamt").value; |
||||
|
fa=fa+hallInfo[hallIndex].COMMUNITYHALLHALFDAYRATE; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
</body> |
||||
|
|
||||
|
</html> |
||||
@ -0,0 +1,726 @@ |
|||||
|
<!doctype html> |
||||
|
<html lang="en"> |
||||
|
<html xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/html"> |
||||
|
|
||||
|
<head> |
||||
|
<meta charset="utf-8"> |
||||
|
<meta name="viewport" content="width=device-width,initial-scale=1.0"> |
||||
|
|
||||
|
<title>GCC Grabage Collection Request</title> |
||||
|
|
||||
|
<meta name="description" content="GCC Public Garbage collection request application"> |
||||
|
<meta name="author" content="gcc"> |
||||
|
<meta name="robots" content="noindex, nofollow"> |
||||
|
|
||||
|
<!-- Open Graph Meta --> |
||||
|
<meta property="og:title" content="Dashmix - Bootstrap 5 Admin Template & UI Framework"> |
||||
|
<meta property="og:site_name" content="gcc"> |
||||
|
<meta property="og:description" content="GCC Public Garbage collection request application"> |
||||
|
<meta property="og:type" content="website"> |
||||
|
<meta property="og:url" content=""> |
||||
|
<meta property="og:image" content=""> |
||||
|
|
||||
|
|
||||
|
<link rel="shortcut icon" href="assets/media/favicons/favicon.png"> |
||||
|
<link rel="icon" type="image/png" sizes="192x192" href="assets/media/favicons/favicon-192x192.png"> |
||||
|
<link rel="apple-touch-icon" sizes="180x180" href="assets/media/favicons/apple-touch-icon-180x180.png"> |
||||
|
|
||||
|
<link rel="stylesheet" id="css-main" href="assets/css/dashmix.min.css"> |
||||
|
|
||||
|
</head> |
||||
|
|
||||
|
<body> |
||||
|
<style> |
||||
|
.otp-input-box { |
||||
|
/*display: flex; |
||||
|
justify-content: space-between;*/ |
||||
|
width: 100%; |
||||
|
} |
||||
|
|
||||
|
.otp-input { |
||||
|
width: 30px; |
||||
|
height: 30px; |
||||
|
border: 1px solid #ccc; |
||||
|
border-radius: 5px; |
||||
|
text-align: center; |
||||
|
font-size: 16px; |
||||
|
margin-right: 10px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
|
<div id="page-container" class="page-header-dark main-content-boxed"> |
||||
|
|
||||
|
<!-- Header --> |
||||
|
<header id="page-header"> |
||||
|
<!-- Header Content --> |
||||
|
<div class="content-header"> |
||||
|
<!-- Left Section --> |
||||
|
<div class="d-flex align-items-center"> |
||||
|
<!-- Logo --> |
||||
|
<a class="fw-semibold text-dual tracking-wide" href="index.html"> |
||||
|
<table> |
||||
|
<tr> |
||||
|
<td> |
||||
|
<img id="site-logo" src="https://chennaicorporation.gov.in/gcc/images/270-2709575_greater-chennai-corporation-dr-greater-chennai-corporation-logo.png" style="width: 40px;"> |
||||
|
</td> |
||||
|
<td> |
||||
|
<h6 id="logo-txt" class="logo-text ml-1" style="font-size: 12.4px; margin-bottom: 0px;">GREATER<br> |
||||
|
CHENNAI<br> |
||||
|
CORPORATION</h6> |
||||
|
</td> |
||||
|
</tr> |
||||
|
</table> |
||||
|
</a> |
||||
|
<!-- END Logo --> |
||||
|
</div> |
||||
|
<!-- END Left Section --> |
||||
|
|
||||
|
<!-- Right Section --> |
||||
|
<div> |
||||
|
<!-- User Dropdown --> |
||||
|
<div class="dropdown d-inline-block"> |
||||
|
<button type="button" class="btn btn-alt-secondary" id="page-header-user-dropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
||||
|
<i class="fa fa-bars"></i> |
||||
|
<i class="fa fa-angle-down opacity-50 ms-1"></i> |
||||
|
</button> |
||||
|
<div class="dropdown-menu dropdown-menu-lg dropdown-menu-end p-0" aria-labelledby="page-header-user-dropdown"> |
||||
|
<div class="rounded-top fw-semibold text-white bg-image" style="background-image: url('assets/media/photos/photo20.jpg');"> |
||||
|
<div class="p-3 bg-black-50 rounded-top"> |
||||
|
<div class="d-flex align-items-center"> |
||||
|
<img class="img-avatar img-avatar48 img-avatar-thumb" src="assets/media/avatars/avatar3.jpg" alt=""> |
||||
|
<div class="ms-3"> |
||||
|
<a class="text-white fw-semibold" href="">Mobile No</a> |
||||
|
<div class="fs-sm text-white-75" id="userNo"></div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="p-2"> |
||||
|
<a class="dropdown-item d-flex justify-content-between align-items-center" href="javascript:getrequest()"> |
||||
|
<div> |
||||
|
<i class="fa fa-fw fa-globe opacity-50 me-1"></i> |
||||
|
Request Status |
||||
|
</div> |
||||
|
<span class="badge rounded-pill bg-primary"></span> |
||||
|
</a> |
||||
|
<a class="dropdown-item d-flex justify-content-between align-items-center" href="/"> |
||||
|
<div> |
||||
|
<i class="fa fa-fw fa-sync-alt opacity-50 me-1"></i> |
||||
|
Create New Request |
||||
|
</div> |
||||
|
</a> |
||||
|
|
||||
|
<div role="separator" class="dropdown-divider"></div> |
||||
|
<div id="logout" > |
||||
|
<a class="dropdown-item d-flex align-items-center mb-0" href="javascript:logout();"> |
||||
|
<i class="fa fa-fw fa-sign-out-alt text-danger me-1"></i> |
||||
|
Log Out |
||||
|
</a> |
||||
|
</div> |
||||
|
<div id="login"> |
||||
|
<a class="dropdown-item d-flex align-items-center mb-0" href="javascript:showAndHide();"> |
||||
|
<i class="fa fa-fw fa-sign-in-alt text-danger me-1"></i> |
||||
|
Log In |
||||
|
</a> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- END User Dropdown --> |
||||
|
</div> |
||||
|
<!-- END Right Section --> |
||||
|
</div> |
||||
|
<!-- END Header Content --> |
||||
|
|
||||
|
<!-- Header Search --> |
||||
|
|
||||
|
<!-- END Header Search --> |
||||
|
|
||||
|
<!-- Header Loader --> |
||||
|
<!-- Please check out the Loaders page under Components category to see examples of showing/hiding it --> |
||||
|
<div id="page-header-loader" class="overlay-header bg-sidebar-dark"> |
||||
|
<div class="content-header"> |
||||
|
<div class="w-100 text-center"> |
||||
|
<i class="fa fa-fw fa-2x fa-spinner fa-spin text-primary"></i> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- END Header Loader --> |
||||
|
</header> |
||||
|
<!-- END Header --> |
||||
|
|
||||
|
<!-- Main Container --> |
||||
|
<main id="main-container"> |
||||
|
<!-- Hero --> |
||||
|
<div class="bg-image" style="background-image: url('assets/media/photos/photo15@2x.jpg');"> |
||||
|
<div class="bg-primary-dark-op"> |
||||
|
<div class="content content-full"> |
||||
|
<div class="py-3 text-center"> |
||||
|
<h2 class="text-white mb-2">Government of Tamil Nadu</h2> |
||||
|
<h3 class="h4 fw-normal text-white-75 mb-0">தமிழ்நாடு அரசு பெருநகர சென்னை மாநகராட்சி</h3> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- END Hero --> |
||||
|
|
||||
|
|
||||
|
<!-- Page Content --> |
||||
|
<div class="content"> |
||||
|
<!-- Dummy content --> |
||||
|
<div class="row"> |
||||
|
<!-- <a><button class="btn btn-primary btn-sm" onclick="getrequest()">My Request</button></a> --> |
||||
|
|
||||
|
<div class="col-12"> |
||||
|
<form action="#" id="garbageform" th:action="@{/request_save}" th:object="${request_save}" method="post" onsubmit="return login();" enctype="multipart/form-data"> |
||||
|
<div class="block block-rounded"> |
||||
|
<div class="block-header block-header-default"> |
||||
|
<h3 class="block-title">New Request Form</h3> |
||||
|
</div> |
||||
|
|
||||
|
<div class="block-content"> |
||||
|
|
||||
|
<div class="row"> |
||||
|
<div class="col-md-12 alert-light border-0"> |
||||
|
<div class="mb-3"> |
||||
|
<label class="form-check-label" for="name">Name</label> |
||||
|
<input type="text" class="form-control" id="name" required="" name="name"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-md-6 alert-light border-0"> |
||||
|
<div class="mb-3"> |
||||
|
<label class="form-check-label" for="mobile">Mobile No</label> |
||||
|
<input type="text" class="form-control" id="mobile" minlength="10" maxlength="10" required="" name="mobile"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-md-6 alert-light border-0"> |
||||
|
<div class="mb-3"> |
||||
|
<label class="form-check-label" for="email">Email ID</label> |
||||
|
<input type="text" class="form-control" id="email" required="" name="email"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-md-12 alert-light border-0"> |
||||
|
<div class="mb-3"> |
||||
|
<label class="form-check-label" for="address">Address</label> |
||||
|
<textarea id="address" class="form-control" name="address" rows="3" required=""></textarea> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-md-12 alert-light border-0"> |
||||
|
<div class="mb-3"> |
||||
|
<label class="form-check-label" for="landmark">Nearest Landmark</label> |
||||
|
<input type="text" class="form-control" id="landmark" required="" name="landmark"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-md-6 alert-light border-0"> |
||||
|
<div class="mb-3"> |
||||
|
<label class="form-check-label" for="request_type">Select Request Type</label> |
||||
|
<select class="form-select" name="request_type" id="request_type"> |
||||
|
<option value="">---Select Request Type---</option> |
||||
|
<option value="Residential">Residential</option> |
||||
|
<option value="Commercial">Commercial</option> |
||||
|
<option value="Regigious">Religious</option> |
||||
|
<option value="Industrial">Industrial</option> |
||||
|
<option value="Others">Others</option> |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-md-6 alert-light border-0"> |
||||
|
<div class="mb-3"> |
||||
|
<label class="form-check-label" for="garbage_category">Select Garbage Type</label> |
||||
|
<select class="form-select" name="garbage_category" id="garbage_category"> |
||||
|
<option value="">---Select Garbage Type---</option> |
||||
|
<option value="Plastic">Plastic</option> |
||||
|
<option value="Organic">Organic</option> |
||||
|
<option value="Paper">Paper</option> |
||||
|
<option value="Glass">Glass</option> |
||||
|
<option value="Metel">Metel</option> |
||||
|
<option value="E-Waste">E-Waste</option> |
||||
|
<option value="All">All</option> |
||||
|
<option value="Others">Others</option> |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-md-4 alert-light border-0"> |
||||
|
<div class="mb-3"> |
||||
|
<label class="form-check-label" for="zone">Select Zone</label> |
||||
|
<select class="form-select" name="zone" id="zone" required="" onchange="getDiv(this);"> |
||||
|
<option value="">---Select Zone---</option> |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-md-4 alert-light border-0"> |
||||
|
<div class="mb-3"> |
||||
|
<label class="form-check-label" for="division">Select Division</label> |
||||
|
<select class="form-select" name="division" id="division" required="" onchange="getArea(this);"> |
||||
|
<option value="">---Select Div---</option> |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-md-4 alert-light border-0"> |
||||
|
<div class="mb-3"> |
||||
|
<label class="form-check-label" for="area">Select Area</label> |
||||
|
<select class="form-select" name="area" id="area" onchange="getLocation(this);"> |
||||
|
<option value="">---Select Area---</option> |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-md-6 alert-light border-0"> |
||||
|
<div class="mb-3"> |
||||
|
<label class="form-check-label" for="locality">Select Location</label> |
||||
|
<select class="form-select" name="locality" id="locality" onchange="getStreet(this);"> |
||||
|
<option value="">---Select Location---</option> |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-md-6 alert-light border-0"> |
||||
|
<div class="mb-3"> |
||||
|
<label class="form-check-label" for="street">Select Street</label> |
||||
|
<select class="form-select" name="street" id="street"> |
||||
|
<option value="">---Select Street---</option> |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- |
||||
|
<div class="col-md-3 alert-light border-0"> |
||||
|
<div class="mb-3"> |
||||
|
<label class="form-check-label" for="assetLatitude">Latitude</label> |
||||
|
<input type="text" class="form-control" id="assetLatitude" name="assetLatitude"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-md-3 alert-light border-0"> |
||||
|
<div class="mb-3"> |
||||
|
<label class="form-check-label" for="assetLongitude">Longitude</label> |
||||
|
<input type="text" class="form-control" id="assetLongitude" name="assetLongitude"> |
||||
|
</div> |
||||
|
</div> |
||||
|
--> |
||||
|
<div class="col-md-12 alert-light border-0"> |
||||
|
<div class="mb-3"> |
||||
|
<label class="form-check-label" for="garbageFile">Select Garbage Photo</label> |
||||
|
<input type="file" accept="image/*" class="form-control" name="garbagePhoto" id="garbageFile"> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div id="viewimg"></div> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
<hr class="m-0"> |
||||
|
<div class="block-content block-content-full text-end"> |
||||
|
<button type="button" class="btn btn-de-secondary btn-sm" data-bs-dismiss="modal">Close</button> |
||||
|
<button type="submit" class="btn btn-primary btn-sm">Save</button> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</form> |
||||
|
</div> |
||||
|
<!-- END Dummy content --> |
||||
|
</div> |
||||
|
|
||||
|
<!-- END Page Content --> |
||||
|
</div> |
||||
|
</main> |
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
|
||||
|
<!-- Footer --> |
||||
|
<footer id="page-footer" class="footer-static bg-body-extra-light"> |
||||
|
<div class="content py-4"> |
||||
|
<!-- Footer Copyright --> |
||||
|
<div class="row fs-sm pt-0"> |
||||
|
<div class="col-sm-6 order-sm-1 text-center text-sm-start"> |
||||
|
<a class="fw-semibold" href="https://chennaicorporation.gov.in/gcc/" target="_blank">GREATER CHENNAI CORPORATION</a> © <span data-toggle="year-copy"></span> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- END Footer Copyright --> |
||||
|
</div> |
||||
|
</footer> |
||||
|
<!-- END Footer --> |
||||
|
</div> |
||||
|
<!-- END Page Container --> |
||||
|
<div class="modal fade backdrop" id="getMobileNo" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="staticBackdropLabel" aria-hidden="true"> |
||||
|
<div class="modal-dialog" role="document"> |
||||
|
<div class="modal-content"> |
||||
|
<form action="javascript:newUserCall();" > |
||||
|
<div class="block block-rounded block-themed block-transparent mb-0"> |
||||
|
|
||||
|
<div class="block-content"> |
||||
|
<div class="mb-4"> |
||||
|
<label class="form-label">Registed Mobile Number <span class="text-danger">*</span></label> |
||||
|
<input type="number" minlength="10" maxlength="10" class="form-control text-center" id="mobii" placeholder="Numbers Only" required /> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="block-content block-content-full text-end bg-body" id="mbutton"> |
||||
|
<button type="button" class="btn btn-sm btn-alt-secondary" data-bs-dismiss="modal">Close</button> |
||||
|
<button type="submit" class="btn btn-sm btn-primary">Submit</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!--end modal--> |
||||
|
|
||||
|
<!-- PopUp Modal OTP Form --> |
||||
|
<div class="modal fade" id="otpForm" tabindex="-1" role="dialog" aria-labelledby="otpFormLabel" aria-hidden="true"> |
||||
|
<div class="modal-dialog" role="document"> |
||||
|
<div class="modal-content"> |
||||
|
<form action="#" th:action="@{/otpForm}" th:object="${otpForm}" method="post" onsubmit="return verifyOtp();"> |
||||
|
<div class="modal-header"> |
||||
|
<h6 class="modal-title m-0" id="exampleModalDefaultLabel">OTP Login</h6> |
||||
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> |
||||
|
</div><!--end modal-header--> |
||||
|
<div class="modal-body"> |
||||
|
<div class="row"> |
||||
|
<div class="mb-3 text-center"> |
||||
|
<img src="assets/media/images/mobileotp.png" width="50%" alt="Mobileotp"> |
||||
|
</div> |
||||
|
<div class="mb-0 text-center"> |
||||
|
<h4>OTP Verification</h4> |
||||
|
<p class="text-mute">Enter the OTP sent to <b class="text-info" id="mobilenotxt"></b></p> |
||||
|
<p class="text-danger" id="otperror"></p> |
||||
|
</div> |
||||
|
<div class="mb-3 text-center"> |
||||
|
<div class="otp-input-box"> |
||||
|
<input type="text" maxlength="1" class="otp-input" id="otp1" required/> |
||||
|
<input type="text" maxlength="1" class="otp-input" id="otp2" required/> |
||||
|
<input type="text" maxlength="1" class="otp-input" id="otp3" required/> |
||||
|
<input type="text" maxlength="1" class="otp-input" id="otp4" required/> |
||||
|
<input type="text" maxlength="1" class="otp-input" id="otp5" required/> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="mb-3 text-center"> |
||||
|
<div id="resend-container"> |
||||
|
<p class="mb-0">Didn't receive OTP?</p> |
||||
|
<p class="mb-0 text-info" id="resendlink">Please wait..<span id="countdown">60</span>s</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div><!--end row--> |
||||
|
</div><!--end modal-body--> |
||||
|
<div class="modal-footer"> |
||||
|
<button type="button" class="btn btn-de-secondary btn-sm" data-bs-dismiss="modal">Close</button> |
||||
|
<button type="submit" class="btn btn-primary btn-sm">Verify OTP</button> |
||||
|
</div><!--end modal-footer--> |
||||
|
</form> |
||||
|
</div><!--end modal-content--> |
||||
|
</div><!--end modal-dialog--> |
||||
|
</div><!--end modal--> |
||||
|
|
||||
|
<!-- |
||||
|
Dashmix JS |
||||
|
|
||||
|
Core libraries and functionality |
||||
|
webpack is putting everything together at assets/_js/main/app.js |
||||
|
--> |
||||
|
|
||||
|
<script th:replace="fragments/script :: script"></script> |
||||
|
<script> |
||||
|
// ERP DATA CALL via API |
||||
|
|
||||
|
//Getting Zone No |
||||
|
var x= localStorage.getItem("Garbage_App_user"); |
||||
|
|
||||
|
if(x!=null){ |
||||
|
var hide = document.getElementById("login"); |
||||
|
hide.style.display = "none"; |
||||
|
document.getElementById("userNo").innerHTML=x; |
||||
|
}else{ |
||||
|
var hide = document.getElementById("logout"); |
||||
|
hide.style.display = "none"; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
function getrequest(){ |
||||
|
if(x!=null){ |
||||
|
window.location.href="complaintList?mobile="+x; |
||||
|
} |
||||
|
else{ |
||||
|
$('#getMobileNo').modal({ |
||||
|
backdrop: 'static', |
||||
|
keyboard: false |
||||
|
}); |
||||
|
$('#getMobileNo').modal('show'); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
||||
|
function newUserCall(){ |
||||
|
var mob=$("#mobii").val(); |
||||
|
localStorage.setItem("Garbage_App_user",mob); |
||||
|
window.location.href="complaintList?mobile="+mob; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
function showAndHide(){ |
||||
|
getrequest(); |
||||
|
|
||||
|
var hide =document.getElementById("logout"); |
||||
|
hide.style.display = "block"; |
||||
|
|
||||
|
var hi =document.getElementById("login"); |
||||
|
hi.style.display = "none"; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
function logout(){ |
||||
|
localStorage.removeItem("Garbage_App_user"); |
||||
|
var hide =document.getElementById("logout"); |
||||
|
hide.style.display = "none"; |
||||
|
location.reload(); |
||||
|
} |
||||
|
//alert(x); |
||||
|
|
||||
|
|
||||
|
function getZoneNo() { |
||||
|
|
||||
|
$.ajax({ |
||||
|
type: "GET", |
||||
|
url: '/api/getZoneNo', |
||||
|
dataType: 'json', |
||||
|
success: function(bodyMessage) { |
||||
|
var tempJson = bodyMessage['ZoneDetailsResult']; |
||||
|
//alert("tempJson---:"+tempJson); |
||||
|
for (var i = 0; i < tempJson.length; i++) { |
||||
|
var tempJsonValue = tempJson[i]['ZoneId']; |
||||
|
//var tempJsonValue = tempJson[i]['ZoneName'].replace('N', ''); |
||||
|
var tempJsonLabel = tempJson[i]['ZoneName'].replace('N', ''); |
||||
|
$('#zone').append("<option value='" + tempJsonValue + "'>" + tempJsonLabel + "</option>"); |
||||
|
} |
||||
|
}, error: function(e, ts, et) |
||||
|
{ |
||||
|
// alert(ts) |
||||
|
} |
||||
|
|
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
//Getting Div |
||||
|
function getDiv($this) { |
||||
|
|
||||
|
$('#division option:not(:first)').remove(); |
||||
|
var zoneId = $this.value; |
||||
|
alert("zoneId---:"+zoneId); |
||||
|
$.ajax({ |
||||
|
type: "GET", |
||||
|
url: '/api/getDiv', |
||||
|
data: {'zoneId':zoneId}, |
||||
|
dataType: 'json', |
||||
|
success: function(bodyMessage) { |
||||
|
var tempJson = bodyMessage['DivisionDetailsResult']; |
||||
|
for (var i = 0; i < tempJson.length; i++) { |
||||
|
var tempJsonValue = tempJson[i]['DivisionName'].replace('N', ''); |
||||
|
//var tempJsonValue = tempJson[i]['DivisionId']; |
||||
|
var tempJsonLabel = tempJson[i]['DivisionName'].replace('N', ''); |
||||
|
$('#division').append("<option value='" + tempJsonValue + "'>" + tempJsonLabel + "</option>"); |
||||
|
} |
||||
|
}, error: function(e, ts, et) |
||||
|
{ |
||||
|
// alert(ts) |
||||
|
} |
||||
|
|
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
//Getting Area |
||||
|
function getArea($this) { |
||||
|
|
||||
|
$('#area option:not(:first)').remove(); |
||||
|
var divId = $this.value; |
||||
|
alert("DIVIDION---"+divId); |
||||
|
|
||||
|
$.ajax({ |
||||
|
type: "GET", |
||||
|
url: '/api/getArea', |
||||
|
data: {'divId':divId}, |
||||
|
dataType: 'json', |
||||
|
success: function(bodyMessage) { |
||||
|
var tempJson = bodyMessage['AreaDetailsResult']; |
||||
|
for (var i = 0; i < tempJson.length; i++) { |
||||
|
var tempJsonValue = tempJson[i]['AreaId']; |
||||
|
var tempJsonLabel = tempJson[i]['AreaName']; |
||||
|
$('#area').append("<option value='" + tempJsonValue + "'>" + tempJsonLabel + "</option>"); |
||||
|
} |
||||
|
}, error: function(e, ts, et) |
||||
|
{ |
||||
|
// alert(ts) |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
//Getting Location |
||||
|
function getLocation($this) { |
||||
|
|
||||
|
$('#locality option:not(:first)').remove(); |
||||
|
var areaId = $this.value; |
||||
|
|
||||
|
$.ajax({ |
||||
|
type: "GET", |
||||
|
url: '/api/getLocation', |
||||
|
data: {'areaId':areaId}, |
||||
|
dataType: 'json', |
||||
|
success: function(bodyMessage) { |
||||
|
var tempJson = bodyMessage['LocationDetailsResult']; |
||||
|
for (var i = 0; i < tempJson.length; i++) { |
||||
|
var tempJsonValue = tempJson[i]['LocationId']; |
||||
|
var tempJsonLabel = tempJson[i]['LocationName']; |
||||
|
$('#locality').append("<option value='" + tempJsonValue + "'>" + tempJsonLabel + "</option>"); |
||||
|
} |
||||
|
}, error: function(e, ts, et) |
||||
|
{ |
||||
|
// alert(ts) |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
//Getting Street |
||||
|
function getStreet($this) { |
||||
|
|
||||
|
$('#street option:not(:first)').remove(); |
||||
|
var locationId = $this.value; |
||||
|
|
||||
|
$.ajax({ |
||||
|
type: "GET", |
||||
|
url: '/api/getStreet', |
||||
|
data: {'locationId':locationId}, |
||||
|
dataType: 'json', |
||||
|
success: function(bodyMessage) { |
||||
|
var tempJson = bodyMessage['StreetDetailsResult']; |
||||
|
for (var i = 0; i < tempJson.length; i++) { |
||||
|
var tempJsonValue = tempJson[i]['StreetId']; |
||||
|
var tempJsonLabel = tempJson[i]['StreetName']; |
||||
|
$('#street').append("<option value='" + tempJsonValue + "'>" + tempJsonLabel + "</option>"); |
||||
|
} |
||||
|
}, error: function(e, ts, et) |
||||
|
{ |
||||
|
// alert(ts) |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
function login(){ |
||||
|
if (confirm("We sending you OTP.\nPress yes If Mobile No Is Correct ! ")) { |
||||
|
var mob = $('#mobile').val(); |
||||
|
// alert(mob+"---"); |
||||
|
sendOTP(); |
||||
|
$('#otpForm').modal({ |
||||
|
backdrop: 'static', |
||||
|
keyboard: false |
||||
|
}); |
||||
|
$('#otpForm').modal('show'); |
||||
|
return false; |
||||
|
} else { |
||||
|
alert("Please help us.\nTo make City clean and green"); |
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
function sendOTP(){ |
||||
|
var x = document.getElementById("mobile").value |
||||
|
|
||||
|
var mobileNo = $("#mobile").val(); |
||||
|
$("#mobile").val(mobileNo); // Set final mobile number after request otp |
||||
|
$("#mobilenotxt").html(mobileNo); |
||||
|
$('#newForm').modal('hide'); |
||||
|
|
||||
|
$.ajax({ |
||||
|
type: "GET", |
||||
|
url: '/api/sendOTP', |
||||
|
data: {'mobileNo':mobileNo,'purpose':'New User'}, |
||||
|
dataType: 'json', |
||||
|
success: function(bodyMessage) { |
||||
|
if(bodyMessage!="Error"){ |
||||
|
$('#otpForm').modal({ |
||||
|
backdrop: 'static', |
||||
|
keyboard: false |
||||
|
}); |
||||
|
$('#otpForm').modal('show'); |
||||
|
// Resend OTP Link function ///////////////////// |
||||
|
var resendTimeout; |
||||
|
var resendLink = $("#resend-link"); |
||||
|
$("#resend-link").html('Please wait..<span id="countdown">60</span>s'); |
||||
|
var countdown = $("#countdown"); |
||||
|
// Function to start the countdown timer |
||||
|
function startCountdown() { |
||||
|
var timeleft = 60; |
||||
|
countdown.text(timeleft); |
||||
|
|
||||
|
resendTimeout = setInterval(function () { |
||||
|
timeleft--; |
||||
|
countdown.text(timeleft); |
||||
|
|
||||
|
if (timeleft <= 0) { |
||||
|
clearInterval(resendTimeout); |
||||
|
$("#resendlink").html('<a href="#" id="resend-link" class="text-info" onclick="return sendOTP();">Resend OTP</a>'); |
||||
|
} |
||||
|
}, 1000); |
||||
|
} |
||||
|
startCountdown(); // Start Resend OTP count |
||||
|
///////////////////////////////////////////////// |
||||
|
}else{ |
||||
|
alert("OTP Not Send!!!"); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
//Verify OTP |
||||
|
function verifyOtp(){ |
||||
|
|
||||
|
|
||||
|
// Get all the input fields with class `otp-input` |
||||
|
var otpInputs = $('.otp-input'); |
||||
|
|
||||
|
// Get the OTP value as a string |
||||
|
var otpValue = ''; |
||||
|
otpInputs.each(function() { |
||||
|
otpValue += $(this).val(); |
||||
|
}); |
||||
|
|
||||
|
//document.getElementById("saveFeedbackForm").submit(); |
||||
|
|
||||
|
$.ajax({ |
||||
|
type: "GET", |
||||
|
url: '/api/verifyOTP', |
||||
|
data: {'otp':otpValue}, |
||||
|
dataType: 'text', |
||||
|
success: function(bodyMessage) { |
||||
|
if(bodyMessage.trim() == "Success"){ |
||||
|
console.log("OTP is Verified!!!"); |
||||
|
localStorage.setItem("Garbage_App_user", $("#mobile").val()); |
||||
|
|
||||
|
document.getElementById("garbageform").submit(); |
||||
|
} else { |
||||
|
$("#otperror").html("OTP is Incorrect!!!"); |
||||
|
// do something here |
||||
|
} |
||||
|
}, |
||||
|
error: function() { |
||||
|
console.log("Error");// Handle error here |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
$(function(){ |
||||
|
|
||||
|
getZoneNo(); |
||||
|
//callmodal(0); |
||||
|
|
||||
|
}); |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue