Skip to content

Commit

Permalink
fixed calendar date issue
Browse files Browse the repository at this point in the history
fixed calendar date issue
  • Loading branch information
Sharifur committed Jan 22, 2024
2 parents c81ff88 + 5cec1be commit b0ce261
Show file tree
Hide file tree
Showing 90 changed files with 477 additions and 464 deletions.
4 changes: 2 additions & 2 deletions app/Http/Controllers/Admin/AttendanceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,15 @@ private function setDataForDB($current_att_type, $current_att_type1,$em=null)

public function new_attendance_log(Request $request){
$this->validate($request,[
'employee_id'=> 'nullable|numeric',
'employee_id'=> 'required_unless:type,==,holiday|numeric',
'type'=> 'required|string',
'date_time'=> 'required|string'
]);
$employee_details = Employee::find($request->employee_id);
AttendanceLog::create([
'employee_id'=> $request->employee_id,
'type'=> $request->type,
'date_time'=> Carbon::parse($request->date_time)->addDay(1),
'date_time'=> Carbon::parse($request->date_time),
'name'=> $employee_details->att_id ?? '',
'status' => 1
]);
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Admin/EmployeeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function attenadance_check_post(Request $request){
$OfficeDays = 0;
$sickLeaveCount = $logs->where('type','sick-leave')->count();
$paidLeaveCount =$logs->where('type','paid-leave')->count();
$workFormHome =$logs->where('type','work-form-home')->count();
$workFormHome =$logs->where('type','work-from-home')->count();
foreach( $logsInfo as $log){
if($log['working_nature'] === 'Office'){
$OfficeDays++;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b0ce261

Please sign in to comment.