2023-03-17 15:13:37 +00:00
|
|
|
<script setup lang="ts">
|
2023-06-01 12:29:56 +00:00
|
|
|
import { Head, useForm, usePage } from '@inertiajs/vue3';
|
|
|
|
import { ref, watch, computed, ComputedRef } from 'vue';
|
2023-09-04 11:24:58 +00:00
|
|
|
import FormValidationErrors from '@/Components/FormValidationErrors.vue';
|
2024-09-16 15:59:46 +00:00
|
|
|
import { Dataset, Title, Subject } from '@/Dataset';
|
2023-03-24 10:41:52 +00:00
|
|
|
import {
|
|
|
|
mdiDatabasePlus,
|
|
|
|
mdiMinusCircle,
|
|
|
|
mdiPlusCircle,
|
|
|
|
mdiFinance,
|
|
|
|
mdiInformationOutline,
|
|
|
|
mdiBookOpenPageVariant,
|
|
|
|
mdiImageText,
|
2023-03-31 12:54:15 +00:00
|
|
|
mdiEarthPlus,
|
2023-08-01 15:06:51 +00:00
|
|
|
mdiAlertBoxOutline,
|
|
|
|
mdiTrashCan
|
2023-03-24 10:41:52 +00:00
|
|
|
} from '@mdi/js';
|
2023-03-17 15:13:37 +00:00
|
|
|
import LayoutAuthenticated from '@/Layouts/LayoutAuthenticated.vue';
|
|
|
|
import SectionMain from '@/Components/SectionMain.vue';
|
|
|
|
import SectionTitleLineWithButton from '@/Components/SectionTitleLineWithButton.vue';
|
|
|
|
import CardBox from '@/Components/CardBox.vue';
|
|
|
|
import FormField from '@/Components/FormField.vue';
|
|
|
|
import FormControl from '@/Components/FormControl.vue';
|
|
|
|
import FormCheckRadioGroup from '@/Components/FormCheckRadioGroup.vue';
|
|
|
|
import BaseButton from '@/Components/BaseButton.vue';
|
|
|
|
import { stardust } from '@eidellev/adonis-stardust/client';
|
|
|
|
// import { Inertia } from '@inertiajs/inertia';
|
|
|
|
import CardBoxModal from '@/Components/CardBoxModal.vue';
|
|
|
|
import BaseIcon from '@/Components/BaseIcon.vue';
|
|
|
|
|
|
|
|
import IconWizard from '@/Components/Icons/Wizard.vue';
|
|
|
|
import IconMandatory from '@/Components/Icons/Mandatory.vue';
|
|
|
|
import IconLanguage from '@/Components/Icons/Language.vue';
|
|
|
|
import IconRecommendet from '@/Components/Icons/Recommendet.vue';
|
|
|
|
import IconConfirm from '@/Components/Icons/Confirm.vue';
|
|
|
|
import SearchAutocomplete from '@/Components/SearchAutocomplete.vue';
|
2023-03-24 10:41:52 +00:00
|
|
|
import TablePersons from '@/Components/TablePersons.vue';
|
|
|
|
import { MainService } from '@/Stores/main';
|
|
|
|
import { notify } from '@/notiwind';
|
2023-05-02 16:10:32 +00:00
|
|
|
import MapComponent from '@/Components/Map/map.component.vue';
|
2023-04-06 16:56:41 +00:00
|
|
|
import { MapOptions } from '@/Components/Map/MapOptions';
|
2024-10-31 10:02:36 +00:00
|
|
|
// import { LatLngBoundsExpression } from 'leaflet/src/geo/LatLngBounds';
|
|
|
|
import { LatLngBoundsExpression } from 'leaflet';
|
2023-04-06 16:56:41 +00:00
|
|
|
import { LayerOptions } from '@/Components/Map/LayerOptions';
|
2023-05-19 09:30:49 +00:00
|
|
|
import TableKeywords from '@/Components/TableKeywords.vue';
|
2023-06-01 12:29:56 +00:00
|
|
|
import NotificationBar from '@/Components/NotificationBar.vue';
|
2023-06-02 14:55:03 +00:00
|
|
|
import FileUploadComponent from '@/Components/FileUpload.vue';
|
2024-09-16 15:59:46 +00:00
|
|
|
import Person from '#models/person';
|
2023-03-17 15:13:37 +00:00
|
|
|
|
|
|
|
const props = defineProps({
|
|
|
|
licenses: {
|
|
|
|
type: Object,
|
|
|
|
default: () => ({}),
|
|
|
|
},
|
|
|
|
doctypes: {
|
|
|
|
type: Object,
|
|
|
|
default: () => ({}),
|
|
|
|
},
|
|
|
|
titletypes: {
|
|
|
|
type: Object,
|
|
|
|
default: () => ({}),
|
|
|
|
},
|
|
|
|
descriptiontypes: {
|
|
|
|
type: Object,
|
|
|
|
default: () => ({}),
|
|
|
|
},
|
2023-03-24 10:41:52 +00:00
|
|
|
projects: {
|
|
|
|
type: Object,
|
|
|
|
default: () => ({}),
|
|
|
|
},
|
2023-08-01 15:06:51 +00:00
|
|
|
referenceIdentifierTypes: {
|
|
|
|
type: Object,
|
|
|
|
default: () => ({}),
|
|
|
|
},
|
|
|
|
relationTypes: {
|
|
|
|
type: Object,
|
|
|
|
default: () => ({}),
|
|
|
|
},
|
2023-09-12 14:09:04 +00:00
|
|
|
contributorTypes: {
|
|
|
|
type: Object,
|
|
|
|
default: () => ({}),
|
|
|
|
},
|
|
|
|
subjectTypes: {
|
|
|
|
type: Object,
|
|
|
|
default: () => ({}),
|
|
|
|
},
|
2023-03-17 15:13:37 +00:00
|
|
|
errors: {
|
|
|
|
type: Object,
|
|
|
|
default: () => ({}),
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
2023-06-01 12:29:56 +00:00
|
|
|
const flash: ComputedRef<any> = computed(() => {
|
|
|
|
// let test = usePage();
|
|
|
|
// console.log(test);
|
|
|
|
return usePage().props.flash;
|
|
|
|
});
|
|
|
|
|
2023-03-24 10:41:52 +00:00
|
|
|
const mainService = MainService();
|
|
|
|
|
2023-06-01 12:29:56 +00:00
|
|
|
// let serrors = reactive([]);
|
|
|
|
|
2023-03-17 15:13:37 +00:00
|
|
|
// const form = useForm({
|
|
|
|
// language: '',
|
|
|
|
// licenses: [],
|
|
|
|
// type: '',
|
|
|
|
// titles: [{ value: '', type: 'Main', language: Dataset.language }],
|
|
|
|
// });
|
|
|
|
// let language: (string | Ref<string>) = ref('');
|
|
|
|
let language = ref('');
|
2023-03-24 10:41:52 +00:00
|
|
|
let dataset: Dataset;
|
|
|
|
if (Object.keys(mainService.dataset).length == 0) {
|
|
|
|
// language = ref('');
|
|
|
|
dataset = {
|
2024-02-02 13:00:54 +00:00
|
|
|
language: language.value,
|
2023-03-24 10:41:52 +00:00
|
|
|
licenses: [],
|
|
|
|
rights: false,
|
|
|
|
type: '',
|
|
|
|
creating_corporation: 'Tethys RDR',
|
2024-02-02 13:00:54 +00:00
|
|
|
titles: [{ value: '', type: 'Main', language: language.value }],
|
|
|
|
descriptions: [{ value: '', type: 'Abstract', language: language.value }],
|
2023-03-24 10:41:52 +00:00
|
|
|
authors: [],
|
|
|
|
contributors: [],
|
|
|
|
project_id: undefined,
|
|
|
|
embargo_date: '',
|
2023-03-31 12:54:15 +00:00
|
|
|
coverage: {
|
2023-05-02 16:10:32 +00:00
|
|
|
x_min: undefined,
|
|
|
|
y_min: undefined,
|
|
|
|
x_max: undefined,
|
|
|
|
y_max: undefined,
|
2023-03-31 12:54:15 +00:00
|
|
|
elevation_min: undefined,
|
|
|
|
elevation_max: undefined,
|
|
|
|
elevation_absolut: undefined,
|
|
|
|
depth_min: undefined,
|
|
|
|
depth_max: undefined,
|
|
|
|
depth_absolut: undefined,
|
|
|
|
time_min: undefined,
|
|
|
|
time_max: undefined,
|
|
|
|
time_absolut: undefined,
|
|
|
|
},
|
2023-03-24 10:41:52 +00:00
|
|
|
// errors: undefined,
|
2023-05-19 09:30:49 +00:00
|
|
|
subjects: [
|
2023-06-01 12:29:56 +00:00
|
|
|
{ value: '', type: 'uncontrolled', language: language.value },
|
|
|
|
{ value: '', type: 'uncontrolled', language: language.value },
|
|
|
|
{ value: '', type: 'uncontrolled', language: language.value },
|
2023-05-19 09:30:49 +00:00
|
|
|
],
|
2023-08-01 15:06:51 +00:00
|
|
|
references: [],
|
2023-06-16 14:44:28 +00:00
|
|
|
files: [],
|
|
|
|
// upload: { label: 'test', sorting: 0 },
|
2023-03-24 10:41:52 +00:00
|
|
|
};
|
2023-06-01 12:29:56 +00:00
|
|
|
// Set the form's current values as the new defaults...
|
2023-03-24 10:41:52 +00:00
|
|
|
// mainService.setDataset(dataset, language);
|
|
|
|
} else {
|
|
|
|
// console.log(mainService.dataset);
|
2024-02-02 13:00:54 +00:00
|
|
|
language.value = mainService.dataset.language;
|
2023-03-24 10:41:52 +00:00
|
|
|
|
|
|
|
// dataset = mainService.dataset;
|
|
|
|
dataset = {
|
2024-02-02 13:00:54 +00:00
|
|
|
language: mainService.dataset.language,
|
2023-03-24 10:41:52 +00:00
|
|
|
licenses: mainService.dataset.licenses,
|
|
|
|
rights: mainService.dataset.rights,
|
|
|
|
type: mainService.dataset.type,
|
|
|
|
creating_corporation: mainService.dataset.creating_corporation,
|
|
|
|
titles: mainService.dataset.titles,
|
|
|
|
descriptions: mainService.dataset.descriptions,
|
|
|
|
authors: mainService.dataset.authors,
|
|
|
|
contributors: mainService.dataset.contributors,
|
|
|
|
project_id: mainService.dataset.project_id,
|
|
|
|
embargo_date: mainService.dataset.embargo_date,
|
2023-03-31 12:54:15 +00:00
|
|
|
coverage: mainService.dataset.coverage,
|
2023-05-19 09:30:49 +00:00
|
|
|
subjects: mainService.dataset.subjects,
|
2023-08-01 15:06:51 +00:00
|
|
|
references: mainService.dataset.references,
|
2023-06-16 14:44:28 +00:00
|
|
|
files: mainService.dataset.files,
|
|
|
|
// upload: mainService.dataset.upload,
|
2023-03-24 10:41:52 +00:00
|
|
|
};
|
2024-02-02 13:00:54 +00:00
|
|
|
// for (let index in mainService.dataset.titles) {
|
|
|
|
// let title: Title = mainService.dataset.titles[index];
|
|
|
|
// if (title.type == 'Main') {
|
|
|
|
// title.language = language;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// for (let index in mainService.dataset.descriptions) {
|
|
|
|
// let description: Description = mainService.dataset.descriptions[index];
|
|
|
|
// if (description.type == 'Abstract') {
|
|
|
|
// description.language = language;
|
|
|
|
// }
|
|
|
|
// }
|
2023-03-24 10:41:52 +00:00
|
|
|
}
|
|
|
|
|
2024-02-02 13:00:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2023-03-24 10:41:52 +00:00
|
|
|
// const form = useForm<Dataset>({
|
2023-03-17 15:13:37 +00:00
|
|
|
// language: language,
|
|
|
|
// licenses: [],
|
|
|
|
// rights: false,
|
|
|
|
// type: '',
|
|
|
|
// creating_corporation: 'Tethys RDR',
|
|
|
|
// titles: [{ value: '', type: 'Main', language: language }],
|
|
|
|
// descriptions: [{ value: '', type: 'Abstract', language: language }],
|
|
|
|
// });
|
2023-11-22 16:06:55 +00:00
|
|
|
let form = useForm<Dataset>(dataset as Dataset);
|
2023-06-01 12:29:56 +00:00
|
|
|
// form.defaults();
|
2023-03-17 15:13:37 +00:00
|
|
|
|
|
|
|
// const emit = defineEmits(['update:modelValue', 'setRef']);
|
|
|
|
// computed({
|
|
|
|
// get: () => form.rights,
|
|
|
|
// set: (value) => {
|
|
|
|
// emit('update:modelValue', value);
|
|
|
|
// },
|
|
|
|
// });
|
|
|
|
|
2024-02-02 13:00:54 +00:00
|
|
|
watch(language, (currentValue) => {
|
|
|
|
if (currentValue != "") {
|
|
|
|
form.language = currentValue;
|
|
|
|
const mainTitle = form.titles?.find((title) => title.type === 'Main');
|
|
|
|
if (mainTitle) {
|
|
|
|
mainTitle.language = currentValue;
|
|
|
|
}
|
|
|
|
const mainAbstract = form.descriptions?.find((desc) => desc.type === 'Abstract');
|
|
|
|
if (mainAbstract) {
|
|
|
|
mainAbstract.language = currentValue;
|
|
|
|
}
|
|
|
|
mainService.setDataset(form.data());
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2023-05-02 16:10:32 +00:00
|
|
|
let elevation = ref('no_elevation');
|
|
|
|
watch(elevation, (currentValue) => {
|
|
|
|
if (currentValue == 'absolut') {
|
|
|
|
form.coverage.elevation_min = undefined;
|
|
|
|
form.coverage.elevation_max = undefined;
|
|
|
|
} else if (currentValue == 'range') {
|
|
|
|
form.coverage.elevation_absolut = undefined;
|
|
|
|
} else {
|
|
|
|
form.coverage.elevation_absolut = undefined;
|
|
|
|
form.coverage.elevation_min = undefined;
|
|
|
|
form.coverage.elevation_max = undefined;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
let depth = ref('no_depth');
|
|
|
|
watch(depth, (currentValue) => {
|
|
|
|
if (currentValue == 'absolut') {
|
|
|
|
form.coverage.depth_min = undefined;
|
|
|
|
form.coverage.depth_max = undefined;
|
|
|
|
} else if (currentValue == 'range') {
|
|
|
|
form.coverage.depth_absolut = undefined;
|
|
|
|
} else {
|
|
|
|
form.coverage.depth_absolut = undefined;
|
|
|
|
form.coverage.depth_min = undefined;
|
|
|
|
form.coverage.depth_max = undefined;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
// let time= "no_time";
|
|
|
|
|
2023-03-17 15:13:37 +00:00
|
|
|
const isModalActive = ref(false);
|
2023-06-16 14:44:28 +00:00
|
|
|
const formStep = ref(1);
|
2023-03-17 15:13:37 +00:00
|
|
|
|
2023-03-31 12:54:15 +00:00
|
|
|
const mapOptions: MapOptions = {
|
|
|
|
center: [48.208174, 16.373819],
|
|
|
|
zoom: 3,
|
|
|
|
zoomControl: false,
|
2023-05-02 16:10:32 +00:00
|
|
|
attributionControl: false,
|
2023-03-31 12:54:15 +00:00
|
|
|
};
|
|
|
|
const baseMaps: Map<string, LayerOptions> = new Map<string, LayerOptions>();
|
2023-05-02 16:10:32 +00:00
|
|
|
const fitBounds: LatLngBoundsExpression = [
|
2023-03-31 12:54:15 +00:00
|
|
|
[46.4318173285, 9.47996951665],
|
|
|
|
[49.0390742051, 16.9796667823],
|
|
|
|
];
|
2023-05-02 16:10:32 +00:00
|
|
|
const mapId = 'test';
|
2023-03-31 12:54:15 +00:00
|
|
|
|
2023-03-17 15:13:37 +00:00
|
|
|
// const submit = async () => {
|
|
|
|
// await router.post(stardust.route('user.store'), form, {
|
|
|
|
// onSuccess: () => {
|
|
|
|
// form.reset(), (formStep.value = 1);
|
|
|
|
// },
|
|
|
|
// });
|
|
|
|
// };
|
|
|
|
|
|
|
|
const nextStep = async () => {
|
2024-10-31 10:02:36 +00:00
|
|
|
let route = "";
|
2023-03-24 10:41:52 +00:00
|
|
|
if (formStep.value == 1) {
|
|
|
|
route = stardust.route('dataset.first.step');
|
|
|
|
} else if (formStep.value == 2) {
|
2023-03-17 15:13:37 +00:00
|
|
|
route = stardust.route('dataset.second.step');
|
2023-03-24 10:41:52 +00:00
|
|
|
} else if (formStep.value == 3) {
|
|
|
|
route = stardust.route('dataset.third.step');
|
2023-03-17 15:13:37 +00:00
|
|
|
}
|
|
|
|
// formStep.value++;
|
|
|
|
await form
|
|
|
|
.transform((data) => ({
|
|
|
|
...data,
|
|
|
|
rights: form.rights && form.rights == true ? 'true' : 'false',
|
|
|
|
}))
|
|
|
|
.post(route, {
|
|
|
|
onSuccess: () => {
|
2023-03-24 10:41:52 +00:00
|
|
|
// console.log(form.data());
|
|
|
|
mainService.setDataset(form.data());
|
2023-03-17 15:13:37 +00:00
|
|
|
formStep.value++;
|
|
|
|
},
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
const prevStep = () => {
|
|
|
|
formStep.value--;
|
|
|
|
};
|
|
|
|
|
2023-06-01 12:29:56 +00:00
|
|
|
const submit = async () => {
|
|
|
|
let route = stardust.route('dataset.submit');
|
|
|
|
|
2023-11-27 16:17:22 +00:00
|
|
|
const files = form.files.map((obj) => {
|
|
|
|
return new File([obj.blob], obj.label, { type: obj.type, lastModified: obj.lastModified });
|
|
|
|
});
|
2023-06-01 12:29:56 +00:00
|
|
|
|
|
|
|
// formStep.value++;
|
|
|
|
await form
|
|
|
|
.transform((data) => ({
|
2024-02-02 13:00:54 +00:00
|
|
|
...data,
|
2023-11-27 16:17:22 +00:00
|
|
|
files: files,
|
2023-06-01 12:29:56 +00:00
|
|
|
rights: form.rights && form.rights == true ? 'true' : 'false',
|
|
|
|
}))
|
|
|
|
.post(route, {
|
2023-06-16 14:44:28 +00:00
|
|
|
// forceFormData: true,
|
2023-06-01 12:29:56 +00:00
|
|
|
onSuccess: () => {
|
|
|
|
// console.log(form.data());
|
|
|
|
// mainService.clearDataset();
|
|
|
|
// mainService.setDataset(form.data());
|
|
|
|
// formStep.value++;
|
|
|
|
// form.reset();
|
|
|
|
|
|
|
|
language.value = '';
|
|
|
|
formStep.value = 1;
|
|
|
|
let dataset = {
|
|
|
|
language: language,
|
|
|
|
licenses: [],
|
|
|
|
rights: false,
|
|
|
|
type: '',
|
|
|
|
creating_corporation: 'Tethys RDR',
|
|
|
|
titles: [{ value: '', type: 'Main', language: language }],
|
|
|
|
descriptions: [{ value: '', type: 'Abstract', language: language }],
|
|
|
|
authors: [],
|
|
|
|
contributors: [],
|
|
|
|
project_id: undefined,
|
|
|
|
embargo_date: '',
|
|
|
|
coverage: {
|
|
|
|
x_min: undefined,
|
|
|
|
y_min: undefined,
|
|
|
|
x_max: undefined,
|
|
|
|
y_max: undefined,
|
|
|
|
elevation_min: undefined,
|
|
|
|
elevation_max: undefined,
|
|
|
|
elevation_absolut: undefined,
|
|
|
|
depth_min: undefined,
|
|
|
|
depth_max: undefined,
|
|
|
|
depth_absolut: undefined,
|
|
|
|
time_min: undefined,
|
|
|
|
time_max: undefined,
|
|
|
|
time_absolut: undefined,
|
|
|
|
},
|
|
|
|
// errors: undefined,
|
|
|
|
subjects: [
|
|
|
|
{ value: '', type: 'uncontrolled', language: language.value },
|
|
|
|
{ value: '', type: 'uncontrolled', language: language.value },
|
|
|
|
{ value: '', type: 'uncontrolled', language: language.value },
|
|
|
|
],
|
2023-08-01 15:06:51 +00:00
|
|
|
references: [],
|
2023-06-16 14:44:28 +00:00
|
|
|
files: [] as Array<File>,
|
2023-06-01 12:29:56 +00:00
|
|
|
upload: { label: 'test', sorting: 0 },
|
|
|
|
};
|
|
|
|
form = useForm<Dataset>(dataset);
|
|
|
|
mainService.setDataset(form.data());
|
|
|
|
},
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2024-06-14 10:38:04 +00:00
|
|
|
const addNewAuthor = () => {
|
|
|
|
let newAuthor = { status: false, first_name: '', last_name: '', email: '', academic_title: '', identifier_orcid: '', name_type: 'Personal' };
|
|
|
|
form.authors.push(newAuthor);
|
|
|
|
};
|
|
|
|
|
2023-03-17 15:13:37 +00:00
|
|
|
const addTitle = () => {
|
|
|
|
let newTitle: Title = { value: '', language: '', type: '' };
|
|
|
|
//this.dataset.files.push(uploadedFiles[i]);
|
|
|
|
form.titles.push(newTitle);
|
|
|
|
};
|
2024-09-16 15:59:46 +00:00
|
|
|
const removeTitle = (key: number) => {
|
2023-03-17 15:13:37 +00:00
|
|
|
form.titles.splice(key, 1);
|
|
|
|
};
|
|
|
|
|
|
|
|
const addDescription = () => {
|
|
|
|
let newDescription = { value: '', language: '', type: '' };
|
|
|
|
//this.dataset.files.push(uploadedFiles[i]);
|
|
|
|
form.descriptions.push(newDescription);
|
|
|
|
};
|
2024-09-16 15:59:46 +00:00
|
|
|
const removeDescription = (key: number) => {
|
2023-03-17 15:13:37 +00:00
|
|
|
form.descriptions.splice(key, 1);
|
|
|
|
};
|
2023-03-24 10:41:52 +00:00
|
|
|
|
2024-09-16 15:59:46 +00:00
|
|
|
const onAddAuthor = (person: Person) => {
|
2023-03-24 10:41:52 +00:00
|
|
|
if (form.authors.filter((e) => e.id === person.id).length > 0) {
|
|
|
|
notify({ type: 'warning', title: 'Warning', text: 'person is already defined as author' }, 4000);
|
|
|
|
} else if (form.contributors.filter((e) => e.id === person.id).length > 0) {
|
|
|
|
notify({ type: 'warning', title: 'Warning', text: 'person is already defined as contributor' });
|
|
|
|
} else {
|
|
|
|
form.authors.push(person);
|
|
|
|
notify({ type: 'info', text: 'person has been successfully added as author' });
|
|
|
|
}
|
|
|
|
};
|
2024-09-16 15:59:46 +00:00
|
|
|
const onAddContributor = (person: Person) => {
|
2023-03-24 10:41:52 +00:00
|
|
|
if (form.contributors.filter((e) => e.id === person.id).length > 0) {
|
|
|
|
notify({ type: 'warning', title: 'Warning', text: 'person is already defined as contributor' }, 4000);
|
|
|
|
} else if (form.authors.filter((e) => e.id === person.id).length > 0) {
|
|
|
|
notify({ type: 'warning', title: 'Warning', text: 'person is already defined as author' }, 4000);
|
|
|
|
} else {
|
|
|
|
// person.pivot = { contributor_type: '' };
|
|
|
|
// // person.pivot = { name_type: '', contributor_type: '' };
|
|
|
|
form.contributors.push(person);
|
|
|
|
notify({ type: 'info', text: 'person has been successfully added as contributor' }, 4000);
|
|
|
|
}
|
|
|
|
};
|
2023-05-02 16:10:32 +00:00
|
|
|
// const onMapInitializedEvent = "onMapInitializedEvent";
|
2024-09-16 15:59:46 +00:00
|
|
|
const onMapInitialized = (newItem: any) => {
|
2023-03-31 12:54:15 +00:00
|
|
|
// notify({ type: 'info', text: message });
|
|
|
|
console.log(newItem);
|
|
|
|
};
|
2023-05-19 09:30:49 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
adds a new Keyword
|
|
|
|
*/
|
|
|
|
const addKeyword = () => {
|
2023-11-29 15:52:41 +00:00
|
|
|
let newSubject: Subject = { value: 'test', language: '', type: 'uncontrolled' };
|
2023-05-19 09:30:49 +00:00
|
|
|
//this.dataset.files.push(uploadedFiles[i]);
|
|
|
|
form.subjects.push(newSubject);
|
|
|
|
};
|
2023-06-01 12:29:56 +00:00
|
|
|
|
2023-08-01 15:06:51 +00:00
|
|
|
const addReference = () => {
|
|
|
|
let newReference = { value: '', label: '', relation: '', type: '' };
|
|
|
|
//this.dataset.files.push(uploadedFiles[i]);
|
|
|
|
form.references.push(newReference);
|
|
|
|
};
|
|
|
|
/*
|
|
|
|
Removes a selected reference
|
|
|
|
*/
|
2024-09-16 15:59:46 +00:00
|
|
|
const removeReference = (key: number) => {
|
2023-08-01 15:06:51 +00:00
|
|
|
form.references.splice(key, 1);
|
|
|
|
};
|
2023-09-12 14:09:04 +00:00
|
|
|
/*
|
2023-08-01 15:06:51 +00:00
|
|
|
|
2023-06-16 14:44:28 +00:00
|
|
|
// const onChangeFile = (event) => {
|
|
|
|
// // let uploadedFile = event.target.files[0];
|
2023-06-01 12:29:56 +00:00
|
|
|
|
2023-06-16 14:44:28 +00:00
|
|
|
// let fileName = String(event.target.files[0].name.replace(/\.[^/.]+$/, ''));
|
|
|
|
// form.file = event.target.files[0];
|
|
|
|
// form.upload.label = fileName;
|
|
|
|
// // form.upload = file;
|
|
|
|
// // console.log(file.file);
|
|
|
|
// };
|
2023-05-19 09:30:49 +00:00
|
|
|
/*
|
2023-08-01 15:06:51 +00:00
|
|
|
Removes a selected keyword
|
|
|
|
*/
|
2023-05-19 09:30:49 +00:00
|
|
|
// const removeKeyword = (key) => {
|
|
|
|
// form.subjects.splice(key, 1);
|
|
|
|
// };
|
2023-03-17 15:13:37 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<CardBoxModal v-model="isModalActive" title="Einverständniserklärung *">
|
|
|
|
Mit dem Setzen des Hakens bestätige ich hiermit
|
|
|
|
<ul class="list-decimal">
|
|
|
|
<li>
|
2024-06-14 10:38:04 +00:00
|
|
|
die Data Policy von Tethys RDR sowie die Terms & Conditions von Tethys gelesen und verstanden zu haben
|
|
|
|
(<a href="/docs/HandbuchTethys.pdf" target="_blank">siehe hier</a>)
|
2023-08-01 15:06:51 +00:00
|
|
|
</li>
|
2024-06-14 10:38:04 +00:00
|
|
|
<li>das Einverständnis aller Co-Autoren über die bevorstehende Datenpublikation schriftlich eingeholt zu
|
|
|
|
haben
|
2023-03-17 15:13:37 +00:00
|
|
|
</li>
|
|
|
|
<li>sowohl mit der Data Policy als auch mit den Terms & Conditions einverstanden zu sein</li>
|
|
|
|
</ul>
|
|
|
|
</CardBoxModal>
|
|
|
|
|
|
|
|
<LayoutAuthenticated>
|
2023-08-01 15:06:51 +00:00
|
|
|
|
2023-03-17 15:13:37 +00:00
|
|
|
<Head title="Submit Dataset" />
|
|
|
|
<SectionMain>
|
|
|
|
<SectionTitleLineWithButton :icon="mdiDatabasePlus" title="Submit dataset" main>
|
|
|
|
<!-- <BaseButton :route-name="stardust.route('user.index')" :icon="mdiArrowLeftBoldOutline" label="Back"
|
|
|
|
color="white" rounded-full small /> -->
|
2023-03-24 10:41:52 +00:00
|
|
|
{{ formStep }}
|
2023-03-17 15:13:37 +00:00
|
|
|
</SectionTitleLineWithButton>
|
2023-06-01 12:29:56 +00:00
|
|
|
<NotificationBar v-if="flash.message" color="success" :icon="mdiAlertBoxOutline">
|
|
|
|
{{ flash.message }}
|
|
|
|
</NotificationBar>
|
2023-09-04 11:24:58 +00:00
|
|
|
<FormValidationErrors v-bind:errors="errors" />
|
2023-03-17 15:13:37 +00:00
|
|
|
|
|
|
|
<CardBox>
|
|
|
|
<div class="mx-4 p-4">
|
|
|
|
<div class="flex items-center">
|
|
|
|
<!-- <label>{{ form.titles[0].language }}</label>
|
|
|
|
<label>{{ form.language }}</label> -->
|
|
|
|
<icon-wizard :is-current="formStep == 1" :is-checked="formStep > 1" :label="'Language'">
|
|
|
|
<icon-language></icon-language>
|
|
|
|
</icon-wizard>
|
|
|
|
|
|
|
|
<icon-wizard :is-current="formStep == 2" :is-checked="formStep > 2" :label="'Mandatory'">
|
|
|
|
<icon-mandatory></icon-mandatory>
|
|
|
|
</icon-wizard>
|
|
|
|
|
2024-10-31 10:02:36 +00:00
|
|
|
<icon-wizard :is-current="formStep == 3" :is-checked="formStep > 3" :label="'Recommended'">
|
2023-03-17 15:13:37 +00:00
|
|
|
<icon-recommendet></icon-recommendet>
|
|
|
|
</icon-wizard>
|
|
|
|
|
2023-08-01 15:06:51 +00:00
|
|
|
<icon-wizard :is-current="formStep == 4" :is-checked="false" :label="'Confirm'"
|
|
|
|
:is-last-step="true">
|
2023-03-17 15:13:37 +00:00
|
|
|
<icon-confirm></icon-confirm>
|
|
|
|
</icon-wizard>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- mt-8: margin-top: 2rem; /* 32px */ 4 p-4: spacing 1rem 16px-->
|
|
|
|
<div class="mt-8 p-4">
|
|
|
|
<div v-if="formStep == 1">
|
|
|
|
<div class="flex flex-col md:flex-row">
|
2023-08-01 15:06:51 +00:00
|
|
|
<FormField label="Language *" help="required: select dataset main language"
|
|
|
|
:class="{ 'text-red-400': errors.language }" class="w-full mx-2 flex-1">
|
2024-06-14 10:38:04 +00:00
|
|
|
<FormControl required v-model="language" :type="'select'" placeholder="[Enter Language]"
|
|
|
|
:errors="form.errors.language" :options="{ de: 'de', en: 'en' }">
|
2023-03-17 15:13:37 +00:00
|
|
|
<div class="text-red-400 text-sm" v-if="form.errors.language">
|
|
|
|
{{ form.errors.language.join(', ') }}
|
|
|
|
</div>
|
|
|
|
</FormControl>
|
|
|
|
</FormField>
|
|
|
|
</div>
|
|
|
|
|
2023-08-01 15:06:51 +00:00
|
|
|
<FormField label="Licenses" wrap-body :class="{ 'text-red-400': form.errors.licenses }"
|
|
|
|
class="mt-8 w-full mx-2 flex-1">
|
2024-06-14 10:38:04 +00:00
|
|
|
<FormCheckRadioGroup v-model="form.licenses" name="roles" is-column
|
|
|
|
:options="props.licenses" />
|
2023-03-17 15:13:37 +00:00
|
|
|
</FormField>
|
|
|
|
|
|
|
|
<!-- <label for="rights">
|
|
|
|
<input class="form-checkbox" name="rights" id="rights" type="checkbox" v-model="dataset.rights" />
|
|
|
|
terms and conditions
|
|
|
|
</label> -->
|
2023-08-01 15:06:51 +00:00
|
|
|
<FormField label="Rights" help="You must agree to continue" wrap-body
|
|
|
|
:class="{ 'text-red-400': form.errors.rights }" class="mt-8 w-full mx-2 flex-1 flex-col">
|
2023-03-17 15:13:37 +00:00
|
|
|
<label for="rights" class="checkbox mr-6 mb-3 last:mr-0">
|
|
|
|
<input type="checkbox" id="rights" required v-model="form.rights" />
|
|
|
|
<span class="check" />
|
|
|
|
<a class="pl-2" target="_blank">terms and conditions </a>
|
|
|
|
<!-- <BaseButton color="modern" :icon="mdiInformationOutline" small @click="isModalActive = true" /> -->
|
2023-08-01 15:06:51 +00:00
|
|
|
<BaseIcon v-if="mdiInformationOutline" :path="mdiInformationOutline"
|
|
|
|
@click.prevent="isModalActive = true" />
|
2023-03-17 15:13:37 +00:00
|
|
|
</label>
|
|
|
|
</FormField>
|
|
|
|
<div class="text-red-400 text-sm" v-if="errors.rights && Array.isArray(errors.rights)">
|
|
|
|
<!-- {{ errors.password_confirmation }} -->
|
|
|
|
{{ errors.rights.join(', ') }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div v-if="formStep == 2">
|
|
|
|
<!-- <CardBox title="Performance" :icon="mdiFinance" :header-icon="mdiReload" class="mb-6"> -->
|
|
|
|
<div class="flex flex-col md:flex-row">
|
2023-08-01 15:06:51 +00:00
|
|
|
<FormField label="Dataset Type *" help="required: dataset type"
|
|
|
|
:class="{ 'text-red-400': form.errors.type }" class="w-full mx-2 flex-1">
|
2024-06-14 10:38:04 +00:00
|
|
|
<FormControl required v-model="form.type" :type="'select'"
|
|
|
|
placeholder="-- select type --" :errors="errors.type" :options="doctypes">
|
2023-08-01 15:06:51 +00:00
|
|
|
<div class="text-red-400 text-sm"
|
|
|
|
v-if="form.errors.type && Array.isArray(form.errors.type)">
|
2023-03-17 15:13:37 +00:00
|
|
|
{{ form.errors.type.join(', ') }}
|
|
|
|
</div>
|
|
|
|
</FormControl>
|
|
|
|
</FormField>
|
|
|
|
<!-- <div class="w-full mx-2 flex-1 svelte-1l8159u"></div> -->
|
|
|
|
<!-- Creating Corporation -->
|
2023-08-01 15:06:51 +00:00
|
|
|
<FormField label="Creating Corporation *"
|
2024-06-14 10:38:04 +00:00
|
|
|
:class="{ 'text-red-400': form.errors.creating_corporation }"
|
|
|
|
class="w-full mx-2 flex-1">
|
2023-08-01 15:06:51 +00:00
|
|
|
<FormControl required v-model="form.creating_corporation" type="text"
|
|
|
|
placeholder="[enter creating corporation]" :is-read-only="true">
|
|
|
|
<div class="text-red-400 text-sm"
|
|
|
|
v-if="form.errors.creating_corporation && Array.isArray(form.errors.creating_corporation)">
|
2023-03-17 15:13:37 +00:00
|
|
|
{{ form.errors.creating_corporation.join(', ') }}
|
|
|
|
</div>
|
|
|
|
</FormControl>
|
|
|
|
</FormField>
|
|
|
|
</div>
|
|
|
|
<!-- <BaseDivider /> -->
|
|
|
|
|
|
|
|
<!-- titles -->
|
2023-08-01 15:06:51 +00:00
|
|
|
<CardBox class="mb-6 shadow" :has-form-data="true" title="Titles" :icon="mdiFinance"
|
|
|
|
:header-icon="mdiPlusCircle" v-on:header-icon-click="addTitle()">
|
2023-03-17 15:13:37 +00:00
|
|
|
<!-- <div class="py-6 border-t border-gray-100 dark:border-slate-800"> -->
|
|
|
|
<div class="flex flex-col md:flex-row">
|
2023-08-01 15:06:51 +00:00
|
|
|
<FormField label="Main Title *" help="required: main title"
|
2024-06-14 10:38:04 +00:00
|
|
|
:class="{ 'text-red-400': form.errors['titles.0.value'] }"
|
|
|
|
class="w-full mx-2 flex-1">
|
2024-09-16 15:59:46 +00:00
|
|
|
<FormControl required v-model="form.titles[0].value" type="textarea"
|
2024-10-31 10:02:36 +00:00
|
|
|
placeholder="[enter main title]" :show-char-count="true"
|
|
|
|
:max-input-length="255">
|
2023-08-01 15:06:51 +00:00
|
|
|
<div class="text-red-400 text-sm"
|
|
|
|
v-if="form.errors['titles.0.value'] && Array.isArray(form.errors['titles.0.value'])">
|
2023-03-17 15:13:37 +00:00
|
|
|
{{ form.errors['titles.0.value'].join(', ') }}
|
|
|
|
</div>
|
|
|
|
</FormControl>
|
|
|
|
</FormField>
|
2023-08-01 15:06:51 +00:00
|
|
|
<FormField label="Main Title Language*" help="required: main title language"
|
2023-03-17 15:13:37 +00:00
|
|
|
:class="{ 'text-red-400': form.errors['titles.0.language'] }"
|
2023-08-01 15:06:51 +00:00
|
|
|
class="w-full mx-2 flex-1">
|
|
|
|
<FormControl required v-model="form.titles[0].language" type="text"
|
|
|
|
:is-read-only="true">
|
|
|
|
<div class="text-red-400 text-sm"
|
|
|
|
v-if="form.errors['titles.0.language'] && Array.isArray(form.errors['titles.0.language'])">
|
2023-03-17 15:13:37 +00:00
|
|
|
{{ form.errors['titles.0.language'].join(', ') }}
|
|
|
|
</div>
|
|
|
|
</FormControl>
|
|
|
|
</FormField>
|
|
|
|
</div>
|
|
|
|
<label v-if="form.titles.length > 1">additional titles </label>
|
|
|
|
<!-- <BaseButton :icon="mdiPlusCircle" @click.prevent="addTitle()" color="modern" rounded-full small /> -->
|
|
|
|
<div v-if="form.titles.length > 1">
|
|
|
|
<div v-for="(item, index) in form.titles">
|
|
|
|
<div class="flex flex-col md:flex-row" v-if="item.type != 'Main'">
|
|
|
|
<FormField v-if="item.type != 'Main'" label="Remove">
|
2023-08-01 15:06:51 +00:00
|
|
|
<BaseButton :icon="mdiMinusCircle" class="mt-1"
|
|
|
|
@click.prevent="removeTitle(index)" color="modern" small />
|
2023-03-17 15:13:37 +00:00
|
|
|
</FormField>
|
2023-08-01 15:06:51 +00:00
|
|
|
<FormField label="Title Value *"
|
2023-03-17 15:13:37 +00:00
|
|
|
:class="{ 'text-red-400': form.errors[`titles.${index}.value`] }"
|
2023-08-01 15:06:51 +00:00
|
|
|
class="w-full mx-2 flex-1">
|
|
|
|
<FormControl required v-model="form.titles[index].value" type="text"
|
|
|
|
placeholder="[enter main title]">
|
|
|
|
<div class="text-red-400 text-sm"
|
|
|
|
v-if="form.errors[`titles.${index}.value`]">
|
2023-03-17 15:13:37 +00:00
|
|
|
{{ form.errors[`titles.${index}.value`].join(', ') }}
|
|
|
|
</div>
|
|
|
|
</FormControl>
|
|
|
|
</FormField>
|
2023-08-01 15:06:51 +00:00
|
|
|
<FormField label="Title Type*"
|
2023-03-17 15:13:37 +00:00
|
|
|
:class="{ 'text-red-400': form.errors[`titles.${index}.type`] }"
|
2023-08-01 15:06:51 +00:00
|
|
|
class="w-full mx-2 flex-1">
|
|
|
|
<FormControl required v-model="form.titles[index].type" type="select"
|
|
|
|
:options="titletypes" placeholder="[select title type]">
|
|
|
|
<div class="text-red-400 text-sm"
|
|
|
|
v-if="Array.isArray(form.errors[`titles.${index}.type`])">
|
2023-03-17 15:13:37 +00:00
|
|
|
{{ form.errors[`titles.${index}.type`].join(', ') }}
|
|
|
|
</div>
|
|
|
|
</FormControl>
|
|
|
|
</FormField>
|
2023-08-01 15:06:51 +00:00
|
|
|
<FormField label="Title Language*"
|
2023-03-17 15:13:37 +00:00
|
|
|
:class="{ 'text-red-400': form.errors[`titles.${index}.language`] }"
|
2023-08-01 15:06:51 +00:00
|
|
|
class="w-full mx-2 flex-1">
|
|
|
|
<FormControl required v-model="form.titles[index].language" type="select"
|
|
|
|
:options="{ de: 'de', en: 'en' }" placeholder="[select title language]">
|
|
|
|
<div class="text-red-400 text-sm"
|
|
|
|
v-if="form.errors[`titles.${index}.language`]">
|
2023-03-17 15:13:37 +00:00
|
|
|
{{ form.errors[`titles.${index}.language`].join(', ') }}
|
|
|
|
</div>
|
|
|
|
</FormControl>
|
|
|
|
</FormField>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- </div> -->
|
|
|
|
</CardBox>
|
|
|
|
|
|
|
|
<!-- Descriptions -->
|
2023-08-01 15:06:51 +00:00
|
|
|
<CardBox :icon="mdiImageText" class="mb-6 shadow" :has-form-data="true" title="Descriptions"
|
|
|
|
:header-icon="mdiPlusCircle" v-on:header-icon-click="addDescription()">
|
2023-03-17 15:13:37 +00:00
|
|
|
<div class="flex flex-col md:flex-row">
|
2023-08-01 15:06:51 +00:00
|
|
|
<FormField label="Main Abstract *" help="required: main abstract"
|
2023-03-17 15:13:37 +00:00
|
|
|
:class="{ 'text-red-400': form.errors['descriptions.0.value'] }"
|
2023-08-01 15:06:51 +00:00
|
|
|
class="w-full mx-2 flex-1">
|
|
|
|
<FormControl required v-model="form.descriptions[0].value" type="textarea"
|
2024-10-31 10:02:36 +00:00
|
|
|
placeholder="[enter main abstract]" :show-char-count="true"
|
|
|
|
:max-input-length="2500">
|
2023-08-01 15:06:51 +00:00
|
|
|
<div class="text-red-400 text-sm"
|
|
|
|
v-if="form.errors['descriptions.0.value'] && Array.isArray(form.errors['descriptions.0.value'])">
|
2023-03-17 15:13:37 +00:00
|
|
|
{{ form.errors['descriptions.0.value'].join(', ') }}
|
|
|
|
</div>
|
|
|
|
</FormControl>
|
|
|
|
</FormField>
|
2023-08-01 15:06:51 +00:00
|
|
|
<FormField label="Main Title Language*" help="required: main abstract language"
|
2023-03-17 15:13:37 +00:00
|
|
|
:class="{ 'text-red-400': form.errors['descriptions.0.language'] }"
|
2023-08-01 15:06:51 +00:00
|
|
|
class="w-full mx-2 flex-1">
|
|
|
|
<FormControl required v-model="form.descriptions[0].language" type="text"
|
|
|
|
:is-read-only="true">
|
|
|
|
<div class="text-red-400 text-sm" v-if="form.errors['descriptions.0.value'] && Array.isArray(form.errors['descriptions.0.language'])
|
2024-06-14 10:38:04 +00:00
|
|
|
">
|
2023-03-17 15:13:37 +00:00
|
|
|
{{ form.errors['descriptions.0.language'].join(', ') }}
|
|
|
|
</div>
|
|
|
|
</FormControl>
|
|
|
|
</FormField>
|
|
|
|
</div>
|
|
|
|
<label v-if="form.descriptions.length > 1">additional descriptions: </label>
|
|
|
|
<!-- <BaseButton :icon="mdiPlusCircle" @click.prevent="addTitle()" color="modern" rounded-full small /> -->
|
|
|
|
<div v-if="form.descriptions.length > 1">
|
|
|
|
<div v-for="(item, index) in form.descriptions">
|
|
|
|
<div class="flex flex-col md:flex-row" v-if="item.type != 'Abstract'">
|
|
|
|
<FormField v-if="item.type != 'Abstract'" label="Remove">
|
2023-08-01 15:06:51 +00:00
|
|
|
<BaseButton :icon="mdiMinusCircle" class="mt-1"
|
|
|
|
@click.prevent="removeDescription(index)" color="modern" small />
|
2023-03-17 15:13:37 +00:00
|
|
|
</FormField>
|
2023-08-01 15:06:51 +00:00
|
|
|
<FormField label="Description Value *"
|
2023-03-17 15:13:37 +00:00
|
|
|
:class="{ 'text-red-400': form.errors[`descriptions.${index}.value`] }"
|
2023-08-01 15:06:51 +00:00
|
|
|
class="w-full mx-2 flex-1">
|
|
|
|
<FormControl required v-model="form.descriptions[index].value" type="text"
|
2024-10-31 10:02:36 +00:00
|
|
|
placeholder="[enter additional description]" :show-char-count="true"
|
|
|
|
:max-input-length="2500">
|
2023-08-01 15:06:51 +00:00
|
|
|
<div class="text-red-400 text-sm" v-if="form.errors[`descriptions.${index}.value`] &&
|
|
|
|
Array.isArray(form.errors[`descriptions.${index}.value`])
|
2024-06-14 10:38:04 +00:00
|
|
|
">
|
2023-03-17 15:13:37 +00:00
|
|
|
{{ form.errors[`descriptions.${index}.value`].join(', ') }}
|
|
|
|
</div>
|
|
|
|
</FormControl>
|
|
|
|
</FormField>
|
2023-08-01 15:06:51 +00:00
|
|
|
<FormField label="Description Type *"
|
2023-03-17 15:13:37 +00:00
|
|
|
:class="{ 'text-red-400': form.errors[`descriptions.${index}.type`] }"
|
2023-08-01 15:06:51 +00:00
|
|
|
class="w-full mx-2 flex-1">
|
|
|
|
<FormControl required v-model="form.descriptions[index].type" type="select"
|
|
|
|
:options="descriptiontypes" placeholder="[select description type]">
|
|
|
|
<div class="text-red-400 text-sm" v-if="form.errors[`descriptions.${index}.type`] &&
|
|
|
|
Array.isArray(form.errors[`descriptions.${index}.type`])
|
2024-06-14 10:38:04 +00:00
|
|
|
">
|
2023-03-17 15:13:37 +00:00
|
|
|
{{ form.errors[`descriptions.${index}.type`].join(', ') }}
|
|
|
|
</div>
|
|
|
|
</FormControl>
|
|
|
|
</FormField>
|
2023-08-01 15:06:51 +00:00
|
|
|
<FormField label="Description Language*"
|
2023-03-17 15:13:37 +00:00
|
|
|
:class="{ 'text-red-400': form.errors[`titdescriptionsles.${index}.language`] }"
|
2023-08-01 15:06:51 +00:00
|
|
|
class="w-full mx-2 flex-1">
|
2024-06-14 10:38:04 +00:00
|
|
|
<FormControl required v-model="form.descriptions[index].language"
|
|
|
|
type="select" :options="{ de: 'de', en: 'en' }"
|
|
|
|
placeholder="[select title language]">
|
2023-08-01 15:06:51 +00:00
|
|
|
<div class="text-red-400 text-sm"
|
|
|
|
v-if="form.errors && Array.isArray(form.errors[`descriptions.${index}.language`])">
|
2023-03-17 15:13:37 +00:00
|
|
|
{{ form.errors[`descriptions.${index}.language`].join(', ') }}
|
|
|
|
</div>
|
|
|
|
</FormControl>
|
|
|
|
</FormField>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</CardBox>
|
|
|
|
|
2023-03-24 10:41:52 +00:00
|
|
|
<!-- authors -->
|
2024-09-16 15:59:46 +00:00
|
|
|
<CardBox class="mb-6 shadow" has-table title="Creators" :icon="mdiBookOpenPageVariant">
|
2023-08-01 15:06:51 +00:00
|
|
|
<SearchAutocomplete source="/api/persons" :response-property="'first_name'"
|
|
|
|
placeholder="search in person table...." v-on:person="onAddAuthor"></SearchAutocomplete>
|
2023-03-24 10:41:52 +00:00
|
|
|
|
2024-10-31 10:02:36 +00:00
|
|
|
<TablePersons :errors="form.errors" :persons="form.authors" :relation="'authors'"
|
|
|
|
v-if="form.authors.length > 0" />
|
2023-03-24 10:41:52 +00:00
|
|
|
<div class="text-red-400 text-sm" v-if="errors.authors && Array.isArray(errors.authors)">
|
|
|
|
{{ errors.authors.join(', ') }}
|
|
|
|
</div>
|
2024-06-14 10:38:04 +00:00
|
|
|
<div class="w-full md:w-1/2">
|
|
|
|
<label class="block" for="additionalCreators">Add additional creator(s) if creator is
|
|
|
|
not in database</label>
|
|
|
|
<button class="bg-blue-500 text-white py-2 px-4 rounded-sm"
|
|
|
|
@click.prevent="addNewAuthor()">+</button>
|
|
|
|
</div>
|
2023-03-24 10:41:52 +00:00
|
|
|
</CardBox>
|
|
|
|
|
|
|
|
<!-- contributors -->
|
|
|
|
<CardBox class="mb-6 shadow" has-table title="Contributors" :icon="mdiBookOpenPageVariant">
|
2023-08-01 15:06:51 +00:00
|
|
|
<SearchAutocomplete source="/api/persons" :response-property="'first_name'"
|
|
|
|
placeholder="search in person table...." v-on:person="onAddContributor">
|
|
|
|
</SearchAutocomplete>
|
2023-03-24 10:41:52 +00:00
|
|
|
|
2024-10-31 10:02:36 +00:00
|
|
|
<TablePersons :persons="form.contributors" :relation="'contributors'"
|
|
|
|
v-if="form.contributors.length > 0" :contributortypes="contributorTypes"
|
|
|
|
:errors="form.errors" />
|
2023-11-22 16:06:55 +00:00
|
|
|
<div class="text-red-400 text-sm"
|
|
|
|
v-if="form.errors.contributors && Array.isArray(form.errors.contributors)">
|
2023-09-12 14:09:04 +00:00
|
|
|
{{ form.errors.contributors.join(', ') }}
|
|
|
|
</div>
|
2023-03-17 15:13:37 +00:00
|
|
|
</CardBox>
|
|
|
|
</div>
|
|
|
|
|
2023-03-24 10:41:52 +00:00
|
|
|
<!-- <label>To Do: Recommendet</label> -->
|
2023-03-17 15:13:37 +00:00
|
|
|
<div v-if="formStep == 3">
|
2023-03-24 10:41:52 +00:00
|
|
|
<div class="flex flex-col md:flex-row">
|
2023-08-01 15:06:51 +00:00
|
|
|
<FormField label="Project.." help="project is optional"
|
|
|
|
:class="{ 'text-red-400': errors.project_id }" class="w-full mx-2 flex-1">
|
|
|
|
<FormControl required v-model="form.project_id" :type="'select'"
|
|
|
|
placeholder="[Select Project]" :errors="form.errors.project_id" :options="projects">
|
2023-03-24 10:41:52 +00:00
|
|
|
<div class="text-red-400 text-sm" v-if="form.errors.project_id">
|
|
|
|
{{ form.errors.project_id.join(', ') }}
|
|
|
|
</div>
|
|
|
|
</FormControl>
|
|
|
|
</FormField>
|
|
|
|
|
2023-08-01 15:06:51 +00:00
|
|
|
<FormField label="Embargo Date.." help="embargo date is optional"
|
|
|
|
:class="{ 'text-red-400': errors.embargo_date }" class="w-full mx-2 flex-1">
|
2024-06-14 10:38:04 +00:00
|
|
|
<FormControl required v-model="form.embargo_date" :type="'date'"
|
|
|
|
placeholder="date('y-m-d')" :errors="form.errors.embargo_date">
|
2023-03-24 10:41:52 +00:00
|
|
|
<div class="text-red-400 text-sm" v-if="form.errors.embargo_date">
|
|
|
|
{{ form.errors.embargo_date.join(', ') }}
|
|
|
|
</div>
|
|
|
|
</FormControl>
|
|
|
|
</FormField>
|
|
|
|
</div>
|
2023-03-31 12:54:15 +00:00
|
|
|
<CardBox class="mb-6 shadow" has-table title="Geo Location" :icon="mdiEarthPlus">
|
|
|
|
<!-- @onMapInitialized="onMapInitialized" -->
|
|
|
|
<!-- v-bind-event="{ mapId, name: mapId }" -->
|
2023-08-01 15:06:51 +00:00
|
|
|
<MapComponent :mapOptions="mapOptions" :baseMaps="baseMaps" :fitBounds="fitBounds"
|
|
|
|
:coverage="form.coverage" :mapId="mapId"
|
|
|
|
v-bind-event:onMapInitializedEvent="onMapInitialized"></MapComponent>
|
2023-03-31 12:54:15 +00:00
|
|
|
<!-- <label v-bind-event="{ for: mapId }" /> -->
|
2023-05-02 16:10:32 +00:00
|
|
|
|
|
|
|
<div class="flex flex-col md:flex-row">
|
|
|
|
<!-- x min and max -->
|
2024-06-14 10:38:04 +00:00
|
|
|
<FormField label="Coverage X Min"
|
|
|
|
:class="{ 'text-red-400': form.errors['coverage.x_min'] }"
|
2023-08-01 15:06:51 +00:00
|
|
|
class="w-full mx-2 flex-1">
|
2024-10-31 10:02:36 +00:00
|
|
|
<FormControl required v-model="form.coverage.x_min" type="text" inputmode="numeric"
|
|
|
|
pattern="\d*" placeholder="[enter x_min]">
|
2023-08-01 15:06:51 +00:00
|
|
|
<div class="text-red-400 text-sm"
|
|
|
|
v-if="form.errors['coverage.x_min'] && Array.isArray(form.errors['coverage.x_min'])">
|
2023-05-02 16:10:32 +00:00
|
|
|
{{ form.errors['coverage.x_min'].join(', ') }}
|
|
|
|
</div>
|
|
|
|
</FormControl>
|
|
|
|
</FormField>
|
2024-06-14 10:38:04 +00:00
|
|
|
<FormField label="Coverage X Max"
|
|
|
|
:class="{ 'text-red-400': form.errors['coverage.x_max'] }"
|
2023-08-01 15:06:51 +00:00
|
|
|
class="w-full mx-2 flex-1">
|
|
|
|
<FormControl required v-model="form.coverage.x_max" type="text"
|
|
|
|
placeholder="[enter x_max]">
|
|
|
|
<div class="text-red-400 text-sm"
|
|
|
|
v-if="form.errors['coverage.x_max'] && Array.isArray(form.errors['coverage.x_max'])">
|
2023-05-02 16:10:32 +00:00
|
|
|
{{ form.errors['coverage.x_max'].join(', ') }}
|
|
|
|
</div>
|
|
|
|
</FormControl>
|
|
|
|
</FormField>
|
|
|
|
<!-- y min and max -->
|
2024-06-14 10:38:04 +00:00
|
|
|
<FormField label="Coverage Y Min"
|
|
|
|
:class="{ 'text-red-400': form.errors['coverage.y_min'] }"
|
2023-08-01 15:06:51 +00:00
|
|
|
class="w-full mx-2 flex-1">
|
|
|
|
<FormControl required v-model="form.coverage.y_min" type="text"
|
|
|
|
placeholder="[enter y_min]">
|
|
|
|
<div class="text-red-400 text-sm"
|
|
|
|
v-if="form.errors['coverage.y_min'] && Array.isArray(form.errors['coverage.y_min'])">
|
2023-05-02 16:10:32 +00:00
|
|
|
{{ form.errors['coverage.y_min'].join(', ') }}
|
|
|
|
</div>
|
|
|
|
</FormControl>
|
|
|
|
</FormField>
|
2024-06-14 10:38:04 +00:00
|
|
|
<FormField label="Coverage Y Max"
|
|
|
|
:class="{ 'text-red-400': form.errors['coverage.y_max'] }"
|
2023-08-01 15:06:51 +00:00
|
|
|
class="w-full mx-2 flex-1">
|
|
|
|
<FormControl required v-model="form.coverage.y_max" type="text"
|
|
|
|
placeholder="[enter y_max]">
|
|
|
|
<div class="text-red-400 text-sm"
|
|
|
|
v-if="form.errors['coverage.y_max'] && Array.isArray(form.errors['coverage.y_max'])">
|
2023-05-02 16:10:32 +00:00
|
|
|
{{ form.errors['coverage.y_max'].join(', ') }}
|
|
|
|
</div>
|
|
|
|
</FormControl>
|
|
|
|
</FormField>
|
|
|
|
</div>
|
|
|
|
</CardBox>
|
|
|
|
|
|
|
|
<CardBox class="mb-6 shadow" has-table title="Coverage Information" :icon="mdiEarthPlus">
|
|
|
|
<!-- elevation menu -->
|
|
|
|
<div class="lex flex-col md:flex-row mb-3">
|
|
|
|
<label for="elevation-option-one" class="pure-radio">
|
|
|
|
<input id="elevation-option-one" type="radio" v-model="elevation" value="absolut" />
|
|
|
|
absolut elevation (m)
|
|
|
|
</label>
|
|
|
|
<label for="elevation-option-two" class="pure-radio">
|
|
|
|
<input id="elevation-option-two" type="radio" v-model="elevation" value="range" />
|
|
|
|
elevation range (m)
|
|
|
|
</label>
|
|
|
|
<label for="elevation-option-three" class="pure-radio">
|
2023-08-01 15:06:51 +00:00
|
|
|
<input id="elevation-option-three" type="radio" v-model="elevation"
|
|
|
|
value="no_elevation" />
|
2023-05-02 16:10:32 +00:00
|
|
|
no elevation
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="flex flex-col md:flex-row">
|
2023-08-01 15:06:51 +00:00
|
|
|
<FormField v-if="elevation === 'absolut'" label="elevation absolut"
|
2023-05-02 16:10:32 +00:00
|
|
|
:class="{ 'text-red-400': form.errors['coverage.elevation_absolut'] }"
|
2023-08-01 15:06:51 +00:00
|
|
|
class="w-full mx-2 flex-1">
|
|
|
|
<FormControl required v-model="form.coverage.elevation_absolut" type="text"
|
|
|
|
placeholder="[enter elevation_absolut]">
|
|
|
|
<div class="text-red-400 text-sm"
|
|
|
|
v-if="Array.isArray(form.errors['coverage.elevation_absolut'])">
|
2023-05-02 16:10:32 +00:00
|
|
|
{{ form.errors['coverage.elevation_absolut'].join(', ') }}
|
|
|
|
</div>
|
|
|
|
</FormControl>
|
|
|
|
</FormField>
|
2023-08-01 15:06:51 +00:00
|
|
|
<FormField v-if="elevation === 'range'" label="elevation min"
|
2023-05-02 16:10:32 +00:00
|
|
|
:class="{ 'text-red-400': form.errors['coverage.elevation_min'] }"
|
2023-08-01 15:06:51 +00:00
|
|
|
class="w-full mx-2 flex-1">
|
|
|
|
<FormControl required v-model="form.coverage.elevation_min" type="text"
|
|
|
|
placeholder="[enter elevation_min]">
|
|
|
|
<div class="text-red-400 text-sm"
|
|
|
|
v-if="Array.isArray(form.errors['coverage.elevation_min'])">
|
2023-05-02 16:10:32 +00:00
|
|
|
{{ form.errors['coverage.elevation_min'].join(', ') }}
|
|
|
|
</div>
|
|
|
|
</FormControl>
|
|
|
|
</FormField>
|
2023-08-01 15:06:51 +00:00
|
|
|
<FormField v-if="elevation === 'range'" label="elevation max"
|
2023-05-02 16:10:32 +00:00
|
|
|
:class="{ 'text-red-400': form.errors['coverage.elevation_max'] }"
|
2023-08-01 15:06:51 +00:00
|
|
|
class="w-full mx-2 flex-1">
|
|
|
|
<FormControl required v-model="form.coverage.elevation_max" type="text"
|
|
|
|
placeholder="[enter elevation_max]">
|
|
|
|
<div class="text-red-400 text-sm"
|
|
|
|
v-if="Array.isArray(form.errors['coverage.elevation_max'])">
|
2023-05-02 16:10:32 +00:00
|
|
|
{{ form.errors['coverage.elevation_max'].join(', ') }}
|
|
|
|
</div>
|
|
|
|
</FormControl>
|
|
|
|
</FormField>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- depth menu -->
|
|
|
|
<div class="lex flex-col md:flex-row mb-3">
|
|
|
|
<label for="depth-option-one" class="pure-radio">
|
|
|
|
<input id="depth-option-one" type="radio" v-model="depth" value="absolut" />
|
|
|
|
absolut depth (m)
|
|
|
|
</label>
|
|
|
|
<label for="depth-option-two" class="pure-radio">
|
|
|
|
<input id="depth-option-two" type="radio" v-model="depth" value="range" />
|
|
|
|
depth range (m)
|
|
|
|
</label>
|
|
|
|
<label for="depth-option-three" class="pure-radio">
|
|
|
|
<input id="depth-option-three" type="radio" v-model="depth" value="no_depth" />
|
|
|
|
no depth
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="flex flex-col md:flex-row">
|
2023-08-01 15:06:51 +00:00
|
|
|
<FormField v-if="depth === 'absolut'" label="depth absolut"
|
2023-05-02 16:10:32 +00:00
|
|
|
:class="{ 'text-red-400': form.errors['coverage.depth_absolut'] }"
|
2023-08-01 15:06:51 +00:00
|
|
|
class="w-full mx-2 flex-1">
|
|
|
|
<FormControl required v-model="form.coverage.depth_absolut" type="text"
|
|
|
|
placeholder="[enter depth_absolut]">
|
|
|
|
<div class="text-red-400 text-sm"
|
|
|
|
v-if="Array.isArray(form.errors['coverage.depth_absolut'])">
|
2023-05-02 16:10:32 +00:00
|
|
|
{{ form.errors['coverage.depth_absolut'].join(', ') }}
|
|
|
|
</div>
|
2023-08-01 15:06:51 +00:00
|
|
|
</FormControl>
|
|
|
|
</FormField>
|
|
|
|
<FormField v-if="depth === 'range'" label="depth min"
|
2023-05-02 16:10:32 +00:00
|
|
|
:class="{ 'text-red-400': form.errors['coverage.depth_min'] }"
|
2023-08-01 15:06:51 +00:00
|
|
|
class="w-full mx-2 flex-1">
|
|
|
|
<FormControl required v-model="form.coverage.depth_min" type="text"
|
|
|
|
placeholder="[enter depth_min]">
|
|
|
|
<div class="text-red-400 text-sm"
|
|
|
|
v-if="Array.isArray(form.errors['coverage.depth_min'])">
|
2023-05-02 16:10:32 +00:00
|
|
|
{{ form.errors['coverage.depth_min'].join(', ') }}
|
|
|
|
</div>
|
|
|
|
</FormControl>
|
|
|
|
</FormField>
|
2023-08-01 15:06:51 +00:00
|
|
|
<FormField v-if="depth === 'range'" label="depth max"
|
2023-05-02 16:10:32 +00:00
|
|
|
:class="{ 'text-red-400': form.errors['coverage.depth_max'] }"
|
2023-08-01 15:06:51 +00:00
|
|
|
class="w-full mx-2 flex-1">
|
|
|
|
<FormControl required v-model="form.coverage.depth_max" type="text"
|
|
|
|
placeholder="[enter depth_max]">
|
|
|
|
<div class="text-red-400 text-sm"
|
|
|
|
v-if="Array.isArray(form.errors['coverage.depth_max'])">
|
2023-05-02 16:10:32 +00:00
|
|
|
{{ form.errors['coverage.depth_max'].join(', ') }}
|
|
|
|
</div>
|
|
|
|
</FormControl>
|
|
|
|
</FormField>
|
|
|
|
</div>
|
2023-03-31 12:54:15 +00:00
|
|
|
</CardBox>
|
2023-05-19 09:30:49 +00:00
|
|
|
|
2023-08-01 15:06:51 +00:00
|
|
|
<CardBox class="mb-6 shadow" has-table title="Dataset References" :header-icon="mdiPlusCircle"
|
|
|
|
v-on:header-icon-click="addReference">
|
2023-08-23 15:07:26 +00:00
|
|
|
<table class="table-fixed border-green-900" v-if="form.references.length">
|
2023-08-01 15:06:51 +00:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2023-08-23 15:07:26 +00:00
|
|
|
<th class="w-4/12">Value</th>
|
|
|
|
<th class="w-2/12">Type</th>
|
|
|
|
<th class="w-3/12">Relation</th>
|
|
|
|
<th class="w-2/12">Label</th>
|
|
|
|
<th class="w-1/12"></th>
|
2023-08-01 15:06:51 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr v-for="(item, index) in form.references">
|
|
|
|
<td data-label="Reference Value">
|
2023-08-23 15:07:26 +00:00
|
|
|
<!-- <input name="Reference Value" class="form-control"
|
|
|
|
placeholder="[VALUE]" v-model="item.value" /> -->
|
2024-06-14 10:38:04 +00:00
|
|
|
<FormControl required v-model="item.value" :type="'text'"
|
|
|
|
placeholder="[VALUE]" :errors="form.errors.embargo_date">
|
2023-08-23 15:07:26 +00:00
|
|
|
<div class="text-red-400 text-sm"
|
|
|
|
v-if="form.errors[`references.${index}.value`] && Array.isArray(form.errors[`references.${index}.value`])">
|
|
|
|
{{ form.errors[`references.${index}.value`].join(', ') }}
|
|
|
|
</div>
|
|
|
|
</FormControl>
|
|
|
|
|
2023-08-01 15:06:51 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<FormControl required v-model="form.references[index].type" type="select"
|
2023-08-23 15:07:26 +00:00
|
|
|
:options="referenceIdentifierTypes" placeholder="[type]">
|
2023-08-01 15:06:51 +00:00
|
|
|
<div class="text-red-400 text-sm"
|
|
|
|
v-if="Array.isArray(form.errors[`references.${index}.type`])">
|
|
|
|
{{ form.errors[`references.${index}.type`].join(', ') }}
|
|
|
|
</div>
|
|
|
|
</FormControl>
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td>
|
|
|
|
<!-- {!! Form::select('Reference[Relation]', $relationTypes, null,
|
|
|
|
['placeholder' => '[relationType]', 'v-model' => 'item.relation',
|
|
|
|
'data-vv-scope' => 'step-2'])
|
|
|
|
!!} -->
|
2024-06-14 10:38:04 +00:00
|
|
|
<FormControl required v-model="form.references[index].relation"
|
|
|
|
type="select" :options="relationTypes" placeholder="[relation type]">
|
2023-08-01 15:06:51 +00:00
|
|
|
<div class="text-red-400 text-sm"
|
|
|
|
v-if="Array.isArray(form.errors[`references.${index}.relation`])">
|
|
|
|
{{ form.errors[`references.${index}.relation`].join(', ') }}
|
|
|
|
</div>
|
|
|
|
</FormControl>
|
|
|
|
</td>
|
|
|
|
<td data-label="Reference Label">
|
2023-08-23 15:07:26 +00:00
|
|
|
<!-- <input name="Reference Label" class="form-control" v-model="item.label" /> -->
|
|
|
|
<FormControl required v-model="form.references[index].label" type="text"
|
|
|
|
placeholder="[reference label]">
|
|
|
|
<div class="text-red-400 text-sm"
|
|
|
|
v-if="form.errors[`references.${index}.label`] && Array.isArray(form.errors[`references.${index}.label`])">
|
|
|
|
{{ form.errors[`references.${index}.label`].join(', ') }}
|
|
|
|
</div>
|
|
|
|
</FormControl>
|
2023-08-01 15:06:51 +00:00
|
|
|
</td>
|
|
|
|
<td class="before:hidden lg:w-1 whitespace-nowrap">
|
|
|
|
<!-- <BaseButton color="info" :icon="mdiEye" small @click="isModalActive = true" /> -->
|
|
|
|
<BaseButton color="danger" :icon="mdiTrashCan" small
|
|
|
|
@click.prevent="removeReference(index)" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</CardBox>
|
|
|
|
|
|
|
|
|
|
|
|
<CardBox class="mb-6 shadow" has-table title="Dataset Keywords" :icon="mdiEarthPlus"
|
|
|
|
:header-icon="mdiPlusCircle" v-on:header-icon-click="addKeyword">
|
2023-05-19 09:30:49 +00:00
|
|
|
<!-- <ul>
|
|
|
|
<li v-for="(subject, index) in form.subjects" :key="index">
|
|
|
|
{{ subject.value }} <BaseButton color="danger" :icon="mdiTrashCan" small @click.prevent="removeKeyword(index)" />
|
|
|
|
</li>
|
|
|
|
</ul> -->
|
2023-09-12 14:09:04 +00:00
|
|
|
<TableKeywords :keywords="form.subjects" :errors="form.errors" :subjectTypes="subjectTypes"
|
2023-08-01 15:06:51 +00:00
|
|
|
v-if="form.subjects.length > 0" />
|
2023-05-19 09:30:49 +00:00
|
|
|
</CardBox>
|
2023-03-17 15:13:37 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div v-if="formStep == 4">
|
2023-06-02 14:55:03 +00:00
|
|
|
<!-- <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">
|
2023-06-01 12:29:56 +00:00
|
|
|
<input type="file" multiple name="files" @change="onChangeFile" class="input-file" />
|
|
|
|
<p>
|
|
|
|
Drag your file(s) here to begin<br />
|
|
|
|
or click to browse
|
2023-06-02 14:55:03 +00:00
|
|
|
</p>
|
2023-08-01 15:06:51 +00:00
|
|
|
</div> -->
|
2023-06-02 14:55:03 +00:00
|
|
|
|
2023-11-22 16:06:55 +00:00
|
|
|
<FileUploadComponent :files="form.files"></FileUploadComponent>
|
2023-06-01 12:29:56 +00:00
|
|
|
|
2024-06-14 10:38:04 +00:00
|
|
|
<div class="text-red-400 text-sm"
|
|
|
|
v-if="form.errors['file'] && Array.isArray(form.errors['file'])">
|
2023-06-01 12:29:56 +00:00
|
|
|
{{ form.errors['file'].join(', ') }}
|
|
|
|
</div>
|
2023-08-01 15:06:51 +00:00
|
|
|
<div class="text-red-400 text-sm"
|
|
|
|
v-if="form.errors['upload.label'] && Array.isArray(form.errors['upload.label'])">
|
2023-06-01 12:29:56 +00:00
|
|
|
{{ form.errors['upload.label'].join(', ') }}
|
|
|
|
</div>
|
2023-06-02 14:55:03 +00:00
|
|
|
<!-- <label v-if="form.upload">{{ form.upload?.label }}</label> -->
|
2023-03-17 15:13:37 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2024-10-31 10:02:36 +00:00
|
|
|
|
2023-03-17 15:13:37 +00:00
|
|
|
<template #footer>
|
|
|
|
<div class="flex p-2 mt-4">
|
2023-08-01 15:06:51 +00:00
|
|
|
<button v-if="formStep > 1" @click="prevStep"
|
|
|
|
class="text-base hover:scale-110 focus:outline-none flex justify-center px-4 py-2 rounded font-bold cursor-pointer hover:bg-gray-200 bg-gray-100 text-gray-700 border duration-200 ease-in-out border-gray-600 transition">
|
2023-03-17 15:13:37 +00:00
|
|
|
Previous
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<div class="flex-auto flex flex-row-reverse">
|
2023-08-01 15:06:51 +00:00
|
|
|
<button v-if="formStep < 4" @click="nextStep"
|
|
|
|
class="text-base ml-2 hover:scale-110 focus:outline-none flex justify-center px-4 py-2 rounded font-bold cursor-pointer hover:bg-teal-600 bg-teal-600 text-teal-100 border duration-200 ease-in-out border-teal-600 transition">
|
2023-03-17 15:13:37 +00:00
|
|
|
Next
|
|
|
|
</button>
|
|
|
|
|
2023-11-22 16:06:55 +00:00
|
|
|
<button v-if="formStep == 4" :disabled="form.processing"
|
|
|
|
:class="{ 'opacity-25': form.processing }"
|
2023-06-01 12:29:56 +00:00
|
|
|
class="text-base hover:scale-110 focus:outline-none flex justify-center px-4 py-2 rounded font-bold cursor-pointer hover:bg-teal-200 bg-teal-100 text-teal-700 border duration-200 ease-in-out border-teal-600 transition"
|
2023-08-01 15:06:51 +00:00
|
|
|
@click.stop="submit">
|
2023-06-01 12:29:56 +00:00
|
|
|
Save
|
|
|
|
</button>
|
2023-03-17 15:13:37 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2024-10-31 10:02:36 +00:00
|
|
|
<progress v-if="form.progress" :value="form.progress.percentage" max="100">
|
|
|
|
{{ form.progress.percentage }}%
|
|
|
|
</progress>
|
2023-03-17 15:13:37 +00:00
|
|
|
</template>
|
|
|
|
</CardBox>
|
2024-10-31 10:02:36 +00:00
|
|
|
<!-- Loading Spinner -->
|
|
|
|
<div v-if="form.processing"
|
|
|
|
class="fixed inset-0 flex items-center justify-center bg-gray-500 bg-opacity-50 z-50">
|
|
|
|
<svg class="animate-spin h-12 w-12 text-white" xmlns="http://www.w3.org/2000/svg" fill="none"
|
|
|
|
viewBox="0 0 24 24">
|
|
|
|
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
|
|
|
|
<path class="opacity-75" fill="currentColor" d="M12 2a10 10 0 0110 10h-4a6 6 0 00-6-6V2z"></path>
|
|
|
|
</svg>
|
|
|
|
</div>
|
|
|
|
<!-- <div
|
|
|
|
class="fixed inset-0 flex items-center justify-center bg-gray-500 bg-opacity-50">
|
|
|
|
<svg class="animate-spin h-10 w-10 text-white" xmlns="http://www.w3.org/2000/svg" fill="none"
|
|
|
|
viewBox="0 0 24 24">
|
|
|
|
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
|
|
|
|
<path class="opacity-75" fill="currentColor"
|
|
|
|
d="M4 12a8 8 0 0116 0 8 8 0 01-16 0zm2 0a6 6 0 0112 0 6 6 0 01-12 0z"></path>
|
|
|
|
</svg>
|
|
|
|
</div> -->
|
|
|
|
|
2023-03-17 15:13:37 +00:00
|
|
|
</SectionMain>
|
|
|
|
</LayoutAuthenticated>
|
|
|
|
</template>
|
2023-06-01 12:29:56 +00:00
|
|
|
|
|
|
|
<style>
|
|
|
|
.dropbox {
|
2023-08-01 15:06:51 +00:00
|
|
|
outline: 2px dashed grey;
|
|
|
|
/* the dash box */
|
2023-06-01 12:29:56 +00:00
|
|
|
outline-offset: -10px;
|
|
|
|
background: lightcyan;
|
|
|
|
color: dimgray;
|
|
|
|
padding: 10px 0;
|
2023-08-01 15:06:51 +00:00
|
|
|
min-height: 200px;
|
|
|
|
/* minimum height */
|
2023-06-01 12:29:56 +00:00
|
|
|
position: relative;
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
|
|
|
|
.input-file {
|
2023-08-01 15:06:51 +00:00
|
|
|
opacity: 0;
|
|
|
|
/* invisible but it's there! */
|
2023-06-01 12:29:56 +00:00
|
|
|
width: 100%;
|
|
|
|
height: 200px;
|
|
|
|
position: absolute;
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
|
|
|
|
.dropbox:hover {
|
2023-08-01 15:06:51 +00:00
|
|
|
background: lightblue;
|
|
|
|
/* when mouse over to the drop zone, change color */
|
2023-06-01 12:29:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.dropbox p {
|
|
|
|
font-size: 1.2em;
|
|
|
|
text-align: center;
|
|
|
|
padding: 50px 0;
|
|
|
|
}
|
2023-08-01 15:06:51 +00:00
|
|
|
|
2023-06-01 12:29:56 +00:00
|
|
|
span.remove-file {
|
|
|
|
color: red;
|
|
|
|
cursor: pointer;
|
|
|
|
/* float: right; */
|
|
|
|
}
|
|
|
|
</style>
|