Merge branch 'master' of https://github.com/brkcvn/akaunting into sentry

This commit is contained in:
Burak Civan
2022-11-17 10:19:22 +03:00
39 changed files with 804 additions and 360 deletions

View File

@ -6,7 +6,17 @@
<x-show.summary.left>
@if (! $hideAvatar)
<x-slot name="avatar">
{{ $contact->initials }}
@if ($contact->logo)
@if (is_object($contact->logo))
<img src="{{ Storage::url($contact->logo->id) }}" class="absolute w-12 h-12 rounded-full mr-2 hidden lg:block" alt="{{ $contact->name }}" title="{{ $contact->name }}">
@else
<img src="{{ asset('public/img/user.svg') }}" class="absolute w-12 h-12 rounded-full mr-2 hidden lg:block" alt="{{ $contact->name }}"/>
@endif
{{ $contact->initials }}
@else
{{ $contact->initials }}
@endif
</x-slot>
@endif
@ -150,7 +160,7 @@
id="transactions"
name="{{ trans_choice('general.transactions', 2) }}"
/>
@stack('transactions_nav_end')
</x-slot>

View File

@ -1,10 +1,26 @@
<x-button
@mobile
<button
type="button"
class="rw-full flex items-center text-red sm:text-purple px-2 h-9 leading-9"
@click="onDeleteViaConfirmation('delete-{{ $modelTable }}-{{ $id }}')"
override="class"
{{ $attributes }}
>
@if ($slot->isNotEmpty())
{!! $slot !!}
@else
<span class="w-full h-full flex items-center rounded-md px-2 text-sm hover:bg-lilac-100">{!! $label !!}</span>
@endif
@else
<button
type="button"
class="relative bg-white hover:bg-gray-100 border py-0.5 px-1 cursor-pointer group/tooltip index-actions"
@click="onDeleteViaConfirmation('delete-{{ $modelTable }}-{{ $id }}')"
override="class"
{{ $attributes }}
>
@if ($slot->isNotEmpty())
{!! $slot !!}
@else
@ -14,6 +30,7 @@
<div class="absolute w-2 h-2 -bottom-1 before:content-[' '] before:absolute before:w-2 before:h-2 before:bg-white before:border-gray-200 before:transform before:rotate-45 before:border before:border-t-0 before:border-l-0" data-popper-arrow></div>
</div>
@endif
@endmobile
<x-form.input.hidden
name="delete-{{ $modelTable }}-{{ $id }}"
@ -25,4 +42,4 @@
data-cancel="{!! $cancelText !!}"
data-delete="{!! $deleteText !!}"
/>
</x-button>
</button>

View File

@ -1,4 +1,4 @@
<div class="p-7 shadow-2xl rounded-2xl">
<div class="p-3 sm:p-7 shadow-2xl rounded-2xl">
@switch($documentTemplate)
@case('classic')
<x-documents.template.classic

View File

@ -81,8 +81,8 @@
<div class="row mt-2">
<div class="col-33">
<div class="invoice-classic-line mb-1 mt-4" style="background-color:{{ $backgroundColor }};"></div>
<div class="invoice-classic-line" style="background-color:{{ $backgroundColor }};"></div>
<div class="invoice-classic-line mb-1 mt-4" style="background-color:{{ $backgroundColor }}; -webkit-print-color-adjust: exact;"></div>
<div class="invoice-classic-line" style="background-color:{{ $backgroundColor }}; -webkit-print-color-adjust: exact;"></div>
</div>
<div class="col-33">
@ -106,8 +106,8 @@
</div>
<div class="col-33">
<div class="invoice-classic-line mb-1 mt-4" style="background-color:{{ $backgroundColor }};"></div>
<div class="invoice-classic-line" style="background-color:{{ $backgroundColor }};"></div>
<div class="invoice-classic-line mb-1 mt-4" style="background-color:{{ $backgroundColor }}; -webkit-print-color-adjust: exact;"></div>
<div class="invoice-classic-line" style="background-color:{{ $backgroundColor }}; -webkit-print-color-adjust: exact;"></div>
</div>
</div>

View File

@ -1,10 +1,10 @@
@stack('header_start')
<div id="header" class="xl:pt-6">
<div class="flex flex-col sm:flex-row flex-wrap items-start justify-between hide-empty-page">
<div class="w-full sm:w-6/12 items-center mb-3 sm:mb-0">
<div id="header" class="xl:pt-6 -mt-2">
<div class="flex flex-col sm:flex-row items-start justify-between sm:space-x-4 hide-empty-page">
<div data-page-title-first class="w-full sm:w-6/12 items-center mb-3 sm:mb-0">
<div class="flex items-center">
<h1 class="flex items-center text-2xl xl:text-5xl text-black font-light -ml-0.5">
<h1 class="flex items-center text-2xl xl:text-5xl text-black font-light -ml-0.5 mt-2 whitespace-nowrap">
<x-title>
{!! $title !!}
</x-title>
@ -24,20 +24,18 @@
</div>
</div>
<div class="w-full sm:w-6/12">
<div class="flex flex-wrap flex-col sm:flex-row sm:items-center justify-end sm:space-x-2 sm:rtl:space-x-reverse">
@stack('header_button_start')
<div data-page-title-second class="w-full flex flex-wrap flex-col sm:flex-row sm:items-center justify-end sm:space-x-2 sm:rtl:space-x-reverse space-y-2 suggestion-buttons">
@stack('header_button_start')
{!! $buttons !!}
{!! $buttons !!}
@stack('header_button_end')
@stack('header_button_end')
<x-suggestions />
<x-suggestions />
@stack('header_suggestion_end')
@stack('header_suggestion_end')
{!! $moreButtons !!}
</div>
{!! $moreButtons !!}
</div>
</div>
</div>

View File

@ -7,7 +7,7 @@
</div>
<div class="my-10">
<x-link href="https://akaunting.com/lp/accounting-software?utm_source=software&utm_medium=invoice_payment&utm_campaign=plg" class="bg-purple text-white px-3 py-1.5 mb-3 sm:mb-0 rounded-xl text-sm font-medium leading-6 hover:bg-purple-700" override="class">
<x-link href="https://akaunting.com/accounting-software?utm_source=software&utm_medium=invoice_payment&utm_campaign=plg" class="bg-purple text-white px-3 py-1.5 mb-3 sm:mb-0 rounded-xl text-sm font-medium leading-6 hover:bg-purple-700" override="class">
{{ trans('portal.get_started') }}
</x-link>
</div>

View File

@ -1,11 +1,13 @@
@stack('header_start')
<div id="header" class="xl:pt-6">
<div class="flex flex-col sm:flex-row flex-wrap items-start justify-between hide-empty-page">
<div class="w-full sm:w-6/12 items-center mb-3 sm:mb-0">
<div id="header" class="xl:pt-6 -mt-2">
<div class="flex flex-col sm:flex-row items-start justify-between space-x-4 hide-empty-page">
<div data-page-title-first class="w-full sm:w-6/12 items-center mb-3 sm:mb-0">
<div class="flex items-center">
<h1 class="flex items-center text-2xl xl:text-5xl text-black font-light -ml-0.5">
{!! $title !!}
<h1 class="flex items-center text-2xl xl:text-5xl text-black font-light -ml-0.5 mt-2 whitespace-nowrap">
<x-title>
{!! $title !!}
</x-title>
@yield('dashboard_action')
</h1>
@ -22,16 +24,14 @@
</div>
</div>
<div class="w-full sm:w-6/12">
<div class="flex flex-wrap flex-col sm:flex-row sm:items-center justify-end sm:space-x-2 sm:rtl:space-x-reverse">
@stack('header_button_start')
<div data-page-title-second class="w-full flex flex-wrap flex-col sm:flex-row sm:items-center justify-end sm:space-x-2 sm:rtl:space-x-reverse space-y-2 suggestion-buttons">
@stack('header_button_start')
{!! $buttons !!}
{!! $buttons !!}
@stack('header_button_end')
@stack('header_button_end')
{!! $moreButtons !!}
</div>
{!! $moreButtons !!}
</div>
</div>
</div>

View File

@ -1,10 +1,10 @@
@stack('header_start')
<div id="header" class="xl:pt-6">
<div class="flex flex-col sm:flex-row flex-wrap items-start justify-between hide-empty-page">
<div class="w-full sm:w-6/12 items-center mb-3 sm:mb-0">
<div id="header" class="xl:pt-6 -mt-2">
<div class="flex flex-col sm:flex-row items-start justify-between space-x-4 hide-empty-page">
<div data-page-title-first class="w-full sm:w-6/12 items-center mb-3 sm:mb-0">
<div class="flex items-center">
<h1 class="flex items-center text-2xl xl:text-5xl text-black font-light -ml-0.5">
<h1 class="flex items-center text-2xl xl:text-5xl text-black font-light -ml-0.5 mt-2 whitespace-nowrap">
<x-title>
{!! $title !!}
</x-title>
@ -24,16 +24,14 @@
</div>
</div>
<div class="w-full sm:w-6/12">
<div class="flex flex-wrap flex-col sm:flex-row sm:items-center justify-end sm:space-x-2 sm:rtl:space-x-reverse">
@stack('header_button_start')
<div data-page-title-second class="w-full flex flex-wrap flex-col sm:flex-row sm:items-center justify-end sm:space-x-2 sm:rtl:space-x-reverse space-y-2 suggestion-buttons">
@stack('header_button_start')
{!! $buttons !!}
{!! $buttons !!}
@stack('header_button_end')
@stack('header_button_end')
{!! $moreButtons !!}
</div>
{!! $moreButtons !!}
</div>
</div>
</div>

View File

@ -1,10 +1,10 @@
@stack('header_start')
<div id="header" class="xl:pt-6">
<div class="flex flex-col sm:flex-row flex-wrap items-start justify-between hide-empty-page">
<div class="w-full sm:w-6/12 items-center mb-3 sm:mb-0">
<div id="header" class="xl:pt-6 -mt-2">
<div lass="flex flex-col sm:flex-row items-start justify-between space-x-4 hide-empty-page">
<div data-page-title-first class="w-full sm:w-6/12 items-center mb-3 sm:mb-0">
<div class="flex items-center">
<h1 class="flex items-center text-2xl xl:text-5xl text-black font-light -ml-0.5">
<h1 class="flex items-center text-2xl xl:text-5xl text-black font-light -ml-0.5 mt-2 whitespace-nowrap">
<x-title>
{!! $title !!}
</x-title>
@ -24,16 +24,14 @@
</div>
</div>
<div class="w-full sm:w-6/12">
<div class="flex flex-wrap flex-col sm:flex-row sm:items-center justify-end sm:space-x-2 sm:rtl:space-x-reverse">
@stack('header_button_start')
<div data-page-title-second class="w-full flex flex-wrap flex-col sm:flex-row sm:items-center justify-end sm:space-x-2 sm:rtl:space-x-reverse space-y-2 suggestion-buttons">
@stack('header_button_start')
{!! $buttons !!}
{!! $buttons !!}
@stack('header_button_end')
@stack('header_button_end')
{!! $moreButtons !!}
</div>
{!! $moreButtons !!}
</div>
</div>
</div>

View File

