src/app/planning/delivery-round/index.html
<div class="panel panel-default">
<div class="panel-heading">
<button class="btn btn-success btn-lg" ng-click="crCtrl.open()">
<i class="fa fa-plus"></i>
<span>Add Delivery Round</span>
</button>
</div>
<div class="panel-body">
<div class="panel-body alert alert-info" ng-show="crCtrl.deliveryRounds.length === 0">
<i class="fa fa-lg fa-info-circle"></i><span> No delivery rounds found.</span>
</div>
<table ng-show="crCtrl.deliveryRounds.length > 0" class="table table-condensed table-striped">
<thead>
<tr>
<th>State</th>
<th>Code</th>
<th>Status</th>
<th>Start</th>
<th>End</th>
<th>Created On</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="round in crCtrl.deliveryRounds track by $index">
<td ng-bind="round.state"></td>
<td ng-bind="round.roundCode"></td>
<td ng-bind="round.status"></td>
<td ng-bind="round.startDate | date:'d-MMM-yyyy'"></td>
<td ng-bind="round.endDate | date:'d-MMM-yyyy'"></td>
<td ng-bind="round.createdOn | date: 'yyyy-MM-dd HH:mm:ss'"></td>
<td>
<span class="btn-group">
<button class="btn btn-default" ng-click="crCtrl.open(round._id)">
<i class="fa fa-pencil-square-o"></i>
<span>Edit</span>
</button>
<button class="btn btn-info" ui-sref="planning.schedule({ roundId: round._id})">
<i class="fa fa-calendar"></i>
<span>Schedule</span>
</button>
<button class="btn btn-primary" ui-sref="planning.allocation({ roundId: round._id})"
ng-disabled="round.status ==='Planning'">
<i class="fa fa-pie-chart"></i>
<span>Allocation</span>
</button>
<button class="btn btn-warning"
ui-sref="planning.returnRoute({ roundId: round._id})"
ng-disabled="round.status ==='Planning'">
<i class="fa fa-truck"></i>
<span>Return Route</span>
</button>
<button class="btn btn-danger"
ui-sref="planning.kpi({ roundId: round._id})"
ng-disabled="round.status ==='Planning'">
<i class="fa fa-file-text"></i>
<span>KPI</span>
</button>
</span>
<button class="btn btn-success"
ng-if="round.status ==='Ready'"
ng-click="crCtrl.completePlanning(round)">
<i class="fa fa-bell"></i>
<span>Activate and Send Alert</span>
</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>