fix filtering dealer and data with base on user login, partial update precheck and postcheck schema and view
This commit is contained in:
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user