Compare commits
4 Commits
c83ebf02bc
...
v0.9.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
351420bc62 | ||
|
|
61b042eee6 | ||
|
|
ac006267a2 | ||
|
|
63d9d069c0 |
@@ -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
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "dry-wash",
|
||||
"version": "0.8.0",
|
||||
"version": "0.9.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "dry-wash",
|
||||
"version": "0.8.0",
|
||||
"version": "0.9.1",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.26.7",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dry-wash",
|
||||
"version": "0.8.0",
|
||||
"version": "0.9.1",
|
||||
"description": "<a id=\"readme-top\"></a>",
|
||||
"main": "./src/index.tsx",
|
||||
"scripts": {
|
||||
|
||||
@@ -11,5 +11,8 @@ export const FEATURE = {
|
||||
return interval;
|
||||
}
|
||||
}
|
||||
},
|
||||
carImageUpload: {
|
||||
isOn: Boolean(features?.['car-img-upload'])
|
||||
}
|
||||
};
|
||||
@@ -64,7 +64,7 @@ export const CarImageForm: FC<CarImageFormProps> = memo(function CarImageForm({
|
||||
<Input
|
||||
{...field}
|
||||
ref={fileInputRef}
|
||||
accept='.jpg,.png'
|
||||
accept='image/png,image/jpeg'
|
||||
value={value?.fileName}
|
||||
onChange={(event) => {
|
||||
onChange(event.target.files[0]);
|
||||
|
||||
@@ -11,7 +11,7 @@ export const useHandleUploadCarImageResponse = (query: {
|
||||
}) => {
|
||||
const toast = useToast();
|
||||
const { t } = useTranslation('~', {
|
||||
keyPrefix: 'dry-wash.order-create.upload-car-image-query',
|
||||
keyPrefix: 'dry-wash.order-view.upload-car-image-query',
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -110,55 +110,6 @@ exports[`Страница просмотра заказа отображает
|
||||
</span>
|
||||
С вами свяжется оператор насчет оплаты по указанному номеру телефона
|
||||
</div>
|
||||
<form>
|
||||
<div
|
||||
class="chakra-form-control css-1kxonj9"
|
||||
role="group"
|
||||
>
|
||||
<label
|
||||
class="chakra-form__label css-g6pte"
|
||||
for="carImg"
|
||||
id="field-:r0:-label"
|
||||
>
|
||||
Загрузите фото вашего автомобиля, и наш сервис быстро рассчитает предварительную стоимость заказа!
|
||||
</label>
|
||||
<div
|
||||
class="chakra-stack css-1hohgv6"
|
||||
>
|
||||
<input
|
||||
accept=".jpg,.png"
|
||||
aria-describedby="field-:r0:-helptext"
|
||||
class="chakra-input css-1cjy4zv"
|
||||
hidden=""
|
||||
id="field-:r0:"
|
||||
name="carImg"
|
||||
type="file"
|
||||
value=""
|
||||
/>
|
||||
<input
|
||||
aria-describedby="field-:r0:-helptext"
|
||||
aria-readonly="true"
|
||||
class="chakra-input css-1oewt32"
|
||||
id="field-:r0:"
|
||||
placeholder="Загрузите файл"
|
||||
readonly=""
|
||||
value=""
|
||||
/>
|
||||
<button
|
||||
class="chakra-button css-fkfo5c"
|
||||
type="button"
|
||||
>
|
||||
Загрузить
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="chakra-form__helper-text css-186pyma"
|
||||
id="field-:r0:-helptext"
|
||||
>
|
||||
Допустимые форматы: .jpg, .png. Максимальный размер: 5МБ
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -83,7 +83,7 @@ const Page: FC = () => {
|
||||
endWashTime={order.endWashTime}
|
||||
created={order.created}
|
||||
/>
|
||||
<CarImageForm orderId={orderId} />
|
||||
{FEATURE.carImageUpload.isOn && <CarImageForm orderId={orderId} />}
|
||||
</VStack>
|
||||
)}
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user