jac-uk / apply

Vue SPA to allow candidates to apply for judicial vacancies
https://apply.judicialappointments.digital
MIT License
4 stars 0 forks source link

Additional Working Prefs Topic Causes Bug In Apply #1166

Closed drieJAC closed 4 months ago

drieJAC commented 4 months ago

In Apply the topic of an additional working preference is used to get an id for an input but the topic is not a required field. If we fix it to use an empty string when a topic is not present then this causes a bug on the Apply review screen.

See AdditionalWorkingPreferences.vue in Apply:

getSelectionInputId(additionalWorkingPreference, index) {
      return `additional-working-preference-${getDataWelshId(additionalWorkingPreference.topic)}-${index}`;
    },

Also see FinalCheck.AdditionalWorkingPreferences.vue in Apply:

<ul class="govuk-list">
            <li :data-welsh="getDataWelsh(vacancy.additionalWorkingPreferences[index].topic, item.selection)">
              {{ item.selection }}
            </li>
          </ul>