- add FileUpload vue component

This commit is contained in:
Kaimbacher 2023-06-02 16:55:03 +02:00
parent e051a94b3b
commit f76a92da2c
4 changed files with 334 additions and 13 deletions

View file

@ -12,6 +12,7 @@ import {
mdiBookOpenPageVariant,
mdiImageText,
mdiEarthPlus,
mdiAlertBoxOutline
} from '@mdi/js';
import LayoutAuthenticated from '@/Layouts/LayoutAuthenticated.vue';
import SectionMain from '@/Components/SectionMain.vue';
@ -43,6 +44,7 @@ import { LatLngBoundsExpression } from 'leaflet/src/geo/LatLngBounds';
import { LayerOptions } from '@/Components/Map/LayerOptions';
import TableKeywords from '@/Components/TableKeywords.vue';
import NotificationBar from '@/Components/NotificationBar.vue';
import FileUploadComponent from '@/Components/FileUpload.vue';
const props = defineProps({
licenses: {
@ -215,7 +217,7 @@ watch(depth, (currentValue) => {
// let time= "no_time";
const isModalActive = ref(false);
const formStep = ref(1);
const formStep = ref(4);
const mapOptions: MapOptions = {
center: [48.208174, 16.373819],
@ -1101,17 +1103,19 @@ const onChangeFile = (event) => {
</div>
<div v-if="formStep == 4">
<div class="dropbox">
<!-- <progress v-if="form.progress" :value="form.progress.percentage" max="100">
{{ form.progress.percentage }}%
</progress> -->
<!-- <p v-if="isSaving">Uploading @{{ fileCount }} files...</p> -->
<!-- <div class="dropbox">
<input type="file" multiple name="files" @change="onChangeFile" class="input-file" />
<p>
Drag your file(s) here to begin<br />
or click to browse
</p>
<!-- <progress v-if="form.progress" :value="form.progress.percentage" max="100">
{{ form.progress.percentage }}%
</progress> -->
<!-- <p v-if="isSaving">Uploading @{{ fileCount }} files...</p> -->
</div>
</p>
</div> -->
<FileUploadComponent></FileUploadComponent>
<div class="text-red-400 text-sm" v-if="form.errors['file'] && Array.isArray(form.errors['file'])">
{{ form.errors['file'].join(', ') }}
@ -1119,7 +1123,7 @@ const onChangeFile = (event) => {
<div class="text-red-400 text-sm" v-if="form.errors['upload.label'] && Array.isArray(form.errors['upload.label'])">
{{ form.errors['upload.label'].join(', ') }}
</div>
<label v-if="form.upload">{{ form.upload?.label }}</label>
<!-- <label v-if="form.upload">{{ form.upload?.label }}</label> -->
</div>
</div>