import { Head, useForm, Link } from '@inertiajs/react';
import React from 'react';
import { Button } from '@/components/ui/button';
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import { Separator } from '@/components/ui/separator';
import AppLayout from '@/layouts/app-layout';
interface Department {
id: number;
name: string;
description: string;
}
interface PageProps {
department: Department;
}
export default function Edit({ department }: PageProps) {
const { data, setData, put, processing, errors } = useForm({
name: department.name,
description: department.description || '',
});
const submit = (e: React.FormEvent) => {
e.preventDefault();
put(`/admin/departments/${department.id}`);
};
return (
Perbarui informasi divisi.