Compare commits

...

4 Commits

Author SHA1 Message Date
RustamRu
ac006267a2 0.9.0
All checks were successful
it-academy/dry-wash-pl/pipeline/head This commit looks good
2025-02-23 12:11:20 +03:00
RustamRu
63d9d069c0 feat: add car image feature
All checks were successful
it-academy/dry-wash-pl/pipeline/head This commit looks good
2025-02-23 12:08:50 +03:00
c83ebf02bc Merge pull request 'feature/upload-car-image' (#90) from feature/upload-car-image into main
All checks were successful
it-academy/dry-wash-pl/pipeline/head This commit looks good
Reviewed-on: #90
2025-02-23 12:02:39 +03:00
RustamRu
1968df7bb3 fix: getOrder test (#88)
All checks were successful
it-academy/dry-wash-pl/pipeline/pr-main This commit looks good
2025-02-23 11:58:56 +03:00
8 changed files with 24 additions and 10 deletions

View File

@@ -21,7 +21,16 @@ module.exports = {
features: {
'dry-wash': {
// add your features here in the format [featureName]: { value: string }
'order-view-status-polling': { value: '3000' }
"order-view-status-polling": {
"on": true,
"value": "3000",
"key": "order-view-status-polling"
},
"car-img-upload": {
"on": true,
"value": "true",
"key": "car-img-upload"
}
},
},
config: {

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "dry-wash",
"version": "0.8.0",
"version": "0.9.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "dry-wash",
"version": "0.8.0",
"version": "0.9.0",
"license": "ISC",
"dependencies": {
"@babel/core": "^7.26.7",

View File

@@ -1,6 +1,6 @@
{
"name": "dry-wash",
"version": "0.8.0",
"version": "0.9.0",
"description": "<a id=\"readme-top\"></a>",
"main": "./src/index.tsx",
"scripts": {

View File

@@ -11,5 +11,8 @@ export const FEATURE = {
return interval;
}
}
},
carImageUpload: {
isOn: Boolean(features?.['car-img-upload'])
}
};

View File

@@ -13,6 +13,7 @@ export const extractErrorMessageFromResponse = ({
}: FetchBaseQueryError) => {
if (
typeof data === 'object' &&
data !== null &&
'error' in data &&
typeof data.error === 'string'
) {

View File

@@ -16,7 +16,6 @@ exports[`Страница просмотра заказа отображает
</h2>
<div
class="chakra-stack css-1n38vgh"
created="2025-01-19T14:04:02.985Z"
data-testid="order-details"
>
<div
@@ -26,6 +25,9 @@ exports[`Страница просмотра заказа отображает
class="chakra-heading css-1jb3vzl"
>
Заказ №{{number}}
(
Sunday, January 19, 2025 5:04 PM
)
</h2>
<span
class="css-6jfsiv"

View File

@@ -75,7 +75,7 @@ exports[`Страница заказов должна корректно ото
<p
class="chakra-text css-52ukzg"
>
20.02.2025
23.02.2025
</p>
<button
class="chakra-button css-ez23ye"

View File

@@ -70,7 +70,7 @@ const Page: FC = () => {
<>
<>
{isSuccess && (
<VStack p={4} alignItems='flex-start' gap={4}>
<VStack p={4} alignItems='flex-start' gap={4} data-testid='order-details'>
<OrderDetails
orderNumber={order.orderNumber}
status={order.status}
@@ -81,10 +81,9 @@ const Page: FC = () => {
location={order.location}
startWashTime={order.startWashTime}
endWashTime={order.endWashTime}
created={order.created}
data-testid='order-details'
created={order.created}
/>
<CarImageForm orderId={orderId} />
{FEATURE.carImageUpload.isOn && <CarImageForm orderId={orderId} />}
</VStack>
)}
</>