fix(departments): fix contact info editing, cache invalidation, and pivot data display
- User model: add missing pivot columns (service_email, service_phone, cabinet, sort) to departments_work() and departments_teach() withPivot - ListDepartmentWorkersAction/TeachersAction: fix where() to wherePivot() for position filters - Dashboard Workers/Teachers Index.vue: display validation errors in add/edit modals - Dashboard Workers/Teachers Index.vue: add links to client person pages - DepartmentCacheService: clear person_* cache when department data changes - Filament WorkersRelationManager/TeachersRelationManager: fix pivot columns in table (pivot.position etc), add cache clearing on edit/detach/bulk actions
This commit is contained in:
@@ -17,7 +17,7 @@ class ListDepartmentTeachersAction
|
||||
|
||||
// Фильтр по должности
|
||||
if (!empty($filters['position'])) {
|
||||
$query->where('teaching_position', 'like', '%' . $filters['position'] . '%');
|
||||
$query->wherePivot('teaching_position', 'like', '%' . $filters['position'] . '%');
|
||||
}
|
||||
|
||||
$teachers = $query->orderBy('teachers_departments.sort')->paginate(20)->withQueryString();
|
||||
|
||||
@@ -18,7 +18,7 @@ class ListDepartmentWorkersAction
|
||||
|
||||
// Фильтр по должности
|
||||
if (!empty($filters['position'])) {
|
||||
$query->where('position', 'like', '%' . $filters['position'] . '%');
|
||||
$query->wherePivot('position', 'like', '%' . $filters['position'] . '%');
|
||||
}
|
||||
|
||||
$workers = $query->orderBy('workers_departments.sort')->paginate(20)->withQueryString();
|
||||
|
||||
Reference in New Issue
Block a user