Adding delay and penalty calculations
This commit is contained in:
+5
-2
@@ -29,6 +29,7 @@ class User extends Authenticatable
|
||||
'chatid',
|
||||
'name',
|
||||
'number',
|
||||
'birthday',
|
||||
'password',
|
||||
'user_name',
|
||||
'is_admin',
|
||||
@@ -53,7 +54,9 @@ class User extends Authenticatable
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [];
|
||||
return [
|
||||
'birthday' => 'date',
|
||||
];
|
||||
}
|
||||
|
||||
public function task()
|
||||
@@ -78,7 +81,7 @@ class User extends Authenticatable
|
||||
{
|
||||
|
||||
return $this->hasMany(Attendance::class, 'user_identity', 'user_name')
|
||||
->select('id', 'user_identity', 'entered_at', 'exited_at', 'duration','requested', 'distance', 'distance_exit')
|
||||
->select('id', 'user_identity', 'entered_at', 'exited_at', 'duration', 'requested', 'distance', 'distance_exit', 'late_minutes', 'daily_fine_minutes', 'daily_fine_amount')
|
||||
->orderBy('entered_at', 'desc');
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user