mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-03 15:02:34 +00:00
#591 - sites [wip]
This commit is contained in:
@ -17,7 +17,7 @@ import { Button } from '@/components/ui/button';
|
||||
import { Form, FormField, FormFields } from '@/components/ui/form';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import InputError from '@/components/ui/input-error';
|
||||
import UserSelect from '@/components/user-select';
|
||||
import UserSelect from '@/pages/users/components/user-select';
|
||||
import { useForm } from '@inertiajs/react';
|
||||
import { LoaderCircleIcon, TrashIcon } from 'lucide-react';
|
||||
import { Sheet, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from '@/components/ui/sheet';
|
||||
@ -52,7 +52,7 @@ function AddUser({ project }: { project: Project }) {
|
||||
<FormFields>
|
||||
<FormField>
|
||||
<Label htmlFor="user">User</Label>
|
||||
<UserSelect onChange={(user: User) => form.setData('user', user.id)} />
|
||||
<UserSelect value={form.data.user.toString()} onValueChange={(user: User) => form.setData('user', user.id)} />
|
||||
<InputError message={form.errors.user} />
|
||||
</FormField>
|
||||
</FormFields>
|
||||
|
@ -5,15 +5,13 @@ import { columns } from '@/pages/projects/components/columns';
|
||||
import { Project } from '@/types/project';
|
||||
import Container from '@/components/container';
|
||||
import Heading from '@/components/heading';
|
||||
import React from 'react';
|
||||
import ProjectForm from '@/pages/projects/components/project-form';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { PaginatedData } from '@/types';
|
||||
|
||||
export default function Projects() {
|
||||
const page = usePage<{
|
||||
projects: {
|
||||
data: Project[];
|
||||
};
|
||||
projects: PaginatedData<Project>;
|
||||
}>();
|
||||
|
||||
return (
|
||||
@ -29,7 +27,7 @@ export default function Projects() {
|
||||
</ProjectForm>
|
||||
</div>
|
||||
</div>
|
||||
<DataTable columns={columns} data={page.props.projects.data} />
|
||||
<DataTable columns={columns} paginatedData={page.props.projects} />
|
||||
</Container>
|
||||
</SettingsLayout>
|
||||
);
|
||||
|
Reference in New Issue
Block a user