Commit df416d61 authored by ayu's avatar ayu
Browse files

add feature input parking

parent 99720294
Pipeline #24200 passed with stage
in 38 seconds
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
<?php $this->load->view('main/header.php')?>
<!-- Left side column. contains the logo and sidebar -->
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
Parking Set
<small>
<?php $this->view('main/viewdate.php')
?>
</small>
</h1>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-lg-12">
<!-- Default box -->
<div class="box">
<div class="box-header">
<!-- Flash Notifikasi -->
<?php echo $this->session->flashdata('notifikasi');?>
<a class="btn btn-success btn-sm" onclick="function_add()" href="#"><i class="fa fa-plus"></i> Add Parking</a>
</div>
<div class="box-body">
<div style="max-width: auto; overflow-x: auto;">
<table id="example1" class="table table-bordered table-striped small">
<thead>
<tr>
<th>NO</th>
<th>SLOT NAME</th>
<th>LICENSE PLATE</th>
<th>START TIME</th>
<th>STOP TIME</th>
<th>ACTION</th>
</tr>
</thead>
<tbody>
<?php
if (count($parking['result'])>0){
$start = 0;
foreach ($parking['result'] as $value)
{
?>
<tr>
<td><?php echo ++$start;?></td>
<td><?php echo $value->slot->name;?></td>
<td><?php echo $value->licensePlate;?></td>
<td><?php echo $value->startTime;?></td>
<td><?php echo $value->stopTime;?></td>
<td>
<a class="btn btn-warning btn-xs" href="#" onclick="function_edit('<?= $value->id;?>')"><i class="fa fa-car"></i> Stop
</a>
</a>
</td>
</tr>
<?php
}
}
?>
</tbody>
<tfoot>
</tfoot>
</table>
</div>
</div>
<!-- /.box-body -->
<!-- /.box-footer-->
</div>
<!-- /.box -->
</div>
</div>
</section>
<!-- /.content -->
<!-- MODAL SLOT -->
<div class="modal fade" id="modal_slot" role="dialog" aria-labelledby="largeModal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
<h3 class="modal-title" id="myModalLabel">Edit Slot</h3>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-12">
<form id="form_slot" enctype="multipart/form-data" method="POST">
<div class="form-group col-md-12" id="labelId">
<label>License Plate</label>
<input type="text" class="form-control" name="licensePlate" id="licensePlate">
<input type="hidden" class="form-control" name="inputedById" id="inputedById" value="128e64bf-884b-4507-81c0-b18e8dde81b9">
</div>
<div class="form-group col-md-12">
<label>Slot Name</label>
<select class="form-control" name="slotId" id="slotId">
<?php
foreach ($slot['result'] as $opsizone) {
?>
<option value = "<?php echo $opsizone->id;?>"> <?php echo $opsizone->name;?>
</option>
<?php
}
?>
</select>
</div>
<div class="form-group col-md-12">
<br>
<button type="submit" id="btn_simpan_arsip" name="btn_simpan_arsip" class="btn btn-sm btn-primary"><i class="fa fa-car"></i> Park</button>
</div>
</form>
</div>
</div>
<!-- -->
<br>
</div>
</div>
</div>
</div>
<!-- END MODAL -->
</div>
<?php $this->load->view('main/footer')?>
<!-- Control Sidebar -->
<!-- /.control-sidebar -->
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
<div class="control-sidebar-bg"></div>
</div>
</body>
</html>
<script>
function function_add(){
$('#modal_slot').modal('show');
$('#form_slot')[0].reset();
$('#form_slot').attr('action',"<?php echo base_url()?>parking/save");
$('#myModalLabel').text('Add Parking');
}
</script>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment