Compare commits

..

No commits in common. "9b0bda3cdacd8fd025905a04b8d2e348d00dc05b" and "1dee68b65d0a93ebd96efdbe03c06c46f857a5e6" have entirely different histories.

6 changed files with 10 additions and 40 deletions

View File

@ -62,7 +62,6 @@
"dry-wash.arm.order.table.header.washingTime": "Washing Time", "dry-wash.arm.order.table.header.washingTime": "Washing Time",
"dry-wash.arm.order.table.header.orderDate": "Order Date", "dry-wash.arm.order.table.header.orderDate": "Order Date",
"dry-wash.arm.order.table.header.status": "Status", "dry-wash.arm.order.table.header.status": "Status",
"dry-wash.arm.order.table.header.masters": "Master",
"dry-wash.arm.order.table.header.telephone": "Telephone", "dry-wash.arm.order.table.header.telephone": "Telephone",
"dry-wash.arm.order.table.header.location": "Location", "dry-wash.arm.order.table.header.location": "Location",
"dry-wash.arm.master.title": "Masters", "dry-wash.arm.master.title": "Masters",

View File

@ -9,7 +9,6 @@ import {
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import { EditIcon } from '@chakra-ui/icons'; import { EditIcon } from '@chakra-ui/icons';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { armService } from '../../api/arm'; import { armService } from '../../api/arm';
interface MasterActionsMenu { interface MasterActionsMenu {

View File

@ -16,9 +16,8 @@ import {
InputLeftElement, InputLeftElement,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { PhoneIcon } from '@chakra-ui/icons';
import { armService } from '../../api/arm'; import { armService } from '../../api/arm';
import { PhoneIcon } from '@chakra-ui/icons';
const MasterDrawer = ({ isOpen, onClose }) => { const MasterDrawer = ({ isOpen, onClose }) => {
const { addMaster } = armService(); const { addMaster } = armService();

View File

@ -2,32 +2,25 @@ import React from 'react';
import { Badge, Link, Stack, Td, Tr } from '@chakra-ui/react'; import { Badge, Link, Stack, Td, Tr } from '@chakra-ui/react';
import MasterActionsMenu from '../MasterActionsMenu'; import MasterActionsMenu from '../MasterActionsMenu';
import { getTimeSlot } from '../../lib'; import { getTimeSlot } from '../../lib/date-helpers';
export interface Schedule {
id: string;
startWashTime: string;
endWashTime: string;
}
export type MasterProps = { export type MasterProps = {
id: string; id: string;
name: string; name: string;
phone: string; phone: string;
schedule: Schedule[];
}; };
const MasterItem = ({ name, phone, id, schedule }) => { const MasterItem = ({ name, phone, id }) => {
return ( return (
<Tr> <Tr>
<Td>{name}</Td> <Td>{name}</Td>
<Td> <Td>
<Stack direction='row'> <Stack direction='row'>
{schedule.map(({ startWashTime, endWashTime }, index) => ( {/*{schedule.map(({ startWashTime, endWashTime }, index) => (*/}
<Badge colorScheme={'green'} key={index}> {/* <Badge colorScheme={'green'} key={index}>*/}
{getTimeSlot(startWashTime, endWashTime)} {/* {getTimeSlot(startWashTime, endWashTime)}*/}
</Badge> {/* </Badge>*/}
))} {/*))}*/}
</Stack> </Stack>
</Td> </Td>
<Td> <Td>

View File

@ -8,8 +8,8 @@ const commonError = { success: false, message: 'Что-то пошло не та
const sleep = const sleep =
(duration = 1000) => (duration = 1000) =>
(req, res, next) => (req, res, next) =>
setTimeout(next, duration); setTimeout(next, duration);
router.use(sleep()); router.use(sleep());

View File

@ -4,31 +4,11 @@
{ {
"id": "masters1", "id": "masters1",
"name": "Иван Иванов", "name": "Иван Иванов",
"schedule": [ {
"id": "order1",
"startWashTime": "2024-11-24T10:30:00.000Z",
"endWashTime": "2024-11-24T16:30:00.000Z"
},
{
"id": "order2",
"startWashTime": "2024-11-24T11:30:00.000Z",
"endWashTime": "2024-11-24T17:30:00.000Z"
}],
"phone": "+7 900 123 45 67" "phone": "+7 900 123 45 67"
}, },
{ {
"id": "masters12", "id": "masters12",
"name": "Иван Иванов", "name": "Иван Иванов",
"schedule": [ {
"id": "order1",
"startWashTime": "2024-11-24T10:30:00.000Z",
"endWashTime": "2024-11-24T16:30:00.000Z"
},
{
"id": "order2",
"startWashTime": "2024-11-24T11:30:00.000Z",
"endWashTime": "2024-11-24T17:30:00.000Z"
}],
"phone": "+7 900 123 45 67" "phone": "+7 900 123 45 67"
} }
] ]