125 lines
3.2 KiB
PHP
125 lines
3.2 KiB
PHP
{{--
|
|
========================================
|
|
AZIONI RAPIDE HEADER
|
|
========================================
|
|
Componente per le azioni rapide da posizionare nell'header
|
|
tra la barra di ricerca e le notifiche.
|
|
|
|
Props:
|
|
- $size (string): sm, md, lg
|
|
- $variant (string): buttons, dropdown, mixed
|
|
|
|
Autore: NetGesCon Development Team
|
|
Data: 2025-07-13
|
|
========================================
|
|
--}}
|
|
|
|
@props([
|
|
'size' => 'md',
|
|
'variant' => 'buttons'
|
|
])
|
|
|
|
<div class="quick-actions d-flex align-items-center gap-1">
|
|
|
|
{{-- Nuovo Condomino --}}
|
|
<button type="button"
|
|
class="btn btn-outline-primary btn-sm"
|
|
title="Nuovo Soggetto/Condomino"
|
|
onclick="openQuickAction('condomino')">
|
|
<i class="fas fa-user-plus"></i>
|
|
<span class="d-none d-lg-inline ms-1">Soggetto</span>
|
|
</button>
|
|
|
|
{{-- Nuovo Stabile --}}
|
|
<button type="button"
|
|
class="btn btn-outline-info btn-sm"
|
|
title="Nuovo Stabile"
|
|
onclick="openQuickAction('stabile')">
|
|
<i class="fas fa-building"></i>
|
|
<span class="d-none d-lg-inline ms-1">Stabile</span>
|
|
</button>
|
|
|
|
{{-- Nuovo Ticket --}}
|
|
<button type="button"
|
|
class="btn btn-outline-warning btn-sm"
|
|
title="Nuovo Ticket"
|
|
onclick="openQuickAction('ticket')">
|
|
<i class="fas fa-ticket-alt"></i>
|
|
<span class="d-none d-lg-inline ms-1">Ticket</span>
|
|
</button>
|
|
|
|
{{-- Nuova Gestione --}}
|
|
<button type="button"
|
|
class="btn btn-outline-success btn-sm"
|
|
title="Nuova Gestione"
|
|
onclick="openQuickAction('gestione')">
|
|
<i class="fas fa-cogs"></i>
|
|
<span class="d-none d-lg-inline ms-1">Gestione</span>
|
|
</button>
|
|
|
|
</div>
|
|
|
|
{{-- JavaScript per azioni rapide --}}
|
|
@push('scripts')
|
|
<script>
|
|
function openQuickAction(type) {
|
|
switch(type) {
|
|
case 'condomino':
|
|
// Route per nuovo soggetto (condomino)
|
|
window.location.href = "{{ route('admin.soggetti.create') }}";
|
|
break;
|
|
case 'stabile':
|
|
// Route per nuovo stabile
|
|
window.location.href = "{{ route('admin.stabili.create') }}";
|
|
break;
|
|
case 'ticket':
|
|
// Route per nuovo ticket
|
|
window.location.href = "{{ route('admin.tickets.create') }}";
|
|
break;
|
|
case 'gestione':
|
|
// Route per nuova gestione
|
|
window.location.href = "{{ route('admin.gestioni.create') }}";
|
|
break;
|
|
default:
|
|
console.log('Azione rapida non riconosciuta:', type);
|
|
}
|
|
}
|
|
</script>
|
|
@endpush
|
|
|
|
{{-- CSS per azioni rapide --}}
|
|
@push('styles')
|
|
<style>
|
|
.quick-actions .btn {
|
|
transition: all 0.2s ease;
|
|
border-width: 1px;
|
|
}
|
|
|
|
.quick-actions .btn:hover {
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
}
|
|
|
|
.quick-actions .btn i {
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
/* Responsive */
|
|
@media (max-width: 992px) {
|
|
.quick-actions .btn {
|
|
padding: 0.25rem 0.5rem;
|
|
}
|
|
|
|
.quick-actions .btn i {
|
|
font-size: 0.8rem;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.quick-actions {
|
|
display: none !important;
|
|
}
|
|
}
|
|
</style>
|
|
@endpush
|