* блокировка изменения отчета для врача

* вывод данных из отчетов для ролей адм и зав
* поправил ширину стобцов ввода
* добавил календарь на страницу статистики
* переделал календарь у заведующего на странице отчета
* добавил и привязал метрики в статистику
This commit is contained in:
brusnitsyn
2026-02-03 17:03:37 +09:00
parent 2805e5e4bc
commit 9ee33bc517
20 changed files with 889 additions and 159 deletions

View File

@@ -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');
}
}

View File

@@ -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');
}
}

View File

@@ -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()
{