<div>
    <h1>OCA: {{data.task.title}}</h1>

    <div class="task-overview">
        <table class="task-overview-details">
            <tbody>
            <tr>
                <td class="task-overview-details-description" translate>Effective date: </td>
                <td class="task-overview-details-data">{{data.task.dataDate | date:'yyyy-MM-dd'}}</td>
            </tr>
            <tr>
                <td class="task-overview-details-description" translate>Current status: </td>
                <td class="task-overview-details-data">{{data.task.status | translate }}</td>
            </tr>
            <tr>
                <td class="task-overview-details-description" translate>Assigned to: </td>
                <td class="task-overview-details-data">{{data.task.assigned_to | userIdToName}}</td>
            </tr>
            <tr>
                <td class="task-overview-details-description" translate>Created at: </td>
                <td class="task-overview-details-data">{{data.task.created_at | date:'yyyy-MM-dd HH:mm:ss'}}</td>
            </tr>
            <tr>
                <td class="task-overview-details-description" translate>Last modified at: </td>
                <td class="task-overview-details-data">{{data.task.last_modified_at | date:'yyyy-MM-dd HH:mm:ss'}}</td>
            </tr>
            <tr>
                <td class="task-overview-details-description" translate>Last modified by: </td>
                <td class="task-overview-details-data">{{data.task.last_modified_by | userIdToName}}</td>
            </tr>

            </tbody>
        </table>

        <table class="task-overview-workflow-changes">
            <thead>
            <tr>
                <th translate>Date</th>
                <th translate>New Status</th>
                <th translate>Set by...</th>
            </tr>
            </thead>

            <tbody>
            <tr ng-repeat="workflow in data.task.workflowChanges track by workflow.change_at">
                <td>{{workflow.change_at | date:'yyyy-MM-dd HH:mm:ss'}}</td>
                <td>{{workflow.status | translate }}</td>
                <td>{{workflow.change_by | userIdToName}}</td>
            </tr>
            </tbody>
        </table>
    </div>


    <hr>


    <table class="printGrid">
        <thead>
            <tr>
                <th ng-repeat="col in ::data.headerRow track by $index">{{::col}}</th>
            </tr>
        </thead>

        <tbody>
            <tr ng-repeat="row in ::data.content track by $index">
                <td ng-repeat="col in ::row track by $index">{{::col}}</td>
            </tr>
        </tbody>
    </table>


    <hr>

    <div ng-repeat="form in data.auditForms track by form.id"
         ng-init="sourceData = form.sourceData; resultsData = form.resultsData">
        <h2>[{{$index+1}}] {{form.formDef.title}}</h2>

        <div class="audit-form-content" ng-include="form.formDef.formUrl"></div>

        <hr>
    </div>
</div>