From fdcfaec862bb38ff8bea95924d0b8b6cb645b551 Mon Sep 17 00:00:00 2001 From: brusnitsyn Date: Fri, 19 Dec 2025 00:35:42 +0900 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=BE=20=D0=BF=D0=BE=D0=BB=D0=B5=20=D0=B4=D0=B0?= =?UTF-8?q?=D1=82=D0=B0=20=D0=B0=D1=80=D1=85=D0=B8=D0=B2=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Resources/Mis/SttMedicalHistoryResource.php | 2 +- app/Http/Resources/SI/SttMedicalHistoryResource.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Resources/Mis/SttMedicalHistoryResource.php b/app/Http/Resources/Mis/SttMedicalHistoryResource.php index 638eae3..3195cba 100644 --- a/app/Http/Resources/Mis/SttMedicalHistoryResource.php +++ b/app/Http/Resources/Mis/SttMedicalHistoryResource.php @@ -22,7 +22,7 @@ class SttMedicalHistoryResource extends JsonResource 'dateextract' => Carbon::parse($this->DateExtract)->format('d.m.Y'), 'card_num' => $this->archiveInfo->num ?? null, 'status' => $this->archiveInfo->status ?? null, - 'datearhiv' => $this->archiveInfo?->post_at ? Carbon::parse($this->archiveInfo->post_at)->format('d.m.Y') : null, + 'datearhiv' => $this->whenLoaded('archiveInfo') ? Carbon::parse($this->archiveInfo->post_in)->format('d.m.Y') : null, 'medcardnum' => $this->MedCardNum, 'dr' => Carbon::parse($this->BD)->format('d.m.Y'), 'can_be_issue' => $this->canBeIssued() diff --git a/app/Http/Resources/SI/SttMedicalHistoryResource.php b/app/Http/Resources/SI/SttMedicalHistoryResource.php index 3b0522a..92cee8d 100644 --- a/app/Http/Resources/SI/SttMedicalHistoryResource.php +++ b/app/Http/Resources/SI/SttMedicalHistoryResource.php @@ -22,7 +22,7 @@ class SttMedicalHistoryResource extends JsonResource 'dateextract' => Carbon::parse($this->dateextract)->format('d.m.Y'), 'card_num' => $this->archiveInfo->num ?? null, 'status' => $this->archiveInfo->status ?? null, - 'datearhiv' => $this->archiveInfo?->post_at ? Carbon::parse($this->archiveInfo->post_at)->format('d.m.Y') : null, + 'datearhiv' => $this->whenLoaded('archiveInfo') ? Carbon::parse($this->archiveInfo->post_in)->format('d.m.Y') : null, 'medcardnum' => $this->medcardnum, 'dr' => Carbon::parse($this->dr)->format('d.m.Y'), 'can_be_issue' => $this->canBeIssued()