Skip to content

Commit a9e643c

Browse files
committed
import full controller
1 parent 21e50ce commit a9e643c

File tree

9 files changed

+27
-18
lines changed

9 files changed

+27
-18
lines changed

resources/js/components/delete-user.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { destroy } from '@/actions/App/Http/Controllers/Settings/ProfileController';
1+
import ProfileController from '@/actions/App/Http/Controllers/Settings/ProfileController';
22
import HeadingSmall from '@/components/heading-small';
33
import InputError from '@/components/input-error';
44
import { Button } from '@/components/ui/button';
@@ -32,7 +32,7 @@ export default function DeleteUser() {
3232
</DialogDescription>
3333

3434
<Form
35-
{...destroy.form()}
35+
{...ProfileController.destroy.form()}
3636
options={{
3737
preserveScroll: true,
3838
}}

resources/js/pages/auth/confirm-password.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { store } from '@/actions/App/Http/Controllers/Auth/ConfirmablePasswordController';
1+
import ConfirmablePasswordController from '@/actions/App/Http/Controllers/Auth/ConfirmablePasswordController';
22
import InputError from '@/components/input-error';
33
import { Button } from '@/components/ui/button';
44
import { Input } from '@/components/ui/input';
@@ -15,7 +15,7 @@ export default function ConfirmPassword() {
1515
>
1616
<Head title="Confirm password" />
1717

18-
<Form {...store.form()} resetOnSuccess={['password']}>
18+
<Form {...ConfirmablePasswordController.store.form()} resetOnSuccess={['password']}>
1919
{({ processing, errors }) => (
2020
<div className="space-y-6">
2121
<div className="grid gap-2">

resources/js/pages/auth/forgot-password.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Components
2-
import { store } from '@/actions/App/Http/Controllers/Auth/PasswordResetLinkController';
2+
import PasswordResetLinkController from '@/actions/App/Http/Controllers/Auth/PasswordResetLinkController';
33
import { login } from '@/routes';
44
import { Form, Head } from '@inertiajs/react';
55
import { LoaderCircle } from 'lucide-react';
@@ -19,7 +19,7 @@ export default function ForgotPassword({ status }: { status?: string }) {
1919
{status && <div className="mb-4 text-center text-sm font-medium text-green-600">{status}</div>}
2020

2121
<div className="space-y-6">
22-
<Form {...store.form()}>
22+
<Form {...PasswordResetLinkController.store.form()}>
2323
{({ processing, errors }) => (
2424
<>
2525
<div className="grid gap-2">

resources/js/pages/auth/login.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { store } from '@/actions/App/Http/Controllers/Auth/AuthenticatedSessionController';
1+
import AuthenticatedSessionController from '@/actions/App/Http/Controllers/Auth/AuthenticatedSessionController';
22
import InputError from '@/components/input-error';
33
import TextLink from '@/components/text-link';
44
import { Button } from '@/components/ui/button';
@@ -21,7 +21,7 @@ export default function Login({ status, canResetPassword }: LoginProps) {
2121
<AuthLayout title="Log in to your account" description="Enter your email and password below to log in">
2222
<Head title="Log in" />
2323

24-
<Form {...store.form()} resetOnSuccess={['password']} className="flex flex-col gap-6">
24+
<Form {...AuthenticatedSessionController.store.form()} resetOnSuccess={['password']} className="flex flex-col gap-6">
2525
{({ processing, errors }) => (
2626
<>
2727
<div className="grid gap-6">

resources/js/pages/auth/register.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { store } from '@/actions/App/Http/Controllers/Auth/RegisteredUserController';
1+
import RegisteredUserController from '@/actions/App/Http/Controllers/Auth/RegisteredUserController';
22
import { login } from '@/routes';
33
import { Form, Head } from '@inertiajs/react';
44
import { LoaderCircle } from 'lucide-react';
@@ -14,7 +14,12 @@ export default function Register() {
1414
return (
1515
<AuthLayout title="Create an account" description="Enter your details below to create your account">
1616
<Head title="Register" />
17-
<Form {...store.form()} resetOnSuccess={['password', 'password_confirmation']} disableWhileProcessing className="flex flex-col gap-6">
17+
<Form
18+
{...RegisteredUserController.store.form()}
19+
resetOnSuccess={['password', 'password_confirmation']}
20+
disableWhileProcessing
21+
className="flex flex-col gap-6"
22+
>
1823
{({ processing, errors }) => (
1924
<>
2025
<div className="grid gap-6">

resources/js/pages/auth/reset-password.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { store } from '@/actions/App/Http/Controllers/Auth/NewPasswordController';
1+
import NewPasswordController from '@/actions/App/Http/Controllers/Auth/NewPasswordController';
22
import { Form, Head } from '@inertiajs/react';
33
import { LoaderCircle } from 'lucide-react';
44

@@ -18,7 +18,11 @@ export default function ResetPassword({ token, email }: ResetPasswordProps) {
1818
<AuthLayout title="Reset password" description="Please enter your new password below">
1919
<Head title="Reset password" />
2020

21-
<Form {...store.form()} transform={(data) => ({ ...data, token, email })} resetOnSuccess={['password', 'password_confirmation']}>
21+
<Form
22+
{...NewPasswordController.store.form()}
23+
transform={(data) => ({ ...data, token, email })}
24+
resetOnSuccess={['password', 'password_confirmation']}
25+
>
2226
{({ processing, errors }) => (
2327
<div className="grid gap-6">
2428
<div className="grid gap-2">

resources/js/pages/auth/verify-email.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Components
2-
import { store } from '@/actions/App/Http/Controllers/Auth/EmailVerificationNotificationController';
2+
import EmailVerificationNotificationController from '@/actions/App/Http/Controllers/Auth/EmailVerificationNotificationController';
33
import { logout } from '@/routes';
44
import { Form, Head } from '@inertiajs/react';
55
import { LoaderCircle } from 'lucide-react';
@@ -19,7 +19,7 @@ export default function VerifyEmail({ status }: { status?: string }) {
1919
</div>
2020
)}
2121

22-
<Form {...store.form()} className="space-y-6 text-center">
22+
<Form {...EmailVerificationNotificationController.store.form()} className="space-y-6 text-center">
2323
{({ processing }) => (
2424
<>
2525
<Button disabled={processing} variant="secondary">

resources/js/pages/settings/password.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { update } from '@/actions/App/Http/Controllers/Settings/PasswordController';
1+
import PasswordController from '@/actions/App/Http/Controllers/Settings/PasswordController';
22
import InputError from '@/components/input-error';
33
import AppLayout from '@/layouts/app-layout';
44
import SettingsLayout from '@/layouts/settings/layout';
@@ -33,7 +33,7 @@ export default function Password() {
3333
<HeadingSmall title="Update password" description="Ensure your account is using a long, random password to stay secure" />
3434

3535
<Form
36-
{...update.form()}
36+
{...PasswordController.update.form()}
3737
options={{
3838
preserveScroll: true,
3939
}}

resources/js/pages/settings/profile.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { update } from '@/actions/App/Http/Controllers/Settings/ProfileController';
1+
import ProfileController from '@/actions/App/Http/Controllers/Settings/ProfileController';
22
import { send } from '@/routes/verification';
33
import { type BreadcrumbItem, type SharedData } from '@/types';
44
import { Transition } from '@headlessui/react';
@@ -33,7 +33,7 @@ export default function Profile({ mustVerifyEmail, status }: { mustVerifyEmail:
3333
<HeadingSmall title="Profile information" description="Update your name and email address" />
3434

3535
<Form
36-
{...update.form()}
36+
{...ProfileController.update.form()}
3737
options={{
3838
preserveScroll: true,
3939
}}

0 commit comments

Comments
 (0)