* добавил объединение изменений движений

* добавил автоматическое создание движения при редактировании
* добавил функционал для сохранения отчета и пациентов
* изменил форматирование дат
* добавил частичную перезагрузку при сохранении изменений
This commit is contained in:
brusnitsyn
2026-05-05 17:06:15 +09:00
parent 51a4b5b9de
commit 717641e4bb
18 changed files with 712 additions and 60 deletions

View File

@@ -5,6 +5,7 @@ namespace App\Http\Controllers\Web;
use App\Http\Controllers\Controller;
use App\Models\Department;
use App\Services\DateRangeService;
use App\Services\NurseReportService;
use App\Services\UnifiedMedicalHistoryService;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
@@ -14,7 +15,8 @@ class NurseReportController extends Controller
{
public function __construct(
protected DateRangeService $dateRangeService,
protected UnifiedMedicalHistoryService $unifiedMedicalHistoryService
protected UnifiedMedicalHistoryService $unifiedMedicalHistoryService,
protected NurseReportService $nurseReportService,
)
{}
@@ -51,10 +53,16 @@ class NurseReportController extends Controller
/**
* Сохранение отчета от роли мед. сестра
* @return void
* @return \Illuminate\Http\RedirectResponse
*/
public function store()
public function store(Request $request)
{
$user = auth()->user();
$dateRange = $this->dateRangeService->getDateRangeFromRequest($request, $user);
$report = $this->nurseReportService->saveReport($dateRange);
$this->nurseReportService->saveSnapshot($dateRange, $report);
return redirect()->back();
}
}