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/title-meta', ['title' => 'Form'])
|
||||||
@include('layouts.shared/head-css', ['mode' => $mode ?? '', 'demo' => $demo ?? ''])
|
@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/sweetalert2/sweetalert2.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">
|
<div id="pageloader">
|
||||||
<img src="/images/loader-large.gif" alt="processing..." />
|
<img src="/images/loader-large.gif" alt="processing..." />
|
||||||
|
|
@ -76,9 +77,17 @@
|
||||||
@endphp
|
@endphp
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<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
|
plan_details="{{ json_encode($sub->formdata) }}"><i
|
||||||
class="mdi mdi-pencil"></i>Report Ace Novel Meet</button>
|
class="mdi mdi-pencil"></i>Report Ace Novel Meet</button>
|
||||||
|
|
||||||
|
@endif
|
||||||
|
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td>{{$sub->formdata->select_activity}}</td>
|
<td>{{$sub->formdata->select_activity}}</td>
|
||||||
<td>{{ $sub->formdata->plan_date }}</td>
|
<td>{{ $sub->formdata->plan_date }}</td>
|
||||||
|
|
@ -401,10 +410,12 @@
|
||||||
</style>
|
</style>
|
||||||
@include('layouts.shared/footer-script')
|
@include('layouts.shared/footer-script')
|
||||||
<script src="{{ asset('assets/libs/sweetalert2/sweetalert2.min.js') }}"></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">
|
<script type="text/javascript">
|
||||||
jQuery(document).ready(function($) {
|
jQuery(document).ready(function($) {
|
||||||
$('#form-wrapper').hide()
|
$('#form-wrapper').hide()
|
||||||
$('#execution-form-wrapper').hide();
|
$('#execution-form-wrapper').hide();
|
||||||
|
$('[data-toggle="select2"]').select2();
|
||||||
$('#field-user_id').change(function() {
|
$('#field-user_id').change(function() {
|
||||||
$("#pageloader").fadeIn();
|
$("#pageloader").fadeIn();
|
||||||
let hierarchy = $('option:selected', this).attr('hierarchy');
|
let hierarchy = $('option:selected', this).attr('hierarchy');
|
||||||
|
|
@ -417,13 +428,17 @@
|
||||||
processData: false,
|
processData: false,
|
||||||
contentType: false,
|
contentType: false,
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
console.log("data",data);
|
||||||
|
|
||||||
$("#pageloader").fadeOut();
|
$("#pageloader").fadeOut();
|
||||||
$('#field-contact_id').html('')
|
$('#field-contact_id').html('')
|
||||||
$('#field-contact_id').append($("<option></option>").attr("value", '')
|
$('#field-contact_id').append($("<option></option>").attr("value", '')
|
||||||
.text('-- Select --'));
|
.text('-- Select --'));
|
||||||
for (let itm of data) {
|
for (let itm of data) {
|
||||||
|
if (itm.contact && itm.contact.type == 'doctor') {
|
||||||
$('#field-contact_id').append($("<option></option>").attr("value",
|
$('#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));
|
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'))
|
$('#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 */
|
/* Additional Speaker */
|
||||||
|
|
||||||
|
|
@ -443,8 +463,10 @@
|
||||||
$('#field-name_of_additional_speaker').append($("<option></option>").attr("value", '')
|
$('#field-name_of_additional_speaker').append($("<option></option>").attr("value", '')
|
||||||
.text('-- Select --'));
|
.text('-- Select --'));
|
||||||
for (let itm of data) {
|
for (let itm of data) {
|
||||||
|
if (itm.contact && itm.contact.type == 'doctor') {
|
||||||
$('#field-name_of_additional_speaker').append($("<option></option>").attr("value",
|
$('#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));
|
itm.value).text(itm.display).attr("speciality", itm.contact.speciality).attr("msl_code", itm.contact.msl_code));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -456,6 +478,13 @@
|
||||||
|
|
||||||
$('#field-additional_speaker_pcode').attr('readOnly',true);
|
$('#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.html('');
|
||||||
$select.append($("<option></option>").attr("value", '').text('-- Select --'));
|
$select.append($("<option></option>").attr("value", '').text('-- Select --'));
|
||||||
for (let itm of doctors) {
|
for (let itm of doctors) {
|
||||||
|
if (itm.contact && itm.contact.type == 'doctor') {
|
||||||
$select.append(
|
$select.append(
|
||||||
$("<option></option>")
|
$("<option></option>")
|
||||||
.attr("value", itm.display)
|
.attr("value", itm.display)
|
||||||
.text(itm.display)
|
.text(itm.display)
|
||||||
.attr("msl_code", (itm.contact && itm.contact.msl_code) ? itm.contact.msl_code : '')
|
.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) {
|
if (!selectedValue) {
|
||||||
|
|
@ -498,6 +537,8 @@
|
||||||
if ($byText.length) {
|
if ($byText.length) {
|
||||||
$select.val($byText.first().val());
|
$select.val($byText.first().val());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function bindHcpPcodeLinkage($hcpSelect) {
|
function bindHcpPcodeLinkage($hcpSelect) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue