Team 3 Doctor Activities for Neb 2 Form changes
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m43s Details

This commit is contained in:
Tanuja Pansare 2026-09-04 13:07:42 +05:30
parent a0c92ceaa2
commit b20d46a908
1 changed files with 151 additions and 6 deletions

View File

@ -75,7 +75,7 @@
{{-- <th>Team Name</th> --}}
<th>Type of meeting</th>
<th>Execution Date</th>
{{-- <th>Name of speaker</th> --}}
<th>Name of speaker</th>
<th>MSL Code</th>
<th>Speciality</th>
<th>No. of Doctors/Paramedics attended</th>
@ -106,7 +106,7 @@
<button type="button" class="btn btn-xs btn-info edit-btn"
plan_details="{{ json_encode($sub->formdata) }}"><i
class="mdi mdi-pencil"></i> Execute</button>
<button type="button" class="btn btn-danger btn-xs delete-btn" data-form-id="{{ $sub->formdata->form_id }}" data-id="{{ $sub->id }}">Delete</button>
<button type="button" class="btn btn-danger btn-xs delete-btn" data-form-id="{{ $sub->formdata->form_id }}" data-id="{{ $sub->id }}">Delete</button>
@ -114,6 +114,8 @@
<button type="button" class="btn btn-xs btn-info edit-plan-btn"
plan_details="{{ json_encode($sub->formdata) }}"><i
class="mdi mdi-pencil"></i> Edit Plan</button>
<button type="button" class="btn btn-danger btn-xs delete-btn" data-form-id="{{ $sub->formdata->form_id }}" data-id="{{ $sub->id }}">Delete</button>
@else
<button type="button" class="btn btn-danger btn-xs delete-btn" data-form-id="{{ $sub->formdata->form_id }}" data-id="{{ $sub->id }}">Delete</button>
@ -134,7 +136,7 @@
{{-- <td>{{ $sub->formdata->team_name }}</td> --}}
<td>{{ $sub->formdata->type_of_meeting }}</td>
<td>{{ $sub->formdata->record_date }}</td>
{{-- <td>{{$sub->formdata->name_of_the_speaker }}</td> --}}
<td>{{$sub->formdata->name_of_the_speaker}}</td>
<td>{{ $sub->formdata->msl_code }}</td>
<td>{{ $sub->formdata->speciality }}</td>
<td>{{ $sub->formdata->attendence }}</td>
@ -642,6 +644,9 @@
});
}
$('#execution-other_type_of_meeting').parent().hide();
$('#execution-other_type_of_meeting').attr('required',false);
$('#execution-type_of_meeting').on('change',function(){
let type_of_meet=$('#execution-type_of_meeting').val();
console.log("Type of Meet",type_of_meet);
@ -650,18 +655,29 @@
$('#execution-no_of_patients_on_duolin,#execution-no_of_units_duolin_respules').parent().show();
$('#execution-no_of_patients_on_duolin,#execution-no_of_units_duolin_respules').attr('required',true);
$('label[for="execution-name_of_the_speaker"]').html('Name of the Speaker (Pedia or GP only) ');
$('#execution-other_type_of_meeting').parent().hide();
$('#execution-other_type_of_meeting').attr('required',false);
}
else if(type_of_meet==='Other'){
$('#execution-other_type_of_meeting').parent().show();
$('#execution-other_type_of_meeting').attr('required',true);
}
else{
$('#execution-no_of_patients_on_duolin,#execution-no_of_units_duolin_respules').parent().hide();
$('#execution-no_of_patients_on_duolin,#execution-no_of_units_duolin_respules').attr('required',false);
$('label[for="execution-name_of_the_speaker"]').html('Name of the speaker');
$('#execution-other_type_of_meeting').parent().hide();
$('#execution-other_type_of_meeting').attr('required',false);
}
})
$('#execution-other_msl_code,#execution-other_speciality,#execution-other_speaker_name').parent().hide();
$('#execution-other_msl_code,#execution-other_speciality,#execution-other_speaker_name').attr('required',false);
let type_of_meet=$('#execution-type_of_meeting').val();
console.log("Type of Meet without change",type_of_meet);
@ -670,8 +686,10 @@
$('#execution-no_of_patients_on_duolin,#execution-no_of_units_duolin_respules').parent().show();
$('#execution-no_of_patients_on_duolin,#execution-no_of_units_duolin_respules').attr('required',true);
$('label[for="execution-name_of_the_speaker"]').html('Name of the Speaker (Pedia or GP only) ');
}
else{
$('#execution-no_of_patients_on_duolin,#execution-no_of_units_duolin_respules').parent().hide();
$('#execution-no_of_patients_on_duolin,#execution-no_of_units_duolin_respules').attr('required',false);
@ -681,6 +699,133 @@
})
$('.edit-plan-btn').click(function() {
let selected = JSON.parse($(this).attr('plan_details'))
let hierarchy = selected['hierarchy_id'] || '';
if (!hierarchy && selected['user_id']) {
hierarchy = $('#field-user_id option[value="' + selected['user_id'] + '"]').attr('hierarchy') || '';
}
for (let k of Object.keys(selected)) {
if (selected[k] != '') {
if (k == 'name_of_the_speaker' || k == 'other_speaker_name') {
continue;
} else {
$('#execution-' + k).val(selected[k]);
}
}
}
$('#execution-id').val(selected['id'])
if (selected['user_id'] && $('#execution-user_id').length) {
$('#execution-user_id').val(selected['user_id'])
}
if ($('#execution-hierarchy_id').length) {
$('#execution-hierarchy_id').val(hierarchy)
}
$('#execution-id').val(selected['id'])
$('#form-wrapper').hide()
$('#execution-form-wrapper').show()
$('#table-wrapper').hide()
$('#execution-no_of_patients_on_duolin').attr('max',10);
function setExecutionSpeakers(data) {
fillSpeakerDropdown($('#execution-name_of_the_speaker'), data, true);
if ($('#execution-other_speaker_name').length) {
fillOtherSpeakerDropdown($('#execution-other_speaker_name'), data);
}
applySpeakerValue($('#execution-name_of_the_speaker'), selected['name_of_the_speaker']);
applySpeakerValue($('#execution-other_speaker_name'), selected['other_speaker_name']);
}
if (hierarchy) {
$("#pageloader").fadeIn();
$.ajax({
type: "GET",
url: '/form/getdoctorlist?partition={{$form->partition}}&hierarchy=' + hierarchy,
processData: false,
contentType: false,
success: function(data) {
$("#pageloader").fadeOut();
setExecutionSpeakers(data);
},
error: function() {
$("#pageloader").fadeOut();
}
});
}
$('#execution-other_type_of_meeting').parent().hide();
$('#execution-other_type_of_meeting').attr('required',false);
$('#execution-no_of_patients_on_duolin,#execution-no_of_units_duolin_respules').parent().hide();
$('#execution-no_of_patients_on_duolin,#execution-no_of_units_duolin_respules').attr('required',false);
$('#execution-record_date,#execution-attendence,#execution-honorarium_amount,#execution-other_expenses,#execution-total_eas').parent().hide();
$('#execution-record_date,#execution-attendence,#execution-honorarium_amount,#execution-other_expenses,#execution-total_eas').attr('required',false);
$('#execution-type_of_meeting').on('change',function(){
let type_of_meet=$('#execution-type_of_meeting').val();
console.log("Type of Meet",type_of_meet);
if(type_of_meet==='GNP Camp'){
/*$('#execution-no_of_patients_on_duolin,#execution-no_of_units_duolin_respules').parent().show();
$('#execution-no_of_patients_on_duolin,#execution-no_of_units_duolin_respules').attr('required',true);
$('label[for="execution-name_of_the_speaker"]').html('Name of the Speaker (Pedia or GP only) ');
$('#execution-other_type_of_meeting').parent().hide();
$('#execution-other_type_of_meeting').attr('required',false);*/
}
else if(type_of_meet==='Other'){
$('#execution-other_type_of_meeting').parent().show();
$('#execution-other_type_of_meeting').attr('required',true);
}
else{
$('#execution-no_of_patients_on_duolin,#execution-no_of_units_duolin_respules').parent().hide();
$('#execution-no_of_patients_on_duolin,#execution-no_of_units_duolin_respules').attr('required',false);
$('label[for="execution-name_of_the_speaker"]').html('Name of the speaker');
$('#execution-other_type_of_meeting').parent().hide();
$('#execution-other_type_of_meeting').attr('required',false);
}
})
$('#execution-other_msl_code,#execution-other_speciality,#execution-other_speaker_name').parent().hide();
$('#execution-other_msl_code,#execution-other_speciality,#execution-other_speaker_name').attr('required',false);
let type_of_meet=$('#execution-type_of_meeting').val();
console.log("Type of Meet without change",type_of_meet);
$('#execution-name_of_the_speaker').change(function() {
$('#execution-msl_code').val($('option:selected', this).attr('msl_code'))
})
$('#execution-name_of_the_speaker').change(function() {
$('#execution-speciality').val($('option:selected', this).attr('speciality'))
})
$('#execution-other_speaker_name').change(function() {
$('#execution-other_msl_code').val($('option:selected', this).attr('msl_code'))
})
$('#execution-other_speaker_name').change(function() {
$('#execution-other_speciality').val($('option:selected', this).attr('speciality'))
})
})
$('#execution-msl_code,#execution-speciality,#execution-other_msl_code,#execution-other_speciality').attr('readonly',true);
$('#execution-name_of_the_speaker').change(function() {