feat: init tools page (#271)

This commit is contained in:
Hayden 2023-02-10 19:38:50 -09:00 committed by GitHub
parent ab22ea6a25
commit 6ff2d64996
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 194 additions and 129 deletions

View file

@ -53,11 +53,16 @@
);
function setFile(e: Event) {
importCsv.value = e.target.files[0];
const result = e.target as HTMLInputElement;
if (!result.files || result.files.length === 0) {
return;
}
importCsv.value = result.files[0];
}
function uploadCsv() {
importRef.value.click();
importRef.value?.click();
}
const eventBus = useEventBus();
@ -86,5 +91,7 @@
}
eventBus.emit(EventTypes.InvalidStores);
toast.success("Import successful!");
}
</script>