update patch 1
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>{{ config('app.app_name') }} - Login</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<link rel="icon" type="image/x-icon" href="{{ asset('templates/dist/img/logo.ico') }}">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="{{ asset('templates/dist/img/logo.ico') }}">
|
||||
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/login/css/style.css">
|
||||
<script src="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/plugins/sweetalert2/sweetalert2.all.min.js"></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<section class="ftco-section">
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12 col-lg-10">
|
||||
<div class="wrap d-md-flex">
|
||||
<div class="img"
|
||||
style="background-image: url({{ asset('templates/login') }}/images/bg-1.png);">
|
||||
</div>
|
||||
<div class="login-wrap p-4 p-md-5">
|
||||
<div class="d-flex">
|
||||
<div class="w-100">
|
||||
<div class="text-center">
|
||||
<img src="{{ asset('templates/dist/img/small-logo.png') }}" alt="App Logo Text" width="80" height="80" class="brand-text brand-image">
|
||||
</div>
|
||||
<h3 class="mb-4 text-center">Login into {{ config('app.app_name') }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
<form method="POST" class="signin-form" action="{{ route('admin.login.submit') }}">
|
||||
@csrf
|
||||
@include('backend.layouts.partials.messages')
|
||||
|
||||
<div class="form-group mb-3">
|
||||
<label class="label" for="name">Username</label>
|
||||
<input type="text" class="form-control" id="email" name="email"
|
||||
placeholder="Isikan Username anda" required>
|
||||
<i class="ti-email"></i>
|
||||
<div class="text-danger"></div>
|
||||
@error('email')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="form-group mb-3">
|
||||
<label class="label" for="password">Password</label>
|
||||
<input type="password" id="password" placeholder="Isikan Password anda"
|
||||
class="form-control" name="password" required>
|
||||
<i class="ti-lock"></i>
|
||||
<div class="text-danger"></div>
|
||||
@error('password')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button id="form_submit" type="submit"
|
||||
class="form-control btn btn-primary rounded submit px-3">Masuk</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/login/js/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/login/js/popper.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/login/js/bootstrap.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/login/js/main.js"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,20 @@
|
||||
<div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
|
||||
<div class="dropdown-divider"></div>
|
||||
<a href="#" class="dropdown-item">
|
||||
<i class="fas fa-user"></i> Profile
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a href="#" class="dropdown-item">
|
||||
<i class="fas fa-lock"></i> Change Password
|
||||
</a>
|
||||
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item dropdown-footer" href="{{ route('admin.logout.submit') }}"
|
||||
onclick="event.preventDefault();
|
||||
document.getElementById('admin-logout-form').submit();">Logout
|
||||
Account</a>
|
||||
|
||||
<form id="admin-logout-form" action="{{ route('admin.logout.submit') }}" method="POST" style="display: none;">
|
||||
@csrf
|
||||
</form>
|
||||
</div>
|
||||
@@ -0,0 +1,33 @@
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
||||
<div>
|
||||
@foreach ($errors->all() as $error)
|
||||
<p>{{ $error }}</p>
|
||||
@endforeach
|
||||
</div>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (Session::has('success'))
|
||||
<script>
|
||||
Swal.fire({
|
||||
title: "Success!",
|
||||
text: "{{ Session::get('success') }}",
|
||||
icon: "success"
|
||||
});
|
||||
</script>
|
||||
@endif
|
||||
|
||||
@if (Session::has('error'))
|
||||
<script>
|
||||
Swal.fire({
|
||||
title: "Error!",
|
||||
text: "{{ Session::get('error') }}",
|
||||
icon: "error",
|
||||
timer: 5000
|
||||
});
|
||||
</script>
|
||||
@endif
|
||||
@@ -0,0 +1,110 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title')
|
||||
{{ $pageInfo['title'] }}
|
||||
@endsection
|
||||
|
||||
@section('styles')
|
||||
<style>
|
||||
.form-check-label {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
</style>
|
||||
@endsection
|
||||
|
||||
|
||||
@section('admin-content')
|
||||
<section class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1>{{ $pageInfo['title'] }}</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="{{ route('admin.dashboard') }}">{{ __('Dashboard') }}</a></li>
|
||||
<li class="breadcrumb-item active"><a href="{{ $pageInfo['path'] }}">{{ $pageInfo['title'] }}</a>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12 mt-5">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title">{{ $pageInfo['title'] }}</h4>
|
||||
@include('backend.layouts.partials.messages')
|
||||
|
||||
<form action="{{ route('admin.admins.store') }}" method="POST">
|
||||
@csrf
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6 col-sm-12">
|
||||
<label for="name">Full Name</label>
|
||||
<input type="text" class="form-control" id="name" name="name"
|
||||
placeholder="Enter Name" required autofocus value="{{ old('name') }}">
|
||||
</div>
|
||||
<div class="form-group col-md-6 col-sm-12">
|
||||
<label for="email">Email</label>
|
||||
<input type="text" class="form-control" id="email" name="email"
|
||||
placeholder="Enter Email" required value="{{ old('email') }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6 col-sm-12">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" class="form-control" id="password" name="password"
|
||||
placeholder="Enter Password">
|
||||
</div>
|
||||
<div class="form-group col-md-6 col-sm-12">
|
||||
<label for="password_confirmation">Confirm Password</label>
|
||||
<input type="password" class="form-control" id="password_confirmation"
|
||||
name="password_confirmation" placeholder="Enter Password">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6 col-sm-6">
|
||||
<label for="password">Assign Roles</label>
|
||||
<select name="roles[]" id="roles" class="form-control select2" multiple
|
||||
required>
|
||||
@foreach ($roles as $role)
|
||||
<option value="{{ $role->name }}">{{ $role->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-6 col-sm-6">
|
||||
<label for="username">Username</label>
|
||||
<input type="text" class="form-control" id="username" name="username"
|
||||
placeholder="Enter Username" required value="{{ old('username') }}">
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<button type="submit" class="btn btn-primary mt-4 pr-4 pl-4">Save</button>
|
||||
<a href="{{ route('admin.admins.index') }}"
|
||||
class="btn btn-secondary mt-4 pr-4 pl-4">Cancel</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.select2').select2();
|
||||
|
||||
})
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,112 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title')
|
||||
{{ $pageInfo['title'] }}
|
||||
@endsection
|
||||
|
||||
@section('styles')
|
||||
<style>
|
||||
.form-check-label {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
</style>
|
||||
@endsection
|
||||
|
||||
@section('admin-content')
|
||||
<section class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1>{{ $pageInfo['title'] }}</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="{{ route('admin.dashboard') }}">{{ __('Dashboard') }}</a></li>
|
||||
<li class="breadcrumb-item active"><a href="{{ $pageInfo['path'] }}">{{ $pageInfo['title'] }}</a>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12 mt-5">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title">Edit Admin - {{ $admin->name }}</h4>
|
||||
@include('backend.layouts.partials.messages')
|
||||
|
||||
<form action="{{ route('admin.admins.update', $admin->id) }}" method="POST">
|
||||
@method('PUT')
|
||||
@csrf
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6 col-sm-12">
|
||||
<label for="name">Admin Name</label>
|
||||
<input type="text" class="form-control" id="name" name="name"
|
||||
placeholder="Enter Name" value="{{ $admin->name }}" required autofocus>
|
||||
</div>
|
||||
<div class="form-group col-md-6 col-sm-12">
|
||||
<label for="email">Admin Email</label>
|
||||
<input type="text" class="form-control" id="email" name="email"
|
||||
placeholder="Enter Email" value="{{ $admin->email }}" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6 col-sm-12">
|
||||
<label for="password">Password (Optional)</label>
|
||||
<input type="password" class="form-control" id="password" name="password"
|
||||
placeholder="Enter Password">
|
||||
</div>
|
||||
<div class="form-group col-md-6 col-sm-12">
|
||||
<label for="password_confirmation">Confirm Password (Optional)</label>
|
||||
<input type="password" class="form-control" id="password_confirmation"
|
||||
name="password_confirmation" placeholder="Enter Password">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6 col-sm-6">
|
||||
<label for="password">Assign Roles</label>
|
||||
<select name="roles[]" id="roles" class="form-control select2" multiple
|
||||
required>
|
||||
@foreach ($roles as $role)
|
||||
<option value="{{ $role->name }}"
|
||||
{{ $admin->hasRole($role->name) ? 'selected' : '' }}>
|
||||
{{ $role->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-6 col-sm-6">
|
||||
<label for="username">Admin Username</label>
|
||||
<input type="text" class="form-control" id="username" name="username"
|
||||
placeholder="Enter Username" required value="{{ $admin->username }}">
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary mt-4 pr-4 pl-4">Save</button>
|
||||
<a href="{{ route('admin.admins.index') }}"
|
||||
class="btn btn-secondary mt-4 pr-4 pl-4">Cancel</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.select2').select2();
|
||||
|
||||
})
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,107 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title')
|
||||
{{ $pageInfo['title'] }}
|
||||
@endsection
|
||||
|
||||
|
||||
@section('admin-content')
|
||||
<section class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1>{{ $pageInfo['title'] }}</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="{{ route('admin.dashboard') }}">{{ __('Dashboard') }}</a></li>
|
||||
<li class="breadcrumb-item active"><a href="{{ $pageInfo['path'] }}">{{ $pageInfo['title'] }}</a>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12 mt-5">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title float-left">{{ $pageInfo['title'] }}</h4>
|
||||
<p class="float-right mb-2">
|
||||
@if (auth()->user()->can('admin.edit'))
|
||||
<a class="btn btn-primary text-white" href="{{ route('admin.admins.create') }}">
|
||||
Add New User Access
|
||||
</a>
|
||||
@endif
|
||||
</p>
|
||||
<div class="clearfix"></div>
|
||||
<div class="data-tables">
|
||||
@include('backend.layouts.partials.messages')
|
||||
<table id="dataTable" class="text-center">
|
||||
<thead class="bg-light text-capitalize">
|
||||
<tr>
|
||||
<th width="5%">{{ __('Sl') }}</th>
|
||||
<th width="10%">{{ __('Name') }}</th>
|
||||
<th width="10%">{{ __('Email') }}</th>
|
||||
<th width="40%">{{ __('Roles') }}</th>
|
||||
<th width="15%">{{ __('Action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($admins as $admin)
|
||||
<tr>
|
||||
<td>{{ $loop->index + 1 }}</td>
|
||||
<td>{{ $admin->name }}</td>
|
||||
<td>{{ $admin->email }}</td>
|
||||
<td>
|
||||
@foreach ($admin->roles as $role)
|
||||
<span class="badge badge-info mr-1">
|
||||
{{ $role->name }}
|
||||
</span>
|
||||
@endforeach
|
||||
</td>
|
||||
<td>
|
||||
@if (auth()->user()->can('admin.edit'))
|
||||
<a class="btn btn-success text-white"
|
||||
href="{{ route('admin.admins.edit', $admin->id) }}">Edit</a>
|
||||
@endif
|
||||
|
||||
@if (auth()->user()->can('admin.delete'))
|
||||
<a class="btn btn-danger text-white" href="javascript:void(0);"
|
||||
onclick="event.preventDefault(); if(confirm('Are you sure you want to delete?')) { document.getElementById('delete-form-{{ $admin->id }}').submit(); }">
|
||||
{{ __('Delete') }}
|
||||
</a>
|
||||
|
||||
<form id="delete-form-{{ $admin->id }}"
|
||||
action="{{ route('admin.admins.destroy', $admin->id) }}"
|
||||
method="POST" style="display: none;">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
</form>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
if ($('#dataTable').length) {
|
||||
$('#dataTable').DataTable({
|
||||
responsive: true
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,55 @@
|
||||
<script>
|
||||
/**
|
||||
* Check all the permissions
|
||||
*/
|
||||
$("#checkPermissionAll").click(function(){
|
||||
if($(this).is(':checked')){
|
||||
// check all the checkbox
|
||||
$('input[type=checkbox]').prop('checked', true);
|
||||
}else{
|
||||
// un check all the checkbox
|
||||
$('input[type=checkbox]').prop('checked', false);
|
||||
}
|
||||
});
|
||||
|
||||
function checkPermissionByGroup(className, checkThis){
|
||||
const groupIdName = $("#"+checkThis.id);
|
||||
const classCheckBox = $('.'+className+' input');
|
||||
|
||||
if(groupIdName.is(':checked')){
|
||||
classCheckBox.prop('checked', true);
|
||||
}else{
|
||||
classCheckBox.prop('checked', false);
|
||||
}
|
||||
implementAllChecked();
|
||||
}
|
||||
|
||||
function checkSinglePermission(groupClassName, groupID, countTotalPermission) {
|
||||
const classCheckbox = $('.'+groupClassName+ ' input');
|
||||
const groupIDCheckBox = $("#"+groupID);
|
||||
|
||||
// if there is any occurance where something is not selected then make selected = false
|
||||
if($('.'+groupClassName+ ' input:checked').length == countTotalPermission){
|
||||
groupIDCheckBox.prop('checked', true);
|
||||
}else{
|
||||
groupIDCheckBox.prop('checked', false);
|
||||
}
|
||||
implementAllChecked();
|
||||
}
|
||||
|
||||
function implementAllChecked() {
|
||||
const countPermissions = {{ count($all_permissions) }};
|
||||
const countPermissionGroups = {{ count($permission_groups) }};
|
||||
|
||||
// console.log((countPermissions + countPermissionGroups));
|
||||
// console.log($('input[type="checkbox"]:checked').length);
|
||||
|
||||
if($('input[type="checkbox"]:checked').length >= (countPermissions + countPermissionGroups)){
|
||||
$("#checkPermissionAll").prop('checked', true);
|
||||
}else{
|
||||
$("#checkPermissionAll").prop('checked', false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,33 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title')
|
||||
Dashboard
|
||||
@endsection
|
||||
|
||||
|
||||
@section('admin-content')
|
||||
<section class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1>Home</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="{{ route('dashboard.index') }}">Dashboard</a></li>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="card card-primary card-outline">
|
||||
<div class="card-body text-center">
|
||||
<p class="lead">Welcome to {{ config('app.name') }} (development version).</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
@@ -0,0 +1,127 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title')
|
||||
{{ $pageInfo['title'] }}
|
||||
@endsection
|
||||
|
||||
@section('styles')
|
||||
<link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/icon.css">
|
||||
|
||||
|
||||
<style>
|
||||
.easyui-tree li {
|
||||
padding-left: 10px;
|
||||
}
|
||||
</style>
|
||||
@endsection
|
||||
|
||||
@section('admin-content')
|
||||
<section class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1>{{ $pageInfo['title'] }}</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="{{ route('admin.dashboard') }}">{{ __('Dashboard') }}</a></li>
|
||||
<li class="breadcrumb-item active"><a href="{{ $pageInfo['path'] }}">{{ $pageInfo['title'] }}</a>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12 mt-5">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<p class="float-right mb-2">
|
||||
<a class="btn btn-secondary text-white" href="{{ route('admin.roles.index') }}">
|
||||
<i class="fa fa-arrow-left"></i> Back</a>
|
||||
<a class="btn btn-primary text-white" onclick="submitMenuSelection()">
|
||||
<i class="fa fa-save"></i> Save Selection</a>
|
||||
</p>
|
||||
<form id="menuForm" method="POST" action="">
|
||||
@csrf
|
||||
<input type="hidden" id="role_id" name="role_id" value="{{ $role_id }}">
|
||||
<div class="col-md-8">
|
||||
<ul id="menuTree" class="easyui-tree" data-options="checkbox:true,animate:true">
|
||||
{{-- Data di-parse ke JSON format --}}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript" src="https://www.jeasyui.com/easyui/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="https://www.jeasyui.com/easyui/jquery.easyui.min.js"></script>
|
||||
|
||||
<script>
|
||||
if ($('#dataTable').length) {
|
||||
$('#dataTable').DataTable({
|
||||
responsive: false
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
// Tree data dari Laravel (parsed sebagai JSON)
|
||||
const treeData = {!! json_encode($menuTree) !!};
|
||||
|
||||
// Initialize EasyUI tree dengan data dari controller
|
||||
$('#menuTree').tree({
|
||||
data: treeData,
|
||||
cascadeCheck: $(this).is(':checked'),
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
// Submit menu selection
|
||||
function submitMenuSelection() {
|
||||
const checkedNodes = $('#menuTree').tree('getChecked');
|
||||
const selectedIds = checkedNodes.map(node => node.id);
|
||||
var listMenu = JSON.stringify(selectedIds);
|
||||
var roleId = $('#role_id').val();
|
||||
|
||||
$.ajax({
|
||||
url: '{{ route('auth.menurole.submit') }}',
|
||||
type: 'POST',
|
||||
data: {
|
||||
menu_ids: listMenu,
|
||||
role_id: roleId
|
||||
},
|
||||
success: function(response) {
|
||||
Swal.fire({
|
||||
title: 'Success!',
|
||||
text: 'Menu selection saved successfully!',
|
||||
icon: 'success',
|
||||
confirmButtonText: 'OK'
|
||||
});
|
||||
},
|
||||
error: function(xhr) {
|
||||
Swal.fire({
|
||||
title: 'Error!',
|
||||
text: 'An error occurred while saving menu selection.',
|
||||
icon: 'error',
|
||||
confirmButtonText: 'OK'
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,115 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title')
|
||||
{{ $pageInfo['title'] }}
|
||||
@endsection
|
||||
|
||||
@section('styles')
|
||||
<style>
|
||||
.form-check-label {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
</style>
|
||||
@endsection
|
||||
|
||||
|
||||
@section('admin-content')
|
||||
<section class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1>{{ $pageInfo['title'] }}</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="{{ route('admin.dashboard') }}">{{ __('Dashboard') }}</a></li>
|
||||
<li class="breadcrumb-item active"><a href="{{ $pageInfo['path'] }}">{{ $pageInfo['title'] }}</a>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12 mt-5">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form action="{{ route('admin.roles.store') }}" method="POST">
|
||||
@csrf
|
||||
<div class="row mb-2">
|
||||
<div class="col-md-6">
|
||||
<h4 class="header-title">Create New Role</h4>
|
||||
</div>
|
||||
<div class="col-md-6 text-right">
|
||||
<button type="submit" class="btn btn-primary pr-4 pl-4">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
@include('backend.layouts.partials.messages')
|
||||
<div class="form-group">
|
||||
<label for="name">Role Name</label>
|
||||
<input type="text" class="form-control" id="name" name="name"
|
||||
placeholder="Enter a Role Name" required autofocus value="{{ old('name') }}">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="name">Permissions</label>
|
||||
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" id="checkPermissionAll"
|
||||
value="1">
|
||||
<label class="form-check-label" for="checkPermissionAll">All</label>
|
||||
</div>
|
||||
<hr>
|
||||
@php $i = 1; @endphp
|
||||
@foreach ($permission_groups as $group)
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input"
|
||||
id="{{ $i }}Management" value="{{ $group->name }}"
|
||||
onclick="checkPermissionByGroup('role-{{ $i }}-management-checkbox', this)">
|
||||
<label class="form-check-label"
|
||||
for="checkPermission">{{ $group->name }}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-9 role-{{ $i }}-management-checkbox">
|
||||
@php
|
||||
$permissions = App\User::getpermissionsByGroupName($group->name);
|
||||
$j = 1;
|
||||
@endphp
|
||||
@foreach ($permissions as $permission)
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" name="permissions[]"
|
||||
id="checkPermission{{ $permission->id }}"
|
||||
value="{{ $permission->name }}">
|
||||
<label class="form-check-label"
|
||||
for="checkPermission{{ $permission->id }}">{{ $permission->name }}</label>
|
||||
</div>
|
||||
@php $j++; @endphp
|
||||
@endforeach
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
@php $i++; @endphp
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary mt-4 pr-4 pl-4">Save</button>
|
||||
<a href="{{ route('admin.roles.index') }}" class="btn btn-secondary mt-4 pr-4 pl-4">
|
||||
Back</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
@include('backend.pages.roles.partials.scripts')
|
||||
@endsection
|
||||
@@ -0,0 +1,125 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title')
|
||||
{{ $pageInfo['title'] }}
|
||||
@endsection
|
||||
|
||||
@section('styles')
|
||||
<style>
|
||||
.form-check-label {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
</style>
|
||||
@endsection
|
||||
|
||||
|
||||
@section('admin-content')
|
||||
<section class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1>{{ $pageInfo['title'] }}</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="{{ route('admin.dashboard') }}">{{ __('Dashboard') }}</a></li>
|
||||
<li class="breadcrumb-item active"><a href="{{ $pageInfo['path'] }}">{{ $pageInfo['title'] }}</a>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12 mt-5">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form action="{{ route('admin.roles.update', $role->id) }}" method="POST">
|
||||
@method('PUT')
|
||||
@csrf
|
||||
<div class="row mb-2">
|
||||
<div class="col-md-6">
|
||||
<h4 class="header-title">Role Edit - {{ $role->name }}</h4>
|
||||
</div>
|
||||
<div class="col-md-6 text-right">
|
||||
<button type="submit" class="btn btn-primary pr-4 pl-4">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('backend.layouts.partials.messages')
|
||||
<div class="form-group">
|
||||
<label for="name">Role Name</label>
|
||||
<input type="text" class="form-control" id="name" value="{{ $role->name }}"
|
||||
name="name" placeholder="Enter a Role Name" required autofocus>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="name">Permissions</label>
|
||||
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" id="checkPermissionAll"
|
||||
value="1"
|
||||
{{ App\User::roleHasPermissions($role, $all_permissions) ? 'checked' : '' }}>
|
||||
<label class="form-check-label" for="checkPermissionAll">All</label>
|
||||
</div>
|
||||
<hr>
|
||||
@php $i = 1; @endphp
|
||||
@foreach ($permission_groups as $group)
|
||||
<div class="row">
|
||||
@php
|
||||
$permissions = App\User::getpermissionsByGroupName($group->name);
|
||||
$j = 1;
|
||||
@endphp
|
||||
|
||||
<div class="col-3">
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input"
|
||||
id="{{ $i }}Management" value="{{ $group->name }}"
|
||||
onclick="checkPermissionByGroup('role-{{ $i }}-management-checkbox', this)"
|
||||
{{ App\User::roleHasPermissions($role, $permissions) ? 'checked' : '' }}>
|
||||
<label class="form-check-label"
|
||||
for="checkPermission">{{ $group->name }}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-9 role-{{ $i }}-management-checkbox">
|
||||
@foreach ($permissions as $permission)
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input"
|
||||
onclick="checkSinglePermission('role-{{ $i }}-management-checkbox', '{{ $i }}Management', {{ count($permissions) }})"
|
||||
name="permissions[]"
|
||||
{{ $role->hasPermissionTo($permission->name) ? 'checked' : '' }}
|
||||
id="checkPermission{{ $permission->id }}"
|
||||
value="{{ $permission->name }}">
|
||||
<label class="form-check-label"
|
||||
for="checkPermission{{ $permission->id }}">{{ $permission->name }}</label>
|
||||
</div>
|
||||
@php $j++; @endphp
|
||||
@endforeach
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
@php $i++; @endphp
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary mt-4 pr-4 pl-4">Save</button>
|
||||
<a href="{{ route('admin.roles.index') }}"
|
||||
class="btn btn-secondary mt-4 pr-4 pl-4">Cancel</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
|
||||
@section('scripts')
|
||||
@include('backend.pages.roles.partials.scripts')
|
||||
@endsection
|
||||
@@ -0,0 +1,97 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title')
|
||||
{{ $pageInfo['title'] }}
|
||||
@endsection
|
||||
|
||||
|
||||
@section('admin-content')
|
||||
<section class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1>{{ $pageInfo['title'] }}</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="{{ route('admin.dashboard') }}">{{ __('Dashboard') }}</a></li>
|
||||
<li class="breadcrumb-item active"><a href="{{ $pageInfo['path'] }}">{{ $pageInfo['title'] }}</a>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12 mt-5">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title float-left">{{ $pageInfo['sub_title'] }}</h4>
|
||||
<p class="float-right mb-2">
|
||||
@if (Auth::user()->can('role.create'))
|
||||
<a class="btn btn-primary text-white" href="{{ route('admin.roles.create') }}">Create
|
||||
New Role</a>
|
||||
@endif
|
||||
</p>
|
||||
<div class="clearfix"></div>
|
||||
<div class="dataTables_wrapper dt-bootstrap4">
|
||||
@include('backend.layouts.partials.messages')
|
||||
<table id="dataTable"
|
||||
class="table table-bordered table-striped table-head-fixed dataTable dtr-inline"
|
||||
style="width:100%">
|
||||
<thead class="bg-light text-capitalize">
|
||||
<tr>
|
||||
<th width="5%">{{ __('Sl') }}</th>
|
||||
<th width="10%">{{ __('Role Name') }}</th>
|
||||
<th width="30%">{{ __('Permission List') }}</th>
|
||||
<th width="10%">{{ __('Action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($roles as $role)
|
||||
<tr>
|
||||
<td>{{ $loop->index + 1 }}</td>
|
||||
<td>{{ $role->name }}</td>
|
||||
<td>
|
||||
@foreach ($role->permissions as $permission)
|
||||
<span class="badge badge-info mr-1">
|
||||
{{ $permission->name }}
|
||||
</span>
|
||||
@endforeach
|
||||
</td>
|
||||
<td>
|
||||
@if (auth::user()->can('admin.edit'))
|
||||
<a class="btn btn-success btn-sm text-white"
|
||||
href="{{ route('admin.roles.edit', $role->id) }}">Edit</a>
|
||||
@endif
|
||||
<a class="btn btn-primary btn-sm text-white"
|
||||
href="{{ route('auth.menurole.index', $role->id) }}">Assign
|
||||
Menus</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
if ($('#dataTable').length) {
|
||||
$('#dataTable').DataTable({
|
||||
responsive: false
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,55 @@
|
||||
<script>
|
||||
/**
|
||||
* Check all the permissions
|
||||
*/
|
||||
$("#checkPermissionAll").click(function(){
|
||||
if($(this).is(':checked')){
|
||||
// check all the checkbox
|
||||
$('input[type=checkbox]').prop('checked', true);
|
||||
}else{
|
||||
// un check all the checkbox
|
||||
$('input[type=checkbox]').prop('checked', false);
|
||||
}
|
||||
});
|
||||
|
||||
function checkPermissionByGroup(className, checkThis){
|
||||
const groupIdName = $("#"+checkThis.id);
|
||||
const classCheckBox = $('.'+className+' input');
|
||||
|
||||
if(groupIdName.is(':checked')){
|
||||
classCheckBox.prop('checked', true);
|
||||
}else{
|
||||
classCheckBox.prop('checked', false);
|
||||
}
|
||||
implementAllChecked();
|
||||
}
|
||||
|
||||
function checkSinglePermission(groupClassName, groupID, countTotalPermission) {
|
||||
const classCheckbox = $('.'+groupClassName+ ' input');
|
||||
const groupIDCheckBox = $("#"+groupID);
|
||||
|
||||
// if there is any occurance where something is not selected then make selected = false
|
||||
if($('.'+groupClassName+ ' input:checked').length == countTotalPermission){
|
||||
groupIDCheckBox.prop('checked', true);
|
||||
}else{
|
||||
groupIDCheckBox.prop('checked', false);
|
||||
}
|
||||
implementAllChecked();
|
||||
}
|
||||
|
||||
function implementAllChecked() {
|
||||
const countPermissions = {{ count($all_permissions) }};
|
||||
const countPermissionGroups = {{ count($permission_groups) }};
|
||||
|
||||
// console.log((countPermissions + countPermissionGroups));
|
||||
// console.log($('input[type="checkbox"]:checked').length);
|
||||
|
||||
if($('input[type="checkbox"]:checked').length >= (countPermissions + countPermissionGroups)){
|
||||
$("#checkPermissionAll").prop('checked', true);
|
||||
}else{
|
||||
$("#checkPermissionAll").prop('checked', false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,103 @@
|
||||
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title')
|
||||
{{ $pageInfo['title'] }}
|
||||
@endsection
|
||||
|
||||
@section('styles')
|
||||
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/css/select2.min.css" rel="stylesheet" />
|
||||
|
||||
<style>
|
||||
.form-check-label {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
</style>
|
||||
@endsection
|
||||
|
||||
|
||||
@section('admin-content')
|
||||
|
||||
<!-- page title area start -->
|
||||
<div class="page-title-area">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-sm-6">
|
||||
<div class="breadcrumbs-area clearfix">
|
||||
<h4 class="page-title pull-left">User Create</h4>
|
||||
<ul class="breadcrumbs pull-left">
|
||||
<li><a href="{{ route('admin.dashboard') }}">Dashboard</a></li>
|
||||
<li><a href="{{ route('admin.users.index') }}">All Users</a></li>
|
||||
<li><span>Create User</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 clearfix">
|
||||
@include('backend.layouts.partials.logout')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- page title area end -->
|
||||
|
||||
<div class="main-content-inner">
|
||||
<div class="row">
|
||||
<!-- data table start -->
|
||||
<div class="col-12 mt-5">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title">Create New User</h4>
|
||||
@include('backend.layouts.partials.messages')
|
||||
|
||||
<form action="{{ route('admin.users.store') }}" method="POST">
|
||||
@csrf
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6 col-sm-12">
|
||||
<label for="name">User Name</label>
|
||||
<input type="text" class="form-control" id="name" name="name" placeholder="Enter Name">
|
||||
</div>
|
||||
<div class="form-group col-md-6 col-sm-12">
|
||||
<label for="email">User Email</label>
|
||||
<input type="text" class="form-control" id="email" name="email" placeholder="Enter Email">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6 col-sm-12">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" class="form-control" id="password" name="password" placeholder="Enter Password">
|
||||
</div>
|
||||
<div class="form-group col-md-6 col-sm-12">
|
||||
<label for="password_confirmation">Confirm Password</label>
|
||||
<input type="password" class="form-control" id="password_confirmation" name="password_confirmation" placeholder="Enter Password">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6 col-sm-12">
|
||||
<label for="password">Assign Roles</label>
|
||||
<select name="roles[]" id="roles" class="form-control select2" multiple>
|
||||
@foreach ($roles as $role)
|
||||
<option value="{{ $role->name }}">{{ $role->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary mt-4 pr-4 pl-4">Save User</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- data table end -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/js/select2.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.select2').select2();
|
||||
})
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,104 @@
|
||||
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title')
|
||||
{{ $pageInfo['title'] }}
|
||||
@endsection
|
||||
|
||||
@section('styles')
|
||||
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/css/select2.min.css" rel="stylesheet" />
|
||||
|
||||
<style>
|
||||
.form-check-label {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
</style>
|
||||
@endsection
|
||||
|
||||
|
||||
@section('admin-content')
|
||||
|
||||
<!-- page title area start -->
|
||||
<div class="page-title-area">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-sm-6">
|
||||
<div class="breadcrumbs-area clearfix">
|
||||
<h4 class="page-title pull-left">User Create</h4>
|
||||
<ul class="breadcrumbs pull-left">
|
||||
<li><a href="{{ route('admin.dashboard') }}">Dashboard</a></li>
|
||||
<li><a href="{{ route('admin.users.index') }}">All Users</a></li>
|
||||
<li><span>Edit User - {{ $user->name }}</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 clearfix">
|
||||
@include('backend.layouts.partials.logout')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- page title area end -->
|
||||
|
||||
<div class="main-content-inner">
|
||||
<div class="row">
|
||||
<!-- data table start -->
|
||||
<div class="col-12 mt-5">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title">Edit User - {{ $user->name }}</h4>
|
||||
@include('backend.layouts.partials.messages')
|
||||
|
||||
<form action="{{ route('admin.users.update', $user->id) }}" method="POST">
|
||||
@method('PUT')
|
||||
@csrf
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6 col-sm-12">
|
||||
<label for="name">User Name</label>
|
||||
<input type="text" class="form-control" id="name" name="name" placeholder="Enter Name" value="{{ $user->name }}">
|
||||
</div>
|
||||
<div class="form-group col-md-6 col-sm-12">
|
||||
<label for="email">User Email</label>
|
||||
<input type="text" class="form-control" id="email" name="email" placeholder="Enter Email" value="{{ $user->email }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6 col-sm-12">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" class="form-control" id="password" name="password" placeholder="Enter Password">
|
||||
</div>
|
||||
<div class="form-group col-md-6 col-sm-12">
|
||||
<label for="password_confirmation">Confirm Password</label>
|
||||
<input type="password" class="form-control" id="password_confirmation" name="password_confirmation" placeholder="Enter Password">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6 col-sm-12">
|
||||
<label for="password">Assign Roles</label>
|
||||
<select name="roles[]" id="roles" class="form-control select2" multiple>
|
||||
@foreach ($roles as $role)
|
||||
<option value="{{ $role->name }}" {{ $user->hasRole($role->name) ? 'selected' : '' }}>{{ $role->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary mt-4 pr-4 pl-4">Save User</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- data table end -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/js/select2.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.select2').select2();
|
||||
})
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,121 @@
|
||||
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title')
|
||||
{{ $pageInfo['title'] }}
|
||||
@endsection
|
||||
|
||||
@section('styles')
|
||||
<!-- Start datatable css -->
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.18/css/dataTables.bootstrap4.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/responsive/2.2.3/css/responsive.bootstrap.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/responsive/2.2.3/css/responsive.jqueryui.min.css">
|
||||
@endsection
|
||||
|
||||
|
||||
@section('admin-content')
|
||||
|
||||
<!-- page title area start -->
|
||||
<div class="page-title-area">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-sm-6">
|
||||
<div class="breadcrumbs-area clearfix">
|
||||
<h4 class="page-title pull-left">Users</h4>
|
||||
<ul class="breadcrumbs pull-left">
|
||||
<li><a href="{{ route('admin.dashboard') }}">Dashboard</a></li>
|
||||
<li><span>All Users</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 clearfix">
|
||||
@include('backend.layouts.partials.logout')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- page title area end -->
|
||||
|
||||
<div class="main-content-inner">
|
||||
<div class="row">
|
||||
<!-- data table start -->
|
||||
<div class="col-12 mt-5">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title float-left">Users List</h4>
|
||||
<p class="float-right mb-2">
|
||||
<a class="btn btn-primary text-white" href="{{ route('admin.users.create') }}">Create New User</a>
|
||||
</p>
|
||||
<div class="clearfix"></div>
|
||||
<div class="data-tables">
|
||||
@include('backend.layouts.partials.messages')
|
||||
<table id="dataTable" class="text-center">
|
||||
<thead class="bg-light text-capitalize">
|
||||
<tr>
|
||||
<th width="5%">Sl</th>
|
||||
<th width="10%">Name</th>
|
||||
<th width="10%">Email</th>
|
||||
<th width="40%">Roles</th>
|
||||
<th width="15%">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($users as $user)
|
||||
<tr>
|
||||
<td>{{ $loop->index+1 }}</td>
|
||||
<td>{{ $user->name }}</td>
|
||||
<td>{{ $user->email }}</td>
|
||||
<td>
|
||||
@foreach ($user->roles as $role)
|
||||
<span class="badge badge-info mr-1">
|
||||
{{ $role->name }}
|
||||
</span>
|
||||
@endforeach
|
||||
</td>
|
||||
<td>
|
||||
<a class="btn btn-success text-white" href="{{ route('admin.users.edit', $user->id) }}">Edit</a>
|
||||
|
||||
<a class="btn btn-danger text-white" href="{{ route('admin.users.destroy', $user->id) }}"
|
||||
onclick="event.preventDefault(); document.getElementById('delete-form-{{ $user->id }}').submit();">
|
||||
Delete
|
||||
</a>
|
||||
|
||||
<form id="delete-form-{{ $user->id }}" action="{{ route('admin.users.destroy', $user->id) }}" method="POST" style="display: none;">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- data table end -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
@section('scripts')
|
||||
<!-- Start datatable js -->
|
||||
<script src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.10.18/js/jquery.dataTables.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.10.18/js/dataTables.bootstrap4.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/responsive/2.2.3/js/dataTables.responsive.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/responsive/2.2.3/js/responsive.bootstrap.min.js"></script>
|
||||
|
||||
<script>
|
||||
/*================================
|
||||
datatable active
|
||||
==================================*/
|
||||
if ($('#dataTable').length) {
|
||||
$('#dataTable').DataTable({
|
||||
responsive: true
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,55 @@
|
||||
<script>
|
||||
/**
|
||||
* Check all the permissions
|
||||
*/
|
||||
$("#checkPermissionAll").click(function(){
|
||||
if($(this).is(':checked')){
|
||||
// check all the checkbox
|
||||
$('input[type=checkbox]').prop('checked', true);
|
||||
}else{
|
||||
// un check all the checkbox
|
||||
$('input[type=checkbox]').prop('checked', false);
|
||||
}
|
||||
});
|
||||
|
||||
function checkPermissionByGroup(className, checkThis){
|
||||
const groupIdName = $("#"+checkThis.id);
|
||||
const classCheckBox = $('.'+className+' input');
|
||||
|
||||
if(groupIdName.is(':checked')){
|
||||
classCheckBox.prop('checked', true);
|
||||
}else{
|
||||
classCheckBox.prop('checked', false);
|
||||
}
|
||||
implementAllChecked();
|
||||
}
|
||||
|
||||
function checkSinglePermission(groupClassName, groupID, countTotalPermission) {
|
||||
const classCheckbox = $('.'+groupClassName+ ' input');
|
||||
const groupIDCheckBox = $("#"+groupID);
|
||||
|
||||
// if there is any occurance where something is not selected then make selected = false
|
||||
if($('.'+groupClassName+ ' input:checked').length == countTotalPermission){
|
||||
groupIDCheckBox.prop('checked', true);
|
||||
}else{
|
||||
groupIDCheckBox.prop('checked', false);
|
||||
}
|
||||
implementAllChecked();
|
||||
}
|
||||
|
||||
function implementAllChecked() {
|
||||
const countPermissions = {{ count($all_permissions) }};
|
||||
const countPermissionGroups = {{ count($permission_groups) }};
|
||||
|
||||
// console.log((countPermissions + countPermissionGroups));
|
||||
// console.log($('input[type="checkbox"]:checked').length);
|
||||
|
||||
if($('input[type="checkbox"]:checked').length >= (countPermissions + countPermissionGroups)){
|
||||
$("#checkPermissionAll").prop('checked', true);
|
||||
}else{
|
||||
$("#checkPermissionAll").prop('checked', false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,74 @@
|
||||
<div class="modal fade" id="agentModal" tabindex="-1" role="dialog" aria-labelledby="agentModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="agentModalLabel">Pilih Agen</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row mb-2">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="search_no_agen">Agent No</label>
|
||||
<input type="text" id="search_no_agen" class="form-control" placeholder="Input No Agen...">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="search_nama">Agent Name</label>
|
||||
<input type="text" id="search_nama" class="form-control" placeholder="Input Nama Agen...">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="search_title">Title</label>
|
||||
<select id="search_title" class="form-control">
|
||||
<option value="">Input Title Agen...</option>
|
||||
<option value="FC">FC</option>
|
||||
<option value="AM">AM</option>
|
||||
<option value="SAM">SAM</option>
|
||||
<option value="BP">BP</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="search_kpa_code">KPA Code</label>
|
||||
<input type="text" id="search_kpa_code" class="form-control" placeholder="Input KPA Code...">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="search_kpa_name">KPA Name</label>
|
||||
<input type="text" id="search_kpa_name" class="form-control" placeholder="Input KPA Name...">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4" style="margin-top: 2em;">
|
||||
<button type="button" id="filter_btn" class="btn btn-primary">Filter</button>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="table-responsive">
|
||||
<table id="agent_finder" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No Agen</th>
|
||||
<th>Nama Agen</th>
|
||||
<th>Title</th>
|
||||
<th>KPA Code</th>
|
||||
<th>KPA Name</th>
|
||||
<th>License Expired Date</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="agent-list">
|
||||
<!-- Data agen akan di-load melalui DataTable -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,12 @@
|
||||
@extends('errors.errors_layout')
|
||||
|
||||
@section('title')
|
||||
403 - Forbidden
|
||||
@endsection
|
||||
|
||||
@section('error-content')
|
||||
<h2 class="headline text-danger"> 403 Forbidden</h2>
|
||||
<p>Access to this resource on the server is denied</p>
|
||||
<a class="btn btn-primary" href="{{ route('admin.dashboard') }}">Back to Home</a>
|
||||
<a class="btn btn-primary" href="{{ route('admin.login') }}">Login Again !</a>
|
||||
@endsection
|
||||
@@ -0,0 +1,12 @@
|
||||
@extends('errors.errors_layout')
|
||||
|
||||
@section('title')
|
||||
404 - Page Not Found
|
||||
@endsection
|
||||
|
||||
@section('error-content')
|
||||
<h2 class="headline text-danger">404 - Not Found</h2>
|
||||
<p>Sorry, This Page Not Found !</p>
|
||||
<a class="btn btn-primary" href="{{ route('admin.dashboard') }}">Back to Home</a>
|
||||
<a class="btn btn-primary" href="{{ route('admin.login') }}">Login Again !</a>
|
||||
@endsection
|
||||
@@ -0,0 +1,12 @@
|
||||
@extends('errors.errors_layout')
|
||||
|
||||
@section('title')
|
||||
500 - Internal Server Error
|
||||
@endsection
|
||||
|
||||
@section('error-content')
|
||||
<h2 class="headline text-danger">500 - Internal Server Error</h2>
|
||||
<p>This page isn't working, We will work on fixing that right away. !</p>
|
||||
<a class="btn btn-primary" href="{{ route('admin.dashboard') }}">Back to Home</a>
|
||||
<a class="btn btn-primary" href="{{ route('admin.login') }}">Login Again !</a>
|
||||
@endsection
|
||||
@@ -0,0 +1,37 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<title>@yield('title')</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="shortcut icon" type="image/png" href="assets/images/icon/favicon.ico">
|
||||
@include('layouts.partials.styles')
|
||||
@yield('styles')
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- preloader area start -->
|
||||
<div id="preloader">
|
||||
<div class="loader"></div>
|
||||
</div>
|
||||
<!-- preloader area end -->
|
||||
<!-- error area start -->
|
||||
<section class="content">
|
||||
<div class="error-page">
|
||||
<div class="container">
|
||||
<div class="error-content">
|
||||
@yield('error-content')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- error area end -->
|
||||
|
||||
@include('layouts.partials.scripts')
|
||||
@yield('scripts')
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,23 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">{{ __('Dashboard') }}</div>
|
||||
|
||||
<div class="card-body">
|
||||
@if (session('status'))
|
||||
<div class="alert alert-success" role="alert">
|
||||
{{ session('status') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{ __('You are logged in!') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -1,75 +1,110 @@
|
||||
@extends('adminlte::page')
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" style="height: auto;" class="">
|
||||
|
||||
{{-- Extend and customize the browser title --}}
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/x-icon" href="{{ asset('templates/dist/img/logo.ico') }}">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="{{ asset('templates/dist/img/logo.ico') }}">
|
||||
<title>{{ config('app.app_name') }} - @yield('title')</title>
|
||||
@include('layouts.partials.styles')
|
||||
@yield('styles')
|
||||
</head>
|
||||
|
||||
@section('title')
|
||||
{{ config('adminlte.title') }}
|
||||
@hasSection('subtitle') | @yield('subtitle') @endif
|
||||
@stop
|
||||
<body>
|
||||
|
||||
{{-- Extend and customize the page content header --}}
|
||||
<body class="sidebar-mini layout-fixed layout-navbar-fixed" style="height: auto;">
|
||||
<div class="wrapper">
|
||||
|
||||
@section('content_header')
|
||||
@hasSection('content_header_title')
|
||||
<h1 class="text-muted">
|
||||
@yield('content_header_title')
|
||||
<div class="preloader flex-column justify-content-center align-items-center" style="height: 0px;">
|
||||
<img class="animation__shake" src="{{ asset('templates/dist/img/small-logo.png') }}" alt="Logo"
|
||||
height="60" width="60" style="display: none;">
|
||||
</div>
|
||||
|
||||
@hasSection('content_header_subtitle')
|
||||
<small class="text-dark">
|
||||
<i class="fas fa-xs fa-angle-right text-muted"></i>
|
||||
@yield('content_header_subtitle')
|
||||
</small>
|
||||
@endif
|
||||
</h1>
|
||||
@endif
|
||||
@stop
|
||||
<nav class="main-header navbar navbar-expand navbar-dark bg-primary">
|
||||
|
||||
{{-- Rename section content to content_body --}}
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-widget="pushmenu" href="#" role="button"><i
|
||||
class="fas fa-bars"></i></a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
@section('content')
|
||||
@yield('content_body')
|
||||
@stop
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-widget="fullscreen" href="#" role="button">
|
||||
<i class="fas fa-expand-arrows-alt"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{{-- Create a common footer --}}
|
||||
<li class="nav-item dropdown" title="Account Profile">
|
||||
<a class="nav-link" data-toggle="dropdown" href="#">
|
||||
{{ Auth::guard('admin')->user()->name }} <i class="far fa-user"></i>
|
||||
</a>
|
||||
@include('layouts.partials.logout')
|
||||
</li>
|
||||
|
||||
@section('footer')
|
||||
<div class="float-right">
|
||||
Version: {{ config('app.version', '1.0.0') }}
|
||||
</div>
|
||||
|
||||
<strong>
|
||||
<a href="{{ config('app.company_url', '#') }}">
|
||||
{{ config('app.company_name', 'My company') }}
|
||||
</a>
|
||||
</strong>
|
||||
@stop
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
{{-- Add common Javascript/Jquery code --}}
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
<aside class="main-sidebar elevation-1 sidebar-light-danger">
|
||||
|
||||
$(document).ready(function() {
|
||||
// Add your common script logic here...
|
||||
});
|
||||
<a href="#" class="brand-link bg-light">
|
||||
<img src="{{ asset('templates/dist/img/logo-app.png') }}" alt="App Logo Text" class="brand-text brand-image">
|
||||
</a>
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
<div
|
||||
class="sidebar os-host os-host-overflow os-host-overflow-y os-host-resize-disabled os-host-scrollbar-horizontal-hidden os-host-transition os-theme-dark">
|
||||
<div class="os-resize-observer-host observed">
|
||||
<div class="os-resize-observer" style="left: 0px; right: auto;"></div>
|
||||
</div>
|
||||
<div class="os-size-auto-observer observed" style="height: calc(100% + 1px); float: left;">
|
||||
<div class="os-resize-observer"></div>
|
||||
</div>
|
||||
<div class="os-content-glue" style="margin: 0px -8px; width: 249px; height: 676px;"></div>
|
||||
<div class="os-padding">
|
||||
<div class="os-viewport os-viewport-native-scrollbars-invisible" style="overflow-y: scroll;">
|
||||
<div class="os-content" style="padding: 0px 8px; height: 100%; width: 100%;">
|
||||
|
||||
{{-- Add common CSS customizations --}}
|
||||
<div class="user-panel mt-3 pb-3 mb-3 d-flex">
|
||||
<div class="image">
|
||||
<img src="{{ Avatar::create(Auth::guard('admin')->user()->name)->toBase64() }}"
|
||||
class="img-circle" alt="User Image">
|
||||
</div>
|
||||
<div class="info">
|
||||
<a class="d-block">{{ Auth::guard('admin')->user()->name }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@include('layouts.partials.sidebar')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="os-scrollbar os-scrollbar-horizontal os-scrollbar-unusable os-scrollbar-auto-hidden">
|
||||
<div class="os-scrollbar-track">
|
||||
<div class="os-scrollbar-handle" style="width: 100%; transform: translate(0px, 0px);"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="os-scrollbar os-scrollbar-vertical os-scrollbar-auto-hidden">
|
||||
<div class="os-scrollbar-track">
|
||||
<div class="os-scrollbar-handle" style="height: 57.5686%; transform: translate(0px, 0px);">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="os-scrollbar-corner"></div>
|
||||
</div>
|
||||
|
||||
@push('css')
|
||||
<style type="text/css">
|
||||
</aside>
|
||||
|
||||
{{-- You can add AdminLTE customizations here --}}
|
||||
/*
|
||||
.card-header {
|
||||
border-bottom: none;
|
||||
}
|
||||
.card-title {
|
||||
font-weight: 600;
|
||||
}
|
||||
*/
|
||||
<div class="content-wrapper" style="min-height: 677.4px;">
|
||||
@yield('admin-content')
|
||||
</div>
|
||||
|
||||
</style>
|
||||
@endpush
|
||||
@include('layouts.partials.footer')
|
||||
@include('layouts.partials.scripts')
|
||||
@yield('scripts')
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<footer class="main-footer">
|
||||
<strong>Copyright © {{ date('Y') }} <a href="{{ url('/') }}">{{ config('app.name') }}</a>.</strong> All rights reserved.
|
||||
<div class="float-right d-none d-sm-inline-block">
|
||||
<b>Version</b> 1.0.0
|
||||
</div>
|
||||
</footer>
|
||||
@@ -0,0 +1,17 @@
|
||||
<div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
|
||||
<div class="dropdown-divider"></div>
|
||||
<a href="#" class="dropdown-item">
|
||||
<i class="fas fa-user"></i> My Account
|
||||
</a>
|
||||
|
||||
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item dropdown-footer" href="{{ route('admin.logout.submit') }}"
|
||||
onclick="event.preventDefault();
|
||||
document.getElementById('admin-logout-form').submit();">Logout
|
||||
Account</a>
|
||||
|
||||
<form id="admin-logout-form" action="{{ route('admin.logout.submit') }}" method="POST" style="display: none;">
|
||||
@csrf
|
||||
</form>
|
||||
</div>
|
||||
@@ -0,0 +1,30 @@
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
||||
<div>
|
||||
@foreach ($errors->all() as $error)
|
||||
<p>{{ $error }}</p>
|
||||
@endforeach
|
||||
</div>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
||||
<span>{{ Session::get('success') }}</span>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (Session::has('error'))
|
||||
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
||||
<span>{{ Session::get('error') }}</span>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
@endif
|
||||
@@ -0,0 +1,33 @@
|
||||
<script src="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/plugins/jquery/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/plugins/jquery-ui/jquery-ui.min.js"></script>
|
||||
<script>
|
||||
$.widget.bridge('uibutton', $.ui.button)
|
||||
</script>
|
||||
<script src="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/plugins/sweetalert2/sweetalert2.all.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/plugins/select2/js/select2.full.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/plugins/moment/moment.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/plugins/daterangepicker/daterangepicker.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/app/js/adminlte.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/plugins/datatables/jquery.dataTables.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/plugins/datatables/datatables.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/app/js/bootstrap-datepicker.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Ladda/1.0.6/spin.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Ladda/1.0.6/ladda.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/plugins/waitme/waitMe.min.js"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// Initialize Ladda button on click event
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': document
|
||||
.querySelector('meta[name="csrf-token"]')
|
||||
.getAttribute("content")
|
||||
}
|
||||
});
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<script src="{{ asset('js/global.function.js') }}"></script>
|
||||
@@ -0,0 +1,8 @@
|
||||
<!-- sidebar menu area start -->
|
||||
@php
|
||||
$usr = Auth::guard('admin')->user();
|
||||
@endphp
|
||||
|
||||
<nav class="mt-2">
|
||||
{!! $menu !!}
|
||||
</nav>
|
||||
@@ -0,0 +1,69 @@
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/plugins/fontawesome-free/css/all.min.css">
|
||||
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/plugins/icheck-bootstrap/icheck-bootstrap.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/app/css/adminlte.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/plugins/overlayScrollbars/css/OverlayScrollbars.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/plugins/daterangepicker/daterangepicker.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/plugins/datatables/datatables.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/plugins/materialdesignicon/css/materialdesignicons.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/plugins/sweetalert2/sweetalert2.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/app/css/bootstrap-datepicker.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/plugins/select2/css/select2.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Ladda/1.0.6/ladda-themeless.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fiqhpratama/upsense-cdn@main/adminlte-blue/plugins/waitme/waitMe.min.css">
|
||||
<link rel="stylesheet" href="{{ asset('css/global.css') }}">
|
||||
|
||||
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<style type="text/css">
|
||||
|
||||
/* Chart.js */
|
||||
@keyframes chartjs-render-animation {
|
||||
from {
|
||||
opacity: .99
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 1
|
||||
}
|
||||
}
|
||||
|
||||
.chartjs-render-monitor {
|
||||
animation: chartjs-render-animation 1ms
|
||||
}
|
||||
|
||||
.chartjs-size-monitor,
|
||||
.chartjs-size-monitor-expand,
|
||||
.chartjs-size-monitor-shrink {
|
||||
position: absolute;
|
||||
direction: ltr;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
visibility: hidden;
|
||||
z-index: -1
|
||||
}
|
||||
|
||||
.chartjs-size-monitor-expand>div {
|
||||
position: absolute;
|
||||
width: 1000000px;
|
||||
height: 1000000px;
|
||||
left: 0;
|
||||
top: 0
|
||||
}
|
||||
|
||||
.chartjs-size-monitor-shrink>div {
|
||||
position: absolute;
|
||||
width: 200%;
|
||||
height: 200%;
|
||||
left: 0;
|
||||
top: 0
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user