@byu-oit/vue-decision-processing-components 8.35.8 → 8.35.10
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/.github/CODEOWNERS +1 -0
- package/.github/workflows/deploy.yml +40 -50
- package/.repo-meta.yml +55 -55
- package/AdmitPeriodConfig.vue +115 -115
- package/ApiCallButton.vue +91 -91
- package/ApplicantInfo.vue +100 -100
- package/AssignmentBulkDialog.vue +153 -153
- package/AssignmentDialog.vue +117 -117
- package/AssignmentSummary.vue +75 -75
- package/BackgroundBadge.vue +83 -83
- package/BackgroundDetailCrime.vue +78 -78
- package/BackgroundDetailPluralMarriage.vue +43 -43
- package/BackgroundDetailSexRegistry.vue +43 -43
- package/BackgroundDetailUniversity.vue +37 -37
- package/CHANGELOG.md +676 -676
- package/Dashboard.vue +201 -201
- package/DashboardApplicationList.vue +50 -50
- package/DecisionDialog.vue +178 -178
- package/Details.vue +124 -124
- package/DetailsActivity.vue +59 -59
- package/DetailsBackground.vue +143 -143
- package/DetailsBackgroundDetail.vue +47 -47
- package/DetailsBackgroundSummary.vue +66 -66
- package/DetailsCesHold.vue +107 -107
- package/DetailsCollege.vue +93 -93
- package/DetailsContact.vue +65 -65
- package/DetailsDecision.vue +183 -183
- package/DetailsDecisionHistory.vue +56 -56
- package/DetailsEndorsement.vue +74 -74
- package/DetailsEssay.vue +59 -59
- package/DetailsFilenote.vue +62 -62
- package/DetailsFilenoteList.vue +109 -109
- package/DetailsFlagSection.vue +176 -176
- package/DetailsHeader.vue +263 -263
- package/DetailsHighSchool.vue +99 -99
- package/DetailsHsTranscript.vue +100 -100
- package/DetailsInstitute.vue +90 -90
- package/DetailsMission.vue +88 -88
- package/DetailsNewAppHistory.vue +50 -50
- package/DetailsNotes.vue +83 -83
- package/DetailsPathway.vue +45 -45
- package/DetailsScoringSection.vue +128 -128
- package/DetailsSection.vue +116 -116
- package/DetailsSeminary.vue +184 -184
- package/DetailsSrs.vue +52 -52
- package/DetailsSubnav.vue +54 -54
- package/DetailsTestScores.vue +131 -131
- package/ExpandIndicator.vue +75 -75
- package/ExternalLink.vue +34 -34
- package/FilterBreadcrumb.vue +85 -85
- package/FilterButton.vue +86 -86
- package/FilterButtonAdmitPeriod.vue +104 -104
- package/FilterButtonAppType.vue +103 -103
- package/FilterButtonAssignedTo.vue +96 -96
- package/FilterButtonClearFilters.vue +65 -65
- package/FilterButtonSex.vue +105 -105
- package/FlagButton.vue +59 -59
- package/FlagDialog.vue +129 -129
- package/Footer.vue +432 -432
- package/Header.vue +132 -132
- package/HighSchoolSummary.vue +60 -60
- package/InternationalIndicator.vue +44 -44
- package/InternationalStatus.vue +48 -48
- package/LICENSE +201 -201
- package/LoadingBadge.vue +58 -58
- package/ManageAssignments.vue +123 -123
- package/NoAuth.vue +14 -14
- package/NoteDialog.vue +106 -106
- package/ObjectViewer.vue +49 -49
- package/Queues.vue +278 -268
- package/QuickLinks.vue +25 -25
- package/README.md +2 -2
- package/RecentApplications.vue +53 -53
- package/Report.vue +340 -340
- package/ReportDetail.vue +279 -279
- package/ReportList.vue +87 -87
- package/ReportPhotos.vue +65 -65
- package/ReportSvg.vue +78 -78
- package/ReportViewer.vue +165 -165
- package/RequestAccess.vue +14 -14
- package/RequestAccessList.vue +45 -45
- package/RoleSelector.vue +29 -29
- package/Search.vue +22 -22
- package/ShowApplicantIds.vue +100 -100
- package/SortableHeader.vue +53 -53
- package/Spinner.vue +34 -34
- package/StarredIndicator.vue +36 -36
- package/StatBox.vue +73 -73
- package/StatCharts.vue +196 -196
- package/SupportDialog.vue +172 -172
- package/UserInfo.vue +52 -52
- package/YesNoIndicator.vue +48 -48
- package/dateTimeFormat.js +67 -67
- package/gpaCalculation.js +162 -162
- package/gpaFilter.js +5 -5
- package/hsSummary.json +2019 -2019
- package/package.json +37 -36
- package/parsers/application.js +396 -396
- package/parsers/decisionHistory.js +27 -27
- package/parsers/filenotes.js +27 -27
- package/parsers/notes.js +49 -49
- package/parsers/packet.js +88 -88
- package/parsers/packetList.js +57 -57
- package/parsers/reports.js +13 -13
- package/sat2Act.js +46 -46
- package/test.js +48 -48
- package/themes/ByuiFooter.vue +38 -38
- package/themes/ByuiHeader.vue +96 -96
- package/themes/LdsbcFooter.vue +38 -38
- package/themes/LdsbcHeader.vue +100 -100
- package/vuexModules/application/activity.js +32 -32
- package/vuexModules/application/applicationList.js +71 -71
- package/vuexModules/application/background.js +47 -47
- package/vuexModules/application/bio.js +38 -38
- package/vuexModules/application/citizenship.js +30 -30
- package/vuexModules/application/collegeSummaries.js +32 -32
- package/vuexModules/application/essay.js +26 -26
- package/vuexModules/application/highSchoolSummaries.js +40 -40
- package/vuexModules/application/index.js +157 -157
- package/vuexModules/application/institute.js +30 -30
- package/vuexModules/application/mission.js +48 -48
- package/vuexModules/application/personalRecords.js +24 -24
- package/vuexModules/application/questions.js +23 -23
- package/vuexModules/application/seminary.js +39 -39
- package/vuexModules/application/testScores.js +26 -26
- package/vuexModules/notes/index.js +22 -22
- package/vuexModules/packet/decision.js +43 -43
- package/vuexModules/packet/decisionHistory.js +28 -28
- package/vuexModules/packet/flags.js +174 -174
- package/vuexModules/packet/index.js +52 -52
- package/vuexModules/packet/packetList.js +127 -127
- package/vuexModules/packet/processes.js +28 -28
- package/vuexModules/reports/index.js +32 -32
- package/vuexModules/ui/index.js +56 -56
- package/vuexModules/users/index.js +46 -46
- package/yyyyMmFilter.js +7 -7
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* shape of test scores:
|
|
3
|
-
* {
|
|
4
|
-
* testDate: '',
|
|
5
|
-
* dateProcessed: '',
|
|
6
|
-
* testName: '',
|
|
7
|
-
* testComponents: '',
|
|
8
|
-
* compositeScore: '',
|
|
9
|
-
* dateTimeReported: '',
|
|
10
|
-
* selfReported: false,
|
|
11
|
-
* optIn: true,
|
|
12
|
-
* verified: false
|
|
13
|
-
* }
|
|
14
|
-
*/
|
|
15
|
-
export const state = {
|
|
16
|
-
scores: []
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export const mutations = {
|
|
20
|
-
resetTestScores (state) {
|
|
21
|
-
state.scores = []
|
|
22
|
-
},
|
|
23
|
-
setTestScores (state, testScores = []) {
|
|
24
|
-
state.scores = testScores.slice(0)
|
|
25
|
-
}
|
|
26
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* shape of test scores:
|
|
3
|
+
* {
|
|
4
|
+
* testDate: '',
|
|
5
|
+
* dateProcessed: '',
|
|
6
|
+
* testName: '',
|
|
7
|
+
* testComponents: '',
|
|
8
|
+
* compositeScore: '',
|
|
9
|
+
* dateTimeReported: '',
|
|
10
|
+
* selfReported: false,
|
|
11
|
+
* optIn: true,
|
|
12
|
+
* verified: false
|
|
13
|
+
* }
|
|
14
|
+
*/
|
|
15
|
+
export const state = {
|
|
16
|
+
scores: []
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const mutations = {
|
|
20
|
+
resetTestScores (state) {
|
|
21
|
+
state.scores = []
|
|
22
|
+
},
|
|
23
|
+
setTestScores (state, testScores = []) {
|
|
24
|
+
state.scores = testScores.slice(0)
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
// initial state
|
|
2
|
-
// note shape: {
|
|
3
|
-
// note,
|
|
4
|
-
// dateTimeCreated,
|
|
5
|
-
// createdBy,
|
|
6
|
-
// reference,
|
|
7
|
-
// type,
|
|
8
|
-
// visibility
|
|
9
|
-
// }
|
|
10
|
-
export const state = {
|
|
11
|
-
list: []
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// mutations
|
|
15
|
-
export const mutations = {
|
|
16
|
-
setNotes (state, notes) {
|
|
17
|
-
state.list = notes
|
|
18
|
-
},
|
|
19
|
-
appendNote (state, note) {
|
|
20
|
-
state.list.push(note)
|
|
21
|
-
}
|
|
22
|
-
}
|
|
1
|
+
// initial state
|
|
2
|
+
// note shape: {
|
|
3
|
+
// note,
|
|
4
|
+
// dateTimeCreated,
|
|
5
|
+
// createdBy,
|
|
6
|
+
// reference,
|
|
7
|
+
// type,
|
|
8
|
+
// visibility
|
|
9
|
+
// }
|
|
10
|
+
export const state = {
|
|
11
|
+
list: []
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// mutations
|
|
15
|
+
export const mutations = {
|
|
16
|
+
setNotes (state, notes) {
|
|
17
|
+
state.list = notes
|
|
18
|
+
},
|
|
19
|
+
appendNote (state, note) {
|
|
20
|
+
state.list.push(note)
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
export const state = {
|
|
2
|
-
dateTimeUpdated: '',
|
|
3
|
-
explanation: '',
|
|
4
|
-
model: '',
|
|
5
|
-
reason: '',
|
|
6
|
-
updatedBy: '',
|
|
7
|
-
updatedById: '',
|
|
8
|
-
value: ''
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const getters = {
|
|
12
|
-
packetDecision (state) {
|
|
13
|
-
if (state.value) {
|
|
14
|
-
return state.value
|
|
15
|
-
}
|
|
16
|
-
return 'OPEN'
|
|
17
|
-
},
|
|
18
|
-
packetDecisionReason (state) {
|
|
19
|
-
return state.reason
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export const mutations = {
|
|
24
|
-
resetDecision (state) {
|
|
25
|
-
state.dateTimeUpdated = ''
|
|
26
|
-
state.explanation = ''
|
|
27
|
-
state.model = ''
|
|
28
|
-
state.reason = ''
|
|
29
|
-
state.updatedBy = ''
|
|
30
|
-
state.updatedById = ''
|
|
31
|
-
state.value = ''
|
|
32
|
-
},
|
|
33
|
-
setDecision (state, decision = {}) {
|
|
34
|
-
state.dateTimeUpdated = decision.dateTimeUpdated
|
|
35
|
-
state.explanation = decision.explanation
|
|
36
|
-
state.decision = decision
|
|
37
|
-
state.model = decision.model
|
|
38
|
-
state.reason = decision.reason
|
|
39
|
-
state.updatedBy = decision.updatedBy
|
|
40
|
-
state.updatedById = decision.updatedById
|
|
41
|
-
state.value = decision.value
|
|
42
|
-
}
|
|
43
|
-
}
|
|
1
|
+
export const state = {
|
|
2
|
+
dateTimeUpdated: '',
|
|
3
|
+
explanation: '',
|
|
4
|
+
model: '',
|
|
5
|
+
reason: '',
|
|
6
|
+
updatedBy: '',
|
|
7
|
+
updatedById: '',
|
|
8
|
+
value: ''
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const getters = {
|
|
12
|
+
packetDecision (state) {
|
|
13
|
+
if (state.value) {
|
|
14
|
+
return state.value
|
|
15
|
+
}
|
|
16
|
+
return 'OPEN'
|
|
17
|
+
},
|
|
18
|
+
packetDecisionReason (state) {
|
|
19
|
+
return state.reason
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const mutations = {
|
|
24
|
+
resetDecision (state) {
|
|
25
|
+
state.dateTimeUpdated = ''
|
|
26
|
+
state.explanation = ''
|
|
27
|
+
state.model = ''
|
|
28
|
+
state.reason = ''
|
|
29
|
+
state.updatedBy = ''
|
|
30
|
+
state.updatedById = ''
|
|
31
|
+
state.value = ''
|
|
32
|
+
},
|
|
33
|
+
setDecision (state, decision = {}) {
|
|
34
|
+
state.dateTimeUpdated = decision.dateTimeUpdated
|
|
35
|
+
state.explanation = decision.explanation
|
|
36
|
+
state.decision = decision
|
|
37
|
+
state.model = decision.model
|
|
38
|
+
state.reason = decision.reason
|
|
39
|
+
state.updatedBy = decision.updatedBy
|
|
40
|
+
state.updatedById = decision.updatedById
|
|
41
|
+
state.value = decision.value
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
// Shape: [
|
|
2
|
-
// admitPeriod: '',
|
|
3
|
-
// applicantType: '',
|
|
4
|
-
// decision: '',
|
|
5
|
-
// level: '',
|
|
6
|
-
// qualifier: '',
|
|
7
|
-
// officer: '',
|
|
8
|
-
// date: '',
|
|
9
|
-
// note: ''
|
|
10
|
-
// ]
|
|
11
|
-
export const state = {
|
|
12
|
-
entries: []
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const getters = {
|
|
16
|
-
decisionHistory (state) {
|
|
17
|
-
return state.entries
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export const mutations = {
|
|
22
|
-
resetDecisionHistory (state) {
|
|
23
|
-
state.entries = []
|
|
24
|
-
},
|
|
25
|
-
setDecisionHistory (state, history = []) {
|
|
26
|
-
state.entries = history.slice(0)
|
|
27
|
-
}
|
|
28
|
-
}
|
|
1
|
+
// Shape: [
|
|
2
|
+
// admitPeriod: '',
|
|
3
|
+
// applicantType: '',
|
|
4
|
+
// decision: '',
|
|
5
|
+
// level: '',
|
|
6
|
+
// qualifier: '',
|
|
7
|
+
// officer: '',
|
|
8
|
+
// date: '',
|
|
9
|
+
// note: ''
|
|
10
|
+
// ]
|
|
11
|
+
export const state = {
|
|
12
|
+
entries: []
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const getters = {
|
|
16
|
+
decisionHistory (state) {
|
|
17
|
+
return state.entries
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const mutations = {
|
|
22
|
+
resetDecisionHistory (state) {
|
|
23
|
+
state.entries = []
|
|
24
|
+
},
|
|
25
|
+
setDecisionHistory (state, history = []) {
|
|
26
|
+
state.entries = history.slice(0)
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -1,174 +1,174 @@
|
|
|
1
|
-
import Vue from 'vue'
|
|
2
|
-
|
|
3
|
-
// initial state
|
|
4
|
-
export const state = {
|
|
5
|
-
entries: []
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
const blockingVirtualFlag = flags => {
|
|
9
|
-
const anyBlockingFlags = flags.filter(f => f.isBlocking).filter(f => f.isActive).length > 0
|
|
10
|
-
const value = 'blocking'
|
|
11
|
-
const name = 'Blocking Flag(s)'
|
|
12
|
-
const type = 'Process'
|
|
13
|
-
const now = new Date()
|
|
14
|
-
return anyBlockingFlags
|
|
15
|
-
? { value, name, type, isActive: true, isSet: true, isCleared: false, dateTimeSet: now, setBy: '', isBlocking: true }
|
|
16
|
-
: { value, name, type, isActive: false, isSet: false, isCleared: false, isBlocking: true }
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const endorseVirtualFlag = flags => {
|
|
20
|
-
const edFlag = flags.filter(f => f.value === 'ED').filter(f => f.isActive)
|
|
21
|
-
const eiFlag = flags.filter(f => f.value === 'EI').filter(f => f.isActive)
|
|
22
|
-
const allFlags = edFlag.concat(eiFlag)
|
|
23
|
-
if (allFlags.length > 0) return allFlags[0]
|
|
24
|
-
const value = 'endorse'
|
|
25
|
-
const name = 'Endorsement Problem'
|
|
26
|
-
const type = 'Process'
|
|
27
|
-
return { value, name, type, isActive: false, isSet: false, isCleared: false, isBlocking: true }
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// getters
|
|
31
|
-
export const getters = {
|
|
32
|
-
flags (state) {
|
|
33
|
-
console.log('getter flags', state)
|
|
34
|
-
const { entries = [] } = state
|
|
35
|
-
return entries
|
|
36
|
-
},
|
|
37
|
-
flagByValue: (state, getters) => flagValue => {
|
|
38
|
-
const flags = getters.flags
|
|
39
|
-
if (flagValue === 'blocking') {
|
|
40
|
-
return blockingVirtualFlag(flags)
|
|
41
|
-
} else if (flagValue === 'endorse') {
|
|
42
|
-
return endorseVirtualFlag(flags)
|
|
43
|
-
}
|
|
44
|
-
const flag = flags.find(({ value }) => value === flagValue)
|
|
45
|
-
return flag || { value: flagValue, name: flagValueToName(flagValue), isSet: false, isCleared: false, isActive: false }
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// actions
|
|
50
|
-
export const actions = {
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// mutations
|
|
54
|
-
export const mutations = {
|
|
55
|
-
resetFlags (state) {
|
|
56
|
-
state.entries = []
|
|
57
|
-
},
|
|
58
|
-
setFlags (state, flags = []) {
|
|
59
|
-
state.entries = flags.map(convertFlag)
|
|
60
|
-
},
|
|
61
|
-
updateFlag (state, flag) {
|
|
62
|
-
const index = state.entries.findIndex(item => item.value === flag.value)
|
|
63
|
-
if (index < 0) {
|
|
64
|
-
state.entries.push(convertFlag(flag))
|
|
65
|
-
} else {
|
|
66
|
-
Vue.set(state.entries, index, convertFlag(flag))
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export const convertFlag = flag => {
|
|
72
|
-
if (!flag) return {}
|
|
73
|
-
const clearedIsAfterSet = ({ dateTimeSet, dateTimeCleared }) => {
|
|
74
|
-
if (!dateTimeCleared) return false
|
|
75
|
-
const clearedAsDate = new Date(dateTimeCleared)
|
|
76
|
-
const setAsDate = new Date(dateTimeSet)
|
|
77
|
-
return clearedAsDate >= setAsDate
|
|
78
|
-
}
|
|
79
|
-
const isSet = !!flag.dateTimeSet
|
|
80
|
-
const isCleared = isSet ? clearedIsAfterSet(flag) : false
|
|
81
|
-
const isActive = isSet && !isCleared
|
|
82
|
-
const {
|
|
83
|
-
name,
|
|
84
|
-
value,
|
|
85
|
-
type,
|
|
86
|
-
dateTimeSet,
|
|
87
|
-
setBy,
|
|
88
|
-
dateTimeCleared,
|
|
89
|
-
clearedBy
|
|
90
|
-
} = flag
|
|
91
|
-
const isBlocking = /process|wait/i.test(type)
|
|
92
|
-
return {
|
|
93
|
-
value,
|
|
94
|
-
name,
|
|
95
|
-
type,
|
|
96
|
-
isActive,
|
|
97
|
-
isSet,
|
|
98
|
-
isCleared,
|
|
99
|
-
dateTimeSet,
|
|
100
|
-
setBy,
|
|
101
|
-
dateTimeCleared,
|
|
102
|
-
clearedBy,
|
|
103
|
-
isBlocking
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
export const flagValueToName = value => {
|
|
108
|
-
switch (value) {
|
|
109
|
-
case 'AT':
|
|
110
|
-
return 'Applicant Type Mismatch'
|
|
111
|
-
case 'BGCR':
|
|
112
|
-
return 'Background Criminal Record Issue'
|
|
113
|
-
case 'BGPM':
|
|
114
|
-
return 'Background Plural Marriage Issue'
|
|
115
|
-
case 'BGSR':
|
|
116
|
-
return 'Background Sex Registry Issue'
|
|
117
|
-
case 'BGUD':
|
|
118
|
-
return 'Background University Discipline Issue'
|
|
119
|
-
case 'BI':
|
|
120
|
-
return 'Background Issues'
|
|
121
|
-
case 'BYUAPP':
|
|
122
|
-
return 'BYU Application'
|
|
123
|
-
case 'CAENSIGN':
|
|
124
|
-
return 'Concurrent Ensign College Application'
|
|
125
|
-
case 'CAIDAHO':
|
|
126
|
-
return 'Concurrent BYU Idaho Application'
|
|
127
|
-
case 'CDND':
|
|
128
|
-
return 'Counselor Do Not Deny'
|
|
129
|
-
case 'CES':
|
|
130
|
-
return 'CES Standard Hold'
|
|
131
|
-
case 'CHLD':
|
|
132
|
-
return 'Counselor Hold'
|
|
133
|
-
case 'ED':
|
|
134
|
-
return 'Endorsement Denied'
|
|
135
|
-
case 'EI':
|
|
136
|
-
return 'Endorsement Issues'
|
|
137
|
-
case 'EP':
|
|
138
|
-
return 'Endorsement Pending'
|
|
139
|
-
case 'EL':
|
|
140
|
-
return 'English Language Issues'
|
|
141
|
-
case 'HI':
|
|
142
|
-
return 'Hawaii Applicants'
|
|
143
|
-
case 'IA':
|
|
144
|
-
return 'International Applicants'
|
|
145
|
-
case 'IW':
|
|
146
|
-
return 'IWork Applicants'
|
|
147
|
-
case 'INC':
|
|
148
|
-
return 'Incomplete Application'
|
|
149
|
-
case 'LA':
|
|
150
|
-
return 'Low Academics'
|
|
151
|
-
case 'LACH':
|
|
152
|
-
return 'Low Academics College GPA'
|
|
153
|
-
case 'LAHS':
|
|
154
|
-
return 'Low Academics High School GPA'
|
|
155
|
-
case 'LATS':
|
|
156
|
-
return 'Low Academics Test Score'
|
|
157
|
-
case 'NFNG':
|
|
158
|
-
return 'NF Not Graduating'
|
|
159
|
-
case 'NOHS':
|
|
160
|
-
return 'Under 18 No High School Completion'
|
|
161
|
-
case 'NSE':
|
|
162
|
-
return 'No Secondary Education'
|
|
163
|
-
case 'PD':
|
|
164
|
-
return 'Previously Denied'
|
|
165
|
-
case 'UA':
|
|
166
|
-
return 'Underage Applicant'
|
|
167
|
-
case 'UNASSIGNED':
|
|
168
|
-
return 'Unassigned Applicant'
|
|
169
|
-
case 'US':
|
|
170
|
-
return 'Domestic Applicants'
|
|
171
|
-
default:
|
|
172
|
-
return 'Assigned'
|
|
173
|
-
}
|
|
174
|
-
}
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
|
|
3
|
+
// initial state
|
|
4
|
+
export const state = {
|
|
5
|
+
entries: []
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const blockingVirtualFlag = flags => {
|
|
9
|
+
const anyBlockingFlags = flags.filter(f => f.isBlocking).filter(f => f.isActive).length > 0
|
|
10
|
+
const value = 'blocking'
|
|
11
|
+
const name = 'Blocking Flag(s)'
|
|
12
|
+
const type = 'Process'
|
|
13
|
+
const now = new Date()
|
|
14
|
+
return anyBlockingFlags
|
|
15
|
+
? { value, name, type, isActive: true, isSet: true, isCleared: false, dateTimeSet: now, setBy: '', isBlocking: true }
|
|
16
|
+
: { value, name, type, isActive: false, isSet: false, isCleared: false, isBlocking: true }
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const endorseVirtualFlag = flags => {
|
|
20
|
+
const edFlag = flags.filter(f => f.value === 'ED').filter(f => f.isActive)
|
|
21
|
+
const eiFlag = flags.filter(f => f.value === 'EI').filter(f => f.isActive)
|
|
22
|
+
const allFlags = edFlag.concat(eiFlag)
|
|
23
|
+
if (allFlags.length > 0) return allFlags[0]
|
|
24
|
+
const value = 'endorse'
|
|
25
|
+
const name = 'Endorsement Problem'
|
|
26
|
+
const type = 'Process'
|
|
27
|
+
return { value, name, type, isActive: false, isSet: false, isCleared: false, isBlocking: true }
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// getters
|
|
31
|
+
export const getters = {
|
|
32
|
+
flags (state) {
|
|
33
|
+
console.log('getter flags', state)
|
|
34
|
+
const { entries = [] } = state
|
|
35
|
+
return entries
|
|
36
|
+
},
|
|
37
|
+
flagByValue: (state, getters) => flagValue => {
|
|
38
|
+
const flags = getters.flags
|
|
39
|
+
if (flagValue === 'blocking') {
|
|
40
|
+
return blockingVirtualFlag(flags)
|
|
41
|
+
} else if (flagValue === 'endorse') {
|
|
42
|
+
return endorseVirtualFlag(flags)
|
|
43
|
+
}
|
|
44
|
+
const flag = flags.find(({ value }) => value === flagValue)
|
|
45
|
+
return flag || { value: flagValue, name: flagValueToName(flagValue), isSet: false, isCleared: false, isActive: false }
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// actions
|
|
50
|
+
export const actions = {
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// mutations
|
|
54
|
+
export const mutations = {
|
|
55
|
+
resetFlags (state) {
|
|
56
|
+
state.entries = []
|
|
57
|
+
},
|
|
58
|
+
setFlags (state, flags = []) {
|
|
59
|
+
state.entries = flags.map(convertFlag)
|
|
60
|
+
},
|
|
61
|
+
updateFlag (state, flag) {
|
|
62
|
+
const index = state.entries.findIndex(item => item.value === flag.value)
|
|
63
|
+
if (index < 0) {
|
|
64
|
+
state.entries.push(convertFlag(flag))
|
|
65
|
+
} else {
|
|
66
|
+
Vue.set(state.entries, index, convertFlag(flag))
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export const convertFlag = flag => {
|
|
72
|
+
if (!flag) return {}
|
|
73
|
+
const clearedIsAfterSet = ({ dateTimeSet, dateTimeCleared }) => {
|
|
74
|
+
if (!dateTimeCleared) return false
|
|
75
|
+
const clearedAsDate = new Date(dateTimeCleared)
|
|
76
|
+
const setAsDate = new Date(dateTimeSet)
|
|
77
|
+
return clearedAsDate >= setAsDate
|
|
78
|
+
}
|
|
79
|
+
const isSet = !!flag.dateTimeSet
|
|
80
|
+
const isCleared = isSet ? clearedIsAfterSet(flag) : false
|
|
81
|
+
const isActive = isSet && !isCleared
|
|
82
|
+
const {
|
|
83
|
+
name,
|
|
84
|
+
value,
|
|
85
|
+
type,
|
|
86
|
+
dateTimeSet,
|
|
87
|
+
setBy,
|
|
88
|
+
dateTimeCleared,
|
|
89
|
+
clearedBy
|
|
90
|
+
} = flag
|
|
91
|
+
const isBlocking = /process|wait/i.test(type)
|
|
92
|
+
return {
|
|
93
|
+
value,
|
|
94
|
+
name,
|
|
95
|
+
type,
|
|
96
|
+
isActive,
|
|
97
|
+
isSet,
|
|
98
|
+
isCleared,
|
|
99
|
+
dateTimeSet,
|
|
100
|
+
setBy,
|
|
101
|
+
dateTimeCleared,
|
|
102
|
+
clearedBy,
|
|
103
|
+
isBlocking
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export const flagValueToName = value => {
|
|
108
|
+
switch (value) {
|
|
109
|
+
case 'AT':
|
|
110
|
+
return 'Applicant Type Mismatch'
|
|
111
|
+
case 'BGCR':
|
|
112
|
+
return 'Background Criminal Record Issue'
|
|
113
|
+
case 'BGPM':
|
|
114
|
+
return 'Background Plural Marriage Issue'
|
|
115
|
+
case 'BGSR':
|
|
116
|
+
return 'Background Sex Registry Issue'
|
|
117
|
+
case 'BGUD':
|
|
118
|
+
return 'Background University Discipline Issue'
|
|
119
|
+
case 'BI':
|
|
120
|
+
return 'Background Issues'
|
|
121
|
+
case 'BYUAPP':
|
|
122
|
+
return 'BYU Application'
|
|
123
|
+
case 'CAENSIGN':
|
|
124
|
+
return 'Concurrent Ensign College Application'
|
|
125
|
+
case 'CAIDAHO':
|
|
126
|
+
return 'Concurrent BYU Idaho Application'
|
|
127
|
+
case 'CDND':
|
|
128
|
+
return 'Counselor Do Not Deny'
|
|
129
|
+
case 'CES':
|
|
130
|
+
return 'CES Standard Hold'
|
|
131
|
+
case 'CHLD':
|
|
132
|
+
return 'Counselor Hold'
|
|
133
|
+
case 'ED':
|
|
134
|
+
return 'Endorsement Denied'
|
|
135
|
+
case 'EI':
|
|
136
|
+
return 'Endorsement Issues'
|
|
137
|
+
case 'EP':
|
|
138
|
+
return 'Endorsement Pending'
|
|
139
|
+
case 'EL':
|
|
140
|
+
return 'English Language Issues'
|
|
141
|
+
case 'HI':
|
|
142
|
+
return 'Hawaii Applicants'
|
|
143
|
+
case 'IA':
|
|
144
|
+
return 'International Applicants'
|
|
145
|
+
case 'IW':
|
|
146
|
+
return 'IWork Applicants'
|
|
147
|
+
case 'INC':
|
|
148
|
+
return 'Incomplete Application'
|
|
149
|
+
case 'LA':
|
|
150
|
+
return 'Low Academics'
|
|
151
|
+
case 'LACH':
|
|
152
|
+
return 'Low Academics College GPA'
|
|
153
|
+
case 'LAHS':
|
|
154
|
+
return 'Low Academics High School GPA'
|
|
155
|
+
case 'LATS':
|
|
156
|
+
return 'Low Academics Test Score'
|
|
157
|
+
case 'NFNG':
|
|
158
|
+
return 'NF Not Graduating'
|
|
159
|
+
case 'NOHS':
|
|
160
|
+
return 'Under 18 No High School Completion'
|
|
161
|
+
case 'NSE':
|
|
162
|
+
return 'No Secondary Education'
|
|
163
|
+
case 'PD':
|
|
164
|
+
return 'Previously Denied'
|
|
165
|
+
case 'UA':
|
|
166
|
+
return 'Underage Applicant'
|
|
167
|
+
case 'UNASSIGNED':
|
|
168
|
+
return 'Unassigned Applicant'
|
|
169
|
+
case 'US':
|
|
170
|
+
return 'Domestic Applicants'
|
|
171
|
+
default:
|
|
172
|
+
return 'Assigned'
|
|
173
|
+
}
|
|
174
|
+
}
|