Commit 950a737a authored by Mahesh Gutam's avatar Mahesh Gutam

[MT-53] Mahesh: Import Employee details from Excel sheet

parent 5c8c121a
......@@ -55,5 +55,6 @@ dependencies {
compile('com.itextpdf:itextpdf:5.0.6')
compile('jcifs:jcifs:1.3.17')
compile('javax.servlet:servlet-api')
compile('com.github.ozlerhakan:poiji:1.11')
}
\ No newline at end of file
......@@ -267,17 +267,17 @@ public class ProjectTeamController {
produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<List<EmployeeRoles>> getEmployeesHavingVisa(
@RequestParam("visa") String visa) throws MyTimeException {
if (visa != null && !visa.equalsIgnoreCase("passport")) {
if (visa != null && !"passport".equalsIgnoreCase(visa)) {
List<EmployeeVisa> employeeVisas = employeeVisaRepo
.findByVisaName(visa);
List<String> employeeIds = new ArrayList();
List<String> employeeIds = null;
List<EmployeeRoles> employeesRoles = new ArrayList<>();
if (employeeVisas != null) {
employeeIds = employeeVisas.stream()
.map(EmployeeVisa::getEmployeeId)
.collect(Collectors.toList());
}
if (employeeIds != null && employeeIds.size() > 0) {
if (employeeIds != null && !employeeIds.isEmpty()) {
List<EmployeeRoles> emps = userService.getEmployeeRoles();
for (EmployeeRoles e : emps) {
if (employeeIds.contains(e.getEmployeeId())) {
......
......@@ -9,7 +9,9 @@ import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.nisum.mytime.exception.handler.MyTimeException;
import com.nisum.mytime.model.EmployeeVisa;
......@@ -17,8 +19,11 @@ import com.nisum.mytime.model.TravelRequest;
import com.nisum.mytime.model.Visa;
import com.nisum.mytime.service.VisaService;
import lombok.extern.slf4j.Slf4j;
@RestController
@RequestMapping("/visa")
@Slf4j
public class VisaController {
@Autowired
......@@ -42,7 +47,7 @@ public class VisaController {
EmployeeVisa visa = visaService.addEmployeeVisas(employeeVisa);
return new ResponseEntity<>(visa, HttpStatus.OK);
}
@RequestMapping(value = "/updateEemployeeVisa", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<EmployeeVisa> updateEemployeeVisa(@RequestBody EmployeeVisa eVisa) throws MyTimeException {
EmployeeVisa visa = visaService.updateEmployeeVisas(eVisa);
......@@ -54,6 +59,7 @@ public class VisaController {
visaService.deleteEmployeeVisas(eVisa);
return new ResponseEntity<>("Success", HttpStatus.OK);
}
@RequestMapping(value = "/getAllTravelRequests", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<List<TravelRequest>> getAllTravelRequests() throws MyTimeException {
List<TravelRequest> employeeVisas = visaService.getAllTravels();
......@@ -79,4 +85,12 @@ public class VisaController {
return new ResponseEntity<>("Success", HttpStatus.OK);
}
@RequestMapping(value = "/fileUpload", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public ResponseEntity<String> exportDataFromFile(@RequestParam(value = "file") MultipartFile file)
throws MyTimeException {
log.info("Uploaded file: {} with size: {}", file.getOriginalFilename(), file.getSize());
String result = visaService.exportDataFromExcelFile(file);
return new ResponseEntity<>(result, HttpStatus.OK);
}
}
\ No newline at end of file
......@@ -8,6 +8,8 @@ import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.format.annotation.DateTimeFormat.ISO;
import com.poiji.annotation.ExcelCellName;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
......@@ -22,34 +24,74 @@ import lombok.ToString;
@Document(collection = "EmployeeDetails")
public class EmployeeRoles implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
private String id;
private String employeeId;
private String employeeName;
private String emailId;
private String role;
private String designation;
private String shift;
private String baseTechnology;
private String domain;
private String empLocation;
private String technologyKnown;
private String mobileNumber;
private String alternateMobileNumber;
private String personalEmailId;
private String functionalGroup;
private String empStatus;
private String employmentType;
@DateTimeFormat(iso = ISO.DATE)
private Date dateOfJoining;
@DateTimeFormat(iso = ISO.DATE)
private Date dateOfBirth;
private Date createdOn;
private Date lastModifiedOn;
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
private String id;
@ExcelCellName("Employee ID")
private String employeeId;
@ExcelCellName("Employee Name")
private String employeeName;
@ExcelCellName("Email ID")
private String emailId;
@ExcelCellName("Role")
private String role;
@ExcelCellName("Designation")
private String designation;
@ExcelCellName("Shift")
private String shift;
@ExcelCellName("Primary Skill")
private String baseTechnology;
@ExcelCellName("Domain")
private String domain;
@ExcelCellName("Location")
private String empLocation;
@ExcelCellName("Skills")
private String technologyKnown;
@ExcelCellName("Primary Mobile")
private String mobileNumber;
@ExcelCellName("Alternate Mobile")
private String alternateMobileNumber;
@ExcelCellName("Personal Email")
private String personalEmailId;
@ExcelCellName("Functional Group")
private String functionalGroup;
@ExcelCellName("Employment Status")
private String empStatus;
@ExcelCellName("Employment Type")
private String employmentType;
@ExcelCellName("Date Of Joining")
@DateTimeFormat(iso = ISO.DATE)
private Date dateOfJoining;
@ExcelCellName("Date Of Birth")
@DateTimeFormat(iso = ISO.DATE)
private Date dateOfBirth;
@ExcelCellName("Created")
private Date createdOn;
@ExcelCellName("Last Modified")
private Date lastModifiedOn;
}
......@@ -5,6 +5,9 @@ package com.nisum.mytime.service;
import java.util.List;
import org.springframework.web.multipart.MultipartFile;
import com.nisum.mytime.exception.handler.MyTimeException;
import com.nisum.mytime.model.EmployeeVisa;
import com.nisum.mytime.model.TravelRequest;
import com.nisum.mytime.model.Visa;
......@@ -32,4 +35,6 @@ public interface VisaService {
TravelRequest updateTravelRequest(TravelRequest e);
void deleteEmployeeVisas(TravelRequest e);
String exportDataFromExcelFile(MultipartFile file) throws MyTimeException;
}
......@@ -3,49 +3,50 @@
*/
package com.nisum.mytime.service;
import java.io.File;
import java.io.IOException;
import java.util.Date;
import java.util.List;
import javax.mail.MessagingException;
import javax.mail.internet.MimeMessage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.FileSystemResource;
import org.springframework.core.io.ResourceLoader;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.mail.javamail.MimeMessageHelper;
import org.springframework.data.mongodb.core.FindAndModifyOptions;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.data.mongodb.core.query.Update;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import com.nisum.mytime.model.EmailDomain;
import com.nisum.mytime.exception.handler.MyTimeException;
import com.nisum.mytime.model.EmployeeRoles;
import com.nisum.mytime.model.EmployeeVisa;
import com.nisum.mytime.model.TravelRequest;
import com.nisum.mytime.model.Visa;
import com.nisum.mytime.repository.EmployeeRolesRepo;
import com.nisum.mytime.repository.EmployeeVisaRepo;
import com.nisum.mytime.repository.TravelRepo;
import com.nisum.mytime.repository.VisaRepo;
import com.poiji.bind.Poiji;
import com.poiji.exception.PoijiExcelType;
import lombok.extern.slf4j.Slf4j;
/**
* @author nisum
*
*/
@Service
@Slf4j
public class VisaServiceImpl implements VisaService {
private static final Logger logger = LoggerFactory.getLogger(VisaServiceImpl.class);
@Autowired
private VisaRepo visaRepo;
@Autowired
private TravelRepo travelRepo;
@Autowired
private EmployeeVisaRepo employeeVisaRepo;
@Autowired
private MongoTemplate mongoTemplate;
@Override
public List<Visa> getAllVisas() {
return visaRepo.findAll();
......@@ -58,40 +59,95 @@ public class VisaServiceImpl implements VisaService {
@Override
public EmployeeVisa addEmployeeVisas(EmployeeVisa e) {
// TODO Auto-generated method stub
return employeeVisaRepo.save(e);
}
@Override
public EmployeeVisa updateEmployeeVisas(EmployeeVisa e) {
// TODO Auto-generated method stub
return employeeVisaRepo.save(e);
}
@Override
public void deleteEmployeeVisas(EmployeeVisa e) {
// TODO Auto-generated method stub
employeeVisaRepo.delete(e);
employeeVisaRepo.delete(e);
}
@Override
public List<TravelRequest> getAllTravels() {
return travelRepo.findAll();
}
@Override
public TravelRequest addTravelRequest(TravelRequest e) {
// TODO Auto-generated method stub
return travelRepo.save(e);
}
@Override
public TravelRequest updateTravelRequest(TravelRequest e) {
// TODO Auto-generated method stub
return travelRepo.save(e);
}
@Override
public void deleteEmployeeVisas(TravelRequest e) {
// TODO Auto-generated method stub
travelRepo.delete(e);
}
@Override
public String exportDataFromExcelFile(MultipartFile file) throws MyTimeException {
String result = "Failure";
int counter = 0;
try {
List<EmployeeRoles> employees = Poiji.fromExcel(file.getInputStream(), PoijiExcelType.XLS,
EmployeeRoles.class);
if (!employees.isEmpty()) {
for(EmployeeRoles employee: employees){
if(null != employee.getEmployeeId())
findAndModifyEmployeeRole(employee);
else
counter++;
}
if(counter == 0){
result = "Success";
log.info("Exported {} employee records from file: {}", employees.size(), file.getOriginalFilename());
}else{
log.info("Uploaded file: {}, does not contain valid employee records", file.getOriginalFilename());
}
}
} catch (Exception e) {
log.error("Exception occured while exporting the data from excel file due to: {}", e);
throw new MyTimeException("");
}
return result;
}
private void findAndModifyEmployeeRole(EmployeeRoles employee) {
Query query = new Query(Criteria.where("employeeId").is(employee.getEmployeeId()))
.addCriteria(Criteria.where("emailId").is(employee.getEmailId()));
Update update = new Update();
update.set("employeeId", employee.getEmployeeId());
update.set("employeeName", employee.getEmployeeName());
update.set("emailId", employee.getEmailId());
update.set("role", employee.getRole());
update.set("functionalGroup", employee.getFunctionalGroup());
update.set("empStatus", employee.getEmpStatus());
update.set("employmentType", employee.getEmploymentType());
update.set("empLocation", employee.getEmpLocation());
update.set("domain", employee.getDomain());
update.set("designation", employee.getDesignation());
update.set("dateOfBirth", employee.getDateOfBirth());
update.set("dateOfJoining", employee.getDateOfJoining());
update.set("shift", employee.getShift());
update.set("baseTechnology", employee.getBaseTechnology());
update.set("technologyKnown", employee.getTechnologyKnown());
update.set("mobileNumber", employee.getMobileNumber());
update.set("alternateMobileNumber", employee.getAlternateMobileNumber());
update.set("personalEmailId", employee.getPersonalEmailId());
update.set("createdOn", new Date());
update.set("lastModifiedOn", new Date());
FindAndModifyOptions options = new FindAndModifyOptions();
options.returnNew(true);
options.upsert(true);
mongoTemplate.findAndModify(query, update, options, EmployeeRoles.class);
log.info("Inserted Employee record with Id: {}", employee.getEmployeeId());
}
}
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="stdout" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<springProfile name="test,dev">
<pattern>%d{dd-MM-yyyy HH:mm:ss.SSS} [%thread] %-5level %logger{36}.%M - %msg%n</pattern>
</springProfile>
<springProfile name="stage">
<pattern>%d{dd-MM-yyyy HH:mm:ss.SSS} [%thread] %-5level %logger{36}.%M - %msg%n</pattern>
</springProfile>
<springProfile name="prod">
<pattern>%d{dd-MM-yyyy HH:mm:ss.SSS} [%thread] %-5level %logger{36}.%M - %msg%n</pattern>
</springProfile>
<!-- If no active profile is set-->
<springProfile name="default">
<pattern>%d{dd-MM-yyyy HH:mm:ss.SSS} [%thread] %-5level %logger{36}.%M - %msg%n</pattern>
</springProfile>
</encoder>
</appender>
<springProfile name="test,stage,dev,default">
<root level="INFO">
<appender-ref ref="stdout" />
</root>
</springProfile>
<springProfile name="prod">
<root level="DEBUG">
<appender-ref ref="stdout" />
</root>
</springProfile>
</configuration>
\ No newline at end of file
myApp
.directive('fileModel', [ '$parse', function($parse) {
return {
restrict : 'A',
link : function(scope, element, attrs) {
var model = $parse(attrs.fileModel);
var modelSetter = model.assign;
element.bind('change', function() {
scope.$apply(function() {
modelSetter(scope, element[0].files[0]);
});
});
}
};
} ])
.controller(
'exportDataController',
function($scope, myFactory, $mdDialog, $http, appConfig,
$timeout) {
$scope.file = '';
$scope.refreshPage = function() {
$scope.file = '';
$('#upload-file-info').html("");
}
$scope.uploadFiles = function() {
var file = $scope.file;
if (file == "" || file.length == 0) {
showAlert('Please choose a file to import data...');
$scope.refreshPage();
} else if (file.name.indexOf(".xls") == -1) {
showAlert("Please choose an excel file to import data");
$scope.refreshPage();
} else {
showProgressDialog('Please wait while data is imported from file...!!!');
var formData = new FormData();
formData.append('file', file);
$http
.post(
appConfig.appUri
+ "visa/fileUpload",
formData,
{
transformRequest : angular.identity,
headers : {
'Content-Type' : undefined
},
transformResponse : [ function(
data) {
return data;
} ]
})
.then(
function mySuccess(response) {
$mdDialog.hide();
console.log(response.data);
if(response.data == "Success")
showAlert('Data imported from file successfully.');
else if(response.data == "Failure")
showAlert('Uploaded file does not contain valid employee data...!!!');
$scope.refreshPage();
}, function myError(response) {
$mdDialog.hide();
console.log(response);
showAlert('Something went wrong while importing the data from file...');
$scope.refreshPage();
});
}
}
function showAlert(message) {
$mdDialog.show($mdDialog.alert().parent(
angular.element(document
.querySelector('#popupContainer')))
.clickOutsideToClose(true).textContent(message)
.ariaLabel('Alert Dialog').ok('Ok'));
}
function showProgressDialog(msg) {
$mdDialog.show({
templateUrl : 'templates/progressDialog.html',
controller : ProgressController,
parent : angular.element(document.body),
clickOutsideToClose : false,
locals : {
dataToPass : msg
}
});
}
function ProgressController($scope, dataToPass) {
$scope.progressText = dataToPass;
}
});
\ No newline at end of file
......@@ -8,9 +8,6 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
var profile = googleUser.getBasicProfile();
getUserRole(profile);
getAllUserRoles();
//getAllShifts();
//getAllDesignations();
// getAllTechnologies();
getAllLocations();
getAllAccounts();
getMasterData();
......@@ -60,34 +57,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
$scope.rolesData = [];
});
};
function getAllShifts(){
$http({
method : "GET",
url : appConfig.appUri + "user/getAllShifts"
}).then(function mySuccess(response) {
myFactory.setShifts(response.data);
}, function myError(response) {
});
};
function getAllDesignations(){
$http({
method : "GET",
url : appConfig.appUri + "user/getAllDesignations"
}).then(function mySuccess(response) {
myFactory.setDesignations(response.data);
}, function myError(response) {
});
};
function getAllTechnologies(){
$http({
method : "GET",
url : appConfig.appUri + "user/getSkills"
}).then(function mySuccess(response) {
myFactory.setTechnologies(response.data);
}, function myError(response) {
});
};
function getMasterData(){
$http({
method : "GET",
......@@ -282,7 +252,8 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
menuItems.push({"menu" : "ReSync Data","icon" : "fa fa-recycle fa-2x","path" : "templates/resyncData.html"});
menuItems.push({"menu" : "My Project Allocations","icon" : "fa fa-address-card-o fa-2x","path" : "templates/myProjectAllocations.html"});
menuItems.push({"menu" : "My Org","icon" : "fa fa-address-card-o fa-2x","path" : "templates/myOrg.html"});
menuItems.push({"menu" : "My Profile","icon" : "fa fa-address-card-o fa-2x","path" : "templates/profile.html"});
menuItems.push({"menu" : "My Profile","icon" : "fa fa-address-book-o fa-2x","path" : "templates/profile.html"});
menuItems.push({"menu" : "Import Data","icon" : "fa fa-upload fa-2x","path" : "templates/exportData.html"});
}else if(role == "Manager"){
menuItems.push({"menu" : "My Details","icon" : "fa fa-indent fa-2x","path" : "templates/employee.html"});
menuItems.push({"menu" : "Reportee Details","icon" : "fa fa-users fa-2x","path" : "templates/reportees.html"});
......@@ -290,7 +261,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
menuItems.push({"menu" : "View Projects","icon" : "fa fa-tasks fa-2x","path" : "templates/viewProjects.html"});
menuItems.push({"menu" : "My Project Allocations","icon" : "fa fa-life-ring fa-2x","path" : "templates/myProjectAllocations.html"});
menuItems.push({"menu" : "My Org","icon" : "fa fa-address-card-o fa-2x","path" : "templates/myOrg.html"});
menuItems.push({"menu" : "My Profile","icon" : "fa fa-address-card-o fa-2x","path" : "templates/profile.html"});
menuItems.push({"menu" : "My Profile","icon" : "fa fa-address-book-o fa-2x","path" : "templates/profile.html"});
}else if(role == "HR Manager"){
menuItems.push({"menu" : "My Details","icon" : "fa fa-indent fa-2x","path" : "templates/employee.html"});
menuItems.push({"menu" : "Employee Login Details","icon" : "fa fa-users fa-2x","path" : "templates/employees.html"});
......@@ -302,14 +273,15 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
menuItems.push({"menu" : "Shift Details","icon" : "fa fa-superpowers fa-2x","path" : "templates/shiftdetails.html"});
menuItems.push({"menu" : "My Project Allocations","icon" : "fa fa-life-ring fa-2x","path" : "templates/myProjectAllocations.html"});
menuItems.push({"menu" : "My Org","icon" : "fa fa-address-card-o fa-2x","path" : "templates/myOrg.html"});
menuItems.push({"menu" : "My Profile","icon" : "fa fa-address-card-o fa-2x","path" : "templates/profile.html"});
menuItems.push({"menu" : "My Profile","icon" : "fa fa-address-book-o fa-2x","path" : "templates/profile.html"});
menuItems.push({"menu" : "Import Data","icon" : "fa fa-upload fa-2x","path" : "templates/exportData.html"});
}else if(role == "Lead"){
menuItems.push({"menu" : "My Details","icon" : "fa fa-indent fa-2x","path" : "templates/employee.html"});
menuItems.push({"menu" : "Reportee Details","icon" : "fa fa-users fa-2x","path" : "templates/reportees.html"});
menuItems.push({"menu" : "Manage Team","icon" : "fa fa-sitemap fa-2x","path" : "templates/projectDetails.html"});
menuItems.push({"menu" : "My Project Allocations","icon" : "fa fa-life-ring fa-2x","path" : "templates/myProjectAllocations.html"});
menuItems.push({"menu" : "My Org","icon" : "fa fa-address-card-o fa-2x","path" : "templates/myOrg.html"});
menuItems.push({"menu" : "My Profile","icon" : "fa fa-address-card-o fa-2x","path" : "templates/profile.html"});
menuItems.push({"menu" : "My Profile","icon" : "fa fa-address-book-o fa-2x","path" : "templates/profile.html"});
}else if(role == "Delivery Manager" || role == "Director"){
menuItems.push({"menu" : "My Details","icon" : "fa fa-indent fa-2x","path" : "templates/employee.html"});
menuItems.push({"menu" : "Employee Login Details","icon" : "fa fa-users fa-2x","path" : "templates/employees.html"});
......@@ -321,16 +293,17 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
menuItems.push({"menu" : "Manage Travels","icon" : "fa fa-tasks fa-2x","path" : "templates/onsiteTravelsList.html"});
menuItems.push({"menu" : "Attendance Report","icon" : "fa fa-bar-chart fa-2x","path" : "templates/attendanceReport.html"});
menuItems.push({"menu" : "Shift Details","icon" : "fa fa-superpowers fa-2x","path" : "templates/shiftdetails.html"});
menuItems.push({"menu" : "Dashboard","icon" : "fa fa-life-ring fa-2x","path" : "templates/dashboard.html"});
menuItems.push({"menu" : "Dashboard","icon" : "fa fa-television fa-2x","path" : "templates/dashboard.html"});
menuItems.push({"menu" : "My Project Allocations","icon" : "fa fa-life-ring fa-2x","path" : "templates/myProjectAllocations.html"});
menuItems.push({"menu" : "My Org","icon" : "fa fa-address-card-o fa-2x","path" : "templates/myOrg.html"});
menuItems.push({"menu" : "My Profile","icon" : "fa fa-address-card-o fa-2x","path" : "templates/profile.html"});
menuItems.push({"menu" : "My Profile","icon" : "fa fa-address-book-o fa-2x","path" : "templates/profile.html"});
menuItems.push({"menu" : "Import Data","icon" : "fa fa-upload fa-2x","path" : "templates/exportData.html"});
}else{
menuItems.push({"menu" : "My Details","icon" : "fa fa-indent fa-2x","path" : "templates/employee.html"});
menuItems.push({"menu" : "My Team","icon" : "fa fa-futbol-o fa-2x","path" : "templates/myTeam.html"});
menuItems.push({"menu" : "My Project Allocations","icon" : "fa fa-life-ring fa-2x","path" : "templates/myProjectAllocations.html"});
menuItems.push({"menu" : "My Org","icon" : "fa fa-address-card-o fa-2x","path" : "templates/myOrg.html"});
menuItems.push({"menu" : "My Profile","icon" : "fa fa-address-card-o fa-2x","path" : "templates/profile.html"});
menuItems.push({"menu" : "My Profile","icon" : "fa fa-address-book-o fa-2x","path" : "templates/profile.html"});
}
myFactory.setMenuItems(menuItems);
......
<div class="md-padding" style="width: 100%; padding: 3px 0px 0px 0px;"
id="popupContainer" ng-controller="exportDataController">
<div class="container-fluid mainDivHeaderClass">
<div class="row">
<div class="col-lg-12">
<p align="center" class="col-xs-11"
style="vertical-align: middle; font-weight: bold; font-size: 30px;">Import Employee Data</p>
<p align="right" class="col-xs-1"
style="vertical-align: middle; font-weight: bold; font-size: 1.5em; margin-top: 8px; cursor: pointer;">
<i class="fa fa-refresh" aria-hidden="true"
ng-click="refreshPage()"></i>
</p>
</div>
<div class="clearfix"></div>
</div>
</div>
<div class="form-horizontal">
<div class="form-group" style="padding-left: 10px;">
<div class="form-inline col-lg-12"
style="margin-left: 22%; margin-top: 5%;">
<div class="form-group col-lg-4">
<a class="btn btn-primary" href='javascript:;'
style="background: cadetblue;border-color:cadetblue; margin-top: 1%;"> Choose File...
<input type="file" file-model="file"
style="position: absolute; z-index: 2; top: 0; left: 0; filter: alpha(opacity = 0); -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); opacity: 0; background-color: transparent; color: transparent;"
name="file_source"
onchange="$('#upload-file-info').html($(this).val());">
</a> &nbsp; <span class='label label-info' id="upload-file-info"></span>
</div>
<div class="form-group col-lg-1"></div>
<div class="form-group col-lg-1">
<label class="" for="submitBtn"><md-button
class="md-raised md-primary"
style="width:120px;background: cadetblue;"
ng-click="uploadFiles()"> <i
class="fa fa-upload fa-2x"
style="margin-top: 5px; font-size: 1.5em; float: left"></i>
Import Data</md-button></label>
</div>
</div>
</div>
</div>
</div>
......@@ -69,6 +69,7 @@
<script src="controllers/VisaController.js"></script>
<script src="controllers/TravelController.js"></script>
<script src="controllers/SessionHandlerController.js"></script>
<script src="controllers/ExportDataController.js"></script>
</head>
<body>
<ng-include src="'templates/login.html'" id="home"></ng-include>
......
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