<commit_before>﻿@using SFA.DAS.ProviderApprenticeshipsService.Web.Extensions
@using SFA.DAS.ProviderApprenticeshipsService.Web.Models
@using SFA.DAS.ProviderApprenticeshipsService.Web.Models.DataLock
@model ApprenticeshipDetailsViewModel

@{
    ViewBag.Title = "Apprentice detail";
    ViewBag.PageId = "apprentices-detail";
}

<div class="grid-row list-apprentice">
    <div class="column-two-thirds">
        <h1 class="heading-xlarge">@Model.FirstName @Model.LastName</h1>
        
        @if (Model.PendingChanges == PendingChanges.ReadyForApproval)
            {
            <div class="purple-border">
                <p>There are changes to this apprentice's details that you need to review.</p>
                <a href="@Url.RouteUrl("ReviewApprovedApprenticeChange")" aria-label="Review changes" class="">Review changes</a>
            </div>
        }
        else if (Model.PendingChanges == PendingChanges.WaitingForEmployer)
        {
            <div class="purple-border">
                <p>
                    There are changes to this apprentice's details that are waiting for approval by the employer.
                </p>
                <a href="@Url.RouteUrl("UndoApprovedApprenticeChange")" aria-label="View changes" class="">View changes</a>                
            </div>
        }

        @if (Model.DataLockSummaryViewModel.ShowChangesRequested)
        {
            <div class="purple-border blue-alerts">
                <h2 class="heading-medium">
                    Changes requested
                </h2>
                    <p>
                        You've sent an automated message to the employer asking them to stop
                        this apprentice and create a new record for them.
                    </p>
</div>
        }
        
        @if (Model.DataLockSummaryViewModel.ShowChangesPending)
        {
            <div class="purple-border blue-alerts">
                <h2 class="heading-medium">
                    Changes pending
                </h2>
                    <p>
                        There are changes to this apprentice's details that are waiting for approval by the employer.
                    </p>
</div>
        }
        
        @if (Model.DataLockSummaryViewModel.ShowIlrDataMismatch)
        {
            <div class="purple-border blue-alerts">
                <h2 class="heading-medium">
                    ILR data mismatch
                </h2>
                <p>
                    This apprentice's details are different in your organisation's ILR submission.
                    This may result in a payment failure.
                </p>

                @{
                    if (Model.PendingChanges == PendingChanges.None)
                    {
                        if (Model.DataLockSummaryViewModel.ShowCourseDataLockTriageLink && Model.DataLockSummaryViewModel.ShowPriceDataLockTriageLink)
                        {
                            <a href="@Url.RouteUrl("UpdateDataLock")" aria-label="View details" class="">View price mismatch</a>
                            <br/><commit_msg>Fixes link visibility logic (#264)<commit_after>﻿@using SFA.DAS.ProviderApprenticeshipsService.Web.Extensions
@using SFA.DAS.ProviderApprenticeshipsService.Web.Models
@using SFA.DAS.ProviderApprenticeshipsService.Web.Models.DataLock
@model ApprenticeshipDetailsViewModel

@{
    ViewBag.Title = "Apprentice detail";
    ViewBag.PageId = "apprentices-detail";
}

<div class="grid-row list-apprentice">
    <div class="column-two-thirds">
        <h1 class="heading-xlarge">@Model.FirstName @Model.LastName</h1>
        
        @if (Model.PendingChanges == PendingChanges.ReadyForApproval)
            {
            <div class="purple-border">
                <p>There are changes to this apprentice's details that you need to review.</p>
                <a href="@Url.RouteUrl("ReviewApprovedApprenticeChange")" aria-label="Review changes" class="">Review changes</a>
            </div>
        }
        else if (Model.PendingChanges == PendingChanges.WaitingForEmployer)
        {
            <div class="purple-border">
                <p>
                    There are changes to this apprentice's details that are waiting for approval by the employer.
                </p>
                <a href="@Url.RouteUrl("UndoApprovedApprenticeChange")" aria-label="View changes" class="">View changes</a>                
            </div>
        }

        @if (Model.DataLockSummaryViewModel.ShowChangesRequested)
        {
            <div class="purple-border blue-alerts">
                <h2 class="heading-medium">
                    Changes requested
                </h2>
                    <p>
                        You've sent an automated message to the employer asking them to stop
                        this apprentice and create a new record for them.
                    </p>
</div>
        }
        
        @if (Model.DataLockSummaryViewModel.ShowChangesPending)
        {
            <div class="purple-border blue-alerts">
                <h2 class="heading-medium">
                    Changes pending
                </h2>
                    <p>
                        There are changes to this apprentice's details that are waiting for approval by the employer.
                    </p>
</div>
        }
        
        @if (Model.DataLockSummaryViewModel.ShowIlrDataMismatch)
        {
            <div class="purple-border blue-alerts">
                <h2 class="heading-medium">
                    ILR data mismatch
                </h2>
                <p>
                    This apprentice's details are different in your organisation's ILR submission.
                    This may result in a payment failure.
                </p>

                @{
                    if (Model.PendingChanges == PendingChanges.None && !Model.DataLockSummaryViewModel.ShowChangesPending && !Model.DataLockSummaryViewModel.ShowChangesRequested)
                    {
                        if (Model.DataLockSummaryViewModel.ShowCourseDataLockTriageLink && Model.DataLockSummaryViewModel.ShowPriceDataLockTriageLink)
                        {
                            <a href="@Url.RouteUrl("UpdateDataLock")" aria-label="View details" class="">View price mismatch</a>
                            <br/>
{'fraction_non_alphanumeric': 0.09426811937470393, 'fraction_numerical': 0.003000157903047529, 'mean_word_length': 1.6557651991614255, 'pattern_counts': {'":': 0, '<': 75, '<?xml version=': 0, '>': 75, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3320346', 'n_tokens_mistral': 1690, 'n_tokens_neox': 1562, 'n_words': 367}