refactor: update table component types and enhance admin menu with category and tag

This commit is contained in:
Ardeman
2025-03-09 15:31:10 +08:00
parent 422c9cbfe2
commit 64bb369c59
6 changed files with 62 additions and 42 deletions
+4 -2
View File
@@ -1,5 +1,7 @@
import { Field, Input, Label, Select } from '@headlessui/react'
import { MagnifyingGlassIcon } from '@heroicons/react/20/solid'
import type { ConfigColumns } from 'datatables.net-dt'
import type { DataTableSlots } from 'datatables.net-react'
import { useState } from 'react'
import { twMerge } from 'tailwind-merge'
@@ -36,14 +38,14 @@ export const AdvertisementsPage = ({
}
const dataBanner = BANNER
const dataColumns = [
const dataColumns: ConfigColumns[] = [
{ title: 'No', data: 'id' },
{ title: 'Banner', data: 'urlImage' },
{ title: 'Link', data: 'link' },
{ title: 'Tgl Create', data: 'createdAt' },
{ title: 'Status', data: 'status' },
]
const dataSlot = {
const dataSlot: DataTableSlots = {
1: (value: string) => {
return (
<div>