Skip to content

Commit

Permalink
Merge pull request #210 from ogomaemmanuel/design
Browse files Browse the repository at this point in the history
Update dashboard UI clean up
  • Loading branch information
ogomaemmanuel committed Oct 23, 2023
2 parents e38de0a + afceabf commit f3c374c
Show file tree
Hide file tree
Showing 12 changed files with 392 additions and 23,168 deletions.
23,072 changes: 0 additions & 23,072 deletions hr_core/package-lock.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -65,26 +65,19 @@ public LeaveRequest createLeaveRequest(LeaveRequestModel leaveRequestModel) {

public Page<LeaveRequest> getLoggedInUserLeaveRequest(PagedDataRequest pagedDataRequest) {
PageRequest pageRequest = PageRequest.of(pagedDataRequest.getPage(), pagedDataRequest.getPageSize());
Page<LeaveRequest> leaveRequests =
leaveRequestRepository.findCurrentUserLeaveRequest(pageRequest);
return leaveRequests;
return leaveRequestRepository.findCurrentUserLeaveRequest(pageRequest);
}

public List<Map<String, String>> inPlaceStaffSelectList() {
List<Map<String, String>> inPlaceEmployeeSelectList =
this.leaveRequestRepository.getInplaceEmployeeSelectList();
return inPlaceEmployeeSelectList;
return this.leaveRequestRepository.getInplaceEmployeeSelectList();
}

public List<Map<String, String>> getLoggedInUserLeaveBalances() {
List<Map<String, String>> leaveBalances =
this.leaveRequestRepository.findCurrentUserLeaveBalances();
return leaveBalances;
return this.leaveRequestRepository.findCurrentUserLeaveBalances();
}

public Long getLoggedInUserLeaveBalance(Long leaveTypeId) {
Long leaveBalance = this.leaveRequestRepository.currentUserLeaveBalanceByLeaveTypeId(leaveTypeId);
return leaveBalance;
return this.leaveRequestRepository.currentUserLeaveBalanceByLeaveTypeId(leaveTypeId);
}

public ResponseModel withdrawRequest(Long leaveId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public AuthController(UserService userService, UserRegistrationModelValidator us
}
@RequestMapping(value = "login", method = RequestMethod.GET)
public String login() {
return "forward:/";
return "forward:/dashboard";
}

@RequestMapping(value = "register", method = RequestMethod.POST)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,9 @@ public class HomeController {
public String home() {
return "home/index";
}

@RequestMapping(value = "/dashboard", method = RequestMethod.GET)
public String dashboard() {
return "home/index";
}
}
Original file line number Diff line number Diff line change
@@ -1,53 +1,39 @@
<template>
<div class="card">
<div class="card-content">
<h2>Timesheet 11 Mar 2019</h2>
<div class="card-header">
<p class="card-header-title">
<i class="fa fa-clock-o mr-2"></i>
Time Clock
</p>
</div>
<div class="card-content has-text-centered">
<div>
<div class="flex justify-center p-2 bg-gray-100">
<div>
<h2 class="font-bold">Punch In at</h2>
<h2>Wed, 11th Mar 2019 10.00 AM</h2>
</div>
</div>
</div>
<div class="flex mt-5 justify-center items-center">
<div class="flex border-gray-200
border-2
h-24
w-24 rounded-full bg-gray-100 items-center justify-center">
<h2>3.45 hrs</h2>
</div>
<p class="mb-2 is-7 title has-text-grey">Thursday, 23/10/2023</p>
<p class="title is-5 mb-0 p-1">3:45PM</p>
<p class=" mt-2 is-7 title has-text-grey">Clocked Today: 0 Minutes</p>
</div>

<div class="flex justify-center mt-5">
<button
v-if="showPunchInButton"
@click="showPunchInForm=true"
class="button primary">Punch In
class="button primary"
@click="showPunchInForm=true">Clock In
</button>
<button
v-else
@click="showPunchOutForm=true"
class="button primary">Punch Out
class="button primary"
@click="showPunchOutForm=true">Punch Out
</button>
</div>
<div class="flex justify-between mt-8">
<div class="flex items-center justify-center h-8 bg-gray-200 pb-5 pt-5 pl-10 pr-10">
<h2>Break</h2>
</div>
<div class="flex items-center justify-center h-8 bg-gray-200 pb-5 pt-5 pl-10 pr-10">
<h2>Overtime</h2>
</div>
</div>
</div>
<PunchInForm
v-if="showPunchInForm"
@createSuccessful="handlePunchInSuccessful"
@modalClosed="showPunchInForm=false"
v-if="showPunchInForm"></PunchInForm>
@modalClosed="showPunchInForm=false"></PunchInForm>
<PunchOutForm
v-if="showPunchOutForm"
@createSuccessful="handlePunchOutSuccessful"
@modalClosed="showPunchOutForm=false"
v-if="showPunchOutForm"></PunchOutForm>
@modalClosed="showPunchOutForm=false"></PunchOutForm>
</div>

</template>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<ModalTemplate :has-padding="false" @modalClosed="$emit(`modalClosed`)">
<div slot="modal-content">
<div class="punch-in-header h-16 bg-yellow-800">
<div class="punch-in-header h-16 bg-green-800">
<div class="flex justify-center relative">
<figure class="image punch-in-user-profile-image is-64x64 absolute">
<img src="/images/undraw_profile_pic_ic-5-t.svg" alt=""/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<Breadcrumb class="app-breadcrumb" separator="/">
<Breadcrumb class="app-breadcrumb has-text-grey" separator="/">
<transition-group name="breadcrumb">
<BreadcrumbItem v-for="(item,index) in levelList" :key="item.path">
<span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect">{{ item.meta.title }}</span>
Expand Down Expand Up @@ -44,6 +44,7 @@
if (!this.isHome(first)) {
matched = [{path: '/', meta: {title: 'Home',redirect: true}}].concat(matched)
}
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
},
isHome(route) {
Expand Down Expand Up @@ -78,7 +79,7 @@
line-height: 50px;
margin-left: 8px;
.no-redirect {
color: #97a8be;
//color: #97a8be;
cursor: text;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default {
...mapGetters(["authenticatedUser"]),
showAdminDashBoard() {
return this.authenticatedUser?.authorities.some(auth =>
auth?.authority?.toLowerCase() == "admin");
auth?.authority?.toLowerCase() === "admin");
}
}
}
Expand Down
Loading

0 comments on commit f3c374c

Please sign in to comment.