Merge pull request #3108 from mervekaraman/master

Dashboard widget position fixed
This commit is contained in:
Cüneyt Şentürk 2023-12-05 11:34:58 +03:00 committed by GitHub
commit 8479505c11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 20 additions and 8 deletions

View File

@ -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 = '';

View File

@ -88,10 +88,10 @@ class Version303 extends Listener
$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;
}

View File

@ -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';

View File

@ -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: {

View File

@ -145,7 +145,7 @@
@endsection
<x-slot name="content">
<div class="dashboard flex flex-wrap lg:-mx-12">
<div class="dashboard flex flex-wrap px-6 lg:-mx-12">
@foreach($widgets as $widget)
@widget($widget)
@endforeach

View File

@ -7,11 +7,23 @@
<div class="flex items-center">
@if ($report = $class->getReportUrl())
@if (1)
<x-link href="{{ $report }}" class="lg:flex hidden text-purple hover:bg-gray-100 rounded-xl w-8 h-8 items-center justify-center text-sm text-right" override="class">
<x-tooltip id="tooltip-view-report" placement="top" message="{{ trans('widgets.view_report') }}" class="text-black left-5">
<x-icon icon="visibility" class="text-lg font-normal"></x-icon>
</x-tooltip>
</x-link>
<x-link href="{{ $report }}" class="lg:hidden text-purple text-sm text-right" override="class">
{{ trans('widgets.view_report') }}
</x-link>
@else
<x-link href="{{ $report }}" class="text-purple text-sm mr-3 text-right" override="class">
<x-link.hover color="to-purple">
{{ trans('widgets.view_report') }}
</x-link.hover>
</x-link>
@endif
@endif
<x-dropdown id="show-more-actions-widget-{{ $class->model->id }}">

View File

@ -1,4 +1,4 @@
<div id="widget-{{ $class->model->id }}" class="apexcharts-donut-custom {{ $class->model->settings->width }} my-8">
<div id="widget-{{ $class->model->id }}" class="apexcharts-donut-custom {{ $class->model->settings->width }}">
@include($class->views['header'], ['header_class' => ''])
<div class="flex flex-col lg:flex-row mt-3" id="widget-donut-{{ $class->model->id }}">