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