import React from 'react'; import CardBox from '../CardBox'; import ImageField from '../ImageField'; import dataFormatter from '../../helpers/dataFormatter'; import { saveFile } from '../../helpers/fileSaver'; import ListActionsPopover from '../ListActionsPopover'; import { useAppSelector } from '../../stores/hooks'; import { Pagination } from '../Pagination'; import LoadingSpinner from '../LoadingSpinner'; import Link from 'next/link'; import { hasPermission } from '../../helpers/userPermissions'; type Props = { bookings: any[]; loading: boolean; onDelete: (id: string) => void; currentPage: number; numPages: number; onPageChange: (page: number) => void; }; const ListBookings = ({ bookings, loading, onDelete, currentPage, numPages, onPageChange, }: Props) => { const currentUser = useAppSelector((state) => state.auth.currentUser); const hasUpdatePermission = hasPermission(currentUser, 'UPDATE_BOOKINGS'); const corners = useAppSelector((state) => state.style.corners); const bgColor = useAppSelector((state) => state.style.cardsColor); return ( <>
Title
{item.title}
StartDate
{dataFormatter.dateTimeFormatter(item.start_date)}
EndDate
{dataFormatter.dateTimeFormatter(item.end_date)}
User
{dataFormatter.usersOneListFormatter(item.user)}
Status
{item.status}
Vehiclenumber
{item.vehiclenumber}
Phone
{item.phone}
{item.email}
No data to display