feat: project from excel

Signed-off-by: Pranav C <pranavxc@gmail.com>
This commit is contained in:
Pranav C
2021-11-17 17:16:39 +05:30
parent e8cc5192cb
commit 63d8f4a164
13 changed files with 450 additions and 190 deletions

View File

@@ -43,8 +43,8 @@ export default {
mixins: [colors],
props: {
loading: Boolean,
templateData: Object,
importData: Object,
templateData: [Array, Object],
importData: [Array, Object],
loaderMessage: String,
progress: Number
},
@@ -122,7 +122,10 @@ export default {
this.$ncApis.setProjectId(projectId)
let total = 0; let progress = 0
await Promise.all(Object.entries(this.importData).map(async([table, data]) => {
console.log(this.importData)
debugger
await Promise.all(Object.entries(this.importData).map(v => (async([table, data]) => {
await this.$store.dispatch('meta/ActLoadMeta', {
tn: `${prefix}${table}`, project_id: projectId
})
@@ -142,7 +145,7 @@ export default {
}
this.$emit('update:progress', null)
}))
})(v)))
}
}