remove cookienotification

This commit is contained in:
Tim Gröger 2020-07-27 09:13:06 +02:00
parent 5a11840f71
commit 05a486a6d3
6 changed files with 29 additions and 23 deletions

View File

@ -76,18 +76,16 @@
</v-card-actions>
</v-card>
</v-dialog>
<CookieNotification />
</v-footer>
</v-app>
</template>
<script>
import TitleBar from './components/TitleBar'
import CookieNotification from './components/CookieNotification'
import { mapGetters, mapActions } from 'vuex'
export default {
name: 'App',
components: { CookieNotification, TitleBar },
components: { TitleBar },
data: () => ({
render: 0,
timer: null,

View File

@ -25,7 +25,7 @@ import UserManager from '@/components/vorstand/UserManager'
import WorkgroupManagement from '@/components/vorstand/WorkgroupManagement'
import JobKindManager from '@/components/vorstand/JobKindManager'
import JobsRequest from '@/components/user/JobsRequest'
import ResetPassword from "@/components/ResetPassword";
import ResetPassword from '@/components/ResetPassword'
Vue.use(VueRouter)
@ -176,7 +176,11 @@ const router = new VueRouter({
router.beforeEach((to, from, next) => {
store.dispatch('fetchAccessToken')
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')) {
next({ name: 'login' })
}
@ -186,7 +190,13 @@ router.beforeEach((to, from, next) => {
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')) {
next({ name: 'login' })
}

View File

@ -12,7 +12,7 @@ import wm from '@/store/modules/workgroupManagement'
import jkm from '@/store/modules/jobkindManager'
import jobInvites from '@/store/modules/jobInvites'
import jobRequests from '@/store/modules/jobRequests'
import connectionError from "@/store/modules/connectionError";
import connectionError from '@/store/modules/connectionError'
Vue.use(Vuex)

View File

@ -45,7 +45,9 @@ const mutations = {
existuser.type = users[user].type
existuser.limit = users[user].limit
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 {
state.users.push({
username: users[user].username,

View File

@ -73,8 +73,6 @@ const actions = {
if (e.response)
if (e.response.status === 401) dispatch('logout', null, { root: true })
}
},
async updateJobKind({ commit, rootState, dispatch }, data) {
try {

View File

@ -62,13 +62,13 @@ const actions = {
commit('loginStart')
try {
const response = await axios.post(url.login, { ...loginData })
const cookieA = localStorage.getItem('cookie:accepted')
/*const cookieA = localStorage.getItem('cookie:accepted')
if (!cookieA) {
commit('loginStop', 'Sie müssen die Cookies akzeptieren!')
commit('setCookieNotification', true)
commit('setCookieAccepted', false)
return
}
}*/
localStorage.setItem(
'user',
JSON.stringify({
@ -81,9 +81,7 @@ const actions = {
)
commit('loginStop', null)
commit('updateAccessToken', response.data)
if (state.user.group.includes('moneymaster')) {
router.push('/main/finanzer/overview')
} else if (state.user.group.includes('bar')) {
if (state.user.group.includes('bar')) {
router.push('/main/bar/geruecht')
} else if (state.user.group.includes('user')) {
router.push('/main/user/add')