From a25ec09b8f01d0bb6445c5091b949f71b9d9f871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Gr=C3=B6ger?= Date: Thu, 4 Jun 2020 21:55:40 +0200 Subject: [PATCH] =?UTF-8?q?fixed=20bug,=20dass=20tage=20nicht=20mehr=20ges?= =?UTF-8?q?perrt=20oder=20entsperrt=20werden=20k=C3=B6nnen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/baruser/CreditLists.vue | 1 - .../ServiceManagementComponents/Day.vue | 43 +------------------ src/store/modules/barUsers.js | 2 - src/store/modules/finanzerUsers.js | 1 - src/store/modules/serviceManagement.js | 6 ++- src/store/modules/user.js | 1 - 6 files changed, 5 insertions(+), 49 deletions(-) diff --git a/src/components/baruser/CreditLists.vue b/src/components/baruser/CreditLists.vue index b3674bc..ab7052a 100644 --- a/src/components/baruser/CreditLists.vue +++ b/src/components/baruser/CreditLists.vue @@ -276,7 +276,6 @@ export default { } }, addAmountMore(user) { - console.log(user.value * 100) this.addAmount({ username: user.username, amount: Math.round(Math.abs(user.value * 100)), diff --git a/src/components/vorstand/ServiceManagementComponents/Day.vue b/src/components/vorstand/ServiceManagementComponents/Day.vue index ac92a66..488b7f9 100644 --- a/src/components/vorstand/ServiceManagementComponents/Day.vue +++ b/src/components/vorstand/ServiceManagementComponents/Day.vue @@ -234,12 +234,6 @@ export default { return list.length > 1 ? data.name + 'ist schon vorhanden' : false } ], - workerRules: [ - (data, test) => { - console.log(data, test) - return false - } - ], backup: null } }, @@ -256,9 +250,7 @@ export default { updateJobKindDate: 'sm/updateJobKindDate' }), forceRenderer(jobkind) { - console.log(jobkind) this.update += 1 - console.log('before', jobkind.worker, jobkind.backupWorker) if (jobkind.backupWorker !== jobkind.worker && this.focused) { let addedUser = null for (let user in jobkind.worker) { @@ -385,40 +377,8 @@ export default { }) this.dialog = false }, - filterWorker() {}, - // filterUser(jobkind) { - // console.log(jobkind, this.day.jobkinddate) - // var filtered = this.dbUsers.filter(user => { - // var test = this.day.jobkinddate.find(item => { - // if (item.job_kind === null) { - // return false - // } - // if (item.job_kind.id === jobkind.id) { - // return false - // } - // return item.worker.find(work => { - // return work.id === user.id - // }) - // }) - // console.log('test', test) - // if (test) { - // return false - // } - // if (jobkind.workgroup === null) { - // return true - // } - // return user.workgroups.find(workgroup => { - // if (jobkind.workgroup && workgroup) { - // return jobkind.workgroup.id === workgroup.id - // } else return true - // }) - // }) - // return filtered - // }, - // eslint-disable-next-line no-unused-vars + filterUser(jobkind) { - console.log(jobkind, this.day.jobkinddate) - // eslint-disable-next-line no-unused-vars var filtered = this.dbUsers.filter(user => { var userInOther = this.day.jobkinddate.find(item => { if (item.job_kind === null) { @@ -439,7 +399,6 @@ export default { } else { if (user.workgroups ? user.workgroups.length > 0 : false) { return user.workgroups.find(wg => { - console.log(wg, jobkind.workgroup) return wg.id === jobkind.workgroup.id }) } else { diff --git a/src/store/modules/barUsers.js b/src/store/modules/barUsers.js index 3959fe9..fe56ad1 100644 --- a/src/store/modules/barUsers.js +++ b/src/store/modules/barUsers.js @@ -83,7 +83,6 @@ const mutations = { message = state.messages[0] if ((new Date() - state.messages[0].date) / 1000 < 2) { clearTimeout(message.timeout) - console.log('done') message.amount = message.amount + data.amount message.visible = true message.date = new Date() @@ -252,7 +251,6 @@ const actions = { const response = await axios.get(url.barU.lock, { headers: { Token: rootState.login.user.accessToken } }) - console.log(response.data.value) commit('setLocked', response.data.value) } catch (e) { if (e.response) diff --git a/src/store/modules/finanzerUsers.js b/src/store/modules/finanzerUsers.js index 5662209..a8af242 100644 --- a/src/store/modules/finanzerUsers.js +++ b/src/store/modules/finanzerUsers.js @@ -180,7 +180,6 @@ const mutations = { return sum }, sortUsers: state => { - console.log(state.users) state.users = state.users.sort((a, b) => { if (a.locked && b.locked) { if (a.lastname > b.lastname) return 1 diff --git a/src/store/modules/serviceManagement.js b/src/store/modules/serviceManagement.js index 148799b..79e9e61 100644 --- a/src/store/modules/serviceManagement.js +++ b/src/store/modules/serviceManagement.js @@ -343,14 +343,16 @@ const actions = { if (e.response.status === 401) dispatch('logout', null, { root: true }) } }, - async lockDay({ commit, rootState, dispatch }, data) { + async lockDay({ commit, rootState, dispatch, getters }, data) { try { const response = await axios.post( url.vorstand.sm.lockDay, { ...data }, { headers: { Token: rootState.login.user.accessToken } } ) - commit('updateMonth', { start: response.data.date, day: response.data }) + console.log(response.data) + let date = new Date(response.data.date.year, response.data.date.month - 1, response.data.date.day) + commit('updateMonthLocked', { locked: response.data.locked, date, getters }) dispatch('getLifeTime', null, { root: true }) } catch (e) { if (e.response) diff --git a/src/store/modules/user.js b/src/store/modules/user.js index b85dad9..7c3fce4 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -165,7 +165,6 @@ const mutations = { message = state.messages[0] if ((new Date() - state.messages[0].date) / 1000 < 2) { clearTimeout(message.timeout) - console.log('done') message.amount = message.amount + data.amount message.visible = true message.date = new Date()