mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 00:38:11 +00:00
Build issues resolution
This commit is contained in:
@@ -53,13 +53,17 @@ export default function AgentsPage() {
|
||||
const actions = [
|
||||
{
|
||||
label: 'View Shifts',
|
||||
onClick: (agent: any) => window.location.href = `/agents/${agent.id}/shifts`,
|
||||
onClick: (agent: any) => {
|
||||
window.location.href = `/agents/${agent.id}/shifts`;
|
||||
},
|
||||
variant: 'secondary' as const,
|
||||
icon: Clock,
|
||||
},
|
||||
{
|
||||
label: 'View Commissions',
|
||||
onClick: (agent: any) => window.location.href = `/agents/${agent.id}/commissions`,
|
||||
onClick: (agent: any) => {
|
||||
window.location.href = `/agents/${agent.id}/commissions`;
|
||||
},
|
||||
variant: 'secondary' as const,
|
||||
icon: DollarSign,
|
||||
},
|
||||
|
||||
@@ -58,7 +58,9 @@ export default function AuditLogsPage() {
|
||||
const actions = [
|
||||
{
|
||||
label: 'View Details',
|
||||
onClick: (log: any) => window.location.href = `/audit/${log.id}`,
|
||||
onClick: (log: any) => {
|
||||
window.location.href = `/audit/${log.id}`;
|
||||
},
|
||||
variant: 'secondary' as const,
|
||||
icon: Eye,
|
||||
},
|
||||
|
||||
@@ -193,7 +193,7 @@ export default function CoachesPage() {
|
||||
columns={columns}
|
||||
data={coaches}
|
||||
actions={actions}
|
||||
isLoading={isLoading}
|
||||
loading={isLoading}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ export default function LoyaltyPage() {
|
||||
</div>
|
||||
|
||||
<DataTable
|
||||
data={data?.items || data || []}
|
||||
data={Array.isArray(data) ? data : (data?.items || [])}
|
||||
columns={columns}
|
||||
loading={isLoading}
|
||||
emptyMessage="No loyalty program found"
|
||||
|
||||
@@ -65,7 +65,7 @@ export default function PassengersPage() {
|
||||
},
|
||||
];
|
||||
|
||||
const actions = [
|
||||
const actions: any[] = [
|
||||
// TODO: Create passenger detail page
|
||||
// {
|
||||
// label: 'View Details',
|
||||
|
||||
@@ -26,6 +26,8 @@ export default function PaymentsPage() {
|
||||
{ key: 'createdAt', label: 'Created', render: (payment: any) => formatDateTime(payment.createdAt) },
|
||||
];
|
||||
|
||||
const actions: any[] = [];
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<div className="flex items-center justify-between">
|
||||
@@ -57,8 +59,9 @@ export default function PaymentsPage() {
|
||||
</div>
|
||||
|
||||
<DataTable
|
||||
data={data?.items || data || []}
|
||||
data={(data as any)?.items || (Array.isArray(data) ? data : [])}
|
||||
columns={columns}
|
||||
actions={actions}
|
||||
loading={isLoading}
|
||||
emptyMessage="No payments found"
|
||||
/>
|
||||
|
||||
@@ -239,7 +239,7 @@ export default function RoutesPage() {
|
||||
</div>
|
||||
|
||||
<DataTable
|
||||
data={routes?.items || routes || []}
|
||||
data={(routes as any)?.items || (Array.isArray(routes) ? routes : [])}
|
||||
columns={routeColumns}
|
||||
actions={routeActions}
|
||||
loading={routesLoading}
|
||||
|
||||
@@ -264,7 +264,7 @@ export default function SchedulesPage() {
|
||||
</div>
|
||||
|
||||
<DataTable
|
||||
data={data?.items || data || []}
|
||||
data={(data as any)?.items || (Array.isArray(data) ? data : [])}
|
||||
columns={columns}
|
||||
actions={actions}
|
||||
loading={isLoading}
|
||||
|
||||
@@ -125,7 +125,7 @@ export default function SeatClassesPage() {
|
||||
</div>
|
||||
|
||||
<DataTable
|
||||
data={data?.items || data || []}
|
||||
data={(data as any)?.items || (Array.isArray(data) ? data : [])}
|
||||
columns={columns}
|
||||
actions={actions}
|
||||
loading={isLoading}
|
||||
|
||||
Reference in New Issue
Block a user