Merge branch 'master' of https://github.com/brkcvn/akaunting into text-hover

This commit is contained in:
Burak Civan
2022-06-23 13:30:31 +03:00
17 changed files with 137 additions and 67 deletions

View File

@ -77,7 +77,7 @@
@stack('remove_th_start')
<th class="border-t-0 border-r-0 border-b-0" style="vertical-align:bottom;">
<th class="border-t-0 border-r-0 border-b-0 align-bottom" style="width:24px; display:block;">
<div></div>
</th>

View File

@ -22,20 +22,20 @@
<div class="relative flex items-center ltr:mr-4 rtl:ml-4" v-if="bulk_action.count">
@foreach ($actions as $key => $action)
@if (! empty($action['icon']))
<div>
<x-tooltip id="{{ $key }}" placement="top" message="{{ trans($action['name']) }}">
<x-button @click="onChangeBulkAction('{{ $key }}')"
id="button-bulk-action-{{ $key }}"
class="relative w-8 h-8 flex items-center px-2 mr-2 rounded-lg hover:bg-gray-200"
override="class"
data-message="{{ ! empty($action['message']) ? trans_choice($action['message'], 2, ['type' => strtolower(trans_choice($text, 2))]) : '' }}"
data-path="{{ (isset($path) && ! empty($path)) ? $path : '' }}"
data-type="{{ (isset($action['type']) && ! empty($action['type'])) ? $action['type'] : '' }}"
>
<x-icon class="text-lg" :icon="$action['icon']" />
</x-button>
</x-tooltip>
</div>
<div>
<x-tooltip id="{{ $key }}" placement="top" message="{{ trans($action['name']) }}">
<x-button @click="onChangeBulkAction('{{ $key }}')"
id="button-bulk-action-{{ $key }}"
class="relative w-8 h-8 flex items-center px-2 mr-2 rounded-lg hover:bg-gray-200"
override="class"
data-message="{{ ! empty($action['message']) ? trans_choice($action['message'], 2, ['type' => strtolower(trans_choice($text, 2))]) : '' }}"
data-path="{{ (isset($path) && ! empty($path)) ? $path : '' }}"
data-type="{{ (isset($action['type']) && ! empty($action['type'])) ? $action['type'] : '' }}"
>
<x-icon class="text-lg" :icon="$action['icon']" />
</x-button>
</x-tooltip>
</div>
@else
<div>
<x-tooltip id="{{ $key }}" placement="top" message="{{ trans($action['name']) }}">

View File

@ -12,7 +12,7 @@
textButton="{{ trans('general.confirm') }}"
textCard="{{ trans_choice('general.card.cards', 2) }}"
textNewCard="{{ trans('general.form.add_new', ['field' => trans_choice('general.card.cards', 1)]) }}"
textStoreCard="{{ trans('general.card.save') }} "
textStoreCard="{{ trans('general.card.save') }}"
:store-card="{{ !empty($store_card) ? 'true' : 'false' }}"
:cards="{{ !empty($cards) ? json_encode($cards) : json_encode([]) }}"
:form-data="formData"

View File

@ -8,6 +8,7 @@
data-id="tab-{{ $id }}"
data-tabs="{{ $id }}"
x-bind:class="active != '{{ $id }}' ? '' : '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 }}
>
@if ($slot->isNotEmpty())
{!! $slot !!}

View File

@ -9,6 +9,7 @@
data-tabs="{{ $id }}"
x-on:click="active = '{{ $id }}'"
x-bind:class="active != '{{ $id }}' ? '' : '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 }}
>
@if ($slot->isNotEmpty())
{!! $slot !!}

View File

@ -1,5 +1,10 @@
@props(['id'])
<div id="tab-{{ $id }}" data-tabs-content="{{ $id }}" x-show="active === '{{ $id }}'">
<div
id="tab-{{ $id }}"
data-tabs-content="{{ $id }}"
x-show="active === '{{ $id }}'"
{{ $attributes }}
>
{{ $slot }}
</div>

View File

@ -24,33 +24,37 @@
<div class="tabs w-full" x-data="{ active: '{{ reset($payment_methods) }}' }">
<div role="tablist" class="flex flex-wrap gap-y-4">
@php $is_active = true; @endphp
<div class="swiper swiper-links">
<div class="swiper-wrapper">
@foreach ($payment_methods as $key => $name)
@stack('invoice_{{ $key }}_tab_start')
<div class="swiper-slide">
<div
x-on:click="active = '{{ $name }}'"
@click="onChangePaymentMethod('{{ $key }}')"
id="tabs-payment-method-{{ $key }}-tab"
x-bind:class="active != '{{ $name }}' ? '' : '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'"
class="text-sm text-black text-center pb-2 border-b cursor-pointer transition-all tabs-link"
>
{{ $name }}
</div>
</div>
@stack('invoice_{{ $key }}_tab_end')
@foreach ($payment_methods as $key => $name)
@stack('invoice_{{ $key }}_tab_start')
@php $is_active = false; @endphp
@endforeach
<div class="swiper-slide">
<div
x-on:click="active = '{{ $name }}'"
@click="onChangePaymentMethod('{{ $key }}')"
id="tabs-payment-method-{{ $key }}-tab"
x-bind:class="active != '{{ $name }}' ? '' : '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'"
class="text-sm text-black text-center pb-2 border-b cursor-pointer transition-all tabs-link"
>
{{ $name }}
</div>
</div>
@stack('invoice_{{ $key }}_tab_end')
@php $is_active = false; @endphp
@endforeach
</div>
</div>
</div>
@php $is_active = true; @endphp
@foreach ($payment_methods as $key => $name)
@stack('invoice_{{ $key }}_content_start')
<div
x-bind:class="active != '{{ $name }}' ? 'hidden': 'block'"
class="my-3"
@ -58,6 +62,7 @@
>
<component v-bind:is="method_show_html" @interface="onRedirectConfirm"></component>
</div>
@stack('invoice_{{ $key }}_content_end')
@php $is_active = false; @endphp

View File

@ -64,51 +64,58 @@
</x-table.thead>
<x-table.tbody>
@foreach($categories as $category)
<x-table.tr href="{{ route('categories.edit', $category->id) }}" class="relative flex items-center border-b hover:bg-gray-100 px-1 group transition-all">
@foreach($categories as $item)
<x-table.tr href="{{ route('categories.edit', $item->id) }}" class="relative flex items-center border-b hover:bg-gray-100 px-1 group transition-all">
<x-table.td class="ltr:pr-6 rtl:pl-6 hidden sm:table-cell" override="class">
<x-index.bulkaction.single id="{{ $category->id }}" name="{{ $category->name }}" />
<x-index.bulkaction.single id="{{ $item->id }}" name="{{ $item->name }}" />
</x-table.td>
<x-table.td class="w-5/12 truncate">
@if ($category->sub_categories->count())
@if ($item->sub_categories->count())
<div class="flex items-center font-bold">
{{ $category->name }}
<x-tooltip id="tooltip-category-{{ $category->id }}" placement="bottom" message="{{ trans('categories.collapse') }}">
{{ $item->name }}
<x-tooltip id="tooltip-category-{{ $item->id }}" placement="bottom" message="{{ trans('categories.collapse') }}">
<button
type="button"
class="w-4 h-4 flex items-center justify-center mx-2 leading-none align-text-top rounded-lg bg-gray-500 hover:bg-gray-700"
node="child-{{ $category->id }}"
onClick="toggleSub('child-{{ $category->id }}', event)"
node="child-{{ $item->id }}"
onClick="toggleSub('child-{{ $item->id }}', event)"
>
<span class="material-icons transform rotate-90 transition-all text-lg leading-none align-middle text-white">chevron_right</span>
</button>
</x-tooltip>
</div>
@else
<span class="font-bold">{{ $category->name }}</span>
<span class="font-bold">
{{ $item->name }}
</span>
@endif
@if (! $item->enabled)
<x-index.disable text="{{ trans_choice('general.categories', 1) }}" />
@endif
</x-table.td>
<x-table.td class="w-5/12 truncate">
@if (! empty($types[$category->type]))
{{ $types[$category->type] }}
@if (! empty($types[$item->type]))
{{ $types[$item->type] }}
@else
<x-empty-data />
@endif
</x-table.td>
<x-table.td class="w-2/12 relative">
<span class="material-icons text-{{ $category->color }}" class="text-3xl" style="color:{{ $category->color }};">circle</span>
<span class="material-icons text-{{ $item->color }}" class="text-3xl" style="color:{{ $item->color }};">circle</span>
</x-table.td>
<x-table.td kind="action">
<x-table.actions :model="$category" />
<x-table.actions :model="$item" />
</x-table.td>
</x-table.tr>
@foreach($category->sub_categories as $sub_category)
@include('settings.categories.sub_category', ['parent_category' => $category, 'sub_category' => $sub_category, 'tree_level' => 1])
@foreach($item->sub_categories as $sub_category)
@include('settings.categories.sub_category', ['parent_category' => $item, 'sub_category' => $sub_category, 'tree_level' => 1])
@endforeach
@endforeach
</x-table.tbody>

View File

@ -28,18 +28,22 @@
{{ $sub_category->name }}
</div>
@endif
@if (! $sub_category->enabled)
<x-index.disable text="{{ trans_choice('general.categories', 1) }}" />
@endif
</x-table.td>
<x-table.td class="w-5/12 ltr:pr-6 rtl:pl-6 py-4 ltr:text-left rtl:text-right whitespace-nowrap text-sm font-normal text-black cursor-pointer truncate">
@if (! empty($types[$category->type]))
{{ $types[$category->type] }}
@if (! empty($types[$item->type]))
{{ $types[$item->type] }}
@else
<x-empty-data />
@endif
</x-table.td>
<x-table.td class="ltr:pr-6 rtl:pl-6 py-4 ltr:text-left rtl:text-right whitespace-nowrap text-sm font-normal text-black cursor-pointer w-2/12 relative">
<span class="material-icons text-3xl text-{{ $category->color }}" style="color:{{ $sub_category->color }};">circle</span>
<span class="material-icons text-3xl text-{{ $item->color }}" style="color:{{ $sub_category->color }};">circle</span>
</x-table.td>
<x-table.td kind="action">