-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First API specs Update Swagger Update Swagger
- Loading branch information
Showing
34 changed files
with
845 additions
and
97 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
52 changes: 0 additions & 52 deletions
52
app/controllers/api/v1/time_extension_requests_controller.rb
This file was deleted.
Oops, something went wrong.
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
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
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
12 changes: 12 additions & 0 deletions
12
app/views/api/v1/time_extension_validation_requests/_show.json.jbuilder
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,12 @@ | ||
# frozen_string_literal: true | ||
|
||
json.extract! time_extension_validation_request, | ||
:id, | ||
:state, | ||
:response_due, | ||
:proposed_expiry_date, | ||
:rejection_reason, | ||
:approved, | ||
:days_until_response_due, | ||
:cancel_reason, | ||
:cancelled_at |
5 changes: 5 additions & 0 deletions
5
app/views/api/v1/time_extension_validation_requests/index.json.jbuilder
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,5 @@ | ||
# frozen_string_literal: true | ||
|
||
json.data @time_extension_validation_requests.each do |time_extension_validation_request| | ||
json.partial! "show", time_extension_validation_request: | ||
end |
3 changes: 3 additions & 0 deletions
3
app/views/api/v1/time_extension_validation_requests/show.json.jbuilder
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,3 @@ | ||
# frozen_string_literal: true | ||
|
||
json.partial! "show", time_extension_validation_request: @time_extension_validation_request |
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
18 changes: 17 additions & 1 deletion
18
app/views/planning_applications/validation/time_extension_validation_requests/show.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 |
---|---|---|
@@ -1 +1,17 @@ | ||
<div>Hello</div> | ||
<% content_for :page_title do %> | ||
Time extension request - <%= t('page_title') %> | ||
<% end %> | ||
|
||
<% add_parent_breadcrumb_link "Home", root_path %> | ||
<% add_parent_breadcrumb_link "Application", planning_application_path(@planning_application) %> | ||
<% content_for :title, "Time extension request" %> | ||
|
||
<%= render( | ||
partial: "shared/proposal_header", | ||
locals: { heading: "Time extension request" } | ||
) %> | ||
|
||
<%= render( | ||
partial: "activity_log", | ||
locals: { validation_requests: @planning_application.time_extension_validation_requests } | ||
) %> |
54 changes: 54 additions & 0 deletions
54
app/views/planning_applications/validation/validation_requests/_activity_log.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,54 @@ | ||
<div class="activity-log govuk-!-margin-bottom-6"> | ||
<table class="govuk-table govuk-!-margin-bottom-0"> | ||
<caption class="govuk-table__caption govuk-table__caption--m">Activity log</caption> | ||
<tbody class="govuk-table__body"> | ||
<tr class="govuk-table__row"> | ||
<th scope="row" class="govuk-table__header">Completed actions</th> | ||
<td scope="row" class="govuk-table__header">Status</td> | ||
<td scope="row" class="govuk-table__header">User</td> | ||
<td scope="row" class="govuk-table__header">Date</td> | ||
</tr> | ||
<% if validation_requests.any? %> | ||
<% validation_requests.sort_by(&:created_at).reverse.each do |request| %> | ||
<% if request.cancel_reason.present? %> | ||
<tr class="govuk-table__row"> | ||
<td scope="row" class="govuk-table__cell">Request was cancelled</td> | ||
<td scope="row" class="govuk-table__cell">Cancelled</td> | ||
<td scope="row" class="govuk-table__cell"><%= request.user.name %></td> | ||
<td scope="row" class="govuk-table__cell"><%= request.cancelled_at.to_fs(:day_month_year_slashes) %></td> | ||
</tr> | ||
<% else %> | ||
<% if request.approved.nil? %> | ||
<tr class="govuk-table__row"> | ||
<td scope="row" class="govuk-table__cell">Applicant has not responded</td> | ||
<td scope="row" class="govuk-table__cell"> </td> | ||
<td scope="row" class="govuk-table__cell"> </td> | ||
<td scope="row" class="govuk-table__cell"> </td> | ||
</tr> | ||
<% else %> | ||
<tr class="govuk-table__row"> | ||
<td scope="row" class="govuk-table__cell"><%= request.approved? ? "Applicant accepts" : "Request rejected by applicant" %></td> | ||
<td class="govuk-table__cell"><%= request.approved? ? "Approved" : "Rejected" %></td> | ||
<td class="govuk-table__cell">Applicant</td> | ||
<td class="govuk-table__cell"><%= request.created_at.to_fs(:day_month_year_slashes) %></td> | ||
</tr> | ||
<% end %> | ||
<tr class="govuk-table__row"> | ||
<td scope="row" class="govuk-table__cell">Request an extension until <%= request.proposed_expiry_date.strftime("%-d %B %Y") %></td> | ||
<td class="govuk-table__cell">Sent</td> | ||
<td class="govuk-table__cell"><%= request.user.name %></td> | ||
<td class="govuk-table__cell"><%= request.created_at.to_fs(:day_month_year_slashes) %></td> | ||
</tr> | ||
<% end %> | ||
<% end %> | ||
<% else %> | ||
<tr class="govuk-table__row"> | ||
<td scope="row" class="govuk-table__cell">No time extension requests were made</td> | ||
<td scope="row" class="govuk-table__cell"> </td> | ||
<td scope="row" class="govuk-table__cell"> </td> | ||
<td scope="row" class="govuk-table__cell"> </td> | ||
</tr> | ||
<% end %> | ||
</tbody> | ||
</table> | ||
</div> |
Oops, something went wrong.