Add Translators/deepl_accounts

mix phx.gen.live Translators DeeplAccount deepl_accounts\
  name:string description:text auth_key:string character_limit:integer\
  character_count:integer our_character_count:integer user_id:references:users
This commit is contained in:
Thelonius Kort
2022-12-26 18:51:30 +01:00
parent f66521dba8
commit 9e9c7b5519
12 changed files with 585 additions and 0 deletions

View File

@ -0,0 +1,31 @@
<.header>
Deepl account <%= @deepl_account.id %>
<:subtitle>This is a deepl_account record from your database.</:subtitle>
<:actions>
<.link patch={~p"/deepl_accounts/#{@deepl_account}/show/edit"} phx-click={JS.push_focus()}>
<.button>Edit deepl_account</.button>
</.link>
</:actions>
</.header>
<.list>
<:item title="Name"><%= @deepl_account.name %></:item>
<:item title="Description"><%= @deepl_account.description %></:item>
<:item title="Auth key"><%= @deepl_account.auth_key %></:item>
<:item title="Character limit"><%= @deepl_account.character_limit %></:item>
<:item title="Character count"><%= @deepl_account.character_count %></:item>
<:item title="Our character count"><%= @deepl_account.our_character_count %></:item>
</.list>
<.back navigate={~p"/deepl_accounts"}>Back to deepl_accounts</.back>
<.modal :if={@live_action == :edit} id="deepl_account-modal" show on_cancel={JS.patch(~p"/deepl_accounts/#{@deepl_account}")}>
<.live_component
module={OutlookWeb.DeeplAccountLive.FormComponent}
id={@deepl_account.id}
title={@page_title}
action={@live_action}
deepl_account={@deepl_account}
navigate={~p"/deepl_accounts/#{@deepl_account}"}
/>
</.modal>