From 9211405a271f64b2e19ce0063e92bdd851d2df09 Mon Sep 17 00:00:00 2001 From: merve karaman <107546467+mervekaraman@users.noreply.github.com> Date: Fri, 1 Dec 2023 16:21:01 +0300 Subject: [PATCH] Dashboard widget position fixed --- app/Abstracts/Widget.php | 2 +- app/Listeners/Update/V30/Version303.php | 4 ++-- app/Widgets/CashFlow.php | 2 +- resources/assets/js/components/AkauntingWidget.vue | 4 ++-- resources/views/common/dashboards/show.blade.php | 2 +- resources/views/components/widgets/header.blade.php | 12 ++++++++++++ resources/views/widgets/donut_chart.blade.php | 2 +- 7 files changed, 20 insertions(+), 8 deletions(-) diff --git a/app/Abstracts/Widget.php b/app/Abstracts/Widget.php index c37566d8c48..59470a357f7 100644 --- a/app/Abstracts/Widget.php +++ b/app/Abstracts/Widget.php @@ -17,7 +17,7 @@ abstract class Widget public $default_name = ''; public $default_settings = [ - 'width' => 'w-full lg:w-2/4 lg:px-12 my-8', + 'width' => 'w-full lg:w-2/4 lg:px-6 my-8', ]; public $description = ''; diff --git a/app/Listeners/Update/V30/Version303.php b/app/Listeners/Update/V30/Version303.php index 95c80eeb7e6..d0b444cadf0 100644 --- a/app/Listeners/Update/V30/Version303.php +++ b/app/Listeners/Update/V30/Version303.php @@ -88,10 +88,10 @@ public function updateWidgets() $widget_settings->width = 'w-full lg:w-1/3 px-6'; break; case 'col-md-6': - $widget_settings->width = 'w-full lg:w-2/4 px-12'; + $widget_settings->width = 'w-full lg:w-2/4 px-6'; break; case 'col-md-12': - $widget_settings->width = 'w-full px-12'; + $widget_settings->width = 'w-full px-6'; break; } diff --git a/app/Widgets/CashFlow.php b/app/Widgets/CashFlow.php index e8d049f5446..8d5684dad34 100644 --- a/app/Widgets/CashFlow.php +++ b/app/Widgets/CashFlow.php @@ -17,7 +17,7 @@ class CashFlow extends Widget public $default_name = 'widgets.cash_flow'; public $default_settings = [ - 'width' => 'w-full my-8 lg:px-12', + 'width' => 'w-full my-8 lg:px-6', ]; public $description = 'widgets.description.cash_flow'; diff --git a/resources/assets/js/components/AkauntingWidget.vue b/resources/assets/js/components/AkauntingWidget.vue index e734cee5b4a..44be2fdfd25 100644 --- a/resources/assets/js/components/AkauntingWidget.vue +++ b/resources/assets/js/components/AkauntingWidget.vue @@ -173,11 +173,11 @@ export default { }, { label: '50%', - value: 'w-full lg:w-2/4 lg:px-12' + value: 'w-full lg:w-2/4 lg:px-6' }, { label: '100%', - value: 'w-full lg:px-12' + value: 'w-full lg:px-6' } ], form: { diff --git a/resources/views/common/dashboards/show.blade.php b/resources/views/common/dashboards/show.blade.php index 3bc294304b8..9789d9cd9dd 100644 --- a/resources/views/common/dashboards/show.blade.php +++ b/resources/views/common/dashboards/show.blade.php @@ -145,7 +145,7 @@ class="w-full h-full flex items-center rounded-md px-2 text-sm hover:bg-lilac-10 @endsection -
+
@foreach($widgets as $widget) @widget($widget) @endforeach diff --git a/resources/views/components/widgets/header.blade.php b/resources/views/components/widgets/header.blade.php index 74cae8c1c5d..ad5addbde25 100644 --- a/resources/views/components/widgets/header.blade.php +++ b/resources/views/components/widgets/header.blade.php @@ -7,11 +7,23 @@
@if ($report = $class->getReportUrl()) + @if (1) + + + + {{ trans('widgets.view_report') }} + + @else {{ trans('widgets.view_report') }} + @endif @endif diff --git a/resources/views/widgets/donut_chart.blade.php b/resources/views/widgets/donut_chart.blade.php index 013d10f402d..277a361431a 100644 --- a/resources/views/widgets/donut_chart.blade.php +++ b/resources/views/widgets/donut_chart.blade.php @@ -1,4 +1,4 @@ -
+
@include($class->views['header'], ['header_class' => ''])