fix brief and project without client
This commit is contained in:
parent
e119aa0417
commit
b4bc8e80fe
158 changed files with 292 additions and 5 deletions
|
|
@ -7,7 +7,7 @@ function getProjectData($project) {
|
|||
'modified' => $project->modified('Y-MM-d'),
|
||||
'currentStep' => $project->currentStep()->value(),
|
||||
'status' => $project->status(),
|
||||
'logo' => $project->client()->isNotEmpty() ? $project->client()->toPage()->logo()->toFile()->url() : '',
|
||||
'logo' => $project->client()->toPage() ? $project->client()->toPage()->logo()->toFile()->url() : '',
|
||||
'steps' => $project->getSteps()
|
||||
];
|
||||
}
|
||||
|
|
@ -15,6 +15,7 @@ function getProjectData($project) {
|
|||
try {
|
||||
$children = $kirby->user()->role() == 'admin' ? $page->children()->map(fn($project) => getProjectData($project))->values() : $kirby->user()->projects()->toPages()->map(fn($project) => getProjectData($project))->values();
|
||||
} catch (\Throwable $th) {
|
||||
throw new Exception($th->getMessage() . ' line ' . $th->getLine(), 1);
|
||||
$children = [];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue