Build issues resolution

This commit is contained in:
Stephanos A
2026-06-02 22:35:07 +03:00
parent aa41cc54a3
commit 4a71708d96
20 changed files with 125 additions and 51 deletions

View File

@@ -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,
},

View File

@@ -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,
},

View File

@@ -193,7 +193,7 @@ export default function CoachesPage() {
columns={columns}
data={coaches}
actions={actions}
isLoading={isLoading}
loading={isLoading}
/>
</div>

View File

@@ -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"

View File

@@ -65,7 +65,7 @@ export default function PassengersPage() {
},
];
const actions = [
const actions: any[] = [
// TODO: Create passenger detail page
// {
// label: 'View Details',

View File

@@ -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"
/>

View File

@@ -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}

View File

@@ -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}

View File

@@ -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}