add datatbles for invoices, add pdf icon, refactor icons components, add autocomplete on search, adapt searching to meilisearch

This commit is contained in:
ludo
2024-02-04 02:51:38 +01:00
parent 5c20e6d5d0
commit 6c88e43b74
39 changed files with 503 additions and 211 deletions

View File

@@ -1,4 +1,6 @@
@include('load.form.autocomplete')
<input type="hidden" name="{{ $name }}_id" id="{{ $name }}_id" value="{{ $data[$name . '_id'] ?? null }}">
<input type="text" name="{{ $name }}_name" class="form-control autocomplete" value="{{ $data['name'] ?? ''}}" data-url="{{ $url ?? ''}}" data-field="{{ $name }}_id" autocomplete="off">
<input type="text" name="{{ $name }}_name" id="{{ $name }}_name" class="form-control autocomplete"
value="{{ $data['name'] ?? '' }}" data-url="{{ $url ?? '' }}" data-field="{{ $name }}_id"
autocomplete="off">

View File

@@ -1,10 +1,13 @@
<button type="{{ $type ?? 'button' }}" class="btn {{ $class ?? ''}}"
@if ($url ?? false)
<a href="{{ $url }}">
@endif
<button type="{{ $type ?? 'button' }}" class="btn {{ $class ?? '' }}"
@isset($style) style="{{ $style }}" @endisset
@isset($id) id="{{ $id }}" @endisset
@isset($data_id) data-id="{{ $data_id }}" @endisset
@isset($data_id) data-id="{{ $data_id }}" @endisset
@isset($dataId) data-id="{{ $dataId }}" @endisset
@isset($title) title="{{ $title }}" data-toggle="tooltip" @endisset
@isset($loading_text) data-loading-text="{{ $loading_text }}" @endisset
@isset($title) title="{{ $title }}" data-toggle="tooltip" @endisset
@isset($loading_text) data-loading-text="{{ $loading_text }}" @endisset
@isset($loadingText) data-loading-text="{{ $loadingText }}" @endisset
@isset($tooltip) data-toggle="tooltip" data-tooltip="{{ $tooltip }}" @endisset
@isset($popover) data-toggle="popover" data-content="{{ $popover }}" @endisset
@@ -12,8 +15,10 @@
@isset($trigger) data-trigger="{{ $trigger }}" @endisset
@isset($container) data-container="{{ $container }}" @endisset
@isset($html) data-html="true" @endisset
@isset($metadata) {{ $metadata }} @endisset
>
<i class="fa fa-fw {{ $icon ?? '' }}"></i>
{{ $txt ?? '' }}
@isset($metadata) {{ $metadata }} @endisset>
<i class="fa fa-fw {{ $icon ?? '' }}"></i>
{{ $txt ?? '' }}
</button>
@if ($url ?? false)
</a>
@endif

View File

@@ -0,0 +1,5 @@
@include('components.form.button', [
'class' => 'btn-primary ' . ($class ?? ''),
'icon' => 'fa-plus',
'title' => $title ?? 'Ajouter',
])

View File

@@ -0,0 +1,17 @@
@include('components.form.button', [
'class' => 'btn-secondary cancel ' . ($class ?? ''),
'icon' => 'fa-times',
'txt' => $title ?? 'Annuler',
])
@push('js')
<script>
$('.form-buttons .cancel').click(function() {
@if (isset($url))
window.location = "{{ $url }}";
@else
window.history.back();
@endif
})
</script>
@endpush

View File

@@ -0,0 +1,6 @@
@include('components.form.button', [
'class' => 'btn-danger btn-del ' . ($class ?? ''),
'icon' => $icon ?? 'fa-trash-alt',
'title' => $title ?? 'Effacer',
'loading_text' => "<i class='fa fa-circle-o-notch fa-spin'></i>",
])

View File

@@ -0,0 +1,5 @@
@include('components.form.button', [
'class' => 'btn-primary btn-edit ' . ($class ?? ''),
'icon' => 'fa-pencil-alt',
'title' => $title ?? 'Modifier',
])

View File

@@ -0,0 +1,6 @@
@include('components.form.button', [
'class' => 'btn-success save ' . ($class ?? ''),
'icon' => 'fa-save',
'txt' => $title ?? 'Enregister',
'loading_text' => "<i class='fa fa-spinner fa-spin'></i> En cours",
])

View File

@@ -0,0 +1,5 @@
@include('components.form.button', [
'class' => 'btn-secondary btn-show ' . ($class ?? ''),
'icon' => 'fa-eye',
'title' => $title ?? 'Voir',
])

View File

@@ -0,0 +1,8 @@
@include('components.form.button', [
'id' => $id_name ?? false,
'type' => $type ?? 'submit',
'class' => 'btn-success submit ' . ($class ?? ''),
'icon' => 'fa-save',
'txt' => __('submit'),
'loading_text' => "<i class='fa fa-spinner fa-spin'></i> Processing",
])