-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added partial files and corrected before acgtion
- Loading branch information
1 parent
6422aba
commit 3fcee7e
Showing
8 changed files
with
297 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<div class="col-md-12 col-xl-8 col-12"> | ||
<div class="row"> | ||
<div class="col-12 mb-4"> | ||
<div class="card"> | ||
<div class="card-header"> | ||
<div class="d-flex justify-content-between align-items-center"> | ||
<div> | ||
<h4 class="mb-0">Summary</h4> | ||
</div> | ||
<!-- dropdown --> | ||
<div> | ||
<span class="dropdown dropstart"> | ||
<a class="btn-icon btn btn-ghost btn-sm rounded-circle" href="#" role="button" id="DropdownTen" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | ||
<i class="fe fe-more-vertical"></i> | ||
</a> | ||
<span class="dropdown-menu" aria-labelledby="DropdownTen"> | ||
<span class="dropdown-header">Settings</span> | ||
<%= link_to t('general.edit'), edit_pet_path(@pet), class: 'dropdown-item' %> | ||
<%= link_to t('general.delete'), pet_path(@pet), class: 'dropdown-item', | ||
data: | ||
{ | ||
turbo_method: :delete, | ||
turbo_confirm: t('organization_pets.show.are_you_sure_delete') | ||
} %> | ||
</span> | ||
</span> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<%= form_with(model: [@pet, @task], local: true) do |form| %> | ||
<div class="form-group"> | ||
<%= form.label :name %> | ||
<%= form.text_field :name, class: 'form-control', placeholder: 'Enter task name' %> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<%= form.label :description %> | ||
<%= form.text_area :description, class: 'form-control', placeholder: 'Enter task description' %> | ||
</div> | ||
|
||
<div class="actions"> | ||
<%= form.submit 'Update Task', class: 'btn btn-primary' %> | ||
</div> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<div class="col-md-12 col-xl-8 col-12"> | ||
<div class="row"> | ||
<div class="col-12 mb-4"> | ||
<div class="card"> | ||
<div class="card-header"> | ||
<div class="d-flex justify-content-between align-items-center"> | ||
<div> | ||
<h4 class="mb-0">Summary</h4> | ||
</div> | ||
<!-- dropdown --> | ||
<div> | ||
<span class="dropdown dropstart"> | ||
<a class="btn-icon btn btn-ghost btn-sm rounded-circle" href="#" role="button" id="DropdownTen" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | ||
<i class="fe fe-more-vertical"></i> | ||
</a> | ||
<span class="dropdown-menu" aria-labelledby="DropdownTen"> | ||
<span class="dropdown-header">Settings</span> | ||
<%= link_to t('general.edit'), edit_pet_path(@pet), class: 'dropdown-item' %> | ||
<%= link_to t('general.delete'), pet_path(@pet), class: 'dropdown-item', | ||
data: | ||
{ | ||
turbo_method: :delete, | ||
turbo_confirm: t('organization_pets.show.are_you_sure_delete') | ||
} %> | ||
</span> | ||
</span> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<div class="col-md-12 col-xl-8 col-12"> | ||
<div class="card"> | ||
<div class="card-header"> | ||
<h4 class="mb-0">Add New Task?????????</h4> | ||
</div> | ||
<div class="card-body"> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
<div class="col-md-12 col-xl-8 col-12"> | ||
<div class="row"> | ||
<div class="col-12 mb-4"> | ||
<div class="card"> | ||
<div class="card-header"> | ||
<div class="d-flex justify-content-between | ||
align-items-center"> | ||
<div> | ||
<h4 class="mb-0">Summary</h4> | ||
</div> | ||
<!-- dropdown --> | ||
<div> | ||
<span class="dropdown dropstart"> | ||
<a class="btn-icon btn btn-ghost btn-sm rounded-circle" href="#" role="button" id="DropdownTen" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | ||
<i class="fe fe-more-vertical"></i> | ||
</a> | ||
<span class="dropdown-menu" aria-labelledby="DropdownTen"> | ||
<span class="dropdown-header">Settings</span> | ||
<%= link_to t('general.edit'), edit_pet_path(@pet), class: 'dropdown-item' %> | ||
<%= link_to t('general.delete'), pet_path(@pet), class: 'dropdown-item', | ||
data: | ||
{ | ||
turbo_method: :delete, | ||
turbo_confirm: t('organization_pets.show.are_you_sure_delete') | ||
} %> | ||
</span> | ||
</span> | ||
</div> | ||
</div> | ||
|
||
|
||
</div> | ||
<div class="card-body"> | ||
<p><%= @pet.description %> </p> | ||
|
||
<ul class="list-group list-group-flush"> | ||
<li class="list-group-item px-0"> | ||
<div class="d-flex justify-content-between | ||
align-items-center"> | ||
<div class="d-flex align-items-center"> | ||
<i class="fe fe-book me-2"></i> | ||
<div class="ms-2"> | ||
<h5 class="mb-0 text-body">Sex</h5> | ||
</div> | ||
</div> | ||
<div> | ||
<div> | ||
<p class="text-dark mb-0 fw-semibold"><%= @pet.sex %></p> | ||
</div> | ||
</div> | ||
</div> | ||
</li> | ||
<li class="list-group-item px-0"> | ||
<div class="d-flex justify-content-between | ||
align-items-center"> | ||
<div class="d-flex align-items-center"> | ||
<i class="fe fe-book me-2"></i> | ||
<div class="ms-2"> | ||
<h5 class="mb-0 text-body">Breed</h5> | ||
</div> | ||
</div> | ||
<div> | ||
<div> | ||
<p class="text-dark mb-0 fw-semibold"><%= @pet.breed %></p> | ||
</div> | ||
</div> | ||
</div> | ||
</li> | ||
<li class="list-group-item px-0"> | ||
<div class="d-flex justify-content-between | ||
align-items-center"> | ||
<div class="d-flex align-items-center"> | ||
<i class="fe fe-book me-2"></i> | ||
<div class="ms-2"> | ||
<h5 class="mb-0 text-body">Weight</h5> | ||
</div> | ||
</div> | ||
<div> | ||
<div> | ||
<p class="text-dark mb-0 fw-semibold"><%= "#{@pet.weight_from} - #{@pet.weight_to} #{@pet.weight_unit}" %></p> | ||
</div> | ||
</div> | ||
</div> | ||
</li> | ||
<li class="list-group-item px-0 pb-0"> | ||
<div class="d-flex | ||
justify-content-between | ||
align-items-center"> | ||
<div class="d-flex | ||
align-items-center"> | ||
<i class="fe fe-book me-2"></i> | ||
<div class="ms-2"> | ||
<h5 class="mb-0 text-body">Application Status</h5> | ||
</div> | ||
</div> | ||
<div> | ||
<div> | ||
<p class="text-dark mb-0 fw-semibold"> | ||
<%= @pet.application_paused == false ? t('.application.active') : t('.application.paused') %> | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
</li> | ||
|
||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<div class="col-md-12 col-xl-8 col-12"> | ||
<div class="row"> | ||
<div class="col-12 mb-4"> | ||
<div class="card"> | ||
<div class="card-header"> | ||
<div class="d-flex justify-content-between align-items-center"> | ||
<div> | ||
<h4 class="mb-0">Summary</h4> | ||
</div> | ||
<!-- dropdown --> | ||
<div> | ||
<span class="dropdown dropstart"> | ||
<a class="btn-icon btn btn-ghost btn-sm rounded-circle" href="#" role="button" id="DropdownTen" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | ||
<i class="fe fe-more-vertical"></i> | ||
</a> | ||
<span class="dropdown-menu" aria-labelledby="DropdownTen"> | ||
<span class="dropdown-header">Settings</span> | ||
<%= link_to t('general.edit'), edit_pet_path(@pet), class: 'dropdown-item' %> | ||
<%= link_to t('general.delete'), pet_path(@pet), class: 'dropdown-item', | ||
data: { | ||
turbo_method: :delete, | ||
turbo_confirm: t('organization_pets.show.are_you_sure_delete') | ||
} %> | ||
</span> | ||
</span> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="card-body"> | ||
<h5>Tasks</h5> <!-- Task header --> | ||
|
||
<ul class="list-group list-group-flush"> | ||
<% @pet.tasks.each do |task| %> | ||
<li class="list-group-item px-0"> | ||
<div class="d-flex justify-content-between align-items-center"> | ||
<div class="d-flex align-items-center"> | ||
<i class="fe fe-check-square me-2"></i> <!-- A generic icon for tasks; change as needed --> | ||
<div class="ms-2"> | ||
<h6 class="mb-0 text-body"><%= task.name %></h6> <!-- Task title --> | ||
</div> | ||
</div> | ||
<div class="d-flex align-items-center"> | ||
<p class="text-dark mb-0 fw-semibold mr-3"> | ||
<%= task.completed? ? "Completed" : "Pending" %> <!-- Task status --> | ||
</p> | ||
<%= link_to 'Edit', edit_pet_task_path(@pet, task), class: 'btn btn-warning mr-4' %> | ||
<%= link_to 'Delete', pet_task_path(@pet, task), class: 'btn btn-danger', data: { turbo_method: "delete", turbo_confirm: 'Are you sure?' } %> | ||
</div> | ||
</div> | ||
</li> | ||
<% end %> | ||
|
||
</ul> | ||
<button type="button" class="add-new-task-button btn btn-primary" data-bs-toggle="modal" data-bs-target="#newTaskModal">Add New Task</button> | ||
<div class="modal" tabindex="-1" id="newTaskModal"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<h5 class="modal-title" id="taskModalTitle">New Task</h5> | ||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> | ||
</div> | ||
<div class="modal-body"> | ||
<%= render 'nice_partials/new_task_form', pet: @pet, task: @pet.tasks.build %> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<h1>Edit Task!!</h1> | ||
|
||
|
||
<%= form_with(model: [@pet, @task], local: true) do |form| %> | ||
<div class="form-group"> | ||
<%= form.label :name, class: 'form-label' %> | ||
<%= form.text_field :name, class: 'form-control', placeholder: 'Enter task name' %> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<%= form.label :description, class: 'form-label' %> | ||
<%= form.text_area :description, class: 'form-control', placeholder: 'Enter task description' %> | ||
</div> | ||
|
||
<%= form.submit 'Update Task', class: 'btn btn-primary' %> | ||
<% end %> | ||
|
||
<%= link_to 'Back to Task List', pet_path(@pet), class: 'btn btn-secondary' %> |