@byu-oit/vue-decision-processing-components 8.37.1 → 8.37.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/.repo-meta.yml ADDED
@@ -0,0 +1,55 @@
1
+ # For full spec reference see https://github.com/byu-oit/repo-meta/blob/master/repo-meta-template.yml
2
+ # This file was automatically generated. It is used for various integrations like creating and updating Software CIs in the CMDB.
3
+ # You are required to maintain Software CI records in the CMDB for all of the deployable software artifacts you maintain.
4
+ # You can fill in the information here and have the integration do that for you or you can do that yourself manually.
5
+ $schemaver: 2.1
6
+ repo_url: https://github.com/byu-oit/vue-decision-processing-components # optional
7
+ software:
8
+ - name: vue-decision-processing-components # optional
9
+ deploy_to_cmdb: true # optional
10
+ type: ''
11
+ aliases: # optional
12
+ short_description: Vue.js components to be shared between the decision processing
13
+ applications for the various CES Schools. # optional
14
+ assignment_group: gro:OIT-App Dev Student Info Mgmt
15
+ notes: # optional
16
+ maintained_by: # optional
17
+ - arasmus8
18
+ data_sensitivity: internal
19
+ developed_by_byu: true # optional
20
+ ddd: # optional
21
+ business_domain:
22
+ ubiquitous_language_url:
23
+ context_map_url:
24
+ links: # optional
25
+ system_documentation_url: https://github.com/byu-oit/vue-decision-processing-components
26
+ swagger_urls:
27
+ microservice: true # optional
28
+ technologies_used: # optional
29
+ - Vue
30
+ - JavaScript
31
+ - NodeJS
32
+ standard_change_template:
33
+ stages:
34
+ development:
35
+ urls: # optional
36
+ product_page:
37
+ physical_url:
38
+ virtual_url:
39
+ hosting_location: ''
40
+ aws_account: # optional
41
+ relationships: # optional
42
+ depends_on: # optional
43
+ db_read_write:
44
+ db_read_only:
45
+ software:
46
+ supports: # optional
47
+ software:
48
+ service:
49
+ reverse_proxy: # optional
50
+ runs_on: # optional
51
+ server_cluster:
52
+ virtual_server:
53
+ rack_server:
54
+ blade_server:
55
+ data-sensitivity: ''
@@ -79,19 +79,24 @@ export default {
79
79
  q.append('categoryId', 'CESADM')
80
80
  q.append('sortAscending', 'true')
81
81
  q.append('results', '100')
82
- const url = `/api/ymessage/student-overview/${personId}?${q.toString()}`
82
+ const url = `https://api.byu.edu:443/domains/ymessage-archive/1.0/student-overview/${personId}?${q.toString()}`
83
83
 
84
- const headers = { accept: 'application/json' }
85
- const response = await fetch(url, { headers })
84
+ const headers = {
85
+ 'accept': 'application/json'
86
+ }
87
+ const { body, status } = await window.byu.auth.request({ url, headers })
86
88
 
87
- if (!response.ok) {
88
- console.error(new Error(`Unable to load filenotes! Error code ${response.status}`))
89
+ if (status >= 400) {
90
+ console.error(Error(`Unable to load filenotes! Error code ${status}`))
89
91
  this.error = true
90
92
  return
91
93
  }
92
94
 
93
- const data = await response.json()
94
- this.filenotes = parseFilenotes(data.results)
95
+ const data = JSON.parse(body)
96
+ const parsedFilenotes = parseFilenotes(data.results)
97
+ console.log('DetailsFilenoteList.vue::parsedFilenotes=', parsedFilenotes)
98
+ // const count = data.totalResults
99
+ this.filenotes = parsedFilenotes
95
100
  this.loaded = true
96
101
  } catch (err) {
97
102
  console.error(err)
@@ -72,6 +72,14 @@
72
72
  ...mapGetters(['flagByValue']),
73
73
  flag () { return this.flagByValue(this.flagValue) },
74
74
  btnClass () {
75
+ if (this.flag.state != null && this.flag.state != '') {
76
+ return {
77
+ 'btn' : true,
78
+ 'btn-sm' : true,
79
+ 'btn-outline-secondary' : ['indeterminate', 'pass'].includes(this.flag.state.toLowerCase()),
80
+ 'btn-outline-danger' : ['fail', 'error'].includes(this.flag.state.toLowerCase())
81
+ }
82
+ }
75
83
  const set = this.flag.isSet
76
84
  const cleared = this.flag.isCleared
77
85
  return {
@@ -83,6 +91,9 @@
83
91
  }
84
92
  },
85
93
  btnText () {
94
+ if (this.flag.state != null && this.flag.state != '') {
95
+ return ['pass', 'indeterminate'].includes(this.flag.state.toLowerCase()) ? 'set flag' : 'clear flag'
96
+ }
86
97
  return this.flag.isActive ? 'clear flag' : 'set flag'
87
98
  },
88
99
  flagIcon () {
@@ -90,7 +101,7 @@
90
101
  if (this.flag == null){
91
102
  return faSquare
92
103
  }
93
- if (this.flag.state != null){
104
+ if (this.flag.state != null && this.flag.state != '') {
94
105
  switch (this.flag.state.toLowerCase()){
95
106
  case 'pass':
96
107
  return faCheck
@@ -111,7 +122,7 @@
111
122
  if (this.flag == null){
112
123
  return `bg-${this.flagIndeterminateColor}`
113
124
  }
114
- if (this.flag.state != null){
125
+ if (this.flag.state != null && this.flag.state != ''){
115
126
  switch (this.flag.state.toLowerCase()){
116
127
  case 'pass':
117
128
  return `bg-${this.flagPassColor}`
package/FlagDialog.vue CHANGED
@@ -38,7 +38,7 @@
38
38
  </div>
39
39
  <span class="modal-footer">
40
40
  <button v-if="editing" class="btn btn-outline-primary" @click="updateFlag">Save</button>
41
- <button v-else class="btn btn-outline-primary" @click="startEditing">{{flag.isSet ? flag.isCleared ? 'Reset' : 'Clear' : 'Set'}} Flag</button>
41
+ <button v-else class="btn btn-outline-primary" @click="startEditing">{{ startEditingText() }} Flag</button>
42
42
  <button class="btn btn-outline-secondary" @click="close">Cancel</button>
43
43
  </span>
44
44
  </div>
@@ -72,14 +72,6 @@ export default {
72
72
  note: ''
73
73
  }
74
74
  },
75
- watch: {
76
- flag (newValue) {
77
- // Go straight to editing if the flag is unset, no status to display
78
- if (newValue.isActive !== undefined && !newValue.isActive) {
79
- this.editing = true
80
- }
81
- }
82
- },
83
75
  methods: {
84
76
  ...mapActions(['flagUpdate']),
85
77
  beforeOpen (event) {
@@ -99,14 +91,27 @@ export default {
99
91
  this.editing = true
100
92
  },
101
93
  updateFlag () {
102
- const {isSet, isCleared} = this.flag
103
- const newFlagState = isSet ? isCleared ? 'set' : 'clear' : 'set'
94
+ let newFlagState;
95
+ if (this.flag.state != null && this.flag.state != '') {
96
+ newFlagState = ['indeterminate', 'pass'].includes(this.flag.state.toLowerCase()) ? 'set' : 'clear'
97
+ }
98
+ else {
99
+ const {isSet, isCleared} = this.flag
100
+ newFlagState = isSet ? isCleared ? 'set' : 'clear' : 'set'
101
+ }
104
102
  return this.flagUpdate({
105
103
  applicationUuid: this.appId,
106
104
  flagState: newFlagState,
107
105
  flagValue: this.flag.value,
108
106
  note: this.note
109
107
  }).then(() => this.$modal.hide('flag-modal'))
108
+ },
109
+ startEditingText () {
110
+ const state = this.flag.state
111
+ if (state != null && state != '') {
112
+ return ['indeterminate', 'pass'].includes(state.toLowerCase()) ? 'Set' : 'Clear'
113
+ }
114
+ return this.flag.isSet ? this.flag.isCleared ? 'Reset' : 'Clear' : 'Set'
110
115
  }
111
116
  }
112
117
  }
package/LICENSE CHANGED
@@ -186,7 +186,7 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright 2024 Brigham Young University
189
+ Copyright [yyyy] [name of copyright owner]
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
package/Report.vue CHANGED
@@ -238,15 +238,20 @@ export default {
238
238
  }
239
239
  },
240
240
  async loadReport (url, acceptHeader) {
241
+ const options = {
242
+ headers: {
243
+ 'authorization': `Bearer ${window.byu.auth.accessToken}`,
244
+ 'accept': acceptHeader
245
+ },
246
+ cache: 'no-store'
247
+ }
241
248
  try {
242
- const response = await fetch(url, {
243
- headers: { accept: acceptHeader },
244
- cache: 'no-store'
245
- })
249
+ const response = await fetch(url, options)
246
250
  if (!response.ok) {
247
251
  this.error = true
248
252
  const err = Error(`Error ${response.status}-'${response.statusText}' while fetching report from ${url}`)
249
253
  console.error(err)
254
+ console.error(err.stack)
250
255
  return null
251
256
  }
252
257
  this.newCursor = response.headers.get('Cursor')
@@ -254,6 +259,7 @@ export default {
254
259
  } catch (err) {
255
260
  this.error = true
256
261
  console.error(err)
262
+ console.error(err.stack)
257
263
  }
258
264
  },
259
265
  reloadOnPageBackIntoFocus () {
package/SupportDialog.vue CHANGED
@@ -119,17 +119,20 @@ export default {
119
119
  short_description: this.shortDescription,
120
120
  description: [this.description.trim(), '\n', callerId, location.href].join('\n')
121
121
  }
122
+ const service = this.institutionSvc === 'byudce' ? 'byudce/clearance' : `${this.institutionSvc}/admission`
122
123
  const options = {
124
+ url: `${this.baseUrl}/domain/applications/${service}/v1/proxy/incident`,
123
125
  method: 'POST',
124
- headers: { 'Content-Type': 'application/json' },
126
+ headers: {
127
+ 'Content-Type': 'application/json',
128
+ },
125
129
  body: JSON.stringify({
126
130
  ...body,
127
131
  ...this.email !== '' && { u_email: this.email }
128
132
  })
129
133
  }
130
-
131
134
  this.incrementFetchCount()
132
- const { status } = await fetch(`/api/app/proxy/incident`, options)
135
+ const { status } = await window.byu.auth.request(options)
133
136
  this.decrementFetchCount()
134
137
  if (status < 400) {
135
138
  this.success = true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byu-oit/vue-decision-processing-components",
3
- "version": "8.37.1",
3
+ "version": "8.37.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",