new dashboard

This commit is contained in:
aarsyah0 2025-04-24 19:40:41 +07:00
parent ca724db6f8
commit 3fbc8fb111
8 changed files with 216 additions and 191 deletions

View File

@ -1,18 +1,25 @@
<meta name="keywords" content="creative tim, updivision, html dashboard, laravel, html css dashboard laravel, soft ui dashboard laravel, laravel soft ui dashboard, soft ui admin, laravel dashboard, laravel admin, web dashboard, bootstrap 5 dashboard laravel, bootstrap 5, css3 dashboard, bootstrap 5 admin laravel, soft ui dashboard bootstrap 5 laravel, frontend, responsive bootstrap 5 dashboard, soft ui dashboard, soft ui laravel bootstrap 5 dashboard" />
<meta name="keywords"
content="creative tim, updivision, html dashboard, laravel, html css dashboard laravel, soft ui dashboard laravel, laravel soft ui dashboard, soft ui admin, laravel dashboard, laravel admin, web dashboard, bootstrap 5 dashboard laravel, bootstrap 5, css3 dashboard, bootstrap 5 admin laravel, soft ui dashboard bootstrap 5 laravel, frontend, responsive bootstrap 5 dashboard, soft ui dashboard, soft ui laravel bootstrap 5 dashboard" />
<meta name="description" content="A free Laravel Dashboard featuring dozens of UI components & basic Laravel CRUDs." />
<meta itemprop="name" content="Soft UI Dashboard Laravel by Creative Tim & UPDIVISION" />
<meta itemprop="description" content="A free Laravel Dashboard featuring dozens of UI components & basic Laravel CRUDs." />
<meta itemprop="image" content="https://s3.amazonaws.com/creativetim_bucket/products/602/original/soft-ui-dashboard-laravel.jpg" />
<meta itemprop="description"
content="A free Laravel Dashboard featuring dozens of UI components & basic Laravel CRUDs." />
<meta itemprop="image"
content="https://s3.amazonaws.com/creativetim_bucket/products/602/original/soft-ui-dashboard-laravel.jpg" />
<meta name="twitter:card" content="product" />
<meta name="twitter:site" content="@creativetim" />
<meta name="twitter:title" content="Soft UI Dashboard Laravel by Creative Tim & UPDIVISION" />
<meta name="twitter:description" content="A free Laravel Dashboard featuring dozens of UI components & basic Laravel CRUDs." />
<meta name="twitter:description"
content="A free Laravel Dashboard featuring dozens of UI components & basic Laravel CRUDs." />
<meta name="twitter:creator" content="@creativetim" />
<meta name="twitter:image" content="https://s3.amazonaws.com/creativetim_bucket/products/602/original/soft-ui-dashboard-laravel.jpg" />
<meta name="twitter:image"
content="https://s3.amazonaws.com/creativetim_bucket/products/602/original/soft-ui-dashboard-laravel.jpg" />
<meta property="fb:app_id" content="655968634437471" />
<meta property="og:title" content="Soft UI Dashboard Laravel by Creative Tim & UPDIVISION" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://www.creative-tim.com/live/soft-ui-dashboard-laravel" />
<meta property="og:image" content="https://s3.amazonaws.com/creativetim_bucket/products/602/original/soft-ui-dashboard-laravel.jpg" />
<meta property="og:description" content="A free Laravel Dashboard featuring dozens of UI components & basic Laravel CRUDs." />
<meta property="og:image"
content="https://s3.amazonaws.com/creativetim_bucket/products/602/original/soft-ui-dashboard-laravel.jpg" />
<meta property="og:description"
content="A free Laravel Dashboard featuring dozens of UI components & basic Laravel CRUDs." />
<meta property="og:site_name" content="Creative Tim" />

View File

