Refactor and add securities controller
This commit is contained in:
28
lib/tradex_web/controllers/security_html/index.html.heex
Normal file
28
lib/tradex_web/controllers/security_html/index.html.heex
Normal file
@@ -0,0 +1,28 @@
|
||||
<.header>
|
||||
Listing Securities
|
||||
<:actions>
|
||||
<.link href={~p"/securities/new"}>
|
||||
<.button>New Security</.button>
|
||||
</.link>
|
||||
</:actions>
|
||||
</.header>
|
||||
|
||||
<.table id="securities" rows={@securities} row_click={&JS.navigate(~p"/securities/#{&1}")}>
|
||||
<:col :let={security} label="Name">{security.name}</:col>
|
||||
<:col :let={security} label="Ticker">{security.ticker}</:col>
|
||||
<:col :let={security} label="Wkn">{security.wkn}</:col>
|
||||
<:col :let={security} label="Isin">{security.isin}</:col>
|
||||
<:col :let={security} label="Expiration date">{security.expiration_date}</:col>
|
||||
<:col :let={security} label="Strike price">{security.strike_price}</:col>
|
||||
<:action :let={security}>
|
||||
<div class="sr-only">
|
||||
<.link navigate={~p"/securities/#{security}"}>Show</.link>
|
||||
</div>
|
||||
<.link navigate={~p"/securities/#{security}/edit"}>Edit</.link>
|
||||
</:action>
|
||||
<:action :let={security}>
|
||||
<.link href={~p"/securities/#{security}"} method="delete" data-confirm="Are you sure?">
|
||||
Delete
|
||||
</.link>
|
||||
</:action>
|
||||
</.table>
|
Reference in New Issue
Block a user