Skip to content

Commit

Permalink
fix(cash): hook up cashbox link
Browse files Browse the repository at this point in the history
This commit hooks up the "add a cashbox" to the correct state.

Closes #923.
  • Loading branch information
Jonathan Niles authored and sfount committed Nov 24, 2016
1 parent 733a57a commit 0d4d309
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
34 changes: 17 additions & 17 deletions client/src/partials/cash/cashboxes/cashboxes.routes.js
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
angular.module('bhima.routes')
.config(['$stateProvider', function ($stateProvider) {

$stateProvider
.state('cashboxes', {
abstract : true,
url : '/cashboxes',
controller : 'CashboxController as CashCtrl',
.state('cashboxes', {
abstract : true,
url : '/cashboxes',
controller : 'CashboxController as CashCtrl',
templateUrl : 'partials/cash/cashboxes/cashboxes.html'
})

.state('cashboxes.list', {
url : '',
.state('cashboxes.list', {
url : '',
templateUrl : 'partials/cash/cashboxes/cashboxes.list.html'
})

.state('cashboxes.create', {
.state('cashboxes.create', {
url : '/create',
templateUrl : 'partials/cash/cashboxes/update/add.html',
templateUrl : 'partials/cash/cashboxes/update/add.html',
controller : 'CashboxUpdateController as UpdateCtrl'
})

.state('cashboxes.edit', {
url : '/:uuid/edit',
params : {
url : '/:uuid/edit',
params : {
id : { squash : true, value : null }
},
},
templateUrl : 'partials/cash/cashboxes/update/edit.html',
controller : 'CashboxUpdateController as UpdateCtrl'
});

}]);

function addModal($modal) {
$modal.open({
function addModal($modal) {
$modal.open({
keyboard : false,
backdrop : 'static',
templateUrl : 'partials/cash/cashboxes/update/add.modal.html',
backdrop : 'static',
templateUrl : 'partials/cash/cashboxes/update/add.modal.html',
controller : 'CashboxUpdateController as UpdateCtrl'
});
}

function closeModal($uibModalStack) {
function closeModal($uibModalStack) {
$uibModalStack.dismissAll();
}
2 changes: 1 addition & 1 deletion client/src/partials/cash/modals/selectCashbox.modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<p class="text-info">
<i class="fa fa-question-circle-o"></i> {{ "CASH.VOUCHER.CASHBOXES.MISSING" | translate }}

<a href ui-sref="cashboxes">
<a href ui-sref="cashboxes.create">
<i class="fa fa-link"></i> {{ "CASH.VOUCHER.CASHBOXES.LINK" | translate }}
</a>
</p>
Expand Down

0 comments on commit 0d4d309

Please sign in to comment.