Skip to content

Commit

Permalink
Merge commit '6f83881559277f9fbe7189210fd3e31ccd5679fa' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
marco76tv committed May 24, 2024
2 parents c9519ea + 6f83881 commit 9080ac9
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Filament/Pages/Dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ protected function getHeaderWidgets(): array
// Widgets\TestChartWidget::make(['qid' => 5]),
// Widgets\TestChartWidget::make(['qid' => 6]),
// Widgets\StatsOverviewWidget::class,

Widgets\StatWithIconWidget::make(['label' => 'Unique views', 'value' => '192.1k']),
Widgets\TestWidget::make(['widgets' => $widgets]),
Widgets\TestWidget::make(['widgets' => $widgets]),
Widgets\TestWidget::make(['widgets' => $widgets]),
Expand Down
2 changes: 2 additions & 0 deletions Filament/Widgets/GroupWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ class GroupWidget extends BaseWidget
{
use InteractsWithPageFilters;

protected static ?string $pollingInterval = null;

protected static string $view = 'ui::filament.widgets.group';

public array $widgets = [];
Expand Down
2 changes: 2 additions & 0 deletions Filament/Widgets/HeroWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ class HeroWidget extends BaseWidget

public string $icon = '';

protected static ?string $pollingInterval = null;

protected function getStats(): array
{
return [
Expand Down
27 changes: 27 additions & 0 deletions Filament/Widgets/StatWithIconWidget.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

declare(strict_types=1);

namespace Modules\UI\Filament\Widgets;

use Filament\Widgets\Widget as BaseWidget;
use Illuminate\Contracts\Support\Htmlable;

class StatWithIconWidget extends BaseWidget
{
protected static string $view = 'ui::filament.widgets.stat-with-icon';

protected string|Htmlable $label;

/**
* @var scalar|Htmlable|\Closure
*/
protected $value;

protected function getData(): array
{
dddx($this->label);

return [];
}
}
2 changes: 1 addition & 1 deletion Resources/views/filament/widgets/empty.blade.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<x-filament::widget >
EMPTY {{ $question_chart_id }}
{{-- EMPTY --}}
</x-filament::widget >
55 changes: 55 additions & 0 deletions Resources/views/filament/widgets/stat-with-icon.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<x-filament-widgets::widget>
<x-filament::section collapsible>
<x-filament::grid lg='2'>
<x-filament::grid.column >
<span class="overflow-hidden" >
<x-filament::icon
icon="fas-futbol"
size="24"
class="w-auto h-12"
/>
</span>

BBB

</x-filament::grid.column>
</x-filament::grid>
</x-filament::section>
</x-filament-widgets::widget>
{{--
<x-filament-widgets::widget >
<x-filament::grid
:default="$grid['default'] ?? 1"
:sm="$grid['sm'] ?? null"
:md="$grid['md'] ?? null"
:lg="$grid['lg'] ?? null"
:xl="$grid['xl'] ?? null"
class="gap-6"
>
<x-filament::grid.column>
<x-filament::section
class="overlook-card rounded-xl overflow-hidden relative h-24 bg-gradient-to-tr from-gray-100 via-white to-white dark:from-gray-950 dark:to-gray-900"
>
<a
href="#"
class="overflow-hidden absolute inset-0 py-2 px-3 text-gray-600 font-medium rounded-xl ring-primary-500 dark:text-gray-400 group hover:ring-2 focus:ring-2">
<x-filament::icon
icon="fas-futbol"
:size="24"
class="w-auto h-24 absolute left-0 top-8 text-primary-500 opacity-20 dark:opacity-20 transition group-hover:scale-110 group-hover:-rotate-12 group-hover:opacity-40 dark:group-hover:opacity-80"
/>
<span class="overlook-name">AAA</span>
<span class="text-gray-600 dark:text-gray-300 absolute leading-none bottom-3 right-4 text-3xl font-bold">BBB</span>
</a>
</x-filament::section>
</x-filament::grid.column>
</x-filament::grid>
</x-filament-widgets::widget>
--}}

0 comments on commit 9080ac9

Please sign in to comment.