"use client"; import style from "./ServiceItem.module.css"; import Avatar from "@components/Avatar/Avatar"; import { AppointmentEventByClient } from "@core/Models/Appointments.model"; import dayjs from "dayjs"; import "dayjs/locale/es"; import { testContrast } from "@core/app/theme/scheduleView"; import { formatDateLarge, formatTimeInterval } from "@core/helpers/format"; import ServiceRatingSummary from "@components/ServiceRatingSummary/ServiceRatingSummary"; dayjs.locale("es"); interface ServiceItemProps { style?: React.CSSProperties; data: AppointmentEventByClient; onClick?: (e: React.MouseEvent) => void; } export default function ServiceItem(props: ServiceItemProps): React.ReactElement { return (
{props.data.serviceName}
{formatTimeInterval(props.data.startTime, props.data.endTime)}
{props.data.serviceDescription && (
{props.data.serviceDescription}
)}
{props.data.collaboratorName}
{formatDateLarge(props.data.appointmentDate)}
); }