Compare commits

...

9 Commits

Author SHA1 Message Date
85d96b930c Merge pull request 'feat/create-order-stubs' (#66) from feat/create-order-stubs into main
Reviewed-on: #66
Reviewed-by: Primakov Alexandr Alexandrovich <primakovpro@gmail.com>
2025-01-21 17:32:41 +03:00
RustamRu
adb812280d feat: create order stubs (#65) 2025-01-21 17:29:56 +03:00
RustamRu
3382ae3ada 0.5.0
All checks were successful
it-academy/dry-wash-pl/pipeline/head This commit looks good
2025-01-19 11:06:34 +03:00
RustamRu
5ed023866e fix: washing dates format
All checks were successful
it-academy/dry-wash-pl/pipeline/head This commit looks good
2025-01-19 11:04:44 +03:00
RustamRu
e73773f359 Merge branch 'main' of ssh://85.143.175.152:222/dry_wash_inc/dry-wash-pl
All checks were successful
it-academy/dry-wash-pl/pipeline/head This commit looks good
2025-01-19 10:55:56 +03:00
RustamRu
a9a9b3cadd feat: create order api 2025-01-19 10:55:44 +03:00
06abc15c9a feat: add const for time
All checks were successful
it-academy/dry-wash-pl/pipeline/head This commit looks good
2025-01-19 10:50:28 +03:00
6ca7de9467 feat: add start time and end time
Some checks failed
it-academy/dry-wash-pl/pipeline/head There was a failure building this commit
2025-01-19 10:45:40 +03:00
939f107d1c Merge pull request 'feat: add a name and phone change from the Masters (#62)' (#63) from feature/update-master into main
All checks were successful
it-academy/dry-wash-pl/pipeline/head This commit looks good
Reviewed-on: #63
Reviewed-by: Primakov Alexandr Alexandrovich <primakovpro@gmail.com>
2025-01-19 10:14:40 +03:00
31 changed files with 554 additions and 1358 deletions

View File

@ -39,9 +39,10 @@
"dry-wash.order-create.car-body-select.options.sports-car" : "Sports-car",
"dry-wash.order-create.car-body-select.options.other": "Other",
"dry-wash.order-create.form.submit-button.label": "Submit",
"dry-wash.order-create.create-order-query.success.title": "The order is successfully created",
"dry-wash.order-create.create-order-query.error.title": "Failed to create an order",
"dry-wash.order-view.title": "Your order",
"dry-wash.order-view.error.title": "Error",
"dry-wash.order-view.fetch.error": "Failed to fetch the details of order #{{number}}",
"dry-wash.order-view.get-order-query.error.title": "Failed to fetch the details of order #{{number}}",
"dry-wash.order-view.details.title": "Order #{{number}}",
"dry-wash.order-view.details.owner": "Owner",
"dry-wash.order-view.details.car": "Car",

View File

@ -78,9 +78,10 @@
"dry-wash.order-create.car-body-select.options.sports-car": "Спорткар",
"dry-wash.order-create.car-body-select.options.other": "Другой",
"dry-wash.order-create.form.submit-button.label": "Отправить",
"dry-wash.order-create.create-order-query.success.title": "Заказ успешно создан",
"dry-wash.order-create.create-order-query.error.title": "Не удалось создать заказ",
"dry-wash.order-view.title": "Ваш заказ",
"dry-wash.order-view.error.title": "Ошибка",
"dry-wash.order-view.fetch.error": "Не удалось загрузить детали заказа №{{number}}",
"dry-wash.order-view.get-order-query.error.title": "Не удалось загрузить детали заказа №{{number}}",
"dry-wash.order-view.details.title": "Заказ №{{number}}",
"dry-wash.order-view.details.owner": "Владелец",
"dry-wash.order-view.details.car": "Автомобиль",

1304
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "dry-wash",
"version": "0.4.0",
"version": "0.5.0",
"description": "<a id=\"readme-top\"></a>",
"main": "./src/index.tsx",
"scripts": {
@ -19,7 +19,7 @@
"dependencies": {
"@brojs/cli": "^1.6.3",
"@chakra-ui/icons": "^2.2.4",
"@chakra-ui/react": "^2.4.2",
"@chakra-ui/react": "^2.10.5",
"@emotion/react": "^11.4.1",
"@emotion/styled": "^11.3.0",
"@fontsource/open-sans": "^5.1.0",

View File

@ -1,4 +1,5 @@
import { getConfigValue } from '@brojs/cli';
import dayjs from 'dayjs';
enum ArmEndpoints {
ORDERS = '/arm/orders',
@ -9,12 +10,15 @@ const armService = () => {
const endpoint = getConfigValue('dry-wash.api');
const fetchOrders = async ({ date }: { date: Date }) => {
const startDate = dayjs(date).startOf('day').toISOString();
const endDate = dayjs(date).endOf('day').toISOString();
const response = await fetch(`${endpoint}${ArmEndpoints.ORDERS}`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ date }),
body: JSON.stringify({ startDate, endDate }),
});
if (!response.ok) {

1
src/api/index.ts Normal file
View File

@ -0,0 +1 @@
export * from './landing';

View File

@ -1,25 +0,0 @@
import { getConfigValue } from '@brojs/cli';
import { Order } from '../models/landing';
enum LandingEndpoints {
ORDER_VIEW = '/order'
}
const LandingService = () => {
const endpoint = getConfigValue('dry-wash.api');
const fetchOrder = async (orderId: Order.Id) => {
const response = await fetch(`${endpoint}${LandingEndpoints.ORDER_VIEW}/${orderId}`);
if (!response.ok) {
throw new Error(`Failed to fetch order: ${response.status}`);
}
return await response.json();
};
return { fetchOrder };
};
export { LandingService, LandingEndpoints };

107
src/api/landing.tsx Normal file
View File

@ -0,0 +1,107 @@
import { getConfigValue } from '@brojs/cli';
import { useEffect, useState } from 'react';
import { CreateOrder, GetOrder } from '../models/api';
import { QueryState, Trigger } from './types';
enum LandingEndpoints {
ORDER = '/order',
ORDER_CREATE = '/order/create',
}
const endpoint = getConfigValue('dry-wash.api');
const useCreateOrderMutation = <D extends CreateOrder.Response>(): [
Trigger<CreateOrder.Params, QueryState<D>['data']>,
QueryState<D>,
] => {
const [isLoading, setIsLoading] = useState<QueryState<D>['isLoading']>(false);
const [isSuccess, setIsSuccess] = useState<QueryState<D>['isSuccess']>();
const [data, setData] = useState<QueryState<D>['data']>();
const [isError, setIsError] = useState<QueryState<D>['isError']>();
const [error, setError] = useState<QueryState<D>['error']>();
const createOrder = async ({ body }: CreateOrder.Params) => {
setIsLoading(true);
try {
const response = await fetch(
`${endpoint}${LandingEndpoints.ORDER_CREATE}`,
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
},
);
if (!response.ok) {
const errorResponseObject =
(await response.json()) as QueryState<D>['error'];
setIsError(true);
setError(errorResponseObject);
throw errorResponseObject;
}
const dataResponseObject =
(await response.json()) as QueryState<D>['data'];
setIsSuccess(true);
setData(dataResponseObject);
return dataResponseObject;
} catch (error) {
setIsError(true);
setError(error);
throw error;
} finally {
setIsLoading(false);
}
};
return [createOrder, { isLoading, isSuccess, data, isError, error }];
};
const useGetOrderQuery = <D extends GetOrder.Response>({
orderId,
}: GetOrder.Params): QueryState<D> => {
const [isLoading, setIsLoading] = useState<QueryState<D>['isLoading']>(true);
const [isSuccess, setIsSuccess] = useState<QueryState<D>['isSuccess']>();
const [data, setData] = useState<QueryState<D>['data']>();
const [isError, setIsError] = useState<QueryState<D>['isError']>();
const [error, setError] = useState<QueryState<D>['error']>();
useEffect(() => {
(async () => {
try {
const response = await fetch(
`${endpoint}${LandingEndpoints.ORDER}/${orderId}`,
);
if (!response.ok) {
const errorResponseObject =
(await response.json()) as QueryState<D>['error'];
setIsError(true);
setError(errorResponseObject);
throw errorResponseObject;
}
const dataResponseObject =
(await response.json()) as QueryState<D>['data'];
setIsSuccess(true);
setData(dataResponseObject);
} catch (error) {
setIsError(true);
setError(error);
throw error;
} finally {
setIsLoading(false);
}
})();
}, []);
return { isLoading, isSuccess, data, isError, error };
};
export { useCreateOrderMutation, useGetOrderQuery };

22
src/api/types.ts Normal file
View File

@ -0,0 +1,22 @@
export type QueryData<D> = {
success: true;
body: D;
};
export type QueryErrorData = {
success: false;
error: string;
};
export type QueryState<D> = {
isLoading: boolean;
isSuccess: boolean;
data: QueryData<D>;
isError: boolean;
error: {
status: number;
data: QueryErrorData;
};
};
export type Trigger<P, D> = (params: P) => Promise<D>;

View File

@ -18,7 +18,9 @@ import { CarBodySelectOption } from './types';
export const CarBodySelect = forwardRef<HTMLInputElement, InputProps>(
function CarBodySelect(props, ref) {
const [selected, setSelected] = useState<Partial<CarBodySelectOption>>({});
const initialOption = carBodySelectOptions.find(({ value }) => value === Number(props.value));
const [selected, setSelected] = useState<Partial<CarBodySelectOption>>(initialOption);
const handleOptionClick = (option: CarBodySelectOption) => {
setSelected(option);
// eslint-disable-next-line @typescript-eslint/ban-ts-comment

View File

@ -1,7 +1,4 @@
import { useTranslation } from "react-i18next";
import { InputProps, SelectProps } from "@chakra-ui/react";
import { Order } from "../../../models/landing";
import { FormFieldProps } from "./field";
import { OrderFormValues } from "./types";
@ -30,38 +27,3 @@ export const useGetValidationRules = () => {
},
} satisfies Record<string, FormFieldProps['rules']>;
};
const removeAllSpaces = (str: string) => str.replace(/\s+/g, '');
const getValidCarBodyStyle = (fieldValue: string) => {
const carBodyAsNumber = Number(fieldValue);
return Number.isNaN(carBodyAsNumber) ? undefined : carBodyAsNumber;
};
export const formatFormValues = ({ phone, carNumber, carBody, carColor, carLocation, availableDatetimeBegin, availableDatetimeEnd }: OrderFormValues): Order.Create => {
return {
customer: {
phone
},
car: {
number: removeAllSpaces(carNumber),
body: getValidCarBodyStyle(carBody),
color: carColor
},
washing: {
location: carLocation,
begin: availableDatetimeBegin,
end: availableDatetimeEnd,
}
};
};
export const onSubmit = (values: OrderFormValues) => {
return new Promise((resolve) => {
console.log(formatFormValues(values));
resolve(formatFormValues(values));
});
};
export const inputCommonStyles: Partial<InputProps & SelectProps> = {
};

View File

@ -1 +1,2 @@
export type { OrderFormValues, OrderFormProps } from './types';
export { OrderForm } from './order-form';

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React from 'react';
import { useForm } from 'react-hook-form';
import { useTranslation } from 'react-i18next';
import { Box, Flex, FormControl, FormLabel, VStack } from '@chakra-ui/react';
@ -7,14 +7,19 @@ import { CarBodySelect } from './car-body';
import { CarColorInput } from './car-color';
import { CarNumberInput } from './car-number';
import { FormInputField, FormControllerField } from './field';
import { OrderFormValues } from './types';
import { OrderFormProps, OrderFormValues } from './types';
import { PhoneInput } from './phone';
import { SubmitButton } from './submit';
import { defaultValues, onSubmit, useGetValidationRules } from './helper';
import { defaultValues, useGetValidationRules } from './helper';
import { DateTimeInput } from './date-time';
import { LocationInput, MapComponent, StringLocation, YMapsProvider } from './location';
import {
LocationInput,
MapComponent,
StringLocation,
YMapsProvider,
} from './location';
export const OrderForm: FC = () => {
export const OrderForm = ({ onSubmit, loading }: OrderFormProps) => {
const {
handleSubmit,
control,
@ -123,7 +128,7 @@ export const OrderForm: FC = () => {
}}
/>
</YMapsProvider>
<SubmitButton isLoading={isSubmitting} mt={4} />
<SubmitButton isLoading={isSubmitting || loading} mt={4} />
</VStack>
</Box>
);

View File

@ -1,3 +1,5 @@
import { SubmitHandler } from "react-hook-form";
export type OrderFormValues = {
phone: string;
carNumber: string;
@ -7,3 +9,8 @@ export type OrderFormValues = {
availableDatetimeBegin: string;
availableDatetimeEnd: string;
};
export type OrderFormProps = {
onSubmit: SubmitHandler<OrderFormValues>;
loading: boolean;
};

View File

@ -17,7 +17,19 @@ import { carBodySelectOptions } from '../../order-form/form/car-body/helper';
import { OrderStatus } from './status';
type OrderDetailsProps = Order.View;
type OrderDetailsProps = Pick<
Order.View,
| 'id'
| 'status'
| 'phone'
| 'carNumber'
| 'carBody'
| 'carColor'
| 'location'
| 'startWashTime'
| 'endWashTime'
| 'created'
>;
export const OrderDetails: FC<OrderDetailsProps> = ({
id,
@ -27,8 +39,8 @@ export const OrderDetails: FC<OrderDetailsProps> = ({
carBody,
carColor,
location,
datetimeBegin,
datetimeEnd,
startWashTime,
endWashTime,
}) => {
const { t } = useTranslation('~', {
keyPrefix: 'dry-wash.order-view.details',
@ -75,8 +87,8 @@ export const OrderDetails: FC<OrderDetailsProps> = ({
{
label: t('datetime-range'),
value: [
formatDatetime(datetimeBegin),
formatDatetime(datetimeEnd),
formatDatetime(startWashTime),
formatDatetime(endWashTime),
].join(' - '),
},
].map(({ label, value }, i) => (

View File

@ -1,14 +1,31 @@
import React, { FC, PropsWithChildren } from 'react';
import React, { ComponentType, FC, PropsWithChildren } from 'react';
import { ChakraProvider } from '@chakra-ui/react';
import { default as landingTheme } from './theme-config';
import Fonts from './Fonts';
import { toastOptions } from './toast-options';
export const LandingThemeProvider: FC<PropsWithChildren> = ({ children }) => {
return (
<ChakraProvider theme={landingTheme}>
<ChakraProvider theme={landingTheme} toastOptions={toastOptions}>
<Fonts />
{children}
</ChakraProvider>
);
};
export function withLandingThemeProvider<T extends JSX.IntrinsicAttributes>(WrappedComponent: ComponentType<T>) {
const displayName = WrappedComponent.displayName || WrappedComponent.name || 'Component';
const ComponentWithLandingThemeProvider = (props: T) => {
return (
<LandingThemeProvider>
<WrappedComponent {...props} />
</LandingThemeProvider>
);
};
ComponentWithLandingThemeProvider.displayName = `withLandingThemeProvider(${displayName})`;
return ComponentWithLandingThemeProvider;
}

View File

@ -1 +1 @@
export { LandingThemeProvider } from './LandingThemeProvider';
export { LandingThemeProvider, withLandingThemeProvider } from './LandingThemeProvider';

View File

@ -0,0 +1,8 @@
import { ToastProviderProps } from "@chakra-ui/react";
export const toastOptions: ToastProviderProps = {
defaultOptions: {
position: 'top-right',
isClosable: true,
}
};

View File

@ -1 +1 @@
export * from './order-view';
export * from './order';

View File

@ -1,14 +0,0 @@
import { Order } from "../landing";
export type FetchOrderQueryResponse = {
id: string;
orderDate: string;
carNumber: string;
carBody: number;
carColor?: string;
startWashTime: string;
endWashTime: string;
status: Order.Status;
phone: string;
location: string;
};

18
src/models/api/order.ts Normal file
View File

@ -0,0 +1,18 @@
/* eslint-disable @typescript-eslint/no-namespace */
import { Order } from "../landing";
export namespace CreateOrder {
export type Response = {
id: Order.Id
};
export type Params = {
body: Order.Create
};
};
export namespace GetOrder {
export type Response = Order.View;
export type Params = {
orderId: Order.Id
};
};

1
src/models/common.ts Normal file
View File

@ -0,0 +1 @@
export type IsoDate = string; // YYYY-MM-DDThh:mm:ss.mmmZ

View File

@ -1,4 +1,4 @@
export type RegistrationNumber = string; // А012ВЕ
export type RegistrationNumber = string; // А012ВЕ16
export type Color = string; // #000000

View File

@ -1,3 +1,5 @@
import { IsoDate } from "../common";
import { Car, Customer, Washing } from ".";
export type Id = string;
@ -25,14 +27,16 @@ export type Create = {
};
export type View = {
id: Id;
orderDate: string,
status: Status,
phone: Customer.PhoneNumber;
carNumber: Car.RegistrationNumber;
carBody: Car.BodyStyle;
carColor?: Car.Color;
location: Washing.Location;
datetimeBegin: Washing.AvailableBeginDateTime;
datetimeEnd: Washing.AvailableEndDateTime;
startWashTime: Washing.AvailableBeginDateTime;
endWashTime: Washing.AvailableEndDateTime;
status: Status,
notes: string;
created: IsoDate;
updated: IsoDate;
id: Id;
};

View File

@ -1,5 +1,7 @@
export type Location = string; // ?
import { IsoDate } from "../common";
export type AvailableBeginDateTime = string; // YYYY-MM-DDThh:mm
export type Location = string; // 55.754364, 48.743295 Университетская улица, 1, Иннополис, Верхнеуслонский район, Республика Татарстан (Татарстан), 420500
export type AvailableEndDateTime = string; // YYYY-MM-DDThh:mm
export type AvailableBeginDateTime = IsoDate;
export type AvailableEndDateTime = IsoDate;

View File

@ -0,0 +1,29 @@
import dayjs from "dayjs";
import { Order } from "../../models/landing";
import { OrderFormValues } from "../../components/order-form";
const removeAllSpaces = (str: string) => str.replace(/\s+/g, '');
const getValidCarBodyStyle = (fieldValue: string) => {
const carBodyAsNumber = Number(fieldValue);
return Number.isNaN(carBodyAsNumber) ? undefined : carBodyAsNumber;
};
export const formatFormValues = ({ phone, carNumber, carBody, carColor, carLocation, availableDatetimeBegin, availableDatetimeEnd }: OrderFormValues): Order.Create => {
return {
customer: {
phone
},
car: {
number: removeAllSpaces(carNumber),
body: getValidCarBodyStyle(carBody),
color: carColor
},
washing: {
location: carLocation,
begin: dayjs(availableDatetimeBegin).toISOString(),
end: dayjs(availableDatetimeEnd).toISOString(),
}
};
};

View File

@ -1,17 +1,44 @@
import React, { FC } from 'react';
import { useTranslation } from 'react-i18next';
import { Container, Heading, VStack } from '@chakra-ui/react';
import { Container, Heading, useToast, VStack } from '@chakra-ui/react';
import { useNavigate } from 'react-router-dom';
import { LandingThemeProvider } from '../../containers';
import { OrderForm } from '../../components/order-form';
import { withLandingThemeProvider } from '../../containers';
import { OrderForm, OrderFormProps } from '../../components/order-form';
import { useCreateOrderMutation } from '../../api';
import { URLs } from '../../__data__/urls';
import { formatFormValues } from './helper';
const Page: FC = () => {
const { t } = useTranslation('~', {
keyPrefix: 'dry-wash.order-create',
});
const [createOrder, createOrderMutation] = useCreateOrderMutation();
const toast = useToast();
const navigate = useNavigate();
const onOrderFormSubmit: OrderFormProps['onSubmit'] = (values) => {
createOrder({ body: formatFormValues(values) })
.then(({ body: { id: orderId } }) => {
navigate({ pathname: URLs.orderView.getUrl(orderId) });
toast({
status: 'success',
title: t('create-order-query.success.title'),
});
})
.catch(({ error: errorMessage }) => {
toast({
status: 'error',
title: t('create-order-query.error.title'),
description: errorMessage,
});
});
};
return (
<LandingThemeProvider>
<Container
w='full'
maxWidth='container.xl'
@ -21,12 +48,16 @@ const Page: FC = () => {
centerContent
>
<VStack w='full' h='full' alignItems='stretch' flexGrow={1}>
<Heading textAlign='center' mt={4}>{t('title')}</Heading>
<OrderForm />
<Heading textAlign='center' mt={4}>
{t('title')}
</Heading>
<OrderForm
onSubmit={onOrderFormSubmit}
loading={createOrderMutation.isLoading}
/>
</VStack>
</Container>
</LandingThemeProvider>
);
};
export default Page;
export default withLandingThemeProvider(Page);

View File

@ -1,40 +0,0 @@
import { useEffect, useState } from 'react';
import { LandingService } from '../../api/landing';
import { Order } from '../../models/landing';
import { FetchOrderQueryResponse } from '../../models/api';
export const useFetchOrderDetails = ({
orderId,
}: {
orderId: Order.View['id'];
}) => {
const { fetchOrder } = LandingService();
const [data, setData] = useState<FetchOrderQueryResponse>();
const [isLoading, setIsLoading] = useState(false);
const [error, setError] = useState<string | null>(null);
useEffect(() => {
const fetchData = async () => {
setIsLoading(true);
try {
const data = await fetchOrder(orderId);
setData(data.body);
} catch (error) {
setError(error.message);
} finally {
setIsLoading(false);
}
};
fetchData();
}, []);
return {
isLoading,
data,
error,
};
};

View File

@ -1,36 +1,32 @@
import React, { FC, useEffect } from 'react';
import { HStack, Spinner, useToast } from '@chakra-ui/react';
import React, { FC } from 'react';
import { Alert, AlertDescription, AlertIcon, AlertTitle, HStack, Spinner } from '@chakra-ui/react';
import { useTranslation } from 'react-i18next';
import { Container, Heading, VStack } from '@chakra-ui/react';
import { useParams } from 'react-router-dom';
import { LandingThemeProvider } from '../../containers';
import {
LandingThemeProvider,
withLandingThemeProvider,
} from '../../containers';
import { OrderDetails } from '../../components/order-view';
import { useFetchOrderDetails } from './helper';
import { Order } from '../../models/landing';
import { useGetOrderQuery } from '../../api';
const Page: FC = () => {
const { t } = useTranslation('~', {
keyPrefix: 'dry-wash.order-view',
});
const { orderId } = useParams();
const { isLoading, data, error } = useFetchOrderDetails({ orderId });
const toast = useToast();
useEffect(() => {
if (error) {
toast({
title: t('error.title'),
description: t('fetch.error'),
status: 'error',
duration: 5000,
isClosable: true,
position: 'bottom-right',
const { orderId } = useParams<Order.Id>();
const {
isLoading,
isSuccess,
data: { body: order } = {},
isError,
error,
} = useGetOrderQuery({
orderId,
});
}
}, [error]);
return (
<LandingThemeProvider>
@ -51,20 +47,37 @@ const Page: FC = () => {
<Spinner size='lg' />
</HStack>
) : (
data && (
<>
<>
{isSuccess && (
<OrderDetails
id={data.id}
orderDate={data.orderDate}
status={data.status}
phone={data.phone}
carNumber={data.carNumber}
carBody={data.carBody}
carColor={data.carColor}
location={data.location}
datetimeBegin={data.startWashTime}
datetimeEnd={data.endWashTime}
id={order.id}
status={order.status}
phone={order.phone}
carNumber={order.carNumber}
carBody={order.carBody}
carColor={order.carColor}
location={order.location}
startWashTime={order.startWashTime}
endWashTime={order.endWashTime}
created={order.created}
/>
)
)}
</>
<>
{isError && (
<Alert status='error'>
<AlertIcon />
<AlertTitle>
{t('get-order-query.error.title', {
number: orderId,
})}
</AlertTitle>
<AlertDescription>{error.data?.error}</AlertDescription>
</Alert>
)}
</>
</>
)}
</VStack>
</Container>
@ -72,4 +85,4 @@ const Page: FC = () => {
);
};
export default Page;
export default withLandingThemeProvider(Page);

View File

@ -76,6 +76,12 @@ router.get('/order/:orderId', ({ params }, res) => {
);
});
router.post('/order/create', (req, res) => {
res
.status(200)
.send({ success: true, body: { ok: true } });
});
router.use('/admin', require('./admin'));
module.exports = router;

View File

@ -1,14 +1,17 @@
{
"success": true,
"body": {
"id": "order1",
"orderDate": "2024-11-24T08:41:46.366Z",
"phone": "+79876543210",
"carNumber": "А123АА16",
"carBody": 2,
"carColor": "#ffffff",
"startWashTime": "2025-01-19T14:03:00.000Z",
"endWashTime": "2025-01-19T14:03:00.000Z",
"location": "55.793833888711006,49.19037910644527 Республика Татарстан (Татарстан), Казань, жилой район Седьмое Небо",
"status": "progress",
"carNumber": "A123BC",
"carBody": 1,
"startWashTime": "2024-11-24T10:30:00.000Z",
"endWashTime": "2024-11-24T16:30:00.000Z",
"phone": "79001234563",
"location": "55.754364, 48.743295 Университетская улица, 1, Иннополис, Верхнеуслонский район, Республика Татарстан (Татарстан), 420500"
"notes": "",
"created": "2025-01-19T14:04:02.985Z",
"updated": "2025-01-19T14:04:02.987Z",
"id": "678d06527d78ec30be2679d8"
}
}