remove cookienotification
This commit is contained in:
parent
5a11840f71
commit
05a486a6d3
|
@ -76,18 +76,16 @@
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-dialog>
|
</v-dialog>
|
||||||
<CookieNotification />
|
|
||||||
</v-footer>
|
</v-footer>
|
||||||
</v-app>
|
</v-app>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TitleBar from './components/TitleBar'
|
import TitleBar from './components/TitleBar'
|
||||||
import CookieNotification from './components/CookieNotification'
|
|
||||||
import { mapGetters, mapActions } from 'vuex'
|
import { mapGetters, mapActions } from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
name: 'App',
|
name: 'App',
|
||||||
components: { CookieNotification, TitleBar },
|
components: { TitleBar },
|
||||||
data: () => ({
|
data: () => ({
|
||||||
render: 0,
|
render: 0,
|
||||||
timer: null,
|
timer: null,
|
||||||
|
|
|
@ -25,7 +25,7 @@ import UserManager from '@/components/vorstand/UserManager'
|
||||||
import WorkgroupManagement from '@/components/vorstand/WorkgroupManagement'
|
import WorkgroupManagement from '@/components/vorstand/WorkgroupManagement'
|
||||||
import JobKindManager from '@/components/vorstand/JobKindManager'
|
import JobKindManager from '@/components/vorstand/JobKindManager'
|
||||||
import JobsRequest from '@/components/user/JobsRequest'
|
import JobsRequest from '@/components/user/JobsRequest'
|
||||||
import ResetPassword from "@/components/ResetPassword";
|
import ResetPassword from '@/components/ResetPassword'
|
||||||
|
|
||||||
Vue.use(VueRouter)
|
Vue.use(VueRouter)
|
||||||
|
|
||||||
|
@ -176,35 +176,45 @@ const router = new VueRouter({
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
store.dispatch('fetchAccessToken')
|
store.dispatch('fetchAccessToken')
|
||||||
if (to.name === 'main') {
|
if (to.name === 'main') {
|
||||||
if (to.name ==='finanzer' || to.name === 'overview' || to.name === 'activeUser') {
|
if (
|
||||||
|
to.name === 'finanzer' ||
|
||||||
|
to.name === 'overview' ||
|
||||||
|
to.name === 'activeUser'
|
||||||
|
) {
|
||||||
if (!store.state.login.user.group.includes('moneymaster')) {
|
if (!store.state.login.user.group.includes('moneymaster')) {
|
||||||
next({name: 'login'})
|
next({ name: 'login' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (to.name === 'bar' || to.name === 'geruecht') {
|
if (to.name === 'bar' || to.name === 'geruecht') {
|
||||||
if (!store.state.login.user.group.includes('bar')) {
|
if (!store.state.login.user.group.includes('bar')) {
|
||||||
next({name: 'login'})
|
next({ name: 'login' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (to.name === 'user' || to.name === 'userOverview' || to.name === 'userConfig' || to.name === 'userJobs' || to.name === 'jobRequests') {
|
if (
|
||||||
|
to.name === 'user' ||
|
||||||
|
to.name === 'userOverview' ||
|
||||||
|
to.name === 'userConfig' ||
|
||||||
|
to.name === 'userJobs' ||
|
||||||
|
to.name === 'jobRequests'
|
||||||
|
) {
|
||||||
if (!store.state.login.user.group.includes('user')) {
|
if (!store.state.login.user.group.includes('user')) {
|
||||||
next({name: 'login'})
|
next({ name: 'login' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!store.state.login.user.accessToken) {
|
if (!store.state.login.user.accessToken) {
|
||||||
next({name: 'login'})
|
next({ name: 'login' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (to.name === 'login') {
|
if (to.name === 'login') {
|
||||||
if (store.state.login.user.accessToken) {
|
if (store.state.login.user.accessToken) {
|
||||||
if (store.state.login.user.group.includes('moneymaster')) {
|
if (store.state.login.user.group.includes('moneymaster')) {
|
||||||
next({name: 'overview'})
|
next({ name: 'overview' })
|
||||||
} else if (store.state.login.user.group.includes('bar')) {
|
} else if (store.state.login.user.group.includes('bar')) {
|
||||||
next({name: 'geruecht'})
|
next({ name: 'geruecht' })
|
||||||
} else if (store.state.login.user.group.includes('user')) {
|
} else if (store.state.login.user.group.includes('user')) {
|
||||||
next({name: 'add'})
|
next({ name: 'add' })
|
||||||
} else if (store.state.login.user.group.includes('extern')) {
|
} else if (store.state.login.user.group.includes('extern')) {
|
||||||
next({name: 'main'})
|
next({ name: 'main' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ import wm from '@/store/modules/workgroupManagement'
|
||||||
import jkm from '@/store/modules/jobkindManager'
|
import jkm from '@/store/modules/jobkindManager'
|
||||||
import jobInvites from '@/store/modules/jobInvites'
|
import jobInvites from '@/store/modules/jobInvites'
|
||||||
import jobRequests from '@/store/modules/jobRequests'
|
import jobRequests from '@/store/modules/jobRequests'
|
||||||
import connectionError from "@/store/modules/connectionError";
|
import connectionError from '@/store/modules/connectionError'
|
||||||
|
|
||||||
Vue.use(Vuex)
|
Vue.use(Vuex)
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,9 @@ const mutations = {
|
||||||
existuser.type = users[user].type
|
existuser.type = users[user].type
|
||||||
existuser.limit = users[user].limit
|
existuser.limit = users[user].limit
|
||||||
existuser.last_seen = users[user].last_seen
|
existuser.last_seen = users[user].last_seen
|
||||||
existuser.autoLock = users[user].autoLock ? users[user].autoLock : existuser.autoLock
|
existuser.autoLock = users[user].autoLock
|
||||||
|
? users[user].autoLock
|
||||||
|
: existuser.autoLock
|
||||||
} else {
|
} else {
|
||||||
state.users.push({
|
state.users.push({
|
||||||
username: users[user].username,
|
username: users[user].username,
|
||||||
|
|
|
@ -73,8 +73,6 @@ const actions = {
|
||||||
if (e.response)
|
if (e.response)
|
||||||
if (e.response.status === 401) dispatch('logout', null, { root: true })
|
if (e.response.status === 401) dispatch('logout', null, { root: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
async updateJobKind({ commit, rootState, dispatch }, data) {
|
async updateJobKind({ commit, rootState, dispatch }, data) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -62,13 +62,13 @@ const actions = {
|
||||||
commit('loginStart')
|
commit('loginStart')
|
||||||
try {
|
try {
|
||||||
const response = await axios.post(url.login, { ...loginData })
|
const response = await axios.post(url.login, { ...loginData })
|
||||||
const cookieA = localStorage.getItem('cookie:accepted')
|
/*const cookieA = localStorage.getItem('cookie:accepted')
|
||||||
if (!cookieA) {
|
if (!cookieA) {
|
||||||
commit('loginStop', 'Sie müssen die Cookies akzeptieren!')
|
commit('loginStop', 'Sie müssen die Cookies akzeptieren!')
|
||||||
commit('setCookieNotification', true)
|
commit('setCookieNotification', true)
|
||||||
commit('setCookieAccepted', false)
|
commit('setCookieAccepted', false)
|
||||||
return
|
return
|
||||||
}
|
}*/
|
||||||
localStorage.setItem(
|
localStorage.setItem(
|
||||||
'user',
|
'user',
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
|
@ -81,9 +81,7 @@ const actions = {
|
||||||
)
|
)
|
||||||
commit('loginStop', null)
|
commit('loginStop', null)
|
||||||
commit('updateAccessToken', response.data)
|
commit('updateAccessToken', response.data)
|
||||||
if (state.user.group.includes('moneymaster')) {
|
if (state.user.group.includes('bar')) {
|
||||||
router.push('/main/finanzer/overview')
|
|
||||||
} else if (state.user.group.includes('bar')) {
|
|
||||||
router.push('/main/bar/geruecht')
|
router.push('/main/bar/geruecht')
|
||||||
} else if (state.user.group.includes('user')) {
|
} else if (state.user.group.includes('user')) {
|
||||||
router.push('/main/user/add')
|
router.push('/main/user/add')
|
||||||
|
|
Loading…
Reference in New Issue