src/app/configurations/locations/lgas/index.html
<div class="panel panel-default">
<div class="panel-heading clearfix">
<div ng-include="'app/configurations/locations/menu.html'"></div>
</div>
<div class="panel-body">
<form role="form" class="form form-inline">
<div class="import clearfix">
<div class="form-group" ng-show="locationLgasCtrl.states.length > 0">
<label>select state</label>
<select
class="form-control"
ng-show="locationLgasCtrl.states.length > 0"
ng-model="locationLgasCtrl.state"
ng-change="locationLgasCtrl.getZones(locationLgasCtrl.state)">
<option ng-repeat="state in locationLgasCtrl.states track by $index" value="{{state}}">{{state.name}}</option>
</select>
</div>
<div class="form-group" ng-show="locationLgasCtrl.zones.length > 0">
<label>select zone</label>
<select class="form-control" ng-model="locationLgasCtrl.zone">
<option ng-repeat="zone in locationLgasCtrl.zones track by $index" value="{{zone}}">{{zone.name}}</option>
</select>
</div>
<div class="form-group">
<ng-csv-import
content="locationLgasCtrl.csv.content"
header="locationLgasCtrl.csv.header"
separator="locationLgasCtrl.csv.separator"
finished="locationLgasCtrl.finished(locationLgasCtrl.csv.result)"
result="locationLgasCtrl.csv.result">
</ng-csv-import>
</div>
<div class="form-group pull-right">
<button class="btn btn-lg "
ng-class="{'btn-success': locationLgasCtrl.csv.result.length > 0, 'btn-default': locationLgasCtrl.csv.result.length === 0}"
ng-click="locationLgasCtrl.save()"
ng-disabled="locationLgasCtrl.csv.result.length === 0">
<i class="fa "
ng-class="{'fa-check': locationLgasCtrl.csv.result.length > 0, 'fa-times': locationLgasCtrl.csv.result.length === 0}"></i>
Save
</button>
</div>
</div>
</form>
<div ng-if="locationLgasCtrl.csv.result.length > 0">
<table class="table table-bordered table-hover table-condensed">
<tr style="font-weight: bold">
<th style="">Name</th>
<th>Level</th>
<th style="">OSMID</th>
<th style="">Country</th>
<th style="">G/P Zone</th>
<th style="">State</th>
<th style="">Zone</th>
</tr>
<tr ng-repeat="location in locationLgasCtrl.csv.result track by $index">
<td>{{location.name}}</td>
<td ng-bind="location.level"></td>
<td ng-bind="location.osmId"></td>
<td ng-bind="location.admin_level_0"></td>
<td ng-bind="location.admin_level_1"></td>
<td ng-bind="location.admin_level_2"></td>
<td ng-bind="location.admin_level_3"></td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>