fix: Suppress explicit any types in payments page
This commit is contained in:
@@ -46,6 +46,7 @@ export default async function PaymentsPage() {
|
||||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const getCustomerName = (reservation: any) => {
|
||||
if (!reservation) return "-"
|
||||
const res = Array.isArray(reservation) ? reservation[0] : reservation
|
||||
@@ -54,12 +55,14 @@ export default async function PaymentsPage() {
|
||||
return cust?.full_name || "-"
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const getReservationDate = (reservation: any) => {
|
||||
if (!reservation) return "-"
|
||||
const res = Array.isArray(reservation) ? reservation[0] : reservation
|
||||
return res?.start_time ? format(new Date(res.start_time), 'd MMM yyyy', { locale: tr }) : "-"
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const getReservationStatus = (reservation: any) => {
|
||||
if (!reservation) return "-"
|
||||
const res = Array.isArray(reservation) ? reservation[0] : reservation
|
||||
@@ -95,6 +98,7 @@ export default async function PaymentsPage() {
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
) : (
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
payments?.map((payment: any) => (
|
||||
<TableRow key={payment.id}>
|
||||
<TableCell className="font-medium">
|
||||
@@ -119,6 +123,7 @@ export default async function PaymentsPage() {
|
||||
<TableRow>
|
||||
<TableCell colSpan={3} className="font-bold text-right">Toplam:</TableCell>
|
||||
<TableCell className="font-bold">
|
||||
{/* eslint-disable-next-line @typescript-eslint/no-explicit-any */}
|
||||
₺{payments?.reduce((sum: number, p: any) => sum + Number(p.amount), 0).toLocaleString('tr-TR')}
|
||||
</TableCell>
|
||||
<TableCell colSpan={4}></TableCell>
|
||||
|
||||
Reference in New Issue
Block a user