Browse Source

first commit

master
kirubaasagar.R 2 years ago
commit
17daebfdff
  1. 33
      .gitignore
  2. 19
      .mvn/wrapper/maven-wrapper.properties
  3. 259
      mvnw
  4. 149
      mvnw.cmd
  5. 67
      pom.xml
  6. 14
      src/main/java/com/gcc/publicgrievance/PublicgrievanceApplication.java
  7. 53
      src/main/java/com/gcc/publicgrievance/Service/ComplaintService.java
  8. 15
      src/main/java/com/gcc/publicgrievance/configuration/AppConfig.java
  9. 24
      src/main/java/com/gcc/publicgrievance/configuration/WebConfig.java
  10. 143
      src/main/java/com/gcc/publicgrievance/controller/ComplaintController.java
  11. 51
      src/main/java/com/gcc/publicgrievance/controller/UserController.java
  12. 8
      src/main/resources/application.properties
  13. BIN
      src/main/resources/static/images/bad-weather.png
  14. BIN
      src/main/resources/static/images/bt-logo.png
  15. BIN
      src/main/resources/static/images/change.png
  16. BIN
      src/main/resources/static/images/chennai.jpg
  17. BIN
      src/main/resources/static/images/contract.png
  18. BIN
      src/main/resources/static/images/dog.png
  19. BIN
      src/main/resources/static/images/egov.jpg
  20. BIN
      src/main/resources/static/images/gcc.png
  21. BIN
      src/main/resources/static/images/gcc1.png
  22. BIN
      src/main/resources/static/images/menu.png
  23. BIN
      src/main/resources/static/images/mosquito.png
  24. BIN
      src/main/resources/static/images/phone-call.png
  25. BIN
      src/main/resources/static/images/portable-bathroom.png
  26. BIN
      src/main/resources/static/images/record.png
  27. BIN
      src/main/resources/static/images/recycle.png
  28. BIN
      src/main/resources/static/images/register.png
  29. BIN
      src/main/resources/static/images/ripon.jpg
  30. BIN
      src/main/resources/static/images/road.png
  31. BIN
      src/main/resources/static/images/screenreader.png
  32. BIN
      src/main/resources/static/images/search.png
  33. BIN
      src/main/resources/static/images/sewage.png
  34. BIN
      src/main/resources/static/images/street-lamp.png
  35. BIN
      src/main/resources/static/images/tamil.jpg
  36. BIN
      src/main/resources/static/images/tsunami.png
  37. BIN
      src/main/resources/static/images/waste-bin.png
  38. 3
      src/main/resources/static/js/invertcolor.js
  39. 33
      src/main/resources/static/js/screenreader.js
  40. 349
      src/main/resources/templates/User/home.html
  41. 1258
      src/main/resources/templates/User/registercomplaints.html
  42. 309
      src/main/resources/templates/checklistofficer/checklistofficer.html
  43. 275
      src/main/resources/templates/checklistuser/checklistuser.html
  44. 162
      src/main/resources/templates/fragments/accessibility.html
  45. 55
      src/main/resources/templates/fragments/footer.html
  46. 98
      src/main/resources/templates/fragments/header.html
  47. 685
      src/main/resources/templates/officer/officercomplaint.html
  48. 160
      src/main/resources/templates/staff/appoinment.html
  49. 251
      src/main/resources/templates/staff/appoinmentscreen.html
  50. 177
      src/main/resources/templates/staff/createorder.html
  51. 109
      src/main/resources/templates/staff/schemegroup.html
  52. 316
      src/main/resources/templates/staff/staffenrollment.html
  53. 13
      src/test/java/com/gcc/publicgrievance/PublicgrievanceApplicationTests.java
  54. BIN
      uploads/1724728439636_gcc1.png

33
.gitignore

@ -0,0 +1,33 @@
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/

19
.mvn/wrapper/maven-wrapper.properties

@ -0,0 +1,19 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
wrapperVersion=3.3.2
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.7/apache-maven-3.9.7-bin.zip

259
mvnw

@ -0,0 +1,259 @@
#!/bin/sh
# ----------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# Apache Maven Wrapper startup batch script, version 3.3.2
#
# Optional ENV vars
# -----------------
# JAVA_HOME - location of a JDK home dir, required when download maven via java source
# MVNW_REPOURL - repo url base for downloading maven distribution
# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven
# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output
# ----------------------------------------------------------------------------
set -euf
[ "${MVNW_VERBOSE-}" != debug ] || set -x
# OS specific support.
native_path() { printf %s\\n "$1"; }
case "$(uname)" in
CYGWIN* | MINGW*)
[ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")"
native_path() { cygpath --path --windows "$1"; }
;;
esac
# set JAVACMD and JAVACCMD
set_java_home() {
# For Cygwin and MinGW, ensure paths are in Unix format before anything is touched
if [ -n "${JAVA_HOME-}" ]; then
if [ -x "$JAVA_HOME/jre/sh/java" ]; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
JAVACCMD="$JAVA_HOME/jre/sh/javac"
else
JAVACMD="$JAVA_HOME/bin/java"
JAVACCMD="$JAVA_HOME/bin/javac"
if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then
echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2
echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2
return 1
fi
fi
else
JAVACMD="$(
'set' +e
'unset' -f command 2>/dev/null
'command' -v java
)" || :
JAVACCMD="$(
'set' +e
'unset' -f command 2>/dev/null
'command' -v javac
)" || :
if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then
echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2
return 1
fi
fi
}
# hash string like Java String::hashCode
hash_string() {
str="${1:-}" h=0
while [ -n "$str" ]; do
char="${str%"${str#?}"}"
h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296))
str="${str#?}"
done
printf %x\\n $h
}
verbose() { :; }
[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; }
die() {
printf %s\\n "$1" >&2
exit 1
}
trim() {
# MWRAPPER-139:
# Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds.
# Needed for removing poorly interpreted newline sequences when running in more
# exotic environments such as mingw bash on Windows.
printf "%s" "${1}" | tr -d '[:space:]'
}
# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties
while IFS="=" read -r key value; do
case "${key-}" in
distributionUrl) distributionUrl=$(trim "${value-}") ;;
distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;;
esac
done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties"
[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties"
case "${distributionUrl##*/}" in
maven-mvnd-*bin.*)
MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/
case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in
*AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;;
:Darwin*x86_64) distributionPlatform=darwin-amd64 ;;
:Darwin*arm64) distributionPlatform=darwin-aarch64 ;;
:Linux*x86_64*) distributionPlatform=linux-amd64 ;;
*)
echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2
distributionPlatform=linux-amd64
;;
esac
distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip"
;;
maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;;
*) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;;
esac
# apply MVNW_REPOURL and calculate MAVEN_HOME
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash>
[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}"
distributionUrlName="${distributionUrl##*/}"
distributionUrlNameMain="${distributionUrlName%.*}"
distributionUrlNameMain="${distributionUrlNameMain%-bin}"
MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}"
MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")"
exec_maven() {
unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || :
exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD"
}
if [ -d "$MAVEN_HOME" ]; then
verbose "found existing MAVEN_HOME at $MAVEN_HOME"
exec_maven "$@"
fi
case "${distributionUrl-}" in
*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;;
*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;;
esac
# prepare tmp dir
if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then
clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; }
trap clean HUP INT TERM EXIT
else
die "cannot create temp dir"
fi
mkdir -p -- "${MAVEN_HOME%/*}"
# Download and Install Apache Maven
verbose "Couldn't find MAVEN_HOME, downloading and installing it ..."
verbose "Downloading from: $distributionUrl"
verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName"
# select .zip or .tar.gz
if ! command -v unzip >/dev/null; then
distributionUrl="${distributionUrl%.zip}.tar.gz"
distributionUrlName="${distributionUrl##*/}"
fi
# verbose opt
__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR=''
[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v
# normalize http auth
case "${MVNW_PASSWORD:+has-password}" in
'') MVNW_USERNAME='' MVNW_PASSWORD='' ;;
has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;;
esac
if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then
verbose "Found wget ... using wget"
wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl"
elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then
verbose "Found curl ... using curl"
curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl"
elif set_java_home; then
verbose "Falling back to use Java to download"
javaSource="$TMP_DOWNLOAD_DIR/Downloader.java"
targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName"
cat >"$javaSource" <<-END
public class Downloader extends java.net.Authenticator
{
protected java.net.PasswordAuthentication getPasswordAuthentication()
{
return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() );
}
public static void main( String[] args ) throws Exception
{
setDefault( new Downloader() );
java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() );
}
}
END
# For Cygwin/MinGW, switch paths to Windows format before running javac and java
verbose " - Compiling Downloader.java ..."
"$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java"
verbose " - Running Downloader.java ..."
"$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")"
fi
# If specified, validate the SHA-256 sum of the Maven distribution zip file
if [ -n "${distributionSha256Sum-}" ]; then
distributionSha256Result=false
if [ "$MVN_CMD" = mvnd.sh ]; then
echo "Checksum validation is not supported for maven-mvnd." >&2
echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2
exit 1
elif command -v sha256sum >/dev/null; then
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then
distributionSha256Result=true
fi
elif command -v shasum >/dev/null; then
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then
distributionSha256Result=true
fi
else
echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2
echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2
exit 1
fi
if [ $distributionSha256Result = false ]; then
echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2
echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2
exit 1
fi
fi
# unzip and move
if command -v unzip >/dev/null; then
unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip"
else
tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar"
fi
printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url"
mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME"
clean || :
exec_maven "$@"

149
mvnw.cmd

@ -0,0 +1,149 @@
<# : batch portion
@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM https://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM ----------------------------------------------------------------------------
@REM ----------------------------------------------------------------------------
@REM Apache Maven Wrapper startup batch script, version 3.3.2
@REM
@REM Optional ENV vars
@REM MVNW_REPOURL - repo url base for downloading maven distribution
@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven
@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output
@REM ----------------------------------------------------------------------------
@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0)
@SET __MVNW_CMD__=
@SET __MVNW_ERROR__=
@SET __MVNW_PSMODULEP_SAVE=%PSModulePath%
@SET PSModulePath=
@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @(
IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B)
)
@SET PSModulePath=%__MVNW_PSMODULEP_SAVE%
@SET __MVNW_PSMODULEP_SAVE=
@SET __MVNW_ARG0_NAME__=
@SET MVNW_USERNAME=
@SET MVNW_PASSWORD=
@IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*)
@echo Cannot start maven from wrapper >&2 && exit /b 1
@GOTO :EOF
: end batch / begin powershell #>
$ErrorActionPreference = "Stop"
if ($env:MVNW_VERBOSE -eq "true") {
$VerbosePreference = "Continue"
}
# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties
$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl
if (!$distributionUrl) {
Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties"
}
switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) {
"maven-mvnd-*" {
$USE_MVND = $true
$distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip"
$MVN_CMD = "mvnd.cmd"
break
}
default {
$USE_MVND = $false
$MVN_CMD = $script -replace '^mvnw','mvn'
break
}
}
# apply MVNW_REPOURL and calculate MAVEN_HOME
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash>
if ($env:MVNW_REPOURL) {
$MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" }
$distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')"
}
$distributionUrlName = $distributionUrl -replace '^.*/',''
$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$',''
$MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain"
if ($env:MAVEN_USER_HOME) {
$MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain"
}
$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join ''
$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME"
if (Test-Path -Path "$MAVEN_HOME" -PathType Container) {
Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME"
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD"
exit $?
}
if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) {
Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl"
}
# prepare tmp dir
$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile
$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir"
$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null
trap {
if ($TMP_DOWNLOAD_DIR.Exists) {
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" }
}
}
New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null
# Download and Install Apache Maven
Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..."
Write-Verbose "Downloading from: $distributionUrl"
Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName"
$webclient = New-Object System.Net.WebClient
if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) {
$webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD)
}
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null
# If specified, validate the SHA-256 sum of the Maven distribution zip file
$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum
if ($distributionSha256Sum) {
if ($USE_MVND) {
Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties."
}
Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash
if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) {
Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property."
}
}
# unzip and move
Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null
Rename-Item -Path "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" -NewName $MAVEN_HOME_NAME | Out-Null
try {
Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null
} catch {
if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) {
Write-Error "fail to move MAVEN_HOME"
}
} finally {
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" }
}
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD"

67
pom.xml

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.2</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>com.gcc</groupId>
<artifactId>publicgrievance</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>publicgrievance</name>
<description>public Grievance Project developed by GCC</description>
<url />
<licenses>
<license />
</licenses>
<developers>
<developer />
</developers>
<scm>
<connection />
<developerConnection />
<tag />
<url />
</scm>
<properties>
<java.version>17</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

14
src/main/java/com/gcc/publicgrievance/PublicgrievanceApplication.java

@ -0,0 +1,14 @@
package com.gcc.publicgrievance;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class PublicgrievanceApplication {
public static void main(String[] args) {
System.out.println("ready.....");
SpringApplication.run(PublicgrievanceApplication.class, args);
}
}

53
src/main/java/com/gcc/publicgrievance/Service/ComplaintService.java

@ -0,0 +1,53 @@
package com.gcc.publicgrievance.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
@Service
public class ComplaintService {
private final String baseUrl = "https://erp.chennaicorporation.gov.in/pgr/external/mobileservice";
public String fetchComplaintCategories() {
RestTemplate restTemplate = new RestTemplate();
String url = baseUrl + "?serviceId=getComplCategory&ComplaintGroupId=null";
return restTemplate.getForObject(url, String.class);
}
public String fetchComplaintSubTypes(String groupId) {
RestTemplate restTemplate = new RestTemplate();
String url = baseUrl + "?serviceId=getComplCategory&ComplaintGroupId=" + groupId;
return restTemplate.getForObject(url, String.class);
}
// public String fetchComplaintdetailsbyId(String complaintid) {
// RestTemplate restTemplate = new RestTemplate();
// String url = baseUrl + "?serviceId=getComplaintByID&ComplaintId=" + complaintid;
// return restTemplate.getForObject(url, String.class);
// }
public List<Map<String, Object>> fetchComplaintDetailsById(String complaintId) {
RestTemplate restTemplate = new RestTemplate();
String url = baseUrl + "?serviceId=getComplaintByID&ComplaintId=" + complaintId;
String response = restTemplate.getForObject(url, String.class);
try {
ObjectMapper objectMapper = new ObjectMapper();
return objectMapper.readValue(response, new TypeReference<List<Map<String, Object>>>() {});
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
}

15
src/main/java/com/gcc/publicgrievance/configuration/AppConfig.java

@ -0,0 +1,15 @@
package com.gcc.publicgrievance.configuration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;
@Configuration
public class AppConfig {
@Bean
public RestTemplate restTemplate() {
return new RestTemplate();
}
}

24
src/main/java/com/gcc/publicgrievance/configuration/WebConfig.java

@ -0,0 +1,24 @@
//package com.gcc.publicgrievance.configuration;
//
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.CorsRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//
//@Configuration
//public class WebConfig {
//
// @Bean
// public WebMvcConfigurer corsConfigurer() {
// return new WebMvcConfigurer() {
// @Override
// public void addCorsMappings(CorsRegistry registry) {
// registry.addMapping("/**") // Allow all paths
// .allowedOrigins("http://localhost:8080/registercomplaints") // Allow your front-end URL
// .allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS") // Specify allowed methods
// .allowedHeaders("*") // Allow all headers
// .allowCredentials(true); // Allow credentials
// }
// };
// }
//}

143
src/main/java/com/gcc/publicgrievance/controller/ComplaintController.java

@ -0,0 +1,143 @@
package com.gcc.publicgrievance.controller;
import java.io.IOException;
import java.util.Base64;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.util.UriComponentsBuilder;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import com.gcc.publicgrievance.Service.ComplaintService;
@CrossOrigin
@RestController
public class ComplaintController {
private final RestTemplate restTemplate;
public ComplaintController(RestTemplate restTemplate) {
this.restTemplate = restTemplate;
}
@Autowired
private ComplaintService complaintService;
@GetMapping("/api/getComplaintCategories")
public @ResponseBody String getComplaintCategories() {
return complaintService.fetchComplaintCategories();
}
@GetMapping("/api/getComplaintSubTypes")
public @ResponseBody String getComplaintSubTypes(@RequestParam String groupId) {
return complaintService.fetchComplaintSubTypes(groupId);
}
@GetMapping("/api/getComplaintDetailsbyId")
public List<Map<String, Object>> getComplaintDetailsById(@RequestParam String complaintid) {
return complaintService.fetchComplaintDetailsById(complaintid);
}
// save api
/*
* @PostMapping("/register") public ResponseEntity<String> registerComplaint(
*
* @RequestParam("ComplainantName") String complainantName,
*
* @RequestParam("ComplainantAddr") String complainantAddr,
*
* @RequestParam("MobileNo") String mobileNo,
*
* @RequestParam("Email") String email,
*
* @RequestParam("ComplaintType") String complaintType,
*
* @RequestParam("ComplaintTitle") String complaintTitle,
*
* @RequestParam("ComplaintDetails") String complaintDetails,
*
* @RequestParam("StreetId") String streetId,
*
* @RequestParam("Comp_Image") String compImage,
*
* @RequestParam("latitude") String latitude,
*
* @RequestParam("longtitude") String longtitude,
*
* @RequestParam("Landmark") String landmark,
*
* @RequestParam("gender") String gender) {
*
* String externalUrl =
* "https://erp.chennaicorporation.gov.in/pgr/external/mobileservice"; // // //
* Build the URI with parameters UriComponentsBuilder uriBuilder =
* UriComponentsBuilder.fromHttpUrl(externalUrl) .queryParam("serviceId",
* "RegComplaint") .queryParam("ComplainantName", complainantName)
* .queryParam("ComplainantAddr", complainantAddr) .queryParam("MobileNo",
* mobileNo) .queryParam("Email", email) .queryParam("ComplaintType",
* complaintType) .queryParam("ComplaintTitle", complaintTitle)
* .queryParam("ComplaintDetails", complaintDetails) .queryParam("StreetId",
* streetId) .queryParam("Comp_Image", compImage) .queryParam("latitude",
* latitude) .queryParam("longtitude", longtitude) .queryParam("Landmark",
* landmark) .queryParam("gender", gender); // // // Make a POST request to the
* external API ResponseEntity<String> response =
* restTemplate.postForEntity(uriBuilder.toUriString(), null, String.class); //
* // // Return the response from the external API return
* ResponseEntity.status(response.getStatusCode()).body(response.getBody()); }
*/
@PostMapping("/register")
public ResponseEntity<String> registerComplaint(@RequestParam("ComplainantName") String complainantName,
@RequestParam("ComplainantAddr") String complainantAddr, @RequestParam("MobileNo") String mobileNo,
@RequestParam("Email") String email, @RequestParam("ComplaintType") String complaintType,
@RequestParam("ComplaintTitle") String complaintTitle,
@RequestParam("ComplaintDetails") String complaintDetails, @RequestParam("StreetId") String streetId,
@RequestParam("Comp_Image") MultipartFile compImage, @RequestParam("latitude") String latitude,
@RequestParam("longtitude") String longtitude, @RequestParam("Landmark") String landmark,
@RequestParam("gender") String gender) {
String externalUrl = "https://erp.chennaicorporation.gov.in/pgr/external/mobileservice";
// Convert the image to a Base64 string
String base64Image = "";
if (!compImage.isEmpty()) {
try {
byte[] imageBytes = compImage.getBytes();
base64Image = Base64.getEncoder().encodeToString(imageBytes);
} catch (IOException e) {
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("Error encoding image.");
}
}
// Build the URI with parameters
UriComponentsBuilder uriBuilder = UriComponentsBuilder.fromHttpUrl(externalUrl)
.queryParam("serviceId", "RegComplaint").queryParam("ComplainantName", complainantName)
.queryParam("ComplainantAddr", complainantAddr).queryParam("MobileNo", mobileNo)
.queryParam("Email", email).queryParam("ComplaintType", complaintType)
.queryParam("ComplaintTitle", complaintTitle).queryParam("ComplaintDetails", complaintDetails)
.queryParam("StreetId", streetId).queryParam("Comp_Image", base64Image) // Use base64 image here
.queryParam("latitude", latitude).queryParam("longtitude", longtitude).queryParam("Landmark", landmark)
.queryParam("gender", gender);
// Make a POST request to the external API
ResponseEntity<String> response = restTemplate.postForEntity(uriBuilder.toUriString(), null, String.class);
// Return the response from the external API
return ResponseEntity.status(response.getStatusCode()).body(response.getBody());
}
}

51
src/main/java/com/gcc/publicgrievance/controller/UserController.java

@ -0,0 +1,51 @@
package com.gcc.publicgrievance.controller;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class UserController {
@GetMapping("/home")
public String home(Model model) {
return "User/home";
}
@GetMapping("/registercomplaints")
public String registercomplaints(Model model) {
return "User/registercomplaints";
}
@GetMapping("/officercomplaint")
public String officercomplaint(Model model) {
return "officer/officercomplaint";
}
@GetMapping("/checklistofficer")
public String checklistofficer(Model model) {
return "checklistofficer/checklistofficer";
}
@GetMapping("/checklistuser")
public String checklistuser(Model model) {
return "checklistuser/checklistuser";
}
//staff
@GetMapping("/createorder")
public String createorder(Model model) {
return "staff/createorder";
}
@GetMapping("/staffenrollment")
public String staffenrollment(Model model) {
return "staff/staffenrollment";
}
@GetMapping("/appoinmentscreen")
public String appoinmentscreen(Model model) {
return "staff/appoinmentscreen";
}
@GetMapping("/schemegroup")
public String schemegroup(Model model) {
return "staff/schemegroup";
}
@GetMapping("/appoinment")
public String appoinment(Model model) {
return "staff/appoinment";
}
}

8
src/main/resources/application.properties

@ -0,0 +1,8 @@
spring.application.name=publicgrievance
# Sets the session timeout to 60 seconds
server.servlet.session.timeout=60s
# Sets the async request timeout to 5000 milliseconds (5 seconds)
spring.mvc.async.request-timeout=5000ms

BIN
src/main/resources/static/images/bad-weather.png

After

Width: 512  |  Height: 512  |  Size: 36 KiB

BIN
src/main/resources/static/images/bt-logo.png

After

Width: 1255  |  Height: 199  |  Size: 80 KiB

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

After

Width: 512  |  Height: 512  |  Size: 10 KiB

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

After

Width: 225  |  Height: 228  |  Size: 82 KiB

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

After

Width: 512  |  Height: 512  |  Size: 26 KiB

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

After

Width: 512  |  Height: 512  |  Size: 30 KiB

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

After

Width: 600  |  Height: 450  |  Size: 32 KiB

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

After

Width: 820  |  Height: 515  |  Size: 96 KiB

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

After

Width: 325  |  Height: 435  |  Size: 204 KiB

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

After

Width: 512  |  Height: 512  |  Size: 17 KiB

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

After

Width: 512  |  Height: 512  |  Size: 31 KiB

BIN
src/main/resources/static/images/phone-call.png

After

Width: 512  |  Height: 512  |  Size: 27 KiB

BIN
src/main/resources/static/images/portable-bathroom.png

After

Width: 512  |  Height: 512  |  Size: 13 KiB

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

After

Width: 512  |  Height: 512  |  Size: 35 KiB

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

After

Width: 512  |  Height: 512  |  Size: 29 KiB

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

After

Width: 512  |  Height: 512  |  Size: 18 KiB

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

After

Width: 1280  |  Height: 640  |  Size: 117 KiB

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

After

Width: 512  |  Height: 512  |  Size: 33 KiB

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

After

Width: 512  |  Height: 512  |  Size: 9.7 KiB

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

After

Width: 512  |  Height: 512  |  Size: 30 KiB

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

After

Width: 512  |  Height: 512  |  Size: 16 KiB

BIN
src/main/resources/static/images/street-lamp.png

After

Width: 512  |  Height: 512  |  Size: 20 KiB

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

After

Width: 529  |  Height: 470  |  Size: 138 KiB

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

After

Width: 512  |  Height: 512  |  Size: 52 KiB

BIN
src/main/resources/static/images/waste-bin.png

After

Width: 512  |  Height: 512  |  Size: 32 KiB

3
src/main/resources/static/js/invertcolor.js

@ -0,0 +1,3 @@
function invertColors() {
document.body.classList.toggle('inverted');
}

33
src/main/resources/static/js/screenreader.js

@ -0,0 +1,33 @@
// screenReader.js
let isReading = false;
let speechSynthesisUtterance;
function readScreenContent() {
const content = document.body.innerText;
speechSynthesisUtterance = new SpeechSynthesisUtterance(content);
window.speechSynthesis.speak(speechSynthesisUtterance);
isReading = true;
}
function stopReading() {
if (speechSynthesisUtterance) {
window.speechSynthesis.cancel();
isReading = false;
}
}
function toggleScreenReader(buttonId) {
const button = document.getElementById(buttonId);
if (button) {
button.addEventListener('click', function() {
if (isReading) {
stopReading();
button.innerText = "Read Screen"; // Update button text when stopped
} else {
readScreenContent();
button.innerText = "Stop Reading"; // Update button text when reading
}
});
}
}

349
src/main/resources/templates/User/home.html

@ -0,0 +1,349 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Main Page</title>
<!--Google Font -->
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap" rel="stylesheet">
<!--Bootstrap CSS-->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script th:src="@{/js/invertcolor.js}"></script>
<style>
body {
font-family: 'Lato', sans-serif;
background-color: white;
}
body.inverted {
background-color: black;
color: white;
filter: invert(1);
}
.card {
border-radius: 15px;
border: none;
padding: 20px;
background-color: #f0f4ff;
text-align: center;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
display: flex;
flex-direction: column;
height: 100%;
/* Make sure cards take up full height of the column */
}
.card-body {
flex: 1;
/* Allow card-body to grow and take up available space */
}
.card-img {
width: 40px;
margin-bottom: 15px;
}
.card-title {
font-size: 1.2rem;
font-weight: bold;
}
.card-text {
color: #666;
margin-bottom: 20px;
}
.card-footer {
font-weight: bold;
color: #007bff;
display: flex;
align-items: center;
justify-content: center;
}
.card-footer i {
margin-left: 5px;
}
.row {
display: flex;
flex-wrap: wrap;
margin-bottom: 30px;
}
.col-md-4 {
display: flex;
/* Ensure columns use Flexbox to distribute space evenly */
padding: 0 15px;
/* Adjust padding to fit full width */
}
.container {
max-width: 1200px;
}
.container .row .col-md-4 {
padding: 0 15px;
/* Adjust padding to fit full width */
display: flex;
flex-direction: column;
}
.card {
flex-grow: 1;
/* Ensure all cards have the same height */
}
.container .row .col-md-12 {
padding: 0 15px;
}
.card-link {
text-decoration: none;
/* Remove the underline from the link */
color: inherit;
/* Inherit the text color */
display: block;
/* Make the link cover the entire card */
}
.card-link:hover .card {
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
/* Optional: add hover effect */
}
/* Style for reader button */
#reader-btn.active {
background-color: #28a745;
}
/*header css*/
.header {
background-color: #3b4858;
padding: 10px 20px;
display: flex;
align-items: center;
justify-content: space-between;
color: white;
}
.header .logo-left img {
height: 60px;
}
.header .title {
text-align: center;
flex-grow: 1;
}
.header .title h2 {
margin: 0;
font-size: 1.5rem;
}
.header .logos-right img {
height: 60px;
margin-left: 10px;
}
/*header buttons*/
.header {
display: flex;
align-items: center;
justify-content: space-between;
/* Space out the items within the header */
}
.header-buttons {
padding-left: 5px;
display: flex;
align-items: center;
gap: 10px;
/* Adjust spacing between buttons */
}
#reader-btn,
#invertColorBtn {
padding: 5px 10px;
font-size: 14px;
cursor: pointer;
}
</style>
</head>
<body>
<div th:insert="~{fragments/accessibility :: accessibility}"></div>
<!-- <div class="header">
<div class="logo-left">
<img src="images/gcc1.png" alt="Greater Chennai Corporation Logo">
</div>
<div class="header-buttons">
<button id="reader-btn" onclick="toggleReader()">Enable Reader</button>
<button id="invertColorBtn" onclick="invertColors()">Invert Colors</button>
</div>
<div class="title">
<h2>Public Grievance and Redressal System</h2>
</div>
<div class="logos-right">
<img src="images/tamil.jpg" alt="Tamil Nadu Logo">
<img src="images/bt-logo.png" style="width: 100px;height: 50px;" alt="bonton Logo">
</div>
</div>-->
<!-- Insert the header fragment -->
<div th:insert="fragments/header :: headerFragment"></div>
<!--<button id="reader-btn" onclick="toggleReader()">Enable Reader</button>-->
<!-- Cards Section -->
<div class="container mt-3">
<!--<button id="invertColorBtn" onclick="invertColors()">Invert Colors</button>-->
<div class="row">
<div class="col-md-4">
<a href="registercomplaints" class="card-link">
<div class="card readable">
<div class="card-body">
<img src="images/register.png" alt="register" class="card-img">
<div class="card-content">
<h5 class="card-title">Register Your<br> Complaints</h5>
<p class="card-text">Register Complaints<br> Via Internet</p>
</div>
</div>
<div class="card-footer">
Get Started <i class="fa fa-arrow-right"></i>
</div>
</div>
</a>
</div>
<div class="col-md-4">
<div class="card readable">
<div class="card-body">
<img src="images/phone-call.png" alt="Phone" class="card-img">
<div class="card-content">
<h5 class="card-title">Register Complaint via Phone</h5>
<p class="card-text">Call 1913 to register your complaint.</p>
</div>
</div>
<div class="card-footer">
Call Now <i class="fa fa-arrow-right"></i>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card readable">
<div class="card-body">
<img src="images/contract.png" alt="Paper" class="card-img">
<div class="card-content">
<h5 class="card-title">Complaint via Paper Form</h5>
<p class="card-text">Send your Grievance to<br><strong>The Commissioner,<br>Greater Chennai
Corporation,<br>Ripon Building, EVR Salai, Chennai - 600003.</strong></p>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="card readable">
<div class="card-body">
<img src="images/search.png" alt="Status" class="card-img">
<div class="card-content">
<h5 class="card-title">Check Your Complaint Status</h5>
<div class="form-group">
<label class="readable">Check By Complaint Number</label>
</div>
<div class="form-group">
<input type="text" class="form-control" id="complaint-number"
placeholder="Enter Complaint Number">
</div>
</div>
</div>
<div class="card-footer">
<button class="btn btn-primary readable" id="check-now-btn">
Check Now <i class="fa fa-arrow-right"></i>
</button>
</div>
</div>
</div>
</div>
</div>
<!-- <div th:insert="fragments/footer :: footerFragment"></div>-->
<!--Bootstrap JS-->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<!-- Font Awesome for Icons -->
<script src="https://kit.fontawesome.com/a076d05399.js"></script>
<script>
$(document).ready(function () {
$('#check-now-btn').click(function () {
var complaintNumber = $('#complaint-number').val();
if (complaintNumber) {
window.location.href = 'checklistofficer?complaintno=' + encodeURIComponent(complaintNumber);
} else {
alert('Please enter a complaint number.');
}
});
});
// Script for reader functionality
let readerActive = false;
function toggleReader() {
const readerBtn = document.getElementById('reader-btn');
readerActive = !readerActive;
if (readerActive) {
readerBtn.classList.add('active');
readerBtn.textContent = 'Disable Reader';
enableReading();
} else {
readerBtn.classList.remove('active');
readerBtn.textContent = 'Enable Reader';
disableReading();
}
}
function enableReading() {
document.querySelectorAll('.readable').forEach(element => {
element.addEventListener('mouseenter', speakText);
element.addEventListener('click', speakText);
});
}
function disableReading() {
document.querySelectorAll('.readable').forEach(element => {
element.removeEventListener('mouseenter', speakText);
element.removeEventListener('click', speakText);
});
}
function speakText(event) {
if (readerActive) {
const text = event.target.textContent;
const utterance = new SpeechSynthesisUtterance(text);
window.speechSynthesis.speak(utterance);
}
}
</script>
</body>
</html>

1258
src/main/resources/templates/User/registercomplaints.html
File diff suppressed because it is too large
View File

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

@ -0,0 +1,309 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>CheckList Officer</title>
<!-- Google Font -->
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap" rel="stylesheet">
<!-- Bootstrap CSS -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
<style>
/*rating style for css*/
.rating {
direction: rtl;
display: inline-flex;
font-size: 24px;
}
.rating input {
display: none;
}
.rating label {
color: #ddd;
cursor: pointer;
margin: 0;
}
.rating input:checked~label {
color: #414f69;
}
.rating label:hover,
.rating label:hover~label {
color: #414f69;
}
/* Style for resizing content */
.resizable-content {
font-size: medium;
transition: font-size 0.3s ease;
}
</style>
</head>
<body>
<!-- Insert the header fragment -->
<div th:insert="~{fragments/header :: headerFragment}"></div>
<div class="container mt-4">
<!--<button class="plus btn btn-primary">A+</button>
<button class="minus btn btn-secondary">A-</button>-->
<div class="mt-1">
<div class="row align-items-center justify-content-center">
<h4 class="title resizable-content" style="color: #414f69;">Check Availability Status</h4>
</div>
</div>
<!-- Card Section -->
<div class="card p-3 resizable-content" style="margin-bottom: 8px;color: #414f69;">
<div class="row" style="font-weight: bolder;">
<div class="col-md-6">
Complainant Number:
</div>
<div class="col-md-6">
Date:
</div>
</div>
<div class="row" style="font-weight: bolder;color: #414f69;">
<div class="col-md-6">
Complainant Mode:
</div>
<div class="col-md-6">
Expiry:
</div>
</div>
<!-- Add the resizable-content class to the card sections -->
<div class="card mb-3 resizable-content">
<div class="card-header text-white" style="background-color: #414f69;">1. Complaining Person's Details
</div>
<div class="card-body">
<div class="row">
<div class="col-md-6">
Complainant Mobile Number:
<input type="text" id="complaint-mobile-number" class="form-control" value="">
</div>
<div class="col-md-6">
Complainant Name:
<input type="text" id="complaint-customer-name" class="form-control" value="">
</div>
<div class="col-md-6">
Complainant Email:
<input type="email" class="form-control" value="">
</div>
<div class="col-md-6">
Gender:
<select class="form-control">
<option value="0">Select Gender</option>
<option value="male">Male</option>
<option value="female">Female</option>
<option value="transgender">Transgender</option>
</select>
</div>
</div>
</div>
</div>
<div class="card mb-3 resizable-content">
<div class="card-header text-white" style="background-color: #414f69;">2. Complaint Location Details
</div>
<div class="card-body">
<div class="row">
<div class="col-md-4">
Complainant Street:
<input type="text" id="street" class="form-control" >
</div>
<div class="col-md-4">
Complainant Zone:
<input type="text" class="form-control" id="zone" >
</div>
<div class="col-md-4">
Complainant Ward:
<input type="text" class="form-control" id="ward">
</div>
<div class="col-md-4">
Complainant Area:
<input type="text" class="form-control" id="area">
</div>
<div class="col-md-4">
Complainant Locality:
<input type="text" class="form-control" id="location">
</div>
</div>
</div>
</div>
<div class="card resizable-content">
<div class="card-header text-white" style="background-color: #414f69;">3. Complaint Type</div>
<div class="card-body">
<div class="row">
<div class="col-md-4">
Complainant Type:
<input type="text" class="form-control" id="complaintType">
</div>
<div class="col-md-4">
Complainant Sub-Type:
<input type="text" class="form-control" >
</div>
<div class="col-md-4">
Complainant Title:
<input type="text" class="form-control" >
</div>
<div class="col-md-12">
Complainant Description:
<input type="text" class="form-control" id="">
</div>
</div>
</div>
</div>
</div>
<div class="card mb-3 resizable-content">
<div class="card-header text-white" style="background-color: #414f69;">Complaint Action</div>
<div class="card-body">
<div class="row">
<div class="col-md-2">Aug 24<br>7.00 pm</div>
<div class="col-md-8">Officer - AE Zone 15<br>Lorem ipsum dolor sit amet, consectetur adipiscing
elit. In sit arcu aliquet ut dui egestas.</div>
<div class="col-md-2"><button class="btn btn-sm"
style="background-color: #414f69;color: white;">Redressed</button></div>
</div>
<div class="row mt-3">
<div class="col-md-2">Aug 25<br>10.00 am</div>
<div class="col-md-8">Citizen<br>Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Ullamcorper ullamcorper quis.</div>
<div class="col-md-2"><button class="btn btn-secondary btn-sm">Reopened</button></div>
</div>
<div class="row mt-3">
<div class="col-md-2">Aug 26<br>3.00 pm</div>
<div class="col-md-8">Officer - AE Zone 15<br>Lorem ipsum dolor sit amet, consectetur adipiscing
elit. In sit arcu aliquet ut dui egestas.</div>
<div class="col-md-2"><button class="btn btn-sm"
style="background-color: #414f69;color: white;">Redressed</button></div>
</div>
</div>
</div>
<div class="card mb-3 resizable-content">
<div class="card-header text-white" style="background-color: #414f69;">Update Complaint</div>
<div class="card-body">
<div class="row">
<div class="col-md-6">
Change Complaint Status:
<select class="form-control">
<option value="0">Select Complaint</option>
<option value="complaint1">Complaint 1</option>
<option value="complaint2">Complaint 2</option>
</select>
</div>
<div class="col-md-6">
<label for="rating" style="display: block; margin-bottom: 4px;">Feedback Rating:</label>
<div class="rating">
<input type="radio" name="star" id="star1"><label for="star1">★</label>
<input type="radio" name="star" id="star2"><label for="star2">★</label>
<input type="radio" name="star" id="star3"><label for="star3">★</label>
<input type="radio" name="star" id="star4"><label for="star4">★</label>
<input type="radio" name="star" id="star5"><label for="star5">★</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
Complainant Locality:
<textarea class="form-control" id="othercomplaint-details" rows="3"
placeholder="Enter complaint details" maxlength="400"></textarea>
</div>
</div>
<div class="row align-items-center justify-content-center" style="margin-top: 5px;">
<button class="btn btn-sm" style="background-color: #414f69;color: white;">Submit</button>
</div>
</div>
</div>
</div>
<!-- Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<script>
</script>
<!-- JavaScript to handle button clicks -->
<script>
//for getting values.
$(document).ready(function () {
// Get the complaint number from the URL
var urlParams = new URLSearchParams(window.location.search);
var complaintNo = urlParams.get('complaintno');
if (complaintNo) {
$.ajax({
url: '/api/getComplaintDetailsbyId', // Replace with your actual API endpoint
type: 'GET',
data: {complaintid: complaintNo},
success: function (response) {
console.log('API response:', response); // Log response for debugging
//document.getElementById("complaint-mobile-number").value = response.CustomerMobile;
if (Array.isArray(response) && response.length > 0) {
var complaintListHistory = response[0].ComplaintListHistory;
if (Array.isArray(complaintListHistory) && complaintListHistory.length > 0) {
var complaintDetails = complaintListHistory[0];
// Populate the form fields
document.getElementById("complaint-mobile-number").value = complaintDetails.CustomerMobile || '';
document.getElementById("complaint-customer-name").value = complaintDetails.CustomerName || '';
document.getElementById("street").value = complaintDetails.Street || '';
document.getElementById("zone").value = complaintDetails.Zone || '';
document.getElementById("ward").value = complaintDetails.Division || '';
document.getElementById("area").value = complaintDetails.Area || '';
document.getElementById("location").value = complaintDetails.Location || '';
document.getElementById("complaintType").value = complaintDetails.complainttype || '';
document.getElementById("complaintDesc").value = complaintDetails.complaintdetails || '';
} else {
alert('No complaint details found in ComplaintListHistory.');
}
} else {
alert('Unexpected response structure.');
}
},
error: function (xhr, status, error) {
console.error('Error fetching complaint details:', error);
alert('Error fetching complaint details. Please try again.');
}
});
} else {
alert('No complaint number provided.');
}
});
</script>
</body>
</html>

