89 lines
2.4 KiB
PHP
89 lines
2.4 KiB
PHP
<?= $this->extend('layouts/main.php') ?>
|
|
|
|
<?= $this->section('content') ?>
|
|
|
|
<main id="main" class="main">
|
|
<div class="pagetitle">
|
|
<h1>Instruments List</h1>
|
|
</div>
|
|
|
|
<?php
|
|
if(isset($validation)) {
|
|
?>
|
|
<div class='alert alert-danger alert-dismissible'>
|
|
<?= $validation->listErrors(); ?>
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"> <span aria-hidden="true"></span> </button>
|
|
</div>
|
|
<?php
|
|
}
|
|
?>
|
|
|
|
<div class="card" style="height:700px;">
|
|
<div class="card-body">
|
|
<div class='card-title d-flex'>
|
|
<h6><b>Berisi Data Tiap Alat/Instrumen</b></h6>
|
|
<a href='<?=base_url();?>equipmentlist/create/0' class='btn btn-sm btn-info ms-auto'> <i class="bi bi-plus-square"> </i> New Instrument</a>
|
|
</div>
|
|
<table class="table table-sm table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th scope='col'>Equipment ID</th>
|
|
<th scope="col">Department ID</th>
|
|
<th scope="col">Instrument Name</th>
|
|
<th scope="col">Status/Enable</th>
|
|
<th scope="col">Equipment Role</th>
|
|
<th scope="col">Create Date</th>
|
|
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div id="modal" class="modal" tabindex="-1" role="dialog" >
|
|
<div class="modal-dialog modal-dialog-centered modal-lg">
|
|
<div class="modal-content">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</main>
|
|
|
|
<?= $this->endSection() ?>
|
|
|
|
<?= $this->section('script') ?>
|
|
<script>
|
|
// $('.openInsttestEdit').on('click',function(){
|
|
// const instid = $(this).data('instid');
|
|
// $('.modal-content').load('insttest/edit/'+instid,function(){
|
|
// $('#modal').modal('show');
|
|
// });
|
|
// });
|
|
|
|
// $('#insttest_form').submit(function(event) {
|
|
// event.preventDefault();
|
|
// $('#insttest').modal('hide');
|
|
// var formData = $(this).serialize();
|
|
|
|
// $.ajax({
|
|
// type: 'POST',
|
|
// url: '<?=base_url()."insttest/update";?>',
|
|
// dataType: "json",
|
|
// data: formData,
|
|
// success: function(response) { console.log(response); },
|
|
// error: function(xhr, status, error) {
|
|
// if(xhr.status != '200') {
|
|
// var alert = '<div class="alert alert-danger alert-dismissible fade show" role="alert">' +
|
|
// '<strong>Error!</strong> An error occurred. Please try again later.<br>' +
|
|
// '<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>' +
|
|
// '</div>';
|
|
// $('main').prepend(alert);
|
|
// }
|
|
// }
|
|
// });
|
|
// });
|
|
</script>
|
|
<?= $this->endSection() ?>
|