Skip to content

Commit

Permalink
Merge pull request #3819 from MarioCakeDev/feature/project_settings
Browse files Browse the repository at this point in the history
Add settings button to projects page
  • Loading branch information
peaklabs-dev authored Oct 14, 2024
2 parents a7dc8fa + 76d631d commit c1126ac
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/Livewire/Project/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ class Index extends Component
public function mount()
{
$this->private_keys = PrivateKey::ownedByCurrentTeam()->get();
$this->projects = Project::ownedByCurrentTeam()->get();
$this->projects = Project::ownedByCurrentTeam()->get()->map(function ($project) {
$project->settingsRoute = route('project.edit', ['project_uuid' => $project->uuid]);

return $project;
});
$this->servers = Server::ownedByCurrentTeam()->count();
}

Expand Down
6 changes: 6 additions & 0 deletions resources/views/livewire/project/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
<div x-text="item.description"></div>
</div>
</div>
<div class="flex items-center justify-center gap-2 pt-4 pb-2 mr-4 text-xs lg:py-0 lg:justify-normal">
<a class="mx-4 font-bold hover:underline"
:href="item.settingsRoute">
Settings
</a>
</div>
</div>
</template>
</div>
Expand Down

0 comments on commit c1126ac

Please sign in to comment.