275
src/main/resources/templates/checklistuser/checklistuser.html

@ -0,0 +1,275 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>CheckList User</title>
<!-- Google Font -->
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap" rel="stylesheet">
<!-- Bootstrap CSS -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
<style>
/*rating style for css*/
.rating {
direction: rtl;
display: inline-flex;
font-size: 24px;
}
.rating input {
display: none;
}
.rating label {
color: #ddd;
cursor: pointer;
margin: 0;
}
.rating input:checked~label {
color: #414f69;
}
.rating label:hover,
.rating label:hover~label {
color: #414f69;
}
</style>
</head>
<body>
<!-- Insert the header fragment -->
<div th:insert="fragments/header :: headerFragment"></div>
<div class="container mt-4">
<!-- Screen Reader Button -->
<div class="row align-items-center justify-content-center mt-4">
<button id="screenReaderBtn" class="btn btn-info">Screen Reader</button>
</div>
<div class="mt-1">
<div class="row align-items-center justify-content-center">
<!--<button class="back-button" onclick="window.location.href='home';">← Back</button>-->
<h4 class="title" style="color: #414f69;">Check Availability Status</h4>
</div>
</div>
<!-- Card Section -->
<div class="card p-3" style="margin-bottom: 8px;color: #414f69;">
<div class="row" style="font-weight: bolder;">
<div class="col-md-6">
Complainant Number:
</div>
<div class="col-md-6">
Date:
</div>
</div>
<div class="row" style="font-weight: bolder;color: #414f69;">
<div class="col-md-6">
Complainant Mode:
</div>
<div class="col-md-6">
Expiry:
</div>
</div>
<div class="card mb-3">
<div class="card-header text-white" style="background-color: #414f69;">1. Complaining Person's Details
</div>
<div class="card-body">
<div class="row">
<div class="col-md-6">
Complainant Mobile Number:
<input type="text" class="form-control" value="">
</div>
<div class="col-md-6">
Complainant Name:
<input type="text" class="form-control" value="">
</div>
<div class="col-md-6">
Complainant Email:
<input type="email" class="form-control" value="">
</div>
<div class="col-md-6">
Gender:
<select class="form-control">
<option value="0">Select Gender</option>
<option value="male">Male</option>
<option value="femlae">Female</option>
<option value="transgender">Transgender</option>
</select>
</div>
</div>
</div>
</div>
<div class="card mb-3">
<div class="card-header text-white" style="background-color: #414f69;">2. Complaint Location Details
</div>
<div class="card-body">
<div class="row">
<div class="col-md-4">
Complainant Street:
<input type="text" class="form-control" value="Street Address">
</div>
<div class="col-md-4">
Complainant Zone:
<input type="text" class="form-control" value="Zone 12">
</div>
<div class="col-md-4">
Complainant Ward:
<input type="text" class="form-control" value="Ward 12">
</div>
<div class="col-md-4">
Complainant Area:
<input type="text" class="form-control" value="Chennai Central">
</div>
<div class="col-md-4">
Complainant Locality:
<input type="text" class="form-control" value="Periyamet">
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-header text-white" style="background-color: #414f69;">3. Complaint Type</div>
<div class="card-body">
<div class="row">
<div class="col-md-4">
Complainant Type:
<input type="text" class="form-control" value="Street Light">
</div>
<div class="col-md-4">
Complainant Sub-Type:
<input type="text" class="form-control" value="Mohamed Afridi">
</div>
<div class="col-md-4">
Complainant Title:
<input type="text" class="form-control" value="Male">
</div>
<div class="col-md-12">
Complainant Description:
<input type="text" class="form-control"
value="Street Light is not working. Kindly rectify it.">
</div>
</div>
</div>
</div>
</div>
<div class="card mb-3">
<div class="card-header text-white" style="background-color: #414f69;">Complaint Action</div>
<div class="card-body">
<div class="row">
<div class="col-md-2">Aug 24<br>7.00 pm</div>
<div class="col-md-8">Officer - AE Zone 15<br>Lorem ipsum dolor sit amet, consectetur adipiscing
elit. In sit arcu aliquet ut dui egestas.</div>
<div class="col-md-2"><button class="btn btn-sm"
style="background-color: #414f69;color: white;">Redressed</button></div>
</div>
<div class="row mt-3">
<div class="col-md-2">Aug 25<br>10.00 am</div>
<div class="col-md-8">Citizen<br>Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Ullamcorper ullamcorper quis.</div>
<div class="col-md-2"><button class="btn btn-secondary btn-sm">Reopened</button></div>
</div>
<div class="row mt-3">
<div class="col-md-2">Aug 26<br>3.00 pm</div>
<div class="col-md-8">Officer - AE Zone 15<br>Lorem ipsum dolor sit amet, consectetur adipiscing
elit. In sit arcu aliquet ut dui egestas.</div>
<div class="col-md-2"><button class="btn btn-sm"
style="background-color: #414f69;color: white;">Redressed</button></div>
</div>
</div>
</div>
<div class="card mb-3">
<div class="card-header text-white" style="background-color: #414f69;">Update Complaint </div>
<div class="card-body">
<div class="row">
<div class="col-md-6">
Change Complaint Status:
<select class="form-control">
<option value="0">Select Complaint</option>
<option value="complaint1">Complaint 1</option>
<option value="complaint2">Complaint 2</option>
</select>
</div>
<div class="col-md-6">
<label for="rating" style="display: block; margin-bottom: 4px;">Feedback Rating:</label>
<div class="rating">
<input type="radio" name="star" id="star1"><label for="star1">★</label>
<input type="radio" name="star" id="star2"><label for="star2">★</label>
<input type="radio" name="star" id="star3"><label for="star3">★</label>
<input type="radio" name="star" id="star4"><label for="star4">★</label>
<input type="radio" name="star" id="star5"><label for="star5">★</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
Complainant Locality:
<textarea class="form-control" id="othercomplaint-details" rows="3"
placeholder="Enter complaint details" maxlength="400"></textarea>
</div>
</div>
<div class="row align-items-center justify-content-center" style="margin-top: 5px;">
<button class="btn btn-sm"
style="background-color: #414f69;color: white;">Submit</button>
</div>
</div>
</div>
</div>
<!-- Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<script>
document.getElementById('screenReaderBtn').addEventListener('click', function() {
// Get the content of the page
const content = document.body.innerText; // You might want to filter or customize this
// Check if SpeechSynthesis is supported
if ('speechSynthesis' in window) {
// Create a new speech synthesis utterance
const utterance = new SpeechSynthesisUtterance(content);
// Set the voice, rate, pitch, and volume if needed
utterance.voice = speechSynthesis.getVoices().find(voice => voice.name === 'Google UK English Male'); // Example voice
utterance.rate = 1; // Speed of speech
utterance.pitch = 1; // Pitch of speech
utterance.volume = 1; // Volume of speech
// Speak the content
window.speechSynthesis.speak(utterance);
} else {
alert('Your browser does not support speech synthesis.');
}
});
</script>
</body>
</html>

162
src/main/resources/templates/fragments/accessibility.html