@ -1,66 +1 @@
<div class="fixed-plugin">
<a class="fixed-plugin-button text-dark position-fixed px-3 py-2">
<i class="fa fa-cog py-2"> </i>
</a>
<div class="card shadow-lg ">
<div class="card-header pb-0 pt-3 ">
<div class="{{ (Request::is('rtl') ? 'float-end' : 'float-start') }}">
<h5 class="mt-3 mb-0">Soft UI Configurator</h5>
<p>See our dashboard options.</p>
</div>
<div class="{{ (Request::is('rtl') ? 'float-start mt-4' : 'float-end mt-4') }}">
<button class="btn btn-link text-dark p-0 fixed-plugin-close-button">
<i class="fa fa-close"></i>
</button>
</div>
<!-- End Toggle Button -->
</div>
<hr class="horizontal dark my-1">
<div class="card-body pt-sm-3 pt-0">
<!-- Sidebar Backgrounds -->
<div>
<h6 class="mb-0">Sidebar Colors</h6>
</div>
<a href="javascript:void(0)" class="switch-trigger background-color">
<div class="badge-colors my-2 {{ (Request::is('rtl') ? 'text-end' : 'text-start') }}">
<span class="badge filter bg-gradient-primary active" data-color="primary" onclick="sidebarColor(this)"></span>
<span class="badge filter bg-gradient-dark" data-color="dark" onclick="sidebarColor(this)"></span>
<span class="badge filter bg-gradient-info" data-color="info" onclick="sidebarColor(this)"></span>
<span class="badge filter bg-gradient-success" data-color="success" onclick="sidebarColor(this)"></span>
<span class="badge filter bg-gradient-warning" data-color="warning" onclick="sidebarColor(this)"></span>
<span class="badge filter bg-gradient-danger" data-color="danger" onclick="sidebarColor(this)"></span>
</div>
</a>
<!-- Sidenav Type -->
<div class="mt-3">
<h6 class="mb-0">Sidenav Type</h6>
<p class="text-sm">Choose between 2 different sidenav types.</p>
</div>
<div class="d-flex">
<button class="btn bg-gradient-primary w-100 px-3 mb-2 active" data-class="bg-transparent" onclick="sidebarType(this)">Transparent</button>
<button class="btn bg-gradient-primary w-100 px-3 mb-2 {{ (Request::is('rtl') ? 'me-2' : 'ms-2') }}" data-class="bg-white" onclick="sidebarType(this)">White</button>
</div>
<p class="text-sm d-xl-none d-block mt-2">You can change the sidenav type just on desktop view.</p>
<!-- Navbar Fixed -->
<div class="mt-3">
<h6 class="mb-0">Navbar Fixed</h6>
</div>
<div class="form-check form-switch ps-0">
<input class="form-check-input mt-1 ms-auto {{ (Request::is('rtl') ? 'float-end' : '') }}"" type="checkbox" id="navbarFixed" onclick="navbarFixed(this)">
</div>
<hr class="horizontal dark my-sm-4">
<a class="btn bg-gradient-dark w-100" href="https://www.creative-tim.com/product/soft-ui-dashboard-laravel" target="_blank">Free Download</a>
<a class="btn btn-outline-dark w-100" href="/documentation/getting-started/overview.html" target="_blank">View documentation</a>
<div class="w-100 text-center">
<a class="github-button" href="https://github.com/creativetimofficial/soft-ui-dashboard-laravel" target="_blank" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star creativetimofficial/soft-ui-dashboard on GitHub">Star</a>
<h6 class="mt-3">Thank you for sharing!</h6>
<a href="https://twitter.com/intent/tweet?text=Check%20Soft%20UI%20Dashboard%20Laravel%20made%20by%20%40CreativeTim%20and%20%40UPDIVISION%20%23webdesign%20%23dashboard%20%23laravel%20%23bootstrap5&amp;url=https%3A%2F%2Fwww.creative-tim.com%2Fproduct%2Fsoft-ui-dashboard-pro-laravel" class="btn btn-dark mb-0 me-2" target="_blank">
<i class="fab fa-twitter me-1" aria-hidden="true"></i> Tweet
</a>
<a href="https://www.facebook.com/sharer/sharer.php?u=https://www.creative-tim.com/product/soft-ui-dashboard-pro-laravel" class="btn btn-dark mb-0 me-2" target="_blank">
<i class="fab fa-facebook-square me-1" aria-hidden="true"></i> Share
</a>
</div>
</div>
</div>
</div>

