Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tree-types): update links from create, edit and delete #168

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/app/Views/Admin/TreeType/Create.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="mb-4 flex justify-end">
<a href="/tree-types"
<a href="/tree-types/"

Check warning on line 2 in src/app/Views/Admin/TreeType/Create.php

View check run for this annotation

Codecov / codecov/patch

src/app/Views/Admin/TreeType/Create.php#L2

Added line #L2 was not covered by tests
class="bg-blue-500 hover:bg-blue-600 text-white font-medium py-2 px-4 rounded-lg shadow focus:outline-none focus:ring focus:ring-green-500 flex items-center space-x-2">
<!-- Heroicon for return/back (chevron-left) -->
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
Expand All @@ -11,7 +11,7 @@

<div class="bg-white p-8 border border-gray-300 rounded-lg shadow-md">
<h2 class="text-2xl font-semibold text-gray-800 mb-6">Create Tree Type</h2>
<form action="/tree-type/store" method="POST" class="space-y-6">
<form action="/admin/tree-type/store" method="POST" class="space-y-6">

Check warning on line 14 in src/app/Views/Admin/TreeType/Create.php

View check run for this annotation

Codecov / codecov/patch

src/app/Views/Admin/TreeType/Create.php#L14

Added line #L14 was not covered by tests

<!-- Family -->
<div>
Expand Down
2 changes: 1 addition & 1 deletion src/app/Views/Admin/TreeType/Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

<div class="bg-white p-8 border border-gray-300 rounded-lg shadow-md">
<h2 class="text-2xl font-semibold text-gray-800 mb-6">Edit Tree Type</h2>
<form action="/tree-type/<?php echo htmlspecialchars($tree_type->getId()); ?>/update" method="POST"
<form action="/admin/tree-type/<?php echo htmlspecialchars($tree_type->getId()); ?>/update" method="POST"
class="space-y-6">

Check warning on line 15 in src/app/Views/Admin/TreeType/Edit.php

View check run for this annotation

Codecov / codecov/patch

src/app/Views/Admin/TreeType/Edit.php#L14-L15

Added lines #L14 - L15 were not covered by tests

<!-- Family -->
<div>
Expand Down
6 changes: 3 additions & 3 deletions src/app/Views/Admin/TreeTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<?php } ?>

<div class="mb-4 flex justify-end">
<a href="/tree-type/create"
<a href="/admin/tree-type/create"
class="bg-blue-500 hover:bg-blue-600 text-white font-medium py-2 px-4 rounded-lg shadow focus:outline-none focus:ring focus:ring-green-500">
Create Tree Type
</a>
Expand Down Expand Up @@ -46,7 +46,7 @@
</td>
<td class="px-4 py-3 border-b text-center flex justify-center space-x-4">
<!-- Edit Button (Pencil Icon) -->
<a href="/tree-type/<?php echo htmlspecialchars($tree_type->getId()); ?>/edit"
<a href="/admin/tree-type/<?php echo htmlspecialchars($tree_type->getId()); ?>/edit"

Check warning on line 49 in src/app/Views/Admin/TreeTypes.php

View check run for this annotation

Codecov / codecov/patch

src/app/Views/Admin/TreeTypes.php#L49

Added line #L49 was not covered by tests
class="text-blue-500 hover:text-blue-700" title="Edit">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
stroke="currentColor" class="w-5 h-5">
Expand All @@ -55,7 +55,7 @@
</svg>
</a>
<!-- Delete Button (Trash Icon) -->
<a href="/tree-type/<?php echo htmlspecialchars($tree_type->getId()); ?>/delete"
<a href="/admin/tree-type/<?php echo htmlspecialchars($tree_type->getId()); ?>/delete"

Check warning on line 58 in src/app/Views/Admin/TreeTypes.php

View check run for this annotation

Codecov / codecov/patch

src/app/Views/Admin/TreeTypes.php#L58

Added line #L58 was not covered by tests
onclick="return confirm('Are you sure you want to delete this tree type?');"
class="text-red-500 hover:text-red-700" title="Delete">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
Expand Down
Loading