feat: add format date(#40)
Some checks failed
it-academy/dry-wash-pl/pipeline/pr-main There was a failure building this commit

This commit is contained in:
2024-11-24 12:08:45 +03:00
parent 920f4440e9
commit acd39b1e32
8 changed files with 61 additions and 26 deletions

View File

@@ -1,7 +1,7 @@
import React from 'react';
import { Badge, Link, Stack, Td, Tr } from '@chakra-ui/react';
import MasterActionsMenu from '../MasterActionsMenu';
import { getTimeSlot } from '../../lib/date-helpers';
const MasterItem = ({ name, schedule, phone }) => {
return (
@@ -9,9 +9,9 @@ const MasterItem = ({ name, schedule, phone }) => {
<Td>{name}</Td>
<Td>
<Stack direction='row'>
{schedule.map((time, index) => (
{schedule.map(({ startWashTime, endWashTime }, index) => (
<Badge colorScheme={'green'} key={index}>
{time}
{getTimeSlot(startWashTime, endWashTime)}
</Badge>
))}
</Stack>