From eda04734ded9ea53c210e3ca12f8ec591e4c2ce2 Mon Sep 17 00:00:00 2001 From: DominikNoga Date: Wed, 8 May 2024 11:21:55 +0200 Subject: [PATCH 1/4] wip --- src/order-view/order-view.routes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/order-view/order-view.routes.js b/src/order-view/order-view.routes.js index 167d682..b3d38ae 100644 --- a/src/order-view/order-view.routes.js +++ b/src/order-view/order-view.routes.js @@ -32,7 +32,7 @@ showInNavigation: true, templateUrl: 'order-view/order-view.html', url: '/view?supplyingFacilityId&requestingFacilityId&programId&periodStartDate&periodEndDate&page&size' + - '&status&sort', + '&status&sort&requisitionless', accessRights: [ FULFILLMENT_RIGHTS.PODS_MANAGE, FULFILLMENT_RIGHTS.ORDERS_VIEW From 1f34ec4797453c33eb6cae891be3d602ff20b987 Mon Sep 17 00:00:00 2001 From: DominikNoga Date: Wed, 8 May 2024 14:41:51 +0200 Subject: [PATCH 2/4] Wip --- src/order-view/messages_en.json | 3 +- src/order-view/order-view.controller.js | 1 + src/order-view/order-view.html | 51 ++++++++++++------------- 3 files changed, 27 insertions(+), 28 deletions(-) diff --git a/src/order-view/messages_en.json b/src/order-view/messages_en.json index 261d8cb..f40ec9e 100644 --- a/src/order-view/messages_en.json +++ b/src/order-view/messages_en.json @@ -1,3 +1,4 @@ { - "orderView.view": "View details" + "orderView.view": "View details", + "orderView.isRequisitionless": "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 5f77d27..3fd4a6b 100644 --- a/src/order-view/order-view.controller.js +++ b/src/order-view/order-view.controller.js @@ -408,6 +408,7 @@ { header: 'orderView.lastUpdated', propertyPath: 'lastUpdatedDate', + sortable: false, template: function(item) { return item.lastUpdatedDate ? $filter('openlmisDate')(item.lastUpdatedDate) : ''; diff --git a/src/order-view/order-view.html b/src/order-view/order-view.html index 2ba92dc..8ce62dc 100644 --- a/src/order-view/order-view.html +++ b/src/order-view/order-view.html @@ -1,32 +1,29 @@

{{'orderView.viewOrders' | message}}

-
- - - - - - - - - - - -
- - +
+ + + + + + + + + + + + + +
+ +
From 5e45926896caf9557a758247868e63ff11f2b3d9 Mon Sep 17 00:00:00 2001 From: DominikNoga Date: Fri, 10 May 2024 12:31:16 +0200 Subject: [PATCH 3/4] Added requisitionless orders filtering --- src/order-view/messages_en.json | 2 +- src/order-view/order-view.controller.js | 16 ++++++++++++++++ src/order-view/order-view.html | 8 +++++--- 3 files changed, 22 insertions(+), 4 deletions(-) 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 From 3d249f510b8fd7610ecee59fed632d7cc77160b3 Mon Sep 17 00:00:00 2001 From: DominikNoga Date: Tue, 14 May 2024 15:10:30 +0200 Subject: [PATCH 4/4] Removed not needed x button from modal --- src/react-components/modals/_modal.scss | 10 ---------- .../order-create-summary-modal.jsx | 4 ---- 2 files changed, 14 deletions(-) diff --git a/src/react-components/modals/_modal.scss b/src/react-components/modals/_modal.scss index 5dc55a0..c3b895b 100644 --- a/src/react-components/modals/_modal.scss +++ b/src/react-components/modals/_modal.scss @@ -19,16 +19,6 @@ $padding-value: 1rem; font-size: $font-size-h3; font-weight: $headings-font-weight; } - - .modal-close-button { - color: red; - @include icon-only('times'); - font-size: $font-size-h3; - &:hover { - cursor: pointer; - color: darken(red, 10%); - } - } } .react-modal-body { diff --git a/src/requisition-order-create/order-create-summary-modal.jsx b/src/requisition-order-create/order-create-summary-modal.jsx index 70213f9..0854e1a 100644 --- a/src/requisition-order-create/order-create-summary-modal.jsx +++ b/src/requisition-order-create/order-create-summary-modal.jsx @@ -16,10 +16,6 @@ const OrderCreateSummaryModal = ({ isOpen, orders, onSaveClick, onModalClose }) <>
Orders Summary - onModalClose()} - >