diff --git a/resources/js/components/SMSelectImage.vue b/resources/js/components/SMSelectImage.vue index 6c5e648..3e6d46c 100644 --- a/resources/js/components/SMSelectImage.vue +++ b/resources/js/components/SMSelectImage.vue @@ -4,7 +4,6 @@
0 ? props.control - : generateRandomElementId() + : generateRandomElementId(), ); const feedbackInvalid = ref(props.feedbackInvalid); const active = ref(value.value?.toString().length ?? 0 > 0); @@ -187,7 +191,7 @@ watch( () => value.value, (newValue) => { mediaUrl.value = value.value.url ?? ""; - } + }, ); if (props.modelValue != undefined) { @@ -195,7 +199,7 @@ if (props.modelValue != undefined) { () => props.modelValue, (newValue) => { value.value = newValue; - } + }, ); } @@ -203,14 +207,14 @@ watch( () => props.feedbackInvalid, (newValue) => { feedbackInvalid.value = newValue; - } + }, ); watch( () => props.disabled, (newValue) => { disabled.value = newValue; - } + }, ); if (typeof control === "object" && control !== null) { @@ -221,7 +225,7 @@ if (typeof control === "object" && control !== null) { ? "" : control.validation.result.invalidMessages[0]; }, - { deep: true } + { deep: true }, ); watch( @@ -229,7 +233,7 @@ if (typeof control === "object" && control !== null) { (newValue) => { value.value = newValue; }, - { deep: true } + { deep: true }, ); } @@ -238,7 +242,7 @@ if (form) { () => form.loading(), (newValue) => { disabled.value = newValue; - } + }, ); } @@ -299,7 +303,9 @@ const handleChange = (event) => { }; const handleMediaSelect = async () => { - let result = await openDialog(SMDialogMedia); + let result = await openDialog(SMDialogMedia, { + allowUpload: props.allowUpload, + }); if (result) { const mediaResult = result as Media; mediaUrl.value = mediaResult.url; @@ -319,7 +325,7 @@ const computedAutocompleteItems = computed(() => { autocompleteList = props.autocomplete(value.value); } else { autocompleteList = props.autocomplete.filter((str) => - str.includes(value.value) + str.includes(value.value), ); } diff --git a/resources/js/views/dashboard/EventEdit.vue b/resources/js/views/dashboard/EventEdit.vue index ecacc17..6a794ff 100644 --- a/resources/js/views/dashboard/EventEdit.vue +++ b/resources/js/views/dashboard/EventEdit.vue @@ -82,7 +82,10 @@ :type="registration_data?.type" />
- +
{ @@ -282,11 +285,11 @@ const loadData = async () => { form.controls.price.value = data.event.price; form.controls.ages.value = data.event.ages; - attachments.value = (data.event.attachments || []).map(function ( - attachment - ) { - return attachment.id.toString(); - }); + attachments.value = (data.event.attachments || []).map( + function (attachment) { + return attachment.id.toString(); + }, + ); } catch (err) { pageError.value = err.status; } finally {