Court cases and release dates sub navigation

The court cases and release dates product suite is linked together by a shared, tab based sub navigation.

This component maintains consistency of tab names, ordering and where they link to across the product set.

Contents

<nav class="moj-sub-navigation" aria-label="Court cases and release dates sub navigation">
    
      <ul class="moj-sub-navigation__list">
          <li class="moj-sub-navigation__item">
            <a class="moj-sub-navigation__link" aria-current="page" href="#overview">Overview</a>
          </li>
        
          <li class="moj-sub-navigation__item">
            <a class="moj-sub-navigation__link"  href="#adjustments">Adjustments</a>
          </li>
        
          <li class="moj-sub-navigation__item">
            <a class="moj-sub-navigation__link"  href="#release-dates">Release dates and calculations</a>
          </li>
        
          <li class="moj-sub-navigation__item">
            <a class="moj-sub-navigation__link"  href="#recalls">Recalls</a>
          </li>
        </ul>
    
    </nav>
{% from "hmpps/components/court-cases-release-dates/sub-navigation/macro.njk" import subNavigation %}
    
    {# selects which set of environment specific service urls to use by default #}
    {# one of; 'local', 'dev', 'pre' or 'prod' #}
    {% set environment = 'dev' %}
    
    {# activeSubNav selects which tab is highlighted as active #}
    {# it is required and should be one of; 'overview', 'court-cases', 'adjustments', 'release-dates' or 'documents' #}
    {# all the other properties are optional and support overriding the environment specific service urls and removing tabs #}
    {# currently court cases and document pages are not released to live so make sure these tabs are set to enabled false #}
    {% set navigation = {
        activeSubNav: 'overview',
        overview: {
            href: '',
            enabled: true
        },
        courtCases: {
            href: '',
            enabled: false
        },
        adjustments: {
            href: '',
            enabled: true
        },
        releaseDates: {
            href: '',
            enabled: true
        },
        recalls: {
            href: '',
            enabled: true
        },
        documents: {
            href: '',
            enabled: false
        }
    } %}
    
    {% set prisonNumber = 'A1234BC' %}
    
    {{ subNavigation(environment, navigation, prisonNumber) }}