Titans Form Changes - Core HCP Connect Drive
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m47s
Details
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m47s
Details
This commit is contained in:
parent
8478dfdcd3
commit
d0765b9a8c
|
|
@ -69,7 +69,7 @@
|
||||||
<th>PCODE </th>
|
<th>PCODE </th>
|
||||||
<th>Speciality</th>
|
<th>Speciality</th>
|
||||||
<th>Month of Engagement</th>
|
<th>Month of Engagement</th>
|
||||||
<th>Core Value</th>
|
<!-- <th>Core Value</th> -->
|
||||||
<th>Activity</th>
|
<th>Activity</th>
|
||||||
<th>Executed as per Plan</th>
|
<th>Executed as per Plan</th>
|
||||||
<th>No. of Flutter Utilized</th>
|
<th>No. of Flutter Utilized</th>
|
||||||
|
|
@ -89,17 +89,24 @@
|
||||||
@endphp
|
@endphp
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@if(isset($sub->formdata->execution_done) && $sub->formdata->execution_done == 'yes' ) Execution Done
|
@if(isset($sub->formdata->execution_done) && $sub->formdata->execution_done == 'yes')
|
||||||
|
|
||||||
@else
|
Execution Done
|
||||||
<button type="button" class="btn btn-xs btn-info edit-btn"
|
|
||||||
plan_details="{{ json_encode($sub->formdata) }}"><i
|
@elseif(isset($sub->workflow_status) && $sub->workflow_status == 'approved')
|
||||||
class="mdi mdi-pencil"></i> Execute</button>
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
@elseif(isset($sub->workflow_status) && $sub->workflow_status == 'rejected')
|
||||||
|
|
||||||
<button type="button" class="btn btn-xs btn-info edit_plan-btn"
|
<button type="button" class="btn btn-xs btn-info edit_plan-btn"
|
||||||
plan_details="{{ json_encode($sub->formdata) }}"><i
|
plan_details="{{ json_encode($sub->formdata) }}">
|
||||||
class="mdi mdi-pencil"></i> Edit Plan</button>
|
<i class="mdi mdi-pencil"></i> Edit Plan
|
||||||
|
</button>
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -154,6 +161,10 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="form-wrapper">
|
<div id="form-wrapper">
|
||||||
|
<div class="alert alert-info mb-3">
|
||||||
|
<strong>Please ensure to add Plan for all your Core Drs which will be executed during the period Oct 2026 - Dec 2026</strong>
|
||||||
|
</div>
|
||||||
|
|
||||||
<form method="POST" action="/form/submit" id="report-form"
|
<form method="POST" action="/form/submit" id="report-form"
|
||||||
enctype="multipart/form-data">
|
enctype="multipart/form-data">
|
||||||
<input type="hidden" name="form_id" value="{{ $form_id }}">
|
<input type="hidden" name="form_id" value="{{ $form_id }}">
|
||||||
|
|
@ -171,6 +182,7 @@
|
||||||
'sync',
|
'sync',
|
||||||
'cip',
|
'cip',
|
||||||
'total',
|
'total',
|
||||||
|
'no_of_patients_screened',
|
||||||
]))
|
]))
|
||||||
@continue
|
@continue
|
||||||
@endif
|
@endif
|
||||||
|
|
@ -405,6 +417,10 @@
|
||||||
$('#form-wrapper').hide()
|
$('#form-wrapper').hide()
|
||||||
$('#execution-form-wrapper').hide()
|
$('#execution-form-wrapper').hide()
|
||||||
|
|
||||||
|
// Patients Screened should only appear in Execution view for LHC
|
||||||
|
$('#execution-no_of_patients_screened').closest('.col-md-12').hide();
|
||||||
|
$('#execution-no_of_patients_screened').prop('required', false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('#add-camp-btn').click(function() {
|
$('#add-camp-btn').click(function() {
|
||||||
|
|
@ -474,6 +490,7 @@
|
||||||
// if(selected[k] != '')
|
// if(selected[k] != '')
|
||||||
// $('#execution-'+k).val(selected[k]);
|
// $('#execution-'+k).val(selected[k]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let docid = $('#execution-contact_id option').map(function() {
|
let docid = $('#execution-contact_id option').map(function() {
|
||||||
if ($(this).text().trim() == selected['contact_id'] || $(this).val().trim() == selected['cont_id']) return this;
|
if ($(this).text().trim() == selected['contact_id'] || $(this).val().trim() == selected['cont_id']) return this;
|
||||||
|
|
@ -481,8 +498,55 @@
|
||||||
|
|
||||||
$('#execution-contact_id').val(docid)
|
$('#execution-contact_id').val(docid)
|
||||||
$('#execution-id').val(selected['id'])
|
$('#execution-id').val(selected['id'])
|
||||||
|
// Show Patients Screened only for LHC during Execution
|
||||||
|
const selectedActivity = ($('#execution-activity').val() || '').trim().toUpperCase();
|
||||||
|
|
||||||
$('#execution-no_of_flutter_utilized').closest('.col-md-12').after('<h4>Prescription Generated</h4>');
|
if (selectedActivity === 'LHC') {
|
||||||
|
$('#execution-no_of_patients_screened')
|
||||||
|
.closest('.col-md-12')
|
||||||
|
.show();
|
||||||
|
|
||||||
|
$('#execution-no_of_patients_screened')
|
||||||
|
.prop('required', true);
|
||||||
|
} else {
|
||||||
|
$('#execution-no_of_patients_screened')
|
||||||
|
.closest('.col-md-12')
|
||||||
|
.hide();
|
||||||
|
|
||||||
|
$('#execution-no_of_patients_screened')
|
||||||
|
.prop('required', false)
|
||||||
|
.val('');
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#execution-activity').off('change.patientsScreened').on('change.patientsScreened', function () {
|
||||||
|
|
||||||
|
const activity = ($(this).val() || '').trim().toUpperCase();
|
||||||
|
|
||||||
|
if (activity === 'LHC') {
|
||||||
|
|
||||||
|
$('#execution-no_of_patients_screened')
|
||||||
|
.closest('.col-md-12')
|
||||||
|
.show();
|
||||||
|
|
||||||
|
$('#execution-no_of_patients_screened')
|
||||||
|
.prop('required', true);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$('#execution-no_of_patients_screened')
|
||||||
|
.closest('.col-md-12')
|
||||||
|
.hide();
|
||||||
|
|
||||||
|
$('#execution-no_of_patients_screened')
|
||||||
|
.prop('required', false)
|
||||||
|
.val('');
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#execution-no_of_patients_screened')
|
||||||
|
.closest('.col-md-12')
|
||||||
|
.after('<h4>Prescription Generated</h4>');
|
||||||
|
|
||||||
$('#execution-dpi,#execution-mdi,#execution-sync,#execution-cip').on('input', function() {
|
$('#execution-dpi,#execution-mdi,#execution-sync,#execution-cip').on('input', function() {
|
||||||
var total=(
|
var total=(
|
||||||
|
|
@ -520,6 +584,13 @@
|
||||||
$('#add-camp-btn').hide(0);
|
$('#add-camp-btn').hide(0);
|
||||||
})
|
})
|
||||||
$('#table-wrapper').hide()
|
$('#table-wrapper').hide()
|
||||||
|
// Restrict Edit Plan date selection to Oct 1, 2026 - Dec 31, 2026
|
||||||
|
$('#execution-plan_date').attr('min', '2026-10-01');
|
||||||
|
$('#execution-plan_date').attr('max', '2026-12-31');
|
||||||
|
|
||||||
|
// Edit Plan: Patients Screened is NOT applicable
|
||||||
|
$('#execution-no_of_patients_screened').closest('.col-md-12').hide();
|
||||||
|
$('#execution-no_of_patients_screened').prop('required', false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -531,8 +602,8 @@
|
||||||
console.log("Selected Doctor:", selected['contact_id']);
|
console.log("Selected Doctor:", selected['contact_id']);
|
||||||
|
|
||||||
|
|
||||||
$('#execution-execution_as_per_plan,#execution-execution_date,#execution-no_of_flutter_utilized,#execution-dpi,#execution-mdi,#execution-sync,#execution-cip,#execution-total').parent().hide();
|
$('#execution-execution_as_per_plan,#execution-execution_date,#execution-no_of_flutter_utilized,#execution-dpi,#execution-mdi,#execution-sync,#execution-cip,#execution-total,#execution-no_of_patients_screened').parent().hide();
|
||||||
$('#execution-execution_as_per_plan,#execution-execution_date,#execution-no_of_flutter_utilized,#execution-dpi,#execution-mdi,#execution-sync,#execution-cip,#execution-total').prop('required',false);
|
$('#execution-execution_as_per_plan,#execution-execution_date,#execution-no_of_flutter_utilized,#execution-dpi,#execution-mdi,#execution-sync,#execution-cip,#execution-total,#execution-no_of_patients_screened').prop('required',false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -554,6 +625,8 @@
|
||||||
// $('#execution-'+k).val(selected[k]);
|
// $('#execution-'+k).val(selected[k]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let docid = $('#execution-contact_id option').map(function() {
|
let docid = $('#execution-contact_id option').map(function() {
|
||||||
if ($(this).text().trim() == selected['contact_id'] || $(this).val().trim() == selected['cont_id']) return this;
|
if ($(this).text().trim() == selected['contact_id'] || $(this).val().trim() == selected['cont_id']) return this;
|
||||||
}).attr('value')
|
}).attr('value')
|
||||||
|
|
@ -596,9 +669,17 @@
|
||||||
$('#execution-core_value').parent().hide();
|
$('#execution-core_value').parent().hide();
|
||||||
$('#execution-core_value').prop('required',false);
|
$('#execution-core_value').prop('required',false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$('#execution-no_of_patients_screened').on('input', function () {
|
||||||
|
|
||||||
|
let value = $(this).val();
|
||||||
|
|
||||||
|
// Remove everything except digits
|
||||||
|
value = value.replace(/[^0-9]/g, '');
|
||||||
|
|
||||||
|
$(this).val(value);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -650,6 +731,7 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
$('#report-form').on('submit', function(event) {
|
$('#report-form').on('submit', function(event) {
|
||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
$("#pageloader").fadeIn();
|
$("#pageloader").fadeIn();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
|
@ -746,14 +828,41 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#execution-form').on('submit', function(event) {
|
$('#execution-form').on('submit', function(event) {
|
||||||
event.preventDefault();
|
|
||||||
$("#pageloader").fadeIn();
|
const activity = ($('#execution-activity').val() || '').trim().toUpperCase();
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
if (activity === 'LHC') {
|
||||||
url: '/form/ajaxsubmit',
|
|
||||||
data: new FormData($('#execution-form')[0]),
|
const patientsScreened = $('#execution-no_of_patients_screened').val();
|
||||||
processData: false,
|
|
||||||
contentType: false,
|
if (
|
||||||
|
patientsScreened === '' ||
|
||||||
|
!/^\d+$/.test(patientsScreened)
|
||||||
|
) {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Invalid No. of Patients Screened',
|
||||||
|
text: 'Please enter a valid whole number. Negative numbers and decimal values are not allowed.'
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#execution-no_of_patients_screened').focus();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
$("#pageloader").fadeIn();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: '/form/ajaxsubmit',
|
||||||
|
data: new FormData($('#execution-form')[0]),
|
||||||
|
processData: false,
|
||||||
|
contentType: false,
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
$("#pageloader").fadeOut();
|
$("#pageloader").fadeOut();
|
||||||
if (data.status == 'success') {
|
if (data.status == 'success') {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue