Skip to content

Commit

Permalink
Major Commit: Updated the pages for Employee Details to include all t…
Browse files Browse the repository at this point in the history
…he Client Details and Immigration details information.
  • Loading branch information
mahi-mullapudi authored and Mahidhar C Mullapudi committed Sep 7, 2018
1 parent f0faae9 commit 9dd07cb
Show file tree
Hide file tree
Showing 6 changed files with 879 additions and 226 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ public String getEmployeeDetails(@RequestParam("empId") long empId,
log.info("Inside getEmployeeDetails method of EmployeeDetails Controller:: empId: " + empId);
Employee employeeDetails = employeeService.getEmployeeById(empId);
model.addAttribute("employeeDetails", employeeDetails);
//Adding client details model attribute.
ClientDetail clientDetails = new ClientDetail();
clientDetails.setEmployee(employeeService.getEmployeeById(empId));
model.addAttribute("clientDetails", clientDetails);
//Adding Immigration details model attribute.
List<ImmigrationDetail> immigrationDetailsList = employeeService.getImmigrationDetailsSummary(empId);
model.addAttribute("immigrationDetails", new ImmigrationDetail());
model.addAttribute("immigrationDetailsSummary", immigrationDetailsList);
//Initiating ModelAndView object with the Employee object
return "staff/employeeDetails";
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/static/js/dashboard-staff.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function approveTimesheet() {
success: function (responsedata) {
console.log("Inside success function of Approve Timesheet.");
getTimesheetInfoById(timesheetId, true); //To reload the View Timesheet information.
loadSummaryTable();
fetchData();
$('#successModal').modal('show');
$('#alertDiv').show();
$('#alertSubDiv').addClass(responsedata.responseClass);
Expand Down Expand Up @@ -191,7 +191,7 @@ function rejectTimesheet() {
success: function (responsedata) {
console.log("Inside success function of Reject Timesheet.");
getTimesheetInfoById(timesheetId, true); //To reload the View Timesheet information.
loadSummaryTable();
fetchData();
$('#rejectionModal').modal('show');
$('#alertDiv').show();
$('#alertSubDiv').addClass(responsedata.responseClass);
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/static/js/employeeDetails.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$(function () {
$('[data-toggle="tooltip"]').tooltip();
$('.phone_us').mask('(000)000-0000');
})
3 changes: 3 additions & 0 deletions src/main/resources/static/js/employeeDetailsSummary.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ function fetchEmpDetails() {
{
data: 'companyName'
},
{
data: 'employeeTitle',
},
{
data: 'employeeId',
mRender: function (data, type, row) {
Expand Down
Loading

0 comments on commit 9dd07cb

Please sign in to comment.