akaunting 3.0 (the last dance)
This commit is contained in:
13
resources/views/components/index/bulkaction/all.blade.php
Normal file
13
resources/views/components/index/bulkaction/all.blade.php
Normal file
@ -0,0 +1,13 @@
|
||||
@stack('bulk_action_all_input_start')
|
||||
|
||||
<div class="text-left">
|
||||
<input type="checkbox"
|
||||
id="table-check-all"
|
||||
class="rounded-sm text-purple border-gray-300 cursor-pointer disabled:bg-gray-200 focus:outline-none focus:ring-transparent"
|
||||
v-model="{{ !empty($attributes['v-model']) ? $attributes['v-model'] : 'bulk_action.select_all' }}"
|
||||
@click="onSelectAllBulkAction"
|
||||
/>
|
||||
<label class="custom-control-label" for="table-check-all"></label>
|
||||
</div>
|
||||
|
||||
@stack('bulk_action_all_input_end')
|
94
resources/views/components/index/bulkaction/index.blade.php
Normal file
94
resources/views/components/index/bulkaction/index.blade.php
Normal file
@ -0,0 +1,94 @@
|
||||
@stack('bulk_action_row_input_start')
|
||||
|
||||
@if (! empty($actions))
|
||||
<div
|
||||
:class="[{'sm:flex': bulk_action.show}]"
|
||||
class="h-12 bg-purple-lighter items-center rounded-tl-xl rounded-tr-xl px-12 my-5 py-2 hidden"
|
||||
v-if="bulk_action.show"
|
||||
>
|
||||
<div class="mr-6">
|
||||
<span class="text-sm hidden sm:block">
|
||||
<span v-text="bulk_action.count"></span>
|
||||
<span v-if="bulk_action.count === 1">
|
||||
{{ strtolower(trans_choice($text, 1)) }}
|
||||
</span>
|
||||
<span v-else-if="bulk_action.count > 1">
|
||||
{{ strtolower(trans_choice($text, 2)) }}
|
||||
</span>
|
||||
{{ trans('bulk_actions.selected') }}:
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
@else
|
||||
<div>
|
||||
<x-tooltip id="{{ $key }}" placement="top" message="{{ trans($action['name']) }}">
|
||||
<x-button @click="onChangeBulkAction('{{ $key }}')"
|
||||
id="button-bulk-action-{{ $key }}"
|
||||
class="w-8 h-8 flex items-center px-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'] : '' }}"
|
||||
>
|
||||
{{ trans($action['name']) }}
|
||||
</x-button>
|
||||
</x-tooltip>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<div class="ltr:mr-4 rtl:ml-4" v-if="bulk_action.count">
|
||||
<button type="button" class="text-sm border-b border-transparent transition-all hover:border-black" @click="onClearBulkAction">
|
||||
<span>{{ trans('general.clear') }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<akaunting-modal
|
||||
:show="bulk_action.modal"
|
||||
:title="`{{ trans_choice($text, 2) }}`"
|
||||
:message="bulk_action.message"
|
||||
@cancel="onCancelBulkAction"
|
||||
v-if='bulk_action.message && bulk_action.modal'>
|
||||
<template #card-footer>
|
||||
<div class="flex items-center justify-end">
|
||||
<button type="button" @click="onCancelBulkAction" class="px-6 py-1.5 hover:bg-gray-200 rounded-lg ltr:mr-2 rtl:ml-2">
|
||||
<span>{{ trans('general.cancel') }}</span>
|
||||
</button>
|
||||
|
||||
<button type="button"
|
||||
:disabled="bulk_action.loading"
|
||||
@click="onActionBulkAction"
|
||||
class="relative flex items-center justify-center bg-green hover:bg-green-700 text-white px-6 py-1.5 text-base rounded-lg disabled:bg-green-100"
|
||||
>
|
||||
<i v-if="bulk_action.loading" class="submit-spin absolute w-2 h-2 rounded-full left-0 right-0 -top-3.5 m-auto"></i>
|
||||
<span :class="[{'opacity-0': bulk_action.loading}]">{{ trans('general.confirm') }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
</akaunting-modal>
|
||||
@else
|
||||
<div class="text-black hidden" :class="[{'sm:flex': bulk_action.show}]">
|
||||
{{ trans('bulk_actions.no_action') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@stack('bulk_action_row_input_end')
|
21
resources/views/components/index/bulkaction/single.blade.php
Normal file
21
resources/views/components/index/bulkaction/single.blade.php
Normal file
@ -0,0 +1,21 @@
|
||||
@props(['id', 'name'])
|
||||
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<div data-bulkaction>
|
||||
<input type="checkbox"
|
||||
id="bulk-action-{{ $id }}"
|
||||
class="rounded-sm text-purple border-gray-300 cursor-pointer disabled:bg-gray-200 focus:outline-none focus:ring-transparent"
|
||||
@if (!empty($attributes['disabled']))
|
||||
:disabled="{{ ($attributes['disabled']) ? true : false }}"
|
||||
@else
|
||||
data-bulk-action="{{ $id }}"
|
||||
@endif
|
||||
:value="{{ $id }}"
|
||||
v-model="{{ !empty($attributes['v-model']) ? $attributes['v-model'] : 'bulk_action.selected' }}"
|
||||
@change="onSelectBulkAction"
|
||||
>
|
||||
<label class="custom-control-label" for="bulk-action-{{ $id }}"></label>
|
||||
</div>
|
||||
|
||||
@stack($name . '_input_end')
|
9
resources/views/components/index/category.blade.php
Normal file
9
resources/views/components/index/category.blade.php
Normal file
@ -0,0 +1,9 @@
|
||||
<span @class([
|
||||
'w-3 h-3 rounded-full ltr:mr-1 rtl:ml-1', $backgroundColor, $textColor
|
||||
])
|
||||
@if (! empty($backgroundStyle))
|
||||
style="background-color: {{ $backgroundStyle }}"
|
||||
@endif
|
||||
>
|
||||
</span>
|
||||
<span class="w-24 truncate">{{ $name }}</span>
|
5
resources/views/components/index/container.blade.php
Normal file
5
resources/views/components/index/container.blade.php
Normal file
@ -0,0 +1,5 @@
|
||||
<div {{ ((! $attributes->has('override')) || ($attributes->has('override') && ! in_array('class', explode(',', $attributes->get('override'))))) ? $attributes->merge(['class' => 'my-5']) : $attributes }}>
|
||||
{!! $slot !!}
|
||||
</div>
|
||||
|
||||
<x-loading.content />
|
1
resources/views/components/index/country.blade.php
Normal file
1
resources/views/components/index/country.blade.php
Normal file
@ -0,0 +1 @@
|
||||
{{ $country }}
|
1
resources/views/components/index/currency.blade.php
Normal file
1
resources/views/components/index/currency.blade.php
Normal file
@ -0,0 +1 @@
|
||||
{{ $currency }}
|
5
resources/views/components/index/default.blade.php
Normal file
5
resources/views/components/index/default.blade.php
Normal file
@ -0,0 +1,5 @@
|
||||
<x-tooltip id="{{ $id }}" placement="{{ $position }}" message="{{ $text }}">
|
||||
<span class="material-icons{{ $iconType }} text-purple text-xs ml-2">
|
||||
{{ $icon }}
|
||||
</span>
|
||||
</x-tooltip>
|
5
resources/views/components/index/disable.blade.php
Normal file
5
resources/views/components/index/disable.blade.php
Normal file
@ -0,0 +1,5 @@
|
||||
<x-tooltip id="{{ $id }}" placement="{{ $position }}" message="{{ $disableText }}">
|
||||
<span class="material-icons{{ $iconType }} text-red text-xs ml-2">
|
||||
{{ $icon }}
|
||||
</span>
|
||||
</x-tooltip>
|
25
resources/views/components/index/search.blade.php
Normal file
25
resources/views/components/index/search.blade.php
Normal file
@ -0,0 +1,25 @@
|
||||
@if ($searchString && $bulkAction)
|
||||
<div :class="[{'bulk-action-container': bulk_action.show}]">
|
||||
<x-form method="GET" action="{{ $action }}">
|
||||
<div v-if="!bulk_action.show" class="items-center">
|
||||
<x-search-string model="{{ $searchString }}" />
|
||||
</div>
|
||||
|
||||
<x-index.bulkaction class="{{ $bulkAction }}" />
|
||||
</x-form>
|
||||
</div>
|
||||
@elseif ($searchString && (! $bulkAction))
|
||||
<div>
|
||||
<x-form method="GET" action="{{ $action }}">
|
||||
<div v-if="!bulk_action.show" class="items-center">
|
||||
<x-search-string model="{{ $searchString }}" />
|
||||
</div>
|
||||
</x-form>
|
||||
</div>
|
||||
@elseif ((! $searchString) && $bulkAction)
|
||||
<div :class="[{'h-12': bulk_action.show}]">
|
||||
<x-form method="GET" action="{{ $action }}">
|
||||
<x-index.bulkaction class="{{ $bulkAction }}" />
|
||||
</x-form>
|
||||
</div>
|
||||
@endif
|
8
resources/views/components/index/status.blade.php
Normal file
8
resources/views/components/index/status.blade.php
Normal file
@ -0,0 +1,8 @@
|
||||
<span @class([
|
||||
'px-2.5 py-1 text-xs font-medium rounded-xl',
|
||||
$backgroundColor,
|
||||
$textColor,
|
||||
])
|
||||
>
|
||||
{{ $textStatus }}
|
||||
</span>
|
100
resources/views/components/index/summary.blade.php
Normal file
100
resources/views/components/index/summary.blade.php
Normal file
@ -0,0 +1,100 @@
|
||||
<div class="flex items-center justify-center text-black mt-5 sm:mt-10 mb-10">
|
||||
@if (! empty($slot) && $slot->isNotEmpty())
|
||||
{!! $slot !!}
|
||||
@elseif (! empty($items))
|
||||
@foreach ($items as $item)
|
||||
<div @class(['w-1/2 sm:w-1/3 text-center'])>
|
||||
<a href="{{ $item['href'] }}" class="group">
|
||||
@php $text_color = (! empty($item['text_color'])) ? $item['text_color'] : 'text-purple group-hover:text-purple-700'; @endphp
|
||||
<div @class(['relative text-xl sm:text-6xl', $text_color, 'mb-2'])>
|
||||
{!! $item['amount'] !!}
|
||||
<span class="w-8 absolute left-0 right-0 m-auto -bottom-1 bg-gray-200 transition-all group-hover:bg-gray-900" style="height: 1px;"></span>
|
||||
</div>
|
||||
|
||||
<span class="font-light mt-3">
|
||||
{!! $item['title'] !!}
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
@endforeach
|
||||
@else
|
||||
@if (! empty($first) && $first->isNotEmpty())
|
||||
{!! $first !!}
|
||||
@elseif (! empty($first))
|
||||
<div class="w-1/2 sm:w-1/3 text-center">
|
||||
@if ($first->attributes->has('href'))
|
||||
<a href="{{ $first->attributes->get('hef') }}" class="group">
|
||||
@endif
|
||||
@php $text_color = $first->attributes->has('text-color') ? $first->attributes->get('text-color') : 'text-purple group-hover:text-purple-700'; @endphp
|
||||
<div @class(['relative text-xl sm:text-6xl', $text_color, 'mb-2'])>
|
||||
{!! $first->attributes->get('amount') !!}
|
||||
<span class="w-8 absolute left-0 right-0 m-auto -bottom-1 bg-gray-200 transition-all group-hover:bg-gray-900" style="height: 1px;"></span>
|
||||
</div>
|
||||
|
||||
<span class="font-light mt-3">
|
||||
{!! $first->attributes->get('title') !!}
|
||||
</span>
|
||||
@if ($first->attributes->has('href'))
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@if ($first->attributes->has('divider'))
|
||||
<span class="material-icons text-4xl -mt-8 hidden lg:block">
|
||||
{{ $first->attributes->get('divider') }}
|
||||
</span>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if (! empty($second) && $second->isNotEmpty())
|
||||
{!! $second !!}
|
||||
@elseif (! empty($second))
|
||||
<div class="w-1/2 sm:w-1/3 text-center">
|
||||
@if ($second->attributes->has('href'))
|
||||
<a href="{{ $second->attributes->get('hef') }}" class="group">
|
||||
@endif
|
||||
@php $text_color = $second->attributes->has('text-color') ? $second->attributes->get('text-color') : 'text-purple group-hover:text-purple-700'; @endphp
|
||||
<div @class(['relative text-xl sm:text-6xl', $text_color, 'mb-2'])>
|
||||
{!! $second->attributes->get('amount') !!}
|
||||
<span class="w-8 absolute left-0 right-0 m-auto -bottom-1 bg-gray-200 transition-all group-hover:bg-gray-900" style="height: 1px;"></span>
|
||||
</div>
|
||||
|
||||
<span class="font-light mt-3">
|
||||
{!! $second->attributes->get('title') !!}
|
||||
</span>
|
||||
|
||||
@if ($second->attributes->has('href'))
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@if ($second->attributes->has('divider'))
|
||||
<span class="material-icons text-4xl -mt-8 hidden lg:block">
|
||||
{{ $second->attributes->get('divider') }}
|
||||
</span>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if (! empty($third) && $third->isNotEmpty())
|
||||
{!! $third !!}
|
||||
@elseif (! empty($third))
|
||||
<div class="w-1/2 sm:w-1/3 text-center">
|
||||
@if ($third->attributes->has('href'))
|
||||
<a href="{{ $third->attributes->get('hef') }}" class="group">
|
||||
@endif
|
||||
@php $text_color = $third->attributes->has('text-color') ? $third->attributes->get('text-color') : 'text-purple group-hover:text-purple-700'; @endphp
|
||||
<div @class(['relative text-xl sm:text-6xl', $text_color, 'mb-2'])>
|
||||
{!! $third->attributes->get('amount') !!}
|
||||
<span class="w-8 absolute left-0 right-0 m-auto -bottom-1 bg-gray-200 transition-all group-hover:bg-gray-900" style="height: 1px;"></span>
|
||||
</div>
|
||||
|
||||
<span class="font-light mt-3">
|
||||
{!! $third->attributes->get('title') !!}
|
||||
</span>
|
||||
@if ($third->attributes->has('href'))
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
Reference in New Issue
Block a user