@byu-oit/vue-decision-processing-components 9.0.14 → 9.0.16
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/DetailsEndorsement.vue +0 -10
- package/DetailsMission.vue +31 -2
- package/package.json +1 -1
package/DetailsEndorsement.vue
CHANGED
|
@@ -19,11 +19,6 @@
|
|
|
19
19
|
<font-awesome-icon :icon="icon" />
|
|
20
20
|
|
|
21
21
|
{{endorsementStatus}}
|
|
22
|
-
<small>
|
|
23
|
-
<a :href="endorseHref" target="_blank" data-disable-navigate="true">
|
|
24
|
-
(view details)
|
|
25
|
-
</a>
|
|
26
|
-
</small>
|
|
27
22
|
</span>
|
|
28
23
|
</div>
|
|
29
24
|
</template>
|
|
@@ -112,11 +107,6 @@
|
|
|
112
107
|
else if (this.endorsementIssuesFlag.isActive) return `Endorsement Issues`
|
|
113
108
|
else if (this.endorsementPendingFlag.isActive) return `Endorsement Pending`
|
|
114
109
|
return `Endorsement Complete`
|
|
115
|
-
},
|
|
116
|
-
endorseHref () {
|
|
117
|
-
return this.env !== 'development'
|
|
118
|
-
? `https://endorse.byu.edu/admin?byuId=${this.byuId}`
|
|
119
|
-
: `https://endorse-dev.byu.edu/admin?byuId=${this.byuId}`
|
|
120
110
|
}
|
|
121
111
|
}
|
|
122
112
|
}
|
package/DetailsMission.vue
CHANGED
|
@@ -44,9 +44,15 @@
|
|
|
44
44
|
<td>{{mission.name}}</td>
|
|
45
45
|
<td>{{mission.type}}</td>
|
|
46
46
|
<td>{{mission.language}}</td>
|
|
47
|
-
<td>{{
|
|
47
|
+
<td v-if="estimateDate">{{estimateStartDate}} - {{estimateEndDate}}</td>
|
|
48
|
+
<td v-else>{{formatStartDate}} - {{formatEndDate}}</td>
|
|
48
49
|
<td>{{monthsOfService}}</td>
|
|
49
50
|
</tr>
|
|
51
|
+
<!-- Show disclaimer if one of the dates is estimated (if one date is missing but not both) -->
|
|
52
|
+
<tr v-if="estimateDate && (Boolean(this.mission.startMonth) !== Boolean(this.mission.endMonth))">
|
|
53
|
+
<td colspan="3"/>
|
|
54
|
+
<td style="max-width: 200px; font-size: 12px"><span style="color: red">*</span>Either the mission start or end date was not provided and the above is an estimation.</td>
|
|
55
|
+
</tr>
|
|
50
56
|
</tbody>
|
|
51
57
|
</table>
|
|
52
58
|
</div>
|
|
@@ -64,11 +70,16 @@ export default {
|
|
|
64
70
|
props: {
|
|
65
71
|
condensed: {
|
|
66
72
|
type: Boolean
|
|
73
|
+
},
|
|
74
|
+
estimateDate: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: false
|
|
67
77
|
}
|
|
68
78
|
},
|
|
69
79
|
computed: {
|
|
70
80
|
...mapState({
|
|
71
|
-
mission: state => state.application.mission
|
|
81
|
+
mission: state => state.application.mission,
|
|
82
|
+
sex: state => state.application.personalRecords.sex ?? ''
|
|
72
83
|
}),
|
|
73
84
|
formatStartDate () {
|
|
74
85
|
if (!this.mission) return ''
|
|
@@ -86,6 +97,24 @@ export default {
|
|
|
86
97
|
console.log(`END_DATE: ${dayjs(endDate).format('YYYY/MM/DD')}`)
|
|
87
98
|
return dayjs(endDate).format('YYYY/MM/DD')
|
|
88
99
|
},
|
|
100
|
+
estimateStartDate() {
|
|
101
|
+
if (!this.mission.startMonth && this.mission.endMonth) {
|
|
102
|
+
const isFemale = (this.sex === 'F')
|
|
103
|
+
const monthsOfMission = isFemale ? 18 : 24
|
|
104
|
+
return dayjs(this.mission.endMonth).subtract(monthsOfMission, 'month').format('YYYY/MM')
|
|
105
|
+
} else {
|
|
106
|
+
return this.formatStartDate
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
estimateEndDate() {
|
|
110
|
+
if (this.mission.startMonth && !this.mission.endMonth) {
|
|
111
|
+
const isFemale = (this.sex === 'F')
|
|
112
|
+
const monthsOfMission = isFemale ? 18 : 24
|
|
113
|
+
return dayjs(this.mission.startMonth).add(monthsOfMission, 'month').format('YYYY/MM')
|
|
114
|
+
} else {
|
|
115
|
+
return this.formatEndDate
|
|
116
|
+
}
|
|
117
|
+
},
|
|
89
118
|
monthsOfService () {
|
|
90
119
|
if (!this.mission) return ''
|
|
91
120
|
const yyyyMm = /^[0-9]{4}-([0][1-9]||[1][0-2])$/
|
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.16",
|
|
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",
|