Skip to content

Commit

Permalink
fix(accomplished goals): remove the delete button (#327)
Browse files Browse the repository at this point in the history
  • Loading branch information
VladislavSokov committed Dec 13, 2023
1 parent e374230 commit 74a499e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 19 deletions.
13 changes: 2 additions & 11 deletions app/views/accounts/_accomplished_objective.html.slim
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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: '+')
7 changes: 1 addition & 6 deletions app/views/accounts/show.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,13 @@
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
tr
th
th
th
th

#desktop-goals.column.goals.box.m-2
.m-5
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion app/views/objectives/index.html.erb

This file was deleted.

2 changes: 1 addition & 1 deletion app/views/objectives/new.html.slim
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 74a499e

Please sign in to comment.