@byu-oit/vue-decision-processing-components 8.28.4 → 8.29.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 +9 -0
- package/Details.vue +3 -0
- package/DetailsHeader.vue +32 -4
- package/SupportDialog.vue +158 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
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.29.0](https://github.com/byu-oit/vue-decision-processing-components/compare/v8.28.4...v8.29.0) (2022-09-23)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* adds call to app service incident api ([61605d3](https://github.com/byu-oit/vue-decision-processing-components/commit/61605d35f23c49d8273f4689ac2e6d1b1394d6ae))
|
|
11
|
+
* adds SupportDialog and bug button ([41e6b3f](https://github.com/byu-oit/vue-decision-processing-components/commit/41e6b3faaf95c73273dd88c0b5fac47db4106e5d))
|
|
12
|
+
* adds SupportDialog to DetailsHeader ([5baa0dc](https://github.com/byu-oit/vue-decision-processing-components/commit/5baa0dc75b55cd6a54df7ffb69f7e8025580d9fe))
|
|
13
|
+
|
|
5
14
|
### [8.28.4](https://github.com/byu-oit/vue-decision-processing-components/compare/v8.28.3...v8.28.4) (2022-08-17)
|
|
6
15
|
|
|
7
16
|
### [8.28.3](https://github.com/byu-oit/vue-decision-processing-components/compare/v8.28.2...v8.28.3) (2022-08-01)
|
package/Details.vue
CHANGED
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
<FlagDialog />
|
|
39
39
|
<DecisionDialog />
|
|
40
40
|
<NoteDialog />
|
|
41
|
+
<SupportDialog />
|
|
41
42
|
</section>
|
|
42
43
|
</template>
|
|
43
44
|
<script>
|
|
@@ -55,6 +56,7 @@
|
|
|
55
56
|
import FlagDialog from './FlagDialog'
|
|
56
57
|
import DecisionDialog from './DecisionDialog'
|
|
57
58
|
import NoteDialog from './NoteDialog'
|
|
59
|
+
import SupportDialog from './SupportDialog'
|
|
58
60
|
import { mapState, mapGetters, mapActions } from 'vuex'
|
|
59
61
|
|
|
60
62
|
export default {
|
|
@@ -72,6 +74,7 @@
|
|
|
72
74
|
FlagDialog,
|
|
73
75
|
DecisionDialog,
|
|
74
76
|
NoteDialog,
|
|
77
|
+
SupportDialog,
|
|
75
78
|
Spinner
|
|
76
79
|
},
|
|
77
80
|
created() {
|
package/DetailsHeader.vue
CHANGED
|
@@ -33,6 +33,11 @@
|
|
|
33
33
|
<div class="actions bg-light text-body">
|
|
34
34
|
<slot name="actionsCompact"></slot>
|
|
35
35
|
</div>
|
|
36
|
+
<div class="bug">
|
|
37
|
+
<button class="btn btn-sm btn-outline-warning" title="Submit an incident" @click="openSupportModal">
|
|
38
|
+
<font-awesome-icon :icon="bug" />
|
|
39
|
+
</button>
|
|
40
|
+
</div>
|
|
36
41
|
</div>
|
|
37
42
|
<div v-else class="applicant-details" key="expanded">
|
|
38
43
|
<div class="star" v-if="!hideStar && appId" :title="userFlag.isActive ? 'Remove from Tracking List' : 'Add to Tracking List'">
|
|
@@ -54,8 +59,14 @@
|
|
|
54
59
|
<div class="actions bg-light text-body">
|
|
55
60
|
<slot name="actions"></slot>
|
|
56
61
|
</div>
|
|
62
|
+
<div class="bug">
|
|
63
|
+
<button class="btn btn-sm btn-outline-warning" @click="openSupportModal">
|
|
64
|
+
<font-awesome-icon :icon="bug" />
|
|
65
|
+
</button>
|
|
66
|
+
</div>
|
|
57
67
|
</div>
|
|
58
68
|
</transition>
|
|
69
|
+
<SupportDialog />
|
|
59
70
|
</div>
|
|
60
71
|
</template>
|
|
61
72
|
<script>
|
|
@@ -64,12 +75,17 @@ import { mapState, mapGetters, mapActions } from 'vuex'
|
|
|
64
75
|
import StarredIndicator from './StarredIndicator'
|
|
65
76
|
import ApplicantInfo from './ApplicantInfo'
|
|
66
77
|
import { yearTermFormat } from './dateTimeFormat'
|
|
78
|
+
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
|
|
79
|
+
import { faBug } from '@fortawesome/free-solid-svg-icons'
|
|
80
|
+
import SupportDialog from './SupportDialog'
|
|
67
81
|
|
|
68
82
|
export default {
|
|
69
83
|
name: 'DetailsHeader',
|
|
70
84
|
components: {
|
|
85
|
+
SupportDialog,
|
|
71
86
|
ApplicantInfo,
|
|
72
|
-
StarredIndicator
|
|
87
|
+
StarredIndicator,
|
|
88
|
+
FontAwesomeIcon
|
|
73
89
|
},
|
|
74
90
|
props: {
|
|
75
91
|
hideStar: {
|
|
@@ -95,6 +111,9 @@ export default {
|
|
|
95
111
|
application: 'application'
|
|
96
112
|
}),
|
|
97
113
|
...mapGetters(['flagByValue']),
|
|
114
|
+
bug() {
|
|
115
|
+
return faBug
|
|
116
|
+
},
|
|
98
117
|
userFlag () {
|
|
99
118
|
const byuId = get(this.userInfo, 'byuId')
|
|
100
119
|
if (!byuId) {
|
|
@@ -156,6 +175,9 @@ export default {
|
|
|
156
175
|
mouseleave (event) {
|
|
157
176
|
this.hovering = false
|
|
158
177
|
this.handleScroll(event)
|
|
178
|
+
},
|
|
179
|
+
openSupportModal () {
|
|
180
|
+
this.$modal.show('support-modal')
|
|
159
181
|
}
|
|
160
182
|
},
|
|
161
183
|
filters: { yearTermFormat },
|
|
@@ -180,12 +202,12 @@ export default {
|
|
|
180
202
|
|
|
181
203
|
.applicant-details {
|
|
182
204
|
display: grid;
|
|
183
|
-
grid-template-columns: 3rem minmax(40vw, 2fr) minmax(20vw, 1fr) minmax(auto, 30vw);
|
|
205
|
+
grid-template-columns: 3rem minmax(40vw, 2fr) minmax(20vw, 1fr) minmax(auto, 30vw) 2.5rem;
|
|
184
206
|
grid-template-rows: repeat(2, auto);
|
|
185
207
|
grid-column-gap: 0.5rem;
|
|
186
208
|
grid-template-areas:
|
|
187
|
-
"star name additional actions"
|
|
188
|
-
"star applicant additional actions";
|
|
209
|
+
"star name additional actions bug"
|
|
210
|
+
"star applicant additional actions bug";
|
|
189
211
|
}
|
|
190
212
|
|
|
191
213
|
.star {
|
|
@@ -213,6 +235,12 @@ export default {
|
|
|
213
235
|
padding: 0.5rem;
|
|
214
236
|
}
|
|
215
237
|
|
|
238
|
+
.bug {
|
|
239
|
+
grid-area: bug;
|
|
240
|
+
margin-left: -0.5rem;
|
|
241
|
+
place-self: center;
|
|
242
|
+
}
|
|
243
|
+
|
|
216
244
|
.scale-enter-active,
|
|
217
245
|
.scale-leave-active {
|
|
218
246
|
transition: all 0.25s ease-out;
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Copyright 2018 Brigham Young University
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
-->
|
|
16
|
+
<template>
|
|
17
|
+
<modal
|
|
18
|
+
name="support-modal"
|
|
19
|
+
height="auto"
|
|
20
|
+
draggable
|
|
21
|
+
@opened="resetData"
|
|
22
|
+
>
|
|
23
|
+
<template v-if="success">
|
|
24
|
+
<div class="modal-body d-flex flex-column align-items-center">
|
|
25
|
+
<span class="h3 text-success"><font-awesome-icon :icon="check" /></span>
|
|
26
|
+
<span class="h5">Your incident has been submitted successfully.</span>
|
|
27
|
+
<button class="btn btn-sm btn-outline-secondary mt-2" type="button" @click="close">Close</button>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
<form v-else @submit.prevent="submitIssue">
|
|
31
|
+
<div class="modal-header bg-light">Submit Incident</div>
|
|
32
|
+
<div class="modal-body">
|
|
33
|
+
<div class="form-group">
|
|
34
|
+
<label for="short-description">Subject</label>
|
|
35
|
+
<input v-model="shortDescription" id="short-description" class="form-control" required>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="form-group">
|
|
38
|
+
<label for="description">Description</label>
|
|
39
|
+
<textarea v-model="description" id="description" class="form-control"></textarea>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
<div class="modal-footer">
|
|
43
|
+
<button class="btn btn-sm btn-outline-primary" type="submit" :disabled="loading">Submit</button>
|
|
44
|
+
<button class="btn btn-sm btn-outline-secondary" type="button" @click="close" :disabled="loading">Cancel</button>
|
|
45
|
+
</div>
|
|
46
|
+
</form>
|
|
47
|
+
</modal>
|
|
48
|
+
</template>
|
|
49
|
+
<script>
|
|
50
|
+
import { mapState, mapGetters, mapMutations } from 'vuex'
|
|
51
|
+
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
|
|
52
|
+
import { faCheckCircle } from '@fortawesome/free-solid-svg-icons'
|
|
53
|
+
|
|
54
|
+
export default {
|
|
55
|
+
name: 'SupportDialog',
|
|
56
|
+
components: {
|
|
57
|
+
FontAwesomeIcon
|
|
58
|
+
},
|
|
59
|
+
props: {
|
|
60
|
+
},
|
|
61
|
+
data() {
|
|
62
|
+
return {
|
|
63
|
+
description: '',
|
|
64
|
+
shortDescription: '',
|
|
65
|
+
success: false
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
computed: {
|
|
69
|
+
...mapState({
|
|
70
|
+
env: 'environment',
|
|
71
|
+
institution: state => state.ui.institution
|
|
72
|
+
}),
|
|
73
|
+
...mapGetters(['loading']),
|
|
74
|
+
host () {
|
|
75
|
+
return this.env.NODE_ENV === 'production' ? 'api.byu.edu' : 'api-sandbox.byu.edu'
|
|
76
|
+
},
|
|
77
|
+
institutionSvc () {
|
|
78
|
+
switch (this.institution) {
|
|
79
|
+
case ('PW'):
|
|
80
|
+
return 'byupw'
|
|
81
|
+
case ('EC'):
|
|
82
|
+
return 'ldsbc'
|
|
83
|
+
case ('BYUH'):
|
|
84
|
+
return 'byuh'
|
|
85
|
+
case ('BYUI'):
|
|
86
|
+
return 'byui'
|
|
87
|
+
default:
|
|
88
|
+
return ''
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
check() {
|
|
92
|
+
return faCheckCircle
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
methods: {
|
|
96
|
+
...mapMutations(['incrementFetchCount', 'decrementFetchCount']),
|
|
97
|
+
resetData () {
|
|
98
|
+
this.success = false
|
|
99
|
+
this.description = ''
|
|
100
|
+
this.shortDescription = ''
|
|
101
|
+
},
|
|
102
|
+
close () {
|
|
103
|
+
this.$modal.hide('support-modal')
|
|
104
|
+
},
|
|
105
|
+
async submitIssue () {
|
|
106
|
+
const { preferredFirstName, surname } = window.byu.user
|
|
107
|
+
const callerId = `${preferredFirstName} ${surname}`
|
|
108
|
+
// const serializedState = btoa(JSON.stringify(this.$store.state))
|
|
109
|
+
const options = {
|
|
110
|
+
url: `https://${this.host}/domain/applications/${this.institutionSvc}/admission/v1/proxy/incident`,
|
|
111
|
+
method: 'POST',
|
|
112
|
+
headers: {
|
|
113
|
+
'Content-Type': 'application/json',
|
|
114
|
+
},
|
|
115
|
+
body: JSON.stringify({
|
|
116
|
+
business_service: 'CES Admissions Application',
|
|
117
|
+
assignment_group: 'OIT-SpecOps Academics',
|
|
118
|
+
priority: '4',
|
|
119
|
+
caller_id: callerId,
|
|
120
|
+
short_description: this.shortDescription,
|
|
121
|
+
description: [this.description.trim(), '\n', callerId, location.href].join('\n')
|
|
122
|
+
})
|
|
123
|
+
}
|
|
124
|
+
this.incrementFetchCount()
|
|
125
|
+
const { status } = await window.byu.auth.request(options)
|
|
126
|
+
this.decrementFetchCount()
|
|
127
|
+
if (status < 400) {
|
|
128
|
+
this.success = true
|
|
129
|
+
}
|
|
130
|
+
if (status === 404) {
|
|
131
|
+
console.error(`Could not submit incident: ${status}`)
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
</script>
|
|
137
|
+
<style scoped>
|
|
138
|
+
:root {
|
|
139
|
+
--radius: 3px;
|
|
140
|
+
}
|
|
141
|
+
.modal-header,
|
|
142
|
+
.modal-body,
|
|
143
|
+
.modal-footer {
|
|
144
|
+
padding: 0.5rem 1rem;
|
|
145
|
+
color: #333;
|
|
146
|
+
}
|
|
147
|
+
.modal-header {
|
|
148
|
+
border-top-left-radius: var(--radius);
|
|
149
|
+
border-top-right-radius: var(--radius);
|
|
150
|
+
}
|
|
151
|
+
.modal-footer {
|
|
152
|
+
border-bottom-left-radius: var(--radius);
|
|
153
|
+
border-bottom-right-radius: var(--radius);
|
|
154
|
+
}
|
|
155
|
+
textarea.form-control {
|
|
156
|
+
height: 125px;
|
|
157
|
+
}
|
|
158
|
+
</style>
|
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.29.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",
|