Sha256: 17ceb51c46919e35c4fca6dcc3d14435cc4242c25f214089bf9663a6fe3210ad
Contents?: true
Size: 1.01 KB
Versions: 2
Compression:
Stored size: 1.01 KB
Contents
<script lang="ts"> import { Link, type InertiaForm } from '@inertiajs/svelte' import Form from './Form.svelte' import type { <%= inertia_model_type %>, <%= inertia_model_form_type %> } from './types' export let <%= singular_table_name %>: <%= inertia_model_type %> const handleSubmit = (e: CustomEvent<{ form: InertiaForm<<%= inertia_model_form_type %>> }>) => { const { form } = e.detail form.transform((data) => ({ <%= singular_table_name %>: data })) form.post('<%= js_resources_path %>') } </script> <svelte:head> <title>New <%= human_name.downcase %></title> </svelte:head> <div class="mx-auto md:w-2/3 w-full px-8 pt-8"> <h1 class="font-bold text-4xl">New <%= human_name.downcase %></h1> <Form {<%= singular_table_name %>} submitText="Create <%= human_name %>" on:submit={handleSubmit} /> <Link href="<%= js_resources_path %>" class="ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" > Back to <%= human_name.pluralize.downcase %> </Link> </div>
Version data entries
2 entries across 2 versions & 1 rubygems