Skip to content

Commit

Permalink
Conflict fix + design tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
theory-of-evrth committed Dec 18, 2024
1 parent f2bfb05 commit e3c77c6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
12 changes: 3 additions & 9 deletions timeliner/app/Http/Controllers/TimelineController.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,11 @@ public function show($id)

public function showDashboard()
{
$user = Auth::user();
$timelines = $this->timelinesWithOwnership();

$timelines = DB::select("
SELECT timelines.*
FROM timelines
JOIN ownerships
ON CAST(SUBSTR(ownerships.id, 1, LENGTH(ownerships.id) - LENGTH(?)) AS INTEGER) = timelines.id
WHERE CAST(SUBSTR(ownerships.id, -LENGTH(?)) AS INTEGER) = ?
", [$user->id, $user->id, $user->id]);
$timelinesWithOwnership = $this->timelinesWithOwnership();

return view('dashboard',['timelines' => $timelines]);
return view('dashboard',['timelines' => $timelines, 'timelinesWithOwnership' => $timelinesWithOwnership]);
}

public function create()
Expand Down
3 changes: 0 additions & 3 deletions timeliner/resources/views/dashboard.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
<div class="p-6 text-gray-900 dark:text-gray-100">
{{ __("You're logged in!") }}
</div>
<div class="p-6 text-gray-900 dark:text-gray-100">
@include("timeline.partials.timelinelist", $timelines)
</div>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion timeliner/resources/views/timeline/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</div>

</div>
<div id="node-creation-form" class="form-group col-12">
<div id="node-creation-form" class="form-group col-12 border-2 border-grey-200 rounded-md p-2">
@include('timeline.partials.nodecreate')
</div>

Expand Down
4 changes: 2 additions & 2 deletions timeliner/resources/views/timeline/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</div>

</div>
<div id="node-edit-form" class="form-group col-12">
<div id="node-edit-form" class="form-group col-12 border-2 border-grey-200 rounded-md p-2">
@include('timeline.partials.nodeedit', ['nodes' => $nodes])
</div>

Expand All @@ -54,4 +54,4 @@
</div>
</div>
</form>
</x-app-layout>
</x-app-layout>

0 comments on commit e3c77c6

Please sign in to comment.