diff --git a/src/order-view/messages_en.json b/src/order-view/messages_en.json index f40ec9e..eb98bb4 100644 --- a/src/order-view/messages_en.json +++ b/src/order-view/messages_en.json @@ -1,4 +1,4 @@ { "orderView.view": "View details", - "orderView.isRequisitionless": "Requisitionless" + "orderView.requisitionless": "Requisitionless" } \ No newline at end of file diff --git a/src/order-view/order-view.controller.js b/src/order-view/order-view.controller.js index 3fd4a6b..c34f492 100644 --- a/src/order-view/order-view.controller.js +++ b/src/order-view/order-view.controller.js @@ -150,6 +150,17 @@ */ vm.tableConfig = undefined; + /** + * @ngdoc property + * @propertyOf order-view.controller:OrderViewController + * @name requisitionless + * @type {boolean} + * + * @description + * Sets requisitionless flag + */ + vm.requisitionless = undefined; + /** * @ngdoc method * @methodOf order-view.controller:OrderViewController @@ -195,6 +206,10 @@ vm.periodEndDate = $stateParams.periodEndDate; } + if ($stateParams.requisitionless) { + vm.requisitionless = $stateParams.requisitionless; + } + if ($stateParams.status) { vm.status = vm.orderStatuses.filter(function(status) { return $stateParams.status === status.value; @@ -236,6 +251,7 @@ stateParams.periodStartDate = vm.periodStartDate ? $filter('isoDate')(vm.periodStartDate) : null; stateParams.periodEndDate = vm.periodEndDate ? $filter('isoDate')(vm.periodEndDate) : null; stateParams.sort = 'createdDate,desc'; + stateParams.requisitionless = vm.requisitionless; $state.go('openlmis.orders.view', stateParams, { reload: true diff --git a/src/order-view/order-view.html b/src/order-view/order-view.html index 8ce62dc..9d1c618 100644 --- a/src/order-view/order-view.html +++ b/src/order-view/order-view.html @@ -20,10 +20,12 @@

{{'orderView.viewOrders' | message}}

- - +
+ + +
- + \ No newline at end of file