@ -1,37 +1,43 @@
<div class="flex items-center justify-between border-b py-4">
<div class="flex items-center">
@if ($file->aggregate_type == 'image')
<span class="material-icons text-base">image</span>
@else
<span class="material-icons text-base">attach_file</span>
@endif
<div class="flex flex-col text-gray-500 ltr:ml-3 rtl:mr-3 gap-y-1">
<span class="w-64 text-sm truncate">
{{ $file->basename }}
</span>
<span class="text-xs mb-0">
{{ $file->readableSize() }}
</span>
</div>
</div>
<div class="flex flex-row lg:flex-col gap-x-1">
@can('delete-common-uploads')
<x-link href="javascript:void();" id="remove-{{ $column_name }}" @click="onDeleteFile('{{ $file->id }}', '{{ route('uploads.destroy', $file->id) }}', '{{ trans('general.title.delete', ['type' => $column_name]) }}', '{{ trans('general.delete_confirm', ['name' => $file->basename, 'type' => $column_name]) }} ', '{{ trans('general.cancel') }}', '{{ trans('general.delete') }}')" type="button" class="group" override="class">
<span class="material-icons text-base text-red px-1.5 py-1 rounded-lg group-hover:bg-gray-100">delete</span>
</x-link>
@if ($options)
<input type="hidden" name="page_{{ $file->id}}" id="file-page-{{ $file->id}}" value="{{ $options['page'] }}" />
<input type="hidden" name="key_{{ $file->id}}" id="file-key-{{ $file->id}}" value="{{ $options['key'] }}" />
<input type="hidden" name="value_{{ $file->id}}" id="file-value-{{ $file->id}}" value="{{ $file->id }}" />
<div class="divide-y">
<div class="flex items-center justify-between py-4 -mb-4">
<div class="flex items-center">
@if ($file->aggregate_type == 'image')
<div class="avatar-attachment">
<img src="{{ route('uploads.get', $file->id) }}" alt="{{ $file->basename }}" class="avatar-img h-full rounded object-cover">
</div>
@else
<div class="avatar-attachment">
<span class="material-icons text-base">attach_file</span>
</div>
@endif
@endcan
<x-link href="{{ route('uploads.download', $file->id) }}" type="button" class="group" override="class">
<span class="material-icons text-base text-purple px-1.5 py-1 rounded-lg group-hover:bg-gray-100">download</span>
</x-link>
<div class="flex flex-col text-gray-500 ltr:ml-3 rtl:mr-3 gap-y-1">
<span class="w-64 text-sm truncate">
{{ $file->basename }}
</span>
<span class="text-xs mb-0">
{{ $file->readableSize() }}
</span>
</div>
</div>
<div class="flex flex-row lg:flex-col gap-x-1">
@can('delete-common-uploads')
<x-link href="javascript:void();" id="remove-{{ $column_name }}" @click="onDeleteFile('{{ $file->id }}', '{{ route('uploads.destroy', $file->id) }}', '{{ trans('general.title.delete', ['type' => $column_name]) }}', '{{ trans('general.delete_confirm', ['name' => $file->basename, 'type' => $column_name]) }} ', '{{ trans('general.cancel') }}', '{{ trans('general.delete') }}')" type="button" class="group" override="class">
<span class="material-icons-outlined text-base text-gray-300 px-1.5 py-1 rounded-lg group-hover:bg-gray-100">delete</span>
</x-link>
@if ($options)
<input type="hidden" name="page_{{ $file->id}}" id="file-page-{{ $file->id}}" value="{{ $options['page'] }}" />
<input type="hidden" name="key_{{ $file->id}}" id="file-key-{{ $file->id}}" value="{{ $options['key'] }}" />
<input type="hidden" name="value_{{ $file->id}}" id="file-value-{{ $file->id}}" value="{{ $file->id }}" />
@endif
@endcan
<x-link href="{{ route('uploads.download', $file->id) }}" type="button" class="group" override="class">
<span class="material-icons text-base text-gray-300 px-1.5 py-1 rounded-lg group-hover:bg-gray-100">download</span>
</x-link>
</div>
</div>
</div>

View File

@ -8,4 +8,4 @@
>
{{ $suggestion->name }}
</x-link>
@endforeach
@endforeach

View File

@ -0,0 +1,150 @@
@php
$count_buttons = 1;
$more_actions = [];
@endphp
<div
data-mobile-actions
class="absolute w-6 h-6 flex items-center justify-center ltr:right-0 rtl:left-0 -top-3 py-0.5 px-1 bg-white border rounded-full cursor-pointer hover:bg-gray-100"
>
<span class="material-icons-outlined text-lg">
more_horiz
</span>
</div>
<div
data-mobile-actions-modal
class="modal w-full h-full fixed flex top-0 left-0 right-0 justify-center items-center flex-wrap overflow-y-auto overflow-hidden z-50 opacity-0 invisible modal-background transition-opacity"
>
<div class="w-full my-10 m-auto flex flex-col px-2 sm:px-0 max-w-md">
<div class="p-2 bg-body rounded-lg">
@foreach ($actions as $action)
@if (! empty($action['permission']))
@can($action['permission'])
@endif
@if ($count_buttons > 3 && $loop->count > 4)
@break
@endif
@php
$type = ! empty($action['type']) ? $action['type'] : 'link';
@endphp
@switch($type)
@case('button')
<button type="button" class="w-full flex items-center text-purple px-2 h-9 leading-9" {!! $action['attributes'] ?? null !!}>
<div class="w-full h-full flex items-center rounded-md px-2 text-sm hover:bg-lilac-100">
<span class="material-icons-outlined text-purple text-lg mr-2 pointer-events-none">
{{ $action['icon'] }}
</span>
{{ $action['title'] }}
</div>
</button>
@break
@case('delete')
@php
$title = $action['title'] ?? null;
$modelId = ! empty($action['model-id']) ? $action['model-id'] : 'id';
$modelName = ! empty($action['model-name']) ? $action['model-name'] : 'name';
@endphp
<x-delete-button :model="$action['model']" :route="$action['route']" :text="$title" :model-id="$modelId" :model-name="$modelName" />
@break
@default
<a href="{{ $action['url'] }}" class="w-full flex items-center text-purple px-2 h-9 leading-9" {!! $action['attributes'] ?? null !!}>
<div class="w-full h-full flex items-center rounded-md px-2 text-sm hover:bg-lilac-100">
<span class="material-icons-outlined text-purple text-lg mr-2 pointer-events-none">
{{ $action['icon'] }}
</span>
{{ $action['title'] }}
</div>
</a>
@endswitch
@php
array_shift($actions);
$count_buttons++;
@endphp
@if (! empty($action['permission']))
@endcan
@endif
@endforeach
@foreach ($actions as $action)
@if (! empty($action['permission']))
@can($action['permission'])
@php $more_actions[] = $action; @endphp
@endcan
@else
@php $more_actions[] = $action; @endphp
@endif
@endforeach
@if ($more_actions)
@php $divider = false; @endphp
@foreach ($more_actions as $action)
@php
$type = ! empty($action['type']) ? $action['type'] : 'link';
@endphp
@switch($type)
@case('button')
@php $divider = false; @endphp
<button type="button" class="w-full flex items-center text-purple px-2 h-9 leading-9" {!! $action['attributes'] ?? null !!}>
<div class="w-full h-full flex items-center rounded-md px-2 text-sm hover:bg-lilac-100">
<span class="material-icons-outlined text-purple text-lg mr-2 pointer-events-none">
{{ $action['icon'] }}
</span>
{{ $action['title'] }}
</div>
</button>
@break
@case('delete')
@php $divider = false; @endphp
@php
$title = $action['title'] ?? null;
$modelId = ! empty($action['model-id']) ? $action['model-id'] : 'id';
$modelName = ! empty($action['model-name']) ? $action['model-name'] : 'name';
@endphp
<x-delete-link :model="$action['model']" :route="$action['route']" :text="$title" :model-id="$modelId" :model-name="$modelName" />
@break
@case('divider')
@if (! $divider)
@php $divider = true; @endphp
<div class="py-2 px-2">
<div class="w-full border-t border-gray-200"></div>
</div>
@endif
@break
@default
@php $divider = false; @endphp
<a href="{{ $action['url'] }}" class="w-full flex items-center text-purple px-2 h-9 leading-9" {!! $action['attributes'] ?? null !!}>
<div class="w-full h-full flex items-center rounded-md px-2 text-sm hover:bg-lilac-100">
<span class="material-icons-outlined text-purple text-lg mr-2 pointer-events-none">
{{ $action['icon'] }}
</span>
{{ $action['title'] }}
</div>
</a>
@endswitch
@endforeach
@endif
</div>
</div>
</div>

View File

@ -3,132 +3,136 @@
$more_actions = [];
@endphp
<div class="absolute ltr:right-12 rtl:left-12 -top-4 hidden items-center group-hover:flex">
@foreach ($actions as $action)
@if (! empty($action['permission']))
@can($action['permission'])
@endif
@mobile
<x-table.actions-mobile :actions="$actions" :model="$model" />
@else
<div class="absolute ltr:right-12 rtl:left-12 -top-4 hidden items-center group-hover:flex">
@foreach ($actions as $action)
@if (! empty($action['permission']))
@can($action['permission'])
@endif
@if ($count_buttons > 3 && $loop->count > 4)
@break
@endif
@php
$type = ! empty($action['type']) ? $action['type'] : 'link';
@endphp
@switch($type)
@case('button')
<button type="button" class="relative bg-white hover:bg-gray-100 border py-0.5 px-1 cursor-pointer index-actions group/tooltip" {!! $action['attributes'] ?? null !!}>
<span class="material-icons-outlined text-purple text-lg pointer-events-none">
{{ $action['icon'] }}
</span>
<div class="inline-block absolute invisible z-20 py-1 px-2 text-sm font-medium text-gray-900 bg-white rounded-lg border border-gray-200 shadow-sm whitespace-nowrap opacity-0 -top-10 -left-2 group-hover/tooltip:opacity-100 group-hover/tooltip:visible" data-tooltip-placement="top">
<span>{{ $action['title'] }}</span>
<div class="absolute w-2 h-2 -bottom-1 before:content-[' '] before:absolute before:w-2 before:h-2 before:bg-white before:border-gray-200 before:transform before:rotate-45 before:border before:border-t-0 before:border-l-0" data-popper-arrow></div>
</div>
</button>
@if ($count_buttons > 3 && $loop->count > 4)
@break
@endif
@case('delete')
@php
$title = $action['title'] ?? null;
$modelId = ! empty($action['model-id']) ? $action['model-id'] : 'id';
$modelName = ! empty($action['model-name']) ? $action['model-name'] : 'name';
@endphp
@php
$type = ! empty($action['type']) ? $action['type'] : 'link';
@endphp
<x-delete-button :model="$action['model']" :route="$action['route']" :text="$title" :model-id="$modelId" :model-name="$modelName" />
@break
@switch($type)
@case('button')
<button type="button" class="relative bg-white hover:bg-gray-100 border py-0.5 px-1 cursor-pointer index-actions group/tooltip" {!! $action['attributes'] ?? null !!}>
<span class="material-icons-outlined text-purple text-lg pointer-events-none">
{{ $action['icon'] }}
</span>
@default
<a href="{{ $action['url'] }}" class="relative bg-white hover:bg-gray-100 border py-0.5 px-1 cursor-pointer index-actions group/tooltip" {!! $action['attributes'] ?? null !!}>
<span class="material-icons-outlined text-purple text-lg pointer-events-none">
{{ $action['icon'] }}
</span>
<div class="inline-block absolute invisible z-20 py-1 px-2 text-sm font-medium text-gray-900 bg-white rounded-lg border border-gray-200 shadow-sm whitespace-nowrap opacity-0 -top-10 -left-2 group-hover/tooltip:opacity-100 group-hover/tooltip:visible" data-tooltip-placement="top">
<span>{{ $action['title'] }}</span>
<div class="absolute w-2 h-2 -bottom-1 before:content-[' '] before:absolute before:w-2 before:h-2 before:bg-white before:border-gray-200 before:transform before:rotate-45 before:border before:border-t-0 before:border-l-0" data-popper-arrow></div>
</div>
</button>
@break
<div class="inline-block absolute invisible z-20 py-1 px-2 text-sm font-medium text-gray-900 bg-white rounded-lg border border-gray-200 shadow-sm whitespace-nowrap opacity-0 -top-10 -left-2 group-hover/tooltip:opacity-100 group-hover/tooltip:visible" data-tooltip-placement="top">
<span>{{ $action['title'] }}</span>
<div class="absolute w-2 h-2 -bottom-1 before:content-[' '] before:absolute before:w-2 before:h-2 before:bg-white before:border-gray-200 before:transform before:rotate-45 before:border before:border-t-0 before:border-l-0" data-popper-arrow></div>
</div>
</a>
@endswitch
@php
array_shift($actions);
$count_buttons++;
@endphp
@if (! empty($action['permission']))
@endcan
@endif
@endforeach
@foreach ($actions as $action)
@if (! empty($action['permission']))
@can($action['permission'])
@php $more_actions[] = $action; @endphp
@endcan
@else
@php $more_actions[] = $action; @endphp
@endif
@endforeach
@if ($more_actions)
@php $divider = false; @endphp
<div class="relative bg-white hover:bg-gray-100 border py-0.5 px-1 cursor-pointer index-actions">
<button type="button" data-dropdown-toggle="dropdown-actions-{{ $loop->index }}" data-dropdown-placement="left" class="material-icons-outlined text-purple text-lg">more_horiz</button>
<div id="dropdown-actions-{{ $loop->index }}" data-dropdown-actions class="absolute py-2 bg-white rounded-md border border-gray-200 shadow-xl z-20 hidden !mt-[50px]" style="left:auto; min-width:10rem;">
@foreach ($more_actions as $action)
@case('delete')
@php
$type = ! empty($action['type']) ? $action['type'] : 'link';
$title = $action['title'] ?? null;
$modelId = ! empty($action['model-id']) ? $action['model-id'] : 'id';
$modelName = ! empty($action['model-name']) ? $action['model-name'] : 'name';
@endphp
@switch($type)
@case('button')
@php $divider = false; @endphp
<x-delete-button :model="$action['model']" :route="$action['route']" :text="$title" :model-id="$modelId" :model-name="$modelName" />
@break
<div class="w-full flex items-center text-purple px-2 h-9 leading-9 whitespace-nowrap" {!! $action['attributes'] ?? null !!}>
<button type="button" class="w-full h-full flex items-center rounded-md px-2 text-sm hover:bg-lilac-100">
{{ $action['title'] }}
</button>
</div>
@break
@default
<a href="{{ $action['url'] }}" class="relative bg-white hover:bg-gray-100 border py-0.5 px-1 cursor-pointer index-actions group/tooltip" {!! $action['attributes'] ?? null !!}>
<span class="material-icons-outlined text-purple text-lg pointer-events-none">
{{ $action['icon'] }}
</span>
@case('delete')
@php $divider = false; @endphp
<div class="inline-block absolute invisible z-20 py-1 px-2 text-sm font-medium text-gray-900 bg-white rounded-lg border border-gray-200 shadow-sm whitespace-nowrap opacity-0 -top-10 -left-2 group-hover/tooltip:opacity-100 group-hover/tooltip:visible" data-tooltip-placement="top">
<span>{{ $action['title'] }}</span>
<div class="absolute w-2 h-2 -bottom-1 before:content-[' '] before:absolute before:w-2 before:h-2 before:bg-white before:border-gray-200 before:transform before:rotate-45 before:border before:border-t-0 before:border-l-0" data-popper-arrow></div>
</div>
</a>
@endswitch
@php
$title = $action['title'] ?? null;
$modelId = ! empty($action['model-id']) ? $action['model-id'] : 'id';
$modelName = ! empty($action['model-name']) ? $action['model-name'] : 'name';
@endphp
<x-delete-link :model="$action['model']" :route="$action['route']" :text="$title" :model-id="$modelId" :model-name="$modelName" />
@break
@php
array_shift($actions);
@case('divider')
@if (! $divider)
@php $divider = true; @endphp
<div class="py-2 px-2">
<div class="w-full border-t border-gray-200"></div>
$count_buttons++;
@endphp
@if (! empty($action['permission']))
@endcan
@endif
@endforeach
@foreach ($actions as $action)
@if (! empty($action['permission']))
@can($action['permission'])
@php $more_actions[] = $action; @endphp
@endcan
@else
@php $more_actions[] = $action; @endphp
@endif
@endforeach
@if ($more_actions)
@php $divider = false; @endphp
<div class="relative bg-white hover:bg-gray-100 border py-0.5 px-1 cursor-pointer index-actions">
<button type="button" data-dropdown-toggle="dropdown-actions-{{ $loop->index }}" data-dropdown-placement="left" class="material-icons-outlined text-purple text-lg">more_horiz</button>
<div id="dropdown-actions-{{ $loop->index }}" data-dropdown-actions class="absolute py-2 bg-white rounded-md border border-gray-200 shadow-xl z-20 hidden !mt-[50px]" style="left:auto; min-width:10rem;">
@foreach ($more_actions as $action)
@php
$type = ! empty($action['type']) ? $action['type'] : 'link';
@endphp
@switch($type)
@case('button')
@php $divider = false; @endphp
<div class="w-full flex items-center text-purple px-2 h-9 leading-9 whitespace-nowrap" {!! $action['attributes'] ?? null !!}>
<button type="button" class="w-full h-full flex items-center rounded-md px-2 text-sm hover:bg-lilac-100">
{{ $action['title'] }}
</button>
</div>
@endif
@break
@break
@default
@php $divider = false; @endphp
@case('delete')
@php $divider = false; @endphp
<div class="w-full flex items-center text-purple px-2 h-9 leading-9 whitespace-nowrap" {!! $action['attributes'] ?? null !!}>
<a href="{{ $action['url'] }}" class="w-full h-full flex items-center rounded-md px-2 text-sm hover:bg-lilac-100">
{{ $action['title'] }}
</a>
</div>
@endswitch
@endforeach
@php
$title = $action['title'] ?? null;
$modelId = ! empty($action['model-id']) ? $action['model-id'] : 'id';
$modelName = ! empty($action['model-name']) ? $action['model-name'] : 'name';
@endphp
<x-delete-link :model="$action['model']" :route="$action['route']" :text="$title" :model-id="$modelId" :model-name="$modelName" />
@break
@case('divider')
@if (! $divider)
@php $divider = true; @endphp
<div class="py-2 px-2">
<div class="w-full border-t border-gray-200"></div>
</div>
@endif
@break
@default
@php $divider = false; @endphp
<div class="w-full flex items-center text-purple px-2 h-9 leading-9 whitespace-nowrap" {!! $action['attributes'] ?? null !!}>
<a href="{{ $action['url'] }}" class="w-full h-full flex items-center rounded-md px-2 text-sm hover:bg-lilac-100">
{{ $action['title'] }}
</a>
</div>
@endswitch
@endforeach
</div>
</div>
</div>
@endif
</div>
@endif
</div>
@endmobile

View File

@ -1,8 +1,16 @@
@props(['active'])
<div x-data="{ active: window.location.hash.split('#')[1] == undefined ? '{{ $active }}' : window.location.hash.split('#')[1] }">
<div>
<ul {{ ((! $attributes->has('override')) || ($attributes->has('override') && ! in_array('class', explode(',', $attributes->get('override'))))) ? $attributes->merge(['class' => 'flex items-center overflow-x-scroll lg:overflow-visible']) : $attributes }}>
@php
if (! empty($attributes['slides'])) {
$slides = $attributes['slides'];
} else {
$slides = null;
}
@endphp
<div data-swiper="{{ $slides }}" x-data="{ active: window.location.hash.split('#')[1] == undefined ? '{{ $active }}' : window.location.hash.split('#')[1] }">
<div data-tabs-swiper>
<ul data-tabs-swiper-wrapper {{ ((! $attributes->has('override')) || ($attributes->has('override') && ! in_array('class', explode(',', $attributes->get('override'))))) ? $attributes->merge(['class' => 'inline-flex']) : $attributes }}>
{!! $navs !!}
</ul>
</div>

View File

@ -5,6 +5,7 @@
id="tab-{{ $id }}"
data-id="tab-{{ $id }}"
data-tabs="{{ $id }}"
data-tabs-slide
x-bind:class="active != '{{ $id }}' ? 'text-black' : 'active-tabs text-purple border-purple transition-all after:absolute after:w-full after:h-0.5 after:left-0 after:right-0 after:bottom-0 after:bg-purple after:rounded-tl-md after:rounded-tr-md'"
{{ $attributes }}
>

