feat: create order stubs (#65)

This commit is contained in:
RustamRu
2025-01-19 15:29:58 +03:00
parent 3382ae3ada
commit adb812280d
29 changed files with 540 additions and 1367 deletions

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) => (