import 'react-native-gesture-handler';
import * as React from 'react';
import { useState } from 'react';
import { Alert, Button, Image, StyleSheet, Dimensions, SafeAreaView, ScrollView, TouchableOpacity, Modal, Pressable, Share } from 'react-native';
import Constants from 'expo-constants';
import { Ionicons, FontAwesome } from '@expo/vector-icons';
import { LinearGradient } from 'expo-linear-gradient';
import { PolicyFooter, Social, ShowroomList, FooterInfo } from '../components/footer/footerMain';
import EditScreenInfo from '../components/EditScreenInfo';
import { Text, View, } from '../components/Themed';
import useColorScheme from '../hooks/useColorScheme';
import { TextInput } from 'react-native-gesture-handler';
import { RadioButton, Checkbox } from 'react-native-paper';
import { Picker } from '@react-native-picker/picker';
import { ArticleItem } from '../components/article/ArticleItem';
import { ShowProductItemSave } from '../components/product/productItem';
export default function AccountHome() {
return (
Trang chủ
Tài khoản của bạn
Tài khoản
Hurasoft test
Bạn đang ở trang tài khoản. Vui lòng chọn XEM THÔNG TIN để xem các mục.
)
}
const MenuAccount = () => {
const [showMenuAccount, setShowMenuAccount] = useState(true)
return (
setShowMenuAccount(!showMenuAccount)}>
Xem thông tin
Thông tin tài khoản
Quản lý đơn hàng
Sản phẩm đã xem
Sản phẩm đã lưu
Sản phẩm bạn đã đánh giá
Sản phẩm bạn đã thích
Thay đổi mật khẩu
Logout
)
}
const CustommerInfo = () => {
return (
Thông tin tài khoản
Họ tên: Hurasoft Test
Giới tính: Nữ
Email: test@mail.com
Địa chỉ: 30 Nguyên Hồng - Láng Hạ - Đống Đa - HN
Tỉnh/Thành phố: Hà Nội
Số điện thoại: 0912345678
Chỉnh sửa thông tin cá nhân
)
}
const CustommerInfoChange = () => {
const [selectedProvince, setSelectedProvince] = useState();
const [checked, setChecked] = React.useState('male');
return (
Cập nhật thông tin cá nhân
Họ tên
Giới tính
Nam
setChecked('male')} />
Nữ
setChecked('female')} />
Địa chỉ email
Địa chỉ nhà
Tỉnh/TP
setSelectedProvince(itemValue)
}
>
Điện thoại cố định
Điện thoại di động
Thay đổi
)
}
const productData = [
{
id: 1,
productName: 'Laptop LG Gram 14ZD90N-V.AX55A5 (i5 1035G7/8GB RAM/512GBSSD/14.0 inch FHD/FP/Xám Bạc) (model 2020)',
productSKU: 'TESTSKU',
productImage: {
small: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png',
medium: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png',
large: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png',
original: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png',
},
price: 30000000,
marketPrice: 50000000,
quantity: 1,
summary: 'CPU: Intel Core i5 1035G1\nRAM: 8GB\nỔ cứng: 256GB SSD\nMàn hình: 15.6 inch FHD\nHĐH: Win 10\nMàu: Đen'
},
{
id: 2,
productName: 'Laptop LG Gram 14ZD90N-V.AX55A5 (i5 1035G7/8GB RAM/512GBSSD/14.0 inch FHD/FP/Xám Bạc) (model 2020)',
productSKU: 'TESTSKU',
productImage: {
small: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png',
medium: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png',
large: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png',
original: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png',
},
price: 25000000,
marketPrice: 50000000,
quantity: 0,
summary: 'CPU: Intel Core i5 1035G1\nRAM: 8GB\nỔ cứng: 256GB SSD\nMàn hình: 15.6 inch FHD\nHĐH: Win 10\nMàu: Đen'
},
]
const ProductSave = () => {
const itemProductStyle = {
width: '100%',
borderBottomWidth: 1,
borderBottomColor: '#e8e8e8',
position: 'relative',
}
return (
Sản phẩm mua sau
{
productData.map(item => )
}
)
}
const ProductFavorite = () => {
const itemProductStyle = {
width: '100%',
borderBottomWidth: 1,
borderBottomColor: '#e8e8e8',
position: 'relative',
}
return (
Sản phẩm Bạn đã thích
{
productData.map(item => )
}
)
}
const ChangePassword = () => {
return (
Thay đổi mật khẩu
Mật khẩu hiện tại
Mật khẩu mới
Nhập lại mật khẩu mới
Thay đổi
)
}
const ListOrder = () => {
return (
Danh Sách đơn hàng
Số đơn hàng
Giá trị
Thời gian
Thông tin
#123456
Xem chi tiết
100.000.000 đ
13-03-2021
Đã hoàn thành
#123457
Xem chi tiết
100.000.000 đ
13-03-2021
Hủy bỏ
)
}
const OrderDetail = () => {
return (
Đơn hàng số #123456
Thời gian đặt mua: 13-3-2021, 5:00 pm
Thông tin người mua
Họ và tên:
Hurasoft Test
Email:
test@mail.com
Số điện thoại:
0912345678
Địa chỉ:
30 Nguyên Hồng - Láng Hạ - Đống Đa - HN
STT
1
Ảnh
Tên Sản phẩm
Bàn Game K-Deck ( Khung Kim Loại , Mặt Gỗ Tự Nhiên Phủ PU Bóng )
Giá bán
30.000.000 đ
Số lượng
1
Tổng
30.000.000 đ
Giá trị
30.000.000 đ
Phí vận chuyển
30.000 đ
Tổng giá trị đơn hàng
30.030.000 đ
)
}
const winWidth = Dimensions.get('window').width; //full width
const winHeight = Dimensions.get('window').height; //full height
const winWidthP10 = winWidth - 20;
const halfWinWidth = winWidth / 2;
const ratio = winWidthP10 / 850; //541 is actual image width
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#fff',
},
brecrumb: {
display: 'flex',
width: winWidth,
paddingLeft: 10,
paddingRight: 10,
flexDirection: 'row',
height: 18,
alignItems: 'center',
marginTop: 10,
marginBottom: 10,
},
brecrumbText: {
fontSize: 13,
color: '#222',
},
brecrumbTextLast: {
fontSize: 13,
color: '#b7b7b7',
},
brecrumbIcon: {
fontSize: 13,
color: '#222',
marginLeft: 6,
marginRight: 6
},
accountBox: {
marginBottom: 20,
width: winWidth,
paddingHorizontal: 10,
},
accountBoxHeader: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
marginBottom: 20,
},
accountBoxHeaderIcon: {
width: 60,
height: 60,
borderRadius: 30,
overflow: 'hidden',
backgroundColor: '#008445',
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center',
marginRight: 20,
},
accountBoxHeaderIconFont: {
fontSize: 40,
color: '#fff',
lineHeight: 40,
},
accountBoxHeaderInfo: {
width: winWidthP10 - 80,
},
accountBoxHeaderInfoText: {
marginBottom: 10,
},
accountBoxHeaderInfoName: {
fontSize: 16,
textTransform: 'uppercase',
fontWeight: 'bold'
},
accountBoxSelec: {
marginBottom: 20,
},
accountBoxSelecBox: {
borderRadius: 3,
borderWidth: 1,
borderColor: '#999',
paddingHorizontal: 10,
height: 40,
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
},
accountBoxSelecBoxText: {
textTransform: 'uppercase',
fontWeight: 'bold',
},
accountBoxSelecBoxIcon: {},
accountBoxSelecList: {
width: '100%',
borderRadius: 3,
borderWidth: 1,
borderColor: '#999',
display: 'none',
},
active: {
display: 'flex',
},
accountNameTab: {
padding: 10,
flexDirection: 'row',
alignItems: 'center',
},
accountNameTabIcon: {
fontSize: 24,
color: '#7b7b7b',
marginRight: 8,
},
accountNameTabText: {},
accountBoxContent: {},
accountBoxTextHome: {},
custommerInfo: {
},
custommerInfoItemHeader: {
marginBottom: 10,
fontWeight: 'bold',
},
custommerInfoItem: {
marginBottom: 10,
},
custommerInfoButtonText: {
color: '#ed1b24'
},
boxCustommerInfoChange: {},
boxCustommerInfoChangeList: {
padding: 10,
borderColor: '#e1e1e1',
borderWidth: 1,
borderRadius: 5,
},
titleBoxInAccount: {
fontSize: 16,
fontWeight: 'bold',
marginBottom: 10,
},
custommerInfoChangeItem: {
marginBottom: 15,
flexDirection: 'row',
alignItems: 'center'
},
custommerInfoChangeItemText: {
width: 148,
},
custommerInfoChangeItemContent: {
width: winWidthP10 - 170,
},
custommerInfoChangeItemInput: {
width: '100%',
height: 36,
borderRadius: 3,
borderWidth: 1,
borderColor: '#e1e1e1',
paddingHorizontal: 10,
},
registerItemSex: {
flexDirection: 'row',
alignItems: 'center',
},
registerItemSexItem: {
flexDirection: 'row',
alignItems: 'center',
marginRight: 20,
},
registerItemSexText: {
marginRight: 5,
},
registerItemSexRadio: {
width: 36,
height: 36,
borderColor: '#333',
borderWidth: 1,
borderRadius: 18,
},
picker: {
height: 46,
width: '100%',
},
onePickerItem: {
height: 46,
color: '#222',
fontSize: 14,
textAlign: 'center',
width: '100%',
},
boxCustommerInfoChangeSubmit: {
width: 150,
height: 36,
backgroundColor: 'red',
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center',
borderRadius: 5,
},
boxCustommerInfoChangeSubmitText: {
color: '#fff'
},
boxProductSave: {},
boxProductSaveTitle: {
fontSize: 16,
fontWeight: 'bold',
marginBottom: 15,
},
listProductSave: {},
ListOrder: {},
ListOrderList: {
width: '100%',
borderColor: '#e1e1e1',
borderWidth: 1,
borderRadius: 5,
padding: 5
},
ListOrderListHeader: {
flexDirection: 'row',
alignItems: 'center',
borderBottomColor: '#e1e1e1',
borderBottomWidth: 1,
height: 40,
},
ListOrderListHeaderSt: {
fontWeight: 'bold',
width: winWidthP10 - 260,
fontSize: 12,
},
ListOrderListHeaderNd: {
fontWeight: 'bold',
width: 90,
fontSize: 12,
},
ListOrderListHeaderRd: {
fontWeight: 'bold',
width: 75,
fontSize: 12,
},
ListOrderListHeaderInfo: {
fontWeight: 'bold',
width: 90,
fontSize: 12,
},
ListOrderItem: {
flexDirection: 'row',
alignItems: 'center',
borderBottomColor: '#e1e1e1',
borderBottomWidth: 1,
paddingVertical: 10,
},
ListOrderItemLast: {
borderBottomWidth: 0,
},
ListOrderItemSt: {
width: winWidthP10 - 260,
flexDirection: 'row',
flexWrap: 'wrap',
alignItems: 'center',
},
ListOrderItemStText: {
fontSize: 12,
marginRight: 6,
},
ListOrderItemStButton: {},
ListOrderItemStButtonText: {
fontSize: 12,
color: '#f78d1c'
},
ListOrderItemNd: {
width: 90,
fontSize: 12,
},
ListOrderItemRd: {
width: 75,
fontSize: 12,
},
ListOrderItemInfo: {
width: 90,
fontSize: 12,
},
boxOrderDetail: {},
boxOrderDetailNum: {
width: '100%',
marginBottom: 15,
fontSize: 21,
fontWeight: 'bold',
textAlign: 'center'
},
boxOrderDetailTime: {
marginBottom: 15,
},
boxOrderDetailInfo: {
borderWidth: 1,
borderRadius: 5,
borderColor: '#e1e1e1',
marginBottom: 20,
padding: 8,
},
boxOrderDetailInfoTitle: {
fontWeight: 'bold',
color: '#f60',
marginBottom: 10,
},
boxOrderDetailInfoItem: {
flexDirection: 'row',
alignItems: 'center',
marginBottom: 10,
},
boxOrderDetailInfoItemTextSt: {
width: 100,
},
boxOrderDetailInfoItemTextNd: {
width: winWidthP10 - 120,
},
boxOrderDetailList: {
borderWidth: 1,
borderRadius: 5,
borderColor: '#e1e1e1',
width: '100%',
flexDirection: 'column',
},
bold: {
fontWeight: 'bold',
},
boxOrderDetailListItem: {
width: '100%',
flexDirection: 'column',
},
boxOrderDetailListItemLine: {
flexDirection: 'row',
borderBottomWidth: 1,
borderBottomColor: '#e1e1e1',
width: '100%',
},
boxOrderDetailListItemLineTotal: {
width: '100%',
flexDirection: 'row',
borderBottomWidth: 1,
borderBottomColor: '#e1e1e1',
alignItems: 'center',
},
boxOrderDetailListItemLeft: {
width: 100,
padding: 10,
},
boxOrderDetailListItemText: {},
boxOrderDetailListItemRight: {
width: winWidthP10 - 120,
borderLeftColor: '#e1e1e1',
borderLeftWidth: 1,
padding: 10,
},
boxOrderDetailListItemImage: {
width: 75,
height: 75,
position: 'relative',
},
boxOrderDetailListItemImageCt: {
width: '100%',
position: 'absolute',
left: 0,
right: 0,
top: 0,
bottom: 0,
},
boxOrderTotalItemLeft: {
width: '50%',
flexDirection: 'row',
justifyContent: 'flex-end',
padding: 10,
},
boxOrderTotalItemRight: {
width: '50%',
flexDirection: 'row',
justifyContent: 'flex-start',
borderLeftColor: '#e1e1e1',
borderLeftWidth: 1,
padding: 10,
},
boxOrderDetailTotal: {
width: '100%',
flexDirection: 'column',
}
})