Add :eph field to %TranslationUnit{} and remove :sibling_with
Using :eph from now on to store ephemeral data like :sibling_with. Additionally added cleaning up :eph before saving to db. And renamed InternalTree.Basic to InternalTree.RawInternalBasic to make clear that it contains function for an intermediary tree structure.
This commit is contained in:
@ -4,7 +4,7 @@ defmodule OutlookWeb.ArticleLive.New do
|
||||
import OutlookWeb.ArticleLive.NewComponents
|
||||
|
||||
alias OutlookWeb.ArticleLive.FormComponent
|
||||
alias Outlook.{Articles,Authors,HtmlPreparations}
|
||||
alias Outlook.{Articles,Authors,HtmlPreparations,InternalTree}
|
||||
alias Articles.{Article,RawHtmlInput}
|
||||
|
||||
require Logger
|
||||
@ -52,6 +52,9 @@ defmodule OutlookWeb.ArticleLive.New do
|
||||
|
||||
@impl true
|
||||
def handle_event("approve_raw_internaltree", _, socket) do
|
||||
socket = socket
|
||||
|> assign(:raw_internal_tree,
|
||||
InternalTree.partition_text(socket.assigns.raw_internal_tree))
|
||||
{:noreply, socket |> assign(:step, :review_translation_units)}
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user