View File

@ -5,6 +5,7 @@
id="tab-{{ $id }}"
data-id="tab-{{ $id }}"
data-tabs="{{ $id }}"
data-tabs-slide
x-on:click="active = '{{ $id }}'"
x-bind:class="active != '{{ $id }}' ? 'text-black' : 'active-tabs text-purple border-purple transition-all after:absolute after:w-full after:h-0.5 after:left-0 after:right-0 after:bottom-0 after:bg-purple after:rounded-tl-md after:rounded-tr-md'"
{{ $attributes }}

View File

@ -4,12 +4,8 @@
$slot_is_string = strval(strlen($slot));
@endphp
@if ($slot_is_string >= $textSize && ! $slot_isHtml)
<x-tooltip id="page-title" placement="bottom" message="{!! $slot !!}">
<div class="truncate" style="width: 22rem;">
{!! $slot !!}
</div>
</x-tooltip>
@else
{!! $slot !!}
@endif
<div>
<div data-title-truncate>
{!! $slot !!}
</div>
</div>

View File

@ -1,4 +1,4 @@
<div class="p-7 shadow-2xl rounded-2xl">
<div class="p-3 sm:p-7 shadow-2xl rounded-2xl">
@switch($transactionTemplate)
@case('classic')
@break

View File

@ -8,7 +8,7 @@
</div>
<div class="w-full lg:w-7/12">
<div class="p-7 shadow-2xl rounded-2xl">
<div class="p-3 sm:p-7 shadow-2xl rounded-2xl">
<x-transfers.show.template :model="$transfer" />
</div>
</div>