95 lines
4.6 KiB
PHP
Raw Normal View History

2022-06-01 10:15:55 +03:00
<x-layouts.admin>
<x-slot name="title">{{ trans_choice('general.reports', 2) }}</x-slot>
2019-11-16 10:21:14 +03:00
2022-06-01 10:15:55 +03:00
<x-slot name="favorite"
title="{{ trans_choice('general.reports', 2) }}"
icon="donut_small"
route="reports.index"
></x-slot>
2019-11-16 10:21:14 +03:00
2022-06-01 10:15:55 +03:00
<x-slot name="buttons">
@can('create-common-reports')
<x-link href="{{ route('reports.create') }}" kind="primary">
{{ trans('general.title.new', ['type' => trans_choice('general.reports', 1)]) }}
</x-link>
@endcan
</x-slot>
2019-11-16 10:21:14 +03:00
2022-06-01 10:15:55 +03:00
<x-slot name="content">
<livewire:report.pins :categories="$categories" />
2021-06-15 15:09:56 +03:00
2022-06-01 10:15:55 +03:00
@foreach ($categories as $category)
@php $category_id = $loop->index; @endphp
<div
@class([
'mb-14',
'mt-4' => (! $loop->first) ? false : true,
'mt-12' => ($loop->first) ? false : true,
])
>
<div class="px-2">
<x-form.section.head title="{!! $category['name'] !!}" description="{{ $category['description'] }}" />
</div>
2021-06-15 15:09:56 +03:00
2022-06-01 10:15:55 +03:00
<div class="grid sm:grid-cols-6 gap-12 my-3.5">
@foreach($category['reports'] as $report)
<div class="flex justify-between sm:col-span-3 p-1 group">
<div class="lg:w-80">
2022-07-04 12:52:24 +03:00
<x-link href="{{ route('reports.show', $report->id) }}" class="flex" override="class">
2022-06-01 17:29:32 +03:00
<span class="material-icons-outlined text-5xl transform transition-all hover:scale-125 text-black-400">
2022-06-01 10:15:55 +03:00
{{ $icons[$report->id] }}
</span>
2022-06-01 17:29:32 +03:00
2022-06-01 10:15:55 +03:00
<div class="ltr:ml-2 rtl:mr-2">
<h2 class="mb-1">
2022-06-27 14:53:06 +03:00
<x-link.hover group-hover>
2022-07-05 11:19:33 +03:00
{!! $report->name !!}
2022-06-27 14:53:06 +03:00
</x-link.hover>
2022-06-01 10:15:55 +03:00
</h2>
2021-06-15 15:09:56 +03:00
2022-07-04 12:52:24 +03:00
<span class="text-black-400 text-sm">
2022-07-05 11:19:33 +03:00
{!! $report->description !!}
2022-07-04 12:52:24 +03:00
</span>
2022-06-01 10:15:55 +03:00
</div>
2022-07-04 12:52:24 +03:00
</x-link>
2019-11-16 10:21:14 +03:00
</div>
2022-06-16 16:46:44 +03:00
<div class="flex items-start ltr:space-x-2 rtl:space-x-reverse">
2022-09-06 13:54:56 +03:00
<livewire:report.pin :categories="$categories" :report="$report" />
2021-06-15 12:37:13 +03:00
2022-06-01 10:15:55 +03:00
@canany(['create-common-reports', 'update-common-reports', 'delete-common-reports'])
2022-09-06 13:54:56 +03:00
<x-dropdown id="index-line-actions-report-{{ $category_id }}-{{ $report->id }}">
2022-06-01 10:15:55 +03:00
<x-slot name="trigger" class="flex" override="class">
<span class="w-8 h-8 flex items-center justify-center px-2 py-2 rtl:mr-4 hover:bg-gray-100 rounded-xl text-purple text-sm font-medium leading-6">
2022-09-20 10:17:14 +03:00
<span class="material-icons pointer-events-none">more_vert</span>
</span>
2022-06-01 10:15:55 +03:00
</x-slot>
2021-06-15 12:37:13 +03:00
2022-06-01 10:15:55 +03:00
@can('update-common-reports')
2022-09-06 13:54:56 +03:00
<x-dropdown.link href="{{ route('reports.edit', $report->id) }}" id="index-line-actions-edit-report-{{ $report->id }}">
2022-06-01 10:15:55 +03:00
{{ trans('general.edit') }}
</x-dropdown.link>
@endcan
2021-06-15 12:37:13 +03:00
2022-06-01 10:15:55 +03:00
@can('create-common-reports')
2022-09-06 13:54:56 +03:00
<x-dropdown.link href="{{ route('reports.duplicate', $report->id) }}" id="index-line-actions-duplicate-report-{{ $report->id }}">
2022-06-01 10:15:55 +03:00
{{ trans('general.duplicate') }}
</x-dropdown.link>
@endcan
@can('delete-common-reports')
<x-delete-link :model="$report" route="reports.destroy" />
@endcan
</x-dropdown>
@endcanany
</div>
2019-11-16 10:21:14 +03:00
</div>
2022-06-01 10:15:55 +03:00
@endforeach
2019-11-16 10:21:14 +03:00
</div>
2022-06-01 10:15:55 +03:00
</div>
2020-01-04 13:42:58 +03:00
@endforeach
2022-06-01 10:15:55 +03:00
</x-slot>
2021-06-15 12:37:13 +03:00
2022-06-01 10:15:55 +03:00
<x-script folder="common" file="reports" />
</x-layouts.admin>