@ -0,0 +1,162 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<div th:fragment="accessibility">
<!-- accessibility panel -->
<link rel="stylesheet"
href="https://img1.digitallocker.gov.in/ux4g/UX4G-CDN-accessibility/css/accesibility-style-v2.1.css">
<div class="uwaw uw-light-theme gradient-head uwaw-initial paid_widget" id="uw-main">
<div class="relative second-panel"><h3>Accessibility options by Bonton.</h3>
<div class="uwaw-close" onclick="closeMain()"></div>
</div>
<div class="uwaw-body">
<div class="h-scroll">
<div class="uwaw-features">
<div class="uwaw-features__item reset-feature" id="featureItem_sp">
<button id="speak" class="uwaw-features__item__i"
data-uw-reader-content="Enable the UserWay screen reader"
aria-label="Enable the UserWay screen reader" aria-pressed="false"><span
class="uwaw-features__item__icon"> <span
class="ux4g-icon icon-speaker"> </span> </span> <span
class="uwaw-features__item__name">Text To Speech</span> <span
class="tick-active uwaw-features__item__enabled reset-tick" id="tickIcon_sp"
style="display: none"> </span></button>
</div>
<div class="uwaw-features__item reset-feature" id="featureItem">
<button id="btn-s9" class="uwaw-features__item__i"
data-uw-reader-content="Enable the UserWay screen reader"
aria-label="Enable the UserWay screen reader" aria-pressed="false"><span
class="uwaw-features__item__icon"> <span
class="ux4g-icon icon-bigger-text"> </span> </span><span class="uwaw-features__item__name">Bigger Text</span>
<div class="uwaw-features__item__steps reset-steps" id="featureSteps">
<!-- Steps span tags will be dynamically added here --> </div>
<span class="tick-active uwaw-features__item__enabled reset-tick" id="tickIcon"
style="display: none"> </span></button>
</div>
<div class="uwaw-features__item reset-feature" id="featureItem-st">
<button id="btn-small-text" class="uwaw-features__item__i"
data-uw-reader-content="Enable the UserWay screen reader"
aria-label="Enable the UserWay screen reader" aria-pressed="false"><span
class="uwaw-features__item__icon"> <span
class="ux4g-icon icon-small-text"> </span> </span><span class="uwaw-features__item__name">Small Text</span>
<div class="uwaw-features__item__steps reset-steps" id="featureSteps-st">
<!-- Steps span tags will be dynamically added here --> </div>
<span class="tick-active uwaw-features__item__enabled reset-tick" id="tickIcon-st"
style="display: none"> </span></button>
</div>
<div class="uwaw-features__item reset-feature" id="featureItem-lh">
<button id="btn-s12" class="uwaw-features__item__i"
data-uw-reader-content="Enable the UserWay screen reader"
aria-label="Enable the UserWay screen reader" aria-pressed="false"><span
class="uwaw-features__item__icon"> <span
class="ux4g-icon icon-line-hight"> </span> </span> <span
class="uwaw-features__item__name">Line Height</span>
<div class="uwaw-features__item__steps reset-steps" id="featureSteps-lh">
<!-- Steps span tags will be dynamically added here --> </div>
<span class="tick-active uwaw-features__item__enabled reset-tick" id="tickIcon-lh"
style="display: none"> </span></button>
</div>
<div class="uwaw-features__item reset-feature" id="featureItem-ht">
<button id="btn-s10" onclick="highlightLinks()" class="uwaw-features__item__i"
data-uw-reader-content="Enable the UserWay screen reader"
aria-label="Enable the UserWay screen reader" aria-pressed="false"><span
class="uwaw-features__item__icon"> <span
class="ux4g-icon icon-highlight-links"> </span> </span> <span
class="uwaw-features__item__name">Highlight Links</span> <span
class="tick-active uwaw-features__item__enabled reset-tick" id="tickIcon-ht"
style="display: none"> </span></button>
</div>
<div class="uwaw-features__item reset-feature" id="featureItem-ts">
<button id="btn-s13" onclick="increaseAndReset()" class="uwaw-features__item__i"
data-uw-reader-content="Enable the UserWay screen reader"
aria-label="Enable the UserWay screen reader" aria-pressed="false"><span
class="uwaw-features__item__icon"> <span
class="ux4g-icon icon-text-spacing"> </span> </span> <span
class="uwaw-features__item__name">Text Spacing</span>
<div class="uwaw-features__item__steps reset-steps" id="featureSteps-ts">
<!-- Steps span tags will be dynamically added here --> </div>
<span class="tick-active uwaw-features__item__enabled reset-tick" id="tickIcon-ts"
style="display: none"> </span></button>
</div>
<div class="uwaw-features__item reset-feature" id="featureItem-df">
<button id="btn-df" onclick="toggleFontFeature()" class="uwaw-features__item__i"
data-uw-reader-content="Enable the UserWay screen reader"
aria-label="Enable the UserWay screen reader" aria-pressed="false"><span
class="uwaw-features__item__icon"> <span
class="ux4g-icon icon-dyslexia-font"> </span> </span> <span
class="uwaw-features__item__name">Dyslexia Friendly</span> <span
class="tick-active uwaw-features__item__enabled reset-tick" id="tickIcon-df"
style="display: none"> </span></button>
</div>
<div class="uwaw-features__item reset-feature" id="featureItem-hi">
<button id="btn-s11" onclick="toggleImages()" class="uwaw-features__item__i"
data-uw-reader-content="Enable the UserWay screen reader"
aria-label="Enable the UserWay screen reader" aria-pressed="false"><span
class="uwaw-features__item__icon"> <span
class="ux4g-icon icon-hide-images"> </span> </span> <span
class="uwaw-features__item__name">Hide Images</span> <span
class="tick-active uwaw-features__item__enabled reset-tick" id="tickIcon-hi"
style="display: none"> </span></button>
</div>
<div class="uwaw-features__item reset-feature" id="featureItem-Cursor">
<button id="btn-cursor" onclick="toggleCursorFeature()" class="uwaw-features__item__i"
data-uw-reader-content="Enable the UserWay screen reader"
aria-label="Enable the UserWay screen reader" aria-pressed="false"><span
class="uwaw-features__item__icon"> <span
class="ux4g-icon icon-cursor"> </span> </span> <span
class="uwaw-features__item__name">Cursor</span> <span
class="tick-active uwaw-features__item__enabled reset-tick" id="tickIcon-cursor"
style="display: none"> </span></button>
</div>
<div class="uwaw-features__item reset-feature" id="featureItem-ht-dark">
<button id="dark-btn" class="uwaw-features__item__i"
data-uw-reader-content="Enable the UserWay screen reader"
aria-label="Enable the UserWay screen reader" aria-pressed="false"><span
class="uwaw-features__item__name"> <span class="light_dark_icon"> <input
type="checkbox" class="light_mode uwaw-featugres__item__i" id="checkbox"/> <label
for="checkbox" class="checkbox-label"> <!-- <i class="fas fa-moon-stars"></i> --> <i
class="fas fa-moon-stars"> <span
class="ux4g-icon icon-moon"></span> </i> <i
class="fas fa-sun"> <span class="ux4g-icon icon-sun"></span> </i> <span
class="ball"></span> </label> </span> <span
class="uwaw-features__item__name">Light-Dark</span> </span> <span
class="tick-active uwaw-features__item__enabled reset-tick" id="tickIcon-ht-dark"
style="display: none; pointer-events: none"> </span></button>
</div> <!-- Invert Colors Widget -->
<div class="uwaw-features__item reset-feature" id="featureItem-ic">
<button id="btn-invert" class="uwaw-features__item__i"
data-uw-reader-content="Enable the UserWay screen reader"
aria-label="Enable the UserWay screen reader" aria-pressed="false"><span
class="uwaw-features__item__icon"> <span
class="ux4g-icon icon-invert"> </span> </span> <span
class="uwaw-features__item__name">Invert Colors</span> <span
class="tick-active uwaw-features__item__enabled reset-tick" id="tickIcon-ic"
style="display: none"> </span></button>
</div>
</div>
</div> <!-- Reset Button --> </div>
<div class="reset-panel"> <!-- copyright accessibility bar -->
<div class="copyrights-accessibility">
<button class="btn-reset-all" id="reset-all" onclick="resetAll()"><span class="reset-icon"> </span> <span
class="reset-btn-text">Reset All Settings</span></button>
<a href="https://www.ux4g.gov.in" target="_blank" class="copyright-text" contenteditable="false"
style="cursor: pointer;"> <span
class="uwaw-features__item__name ux4g-copy ux4g-copyright">Created by Bonton</span> </a></div>
</div>
</div>
<button id="uw-widget-custom-trigger" class="uw-widget-custom-trigger" aria-label="Accessibility Widget"
data-uw-trigger="true" aria-haspopup="dialog"><img
src="data:image/svg+xml,%0A%3Csvg width='32' height='32' viewBox='0 0 32 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_1_1506)'%3E%3Cpath d='M16 7C15.3078 7 14.6311 6.79473 14.0555 6.41015C13.4799 6.02556 13.0313 5.47894 12.7664 4.83939C12.5015 4.19985 12.4322 3.49612 12.5673 2.81719C12.7023 2.13825 13.0356 1.51461 13.5251 1.02513C14.0146 0.535644 14.6383 0.202301 15.3172 0.0672531C15.9961 -0.0677952 16.6999 0.00151652 17.3394 0.266423C17.9789 0.53133 18.5256 0.979934 18.9101 1.55551C19.2947 2.13108 19.5 2.80777 19.5 3.5C19.499 4.42796 19.1299 5.31762 18.4738 5.97378C17.8176 6.62994 16.928 6.99901 16 7Z' fill='white'/%3E%3Cpath d='M27 7.05L26.9719 7.0575L26.9456 7.06563C26.8831 7.08313 26.8206 7.10188 26.7581 7.12125C25.595 7.4625 19.95 9.05375 15.9731 9.05375C12.2775 9.05375 7.14313 7.67875 5.50063 7.21188C5.33716 7.14867 5.17022 7.09483 5.00063 7.05063C3.81313 6.73813 3.00063 7.94438 3.00063 9.04688C3.00063 10.1388 3.98188 10.6588 4.9725 11.0319V11.0494L10.9238 12.9081C11.5319 13.1413 11.6944 13.3794 11.7738 13.5856C12.0319 14.2475 11.8256 15.5581 11.7525 16.0156L11.39 18.8281L9.37813 29.84C9.37188 29.87 9.36625 29.9006 9.36125 29.9319L9.34688 30.0112C9.20188 31.0206 9.94313 32 11.3469 32C12.5719 32 13.1125 31.1544 13.3469 30.0037C13.5813 28.8531 15.0969 20.1556 15.9719 20.1556C16.8469 20.1556 18.6494 30.0037 18.6494 30.0037C18.8838 31.1544 19.4244 32 20.6494 32C22.0569 32 22.7981 31.0162 22.6494 30.0037C22.6363 29.9175 22.6206 29.8325 22.6019 29.75L20.5625 18.8294L20.2006 16.0169C19.9387 14.3788 20.1494 13.8375 20.2206 13.7106C20.2225 13.7076 20.2242 13.7045 20.2256 13.7013C20.2931 13.5763 20.6006 13.2963 21.3181 13.0269L26.8981 11.0763C26.9324 11.0671 26.9662 11.0563 26.9994 11.0438C27.9994 10.6688 28.9994 10.15 28.9994 9.04813C28.9994 7.94625 28.1875 6.73813 27 7.05Z' fill='white'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_1_1506'%3E%3Crect width='32' height='32' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A"><span>Accessibility Options</span>
</button><!-- accessibility panel end-->
<script src="https://img1.digitallocker.gov.in/ux4g/UX4G-CDN-accessibility/js/weights-v1.js"></script>
<script>
document.getElementById('uw-widget-custom-trigger2').addEventListener('click', function() { openMain(); });
</script>
</div>
</body>
</html>

55
src/main/resources/templates/fragments/footer.html

@ -0,0 +1,55 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<div th:fragment="footerFragment" class="footer">
<meta charset="UTF-8">
<title>Footer Fragment</title>
<style>
.footer {
background-color: #414f69;
color: white;
position: fixed;
bottom: 0;
width: 100%;
padding: 10px 0;
}
.footer-content {
position: relative;
text-align: center;
font-size: 14px;
}
.footer-image {
position: absolute;
top: 50%;
transform: translateY(-50%);
opacity: 0.2; /* Light opacity */
}
.left-image {
left: 10px;
}
.right-image {
right: 10px;
}
</style>
</head>
<body>
<div class="footer">
<div class="footer-content">
<img src="images/ripon.jpg" style="height: 51px; width: 155px;margin-top: 10px;" alt="Left Image" class="footer-image left-image">
<p>Public Grievance System provided to Greater Chennai Corporation by Bonton Software Private Limited.</p>
<img src="images/ripon.jpg" style="height: 51px; width: 155px;margin-top: 10px;" alt="Right Image" class="footer-image right-image">
</div>
</div>
</body>
</html>

98
src/main/resources/templates/fragments/header.html

@ -0,0 +1,98 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
<title>Header Fragment</title>
</head>
<body>
<div th:fragment="headerFragment">
<style>
.header {
background-color: #3b4858;
padding: 10px 20px;
display: flex;
align-items: center;
justify-content: space-between;
color: white;
}
.header .logo-left img {
height: 60px;
}
.header .title {
text-align: center;
flex-grow: 1;
}
.header .title h2 {
margin: 0;
font-size: 1.5rem;
}
.header .logos-right img {
height: 60px;
margin-left: 10px;
}
</style>
<div class="header">
<div class="logo-left">
<img src="images/gcc1.png" alt="Greater Chennai Corporation Logo">
</div>
<div class="title">
<h2>Public Grievance and Redressal System</h2>
</div>
<!--<button id="screenReaderButton">Read Screen</button>-->
<div class="logos-right">
<img src="images/tamil.jpg" alt="Tamil Nadu Logo">
<img src="images/bt-logo.png" style="width: 100px;height: 50px;" alt="bonton Logo">
</div>
</div>
</div>
<script>
// screenReader.js
let isReading = false;
let speechSynthesisUtterance;
function readScreenContent() {
const content = document.body.innerText;
speechSynthesisUtterance = new SpeechSynthesisUtterance(content);
window.speechSynthesis.speak(speechSynthesisUtterance);
isReading = true;
}
function stopReading() {
if (speechSynthesisUtterance) {
window.speechSynthesis.cancel();
isReading = false;
}
}
function toggleScreenReader(buttonId) {
const button = document.getElementById(buttonId);
if (button) {
button.addEventListener('click', function () {
if (isReading) {
stopReading();
button.innerText = "Read Screen"; // Update button text when stopped
} else {
readScreenContent();
button.innerText = "Stop Reading"; // Update button text when reading
}
});
}
}
document.addEventListener('DOMContentLoaded', function () {
toggleScreenReader('screenReaderButton');
});
</script>
</div>
</body>
</html>

