Skip to content

Commit

Permalink
Release 162
Browse files Browse the repository at this point in the history
  • Loading branch information
rgarner committed Jan 20, 2025
2 parents 12a6df6 + a6d477a commit 413351b
Show file tree
Hide file tree
Showing 19 changed files with 142 additions and 88 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

[Full changelog][unreleased]

## Release 162 – 2025-01-20

[Full changelog][162]

- Fixed: users list view shows correct organisation after admin user has
switched organisation

## Release 161 - 2025-01-14

[Full changelog][161]
Expand Down Expand Up @@ -1773,7 +1780,8 @@
- Planned start and end dates are mandatory
- Actual start and end dates must not be in the future

[unreleased]: https://github.com/UKGovernmentBEIS/beis-report-official-development-assistance/compare/release-161...HEAD
[unreleased]: https://github.com/UKGovernmentBEIS/beis-report-official-development-assistance/compare/release-162...HEAD
[162]: https://github.com/UKGovernmentBEIS/beis-report-official-development-assistance/compare/release-161...release-162
[161]: https://github.com/UKGovernmentBEIS/beis-report-official-development-assistance/compare/release-160...release-161
[160]: https://github.com/UKGovernmentBEIS/beis-report-official-development-assistance/compare/release-159...release-160
[159]: https://github.com/UKGovernmentBEIS/beis-report-official-development-assistance/compare/release-158...release-159
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ COPY .ruby-version ${DEPS_HOME}/.ruby-version
COPY Gemfile ${DEPS_HOME}/Gemfile
COPY Gemfile.lock ${DEPS_HOME}/Gemfile.lock

RUN gem update --system 3.3.5
RUN gem update --system 3.6.2
RUN gem update rake 13.0.6
RUN gem install bundler -v 2.3.9
RUN gem install bundler -v 2.4.22

