Finished Hub ESLINT rule enforcement
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { KeywordOptionalDefaultsSchema } from "@repo/db/zod";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { z } from "zod";
|
||||
import { KEYWORD_CATEGORY, Keyword } from "@repo/db";
|
||||
import { FileText } from "lucide-react";
|
||||
import { Input } from "../../../../_components/ui/Input";
|
||||
@@ -24,7 +23,7 @@ export const KeywordForm = ({ keyword }: { keyword?: Keyword }) => {
|
||||
<form
|
||||
onSubmit={form.handleSubmit(async (values) => {
|
||||
setLoading(true);
|
||||
const createdKeyword = await upsertKeyword(values, keyword?.id);
|
||||
await upsertKeyword(values, keyword?.id);
|
||||
setLoading(false);
|
||||
if (!keyword) redirect(`/admin/keyword`);
|
||||
})}
|
||||
|
||||
@@ -9,7 +9,6 @@ export default () => {
|
||||
<>
|
||||
<PaginatedTable
|
||||
initialOrderBy={[{ id: "category", desc: true }]}
|
||||
showEditButton
|
||||
prismaModel="keyword"
|
||||
searchFields={["name", "abreviation", "description"]}
|
||||
columns={
|
||||
@@ -26,6 +25,16 @@ export default () => {
|
||||
header: "Name",
|
||||
accessorKey: "name",
|
||||
},
|
||||
{
|
||||
header: "Aktionen",
|
||||
cell: ({ row }) => (
|
||||
<div className="flex items-center gap-1">
|
||||
<Link href={`/admin/keyword/${row.original.id}`}>
|
||||
<button className="btn btn-sm">bearbeiten</button>
|
||||
</Link>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
] as ColumnDef<Keyword>[]
|
||||
}
|
||||
leftOfSearch={
|
||||
|
||||
Reference in New Issue
Block a user