csv render title

This commit is contained in:
2024-12-18 13:02:09 +02:00
parent 9d5d4dd930
commit 232fcc8845
4 changed files with 10 additions and 7 deletions
+4 -2
View File
@@ -20,6 +20,7 @@ use Lucent\Schema\System;
use Lucent\Schema\Ui\Reference;
use Lucent\Schema\Validator\ValidatorException;
use Lucent\Svelte\Svelte;
use Lucent\ViewModel\ViewModel;
use function Lucent\Response\fail;
use function Lucent\Response\ok;
@@ -32,7 +33,8 @@ class RecordController extends Controller
private readonly Svelte $svelte,
private readonly Query $query,
private readonly Manager $recordManager,
private readonly OperatorRegistry $operatorRegistry
private readonly OperatorRegistry $operatorRegistry,
private readonly ViewModel $viewModel,
)
{
}
@@ -176,7 +178,7 @@ class RecordController extends Controller
$c[] = "";
}elseif (count($fieldRecords) === 1){
$c[] = data_get($fieldRecords,"0.id");
$c[] = data_get($fieldRecords,"0.data.name");
$c[] = $this->viewModel->getRecordName($fieldRecords[0]);
}else{
$c[] = collect($fieldRecords)->pluck("id")->join("::");
$c[] = collect($fieldRecords)->pluck("data.name")->join("::");