@byu-oit/vue-decision-processing-components 8.27.4 → 8.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/Report.vue +6 -0
- package/ReportList.vue +8 -6
- package/ReportViewer.vue +13 -1
- package/package.json +1 -1
- package/parsers/reports.js +6 -6
- package/vuexModules/ui/index.js +9 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [8.28.0](https://github.com/byu-oit/vue-decision-processing-components/compare/v8.27.4...v8.28.0) (2022-07-20)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* filter reports from new app svc based on institution -- WIP ([b64110a](https://github.com/byu-oit/vue-decision-processing-components/commit/b64110af2bef04c2185e3d96ee47aaf4aeda5339))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* make a spot for institution in the vuex store ([bbf1e45](https://github.com/byu-oit/vue-decision-processing-components/commit/bbf1e45aeaa78bd62250e1af018c488b9b7ccb97))
|
|
16
|
+
* reports in the new application service that are requested through a proxy call have a different url pattern ([d781980](https://github.com/byu-oit/vue-decision-processing-components/commit/d7819803dde7cc8ba4104355f8f54005be4a1126))
|
|
17
|
+
|
|
5
18
|
### [8.27.4](https://github.com/byu-oit/vue-decision-processing-components/compare/v8.27.3...v8.27.4) (2022-07-13)
|
|
6
19
|
|
|
7
20
|
|
package/Report.vue
CHANGED
|
@@ -169,6 +169,12 @@ export default {
|
|
|
169
169
|
if (this.metadata.parameters.includes('setById')) {
|
|
170
170
|
q.append('set_by_id', this.setById)
|
|
171
171
|
}
|
|
172
|
+
// appends institution if available to url search params
|
|
173
|
+
if(this.metadata.parameters.includes('institutions')) {
|
|
174
|
+
if(this.metadata.parameters.institutions.includes(state.institution))
|
|
175
|
+
q.append('institution', state.institution)
|
|
176
|
+
}
|
|
177
|
+
|
|
172
178
|
const url = this.baseUrl + '?' + q.toString()
|
|
173
179
|
const loadRequested = () => {
|
|
174
180
|
let promises = []
|
package/ReportList.vue
CHANGED
|
@@ -53,20 +53,22 @@ export default {
|
|
|
53
53
|
},
|
|
54
54
|
computed: {
|
|
55
55
|
...mapState({
|
|
56
|
-
reports: state => state.reports.list
|
|
56
|
+
reports: state => state.reports.list,
|
|
57
|
+
institution: state => state.ui.institution
|
|
57
58
|
}),
|
|
58
59
|
categories () {
|
|
59
|
-
|
|
60
|
+
let reports = this.reports
|
|
61
|
+
// Filters reports to have reports specefic to dp institution
|
|
62
|
+
reports.filter(ins => ins.institution.includes(state.institution)).map(ins => ins.institution)
|
|
60
63
|
const allObjectCategories = reports.map(o => o.category)
|
|
61
|
-
|
|
62
|
-
|
|
64
|
+
let uniqueCategories = new Set()
|
|
65
|
+
allObjectCategories.forEach((category) => uniqueCategories.add(category))
|
|
63
66
|
return uniqueCategories.filter(c => c && c !== 'system')
|
|
64
67
|
}
|
|
65
68
|
},
|
|
66
69
|
methods: {
|
|
67
70
|
reportsWithCategory(category) {
|
|
68
|
-
|
|
69
|
-
return allReports.filter(o => o.category === category)
|
|
71
|
+
return this.reports.filter(o => o.category === category)
|
|
70
72
|
}
|
|
71
73
|
}
|
|
72
74
|
}
|
package/ReportViewer.vue
CHANGED
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
<Report
|
|
41
41
|
v-if="selectedReport"
|
|
42
42
|
:report-name="selectedReport.name"
|
|
43
|
-
:base-url="
|
|
43
|
+
:base-url="calculatedBaseUrl"
|
|
44
44
|
:detail="showDetail"
|
|
45
45
|
:chart="showChart"
|
|
46
46
|
/>
|
|
@@ -94,6 +94,18 @@ export default {
|
|
|
94
94
|
} else {
|
|
95
95
|
return false
|
|
96
96
|
}
|
|
97
|
+
},
|
|
98
|
+
calculatedBaseUrl () {
|
|
99
|
+
let reportUrl = ''
|
|
100
|
+
if (this.selectedReport.appService) {
|
|
101
|
+
reportUrl = this.appBaseUrl
|
|
102
|
+
} else {
|
|
103
|
+
reportUrl = this.packetBaseUrl
|
|
104
|
+
}
|
|
105
|
+
if (this.selectedReport.proxy) {
|
|
106
|
+
reportUrl = reportUrl + '/proxy'
|
|
107
|
+
}
|
|
108
|
+
return reportUrl + '/report'
|
|
97
109
|
}
|
|
98
110
|
},
|
|
99
111
|
methods: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byu-oit/vue-decision-processing-components",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.28.0",
|
|
4
4
|
"description": "Vue components shared between decision processing systems for the CES schools.",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@fortawesome/fontawesome-free": "^5.15.4",
|
package/parsers/reports.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
/*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* use case: to retrieve meta-data from state for a single report.
|
|
3
|
+
* Add a field to each report metadata item that remembers if it's part
|
|
4
|
+
* of the application service (so that we can call the right service
|
|
5
|
+
* when we retrieve the report data)
|
|
7
6
|
*/
|
|
8
|
-
export default function parse (reportMetadata, appService) {
|
|
7
|
+
export default function parse (reportMetadata, appService = false, proxy = false) {
|
|
9
8
|
reportMetadata.values.forEach(function (element) {
|
|
10
|
-
element
|
|
9
|
+
element.appService = appService
|
|
10
|
+
element.proxy = proxy
|
|
11
11
|
})
|
|
12
12
|
return reportMetadata.values
|
|
13
13
|
}
|
package/vuexModules/ui/index.js
CHANGED
|
@@ -2,13 +2,15 @@ const KEY = 'edu.byu.dp.hawaii.ui'
|
|
|
2
2
|
|
|
3
3
|
export const state = {
|
|
4
4
|
viewedApplications: [],
|
|
5
|
-
admitPeriod: ''
|
|
5
|
+
admitPeriod: '',
|
|
6
|
+
institution: ''
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
export const mutations = {
|
|
9
10
|
resetUi (state) {
|
|
10
11
|
state.viewedApplications = []
|
|
11
12
|
state.admitPeriod = ''
|
|
13
|
+
state.institution = ''
|
|
12
14
|
},
|
|
13
15
|
setUi (state, ui) {
|
|
14
16
|
if (Array.isArray(ui.viewedApplications)) {
|
|
@@ -17,6 +19,9 @@ export const mutations = {
|
|
|
17
19
|
if (ui.admitPeriod !== undefined) {
|
|
18
20
|
state.admitPeriod = ui.admitPeriod
|
|
19
21
|
}
|
|
22
|
+
if (ui.institution !== undefined) {
|
|
23
|
+
state.institution = ui.institution
|
|
24
|
+
}
|
|
20
25
|
},
|
|
21
26
|
viewApplication (state, { appId, name }) {
|
|
22
27
|
if (state.viewedApplications.find(i => i.appId === appId)) {
|
|
@@ -30,6 +35,9 @@ export const mutations = {
|
|
|
30
35
|
},
|
|
31
36
|
selectAdmitPeriod (state, admitPeriod) {
|
|
32
37
|
state.admitPeriod = admitPeriod
|
|
38
|
+
},
|
|
39
|
+
setInstitution (state, institution) {
|
|
40
|
+
state.institution = institution
|
|
33
41
|
}
|
|
34
42
|
}
|
|
35
43
|
|