mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[Bugfix] Cannot read properties of null (.split())
This commit is contained in:
1 parent
2ffa3e24c8
commit
e1e46a5c0b
87 files changed
+186
-78
No files matched your search
@@ -44,6 +44,9 @@ export default {
|
||||
FileSaver.saveAs(blob, file.name)
|
||||
} catch (error) {
|
||||
this.$toast.error(this.$parseError(error))
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
console.log('[z-files.vue] Error: ', error)
|
||||
} finally {
|
||||
file.isLoading = false
|
||||
}
|
||||
|
||||
@@ -124,6 +124,9 @@ export default {
|
||||
}
|
||||
} catch (error) {
|
||||
this.$toast.error(this.$parseError(error))
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
console.log('[z-blocker-modal.vue] Error: ', error)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -146,6 +149,9 @@ export default {
|
||||
this.closeModal()
|
||||
} catch (error) {
|
||||
this.$toast.error(this.$parseError(error))
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
console.log('[z-blocker-modal.vue] Error: ', error)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -45,17 +45,20 @@ export default {
|
||||
},
|
||||
|
||||
async deleteBlocker() {
|
||||
if (this.isDeleting) return
|
||||
if (this.isDeleting) return
|
||||
|
||||
this.isDeleting = true
|
||||
|
||||
try {
|
||||
await this.$axios.delete_auth(`v1/blockers/${this.blocker.id}`)
|
||||
|
||||
|
||||
this.$emit('on-blocker-deleted', this.blocker)
|
||||
this.closeModal()
|
||||
} catch (error) {
|
||||
this.$toast.error(this.$parseError(error))
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
console.log('[z-delete-blocker-modal.vue] Error: ', error)
|
||||
} finally {
|
||||
this.isDeleting = false
|
||||
}
|
||||
|
||||
@@ -47,6 +47,9 @@ export default {
|
||||
this.$events.emit('close-both-modals')
|
||||
} catch (error) {
|
||||
this.$toast.error(this.$parseError(error))
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
console.log('[z-complete-master-task-modal.vue] Error: ', error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ export default {
|
||||
},
|
||||
|
||||
async deleteMasterTask() {
|
||||
if (this.isDeleting) return
|
||||
if (this.isDeleting) return
|
||||
|
||||
this.isDeleting = true
|
||||
|
||||
@@ -55,6 +55,9 @@ export default {
|
||||
this.closeModal()
|
||||
} catch (error) {
|
||||
this.$toast.error(this.$parseError(error))
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
console.log('[z-delete-master-task-modal.vue] Error: ', error)
|
||||
} finally {
|
||||
this.isDeleting = false
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ export default {
|
||||
|
||||
async deleteMember() {
|
||||
this.team.employees = [...this.team.employees].filter(employee => employee.id !== this.member.id)
|
||||
|
||||
|
||||
try {
|
||||
if (this.team.id) {
|
||||
const { team } = await this.$axios.put_auth(`v1/teams/${this.team.id}`, this.team)
|
||||
@@ -67,6 +67,9 @@ export default {
|
||||
this.closeModal()
|
||||
} catch (error) {
|
||||
this.$toast.error(this.$parseError(error))
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
console.log('[z-delete-team-member-modal.vue] Error: ', error)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -306,6 +306,9 @@ export default {
|
||||
this.editMode = editMode || !this.mastertask.id
|
||||
} catch (error) {
|
||||
this.$toast.error(error.message || error)
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
console.log('[z-master-task-modal.vue] Error: ', error)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -343,6 +346,9 @@ export default {
|
||||
this.closeModal()
|
||||
} catch (error) {
|
||||
this.$toast.error(this.$parseError(error))
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
console.log('[z-master-task-modal.vue] Error: ', error)
|
||||
} finally {
|
||||
this.isSaving = false
|
||||
}
|
||||
@@ -361,8 +367,8 @@ export default {
|
||||
},
|
||||
|
||||
addTask() {
|
||||
this.$events.emit('show-subtask-modal', {
|
||||
subtask: {
|
||||
this.$events.emit('show-subtask-modal', {
|
||||
subtask: {
|
||||
master_task_id: this.mastertask.id,
|
||||
project_code: this.mastertask.project_code
|
||||
}
|
||||
@@ -375,6 +381,7 @@ export default {
|
||||
|
||||
_mergeDeadlineTimeDate() {
|
||||
const date = new Date(this.mastertask.deadline)
|
||||
console.log('z-master-task-modal', this.subtask)
|
||||
const timeParts = this.mastertask._deadline_time.split(':')
|
||||
date.setHours(parseInt(timeParts[0]))
|
||||
date.setMinutes(parseInt(timeParts[1]))
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<template v-if="subtask.timesheets.length">
|
||||
<div v-for="timesheet in subtask.timesheets" :key="timesheet.id" class="d-flex align-center mb-3">
|
||||
<v-icon @click.stop="deleteTimesheet(timesheet)" class="circle-border cursor-pointer mr-2" icon="mdi-minus" size="medium" />
|
||||
|
||||
|
||||
<div class="d-flex align-center flex-start width-100">
|
||||
<p class="task-badge rounded-pill">{{ timesheet.time }}</p>
|
||||
<!-- <p class="ml-5">{{ timesheet.employee_name }} ({{ moment(timesheet.timestamp).format('D.M.YYYY') }})</p> -->
|
||||
@@ -139,16 +139,20 @@ export default {
|
||||
return timesheet
|
||||
})
|
||||
const { subtask } = await this.$axios.put_auth(`v1/subtasks/${data.id}`, data)
|
||||
|
||||
|
||||
this.closeModal()
|
||||
this.$events.emit('on-subtask-edited', subtask)
|
||||
} catch (error) {
|
||||
this.$toast.error(error.message || error)
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
console.log('[a-task-spent-time.vue] Error: ', error)
|
||||
}
|
||||
},
|
||||
|
||||
_mergeDeadlineTimeDate() {
|
||||
const date = new Date(this.subtask.deadline)
|
||||
console.log('a-task-spent-time', this.subtask)
|
||||
const timeParts = this.subtask._deadline_time.split(':')
|
||||
|
||||
date.setHours(parseInt(timeParts[0]))
|
||||
|
||||
@@ -213,6 +213,9 @@ export default {
|
||||
this.$events.emit('show-task-add-time-modal', { subtask })
|
||||
} catch (error) {
|
||||
this.$toast.error(error.message || error)
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
console.log('[a-task-timeblocks.vue] Error: ', error)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -242,6 +245,9 @@ export default {
|
||||
this.$events.emit('on-subtask-edited', subtask)
|
||||
} catch (error) {
|
||||
this.$toast.error(error.message || error)
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
console.log('[a-task-timeblocks.vue] Error: ', error)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -49,6 +49,9 @@ export default {
|
||||
this.$emit('on-subtask-edited', subtask)
|
||||
} catch (error) {
|
||||
this.$toast.error(this.$parseError(error))
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
console.log('[z-complete-task-modal.vue] Error: ', error)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -45,18 +45,21 @@ export default {
|
||||
},
|
||||
|
||||
async deleteTask() {
|
||||
if (this.isDeleting) return
|
||||
if (this.isDeleting) return
|
||||
|
||||
this.isDeleting = true
|
||||
|
||||
try {
|
||||
await this.$axios.delete_auth(`v1/subtasks/${this.subtask.id}`)
|
||||
|
||||
|
||||
this.$store.commit('tm/delete_subtask', this.subtask)
|
||||
this.closeModal()
|
||||
this.$emit('on-subtask-deleted', this.subtask)
|
||||
} catch (error) {
|
||||
this.$toast.error(this.$parseError(error))
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
console.log('[z-delete-task-modal.vue] Error: ', error)
|
||||
} finally {
|
||||
this.isDeleting = false
|
||||
}
|
||||
|
||||
@@ -70,6 +70,9 @@ export default {
|
||||
this.$events.emit('on-subtask-edited', subtask)
|
||||
} catch (error) {
|
||||
this.$toast.error(error.message || error)
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
console.log('[z-delete-timeblock-modal.vue] Error: ', error)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
@@ -80,6 +80,9 @@ export default {
|
||||
this.$events.emit('on-subtask-edited', subtask)
|
||||
} catch (error) {
|
||||
this.$toast.error(error.message || error)
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
console.log('[z-task-add-time-modal.vue] Error: ', error)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -222,7 +222,9 @@ export default {
|
||||
this.$events.on('on-subtask-edited', (subtask) => {
|
||||
if (subtask?.id !== this.subtask?.id) return
|
||||
const data = JSON.parse(JSON.stringify(subtask))
|
||||
const splittedDeadline = data.deadline.split(' ')
|
||||
|
||||
const splittedDeadline = data.deadline?.split(' ') || []
|
||||
|
||||
data.deadline = splittedDeadline[0]
|
||||
data._deadline_time = splittedDeadline[1]
|
||||
this.subtask = this._enrichTask(data)
|
||||
@@ -260,7 +262,7 @@ export default {
|
||||
}]
|
||||
this.$nextTick(() => {
|
||||
this.v$.$reset()
|
||||
this.setFocusEvent()
|
||||
this.setFocusEvent()
|
||||
})
|
||||
|
||||
try {
|
||||
@@ -312,8 +314,10 @@ export default {
|
||||
}
|
||||
this.editMode = editMode || !this.subtask.id
|
||||
} catch (error) {
|
||||
console.error('ERROR', error)
|
||||
this.$toast.error(this.$parseError(error))
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
console.log('[z-task-modal.vue] Error: ', error)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -372,6 +376,9 @@ export default {
|
||||
this.closeModal()
|
||||
} catch (error) {
|
||||
this.$toast.error(this.$parseError(error))
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
console.log('[z-task-modal.vue] Error: ', error)
|
||||
} finally {
|
||||
this.isSaving = false
|
||||
}
|
||||
@@ -396,6 +403,7 @@ export default {
|
||||
|
||||
_mergeDeadlineTimeDate() {
|
||||
const date = new Date(this.subtask.deadline)
|
||||
console.log('z-task-modal', this.subtask)
|
||||
const timeParts = this.subtask._deadline_time.split(':')
|
||||
|
||||
date.setHours(parseInt(timeParts[0]))
|
||||
@@ -590,7 +598,7 @@ export default {
|
||||
position: relative
|
||||
border-top: 1px solid #e0e0e0
|
||||
padding: 20px 0 10px 0
|
||||
|
||||
|
||||
.splitted-time-inputs
|
||||
display: flex !important
|
||||
flex-direction: row !important
|
||||
|
||||
@@ -42,7 +42,7 @@ export default {
|
||||
},
|
||||
|
||||
async deleteTeam() {
|
||||
if (this.isDeleting) return
|
||||
if (this.isDeleting) return
|
||||
|
||||
this.isDeleting = true
|
||||
try {
|
||||
@@ -52,6 +52,9 @@ export default {
|
||||
this.$store.commit('tm/delete_team', this.team)
|
||||
} catch (error) {
|
||||
this.$toast.error(this.$parseError(error))
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
console.log('[z-delete-team-modal.vue] Error: ', error)
|
||||
} finally {
|
||||
this.isDeleting = false
|
||||
}
|
||||
|
||||
@@ -99,6 +99,9 @@ export default {
|
||||
}
|
||||
} catch (error) {
|
||||
this.$toast.error(this.$parseError(error))
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
console.log('[z-team-modal.vue] Error: ', error)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -113,7 +116,7 @@ export default {
|
||||
try {
|
||||
if (this.team.id) {
|
||||
const { team } = await this.$axios.put_auth(`v1/teams/${this.team.id}`, this.team)
|
||||
|
||||
|
||||
const fullTeamResource = await this.$axios.get_auth_data(`v1/teams/${team.id}`)
|
||||
this.$store.commit('tm/update_team', fullTeamResource)
|
||||
} else {
|
||||
@@ -126,6 +129,9 @@ export default {
|
||||
this.closeModal()
|
||||
} catch (error) {
|
||||
this.$toast.error(this.$parseError(error))
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
console.log('[z-team-modal.vue] Error: ', error)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in new issue
Block a user