@byu-oit/vue-decision-processing-components 9.0.16 → 9.0.17
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/DetailsMission.vue +12 -6
- package/package.json +1 -1
package/DetailsMission.vue
CHANGED
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
<!-- Show disclaimer if one of the dates is estimated (if one date is missing but not both) -->
|
|
52
52
|
<tr v-if="estimateDate && (Boolean(this.mission.startMonth) !== Boolean(this.mission.endMonth))">
|
|
53
53
|
<td colspan="3"/>
|
|
54
|
-
<td style="max-width: 200px; font-size: 12px"><span style="color: red">*</span>
|
|
54
|
+
<td style="max-width: 200px; font-size: 12px"><span style="color: red">*</span>This date was not provided and is an estimation.</td>
|
|
55
55
|
</tr>
|
|
56
56
|
</tbody>
|
|
57
57
|
</table>
|
|
@@ -76,6 +76,12 @@ export default {
|
|
|
76
76
|
default: false
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
|
+
mounted() {
|
|
80
|
+
if (this.mission){
|
|
81
|
+
this.mission.startMonth = this.mission.startMonth.trim()
|
|
82
|
+
this.mission.endMonth = this.mission.endMonth.trim()
|
|
83
|
+
}
|
|
84
|
+
},
|
|
79
85
|
computed: {
|
|
80
86
|
...mapState({
|
|
81
87
|
mission: state => state.application.mission,
|
|
@@ -83,10 +89,10 @@ export default {
|
|
|
83
89
|
}),
|
|
84
90
|
formatStartDate () {
|
|
85
91
|
if (!this.mission) return ''
|
|
86
|
-
const
|
|
92
|
+
const yyyyMmDd = /^[0-9]{4}-([0][1-9]||[1][0-2])-([0][1-9]||[1-2][0-9]||[3][0-1])$/
|
|
87
93
|
const startMonth = this.mission.startMonth
|
|
88
|
-
if (!startMonth || !
|
|
89
|
-
return dayjs(startMonth).format('YYYY/MM')
|
|
94
|
+
if (!startMonth || !yyyyMmDd.test(startMonth)) return ''
|
|
95
|
+
return dayjs(startMonth).format('YYYY/MM/DD')
|
|
90
96
|
},
|
|
91
97
|
formatEndDate () {
|
|
92
98
|
if (!this.mission) return ''
|
|
@@ -101,7 +107,7 @@ export default {
|
|
|
101
107
|
if (!this.mission.startMonth && this.mission.endMonth) {
|
|
102
108
|
const isFemale = (this.sex === 'F')
|
|
103
109
|
const monthsOfMission = isFemale ? 18 : 24
|
|
104
|
-
return dayjs(this.mission.endMonth).subtract(monthsOfMission, 'month').format('YYYY/MM')
|
|
110
|
+
return dayjs(this.mission.endMonth).subtract(monthsOfMission, 'month').format('YYYY/MM') + '*'
|
|
105
111
|
} else {
|
|
106
112
|
return this.formatStartDate
|
|
107
113
|
}
|
|
@@ -110,7 +116,7 @@ export default {
|
|
|
110
116
|
if (this.mission.startMonth && !this.mission.endMonth) {
|
|
111
117
|
const isFemale = (this.sex === 'F')
|
|
112
118
|
const monthsOfMission = isFemale ? 18 : 24
|
|
113
|
-
return dayjs(this.mission.startMonth).add(monthsOfMission, 'month').format('YYYY/MM')
|
|
119
|
+
return dayjs(this.mission.startMonth).add(monthsOfMission, 'month').format('YYYY/MM') + '*'
|
|
114
120
|
} else {
|
|
115
121
|
return this.formatEndDate
|
|
116
122
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byu-oit/vue-decision-processing-components",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.17",
|
|
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",
|