Files
lelong/resources/views/marhun/kemaskinimarhun.blade.php
T
AmalinTamizi 1eba9769dd update title
2022-07-04 09:12:00 +08:00

128 lines
4.4 KiB
PHP

@extends('layouts.app')
@section('content')
<div class="container-fluid">
<div class="row ">
<div class="col-md-11 mx-auto card p-4">
@if ($message = Session::get('success'))
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
@endif
<form id="exportform" action="" method="POST">
<input type="hidden" name="type" value="User">
<table class="table table-striped table-xl" id="marhun" style="width:100%">
<thead class="bg-primary text-white">
<tr>
{{-- <th><input type="checkbox" aria-label="Checkbox for following text input" onclick="selectall(this)"></th> --}}
<th>No Rujukan</th>
<th>Marhun</th>
<th>Nota</th>
<th>Karat</th>
<th>Berat</th>
<th>Harga</th>
<th>Nilai Marhun</th>
<th>Harga Asas</th>
</tr>
</thead>
<tbody>
<tr>
{{-- <td><input type="checkbox" aria-label="Checkbox for following text input" name="checkboxdata[]" value="{{ $marhun->id }}"></td> --}}
<td>{{ $lelongbid->norujukan }}</td>
<td>{{ $marhun->marhun }}</td>
<td>{{ $marhun->nota }}</td>
<td>{{ $marhun->karat }}</td>
<td>{{ $marhun->berat }}</td>
<td>{{ $marhun->harga }}</td>
<td>{{ $marhun->n_marhun }}</td>
<td>{{ $marhun->hargaasas }}</td>
</tr>
</tbody>
</table>
</form>
<div class="row pl-3">
<button class="btn btn-primary">Simpan</button>
</div>
</div>
</div>
</div>
<script>
$('a.confirmdel').confirm({
title: 'Confirmation',
content: 'Anda pasti?',
type: 'orange',
typeAnimated: true,
buttons: {
Delete: {
btnClass: 'btn-warning',
action: function () {
location.href = this.$target.attr('href');
}
},
Batal: {
btnClass: 'btn-default',
action: function () {}
}
}
});
var tablemarhun = $('#marhun').DataTable( {
"columnDefs": [
{
"targets": 0,
"orderable": false
},
{
"targets": 9,
"orderable": false
}
],
order: [[1, 'asc']],
// "ordering": false,
"searching": false,
"paging": false,
"info": false,
"lengthChange": false,
"pageLength": 15,
dom: 'Bfrtip',
// buttons: [
// // 'copy', 'excel', 'pdf'
// // { text: 'copy', className: 'btn btn-primary' },
// {
// className: 'btn btn-outline-success pl-4 pr-4 btn-sm addsim',
// text: '<i class="fas fa-plus" id="test"></i>',
// titleAttr: 'Tambah Marhun',
// action: function ( e, dt, node, config ) {
// alert( 'Button activated' );
// }
// },
// {
// className: 'btn btn-outline-secondary pl-4 pr-4 btn-sm export',
// titleAttr: 'Export to CSV',
// text: '<i class="fas fa-download"></i>',
// action: function ( e, dt, node, config ) {
// $("#exportform").submit();
// }
// }
// ]
});
$('.addsim').tooltip();
$('.export').tooltip();
// $( '.dt-buttons').addClass('btn-group');
$( '.addsim').removeClass('dt-button');
$( '.export').removeClass('dt-button');
function selectall(cb) {
tablemarhun.rows().nodes().to$().find('input[type="checkbox"]').each(function(){
$(this).prop('checked', cb.checked);
})
}
</script>
@endsection