@byu-oit/vue-decision-processing-components 9.5.5 → 9.6.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.
@@ -0,0 +1,106 @@
1
+ <!--
2
+ Copyright 2025 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
+ <div class="ces-hold">
18
+ <span :class="statusClass">
19
+ <font-awesome-icon :icon="flagIcon" />
20
+
21
+ {{geopoliticalStatus}}
22
+ </span>
23
+ </div>
24
+ </template>
25
+ <script>
26
+
27
+ import {
28
+ faCheck,
29
+ faExclamationTriangle,
30
+ faHourglassHalf,
31
+ faMinus,
32
+ faQuestionCircle,
33
+ faSquare,
34
+ } from '@fortawesome/free-solid-svg-icons'
35
+ import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
36
+
37
+ import { mapGetters } from 'vuex'
38
+
39
+ export default {
40
+ name: 'DetailsGeopolitical',
41
+
42
+ components: {
43
+ FontAwesomeIcon,
44
+ },
45
+
46
+ computed: {
47
+ ...mapGetters([ 'flagByValue' ]),
48
+ flag() {
49
+ return this.flagByValue('GPF')
50
+ },
51
+ statusClass() {
52
+ if (this.flag != null) {
53
+ switch (this.flag.state.toLowerCase()) {
54
+ case 'pass':
55
+ return { 'text-success': true }
56
+ case 'fail':
57
+ return { 'text-danger': true }
58
+ case 'error':
59
+ return { 'text-danger': true, 'font-weight-bold': true }
60
+ case 'indeterminate':
61
+ return { 'text-dark': true }
62
+ default:
63
+ return { 'text-danger': true, 'font-weight-bold': true }
64
+ }
65
+ }
66
+ },
67
+ flagIcon() {
68
+ if (this.flag != null) {
69
+ switch (this.flag.state.toLowerCase()) {
70
+ case 'pass':
71
+ return faCheck
72
+ case 'fail':
73
+ return faMinus
74
+ case 'error':
75
+ return faExclamationTriangle
76
+ case 'indeterminate':
77
+ return faSquare
78
+ default:
79
+ return faExclamationTriangle
80
+ }
81
+ }
82
+ },
83
+ geopoliticalStatus() {
84
+ if (this.flag != null) {
85
+ if (this.flag.message != null && this.flag.message.length > 0) {
86
+ return this.flag.message
87
+ }
88
+ switch (this.flag.state.toLowerCase()) {
89
+ case 'pass':
90
+ return 'No geopolitical concerns.'
91
+ case 'fail':
92
+ return 'Geopolitical concerns.'
93
+ case 'error':
94
+ return 'An error occurred. Could not find a unique match.'
95
+ case 'indeterminate':
96
+ return 'No data available.'
97
+ default:
98
+ return 'An error occurred. Could not find a unique match.'
99
+ }
100
+ }
101
+ },
102
+ },
103
+ }
104
+ </script>
105
+ <style scoped>
106
+ </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byu-oit/vue-decision-processing-components",
3
- "version": "9.5.5",
3
+ "version": "9.6.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",