-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ANGOLASUP-938: Enabled report configuration from the UI level
- Loading branch information
1 parent
fb506ab
commit 6e2fb17
Showing
7 changed files
with
120 additions
and
10 deletions.
There are no files selected for viewing
Empty file.
34 changes: 34 additions & 0 deletions
34
src/openlmis-home-page-report/home-page-report.component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* This program is part of the OpenLMIS logistics management information system platform software. | ||
* Copyright © 2017 VillageReach | ||
* | ||
* This program is free software: you can redistribute it and/or modify it under the terms | ||
* of the GNU Affero General Public License as published by the Free Software Foundation, either | ||
* version 3 of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; | ||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
* See the GNU Affero General Public License for more details. You should have received a copy of | ||
* the GNU Affero General Public License along with this program. If not, see | ||
* http://www.gnu.org/licenses. For additional information contact [email protected]. | ||
*/ | ||
|
||
(function() { | ||
|
||
'use strict'; | ||
|
||
/** | ||
* @ngdoc component | ||
* @name Module.component:Component | ||
* | ||
* @description | ||
* Component responsible for displaying home page embedded report | ||
*/ | ||
angular | ||
.module('openlmis-home-page-report') | ||
.component('openlmisHomePageReport', { | ||
templateUrl: 'openlmis-home-page-report/home-page-report.html', | ||
controller: 'OpenlmisHomePageReportController', | ||
controllerAs: 'vm' | ||
}); | ||
})(); |
46 changes: 46 additions & 0 deletions
46
src/openlmis-home-page-report/home-page-report.controller.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* This program is part of the OpenLMIS logistics management information system platform software. | ||
* Copyright © 2017 VillageReach | ||
* | ||
* This program is free software: you can redistribute it and/or modify it under the terms | ||
* of the GNU Affero General Public License as published by the Free Software Foundation, either | ||
* version 3 of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; | ||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
* See the GNU Affero General Public License for more details. You should have received a copy of | ||
* the GNU Affero General Public License along with this program. If not, see | ||
* http://www.gnu.org/licenses. For additional information contact [email protected]. | ||
*/ | ||
|
||
(function() { | ||
|
||
'use strict'; | ||
|
||
/** | ||
* @ngdoc controller | ||
* @name Module.controller:OpenlmisHomePageReportController * | ||
* @description | ||
* Manages the openlmis-home-page-report component | ||
*/ | ||
angular | ||
.module('openlmis-home-page-report') | ||
.controller('OpenlmisHomePageReportController', OpenlmisHomePageReportController); | ||
|
||
OpenlmisHomePageReportController.$inject = ['reportEmbeddedService', '$sce']; | ||
|
||
function OpenlmisHomePageReportController(reportEmbeddedService, $sce) { | ||
var vm = this; | ||
var DASHBOARD_REPORT_URL = '4a1ac90e-ebe2-450d-893b-2fe968712bb1'; | ||
vm.report = undefined; | ||
vm.$onInit = onInit; | ||
|
||
function onInit() { | ||
reportEmbeddedService.get(DASHBOARD_REPORT_URL).then(function(report) { | ||
vm.report = report; | ||
var trustedUrl = $sce.trustAsResourceUrl(vm.report.url); | ||
vm.report.url = trustedUrl; | ||
}); | ||
} | ||
} | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<iframe | ||
title="expiring_stock_summary_report" | ||
style="width: 95vw; height: 90vh" | ||
src="{{ vm.report.url }}" | ||
frameborder="0" | ||
scrolling="auto" | ||
allowFullScreen="true"> | ||
</iframe> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* This program is part of the OpenLMIS logistics management information system platform software. | ||
* Copyright © 2017 VillageReach | ||
* | ||
* This program is free software: you can redistribute it and/or modify it under the terms | ||
* of the GNU Affero General Public License as published by the Free Software Foundation, either | ||
* version 3 of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; | ||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
* See the GNU Affero General Public License for more details. You should have received a copy of | ||
* the GNU Affero General Public License along with this program. If not, see | ||
* http://www.gnu.org/licenses. For additional information contact [email protected]. | ||
*/ | ||
|
||
(function() { | ||
|
||
'use strict'; | ||
|
||
/** | ||
* @module openlmis-home-page-report | ||
* | ||
* @description | ||
* Responsible for displaying embedded home page report | ||
*/ | ||
angular.module('openlmis-home-page-report', [ | ||
'report-embedded' | ||
]); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters