Team 4 (Mother Forum )Load doctors for ABM
Specific Folder FTP Upload / ftp-deploy (push) Successful in 37s
Details
Specific Folder FTP Upload / ftp-deploy (push) Successful in 37s
Details
This commit is contained in:
parent
60247d13b8
commit
9fe098ec0b
|
|
@ -6,11 +6,10 @@
|
||||||
<link href="{{asset('assets/libs/sweetalert2/sweetalert2.min.css')}}" rel="stylesheet" type="text/css" />
|
<link href="{{asset('assets/libs/sweetalert2/sweetalert2.min.css')}}" rel="stylesheet" type="text/css" />
|
||||||
<link href="{{ asset('assets/libs/select2/select2.min.css') }}" rel="stylesheet" type="text/css" />
|
<link href="{{ asset('assets/libs/select2/select2.min.css') }}" rel="stylesheet" type="text/css" />
|
||||||
</head>
|
</head>
|
||||||
|
<div id="pageloader">
|
||||||
<body class="loading">
|
|
||||||
<div id="pageloader">
|
|
||||||
<img src="http://cdnjs.cloudflare.com/ajax/libs/semantic-ui/0.16.1/images/loader-large.gif" alt="processing..." />
|
<img src="http://cdnjs.cloudflare.com/ajax/libs/semantic-ui/0.16.1/images/loader-large.gif" alt="processing..." />
|
||||||
</div>
|
</div>
|
||||||
|
<body class="loading">
|
||||||
<div class="account-pages">
|
<div class="account-pages">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
|
|
@ -48,7 +47,7 @@
|
||||||
|
|
||||||
|
|
||||||
@endphp
|
@endphp
|
||||||
@if(count($submissions) ==0 || !empty($id) )
|
@if(count($submissions) ==0)
|
||||||
<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}}">
|
||||||
<input type="hidden" name="user_id" value="{{$form->user_id}}">
|
<input type="hidden" name="user_id" value="{{$form->user_id}}">
|
||||||
|
|
@ -57,20 +56,7 @@
|
||||||
@if($id)
|
@if($id)
|
||||||
<input type="hidden" name="id" value="{{$id}}">
|
<input type="hidden" name="id" value="{{$id}}">
|
||||||
@endif
|
@endif
|
||||||
{{-- @if(isset($form->manager_can_submit) && $form->manager_can_submit == true)
|
|
||||||
<div class="col-md-12 mb-2">
|
|
||||||
<label for="field-user_id" class="form-label"> Select User / Territory <span class="text-danger">*</span> </label>
|
|
||||||
<select class="form-control" id="field-user_id" name="user_id" required>
|
|
||||||
<option value=""> -- Select -- </option>
|
|
||||||
@foreach($form->users as $option)
|
|
||||||
<option value="{{$option->value}}" hierarchy="{{$option->hierarchy_id}}" {{isset($question->value) && $question->value == $option->value ? 'selected':''}}>{{$option->display}}</option>
|
|
||||||
@endforeach
|
|
||||||
</select>
|
|
||||||
<input type="hidden" id="field-hierarchy_id" name="hierarchy_id" value="">
|
|
||||||
</div>
|
|
||||||
@endif --}}
|
|
||||||
|
|
||||||
|
|
||||||
@foreach($questions as $question)
|
@foreach($questions as $question)
|
||||||
<div class="col-md-12 mb-2">
|
<div class="col-md-12 mb-2">
|
||||||
<label for="field-{{$question->code}}" class="form-label">{{$question->question}} {!!$question->required == 'yes' ? '<span class="text-danger">*</span>':''!!} </label>
|
<label for="field-{{$question->code}}" class="form-label">{{$question->question}} {!!$question->required == 'yes' ? '<span class="text-danger">*</span>':''!!} </label>
|
||||||
|
|
@ -90,26 +76,21 @@
|
||||||
@case('textarea')
|
@case('textarea')
|
||||||
<textarea id="field-{{$question->code}}" name="{{$question->code}}" class="form-control" {{$question->required == 'yes'?'required':'' }}>{{isset($question->value)?$question->value:''}}</textarea>
|
<textarea id="field-{{$question->code}}" name="{{$question->code}}" class="form-control" {{$question->required == 'yes'?'required':'' }}>{{isset($question->value)?$question->value:''}}</textarea>
|
||||||
@break
|
@break
|
||||||
{{-- @case('dropdown')
|
@case('dropdown')
|
||||||
@php
|
<select class="form-control" id="field-{{ $question->code }}" name="{{ $question->code }}" {{ $question->required == 'yes' ? 'required' : '' }}>
|
||||||
$isContact = str_starts_with($question->code, 'contact_id');
|
|
||||||
$options = collect($question->options)->sortBy('display', SORT_NATURAL | SORT_FLAG_CASE);
|
|
||||||
@endphp
|
|
||||||
|
|
||||||
<select class="form-control" {!!($isContact)?'data-toggle="select2"':'' !!} id="field-{{ $question->code }}" 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($isContact && isset($option->contact->type) && $option->contact->type == 'doctor' )
|
@if($question->code == 'contact_id' && isset($option->contact->type) && $option->contact->type == 'doctor' )
|
||||||
<option value="{{ $option->value }}"
|
<option value="{{ $option->value }}"
|
||||||
@if(isset($question->value) && $question->value == $option->value) selected @endif
|
@if(isset($question->value) && $question->value == $option->value) selected @endif
|
||||||
@if($isContact)
|
@if($question->code == 'contact_id')
|
||||||
msl_code="{{ (isset($option->contact->msl_code) ? $option->contact->msl_code : '') }}"
|
msl_code="{{ (isset($option->contact->msl_code) ? $option->contact->msl_code : '') }}"
|
||||||
speciality="{{ (isset($option->contact->speciality) ? $option->contact->speciality : '') }}"
|
speciality="{{ (isset($option->contact->speciality) ? $option->contact->speciality : '') }}"
|
||||||
@endif
|
@endif
|
||||||
>
|
>
|
||||||
{{ $option->display }}
|
{{ $option->display }}
|
||||||
</option>
|
</option>
|
||||||
@elseif(!$isContact)
|
@elseif($question->code != 'contact_id')
|
||||||
<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 :'') . ' ' : '' }} >
|
<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 :'') . ' ' : '' }} >
|
||||||
{{ $option->display }}
|
{{ $option->display }}
|
||||||
</option>
|
</option>
|
||||||
|
|
@ -118,44 +99,9 @@
|
||||||
|
|
||||||
|
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
@break --}}
|
@break
|
||||||
|
|
||||||
|
|
||||||
@case('dropdown')
|
|
||||||
@php
|
|
||||||
$isContact = str_starts_with($question->code, 'contact_id');
|
|
||||||
|
|
||||||
// जर options collection किंवा array असेल तर display field नुसार alphabetize करा
|
|
||||||
$options = collect($question->options)->sortBy('display', SORT_NATURAL | SORT_FLAG_CASE);
|
|
||||||
@endphp
|
|
||||||
|
|
||||||
<select class="form-control" {!!($isContact)?'data-toggle="select2"':'' !!} id="field-{{ $question->code }}" name="{{ $question->code }}" data-selected="{{ isset($question->value) ? $question->value : '' }}" {{ $question->required == 'yes' ? 'required' : '' }}>
|
|
||||||
<option value=""> -- Select -- </option>
|
|
||||||
|
|
||||||
{{-- $question->options ऐवजी $options वापरा --}}
|
|
||||||
@foreach ($options as $option)
|
|
||||||
@if($isContact && isset($option->contact->type) && $option->contact->type == 'doctor' )
|
|
||||||
<option value="{{ $option->value }}"
|
|
||||||
@if(isset($question->value) && $question->value == $option->value) selected @endif
|
|
||||||
@if($isContact)
|
|
||||||
msl_code="{{ (isset($option->contact->msl_code) ? $option->contact->msl_code : '') }}"
|
|
||||||
speciality="{{ (isset($option->contact->speciality) ? $option->contact->speciality : '') }}"
|
|
||||||
@endif
|
|
||||||
>
|
|
||||||
{{ $option->display }}
|
|
||||||
</option>
|
|
||||||
@elseif(!$isContact)
|
|
||||||
<option value="{{ $option->value }}"
|
|
||||||
{{ isset($question->value) && $question->value == $option->value ? 'selected' : '' }}
|
|
||||||
{{ $question->code == 'contact_id' ? 'pcode= ' . (isset($option->contact->pcode)?$option->contact->pcode:'') . ' ' : '' }}
|
|
||||||
{{ $question->code == 'contact_id' ? 'speciality= ' . (isset($option->contact->speciality) ? $option->contact->speciality :'') . ' ' : '' }}>
|
|
||||||
{{ $option->display }}
|
|
||||||
</option>
|
|
||||||
@endif
|
|
||||||
@endforeach
|
|
||||||
</select>
|
|
||||||
@break
|
|
||||||
@case('checkbox')
|
@case('checkbox')
|
||||||
@foreach($question->options as $option)
|
@foreach($question->options as $option)
|
||||||
<div class="form-check mb-2 form-check-primary">
|
<div class="form-check mb-2 form-check-primary">
|
||||||
|
|
@ -201,9 +147,8 @@
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
@else
|
@else
|
||||||
<h4 class="text-center" >You have submitted the doctor tagging. Please Edit through View History option if any changes are to be done.</h4>
|
<h4 class="text-center" >You have already submitted 10 Doctors</h4>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
</div> <!-- end card-body -->
|
</div> <!-- end card-body -->
|
||||||
|
|
@ -269,18 +214,13 @@
|
||||||
// All contacts loaded for each hierarchy
|
// All contacts loaded for each hierarchy
|
||||||
// Example usage: console.log(contacts);
|
// Example usage: console.log(contacts);
|
||||||
// Filter out contacts where value == 'sample'
|
// Filter out contacts where value == 'sample'
|
||||||
contacts = contacts.filter(function(itm) { return itm.value !== 'sample' && itm.contact && itm.contact.type === 'doctor' });
|
contacts = contacts.filter(function(itm) { return itm.value !== 'sample'; });
|
||||||
|
|
||||||
contacts.sort(function(a, b) {
|
|
||||||
return (a.display || '').localeCompare(b.display || '', undefined, { sensitivity: 'base' });
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log(contacts);
|
console.log(contacts);
|
||||||
|
|
||||||
// Loop through contacts and append options to select elements whose id starts with 'field-contact_id'
|
// Loop through contacts and append options to select elements whose id starts with 'field-contact_id'
|
||||||
// We assume contact_id fields may be suffixed, e.g. field-contact_id_1, field-contact_id, etc.
|
// We assume contact_id fields may be suffixed, e.g. field-contact_id_1, field-contact_id, etc.
|
||||||
function applySelect2ToDoctorDropdowns() {
|
function applySelect2ToDoctorDropdowns() {
|
||||||
$("select[id^='field-contact_id']").each(function () {
|
$("[id^='field-contact_id']").each(function () {
|
||||||
var select = $(this);
|
var select = $(this);
|
||||||
// Avoid re-initializing select2
|
// Avoid re-initializing select2
|
||||||
if (select.data("select2")) return;
|
if (select.data("select2")) return;
|
||||||
|
|
@ -292,26 +232,23 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$('input[id^="field-msl_code"], input[id^="field-speciality"]').prop('readonly', true);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function enforceUniqueDoctorSelections() {
|
function enforceUniqueDoctorSelections() {
|
||||||
var selectedValues = [];
|
var selectedValues = [];
|
||||||
|
|
||||||
|
// Collect selected values (ignore empty)
|
||||||
$("select[id^='field-contact_id']").each(function () {
|
$("[id^='field-contact_id']").each(function () {
|
||||||
var v = $(this).val();
|
var v = $(this).val();
|
||||||
if (v) selectedValues.push(String(v));
|
if (v) selectedValues.push(String(v));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Reset all option disabled states, then disable duplicates across selects
|
||||||
$("select[id^='field-contact_id']").each(function () {
|
$("[id^='field-contact_id']").each(function () {
|
||||||
var currentSelect = $(this);
|
var currentSelect = $(this);
|
||||||
var currentVal = currentSelect.val() ? String(currentSelect.val()) : "";
|
var currentVal = currentSelect.val() ? String(currentSelect.val()) : "";
|
||||||
|
|
||||||
currentSelect.find("option").prop("disabled", false);
|
currentSelect.find("option").prop("disabled", false);
|
||||||
|
|
||||||
|
// Disable values selected in OTHER selects (keep current selection enabled)
|
||||||
selectedValues.forEach(function (v) {
|
selectedValues.forEach(function (v) {
|
||||||
if (v && v !== currentVal) {
|
if (v && v !== currentVal) {
|
||||||
currentSelect
|
currentSelect
|
||||||
|
|
@ -320,54 +257,37 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Refresh select2 UI if present
|
||||||
if (currentSelect.hasClass("select2-hidden-accessible")) {
|
if (currentSelect.data("select2")) {
|
||||||
|
currentSelect.trigger("change.select2");
|
||||||
currentSelect.select2({
|
|
||||||
width: "100%",
|
|
||||||
placeholder: "-- Select --",
|
|
||||||
allowClear: true
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$("[id^='field-contact_id']").each(function() {
|
||||||
$("select[id^='field-contact_id']").each(function() {
|
var select = $(this);
|
||||||
var select = $(this);
|
// Clear previous options
|
||||||
// Clear previous options
|
select.html('');
|
||||||
|
// Add a default 'Select' option
|
||||||
var savedValue = select.attr('data-selected') || select.data('selected') || select.val() || '';
|
select.append(
|
||||||
select.empty();
|
$("<option></option>")
|
||||||
|
.attr("value", '')
|
||||||
// Add a default 'Select' option
|
.text('-- Select --')
|
||||||
select.append(
|
);
|
||||||
$("<option></option>")
|
// Append options from contacts
|
||||||
.attr("value", '')
|
contacts.forEach(function(itm) {
|
||||||
.text('-- Select --')
|
var option = $("<option></option>")
|
||||||
);
|
.attr("value", itm.value)
|
||||||
// Append options from contacts
|
.text(itm.display);
|
||||||
contacts.forEach(function(itm) {
|
// If doctor options have extra attributes
|
||||||
var option = $("<option></option>")
|
if (itm.contact && itm.contact.msl_code) {
|
||||||
.attr("value", itm.value)
|
option.attr("msl_code", itm.contact.msl_code);
|
||||||
.text(itm.display);
|
}
|
||||||
|
if (itm.contact && itm.contact.speciality) {
|
||||||
|
option.attr("speciality", itm.contact.speciality);
|
||||||
|
}
|
||||||
// If doctor options have extra attributes
|
select.append(option);
|
||||||
if (itm.contact && itm.contact.msl_code) {
|
});
|
||||||
option.attr("msl_code", itm.contact.msl_code);
|
|
||||||
}
|
|
||||||
if (itm.contact && itm.contact.speciality) {
|
|
||||||
option.attr("speciality", itm.contact.speciality);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (savedValue && String(savedValue) === String(itm.value)) {
|
|
||||||
option.prop('selected', true);
|
|
||||||
}
|
|
||||||
|
|
||||||
select.append(option);
|
|
||||||
});
|
|
||||||
|
|
||||||
// For each select element, add a change event handler to populate `msl_code` and `speciality`
|
// For each select element, add a change event handler to populate `msl_code` and `speciality`
|
||||||
// We assume dropdowns and targets follow the pattern:
|
// We assume dropdowns and targets follow the pattern:
|
||||||
|
|
@ -375,49 +295,153 @@
|
||||||
// - result: field-msl_code_1, field-speciality_1, etc.
|
// - result: field-msl_code_1, field-speciality_1, etc.
|
||||||
|
|
||||||
// Remove any old event handlers first to prevent duplicate bindings
|
// Remove any old event handlers first to prevent duplicate bindings
|
||||||
select.off('change').on('change', function () {
|
select.off('change').on('change', function () {
|
||||||
var selected = $(this).find(':selected');
|
var selected = $(this).find(':selected');
|
||||||
|
|
||||||
var selectId = $(this).attr('id'); // e.g., field-contact_id_1
|
var selectId = $(this).attr('id'); // e.g., field-contact_id_1
|
||||||
// Extract the suffix (e.g., _1 or empty)
|
// Extract the suffix (e.g., _1 or empty)
|
||||||
var match = selectId.match(/^field-contact_id(_\d+)?$/);
|
var match = selectId.match(/^field-contact_id(_\d+)?$/);
|
||||||
var suffix = match && match[1] ? match[1] : '';
|
var suffix = match && match[1] ? match[1] : '';
|
||||||
|
|
||||||
// Build the target msl_code and speciality field ids
|
// Build the target msl_code and speciality field ids
|
||||||
var mslCodeField = $('#field-msl_code' + suffix);
|
var mslCodeField = $('#field-msl_code' + suffix);
|
||||||
var specialityField = $('#field-speciality' + suffix);
|
var specialityField = $('#field-speciality' + suffix);
|
||||||
|
|
||||||
if (mslCodeField.length) {
|
if (mslCodeField.length) {
|
||||||
mslCodeField.val(selected.attr('msl_code') || '');
|
mslCodeField.val(selected.attr('msl_code') || '');
|
||||||
}
|
}
|
||||||
if (specialityField.length) {
|
if (specialityField.length) {
|
||||||
specialityField.val(selected.attr('speciality') || '');
|
specialityField.val(selected.attr('speciality') || '');
|
||||||
}
|
|
||||||
|
|
||||||
// Prevent selecting the same doctor across multiple dropdowns
|
|
||||||
enforceUniqueDoctorSelections();
|
|
||||||
});
|
|
||||||
|
|
||||||
if (savedValue) {
|
|
||||||
select.val(savedValue).trigger('change');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Prevent selecting the same doctor across multiple dropdowns
|
||||||
});
|
|
||||||
|
|
||||||
// Ensure unique selection is enforced after initial render
|
|
||||||
enforceUniqueDoctorSelections();
|
enforceUniqueDoctorSelections();
|
||||||
// Enable search on doctor dropdowns
|
});
|
||||||
applySelect2ToDoctorDropdowns();
|
|
||||||
$("#pageloader").fadeOut();
|
// Ensure unique selection is enforced after initial render
|
||||||
|
enforceUniqueDoctorSelections();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Enable search on doctor dropdowns
|
||||||
|
applySelect2ToDoctorDropdowns();
|
||||||
|
$("#pageloader").fadeOut();
|
||||||
|
});
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
for (let i = 1; i <= 10; i++) {
|
||||||
|
$(`#field-mobile_number_${i}`).on('input', function () {
|
||||||
|
|
||||||
|
// Remove non-numeric characters
|
||||||
|
this.value = this.value.replace(/\D/g, '');
|
||||||
|
|
||||||
|
// Limit to 10 digits
|
||||||
|
if (this.value.length > 10) {
|
||||||
|
this.value = this.value.slice(0, 10);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let i = 1; i <= 10; i++) {
|
||||||
|
|
||||||
|
$(`#field-email_id_${i}`).on('input', function () {
|
||||||
|
|
||||||
|
// Remove spaces
|
||||||
|
this.value = this.value.replace(/\s/g, '');
|
||||||
|
});
|
||||||
|
|
||||||
|
$(`#field-email_id_${i}`).on('blur', function () {
|
||||||
|
|
||||||
|
let email = $(this).val().trim();
|
||||||
|
|
||||||
|
let emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
||||||
|
|
||||||
|
if (email !== '' && !emailPattern.test(email)) {
|
||||||
|
alert('Please enter a valid email address');
|
||||||
|
$(this).focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Loop through hierarcies and fetch contacts for each hierarchy, store in contacts variable
|
||||||
|
|
||||||
|
// $('#field-user_id').change(function(){
|
||||||
|
// let hierarchy = $('option:selected', this).attr('hierarchy');
|
||||||
|
// $('#field-hierarchy_id').val(hierarchy)
|
||||||
|
// event.preventDefault();
|
||||||
|
// $("#pageloader").fadeIn();
|
||||||
|
// $.ajax({
|
||||||
|
// type: "GET",
|
||||||
|
// url: '/form/getdoctorlist?partition={{$form->partition}}&hierarchy='+hierarchy,
|
||||||
|
// processData: false,
|
||||||
|
// contentType: false,
|
||||||
|
// success: function( data ) {
|
||||||
|
// $("#pageloader").fadeOut();
|
||||||
|
// for (let i = 1; i <= 10; i++) {
|
||||||
|
|
||||||
|
// let contactField = $('#field-contact_id_' + i);
|
||||||
|
|
||||||
|
// // Skip if field does not exist
|
||||||
|
// if (!contactField.length) continue;
|
||||||
|
|
||||||
|
// contactField.html('');
|
||||||
|
// contactField.append(
|
||||||
|
// $("<option></option>")
|
||||||
|
// .attr("value", '')
|
||||||
|
// .text('-- Select --')
|
||||||
|
// );
|
||||||
|
|
||||||
|
// for (let itm of data) {
|
||||||
|
// contactField.append(
|
||||||
|
// $("<option></option>")
|
||||||
|
// .attr("value", itm.value)
|
||||||
|
// .text(itm.display)
|
||||||
|
// .attr("msl_code", itm.contact.msl_code)
|
||||||
|
// .attr("speciality", itm.contact.speciality)
|
||||||
|
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// // Remove old change events before binding again
|
||||||
|
|
||||||
|
|
||||||
|
// contactField.off('change').on('change', function () {
|
||||||
|
|
||||||
|
// let selected = $(this).find(':selected');
|
||||||
|
|
||||||
|
// $('#field-msl_code_' + i).val(selected.attr('msl_code') || '');
|
||||||
|
|
||||||
|
// $('#field-speciality_' + i).val(selected.attr('speciality') || '');
|
||||||
|
|
||||||
|
// console.log(selected.text()); // selected doctor name
|
||||||
|
// });
|
||||||
|
|
||||||
|
// contactField.select2({
|
||||||
|
// placeholder: "-- Select --",
|
||||||
|
// allowClear: true,
|
||||||
|
// width: '100%'
|
||||||
|
// });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// },
|
||||||
|
// });
|
||||||
|
|
||||||
|
// console.log(hierarchy)
|
||||||
|
// })
|
||||||
|
|
||||||
|
// for (let i = 1; i <= 10; i++) {
|
||||||
|
|
||||||
|
// $('#field-msl_code_' + i).attr('readonly',true);
|
||||||
|
// $('#field-speciality_' + i).attr('readonly',true);
|
||||||
|
// }
|
||||||
|
|
||||||
$('#report-form').on('submit', function(event){
|
$('#report-form').on('submit', function(event){
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
@ -463,8 +487,7 @@
|
||||||
|
|
||||||
var plandateField = document.getElementById('field-record_date');
|
var plandateField = document.getElementById('field-record_date');
|
||||||
|
|
||||||
|
plandateField.setAttribute('max', today);
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue