File: /var/www/vhost/disk-apps/demo-telemedicina.teky.com.co/public/js/requests_old/step1.js
$('#specialty_id').change(function () {
valor = $(this).val();
var info = {
"id": valor
}
$('#modalLoader').modal('show');
$.ajax({
url: "/request/specialty",
type: "POST",
contentType: 'application/json',
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content'),
'Content-Type': 'application/json'
},
data: JSON.stringify(info),
success: function (r) {
if (r[0]["respuesta"]) {
$('#modalLoader').modal('hide');
var type_care = r[0]["type_care"];
$('#type_care_id').empty();
var sel = '<option value="">' + Lang.get('messages.select') + '</option>';
$('#type_care_id').append(sel);
for (var i in type_care) {
console.log(type_care[i].type_care.active);
if(type_care[i].type_care.active!=0){
var row = '<option value="' + type_care[i].type_care.id + '">' + type_care[i].type_care.name + '</option>';
$('#type_care_id').append(row);
}
}
} else {
$('#type_care_id').empty();
}
}
});
});