RUN bundle config set frozen 'true'

Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ gem "aws-sdk-s3", "~> 1.177"
gem "bootsnap", ">= 1.1.0", require: false
gem "cssbundling-rails", "~> 1.4"
gem "csv-safe"
gem "govuk_design_system_formbuilder", "~> 4.1.1"
gem "govuk_design_system_formbuilder", "~> 5.8.0"
gem "haml-rails"
gem "high_voltage"
gem "ipaddr"
Expand Down
30 changes: 15 additions & 15 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ GEM
dotenv (= 3.1.7)
railties (>= 6.1)
encryptor (3.0.0)
erubi (1.13.0)
erubi (1.13.1)
erubis (2.7.0)
factory_bot (6.5.0)
activesupport (>= 5.0.0)
Expand All @@ -183,7 +183,7 @@ GEM
foreman (0.88.1)
globalid (1.2.1)
activesupport (>= 6.1)
govuk_design_system_formbuilder (4.1.1)
govuk_design_system_formbuilder (5.8.0)
actionview (>= 6.1)
activemodel (>= 6.1)
activesupport (>= 6.1)
Expand Down Expand Up @@ -228,7 +228,7 @@ GEM
jmespath (1.6.2)
jsbundling-rails (1.3.1)
railties (>= 6.0.0)
json (2.9.0)
json (2.9.1)
jwt (2.9.3)
base64
language_server-protocol (3.17.0.3)
Expand All @@ -249,7 +249,7 @@ GEM
activesupport (>= 4)
railties (>= 4)
request_store (~> 1.0)
loofah (2.23.1)
loofah (2.24.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.8.1)
Expand Down Expand Up @@ -291,14 +291,14 @@ GEM
net-smtp (0.5.0)
net-protocol
nio4r (2.7.4)
nokogiri (1.17.2)
nokogiri (1.18.1)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.17.2-arm64-darwin)
nokogiri (1.18.1-arm64-darwin)
racc (~> 1.4)
nokogiri (1.17.2-x86_64-darwin)
nokogiri (1.18.1-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.17.2-x86_64-linux)
nokogiri (1.18.1-x86_64-linux-gnu)
racc (~> 1.4)
notifications-ruby-client (6.2.0)
jwt (>= 1.5, < 3)
Expand Down Expand Up @@ -393,7 +393,7 @@ GEM
redis-store (>= 1.2, < 2)
redis-store (1.11.0)
redis (>= 4, < 6)
regexp_parser (2.9.3)
regexp_parser (2.10.0)
reline (0.5.11)
io-console (~> 0.5)
request_store (1.5.1)
Expand Down Expand Up @@ -430,7 +430,7 @@ GEM
rspec-mocks (~> 3.13)
rspec-support (~> 3.13)
rspec-support (3.13.2)
rubocop (1.69.1)
rubocop (1.70.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
Expand All @@ -440,9 +440,9 @@ GEM
rubocop-ast (>= 1.36.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.36.2)
rubocop-ast (1.37.0)
parser (>= 3.3.1.0)
rubocop-performance (1.23.0)
rubocop-performance (1.23.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (1.13.0)
Expand Down Expand Up @@ -492,10 +492,10 @@ GEM
actionpack (>= 6.1)
activesupport (>= 6.1)
sprockets (>= 3.0.0)
standard (1.43.0)
standard (1.44.0)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.69.1)
rubocop (~> 1.70.0)
standard-custom (~> 1.0.0)
standard-performance (~> 1.6)
standard-custom (1.0.2)
Expand Down Expand Up @@ -569,7 +569,7 @@ DEPENDENCIES
faker
fakeredis
foreman
govuk_design_system_formbuilder (~> 4.1.1)
govuk_design_system_formbuilder (~> 5.8.0)
haml-rails
high_voltage
html2haml
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/activities_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ class ActivitiesController < BaseController
after_action :skip_policy_scope, only: [:index, :historic]
skip_before_action :clear_breadcrumb_context, only: [:show]

helper_method :current_tab

def index
@organisation = Organisation.find(organisation_id)

Expand Down
7 changes: 4 additions & 3 deletions app/services/activity/tab.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ def initialize(activity:, current_user:, tab_name: "financials")
end

def locals
instance_variables.map { |attribute|
[attribute, instance_variable_get(attribute)]
}.to_h
instance_variables.each_with_object({}) do |attr, hash|
key = attr.to_s.delete_prefix("@").to_sym
hash[key] = instance_variable_get(attr)
end
end

def template
Expand Down
22 changes: 11 additions & 11 deletions app/views/activities/children.html.haml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
= content_for :page_title_prefix, t("document_title.activity.children", name: @activity.title)
= content_for :page_title_prefix, t("document_title.activity.children", name: activity.title)

%main.govuk-main-wrapper#main-content{ role: "main" }
.govuk-grid-row
.govuk-grid-column-full
%h1.govuk-heading-xl
= @activity.title
= activity.title

- unless @activity.fund?
- unless activity.fund?
.govuk-grid-row
.govuk-grid-column-full
= render partial: "shared/activities/activity_summary", locals: { activity_presenter: @activity }
= render partial: "shared/activities/activity_summary", locals: { activity_presenter: activity }

= render partial: "download_as_xml", locals: { activity: @activity }
= render partial: "download_as_xml", locals: { activity: }

.govuk-grid-row
.govuk-grid-column-full
Expand All @@ -22,11 +22,11 @@
%h2.govuk-heading-l
= t("page_title.activity.children")

- if @activity.fund? && policy(:fund).create?
= render partial: "shared/activities/programmes", locals: { activity: @activity, activities: @activities }
- if activity.fund? && policy(:fund).create?
= render partial: "shared/activities/programmes", locals: { activity:, activities: }

- if @activity.programme?
= render partial: "shared/activities/projects", locals: { activity: @activity, activities: @activities }
- if activity.programme?
= render partial: "shared/activities/projects", locals: { activity:, activities: }

- if @activity.project?
= render partial: "shared/activities/third_party_projects", locals: { activity: @activity, activities: @activities }
- if activity.project?
= render partial: "shared/activities/third_party_projects", locals: { activity:, activities: }
16 changes: 8 additions & 8 deletions app/views/activities/comments.html.haml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
= content_for :page_title_prefix, t("document_title.activity.comments", name: @activity.title)
= content_for :page_title_prefix, t("document_title.activity.comments", name: activity.title)

%main.govuk-main-wrapper#main-content{ role: "main" }
.govuk-grid-row
.govuk-grid-column-full
%h1.govuk-heading-xl
= @activity.title
= activity.title

- unless @activity.fund?
- unless activity.fund?
.govuk-grid-row
.govuk-grid-column-full
= render partial: "shared/activities/activity_summary", locals: { activity_presenter: @activity }
= render partial: "shared/activities/activity_summary", locals: { activity_presenter: activity }

.govuk-grid-row
.govuk-grid-column-full
Expand All @@ -22,16 +22,16 @@

.govuk-body
= t("page_content.comment.index.default")
- if @activity.is_project?
- if activity.is_project?
= tag(:br)
= t("page_content.comment.index.only_when_reportable")

- if show_link_to_add_comment?(activity: @activity, report: @report)
- if show_link_to_add_comment?(activity:, report:)
.govuk-body
= link_to t("page_content.comment.add"), new_activity_comment_path(@activity, report_id: @report&.id), class: "govuk-button"
= link_to t("page_content.comment.add"), new_activity_comment_path(activity, report_id: report&.id), class: "govuk-button"

%ul.govuk-list.activity_comments
- @comments.each do |comment|
- comments.each do |comment|
%li{id: "comment_#{comment.id}"}
%dl.govuk-summary-list
.govuk-summary-list__row
Expand Down
8 changes: 4 additions & 4 deletions app/views/activities/details.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
- unless @activity.fund?
.govuk-grid-row
.govuk-grid-column-full
= render partial: "shared/activities/activity_summary", locals: { activity_presenter: @activity }
= render partial: "shared/activities/activity_summary", locals: { activity_presenter: activity }

= render partial: "download_as_xml", locals: { activity: @activity }
= render partial: "download_as_xml", locals: { activity: activity }

.govuk-grid-row
.govuk-grid-column-full
Expand All @@ -22,7 +22,7 @@
%h2.govuk-heading-l
= t("page_title.activity.details")

= render partial: "shared/activities/activity", locals: { activity_presenter: @activity }
= render partial: "shared/activities/activity", locals: { activity_presenter: activity }

- if @activity.project? || @activity.third_party_project?
= render partial: "shared/activities/implementing_organisations", locals: { activity: @activity, implementing_organisations: @implementing_organisation_presenters }
= render partial: "shared/activities/implementing_organisations", locals: { activity: activity, implementing_organisations: implementing_organisation_presenters }
30 changes: 15 additions & 15 deletions app/views/activities/financials.html.haml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
= content_for :page_title_prefix, t("document_title.activity.financials", name: @activity.title)
= content_for :page_title_prefix, t("document_title.activity.financials", name: activity.title)

%main.govuk-main-wrapper#main-content{ role: "main" }
.govuk-grid-row
.govuk-grid-column-full
%h1.govuk-heading-xl
= @activity.title
= activity.title

- unless @activity.fund?
- unless activity.fund?
.govuk-grid-row
.govuk-grid-column-full
= render partial: "shared/activities/activity_summary", locals: { activity_presenter: @activity }
= render partial: "shared/activities/activity_summary", locals: { activity_presenter: activity }

= render partial: "download_as_xml", locals: { activity: @activity }
= render partial: "download_as_xml", locals: { activity: activity }

.govuk-grid-row
.govuk-grid-column-full
Expand All @@ -31,34 +31,34 @@
%dt.govuk-summary-list__key
Total budget to date
%dd.govuk-summary-list__value
= @activity.total_budget
= activity.total_budget
.govuk-summary-list__row
%dt.govuk-summary-list__key
Total spend to date
%dd.govuk-summary-list__value
= @activity.total_spend
= activity.total_spend
.govuk-summary-list__row
%dt.govuk-summary-list__key
Total forecasted spend
%dd.govuk-summary-list__value
= @activity.total_forecasted
= activity.total_forecasted

- if @commitment.present?
= render partial: "shared/commitment/table",
locals: { commitment: @commitment }

- if @activity.fund? && policy(:fund).create?
- if activity.fund? && policy(:fund).create?
= render partial: "shared/activities/budgets",
locals: { activity: @activity, budget_presenters: @budget_presenters }
locals: { activity:, budget_presenters: }

- else
= render partial: "shared/activities/budgets",
locals: { activity: @activity, budget_presenters: @budget_presenters }
locals: { activity:, budget_presenters: }
= render partial: "shared/activities/forecasts",
locals: { activity: @activity, forecasts: @forecast_presenters }
locals: { activity:, forecasts: }
= render partial: "shared/activities/actuals",
locals: { activity: @activity, actual_presenters: @actual_presenters }
locals: { activity:, actual_presenters: }
= render partial: "shared/activities/refunds",
locals: { activity: @activity, refund_presenters: @refund_presenters }
locals: { activity:, refund_presenters: }
= render partial: "shared/activities/adjustments",
locals: { activity: @activity, adjustment_presenters: @adjustment_presenters }
locals: { activity:, adjustment_presenters: }
8 changes: 4 additions & 4 deletions app/views/activities/historical_events.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
.govuk-grid-row
.govuk-grid-column-full
%h1.govuk-heading-xl
= @activity.title
= activity.title

- unless @activity.fund?
- unless activity.fund?
.govuk-grid-row
.govuk-grid-column-full
= render partial: "shared/activities/activity_summary", locals: { activity_presenter: @activity }
= render partial: "shared/activities/activity_summary", locals: { activity_presenter: activity }

.govuk-grid-row
.govuk-grid-column-full
Expand All @@ -24,7 +24,7 @@
= t("page_content.tab_content.change_history.guidance")

%ul.historical-events
- @historical_events.each do |group, events|
- historical_events.each do |group, events|
%li.historical-event-group.govuk-inset-text
%dl.govuk-summary-list.govuk-summary-list--no-border
.govuk-summary-list__row
Expand Down
Loading

0 comments on commit 413351b

Please sign in to comment.