From 3051d02c9e5bd954f426b9436c8c18f093571680 Mon Sep 17 00:00:00 2001 From: DominikNoga Date: Mon, 17 Jun 2024 09:21:25 +0200 Subject: [PATCH 1/2] wip --- .../openlmis-unit-add.routes.js | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/openlmis-unit-add/openlmis-unit-add.routes.js b/src/openlmis-unit-add/openlmis-unit-add.routes.js index 99d7e4b..14a6e4d 100644 --- a/src/openlmis-unit-add/openlmis-unit-add.routes.js +++ b/src/openlmis-unit-add/openlmis-unit-add.routes.js @@ -32,6 +32,27 @@ url: '/addUnit' }); + modalStateProvider.state('openlmis.stockmanagement.receive.creation.unitAdd', { + controller: 'openlmisUnitAddController', + controllerAs: '$ctrl', + templateUrl: 'openlmis-unit-add/openlmis-unit-add.html', + url: '/addUnit' + }); + + modalStateProvider.state('openlmis.stockmanagement.issue.creation.unitAdd', { + controller: 'openlmisUnitAddController', + controllerAs: '$ctrl', + templateUrl: 'openlmis-unit-add/openlmis-unit-add.html', + url: '/addUnit' + }); + + modalStateProvider.state('openlmis.stockmanagement.kitunpack.creation.unitAdd', { + controller: 'openlmisUnitAddController', + controllerAs: '$ctrl', + templateUrl: 'openlmis-unit-add/openlmis-unit-add.html', + url: '/addUnit' + }); + modalStateProvider.state('openlmis.stockmanagement.physicalInventory.draft.unitAdd', { controller: 'openlmisUnitAddController', controllerAs: '$ctrl', From e6914812d84cc9457404938df437bdd90f53c1f6 Mon Sep 17 00:00:00 2001 From: DominikNoga Date: Mon, 17 Jun 2024 10:09:13 +0200 Subject: [PATCH 2/2] Removed unit creation from stock management views --- .../admin-orderable-edit.routes.js | 2 +- .../openlmis-unit-add.routes.js | 36 ------------------- .../adjustment-creation.controller.js | 4 --- .../adjustment-creation.html | 7 +--- .../messages_en.json | 1 - .../issue-creation.routes.js | 0 .../messages_en.json | 1 - .../physical-inventory-draft.html | 3 -- 8 files changed, 2 insertions(+), 52 deletions(-) rename {stock-issue-creation => src/stock-issue-creation}/issue-creation.routes.js (100%) diff --git a/src/admin-orderable-edit/admin-orderable-edit.routes.js b/src/admin-orderable-edit/admin-orderable-edit.routes.js index e670291..59ec3f8 100644 --- a/src/admin-orderable-edit/admin-orderable-edit.routes.js +++ b/src/admin-orderable-edit/admin-orderable-edit.routes.js @@ -161,7 +161,7 @@ $stateProvider .state('openlmis.administration.orderables.edit.unitAssignment', { - label: 'adminOrderableEdit.ftaps', + label: 'adminOrderableEdit.unitAssignment', url: '/unitAssignment', controller: 'OrderableEditUnitAssignmentController', templateUrl: 'admin-orderable-edit/orderable-edit-unit-assignment.html', diff --git a/src/openlmis-unit-add/openlmis-unit-add.routes.js b/src/openlmis-unit-add/openlmis-unit-add.routes.js index 14a6e4d..a020fd1 100644 --- a/src/openlmis-unit-add/openlmis-unit-add.routes.js +++ b/src/openlmis-unit-add/openlmis-unit-add.routes.js @@ -24,42 +24,6 @@ routes.$inject = ['modalStateProvider']; function routes(modalStateProvider) { - - modalStateProvider.state('openlmis.stockmanagement.adjustment.creation.unitAdd', { - controller: 'openlmisUnitAddController', - controllerAs: '$ctrl', - templateUrl: 'openlmis-unit-add/openlmis-unit-add.html', - url: '/addUnit' - }); - - modalStateProvider.state('openlmis.stockmanagement.receive.creation.unitAdd', { - controller: 'openlmisUnitAddController', - controllerAs: '$ctrl', - templateUrl: 'openlmis-unit-add/openlmis-unit-add.html', - url: '/addUnit' - }); - - modalStateProvider.state('openlmis.stockmanagement.issue.creation.unitAdd', { - controller: 'openlmisUnitAddController', - controllerAs: '$ctrl', - templateUrl: 'openlmis-unit-add/openlmis-unit-add.html', - url: '/addUnit' - }); - - modalStateProvider.state('openlmis.stockmanagement.kitunpack.creation.unitAdd', { - controller: 'openlmisUnitAddController', - controllerAs: '$ctrl', - templateUrl: 'openlmis-unit-add/openlmis-unit-add.html', - url: '/addUnit' - }); - - modalStateProvider.state('openlmis.stockmanagement.physicalInventory.draft.unitAdd', { - controller: 'openlmisUnitAddController', - controllerAs: '$ctrl', - templateUrl: 'openlmis-unit-add/openlmis-unit-add.html', - url: '/addUnit' - }); - modalStateProvider.state('openlmis.administration.orderables.unitAdd', { controller: 'openlmisUnitAddController', controllerAs: '$ctrl', diff --git a/src/stock-adjustment-creation/adjustment-creation.controller.js b/src/stock-adjustment-creation/adjustment-creation.controller.js index b992be9..3ab055d 100644 --- a/src/stock-adjustment-creation/adjustment-creation.controller.js +++ b/src/stock-adjustment-creation/adjustment-creation.controller.js @@ -1083,10 +1083,6 @@ return vm.hasPermissionToAddNewLot && lineItem.lot && lineItem.$isNewItem; }; - vm.addNewUnit = function() { - $state.go('openlmis.stockmanagement.adjustment.creation.unitAdd'); - }; - /** * @ngdoc method * @methodOf stock-adjustment-creation.controller:StockAdjustmentCreationController diff --git a/src/stock-adjustment-creation/adjustment-creation.html b/src/stock-adjustment-creation/adjustment-creation.html index 15bb1f3..c279902 100644 --- a/src/stock-adjustment-creation/adjustment-creation.html +++ b/src/stock-adjustment-creation/adjustment-creation.html @@ -59,11 +59,6 @@

-
- -
@@ -192,4 +187,4 @@

- \ No newline at end of file + diff --git a/src/stock-adjustment-creation/messages_en.json b/src/stock-adjustment-creation/messages_en.json index e2ffb1d..1d8b011 100644 --- a/src/stock-adjustment-creation/messages_en.json +++ b/src/stock-adjustment-creation/messages_en.json @@ -4,7 +4,6 @@ "adjustmentCreation.totalPrice": "Total Price", "adjustmentCreation.numberEqualOrGreaterThan0": "You must input number equal or greater than 0", "adjustmentCreation.totalCost": "Total Cost", - "adjustmentCreation.addNewUnit": "Create unit", "adjustmentCreation.addProduct": "Add product", "adjustmentCreation.unit": "Unit", "adjustmentCreation.itemQuantity": "Item quantity", diff --git a/stock-issue-creation/issue-creation.routes.js b/src/stock-issue-creation/issue-creation.routes.js similarity index 100% rename from stock-issue-creation/issue-creation.routes.js rename to src/stock-issue-creation/issue-creation.routes.js diff --git a/src/stock-physical-inventory-draft/messages_en.json b/src/stock-physical-inventory-draft/messages_en.json index 4d8b31f..4a8ad35 100644 --- a/src/stock-physical-inventory-draft/messages_en.json +++ b/src/stock-physical-inventory-draft/messages_en.json @@ -1,5 +1,4 @@ { - "stockPhysicalInventoryDraft.addUnit": "Create unit", "stockPhysicalInventoryDraft.quantity": "Quantity", "stockPhysicalInventoryDraft.unit": "Unit", "stockPhysicalInventoryDraft.packsQuantity": "Packs quantity", diff --git a/src/stock-physical-inventory-draft/physical-inventory-draft.html b/src/stock-physical-inventory-draft/physical-inventory-draft.html index d1f4c98..28a0fcf 100644 --- a/src/stock-physical-inventory-draft/physical-inventory-draft.html +++ b/src/stock-physical-inventory-draft/physical-inventory-draft.html @@ -46,9 +46,6 @@

-

{{vm.key('noProducts') | message}}