View File

@ -1,6 +1,93 @@
@extends('layouts/user_type/auth')
@section('content')
@php
if (!function_exists('getSentimentCounts')) {
function getSentimentCounts($path)
{
if (!file_exists($path)) {
return ['positif' => 0, 'netral' => 0, 'negatif' => 0];
}
$rows = array_map('str_getcsv', file($path));
array_shift($rows);
$labels = array_column($rows, 1);
$counts = array_count_values($labels);
return array_merge(['positif' => 0, 'netral' => 0, 'negatif' => 0], $counts);
}
}
// Hitung data sekali
$base = resource_path('views');
$cDana = getSentimentCounts("{$base}/terlabel.csv");
$cGoPay = getSentimentCounts("{$base}/terlabelgopay.csv");
$cShopee = getSentimentCounts("{$base}/terlabeshopepay.csv");
// Total kartu (opsional)
$totalPositif = $cDana['positif'] + $cGoPay['positif'] + $cShopee['positif'];
$totalNetral = $cDana['netral'] + $cGoPay['netral'] + $cShopee['netral'];
$totalNegatif = $cDana['negatif'] + $cGoPay['negatif'] + $cShopee['negatif'];
@endphp
<div class="row mb-4">
<div class="col-12">
<!-- Filter di atas, rata-kanan -->
<div class="d-flex justify-content-end mb-3">
<select id="walletFilter" class="form-select form-select-sm w-auto" style="min-width: 120px;">
<option value="all">Semua</option>
<option value="dana">Dana</option>
<option value="gopay">GoPay</option>
<option value="shopee">ShopeePay</option>
</select>
</div>
<!-- Baris kartu -->
<div class="row gx-3">
<div class="col-md-4">
<div class="card text-white" style="background-color: #b22fa4;">
<div class="card-body d-flex justify-content-between align-items-center">
<div>
<p class="mb-1 text-sm">Total Positif</p>
<h4 id="positifCount" class="mb-0 text-white">
{{ $cDana['positif'] + $cGoPay['positif'] + $cShopee['positif'] }}
</h4>
</div>
<i class="fa-solid fa-face-smile fa-4x opacity-8"></i>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card text-white" style="background-color: #a95b91;">
<div class="card-body d-flex justify-content-between align-items-center">
<div>
<p class="mb-1 text-sm">Total Netral</p>
<h4 id="netralCount" class="mb-0 text-white">
{{ $cDana['netral'] + $cGoPay['netral'] + $cShopee['netral'] }}
</h4>
</div>
<i class="fa-solid fa-face-meh fa-4x opacity-8"></i>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card text-white" style="background-color: #8b2f5e;">
<div class="card-body d-flex justify-content-between align-items-center">
<div>
<p class="mb-1 text-sm">Total Negatif</p>
<h4 id="negatifCount" class="mb-0 text-white">
{{ $cDana['negatif'] + $cGoPay['negatif'] + $cShopee['negatif'] }}
</h4>
</div>
<i class="fa-solid fa-face-frown fa-4x opacity-8"></i>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row mt-4">
<!-- Bar Chart Card -->
<div class="col-lg-5 mb-lg-0 mb-4">
@ -258,5 +345,41 @@
pieChart.update();
});
};
document.addEventListener('DOMContentLoaded', () => {
const filter = document.getElementById('walletFilter');
const positifEl = document.getElementById('positifCount');
const netralEl = document.getElementById('netralCount');
const negatifEl = document.getElementById('negatifCount');
const data = {
all: {
positif: {{ $cDana['positif'] + $cGoPay['positif'] + $cShopee['positif'] }},
netral: {{ $cDana['netral'] + $cGoPay['netral'] + $cShopee['netral'] }},
negatif: {{ $cDana['negatif'] + $cGoPay['negatif'] + $cShopee['negatif'] }},
},
dana: {
positif: {{ $cDana['positif'] }},
netral: {{ $cDana['netral'] }},
negatif: {{ $cDana['negatif'] }},
},
gopay: {
positif: {{ $cGoPay['positif'] }},
netral: {{ $cGoPay['netral'] }},
negatif: {{ $cGoPay['negatif'] }},
},
shopee: {
positif: {{ $cShopee['positif'] }},
netral: {{ $cShopee['netral'] }},
negatif: {{ $cShopee['negatif'] }},
},
};
filter.addEventListener('change', function() {
const d = data[this.value];
positifEl.textContent = d.positif;
netralEl.textContent = d.netral;
negatifEl.textContent = d.negatif;
});
});
</script>
@endpush

View File

@ -44,6 +44,8 @@
<link href="../assets/css/nucleo-svg.css" rel="stylesheet" />
<!-- CSS Files -->
<link id="pagestyle" href="../assets/css/soft-ui-dashboard.css?v=1.0.3" rel="stylesheet" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"
crossorigin="anonymous" />
</head>
<body
@ -56,10 +58,10 @@
@endguest
@if (session()->has('success'))
<div x-data="{ show: true }" x-init="setTimeout(() => show = false, 4000)" x-show="show"
{{-- <div x-data="{ show: true }" x-init="setTimeout(() => show = false, 4000)" x-show="show"
class="position-fixed bg-success rounded right-3 text-sm py-2 px-4">
<p class="m-0">{{ session('success') }}</p>
</div>
</div> --}}
@endif
<!-- Core JS Files -->
<script src="../assets/js/core/popper.min.js"></script>

View File

@ -1,6 +1,6 @@
<footer class="footer pt-3 ">
<div class="container-fluid">
{{-- <div class="container-fluid">
<div class="row align-items-center justify-content-lg-between">
</div>
</div>
</div> --}}
</footer>

View File

@ -4,26 +4,6 @@
<div class="row">
@if (!auth()->user() || \Request::is('static-sign-up'))
<div class="col-lg-8 mx-auto text-center mb-4 mt-2">
<a href="https://dribbble.com/creativetim" target="_blank" class="text-secondary me-xl-4 me-4">
<span class="text-lg fab fa-dribbble" aria-hidden="true"></span>
</a>
<a href="https://twitter.com/CreativeTim" target="_blank" class="text-secondary me-xl-4 me-4">
<span class="text-lg fab fa-twitter" aria-hidden="true"></span>
</a>
<a href="https://www.instagram.com/creativetimofficial/" target="_blank"
class="text-secondary me-xl-4 me-4">
<span class="text-lg fab fa-instagram" aria-hidden="true"></span>
</a>
<a href="https://ro.pinterest.com/thecreativetim/" target="_blank"
class="text-secondary me-xl-4 me-4">
<span class="text-lg fab fa-pinterest" aria-hidden="true"></span>
</a>
<a href="https://github.com/creativetimofficial" target="_blank"
class="text-secondary me-xl-4 me-4">
<span class="text-lg fab fa-github" aria-hidden="true"></span>
</a>
</div>
@endif
</div>
@if (!auth()->user() || \Request::is('static-sign-up'))

View File

@ -18,103 +18,81 @@
<span class="d-sm-inline d-none">Sign Out</span>
</a>
</li>
<li class="nav-item d-xl-none ps-3 d-flex align-items-center">
<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>
<li class="nav-item px-3 d-flex align-items-center">
<a href="javascript:;" class="nav-link text-body p-0">
<i class="fa fa-cog fixed-plugin-button-nav cursor-pointer"></i>
</a>
</li>
<li class="nav-item dropdown pe-2 d-flex align-items-center">
<a href="javascript:;" class="nav-link text-body p-0" id="dropdownMenuButton"
data-bs-toggle="dropdown" aria-expanded="false">
<i class="fa fa-bell cursor-pointer"></i>
</a>
<ul class="dropdown-menu dropdown-menu-end px-2 py-3 me-sm-n4"
aria-labelledby="dropdownMenuButton">
<li class="mb-2">
<a class="dropdown-item border-radius-md" href="javascript:;">
<div class="d-flex py-1">
<div class="my-auto">
<img src="../assets/img/team-2.jpg" class="avatar avatar-sm me-3 ">
</div>
<div class="d-flex flex-column justify-content-center">
<h6 class="text-sm font-weight-normal mb-1">
<span class="font-weight-bold">New message</span> from Laur
</h6>
<p class="text-xs text-secondary mb-0">
<i class="fa fa-clock me-1"></i>
13 minutes ago
</p>
</div>
<ul class="dropdown-menu dropdown-menu-end px-2 py-3 me-sm-n4" aria-labelledby="dropdownMenuButton">
<li class="mb-2">
<a class="dropdown-item border-radius-md" href="javascript:;">
<div class="d-flex py-1">
<div class="my-auto">
<img src="../assets/img/team-2.jpg" class="avatar avatar-sm me-3 ">
</div>
</a>
</li>
<li class="mb-2">
<a class="dropdown-item border-radius-md" href="javascript:;">
<div class="d-flex py-1">
<div class="my-auto">
<img src="../assets/img/small-logos/logo-spotify.svg"
class="avatar avatar-sm bg-gradient-dark me-3 ">
</div>
<div class="d-flex flex-column justify-content-center">
<h6 class="text-sm font-weight-normal mb-1">
<span class="font-weight-bold">New album</span> by Travis Scott
</h6>
<p class="text-xs text-secondary mb-0">
<i class="fa fa-clock me-1"></i>
1 day
</p>
</div>
<div class="d-flex flex-column justify-content-center">
<h6 class="text-sm font-weight-normal mb-1">
<span class="font-weight-bold">New message</span> from Laur
</h6>
<p class="text-xs text-secondary mb-0">
<i class="fa fa-clock me-1"></i>
13 minutes ago
</p>
</div>
</a>
</li>
<li>
<a class="dropdown-item border-radius-md" href="javascript:;">
<div class="d-flex py-1">
<div class="avatar avatar-sm bg-gradient-secondary me-3 my-auto">
<svg width="12px" height="12px" viewBox="0 0 43 36" version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>credit-card</title>
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g transform="translate(-2169.000000, -745.000000)" fill="#FFFFFF"
fill-rule="nonzero">
<g transform="translate(1716.000000, 291.000000)">
<g transform="translate(453.000000, 454.000000)">
<path class="color-background"
d="M43,10.7482083 L43,3.58333333 C43,1.60354167 41.3964583,0 39.4166667,0 L3.58333333,0 C1.60354167,0 0,1.60354167 0,3.58333333 L0,10.7482083 L43,10.7482083 Z"
opacity="0.593633743"></path>
<path class="color-background"
d="M0,16.125 L0,32.25 C0,34.2297917 1.60354167,35.8333333 3.58333333,35.8333333 L39.4166667,35.8333333 C41.3964583,35.8333333 43,34.2297917 43,32.25 L43,16.125 L0,16.125 Z M19.7083333,26.875 L7.16666667,26.875 L7.16666667,23.2916667 L19.7083333,23.2916667 L19.7083333,26.875 Z M35.8333333,26.875 L28.6666667,26.875 L28.6666667,23.2916667 L35.8333333,23.2916667 L35.8333333,26.875 Z">
</path>
</g>
</div>
</a>
</li>
<li class="mb-2">
<a class="dropdown-item border-radius-md" href="javascript:;">
<div class="d-flex py-1">
<div class="my-auto">
<img src="../assets/img/small-logos/logo-spotify.svg"
class="avatar avatar-sm bg-gradient-dark me-3 ">
</div>
<div class="d-flex flex-column justify-content-center">
<h6 class="text-sm font-weight-normal mb-1">
<span class="font-weight-bold">New album</span> by Travis Scott
</h6>
<p class="text-xs text-secondary mb-0">
<i class="fa fa-clock me-1"></i>
1 day
</p>
</div>
</div>
</a>
</li>
<li>
<a class="dropdown-item border-radius-md" href="javascript:;">
<div class="d-flex py-1">
<div class="avatar avatar-sm bg-gradient-secondary me-3 my-auto">
<svg width="12px" height="12px" viewBox="0 0 43 36" version="1.1"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>credit-card</title>
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g transform="translate(-2169.000000, -745.000000)" fill="#FFFFFF"
fill-rule="nonzero">
<g transform="translate(1716.000000, 291.000000)">
<g transform="translate(453.000000, 454.000000)">
<path class="color-background"
d="M43,10.7482083 L43,3.58333333 C43,1.60354167 41.3964583,0 39.4166667,0 L3.58333333,0 C1.60354167,0 0,1.60354167 0,3.58333333 L0,10.7482083 L43,10.7482083 Z"
opacity="0.593633743"></path>
<path class="color-background"
d="M0,16.125 L0,32.25 C0,34.2297917 1.60354167,35.8333333 3.58333333,35.8333333 L39.4166667,35.8333333 C41.3964583,35.8333333 43,34.2297917 43,32.25 L43,16.125 L0,16.125 Z M19.7083333,26.875 L7.16666667,26.875 L7.16666667,23.2916667 L19.7083333,23.2916667 L19.7083333,26.875 Z M35.8333333,26.875 L28.6666667,26.875 L28.6666667,23.2916667 L35.8333333,23.2916667 L35.8333333,26.875 Z">
</path>
</g>
</g>
</g>
</svg>
</div>
<div class="d-flex flex-column justify-content-center">
<h6 class="text-sm font-weight-normal mb-1">
Payment successfully completed
</h6>
<p class="text-xs text-secondary mb-0">
<i class="fa fa-clock me-1"></i>
2 days
</p>
</div>
</g>
</svg>
</div>
</a>
</li>
</ul>
</li>
<div class="d-flex flex-column justify-content-center">
<h6 class="text-sm font-weight-normal mb-1">
Payment successfully completed
</h6>
<p class="text-xs text-secondary mb-0">
<i class="fa fa-clock me-1"></i>
2 days
</p>
</div>
</div>
</a>
</li>
</ul>
</ul>
</div>
</div>

View File

@ -1,11 +1,11 @@
<aside class="sidenav navbar navbar-vertical navbar-expand-xs border-0 border-radius-xl my-3 fixed-start ms-3 "
id="sidenav-main">
<aside class="sidenav navbar navbar-vertical navbar-expand-xs border-0 border-radius-xl my-3 fixed-start ms-3 bg-primary"
style="background-color: #F566D6;" id="sidenav-main">
<div class="sidenav-header">
<i class="fas fa-times p-3 cursor-pointer text-secondary opacity-5 position-absolute end-0 top-0 d-none d-xl-none"
aria-hidden="true" id="iconSidenav"></i>
<a class="align-items-center d-flex m-0 navbar-brand text-wrap" href="{{ route('dashboard') }}">
<img src="../assets/img/logo-ct.png" class="navbar-brand-img h-100" alt="...">
<span class="ms-3 font-weight-bold">TwiSense</span>
<span class="ms-3 font-weight-bold text-white">TwiSense</span>
</a>
</div>
<hr class="horizontal dark mt-0">