module IHP.IDE.CodeGen.View.NewMigration where import IHP.ViewPrelude import IHP.IDE.ToolServer.Types import IHP.IDE.ToolServer.Routes () import IHP.IDE.CodeGen.Types import IHP.IDE.CodeGen.View.Generators (renderPlan) data NewMigrationView = NewMigrationView { description :: Text , plan :: Either Text [GeneratorAction] , runMigration :: Bool } instance View NewMigrationView where html NewMigrationView { .. } = [hsx|
{renderFlashMessages}
{renderForm} {renderPlan plan}
|] where renderForm = [hsx|
|] submitText :: Text submitText = if runMigration then "Generate & Run" else "Generate"