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
+24 -33
View File
@@ -5,6 +5,7 @@ import { useState } from 'react'
import { SearchIcon } from '~/components/icons/search'
import { Button } from '~/components/ui/button'
import { UiTable } from '~/components/ui/table'
import { TitleDashboard } from '~/components/ui/title-dashboard'
import { SUBSCRIPTIONS, SUBSETTINGS } from './data'
@@ -91,23 +92,17 @@ export const SubscriptionsPage = () => {
</div>
</div>
<div className="rounded-lg bg-white p-6 shadow-md">
<h3 className="py-1 font-semibold text-[#4C5CA0]">
Daftar Subscription
</h3>
<DataTable
// className="cell-border"
data={SUBSCRIPTIONS}
columns={colTableSubscription}
options={{
paging: true,
searching: true,
ordering: true,
info: true,
}}
></DataTable>
</div>
<UiTable
data={SUBSCRIPTIONS}
columns={colTableSubscription}
options={{
paging: true,
searching: true,
ordering: true,
info: true,
}}
title="Daftar Subscription"
/>
</>
)}
@@ -156,22 +151,18 @@ export const SubscriptionsPage = () => {
</Field>
</div>
</div>
<div className="rounded-lg bg-white p-6 shadow-md">
<h3 className="py-1 font-semibold text-[#4C5CA0]">
Daftar Subscription
</h3>
<DataTable
className="cell-border"
data={SUBSETTINGS}
columns={colTableSubSetting}
options={{
paging: true,
searching: true,
ordering: true,
info: true,
}}
></DataTable>
</div>
<UiTable
data={SUBSETTINGS}
columns={colTableSubSetting}
options={{
paging: true,
searching: true,
ordering: true,
info: true,
}}
title=" Daftar Subscription"
/>
</>
)}
</div>