<commit_before><div class="content-header">
   <div class="action-container content-header-extra">
        <a tooltip="back" tooltip-placement="bottom" class="action-btn action-btn-primary action-btn-md" ui-sref="facilities_approve" ui-sref-opts="{reload:true}"><i class="fa fa-arrow-left"></i></a>
   </div>
   <h2 class="content-title">
       <span class="main-title"><i class="fa fa-check"></i> Approve Facility</span>
   </h2>
</div>
<div class="col-xs-12">
    <div class="col-xs-12 content-card margin-t-20" ng-class="{'alert-success':facility.is_approved}">
        <div ng-if="!facility.is_approved">
            <h4>Approve newly created facility</h4>
            <form name="frm_approve">
                <div class="form-group">
                    <label for="comment">Comment for approval</label>
                    <textarea name="comment" ng-model="facility_approval.comment" class="form-control" required>
                    </textarea>
                </div>
                <button class="btn btn-success" ng-click="approveFacility()">Approve Facility</button>
                <button class="btn btn-danger" ng-click="approveFacility(true)">Reject Facility</button>
            </form>
        </div>
        <div ng-if="facility.is_approved">
            <span class="fs-16">Facility has already been approved</span>
        </div>
    </div>

    <div class="detail-content pad-20" ng-class="{'alert-success':!facility.latest_update}">
        <div ng-if="facility.latest_update && facility.is_approved" class="content-card">
            <h4 class="fs-18"><strong>Approve facility updates</strong></h4>
            <div class="row">
                <div class="col-sm-6">
                    <p class="form-control-static fs-16">Updates made by: <span class="label label-warning">{{facility_update.created_by_name}}</span></p>
                </div>
                <div class="col-sm-6">
                    <p class="form-control-static text-right fs-16">Updates made on: <span class="label label-primary">{{facility_update.created | date}}</span></p>
                </div>
            </div>
            <hr>
            <table class=" margin-t-50 table">
                <thead>
                    <tr>
                        <th>Field</th>
                        <th>Old value</th>
                        <th>New value</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="change in facility_changes">
                        <td>{{change}}</td>
                        <td>{{facility[change]}}</td>
                        <td>{{facility_update.facility_updates[change]}}</td>
                    </tr>
                </tbody>
            </table>
        <div class="margin-t-20 margin-b-10">
            <button ng-click="approveUpdate(true)" class="login-btn login-btn-success">Approve Updates</button>
            <button ng-click="approveUpdate(false)" class="login-btn login-btn-danger">Decline Updates</button>
        </div>
        </div>
        <div ng-if="!facility.latest_update">
            <p>No facility updates pending approval</p>
        </div>
    </div>

</div><commit_msg>Checkpoint for adding facility details to approve view<commit_after><div class="content-header">
   <div class="action-container content-header-extra">
        <a tooltip="back" tooltip-placement="bottom" class="action-btn action-btn-primary action-btn-md" ui-sref="facilities_approve" ui-sref-opts="{reload:true}"><i class="fa fa-arrow-left"></i></a>
   </div>
   <h2 class="content-title">
       <span class="main-title"><i class="fa fa-check"></i> Approve Facility</span>
   </h2>
</div>
<div class="col-xs-12 margin-t-20">
    <div class="col-xs-12 content-card">
        <h4 class="fw-400"><a ui-sref="facilities.facility_edit">{{facility.code}} | {{facility.name | uppercase}}</a></h4>
        <div class="row">
            <div class="col-xs-12 margin-b-10 fs-16">
                <span>Facility Type: <strong>{{facility.facility_type_name}}</strong></span>
            </div>
            <div class="col-sm-6">
                <span>Regulation Status:
                    <span class="label label-warning" style="font-size: 13px">
                        {{facility.regulatory_status_name}}
                    </span>
                </span>
            </div>
            <div class="col-sm-6"><span class="pull-right">Operation Status: <span class="fs-14 label label-primary" style="font-size: 13px">{{facility.operation_status_name | titlecase}}</span></span></div>
       </div>
    </div>
</div>
<div class="col-xs-12">
    <div class="col-xs-12 content-card margin-t-20" ng-class="{'alert-success':facility.is_approved}">
        <div class="col-xs-12 margin-b-10" ng-if="!facility.is_approved">
            <h4 class>Approve newly created facility</h4>
            <form name="frm_approve">
                <div class="group margin-t-10">
                    <textarea name="comment" ng-model="facility_approval.comment" required rows="1">
                    </textarea>
                    <span class="highlight"></span>
                    <span class="bar"></span>
                    <label>
                        Comment for approval
                    </label>
                </div>
                <button class="login-btn login-btn-action" ng-click="approveFacility()">Approve Facility</button>
                <button class="login-btn login-btn-danger margin-l-5" ng-click="approveFacility(true)">Reject Facility</button>
            </form>
        </div>
        <div class="col-xs-12" ng-if="facility.is_approved">
            <span class="fs-16"><i class="fa fa-check"></i> Facility has already been approved</span>
        </div>
    </div>

    <div class="col-xs-12 margin-t-20" ng-class="{'alert-info':!facility.latest_update, 'detail-content' : facility.latest_update}">
        <div ng-if="facility.latest_update && facility.is_approved" class="content-card">
            <h4 class="fs-18"><strong>Approve facility updates</strong></h4>
            <div class="row">
                <div class="col-sm-6">
                    <p class="form-control-static fs-16">Updates made by: <span class="label label-warning">{{facility_update.created_by_name}}</span></p>
                </div>
                <div class="col-sm-6">
                    <p class="form-control-static text-right fs-16">Updates made on: <span class="label label-primary">{{facility_update.created | date}}</span></p>
                </div>
            </div>
            <hr>
            <table class=" margin-t-50 table">
                <thead>
                    <tr>
                        <th>Field</th>
                        <th>Old value</th>
                        <th>New value</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="change in facility_changes">
                        <td>{{change}}</td>
                        <td>{{facility[change]}}</td>
                        <td>{{facility_update.facility_updates[change]}}</td>
                    </tr>
                </tbody>
            </table>
        <div class="margin-t-20 margin-b-10">
            <button ng-click="approveUpdate(true)" class="login-btn login-btn-success">Approve Updates</button>
            <button ng-click="approveUpdate(false)" class="login-btn login-btn-danger">Decline Updates</button>
        </div>
        </div>
        <div ng-if="!facility.latest_update" class="col-xs-12">
            <p class="lead margin-t-10 margin-b-10"><i class="fa fa-info-circle"></i> No facility updates pending approval</p>
        </div>
    </div>

</div>
{'fraction_non_alphanumeric': 0.1637707468879668, 'fraction_numerical': 0.013355809128630705, 'mean_word_length': 1.9338151388360594, 'pattern_counts': {'":': 0, '<': 225, '<?xml version=': 0, '>': 225, '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': '4901271', 'n_tokens_mistral': 2389, 'n_tokens_neox': 2222, 'n_words': 407}