feature/stubsArm #40

Merged
primakov merged 5 commits from feature/stubsArm into main 2024-11-24 19:57:52 +03:00
5 changed files with 53 additions and 40 deletions
Showing only changes of commit e374cbfdd3 - Show all commits

View File

@ -13,9 +13,9 @@ import {
} from '@chakra-ui/react';
import { useTranslation } from 'react-i18next';
import { mastersData } from '../../mocks';
import MasterItem from '../MasterItem';
import MasterDrawer from '../MasterDrawer';
import data from '../../../stubs/json/arm-masters/success.json';
const TABLE_HEADERS = [
'name' as const,
@ -48,7 +48,7 @@ const Masters = () => {
</Tr>
</Thead>
<Tbody>
{mastersData.map((master, index) => (
{data.body.map((master, index) => (
<MasterItem key={index} {...master} />
))}
</Tbody>

View File

@ -1,10 +1,9 @@
import React from 'react';
import { Box, Heading, Table, Thead, Tbody, Tr, Th } from '@chakra-ui/react';
import { useTranslation } from 'react-i18next';
import { ordersData } from '../../mocks';
import OrderItem from '../OrderItem';
import { OrderProps } from '../OrderItem/OrderItem';
import data from '../../../stubs/json/arm-orders/success.json';
const Orders = () => {
const { t } = useTranslation('~', {
@ -34,7 +33,7 @@ const Orders = () => {
</Tr>
</Thead>
<Tbody>
{ordersData.map((order, index) => (
{data.body.map((order, index) => (
<OrderItem
key={index}
{...order}

View File

@ -1,35 +0,0 @@
export const mastersData = [
{
id: 'masters1',
name: 'Иван Иванов',
schedule: ['15:00 - 16:30', '17:00 - 18:00'],
phone: '+7 900 123 45 67',
},
{
id: 'masters2',
name: 'Сергей Петров',
schedule: ['10:00 - 12:30', '14:00 - 15:30', '16:00 - 17:00'],
phone: '+7 900 234 56 78',
},
];
export const ordersData = [
{
id: 'order1',
carNumber: 'A123BC',
washTime: '10:30',
orderDate: '2024-10-31',
status: 'progress',
phone: '79001234567',
location: 'Казань, ул. Баумана, 1',
},
{
id: 'order2',
carNumber: 'B456CD',
washTime: '11:00',
orderDate: '2024-10-31',
status: 'complete',
phone: '79002345678',
location: 'Казань, ул. Кремлёвская, 3',
},
];

View File

@ -0,0 +1,17 @@
{
"success": true,
"body": [
{
"id": "masters1",
"name": "Иван Иванов",
"schedule": ["15:00 - 16:30", "17:00 - 18:00"],
"phone": "+7 900 123 45 67"
},
{
"id": "masters12",
"name": "Иван Иванов",
"schedule": ["15:00 - 16:30", "17:00 - 18:00"],
"phone": "+7 900 123 45 67"
}
]
}

View File

@ -0,0 +1,32 @@
{
"success": true,
"body": [
{
"id": "order1",
"carNumber": "A123BC",
"washTime": "10:30",
"orderDate": "2024-10-31",
"status": "progress",
"phone": "79001234563",
"location": "Казань, ул. Баумана, 1"
},
{
"id": "order2",
"carNumber": "A123BC",
"washTime": "10:30",
"orderDate": "2024-10-31",
"status": "progress",
"phone": "79001234568",
"location": "Казань, ул. Баумана, 1"
},
{
"id": "order3",
"carNumber": "A123BC",
"washTime": "10:30",
"orderDate": "2024-10-31",
"status": "progress",
"phone": "79001234569",
"location": "Казань, ул. Баумана, 1"
}
]
}