fixed bug, dass tage nicht mehr gesperrt oder entsperrt werden können
This commit is contained in:
parent
a074ea0dd3
commit
a25ec09b8f
|
@ -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)),
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue