fix: eslint fix
This commit is contained in:
parent
1dee68b65d
commit
cad31605d9
@ -62,6 +62,7 @@
|
|||||||
"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",
|
||||||
|
@ -9,6 +9,7 @@ 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 {
|
||||||
|
@ -16,9 +16,10 @@ import {
|
|||||||
InputLeftElement,
|
InputLeftElement,
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { armService } from '../../api/arm';
|
|
||||||
import { PhoneIcon } from '@chakra-ui/icons';
|
import { PhoneIcon } from '@chakra-ui/icons';
|
||||||
|
|
||||||
|
import { armService } from '../../api/arm';
|
||||||
|
|
||||||
const MasterDrawer = ({ isOpen, onClose }) => {
|
const MasterDrawer = ({ isOpen, onClose }) => {
|
||||||
const { addMaster } = armService();
|
const { addMaster } = armService();
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
|
@ -2,25 +2,32 @@ 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/date-helpers';
|
import { getTimeSlot } from '../../lib';
|
||||||
|
|
||||||
|
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 }) => {
|
const MasterItem = ({ name, phone, id, schedule }) => {
|
||||||
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>
|
||||||
|
Loading…
Reference in New Issue
Block a user