CaffGeek/MBACNationals

View on GitHub
Web.Admin/AdminApp/Views/ScoreEntry/Result.html

Summary

Maintainability
Test Coverage
<button type="button" class="back btn btn-lg" data-ng-click="Back()">Back</button>

<h2>Match Result</h2>

<h4 class="col-xs-9">{{model.AwayProvince}} {{model.Away.Name}}</h4>
<h4 class="col-xs-3">{{model.Away.TotalPoints}}</h4>
<table class="table table-bordered table-striped">
    <tbody data-ng-repeat="bowler in model.Away.Bowlers | orderBy:'1*Position' | filter:{ ReplacedBy: '!'}">
        <tr>
            <td class="col-xs-5">{{bowler.Name}}</td>
            <td class="col-xs-1 text-right" data-ng-if="model.IsPOA">{{bowler.Average}}</td>
            <td class="col-xs-2 text-right">{{bowler.Score}}</td>
            <td class="col-xs-2 text-right" data-ng-if="model.IsPOA">{{bowler.POA}}</td>
            <td class="col-xs-2 text-right">{{bowler.Point}}</td>
        </tr>
    </tbody>
    <tbody data-ng-if="model.IsTeam">
        <tr>
            <td class="col-xs-5">Total</td>
            <td class="col-xs-1 text-right" data-ng-if="model.IsPOA"></td>
            <td class="col-xs-2 text-right">{{model.Away.Score}}</td>
            <td class="col-xs-2 text-right" data-ng-if="model.IsPOA">{{model.Away.POA}}</td>
            <td class="col-xs-2 text-right">{{model.Away.Point}}</td>
        </tr>
    </tbody>
</table>

<h4 class="col-xs-9">{{model.HomeProvince}} {{model.Home.Name}}</h4>
<h4 class="col-xs-3">{{model.Home.TotalPoints}}</h4>
<table class="table table-bordered table-striped">
    <tbody data-ng-repeat="bowler in model.Home.Bowlers | orderBy:'1*Position' | filter:{ ReplacedBy: '!'}">
        <tr>
            <td class="col-xs-5">{{bowler.Name}}</td>
            <td class="col-xs-1 text-right" data-ng-if="model.IsPOA">{{bowler.Average}}</td>
            <td class="col-xs-2 text-right">{{bowler.Score}}</td>
            <td class="col-xs-2 text-right" data-ng-if="model.IsPOA">{{bowler.POA}}</td>
            <td class="col-xs-2 text-right">{{bowler.Point}}</td>
        </tr>
    </tbody>
    <tbody data-ng-if="model.IsTeam">
        <tr>
            <td class="col-xs-5">Total</td>
            <td class="col-xs-1 text-right" data-ng-if="model.IsPOA"></td>
            <td class="col-xs-2 text-right">{{model.Home.Score}}</td>
            <td class="col-xs-2 text-right" data-ng-if="model.IsPOA">{{model.Home.POA}}</td>
            <td class="col-xs-2 text-right">{{model.Home.Point}}</td>
        </tr>
    </tbody>
</table>

<button type="button" class="btn btn-lg btn-block btn-primary" data-ng-click="Page('Submit')">Save</button>