25 lines
900 B
TypeScript
25 lines
900 B
TypeScript
import { dailyReportsClient } from '../../api/clients';
|
|
import { DAILY_REPORTS } from '../../api/config';
|
|
import { RecordView } from './RecordView';
|
|
import type { WiredRecordViewProps } from './OrdersView';
|
|
import { DailyLogCard } from '../cards/DailyLogCard';
|
|
|
|
/** Daily Logs record view (Daily Reports workflow). */
|
|
export function DailyLogsView({ onRowClick, onPunchOutRow, pageSize, headerActions, refreshKey }: WiredRecordViewProps & { onPunchOutRow?: (row: any) => void }) {
|
|
return (
|
|
<RecordView
|
|
client={dailyReportsClient}
|
|
rvUid={DAILY_REPORTS.recordViews.DAILY_LOGS}
|
|
title="Daily Logs"
|
|
onRowClick={onRowClick}
|
|
pageSize={pageSize}
|
|
headerActions={headerActions}
|
|
refreshKey={refreshKey}
|
|
sortBy="instance_id"
|
|
sortDir="desc"
|
|
hideChart
|
|
renderItem={(row) => <DailyLogCard row={row} onPunchOut={onPunchOutRow} />}
|
|
/>
|
|
);
|
|
}
|