- vue composition api (#91)

* wip

* fix

Co-authored-by: EwelinaLasowy <ewelina.lasowy@blumilk.pl>
This commit is contained in:
Adrian Hopek
2022-03-22 15:03:42 +01:00
committed by GitHub
parent 95f5ed44d6
commit dcda8c6255
33 changed files with 938 additions and 1466 deletions

View File

@@ -80,34 +80,20 @@
</div>
</template>
<script>
<script setup>
import { useForm } from '@inertiajs/inertia-vue3'
import FlatPickr from 'vue-flatpickr-component'
export default {
name: 'HolidayEdit',
components: {
FlatPickr,
},
props: {
holiday: {
type: Object,
default: () => null,
},
},
setup(props) {
const form = useForm({
name: props.holiday.name,
date: props.holiday.date,
})
const props = defineProps({
holiday: Object,
})
return { form }
},
methods: {
editHoliday() {
this.form
.put(`/holidays/${this.holiday.id}`)
},
},
const form = useForm({
name: props.holiday.name,
date: props.holiday.date,
})
function editHoliday() {
form.put(`/holidays/${props.holiday.id}`)
}
</script>