Titans (Core HCP Network )- Final Code
Specific Folder FTP Upload / ftp-deploy (push) Successful in 39s
Details
Specific Folder FTP Upload / ftp-deploy (push) Successful in 39s
Details
This commit is contained in:
parent
be7991eab8
commit
7e27feb8f4
|
|
@ -89,9 +89,19 @@
|
||||||
@endphp
|
@endphp
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
@if(isset($sub->formdata->execution_done) && $sub->formdata->execution_done == 'yes' ) Execution Done
|
||||||
|
|
||||||
|
@else
|
||||||
<button type="button" class="btn btn-xs btn-info edit-btn"
|
<button type="button" class="btn btn-xs btn-info edit-btn"
|
||||||
plan_details="{{ json_encode($sub->formdata) }}"><i
|
plan_details="{{ json_encode($sub->formdata) }}"><i
|
||||||
class="mdi mdi-pencil"></i> Edit</button>
|
class="mdi mdi-pencil"></i> Edit</button>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
@endif
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td>{{ $sub->formdata->plan_date }}</td>
|
<td>{{ $sub->formdata->plan_date }}</td>
|
||||||
<td>{{ isset($sub->formdata->execution_done) && $sub->formdata->execution_done == 'yes' ? 'Yes' : 'No' }}
|
<td>{{ isset($sub->formdata->execution_done) && $sub->formdata->execution_done == 'yes' ? 'Yes' : 'No' }}
|
||||||
|
|
@ -196,54 +206,34 @@
|
||||||
{{ $question->required == 'yes' ? 'required' : '' }}>{{ isset($question->value) ? $question->value : '' }}</textarea>
|
{{ $question->required == 'yes' ? 'required' : '' }}>{{ isset($question->value) ? $question->value : '' }}</textarea>
|
||||||
@break
|
@break
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@case('dropdown')
|
@case('dropdown')
|
||||||
{{-- <select class="form-control" id="field-{{ $question->code }}" name="{{ $question->code }}" {{ $question->required == 'yes' ? 'required' : '' }}>
|
<select class="form-control" id="field-{{ $question->code }}" name="{{ $question->code }}" {{ ($question->required ?? '') == 'yes' ? 'required' : '' }}>
|
||||||
<option value=""> -- Select -- </option>
|
<option value=""> -- Select -- </option>
|
||||||
@if($question->code == 'contact_id' && isset($option->contact->type) && $option->contact->type == 'doctor')
|
|
||||||
@foreach ($question->options as $option)
|
@foreach ($question->options as $option)
|
||||||
@if( isset($option->contact->core_hcp_connect_drive_doctors) && $option->contact->core_hcp_connect_drive_doctors == 'Yes' )
|
@if ($question->code == 'contact_id')
|
||||||
<option value="{{ $option->value }}" msl_code="{{isset($option->contact->msl_code)?$option->contact->msl_code:''}}" speciality="{{isset($option->contact->speciality)?$option->contact->speciality:''}}" core_value="{{isset($option->contact->core_hcp_connect_drive_doctors_core_value)?$option->contact->core_hcp_connect_drive_doctors_core_value:''}}"
|
{{-- Only show doctors with connect drive enabled --}}
|
||||||
{{ isset($question->value) && $question->value == $option->value ? 'selected' : '' }}>
|
@if(($option->contact->type ?? null) == 'doctor' && ($option->contact->core_hcp_connect_drive_doctors ?? null) == 'Yes')
|
||||||
{{ $option->display }}
|
<option value="{{ $option->value }}"
|
||||||
</option>
|
msl_code="{{ $option->contact->msl_code ?? '' }}"
|
||||||
|
speciality="{{ $option->contact->speciality ?? '' }}"
|
||||||
|
core_value="{{ $option->contact->core_hcp_connect_drive_doctors_core_value ?? '' }}"
|
||||||
|
{{ isset($question->value) && $question->value == $option->value ? 'selected' : '' }}>
|
||||||
|
{{ $option->display }}
|
||||||
|
</option>
|
||||||
|
@endif
|
||||||
|
@else
|
||||||
|
{{-- Default options for other dropdowns --}}
|
||||||
|
<option value="{{ $option->value }}" {{ isset($question->value) && $question->value == $option->value ? 'selected' : '' }}>
|
||||||
|
{{ $option->display }}
|
||||||
|
</option>
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@else
|
</select>
|
||||||
@foreach ($question->options as $option)
|
|
||||||
<option value="{{ $option->value }}" {{ isset($question->value) && $question->value == $option->value ? 'selected' : '' }}>
|
|
||||||
{{ $option->display }}
|
|
||||||
</option>
|
|
||||||
@endforeach
|
|
||||||
@endif
|
|
||||||
|
|
||||||
</select> --}}
|
|
||||||
|
|
||||||
@case('dropdown')
|
|
||||||
<select class="form-control" id="field-{{ $question->code }}" name="{{ $question->code }}" {{ ($question->required ?? '') == 'yes' ? 'required' : '' }}>
|
|
||||||
<option value=""> -- Select -- </option>
|
|
||||||
|
|
||||||
@foreach ($question->options as $option)
|
|
||||||
@if ($question->code == 'contact_id')
|
|
||||||
{{-- Only show doctors with connect drive enabled --}}
|
|
||||||
@if (($option->contact->type ?? null) == 'doctor' && ($option->contact->core_hcp_connect_drive_doctors ?? null) == 'Yes')
|
|
||||||
<option value="{{ $option->value }}"
|
|
||||||
msl-code="{{ $option->contact->msl_code ?? '' }}"
|
|
||||||
speciality="{{ $option->contact->speciality ?? '' }}"
|
|
||||||
core-value="{{ $option->contact->core_hcp_connect_drive_doctors_core_value ?? '' }}"
|
|
||||||
{{ isset($question->value) && $question->value == $option->value ? 'selected' : '' }}>
|
|
||||||
{{ $option->display }}
|
|
||||||
</option>
|
|
||||||
@endif
|
|
||||||
@else
|
|
||||||
{{-- Default options for other dropdowns --}}
|
|
||||||
<option value="{{ $option->value }}" {{ isset($question->value) && $question->value == $option->value ? 'selected' : '' }}>
|
|
||||||
{{ $option->display }}
|
|
||||||
</option>
|
|
||||||
@endif
|
|
||||||
@endforeach
|
|
||||||
</select>
|
|
||||||
@break
|
|
||||||
@break
|
@break
|
||||||
|
|
||||||
|
|
||||||
@case('checkbox')
|
@case('checkbox')
|
||||||
@foreach ($question->options as $option)
|
@foreach ($question->options as $option)
|
||||||
|
|
@ -281,7 +271,7 @@
|
||||||
<input type="hidden" name="form_id" value="{{ $form_id }}">
|
<input type="hidden" name="form_id" value="{{ $form_id }}">
|
||||||
@csrf
|
@csrf
|
||||||
<input type="hidden" name="id" value="" id="execution-id">
|
<input type="hidden" name="id" value="" id="execution-id">
|
||||||
<input type="hidden" name="execution_done" value="yes">
|
{{-- <input type="hidden" name="execution_done" value="yes"> --}}
|
||||||
@foreach ($questions as $question)
|
@foreach ($questions as $question)
|
||||||
<div class="col-md-12 mb-2">
|
<div class="col-md-12 mb-2">
|
||||||
<label for="execution-{{ $question->code }}"
|
<label for="execution-{{ $question->code }}"
|
||||||
|
|
@ -319,25 +309,26 @@
|
||||||
@break
|
@break
|
||||||
|
|
||||||
@case('dropdown')
|
@case('dropdown')
|
||||||
<select class="form-control" id="execution-{{ $question->code }}"
|
<select class="form-control" id="execution-{{ $question->code }}" name="{{ $question->code }}" {{ ($question->required ?? '') == 'yes' ? 'required' : '' }}>
|
||||||
name="{{ $question->code }}"
|
|
||||||
{{ $question->required == 'yes' ? 'required' : '' }}>
|
|
||||||
<option value=""> -- Select -- </option>
|
<option value=""> -- Select -- </option>
|
||||||
|
|
||||||
@foreach ($question->options as $option)
|
@foreach ($question->options as $option)
|
||||||
@if($question->code == 'contact_id' && isset($option->contact->type) && $option->contact->type != 'Chemist' )
|
@if ($question->code == 'contact_id')
|
||||||
|
{{-- Only show doctors with connect drive enabled --}}
|
||||||
|
@if(($option->contact->type ?? null) == 'doctor' && ($option->contact->core_hcp_connect_drive_doctors ?? null) == 'Yes')
|
||||||
<option value="{{ $option->value }}"
|
<option value="{{ $option->value }}"
|
||||||
@if(isset($question->value) && $question->value == $option->value) selected @endif
|
msl_code="{{ $option->contact->msl_code ?? '' }}"
|
||||||
@if($question->code == 'contact_id')
|
speciality="{{ $option->contact->speciality ?? '' }}"
|
||||||
msl_code="{{ (isset($option->contact->msl_code) ? $option->contact->msl_code : '') }}"
|
core_value="{{ $option->contact->core_hcp_connect_drive_doctors_core_value ?? '' }}"
|
||||||
speciality="{{ (isset($option->contact->speciality) ? $option->contact->speciality : '') }}"
|
{{ isset($question->value) && $question->value == $option->value ? 'selected' : '' }}>
|
||||||
@endif
|
|
||||||
>
|
|
||||||
{{ $option->display }}
|
{{ $option->display }}
|
||||||
</option>
|
</option>
|
||||||
@elseif($question->code != 'contact_id')
|
@endif
|
||||||
<option value="{{ $option->value }}" {{ isset($question->value) && $question->value == $option->value ? 'selected' : '' }} {{ $question->code == 'contact_id' ? 'pcode= ' . (isset($option->contact->pcode)?$option->contact->pcode:'') . ' ' : '' }} {{ isset($question->value) && $question->value == $option->value ? 'selected' : '' }} {{ $question->code == 'contact_id' ? 'speciality= ' . (isset($option->contact->speciality) ? $option->contact->speciality :'') . ' ' : '' }} >
|
@else
|
||||||
{{ $option->display }}
|
{{-- Default options for other dropdowns --}}
|
||||||
</option>
|
<option value="{{ $option->value }}" {{ isset($question->value) && $question->value == $option->value ? 'selected' : '' }}>
|
||||||
|
{{ $option->display }}
|
||||||
|
</option>
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -411,10 +402,7 @@
|
||||||
$('#form-wrapper').hide()
|
$('#form-wrapper').hide()
|
||||||
$('#execution-form-wrapper').hide()
|
$('#execution-form-wrapper').hide()
|
||||||
|
|
||||||
// $('#add-camp-btn').click(function() {
|
|
||||||
// $('#form-wrapper').show()
|
|
||||||
// $('#table-wrapper').hide()
|
|
||||||
// })
|
|
||||||
|
|
||||||
$('#add-camp-btn').click(function() {
|
$('#add-camp-btn').click(function() {
|
||||||
$('#table-wrapper').hide(0)
|
$('#table-wrapper').hide(0)
|
||||||
|
|
@ -429,15 +417,27 @@
|
||||||
$('#execution-form-wrapper').show(100, () => {
|
$('#execution-form-wrapper').show(100, () => {
|
||||||
$('#add-camp-btn').hide(0);
|
$('#add-camp-btn').hide(0);
|
||||||
})
|
})
|
||||||
|
$('#execution-form').append('<input type="hidden" name="execution_done" value="yes" />');
|
||||||
$('#table-wrapper').hide()
|
$('#table-wrapper').hide()
|
||||||
let contacts = document.getElementById('execution-contact_id');
|
let contacts = document.getElementById('execution-contact_id');
|
||||||
contacts.addEventListener('mousedown', function(e) {
|
contacts.addEventListener('mousedown', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
})
|
})
|
||||||
|
|
||||||
|
let months = document.getElementById('execution-month_of_engagement');
|
||||||
|
months.addEventListener('mousedown', function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
})
|
||||||
|
|
||||||
|
let activity = document.getElementById('execution-activity');
|
||||||
|
activity.addEventListener('mousedown', function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
})
|
||||||
|
|
||||||
$('#execution-speciality').prop('readonly', true)
|
$('#execution-speciality').prop('readonly', true)
|
||||||
$('#execution-plan_date').prop('readonly', true)
|
$('#execution-plan_date').prop('readonly', true)
|
||||||
$('#execution-uid').prop('readonly', true);
|
$('#execution-msl_code').prop('readonly', true);
|
||||||
|
$('#execution-total').prop('readonly',true);
|
||||||
//$('#execution-time').prop('disabled', true)
|
//$('#execution-time').prop('disabled', true)
|
||||||
|
|
||||||
let selected = JSON.parse($(this).attr('plan_details'));
|
let selected = JSON.parse($(this).attr('plan_details'));
|
||||||
|
|
@ -447,19 +447,7 @@
|
||||||
}
|
}
|
||||||
console.log("Selected Doctor:", selected['contact_id']);
|
console.log("Selected Doctor:", selected['contact_id']);
|
||||||
|
|
||||||
if(selected['contact_id']==='others'){
|
|
||||||
$('#execution-other_doctor_name,#execution-other_speciality,#execution-other_msl_code').parent().show();
|
|
||||||
$('#execution-other_doctor_name,#execution-other_speciality,#execution-other_msl_code').prop({"required":true});
|
|
||||||
$('#execution-speciality,#execution-msl_code').parent().hide();
|
|
||||||
$('#execution-speciality,#execution-msl_code').prop({"required":false});
|
|
||||||
}
|
|
||||||
|
|
||||||
if(selected['contact_id']!='others'){
|
|
||||||
$('#execution-other_doctor_name,#execution-other_speciality,#execution-other_msl_code').parent().hide();
|
|
||||||
$('#execution-other_doctor_name,#execution-other_speciality,#execution-other_msl_code').prop({"required":false});
|
|
||||||
$('#execution-speciality,#execution-msl_code').parent().show();
|
|
||||||
$('#execution-speciality,#execution-msl_code').prop({"required":true});
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let k of Object.keys(selected)) {
|
for (let k of Object.keys(selected)) {
|
||||||
//console.log("k",k);
|
//console.log("k",k);
|
||||||
|
|
@ -486,10 +474,152 @@
|
||||||
$('#execution-contact_id').val(docid)
|
$('#execution-contact_id').val(docid)
|
||||||
$('#execution-id').val(selected['id'])
|
$('#execution-id').val(selected['id'])
|
||||||
|
|
||||||
|
$('#execution-no_of_flutter_utilized').closest('.col-md-12').after('<h4>Prescription Generated</h4>');
|
||||||
|
|
||||||
|
$('#execution-dpi,#execution-mdi,#execution-sync,#execution-cip').on('input', function() {
|
||||||
|
var total=(
|
||||||
|
(parseInt($('#execution-dpi').val()) ||0)+
|
||||||
|
(parseInt($('#execution-mdi').val()) ||0)+
|
||||||
|
(parseInt($('#execution-sync').val()) ||0)+
|
||||||
|
(parseInt($('#execution-cip').val()) ||0)
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
$('#execution-total').val(total);
|
||||||
|
|
||||||
|
$('#execution-no_of_flutter_utilized').on('keyup', function () {
|
||||||
|
let val = parseFloat($(this).val());
|
||||||
|
|
||||||
|
|
||||||
|
if ($(this).val() === '') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (val < 0 || isNaN(val)) {
|
||||||
|
$(this).val(0);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
$('.edit_plan-btn').click(function() {
|
||||||
|
$('#execution-form-wrapper').show(100, () => {
|
||||||
|
$('#add-camp-btn').hide(0);
|
||||||
|
})
|
||||||
|
$('#table-wrapper').hide()
|
||||||
|
|
||||||
|
$('#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').attr('required',false);
|
||||||
|
|
||||||
|
|
||||||
|
let selected = JSON.parse($(this).attr('plan_details'));
|
||||||
|
console.log("Plan Detail : ", selected);
|
||||||
|
if (selected['contact_id']) {
|
||||||
|
selected['contact_id'] = selected['contact_id'].trim();
|
||||||
|
}
|
||||||
|
console.log("Selected Doctor:", selected['contact_id']);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
for (let k of Object.keys(selected)) {
|
||||||
|
//console.log("k",k);
|
||||||
|
if (selected[k] != '') {
|
||||||
|
if (k == 'contact_id') {
|
||||||
|
//$("#execution-contact_id option:contains(" + selected[k] + ")").prop('selected', true)
|
||||||
|
// console.log($("#execution-contact_id option:contains(" + selected[k] + ")").attr('value'))
|
||||||
|
$('#execution-contact_id').val($("#execution-contact_id option:contains(" +
|
||||||
|
selected[k] + ")").attr('value'));
|
||||||
|
} else if (k == 'upload_photo_1' || k == 'upload_photo_2') {
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
$('#execution-' + k).val(selected[k]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// if(selected[k] != '')
|
||||||
|
// $('#execution-'+k).val(selected[k]);
|
||||||
|
}
|
||||||
|
|
||||||
|
let docid = $('#execution-contact_id option').map(function() {
|
||||||
|
if ($(this).text().trim() == selected['contact_id'] || $(this).val().trim() == selected['cont_id']) return this;
|
||||||
|
}).attr('value')
|
||||||
|
|
||||||
|
$('#execution-contact_id').val(docid)
|
||||||
|
$('#execution-id').val(selected['id'])
|
||||||
|
|
||||||
|
|
||||||
|
$('#execution-dpi,#execution-mdi,#execution-sync,#execution-cip').on('input', function() {
|
||||||
|
var total=(
|
||||||
|
(parseInt($('#execution-dpi').val()) ||0)+
|
||||||
|
(parseInt($('#execution-mdi').val()) ||0)+
|
||||||
|
(parseInt($('#execution-sync').val()) ||0)+
|
||||||
|
(parseInt($('#execution-cip').val()) ||0)
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
$('#execution-total').val(total);
|
||||||
|
|
||||||
|
$('#execution-no_of_flutter_utilized').on('keyup', function () {
|
||||||
|
let val = parseFloat($(this).val());
|
||||||
|
|
||||||
|
|
||||||
|
if ($(this).val() === '') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (val < 0 || isNaN(val)) {
|
||||||
|
$(this).val(0);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
$('#execution-contact_id').change(function() {
|
||||||
|
$('#execution-speciality').val($('option:selected', this).attr('speciality'))
|
||||||
|
})
|
||||||
|
|
||||||
|
$('#execution-contact_id').change(function() {
|
||||||
|
$('#execution-msl_code').val($('option:selected', this).attr('msl_code'))
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
$('#execution-contact_id').change(function() {
|
||||||
|
$('#execution-core_value').val($('option:selected', this).attr('core_value'))
|
||||||
|
})
|
||||||
|
|
||||||
|
$('#execution-msl_code').prop('readonly', true);
|
||||||
|
$('#execution-speciality').prop('readonly', true);
|
||||||
|
$('#execution-core_value').prop('readonly', true);
|
||||||
|
|
||||||
|
|
||||||
|
const monthNames = [
|
||||||
|
"January", "February", "March", "April", "May", "June",
|
||||||
|
"July", "August", "September", "October", "November", "December"
|
||||||
|
];
|
||||||
|
|
||||||
|
$('#execution-plan_date').on('change', function () {
|
||||||
|
const selectedDateVal = $(this).val(); // e.g. "2026-10-15"
|
||||||
|
|
||||||
|
if (selectedDateVal) {
|
||||||
|
// 'YYYY-MM-DD' split karun month extract karane (timezone issue yet nahi)
|
||||||
|
const parts = selectedDateVal.split('-');
|
||||||
|
const monthIndex = parseInt(parts[1], 10) - 1; // 0-based index (0 = January)
|
||||||
|
const monthName = monthNames[monthIndex];
|
||||||
|
|
||||||
|
// Dropdown madhe toh month select karne
|
||||||
|
$('#execution-month_of_engagement').val(monthName).trigger('change');
|
||||||
|
} else {
|
||||||
|
// Jar user ne date clear keli tar dropdown reset karne
|
||||||
|
$('#execution-month_of_engagement').val('').trigger('change');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
$('#report-form').on('submit', function(event) {
|
$('#report-form').on('submit', function(event) {
|
||||||
|
|
@ -532,43 +662,43 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
$('#field-contact_id').change(function() {
|
||||||
|
$('#field-core_value').val($('option:selected', this).attr('core_value'))
|
||||||
|
})
|
||||||
|
|
||||||
$('#field-msl_code').prop('readonly', true);
|
$('#field-msl_code').prop('readonly', true);
|
||||||
$('#field-speciality').prop('readonly', true);
|
$('#field-speciality').prop('readonly', true);
|
||||||
|
$('#field-core_value').prop('readonly', true);
|
||||||
|
|
||||||
|
|
||||||
$('#field-other_doctor_name,#field-other_speciality,#field-other_msl_code').prop({"required":false});
|
|
||||||
$('#field-other_doctor_name,#field-other_speciality,#field-other_msl_code').parent().hide();
|
|
||||||
|
|
||||||
|
|
||||||
$('#field-contact_id').on('change',function(){
|
|
||||||
let dropDown=$('#field-contact_id').val();
|
|
||||||
if(dropDown==='others'){
|
|
||||||
$('#field-other_doctor_name,#field-other_speciality,#field-other_msl_code').parent().show();
|
|
||||||
$('#field-other_doctor_name,#field-other_speciality,#field-other_msl_code').prop({"required":true});
|
|
||||||
$('#field-speciality,#field-msl_code').parent().hide();
|
|
||||||
$('#field-speciality,#field-msl_code').prop({"required":false});
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
$('#field-other_doctor_name,#field-other_speciality,#field-other_msl_code').parent().hide();
|
|
||||||
$('#field-other_doctor_name,#field-other_speciality,#field-other_msl_code').prop({"required":false});
|
|
||||||
$('#field-speciality,#field-msl_code').parent().show();
|
|
||||||
$('#field-speciality,#field-msl_code').prop({"required":true});
|
|
||||||
|
|
||||||
}
|
$(document).ready(function () {
|
||||||
})
|
const monthNames = [
|
||||||
|
"January", "February", "March", "April", "May", "June",
|
||||||
|
"July", "August", "September", "October", "November", "December"
|
||||||
|
];
|
||||||
|
|
||||||
//$('#field-contact_id').append('<option value="others">Others</option>');
|
$('#field-plan_date').on('change', function () {
|
||||||
|
const selectedDateVal = $(this).val(); // e.g. "2026-10-15"
|
||||||
$('#execution-sitazit_d_rx,#execution-sitazit_dm_rx,#execution-ziten_m_rx').on('input', function() {
|
|
||||||
var total=(
|
|
||||||
(parseInt($('#execution-sitazit_d_rx').val()) ||0)+
|
|
||||||
(parseInt($('#execution-sitazit_dm_rx').val()) ||0)+
|
|
||||||
(parseInt($('#execution-ziten_m_rx').val()) ||0)
|
|
||||||
);
|
|
||||||
|
|
||||||
|
if (selectedDateVal) {
|
||||||
$('#execution-total_camp_rx').val(total)
|
// 'YYYY-MM-DD' split karun month extract karane (timezone issue yet nahi)
|
||||||
})
|
const parts = selectedDateVal.split('-');
|
||||||
|
const monthIndex = parseInt(parts[1], 10) - 1; // 0-based index (0 = January)
|
||||||
|
const monthName = monthNames[monthIndex];
|
||||||
|
|
||||||
|
// Dropdown madhe toh month select karne
|
||||||
|
$('#field-month_of_engagement').val(monthName).trigger('change');
|
||||||
|
} else {
|
||||||
|
// Jar user ne date clear keli tar dropdown reset karne
|
||||||
|
$('#field-month_of_engagement').val('').trigger('change');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue