akaunting 3.0 (the last dance)
This commit is contained in:
11
resources/views/livewire/menu/favorite.blade.php
Normal file
11
resources/views/livewire/menu/favorite.blade.php
Normal file
@ -0,0 +1,11 @@
|
||||
<x-tooltip id="favorite" placement="right" message="{{ ($favorited) ? trans('header.favorite.added_favorite') : trans('header.favorite.add_favorite') }}">
|
||||
<span
|
||||
id="{{ $favorited ? 'remove-from-favorite' : 'add-to-favorite' }}"
|
||||
@class([
|
||||
'flex items-center text-purple text-2xl ltr:ml-2 rtl:mr-2 lg:mt-2 cursor-pointer',
|
||||
'material-icons-outlined' => ($favorited) ? false : true,
|
||||
'material-icons' => (! $favorited) ? false : true,
|
||||
])
|
||||
wire:click="changeStatus()"
|
||||
>grade</span>
|
||||
</x-tooltip>
|
20
resources/views/livewire/menu/favorites.blade.php
Normal file
20
resources/views/livewire/menu/favorites.blade.php
Normal file
@ -0,0 +1,20 @@
|
||||
<div class="flex flex-col items-center justify-center">
|
||||
<div class="w-8 h-8 mb-2.5"></div>
|
||||
|
||||
@foreach ($favorites as $favorite)
|
||||
<x-tooltip id="{{ $favorite['title'] }}" placement="right" message="{{ $favorite['title'] }}">
|
||||
<a href="{{ $favorite['url'] }}" class="w-8 h-8 flex items-center justify-center mb-2.5">
|
||||
<span
|
||||
id="{{ $favorite['id'] }}"
|
||||
@class([
|
||||
'material-icons-outlined' => ! $favorite['active'],
|
||||
'material-icons' => $favorite['active'],
|
||||
'text-purple cursor-pointer',
|
||||
])
|
||||
>
|
||||
{{ $favorite['icon'] }}
|
||||
</span>
|
||||
</a>
|
||||
</x-tooltip>
|
||||
@endforeach
|
||||
</div>
|
15
resources/views/livewire/menu/neww.blade.php
Normal file
15
resources/views/livewire/menu/neww.blade.php
Normal file
@ -0,0 +1,15 @@
|
||||
<div wire:click.stop id="menu-neww">
|
||||
<input type="text" name="neww_keyword" wire:model.debounce.500ms="keyword" placeholder="{{ trans('general.search_placeholder') }}" class="border-t-0 border-l-0 border-r-0 border-b border-gray-300 bg-transparent text-gray-500 text-sm mb-3 focus:outline-none focus:ring-transparent focus:border-purple placeholder-light-gray js-search-action">
|
||||
|
||||
{!! menu('neww') !!}
|
||||
</div>
|
||||
|
||||
@push('scripts_end')
|
||||
<script type="text/javascript">
|
||||
window.addEventListener('click', function() {
|
||||
if (Livewire.components.getComponentsByName('menu.neww')[0].data.neww.length > 0) {
|
||||
Livewire.emit('resetKeyword');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
78
resources/views/livewire/menu/notifications.blade.php
Normal file
78
resources/views/livewire/menu/notifications.blade.php
Normal file
@ -0,0 +1,78 @@
|
||||
<div wire:click.stop id="menu-notifications">
|
||||
<input type="text" name="notification_keyword" wire:model.debounce.500ms="keyword" placeholder="{{ trans('general.search_placeholder') }}" class="border-t-0 border-l-0 border-r-0 border-b border-gray-300 bg-transparent text-gray-500 text-sm mb-3 focus:outline-none focus:ring-transparent focus:border-purple placeholder-light-gray js-search-action">
|
||||
|
||||
@if ($notifications)
|
||||
<div class="flex justify-end mt-1">
|
||||
<x-tooltip id="notification-all" placement="right" message="Mark as All Read">
|
||||
<button type="button" wire:click="markReadAll()">
|
||||
<span id="menu-notification-read-all" class="material-icons text-lg text-purple">done_all</span>
|
||||
</button>
|
||||
</x-tooltip>
|
||||
</div>
|
||||
|
||||
<ul class="flex flex-col justify-center">
|
||||
@foreach ($notifications as $notification)
|
||||
@if (empty($notification->data['title']) && empty($notification->data['description']))
|
||||
@continue
|
||||
@endif
|
||||
|
||||
<li class="mb-5 border-b pb-2">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
@if ($notification->type != 'updates')
|
||||
<button type="button" wire:click="markRead('{{ $notification->id }}')">
|
||||
<span id="menu-notification-mark-read" class="material-icons text-lg text-purple">check_circle_outline</span>
|
||||
</button>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="lex items-end justify-between">
|
||||
<p class="text-black text-sm">
|
||||
{!! $notification->data['description'] !!}
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@else
|
||||
<ul class="flex flex-col justify-center">
|
||||
<li class="text-sm mb-5">
|
||||
<div class="flex items-start">
|
||||
<p class="text-black">
|
||||
{{ trans('notifications.empty') }}
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@push('scripts_end')
|
||||
<script type="text/javascript">
|
||||
window.addEventListener('click', function() {
|
||||
if (Livewire.components.getComponentsByName('menu.notifications')[0].data.notifications.length > 0) {
|
||||
Livewire.emit('resetKeyword');
|
||||
}
|
||||
});
|
||||
|
||||
window.addEventListener('mark-read', event => {
|
||||
if (event.detail.type == 'notifications') {
|
||||
$.notify(event.detail.message, {
|
||||
type: 'success',
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
window.addEventListener('mark-read-all', event => {
|
||||
if (event.detail.type == 'notifications') {
|
||||
$.notify(event.detail.message, {
|
||||
type: 'success',
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
9
resources/views/livewire/menu/profile.blade.php
Normal file
9
resources/views/livewire/menu/profile.blade.php
Normal file
@ -0,0 +1,9 @@
|
||||
<div id="menu-profile">
|
||||
{!! menu('profile') !!}
|
||||
</div>
|
||||
|
||||
@push('scripts_start')
|
||||
<script type="text/javascript">
|
||||
var is_profile_menu = {{ $active_menu }};
|
||||
</script>
|
||||
@endpush
|
21
resources/views/livewire/menu/settings.blade.php
Normal file
21
resources/views/livewire/menu/settings.blade.php
Normal file
@ -0,0 +1,21 @@
|
||||
<div wire:click.stop id="menu-settings">
|
||||
<input type="text" name="settings_keyword" wire:model.debounce.500ms="keyword" placeholder="{{ trans('general.search_placeholder') }}" class="border-t-0 border-l-0 border-r-0 border-b border-gray-300 bg-transparent text-gray-500 text-sm mb-3 focus:outline-none focus:ring-transparent focus:border-purple placeholder-light-gray js-search-action">
|
||||
|
||||
{!! menu('settings') !!}
|
||||
</div>
|
||||
|
||||
@push('scripts_start')
|
||||
<script type="text/javascript">
|
||||
var is_settings_menu = {{ $active_menu }};
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
@push('scripts_end')
|
||||
<script type="text/javascript">
|
||||
window.addEventListener('click', function() {
|
||||
if (Livewire.components.getComponentsByName('menu.settings')[0].data.settings.length > 0) {
|
||||
Livewire.emit('resetKeyword');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
Reference in New Issue
Block a user