From b93b0b04aec2600868c7a0ee862bb44ee9d79925 Mon Sep 17 00:00:00 2001 From: zeeshan Date: Fri, 9 Oct 2026 15:02:32 +0530 Subject: [PATCH] Team 4 (MONTAIR LC Kid 5 Dr Conversion) Error Fix --- ...495344-e823f5ac-f7a7-477b-926f-62a066a6c718.blade.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/resources/views/form/rapport-team4/1788495344-e823f5ac-f7a7-477b-926f-62a066a6c718.blade.php b/resources/views/form/rapport-team4/1788495344-e823f5ac-f7a7-477b-926f-62a066a6c718.blade.php index b3146fe5..e7cf47f8 100644 --- a/resources/views/form/rapport-team4/1788495344-e823f5ac-f7a7-477b-926f-62a066a6c718.blade.php +++ b/resources/views/form/rapport-team4/1788495344-e823f5ac-f7a7-477b-926f-62a066a6c718.blade.php @@ -58,7 +58,10 @@ } } - $historyDoctorIds = array_unique($historyDoctorIds); + /* $historyDoctorIds = array_unique($historyDoctorIds); */ + + $historyDoctorIds = array_values(array_unique($historyDoctorIds)); + @endphp @@ -299,7 +302,9 @@ $('#field-legacy_code').val($('option:selected', this).attr('msl_code')); }); - let historyDoctorIds = @json($historyDoctorIds).map(String); + /* let historyDoctorIds = @json($historyDoctorIds).map(String); */ + let rawHistory = @json($historyDoctorIds); +let historyDoctorIds = (Array.isArray(rawHistory) ? rawHistory : Object.values(rawHistory || {})).map(String); console.log("HISTORY DOCTOR IDS:", historyDoctorIds); // 🔥 NEW - Disable doctors that were already submitted // NEW - DEBUG duplicate doctor check