Skip to content

Commit

Permalink
fix onLinkFile
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Hartmann <[email protected]>
  • Loading branch information
Chartman123 committed Jan 29, 2025
1 parent 84992cf commit d94dfc9
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/views/Results.vue
Original file line number Diff line number Diff line change
Expand Up @@ -429,14 +429,14 @@ export default {

watch: {
// Reload results, when form changes
async hash() {
await this.fetchFullForm(this.form.id)
hash() {
this.fetchFullForm(this.form.id)
this.loadFormResults()
},
},

async beforeMount() {
await this.fetchFullForm(this.form.id)
this.fetchFullForm(this.form.id)
this.loadFormResults()
SetWindowTitle(this.formTitle)
},
Expand Down Expand Up @@ -508,7 +508,7 @@ export default {
.pick()
.then(async (path) => {
try {
const response = await axios.patch(
await axios.patch(
generateOcsUrl('apps/forms/api/v3/forms/{id}', {
id: this.form.id,
}),
Expand All @@ -519,15 +519,11 @@ export default {
},
},
)
const responseData = OcsResponse2Data(response)

this.form.fileFormat = responseData.fileFormat
this.form.fileId = responseData.fileId
this.form.filePath = responseData.filePath
this.fetchFullForm(this.form.id)

showSuccess(
t('forms', 'File {file} successfully linked', {
file: responseData.fileName,
file: this.form.fileName,
}),
)
emit('forms:last-updated:set', this.form.id)
Expand Down

0 comments on commit d94dfc9

Please sign in to comment.