* блокировка изменения отчета для врача
* вывод данных из отчетов для ролей адм и зав * поправил ширину стобцов ввода * добавил календарь на страницу статистики * переделал календарь у заведующего на странице отчета * добавил и привязал метрики в статистику
This commit is contained in:
@@ -31,4 +31,9 @@ class Department extends Model
|
||||
{
|
||||
return $this->hasMany(Report::class, 'rf_department_id', 'department_id');
|
||||
}
|
||||
|
||||
public function departmentType()
|
||||
{
|
||||
return $this->belongsTo(DepartmentType::class, 'rf_department_type', 'department_type_id');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,4 +31,14 @@ class Report extends Model
|
||||
{
|
||||
return $this->hasMany(UnwantedEvent::class, 'rf_report_id', 'report_id');
|
||||
}
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'rf_user_id');
|
||||
}
|
||||
|
||||
public function lpuDoctor()
|
||||
{
|
||||
return $this->belongsTo(MisLpuDoctor::class, 'rf_lpudoctor_id');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,6 +103,11 @@ class User extends Authenticatable
|
||||
return $this->currentRole()->slug === 'head_of_department';
|
||||
}
|
||||
|
||||
public function lpuDoctor()
|
||||
{
|
||||
return $this->belongsTo(MisLpuDoctor::class, 'rf_lpudoctor_id');
|
||||
}
|
||||
|
||||
// Получение доступных отделений
|
||||
public function availableDepartments()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user