From f76a92da2c653a957aef137a9e4aebf4a1bd9735 Mon Sep 17 00:00:00 2001 From: Arno Kaimbacher Date: Fri, 2 Jun 2023 16:55:03 +0200 Subject: [PATCH] - add FileUpload vue component --- .../Http/Submitter/DatasetController.ts | 2 - resources/css/app.css | 4 +- resources/js/Components/FileUpload.vue | 319 ++++++++++++++++++ .../js/Pages/Submitter/Dataset/Create.vue | 22 +- 4 files changed, 334 insertions(+), 13 deletions(-) create mode 100644 resources/js/Components/FileUpload.vue diff --git a/app/Controllers/Http/Submitter/DatasetController.ts b/app/Controllers/Http/Submitter/DatasetController.ts index ae5aa8d..69a4b6a 100644 --- a/app/Controllers/Http/Submitter/DatasetController.ts +++ b/app/Controllers/Http/Submitter/DatasetController.ts @@ -306,8 +306,6 @@ export default class DatasetController { // fieldName: 'file' // size: 135624 - coverImage.fileName = 'test'; //request.input('upload.label'); - //const datasetFolder = 'files/' . dataset->id; // await coverImage.moveToDisk('./') diff --git a/resources/css/app.css b/resources/css/app.css index edfe10e..5c0965f 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -38,9 +38,9 @@ body { /* padding-right: 1.5rem; */ } -.rounded-md { +/* .rounded-md { color: gray; -} +} */ /* body:before { content: ''; diff --git a/resources/js/Components/FileUpload.vue b/resources/js/Components/FileUpload.vue new file mode 100644 index 0000000..ad74389 --- /dev/null +++ b/resources/js/Components/FileUpload.vue @@ -0,0 +1,319 @@ + + + + + diff --git a/resources/js/Pages/Submitter/Dataset/Create.vue b/resources/js/Pages/Submitter/Dataset/Create.vue index a064388..ad2591f 100644 --- a/resources/js/Pages/Submitter/Dataset/Create.vue +++ b/resources/js/Pages/Submitter/Dataset/Create.vue @@ -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) => {
-
+ + + - -
+

+
--> + +
{{ form.errors['file'].join(', ') }} @@ -1119,7 +1123,7 @@ const onChangeFile = (event) => {
{{ form.errors['upload.label'].join(', ') }}
- +