initial book review schema

This commit is contained in:
Daniel Yrovas 2025-01-09 21:43:05 +11:00
parent e218290e08
commit 90414e6b93
Signed by: danielyrovas
SSH key fingerprint: SHA256:1avlGZQpGW038lBkNI5lOS7f0hIPM7ecJen2/P1MCCU
15 changed files with 653 additions and 0 deletions

View file

@ -0,0 +1,30 @@
<.header>
Book read {@book_read.id}
<:subtitle>This is a book_read record from your database.</:subtitle>
<:actions>
<.link patch={~p"/book_reads/#{@book_read}/show/edit"} phx-click={JS.push_focus()}>
<.button>Edit book_read</.button>
</.link>
</:actions>
</.header>
<.list>
<:item title="Rating">{@book_read.rating}</:item>
<:item title="Thoughts">{@book_read.thoughts}</:item>
<:item title="Read start">{@book_read.read_start}</:item>
<:item title="Read finish">{@book_read.read_finish}</:item>
<:item title="Progress">{@book_read.progress}</:item>
</.list>
<.back navigate={~p"/book_reads"}>Back to book_reads</.back>
<.modal :if={@live_action == :edit} id="book_read-modal" show on_cancel={JS.patch(~p"/book_reads/#{@book_read}")}>
<.live_component
module={WildWeb.BookReadLive.FormComponent}
id={@book_read.id}
title={@page_title}
action={@live_action}
book_read={@book_read}
patch={~p"/book_reads/#{@book_read}"}
/>
</.modal>