From 74a499e75e1d5677e65fec6b5f2acb79bd351964 Mon Sep 17 00:00:00 2001 From: Vladislav Sokov <62177364+VladislavSokov@users.noreply.github.com> Date: Thu, 14 Dec 2023 00:53:59 +0300 Subject: [PATCH] fix(accomplished goals): remove the delete button (#327) --- .../accounts/_accomplished_objective.html.slim | 13 ++----------- app/views/accounts/show.html.slim | 7 +------ app/views/objectives/index.html.erb | 1 - app/views/objectives/new.html.slim | 2 +- 4 files changed, 4 insertions(+), 19 deletions(-) delete mode 100644 app/views/objectives/index.html.erb diff --git a/app/views/accounts/_accomplished_objective.html.slim b/app/views/accounts/_accomplished_objective.html.slim index 715504fb..0e778390 100644 --- a/app/views/accounts/_accomplished_objective.html.slim +++ b/app/views/accounts/_accomplished_objective.html.slim @@ -1,9 +1,9 @@ / desktop tr.for-desktop - td.is-vcentered + td.is-vcentered style="width: 4rem" figure.image.is-48x48 img src=asset_path("wizard_goal.svg") - td.is-vcentered style="max-width: 120px" + td.is-vcentered p.is-black-budgeting-kid-color = accomplished_objective.name p.has-text-light-gray-budgeting-kid-color @@ -12,11 +12,6 @@ tr.for-desktop .has-text-centered p.pt-2.is-black-budgeting-kid-color | #{ accomplished_objective.accomplished_at.strftime('%b %d, %y') } - td - = link_to objective_path(accomplished_objective), method: :delete, data: {confirm: 'Delete this objective?'}, class: 'button is-white has-text-weight-bold has-text-budgeting-kid-color' do - figure.image.is-16x16.is-budgeting-kid-light-color - = image_tag('delete.svg', alt: '+') - |   Delete / mobile tr.for-mobile @@ -31,7 +26,3 @@ tr.for-mobile .mb-1 p.pt-2.is-black-budgeting-kid-color | #{ accomplished_objective.accomplished_at.strftime('%b %d, %y') } - td.is-vcentered.pr-0 - = link_to objective_path(accomplished_objective), method: :delete, data: {confirm: 'Delete this objective?'}, class: 'button is-white has-text-weight-bold has-text-budgeting-kid-color' do - figure.image.is-20x20.is-budgeting-kid-light-color - = image_tag('delete.svg', alt: '+') diff --git a/app/views/accounts/show.html.slim b/app/views/accounts/show.html.slim index 667d5fab..2a9a9dbe 100644 --- a/app/views/accounts/show.html.slim +++ b/app/views/accounts/show.html.slim @@ -135,7 +135,6 @@ th th.has-text-light-gray-budgeting-kid-color Goal th.has-text-centered.has-text-light-gray-budgeting-kid-color Accomplished at - th.has-text-centered.has-text-light-gray-budgeting-kid-color Action tbody = render partial: 'accomplished_objective', collection: accomplished_objectives, account: account tfoot @@ -143,7 +142,6 @@ th th th - th #desktop-goals.column.goals.box.m-2 .m-5 @@ -229,16 +227,13 @@ thead tr.has-text-left th.has-text-centered.has-text-light-gray-budgeting-kid-color Goal - th.has-text-light-gray-budgeting-kid-color Accomplished - th.pr-0.has-text-light-gray-budgeting-kid-color Action + th.has-text-centered.has-text-light-gray-budgeting-kid-color Accomplished at tbody = render partial: 'accomplished_objective', collection: accomplished_objectives, account: account tfoot tr th th - th - th #mobile-goals.column.box div .columns.is-mobile.mb-0.is-align-items-center diff --git a/app/views/objectives/index.html.erb b/app/views/objectives/index.html.erb deleted file mode 100644 index 8b137891..00000000 --- a/app/views/objectives/index.html.erb +++ /dev/null @@ -1 +0,0 @@ - diff --git a/app/views/objectives/new.html.slim b/app/views/objectives/new.html.slim index 20e9abb9..4e5b2cc3 100644 --- a/app/views/objectives/new.html.slim +++ b/app/views/objectives/new.html.slim @@ -1,6 +1,6 @@ .columns.is-centered .column.is-one-third - h2.title.is-4.has-text-centered Add new objective + h2.title.is-4.has-text-centered Add new goal = form_with url:account_objectives_path(account), method: :post do |f| .field = f.text_field :name, autofocus: true, class: "input", placeholder: "Name", required: true