feat: Add car image description and increase upload file size limit

- Updated locales (en and ru) to increase max file upload size from 5MB to 14MB
- Modified PriceCar component to display image description
- Updated order model and view to support image description
- Added sample image description in stub data
This commit is contained in:
RustamRu 2025-03-08 18:51:36 +03:00
parent 9349a41f84
commit 0679ad92ef
6 changed files with 9 additions and 4 deletions

View File

@ -51,7 +51,7 @@
"dry-wash.order-view.details.datetime-range": "When",
"dry-wash.order-view.details.alert": "The operator will contact you about the payment at the specified phone number",
"dry-wash.order-view.upload-car-image.field.label": "Upload a photo of your car, and our service will quickly calculate the pre-order price!",
"dry-wash.order-view.upload-car-image.field.help": "Allowed formats: .jpg, .png. Maximum size: 5MB",
"dry-wash.order-view.upload-car-image.field.help": "Allowed formats: .jpg, .png. Maximum size: 14MB",
"dry-wash.order-view.upload-car-image.file-input.placeholder": "Upload a file",
"dry-wash.order-view.upload-car-image.file-input.button": "Upload",
"dry-wash.order-view.upload-car-image-query.success.title": "The car image is successfully uploaded",

View File

@ -106,7 +106,7 @@
"dry-wash.order-view.details.datetime-range": "Когда",
"dry-wash.order-view.details.alert": "С вами свяжется оператор насчет оплаты по указанному номеру телефона",
"dry-wash.order-view.upload-car-image.field.label": "Загрузите фото вашего автомобиля, и наш сервис быстро рассчитает предварительную стоимость заказа!",
"dry-wash.order-view.upload-car-image.field.help": "Допустимые форматы: .jpg, .png. Максимальный размер: 5МБ",
"dry-wash.order-view.upload-car-image.field.help": "Допустимые форматы: .jpg, .png. Максимальный размер: 14МБ",
"dry-wash.order-view.upload-car-image.file-input.placeholder": "Загрузите файл",
"dry-wash.order-view.upload-car-image.file-input.button": "Загрузить",
"dry-wash.order-view.upload-car-image-query.success.title": "Изображение автомобиля успешно загружено",

View File

@ -4,7 +4,7 @@ import { getFeatures } from '@brojs/cli';
const PRICE_INCREASE_PERCENT_PER_RATING = 10; // 10% за каждый балл
export const PriceCar = ({ image, rating }) => {
export const PriceCar = ({ image, rating, description }) => {
const BASE_WASH_PRICE: number = Number(
getFeatures('dry-wash')['order-cost']?.value || 1000,
);
@ -41,6 +41,7 @@ export const PriceCar = ({ image, rating }) => {
) : (
<Text>Не удалость определить уровень загрязнения машины</Text>
)}
<Text>{description}</Text>
</Box>
);
};

View File

@ -45,4 +45,5 @@ export type View = {
id: Id;
image?: string;
imageRating?: string;
imageDescription?: string;
};

View File

@ -96,6 +96,7 @@ const Page: FC = () => {
<PriceCar
image={order?.image}
rating={order?.imageRating}
description={order?.imageDescription}
/>
)}
</VStack>

File diff suppressed because one or more lines are too long