Conversation
Co-authored-by: kevalchokhaliya <kevalchokhaliya@gmail.com>
|
Cursor Agent can help with this pull request. Just |
|
Test |
1 similar comment
|
Test |
There was a problem hiding this comment.
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| 'password' => Hash::make($data['password']), | ||
| 'role' => 'employee', | ||
| 'email_verified_at' => now(), // keep onboarding simple | ||
| ]); |
There was a problem hiding this comment.
Bug: Employee email verification silently ignored during creation
When creating an employee, email_verified_at is passed to User::create() with the intention of marking the employee as verified. However, email_verified_at is not included in the User model's $fillable array, so Laravel's mass assignment protection silently ignores this field. The employee will be created without email verification, and since the web login checks hasVerifiedEmail(), admin-created employees will be unable to log in.
Implement employee shift management, attendance tracking, and overtime calculation with admin and mobile APIs.
The
WorkTimeCalculatorservice handles complex overtime logic, including accurate calculation for overnight shifts and partial shift overlaps, as per the user's requirements.Note
Introduce shift management and attendance (clock-in/out) with overtime calculation, admin dashboards/UI, mobile auth/API endpoints, and supporting models/migrations.
Shift,ShiftAssignment,AttendanceRecordwith tables and indexes; updateusersrole toemployee(wascustomer).WorkTimeCalculatorfor regular/overtime and overnight shift handling.POST /auth/login,POST /auth/logout(Sanctum tokens).GET /me,POST /attendance/clock-in,POST /attendance/clock-outwith shift resolution and validations.shifts(CRUD), list/createemployees, createassignments, view paginatedattendancewith computed hours.EnsureAdmin; protect routes underadminprefix./admin; remove customer register routes; update welcome view to showfirst_name/last_name.WorkTimeCalculatorincluding overnight scenarios.Written by Cursor Bugbot for commit 097a2bc. This will update automatically on new commits. Configure here.