685
src/main/resources/templates/officer/officercomplaint.html

@ -0,0 +1,685 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Main Page</title>
<!--Google Font -->
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap" rel="stylesheet">
<!--Bootstrap CSS-->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
<style>
body {
font-family: 'Lato', sans-serif;
}
.card {
border-radius: 15px;
border: none;
padding: 20px;
background-color: #f0f4ff;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
margin-top: 20px;
}
.card-title {
font-size: 1.2rem;
font-weight: bold;
}
.card-text {
color: #666;
margin-bottom: 20px;
}
.progress {
height: 20px;
border-radius: 10px;
}
.progress-bar {
background-color: #414f69;
/* New color for the progress bar */
border-radius: 10px;
}
.form-row {
margin-bottom: 20px;
}
.form-step {
display: none;
}
.form-step.active {
display: block;
}
.container {
max-width: 100%;
}
/*css for step 3*/
.complaint-icons {
display: flex;
justify-content: space-around;
margin-bottom: 20px;
}
.complaint-icon {
text-align: center;
cursor: pointer;
}
.complaint-icon img {
width: 50px;
height: 50px;
}
/*complaints css*/
.complaint-fields {
display: none; /* Default hidden */
}
.complaint-fields.active {
display: block; /* Show when active */
}
/*complaints css*/
/*for radio button style*/
.radio-group {
display: flex;
align-items: center;
/* Ensures all items are aligned to the center */
}
.radio-item {
display: flex;
align-items: center;
margin-right: 20px;
/* Adds space between each radio item */
}
.radio-item input[type="radio"] {
margin-right: 10px;
/* Adds space between the radio button and its label */
vertical-align: middle;
/* Ensures vertical alignment */
}
.radio-item label {
margin: 0;
/* Removes any default margins that might affect alignment */
}
.back-button {
background: none;
border: none;
color: #000;
font-size: 16px;
cursor: pointer;
padding: 0;
margin-right: auto;
/* Align the button to the left */
}
.title {
text-align: center;
flex-grow: 1;
font-size: 24px;
font-weight: bold;
margin: 0;
}
/*css for map in step2*/
#map {
height: 300px;
width: 100%;
position: relative;
overflow: hidden;
max-width: 100%;
}
#search-container {
position: absolute;
top: 10px;
left: 50%;
transform: translateX(-50%);
z-index: 1000;
width: 500px;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
background-color: white;
border-radius: 4px;
padding: 0;
/* Removed extra padding to match the input width */
}
#search-box {
width: 100%;
/* Ensures the input takes up the entire width of the container */
padding: 5px;
font-size: 16px;
border: 1px solid #ccc;
border-radius: 4px;
/* Rounded corners matching the container */
box-sizing: border-box;
/* Makes sure padding is considered in width */
}
#suggestions {
border: 1px solid #ccc;
border-radius: 4px;
max-height: 200px;
overflow-y: auto;
margin-top: 5px;
background-color: white;
display: none;
width: 100%;
/* Matches the width of the container and input */
box-sizing: border-box;
/* Ensures the width includes borders and padding */
}
#suggestions ul {
list-style: none;
padding: 0;
margin: 0;
}
#suggestions ul li {
padding: 5px;
cursor: pointer;
}
#suggestions ul li:hover {
background-color: #f0f0f0;
}
</style>
</head>
<body>
<!-- Insert the header fragment -->
<div th:insert="fragments/header :: headerFragment"></div>
<!-- Progress Bar Section -->
<div class="container">
<div class="mt-1">
<div class="row align-items-center justify-content-center">
<button class="back-button" onclick="window.location.href='home';">← Back</button>
<h2 class="title">Registration of Complaint</h2>
</div>
</div>
<div class="card">
<h3>Instructions:</h3>
<p>Please fill your complaint details below and click the ‘Submit’ button at the bottom. You will be given a
Complaint Number upon submitting the complaint that you can use to track the complaint.</p>
</div>
<div class="container">
<!-- Card 1: Step 1 -->
<div class="card col-md-12 mb-3" id="step-1">
<div class="card-body">
<h5 class="card-title">1. Complaining Person's Details:</h5>
<div class="form-row">
<div class="col-md-4">
<label for="mobile">Mobile Number:</label>
<div class="input-group">
<input type="number" class="form-control" id="mobile"
placeholder="Enter your Mobile Number">
<div class="input-group-append">
<button type="button" id="getOtpBtn" class="btn btn-primary"
style="background-color: #414f69;">Get OTP</button>
</div>
</div>
</div>
<div class="col-md-4">
<div class="input-group" id="otpSection" style="display: none;">
<label for="verify">Verify OTP:</label>
<div class="input-group">
<input type="number" class="form-control" id="otp" placeholder="Enter OTP">
<div class="input-group-append">
<button type="button" id="verifyBtn" class="btn btn-success">Verify</button>
</div>
</div>
</div>
</div>
</div>
<div class="form-row mt-3">
<div class="col-md-4">
<label for="name">Name:</label>
<input type="text" class="form-control" id="name" placeholder="Enter your name">
</div>
<div class="col-md-4">
<label for="gender">Gender/பாலினம்:<span class="required">*</span></label>
<div class="radio-group">
<div class="radio-item">
<input type="radio" id="male" name="gender" value="male" checked>
<label for="male">Male</label>
</div>
<div class="radio-item">
<input type="radio" id="female" name="gender" value="female">
<label for="female">Female</label>
</div>
<div class="radio-item">
<input type="radio" id="transgender" name="gender" value="transgender">
<label for="transgender">Transgender</label>
</div>
</div>
</div>
<div class="col-md-4">
<label for="email">Email:</label>
<input type="email" class="form-control" id="email" placeholder="Enter your email">
</div>
</div>
</div>
</div>
<!-- Card 2: Step 2 -->
<div class="card col-md-12 mb-3" id="step-2">
<div class="card-body">
<h5 class="card-title">2. Complaint Location Details:</h5>
<div class="form-row">
<div class="col-md-12">
<div id="map"></div>
<div id="search-container">
<input type="text" id="search-box" placeholder="Search for a location...">
<div id="suggestions"></div>
</div>
<label for="street">Street:</label>
<input type="text" class="form-control" id="street">
</div>
</div>
</div>
</div>
<!-- Card 3: Step 3 -->
<div class="card col-md-12 mb-3" id="step-3">
<div class="card-body">
<h5 class="card-title">3. Complaint Type:</h5>
<div class="complaint-icons">
<div class="complaint-icon" data-type="specific">
<img src="images/road.png" alt="Pothole">
<p>Pothole</p>
</div>
<div class="complaint-icon" data-type="specific">
<img src="images/recycle.png" alt="garbage">
<p>Garbage</p>
</div>
<div class="complaint-icon" data-type="specific">
<img src="images/waste-bin.png" alt="broken-bin">
<p>Broken-Bin</p>
</div>
<div class="complaint-icon" data-type="specific">
<img src="images/street-lamp.png" alt="StreetLight">
<p>StreetLight</p>
</div>
<div class="complaint-icon" data-type="specific">
<img src="images/portable-bathroom.png" alt="public-toilet">
<p>Public Toilet</p>
</div>
<div class="complaint-icon" data-type="specific">
<img src="images/mosquito.png" alt="mosquito">
<p>Mosquito Menace</p>
</div>
<div class="complaint-icon" data-type="specific">
<img src="images/tsunami.png" alt="waterstag">
<p>WaterStagnation</p>
</div>
<div class="complaint-icon" data-type="specific">
<img src="images/sewage.png" alt="sewage">
<p>Storm Water Drains</p>
</div>
<div class="complaint-icon" data-type="specific">
<img src="images/dog.png" alt="dog">
<p>Street Dog</p>
</div>
<div class="complaint-icon" data-type="specific">
<img src="images/bad-weather.png" alt="weather">
<p>Tree Fallen</p>
</div>
<div class="complaint-icon" data-type="others">
<img src="images/menu.png" alt="Others">
<p>Others</p>
</div>
</div>
<div class="complaint-fields active" id="specific-fields">
<div class="form-row mt-3">
<div class="col-md-6">
<label for="complaint-title">Complaint Title:</label>
<input type="text" class="form-control" id="complaint-title"
placeholder="Enter complaint title">
</div>
<div class="col-md-6">
<label for="othercomplaint-details">Details of Complaint:</label>
<textarea class="form-control" id="othercomplaint-details" rows="3"
placeholder="Enter complaint details" maxlength="400"></textarea>
</div>
</div>
<div class="form-row mt-3">
<div class="col-md-6">
<label for="upload">Upload Photo Or Video:</label>
<input type="file" class="form-control" id="upload">
</div>
</div>
</div>
<div class="complaint-fields" id="others-fields" style="display:none;">
<div class="form-row mt-3">
<div class="col-md-4">
<label for="type">Type:</label>
<select class="form-control" id="type">
<option value="">Please Select</option>
</select>
</div>
<div class="col-md-4">
<label for="sub-type">Sub-Type:</label>
<select class="form-control" id="sub-type">
<option value="">Select complaint</option>
</select>
</div>
<div class="col-md-4">
<label for="uploadothers">Upload Photo or Video:</label>
<input type="file" class="form-control" id="uploadothers" accept="image/*,video/*">
</div>
</div>
<div class="form-row mt-3">
<div class="col-md-6">
<label for="othercomplaint-details">Details of Complaint:</label>
<textarea class="form-control" id="othercomplaint-details" rows="3"
placeholder="Enter complaint details" maxlength="400"></textarea>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<!-- Font Awesome for Icons -->
<script src="https://kit.fontawesome.com/a076d05399.js"></script>
<!-- Progress Bar Script -->
<script>
let currentStep = 1;
function showStep(step) {
$('.form-step').removeClass('active');
$('#step-' + step).addClass('active');
updateProgressBar(step);
}
function nextStep() {
if (currentStep < 4) {
currentStep++;
showStep(currentStep);
}
}
function prevStep() {
if (currentStep > 1) {
currentStep--;
showStep(currentStep);
}
}
function updateProgressBar(step) {
const progress = (step / 4) * 100;
$('.progress-bar').css('width', progress + '%').attr('aria-valuenow', progress);
}
$(document).ready(function () {
showStep(currentStep);
});
//for step3 onclick function
$(document).ready(function () {
$('.complaint-icon').click(function () {
const type = $(this).data('type');
const title = $(this).find('p').text().trim(); // Get the icon name
// Hide all fields initially
$('.complaint-fields').removeClass('active').hide();
if (type === 'specific') {
$('#specific-fields').addClass('active').show();
$('#complaint-title').val(title); // Set the complaint title to the icon name
} else if (type === 'others') {
$('#others-fields').addClass('active').show();
$('#complaint-title').val(''); // Clear the complaint title for 'Others'
}
});
});
//for complaint group and complainttype wise options dropdown api
$(document).ready(function () {
const $type = $('#type');
const $subType = $('#sub-type');
$subType.prop('disabled', true);
// Fetch and populate the Type dropdown
$.ajax({
url: '/api/getComplaintCategories',
method: 'GET',
success: function (response) {
const data = typeof response === 'string' ? JSON.parse(response) : response;
//console.log('Response:', response); // Log the response to verify
let optionsHtml = '<option value="">Please Select</option>';
data.ComplaintCategoryListResult.forEach(function (group) {
optionsHtml += `<option value="${group.groupid}">${group.groupname}</option>`;
});
$type.html(optionsHtml);
},
error: function (error) {
console.error('Error fetching complaint categories:', error);
}
});
// Handle Type dropdown change
$type.change(function () {
const selectedType = $(this).val();
$subType.empty().append('<option value="">Select complaint</option>');
if (selectedType) {
$.ajax({
url: `/api/getComplaintSubTypes?groupId=${selectedType}`,
method: 'GET',
success: function (response) {
const data = typeof response === 'string' ? JSON.parse(response) : response;
const selectedGroup = data.ComplaintCategoryListResult[0];
if (selectedGroup && selectedGroup.group) {
$subType.prop('disabled', false);
selectedGroup.group.forEach(function (complaint) {
$subType.append(`<option value="${complaint.id}">${complaint.complaintname}</option>`);
});
} else {
$subType.prop('disabled', true);
}
},
error: function (error) {
console.error('Error fetching sub-types:', error);
$subType.prop('disabled', true);
}
});
} else {
$subType.prop('disabled', true);
}
});
});
//for step 1 otp input box
document.getElementById('getOtpBtn').addEventListener('click', function () {
document.getElementById('otpSection').style.display = 'flex';
});
//for sweet alert
function showSuccessAlert() {
Swal.fire({
icon: 'success',
title: 'Complaint Registration Success',
text: 'Complaint Number 123456. Use this Number for Complaint Status Check.',
confirmButtonText: 'Back to Home',
confirmButtonColor: '#3085d6',
}).then((result) => {
if (result.isConfirmed) {
window.location.href = 'home';
}
});
}
//script for map in step2
// Script For Map
function initializeMap() {
var map = L.map('map', {attributionControl: false}).setView([11.1271, 78.6569], 7);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 19,
attributionControl: false,
}).addTo(map);
var currentMarker = null;
map.on('click', function (e) {
var lat = e.latlng.lat;
var lng = e.latlng.lng;
if (currentMarker) {
map.removeLayer(currentMarker);
}
currentMarker = L.marker([lat, lng]).addTo(map);
fetchLocationInfo(lat, lng, currentMarker);
});
document.getElementById('search-box').addEventListener('input', function () {
var query = this.value.trim();
if (query.length > 2) {
fetchSuggestions(query);
} else {
document.getElementById('suggestions').style.display = 'none';
}
});
document.getElementById('suggestions').addEventListener('click', function (e) {
if (e.target.tagName === 'LI') {
var latlng = JSON.parse(e.target.dataset.latlng);
map.setView(latlng, 13);
if (currentMarker) {
map.removeLayer(currentMarker);
}
currentMarker = L.marker(latlng).addTo(map);
fetchLocationInfo(latlng[0], latlng[1], currentMarker);
// Clear the search box value
document.getElementById('search-box').value = '';
// Hide the suggestions
document.getElementById('suggestions').style.display = 'none';
}
});
}
function fetchSuggestions(query) {
fetch(`https://nominatim.openstreetmap.org/search?format=json&q=${query}&limit=5`)
.then(response => response.json())
.then(data => {
var suggestions = document.getElementById('suggestions');
suggestions.innerHTML = '';
if (data.length > 0) {
suggestions.style.display = 'block';
var ul = document.createElement('ul');
data.forEach(function (result) {
var li = document.createElement('li');
li.textContent = result.display_name;
li.dataset.latlng = JSON.stringify([result.lat, result.lon]);
ul.appendChild(li);
});
suggestions.appendChild(ul);
} else {
suggestions.style.display = 'none';
}
})
.catch(error => console.error('Error fetching suggestions:', error));
}
function fetchLocationInfo(lat, lng, marker) {
fetch(`https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat=${lat}&lon=${lng}`)
.then(response => response.json())
.then(data => {
const zoneMatch = data.display_name.match(/Zone (\d+)/);
const divisionMatch = data.display_name.match(/Division (\d+)/);
const wardMatch = data.display_name.match(/Ward (\d+)/);
const zone = zoneMatch ? `Zone: ${zoneMatch[1]}` : '';
const division = divisionMatch ? `Division: ${divisionMatch[1]}` : '';
const ward = wardMatch ? `Ward: ${wardMatch[1]}` : '';
const firstCommaIndex = data.display_name.indexOf(',');
const address = firstCommaIndex !== -1
? `Address: ${data.display_name.substring(firstCommaIndex + 1).trim()}`
: '';
const place1 = firstCommaIndex !== -1
? `Place: ${data.display_name.substring(0, firstCommaIndex).trim()}`
: `Place: ${data.display_name.trim()}`;
const place2 = firstCommaIndex !== -1
? data.display_name.substring(0, firstCommaIndex).trim()
: data.display_name.trim();
document.getElementById('street').value = place2;
let result = `${place1}<br>Latitude: ${lat}<br>Longitude: ${lng}<br>${address}`;
if (zone) {
result += `<br>${zone}`;
}
if (division) {
result += `<br>${division}`;
}
if (ward) {
result += `<br>${ward}`;
}
marker.bindTooltip(result, {permanent: false, direction: 'top'}).openTooltip();
})
.catch(error => console.error('Error fetching location data:', error));
}
document.addEventListener('DOMContentLoaded', function () {
setTimeout(initializeMap, 2000); // Delay map initialization by 2000 milliseconds (2 seconds)
});
</script>
</body>
</html>

