Renamed Dashboard to Journal (#2)

This commit is contained in:
Daniel J. Summers
2017-09-25 21:28:08 -05:00
parent 647e79c59c
commit 51ec649e7f
5 changed files with 12 additions and 11 deletions

View File

@@ -67,7 +67,7 @@ export default class AuthService {
this.userInfo(authResult.accessToken)
.then(user => {
store.commit(mutations.USER_LOGGED_ON, user)
router.replace('/dashboard')
router.replace('/journal')
})
}
})

View File

@@ -1,14 +1,15 @@
<template lang="pug">
article
page-title(:title="title")
p(v-if="isLoadingJournal") Loading your prayer journal...
template(v-if="!isLoadingJournal")
page-title(:title='title')
p(v-if='isLoadingJournal') Loading your prayer journal...
template(v-if='!isLoadingJournal')
new-request
el-row
el-col(:span='4'): strong Actions
el-col(:span='16'): strong Request
el-col(:span='4'): strong As Of
request-list-item(v-for="request in journal" :request="request" :key="request.requestId")
request-list-item(v-if='journal.length > 0' v-for='request in journal' :request='request' :key='request.requestId')
p.text-center(v-if='journal.length === 0'): em No requests found; click the "Add a New Request" button to add one
</template>
<script>
@@ -23,7 +24,7 @@ import RequestListItem from './request/RequestListItem'
import actions from '@/store/action-types'
export default {
name: 'dashboard',
name: 'journal',
components: {
PageTitle,
NewRequest,
@@ -31,7 +32,7 @@ export default {
},
computed: {
title () {
return `${this.user.given_name}'s Dashboard`
return `${this.user.given_name}'s Prayer Journal`
},
...mapState(['user', 'journal', 'isLoadingJournal'])
},

View File

@@ -4,7 +4,7 @@ el-menu(theme='dark' mode='horizontal' class='mpj-top-nav' router='true')
span(style='font-weight:100;') my
span(style='font-weight:600;') Prayer
span(style='font-weight:700;') Journal
el-menu-item(v-if='isAuthenticated' index='/dashboard') Dashboard
el-menu-item(v-if='isAuthenticated' index='/journal') Journal
el-menu-item(v-if='isAuthenticated' index='3'): a(@click.stop='logOff()') Log Off
el-menu-item(v-if='!isAuthenticated' index='4'): a(@click.stop='logOn()') Log On
el-menu-item(index='5'): a(href='https://danieljsummers.github.io/myPrayerJournal/' target='_blank' @click.stop='') Docs

View File

@@ -1,8 +1,8 @@
import Vue from 'vue'
import Router from 'vue-router'
import Dashboard from '@/components/Dashboard'
import Home from '@/components/Home'
import Journal from '@/components/Journal'
import LogOn from '@/components/user/LogOn'
Vue.use(Router)
@@ -11,7 +11,7 @@ export default new Router({
mode: 'history',
routes: [
{ path: '/', name: 'Home', component: Home },
{ path: '/dashboard', name: 'Dashboard', component: Dashboard },
{ path: '/journal', name: 'Journal', component: Journal },
{ path: '/user/log-on', name: 'LogOn', component: LogOn }
]
})