diff --git a/resources/js/pages/admin/system/activity-log/index.tsx b/resources/js/pages/admin/system/activity-log/index.tsx index c0b1926..3a3a23b 100644 --- a/resources/js/pages/admin/system/activity-log/index.tsx +++ b/resources/js/pages/admin/system/activity-log/index.tsx @@ -1,8 +1,8 @@ import { Head } from '@inertiajs/react'; import { Card, CardContent } from '@/components/ui/card'; import { DataTable } from '@/components/data-table'; -import { useState } from 'react'; -import { getColumns, Activity } from './partials/columns'; +import { getColumns } from './partials/columns'; +import { Activity } from '@/types'; interface Props { activities: Activity[]; @@ -37,6 +37,7 @@ export default function ActivityLogIndex({ activities }: Props) { ] } ]} + showSelection={false} /> diff --git a/resources/js/pages/admin/system/activity-log/partials/columns.tsx b/resources/js/pages/admin/system/activity-log/partials/columns.tsx index af67e4c..da86ad3 100644 --- a/resources/js/pages/admin/system/activity-log/partials/columns.tsx +++ b/resources/js/pages/admin/system/activity-log/partials/columns.tsx @@ -1,16 +1,6 @@ import { ColumnDef } from '@tanstack/react-table'; import { Badge } from '@/components/ui/badge'; - -export interface Activity { - id: number; - description: string; - module: string; - subject_id: number | string | null; - causer: string; - properties: any; - created_at: string; - date: string; -} +import { Activity } from '@/types'; export function getColumns(): ColumnDef[] { return [ @@ -29,7 +19,7 @@ export function getColumns(): ColumnDef[] { header: 'Aksi', cell: ({ row }) => { const label = row.original.description; - + if (label === 'TAMBAH') { return ( diff --git a/resources/js/types/activity.ts b/resources/js/types/activity.ts new file mode 100644 index 0000000..0463e4e --- /dev/null +++ b/resources/js/types/activity.ts @@ -0,0 +1,10 @@ +export interface Activity { + id: number; + description: string; + module: string; + subject_id: number | string | null; + causer: string; + properties: any; + created_at: string; + date: string; +} diff --git a/resources/js/types/index.ts b/resources/js/types/index.ts index 5fefd18..cbd200d 100644 --- a/resources/js/types/index.ts +++ b/resources/js/types/index.ts @@ -7,4 +7,5 @@ export type * from './expense'; export type * from './payroll'; export type * from './purchase'; export type * from './general-setting'; +export type * from './activity';