160
src/main/resources/templates/staff/appoinment.html

@ -0,0 +1,160 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Appoinment</title>
<!-- Google Font -->
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap" rel="stylesheet">
<!-- Bootstrap CSS -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
<!-- Include Font Awesome -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" rel="stylesheet">
<style>
label {
font-weight: 700;
color: #2d5263;
}
</style>
</head>
<body>
<div class="row align-items-center justify-content-center"
style="color: white;background-color:#414f69 ;padding: 10px;">
<h3 class="title resizable-content">Appoinment</h3>
</div>
<div class="container mt-4">
<div class="mt-1">
</div>
<!-- Card Section -->
<div class="card p-3 resizable-content" style="margin-bottom: 8px;color: #414f69;">
<!-- Add the resizable-content class to the card sections -->
<div class="card mb-3 resizable-content">
<div class="card-body">
<div class="row">
<div class="col-md-6">
<label>Order :</label>
<select class="form-control">
<option value="0">Select Order</option>
<option value="1">Order 1</option>
<option value="2">Order 2</option>
</select>
</div>
<div class="col-md-6">
<label>Zone:</label>
<select class="form-control">
<option value="0">Select Zone</option>
<option value="1">Zone 1</option>
<option value="2">Zone 2</option>
</select>
</div>
<div class="col-md-6">
<label>Order Title:</label>
<select class="form-control">
<option value="0">Select Qualification</option>
<option value="1">B.E</option>
<option value="2">Bcom</option>
</select>
</div>
<div class="col-md-6">
<label>Ward:</label>
<select class="form-control">
<option value="0">Select Ward</option>
<option value="1">Ward 1</option>
<option value="2">Ward 2</option>
</select>
</div>
<div class="col-md-6">
<label>Deaprtment:</label>
<select class="form-control">
<option value="0">Select Deaprtment</option>
<option value="1">Deaprtment 1</option>
<option value="2">Deaprtment 2</option>
</select>
</div>
<div class="col-md-6">
<label>Supervisor:</label>
<select class="form-control">
<option value="0">Select Supervisor</option>
<option value="1">Supervisor 1</option>
<option value="2">Supervisor 2</option>
</select>
</div>
<div class="col-md-6">
<label>Scheme Group:</label>
<select class="form-control">
<option value="0">Select Scheme Group</option>
<option value="1">Group 1</option>
<option value="2">Group 2</option>
</select>
</div>
<div class="col-md-6">
<label>Add Staff:</label>
<select class="form-control">
<option value="0">Select Option</option>
<option value="1"> 1</option>
<option value="2"> 2</option>
</select>
</div>
<div class="col-md-6">
<label>Date Of Appoinment:</label>
<input type="date" class="form-control" value="">
</div>
</div>
</div>
</div>
<button class="btn btn-sm" style="background-color: #414f69; color: white;" id="createorder">Create
Appoinment</button>
</div>
</div>
<!-- Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<!-- JavaScript to handle button clicks -->
<script>
$(document).ready(function () {
$('#createorder').click(function () {
Swal.fire({
title: 'Success!',
text: 'Appoinment Created Successfully',
icon: 'success',
confirmButtonText: 'OK',
background: '#f5f5f5',
confirmButtonColor: '#414f69'
});
});
});
</script>
</body>
</html>

251
src/main/resources/templates/staff/appoinmentscreen.html

@ -0,0 +1,251 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Appoinment Screen</title>
<!-- Google Font -->
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap" rel="stylesheet">
<!-- Bootstrap CSS -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
<!-- Include Font Awesome -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" rel="stylesheet">
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
<style>
label {
font-weight: 700;
color: #2d5263;
}
/*for radio button style*/
.radio-group {
display: flex;
align-items: center;
/* Ensures all items are aligned to the center */
}
.radio-item {
display: flex;
align-items: center;
margin-right: 20px;
/* Adds space between each radio item */
}
.radio-item input[type="radio"] {
margin-right: 10px;
/* Adds space between the radio button and its label */
vertical-align: middle;
/* Ensures vertical alignment */
}
.radio-item label {
margin: 0;
/* Removes any default margins that might affect alignment */
}
/*for check box*/
.checkbox-label {
display: block;
margin-bottom: 10px;
font-size: 16px;
}
/*for file uploading*/
.custom-file-upload {
position: relative;
display: flex;
align-items: center;
border: 1px solid #d9dde4;
border-radius: 5px;
padding: 5px;
background-color: #f9fafb;
cursor: pointer;
margin-top: 5px;
}
.custom-file-upload input[type="file"] {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
opacity: 0;
cursor: pointer;
}
.custom-file-upload label {
display: flex;
justify-content: space-between;
width: 100%;
align-items: center;
}
.upload-icon i {
color: #a6adb5;
font-size: 18px;
}
.file-name {
margin-left: 10px;
color: #414f69;
font-size: 14px;
}
#upload-text {
color: #a7adb5;
}
.order-no {
font-size: 14px;
color: lightSkyBlue;
}
.user-icon {
margin-right: 5px;
color: #414f69;
}
</style>
</head>
<body>
<div class="row align-items-center justify-content-center" style="color: white;background-color:#414f69 ;padding: 10px;">
<h3 class="title resizable-content" >Appoinment Screen</h3>
</div>
<div class="container mt-4">
<!-- Card Section -->
<div class="card p-3 resizable-content" style="margin-bottom: 8px;color: #414f69;">
<!-- Add the resizable-content class to the card sections -->
<div class="card mb-3 resizable-content">
<div class="card-body">
<div class="row">
<div class="col-md-12">
<label>Select Order</label>
<select class="form-control">
<option value="0">Select Order</option>
<option value="1">Order 1</option>
<option value="2">Order 2</option>
</select>
</div>
</div>
</div>
</div>
<div class="card mb-3 resizable-content">
<div class="card-body">
<div class="row" style="font-weight: bolder;">
<div class="col-md-6">
<label >Order No: 166565</label>
</div>
</div>
<div class="row" style="font-weight: bolder;">
<div class="col-md-6">
<p class="order-no">16 June 2024</p>
</div>
<div class="col-md-6">
<p><i class="fas fa-user user-icon"></i>85/100</p>
</div>
</div>
<div class="row" >
<div class="col-md-6">
<label>Order Type:</label>
</div>
</div>
<div class="row">
<div class="col-md-6" style="font-weight: bolder;">
<p class="order-no">Order Description Long text</p>
</div>
</div>
</div>
</div>
<div class="card mb-3 resizable-content">
<div class="card-body">
<div class="row">
<div class="col-md-12">
<label>Assign Staff</label>
<select class="form-control">
<option value="0">Select Staff</option>
<option value="1">staff 1</option>
<option value="2">staff 2</option>
</select>
</div>
<br><br>
<div class="col-md-12" style="padding: 14px;">
<input type="text" class="form-control" value="" placeholder="Enter the Staff Name...">
<br>
<input type="text" class="form-control" value="" placeholder="Enter the Staff Name...">
</div>
<br>
<div class="col-md-12">
<label>Date Of Appoinment</label>
<input type="date" class="form-control" value="">
</div>
</div>
</div>
</div>
<button class="btn btn-sm" style="background-color: #414f69; color: white;" id="addAppointmentBtn">Add Appointment</button>
</div>
</div>
<!-- Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<!-- JavaScript to handle button clicks -->
<script>
$(document).ready(function () {
$('#addAppointmentBtn').click(function () {
Swal.fire({
title: 'Success!',
text: 'Your appointment has been added',
icon: 'success',
confirmButtonText: 'OK',
background: '#f5f5f5',
confirmButtonColor: '#414f69'
});
});
});
</script>
</body>
</html>

177
src/main/resources/templates/staff/createorder.html

