Fix Upload Form Vue Errors

This commit is contained in:
Marcos Peña 2022-03-16 12:17:48 +00:00 committed by Georg Krause
parent 7216f3bacc
commit 8e2d686386
4 changed files with 11 additions and 5 deletions

View File

@ -0,0 +1 @@
Fixed upload form VUE erros (#1738) (1738)

View File

@ -332,7 +332,12 @@ export default {
}, },
data () { data () {
const importReference = this.defaultImportReference || moment().format() const importReference = this.defaultImportReference || moment().format()
this.$router.replace({ query: { import: importReference } }) // Since $router.replace is pushing the same route, it raises NavigationDuplicated
this.$router.replace({ query: { import: importReference } }).catch((error) => {
if (error.name !== 'NavigationDuplicated') {
throw error
}
})
return { return {
files: [], files: [],
needsRefresh: false, needsRefresh: false,
@ -349,7 +354,7 @@ export default {
objects: {} objects: {}
}, },
processTimestamp: new Date(), processTimestamp: new Date(),
fsStatus: null, fsStatus: {},
fsPath: [], fsPath: [],
isLoadingFs: false, isLoadingFs: false,
fsInterval: null, fsInterval: null,

View File

@ -54,7 +54,7 @@ export default {
props: { props: {
data: { type: Object, required: true }, data: { type: Object, required: true },
loading: { type: Boolean, required: true }, loading: { type: Boolean, required: true },
value: { type: String, required: true } value: { type: Array, required: true }
}, },
methods: { methods: {
handleClick (element) { handleClick (element) {

View File

@ -31,8 +31,8 @@ export default {
} }
}, },
props: { props: {
object: { type: String, required: true }, object: { type: Object, required: true },
defaultImportReference: { type: String, required: true } defaultImportReference: { type: String, default: '' }
} }
} }
</script> </script>