Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FFT-179 Add a link to go from Edit Payroll to Edit Forecast #618

Merged
merged 4 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions forecast/templates/forecast/edit/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@

{% block title %}Edit Forecast{% endblock %}

{% block page_heading %}
<div style="display: flex; align-items: baseline; gap: 2rem;">
{{ block.super }}
{% can_access_edit_payroll user as user_can_access_edit_payroll %}
{% if user_can_access_edit_payroll and settings.PAYROLL.ENABLE_FORECAST %}
<a class="govuk-link" href="{% url 'payroll:edit' view.cost_centre_details.cost_centre_code view.financial_year %}">Go to Payroll</a>
{% endif %}
</div>
{% endblock %}

{% block page_content %}
<div class="govuk-grid-row date-selection-download">

Expand Down
4 changes: 3 additions & 1 deletion forecast/templates/forecast/edit/forecast_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ <h2 class="govuk-notification-banner__title" id="govuk-notification-banner-title
</div>
</div>
{% endif %}
<h1 class="govuk-heading-l">{{ view.title }}</h1>
{% block page_heading %}
<h1 class="govuk-heading-l">{{ view.title }}</h1>
{% endblock page_heading %}
<a href="{% url 'forecast_cost_centre' view.cost_centre_details.cost_centre_code view.financial_year %}" target="_blank" class="govuk-heading-m cost-centre-heading-link">{{ view.cost_centre_details.cost_centre_name }} ({{ view.cost_centre_details.cost_centre_code }}) </a>
<dl class="govuk-summary-list">
<div class="govuk-summary-list__row">
Expand Down
8 changes: 8 additions & 0 deletions front_end/styles/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,14 @@ th {
font-size: 16px;
}

// Utility classes

.scrollable {
overflow-x: auto;
}

.flex-spread {
display: flex;
justify-content: space-between;
align-items: baseline;
}
8 changes: 7 additions & 1 deletion payroll/templates/payroll/page/edit_payroll.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@
{% endblock breadcrumbs %}

{% block content %}
<h1 class="govuk-heading-l">Edit payroll</h1>
<div class="flex-spread">
<h1 class="govuk-heading-l">Edit payroll</h1>
{# This assumes that a user with access to payroll also has access to forecast #}
{% if settings.PAYROLL.ENABLE_FORECAST %}
<a class="govuk-link" href="{% url 'edit_forecast' cost_centre_code financial_year %}">Go to Forecast</a>
{% endif %}
</div>

<div id="payroll-app"></div>

Expand Down
Loading