Team 2 Changes (Dropdown , Select2 )
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m4s
Details
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m4s
Details
This commit is contained in:
parent
4e2f9d052b
commit
dbda719a3c
|
|
@ -5,6 +5,7 @@
|
|||
@include('layouts.shared/title-meta', ['title' => 'Form'])
|
||||
@include('layouts.shared/head-css', ['mode' => $mode ?? '', 'demo' => $demo ?? ''])
|
||||
<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" />
|
||||
</head>
|
||||
<div id="pageloader">
|
||||
<img src="/images/loader-large.gif" alt="processing..." />
|
||||
|
|
@ -76,9 +77,17 @@
|
|||
@endphp
|
||||
<tr>
|
||||
<td>
|
||||
<button type="button" class="btn btn-xs btn-info edit-btn"
|
||||
|
||||
@if(isset($sub->formdata->execution_done) && $sub->formdata->execution_done == 'yes')
|
||||
Executed
|
||||
@else
|
||||
<button type="button" class="btn btn-xs btn-info edit-btn"
|
||||
plan_details="{{ json_encode($sub->formdata) }}"><i
|
||||
class="mdi mdi-pencil"></i>Report Ace Novel Meet</button>
|
||||
|
||||
@endif
|
||||
|
||||
|
||||
</td>
|
||||
<td>{{$sub->formdata->select_activity}}</td>
|
||||
<td>{{ $sub->formdata->plan_date }}</td>
|
||||
|
|
@ -401,10 +410,12 @@
|
|||
</style>
|
||||
@include('layouts.shared/footer-script')
|
||||
<script src="{{ asset('assets/libs/sweetalert2/sweetalert2.min.js') }}"></script>
|
||||
<script src="{{ asset('assets/libs/select2/select2.min.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function($) {
|
||||
$('#form-wrapper').hide()
|
||||
$('#execution-form-wrapper').hide();
|
||||
$('[data-toggle="select2"]').select2();
|
||||
$('#field-user_id').change(function() {
|
||||
$("#pageloader").fadeIn();
|
||||
let hierarchy = $('option:selected', this).attr('hierarchy');
|
||||
|
|
@ -417,13 +428,17 @@
|
|||
processData: false,
|
||||
contentType: false,
|
||||
success: function(data) {
|
||||
console.log("data",data);
|
||||
|
||||
$("#pageloader").fadeOut();
|
||||
$('#field-contact_id').html('')
|
||||
$('#field-contact_id').append($("<option></option>").attr("value", '')
|
||||
.text('-- Select --'));
|
||||
for (let itm of data) {
|
||||
if (itm.contact && itm.contact.type == 'doctor') {
|
||||
$('#field-contact_id').append($("<option></option>").attr("value",
|
||||
itm.value).text(itm.display).attr("speciality", itm.contact.speciality).attr("msl_code", itm.contact.msl_code));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -436,6 +451,11 @@
|
|||
$('#field-msl_code').val($('option:selected', this).attr('msl_code'))
|
||||
})
|
||||
|
||||
if ($('#field-contact_id').hasClass('select2-hidden-accessible')) {
|
||||
$('#field-contact_id').select2('destroy');
|
||||
}
|
||||
|
||||
$('#field-contact_id').select2();
|
||||
|
||||
/* Additional Speaker */
|
||||
|
||||
|
|
@ -443,8 +463,10 @@
|
|||
$('#field-name_of_additional_speaker').append($("<option></option>").attr("value", '')
|
||||
.text('-- Select --'));
|
||||
for (let itm of data) {
|
||||
if (itm.contact && itm.contact.type == 'doctor') {
|
||||
$('#field-name_of_additional_speaker').append($("<option></option>").attr("value",
|
||||
itm.value).text(itm.display).attr("speciality", itm.contact.speciality).attr("msl_code", itm.contact.msl_code));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -455,6 +477,13 @@
|
|||
})
|
||||
|
||||
$('#field-additional_speaker_pcode').attr('readOnly',true);
|
||||
|
||||
|
||||
if ($('#field-name_of_additional_speaker').hasClass('select2-hidden-accessible')) {
|
||||
$('#field-name_of_additional_speaker').select2('destroy');
|
||||
}
|
||||
|
||||
$('#field-name_of_additional_speaker').select2();
|
||||
|
||||
},
|
||||
});
|
||||
|
|
@ -473,12 +502,22 @@
|
|||
$select.html('');
|
||||
$select.append($("<option></option>").attr("value", '').text('-- Select --'));
|
||||
for (let itm of doctors) {
|
||||
if (itm.contact && itm.contact.type == 'doctor') {
|
||||
$select.append(
|
||||
$("<option></option>")
|
||||
.attr("value", itm.display)
|
||||
.text(itm.display)
|
||||
.attr("msl_code", (itm.contact && itm.contact.msl_code) ? itm.contact.msl_code : '')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if ($select.hasClass('select2-hidden-accessible')) {
|
||||
$select.trigger('change');
|
||||
} else {
|
||||
$select.select2({
|
||||
width: '100%'
|
||||
});
|
||||
}
|
||||
|
||||
if (!selectedValue) {
|
||||
|
|
@ -498,6 +537,8 @@
|
|||
if ($byText.length) {
|
||||
$select.val($byText.first().val());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function bindHcpPcodeLinkage($hcpSelect) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue