@byu-oit/vue-decision-processing-components 9.0.8 → 9.0.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.
@@ -2,7 +2,7 @@ name: Deployment
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [ main ]
5
+ branches: [ main, v8 ]
6
6
 
7
7
  env:
8
8
  node_version: "14"
@@ -38,4 +38,4 @@ jobs:
38
38
  - name: Publish
39
39
  run: npm publish --access public
40
40
  env:
41
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
41
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -42,15 +42,19 @@ import { faCalendarAlt } from '@fortawesome/free-solid-svg-icons'
42
42
  import { mapGetters, mapMutations, mapActions } from 'vuex'
43
43
 
44
44
  function calcAdmitPeriods () {
45
- const terms = [1, 3, 5],
46
- currentYear = new Date().getFullYear(),
47
- prevYearFall = `${currentYear}5`,
48
- nextYearWinter = `${currentYear + 2}1`
49
- return [
50
- prevYearFall,
51
- ...terms.map(term => `${currentYear + 1}${term}`),
52
- nextYearWinter
53
- ]
45
+ const currentMonth = new Date().getMonth() + 1 // JavaScript months are 0-indexed
46
+ const currentYear = new Date().getFullYear()
47
+
48
+ if (currentMonth >= 1 && currentMonth <= 4) { // Spring Evaluated: January-April
49
+ return [`${currentYear}1`, `${currentYear}3`, `${currentYear}5`, `${currentYear + 1}1`]
50
+ }
51
+ else if (currentMonth >= 5 && currentMonth <= 8) { // Fall Evaluated: May - August
52
+ return [`${currentYear}3`, `${currentYear}5`, `${currentYear + 1}1`, `${currentYear + 1}3`]
53
+ }
54
+ else if (currentMonth >= 9 && currentMonth <= 12) { // Winter Evaluated: September - December
55
+ return [`${currentYear - 1}5`, `${currentYear}1`, `${currentYear}3`, `${currentYear + 1}5`]
56
+ }
57
+ return []
54
58
  }
55
59
 
56
60
  export default {
package/Header.vue CHANGED
@@ -27,7 +27,7 @@
27
27
 
28
28
  <span :class="{ tools: true, hidden: !menuOpen }">
29
29
  <slot name="search"> </slot>
30
- <user-info />
30
+ <user-info :login-path="loginPath" :logout-path="logoutPath" />
31
31
  </span>
32
32
 
33
33
  <span class="menu-button" @click="menuOpen = !menuOpen">
@@ -51,6 +51,16 @@
51
51
  UserInfo,
52
52
  FontAwesomeIcon
53
53
  },
54
+ props: {
55
+ loginPath: {
56
+ type: String,
57
+ default: '/login?success=/dashboard'
58
+ },
59
+ logoutPath: {
60
+ type: String,
61
+ default: '/logout'
62
+ }
63
+ },
54
64
  data () {
55
65
  return {
56
66
  menuOpen: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byu-oit/vue-decision-processing-components",
3
- "version": "9.0.8",
3
+ "version": "9.0.10",
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",