Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions app/Http/Controllers/JournalController.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ public function getData($userId, $companyId, $search = null, $status = null, $so
$sortType = 'asc';
}
$journals = $journals->orderBy($sort, $sortType);
} else {
$journals = $journals->orderBy('date', 'desc');
}
if ($paginate) {
$journals = $journals->paginate(10);
Expand Down
6 changes: 5 additions & 1 deletion app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public function boot()

view()->composer('*', function ($view) {
if (auth()->check()) {
$authUser = auth()->user();
$userPermissions = auth()->user()->getAllPermissions()->pluck('id')->toArray();
$menus = Menu::with('children')
->where('parent_id', null)
Expand All @@ -43,7 +44,10 @@ public function boot()
->orderBy('order')
->get();

$view->with('menus', $menus);
$view->with([
'authUser' => $authUser,
'menus' => $menus
]);
}
});

Expand Down
27 changes: 27 additions & 0 deletions app/View/Components/Navbar.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

namespace App\View\Components;

use Closure;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;

class Navbar extends Component
{
public $user;
/**
* Create a new component instance.
*/
public function __construct($user)
{
$this->user = $user;
}

/**
* Get the view / contents that represent the component.
*/
public function render(): View|Closure|string
{
return view('components.navbar');
}
}
41 changes: 40 additions & 1 deletion resources/css/soft-ui-dashboard/_navbar-vertical.scss
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,46 @@
}
}
}
// Media fixes for iPhone 5 like resolutions

// responsive sidenav start
.g-sidenav-show {
&.g-sidenav-pinned {
.sidenav {
transform: translateX(0);
}
}

.sidenav {
&.fixed-start {
transform: translateX(0);
}

transition: transform 0.3s ease;
}

.sidenav-toggler-inner {
.sidenav-toggler-line {
background-color: #333;
}
}

.g-sidenav-show.g-sidenav-pinned {
.sidenav {
transform: translateX(0);
}
}
}
@include media-breakpoint-down(sm) {
.g-sidenav-show {
&.g-sidenav-pinned {
.sidenav {
transform: translateX(0);
}
}
}
}
// responsive sidenav end

@include media-breakpoint-down(xl) {
.g-sidenav-show {
&.rtl {
Expand Down
2 changes: 2 additions & 0 deletions resources/views/appliances/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

@extends('layouts.dashboard')

@section('title', 'Pendaftar ' . $vacancy->name)

@section('dashboard-content')
<x-table
pageName="Pendaftar {{ $vacancy->name }}" permissionCreate="appliance-create" :pagination="$appliances" :tableData="$appliances">
Expand Down
2 changes: 2 additions & 0 deletions resources/views/companies/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

@extends('layouts.dashboard')

@section('title', 'Perusahaan')

@section('dashboard-content')
<x-table routeCreate="{{ route('companies.create') }}" pageName="Perusahaan" permissionCreate="company-create" :pagination="$companies" :tableData="$companies">

Expand Down
16 changes: 15 additions & 1 deletion resources/views/components/alert.blade.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
<div class="alert {{ $type }}" role="alert">
<div class="alert {{ $type }} alert-dismissible fade show custom-alert" role="alert">
{{ $message }}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>

<style>
.custom-alert {
position: fixed;
top: 20px;
right: 20px;
z-index: 1050;
width: auto;
min-width: 250px;
max-width: 400px;
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}
</style>
61 changes: 61 additions & 0 deletions resources/views/components/navbar.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<!-- Navbar Start -->
<nav class="navbar navbar-main navbar-expand-lg px-0 mx-4 shadow-none border-radius-xl" id="navbarBlur"
navbar-scroll="true">
<div class="container-fluid d-flex flex-column flex-lg-row align-items-center justify-content-between px-0">

<!-- Navbar Content (Avatar dan Title) -->
<div class="d-flex flex-column flex-lg-row align-items-center w-100 justify-content-between">

<!-- Title (Mobile: di bawah, Desktop: tetap di atas) -->
<nav aria-label="breadcrumb" class="order-2 order-lg-1 text-center text-lg-start w-100 mt-2 mt-lg-0">
<h6 class="font-weight-bolder mb-3 text-uppercase">@yield('title')</h6>
</nav>

<!-- User Avatar (Di kanan) -->
<div class="order-1 order-lg-2 w-100">
<ul class="navbar-nav d-flex flex-row align-items-center justify-content-between w-100">
<!-- Sidebar Toggle (Mobile) -->
<li class="nav-item d-lg-none">
<a href="javascript:;" class="nav-link text-body p-0" id="iconNavbarSidenav">
<div class="sidenav-toggler-inner">
<i class="sidenav-toggler-line"></i>
<i class="sidenav-toggler-line"></i>
<i class="sidenav-toggler-line"></i>
</div>
</a>
</li>

<!-- Avatar -->
<li class="nav-item dropdown ms-auto">
<a href="javascript:;" class="nav-link text-body font-weight-bold px-0 d-flex align-items-center"
id="dropdownMenuButton" data-bs-toggle="dropdown" aria-expanded="false">
<img src="{{ $authUser->avatar_url }}" class="avatar avatar-sm me-2 rounded-circle" alt="user"
style="width: 30px; height: 30px;">
<span class="d-none d-lg-inline">{{ $authUser->name }}</span>
</a>
<ul class="dropdown-menu dropdown-menu-end px-2 py-3 me-sm-n4 w-100"
aria-labelledby="dropdownMenuButton">
<li class="mb-2">
<a class="dropdown-item border-radius-md" href="{{ route('users.editProfile') }}">
<div class="d-flex py-1">
<h6 class="text-sm font-weight-normal mb-1">Edit Profil</h6>
</div>
</a>
</li>
<li class="mb-2">
<a class="dropdown-item border-radius-md" href="{{ route('change-password') }}">
<div class="d-flex py-1">
<h6 class="text-sm font-weight-normal mb-1">Ganti Password</h6>
</div>
</a>
</li>
</ul>
</li>
</ul>
</div>

</div>

</div>
</nav>
<!-- Navbar End -->
8 changes: 1 addition & 7 deletions resources/views/components/sidebar.blade.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
{{-- @php
dd($menus);
@endphp --}}


<!-- Sidenav Start -->
<aside class="sidenav navbar navbar-vertical navbar-expand-xs border-0 border-radius-xl my-3 fixed-start ms-3 bg-white"
id="sidenav-main">
<!-- Sidenav Header Start -->
Expand Down Expand Up @@ -78,4 +72,4 @@ class="icon icon-shape icon-sm shadow border-radius-md bg-white text-center me-2
</div>
<!-- Sidenav Main End -->
</aside>
<!-- Sidenav End -->
<!-- Sidenav End -->
Loading
Loading