mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[Merge] API
This commit is contained in:
commit
9d1fd6c16b
11 files changed
+35
-34
No files matched your search
@@ -393,10 +393,10 @@ export default {
|
||||
|
||||
try {
|
||||
if (this.masterTask.id)
|
||||
await this.$axios.post_auth(`v1/master-tasks/${this.masterTask.id}`, this.masterTask)
|
||||
await this.$axios.patch_auth(`v1/master-tasks/${this.masterTask.id}`, this.masterTask)
|
||||
|
||||
else
|
||||
await this.$axios.post_auth('v1/mastertasks')
|
||||
await this.$axios.post_auth('v1/mastertasks', this.masterTask)
|
||||
|
||||
this.closeModal()
|
||||
// this.$router.push({ name: 'Dashboard - Tasks' })
|
||||
|
||||
@@ -37,9 +37,10 @@ export default {
|
||||
|
||||
async complete() {
|
||||
try {
|
||||
await this.$axios.post(`v1/tasks/${this.task.id}`, {...this.task, is_finished: true})
|
||||
const task = {...this.task, is_finished: true}
|
||||
await this.$axios.patch_auth(`v1/tasks/${this.task.id}`, task)
|
||||
this.visible = false
|
||||
this.$emit('task-completed', this.task)
|
||||
this.$emit('task-completed', task)
|
||||
} catch (error) {
|
||||
this.$toast.error(error)
|
||||
}
|
||||
|
||||
@@ -418,9 +418,9 @@ export default {
|
||||
|
||||
try {
|
||||
if (this.task.id) {
|
||||
await this.$axios.post_auth(`v1/master-tasks/${this.task.id}`)
|
||||
await this.$axios.patch_auth(`v1/master-tasks/${this.task.id}`, this.task)
|
||||
} else {
|
||||
await this.$axios.post_auth('v1/mastertasks')
|
||||
await this.$axios.post_auth('v1/mastertasks', this.task)
|
||||
}
|
||||
|
||||
this.closeModal()
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
emits: ['deleted'],
|
||||
emits: ['update'],
|
||||
|
||||
data() {
|
||||
return {
|
||||
@@ -39,9 +39,9 @@ export default {
|
||||
|
||||
async deleteTeam() {
|
||||
try {
|
||||
await this.$axios.delete(`v1/teams/${this.team.id}`)
|
||||
await this.$axios.delete_auth(`v1/teams/${this.team.id}`)
|
||||
this.visible = false
|
||||
this.$emit('deleted', this.team)
|
||||
this.$emit('update', this.team)
|
||||
} catch (error) {
|
||||
this.$toast.error(error)
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ import tmUtils from '@/plugins/tm@_utils/tm.utils'
|
||||
const atLeastOne = (value) => value.length
|
||||
|
||||
export default {
|
||||
emits: ['close'],
|
||||
emits: ['close', 'update'],
|
||||
|
||||
components: {
|
||||
ZAutocomplete,
|
||||
|
||||
Reference in new issue
Block a user