Compare commits

..

No commits in common. "f646b6530a594d664cdf5f9b327950ce5e37cd8a" and "f66bbbf8426f989de271b7c81c318ae31bcb7b84" have entirely different histories.

3 changed files with 1 additions and 10 deletions

View File

@ -34,7 +34,6 @@ class ClientContractsExport extends DefaultValueBinder implements FromQuery, Sho
public const COLUMN_METADATA = [
'reference' => ['label' => 'Referenca'],
'customer' => ['label' => 'Stranka'],
'address' => ['label' => 'Naslov'],
'start' => ['label' => 'Začetek'],
'segment' => ['label' => 'Segment'],
'balance' => ['label' => 'Stanje'],
@ -106,7 +105,6 @@ private function resolveValue(Contract $contract, string $column): mixed
return match ($column) {
'reference' => $contract->reference,
'customer' => optional($contract->clientCase?->person)->full_name,
'address' => optional($contract->clientCase?->person?->address)->address,
'start' => $this->formatDate($contract->start_date),
'segment' => $contract->segments?->first()?->name,
'balance' => optional($contract->account)->balance_amount,

View File

@ -141,7 +141,6 @@ public function contracts(Client $client, Request $request)
->with([
'clientCase:id,uuid,person_id',
'clientCase.person:id,full_name',
'clientCase.person.address',
'segments' => function ($q) {
$q->wherePivot('active', true)->select('segments.id', 'segments.name');
},
@ -189,7 +188,6 @@ public function exportContracts(ExportClientContractsRequest $request, Client $c
->with([
'clientCase:id,uuid,person_id',
'clientCase.person:id,full_name',
'clientCase.person.address',
'segments' => function ($q) {
$q->wherePivot('active', true)->select('segments.id', 'segments.name');
},

View File

@ -62,14 +62,13 @@ const filterPopoverOpen = ref(false);
const exportDialogOpen = ref(false);
const exportScope = ref("current");
const exportColumns = ref(["reference", "customer", "address", "start", "segment", "balance"]);
const exportColumns = ref(["reference", "customer", "start", "segment", "balance"]);
const exportError = ref("");
const isExporting = ref(false);
const exportableColumns = [
{ key: "reference", label: "Referenca" },
{ key: "customer", label: "Stranka" },
{ key: "address", label: "Naslov" },
{ key: "start", label: "Začetek" },
{ key: "segment", label: "Segment" },
{ key: "balance", label: "Stanje" },
@ -360,7 +359,6 @@ function extractFilenameFromHeaders(headers) {
:columns="[
{ key: 'reference', label: 'Referenca', sortable: false },
{ key: 'customer', label: 'Stranka', sortable: false },
{ key: 'address', label: 'Naslov', sortable: false },
{ key: 'start', label: 'Začetek', sortable: false },
{ key: 'segment', label: 'Segment', sortable: false },
{ key: 'balance', label: 'Stanje', sortable: false, align: 'right' },
@ -494,9 +492,6 @@ function extractFilenameFromHeaders(headers) {
<template #cell-customer="{ row }">
{{ row.client_case?.person?.full_name || "-" }}
</template>
<template #cell-address="{ row }">
{{ row.client_case?.person?.address?.address || "-" }}
</template>
<template #cell-start="{ row }">
{{ formatDate(row.start_date) }}
</template>