start linking notification to project based of project page UUID

This commit is contained in:
isUnknown 2025-01-09 16:11:59 +01:00
parent 5f734ab45b
commit 8c6e21c707
4 changed files with 23 additions and 8 deletions

View file

@ -5,19 +5,22 @@ use Kirby;
class ProjectDetails
{
public string $title;
public string $uri;
private string $title;
private string $uri;
private string $uuid;
public function __construct(Kirby\Cms\Page $page)
{
$this->title = (string) $page->title();
$this->uri = (string) $page->uri();
$this->uuid = (string) $page->uuid();
}
public function toArray() {
return [
"title" => $this->title,
"uri" => $this->uri
"uri" => $this->uri,
"uuid" => $this->uuid,
];
}
}

View file

@ -8,7 +8,8 @@ function getProjectData($project) {
'currentStep' => $project->currentStep()->value(),
'status' => $project->status(),
'logo' => $project->client()->toPage() ? $project->client()->toPage()->logo()->toFile()->url() : '',
'steps' => $project->getSteps()
'steps' => $project->getSteps(),
"uuid" => (string) $project->uuid()
];
}