@byu-oit/vue-decision-processing-components 8.32.1 → 8.32.3
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 +10 -0
- package/DetailsHeader.vue +6 -2
- package/Report.vue +35 -6
- package/package.json +1 -1
- package/parsers/filenotes.js +13 -11
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
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.32.3](https://github.com/byu-oit/vue-decision-processing-components/compare/v8.32.2...v8.32.3) (2022-12-21)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* put pagination param in header so that csv/svg can be returned and not a JSON object ([1159dc1](https://github.com/byu-oit/vue-decision-processing-components/commit/1159dc14c0a31fa2ad24c77f11a2907517a01855))
|
|
11
|
+
* put pagination param in header so that csv/svg can be returned and not a JSON object ([dbed445](https://github.com/byu-oit/vue-decision-processing-components/commit/dbed445e5fdf3639cf1ad0b0a1b1838d8c0cf774))
|
|
12
|
+
|
|
13
|
+
### [8.32.2](https://github.com/byu-oit/vue-decision-processing-components/compare/v8.32.1...v8.32.2) (2022-12-15)
|
|
14
|
+
|
|
5
15
|
### [8.32.1](https://github.com/byu-oit/vue-decision-processing-components/compare/v8.32.0...v8.32.1) (2022-12-06)
|
|
6
16
|
|
|
7
17
|
## [8.32.0](https://github.com/byu-oit/vue-decision-processing-components/compare/v8.31.0...v8.32.0) (2022-12-02)
|
package/DetailsHeader.vue
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
<div class="actions bg-light text-body">
|
|
34
34
|
<slot name="actionsCompact"></slot>
|
|
35
35
|
</div>
|
|
36
|
-
<div class="bug">
|
|
36
|
+
<div class="bug" v-if="!hideBug">
|
|
37
37
|
<button class="btn btn-sm btn-outline-warning" title="Submit an incident" @click="openSupportModal">
|
|
38
38
|
<font-awesome-icon :icon="bug" />
|
|
39
39
|
</button>
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
<div class="actions bg-light text-body">
|
|
60
60
|
<slot name="actions"></slot>
|
|
61
61
|
</div>
|
|
62
|
-
<div class="bug">
|
|
62
|
+
<div class="bug" v-if="!hideBug">
|
|
63
63
|
<button class="btn btn-sm btn-outline-warning" @click="openSupportModal">
|
|
64
64
|
<font-awesome-icon :icon="bug" />
|
|
65
65
|
</button>
|
|
@@ -92,6 +92,10 @@ export default {
|
|
|
92
92
|
type: Boolean,
|
|
93
93
|
default: false
|
|
94
94
|
},
|
|
95
|
+
hideBug:{
|
|
96
|
+
type:Boolean,
|
|
97
|
+
default: false
|
|
98
|
+
},
|
|
95
99
|
appId: {
|
|
96
100
|
type: String
|
|
97
101
|
}
|
package/Report.vue
CHANGED
|
@@ -159,7 +159,36 @@ export default {
|
|
|
159
159
|
this.loading = true
|
|
160
160
|
this.$emit('loading')
|
|
161
161
|
window.scrollTo(0, 0)
|
|
162
|
-
|
|
162
|
+
|
|
163
|
+
const q = new URLSearchParams()
|
|
164
|
+
q.append('name', this.reportName)
|
|
165
|
+
if (this.selectedAdmitPeriod) {
|
|
166
|
+
q.append('admit_period', this.selectedAdmitPeriod)
|
|
167
|
+
} else if(this.metadata.parameters.includes('admitPeriod')) {
|
|
168
|
+
// Don't attempt to load report if we're missing the admit period
|
|
169
|
+
return
|
|
170
|
+
}
|
|
171
|
+
if (this.paginateReport && this.paginateReport !== 'null') {
|
|
172
|
+
q.append('pagination_parameter', this.paginateReport)
|
|
173
|
+
q.append('limit', this.limit)
|
|
174
|
+
q.append('cursor', this.newCursor)
|
|
175
|
+
}
|
|
176
|
+
if (this.dateRange) {
|
|
177
|
+
const toYYYYMMDD = dt => dt.toISOString().substr(0, 10)
|
|
178
|
+
const startDate = toYYYYMMDD(this.dateRange[0])
|
|
179
|
+
const endDate = toYYYYMMDD(this.dateRange[1])
|
|
180
|
+
q.append('date_start', startDate)
|
|
181
|
+
q.append('date_end', endDate)
|
|
182
|
+
}
|
|
183
|
+
if (this.metadata.parameters.includes('setById') && this.setById) {
|
|
184
|
+
q.append('set_by_id', this.setById)
|
|
185
|
+
}
|
|
186
|
+
// appends institution if available to url search params
|
|
187
|
+
if(this.metadata.parameters.includes('institutions')) {
|
|
188
|
+
if(this.metadata.parameters.institutions.includes(state.institution))
|
|
189
|
+
q.append('institution', state.institution)
|
|
190
|
+
}
|
|
191
|
+
|
|
163
192
|
const url = this.baseUrl + '?' + q.toString()
|
|
164
193
|
const loadRequested = () => {
|
|
165
194
|
let promises = []
|
|
@@ -190,11 +219,10 @@ export default {
|
|
|
190
219
|
let csv = ''
|
|
191
220
|
do {
|
|
192
221
|
const reportResponse = await this.loadReport(url, 'text/csv')
|
|
193
|
-
csv = csv + reportResponse
|
|
194
|
-
this.newCursor = reportResponse.cursor
|
|
222
|
+
csv = csv + reportResponse
|
|
195
223
|
const q = this.getQuery()
|
|
196
224
|
url = this.baseUrl + '?' + q.toString()
|
|
197
|
-
} while (this.newCursor !== 'null')
|
|
225
|
+
} while (this.newCursor && this.newCursor !== 'null')
|
|
198
226
|
|
|
199
227
|
if (csv && csv.length > 0 && /\n/.test(csv)) {
|
|
200
228
|
this.csvContent = csv
|
|
@@ -226,7 +254,8 @@ export default {
|
|
|
226
254
|
console.error(err.stack)
|
|
227
255
|
return null
|
|
228
256
|
}
|
|
229
|
-
|
|
257
|
+
this.newCursor = response.headers.get('Cursor')
|
|
258
|
+
return await response.text()
|
|
230
259
|
} catch (err) {
|
|
231
260
|
this.error = true
|
|
232
261
|
console.error(err)
|
|
@@ -250,7 +279,7 @@ export default {
|
|
|
250
279
|
// Don't attempt to load report if we're missing the admit period
|
|
251
280
|
return
|
|
252
281
|
}
|
|
253
|
-
if (this.paginateReport !== 'null') {
|
|
282
|
+
if (this.paginateReport && this.paginateReport !== 'null') {
|
|
254
283
|
q.append('pagination_parameter', this.paginateReport)
|
|
255
284
|
q.append('limit', this.limit)
|
|
256
285
|
q.append('cursor', this.newCursor)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byu-oit/vue-decision-processing-components",
|
|
3
|
-
"version": "8.32.
|
|
3
|
+
"version": "8.32.3",
|
|
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/filenotes.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const
|
|
1
|
+
const parseId = (c = []) => c.id
|
|
2
|
+
const parseCategories = (c = []) => cc.category_name
|
|
3
|
+
const parseSubcategories = (c = []) => c.subcategory_name
|
|
4
|
+
const parseDetails = (d = []) => d.detail
|
|
5
|
+
const parseUpdatedDateTime = (t = []) => t.updated_date_time
|
|
6
|
+
const parseName = (n) => n.employee_name
|
|
5
7
|
|
|
6
8
|
const parseFilenote = note => {
|
|
7
|
-
const id = note
|
|
8
|
-
const categories = parseCategories(note
|
|
9
|
-
const subcategories = parseSubcategories(note
|
|
10
|
-
const details = parseDetails(note
|
|
11
|
-
const updatedOn = note
|
|
12
|
-
const author = parseName(note
|
|
9
|
+
const id = parseId(note)
|
|
10
|
+
const categories = parseCategories(note)
|
|
11
|
+
const subcategories = parseSubcategories(note)
|
|
12
|
+
const details = parseDetails(note)
|
|
13
|
+
const updatedOn = parseUpdatedDateTime(note)
|
|
14
|
+
const author = parseName(note)
|
|
13
15
|
return {
|
|
14
16
|
id,
|
|
15
17
|
categories,
|
|
@@ -21,5 +23,5 @@ const parseFilenote = note => {
|
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
export default (values = []) => {
|
|
24
|
-
return values
|
|
26
|
+
return parseFilenote(values)
|
|
25
27
|
}
|