Commit e2c62fcb authored by ksankar's avatar ksankar

BCP base code

parents
Pipeline #1836 failed with stages
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**
!**/src/test/**
### 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/
### VS Code ###
.vscode/
FROM ubuntu
FROM node:10.15.3
RUN apt-get update -y
RUN apt-get install curl -y
RUN apt-get install sudo -y
RUN apt-get install build-essential -y -y
RUN apt-get install libx11-dev libxkbfile-dev -y
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN sudo apt install --no-install-recommends yarn -y
RUN apt-get install git -y
RUN apt-get install apt-transport-https ca-certificates
RUN apt-get update -y
RUN apt-get install -y g++ gcc make python2.7 pkg-config libx11-dev libxkbfile-dev
RUN apt-get install python2.7
WORKDIR /workspace
RUN git clone https://pg-gitlab.altimetrik.com/BCP/bcp.git
WORKDIR ../theiaApp
RUN git clone https://github.com/eclipse-theia/theia
WORKDIR theia
RUN ls
RUN yarn
WORKDIR examples/browser/
RUN ls
ENTRYPOINT [ "yarn", "run", "start", "/workspace/bcp", "--port=9000", "--hostname=0.0.0.0"]
localhost:8080/account/getAllAccounts
localhost:8080/bcm/addDilyStatus ----> for submit button
localhost:8080/bcm/leader/getLeader/{accountId}
localhost:8080/location/getAllLocation
localhost:8080/project/getProject/{accountId}
Rquest payload for submit action
Date date;
int locationId;
int accountId;
int leaderId;
int projectId;
String status;
int teamSize;
int loogedCount;
String DeliveryOnTrack;
int targetPercentage;
int actualPercentage;
String milestone;
String deliveryChallenge;
String mitigationPlan;
String wfhChallenge;
String keyDeliverable;
import re
import os
import sys
POD_NAME = sys.argv[1];
NODE_PORT = sys.argv[2];
with open("dd.yml",'w') as f:
f.write(
'''
apiVersion: apps/v1
kind: Deployment
metadata:
name: ''' + POD_NAME + '''
labels:
app: ''' + POD_NAME + '''
spec:
replicas: 1
selector:
matchLabels:
app: ''' + POD_NAME + '''
template:
metadata:
labels:
app: ''' + POD_NAME + '''
spec:
containers:
- name: app
image: karthickas/bcpdashboard:latest
ports:
- containerPort: 9097
imagePullPolicy: Never
env:
- name: SPRING_DATASOURCE_URL
value: jdbc:mysql://bcp-mysql:3306/bcp?autoReconnect=true&useSSL=false
imagePullSecrets:
- name: regcred
---
apiVersion: v1
kind: Service
metadata:
name: ''' + POD_NAME + '''
spec:
selector:
app: ''' + POD_NAME + '''
ports:
- port: 9097
targetPort: 9097
nodePort: ''' + NODE_PORT + '''
type: NodePort
---
'''
)
\ No newline at end of file
import re
import os
import sys
GIT_REPO_URL = sys.argv[1];
with open("Dockerfile",'w') as f:
f.write(
'''
FROM theia_base_image
GIT_REPO_URL
GIT CLONE ''' + GIT_REPO_URL + '''
ADD Cloned_code target_path
EXPOSE 3000
ENTRYPOINT ["yarn", "start"]
'''
)
\ No newline at end of file
apiVersion: apps/v1
kind: Deployment
metadata:
name: bcpapp7
labels:
app: bcpapp7
spec:
replicas: 1
selector:
matchLabels:
app: bcpapp7
template:
metadata:
labels:
app: bcpapp7
spec:
containers:
- name: app
image: karthickas/bcpdashboard:latest
ports:
- containerPort: 9097
imagePullPolicy: Never
env:
- name: SPRING_DATASOURCE_URL
value: jdbc:mysql://bcp-mysql:3306/bcp?autoReconnect=true&useSSL=false
imagePullSecrets:
- name: regcred
---
apiVersion: v1
kind: Service
metadata:
name: bcpapp7
spec:
selector:
app: bcpapp7
ports:
- port: 9097
targetPort: 9097
nodePort: 30111
type: NodePort
---
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
name: theia-fis
labels:
app: theia-fis
spec:
selector:
matchLabels:
app: theia-fis
strategy:
type: Recreate
template:
metadata:
labels:
app: theia-fis
spec:
containers:
- image: theia_sample:latest
name: theia
ports:
- containerPort: 9000
name: theia
imagePullPolicy: IfNotPresent
---
apiVersion: v1
kind: Service
metadata:
name: theia-fis
spec:
selector:
app: theia-fis
ports:
- port: 9000
targetPort: 9000
nodePort: 30010
type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: ${POD_NAME}
labels:
app: ${POD_NAME}
spec:
replicas: 5
selector:
matchLabels:
app: ${POD_NAME}
template:
metadata:
labels:
app: ${POD_NAME}
spec:
containers:
- name: app
image: karthickas/bcpdashboard:latest
ports:
- containerPort: 9097
imagePullPolicy: IfNotPresent
env:
- name: SPRING_DATASOURCE_URL
value: jdbc:mysql://bcp-mysql:3306/bcp?autoReconnect=true&useSSL=false
---
apiVersion: v1
kind: Service
metadata:
name: ${POD_NAME}
spec:
selector:
app: ${POD_NAME}
ports:
- port: 9097
targetPort: 9097
nodePort: ${NODE_PORT}
type: NodePort
---
\ No newline at end of file
version: '3'
services:
bcp-mysql:
image: mysql:5.7
environment:
- MYSQL_ROOT_PASSWORD=password
- MYSQL_DATABASE=bcp
- MYSQL_USER=root
- MYSQL_PASSWORD=password
ports:
- 3307:3306
app:
build: .
ports:
- 9097:9097
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://bcp-mysql:3306/bcp?autoReconnect=true&useSSL=false
depends_on:
- bcp-mysql
\ No newline at end of file
This diff is collapsed.
@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 Maven Start Up Batch script
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir
@REM
@REM Optional ENV vars
@REM M2_HOME - location of maven2's installed home dir
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
@REM e.g. to debug Maven itself, use
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
@REM ----------------------------------------------------------------------------
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
@echo off
@REM set title of command window
title %0
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
@REM set %HOME% to equivalent of $HOME
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
:skipRcPre
@setlocal
set ERROR_CODE=0
@REM To isolate internal variables from possible post scripts, we use another setlocal
@setlocal
@REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome
echo.
echo Error: JAVA_HOME not found in your environment. >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto init
echo.
echo Error: JAVA_HOME is set to an invalid directory. >&2
echo JAVA_HOME = "%JAVA_HOME%" >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
@REM ==== END VALIDATION ====
:init
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
@REM Fallback to current working directory if not found.
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
set EXEC_DIR=%CD%
set WDIR=%EXEC_DIR%
:findBaseDir
IF EXIST "%WDIR%"\.mvn goto baseDirFound
cd ..
IF "%WDIR%"=="%CD%" goto baseDirNotFound
set WDIR=%CD%
goto findBaseDir
:baseDirFound
set MAVEN_PROJECTBASEDIR=%WDIR%
cd "%EXEC_DIR%"
goto endDetectBaseDir
:baseDirNotFound
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
cd "%EXEC_DIR%"
:endDetectBaseDir
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
@setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
:endReadAdditionalConfig
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
)
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
if exist %WRAPPER_JAR% (
if "%MVNW_VERBOSE%" == "true" (
echo Found %WRAPPER_JAR%
)
) else (
if not "%MVNW_REPOURL%" == "" (
SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
)
if "%MVNW_VERBOSE%" == "true" (
echo Couldn't find %WRAPPER_JAR%, downloading it ...
echo Downloading from: %DOWNLOAD_URL%
)
powershell -Command "&{"^
"$webclient = new-object System.Net.WebClient;"^
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
"}"^
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
"}"
if "%MVNW_VERBOSE%" == "true" (
echo Finished downloading %WRAPPER_JAR%
)
)
@REM End of extension
@REM Provide a "standardized" way to retrieve the CLI args that will
@REM work with both Windows and non-Windows executions.
set MAVEN_CMD_LINE_ARGS=%*
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
if ERRORLEVEL 1 goto error
goto end
:error
set ERROR_CODE=1
:end
@endlocal & set ERROR_CODE=%ERROR_CODE%
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
@REM check for post script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
:skipRcPost
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%" == "on" pause
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
exit /B %ERROR_CODE%
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
name: bcp-mysql
labels:
app: bcp-mysql
spec:
selector:
matchLabels:
app: bcp-mysql
strategy:
type: Recreate
template:
metadata:
labels:
app: bcp-mysql
spec:
containers:
- image: karthickas/mysql:5.7
name: mysql
env:
- name: MYSQL_ROOT_PASSWORD
value: password
- name: MYSQL_DATABASE
value: bcp
- name: MYSQL_USER
value: root
- name: MYSQL_PASSWORD
value: password
ports:
- containerPort: 3306
name: mysql
imagePullPolicy: Always
volumeMounts:
- name: mysql-persistent-storage
mountPath: /var/lib/mysql
volumes:
- name: mysql-persistent-storage
persistentVolumeClaim:
claimName: mysql-pv-claim
imagePullSecrets:
- name: regcred
---
apiVersion: v1
kind: Service
metadata:
name: bcp-mysql
spec:
selector:
app: bcp-mysql
ports:
- port: 3306
targetPort: 3306
type: ClusterIP
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mysql-pv-claim
labels:
app: bcp-mysql
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
\ No newline at end of file
<?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>2.2.2.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>com.altimetrik.bcp</groupId>
<artifactId>business-continuity-plan</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>business-continuity-plan</name>
<packaging>jar</packaging>
<description>Altimetrik Bcp</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jersey</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.ldap</groupId>
<artifactId>spring-ldap-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-ldap</artifactId>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.11</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.11</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<finalName>bcpdashboard</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
package com.altimetrik.bcp;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableAsync;
@SpringBootApplication
@EnableAsync
public class BusinessContinuityPlanApplication {
public static void main(String[] args) {
System.out.println("Java working!!!!!");
SpringApplication.run(BusinessContinuityPlanApplication.class, args);
}
}
package com.altimetrik.bcp.config;
import java.util.Properties;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Description;
import org.springframework.context.annotation.Import;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.mail.javamail.JavaMailSenderImpl;
import org.springframework.web.servlet.ViewResolver;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.thymeleaf.spring5.SpringTemplateEngine;
import org.thymeleaf.spring5.view.ThymeleafViewResolver;
import org.thymeleaf.templateresolver.ClassLoaderTemplateResolver;
import com.altimetrik.bcp.security.SecurityConfig;
@Configuration
@EnableWebMvc
@Import({ SecurityConfig.class })
public class BcpConfig implements WebMvcConfigurer {
@Value("${mail.username}")
private String userName;
@Value("${mail.password}")
private String password;
@Bean
@Description("Thymeleaf template resolver serving HTML 5")
public ClassLoaderTemplateResolver templateResolver() {
ClassLoaderTemplateResolver templateResolver = new ClassLoaderTemplateResolver();
templateResolver.setPrefix("templates/");
templateResolver.setCacheable(false);
templateResolver.setSuffix(".html");
templateResolver.setTemplateMode("HTML");
templateResolver.setCharacterEncoding("UTF-8");
return templateResolver;
}
@Bean
@Description("Thymeleaf template engine with Spring integration")
public SpringTemplateEngine templateEngine() {
SpringTemplateEngine templateEngine = new SpringTemplateEngine();
templateEngine.setTemplateResolver(templateResolver());
return templateEngine;
}
@Bean
@Description("Thymeleaf view resolver")
public ViewResolver viewResolver() {
ViewResolver viewResolver = new ThymeleafViewResolver();
/*viewResolver.setTemplateEngine(templateEngine());
viewResolver.setCharacterEncoding("UTF-8");*/
return viewResolver;
}
@Bean
public JavaMailSender getMailSender() {
JavaMailSenderImpl mailSender = new JavaMailSenderImpl();
mailSender.setHost("smtp.office365.com");
mailSender.setPort(587);
mailSender.setUsername(userName);
mailSender.setPassword(password);
Properties javaMailProperties = new Properties();
javaMailProperties.put("mail.smtp.starttls.enable", "true");
javaMailProperties.put("mail.smtp.auth", "true");
javaMailProperties.put("mail.transport.protocol", "smtp");
javaMailProperties.put("mail.debug", "true");
mailSender.setJavaMailProperties(javaMailProperties);
return mailSender;
}
@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("/").setViewName("index");
registry.addViewController("/dashboard").setViewName("dashboard");
registry.addViewController("/contact").setViewName("contact");
registry.addViewController("/attendance").setViewName("attendance");
registry.addViewController("/delivery").setViewName("delivery");
registry.addViewController("/logout").setViewName("logout");
}
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**").addResourceLocations("/resources/");
}
}
package com.altimetrik.bcp.config;
import java.util.List;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import com.altimetrik.bcp.util.BcpUtils;
@Configuration
@PropertySource("classpath:application.properties")
public class BcpPropertyConfig {
@Value("${bcp.attendance.upload.file.path}")
private String attendanceFilePath;
@Value("${bcp.attendance.skip.employee.ids}")
private List<String> attendanceSkipEmployeeIdsMatchList;
@Value("${bcp.attendance.skip.account.names}")
private List<String> attendanceSkipAccountNamesList;
@Value("${bcp.attendance.include.country.names}")
private List<String> attendanceAllowCountryNamesList;
public String getAttendanceFilePath() {
return attendanceFilePath;
}
public void setAttendanceFilePath(String attendanceFilePath) {
this.attendanceFilePath = attendanceFilePath;
}
public List<String> getAttendanceSkipEmployeeIdsMatchList() {
return BcpUtils.convertListOfStringToLowercase(attendanceSkipEmployeeIdsMatchList);
}
public void setAttendanceSkipEmployeeIdsMatchList(List<String> attendanceSkipEmployeeIdsMatchList) {
this.attendanceSkipEmployeeIdsMatchList = attendanceSkipEmployeeIdsMatchList;
}
public List<String> getAttendanceSkipAccountNamesList() {
return BcpUtils.convertListOfStringToLowercase(attendanceSkipAccountNamesList);
}
public void setAttendanceSkipAccountNamesList(List<String> attendanceSkipAccountNamesList) {
this.attendanceSkipAccountNamesList = attendanceSkipAccountNamesList;
}
public List<String> getAttendanceAllowCountryNamesList() {
return BcpUtils.convertListOfStringToLowercase(attendanceAllowCountryNamesList);
}
public void setAttendanceAllowCountryNamesList(List<String> attendanceAllowCountryNamesList) {
this.attendanceAllowCountryNamesList = attendanceAllowCountryNamesList;
}
}
package com.altimetrik.bcp.controller;
import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
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.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.altimetrik.bcp.dao.AccountRepo;
import com.altimetrik.bcp.dao.LocationRepo;
import com.altimetrik.bcp.entity.Account;
import com.altimetrik.bcp.entity.Leader;
import com.altimetrik.bcp.entity.Location;
import com.altimetrik.bcp.entity.Project;
import com.altimetrik.bcp.model.DeliveryInput;
import com.altimetrik.bcp.model.PlanDetailFormData;
import com.altimetrik.bcp.service.BCMService;
/**
*
* @author smehta
*
*/
@RestController
@CrossOrigin
@RequestMapping("/bcm")
public class BCMController {
@Autowired
private BCMService bcmService;
@Autowired
private AccountRepo accountRepo;
@Autowired
private LocationRepo locationRepo;
@Autowired
AccountRepo acRepo;
/*
* createProjectLocationAssociate
*/
@PostMapping(value = "/addDilyStatus")
public ResponseEntity<String> createDailyStatus(@RequestBody PlanDetailFormData formData) {
bcmService.createDilyStatus(formData);
return ResponseEntity.ok().body("success");
}
@GetMapping(value = "/getAllLocations")
public ResponseEntity<List<Location>> getAllLocation() {
List<Location> locationList = locationRepo.findAll();
return ResponseEntity.ok().body(locationList);
}
@GetMapping(value = "/getAllAccounts")
public ResponseEntity<List<Account>> getAllAccounts() {
List<Account> accountList = accountRepo.findAll();
return ResponseEntity.ok().body(accountList);
}
@GetMapping(value = "/getLocationAndLeader/{projectId}/{accountId}")
public ResponseEntity<DeliveryInput> getLeaderById(@PathVariable("projectId") int projectId,
@PathVariable("accountId") int accountId) {
DeliveryInput deliveryData = bcmService.getLocationAndLeader(projectId, accountId);
return ResponseEntity.ok().body(deliveryData);
}
@GetMapping(value = "/getProject/{accountId}")
public ResponseEntity<List<Project>> getProject(@PathVariable("accountId") int accountId) {
List<Project> projectList = bcmService.getProjectById(accountId);
return ResponseEntity.ok().body(projectList);
}
@GetMapping(value = "/getHistoryData")
public ResponseEntity<PlanDetailFormData> getHistory(@RequestParam("projectId") int projectId,
@RequestParam("fromDate") @DateTimeFormat(pattern="yyyy/MM/dd") Date fromDate) {
PlanDetailFormData planDetail = bcmService.getHistoryData(fromDate, projectId);
return ResponseEntity.ok().body(planDetail);
}
}
package com.altimetrik.bcp.controller;
import java.text.ParseException;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.altimetrik.bcp.model.AttendanceData;
import com.altimetrik.bcp.model.AttendanceType;
import com.altimetrik.bcp.model.DeliverySummary;
import com.altimetrik.bcp.model.PlanDetailFormData;
import com.altimetrik.bcp.service.BCMService;
import com.altimetrik.bcp.service.FileUploadService;
@RestController
@RequestMapping("/dashboard")
public class DashBoardController {
@Autowired
private BCMService bcmService;
@Autowired
private FileUploadService fileUploadService;
@GetMapping(value = "/getAttendence")
public ResponseEntity<Map<String, AttendanceData>> getAttendenceStatus(
@RequestParam("attendanceWise") String wiseType, @RequestParam("attdTypeValue") String typeValue,
@RequestParam("billingType") String billingStatus, @RequestParam("attdType") String type,
@RequestParam("fromDate") @DateTimeFormat(pattern = "yyyy/MM/dd") Date fromDate) {
Map<String, AttendanceData> attendenceMap = new TreeMap<>();
if (AttendanceType.ACCOUNT == AttendanceType.valueOf(wiseType)) {
attendenceMap = bcmService.getAttendanceByAccount(typeValue, billingStatus, type, fromDate);
} else {
attendenceMap = bcmService.getAttendanceByLocation(typeValue, billingStatus, type, fromDate);
}
return ResponseEntity.ok().body(attendenceMap);
}
@GetMapping(value = "/getAttendencePercent")
public ResponseEntity<Map<String, List<String>>> getAttendencePercent(
@RequestParam("attendanceWise") String wiseType, @RequestParam("attdTypeValue") String typeValue,
@RequestParam("billingType") String billingStatus, @RequestParam("attdType") String type,
@RequestParam("fromDate") @DateTimeFormat(pattern = "yyyy/MM/dd") Date fromDate) throws ParseException {
Map<String, List<String>> attendenceMap = new TreeMap<>();
attendenceMap = bcmService.getAttendancePercent(wiseType, typeValue, billingStatus, type, fromDate);
return ResponseEntity.ok().body(attendenceMap);
}
@GetMapping(value = "/getAccountNames")
public ResponseEntity<List<String>> getAccountNames(){
return ResponseEntity.ok().body(bcmService.getAccountNames());
}
@GetMapping(value = "/getClientLocations")
public ResponseEntity<List<String>> getClientLocations(){
return ResponseEntity.ok().body(bcmService.getClientLocations());
}
@GetMapping(value="/getDeliveryList")
public ResponseEntity<List<DeliverySummary>> getDeliverySummaryList(
@RequestParam("fromDate") @DateTimeFormat(pattern="yyyy/MM/dd") Date fromDate){
return ResponseEntity.ok().body(bcmService.getDeliverList(fromDate));
}
@GetMapping(value="getDeliveryByProject")
public ResponseEntity<List<PlanDetailFormData>> getDeliveryByProjectWise(@RequestParam("accountName")
String accountName, @RequestParam("status") String statusValue, @RequestParam("fromDate") @DateTimeFormat(pattern="yyyy/MM/dd") Date fromDate){
return ResponseEntity.ok().body(bcmService.getSummayByProject(accountName, fromDate, statusValue));
}
@PostMapping("/uploadFile")
public ResponseEntity<?> uploadFile(@RequestParam("uploadFile") MultipartFile file,@RequestParam("fileUploadType") String uploadFileType
,@RequestParam("uploadedBy") String uploadedBy){
try {
String uploadedFilePath = fileUploadService.storeFile(file,uploadFileType,uploadedBy);
if(uploadFileType.equals("Attendance")){
fileUploadService.readAttendanceFromExcel(uploadedFilePath);
} else if(uploadFileType.equals("Delivery")) {
//TODO :: delivery file upload impl
fileUploadService.readDailyStatusFromExcel(uploadedFilePath);
}
return ResponseEntity.ok("success");
} catch (Exception e) {
return ResponseEntity.badRequest().body(e.getLocalizedMessage());
}
}
}
\ No newline at end of file
package com.altimetrik.bcp.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.altimetrik.bcp.mail.MailService;
import com.altimetrik.bcp.model.Mail;
@RestController
@CrossOrigin
@RequestMapping("/mail")
public class MailController {
@Autowired
MailService mailService;
@PostMapping(value = "/sendEmail")
public ResponseEntity<String> createDailyStatus(@RequestBody Mail mail) {
mailService.sendEmail(mail);
return ResponseEntity.ok().body("success");
}
}
package com.altimetrik.bcp.controller;
import java.util.Date;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.altimetrik.bcp.entity.TodaySummary;
import com.altimetrik.bcp.model.TodaySummaryDto;
import com.altimetrik.bcp.service.BCMService;
@RestController
@CrossOrigin
@RequestMapping("/summary")
public class TodaySummaryController {
@Autowired
private BCMService bcmService;
@PostMapping(value = "/addTodaySummary")
public ResponseEntity<String> createDailyStatus(@RequestBody TodaySummaryDto formData) {
String status = bcmService.addTodaySummary(formData);
if(status.equals("no_access")){
return ResponseEntity.badRequest().body("Not allowed");
}
return ResponseEntity.ok().body("success");
}
@GetMapping(value = "/getTodaySummary")
public ResponseEntity<TodaySummary> getTodaySummary(
@RequestParam("fromDate") @DateTimeFormat(pattern = "MM/dd/yyyy") Date date) {
TodaySummary todaySummary = bcmService.getTodaySummary(date);
return ResponseEntity.ok().body(todaySummary);
}
}
package com.altimetrik.bcp.controller;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import com.altimetrik.bcp.dao.UserAccessRepo;
import com.altimetrik.bcp.entity.UserAccess;
@Controller
@Configuration
@EnableWebMvc
@RequestMapping
public class ViewController extends WebMvcConfigurerAdapter{
@Autowired
UserAccessRepo userAccessRepo;
@RequestMapping("/info")
public @ResponseBody String userInfo(Authentication authentication) {
String msg = "";
for (GrantedAuthority authority : authentication.getAuthorities()) {
String role = authority.getAuthority();
}
return msg;
}
@RequestMapping("/index")
public ModelAndView login() {
ModelAndView mav = new ModelAndView();
mav.setViewName("index");
return mav;
}
@RequestMapping("/dashboard")
public ModelAndView dashboard() {
ModelAndView mav = new ModelAndView();
mav.setViewName("dashboard");
return mav;
}
@RequestMapping("/attendance")
public ModelAndView attendance() {
ModelAndView mav = new ModelAndView();
mav.setViewName("attendance");
return mav;
}
@RequestMapping("/today_summary")
public ModelAndView getTodaySummary() {
ModelAndView mav = new ModelAndView();
mav.setViewName("today_summary");
return mav;
}
@RequestMapping("/file_upload")
public ModelAndView fileUpload() {
ModelAndView mav = new ModelAndView();
mav.setViewName("file_upload");
return mav;
}
@RequestMapping("/delivery")
public ModelAndView delivery() {
ModelAndView mav = new ModelAndView();
mav.setViewName("delivery");
return mav;
}
@RequestMapping("/contact")
public ModelAndView contact() {
ModelAndView mav = new ModelAndView();
mav.setViewName("contact");
return mav;
}
@RequestMapping("/person")
@ResponseBody
public ResponseEntity<?> getUser() {
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
String username = authentication.getName();
UserAccess access = userAccessRepo.getUserAccessByUserId(username);
System.out.println(access);
Map<String,String> map = new HashMap<>();
map.put("username",username);
map.put("isAdmin",access.isAdmin());
map.put("isManager",access.isManager());
map.put("haveAccessToSummary",access.haveAccessToAddSummary());
map.put("haveAccessToFileUpload",access.haveAccessToFileUpload());
map.put("status",access.getStatus());
return ResponseEntity.ok().body(map);
}
@RequestMapping(value="/logout", method = RequestMethod.GET)
public ModelAndView logoutPage (HttpServletRequest request, HttpServletResponse response) {
ModelAndView mav = new ModelAndView();
mav.setViewName("redirect:/");
return mav;
}
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler(
"/webjars/**",
"/img/**",
"/css/**",
"/js/**",
"/fonts/**")
.addResourceLocations(
"classpath:/META-INF/resources/webjars/",
"classpath:/templates/img/",
"classpath:/templates/css/",
"classpath:/templates/js/",
"classpath:/templates/fonts/");
}
}
package com.altimetrik.bcp.dao;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.altimetrik.bcp.entity.AccLocLeaderAssoc;
@Repository
public interface AccLocLeaderAssocrepo extends JpaRepository<AccLocLeaderAssoc, Integer> {
AccLocLeaderAssoc findTopByAccountIdAndLocationId(int accountId, int locationId);
}
package com.altimetrik.bcp.dao;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.altimetrik.bcp.entity.Account;
@Repository
public interface AccountRepo extends JpaRepository<Account, Integer> {
Account findByName(String name);
}
package com.altimetrik.bcp.dao;
import java.util.Date;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import com.altimetrik.bcp.entity.AttendanceStatus;
import com.altimetrik.bcp.model.AttendanceByAccount;
import com.altimetrik.bcp.model.AttendanceByLocation;
@Repository
public interface AttendanceRepo extends JpaRepository<AttendanceStatus, Integer>{
@Query(nativeQuery = true,value="SELECT DISTINCT a.account_name FROM attendance_status a WHERE a.account_name IS NOT NULL ORDER BY a.account_name ASC")
List<String> findDistinctAccountName();
@Query(nativeQuery = true,value="SELECT DISTINCT a.client_location FROM attendance_status a ORDER BY a.client_location ASC")
List<String> findDistinctClientLocation();
@Query(nativeQuery = true,value="SELECT DISTINCT a.client_location FROM attendance_status a where a.category = :category ORDER BY a.client_location ASC")
public List<String> findDistinctClientLocationByCategory(@Param("category") String category);
@Query(nativeQuery = true,value="SELECT DISTINCT a.account_name FROM attendance_status a where a.account_name IS NOT NULL AND a.category = :category ORDER BY a.account_name ASC")
public List<String> findDistinctAccountNameByCategory(@Param("category") String category);
@Query(nativeQuery = true, name = "findAllDataMapping")
public List<AttendanceByAccount> getAttendByAllAccounts(@Param("startDate") String startDate);
@Query(nativeQuery = true, name = "dataByLocationMapping")
public List<AttendanceByLocation> getAttendByLocation(@Param("startDate") String startDate);
@Query(nativeQuery = true, name = "getAttendanceByAccountName")
public AttendanceByAccount getAttendByParticularAccount(@Param("accountName") String accountName,@Param("startDate") String startDate);
@Query(nativeQuery = true, name = "getAttendanceByAccountNameAndAttdStatus")
public List<AttendanceByAccount> getAttendByAllAccountsAndAttdStatus(@Param("startDate") String startDate);
@Query(nativeQuery = true, name = "getAttendanceByLocationName")
public AttendanceByLocation getAttendByParticularLocation(@Param("clinetLocation") String clinetLocation,@Param("startDate") String startDate);
@Query(nativeQuery = true, name = "getAttendanceByLocationAndAttdStatus")
public List<AttendanceByLocation> getAttendByAllLocationsAndAttdStatus(/*@Param("attendanceStatus") String attendanceStatus,*/@Param("startDate") String startDate);
@Query(nativeQuery = true, name = "findAllAccountDataWithDateAndBillingStatus")
public List<AttendanceByAccount> getAttendByAllAccountsDateAndBillingStatus(@Param("category") String category,@Param("startDate") String startDate);
@Query(nativeQuery = true, name = "getAttendByParticularAccountWithCategory")
public AttendanceByAccount getAttendByParticularAccountWithCategory(@Param("accountName") String accountName,@Param("category") String category,@Param("startDate") String startDate);
@Query(nativeQuery = true, name = "getAttendByAllLocationsDateAndBillingStatus")
public List<AttendanceByLocation> getAttendByAllLocationsDateAndBillingStatus(@Param("category") String category,@Param("startDate") String startDate);
@Query(nativeQuery = true, name = "getAttendByLocationAndDateAndBillingStatus")
public AttendanceByLocation getAttendByLocationAndDateAndBillingStatus(@Param("clinetLocation") String clinetLocation,@Param("category") String category,@Param("startDate") String startDate);
public List<AttendanceStatus> getAttendanceStatusByAccountNameAndAttendanceDate(@Param("accountName") String accountName,@Param("startDate") Date startDate);
public List<AttendanceStatus> getAttendanceStatusByAttendanceStatusAndAttendanceDate(@Param("attendanceStatus") String attendanceStatus,@Param("startDate") Date startDate);
public List<AttendanceStatus> getAttendanceStatusByAccountNameAndAttendanceStatusAndAttendanceDate(@Param("accountName") String accountName,@Param("attendanceStatus") String attendanceStatus,@Param("startDate") Date startDate);
public List<AttendanceStatus> getAttendanceStatusByClinetLocationAndAttendanceDate(@Param("clinetLocation") String clinetLocation,@Param("startDate") Date startDate);
public List<AttendanceStatus> getAttendanceStatusByClinetLocationAndAttendanceStatusAndAttendanceDate(@Param("clinetLocation") String clinetLocation,@Param("attendanceStatus") String attendanceStatus,@Param("startDate") Date startDate);
public List<AttendanceStatus> getAttendanceStatusByClinetLocationAndCategoryAndAttendanceDate(@Param("clinetLocation") String clinetLocation,@Param("category") String category,@Param("startDate") Date startDate);
public List<AttendanceStatus> getAttendanceStatusByClinetLocationAndAttendanceStatusAndCategoryAndAttendanceDate(@Param("clinetLocation") String clinetLocation,@Param("attendanceStatus") String attendanceStatus,@Param("category") String category,@Param("startDate") Date startDate);
public List<AttendanceStatus> getAttendanceStatusByAttendanceStatusAndCategoryAndAttendanceDate(@Param("attendanceStatus") String attendanceStatus,@Param("category") String category,@Param("startDate") Date startDate);
public List<AttendanceStatus> getAttendanceStatusByAccountNameAndAttendanceStatusAndCategoryAndAttendanceDate(@Param("accountName") String accountName,@Param("attendanceStatus") String attendanceStatus,@Param("category") String category,@Param("startDate") Date startDate);
public List<AttendanceStatus> getAttendanceStatusByAccountNameAndCategoryAndAttendanceDate(@Param("accountName") String accountName,@Param("category") String category,@Param("startDate") Date startDate);
//@Query(nativeQuery = true,value="SELECT * FROM attendance_status a WHERE a.account_name IS NOT NULL AND a.attendance_status IN (:names) AND a.attendance_date = :date")
List<AttendanceStatus> getAttendanceStatusByAttendanceStatusInAndAttendanceDate(@Param("names")List<String> names,@Param("date") Date startDate);
//@Query(nativeQuery = true,value="SELECT * FROM attendance_status a WHERE a.account_name IS NOT NULL AND a.account_name = :accountName AND a.attendance_status IN (:names) AND a.attendance_date = :date")
List<AttendanceStatus> getAttendanceStatusByAccountNameAndAttendanceStatusInAndAttendanceDate(@Param("accountName") String accountName,@Param("names")List<String> names,@Param("date") Date startDate);
//@Query(nativeQuery = true,value="SELECT * FROM attendance_status a WHERE a.account_name IS NOT NULL AND a.attendance_status IN (:names) AND a.category = :category AND a.attendance_date = :date ")
List<AttendanceStatus> getAttendanceStatusByAttendanceStatusInAndCategoryAndAttendanceDate(@Param("names")List<String> names,@Param("category") String category,@Param("date") Date startDate);
//@Query(nativeQuery = true,value="SELECT * FROM attendance_status a WHERE a.account_name IS NOT NULL AND a.account_name = :accountName AND a.attendance_status IN (:names) AND a.category = :category AND a.attendance_date = :date ")
List<AttendanceStatus> getAttendanceStatusByAccountNameAndAttendanceStatusInAndCategoryAndAttendanceDate(@Param("accountName") String accountName,@Param("names")List<String> names,@Param("category") String category,@Param("date") Date startDate);
//@Query(nativeQuery = true,value="SELECT * FROM attendance_status a WHERE a.client_location = :clinetLocation AND a.attendance_status IN (:names) AND a.attendance_date = :date")
List<AttendanceStatus> getAttendanceStatusByClinetLocationAndAttendanceStatusInAndAttendanceDate(@Param("clinetLocation") String clinetLocation,@Param("names")List<String> names,@Param("date") Date startDate);
//@Query(nativeQuery = true,value="SELECT * FROM attendance_status a WHERE a.account_name IS NOT NULL AND a.client_location = :clinetLocation AND a.attendance_status IN (:names) AND a.category = :category AND a.attendance_date = :date ")
List<AttendanceStatus> getAttendanceStatusByClinetLocationAndAttendanceStatusInAndCategoryAndAttendanceDate(@Param("clinetLocation") String clinetLocation,@Param("names")List<String> names,@Param("category") String category,@Param("date") Date startDate);
@Transactional
@Modifying
//@Query(nativeQuery = true,value="DELETE FROM attendance_status a where a.attendance_date IN :dateLists")
Integer deleteAttendanceStatusByAttendanceDateIn(@Param("dateLists") List<Date> dateLists);
}
\ No newline at end of file
package com.altimetrik.bcp.dao;
import java.util.Date;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import com.altimetrik.bcp.entity.DailyStatus;
import com.altimetrik.bcp.entity.Project;
import com.altimetrik.bcp.model.DeliverySummary;
@Repository
public interface DailyStatusRepo extends JpaRepository<DailyStatus, Integer> {
DailyStatus findByDateAndProject(Date date, Project project);
@Query(nativeQuery = true, name="deliverySummaryByDateQuery")
List<DeliverySummary> findDeliverySummaryByDate(@Param("fromDate") String fromDate);
List<DailyStatus> findByDateAndStatusAndProjectIn(Date date, String status, List<Project> project);
List<DailyStatus> findByDateAndProjectInAndStatusIn(Date date, List<Project> project, List<String>statusList);
@Transactional
@Modifying(flushAutomatically=true)
Integer deleteDailyStatusByDateIn(List<Date> dateList);
}
\ No newline at end of file
package com.altimetrik.bcp.dao;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.altimetrik.bcp.entity.Leader;
@Repository
public interface LeaderRepo extends JpaRepository<Leader, Integer> {
}
package com.altimetrik.bcp.dao;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.altimetrik.bcp.entity.Location;
@Repository
public interface LocationRepo extends JpaRepository<Location, Integer> {
}
package com.altimetrik.bcp.dao;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.altimetrik.bcp.entity.Project;
@Repository
public interface ProjectRepo extends JpaRepository<Project, Integer> {
List<Project> findByAccountId(int accountId);
Project findByName(String name);
List<Project> findAllByName(String name);
}
package com.altimetrik.bcp.dao;
import java.util.Date;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
import com.altimetrik.bcp.entity.TodaySummary;
@Repository
public interface TodaySummaryRepo extends CrudRepository<TodaySummary, Integer> {
public TodaySummary getTodaySummaryByDate(Date date);
}
package com.altimetrik.bcp.dao;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
import com.altimetrik.bcp.entity.UserAccess;
@Repository
public interface UserAccessRepo extends CrudRepository<UserAccess, Integer> {
public UserAccess getUserAccessByUserId(String userId);
}
package com.altimetrik.bcp.entity;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@Entity
@Table(name = "acc_loc_leader_assoc")
public class AccLocLeaderAssoc {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;
@ManyToOne
private Leader leader;
@ManyToOne
private Location location;
@ManyToOne
private Account account;
@ManyToOne
private Project project;
public Project getProject() {
return project;
}
public void setProject(Project project) {
this.project = project;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public Leader getLeader() {
return leader;
}
public void setLeader(Leader leader) {
this.leader = leader;
}
public Location getLocation() {
return location;
}
public void setLocation(Location location) {
this.location = location;
}
public Account getAccount() {
return account;
}
public void setAccount(Account account) {
this.account = account;
}
}
package com.altimetrik.bcp.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name = "account")
public class Account {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;
@Column(name = "name")
private String name;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public String toString() {
return "Account [id=" + id + ", name=" + name + "]";
}
}
This diff is collapsed.
package com.altimetrik.bcp.entity;
import java.util.*;
import javax.persistence.Column;
import javax.persistence.ColumnResult;
import javax.persistence.ConstructorResult;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.NamedNativeQuery;
import javax.persistence.SqlResultSetMapping;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import com.altimetrik.bcp.model.AttendanceByAccount;
import com.altimetrik.bcp.model.AttendanceByLocation;
import com.altimetrik.bcp.model.DeliverySummary;
import com.altimetrik.bcp.util.MysqlQueryConstants;
import com.fasterxml.jackson.annotation.JsonFormat;
@Entity
@SqlResultSetMapping(
name = "deliveryMapping",
classes = @ConstructorResult(
targetClass = DeliverySummary.class,
columns = {
@ColumnResult(name = "total",type=Integer.class),
@ColumnResult(name = "account",type=String.class),
@ColumnResult(name = "redCount",type=Integer.class),
@ColumnResult(name = "amberCount",type=Integer.class),
@ColumnResult(name = "greenCount",type=Integer.class),
}
)
)
@Table(name = "daily_status")
@NamedNativeQuery(name = "deliverySummaryByDateQuery", resultSetMapping ="deliveryMapping",resultClass = DeliverySummary.class, query=MysqlQueryConstants.DELIVERY_SUMMARY_QUERY)
public class DailyStatus {
@Id
@GeneratedValue(strategy = GenerationType.AUTO,generator="native")
private int id;
@Temporal(TemporalType.DATE)
@JsonFormat(
shape = JsonFormat.Shape.STRING, pattern = "dd-MMM-yyyy", timezone = "IST", locale = "en_GB")
@Column(name = "date")
private Date date;
@Column(name = "team_size")
private Float teamSize;
@Column(name = "updates")
private String updates;
@ManyToOne
private Project project;
@Column(name = "location_id")
private int locationId;
@Column(name = "challenges")
private String challenges;
@Column(name = "team_logged")
private Float teamLogged;
@Column(name = "milestone")
private String milestone;
@Column(name = "status")
private String status;
@Column(name = "mitigation_plan")
private String mitigationPlan;
@Column(name = "deliverable_of_day")
private String deliverableOfDay;
@Column(name = "wfh_challenge")
private String wfhChallenge;
@Column(name = "wfh_mitigation_plan")
private String wfhMitigationPlan;
@Column(name = "hiring_update")
private String hiringUpdate;
@Column(name = "created_by")
private String createdBy;
@Column(name = "created_time")
private Date createdTime;
@Column(name = "updated_by")
private String updatedBy;
@Column(name = "updated_time")
private Date updatedTime;
@Column(name = "remarks")
private String remarks;
public String getRemarks() {
return remarks;
}
public void setRemarks(String remarks) {
this.remarks = remarks;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public Project getProject() {
return project;
}
public void setProjectId(Project project) {
this.project = project;
}
public int getLocationId() {
return locationId;
}
public void setLocationId(int locationId) {
this.locationId = locationId;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
public Float getTeamSize() {
return teamSize;
}
public void setTeamSize(Float teamSize) {
this.teamSize = teamSize;
}
public String getUpdates() {
return updates;
}
public void setUpdates(String updates) {
this.updates = updates;
}
public String getChallenges() {
return challenges;
}
public void setChallenges(String challenges) {
this.challenges = challenges;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public Date getCreatedTime() {
return createdTime;
}
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
}
public String getUpdatedBy() {
return updatedBy;
}
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
public Date getUpdatedTime() {
return updatedTime;
}
public void setUpdatedTime(Date updatedTime) {
this.updatedTime = updatedTime;
}
public String getMilestone() {
return milestone;
}
public void setMilestone(String milestone) {
this.milestone = milestone;
}
public String getMitigationPlan() {
return mitigationPlan;
}
public void setMitigationPlan(String mitigationPlan) {
this.mitigationPlan = mitigationPlan;
}
public String getDeliverableOfDay() {
return deliverableOfDay;
}
public void setDeliverableOfDay(String deliverableOfDay) {
this.deliverableOfDay = deliverableOfDay;
}
public String getWfhChallenge() {
return wfhChallenge;
}
public void setWfhChallenge(String wfhChallenge) {
this.wfhChallenge = wfhChallenge;
}
public String getWfhMitigationPlan() {
return wfhMitigationPlan;
}
public void setWfhMitigationPlan(String wfhMitigationPlan) {
this.wfhMitigationPlan = wfhMitigationPlan;
}
public String getHiringUpdate() {
return hiringUpdate;
}
public void setHiringUpdate(String hiringUpdate) {
this.hiringUpdate = hiringUpdate;
}
public Float getTeamLogged() {
return teamLogged;
}
public void setTeamLogged(Float teamLogged) {
this.teamLogged = teamLogged;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("DailyStatus [id=");
builder.append(id);
builder.append(", date=");
builder.append(date);
builder.append(", teamSize=");
builder.append(teamSize);
builder.append(", updates=");
builder.append(updates);
builder.append(", teamLogged=");
builder.append(teamLogged);
builder.append(", challenges=");
builder.append(challenges);
builder.append(", HiringUpdate=");
builder.append(hiringUpdate);
builder.append(", Project=");
builder.append(project);
builder.append(", createdBy=");
builder.append(createdBy);
builder.append(", createdTime=");
builder.append(createdTime);
builder.append(", updatedBy=");
builder.append(updatedBy);
builder.append(", updatedTime=");
builder.append(updatedTime);
builder.append(", project=");
return builder.toString();
}
}
package com.altimetrik.bcp.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name = "leader")
public class Leader {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;
@Column(name = "name")
private String name;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("Leader [id=");
builder.append(id);
builder.append(", name=");
builder.append(name);
builder.append("]");
return builder.toString();
}
}
package com.altimetrik.bcp.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name = "location")
public class Location {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;
@Column(name = "name")
private String name;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("Location [id=");
builder.append(id);
builder.append(", name=");
builder.append(name);
builder.append("]");
return builder.toString();
}
}
package com.altimetrik.bcp.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import org.hibernate.annotations.LazyToOne;
import org.hibernate.annotations.LazyToOneOption;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@Entity
public class Project {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;
@Column(name = "name")
private String name;
@ManyToOne(fetch=FetchType.LAZY)
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
private Account account;
@ManyToOne(fetch=FetchType.LAZY)
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
private Location location;
@Column(name="team_size")
private int teamSize;
public int getTeamSize() {
return teamSize;
}
public void setTeamSize(int teamSize) {
this.teamSize = teamSize;
}
public Location getLocation() {
return location;
}
public void setLocation(Location location) {
this.location = location;
}
public Account getAccount() {
return account;
}
public void setAccount(Account account) {
this.account = account;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("Project [id=");
builder.append(id);
builder.append(", name=");
builder.append(name);
builder.append(", projLocLeaderAssoc=");
builder.append(", dailyStatus=");
builder.append("]");
return builder.toString();
}
}
package com.altimetrik.bcp.entity;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import com.fasterxml.jackson.annotation.JsonFormat;
@Entity
@Table(name = "today_summary")
public class TodaySummary {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;
@Temporal(TemporalType.DATE)
@JsonFormat(
shape = JsonFormat.Shape.STRING, pattern = "MM/dd/yyyy", timezone = "IST", locale = "en_GB")
@Column(name = "date")
private Date date;
@Column(name = "summary")
private String summary;
@Column(name = "submitted_by")
private String submittedby;
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
public String getSummary() {
return summary;
}
public void setSummary(String summary) {
this.summary = summary;
}
public String getSubmittedby() {
return submittedby;
}
public void setSubmittedby(String submittedby) {
this.submittedby = submittedby;
}
@Override
public String toString() {
return "TodaySummary [date=" + date + ", summary=" + summary + ", submittedby=" + submittedby + "]";
}
}
package com.altimetrik.bcp.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name = "user_access")
public class UserAccess {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;
@Column(name = "user_id")
private String userId;
@Column(name = "is_manager")
private String isManager;
@Column(name = "is_admin")
private String isAdmin;
@Column(name = "access_to_summary")
private String haveAccessToAddSummary;
@Column(name = "access_to_uploadfile")
private String haveAccessToFileUpload;
@Column(name = "user_status")
private String status;
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String isManager() {
return isManager;
}
public void setIsManager(String isManager) {
this.isManager = isManager;
}
public String isAdmin() {
return isAdmin;
}
public void setIsAdmin(String isAdmin) {
this.isAdmin = isAdmin;
}
public String haveAccessToAddSummary() {
return haveAccessToAddSummary;
}
public void setHaveAccessToAddSummary(String haveAccessToAddSummary) {
this.haveAccessToAddSummary = haveAccessToAddSummary;
}
public String haveAccessToFileUpload() {
return haveAccessToFileUpload;
}
public void setHaveAccessToFileUpload(String haveAccessToFileUpload) {
this.haveAccessToFileUpload = haveAccessToFileUpload;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
@Override
public String toString() {
return "UserAccess [userId=" + userId + ", isManager=" + isManager + ", isAdmin=" + isAdmin
+ ", haveAccessToAddSummary=" + haveAccessToAddSummary + ", haveAccessToFileUpload="
+ haveAccessToFileUpload + ", status=" + status + "]";
}
}
package com.altimetrik.bcp.exception;
public class FileStorageException extends RuntimeException {
public FileStorageException(String message) {
super(message);
}
public FileStorageException(String message, Throwable cause) {
super(message, cause);
}
}
\ No newline at end of file
package com.altimetrik.bcp.mail;
import java.io.File;
import java.net.URL;
import javax.mail.MessagingException;
import javax.mail.internet.MimeMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.FileSystemResource;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.mail.javamail.MimeMessageHelper;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import com.altimetrik.bcp.model.Mail;
import com.altimetrik.bcp.util.AppConstants;
@Service
public class MailService {
@Autowired
JavaMailSender mailSender;
@Value("${mail.username}")
private String userName;
@Async
public void sendEmail(Mail mail) {
MimeMessage mimeMessage = mailSender.createMimeMessage();
ClassLoader classLoader = this.getClass().getClassLoader();
File file = new File(classLoader.getResource("templates/img/Logo.png").getFile());
try {
mail.setMailFrom(userName);
mail.setMailSubject(AppConstants.MAIL_SUBJECT_FOR_NOTIFY_ATTENDANCE_NOT_MARKED);
mail.setMailContent(AppConstants.MAIL_CONTENT_FOR_NOTIFY_ATTENDANCE_NOT_MARKED_1ST+mail.getName()+AppConstants.MAIL_CONTENT_FOR_NOTIFY_ATTENDANCE_NOT_MARKED_2ST);
MimeMessageHelper mimeMessageHelper = new MimeMessageHelper(mimeMessage, MimeMessageHelper.MULTIPART_MODE_RELATED,"UTF-8");
mimeMessageHelper.setSubject(mail.getMailSubject());
mimeMessageHelper.setFrom(mail.getMailFrom());
mimeMessageHelper.setTo(mail.getMailTo());
mimeMessageHelper.setText(mail.getMailContent(), true);
mimeMessageHelper.setPriority(1);
mimeMessageHelper.addInline("Logo.png", file);
mailSender.send(mimeMessageHelper.getMimeMessage());
} catch (MessagingException e) {
e.printStackTrace();
}
}
}
package com.altimetrik.bcp.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown=true)
public class AttendanceByAccount extends AttendanceCommon{
String account_name;
public AttendanceByAccount( String accountName, double total, double marked, double unMarked, double leaveCount/*, int leaveAppPend*/) {
this.total = total;
this.marked = marked;
this.unmarked = unMarked;
this.leave_count = leaveCount;
//this.leave_app_pend = leaveAppPend;
this.account_name = accountName;
}
public String getAccountName() {
return account_name;
}
public void setAccountName(String accountName) {
this.account_name = accountName;
}
@Override
public String toString() {
return "Attendance [total=" + total + ", marked=" + marked + ", unmarked=" + unmarked + ", leave_count="
+ leave_count + ", leave_app_pend=" + leave_app_pend + ", account_name=" + account_name + "]";
}
}
package com.altimetrik.bcp.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown=true)
public class AttendanceByLocation extends AttendanceCommon{
String client_location;
public String getClient_location() {
return client_location;
}
public void setClient_location(String client_location) {
this.client_location = client_location;
}
public AttendanceByLocation( String accountName, double total, double marked, double unMarked, double leaveCount/*, int leaveAppPend*/) {
this.total = total;
this.marked = marked;
this.unmarked = unMarked;
this.leave_count = leaveCount;
//this.leave_app_pend = leaveAppPend;
this.client_location = accountName;
}
@Override
public String toString() {
return "Attendance [total=" + total + ", marked=" + marked + ", unmarked=" + unmarked + ", leave_count="
+ leave_count + ", leave_app_pend=" + leave_app_pend + ", client_location=" + client_location + "]";
}
}
package com.altimetrik.bcp.model;
public class AttendanceCommon {
double total;
double marked;
double unmarked;
double leave_count;
double leave_app_pend;
public double getTotal() {
return total;
}
public void setTotal(double total) {
this.total = total;
}
public double getMarked() {
return marked;
}
public void setMarked(double marked) {
this.marked = marked;
}
public double getUnmarked() {
return unmarked;
}
public void setUnmarked(double unmarked) {
this.unmarked = unmarked;
}
public double getLeave_count() {
return leave_count;
}
public void setLeave_count(double leave_count) {
this.leave_count = leave_count;
}
public double getLeave_app_pend() {
return leave_app_pend;
}
public void setLeave_app_pend(double leave_app_pend) {
this.leave_app_pend = leave_app_pend;
}
}
package com.altimetrik.bcp.model;
import java.util.List;
import com.altimetrik.bcp.entity.AttendanceStatus;
public class AttendanceData {
double total;
double marked;
double unmarked;
double leave;
double leaveAppPending;
double marked_percent;
double unmarked_percent;
double leave_percent;
double leave_app_pend_percent;
int accountId;
String accountName;
String locationName;
List<AttendanceStatus> employeeDetails;
public String getLocationName() {
return locationName;
}
public void setLocationName(String locationName) {
this.locationName = locationName;
}
public String getAccountName() {
if(accountName != null)
return accountName.toUpperCase();
else
return accountName;
}
public void setAccountName(String accountName) {
this.accountName = accountName;
}
public double getTotal() {
return total;
}
public void setTotal(double total) {
this.total = total;
}
public double getMarked() {
return marked;
}
public void setMarked(double marked) {
this.marked = marked;
}
public double getUnmarked() {
return unmarked;
}
public void setUnmarked(double unmarked) {
this.unmarked = unmarked;
}
public double getLeave() {
return leave;
}
public void setLeave(double leave) {
this.leave = leave;
}
public double getMarked_percent() {
return marked_percent;
}
public void setMarked_percent(double marked_percent) {
this.marked_percent = marked_percent;
}
public double getUnmarked_percent() {
return unmarked_percent;
}
public void setUnmarked_percent(double unmarked_percent) {
this.unmarked_percent = unmarked_percent;
}
public double getLeave_percent() {
return leave_percent;
}
public void setLeave_percent(double leave_percent) {
this.leave_percent = leave_percent;
}
public double getLeave_app_pend_percent() {
return leave_app_pend_percent;
}
public void setLeave_app_pend_percent(double leave_app_pend_percent) {
this.leave_app_pend_percent = leave_app_pend_percent;
}
public int getAccountId() {
return accountId;
}
public void setAccountId(int accountId) {
this.accountId = accountId;
}
public double getLeaveAppPending() {
return leaveAppPending;
}
public void setLeaveAppPending(double leaveAppPending) {
this.leaveAppPending = leaveAppPending;
}
public List<AttendanceStatus> getEmployeeDetails() {
return employeeDetails;
}
public void setEmployeeDetails(List<AttendanceStatus> employeeDetails) {
this.employeeDetails = employeeDetails;
}
@Override
public String toString() {
return "AttendanceData [total=" + total + ", marked=" + marked + ", unmarked=" + unmarked + ", leave=" + leave
+ ", marked_percent=" + marked_percent + ", unmarked_percent=" + unmarked_percent + ", leave_percent="
+ leave_percent + ", accountId=" + accountId + ", accountName=" + accountName + ", locationName="
+ locationName + ", employeeDetails=" + employeeDetails + "]";
}
}
package com.altimetrik.bcp.model;
import com.fasterxml.jackson.annotation.JsonProperty;
public class AttendancePercent {
@JsonProperty("marked_percent")
private int marked_percent;
@JsonProperty("unmarked_percent")
private int unmarked_percent;
@JsonProperty("leave_percent")
private int leave_percent;
@JsonProperty("leave_app_pend_percent")
private int leave_app_pend_percent;
public int getMarked_percent() {
return marked_percent;
}
public void setMarked_percent(int marked_percent) {
this.marked_percent = marked_percent;
}
public int getUnmarked_percent() {
return unmarked_percent;
}
public void setUnmarked_percent(int unmarked_percent) {
this.unmarked_percent = unmarked_percent;
}
public int getLeave_percent() {
return leave_percent;
}
public void setLeave_percent(int leave_percent) {
this.leave_percent = leave_percent;
}
public int getLeave_app_pend_percent() {
return leave_app_pend_percent;
}
public void setLeave_app_pend_percent(int leave_app_pend_percent) {
this.leave_app_pend_percent = leave_app_pend_percent;
}
@Override
public String toString() {
return "AttendancePercent [marked_percent=" + marked_percent + ", unmarked_percent=" + unmarked_percent
+ ", leave_percent=" + leave_percent + ", leave_app_pend_percent=" + leave_app_pend_percent + "]";
}
}
package com.altimetrik.bcp.model;
public enum AttendanceType {
ACCOUNT,LOCATION
}
package com.altimetrik.bcp.model;
import com.altimetrik.bcp.entity.Leader;
import com.altimetrik.bcp.entity.Location;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
@JsonIgnoreProperties(ignoreUnknown=true)
public class DeliveryInput {
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
private Location location;
private Leader leader;
private int teamSize;
public int getTeamSize() {
return teamSize;
}
public void setTeamSize(int teamSize) {
this.teamSize = teamSize;
}
public Location getLocation() {
return location;
}
public void setLocation(Location location) {
this.location = location;
}
public Leader getLeader() {
return leader;
}
public void setLeader(Leader leader) {
this.leader = leader;
}
}
package com.altimetrik.bcp.model;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@JsonIgnoreProperties(ignoreUnknown=true)
public class DeliverySummary {
int total;
String account;
int redCount;
List<PlanDetailFormData> planList;
public DeliverySummary(int total, String account, int redCount, int amberCount, int greenCount) {
super();
this.total = total;
this.account = account;
this.redCount = redCount;
this.amberCount = amberCount;
this.greenCount = greenCount;
}
int amberCount;
int greenCount;
public int getTotal() {
return total;
}
public void setTotal(int total) {
this.total = total;
}
public String getAccount() {
return account;
}
public void setAccount(String account) {
this.account = account;
}
public int getRedCount() {
return redCount;
}
public void setRedCount(int redCount) {
this.redCount = redCount;
}
public int getAmberCount() {
return amberCount;
}
public void setAmberCount(int amberCount) {
this.amberCount = amberCount;
}
public int getGreenCount() {
return greenCount;
}
public void setGreenCount(int greenCount) {
this.greenCount = greenCount;
}
public List<PlanDetailFormData> getPlanList() {
return planList;
}
public void setPlanList(List<PlanDetailFormData> planList) {
this.planList = planList;
}
}
package com.altimetrik.bcp.model;
import org.springframework.stereotype.Service;
@Service
public class LoginService {
private String username;
private String password;
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("LoginService [username=");
builder.append(username);
builder.append(", password=");
builder.append(password);
builder.append("]");
return builder.toString();
}
}
package com.altimetrik.bcp.model;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonProperty;
public class Mail {
private String mailFrom;
@JsonProperty("mailTo")
private String mailTo;
@JsonProperty("mailUname")
private String name;
private String mailCc;
private String mailBcc;
private String mailSubject;
private String mailContent;
private String contentType;
private List<Object> attachments;
private Map<String, Object> model;
public String getMailFrom() {
return mailFrom;
}
public void setMailFrom(String mailFrom) {
this.mailFrom = mailFrom;
}
public String getMailTo() {
return mailTo;
}
public void setMailTo(String mailTo) {
this.mailTo = mailTo;
}
public String getMailCc() {
return mailCc;
}
public void setMailCc(String mailCc) {
this.mailCc = mailCc;
}
public String getMailBcc() {
return mailBcc;
}
public void setMailBcc(String mailBcc) {
this.mailBcc = mailBcc;
}
public String getMailSubject() {
return mailSubject;
}
public void setMailSubject(String mailSubject) {
this.mailSubject = mailSubject;
}
public String getMailContent() {
return mailContent;
}
public void setMailContent(String mailContent) {
this.mailContent = mailContent;
}
public String getContentType() {
return contentType;
}
public void setContentType(String contentType) {
this.contentType = contentType;
}
public List<Object> getAttachments() {
return attachments;
}
public void setAttachments(List<Object> attachments) {
this.attachments = attachments;
}
public Map<String, Object> getModel() {
return model;
}
public void setModel(Map<String, Object> model) {
this.model = model;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
package com.altimetrik.bcp.model;
public class Person {
private String name;
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
}
package com.altimetrik.bcp.model;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
public class PlanDetailFormData {
@JsonFormat(pattern="MM/dd/yyyy")
Date date;
int locationId;
int accountId;
int leaderId;
int projectId;
String status;
Float teamSize;
Float teamlogedCount;
String deliveryOnTrack;
int targetPercentage;
int actualPercentage;
String milestone;
String deliveryChallenge;
String wfhMitigationPlan;
String deliveryMitigationPlan;
String wfhChallenge;
String keyDeliverable;
String projectName;
String hiringUpdate;
String remarks;
public String getRemarks() {
return remarks;
}
public void setRemarks(String remarks) {
this.remarks = remarks;
}
public String getHiringUpdate() {
return hiringUpdate;
}
public void setHiringUpdate(String hiringupdate) {
this.hiringUpdate = hiringupdate;
}
public String getProjectName() {
return projectName;
}
public void setProjectName(String projectName) {
this.projectName = projectName;
}
public int getAccountId() {
return accountId;
}
public void setAccountId(int accountId) {
this.accountId = accountId;
}
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
public int getLocationId() {
return locationId;
}
public void setLocationId(int locationId) {
this.locationId = locationId;
}
public int getLeaderId() {
return leaderId;
}
public void setLeaderId(int leaderId) {
this.leaderId = leaderId;
}
public int getProjectId() {
return projectId;
}
public void setProjectId(int projectId) {
this.projectId = projectId;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public Float getTeamSize() {
return teamSize;
}
public void setTeamSize(Float teamSize) {
this.teamSize = teamSize;
}
public String getDeliveryOnTrack() {
return deliveryOnTrack;
}
public void setDeliveryOnTrack(String deliveryOnTrack) {
this.deliveryOnTrack = deliveryOnTrack;
}
public int getTargetPercentage() {
return targetPercentage;
}
public void setTargetPercentage(int targetPercentage) {
this.targetPercentage = targetPercentage;
}
public int getActualPercentage() {
return actualPercentage;
}
public void setActualPercentage(int actualPercentage) {
this.actualPercentage = actualPercentage;
}
public String getMilestone() {
return milestone;
}
public void setMilestone(String milestone) {
this.milestone = milestone;
}
public String getDeliveryChallenge() {
return deliveryChallenge;
}
public void setDeliveryChallenge(String deliveryChallenge) {
this.deliveryChallenge = deliveryChallenge;
}
public String getWfhChallenge() {
return wfhChallenge;
}
public void setWfhChallenge(String wfhChallenge) {
this.wfhChallenge = wfhChallenge;
}
public String getKeyDeliverable() {
return keyDeliverable;
}
public void setKeyDeliverable(String keyDeliverable) {
this.keyDeliverable = keyDeliverable;
}
public String getWfhMitigationPlan() {
return wfhMitigationPlan;
}
public void setWfhMitigationPlan(String wfhMitigationPlan) {
this.wfhMitigationPlan = wfhMitigationPlan;
}
public String getDeliveryMitigationPlan() {
return deliveryMitigationPlan;
}
public void setDeliveryMitigationPlan(String deliveryMitigationPlan) {
this.deliveryMitigationPlan = deliveryMitigationPlan;
}
public Float getTeamlogedCount() {
return teamlogedCount;
}
public void setTeamlogedCount(Float teamlogedCount) {
this.teamlogedCount = teamlogedCount;
}
}
package com.altimetrik.bcp.model;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
public class TodaySummaryDto {
@JsonFormat(pattern="MM/dd/yyyy")
@JsonProperty("date")
private Date date;
@JsonProperty("todaysummary")
private String todaySummary;
@JsonProperty("submittedby")
private String submittedby;
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
public String getTodaySummary() {
return todaySummary;
}
public void setTodaySummary(String todaySummary) {
this.todaySummary = todaySummary;
}
public String getSubmittedby() {
return submittedby;
}
public void setSubmittedby(String submittedby) {
this.submittedby = submittedby;
}
@Override
public String toString() {
return "TodaySummaryDto [date=" + date + ", todaySummary=" + todaySummary + ", submittedby=" + submittedby
+ "]";
}
}
package com.altimetrik.bcp.security;
import java.util.Collections;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.AuthenticationProvider;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.ldap.DefaultSpringSecurityContextSource;
import org.springframework.security.ldap.authentication.BindAuthenticator;
import org.springframework.security.ldap.authentication.LdapAuthenticationProvider;
import org.springframework.security.ldap.search.FilterBasedLdapUserSearch;
import org.springframework.security.ldap.search.LdapUserSearch;
import org.springframework.stereotype.Component;
import com.altimetrik.bcp.dao.UserAccessRepo;
import com.altimetrik.bcp.entity.UserAccess;
@Component
public class CustomAuthenticationProvider implements AuthenticationProvider {
@Autowired
UserAccessRepo userAccessRepo;
@Override
public Authentication authenticate(Authentication authentication) throws AuthenticationException {
DefaultSpringSecurityContextSource contextSource = new DefaultSpringSecurityContextSource(
"ldap://blr-pdc-00.altimetrik.com:389/dc=altimetrik,dc=com");
contextSource.setUserDn("BCPDasboard@altimetrik.com");
contextSource.setPassword("G9kEa3JY$");
contextSource.setReferral("follow");
try {
contextSource.afterPropertiesSet();
} catch (Exception e) {
throw new BadCredentialsException("ldap details not enough");
}
LdapUserSearch ldapUserSearch = new FilterBasedLdapUserSearch("", "(sAMAccountName={0})", contextSource);
BindAuthenticator bindAuthenticator = new BindAuthenticator(contextSource);
bindAuthenticator.setUserSearch(ldapUserSearch);
LdapAuthenticationProvider ldapAuthenticationProvider = new LdapAuthenticationProvider(bindAuthenticator);
ldapAuthenticationProvider.authenticate(authentication);
String name = authentication.getName();
String password = authentication.getCredentials().toString();
UserAccess access = userAccessRepo.getUserAccessByUserId(name.toLowerCase());
System.out.println("----->"+access);
if (access == null) {
throw new BadCredentialsException("user not authorized");
}
return new UsernamePasswordAuthenticationToken(name, password, Collections.emptyList());
// return new UsernamePasswordAuthenticationToken(name, password);
}
@Override
public boolean supports(Class<?> authentication) {
return authentication.equals(UsernamePasswordAuthenticationToken.class);
}
}
package com.altimetrik.bcp.security;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpMethod;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
@Configuration
@EnableWebSecurity
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Autowired
private CustomAuthenticationProvider customAuthenticationProvider;
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.csrf()
.disable()
.authorizeRequests()
//.antMatchers("/").permitAll()
.antMatchers(HttpMethod.GET, "/css/**", "/js/**","/img/**","/fonts/**").permitAll()
.anyRequest().authenticated()
.and().formLogin().loginPage("/index")
//.loginProcessingUrl("/index")
.usernameParameter("username")
.passwordParameter("password")
.defaultSuccessUrl("/delivery")
.failureUrl("/index?error=true")
.permitAll()
.and()
.logout()
.logoutSuccessUrl("/")
.invalidateHttpSession(true)
.permitAll();
}
@Autowired
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
//auth.authenticationProvider(customAuthenticationProvider);
auth.inMemoryAuthentication().withUser("admin").password("{noop}admin").roles("ADMIN");
auth.inMemoryAuthentication().withUser("tester").password("{noop}tester").roles("USER");
auth.inMemoryAuthentication().withUser("karthick").password("{noop}karthick").roles("USER");
}
@Override
public void configure(WebSecurity web) throws Exception {
web
.ignoring()
.antMatchers("/css/**").antMatchers("/js/**").antMatchers("/img/**").antMatchers("/fonts/**"); // #3
}
}
This diff is collapsed.
package com.altimetrik.bcp.util;
public class AppConstants {
public static final int NO_OF_DAYS_TO_FETCH_ATTENDANCE_PERCENT = 7;
public static final String LEAVE = "Leave";
public static final String LEAVE_APPROVAL_PENDING = "Leave - Approval Pending";
public static final String FLOATER_HOLIDAY = "Floater Holiday";
public static final String FLOATER_HOLIDAY_APPROVAL_PENDING = "Floater Holiday - Approval Pending";
public static final String ALL = "all";
public static final String ORGANISATION_WIDE = "ORGANISATION WIDE";
public static final String MAIL_SUBJECT_FOR_NOTIFY_ATTENDANCE_NOT_MARKED = "ALERT: Mark Your Attendance in EmployWise!";
public static final String MAIL_CONTENT_FOR_NOTIFY_ATTENDANCE_NOT_MARKED_1ST = "<body style=\"margin: 0; padding: 0;\">"
+ "<table id=\"page\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">"
+ "<tr><td><table align=\"center\" cellpadding=\"0\" cellspacing=\"0\" width=\"75%\" "
+ "style=\"border-collapse: collapse;\"><tr> <td style=\"text-align:center;padding:20px;\"> "
+ " <img height=\"60\" width=\"180\" src=\"cid:Logo.png\" "
+ "style=\"text-align:center;display: block; margin-left: auto; margin-right: auto; \"> "
+ "</td></tr></table>"
//+ "<table align=\"center\" cellpadding=\"0\" cellspacing=\"0\" width=\"75%\" style=\"border-collapse: collapse;\">"
//+ "<tr> <td><hr size=\"1\" color=\"#F26522\"> </td></tr></table>"
+ "<table id=\"content\" align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"75%\" style=\"border-collapse: collapse;\">"
+ "<tr><td><div style=\"font-size: 14px; line-height: 1.2; color: #555555; "
+ "font-family: Arial, Helvetica Neue, Helvetica, sans-serif; mso-line-height-alt: 17px;\">"
+ "<p style=\"line-height: 1.2;word-spacing: 4px;font-size:16px;color:black;\">Dear ";
public static final String MAIL_CONTENT_FOR_NOTIFY_ATTENDANCE_NOT_MARKED_2ST = ",</p>"
+ "<br/>"
+ "<p style=\"line-height: 1.2;word-spacing: 4px;font-size:16px;color:black;\">"
+ "You didnt mark your attendance today.<br/> <br/> "
+ "Please mark your attendance in <a href=\"https://altimetrik.myemploywise.com/\" "
+ "rel=\"noopener\" style=\"text-decoration: underline; color: #0068A5;\" target=\"_blank\">EmployeWise</a></p>"
+ "<br/>"
+ "<p style=\"line-height: 1.2;word-spacing: 4px;font-size:16px;color:black;\">Thanks,</p>"
+ "<p style=\"line-height: 1.2;word-spacing: 4px;font-size:16px;color:black;\">Altimetrik-BCP Team</p></div>"
+ "</td></tr></table>";
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
/* .navbar {
overflow: hidden;
background-color: #333;
position: fixed; Set the navbar to fixed position
top: 0; Position the navbar at the top of the page
width: 100%; Full width
}
*/
This diff is collapsed.
This diff is collapsed.
.richText {position: relative;background-color: #FAFAFA;border: #EFEFEF solid 1px;color: #333333;width: 100%;}.richText .richText-form {font-family: Calibri,Verdana,Helvetica,sans-serif;}.richText .richText-form label {display: block;padding: 10px 15px;}.richText .richText-form input[type="text"], .richText .richText-form input[type="file"], .richText .richText-form input[type="number"], .richText .richText-form select {padding: 10px 15px;border: #999999 solid 1px;min-width: 200px;width: 100%;}.richText .richText-form select {cursor: pointer;}.richText .richText-form button {margin: 10px 0;padding: 10px 15px;background-color: #3498db;border: none;color: #FAFAFA;cursor: pointer;-webkit-appearance: none;-moz-appearance: none;appearance: none;-webkit-border-radius: 4px;-moz-border-radius: 4px;border-radius: 4px;}.richText .richText-toolbar {min-height: 20px;border-bottom: #EFEFEF solid 1px;}.richText .richText-toolbar .richText-length {font-family: Verdana, Helvetica, sans-serif;font-size: 13px;vertical-align: middle;line-height: 34px;}.richText .richText-toolbar .richText-length .black {color: #000;}.richText .richText-toolbar .richText-length .orange {color: orange;}.richText .richText-toolbar .richText-length .red {color: red;}.richText .richText-toolbar ul {padding-left: 0;padding-right: 0;margin-top: 0;margin-bottom: 0;}.richText .richText-toolbar ul li {float: left;display: block;list-style: none;}.richText .richText-toolbar ul li a {display: block;padding: 10px 13px;border-right: #EFEFEF solid 1px;cursor: pointer;-webkit-transition: background-color 0.4s;-moz-transition: background-color 0.4s;transition: background-color 0.4s;}.richText .richText-toolbar ul li a .fa, .richText .richText-toolbar ul li a .fas, .richText .richText-toolbar ul li a .far, .richText .richText-toolbar ul li a svg {pointer-events: none;}.richText .richText-toolbar ul li a .richText-dropdown-outer {display: none;position: absolute;top: 0;left: 0;right: 0;bottom: 0;background-color: rgba(0, 0, 0, 0.3);cursor: default;}.richText .richText-toolbar ul li a .richText-dropdown-outer .richText-dropdown {position: relative;display: block;margin: 3% auto 0 auto;background-color: #FAFAFA;border: #EFEFEF solid 1px;min-width: 100px;width: 300px;max-width: 90%;-webkit-box-shadow: 0 0 5px 0 #333;-moz-box-shadow: 0 0 5px 0 #333;box-shadow: 0 0 5px 0 #333;}.richText .richText-toolbar ul li a .richText-dropdown-outer .richText-dropdown .richText-dropdown-close {position: absolute;top: 0;right: -23px;background: #FFF;color: #333;cursor: pointer;font-size: 20px;text-align: center;width: 20px;}.richText .richText-toolbar ul li a .richText-dropdown-outer ul.richText-dropdown {list-style: none;}.richText .richText-toolbar ul li a .richText-dropdown-outer ul.richText-dropdown li {display: block;float: none;font-family: Calibri,Verdana,Helvetica,sans-serif;}.richText .richText-toolbar ul li a .richText-dropdown-outer ul.richText-dropdown li a {display: block;padding: 10px 15px;border-bottom: #EFEFEF solid 1px;}.richText .richText-toolbar ul li a .richText-dropdown-outer ul.richText-dropdown li a:hover {background-color: #FFFFFF;}.richText .richText-toolbar ul li a .richText-dropdown-outer ul.richText-dropdown li.inline {margin: 10px 6px;float: left;}.richText .richText-toolbar ul li a .richText-dropdown-outer ul.richText-dropdown li.inline a {display: block;padding: 0;margin: 0;border: none;-webkit-border-radius: 50%;-moz-border-radius: 50%;border-radius: 50%;-webkit-box-shadow: 0 0 10px 0 #999;-moz-box-shadow: 0 0 10px 0 #999;box-shadow: 0 0 10px 0 #999;}.richText .richText-toolbar ul li a .richText-dropdown-outer ul.richText-dropdown li.inline a span {display: block;height: 30px;width: 30px;-webkit-border-radius: 50%;-moz-border-radius: 50%;border-radius: 50%;}.richText .richText-toolbar ul li a .richText-dropdown-outer div.richText-dropdown {padding: 10px 15px;}.richText .richText-toolbar ul li a:hover {background-color: #FFFFFF;}.richText .richText-toolbar ul li[data-disable="true"] {opacity: 0.1;}.richText .richText-toolbar ul li[data-disable="true"] a {cursor: default;}.richText .richText-toolbar ul li:not([data-disable="true"]).is-selected .richText-dropdown-outer {display: block;}.richText .richText-toolbar ul:after {display: block;content: "";clear: both;}.richText .richText-toolbar:last-child {font-size: 12px;}.richText .richText-toolbar:after {display: block;clear: both;content: "";}.richText .richText-editor {padding: 20px;background-color: #FFFFFF;border-left: #FFFFFF solid 2px;font-family: Calibri,Verdana,Helvetica,sans-serif;height: 300px;outline: none;overflow-y: scroll;overflow-x: auto;}.richText .richText-editor ul, .richText .richText-editor ol {margin: 10px 25px;}.richText .richText-editor table {margin: 10px 0;border-spacing: 0;width: 100%;}.richText .richText-editor table td, .richText .richText-editor table th {padding: 10px;border: #EFEFEF solid 1px;}.richText .richText-editor:focus {border-left: #3498db solid 2px;}.richText .richText-initial {margin-bottom: -4px;padding: 10px;background-color: #282828;border: none;color: #33FF33;font-family: Monospace,Calibri,Verdana,Helvetica,sans-serif;max-width: 100%;min-width: 100%;width: 100%;min-height: 400px;height: 400px;}.richText .richText-help {float: right;display: block;padding: 10px 15px;cursor: pointer;}.richText .richText-undo, .richText .richText-redo {float: left;display: block;padding: 10px 15px;border-right: #EFEFEF solid 1px;cursor: pointer;}.richText .richText-undo.is-disabled, .richText .richText-redo.is-disabled {opacity: 0.4;}.richText .richText-help-popup a {color: #3498db;text-decoration: underline;}.richText .richText-help-popup hr {margin: 10px auto 5px auto;border: none;border-top: #EFEFEF solid 1px;}.richText .richText-list.list-rightclick {position: absolute;background-color: #FAFAFA;border-right: #EFEFEF solid 1px;border-bottom: #EFEFEF solid 1px;}.richText .richText-list.list-rightclick li {padding: 5px 7px;cursor: pointer;list-style: none;}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment