Skip to content

Commit

Permalink
Added success alerts
Browse files Browse the repository at this point in the history
Fixed searchtext
  • Loading branch information
leowyy committed Apr 14, 2017
1 parent 2d66eb9 commit 84ae401
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
13 changes: 5 additions & 8 deletions app-main/scripts/controllers/Donations.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,6 @@ angular.module('sbAdminApp')
return false;
};

$scope.txView = {};

$scope.viewTx = function(tx) {
$scope.txView = tx;
};

$interval(function() {
reloadData();
}, 3000)
Expand All @@ -93,13 +87,16 @@ angular.module('sbAdminApp')
$scope.closeCompleteAlert = function(index) {
$scope.completeAlert = false;
};

$scope.agree = function(uuid) {
$scope.txName = "null";
console.log($scope.txName);
$scope.agree = function(uuid, item) {
txService.agree(uuid, function(response) {
console.log("Agree sent");
$scope.reloaded = false;
$scope.completeAlert = true;
})
$scope.txName = item;
console.log(item);
reloadData();
};

Expand Down
3 changes: 2 additions & 1 deletion app-main/views/dashboard/Donations.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ <h1 class="page-header"><i class="fa fa-group fa-fw"></i><em><strong>Donations</
</div>
</div>
<div uib-alert ng-if="txAlert" class="alert-success" close="closeTxAlert()" dismiss-on-timeout="10000">New Donation Created for {{txDetails}}.</div>
<div uib-alert ng-if="completeAlert" class="alert-success" close="closeCompleteAlert()" dismiss-on-timeout="10000">Donation Confirmed for {{txName}}.</div>

<div class="alert alert-info">
Current Balance: <em>{{ balance| currency }}</em>
Expand Down Expand Up @@ -50,7 +51,7 @@ <h1 class="page-header"><i class="fa fa-group fa-fw"></i><em><strong>Donations</

<td ng-if="x.pending" align="center" style="padding:0"><img src="t3.gif" alt="Loading" style="max-height: 36px; max-width: 36px"/></td>
<td ng-if="!x.pending && !x.agreeing" align="center"><button type="button" class="btn btn-default disabled btn-xs" style="width: 100px">No matches yet</button></td>
<td ng-if="!x.pending && x.agreeing" align="center"><button ng-click="agree(x.uuid)" type="button" class="btn btn-success btn-xs" style="width: 100px" >Confirm</button></td>
<td ng-if="!x.pending && x.agreeing" align="center"><button ng-click="agree(x.uuid, x.item)" type="button" class="btn btn-success btn-xs" style="width: 100px" >Confirm</button></td>
</tr>
</tbody>
</table>
Expand Down
4 changes: 2 additions & 2 deletions app-main/views/dashboard/Market.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ <h1 class="page-header"><i class="fa fa-shopping-cart fa-fw"></i><em><strong>Mar
Current Balance: <em>{{ balance| currency }}</em>
</div>
<div class="col-lg-12">
<input type="text" ng-model="searchText.storename" placeholder="Search by Store name" />
<input type="text" ng-model="searchText.product" placeholder="Search by Product" />
<input type="text" ng-model="searchText.sender.name" placeholder="Search by Store name" />
<input type="text" ng-model="searchText.item" placeholder="Search by Product" />
</div>
<br><br>

Expand Down

0 comments on commit 84ae401

Please sign in to comment.