Skip to content

Commit

Permalink
[1.13.5] [Task Editor] Fix issue with task activities saving properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Akkadius committed Aug 22, 2022
1 parent 7cf145a commit ce0d0c8
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [1.13.5]

### Fixes

* [Task Editor] Fix issue with task activities saving properly

## [1.13.4]

### Misc Fixes
Expand Down
6 changes: 1 addition & 5 deletions frontend/src/app/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,7 @@ export class Tasks {
// TODO: bubble up error handling
public static async updateTask(task: any) {
// @ts-ignore
return await this.getTaskApi().updateTask({id: task.id, task: task}, {
query: (new SpireQueryBuilder())
.includes(["TaskActivities"])
.get()
})
return await this.getTaskApi().updateTask({id: task.id, task: task})
}

// TODO: bubble up error handling
Expand Down
10 changes: 9 additions & 1 deletion frontend/src/views/tasks/TaskEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1462,7 +1462,15 @@ export default {
async saveTask() {
try {
const r = await Tasks.updateTask(this.getBackendFormattedTask())
const t = this.getBackendFormattedTask()
const r = await Tasks.updateTask(t)
if (t && t.task_activities) {
for (let a of t.task_activities) {
await Tasks.updateTaskActivityId(a, a.activityid)
}
}
if (r.status === 200) {
EditFormFieldUtil.resetFieldEditedStatus()
this.notification = "Task updated!";
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/tasks/components/TaskPreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
class="mt-3"
/>
</div>
<div v-if="task.alternate_currency.item">
<div v-if="task.alternate_currency && task.alternate_currency.item">
<item-popover
:item="task.alternate_currency.item"
v-if="Object.keys(task.alternate_currency.item).length > 0"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "spire",
"version": "1.13.4",
"version": "1.13.5",
"repository": {
"type": "git",
"url": "https://github.com/Akkadius/spire.git"
Expand Down

0 comments on commit ce0d0c8

Please sign in to comment.