fix: import csv
This commit is contained in:
parent
f9614b55fb
commit
7999117265
1 changed files with 4 additions and 3 deletions
|
@ -377,7 +377,7 @@
|
|||
<v-card-text>
|
||||
<v-textarea
|
||||
label="Depuis une chaîne de caractères"
|
||||
:disabled="importFile !== null"
|
||||
:disabled="importFile !== undefined && importFile !== null"
|
||||
v-model="importData"/>
|
||||
<v-file-input
|
||||
label="Depuis un fichier texte ou csv"
|
||||
|
@ -753,9 +753,11 @@ export default {
|
|||
importOrganizations () {
|
||||
this.importLoading = true
|
||||
const exec = data => {
|
||||
data = data.trim()
|
||||
this.$apitator.post('/admin/organizations/import', { data }, { withAuth: true }).then(() => {
|
||||
this.approveModal = false
|
||||
this.importModal = false
|
||||
this.importLoading = false
|
||||
this.fetchData()
|
||||
this.$store.commit('ADD_ALERT', {
|
||||
color: 'success',
|
||||
text: 'Importation réussite, une grande aventure commence...'
|
||||
|
@ -769,7 +771,6 @@ export default {
|
|||
})
|
||||
}
|
||||
if (this.importData.length > 0) {
|
||||
console.log('use str')
|
||||
exec(this.importData)
|
||||
} else {
|
||||
const reader = new FileReader()
|
||||
|
|
Loading…
Reference in a new issue