Initial implementation of projects, tasks and their basic actions #1

Open
KaungKaung wants to merge 24 commits from development into main
3 changed files with 19 additions and 2 deletions
Showing only changes of commit 910c1912e0 - Show all commits

View File

@@ -2,6 +2,11 @@
<ul>
<% @projects.each do |project| %>
<li><h3><%= project.project_name %></h3></li>
<li><h3><a href="<%= project_path(project) %>"><%= project.project_name %></a></h3></li>
<%= link_to "Destroy", project_path(project), data: {
turbo_method: :delete,
turbo_confirm: "Are you sure?"
} %>
<% end %>
</ul>

View File

@@ -4,11 +4,17 @@
<div>
<%= form.label :project_name %><br>
<%= form.text_field :project_name %>
<% @project.errors.full_messages_for(:project_name).each do |message| %>
<p><%= message %></p>
<% end %>
</div>
<div>
<%= form.label :description %><br>
<%= form.text_area :description %>
<% @project.errors.full_messages_for(:description).each do |message| %>
<p><%= message %></p>
<% end %>
</div>
<div>

View File

@@ -6,5 +6,11 @@
<li>
<%= task.title %> (<%= task.status %>)
</li>
<%= link_to "Destroy", project_task_path(@project, task), data: {
turbo_method: :delete,
turbo_confirm: "Are you sure?"
} %>
<% end %>
</ul>
</ul>
<%= link_to "Add Task", new_project_task_path(@project) %>