From 8b7672391c3a2adeeb59bf06cfa3902e7bdb3011 Mon Sep 17 00:00:00 2001 From: Jonathan Reinink Date: Tue, 22 Dec 2020 13:33:00 -0500 Subject: [PATCH] Update create organization form to use the new Inertia form --- resources/js/Pages/Organizations/Create.vue | 36 +++++++-------------- 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/resources/js/Pages/Organizations/Create.vue b/resources/js/Pages/Organizations/Create.vue index 589bcd6..67cff74 100644 --- a/resources/js/Pages/Organizations/Create.vue +++ b/resources/js/Pages/Organizations/Create.vue @@ -5,23 +5,23 @@ / Create
-
+
- - - - - - - + + + + + + + - +
- Create Organization + Create Organization
@@ -42,14 +42,10 @@ export default { SelectInput, TextInput, }, - props: { - errors: Object, - }, remember: 'form', data() { return { - sending: false, - form: { + form: this.$inertia.form({ name: null, email: null, phone: null, @@ -58,16 +54,8 @@ export default { region: null, country: null, postal_code: null, - }, + }), } }, - methods: { - submit() { - this.$inertia.post(this.route('organizations.store'), this.form, { - onStart: () => this.sending = true, - onFinish: () => this.sending = false, - }) - }, - }, }