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="http://localhost:8000/prisoner/AB1234AB/overview">Overview</a>
          </li>
        
          <li class="moj-sub-navigation__item">
            <a class="moj-sub-navigation__link"  href="http://localhost:8001/person/AB1234AB">Court cases</a>
          </li>
        
          <li class="moj-sub-navigation__item">
            <a class="moj-sub-navigation__link"  href="http://localhost:8002/AB1234AB">Adjustments
    <span id="notifications" class="moj-notification-badge">1</span>
    </a>
          </li>
        
          <li class="moj-sub-navigation__item">
            <a class="moj-sub-navigation__link"  href="http://localhost:8003/person/AB1234AB">Recalls</a>
          </li>
        
          <li class="moj-sub-navigation__item">
            <a class="moj-sub-navigation__link"  href="http://localhost:8004?prisonId=AB1234AB">Release dates and calculations</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 activeSubNav = 'overview' %}
    
    {# 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 = {
          overview: {
            href: 'http://localhost:8000/prisoner/AB1234AB/overview',
            text: 'Overview',
            thingsToDo: {
              count: 0,
              things: []
            }
          },
          courtCases: {
            href: 'http://localhost:8001/person/AB1234AB',
            text: 'Court cases',
            thingsToDo: {
              count: 0,
              things: []
            }
          },
          adjustments: {
            href: 'http://localhost:8002/AB1234AB',
            text: 'Adjustments',
            thingsToDo: {
              count: 1,
              things: []
            }
          },
          recalls: {
            href: 'http://localhost:8003/person/AB1234AB',
            text: 'Recalls',
            thingsToDo: {
              count: 0,
              things: []
            }
          },
          releaseDates: {
            href: 'http://localhost:8004?prisonId=AB1234AB',
            text: 'Release dates and calculations',
            thingsToDo: {
              count: 0,
              things: []
            }
          }
        } %}
    
                {{ subNavigation(navigation, activeSubNav) }}