@byu-oit/vue-decision-processing-components 9.0.0 → 9.0.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/ApplicantInfo.vue CHANGED
@@ -31,6 +31,11 @@
31
31
  {{ sex }}
32
32
  |
33
33
  {{ religion }}
34
+ <div class="tooltip-container">
35
+ <span class="tooltip-trigger" :data-tooltip="religionFullName">
36
+ {{ religionCode }}
37
+ </span>
38
+ </div>
34
39
  </div>
35
40
  <div v-if="compact">
36
41
  {{ admitPeriod | yearTerm }}
@@ -70,7 +75,8 @@ export default {
70
75
  age: state => state.application.personalRecords.age,
71
76
  sex: state => state.application.personalRecords.sex,
72
77
  applicationStatus: state => state.application.applicationStatus,
73
- religion: state => state.application.mission.religion
78
+ religionCode: state => state.application.mission.religionCode,
79
+ religionFullName: state => state.application.mission.religion
74
80
  })
75
81
  }
76
82
  }
@@ -97,4 +103,36 @@ export default {
97
103
  vertical-align: middle;
98
104
  line-height: 1.55em;
99
105
  }
106
+
107
+ .tooltip-container {
108
+ position: relative;
109
+ display: inline-block;
110
+ }
111
+
112
+ .tooltip-trigger {
113
+ position: relative;
114
+ cursor: pointer;
115
+ }
116
+
117
+ .tooltip-trigger::after {
118
+ content: attr(data-tooltip);
119
+ position: absolute;
120
+ bottom: 125%;
121
+ left: 50%;
122
+ transform: translateX(-50%);
123
+ background-color: #333;
124
+ color: white;
125
+ padding: 5px 10px;
126
+ border-radius: 4px;
127
+ font-size: 14px;
128
+ white-space: nowrap;
129
+ opacity: 0;
130
+ visibility: hidden;
131
+ transition: opacity 0.3s, visibility 0.3s;
132
+ }
133
+
134
+ .tooltip-trigger:hover::after {
135
+ opacity: 1;
136
+ visibility: visible;
137
+ }
100
138
  </style>
@@ -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 {
@@ -84,16 +92,7 @@
84
92
  },
85
93
  btnText () {
86
94
  if (this.flag.state != null && this.flag.state != '') {
87
- switch (this.flag.state.toLowerCase()){
88
- case 'pass':
89
- return 'set flag'
90
- case 'fail':
91
- return 'clear flag'
92
- case 'error':
93
- return 'clear flag'
94
- case 'indeterminate':
95
- return 'set flag'
96
- }
95
+ return ['pass', 'indeterminate'].includes(this.flag.state.toLowerCase()) ? 'set flag' : 'clear flag'
97
96
  }
98
97
  return this.flag.isActive ? 'clear flag' : 'set flag'
99
98
  },
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) {
@@ -107,6 +99,13 @@ export default {
107
99
  flagValue: this.flag.value,
108
100
  note: this.note
109
101
  }).then(() => this.$modal.hide('flag-modal'))
102
+ },
103
+ startEditingText () {
104
+ const state = this.flag.state
105
+ if (state != null && state != '') {
106
+ return ['indeterminate', 'pass'].includes(state.toLowerCase()) ? 'Set' : 'Clear'
107
+ }
108
+ return this.flag.isSet ? this.flag.isCleared ? 'Reset' : 'Clear' : 'Set'
110
109
  }
111
110
  }
112
111
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byu-oit/vue-decision-processing-components",
3
- "version": "9.0.0",
3
+ "version": "9.0.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",