-
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
Conversation
Coverage report for commit: e59722a
Summary - Lines: 2.93% | Methods: 5.14%
🤖 comment via lucassabreu/comment-coverage-clover |
Passing run #8306 ↗︎Details:
Review all test suite changes for PR #3525 ↗︎ |
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.
Left some comments, @shubtiwari Please take a look
Auth::user()->meta()->updateOrCreate( | ||
['meta_key' => 'profitability_threshold_value'], | ||
['meta_value' => $request->profitability_threshold_value] | ||
); | ||
|
||
return redirect()->back()->with('status', 'Saved Successfully!'); |
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.
These values should go in settings table rather than user_meta, since it's a system variable
@section('content') | ||
|
||
@php | ||
$route_name = Route::getCurrentRoute()->getName(); |
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.
We use camelCasing for variables here, let's replace it with $routeName
all across
@@ -30,6 +34,7 @@ | |||
<thead class="thead-dark"> | |||
<tr class="sticky-top"> | |||
<th>Name</th> | |||
@if($route_name==="employee") |
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.
@if($route_name==="employee") | |
@if($routeName === "employee") |
<th> | ||
Employee Earning | ||
<span class="tooltip-wrapper" data-html="true" data-toggle="tooltip" title="In Hours"> | ||
<i class="fa fa-info-circle" aria-hidden="true"></i> |
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.
Rather than tooltip we need to use alert symbol here
<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-100 rounded-12 quantity" id="quantity" name="profitability_threshold_value" min="1" max="1000000" value="{{ old ('profitability_threshold_value', Auth::user()->metaValue('profitability_threshold_value')) }}"> |
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.
Let's not put a limit here, it can increase and decrease as per the organizations steam
routes/web.php
Outdated
Route::get('/profitability-threshold-value', 'profitabilityController@index')->name('settings.profitability-threshold-value'); | ||
Route::post('/profitability-threshold-value', 'profitabilityController@update')->name('settings.update-profitability-threshold-value'); |
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.
It's minimum earning threshold to make an employee profitable, instead of a profitability threshold. Let's update the name, as profitability is not what is defined by this route variable. It can be employee-earning-threshold
…at/profitability-employee-list
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3525 +/- ##
===========================================
- Coverage 3.32% 3.31% -0.02%
- Complexity 588 590 +2
===========================================
Files 103 104 +1
Lines 2103 2112 +9
===========================================
Hits 70 70
- Misses 2033 2042 +9 ☔ View full report in Codecov by Sentry. |
Permission::updateOrCreate(['name' => 'employee_profitability_list.view']); | ||
|
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.
c90f363
to
882f99e
Compare
Targets #3534
Description of the changes
Query need to be hit to add the permission value
Breakdown & Estimates
Expected Time Range:
Actual Time:
Feedback Cycle
Cycle Count: 0
Checklist: