ADD EV3-358 statisztika modul bővítése aktuális ár megjelenítéssel phase 1 create modern page layout with sidenavbar
This commit is contained in:
parent
898a102517
commit
f81f285479
3
.gitignore
vendored
3
.gitignore
vendored
@ -75,3 +75,6 @@ Homestead.yaml
|
|||||||
/database/csv/*
|
/database/csv/*
|
||||||
/.gitea/workflows/deploy.yml
|
/.gitea/workflows/deploy.yml
|
||||||
/.claude/settings.local.json
|
/.claude/settings.local.json
|
||||||
|
/public/js/
|
||||||
|
/public/css/
|
||||||
|
/public/mix-manifest.json
|
||||||
|
|||||||
33
app/Filament/Pages/CurrentPrice.php
Normal file
33
app/Filament/Pages/CurrentPrice.php
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Pages;
|
||||||
|
|
||||||
|
use Filament\Pages\Page;
|
||||||
|
|
||||||
|
class CurrentPrice extends Page
|
||||||
|
{
|
||||||
|
protected static string | \BackedEnum | null $navigationIcon = 'heroicon-o-currency-dollar';
|
||||||
|
|
||||||
|
protected static ?string $title = 'Aktuális ár';
|
||||||
|
|
||||||
|
protected static ?string $navigationLabel = 'Aktuális ár';
|
||||||
|
|
||||||
|
protected static string | \UnitEnum | null $navigationGroup = 'Statisztika';
|
||||||
|
|
||||||
|
public function getHeader(): ?\Illuminate\Contracts\View\View
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFooter(): ?\Illuminate\Contracts\View\View
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBreadcrumbs(): array
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected string $view = 'filament.pages.current-price';
|
||||||
|
}
|
||||||
@ -373,8 +373,22 @@
|
|||||||
}
|
}
|
||||||
this.initNavBarButton=function () {
|
this.initNavBarButton=function () {
|
||||||
debug('asdadasd');
|
debug('asdadasd');
|
||||||
|
|
||||||
|
let typeFromUrl = new URLSearchParams(window.location.search).get('type');
|
||||||
|
if (typeFromUrl) {
|
||||||
|
let target = $('nav a.sidebar[data-action="' + typeFromUrl + '"]');
|
||||||
|
if (target.length) {
|
||||||
|
setTimeout(function() {
|
||||||
|
target.trigger('click');
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$('nav a.sidebar').off('click');
|
$('nav a.sidebar').off('click');
|
||||||
$('nav a.sidebar').on('click',function (){
|
$('nav a.sidebar').on('click',function (e){
|
||||||
|
if ($(this).attr('href') !== '#') {
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
|
||||||
//let type=$(this).data('action');
|
//let type=$(this).data('action');
|
||||||
|
|
||||||
|
|||||||
@ -23,23 +23,29 @@
|
|||||||
<div class="sidebar-menu active">
|
<div class="sidebar-menu active">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a href="#" class="sidebar OrderFrequency" data-action="OrderFrequency">
|
<a href="{{ url('legacy/admin/statistics') }}?type=OrderFrequency" class="sidebar OrderFrequency" data-action="OrderFrequency">
|
||||||
<i class="fa fa-wave-square"></i>
|
<i class="fa fa-wave-square"></i>
|
||||||
<span>Rendelés gyakoriság</span>
|
<span>Rendelés gyakoriság</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#" class="sidebar PriceChange" data-action="PriceChange">
|
<a href="{{ url('legacy/admin/statistics') }}?type=PriceChange" class="sidebar PriceChange" data-action="PriceChange">
|
||||||
<i class="fa fa-chart-bar"></i>
|
<i class="fa fa-chart-bar"></i>
|
||||||
<span>Árváltozás</span>
|
<span>Árváltozás</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#" class="sidebar ProductAmount" data-action="ProductAmount">
|
<a href="{{ url('legacy/admin/statistics') }}?type=ProductAmount" class="sidebar ProductAmount" data-action="ProductAmount">
|
||||||
<i class="fa fa-dollar-sign"></i>
|
<i class="fa fa-dollar-sign"></i>
|
||||||
<span>Forgalom</span>
|
<span>Forgalom</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="{{ route('filament.admin.pages.current-price') }}">
|
||||||
|
<i class="fa fa-tag"></i>
|
||||||
|
<span>Aktuális ár</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
{{-- <li>
|
{{-- <li>
|
||||||
<a href="#" class="sidebar often" data-action="often">
|
<a href="#" class="sidebar often" data-action="often">
|
||||||
<i class="fa fa-dollar-sign"></i>
|
<i class="fa fa-dollar-sign"></i>
|
||||||
|
|||||||
134
resources/views/filament/pages/current-price.blade.php
Normal file
134
resources/views/filament/pages/current-price.blade.php
Normal file
@ -0,0 +1,134 @@
|
|||||||
|
<div class="legacy-stats-wrapper">
|
||||||
|
{{-- Betöltjük a legacy stílusokat az ikonok és alapformázások miatt --}}
|
||||||
|
<link rel="stylesheet" href="{{ mix('/css/app.css') }}">
|
||||||
|
|
||||||
|
<style>
|
||||||
|
/* Elrejtjük a Filament standard elemeit ezen az oldalon */
|
||||||
|
.fi-sidebar { display: none !important; }
|
||||||
|
.fi-main { padding-left: 0 !important; }
|
||||||
|
.fi-topbar { z-index: 10 !important; }
|
||||||
|
|
||||||
|
/* A legacy sidebar stílusaihoz szükséges alapok */
|
||||||
|
.page-wrapper.chiller-theme .page-content {
|
||||||
|
padding-left: 260px;
|
||||||
|
}
|
||||||
|
@media screen and (max-width: 768px) {
|
||||||
|
.page-wrapper.chiller-theme .page-content {
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Biztosítjuk a szürke hátteret */
|
||||||
|
.fi-main-ctn {
|
||||||
|
background-color: #f4f4f4 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statistic-card {
|
||||||
|
background: white;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.statistic-card-header {
|
||||||
|
padding: 15px 20px;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
.statistic-card-body {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Navigációs gombok stílusa (a modern nézetből átemelve, de a legacy-hoz igazítva) */
|
||||||
|
.legacy-nav-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 1rem;
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
border: 1px solid #dee2e6;
|
||||||
|
border-radius: 0.25rem;
|
||||||
|
color: #212529;
|
||||||
|
transition: background-color 0.2s;
|
||||||
|
}
|
||||||
|
.legacy-nav-item:hover {
|
||||||
|
background-color: #e9ecef;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.legacy-nav-item i {
|
||||||
|
font-size: 1.25rem;
|
||||||
|
margin-right: 0.75rem;
|
||||||
|
color: #453821;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Aktív menüpont stílusa a sidebar-ban */
|
||||||
|
.sidebar-menu ul li.active > a {
|
||||||
|
color: #b8bfce;
|
||||||
|
background: #3a3f48;
|
||||||
|
}
|
||||||
|
.sidebar-menu ul li.active > a i {
|
||||||
|
color: #16c7ff;
|
||||||
|
text-shadow: 0px 0px 10px rgba(22, 199, 255, 0.5);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div class="page-wrapper chiller-theme toggled">
|
||||||
|
@php
|
||||||
|
// Aktívvá tesszük a CurrentPrice linket a sidebarban, ha az a href megegyezik
|
||||||
|
// De mivel a navSidebar.blade.php-t include-oljuk, a legegyszerűbb ha a CSS-sel oldjuk meg
|
||||||
|
// vagy itt helyben injectálunk egy kis JS-t.
|
||||||
|
@endphp
|
||||||
|
@include('admin.statistics.navSidebar')
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
const currentUrl = window.location.href;
|
||||||
|
document.querySelectorAll('.sidebar-wrapper a').forEach(link => {
|
||||||
|
if (link.href === currentUrl) {
|
||||||
|
link.parentElement.classList.add('active');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<main class="page-content" style="padding-top: 20px;">
|
||||||
|
<div class="container-fluid" style="max-width: 100%;">
|
||||||
|
<div class="statistic-card">
|
||||||
|
<div class="statistic-card-header">
|
||||||
|
Statisztikai navigáció (Legacy)
|
||||||
|
</div>
|
||||||
|
<div class="statistic-card-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4 mb-3">
|
||||||
|
<a href="{{ url('legacy/admin/statistics') }}?type=OrderFrequency" class="legacy-nav-item">
|
||||||
|
<i class="fa fa-wave-square"></i>
|
||||||
|
<span>Rendelés gyakoriság</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4 mb-3">
|
||||||
|
<a href="{{ url('legacy/admin/statistics') }}?type=PriceChange" class="legacy-nav-item">
|
||||||
|
<i class="fa fa-chart-bar"></i>
|
||||||
|
<span>Árváltozás</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4 mb-3">
|
||||||
|
<a href="{{ url('legacy/admin/statistics') }}?type=ProductAmount" class="legacy-nav-item">
|
||||||
|
<i class="fa fa-dollar-sign"></i>
|
||||||
|
<span>Forgalom</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="statistic-card">
|
||||||
|
<div class="statistic-card-header">
|
||||||
|
Aktuális ár statisztika
|
||||||
|
</div>
|
||||||
|
<div class="statistic-card-body">
|
||||||
|
<p>Ez a statisztikai elem még fejlesztés alatt áll.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
Loading…
Reference in New Issue
Block a user