-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added employee profitability list #3525
Merged
+144
−8
Merged
Changes from 24 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
7c26495
add list
shub-tiwari 82f8d9b
add input field for threshold value
shub-tiwari 1116077
add employee earning column
shub-tiwari db52481
fix checks
shub-tiwari 108e349
fix checks
shub-tiwari f1baffe
fix checks
shub-tiwari 9399160
fix checks
shub-tiwari 5453522
fix checks
shub-tiwari 5add9d3
fix feedbacks
shub-tiwari b11603d
fix feedbacks
shub-tiwari 0d2ffaf
update config variable
shub-tiwari d384233
add icon
shub-tiwari 348c8cf
fix icon
shub-tiwari 1ed24a6
fixes
shub-tiwari 924a8c3
update files name
shub-tiwari 16ae84a
fixes
shub-tiwari 4af204d
fixes
shub-tiwari 0628f7b
fix CI checks
shub-tiwari a56ce9d
fixes
shub-tiwari 5642527
Merge branch 'master' of https://github.com/ColoredCow/portal into fe…
shub-tiwari a96183f
ci fixes
shub-tiwari a4295bb
resolve conflict
shub-tiwari 23e8b9e
add employee list
shub-tiwari 882f99e
add permission
shub-tiwari affa5b4
fix ci checks
shub-tiwari e59722a
add comma
shub-tiwari File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers\Settings; | ||
|
||
use App\Http\Controllers\Controller; | ||
use App\Models\Setting; | ||
use Illuminate\Http\Request; | ||
|
||
class ProfitabilityController extends Controller | ||
{ | ||
public function index() | ||
{ | ||
$employeeEarningThreshold = Setting::where('setting_key', 'employee_earning_threshold')->value('setting_value'); | ||
|
||
return view('settings.employee-earning-threshold.index', ['employeeEarningThreshold' => $employeeEarningThreshold]); | ||
} | ||
|
||
public function update(Request $request) | ||
{ | ||
Setting::updateOrCreate( | ||
['module' => 'setting', 'setting_key' => 'employee_earning_threshold'], | ||
['setting_value' => $request->employee_earning_threshold] | ||
); | ||
|
||
return redirect()->back()->with('status', 'Saved Successfully!'); | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
resources/js/components/Dashboard/EmployeeProfitabilityList.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<template> | ||
<div class = "media"> | ||
<div class="card"> | ||
<div class="card-header p-1"> | ||
<h3 class="text-center"><a href="/report/finance/employee/profitibality?staff_type=Employee&status=current">Employee Profitability List</a></h3> | ||
</div> | ||
<div class="md-0"> | ||
<div class="card-body pt-3 h-325 w-md-389 w-389 overflow-y-scroll"> | ||
<ul class="list list-group unstyled-list"> | ||
<li class="d-flex justify-content-between"> | ||
<div class="text-secondary"> Fetching latest data... </div> | ||
<h4 v-text="sentInvoiceCount"></h4> | ||
</li> | ||
<hr class="mt-1" /> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
@extends('layouts.app') | ||
|
||
@section('content') | ||
|
||
<!-- As of now we have hardCoded the earningValue until we unable to fetch the real data --> | ||
@php | ||
$routeName = Route::getCurrentRoute()->getName(); | ||
$earningValue = 0; | ||
@endphp | ||
<div class="container"> | ||
<br> | ||
@include('hr.employees.menu') | ||
|
@@ -30,6 +35,7 @@ | |
<thead class="thead-dark"> | ||
<tr class="sticky-top"> | ||
<th>Name</th> | ||
@if($routeName === "employee") | ||
<th>Active Projects Count</th> | ||
<th> | ||
Overall FTE | ||
|
@@ -43,6 +49,14 @@ | |
<i class="fa fa-info-circle" aria-hidden="true"></i> | ||
</span> | ||
</th> | ||
@else | ||
<th> | ||
Employee Earning | ||
<span class="tooltip-wrapper" data-html="true" data-toggle="tooltip" title="Rate"> | ||
<i class="fa fa-info-circle" aria-hidden="true"></i> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rather than tooltip we need to use alert symbol here |
||
</span> | ||
</th> | ||
@endif | ||
</tr> | ||
@foreach ($employees as $employee) | ||
<tr> | ||
|
@@ -66,6 +80,7 @@ class="{{ config('constants.review-tags.completed.class') }} badge-pill mr-1 mb- | |
@endif | ||
</a> | ||
</td> | ||
@if($routeName === "employee") | ||
<td> | ||
@if ($employee->user == null) | ||
0 | ||
|
@@ -80,6 +95,7 @@ class="{{ config('constants.review-tags.completed.class') }} badge-pill mr-1 mb- | |
{{ $totalFTE }} | ||
@endif | ||
</td> | ||
if | ||
<td> | ||
<span class="text-success"> | ||
{{ $user->total_hours['billable'] }} | ||
|
@@ -89,6 +105,21 @@ class="{{ config('constants.review-tags.completed.class') }} badge-pill mr-1 mb- | |
{{ $user->total_hours['non_billable'] }} | ||
</span> | ||
</td> | ||
@else | ||
<td> | ||
@if($earningValue >= 0) | ||
<span class="text-success"> | ||
{{$earningValue}} | ||
<span class="d-inline-block pr-2 h-30 w-30">{!! file_get_contents(public_path('icons/green-tick.svg')) !!}</span> | ||
</span> | ||
@else | ||
<span class="text-secondary pl-2"> | ||
{{$earningValue}} | ||
<span class="d-inline-block h-30 w-30">{!! file_get_contents(public_path('icons/warning-symbol.svg')) !!}</span> | ||
</span> | ||
@endif | ||
</td> | ||
@endif | ||
</tr> | ||
@endforeach | ||
</table> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
resources/views/settings/employee-earning-threshold/index.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
@extends('user::layouts.master') | ||
|
||
@section('content') | ||
|
||
<form action="{{ route('settings.update-employee-earning-threshold') }}" method="POST"> | ||
@csrf | ||
<div class="container"> | ||
<div class="row justify-content-start"> | ||
<div class="col-6"> | ||
<label class="user-settings fz-24">Config Variable</label> | ||
</div> | ||
</div> | ||
<div class="col" id="user-settings-content"> | ||
<div class="card-body"> | ||
<h5 class="max-interview-heading fz-20"> Threshold value | ||
<input type="number" class="col-xs text-center outline-none h-40 w-auto rounded-12 quantity" id="quantity" name="employee_earning_threshold" value="{{ old('employee_earning_threshold', $employeeEarningThreshold) }}"> | ||
</h5> | ||
<input type="submit" class="btn btn-primary" value="Save"> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
@endsection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be in this seeder file. Please check if there are any seeder for employee. Add it there.