@ -0,0 +1,177 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Create Order</title>
<!-- Google Font -->
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap" rel="stylesheet">
<!-- Bootstrap CSS -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
<!-- Include Font Awesome -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" rel="stylesheet">
<style>
label {
font-weight: 700;
color: #2d5263;
}
/*for uploading fields*/
.custom-file-upload {
position: relative;
display: flex;
align-items: center;
border: 1px solid #d9dde4;
border-radius: 5px;
padding: 5px;
background-color: #f9fafb;
cursor: pointer;
margin-top: 5px;
}
.custom-file-upload input[type="file"] {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
opacity: 0;
cursor: pointer;
}
.custom-file-upload label {
display: flex;
justify-content: space-between;
width: 100%;
align-items: center;
}
.upload-text {
color: #a6adb5;
font-weight: 700;
}
.upload-icon i {
color: #a6adb5;
font-size: 18px;
}
.file-name {
margin-left: 10px;
color: #414f69;
font-size: 14px;
}
</style>
</head>
<body>
<div class="row align-items-center justify-content-center" style="color: white;background-color:#414f69 ;padding: 10px;">
<h3 class="title resizable-content" >Create Order</h3>
</div>
<div class="container mt-4">
<div class="mt-1">
</div>
<!-- Card Section -->
<div class="card p-3 resizable-content" style="margin-bottom: 8px;color: #414f69;">
<!-- Add the resizable-content class to the card sections -->
<div class="card mb-3 resizable-content">
<div class="card-header text-white" style="background-color: #414f69;">Order Details
</div>
<div class="card-body">
<div class="row">
<div class="col-md-6">
<label>Order Number:</label>
<input type="text" class="form-control" value="" placeholder="Enter Order Number">
</div>
<div class="col-md-6">
<label>Order Date:</label>
<input type="date" class="form-control" value="">
</div>
<div class="col-md-6">
<label>Order Title:</label>
<input type="email" class="form-control" value="" placeholder="Enter Order Title">
</div>
<div class="col-md-6">
<label>Number Of Staff Required:</label>
<input type="number" class="form-control" value="" placeholder="Enter Staff Required...">
</div>
<div class="col-md-6">
<label>Order Description:</label>
<textarea class="form-control" id="details" rows="3" placeholder="description..."
maxlength="400"></textarea>
</div>
<div class="col-md-6">
<label>Order Document:</label>
<div class="custom-file-upload">
<input type="file" id="file-upload" class="form-control" onchange="displayFileName()">
<label for="file-upload" id="file-label">
<span class="upload-text" id="upload-text">Upload Order Document</span>
<span class="upload-icon">
<i class="fas fa-file-upload"></i>
</span>
</label>
<span id="file-name" class="file-name"></span>
</div>
</div>
</div>
</div>
</div>
<button class="btn btn-sm" style="background-color: #414f69; color: white;" id="createorder">Create Order</button>
</div>
</div>
<!-- Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<!-- JavaScript to handle button clicks -->
<script>
function displayFileName() {
const fileInput = document.getElementById('file-upload');
const fileNameSpan = document.getElementById('file-name');
const fileName = fileInput.files[0].name;
fileNameSpan.textContent = fileName;
}
$(document).ready(function () {
$('#createorder').click(function () {
Swal.fire({
title: 'Success!',
text: 'Order Created Successfully',
icon: 'success',
confirmButtonText: 'OK',
background: '#f5f5f5',
confirmButtonColor: '#414f69'
});
});
});
</script>
</body>
</html>

109
src/main/resources/templates/staff/schemegroup.html

@ -0,0 +1,109 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Scheme Group</title>
<!-- Google Font -->
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap" rel="stylesheet">
<!-- Bootstrap CSS -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
<!-- Include Font Awesome -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" rel="stylesheet">
<style>
label {
font-weight: 700;
color: #2d5263;
}
</style>
</head>
<body>
<div class="row align-items-center justify-content-center"
style="color: white;background-color:#414f69 ;padding: 10px;">
<h3 class="title resizable-content">Add Scheme Group</h3>
</div>
<div class="container mt-4">
<div class="mt-1">
</div>
<!-- Card Section -->
<div class="card p-3 resizable-content" style="margin-bottom: 8px;color: #414f69;">
<!-- Add the resizable-content class to the card sections -->
<div class="card mb-3 resizable-content">
<div class="card-body">
<div class="row">
<div class="col-md-6">
<label>Scheme Group Name:</label>
<input type="text" class="form-control" value="" placeholder="Enter Scheme Group Name">
</div>
<div class="col-md-6">
<label>Scheme Group Id:</label>
<input type="text" class="form-control" value="" placeholder="Enter Scheme Group Id">
</div>
<div class="col-md-6">
<label>Incharge Name:</label>
<input type="text" class="form-control" value="" placeholder="Enter Incharge Name">
</div>
<div class="col-md-6">
<label>Incharge Phone Number:</label>
<input type="text" class="form-control" value="" placeholder="Enter Incharge Phone Number">
</div>
</div>
</div>
</div>
<button class="btn btn-sm" style="background-color: #414f69; color: white;" id="createorder">Create
Group</button>
</div>
</div>
<!-- Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<!-- JavaScript to handle button clicks -->
<script>
$(document).ready(function () {
$('#createorder').click(function () {
Swal.fire({
title: 'Success!',
text: 'Group Created Successfully',
icon: 'success',
confirmButtonText: 'OK',
background: '#f5f5f5',
confirmButtonColor: '#414f69'
});
});
});
</script>
</body>
</html>

316
src/main/resources/templates/staff/staffenrollment.html

@ -0,0 +1,316 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Staff Enrollment</title>
<!-- Google Font -->
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap" rel="stylesheet">
<!-- Bootstrap CSS -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
<!-- Include Font Awesome -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" rel="stylesheet">
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
<style>
label {
font-weight: 700;
color: #2d5263;
}
/*for radio button style*/
.radio-group {
display: flex;
align-items: center;
/* Ensures all items are aligned to the center */
}
.radio-item {
display: flex;
align-items: center;
margin-right: 20px;
/* Adds space between each radio item */
}
.radio-item input[type="radio"] {
margin-right: 10px;
/* Adds space between the radio button and its label */
vertical-align: middle;
/* Ensures vertical alignment */
}
.radio-item label {
margin: 0;
/* Removes any default margins that might affect alignment */
}
/*for check box*/
.checkbox-label {
display: block;
margin-bottom: 10px;
font-size: 16px;
}
/*for file uploading*/
.custom-file-upload {
position: relative;
display: flex;
align-items: center;
border: 1px solid #d9dde4;
border-radius: 5px;
padding: 5px;
background-color: #f9fafb;
cursor: pointer;
margin-top: 5px;
}
.custom-file-upload input[type="file"] {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
opacity: 0;
cursor: pointer;
}
.custom-file-upload label {
display: flex;
justify-content: space-between;
width: 100%;
align-items: center;
}
.upload-icon i {
color: #a6adb5;
font-size: 18px;
}
.file-name {
margin-left: 10px;
color: #414f69;
font-size: 14px;
}
#upload-text {
color: #a7adb5;
}
</style>
</head>
<body>
<div class="row align-items-center justify-content-center"
style="color: white;background-color:#414f69 ;padding: 10px;">
<h3 class="title resizable-content">Staff Enrollment</h3>
</div>
<div class="container mt-4">
<!-- Card Section -->
<div class="card p-3 resizable-content" style="margin-bottom: 8px;color: #414f69;">
<!-- Add the resizable-content class to the card sections -->
<div class="card mb-3 resizable-content">
<div class="card-header text-white" style="background-color: #414f69;">Personal Information's
</div>
<div class="card-body">
<div class="row">
<div class="col-md-6">
<label>Name:</label>
<input type="text" class="form-control" value="" placeholder="Enter Name...">
</div>
<div class="col-md-6">
<label>Phone number:</label>
<input type="number" class="form-control" value="" placeholder="Enter the Phone Number...">
</div>
<div class="col-md-6">
<label>Gender:</label>
<div class="radio-group">
<div class="radio-item">
<input type="radio" id="male" name="gender" value="male" checked>
<label for="male">Male</label>
</div>
<div class="radio-item">
<input type="radio" id="female" name="gender" value="female">
<label for="female">Female</label>
</div>
<div class="radio-item">
<input type="radio" id="transgender" name="gender" value="transgender">
<label for="transgender">Transgender</label>
</div>
</div>
</div>
<div class="col-md-6">
<label>Date Of Birth:</label>
<input type="date" class="form-control" value="" placeholder="">
</div>
<div class="col-md-6">
<label>Education Qualification</label>
<select class="form-control">
<option value="0">Select Qualification</option>
<option value="1">B.E</option>
<option value="2">Bcom</option>
</select>
</div>
<div class="col-md-6">
<label>Scheme Group:</label>
<select class="form-control">
<option value="0">Select Scheme Group</option>
<option value="1"> Scheme Group 1</option>
<option value="2"> Scheme Group 2</option>
</select>
</div>
<div class="col-md-12">
<label>Additional Skills:</label>
<div class="row">
<div class="col-md-3">
<div class="form-check checkbox-label">
<input class="form-check-input" type="checkbox" id="typeing" name="skills"
value="typeing">
<label class="form-check-label" for="typeing">
Typing
</label>
</div>
</div>
<div class="col-md-3">
<div class="form-check checkbox-label">
<input class="form-check-input" type="checkbox" id="shortHand" name="skills"
value="shortHand">
<label class="form-check-label" for="shortHand">
ShortHand
</label>
</div>
</div>
<div class="col-md-3">
<div class="form-check checkbox-label">
<input class="form-check-input" type="checkbox" id="dataentry" name="skills"
value="dataentry">
<label class="form-check-label" for="dataentry">
DataEntry
</label>
</div>
</div>
<div class="col-md-3">
<div class="form-check checkbox-label">
<input class="form-check-input" type="checkbox" id="others" name="skills"
value="others">
<label class="form-check-label" for="others">
Others
</label>
</div>
</div>
</div>
</div>
<div class="col-md-12">
<label>Proof Documents:</label>
<div class="row">
<!-- First File Upload -->
<div class="col-md-6">
<div class="custom-file-upload">
<input type="file" id="file-upload-1" class="form-control"
onchange="displayFileName('file-upload-1', 'file-name-1')">
<label for="file-upload-1" id="file-label-1">
<span class="upload-text" id="upload-text">Upload Aadhar Card</span>
<span class="upload-icon">
<i class="fas fa-file-upload"></i>
</span>
</label>
<span id="file-name-1" class="file-name"></span>
</div>
</div>
<!-- Second File Upload -->
<div class="col-md-6">
<div class="custom-file-upload">
<input type="file" id="file-upload-2" class="form-control"
onchange="displayFileName('file-upload-2', 'file-name-2')">
<label for="file-upload-2" id="file-label-2">
<span class="upload-text" id="upload-text">Upload Bank Passbook</span>
<span class="upload-icon">
<i class="fas fa-file-upload"></i>
</span>
</label>
<span id="file-name-2" class="file-name"></span>
</div>
</div>
<!-- Third File Upload -->
<div class="col-md-6">
<div class="custom-file-upload">
<input type="file" id="file-upload-3" class="form-control"
onchange="displayFileName('file-upload-3', 'file-name-3')">
<label for="file-upload-3" id="file-label-3">
<span class="upload-text" id="upload-text">Upload Ration Casd</span>
<span class="upload-icon">
<i class="fas fa-file-upload"></i>
</span>
</label>
<span id="file-name-3" class="file-name"></span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<button class="btn btn-sm" style="background-color: #414f69;color: white;" id="staffenroll">Enroll
Staff</button>
</div>
</div>
<!-- Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<!-- JavaScript to handle button clicks -->
<script>
function displayFileName(inputId, outputId) {
const fileInput = document.getElementById(inputId);
const fileNameSpan = document.getElementById(outputId);
const fileName = fileInput.files[0]?.name || 'No file chosen';
fileNameSpan.textContent = fileName;
}
$(document).ready(function () {
$('#staffenroll').click(function () {
Swal.fire({
title: 'Success!',
text: 'Staff Enrolled Successfully',
icon: 'success',
confirmButtonText: 'OK',
background: '#f5f5f5',
confirmButtonColor: '#414f69'
});
});
});
</script>
</body>
</html>

13
src/test/java/com/gcc/publicgrievance/PublicgrievanceApplicationTests.java

@ -0,0 +1,13 @@
package com.gcc.publicgrievance;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class PublicgrievanceApplicationTests {
@Test
void contextLoads() {
}
}

BIN
uploads/1724728439636_gcc1.png

After

Width: 325  |  Height: 435  |  Size: 204 KiB

Loading…
Cancel
Save