fix filtering dealer and data with base on user login, partial update precheck and postcheck schema and view

This commit is contained in:
2025-07-10 18:04:38 +07:00
parent cec11d6385
commit e52c4d1d27
13 changed files with 2139 additions and 9 deletions

View File

@@ -301,4 +301,24 @@ class User extends Authenticatable
->where('privileges.view', 1)
->exists();
}
/**
* Get all prechecks performed by this user
*
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function prechecks()
{
return $this->hasMany(Precheck::class, 'precheck_by');
}
/**
* Get all postchecks performed by this user
*
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function postchecks()
{
return $this->hasMany(Postcheck::class, 'postcheck_by');
}
}