139 lines
4.6 KiB
PHP
Executable File
139 lines
4.6 KiB
PHP
Executable File
<!--sidebar end-->
|
|
<!--main content start-->
|
|
<div class="app-content content">
|
|
<section class="content-wrapper">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<h3 class="font-weight-bold"><?php echo lang('Skill to Service Mapping'); ?></h3>
|
|
</div>
|
|
|
|
<!-- <div class="col-md-6 no-print pull-right">
|
|
<a data-toggle="modal" href="#myModal">
|
|
<div class="btn-group float-right">
|
|
<button id="" class="btn btn-info btn-min-width mr-1 mb-1">
|
|
<i class="fa fa-plus-circle"></i> <?php echo lang('add_new'); ?>
|
|
</button>
|
|
</div>
|
|
</a>
|
|
</div> -->
|
|
</div>
|
|
</div>
|
|
<hr class="mt-0 mb-0" />
|
|
<div class="card-content collapse show">
|
|
<div class="card-body card-dashboard">
|
|
<form role="form" action="skill_to_service_mapping" method="post" enctype="multipart/form-data" name="cargiverServiceMappingForm" onsubmit="return validateFrom1()">
|
|
|
|
<table class="table table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th colspan="2">Services</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td colspan="2">
|
|
<!-- choose cooardinator -->
|
|
<div class="form-group">
|
|
<div class="row">
|
|
<div class="col-lg-6">
|
|
<!-- <label for="exampleInputEmail1"><?php echo lang('Coordinator'); ?></label> -->
|
|
<select class="form-control" name="Service" id="Service" onchange="getCaregiverDet(this)">
|
|
<option value="" selected >Choose...</option>
|
|
<?php foreach ($serviceList as $value) { ?>
|
|
<option value="<?=$value->id?>"><?=$value->name?></option>
|
|
<?php } ?>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- cooardinotr details table -->
|
|
<table class="table table-bordered" id="log">
|
|
</table>
|
|
</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2">
|
|
<table class="table table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">#</th>
|
|
<th scope="col">Skills</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="ServiceDetList">
|
|
<?php foreach ($skillList as $value) { ?>
|
|
<tr>
|
|
<th scope="row"><input type="checkbox" name="skill_list[]" value="<?=$value->id?>"></th>
|
|
<td><?=$value->name?></td>
|
|
|
|
</tr>
|
|
<?php } ?>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<!-- submit box table -->
|
|
<tr>
|
|
<td colspan="2">
|
|
<button type="submit" name="submit" value="mapCP" class="btn btn-info"><?php echo lang('Submit'); ?></button>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<!-- patient details table -->
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
function getCaregiverDet(_this){
|
|
|
|
var codID = _this.value;
|
|
var request = $.ajax({
|
|
url: "skill_to_service_mapping/mappingDetailsService",
|
|
type: "POST",
|
|
data: {id : codID},
|
|
dataType: "html"
|
|
});
|
|
|
|
request.done(function(msg) {
|
|
|
|
console.log(msg);
|
|
$("#ServiceDetList").html( msg );
|
|
});
|
|
|
|
request.fail(function(jqXHR, textStatus) {
|
|
alert( "Request failed: " + textStatus );
|
|
});
|
|
|
|
}
|
|
|
|
function validateFrom1(){
|
|
var x = document.forms["cargiverServiceMappingForm"]["Caregiver"].value;
|
|
if (x == "") {
|
|
document.forms["cargiverServiceMappingForm"]["Caregiver"].focus();
|
|
Swal.fire({
|
|
position: 'center',
|
|
icon: 'error',
|
|
title: 'Please select a caregiver',
|
|
showConfirmButton: true,
|
|
});
|
|
return false;
|
|
}
|
|
}
|
|
|
|
</script>
|
|
|