Copd (Voltido RCPA)
Specific Folder FTP Upload / ftp-deploy (push) Successful in 3m37s Details

This commit is contained in:
zeeshan 2026-08-05 13:21:08 +05:30
parent 497bee44cb
commit f352499ad2
1 changed files with 33 additions and 14 deletions

View File

@ -93,7 +93,8 @@
@endphp @endphp
@if(count($submissions)===0 || $id)
{{-- @if(count($submissions)===0 || $id) --}}
<form method="POST" action="/form/submit" id="report-form" enctype="multipart/form-data"> <form method="POST" action="/form/submit" id="report-form" enctype="multipart/form-data">
<input type="hidden" name="form_id" value="{{$form_id}}"> <input type="hidden" name="form_id" value="{{$form_id}}">
@csrf @csrf
@ -175,17 +176,17 @@
@endif @endif
<div class="col-md-12 mb-2"> <div class="col-md-12 mb-2">
<label <label
for="field-{{$question->code}}" for="field-{{$question->code}}"
class="form-label @if($question->code=='contact_id') doctor-name-label @endif"> class="form-label @if($question->code=='contact_id') doctor-name-label @endif">
{{$question->question}} {{$question->question}}
@if($question->code=='contact_id') @if($question->code=='contact_id')
{{1}} {{1}}
@endif @endif
{!! $question->required == 'yes' ? '<span class="text-danger">*</span>' : '' !!} {!! $question->required == 'yes' ? '<span class="text-danger">*</span>' : '' !!}
</label> </label>
@switch($question->type) @switch($question->type)
@case('hidden') @case('hidden')
<input type="{{$question->type}}" id="field-{{$question->code}}" <input type="{{$question->type}}" id="field-{{$question->code}}"
@ -302,12 +303,12 @@
</div> </div>
@endif @endif
</form> </form>
@elseif(!$id) {{-- @elseif(!$id)
<h4> <h4>
You have already submitted Voltido RCPA data for <strong>{{ count($submissions) }}</strong> Doctor(s). You have already submitted Voltido RCPA data for <strong>{{ count($submissions) }}</strong> Doctor(s).
</h4> </h4>
@endif @endif --}}
</div> <!-- end card-body --> </div> <!-- end card-body -->
</div> </div>
<!-- end card --> <!-- end card -->
@ -806,7 +807,25 @@ preventDuplicateDoctors(filteredSubmittedDoctors);
width: '100%', width: '100%',
placeholder: '-- Select Doctor --' placeholder: '-- Select Doctor --'
}); });
preventDuplicateDoctors(); /* preventDuplicateDoctors(); */
// ===== NEW CODE =====
let activeSelections = [];
$('select[id^="field-contact_id"]').each(function () {
let val = $(this).val();
if (val) {
activeSelections.push(val);
}
});
let filteredSubmittedDoctors =
window.submittedDoctors.filter(
doctor => !activeSelections.includes(doctor)
);
preventDuplicateDoctors(filteredSubmittedDoctors);
// ===== END NEW CODE =====
$('select[id^="execution-"]').select2({ $('select[id^="execution-"]').select2({
@ -896,7 +915,7 @@ if ($('.doctor-wrapper').length < MAX_DOCTORS) {
$('#report-form').on('submit', function(event) { $('#report-form').on('submit', function(event) {
event.preventDefault(); event.preventDefault();
@if(!$id) /* @if(!$id)
let totalDoctors = $('.doctor-wrapper').length; let totalDoctors = $('.doctor-wrapper').length;
if (totalDoctors < MIN_DOCTORS || totalDoctors > MAX_DOCTORS) { if (totalDoctors < MIN_DOCTORS || totalDoctors > MAX_DOCTORS) {
@ -909,7 +928,7 @@ if ($('.doctor-wrapper').length < MAX_DOCTORS) {
return; return;
} }
@endif @endif */
$("#pageloader").fadeIn(); $("#pageloader").fadeIn();
$.ajax({ $.ajax({