Compare commits
No commits in common. "913503b88b80645f944daaeb2a42e5ab75c43c2c" and "9c88f4b0abf09e086b05052efc1f14820c20ea79" have entirely different histories.
913503b88b
...
9c88f4b0ab
@ -1,36 +1,5 @@
|
||||
{
|
||||
"dry-wash.arm.master.add": "Добавить",
|
||||
"dry-wash.arm.order.title": "Заказы",
|
||||
"dry-wash.arm.order.status.progress": "Выполняется",
|
||||
"dry-wash.arm.order.status.complete": "Завершено",
|
||||
"dry-wash.arm.order.status.pending": "в ожидании",
|
||||
"dry-wash.arm.order.status.working": "В работе",
|
||||
"dry-wash.arm.order.status.canceled": "Отменено",
|
||||
"dry-wash.arm.order.status.placeholder": "Выберите статус",
|
||||
"dry-wash.arm.order.table.header.carNumber": "Номер машины",
|
||||
"dry-wash.arm.order.table.header.washingTime": "Время мойки",
|
||||
"dry-wash.arm.order.table.header.orderDate": "Дата заказа",
|
||||
"dry-wash.arm.order.table.header.status": "Статус",
|
||||
"dry-wash.arm.order.table.header.telephone": "Телефон",
|
||||
"dry-wash.arm.order.table.header.location": "Расположение",
|
||||
"dry-wash.arm.master.title": "Мастера",
|
||||
"dry-wash.arm.master.table.header.name": "Имя",
|
||||
"dry-wash.arm.master.table.header.currentJob": "Актуальная занятость",
|
||||
"dry-wash.arm.master.table.header.phone": "Телефон",
|
||||
"dry-wash.arm.master.table.header.actions": "Действия",
|
||||
"dry-wash.arm.master.table.actionsMenu.delete": "Удалить мастера",
|
||||
"dry-wash.arm.master.drawer.title": "Добавить нового мастера",
|
||||
"dry-wash.arm.master.drawer.inputName.label": "ФИО",
|
||||
"dry-wash.arm.master.drawer.inputName.placeholder": "Введите ФИО",
|
||||
"dry-wash.arm.master.drawer.inputPhone.label": "Номер телефона",
|
||||
"dry-wash.arm.master.drawer.inputPhone.placeholder": "Введите номер телефона",
|
||||
"dry-wash.arm.master.drawer.button.save": "Сохранить",
|
||||
"dry-wash.arm.master.drawer.button.cancel": "Отменить",
|
||||
"dry-wash.arm.master.sideBar.title": " Сухой мастер",
|
||||
"dry-wash.arm.master.sideBar.title.master": "Мастера",
|
||||
"dry-wash.arm.master.sideBar.title.orders": "Заказы",
|
||||
"dry-wash.notFound.title": "Страница не найдена",
|
||||
"dry-wash.notFound.description": "К сожалению, запрашиваемая вами страница не существует.",
|
||||
"dry-wash.notFound.button.back": " Вернуться на главную"
|
||||
|
||||
"dry-wash.arm.masters.add": "Добавить",
|
||||
"dry-wash.order.status.progress": "Выполняется",
|
||||
"dry-wash.order.status.complete": "Завершено"
|
||||
}
|
||||
|
1817
package-lock.json
generated
1817
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -17,13 +17,13 @@
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@brojs/cli": "^1.6.1",
|
||||
"@brojs/cli": "^1.3.0",
|
||||
"@brojs/i18nextreactconfig": "^1.3.3",
|
||||
"@chakra-ui/icons": "^2.2.4",
|
||||
"@chakra-ui/react": "^2.4.2",
|
||||
"@emotion/react": "^11.4.1",
|
||||
"@emotion/styled": "^11.3.0",
|
||||
"@fontsource/open-sans": "^5.1.0",
|
||||
"@lottiefiles/react-lottie-player": "^3.5.4",
|
||||
"@types/react": "^18.3.12",
|
||||
"express": "^4.21.1",
|
||||
"framer-motion": "^6.2.8",
|
||||
|
File diff suppressed because one or more lines are too long
@ -7,16 +7,15 @@ import {
|
||||
IconButton,
|
||||
} from '@chakra-ui/react';
|
||||
import { EditIcon } from '@chakra-ui/icons';
|
||||
import i18next from 'i18next';
|
||||
|
||||
const MasterActionsMenu = () => {
|
||||
return (
|
||||
<Menu>
|
||||
<MenuButton icon={<EditIcon />} as={IconButton} variant='outline' />
|
||||
<MenuList>
|
||||
<MenuItem>
|
||||
{i18next.t('dry-wash.arm.master.table.actionsMenu.delete')}
|
||||
</MenuItem>
|
||||
<MenuItem>Посмотреть профиль</MenuItem>
|
||||
<MenuItem>Изменить расписание</MenuItem>
|
||||
<MenuItem>Удалить мастера</MenuItem>
|
||||
</MenuList>
|
||||
</Menu>
|
||||
);
|
||||
|
@ -12,7 +12,6 @@ import {
|
||||
DrawerHeader,
|
||||
DrawerOverlay,
|
||||
} from '@chakra-ui/react';
|
||||
import i18next from 'i18next';
|
||||
|
||||
const MasterDrawer = ({ isOpen, onClose }) => {
|
||||
const [newMaster, setNewMaster] = useState({ name: '', phone: '' });
|
||||
@ -27,46 +26,35 @@ const MasterDrawer = ({ isOpen, onClose }) => {
|
||||
<DrawerOverlay />
|
||||
<DrawerContent>
|
||||
<DrawerCloseButton />
|
||||
<DrawerHeader>
|
||||
{i18next.t('dry-wash.arm.master.drawer.title')}
|
||||
</DrawerHeader>
|
||||
<DrawerHeader>Добавить нового мастера</DrawerHeader>
|
||||
<DrawerBody>
|
||||
<FormControl mb='4'>
|
||||
<FormLabel>
|
||||
{i18next.t('dry-wash.arm.master.drawer.inputName.label')}
|
||||
</FormLabel>
|
||||
<FormLabel>ФИО</FormLabel>
|
||||
<Input
|
||||
value={newMaster.name}
|
||||
onChange={(e) =>
|
||||
setNewMaster({ ...newMaster, name: e.target.value })
|
||||
}
|
||||
placeholder={i18next.t(
|
||||
'dry-wash.arm.master.drawer.inputName.placeholder',
|
||||
)}
|
||||
placeholder='Введите ФИО'
|
||||
/>
|
||||
</FormControl>
|
||||
<FormControl>
|
||||
<FormLabel>
|
||||
{' '}
|
||||
{i18next.t('dry-wash.arm.master.drawer.inputPhone.label')}
|
||||
</FormLabel>
|
||||
<FormLabel>Номер телефона</FormLabel>
|
||||
<Input
|
||||
value={newMaster.phone}
|
||||
onChange={(e) =>
|
||||
setNewMaster({ ...newMaster, phone: e.target.value })
|
||||
}
|
||||
placeholder={i18next.t(
|
||||
'dry-wash.arm.master.drawer.inputPhone.placeholder',
|
||||
)}
|
||||
placeholder='Введите номер телефона'
|
||||
/>
|
||||
</FormControl>
|
||||
</DrawerBody>
|
||||
<DrawerFooter>
|
||||
<Button colorScheme='teal' mr={3} onClick={handleSave}>
|
||||
{i18next.t('dry-wash.arm.master.drawer.button.save')}
|
||||
Сохранить
|
||||
</Button>
|
||||
<Button variant='ghost' onClick={onClose}>
|
||||
{i18next.t('dry-wash.arm.master.drawer.button.cancel')}
|
||||
Отменить
|
||||
</Button>
|
||||
</DrawerFooter>
|
||||
</DrawerContent>
|
@ -13,10 +13,10 @@ import {
|
||||
} from '@chakra-ui/react';
|
||||
import { mastersData } from '../../mocks';
|
||||
import MasterItem from '../MasterItem';
|
||||
import MasterDrawer from '../MasterDrawer';
|
||||
import MasterDrawer from '../MasterModal';
|
||||
import i18next from 'i18next';
|
||||
|
||||
const TABLE_HEADERS = ['name', 'currentJob', 'phone', 'actions'];
|
||||
const TABLE_HEADERS = ['Имя', 'Актуальная занятость', 'Телефон', 'Действия'];
|
||||
|
||||
const Masters = () => {
|
||||
const { isOpen, onOpen, onClose } = useDisclosure();
|
||||
@ -24,18 +24,16 @@ const Masters = () => {
|
||||
return (
|
||||
<Box p='8'>
|
||||
<Flex justifyContent='space-between' alignItems='center' mb='5'>
|
||||
<Heading size='lg'> {i18next.t('dry-wash.arm.master.title')}</Heading>
|
||||
<Heading size='lg'>Мастера</Heading>
|
||||
<Button colorScheme='green' onClick={onOpen}>
|
||||
+ {i18next.t('dry-wash.arm.master.add')}
|
||||
+ {i18next.t('dry-wash.arm.masters.add')}
|
||||
</Button>
|
||||
</Flex>
|
||||
<Table variant='simple' colorScheme='blackAlpha'>
|
||||
<Thead>
|
||||
<Tr>
|
||||
{TABLE_HEADERS.map((name) => (
|
||||
<Th key={name}>
|
||||
{i18next.t(`dry-wash.arm.master.table.header.${name}`)}
|
||||
</Th>
|
||||
<Th key={name}>{name}</Th>
|
||||
))}
|
||||
</Tr>
|
||||
</Thead>
|
||||
|
@ -23,11 +23,11 @@ const OrderItem = ({
|
||||
<Select
|
||||
value={statusSelect}
|
||||
onChange={(e) => setStatus(e.target.value)}
|
||||
placeholder={i18next.t(`dry-wash.arm.order.status.placeholder`)}
|
||||
placeholder='Выберите статус'
|
||||
>
|
||||
{statuses.map((status) => (
|
||||
<option key={status} value={status}>
|
||||
{i18next.t(`dry-wash.arm.order.status.${status}`)}
|
||||
{i18next.t(`dry-wash.order.status.${status}`)}
|
||||
</option>
|
||||
))}
|
||||
</Select>
|
||||
|
@ -2,28 +2,26 @@ import { Box, Heading, Table, Thead, Tbody, Tr, Th } from '@chakra-ui/react';
|
||||
import React from 'react';
|
||||
import { ordersData } from '../../mocks';
|
||||
import OrderItem from '../OrderItem';
|
||||
import i18next from 'i18next';
|
||||
|
||||
const Orders = () => {
|
||||
const TABLE_HEADERS = [
|
||||
'carNumber',
|
||||
'washingTime',
|
||||
'orderDate',
|
||||
'status',
|
||||
'telephone',
|
||||
'location',
|
||||
'Номер машины',
|
||||
'Время мойки',
|
||||
'Дата заказа',
|
||||
'Статус',
|
||||
'Телефон',
|
||||
'Расположение',
|
||||
];
|
||||
return (
|
||||
<Box p='8'>
|
||||
<Heading size='lg' mb='5'>
|
||||
{i18next.t('dry-wash.arm.order.title')}
|
||||
Заказы
|
||||
</Heading>
|
||||
<Table variant='simple' colorScheme='blackAlpha'>
|
||||
<Thead>
|
||||
<Tr>
|
||||
{TABLE_HEADERS.map((name, key) => (
|
||||
<Th key={key}>
|
||||
{i18next.t(`dry-wash.arm.order.table.header.${name}`)}
|
||||
</Th>
|
||||
<Th key={key}>{name}</Th>
|
||||
))}
|
||||
</Tr>
|
||||
</Thead>
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Box, Button, Heading, VStack } from '@chakra-ui/react';
|
||||
import React from 'react';
|
||||
import { Divider } from '@chakra-ui/react';
|
||||
import i18next from 'i18next';
|
||||
|
||||
const Sidebar = ({ onSelectPage }) => (
|
||||
<Box
|
||||
borderRight='1px solid black'
|
||||
@ -12,7 +12,7 @@ const Sidebar = ({ onSelectPage }) => (
|
||||
pt='8'
|
||||
>
|
||||
<Heading color='green' size='lg' mb='5'>
|
||||
{i18next.t(`dry-wash.arm.master.sideBar.title`)}
|
||||
Сухой мастер
|
||||
</Heading>
|
||||
|
||||
<VStack align='start' spacing='4'>
|
||||
@ -23,7 +23,7 @@ const Sidebar = ({ onSelectPage }) => (
|
||||
colorScheme='green'
|
||||
variant='ghost'
|
||||
>
|
||||
{i18next.t(`dry-wash.arm.master.sideBar.title.orders`)}
|
||||
Заказы
|
||||
</Button>
|
||||
<Divider />
|
||||
<Button
|
||||
@ -32,7 +32,7 @@ const Sidebar = ({ onSelectPage }) => (
|
||||
colorScheme='green'
|
||||
variant='ghost'
|
||||
>
|
||||
{i18next.t(`dry-wash.arm.master.sideBar.title.master`)}
|
||||
Мастера
|
||||
</Button>
|
||||
<Divider />
|
||||
</VStack>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* eslint-disable react/display-name */
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
import { i18nextReactInitConfig } from '@brojs/cli';
|
||||
import { i18nextReactInitConfig } from '@brojs/i18nextreactconfig';
|
||||
import App from './app';
|
||||
import i18next from 'i18next';
|
||||
|
||||
|
@ -1,43 +0,0 @@
|
||||
import React from 'react';
|
||||
import { Text, Button, Center, VStack, Heading } from '@chakra-ui/react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Player } from '@lottiefiles/react-lottie-player';
|
||||
import animate from '../../assets/animation/notFound.json';
|
||||
import i18next from 'i18next';
|
||||
|
||||
const NotFound = () => {
|
||||
return (
|
||||
<Center minH='100vh'>
|
||||
<VStack spacing={4} textAlign='center'>
|
||||
<Player
|
||||
autoplay
|
||||
loop
|
||||
src={animate}
|
||||
style={{
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
maxHeight: '450px',
|
||||
maxWidth: '450px',
|
||||
}}
|
||||
/>
|
||||
<Heading fontSize='xl'>
|
||||
{i18next.t(`dry-wash.arm.notFound.title`)}
|
||||
</Heading>
|
||||
<Text fontSize='lg'>
|
||||
{i18next.t(`dry-wash.arm.notFound.description`)}
|
||||
</Text>
|
||||
<Button
|
||||
as={Link}
|
||||
to='/dry-wash'
|
||||
colorScheme='teal'
|
||||
size='lg'
|
||||
variant='outline'
|
||||
>
|
||||
{i18next.t(`dry-wash.arm.notFound.button.back`)}
|
||||
</Button>
|
||||
</VStack>
|
||||
</Center>
|
||||
);
|
||||
};
|
||||
|
||||
export default NotFound;
|
@ -2,7 +2,6 @@ import React, { lazy, Suspense } from 'react';
|
||||
import { Routes, Route } from 'react-router-dom';
|
||||
import { PageSpinner } from './components';
|
||||
import Arm from './pages/arm';
|
||||
import NotFound from './pages/notFound/notFound';
|
||||
|
||||
const Landing = lazy(() => import('./pages/landing'));
|
||||
const OrderForm = lazy(() => import('./pages/order-form'));
|
||||
@ -20,7 +19,6 @@ const Routers = () => {
|
||||
<Route path='order-view' element={<OrderView />} />
|
||||
</Route>
|
||||
<Route path='/dry-wash/arm' element={<Arm />}></Route>
|
||||
<Route path='*' element={<NotFound />} />
|
||||
</Routes>
|
||||
</Suspense>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user