@byu-oit/vue-decision-processing-components 9.0.16 → 9.1.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/DetailsMission.vue +15 -5
- 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,14 @@ export default {
|
|
|
83
89
|
}),
|
|
84
90
|
formatStartDate () {
|
|
85
91
|
if (!this.mission) return ''
|
|
92
|
+
const yyyyMmDd = /^[0-9]{4}-([0][1-9]||[1][0-2])-([0][1-9]||[1-2][0-9]||[3][0-1])$/
|
|
86
93
|
const yyyyMm = /^[0-9]{4}-([0][1-9]||[1][0-2])$/
|
|
87
94
|
const startMonth = this.mission.startMonth
|
|
88
|
-
|
|
89
|
-
|
|
95
|
+
const yyyyMmDdResult = yyyyMmDd.test(startMonth)
|
|
96
|
+
const yyyyMmResult = yyyyMm.test(startMonth)
|
|
97
|
+
if (!startMonth || (!yyyyMmDdResult && !yyyyMmResult)) return ''
|
|
98
|
+
if (!yyyyMmDdResult) return dayjs(startMonth).format('YYYY/MM')
|
|
99
|
+
return dayjs(startMonth).format('YYYY/MM/DD')
|
|
90
100
|
},
|
|
91
101
|
formatEndDate () {
|
|
92
102
|
if (!this.mission) return ''
|
|
@@ -101,7 +111,7 @@ export default {
|
|
|
101
111
|
if (!this.mission.startMonth && this.mission.endMonth) {
|
|
102
112
|
const isFemale = (this.sex === 'F')
|
|
103
113
|
const monthsOfMission = isFemale ? 18 : 24
|
|
104
|
-
return dayjs(this.mission.endMonth).subtract(monthsOfMission, 'month').format('YYYY/MM')
|
|
114
|
+
return dayjs(this.mission.endMonth).subtract(monthsOfMission, 'month').format('YYYY/MM') + '*'
|
|
105
115
|
} else {
|
|
106
116
|
return this.formatStartDate
|
|
107
117
|
}
|
|
@@ -110,7 +120,7 @@ export default {
|
|
|
110
120
|
if (this.mission.startMonth && !this.mission.endMonth) {
|
|
111
121
|
const isFemale = (this.sex === 'F')
|
|
112
122
|
const monthsOfMission = isFemale ? 18 : 24
|
|
113
|
-
return dayjs(this.mission.startMonth).add(monthsOfMission, 'month').format('YYYY/MM')
|
|
123
|
+
return dayjs(this.mission.startMonth).add(monthsOfMission, 'month').format('YYYY/MM') + '*'
|
|
114
124
|
} else {
|
|
115
125
|
return this.formatEndDate
|
|
116
126
|
}
|
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.1.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",
|