Merge branch 'master' of https://github.com/brkcvn/akaunting into form-elements

This commit is contained in:
Burak Civan
2022-06-24 10:03:19 +03:00
27 changed files with 300 additions and 92 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

@ -9,7 +9,7 @@
@if ($notifications)
<div class="flex justify-end mt-1 mb-3">
<x-tooltip id="notification-all" placement="top" message="Mark as All Read">
<x-tooltip id="notification-all" placement="top" message="{{ trans('notifications.mark_read_all') }}">
<button type="button" wire:click="markReadAll()">
<span id="menu-notification-read-all" class="material-icons text-lg text-purple">done_all</span>
</button>
@ -26,15 +26,18 @@
<div class="flex items-start justify-between font-medium text-sm text-purple mb-1">
<div class="flex flex-col">
{!! $notification->data['title'] !!}
<span class="text-gray-500" style="font-size: 10px;">{{ \Carbon\Carbon::createFromTimeStamp(strtotime($notification->created_at))->diffForHumans() }}</span>
<span class="text-gray-500" style="font-size: 10px;">
{{ \Carbon\Carbon::createFromTimeStamp(strtotime($notification->created_at))->diffForHumans() }}
</span>
</div>
@if ($notification->type != 'updates')
<x-tooltip id="notification-{{ $notification->id }}" placement="top" message="Clear Notification">
<button type="button" wire:click="markRead('{{ $notification->type }}', '{{ $notification->id }}')">
<span id="menu-notification-mark-read" class="material-icons text-lg text-purple">check_circle_outline</span>
</button>
</x-tooltip>
<x-tooltip id="notification-{{ $notification->id }}" placement="top" message="{{ trans('notifications.mark_read') }}">
<button type="button" wire:click="markRead('{{ $notification->type }}', '{{ $notification->id }}')">
<span id="menu-notification-mark-read" class="material-icons text-lg text-purple">check_circle_outline</span>
</button>
</x-tooltip>
@endif
</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">

View File

@ -4,8 +4,11 @@
<ul class="text-sm space-y-3 my-3">
@foreach($accounts as $item)
<li class="flex justify-between">
{{ $item->name }}
<span class="font-medium">{{ $item->balance_formatted }}</span>
{{ $item->title }}
<span class="font-medium">
{{ $item->balance_formatted }}
</span>
</li>
@endforeach
</ul>

View File

@ -12,7 +12,9 @@
{{ $totals['incoming'] }}
</div>
<span class="text-green text-xs">{{ trans('general.incoming') }}</span>
<span class="text-green text-xs">
{{ trans('general.incoming') }}
</span>
<span class="material-icons mt-2">remove</span>
</div>
@ -22,7 +24,9 @@
{{ $totals['outgoing'] }}
</div>
<span class="text-rose text-xs">{{ trans('general.outgoing') }}</span>
<span class="text-rose text-xs">
{{ trans('general.outgoing') }}
</span>
<span class="material-icons mt-2">drag_handle</span>
</div>

View File

@ -5,7 +5,10 @@
@foreach($currencies as $item)
<li class="flex justify-between">
{{ $item->name }}
<span class="font-medium">{{ $item->rate }}</span>
<span class="font-medium">
{{ $item->rate }}
</span>
</li>
@endforeach
</ul>

View File

@ -28,17 +28,24 @@
</span>
<button id="dashboard-widget-{{ strtolower(class_basename($class)) }}-overdue" type="button" class="flex items-center text-black-400 font-medium group" data-dropdown-toggle="widgets-list-{{ $class->model->id }}">
<span class="border-b border-transparent transition-all group-hover:border-black-400"> {{ $totals['overdue'] }} </span>
<span class="border-b border-transparent transition-all group-hover:border-black-400">
{{ $totals['overdue'] }}
</span>
<div class="relative flex">
<span class="material-icons-round cursor-pointer">arrow_drop_down</span>
<div id="widgets-list-{{ $class->model->id }}" class="absolute right-0 mt-3 py-2 bg-white rounded-md border border-gray-200 shadow-xl z-20 hidden" style="left: auto; min-width: 10rem;">
@foreach($periods as $name => $amount)
@foreach ($periods as $name => $amount)
<div id="dashboard-widget-{{ strtolower(class_basename($class)) }}-{{ str_replace('_', '-', $name) }}" class="w-full flex items-center text-purple px-2 h-9 leading-9 whitespace-nowrap cursor-auto">
<div class="w-full h-full flex items-center justify-between rounded-md px-2 text-sm hover:bg-lilac-100">
<div class="font-normal text-sm">{{ trans('widgets.periods.' . $name) }}</div>
<div class="pl-12 text-sm">{{ $amount }}</div>
<div class="font-normal text-sm">
{{ trans('widgets.periods.' . $name) }}
</div>
<div class="pl-12 text-sm">
{{ $amount }}
</div>
</div>
</div>
@endforeach