This commit is contained in:
Azfar Arsyad
2022-02-08 12:52:20 +08:00
parent 799b3514b3
commit 0167637e27
10 changed files with 357 additions and 6 deletions
@@ -86,6 +86,9 @@
</li>
</ul>
</li>
<li class="{{ (request()->is('pembida/*')) ? 'active' : '' }}">
<a href="{{url('pembida/senaraipembida')}}">Pengesahan Pembida Baharu</a>
</li>
@endhasrole
@hasrole('account')
{{-- <li class="{{ (request()->is('home')) ? 'active' : '' }}">
@@ -36,14 +36,17 @@
<td>{{ $lel->cajlelong }}</td>
<td class="text-center">
@hasrole('jurulelong')
<a href="{{ route('lelong.refresh',$lel->id) }}"><i class="fas fa-sync-alt"></i></a>
@if(!$lel->masatamat_lelong)
<a href="{{ route('lelong.refresh',$lel->id) }}"><i class="fas fa-sync-alt"></i></a>
<a class="startlelong" href="{{ route('lelong.start',$lel->id) }}"><i class="fa fa-play"></i></a>
<a class="confirmdel" href="{{ route('lelong.delete',$lel->id) }}"><i class="far fa-trash-alt"></i></a>
@elseif ($lel->sts_lelong == 2)
<a href="{{ route('lelong.show',$lel->id) }}"><i class="fas fa-trophy"></i></a>
@else
<a class="stoplelong" href="{{ route('lelong.start',$lel->id) }}"><i class="fa fa-stop"></i></a>
@endif
<a href="{{ route('lelong.show',$lel->id) }}"><i class="far fa-edit"></i></a>
<a class="confirmdel" href="{{ route('lelong.delete',$lel->id) }}"><i class="far fa-trash-alt"></i></a>
@endhasrole
@@ -0,0 +1,134 @@
@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
<?php
// $totaluser = count($alluser);
?>
<form id="exportform" action="{{route('pengguna.export')}}" method="POST">
@csrf
<input type="hidden" name="type" value="User">
<table class="table table-striped table-xl" id="pengguna" 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>Nama</th>
<th>Number Phone</th>
<th>Email</th>
<th>Status</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tbody>
@foreach ($alluser as $user)
<tr>
<td><input type="checkbox" aria-label="Checkbox for following text input" name="checkboxdata[]" value="{{ $user->id }}"></td>
<td>{{ $user->name }}</td>
<td>{{ $user->notelbimbit }}</td>
<td>{{ $user->email }}</td>
<td>
@if ($user->status =='active')
<button class="btn btn-success btn-sm hovernone-success" disabled>{{$user->status}}</button>
@elseif ($user->status =='banned')
<button class="btn btn-danger btn-sm hovernone-danger" disabled>{{$user->status}}</button>
@endif
</td>
<td class="text-center">
<a href="{{ route('pembida.show',$user->id) }}"><i class="fas fa-check"></i></a>
{{-- <a class="confirmdel" href="{{ route('pengguna.delete',$user->id) }}"><i class="far fa-trash-alt"></i></a> --}}
</td>
</tr>
@endforeach
</tbody>
</table>
</form>
</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 tablepengguna = $('#pengguna').DataTable( {
"columnDefs": [
{
"targets": 0,
"orderable": false
},
{
"targets": 4,
"orderable": false
}
],
order: [[1, 'asc']],
// "ordering": 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 adduser',
text: '<i class="fas fa-plus" id="test"></i>',
titleAttr: 'Tambah Pembida',
action: function ( e, dt, node, config ) {
alert( 'Button activated' );
}
},
{
className: 'btn btn-outline-secondary pl-4 pr-4 btn-sm export',
titleAttr: 'Export to PDF',
text: '<i class="fas fa-download"></i>',
action: function ( e, dt, node, config ) {
$("#exportform").submit();
}
}
]
});
$('.adduser').tooltip();
$('.export').tooltip();
// $( '.dt-buttons').addClass('btn-group');
$( '.adduser').removeClass('dt-button');
$( '.export').removeClass('dt-button');
function selectall(cb) {
tablepengguna.rows().nodes().to$().find('input[type="checkbox"]').each(function(){
$(this).prop('checked', cb.checked);
})
}
</script>
@endsection
+83
View File
@@ -0,0 +1,83 @@
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
@if ($message = Session::get('success'))
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
@endif
<form action="{{ route('pembida.sah',$user->id) }}" method="GET" id="formpengguna">
@csrf
<div class="form-row">
<div class="form-group col-md-6">
<label for="inputEmail4">Nama</label>
<input type="text" value="{{$user->name}}" class="form-control" name="name" id="name" readonly>
</div>
<div class="form-group col-md-6">
<label for="inputPassword4">Email</label>
<input type="email" value="{{$user->email}}" class="form-control" name="email" id="email" readonly>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label for="inputPassword4">Number Phone</label>
<input type="text" value="{{$user->notelbimbit}}" class="form-control" name="notelbimbit" id="notelbimbit" readonly>
</div>
<div class="form-group col-md-6">
<label for="inputPassword4">Identity Card/Passport Number</label>
<input type="text" value="{{$user->nokp}}" class="form-control" name="nokp" id="nokp" readonly>
</div>
</div>
<div class="form-row">
<h4 class="col-md-3">Identity Card/Passport Picture</h4>
<div class="form-group col-md-9">
@foreach ($files as $file)
<div class="col-4 form-check form-check-inline">
<?php
// $picic = imagecreatefromstring($file['ic64']);
// header('Content-type: image/'.$file['file_type']);
?>
<img src="{{$file['ic64']}}" alt="">
{{$file['ic64']}}
</div>
@endforeach
</div>
</div>
<div class="text-right pt-4">
<input type="hidden" name="userid" value="{{$user->id}}">
<a href="{{url('pembida/senaraipembida')}}" class="btn btn-primary">Kembali</a>
<button type="button" class="btn btn-success" onclick="confirm()">Sah</button>
</div>
</form>
{{-- <button class="btn btn-primary" onclick="confirm()">Simpan</button> --}}
</div>
</div>
</div>
<script>
function confirm() {
$.confirm({
title: 'Confirmation',
content: 'Anda pasti?',
type: 'green',
typeAnimated: true,
buttons: {
Sah: {
btnClass: 'btn-success',
action: function () {
$("#formpengguna").submit();
}
},
Batal: {
btnClass: 'btn-default',
action: function () {}
}
}
});
}
</script>
@endsection