Add call notes view and unit linked contacts
This commit is contained in:
parent
fe9e8adb72
commit
a509c71189
|
|
@ -65,6 +65,10 @@ class PostItGestione extends Page
|
||||||
|
|
||||||
public string $selectedGroupModalMode = 'open';
|
public string $selectedGroupModalMode = 'open';
|
||||||
|
|
||||||
|
public string $appuntiOwnerFilter = 'mine';
|
||||||
|
|
||||||
|
public ?int $selectedAppuntoId = null;
|
||||||
|
|
||||||
/** @var array<int,string> */
|
/** @var array<int,string> */
|
||||||
public array $riaperturaNote = [];
|
public array $riaperturaNote = [];
|
||||||
|
|
||||||
|
|
@ -88,11 +92,16 @@ public function mount(): void
|
||||||
$focus = (int) request()->query('focus_post_it', 0);
|
$focus = (int) request()->query('focus_post_it', 0);
|
||||||
$this->focusPostItId = $focus > 0 ? $focus : null;
|
$this->focusPostItId = $focus > 0 ? $focus : null;
|
||||||
|
|
||||||
if (in_array((string) request()->query('tab'), ['storico', 'lavagna', 'archivio'], true)) {
|
if (in_array((string) request()->query('tab'), ['storico', 'appunti', 'lavagna', 'archivio'], true)) {
|
||||||
$this->activeTab = (string) request()->query('tab');
|
$this->activeTab = (string) request()->query('tab');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function selectAppunto(int $postItId): void
|
||||||
|
{
|
||||||
|
$this->selectedAppuntoId = $postItId > 0 ? $postItId : null;
|
||||||
|
}
|
||||||
|
|
||||||
public function getPostItInserimentoUrl(): string
|
public function getPostItInserimentoUrl(): string
|
||||||
{
|
{
|
||||||
return PostIt::getUrl(panel: 'admin-filament');
|
return PostIt::getUrl(panel: 'admin-filament');
|
||||||
|
|
@ -274,6 +283,62 @@ private function shouldShowPostIt(ChiamataPostIt $postIt): bool
|
||||||
return ! $this->isLegacyFilteredSmdrPostIt($postIt);
|
return ! $this->isLegacyFilteredSmdrPostIt($postIt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function hasOperationalNoteContent(ChiamataPostIt $postIt): bool
|
||||||
|
{
|
||||||
|
return trim($this->extractOperationalNoteContent($postIt)) !== '';
|
||||||
|
}
|
||||||
|
|
||||||
|
private function extractOperationalNoteContent(ChiamataPostIt $postIt): string
|
||||||
|
{
|
||||||
|
$note = trim((string) ($postIt->nota ?? ''));
|
||||||
|
if ($note === '') {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$origin = strtolower(trim((string) ($postIt->origine ?? '')));
|
||||||
|
if (! in_array($origin, ['smdr', 'smdr_table', 'smdr_live_banner', 'topbar_live_call', 'panasonic_csta_table', 'csta_table'], true)) {
|
||||||
|
return $note;
|
||||||
|
}
|
||||||
|
|
||||||
|
$lines = preg_split('/\r\n|\r|\n/', $note) ?: [];
|
||||||
|
$kept = [];
|
||||||
|
|
||||||
|
foreach ($lines as $line) {
|
||||||
|
$line = trim((string) $line);
|
||||||
|
if ($line === '') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (preg_match('/^\d{2}\/\d{2}\/\d{2}\s+\d{2}:\d{2}\s+\d+\b/i', $line) === 1) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (preg_match('/^chiamata ricevuta dal numero\b/i', $line) === 1) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (preg_match('/^interno\/gruppo chiamato:\b/i', $line) === 1) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (preg_match('/^nota operativa:\s*\d{2}\/\d{2}\/\d{2}/i', $line) === 1) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (preg_match('/^dettaglio sorgente:\s*\d{2}\/\d{2}\/\d{2}/i', $line) === 1) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (preg_match('/^contatto:\s*contatto non in rubrica$/i', $line) === 1) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$kept[] = $line;
|
||||||
|
}
|
||||||
|
|
||||||
|
return trim(implode("\n", $kept));
|
||||||
|
}
|
||||||
|
|
||||||
public function getRecentiApertiVisibiliProperty()
|
public function getRecentiApertiVisibiliProperty()
|
||||||
{
|
{
|
||||||
return $this->recentiVisibili
|
return $this->recentiVisibili
|
||||||
|
|
@ -298,6 +363,60 @@ public function getRecentiChiusiRaggruppatiProperty()
|
||||||
return $this->buildGroupedCollection($this->recentiChiusiVisibili);
|
return $this->buildGroupedCollection($this->recentiChiusiVisibili);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getAppuntiOperativiProperty()
|
||||||
|
{
|
||||||
|
if (! $this->isPostItTableReady()) {
|
||||||
|
return collect();
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
$query = ChiamataPostIt::query()
|
||||||
|
->with(['rubrica', 'stabile', 'ticket', 'creatoDa', 'assegnatoAUser:id,name', 'assegnatoAFornitore:id,ragione_sociale,nome,cognome'])
|
||||||
|
->orderByDesc('chiamata_il')
|
||||||
|
->orderByDesc('id');
|
||||||
|
|
||||||
|
$authId = (int) (Auth::id() ?? 0);
|
||||||
|
if ($this->appuntiOwnerFilter === 'mine' && $authId > 0) {
|
||||||
|
$query->where(function ($inner) use ($authId): void {
|
||||||
|
$inner->where('creato_da_user_id', $authId)
|
||||||
|
->orWhere('assegnato_a_user_id', $authId);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$items = $query
|
||||||
|
->limit(200)
|
||||||
|
->get()
|
||||||
|
->filter(fn(ChiamataPostIt $postIt): bool => $this->shouldShowPostIt($postIt) && $this->hasOperationalNoteContent($postIt))
|
||||||
|
->values();
|
||||||
|
|
||||||
|
if ($items->isNotEmpty() && ! $items->contains(fn(ChiamataPostIt $postIt): bool => (int) $postIt->id === (int) $this->selectedAppuntoId)) {
|
||||||
|
$this->selectedAppuntoId = $this->focusPostItId && $items->contains(fn(ChiamataPostIt $postIt): bool => (int) $postIt->id === (int) $this->focusPostItId)
|
||||||
|
? (int) $this->focusPostItId
|
||||||
|
: (int) $items->first()->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $items;
|
||||||
|
} catch (QueryException) {
|
||||||
|
return collect();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSelectedAppuntoProperty(): ?ChiamataPostIt
|
||||||
|
{
|
||||||
|
if (! $this->isPostItTableReady() || ! $this->selectedAppuntoId) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ChiamataPostIt::query()
|
||||||
|
->with(['rubrica', 'stabile', 'ticket', 'creatoDa', 'assegnatoAUser:id,name', 'assegnatoAFornitore:id,ragione_sociale,nome,cognome'])
|
||||||
|
->find($this->selectedAppuntoId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getOperationalNoteSummary(ChiamataPostIt $postIt, int $limit = 180): string
|
||||||
|
{
|
||||||
|
return Str::limit($this->extractOperationalNoteContent($postIt), $limit);
|
||||||
|
}
|
||||||
|
|
||||||
public function openGroupModal(string $modalKey, string $mode = 'open'): void
|
public function openGroupModal(string $modalKey, string $mode = 'open'): void
|
||||||
{
|
{
|
||||||
$this->selectedGroupModalKey = $modalKey;
|
$this->selectedGroupModalKey = $modalKey;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
namespace App\Filament\Pages;
|
namespace App\Filament\Pages;
|
||||||
|
|
||||||
|
use App\Filament\Pages\Gescon\RubricaUniversaleScheda;
|
||||||
use App\Models\DettaglioRipartizioneSpese;
|
use App\Models\DettaglioRipartizioneSpese;
|
||||||
use App\Models\GestioneContabile;
|
use App\Models\GestioneContabile;
|
||||||
use App\Models\Incasso;
|
use App\Models\Incasso;
|
||||||
|
|
@ -1690,10 +1691,12 @@ protected function hydrateRelazioni(): void
|
||||||
$nome = $contatto ? 'Contatto #' . $contatto->id : 'Contatto non definito';
|
$nome = $contatto ? 'Contatto #' . $contatto->id : 'Contatto non definito';
|
||||||
}
|
}
|
||||||
|
|
||||||
$tipoRaw = strtolower(trim((string) ($relazione->ruolo_standard ?? '')));
|
$tipoRaw = strtolower(trim((string) ($relazione->ruolo_standard ?? '')));
|
||||||
$tipoLabel = $labelsRuoli[$tipoRaw] ?? ($tipoRaw !== '' ? $tipoRaw : 'Altro');
|
$customRaw = trim((string) ($relazione->ruolo_custom ?? ''));
|
||||||
if (! empty($relazione->ruolo_custom)) {
|
$hasMeaningfulCustomRole = $customRaw !== '' && ! in_array(strtolower($customRaw), ['p', 'i', 'c', 'u'], true);
|
||||||
$tipoLabel .= ' (' . (string) $relazione->ruolo_custom . ')';
|
$tipoLabel = $labelsRuoli[$tipoRaw] ?? ($tipoRaw !== '' ? $tipoRaw : 'Altro');
|
||||||
|
if ($hasMeaningfulCustomRole) {
|
||||||
|
$tipoLabel .= ' (' . $customRaw . ')';
|
||||||
}
|
}
|
||||||
|
|
||||||
$quota = data_get($relazione->meta, 'right_percent');
|
$quota = data_get($relazione->meta, 'right_percent');
|
||||||
|
|
@ -1716,16 +1719,22 @@ protected function hydrateRelazioni(): void
|
||||||
return [
|
return [
|
||||||
'id' => (int) $relazione->id,
|
'id' => (int) $relazione->id,
|
||||||
'persona_id' => (int) ($relazione->rubrica_id ?? 0),
|
'persona_id' => (int) ($relazione->rubrica_id ?? 0),
|
||||||
|
'rubrica_id' => (int) ($relazione->rubrica_id ?? 0),
|
||||||
'nome' => $nome,
|
'nome' => $nome,
|
||||||
'codice_fiscale' => $contatto?->codice_fiscale,
|
'codice_fiscale' => $contatto?->codice_fiscale,
|
||||||
'tipo_raw' => $tipoRaw,
|
'tipo_raw' => $tipoRaw,
|
||||||
'tipo' => $tipoLabel,
|
'tipo' => $tipoLabel,
|
||||||
|
'ruolo_custom' => $hasMeaningfulCustomRole ? $customRaw : null,
|
||||||
|
'has_custom_role' => $hasMeaningfulCustomRole,
|
||||||
'ruolo_rate' => $ruoloRate,
|
'ruolo_rate' => $ruoloRate,
|
||||||
'quota' => $quota,
|
'quota' => $quota,
|
||||||
'quota_label' => $quota !== null ? number_format($quota, 2, ',', '.') : null,
|
'quota_label' => $quota !== null ? number_format($quota, 2, ',', '.') : null,
|
||||||
'data_inizio' => $formatDate($relazione->data_inizio),
|
'data_inizio' => $formatDate($relazione->data_inizio),
|
||||||
'data_fine' => $formatDate($relazione->data_fine),
|
'data_fine' => $formatDate($relazione->data_fine),
|
||||||
'attivo' => true,
|
'attivo' => true,
|
||||||
|
'telefono' => trim((string) ($contatto?->telefono_cellulare ?: $contatto?->telefono_ufficio ?: $contatto?->telefono_casa ?: '')),
|
||||||
|
'email' => trim((string) ($contatto?->email ?? '')),
|
||||||
|
'rubrica_url' => $contatto ? RubricaUniversaleScheda::getUrl(['record' => (int) $contatto->id], panel : 'admin-filament'): null,
|
||||||
'riceve_comunicazioni' => false,
|
'riceve_comunicazioni' => false,
|
||||||
'riceve_convocazioni' => false,
|
'riceve_convocazioni' => false,
|
||||||
'vota_assemblea' => false,
|
'vota_assemblea' => false,
|
||||||
|
|
@ -1771,19 +1780,22 @@ protected function hydrateRelazioni(): void
|
||||||
|
|
||||||
$altri = $relazioniMapped
|
$altri = $relazioniMapped
|
||||||
->filter(function ($rel) {
|
->filter(function ($rel) {
|
||||||
return $rel['attivo'] && ! in_array(strtolower($rel['tipo_raw'] ?? ''), [
|
return $rel['attivo'] && (
|
||||||
'condomino',
|
! in_array(strtolower($rel['tipo_raw'] ?? ''), [
|
||||||
'proprietario',
|
'condomino',
|
||||||
'comproprietario',
|
'proprietario',
|
||||||
'nudo_proprietario',
|
'comproprietario',
|
||||||
'usufruttuario',
|
'nudo_proprietario',
|
||||||
'usufrutto',
|
'usufruttuario',
|
||||||
'inquilino',
|
'usufrutto',
|
||||||
'locatario',
|
'inquilino',
|
||||||
'conduttore',
|
'locatario',
|
||||||
], true);
|
'conduttore',
|
||||||
|
], true)
|
||||||
|
|| ! empty($rel['has_custom_role'])
|
||||||
|
);
|
||||||
})
|
})
|
||||||
->unique(fn(array $r) => (strtolower((string) ($rel['tipo_raw'] ?? 'altro')) . '|' . (int) ($r['persona_id'] ?? 0)))
|
->unique(fn(array $r) => strtolower((string) ($r['tipo_raw'] ?? 'altro')) . '|' . strtolower((string) ($r['ruolo_custom'] ?? '')) . '|' . (int) ($r['persona_id'] ?? 0))
|
||||||
->values();
|
->values();
|
||||||
|
|
||||||
if ($proprietari->isEmpty()) {
|
if ($proprietari->isEmpty()) {
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,9 @@
|
||||||
<button type="button" wire:click="$set('activeTab', 'storico')" class="rounded-md px-3 py-1.5 text-xs font-medium {{ $activeTab === 'storico' ? 'bg-indigo-700 text-white' : 'bg-gray-100 text-gray-700 hover:bg-gray-200' }}">
|
<button type="button" wire:click="$set('activeTab', 'storico')" class="rounded-md px-3 py-1.5 text-xs font-medium {{ $activeTab === 'storico' ? 'bg-indigo-700 text-white' : 'bg-gray-100 text-gray-700 hover:bg-gray-200' }}">
|
||||||
Storico Post-it
|
Storico Post-it
|
||||||
</button>
|
</button>
|
||||||
|
<button type="button" wire:click="$set('activeTab', 'appunti')" class="rounded-md px-3 py-1.5 text-xs font-medium {{ $activeTab === 'appunti' ? 'bg-emerald-700 text-white' : 'bg-emerald-50 text-emerald-900 hover:bg-emerald-100' }}">
|
||||||
|
Appunti chiamata
|
||||||
|
</button>
|
||||||
<button type="button" wire:click="$set('activeTab', 'lavagna')" class="rounded-md px-3 py-1.5 text-xs font-medium {{ $activeTab === 'lavagna' ? 'bg-amber-600 text-white' : 'bg-amber-50 text-amber-900 hover:bg-amber-100' }}">
|
<button type="button" wire:click="$set('activeTab', 'lavagna')" class="rounded-md px-3 py-1.5 text-xs font-medium {{ $activeTab === 'lavagna' ? 'bg-amber-600 text-white' : 'bg-amber-50 text-amber-900 hover:bg-amber-100' }}">
|
||||||
Lavagna chiamate
|
Lavagna chiamate
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -111,6 +114,111 @@
|
||||||
@endforelse
|
@endforelse
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@elseif($activeTab === 'appunti')
|
||||||
|
<div class="rounded-xl border border-emerald-200 bg-white p-4">
|
||||||
|
<div class="mb-4 flex flex-wrap items-center justify-between gap-3">
|
||||||
|
<div>
|
||||||
|
<h2 class="text-base font-semibold text-emerald-900">Appunti presi durante la chiamata</h2>
|
||||||
|
<p class="text-sm text-emerald-800">Elenco separato dagli eventi telefonici grezzi, con focus sui Post-it che contengono note operative reali.</p>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-wrap gap-2">
|
||||||
|
<button type="button" wire:click="$set('appuntiOwnerFilter', 'mine')" class="rounded-md px-3 py-1.5 text-xs font-medium {{ $appuntiOwnerFilter === 'mine' ? 'bg-emerald-700 text-white' : 'bg-emerald-50 text-emerald-900 hover:bg-emerald-100' }}">
|
||||||
|
I miei appunti
|
||||||
|
</button>
|
||||||
|
<button type="button" wire:click="$set('appuntiOwnerFilter', 'all')" class="rounded-md px-3 py-1.5 text-xs font-medium {{ $appuntiOwnerFilter === 'all' ? 'bg-slate-700 text-white' : 'bg-slate-100 text-slate-700 hover:bg-slate-200' }}">
|
||||||
|
Tutti
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="grid gap-4 lg:grid-cols-[minmax(0,1.2fr)_minmax(320px,0.8fr)]">
|
||||||
|
<div class="space-y-3">
|
||||||
|
@forelse($this->appuntiOperativi as $appunto)
|
||||||
|
<button type="button" wire:click="selectAppunto({{ (int) $appunto->id }})" class="block w-full rounded-xl border p-4 text-left transition {{ (int) ($selectedAppuntoId ?? 0) === (int) $appunto->id ? 'border-emerald-400 bg-emerald-50 ring-1 ring-emerald-200' : 'bg-white hover:bg-gray-50' }}">
|
||||||
|
<div class="flex items-start justify-between gap-3">
|
||||||
|
<div>
|
||||||
|
<div class="text-sm font-semibold text-slate-900">{{ $appunto->oggetto ?: 'Senza oggetto' }}</div>
|
||||||
|
<div class="mt-1 text-xs text-slate-600">
|
||||||
|
{{ $appunto->nome_chiamante ?: 'Chiamante non identificato' }}
|
||||||
|
@if($appunto->telefono)
|
||||||
|
· {{ $appunto->telefono }}
|
||||||
|
@endif
|
||||||
|
@if($appunto->rubrica)
|
||||||
|
· Rubrica #{{ (int) $appunto->rubrica->id }}
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="text-[11px] text-slate-500">{{ optional($appunto->chiamata_il)->format('d/m/Y H:i') }}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mt-3 whitespace-pre-wrap text-sm text-slate-700">{{ $this->getOperationalNoteSummary($appunto) }}</div>
|
||||||
|
|
||||||
|
<div class="mt-3 flex flex-wrap gap-2 text-[11px]">
|
||||||
|
<span class="rounded-md bg-slate-100 px-2 py-1 text-slate-700">{{ $appunto->stato }}</span>
|
||||||
|
@if($appunto->creatoDa)
|
||||||
|
<span class="rounded-md bg-blue-100 px-2 py-1 text-blue-800">Creato da {{ $appunto->creatoDa->name }}</span>
|
||||||
|
@endif
|
||||||
|
@if($appunto->assegnatoAUser)
|
||||||
|
<span class="rounded-md bg-emerald-100 px-2 py-1 text-emerald-800">Assegnato a {{ $appunto->assegnatoAUser->name }}</span>
|
||||||
|
@endif
|
||||||
|
@if($appunto->ticket_id)
|
||||||
|
<span class="rounded-md bg-indigo-100 px-2 py-1 text-indigo-800">Ticket #{{ (int) $appunto->ticket_id }}</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
@empty
|
||||||
|
<div class="rounded-lg border border-dashed border-emerald-300 bg-emerald-50/50 p-4 text-sm text-emerald-900">Nessun appunto operativo trovato per il filtro corrente.</div>
|
||||||
|
@endforelse
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="rounded-2xl border bg-slate-50 p-4">
|
||||||
|
@if($this->selectedAppunto)
|
||||||
|
<div class="space-y-3">
|
||||||
|
<div>
|
||||||
|
<div class="text-sm font-semibold text-slate-900">Post-it #{{ (int) $this->selectedAppunto->id }} · {{ $this->selectedAppunto->oggetto ?: 'Senza oggetto' }}</div>
|
||||||
|
<div class="mt-1 text-xs text-slate-500">
|
||||||
|
{{ $this->selectedAppunto->nome_chiamante ?: 'Chiamante non identificato' }}
|
||||||
|
@if($this->selectedAppunto->telefono)
|
||||||
|
· {{ $this->selectedAppunto->telefono }}
|
||||||
|
@endif
|
||||||
|
@if($this->selectedAppunto->stabile)
|
||||||
|
· {{ $this->selectedAppunto->stabile->denominazione ?: ('Stabile #' . $this->selectedAppunto->stabile->id) }}
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="rounded-xl border bg-white p-3">
|
||||||
|
<div class="text-xs font-semibold uppercase tracking-wide text-slate-500">Appunto completo</div>
|
||||||
|
<div class="mt-2 whitespace-pre-wrap text-sm text-slate-800">{{ $this->selectedAppunto->nota ?: '—' }}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="grid gap-2 sm:grid-cols-2">
|
||||||
|
<div class="rounded-xl border bg-white p-3 text-xs text-slate-600">
|
||||||
|
<div class="font-semibold text-slate-900">Creato da</div>
|
||||||
|
<div class="mt-1">{{ $this->selectedAppunto->creatoDa?->name ?: '—' }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="rounded-xl border bg-white p-3 text-xs text-slate-600">
|
||||||
|
<div class="font-semibold text-slate-900">Assegnazione</div>
|
||||||
|
<div class="mt-1">{{ $this->selectedAppunto->assegnatoAUser?->name ?: ($this->selectedAppunto->assegnatoAFornitore?->ragione_sociale ?: 'Non assegnato') }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex flex-wrap gap-2">
|
||||||
|
<a href="{{ $this->getPostItPageUrl((int) $this->selectedAppunto->id) }}" class="inline-flex items-center rounded-md bg-emerald-700 px-3 py-1.5 text-xs font-medium text-white hover:bg-emerald-600">Apri scheda Post-it</a>
|
||||||
|
@if($this->selectedAppunto->rubrica)
|
||||||
|
<a href="{{ \App\Filament\Pages\Gescon\RubricaUniversaleScheda::getUrl(['record' => (int) $this->selectedAppunto->rubrica->id], panel: 'admin-filament') }}" class="inline-flex items-center rounded-md border px-3 py-1.5 text-xs text-indigo-700">Apri rubrica</a>
|
||||||
|
@endif
|
||||||
|
@if($this->selectedAppunto->ticket_id)
|
||||||
|
<a href="{{ \App\Filament\Pages\Supporto\TicketGestione::getUrl(panel: 'admin-filament') }}#ticket-{{ (int) $this->selectedAppunto->ticket_id }}" class="inline-flex items-center rounded-md border px-3 py-1.5 text-xs text-slate-700">Apri ticket</a>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@else
|
||||||
|
<div class="rounded-lg border border-dashed border-slate-300 bg-white p-4 text-sm text-slate-500">Seleziona un appunto per vedere la scheda completa.</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@elseif($activeTab === 'lavagna')
|
@elseif($activeTab === 'lavagna')
|
||||||
<div class="rounded-xl border border-amber-200 bg-amber-50/40 p-4">
|
<div class="rounded-xl border border-amber-200 bg-amber-50/40 p-4">
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
|
|
|
||||||
|
|
@ -473,6 +473,24 @@ class="inline-flex items-center rounded-lg border px-4 py-2 text-sm font-semibol
|
||||||
<div class="text-sm font-semibold text-gray-900">{{ $relazione['nome'] }}</div>
|
<div class="text-sm font-semibold text-gray-900">{{ $relazione['nome'] }}</div>
|
||||||
<div class="text-xs text-gray-500 mt-1">CF: {{ $relazione['codice_fiscale'] ?? '—' }}</div>
|
<div class="text-xs text-gray-500 mt-1">CF: {{ $relazione['codice_fiscale'] ?? '—' }}</div>
|
||||||
<div class="text-xs text-gray-500 mt-1">Quota: {{ $relazione['quota_label'] ?? '—' }}%</div>
|
<div class="text-xs text-gray-500 mt-1">Quota: {{ $relazione['quota_label'] ?? '—' }}%</div>
|
||||||
|
@if(!empty($relazione['telefono']))
|
||||||
|
<div class="text-xs text-gray-500 mt-1">Telefono: {{ $relazione['telefono'] }}</div>
|
||||||
|
@endif
|
||||||
|
@if(!empty($relazione['email']))
|
||||||
|
<div class="text-xs text-gray-500 mt-1">Email: {{ $relazione['email'] }}</div>
|
||||||
|
@endif
|
||||||
|
@if(!empty($relazione['data_inizio']) || !empty($relazione['data_fine']))
|
||||||
|
<div class="text-xs text-gray-500 mt-1">
|
||||||
|
Periodo:
|
||||||
|
@if(!empty($relazione['data_inizio'])) Da {{ $relazione['data_inizio'] }} @endif
|
||||||
|
@if(!empty($relazione['data_fine'])) · fino a {{ $relazione['data_fine'] }} @endif
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
@if(!empty($relazione['rubrica_url']))
|
||||||
|
<div class="mt-2">
|
||||||
|
<a href="{{ $relazione['rubrica_url'] }}" class="inline-flex items-center rounded-md border border-indigo-200 bg-indigo-50 px-2 py-1 text-[11px] font-medium text-indigo-700 hover:bg-indigo-100">Apri scheda rubrica</a>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user