-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into withdrawals-flow-v3
- Loading branch information
Showing
54 changed files
with
1,275 additions
and
600 deletions.
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
11 changes: 11 additions & 0 deletions
11
app/components/bulk_update/trainee_uploads/row/view.html.erb
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,11 @@ | ||
<tr class="govuk-table__row"> | ||
<td class="govuk-table__cell"> | ||
<%= submitted_at %> | ||
</td> | ||
<td class="govuk-table__cell"> | ||
<%= filename %> | ||
</td> | ||
<td class="govuk-table__cell"> | ||
<%= status %> | ||
</td> | ||
</tr> |
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,36 @@ | ||
# frozen_string_literal: true | ||
|
||
module BulkUpdate | ||
module TraineeUploads | ||
module Row | ||
class View < ViewComponent::Base | ||
COLOURS = { | ||
"pending" => "govuk-tag--light-blue", | ||
"validated" => "govuk-tag--turquoise", | ||
"in_progress" => "govuk-tag--blue", | ||
"succeeded" => "govuk-tag--green", | ||
"failed" => "govuk-tag--red", | ||
"cancelled" => "govuk-tag--yellow", | ||
}.freeze | ||
|
||
attr_reader :upload | ||
|
||
delegate :filename, to: :upload | ||
|
||
def initialize(upload:) | ||
@upload = upload | ||
end | ||
|
||
def status | ||
content_tag(:span, class: "govuk-tag #{COLOURS[upload.status]}") do | ||
upload.status.humanize | ||
end | ||
end | ||
|
||
def submitted_at | ||
upload.submitted_at&.to_fs(:govuk_date_and_time) | ||
end | ||
end | ||
end | ||
end | ||
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<%= govuk_notification_banner(title_text: "Important") do |banner| %> | ||
<% banner.with_heading(text: banner_heading_text) %> | ||
|
||
<%= govuk_link_to("Sign off your performance profile", "#")%> by the <%= deadline_date %> deadline. | ||
<%= govuk_link_to("Sign off your performance profile", performance_profiles_reports_path)%> by the <%= deadline_date %> deadline. | ||
<% 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
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
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
15 changes: 15 additions & 0 deletions
15
app/jobs/bulk_update/add_trainees/remove_cancelled_and_failed_job.rb
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 @@ | ||
# frozen_string_literal: true | ||
|
||
module BulkUpdate | ||
module AddTrainees | ||
class RemoveCancelledAndFailedJob < ApplicationJob | ||
queue_as :default | ||
|
||
def perform | ||
return unless FeatureService.enabled?(:bulk_add_trainees) | ||
|
||
RemoveUploads.call | ||
end | ||
end | ||
end | ||
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
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
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
Oops, something went wrong.