diff --git a/Assemblr.7z b/Assemblr.7z
new file mode 100644
index 0000000..0076471
Binary files /dev/null and b/Assemblr.7z differ
diff --git a/babel.config.js b/babel.config.js
index 2900afe..2b283c1 100644
--- a/babel.config.js
+++ b/babel.config.js
@@ -1,6 +1,11 @@
-module.exports = function(api) {
- api.cache(true);
- return {
- presets: ['babel-preset-expo'],
- };
+module.exports = function (api) {
+ api.cache(true);
+ return {
+ presets: ['babel-preset-expo'],
+ plugins: [
+ 'react-native-reanimated/plugin',
+ 'react-native-paper/babel'
+ ]
+ };
+
};
diff --git a/package.json b/package.json
index ab22563..9705ce2 100644
--- a/package.json
+++ b/package.json
@@ -10,6 +10,7 @@
},
"dependencies": {
"@expo/webpack-config": "^19.0.0",
+ "@gorhom/bottom-sheet": "^4",
"@react-navigation/bottom-tabs": "^6.5.8",
"@react-navigation/native": "^6.1.7",
"@reduxjs/toolkit": "^1.9.5",
@@ -22,15 +23,18 @@
"expo-status-bar": "~1.6.0",
"react": "18.2.0",
"react-dom": "18.2.0",
- "react-native": "0.72.4",
+ "react-native": "0.72.5",
+ "react-native-gesture-handler": "^2.13.2",
"react-native-modal": "^13.0.1",
+ "react-native-paper": "^5.10.6",
+ "react-native-reanimated": "~3.3.0",
"react-native-responsive-dimensions": "^3.1.1",
"react-native-responsive-fontsize": "^0.5.1",
- "react-native-safe-area-context": "^4.7.2",
+ "react-native-safe-area-context": "4.6.3",
"react-native-screens": "~3.22.0",
"react-native-vector-icons": "^10.0.0",
"react-native-web": "~0.19.6",
- "react-native-webview": "^13.6.0",
+ "react-native-webview": "13.2.2",
"react-redux": "^8.1.2",
"redux": "^4.2.1"
},
diff --git a/src/App.tsx b/src/App.tsx
index 9fb10b9..3a76b31 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -5,18 +5,25 @@ import {useFonts} from 'expo-font';
import {store} from "./redux/store";
import React from "react";
import CommonPage from "./screens/CommonPage/CommonPage";
+import {BottomSheetModalProvider} from "@gorhom/bottom-sheet";
+import {GestureHandlerRootView} from "react-native-gesture-handler";
export default function App() {
let [fontsLoading] = useFonts({
- 'SF Pro Text': require('./assets/fonts/SF-Pro-Text-Regular.otf')
+ // 'SF Pro Text': require('./assets/fonts/SF-Pro-Text-Regular.otf')
})
if (!fontsLoading)
return Loading...
return (
-
+
+
+
+
+
+
);
@@ -25,7 +32,6 @@ export default function App() {
const styles = StyleSheet.create({
container: {
flex: 1,
- backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
diff --git a/src/assets/fonts/SF-Pro-Display-Black.otf b/src/assets/fonts/SF-Pro-Display-Black.otf
deleted file mode 100644
index 1e624be..0000000
Binary files a/src/assets/fonts/SF-Pro-Display-Black.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Display-BlackItalic.otf b/src/assets/fonts/SF-Pro-Display-BlackItalic.otf
deleted file mode 100644
index e98af15..0000000
Binary files a/src/assets/fonts/SF-Pro-Display-BlackItalic.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Display-Bold.otf b/src/assets/fonts/SF-Pro-Display-Bold.otf
deleted file mode 100644
index c101ebd..0000000
Binary files a/src/assets/fonts/SF-Pro-Display-Bold.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Display-BoldItalic.otf b/src/assets/fonts/SF-Pro-Display-BoldItalic.otf
deleted file mode 100644
index 777936d..0000000
Binary files a/src/assets/fonts/SF-Pro-Display-BoldItalic.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Display-Heavy.otf b/src/assets/fonts/SF-Pro-Display-Heavy.otf
deleted file mode 100644
index 1f3480f..0000000
Binary files a/src/assets/fonts/SF-Pro-Display-Heavy.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Display-HeavyItalic.otf b/src/assets/fonts/SF-Pro-Display-HeavyItalic.otf
deleted file mode 100644
index 174fb0c..0000000
Binary files a/src/assets/fonts/SF-Pro-Display-HeavyItalic.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Display-Light.otf b/src/assets/fonts/SF-Pro-Display-Light.otf
deleted file mode 100644
index cd7e408..0000000
Binary files a/src/assets/fonts/SF-Pro-Display-Light.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Display-LightItalic.otf b/src/assets/fonts/SF-Pro-Display-LightItalic.otf
deleted file mode 100644
index 4278096..0000000
Binary files a/src/assets/fonts/SF-Pro-Display-LightItalic.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Display-Medium.otf b/src/assets/fonts/SF-Pro-Display-Medium.otf
deleted file mode 100644
index 4c43bee..0000000
Binary files a/src/assets/fonts/SF-Pro-Display-Medium.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Display-MediumItalic.otf b/src/assets/fonts/SF-Pro-Display-MediumItalic.otf
deleted file mode 100644
index 79c99ef..0000000
Binary files a/src/assets/fonts/SF-Pro-Display-MediumItalic.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Display-Regular.otf b/src/assets/fonts/SF-Pro-Display-Regular.otf
deleted file mode 100644
index 09be9fc..0000000
Binary files a/src/assets/fonts/SF-Pro-Display-Regular.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Display-RegularItalic.otf b/src/assets/fonts/SF-Pro-Display-RegularItalic.otf
deleted file mode 100644
index a74fb83..0000000
Binary files a/src/assets/fonts/SF-Pro-Display-RegularItalic.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Display-Semibold.otf b/src/assets/fonts/SF-Pro-Display-Semibold.otf
deleted file mode 100644
index cdefbb4..0000000
Binary files a/src/assets/fonts/SF-Pro-Display-Semibold.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Display-SemiboldItalic.otf b/src/assets/fonts/SF-Pro-Display-SemiboldItalic.otf
deleted file mode 100644
index bb3e3da..0000000
Binary files a/src/assets/fonts/SF-Pro-Display-SemiboldItalic.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Display-Thin.otf b/src/assets/fonts/SF-Pro-Display-Thin.otf
deleted file mode 100644
index 6456e71..0000000
Binary files a/src/assets/fonts/SF-Pro-Display-Thin.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Display-ThinItalic.otf b/src/assets/fonts/SF-Pro-Display-ThinItalic.otf
deleted file mode 100644
index 4aaa7e7..0000000
Binary files a/src/assets/fonts/SF-Pro-Display-ThinItalic.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Display-Ultralight.otf b/src/assets/fonts/SF-Pro-Display-Ultralight.otf
deleted file mode 100644
index 2494056..0000000
Binary files a/src/assets/fonts/SF-Pro-Display-Ultralight.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Display-UltralightItalic.otf b/src/assets/fonts/SF-Pro-Display-UltralightItalic.otf
deleted file mode 100644
index 6f91adc..0000000
Binary files a/src/assets/fonts/SF-Pro-Display-UltralightItalic.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Italic.ttf b/src/assets/fonts/SF-Pro-Italic.ttf
deleted file mode 100644
index 51b6b3c..0000000
Binary files a/src/assets/fonts/SF-Pro-Italic.ttf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Rounded-Black.otf b/src/assets/fonts/SF-Pro-Rounded-Black.otf
deleted file mode 100644
index 6b1fdbd..0000000
Binary files a/src/assets/fonts/SF-Pro-Rounded-Black.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Rounded-Bold.otf b/src/assets/fonts/SF-Pro-Rounded-Bold.otf
deleted file mode 100644
index eb0e8bf..0000000
Binary files a/src/assets/fonts/SF-Pro-Rounded-Bold.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Rounded-Heavy.otf b/src/assets/fonts/SF-Pro-Rounded-Heavy.otf
deleted file mode 100644
index f5f2e73..0000000
Binary files a/src/assets/fonts/SF-Pro-Rounded-Heavy.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Rounded-Light.otf b/src/assets/fonts/SF-Pro-Rounded-Light.otf
deleted file mode 100644
index 46eb4f2..0000000
Binary files a/src/assets/fonts/SF-Pro-Rounded-Light.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Rounded-Medium.otf b/src/assets/fonts/SF-Pro-Rounded-Medium.otf
deleted file mode 100644
index a8dcc03..0000000
Binary files a/src/assets/fonts/SF-Pro-Rounded-Medium.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Rounded-Regular.otf b/src/assets/fonts/SF-Pro-Rounded-Regular.otf
deleted file mode 100644
index 3701a91..0000000
Binary files a/src/assets/fonts/SF-Pro-Rounded-Regular.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Rounded-Semibold.otf b/src/assets/fonts/SF-Pro-Rounded-Semibold.otf
deleted file mode 100644
index e530515..0000000
Binary files a/src/assets/fonts/SF-Pro-Rounded-Semibold.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Rounded-Thin.otf b/src/assets/fonts/SF-Pro-Rounded-Thin.otf
deleted file mode 100644
index ce76b50..0000000
Binary files a/src/assets/fonts/SF-Pro-Rounded-Thin.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Rounded-Ultralight.otf b/src/assets/fonts/SF-Pro-Rounded-Ultralight.otf
deleted file mode 100644
index d3fbd50..0000000
Binary files a/src/assets/fonts/SF-Pro-Rounded-Ultralight.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Text-Black.otf b/src/assets/fonts/SF-Pro-Text-Black.otf
deleted file mode 100644
index 40ebd10..0000000
Binary files a/src/assets/fonts/SF-Pro-Text-Black.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Text-BlackItalic.otf b/src/assets/fonts/SF-Pro-Text-BlackItalic.otf
deleted file mode 100644
index 3eb3d8e..0000000
Binary files a/src/assets/fonts/SF-Pro-Text-BlackItalic.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Text-Bold.otf b/src/assets/fonts/SF-Pro-Text-Bold.otf
deleted file mode 100644
index 8a3add8..0000000
Binary files a/src/assets/fonts/SF-Pro-Text-Bold.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Text-BoldItalic.otf b/src/assets/fonts/SF-Pro-Text-BoldItalic.otf
deleted file mode 100644
index ff9a0ce..0000000
Binary files a/src/assets/fonts/SF-Pro-Text-BoldItalic.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Text-Heavy.otf b/src/assets/fonts/SF-Pro-Text-Heavy.otf
deleted file mode 100644
index c11f6b3..0000000
Binary files a/src/assets/fonts/SF-Pro-Text-Heavy.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Text-HeavyItalic.otf b/src/assets/fonts/SF-Pro-Text-HeavyItalic.otf
deleted file mode 100644
index 1b74d87..0000000
Binary files a/src/assets/fonts/SF-Pro-Text-HeavyItalic.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Text-Light.otf b/src/assets/fonts/SF-Pro-Text-Light.otf
deleted file mode 100644
index d5168cf..0000000
Binary files a/src/assets/fonts/SF-Pro-Text-Light.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Text-LightItalic.otf b/src/assets/fonts/SF-Pro-Text-LightItalic.otf
deleted file mode 100644
index 8681534..0000000
Binary files a/src/assets/fonts/SF-Pro-Text-LightItalic.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Text-Medium.otf b/src/assets/fonts/SF-Pro-Text-Medium.otf
deleted file mode 100644
index 468eef6..0000000
Binary files a/src/assets/fonts/SF-Pro-Text-Medium.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Text-MediumItalic.otf b/src/assets/fonts/SF-Pro-Text-MediumItalic.otf
deleted file mode 100644
index d761b53..0000000
Binary files a/src/assets/fonts/SF-Pro-Text-MediumItalic.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Text-Regular.otf b/src/assets/fonts/SF-Pro-Text-Regular.otf
deleted file mode 100644
index a779044..0000000
Binary files a/src/assets/fonts/SF-Pro-Text-Regular.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Text-RegularItalic.otf b/src/assets/fonts/SF-Pro-Text-RegularItalic.otf
deleted file mode 100644
index d272e9e..0000000
Binary files a/src/assets/fonts/SF-Pro-Text-RegularItalic.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Text-Semibold.otf b/src/assets/fonts/SF-Pro-Text-Semibold.otf
deleted file mode 100644
index 584246e..0000000
Binary files a/src/assets/fonts/SF-Pro-Text-Semibold.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Text-SemiboldItalic.otf b/src/assets/fonts/SF-Pro-Text-SemiboldItalic.otf
deleted file mode 100644
index 5809d02..0000000
Binary files a/src/assets/fonts/SF-Pro-Text-SemiboldItalic.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Text-Thin.otf b/src/assets/fonts/SF-Pro-Text-Thin.otf
deleted file mode 100644
index 6ed40dc..0000000
Binary files a/src/assets/fonts/SF-Pro-Text-Thin.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Text-ThinItalic.otf b/src/assets/fonts/SF-Pro-Text-ThinItalic.otf
deleted file mode 100644
index 927db12..0000000
Binary files a/src/assets/fonts/SF-Pro-Text-ThinItalic.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Text-Ultralight.otf b/src/assets/fonts/SF-Pro-Text-Ultralight.otf
deleted file mode 100644
index f353355..0000000
Binary files a/src/assets/fonts/SF-Pro-Text-Ultralight.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro-Text-UltralightItalic.otf b/src/assets/fonts/SF-Pro-Text-UltralightItalic.otf
deleted file mode 100644
index 2463109..0000000
Binary files a/src/assets/fonts/SF-Pro-Text-UltralightItalic.otf and /dev/null differ
diff --git a/src/assets/fonts/SF-Pro.ttf b/src/assets/fonts/SF-Pro.ttf
deleted file mode 100644
index ccec8a1..0000000
Binary files a/src/assets/fonts/SF-Pro.ttf and /dev/null differ
diff --git a/src/assets/icons/gear.png b/src/assets/icons/gear.png
new file mode 100644
index 0000000..d6c2c51
Binary files /dev/null and b/src/assets/icons/gear.png differ
diff --git a/src/assets/icons/settings/printer.png b/src/assets/icons/settings/printer.png
new file mode 100644
index 0000000..06e575a
Binary files /dev/null and b/src/assets/icons/settings/printer.png differ
diff --git a/src/assets/icons/settings/statistics.png b/src/assets/icons/settings/statistics.png
new file mode 100644
index 0000000..5dc395a
Binary files /dev/null and b/src/assets/icons/settings/statistics.png differ
diff --git a/src/assets/icons/settings/withdraw.png b/src/assets/icons/settings/withdraw.png
new file mode 100644
index 0000000..b2cdc1a
Binary files /dev/null and b/src/assets/icons/settings/withdraw.png differ
diff --git a/src/assets/icons/sorting.png b/src/assets/icons/sorting.png
new file mode 100644
index 0000000..8d71079
Binary files /dev/null and b/src/assets/icons/sorting.png differ
diff --git a/src/components/BasicButton/BasicButton.tsx b/src/components/BasicButton/BasicButton.tsx
index 7ae4475..4092caf 100644
--- a/src/components/BasicButton/BasicButton.tsx
+++ b/src/components/BasicButton/BasicButton.tsx
@@ -7,16 +7,19 @@ import DText from "../DText/DText";
type Props = {
label: string;
style?: StyleProp;
+ containerStyle?: StyleProp;
isUnset?: boolean;
onPress?: (event: GestureResponderEvent) => void
};
-const BasicButton: FC = ({label, onPress, style, isUnset = false}) => {
+const BasicButton: FC = ({label, onPress, containerStyle, style, isUnset = false}) => {
return (
-
- {label}
-
+
+
+ {label}
+
+
);
};
diff --git a/src/components/DTitle/DTitle.tsx b/src/components/DTitle/DTitle.tsx
index e45bdf8..299c3d5 100644
--- a/src/components/DTitle/DTitle.tsx
+++ b/src/components/DTitle/DTitle.tsx
@@ -2,7 +2,7 @@ import React, {FC, ReactElement} from "react";
import {StyleProp, StyleSheet, Text, TextStyle, View, ViewStyle} from 'react-native';
import {RFPercentage} from "react-native-responsive-fontsize";
import DText from "../DText/DText";
-import {responsiveWidth} from "react-native-responsive-dimensions";
+import {responsiveScreenFontSize, responsiveWidth} from "react-native-responsive-dimensions";
type Props = {
children: string;
@@ -13,8 +13,8 @@ const DTitle: FC = ({children, style}) => {
}
const styles = StyleSheet.create({
text: {
- fontSize: responsiveWidth(4.5),
- fontWeight: "600",
+ fontSize: responsiveScreenFontSize(2),
+ fontWeight: "500",
fontStyle: "normal"
}
})
diff --git a/src/components/OrderCard/OrderCard.tsx b/src/components/OrderCard/OrderCard.tsx
index 199c28c..db9ebfe 100644
--- a/src/components/OrderCard/OrderCard.tsx
+++ b/src/components/OrderCard/OrderCard.tsx
@@ -31,17 +31,19 @@ const OrderCard: FC = ({onPress}) => {
-
+
+
- {order.orderNumber}
-
+ {order.orderNumber}
+
+
+ Количество: 5
+ Поставщик: {order.supplierName}
+ Селлер: {order.sellerName}
+ Цвет: ГОЛУБОЙ
- Количество: 5
- Поставщик: {order.supplierName}
- Селлер: {order.sellerName}
- Цвет: ГОЛУБОЙ
-
+
Ожидает сборки
@@ -57,12 +59,10 @@ const styles = StyleSheet.create({
container: {
backgroundColor: "white",
display: "flex",
- borderRadius: RFPercentage(5),
+ borderRadius: RFPercentage(3),
height: responsiveHeight(20),
flexDirection: "row",
padding: RFPercentage(2),
-
-
},
imageWrapper: {
width: responsiveWidth(30),
@@ -73,15 +73,16 @@ const styles = StyleSheet.create({
},
description: {
- backgroundColor:"red",
+ // backgroundColor: "red",
flex: 1,
display: "flex",
flexDirection: "column",
paddingLeft: responsiveWidth(3),
gap: 0,
+
},
title: {
- marginBottom: responsiveHeight(1),
+ marginBottom: responsiveHeight(0.5),
flexDirection: "row",
alignItems: "center"
},
@@ -91,8 +92,14 @@ const styles = StyleSheet.create({
resizeMode: "center",
marginLeft: responsiveHeight(1)
},
- statusContainer: {
+ descriptionContent: {
+ // backgroundColor: "green",
+ flex: 1
+ },
+ descriptionStatus: {
alignSelf: "flex-end",
+ // backgroundColor: "blue",
+ marginRight: responsiveWidth(2),
}
});
export default OrderCard;
\ No newline at end of file
diff --git a/src/components/SearchBar/SearchBar.tsx b/src/components/SearchBar/SearchBar.tsx
index 2dbcb15..6b784a3 100644
--- a/src/components/SearchBar/SearchBar.tsx
+++ b/src/components/SearchBar/SearchBar.tsx
@@ -44,10 +44,10 @@ const height = 6;
const styles = StyleSheet.create({
container: {
display: "flex",
- marginHorizontal: responsiveWidth(5),
flexDirection: "row-reverse",
height: responsiveHeight(height),
- alignItems: "flex-end"
+ alignItems: "flex-end",
+ backgroundColor: "white"
},
scanImage: {
height: responsiveHeight(5),
@@ -58,7 +58,8 @@ const styles = StyleSheet.create({
borderRadius: 0,
borderTopRightRadius: responsiveWidth(1),
borderBottomRightRadius: responsiveWidth(1),
- width: responsiveWidth(25)
+ width: responsiveWidth(25),
+ flex: 1
},
scanImageWrapper: {
paddingHorizontal: responsiveWidth(1),
@@ -77,7 +78,7 @@ const styles = StyleSheet.create({
borderBottomLeftRadius: responsiveWidth(1),
paddingLeft: responsiveHeight(2),
fontSize: RFPercentage(2),
- fontFamily: 'SF Pro Text'
+ // fontFamily: 'SF Pro Text'
}
})
diff --git a/src/components/Separator/Separator.tsx b/src/components/Separator/Separator.tsx
new file mode 100644
index 0000000..c1e29dc
--- /dev/null
+++ b/src/components/Separator/Separator.tsx
@@ -0,0 +1,27 @@
+import React from 'react';
+import {View, StyleSheet, FlexStyle} from 'react-native';
+import {responsiveHeight} from "react-native-responsive-dimensions";
+
+type Props = {
+ width?: any;
+}
+const Separator: React.FC = ({width = "60%"}) => {
+ return (
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ display: "flex",
+ alignItems: "center"
+ },
+ separator: {
+ height: responsiveHeight(0.3), // Толщина разделителя
+ backgroundColor: "#A5A5A5", // Цвет разделителя
+ },
+});
+
+export default Separator;
diff --git a/src/components/SortingButton/SortingButton.tsx b/src/components/SortingButton/SortingButton.tsx
new file mode 100644
index 0000000..56efdbb
--- /dev/null
+++ b/src/components/SortingButton/SortingButton.tsx
@@ -0,0 +1,42 @@
+import {FC} from "react";
+import {StyleSheet, View, Image, TouchableOpacity, GestureResponderEvent} from "react-native";
+import DText from "../DText/DText";
+import {RFPercentage} from "react-native-responsive-fontsize";
+import {responsiveWidth} from "react-native-responsive-dimensions";
+
+type Props = {
+ onPress?: (event: GestureResponderEvent) => void
+
+};
+const SortingButton: FC = ({onPress}) => {
+ return (
+
+
+
+
+
+ Сортировка
+
+
+
+ )
+}
+
+const styles = StyleSheet.create({
+ container: {
+ display: 'flex',
+ flexDirection: 'row',
+ alignItems: 'center',
+ columnGap: responsiveWidth(1)
+ },
+ imageWrapper: {
+ width: RFPercentage(3),
+ height: RFPercentage(3)
+ },
+ image: {
+ resizeMode: 'contain',
+ width: '100%',
+ height: '100%'
+ }
+});
+export default SortingButton;
\ No newline at end of file
diff --git a/src/css/colors.tsx b/src/css/colors.tsx
new file mode 100644
index 0000000..dcd1e47
--- /dev/null
+++ b/src/css/colors.tsx
@@ -0,0 +1,3 @@
+export const background = "#F5F5F5";
+export const blue = "#2478F8";
+export const gray = '#A5A5A5';
\ No newline at end of file
diff --git a/src/features/interface/interfaceSlice.ts b/src/features/interface/interfaceSlice.ts
new file mode 100644
index 0000000..917fcfc
--- /dev/null
+++ b/src/features/interface/interfaceSlice.ts
@@ -0,0 +1,24 @@
+import {createSlice} from "@reduxjs/toolkit";
+
+export interface InterfaceState {
+ dim: boolean;
+}
+
+const initialState: InterfaceState = {
+ dim: false
+}
+export const interfaceSlice = createSlice({
+ name: 'interface',
+ initialState,
+ reducers: {
+ enableDim: (state) => {
+ state.dim = true;
+ },
+ disableDim: (state) => {
+ state.dim = false;
+ }
+ }
+});
+
+export const {enableDim, disableDim} = interfaceSlice.actions;
+export default interfaceSlice.reducer;
\ No newline at end of file
diff --git a/src/redux/store.ts b/src/redux/store.ts
index 36cbc23..5778520 100644
--- a/src/redux/store.ts
+++ b/src/redux/store.ts
@@ -1,11 +1,13 @@
import {configureStore} from '@reduxjs/toolkit';
import authReducer from 'features/auth/authSlice';
+import interfaceReducer from 'features/interface/interfaceSlice';
import {useDispatch} from "react-redux";
export const store = configureStore({
reducer: {
auth: authReducer,
+ interface: interfaceReducer
},
});
diff --git a/src/screens/CommonPage/CommonPage.tsx b/src/screens/CommonPage/CommonPage.tsx
index 0f6fa64..d1b674f 100644
--- a/src/screens/CommonPage/CommonPage.tsx
+++ b/src/screens/CommonPage/CommonPage.tsx
@@ -3,13 +3,17 @@ import LoginScreen from "../LoginScreen/LoginScreen";
import MainScreen from "../MainScreen/MainScreen";
import SearchBar from "../../components/SearchBar/SearchBar";
import React from "react";
+import {background} from "../../css/colors";
+import {useSelector} from "react-redux";
+import {RootState} from "../../redux/store";
function CommonPage() {
-
+ const dim = useSelector((state: RootState) => state.interface.dim);
return (
+
)
@@ -20,7 +24,13 @@ const styles = StyleSheet.create({
display: "flex",
flexDirection: "column",
flexGrow: 1,
- flex: 1
+ flex: 1,
+ backgroundColor: background
+ },
+ overlay: {
+ ...StyleSheet.absoluteFillObject,
+ backgroundColor: 'rgba(0, 0, 0, 0.5)',
+ zIndex: 2,
}
});
diff --git a/src/screens/MainScreen/MainScreen.tsx b/src/screens/MainScreen/MainScreen.tsx
index 6a836f7..3e9d8e7 100644
--- a/src/screens/MainScreen/MainScreen.tsx
+++ b/src/screens/MainScreen/MainScreen.tsx
@@ -5,7 +5,7 @@ import BoxScreen from "../BoxScreen/BoxScreen";
import BarcodeScreen from "../BarcodeScreen/BarcodeScreen";
import MoneyScreen from "../MoneyScreen/MoneyScreen";
import ProfileScreen from "../ProfileScreen/ProfileScreen";
-import {NavigationContainer} from "@react-navigation/native";
+import {DefaultTheme, NavigationContainer} from "@react-navigation/native";
import moneyScreen from "../MoneyScreen/MoneyScreen";
import profileScreen from "../ProfileScreen/ProfileScreen";
import {responsiveHeight, responsiveWidth} from "react-native-responsive-dimensions";
@@ -13,6 +13,7 @@ import {RFPercentage} from "react-native-responsive-fontsize";
import LoginScreen from "../LoginScreen/LoginScreen";
import OrderScreen from "../OrderScreen/OrderScreen";
import OrdersScreen from "../OrdersScreen/OrdersScreen";
+import {background} from "../../css/colors";
interface CustomTabProps {
@@ -31,7 +32,7 @@ const CustomTab = ({name, component, icon}: CustomTabProps) => ({
style={{
width: RFPercentage(4),
height: RFPercentage(4),
- tintColor: color
+ tintColor: color,
}}
/>
),
@@ -71,11 +72,18 @@ function MainScreen() {
];
return (
-
+
{tabScreens.map(tabScreen =>
(null);
+ const snapPoints = useMemo(() => ['30%', '30%'], []);
+ const [sortingValue, setSortingValue] = useState("createdOn");
return (
{
}}/>
+
+ {
+ dispatch(enableDim());
+ bottomSheetModalRef.current?.present();
+
+ }}/>
+
-
+
+
+ {
+ dispatch(disableDim());
+ }}>
+
+
+ setSortingValue('createdOn')}
+
+ />
+ По дате создания
+
+
+ setSortingValue('shipmentDate')}
+ />
+ По дате отгрузки
+
+
+ setSortingValue('shipmentDatee')}
+ />
+ По дате дрочки
+
+
+ {
+ bottomSheetModalRef.current?.dismiss();
+ }} label={'Применть'}/>
+
+
+
+
+
)
}
@@ -33,15 +104,32 @@ const styles = StyleSheet.create({
width: "100%",
height: "100%",
display: "flex",
+ paddingHorizontal: responsiveWidth(5),
+ rowGap: responsiveHeight(2),
+ fontWeight: '500'
},
content: {
flex: 1,
- paddingHorizontal: RFPercentage(3),
- paddingTop: RFPercentage(3)
},
scrollContainer: {
rowGap: responsiveHeight(2)
+ },
+ radioButtonContainer: {
+ flexDirection: "row",
+ alignItems: 'center',
+ },
+ sortingButtonWrapper: {},
+ sortingModalContainer: {
+ width: "100%",
+ height: "100%",
+ flex: 1,
+ padding: RFPercentage(3),
+ flexDirection: "column",
+ },
+ sortingModalButton: {
+ paddingHorizontal: responsiveWidth(30),
+ marginTop: "auto"
}
});
diff --git a/src/screens/ProfileScreen/ProfileScreen.tsx b/src/screens/ProfileScreen/ProfileScreen.tsx
index 5893727..4739701 100644
--- a/src/screens/ProfileScreen/ProfileScreen.tsx
+++ b/src/screens/ProfileScreen/ProfileScreen.tsx
@@ -1,14 +1,197 @@
-import {Button, Text, View} from "react-native";
+import {Button, Text, View, StyleSheet, TouchableOpacity, Image, ScrollView} from "react-native";
import {useAppDispatch} from "../../redux/store";
import * as process from "process";
+import {responsiveFontSize, responsiveHeight, responsiveWidth} from "react-native-responsive-dimensions";
+import {background, blue, gray} from "../../css/colors";
+import {RFPercentage} from "react-native-responsive-fontsize";
+import DText from "../../components/DText/DText";
+import DTitle from "../../components/DTitle/DTitle";
+import {ScreenStackHeaderLeftView} from "react-native-screens";
+import Separator from "../../components/Separator/Separator";
+import {BottomSheetModal} from "@gorhom/bottom-sheet";
+import {useMemo, useRef, useState} from "react";
-function ProfileScreen() {
-
+type SettingsElementProps = {
+ icon: any;
+ title: string;
+}
+const SettingsElement: React.FC = ({icon, title}) => {
return (
-
- Profile
+
+
+
+
+
+
+ {title}
+
+
+
+ )
+}
+type HistoryElementProps = {
+ cost: number;
+ description: string;
+ color: string;
+}
+const HistoryElement: React.FC = ({cost, description, color}) => {
+ const formatNumber = (n: number): string => n >= 0 ? `+${n}` : `${n}`;
+ return (
+
+ {formatNumber(cost)} руб
+ {description}
)
}
+function ProfileScreen() {
+ const bottomSheetModalRef = useRef(null);
+ const snapPoints = useMemo(() => ['25%', '40%'], []);
+ const [modalVisible, setModalVisible] = useState(false);
+ return (
+
+
+
+ Ваш баланс: 228 руб
+ Собрано товаров: 1337 шт
+
+
+
+
+
+
+
+
+
+
+
+
+
+ История операций
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {
+ setModalVisible(false);
+ }}
+ >
+
+ хуй
+
+
+
+
+
+ )
+}
+
+const styles = StyleSheet.create({
+ container: {
+ // backgroundColor: "red",
+ flex: 1,
+ display: "flex",
+ flexDirection: "column",
+ },
+ overlay: {
+ ...StyleSheet.absoluteFillObject, // Это заполнит родительский элемент абсолютным позиционированием
+ backgroundColor: 'rgba(104, 104, 104, 0.50)',
+ zIndex: 2, // Значение zIndex больше, чем у content, поэтому overlay будет выше
+ },
+ historyElementContainer: {
+ width: "100%",
+ backgroundColor: "white",
+ borderRadius: RFPercentage(2),
+ padding: RFPercentage(2),
+ elevation: 1
+ },
+ historyContainer: {
+ paddingVertical: responsiveHeight(2),
+ flex: 1,
+ // backgroundColor: "red"
+ },
+ historyElements: {
+ marginTop: responsiveHeight(3),
+ },
+ historyElementsContainer: {
+ rowGap: responsiveHeight(2),
+ },
+ header: {
+ backgroundColor: blue,
+ borderBottomLeftRadius: RFPercentage(3),
+ borderBottomRightRadius: RFPercentage(3),
+ elevation: 10,
+ paddingHorizontal: responsiveWidth(5),
+ paddingVertical: responsiveHeight(3),
+ color: "white",
+ display: "flex",
+ flexDirection: "row"
+ },
+ headerText: {
+ color: "white"
+ },
+ headerInfo: {
+ // backgroundColor: "red"
+ },
+ actionsCarousel: {
+ flexDirection: "row",
+ columnGap: responsiveWidth(3),
+ },
+ actionsCarouselContainer: {
+ // backgroundColor: "red",
+ paddingVertical: responsiveHeight(5)
+ },
+ actionsCarouselImage: {
+ resizeMode: "contain",
+ flex: 1,
+ width: "100%",
+ height: "100%",
+ },
+ actionsCarouselImageWrapper: {
+ width: RFPercentage(10),
+ height: RFPercentage(10),
+ backgroundColor: "white",
+ borderRadius: 100,
+ borderWidth: RFPercentage(0.3),
+ padding: RFPercentage(1),
+ justifyContent: "center",
+ alignItems: "center"
+
+ },
+ actionsCarouselElementContainer: {
+ display: "flex",
+ alignItems: "center",
+
+ },
+ content: {
+ flex: 1,
+ paddingHorizontal: responsiveWidth(5),
+ },
+
+})
export default ProfileScreen;
\ No newline at end of file