diff --git a/app/Http/Controllers/ProjectController.php b/app/Http/Controllers/ProjectController.php index b068cd5..f7ddaa5 100644 --- a/app/Http/Controllers/ProjectController.php +++ b/app/Http/Controllers/ProjectController.php @@ -22,6 +22,10 @@ public static function getProjectData(int $pid) { } public static function project(int $pid) { - view('pages/project', self::getProjectData($pid)); + return view('pages/project', self::getProjectData($pid)); + } + + public static function EditProject(int $pid) { + return view('pages/projects/edit', self::getProjectData($pid)); } } diff --git a/resources/views/core/pages/checklists.blade.php b/resources/views/core/pages/checklists.blade.php index 94e08c7..51f5adc 100644 --- a/resources/views/core/pages/checklists.blade.php +++ b/resources/views/core/pages/checklists.blade.php @@ -20,7 +20,7 @@
@if($checklist->projname) {{$checklist->projname ?? 'Misc'}} diff --git a/resources/views/core/pages/project.blade.php b/resources/views/core/pages/project.blade.php index b73fa75..51c20ab 100644 --- a/resources/views/core/pages/project.blade.php +++ b/resources/views/core/pages/project.blade.php @@ -1,22 +1,44 @@ @props(['project', 'checklists' => []]) -

{{$project->projname}}

- {{-- Todo Add Edit and when to show mapping button logic --}} -
- Projects Mangers: - {{$project->managers }} +
+
-
Research checklists
+
+

{{ $project->projname }}

+ +
+ {{-- Todo Add Edit and when to show mapping button logic --}}
- @foreach ($checklists as $checklist) -
  • - {{$checklist->name}} - | - {{-- Todo find conditions for when this would not exist if any --}} - - Key -
  • - @endforeach + @if(isset($project->managers) && $project->managers) +
    + Projects Mangers: + {{$project->managers }} +
    + @endif +
    Research checklists
    + +
    + @foreach ($checklists as $checklist) +
  • + {{$checklist->name}} + | + {{-- Todo find conditions for when this would not exist if any --}} + + Key +
  • + @endforeach +
    diff --git a/resources/views/core/pages/projects/edit.blade.php b/resources/views/core/pages/projects/edit.blade.php new file mode 100644 index 0000000..f45adfe --- /dev/null +++ b/resources/views/core/pages/projects/edit.blade.php @@ -0,0 +1,58 @@ +@props(['project']) + +
    + +
    + +
    +

    {{ $project->projname }}

    + +
    + + +
    + TODO metadata +
    +
    + TODO Inventory Managers +
    +
    + Checklist Management +
    +
    + + + {{-- Todo Add Edit and when to show mapping button logic --}} +
    + @if(isset($project->managers) && $project->managers) +
    + Projects Mangers: + {{$project->managers }} +
    + @endif +
    Research checklists
    + +
    + @foreach ($checklists as $checklist) +
  • + {{$checklist->name}} + | + {{-- Todo find conditions for when this would not exist if any --}} + + Key +
  • + @endforeach +
    +
    +
    diff --git a/routes/web.php b/routes/web.php index cb62c90..4b3cf12 100644 --- a/routes/web.php +++ b/routes/web.php @@ -59,8 +59,9 @@ | Project Routes |-------------------------------------------------------------------------- */ -Route::group(['prefix' => '/project'], function () { - Route::get('/{clid}', [ProjectController::class, 'project']); +Route::group(['prefix' => '/projects'], function () { + Route::get('/{pid}', [ProjectController::class, 'project']); + Route::get('/{pid}/edit', [ProjectController::class, 'editProject']); }); /*