Added Client case person address to segment tables and exports
This commit is contained in:
@@ -34,6 +34,7 @@ class SegmentContractsExport extends DefaultValueBinder implements FromQuery, Sh
|
||||
public const COLUMN_METADATA = [
|
||||
'reference' => ['label' => 'Pogodba'],
|
||||
'client_case' => ['label' => 'Primer'],
|
||||
'address' => ['label' => 'Naslov'],
|
||||
'client' => ['label' => 'Stranka'],
|
||||
'type' => ['label' => 'Vrsta'],
|
||||
'start_date' => ['label' => 'Začetek'],
|
||||
@@ -107,6 +108,7 @@ private function resolveValue(Contract $contract, string $column): mixed
|
||||
return match ($column) {
|
||||
'reference' => $contract->reference,
|
||||
'client_case' => optional($contract->clientCase?->person)->full_name,
|
||||
'address' => optional($contract->clientCase?->person?->address)->address,
|
||||
'client' => optional($contract->clientCase?->client?->person)->full_name,
|
||||
'type' => optional($contract->type)->name,
|
||||
'start_date' => $this->formatDate($contract->start_date),
|
||||
|
||||
Reference in New Issue
Block a user