MAINT: clean up unused; new deps (#45)

This commit is contained in:
Matthew Ryan Dillon 2020-11-21 14:57:03 -07:00 committed by GitHub
parent 7cbb884ef0
commit d57fdd0d0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 24 additions and 120 deletions

View file

@ -229,7 +229,7 @@ defmodule PlannerWeb.TasksLive do
|> put_flash(:info, msg)
end
defp add_new_task(task_params, active_plan = nil, socket) do
defp add_new_task(task_params, _active_plan = nil, socket) do
case Tasks.create_task(task_params) do
{:ok, task} ->
{:noreply, refresh_tasks_and_flash_msg(socket, "task \"#{task.value}\" created")}

View file

@ -1 +0,0 @@
<%= render "form.html", Map.put(assigns, :action, Routes.task_path(@conn, :update, @task)) %>

View file

@ -1,42 +0,0 @@
<div class="box">
<%= form_for @changeset, @action, fn f -> %>
<%= if @changeset.action do %>
<div class="help is-danger">
<p>something went wrong (see below)</p>
</div>
<% end %>
<div class="field">
<div class="control">
<%= textarea f, :value, required: true, class: "textarea", placeholder: "task", autocomplete: "off" %>
</div>
<%= error_tag f, :value %>
</div>
<div class="field">
<%= label f, :due_at, class: "label" do %>
due (YYYY-MM-DD HH:MM:SS)
<% end %>
<div class="control">
<%= text_input f, :due_at, class: "input", placeholder: "YYYY-MM-DD HH:MM:SS", autocomplete: "off" %>
</div>
<%= error_tag f, :due_at %>
</div>
<div class="field">
<%= label f, :finished_at, class: "label" do %>
<%= if is_nil(@task.finished_at) do %>
<%= checkbox f, :finished_at %>
<% else %>
<%= checkbox f, :finished_at, checked_value: @task.finished_at %>
<% end %>
finished
<% end %>
<%= error_tag f, :finished_at %>
</div>
<div class="control">
<%= submit "save", class: "button is-dark" %>
</div>
<% end %>
</div>

View file

@ -1,9 +0,0 @@
<%= link "new", to: Routes.task_path(@conn, :new), class: "button is-dark" %>
<div class="content">
<ul class="tasks">
<%= for task <- @tasks do %>
<li><%= render "task.html", Map.put(assigns, :task, task) %></li>
<% end %>
</ul>
</div>

View file

@ -1 +0,0 @@
<%= render "form.html", Map.put(assigns, :action, Routes.task_path(@conn, :create)) %>

View file

@ -1,26 +0,0 @@
<div class="box">
<%= if not is_nil(@task.due_at) or is_nil(@task.filed_at) do %>
<div class="tags">
<%= if not is_nil(@task.due_at) do %><span class="tag is-warning">due: <%= @task.due_at %></span><% end %>
<%= if is_nil(@task.filed_at) do %><span class="tag is-danger">unfiled</span><% end %>
</div>
<% end %>
<div class="mb-5">
<%= md_to_html @task.value %>
</div>
<div class="tags">
<span class="tag is-light">updated: <%= @task.updated_at %></span>
<span class="tag is-light">created: <%= @task.inserted_at %></span>
</div>
<div class="field is-grouped">
<p class="control">
<%= link "edit", to: Routes.task_path(@conn, :edit, @task.id), class: "button is-dark" %>
</p>
<p class="control">
<%= link "delete", to: Routes.task_path(@conn, :delete, @task.id), class: "button is-dark", method: :delete, data: [confirm: "are you sure?"] %>
</p>
</div>
</div>

View file

@ -1,19 +0,0 @@
<div>
<div class="is-pulled-left">
<%= link(to: Routes.task_path(@conn, :update, @task.id), method: :patch) do %>
<button type="button" role="checkbox" class="doit"></button>
<% end %>
</div>
<div class="ml-5-5">
<div class="value" onclick="location.href='<%= Routes.task_path(@conn, :show, @task.id) %>'">
<%= md_to_html(@task.value) %>
</div>
<%= if not is_nil(@task.due_at) do %>
<div class="tags mb-0">
<span class="tag">
due: <%= @task.due_at %>
</span>
</div>
<% end %>
</div>
</div>