update new pengguna
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row ">
|
||||
<div class="col-md-11 mx-auto card p-4">
|
||||
@@ -34,6 +37,7 @@
|
||||
<td><input type="checkbox" aria-label="Checkbox for following text input" name="checkboxdata[]" value="{{ $user->id }}"></td>
|
||||
<td>{{ $user->name }}</td>
|
||||
<td>{{ $user->email }}</td>
|
||||
|
||||
<td>
|
||||
@foreach ($user->roles as $taraf)
|
||||
<button class="btn btn-primary btn-sm hovernone" disabled>{{$taraf->name}}</button>
|
||||
@@ -42,6 +46,8 @@
|
||||
<td>
|
||||
@if ($user->status =='active')
|
||||
<button class="btn btn-success btn-sm hovernone-success" disabled>{{$user->status}}</button>
|
||||
@elseif ($user->status == 'inactive')
|
||||
<button class="btn btn-warning btn-sm hovernone-warning" disabled>{{$user->status}}</button>
|
||||
@elseif ($user->status =='banned')
|
||||
<button class="btn btn-danger btn-sm hovernone-danger" disabled>{{$user->status}}</button>
|
||||
@endif
|
||||
@@ -61,6 +67,56 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal fade" tabindex="-1" id="myModal">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">New Pengguna</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form action="{{ route('pengguna.storepengguna') }}" method="POST" id="formpengguna">
|
||||
@csrf
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="name">Nama</label>
|
||||
<input type="text" class="form-control" name="name" id="name" required>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="username">Username</label>
|
||||
<input type="text" class="form-control" name="username" id="username" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="kodcaw">Kod Cawangan</label>
|
||||
<label for="kodcaw"></label>
|
||||
<select id="kodcaw" name="kod cawangan">
|
||||
<option>Choose Kod Cawangan</option>
|
||||
<option id = "kodcaw" >X0301</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label for="email">Email</label>
|
||||
<input type="email" class="form-control" name="email" id="email" >
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
|
||||
<button type="button" class="btn btn-primary" onclick="storepengguna()">Simpan</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Enable tooltips everywhere
|
||||
$(function () {
|
||||
@@ -115,9 +171,16 @@
|
||||
text: '<i class="fas fa-plus" id="test"></i>',
|
||||
titleAttr: 'Tambah Pengguna',
|
||||
action: function ( e, dt, node, config ) {
|
||||
alert( 'Button activated' );
|
||||
//alert( 'Button activated' );
|
||||
// console.log('hye');
|
||||
|
||||
$('#myModal').modal("show");
|
||||
$('#myModal').on('shown.bs.modal', function () {
|
||||
$('#rolename').trigger('focus')
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
className: 'btn btn-outline-secondary pl-4 pr-4 btn-sm export',
|
||||
titleAttr: 'Export to CSV',
|
||||
@@ -141,6 +204,9 @@
|
||||
$(this).prop('checked', cb.checked);
|
||||
})
|
||||
}
|
||||
function storepengguna() {
|
||||
$("#formpengguna").submit();
|
||||
}
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
@endsection
|
||||
Reference in New Issue
Block a user