feat: implement UiTable component and refactor dashboard pages to use it

This commit is contained in:
fredy.siswanto
2025-03-04 00:21:14 +07:00
parent 1538869e49
commit 120450fd7c
5 changed files with 228 additions and 109 deletions
+28
View File
@@ -1,8 +1,11 @@
import type { TNews } from '~/types/news'
type TBanner = {
id: number
urlImage: string
alt: string
link: string
status: 'active' | 'draft' | 'inactive'
createdAt?: string
}
export const DUMMY_DESCRIPTION = 'Berita Terhangat hari ini'
@@ -155,18 +158,43 @@ export const KAJIAN: TNews = {
export const BANNER: TBanner[] = [
{
id: 1,
urlImage: '/images/banner.png',
alt: 'banner',
link: '/category/spotlight',
status: 'active',
createdAt: '2021-08-01',
},
{
id: 2,
urlImage: 'https://placehold.co/1000x65.png',
alt: 'banner',
status: 'draft',
link: '/#',
createdAt: '2021-08-01',
},
{
id: 3,
urlImage: 'https://placehold.co/1000x65.png',
alt: 'banner',
status: 'draft',
link: '/#',
createdAt: '2021-08-01',
},
{
id: 4,
urlImage: '/images/banner.png',
alt: 'banner',
link: '/#',
status: 'active',
createdAt: '2021-08-01',
},
{
id: 5,
urlImage: '/images/banner.png',
alt: 'banner',
link: '/#',
status: 'inactive',
createdAt: '2021-08-01',
},
]