(\n \n \n \n )}\n />\n );\n};\n\nRouteWithLayout.propTypes = {\n component: PropTypes.any.isRequired,\n layout: PropTypes.any.isRequired,\n path: PropTypes.string\n};\n\nexport default RouteWithLayout;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { makeStyles } from '@material-ui/styles';\nconst useStyles = makeStyles(theme => ({\n root: {\n padding: theme.spacing(4)\n }\n}));\n\nconst Footer = props => {\n const { className, ...rest } = props;\n\n const classes = useStyles();\n\n return (\n \n {/* \n ©{' '}\n \n Devias IO\n \n . 2019\n \n \n Created with love for the environment. By designers and developers who\n love to work together in offices!\n */}\n
\n );\n};\n\nFooter.propTypes = {\n className: PropTypes.string\n};\n\nexport default Footer;\n","// // const localhost = 'http://localhost:3008/api_finhaycs/';\n// let localhost;\n// const environment = process.env.NODE_ENV;\n// switch (environment) {\n// case 'development':\n// localhost = 'http://192.168.1.35:3008/api_finhaycs/'\n// break;\n// case 'production':\n// localhost = 'https://cs.finhay.com.vn/api_finhaycs/'\n// break;\n// default:\n// localhost = 'http://192.168.1.35:3008/api_finhaycs/'\n// break;\n// }\nconst localhost = process.env.REACT_APP_API;\nconst CONST_DATA = {\n add_ticket: localhost + 'add_ticket',\n get_ticket_id: localhost + 'get_ticket/', //+id\n get_ticket_user: localhost + 'get_ticket_user/',\n check_spam: localhost + 'check_spam/', // + user_id\n check_token: localhost + 'add_ticket/check_token',\n get_location_bank: localhost + 'add_ticket/get_locations',\n get_branches_bank: localhost + 'add_ticket/get_branches',\n get_goal_id: localhost + 'add_ticket/get_goal_id/',\n update_user_profile: localhost + 'update_user_profile',\n get_user_bank: localhost + 'add_ticket/get-user-bank',\n\n edit_ticket: localhost + 'edit_ticket',\n file_upload: localhost + 'file/upload',\n get_image: localhost + 'get_image/',\n\n get_profile: localhost + 'user_api/get_profile',\n\n end_point_login: localhost + 'login',\n login_via_token: localhost + 'login_via_token/',\n\n localStorage_login: 'localStorage_login',\n\n router_sign_in: '/sign-in',\n router_not_found: '/not-found',\n\n // cho web\n router_yeucau: '/yeucau',\n router_taoyeucau: '/taoyeucau',\n router_list_yeu_cau: '/list',\n // cho app\n router_app_yeucau: '/app/yeucau', // +user_id+token + ticket_id\n router_app_taoyeucau: '/app/taoyeucau', // + user_id +token\n router_app_list_yeu_cau: '/app/list', // + user_id + token\n\n add_comment: localhost + 'add_comment',\n add_rating: localhost + 'add_rating'\n};\n\nexport default CONST_DATA;\n","import React, { Component } from 'react';\nimport { Link as RouterLink } from 'react-router-dom';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport { makeStyles, withStyles } from '@material-ui/styles';\nimport { Avatar, Typography } from '@material-ui/core';\nimport CONST_DATA from 'constant';\nimport Axios from 'axios';\n\nconst styles = theme => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n minHeight: 'fit-content'\n },\n avatar: {\n width: 60,\n height: 60\n },\n name: {\n marginTop: theme.spacing(1)\n }\n});\n\nclass Profile extends Component {\n constructor(props) {\n super(props);\n this.state = {\n data_success: false,\n thong_tin_hien_tai: null\n };\n }\n\n check_login = () => {\n let login_data = localStorage.getItem(CONST_DATA.localStorage_login);\n // console.log(login_data, login_data == null);\n\n if (login_data != null) {\n login_data = JSON.parse(login_data);\n\n this.setState({\n thong_tin_hien_tai: login_data,\n data_success: true\n });\n }\n };\n\n\n componentDidMount() {\n this.check_login();\n }\n\n render() {\n // console.log(this.state);\n\n const { classes } = this.props;\n return (\n \n
\n
\n {this.state.thong_tin_hien_tai != null\n ? this.state.thong_tin_hien_tai.user_profile.full_name\n : ''}\n \n
\n );\n }\n}\n\nexport default withStyles(styles)(Profile);\n","/* eslint-disable react/no-multi-comp */\n/* eslint-disable react/display-name */\nimport React, { forwardRef } from 'react';\nimport { NavLink as RouterLink } from 'react-router-dom';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport { makeStyles } from '@material-ui/styles';\nimport { List, ListItem, Button, colors } from '@material-ui/core';\n\nconst useStyles = makeStyles(theme => ({\n root: {},\n item: {\n display: 'flex',\n paddingTop: 0,\n paddingBottom: 0\n },\n button: {\n color: colors.blueGrey[800],\n padding: '10px 8px',\n justifyContent: 'flex-start',\n textTransform: 'none',\n letterSpacing: 0,\n width: '100%',\n fontWeight: theme.typography.fontWeightMedium\n },\n icon: {\n color: theme.palette.icon,\n width: 24,\n height: 24,\n display: 'flex',\n alignItems: 'center',\n marginRight: theme.spacing(1)\n },\n active: {\n color: theme.palette.primary.main,\n fontWeight: theme.typography.fontWeightMedium,\n '& $icon': {\n color: theme.palette.primary.main\n }\n }\n}));\n\nconst CustomRouterLink = forwardRef((props, ref) => (\n \n \n
\n));\n\nconst SidebarNav = props => {\n const { pages, className, ...rest } = props;\n\n const classes = useStyles();\n\n return (\n \n {pages.map(page => (\n \n \n {page.icon}
\n {page.title}\n \n \n ))}\n
\n );\n};\n\nSidebarNav.propTypes = {\n className: PropTypes.string,\n pages: PropTypes.array.isRequired\n};\n\nexport default SidebarNav;\n","import React from 'react';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport { makeStyles } from '@material-ui/styles';\nimport { colors } from '@material-ui/core';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n backgroundColor: colors.grey[50]\n },\n media: {\n paddingTop: theme.spacing(2),\n height: 80,\n textAlign: 'center',\n '& > img': {\n height: '100%',\n width: 'auto'\n }\n },\n content: {\n padding: theme.spacing(1, 2)\n },\n actions: {\n padding: theme.spacing(1, 2),\n display: 'flex',\n justifyContent: 'center'\n }\n}));\n\nconst UpgradePlan = props => {\n const { className, ...rest } = props;\n\n const classes = useStyles();\n\n return (\n \n
\n );\n};\n\nUpgradePlan.propTypes = {\n className: PropTypes.string\n};\n\nexport default UpgradePlan;\n","import React from 'react';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport { makeStyles } from '@material-ui/styles';\nimport { Divider, Drawer } from '@material-ui/core';\nimport PeopleIcon from '@material-ui/icons/People';\nimport AccountBoxIcon from '@material-ui/icons/AccountBox';\nimport LockIcon from '@material-ui/icons/Lock';\nimport { Profile, SidebarNav, UpgradePlan } from './components';\n\nconst useStyles = makeStyles(theme => ({\n drawer: {\n width: 240,\n [theme.breakpoints.up('lg')]: {\n marginTop: 64,\n height: 'calc(100% - 64px)'\n }\n },\n root: {\n backgroundColor: theme.palette.white,\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n padding: theme.spacing(2)\n },\n divider: {\n margin: theme.spacing(2, 0)\n },\n nav: {\n marginBottom: theme.spacing(2)\n }\n}));\n\nconst Sidebar = props => {\n const { open, variant, onClose, className, ...rest } = props;\n\n const classes = useStyles();\n\n const pages = [\n {\n title: 'Tạo yêu cầu',\n href: '/taoyeucau',\n icon: \n },\n {\n title: 'Danh sách đơn yêu cầu',\n href: '/list',\n icon: \n },\n\n {\n title: 'Đăng xuất',\n href: '/sign-in',\n icon: \n }\n ];\n\n return (\n \n \n \n );\n};\n\nSidebar.propTypes = {\n className: PropTypes.string,\n onClose: PropTypes.func,\n open: PropTypes.bool.isRequired,\n variant: PropTypes.string.isRequired\n};\n\nexport default Sidebar;\n","import React, { useState } from 'react';\nimport { Link as RouterLink } from 'react-router-dom';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport { makeStyles } from '@material-ui/styles';\nimport {\n AppBar,\n Toolbar,\n Hidden,\n IconButton,\n} from '@material-ui/core';\nimport MenuIcon from '@material-ui/icons/Menu';\n\n\nconst useStyles = makeStyles(theme => ({\n root: {\n boxShadow: 1,\n backgroundColor: 'white'\n },\n flexGrow: {\n flexGrow: 1\n },\n signOutButton: {\n marginLeft: theme.spacing(1)\n },\n title: {\n color: 'white',\n fontSize: 25\n },\n logo: {\n maxHeight: '30px',\n marginLeft: '30px'\n }\n}));\n\nconst Topbar = props => {\n const { className, onSidebarOpen, ...rest } = props;\n\n const classes = useStyles();\n\n const [notifications] = useState([]);\n\n return (\n \n \n \n \n {/* Finhay Hỗ Trợ */}\n \n
\n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nTopbar.propTypes = {\n className: PropTypes.string,\n onSidebarOpen: PropTypes.func\n};\n\nexport default Topbar;\n","import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { makeStyles, useTheme } from '@material-ui/styles';\nimport { useMediaQuery } from '@material-ui/core';\n\nimport { Sidebar, Topbar, Footer } from './components';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n paddingTop: 56,\n height: '100%',\n [theme.breakpoints.up('sm')]: {\n paddingTop: 64\n }\n },\n shiftContent: {\n paddingLeft: 240\n },\n content: {\n height: '100%'\n }\n}));\n\nconst Main = props => {\n const { children } = props;\n\n const classes = useStyles();\n const theme = useTheme();\n const isDesktop = useMediaQuery(theme.breakpoints.up('lg'), {\n defaultMatches: true\n });\n\n const [openSidebar, setOpenSidebar] = useState(false);\n\n const handleSidebarOpen = () => {\n setOpenSidebar(true);\n };\n\n const handleSidebarClose = () => {\n setOpenSidebar(false);\n };\n\n const shouldOpenSidebar = isDesktop ? true : openSidebar;\n\n return (\n \n \n \n \n {children}\n \n \n
\n );\n};\n\nMain.propTypes = {\n children: PropTypes.node\n};\n\nexport default Main;\n","import React, { Component } from 'react';\nimport { withStyles } from '@material-ui/core/styles';\nimport { Card, Typography, Box, Button } from '@material-ui/core';\nimport CONST_DATA from 'constant';\n\nconst styles = theme => ({\n root: {\n padding: theme.spacing(1),\n backgroundColor: 'white',\n maxWidth: '350px',\n boxShadow: '0px 0px 1px grey',\n borderRadius: '2px'\n },\n box: {\n paddingTop: theme.spacing(3),\n marginLeft: theme.spacing(3),\n marginRight: theme.spacing(3),\n display: 'flex',\n justifyContent: 'space-between'\n }\n});\n\nclass Issue extends Component {\n constructor(props) {\n super(props);\n this.state = {};\n }\n\n render() {\n const { classes } = this.props;\n\n return (\n \n \n Tạo đơn \n \n \n Danh sách đơn \n \n \n );\n }\n}\n\nexport default withStyles(styles)(Issue);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { makeStyles } from '@material-ui/styles';\nimport ButtonTop from './ButtonTop';\n\nconst useStyles = makeStyles(() => ({\n root: { height: '100%' },\n content: { height: '100%' }\n}));\n\nconst MainApp = props => {\n const { children } = props;\n\n const classes = useStyles();\n\n return (\n \n \n {children} \n
\n );\n};\n\nMainApp.propTypes = {\n children: PropTypes.node,\n className: PropTypes.string\n};\n\nexport default MainApp;\n","import React from 'react';\nimport { Link as RouterLink } from 'react-router-dom';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport { makeStyles } from '@material-ui/styles';\nimport { AppBar, Toolbar } from '@material-ui/core';\n\nconst useStyles = makeStyles(() => ({\n root: {\n boxShadow: 3\n },\n title: {\n color: 'white',\n fontSize: 25\n },\n logo: {\n maxHeight: '30px',\n marginLeft: '30px'\n }\n}));\n\nconst Topbar = props => {\n const { className, ...rest } = props;\n\n const classes = useStyles();\n\n return (\n \n \n \n \n \n \n \n );\n};\n\nTopbar.propTypes = {\n className: PropTypes.string\n};\n\nexport default Topbar;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { makeStyles } from '@material-ui/styles';\n\nimport { Topbar } from './components';\n\nconst useStyles = makeStyles(() => ({\n root: {\n paddingTop: 64,\n height: '100%'\n },\n content: {\n height: '100%'\n }\n}));\n\nconst Minimal = props => {\n const { children } = props;\n\n const classes = useStyles();\n\n return (\n \n \n {children} \n
\n );\n};\n\nMinimal.propTypes = {\n children: PropTypes.node,\n className: PropTypes.string\n};\n\nexport default Minimal;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { makeStyles } from '@material-ui/styles';\n\nconst useStyles = makeStyles(() => ({\n root: { height: '100%' },\n content: { height: '100%' }\n}));\n\nconst MinimalApp = props => {\n const { children } = props;\n\n const classes = useStyles();\n\n return (\n \n {children} \n
\n );\n};\n\nMinimalApp.propTypes = {\n children: PropTypes.node,\n className: PropTypes.string\n};\n\nexport default MinimalApp;\n","import React from 'react';\nimport { makeStyles } from '@material-ui/styles';\nimport { Grid, Typography } from '@material-ui/core';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n padding: theme.spacing(4)\n },\n content: {\n paddingTop: 150,\n textAlign: 'center'\n },\n image: {\n marginTop: 50,\n display: 'inline-block',\n maxWidth: '100%',\n width: 560\n }\n}));\n\nconst NotFound = () => {\n const classes = useStyles();\n\n return (\n \n
\n \n \n
\n 404: The page you are looking for isn’t here\n \n
\n You either tried some shady route or you came here by mistake.\n Whichever it is, try using the navigation\n \n
\n
\n \n \n
\n );\n};\n\nexport default NotFound;\n","import React, { useState, useEffect } from 'react';\nimport { Link as RouterLink, withRouter } from 'react-router-dom';\nimport PropTypes from 'prop-types';\nimport validate from 'validate.js';\nimport { makeStyles } from '@material-ui/styles';\nimport {\n Grid,\n Button,\n IconButton,\n TextField,\n Link,\n Typography\n} from '@material-ui/core';\nimport ArrowBackIcon from '@material-ui/icons/ArrowBack';\n\nimport { Facebook as FacebookIcon, Google as GoogleIcon } from 'icons';\n\nconst useStyles = theme => ({\n root: {\n backgroundColor: theme.palette.background.default,\n height: '100%'\n },\n grid: {\n height: '100%'\n },\n\n name: {\n marginTop: theme.spacing(3),\n color: theme.palette.white\n },\n bio: {\n color: theme.palette.white\n },\n contentContainer: {},\n content: {\n height: '100%',\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center'\n // flex: 1\n // backgroundColor: 'red'\n },\n contentHeader: {\n display: 'flex',\n alignItems: 'center',\n paddingTop: theme.spacing(5),\n paddingBototm: theme.spacing(2),\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2)\n },\n logoImage: {\n marginLeft: theme.spacing(4)\n },\n contentBody: {\n flexGrow: 1,\n display: 'flex',\n alignItems: 'center',\n [theme.breakpoints.down('md')]: {\n justifyContent: 'center'\n },\n paddingTop: 40\n },\n form: {\n paddingLeft: 100,\n paddingRight: 100,\n paddingBottom: 125,\n flexBasis: 700,\n [theme.breakpoints.down('sm')]: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2)\n }\n },\n title: {\n marginTop: theme.spacing(3)\n },\n socialButtons: {\n marginTop: theme.spacing(3)\n },\n socialIcon: {\n marginRight: theme.spacing(1)\n },\n sugestion: {\n marginTop: theme.spacing(2)\n },\n textField: {\n marginTop: theme.spacing(2)\n },\n signInButton: {\n margin: theme.spacing(2, 0)\n }\n});\n\nexport default useStyles;\n","import React, { Component } from 'react';\nimport { withStyles } from '@material-ui/core/styles';\nimport {\n Grid,\n Button,\n TextField,\n Paper,\n Typography\n} from '@material-ui/core';\nimport styles from './styles';\nimport Axios from 'axios';\nimport CONST_DATA from 'constant';\n\nclass SignIn extends Component {\n constructor(props) {\n super(props);\n this.state = {\n email: '',\n password: '',\n error_text: ''\n };\n }\n\n componentDidMount() {\n localStorage.removeItem(CONST_DATA.localStorage_login);\n }\n\n check_respone_login = data => {\n // console.log(data);\n\n localStorage.setItem(CONST_DATA.localStorage_login, JSON.stringify(data));\n this.props.history.push('/taoyeucau');\n };\n\n sign_in = () => {\n const body = {\n username: this.state.email,\n password: this.state.password\n };\n\n const header = {\n ContentType: 'application/json'\n };\n\n Axios.post(CONST_DATA.end_point_login, body)\n .then(response => {\n // console.log(response.data);\n\n if (response.data.status === 'success') {\n // console.log(response.data);\n this.check_respone_login(response.data.data);\n }\n if (response.data.status === 'error') {\n this.setState({ error_text: response.data.data });\n }\n })\n .catch(error => {\n console.log(error);\n });\n };\n\n render() {\n const { classes } = this.props;\n return (\n \n
\n \n \n
\n \n
\n \n Sign in\n \n\n \n this.setState({ email: event.target.value })\n }\n />\n \n this.setState({ password: event.target.value })\n }\n onKeyDown={e => {\n if (e.key === 'Enter') {\n this.sign_in();\n }\n }}\n type=\"password\"\n value={this.state.password}\n variant=\"outlined\"\n />\n\n {this.state.error_text} \n this.sign_in()}>\n Đăng nhập\n \n
\n
\n \n
\n \n \n
\n );\n }\n}\n\nexport default withStyles(styles)(SignIn);\n","import moment from 'moment';\nimport jwt from 'jsonwebtoken';\n\nconst to_date = date_num => {\n let time = moment(date_num * 1000)\n .locale('vi')\n .format('DD / MM / YYYY, h A');\n return time;\n};\n\nconst to_date_min = date_num => {\n let time = moment(date_num * 1000)\n .locale('vi')\n .format('DD/MM - h:A');\n return time;\n};\n\nconst get_time_second = () => {\n let time_now = new Date().getTime() / 1000;\n time_now = Math.round(time_now);\n return time_now;\n};\n\nconst status_detail = id => {\n id = parseInt(id);\n let result = null;\n if (id == 1) {\n result = 'Tạo đơn thành công';\n } else if (id == 10) {\n result = 'Finhay đã nhận đơn';\n } else if (id == 100) {\n result = 'Finhay đang giải quyết';\n } else if (id == 200) {\n result = 'Đóng đơn yêu cầu';\n } else if (id == 300) {\n result = 'Chờ bổ sung thông tin';\n } else if (id === 350) {\n result = 'Điều chỉnh đơn thành công';\n } else if (id == 400) {\n result = 'Giải quyết thành công';\n }\n else if (id == 250) {\n result = 'Cập nhật tài khoản ngân hàng';\n }\n else if (id == 500) {\n result = 'Đã chuyển tiền';\n }\n return result;\n};\n\nconst napas_link = (bank_code, stk) => {\n let api =\n 'https://api-v2.finhay.com.vn/api/v2/payments/bank/check?bank_code=' +\n bank_code.toString() +\n '&account_number=' +\n stk.toString();\n\n return api;\n};\n\nconst date_format_input = date_string => {\n date_string = date_string.split('-');\n let date_string_new =\n date_string[2] + '/' + date_string[1] + '/' + date_string[0];\n console.log(date_string_new);\n return date_string_new;\n};\n\nconst key_token = 'finhaycs';\n\nconst decode_token = (data, callback) => {\n jwt.verify(data, key_token, { ignoreExpiration: false }, (err, decoded) =>\n callback(err, decoded)\n );\n};\n\n\n\n\nexport {\n decode_token,\n date_format_input,\n to_date,\n to_date_min,\n status_detail,\n get_time_second,\n napas_link\n};\n","import React, { Component } from 'react';\nimport { withStyles } from '@material-ui/core/styles';\nimport { Card, CardContent, Typography } from '@material-ui/core';\n\nimport { to_date, status_detail, to_date_min } from 'utility';\n\nconst styles = theme => ({\n root: {\n paddingTop: theme.spacing(1),\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(1),\n marginTop: theme.spacing(1),\n backgroundColor: 'white'\n }\n});\n\nclass Issue extends Component {\n constructor(props) {\n super(props);\n this.state = {};\n }\n\n render() {\n const { classes } = this.props;\n\n return (\n this.props.onClick()}>\n \n {this.props.top}\n \n \n {this.props.top2}\n \n \n {this.props.mid}\n \n \n {this.props.bottom}\n \n \n );\n }\n}\n\nexport default withStyles(styles)(Issue);\n","import React, { Component } from 'react';\nimport { makeStyles, withStyles } from '@material-ui/core/styles';\nimport {\n Button,\n Paper,\n Table,\n TableBody,\n TableCell,\n TableContainer,\n TableHead,\n TablePagination,\n TableRow\n} from '@material-ui/core';\n\nimport { to_date, to_date_min, status_detail } from 'utility';\nimport CONST_DATA from 'constant';\nimport CardCS from './CardCS';\n\nconst columns = [\n { label: 'Mã yêu cầu', minWidth: 10 },\n { label: 'Ngày tạo', minWidth: 10 },\n { label: 'Vấn đề ', minWidth: 10 },\n { label: 'Trạng thái', minWidth: 10 }\n];\n\nconst styles = theme => ({\n root: {},\n container: {\n maxHeight: '80vh'\n }\n});\n\nclass User extends Component {\n constructor(props) {\n super(props);\n this.state = { page: 0 };\n }\n\n render_table = classes => {\n return (\n \n \n \n \n \n {columns.map(column => (\n \n {column.label}\n \n ))}\n \n \n \n {this.props.data.map(row => {\n return (\n this.props.go_detail(row.ticket_id)}\n hover\n tabIndex={-1}>\n {row.ticket_id} \n {to_date_min(row.created_at)} \n {row.ticket_type} \n {status_detail(row.status_id)} \n \n );\n })}\n \n
\n \n \n );\n };\n\n render() {\n const { classes } = this.props;\n return (\n \n {window.innerWidth > window.innerHeight\n ? this.render_table(classes)\n : this.props.data.map(row => {\n return (\n this.props.go_detail(row.ticket_id)}\n top={row.ticket_id}\n top2={status_detail(row.status_id)}\n mid={row.ticket_type}\n bottom={to_date_min(row.created_at)}\n />\n );\n })}\n
\n );\n }\n}\n\nexport default withStyles(styles)(User);\n","import React, { Component } from 'react';\nimport { withStyles } from '@material-ui/core/styles';\nimport UsersTable from './Table';\nimport CONST_DATA from 'constant';\nimport Axios from 'axios';\n\nconst styles = theme => ({\n root: { padding: theme.spacing(3) }\n});\n\nclass User extends Component {\n constructor(props) {\n super(props);\n this.state = {\n access_token: null,\n user_id: null,\n data_success: false,\n data: null\n };\n }\n\n check_login = () => {\n let login_data = localStorage.getItem(CONST_DATA.localStorage_login);\n\n if (login_data == null) {\n this.props.history.push(CONST_DATA.router_sign_in);\n } else {\n login_data = JSON.parse(login_data);\n this.setState({\n access_token: login_data.access_token,\n user_id: login_data.user_profile.user_id\n });\n }\n };\n async componentDidMount() {\n await this.check_login();\n this.get_data();\n }\n\n get_data = () => {\n const body_req = {\n access_token: this.state.access_token\n };\n Axios.post(CONST_DATA.get_ticket_user + this.state.user_id, body_req)\n .then(response => {\n // console.log(response.data);\n if (response.data.status === 'success') {\n this.setState({\n data_success: true,\n data: response.data.data\n });\n } else {\n this.props.history.push(CONST_DATA.router_sign_in);\n }\n })\n .catch(error => {\n console.log(error);\n });\n };\n\n go_detail = id => {\n this.props.history.push(CONST_DATA.router_yeucau + '/' + id);\n };\n\n render() {\n const { classes } = this.props;\n return (\n \n {this.state.data_success ? (\n this.go_detail(id)}\n />\n ) : null}\n
\n );\n }\n}\n\nexport default withStyles(styles)(User);\n","import React, { Component } from 'react';\nimport CONST_DATA from 'constant';\nimport Axios from 'axios';\n\nclass User extends Component {\n constructor(props) {\n super(props);\n this.state = {\n access_token: null,\n user_id: null\n };\n }\n\n check_login = () => {\n Axios.get(\n CONST_DATA.get_profile +\n '/' +\n this.props.match.params.user_id +\n '/' +\n this.props.match.params.token\n )\n .then(response => {\n // console.log(response.data);\n if (response.data.status == 'success') {\n this.setState({\n access_token: response.data.data.access_token,\n user_id: response.data.data.user_id\n });\n localStorage.setItem(\n CONST_DATA.localStorage_login,\n JSON.stringify(response.data.data)\n );\n\n this.props.history.push(CONST_DATA.router_list_yeu_cau);\n } else {\n this.props.history.push(CONST_DATA.router_sign_in);\n }\n })\n .catch(error => {\n console.log(error);\n });\n };\n\n async componentDidMount() {\n await this.check_login();\n }\n\n render() {\n return null;\n }\n}\n\nexport default User;\n","import React, { Component } from 'react';\nimport { withStyles } from '@material-ui/core/styles';\nimport { Card, Typography } from '@material-ui/core';\n\n\nconst styles = theme => ({\n root: {\n paddingTop: theme.spacing(1),\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(1),\n\n marginTop: theme.spacing(1),\n backgroundColor: 'rgb(238,238,238)'\n }\n});\n\nclass Issue extends Component {\n constructor(props) {\n super(props);\n this.state = {};\n }\n\n render() {\n const { classes } = this.props;\n\n return (\n \n \n {this.props.top}\n \n \n {this.props.mid}\n \n \n {this.props.bottom}\n \n \n );\n }\n}\n\nexport default withStyles(styles)(Issue);\n","import React, { Component } from 'react';\nimport { withStyles } from '@material-ui/core/styles';\nimport {\n Card,\n CardContent,\n Typography,\n Box,\n Button,\n TextField\n} from '@material-ui/core';\n\nimport CONST_DATA from 'constant';\nimport Axios from 'axios';\n\nconst styles = theme => ({});\n\nclass Rating extends Component {\n constructor(props) {\n super(props);\n this.state = {\n rating: 0,\n chosing: false,\n comment: '',\n label_text: 'Cảm nhận của bạn về dịch vụ của chúng tôi'\n };\n }\n\n send_rating = () => {\n const body_req = {\n ticket_id: this.props.ticket_id,\n rating: this.state.rating,\n rating_ly_do: this.state.comment\n };\n\n Axios.post(CONST_DATA.add_rating, body_req)\n .then(response => {\n window.location.reload(false);\n })\n .catch(error => {\n console.log(error);\n });\n };\n\n chose_star = number => {\n this.setState({\n rating: number,\n chosing: true,\n label_text:\n 'Hãy chia sẻ cảm nhận của bạn và đóng góp cho hệ thống chăm sóc khách hàng của chúng tôi'\n });\n };\n\n show_star = number => {\n if (number <= this.state.rating) {\n return ⭐
;\n } else {\n return ☆
;\n }\n };\n\n render_send = () => {\n if (this.state.chosing == true) {\n if (this.state.rating <= 3) {\n if (this.state.comment.length > 5) {\n return (\n this.send_rating()}>\n Đánh giá\n \n );\n } else {\n return null;\n }\n } else {\n return (\n this.send_rating()}>\n Đánh giá\n \n );\n }\n }\n };\n\n render() {\n const { classes } = this.props;\n\n return (\n \n Đánh giá về trải nghiệm hỗ trợ \n \n this.chose_star(1)}>{this.show_star(1)} \n this.chose_star(2)}>{this.show_star(2)} \n this.chose_star(3)}>{this.show_star(3)} \n this.chose_star(4)}>{this.show_star(4)} \n this.chose_star(5)}>{this.show_star(5)} \n \n\n {this.state.chosing ? (\n \n this.setState({ comment: event.target.value })}\n />\n {this.render_send()}\n \n ) : null}\n \n );\n }\n}\n\nexport default withStyles(styles)(Rating);\n","import React, { Component } from 'react';\nimport { makeStyles, withStyles } from '@material-ui/core/styles';\nimport {\n Grid,\n Card,\n CardContent,\n Typography,\n Divider,\n TextField,\n Button,\n Box,\n CircularProgress\n} from '@material-ui/core';\n\nimport CONST_DATA from 'constant';\nimport Axios from 'axios';\nimport moment from 'moment';\nimport {\n to_date,\n status_detail,\n to_date_min,\n get_time_second,\n decode_token\n} from 'utility';\nimport CardCS from './CardCS';\nimport RatingStar from './RatingStar';\nconst ImageBase64 = ({ data }) => \nconst renderType = (base64Data) => base64Data.substring(\"data:image/\".length, base64Data.indexOf(\";base64\"));\nconst styles = theme => ({\n root: {\n padding: theme.spacing(3)\n // backgroundColor: 'white'\n }\n});\n\nconst STATUS_ID_GHI_NHAN = 300;\nconst STATUS_ID_THANH_CONG = 400;\nconst STATUS_ID_BO_QUA = 200;\n\nclass Issue extends Component {\n constructor(props) {\n super(props);\n this.state = {\n access_token: null,\n\n ticket_id: this.props.match.params.id,\n\n data_success: false,\n data: null,\n\n comment: null,\n disabled_edit: true,\n\n file_data: [],\n error: null,\n file_count: 0,\n token_confirm: false,\n loading_comment: false\n };\n }\n\n checkBase64 = (data) => {\n try {\n return ['png', 'jpeg', 'jpg'].includes(renderType(data))\n } catch (error) {\n return false;\n }\n }\n\n\n check_token = () => {\n let token = this.props.match.params.token;\n\n // neu token cung null luon thi login\n if (token == null) {\n this.props.history.push(CONST_DATA.router_sign_in);\n }\n // neu token co thi decode token\n else {\n Axios.get(CONST_DATA.login_via_token + token)\n .then(response => {\n if (response.data.status == 'success') {\n let login_data = JSON.stringify(response.data.data);\n\n localStorage.setItem(CONST_DATA.localStorage_login, login_data);\n this.get_data(\n this.state.ticket_id,\n response.data.data.access_token\n );\n }\n })\n .catch(error => {\n console.log(error);\n });\n }\n };\n\n check_login = async () => {\n let login_data = localStorage.getItem(CONST_DATA.localStorage_login);\n\n // neu localStorage bi null thi check token\n if (login_data == null) {\n await this.check_token();\n }\n // neu khong thi get data trong localstorge\n else {\n login_data = JSON.parse(login_data);\n this.setState({\n access_token: login_data.access_token,\n user_id: login_data.user_profile.user_id\n });\n\n this.get_data(this.state.ticket_id, login_data.access_token);\n }\n };\n\n get_data = (id, access_token) => {\n const body_req = {\n access_token: access_token\n };\n\n Axios.post(CONST_DATA.get_ticket_id + id, body_req)\n .then(response => {\n console.log(response.data);\n if (response.data.status == 'success') {\n console.log(response.data.data.rating);\n\n this.setState({\n data_success: true,\n data: response.data.data,\n ticket_detail: response.data.data.ticket_detail\n });\n\n if (response.data.data.send_rating != null) {\n this.setState({\n rating: response.data.data.rating\n });\n }\n }\n })\n .catch(error => {\n console.log(error);\n });\n };\n\n async componentDidMount() {\n await this.check_login();\n }\n\n render_content = (classes, data) => {\n return (\n \n {this.state.data.status_id == STATUS_ID_THANH_CONG &&\n this.state.data.rating == null ? (\n \n ) : null}\n\n \n\n \n \n Mã yêu cầu: {data.ticket_id}\n \n \n Loại yêu cầu: {data.ticket_type}\n \n\n \n Trạng thái hiện tại: {status_detail(data.status_id)}\n \n \n \n\n \n \n Chi tiết yêu cầu\n \n {data.ticket_detail.map((item, index) =>\n this.render_ticket_detail(classes, item, index)\n )}\n \n {this.render_sua_lai(classes)}\n \n \n {data.comment_log.map(item => this.render_comment_detail(item))}\n \n \n {data.status_id == 400 ? null : this.render_comment(classes)}\n \n );\n };\n\n handleChange = e => {\n // console.log(e);\n e.preventDefault();\n let file = e.target.files[0];\n let reader = new FileReader();\n reader.readAsDataURL(file);\n reader.onloadend = () => {\n this.upload_image(file, reader.result);\n };\n };\n\n upload_image = (file, base64) => {\n if (file.size >= 5000000) {\n this.setState({\n error: 'File của bạn quá lớn (tối đa 5MB)'\n });\n } else if (this.state.file_count == 2) {\n this.setState({\n error: 'Số lượng file tối đa là 2'\n });\n } else {\n this.setState({\n error: null,\n file_count: this.state.file_count + 1,\n file_data: [\n ...this.state.file_data,\n {\n data: base64,\n type: file.name\n }\n ]\n });\n }\n };\n\n delete_img = i => {\n let array_state = this.state.file_data;\n array_state.splice(i, 1);\n // console.log(array_state);\n this.setState({\n file_data: array_state,\n file_count: this.state.file_count - 1\n });\n };\n\n btn_upload = () => {\n // if (this.state.data.ticket_detail[1].type == 'image_upload') {\n return (\n \n {this.state.file_data.map((item, index) => (\n
\n \n \n \n Tên file: {item.type}\n \n this.delete_img(index)}>\n Xóa\n \n \n \n ))}\n\n
\n Upload File\n this.handleChange(e)}\n />\n \n
\n );\n // }\n };\n\n send_edited = () => {\n let body_req = null;\n let ticket_detail = null;\n\n // neu nguoi dung khong tai len gi ca thi lay lai state.ticket_detail\n if (this.state.file_data.length == 0) {\n body_req = {\n ticket_id: this.state.data.ticket_id,\n ticket_detail: this.state.ticket_detail,\n access_token: this.state.access_token\n };\n }\n // neu nguoi dung co tai len file moi\n else {\n ticket_detail = this.state.file_data;\n body_req = {\n ticket_id: this.state.data.ticket_id,\n ticket_detail: [...this.state.ticket_detail, ...ticket_detail],\n access_token: this.state.access_token\n };\n }\n\n console.log(body_req);\n\n Axios.post(CONST_DATA.edit_ticket, body_req)\n .then(response => {\n // console.log(response.data);\n if (response.data.status == 'success') {\n window.location.reload();\n }\n })\n .catch(error => {\n console.log(error);\n });\n };\n\n render_sua_lai = classes => {\n if (\n this.state.data.status_id == STATUS_ID_GHI_NHAN &&\n (this.state.data.ticket_type === 'CHUYỂN TIỀN' ||\n this.state.data.ticket_type === 'SỬA THÔNG TIN TÀI KHOẢN NGÂN HÀNG')\n ) {\n return (\n \n {this.btn_upload()}\n this.send_edited()}>\n Lưu lại và gửi\n \n \n );\n }\n return null;\n };\n\n render_comment = classes => {\n return (\n \n this.setState({ comment: event.target.value })}\n />\n {this.state.loading_comment ? : this.send_comment()}>\n Gửi\n }\n \n );\n };\n\n send_comment = () => {\n const body_req = {\n user_id: this.state.data.user_id,\n ticket_id: this.state.data.ticket_id,\n comment: this.state.comment,\n date: get_time_second(),\n access_token: this.state.access_token\n };\n this.setState({ loading_comment: true })\n\n Axios.post(CONST_DATA.add_comment, body_req)\n .then(response => {\n this.setState({ loading_comment: false })\n // console.log(response.data);\n if (response.data.status == 'success') {\n window.location.reload(false);\n }\n })\n .catch(error => {\n this.setState({ loading_comment: false })\n console.log(error);\n });\n };\n\n render_comment_detail = item => {\n let comment_from = '';\n if (item.user_id > 0) {\n comment_from = 'Tin nhắn từ bạn';\n } else {\n comment_from = 'Tin nhắn từ Finhay';\n }\n\n if (item.type == 'image') {\n let linkImage = ''\n let checkSrc = item.comment.search(\"finhay.s3-ap-southeast-1.amazonaws.com\")\n if(checkSrc){\n linkImage = item.comment\n }\n else{\n linkImage =CONST_DATA.get_image + item.comment\n }\n return (\n \n \n src={linkImage}>\n \n );\n } else {\n return (\n \n );\n }\n };\n\n edit_ticket_detail = (value, index) => {\n let all_data = this.state.ticket_detail;\n\n all_data[index] = {\n data: value,\n type: this.state.ticket_detail[index].type\n };\n\n this.setState({\n ticket_detail: all_data\n });\n };\n\n render_ticket_detail = (classes, item, index) => {\n if (item.type == 'image_upload') {\n return (\n \n );\n }\n if (item.type == 'goal_id') {\n return null;\n } else {\n return (\n <>\n {\n this.checkBase64(item.data) ? : <>\n \n {item.type}\n {' : '}\n {item.data}\n \n >\n }\n >\n );\n }\n };\n\n render() {\n const { classes } = this.props;\n return (\n \n {this.state.data_success ? (\n this.render_content(classes, this.state.data)\n ) : (\n \n )}\n
\n );\n }\n}\n\nexport default withStyles(styles)(Issue);\n","import React, { Component } from 'react';\n\nimport CONST_DATA from 'constant';\nimport Axios from 'axios';\n\nclass Issue extends Component {\n constructor(props) {\n super(props);\n this.state = {\n access_token: null,\n user_id: null,\n ticket_id: this.props.match.params.id\n };\n }\n\n check_login = () => {\n Axios.get(\n CONST_DATA.get_profile +\n '/' +\n this.props.match.params.user_id +\n '/' +\n this.props.match.params.token\n )\n .then(response => {\n // console.log(response.data);\n if (response.data.status == 'success') {\n this.setState({\n access_token: response.data.data.access_token,\n user_id: response.data.data.user_id\n });\n localStorage.setItem(\n CONST_DATA.localStorage_login,\n JSON.stringify(response.data.data)\n );\n\n this.props.history.push(\n CONST_DATA.router_yeucau + '/' + this.props.match.params.ticket_id\n );\n } else {\n this.props.history.push(CONST_DATA.router_sign_ins);\n }\n })\n .catch(error => {\n console.log(error);\n });\n };\n\n async componentDidMount() {\n await this.check_login();\n }\n\n render() {\n return null;\n }\n}\n\nexport default Issue;\n","const data_type_issue = [\n 'Sửa đổi, CHỈNH SỬA thông tin cá nhân',\n 'Tôi gặp vấn đề khi CHUYỂN TIỀN và cần đối soát thủ công',\n 'Tôi muốn đổi thông tin tài khoản ngân hàng',\n 'Tôi cần SÁP NHẬP 2 tài khoản',\n 'Tôi cần ĐỐI SOÁT rút tiền',\n 'Tôi cần kiểm tra đơn hàng được hoàn tiền mục Túi Ba Gang',\n 'Tôi bị sai số CMTND/CCCD, hộ chiếu'\n];\n\nconst data_luu_y = [\n '1. Nếu bạn CHƯA đặt lệnh Rút tiền và muốn đổi thông tin tài khoản Rút, bạn chọn \"Đổi thông tin\"',\n '2. Nếu bạn chưa cập nhật được thông tin Tài khoản Rút, bạn vui lòng kiểm tra lại Số Tài Khoản, Tên ngân hàng (Hệ thống sẽ tự động điền Tên Chủ Khoản nếu người dùng đã nhập đúng 2 thông tin trên. Nếu nhập sai, sẽ không cập nhật được thông tin.',\n '3. Do các đơn yêu cầu cần xử lý thủ công nên sẽ mất khoảng 5-7 ngày làm việc không tính thứ 7 chủ nhật và các ngày nghỉ lễ.'\n];\n\nconst data_luu_y_sua_thong_tin = [\n 'ĐỂ ĐẢM BẢO AN TOÀN CHO TÀI KHOẢN CỦA NGƯỜI DÙNG VÀ TRÁNH TRANH CHẤP ĐÁNG TIẾC CÓ THỂ XẢY RA, HIỆN TẠI, EMAIL VÀ SỐ ĐIỆN THOẠI KHÔNG ĐƯỢC PHÉP THAY ĐỔI. FINHAY SẼ XEM XÉT THAY ĐỔI CHO CÁC TRƯỜNG HỢP TỪ TRƯỚC NGÀY 25 THÁNG 10 NĂM 2019. CÁC YÊU CẦU TỪ SAU KHOẢN THỜI GIAN NÀY SẼ KHÔNG ĐƯỢC XỬ LÝ',\n '-----------',\n 'Vì lý do an ninh, tránh tình trạng tranh chấp tài khoản, việc thay đổi hoàn toàn tất cả các thông tin tài khoản là không thể. Trong những trường hợp đặc biệt, Finhay sẽ yêu cầu người dùng cung cấp và xác minh để đảm bảo thông tin là chính xác và là của chính người dùng, nhằm đề phòng các tranh chấp về sau'\n];\n\nconst data_luu_y_chuyen_tien = [\n 'Chuyển tiền thất bại thường do những lý do sau:',\n '- Nhập sai nội dung chuyển tiền',\n '- Nhập trùng nội dung cũ đã dùng trước đó',\n '- Không ghi nội dung chuyển tiền',\n '- Chuyển tiền qua cây ATM',\n 'Finhay vẫn nhận được tiền của bạn nhưng lệnh nạp sẽ không thể cập nhật tự động mà cần đối soát thủ công, vì vậy bạn sẽ không thấy số dư được cập nhật ngay trên app.',\n 'Trong trường hợp này, bạn vui lòng cung cấp biên lai chuyển tiền theo mẫu qui định tại đây để Finhay có cơ sở để kiểm tra và xử lý.'\n];\n\nconst data_luu_y_rut_tien = [\n ' Rút tiền thất bại thường phát sinh do người dùng nhập sai thông tin tài khoản nhận, khi đó ngân hàng sẽ hoàn trả lại tiền vào tài khoản Finhay.',\n 'Để thay đổi thông tin cá nhân, bạn cần nhập chính xác',\n '- Thông tin tài khoản ngân hàng chính xác của bạn bao gồm',\n ' + Tên chủ tài khoản ( Yêu cầu đúng theo quy định của ngân hàng, đầy đủ dấu cách, không có dấu ... )',\n ' + Tên ngân hàng',\n ' + Số tài khoản ( Lưu ý số tài khoản KHÔNG PHẢI số thẻ. Finhay không phải ví điện tử, không thể nhập số thẻ)'\n];\n\nconst data_luu_y_bao_hiem = [\n '- Nếu bạn chuẩn bị tham gia bảo hiểm qua Finhay, nhưng thông tin cá nhân trên các màn hình đăng ký hiển thị sai, bạn hãy yêu cầu chỉnh sửa thông tin tại đây. Vì các đối tác cung cấp bảo hiểm có quy định chặt chẽ trong việc đảm bảo thông tin mà bạn đăng ký là chính xác, nên việc chỉnh sửa thông tin sẽ phải thực hiện qua Finhay để hạn chế sai sót xảy ra.',\n '- Hiện tại, bạn chỉ có thể mua bảo hiểm cho bản thân. Tính năng mua bảo hiểm cho người thân chưa được ra mắt.',\n '- Nếu bạn đã tham gia bảo hiểm tại Finhay, nhưng thông tin cá nhân trên Giấy chứng nhận bảo hiểm (GCNBH) không chính xác và bạn muốn sửa, hãy liên hệ với đội ngũ chăm sóc khách hàng của Finhay để được hướng dẫn. Finhay không hỗ trợ sửa thông tin trên GCNBH tại đây.'\n];\n\nconst data_luu_y_hoan_tien = [\n '1. Finhay phải là liên kết cuối cùng bạn đã nhấn vào để mua sắm. Nếu bạn đi từ Finhay nhưng vẫn tiếp tục nhấn vào các liên kết khác (quảng cáo, trang giảm giá khác,...) thì đơn hàng của bạn sẽ không được ghi nhận trên hệ thống và không được hoàn tiền.',\n '2. Lưu ý khi mua hàng trên các trang thương mại điện tử (TMĐT)',\n '- Shopee thường có thời gian đối soát và hoàn tiền lâu nhất trong các sàn TMĐT. Tổng thời gian từ lúc bạn mua hàng tới lúc Shopee hoàn tiền thường lên tới 90 ngày. Shopee cũng giới hạn số tiền hoàn trên 1 sản phẩm là 0.35$ - khoảng 8.000đ.',\n '- Đối với Sendo: Tỷ lệ hoàn tiền khi bạn đặt hàng trên app (ứng dụng) Sendo cao hơn khi bạn đặt hàng trên website Sendo. Lý do: Sendo khuyến khích khách hàng trải nghiệm mua sắm trên app. Sendo cũng giới hạn tỷ lệ hoàn tiền trên mỗi sản phẩm, tùy thuộc vào từng ngành hàng.'\n];\n\nconst data_type_sua_thong_tin = [\n {\n data: 'Tên',\n type: 'text'\n },\n {\n data: 'Ngày sinh',\n type: 'date'\n },\n {\n data: 'Địa chỉ',\n type: 'text'\n },\n {\n data: 'Giới tính',\n type: 'text'\n }\n // {\n // data: 'Số CMTND/ CCCD/ Hộ chiếu',\n // type: 'number'\n // },\n // {\n // data: 'Ngày cấp CMTND/ CCCD/ Hộ chiếu',\n // type: 'date'\n // },\n // {\n // data: 'Nơi cấp CMTND/ CCCD/ Hộ chiếu',\n // type: 'text'\n // }\n];\n\nconst data_type_sua_thong_tin_bao_hiem = [\n 'Họ và Tên',\n 'Ngày tháng năm sinh',\n 'Địa chỉ liên hệ',\n 'Giới tính',\n 'Loại giấy tờ',\n 'Số CMTND/ CCCD/ Hộ chiếu',\n 'Ngày cấp CMTND/ CCCD/ Hộ chiếu',\n 'Nơi cấp CMTND/ CCCD/ Hộ chiếu'\n];\n\nconst bien_lai_chuyen_tien = [\n 'Lưu ý: Biên lai của bạn phải là biên lai đầy đủ và chính xác, bao gồm: ',\n ' - Nội dung chuyển tiền',\n ' - Ngày, giờ thực hiện chuyển tiền.',\n ' - Số tiền chuyển',\n ' - Tài khoản thụ hưởng',\n 'Bạn có thể tìm thấy thông tin này trong mục lịch sử giao dịch của ứng dụng ngân hàng bạn đang sử dụng.'\n];\n\nconst list_bank = [\n {\n id: 51,\n shortname: 'ABBANK',\n name: 'NH AN BINH',\n bank_code: '970425'\n },\n {\n id: 52,\n shortname: 'ACB',\n name: 'NH A CHAU',\n bank_code: '970416'\n },\n {\n id: 53,\n shortname: 'ANZ',\n name: 'NH ANZ VIET NAM',\n bank_code: null\n },\n {\n id: 54,\n shortname: 'AGRIBANK',\n name: 'NH NONG NGHIEP VA PHAT TRIEN NONG THON VIET NAM',\n bank_code: '970405'\n },\n {\n id: 55,\n shortname: 'BAC A BANK',\n name: 'NH BAC A',\n bank_code: '970409'\n },\n {\n id: 56,\n shortname: 'BAOVIET BANK',\n name: 'NH BAO VIET',\n bank_code: '970438'\n },\n {\n id: 57,\n shortname: 'BIDV',\n name: 'NH DAU TU VA PHAT TRIEN VIETNAM',\n bank_code: '970418'\n },\n {\n id: 58,\n shortname: 'CBBANK',\n name: 'NH XAY DUNG',\n bank_code: null\n },\n {\n id: 59,\n shortname: 'CIMB',\n name: 'NH CIMB VIET NAM',\n bank_code: '422589'\n },\n {\n id: 60,\n shortname: 'CO-OPBANK',\n name: 'NH HOP TAC XA VIET NAM',\n bank_code: null\n },\n {\n id: 61,\n shortname: 'CITIBANK',\n name: 'NH CITIBANK VIET NAM',\n bank_code: null\n },\n {\n id: 62,\n shortname: 'DONG A BANK',\n name: 'NH DONG A',\n bank_code: '970406'\n },\n {\n id: 63,\n shortname: 'EXIMBANK',\n name: 'NH XUAT NHAP KHAU',\n bank_code: '970431'\n },\n {\n id: 64,\n shortname: 'GPBANK',\n name: 'NH DAU KHI TOAN CAU',\n bank_code: '970408'\n },\n {\n id: 65,\n shortname: 'HDBANK',\n name: 'NH PHAT TRIEN TP HCM',\n bank_code: '970437'\n },\n {\n id: 66,\n shortname: 'HONGLEONGBANK',\n name: 'NH HONG LEONG VIETNAM',\n bank_code: '970442'\n },\n {\n id: 67,\n shortname: 'HSBC',\n name: 'NH HSBC VIET NAM',\n bank_code: null\n },\n {\n id: 68,\n shortname: 'INDOVINABANK',\n name: 'NH INDOVINA',\n bank_code: '970434'\n },\n {\n id: 69,\n shortname: 'KIEN LONG BANK',\n name: 'NH KIEN LONG',\n bank_code: '970452'\n },\n {\n id: 70,\n shortname: 'LIENVIET POST BANK',\n name: 'NH BUU DIEN LIEN VIET',\n bank_code: '970449'\n },\n {\n id: 71,\n shortname: 'MARITIME BANK',\n name: 'NH HANG HAI',\n bank_code: '970426'\n },\n {\n id: 72,\n shortname: 'MBBANK',\n name: 'NH QUAN DOI',\n bank_code: null\n },\n {\n id: 73,\n shortname: 'NAM A BANK',\n name: 'NH NAM A',\n bank_code: '970428'\n },\n {\n id: 74,\n shortname: 'NCB',\n name: 'NH QUOC DAN',\n bank_code: '970419'\n },\n {\n id: 75,\n shortname: 'OCB',\n name: 'NH PHUONG DONG',\n bank_code: '970448'\n },\n {\n id: 76,\n shortname: 'OCEANBANK',\n name: 'NH DAI DUONG',\n bank_code: '970414'\n },\n {\n id: 77,\n shortname: 'PGBANK',\n name: 'NH XANG DAU PETROLIMEX',\n bank_code: '970430'\n },\n {\n id: 78,\n shortname: 'PUBLICBANK',\n name: 'NH PUBLIC BANK VIET NAM',\n bank_code: '970439'\n },\n {\n id: 79,\n shortname: 'PVCOMBANK',\n name: 'NH DAI CHUNG',\n bank_code: '970412'\n },\n {\n id: 80,\n shortname: 'SACOMBANK',\n name: 'NH SAI GON THUONG TIN',\n bank_code: '970403'\n },\n {\n id: 81,\n shortname: 'SCB',\n name: 'NH SAI GON',\n bank_code: '970429'\n },\n {\n id: 82,\n shortname: 'SEABANK',\n name: 'NH DONG NAM A',\n bank_code: '970440'\n },\n {\n id: 83,\n shortname: 'SGB',\n name: 'NH SAI GON CONG THUONG',\n bank_code: '970400'\n },\n {\n id: 84,\n shortname: 'SHB',\n name: 'NH SAI GON HA NOI',\n bank_code: '970443'\n },\n {\n id: 85,\n shortname: 'SHINHANBANK',\n name: 'NH SHINHAN BANK VIET NAM',\n bank_code: '970424'\n },\n {\n id: 86,\n shortname: 'STANDARD CHARTERED',\n name: 'NH STANDARD CHARTERED VIET NAM',\n bank_code: null\n },\n {\n id: 87,\n shortname: 'TECHCOMBANK',\n name: 'NH KY THUONG',\n bank_code: '970407'\n },\n {\n id: 88,\n shortname: 'TPBANK',\n name: 'NH TIEN PHONG',\n bank_code: '970423'\n },\n {\n id: 89,\n shortname: 'UOB',\n name: 'NH UOB VIET NAM',\n bank_code: '970458'\n },\n {\n id: 90,\n shortname: 'VBSP',\n name: 'NH CHINH SACH XA HOI VIET NAM',\n bank_code: null\n },\n {\n id: 91,\n shortname: 'VDB',\n name: 'NH PHAT TRIEN VIET NAM',\n bank_code: null\n },\n {\n id: 92,\n shortname: 'VIB',\n name: 'NH QUOC TE',\n bank_code: '970441'\n },\n {\n id: 93,\n shortname: 'VIET A BANK',\n name: 'NH VIET A',\n bank_code: '970427'\n },\n {\n id: 94,\n shortname: 'VIET CAPITAL BANK',\n name: 'NH BAN VIET',\n bank_code: '970454'\n },\n {\n id: 95,\n shortname: 'VIETBANK',\n name: 'NH VIETNAM THUONG TIN',\n bank_code: '970433'\n },\n {\n id: 96,\n shortname: 'VIETCOMBANK',\n name: 'NH NGOAI THUONG VIETNAM',\n bank_code: '970436'\n },\n {\n id: 97,\n shortname: 'VIETINBANK',\n name: 'NH CONG THUONG VIET NAM',\n bank_code: '970415'\n },\n {\n id: 98,\n shortname: 'VPBANK',\n name: 'NH VIET NAM THINH VUONG',\n bank_code: '970432'\n },\n {\n id: 99,\n shortname: 'VRBANK',\n name: 'NH LIEN DOANH VIET NGA',\n bank_code: '970421'\n },\n {\n id: 100,\n shortname: 'WOORI',\n name: 'NH WOORI VIET NAM',\n bank_code: '970457'\n }\n];\n\n// const data_luu_y_sat_nhap = [\n// ' Có rất nhiều người dùng vô tình tạo thành 2 tài khoản. Finhay sẽ hỗ trợ gộp tài khoản, tuy nhiên bạn cần đảm bảo:',\n// '- Hai tài khoản cần phải cập nhật đầy đủ các thông tin cá nhân sau, và các thông tin ở cả hai tài khoản này PHẢI TRÙNG KHỚP để chắc chắn rằng cả hai tài khoản đều thuộc về sở hữu của cùng 1 người',\n// ' + Họ Tên',\n// ' + Chứng Minh Thư / Căn Cước Công Dân,',\n// ' + Địa chỉ',\n// ' + Mã số thuế (Nếu có)',\n// '- Trong hai tài khoản phải có ÍT NHẤT 1 tài khoản chưa từng đầu tư'\n// ];\n\nconst data_luu_y_sat_nhap = [\n ' Có rất nhiều người dùng vô tình tạo thành 2 tài khoản. Finhay sẽ hỗ trợ gộp tài khoản, tuy nhiên bạn cần đảm bảo:',\n '- Có rất nhiều người dùng vô tình tạo thành 2 tài khoản. Finhay sẽ hỗ trợ gộp tài khoản, tuy nhiên bạn cần đảm bảo: Hai tài khoản cần phải cập nhật đầy đủ các thông tin cá nhân (Họ Tên, Chứng Minh Thư / Căn Cước Công Dân, Địa chỉ) và các thông tin ở cả hai tài khoản này PHẢI TRÙNG KHỚP để chắc chắn rằng cả hai tài khoản đều thuộc về sở hữu của cùng 1 người.',\n ' Đồng thời Finhay chưa thể hỗ trợ sáp nhập hai tài khoản của bạn khi thuộc một trong 2 trường hợp sau:',\n '+ Một trong hai tài khoản đã xác thực cả Email và SĐT.',\n '+ Cả hai tài khoản đã đều phát sinh giao dịch nạp tiền vào Finhay.'\n ];\n\nexport {\n bien_lai_chuyen_tien,\n data_type_sua_thong_tin,\n data_type_issue,\n data_luu_y,\n data_luu_y_sua_thong_tin,\n data_luu_y_chuyen_tien,\n data_luu_y_rut_tien,\n list_bank,\n data_luu_y_sat_nhap,\n data_luu_y_bao_hiem,\n data_type_sua_thong_tin_bao_hiem,\n data_luu_y_hoan_tien\n};\n","import React, { useState, Component } from 'react';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport { makeStyles, withStyles } from '@material-ui/core/styles';\n\nimport {\n Card,\n CardHeader,\n CardContent,\n CardActions,\n Divider,\n Grid,\n Button,\n TextField,\n Typography,\n FormControl,\n Radio,\n RadioGroup,\n FormControlLabel,\n FormLabel\n} from '@material-ui/core';\n\nimport { data_type_issue, data_luu_y } from './data';\n\nconst styles = theme => ({\n root: {}\n});\n\nclass AccountDetails extends Component {\n constructor(props) {\n super(props);\n this.state = {\n type_issue: ''\n };\n }\n\n handleChange = text => {\n this.setState({\n type_issue: text\n });\n };\n\n clickNext = () => {\n this.props.clickNext(this.state.type_issue);\n };\n\n render() {\n const { classes } = this.props;\n return (\n \n );\n }\n}\n\nexport default withStyles(styles)(AccountDetails);\n","import React, { Component } from 'react';\nimport { withStyles } from '@material-ui/core/styles';\nimport Axios from 'axios';\nimport {\n Card,\n CardContent,\n CardActions,\n Divider,\n Button,\n TextField,\n Typography,\n FormControl,\n Radio,\n RadioGroup,\n FormControlLabel,\n CircularProgress\n} from '@material-ui/core';\nimport {\n data_type_issue,\n data_luu_y_sua_thong_tin,\n data_type_sua_thong_tin\n} from './data';\nimport CONST_DATA from 'constant';\nimport { date_format_input } from 'utility';\n\nconst styles = theme => ({\n root: {\n display: 'flex',\n flexWrap: 'wrap'\n },\n textField: {\n marginTop: theme.spacing(2)\n // width: 200\n }\n});\n\nclass AccountDetails extends Component {\n constructor(props) {\n super(props);\n this.state = {\n Loai_tt_can_sua: '',\n Loai_tt_can_sua_type: 'text',\n ly_do: '',\n thong_tin_moi: '',\n thong_tin_hien_tai: '',\n };\n }\n\n check_login = () => {\n const login_data = localStorage.getItem(CONST_DATA.localStorage_login);\n if (login_data == null) {\n this.props.history.push(CONST_DATA.router_sign_in);\n } else {\n this.setState({\n thong_tin_hien_tai: JSON.parse(login_data)\n });\n }\n };\n\n componentDidMount() {\n this.check_login();\n }\n\n search = (nameKey, myArray) => {\n for (var i = 0; i < myArray.length; i++) {\n if (myArray[i].data === nameKey) {\n return myArray[i];\n }\n }\n };\n\n handleChange = text => {\n let obj_find = this.search(text, data_type_sua_thong_tin);\n this.check_tt_hien_tai(text);\n this.setState({\n Loai_tt_can_sua: text,\n Loai_tt_can_sua_type: obj_find.type\n });\n };\n\n send_data = () => {\n let ticket_new = {\n user_id: this.state.thong_tin_hien_tai.user_profile.user_id,\n ticket_type: 'SỬA THÔNG TIN',\n ticket_detail: [\n { type: 'Loại thay đổi', data: this.state.Loai_tt_can_sua },\n { type: 'Lý do', data: this.state.ly_do },\n { type: 'Thông tin mới', data: this.state.thong_tin_moi }\n ]\n };\n\n if (this.state.Loai_tt_can_sua_type == 'date') {\n ticket_new = {\n user_id: this.state.thong_tin_hien_tai.user_profile.user_id,\n ticket_type: 'SỬA THÔNG TIN',\n ticket_detail: [\n { type: 'Loại thay đổi', data: this.state.Loai_tt_can_sua },\n { type: 'Lý do', data: this.state.ly_do },\n {\n type: 'Thông tin mới',\n data: date_format_input(this.state.thong_tin_moi)\n }\n ]\n };\n }\n\n this.props.send_data(ticket_new);\n };\n\n render_send = () => {\n if (this.props.loading) {\n return \n }\n if (this.state.ly_do != '' && this.state.thong_tin_moi != '') {\n return (\n this.send_data()}\n disabled={this.props.disabled_btn}\n >\n Xác nhận và gửi\n \n );\n } else {\n return null;\n }\n };\n\n check_tt_hien_tai = text => {\n let result = null;\n if (\n text == 'Email (chỉ hỗ trợ đổi nếu email hiện tại của bạn CHƯA XÁC THỰC)'\n ) {\n result = this.state.thong_tin_hien_tai.user_profile.email;\n }\n if (text == 'Tên') {\n result = this.state.thong_tin_hien_tai.user_profile.full_name;\n }\n if (text == 'Ngày sinh') {\n result = this.state.thong_tin_hien_tai.user_profile.birthday;\n }\n if (text == 'Địa chỉ') {\n result = this.state.thong_tin_hien_tai.user_profile.address;\n }\n if (text == 'Giới tính') {\n if (this.state.thong_tin_hien_tai.user_profile.gender == 1) {\n result = 'NAM';\n } else {\n result = 'NỮ';\n }\n }\n if (text == 'Số CMTND/ CCCD/ Hộ chiếu') {\n result = this.state.thong_tin_hien_tai.user_profile.identity_number;\n }\n if (text == 'Ngày cấp CMTND/ CCCD/ Hộ chiếu') {\n result = this.state.thong_tin_hien_tai.user_profile.id_issue_date;\n }\n if (text == 'Nơi câp CMTND/ CCCD/ Hộ chiế') {\n result = this.state.thong_tin_hien_tai.user_profile.id_issue_address;\n }\n\n this.setState({\n thong_tin_hien_tai_value: result\n });\n };\n\n render() {\n const { classes } = this.props;\n return (\n \n \n \n );\n }\n}\n\nexport default withStyles(styles)(AccountDetails);\n","const images = {\n mau_bien_lai: require('../src/assets/image/bienlai.png'),\n mau_tin_nhan: require('../src/assets/image/mautinnhan.jpg'),\n\n hoan_tien_1: require('../src/assets/image/hoan_tien_1.png'),\n hoan_tien_2: require('../src/assets/image/hoan_tien_2.png'),\n hoan_tien_3: require('../src/assets/image/hoan_tien_3.png'),\n hoan_tien_4: require('../src/assets/image/hoan_tien_4.png')\n};\n\nexport default images;\n","import React, { Component } from 'react';\nimport { withStyles } from '@material-ui/core/styles';\nimport {\n Card,\n CardContent,\n CardActions,\n Divider,\n Button,\n Typography,\n CardMedia,\n Box,\n FormControl,\n InputLabel,\n Select,\n MenuItem,\n TextField,\n CircularProgress\n} from '@material-ui/core';\nimport { data_luu_y_chuyen_tien, bien_lai_chuyen_tien } from './data';\nimport Axios from 'axios';\nimport images from '../../images';\nimport CONST_DATA from 'constant';\n\nconst styles = theme => ({\n root: {\n display: 'flex',\n flexWrap: 'wrap'\n },\n textField: {\n marginTop: theme.spacing(2)\n // width: 200\n },\n media: {\n maxWidth: 400\n },\n formControl: {\n margin: theme.spacing(1),\n minWidth: 200\n },\n selectEmpty: {\n marginTop: theme.spacing(2)\n }\n});\n\n// const type_of_chuyen_tien = ['Đầu tư', 'Tiết kiệm', 'Bảo hiểm', 'Cửu long', 'CD 3 tháng'];\nconst type_of_chuyen_tien = ['Tài khoản tiền'];\n\nclass AccountDetails extends Component {\n constructor(props) {\n super(props);\n this.state = {\n file_data: [],\n error: null,\n file_count: 0,\n type_of_chuyen_tien: null,\n goal_id: null,\n goal_list: [],\n so_tien: ''\n };\n }\n\n check_login = () => {\n const login_data = localStorage.getItem(CONST_DATA.localStorage_login);\n\n if (login_data == null) {\n this.props.history.push(CONST_DATA.router_sign_in);\n } else {\n this.setState({\n thong_tin_hien_tai: JSON.parse(login_data)\n });\n }\n };\n\n async componentDidMount() {\n await this.check_login();\n await this.find_goal_id(this.state.thong_tin_hien_tai.user_profile.user_id);\n }\n\n find_goal_id = user_id => {\n Axios.get(CONST_DATA.get_goal_id + user_id)\n .then(response => {\n console.log('goal', response.data);\n if (response.data.message == 'Success') {\n this.setState({\n goal_list: response.data.result\n });\n }\n })\n .catch(error => {\n console.log(error);\n });\n };\n\n handleChange = e => {\n e.preventDefault();\n let file = e.target.files[0];\n let reader = new FileReader();\n reader.readAsDataURL(file);\n reader.onloadend = () => {\n this.upload_image(file, reader.result);\n };\n };\n\n upload_image = (file, base64) => {\n if (file.size >= 2000000) {\n this.setState({\n error: 'File của bạn quá lớn (tối đa 2MB)'\n });\n } else if (this.state.file_count == 4) {\n this.setState({\n error: 'Số lượng file tối đa là 4'\n });\n } else {\n this.setState({\n error: null,\n file_count: this.state.file_count + 1,\n file_data: [\n ...this.state.file_data,\n {\n data: base64,\n type: file.name\n }\n ]\n });\n }\n };\n\n send_data = () => {\n let ticket_new = {\n user_id: this.state.thong_tin_hien_tai.user_profile.user_id,\n ticket_type: 'CHUYỂN TIỀN',\n ticket_detail: [\n { type: 'Loại chuyển tiền', data: this.state.type_of_chuyen_tien },\n ...this.state.file_data\n ]\n };\n\n if (this.state.goal_id != null) {\n ticket_new = {\n user_id: this.state.thong_tin_hien_tai.user_profile.user_id,\n ticket_type: 'CHUYỂN TIỀN',\n ticket_detail: [\n { type: 'Loại chuyển tiền', data: this.state.type_of_chuyen_tien },\n { type: 'Hũ mục tiêu', data: this.state.goal_id.title },\n { type: 'goal_id', data: this.state.goal_id.id },\n // { type: 'Số tiền', data: this.state.so_tien },\n\n ...this.state.file_data\n ]\n };\n }\n console.log({ ticket_new })\n this.props.send_data(ticket_new);\n };\n\n render_send = () => {\n if (this.props.loading) {\n return \n }\n if (this.state.file_count == 0 || this.state.type_of_chuyen_tien == null) {\n return null;\n }\n if (\n this.state.type_of_chuyen_tien == 'Đầu tư' &&\n this.state.goal_id == null\n ) {\n return null;\n } else {\n return (\n this.send_data()}\n disabled={this.props.disabled_btn}>\n Xác nhận và gửi\n \n );\n }\n };\n\n delete_img = i => {\n let array_state = this.state.file_data;\n array_state.splice(i, 1);\n this.setState({\n file_data: array_state,\n file_count: this.state.file_count - 1\n });\n };\n\n render() {\n const { classes } = this.props;\n return (\n \n \n \n \n Đối soát chuyển tiền\n \n \n \n \n \n Lưu ý:\n \n {data_luu_y_chuyen_tien.map(item => {\n console.log({ item })\n return (\n {item} \n )\n })}\n \n \n \n \n Biên lai chuyển tiền\n \n {bien_lai_chuyen_tien.map(item => {\n return (\n {item} \n )\n })}\n \n \n \n \n Mẫu tin nhắn chuẩn\n \n \n \n \n \n \n Mẫu biên lai chuẩn\n \n \n \n \n\n {/* \n \n Nhập số tiền\n \n this.setState({ so_tien: event.target.value })}\n />\n \n */}\n \n \n Loại yêu cầu chuyển tiền\n \n \n \n Lựa chọn loại chuyển tiền\n \n\n \n this.setState({ type_of_chuyen_tien: event.target.value })\n }>\n {type_of_chuyen_tien.map(item => (\n {item} \n ))}\n \n \n \n \n {this.state.type_of_chuyen_tien === 'Đầu tư' ? (\n \n \n Chọn hũ đầu tư\n \n\n \n \n Lựa chọn hũ\n \n \n this.setState({\n goal_id: event.target.value\n })\n }>\n {this.state.goal_list && this.state.goal_list.map(item => (\n {item.title} \n ))}\n \n \n \n ) : null}\n\n \n \n {this.state.error}\n \n\n \n Danh sách file đã upload\n \n\n {this.state.file_data.map((item, index) => (\n \n \n \n \n Tên file: {item.type}\n \n this.delete_img(index)}>\n Xóa\n \n \n \n ))}\n\n \n Upload File\n this.handleChange(e)}\n />\n \n \n \n this.props.clickBack()}>\n Quay lại\n \n {this.render_send()}\n \n \n \n );\n }\n}\n\nexport default withStyles(styles)(AccountDetails);\n","import React, { Component } from 'react';\nimport { withStyles } from '@material-ui/core/styles';\n\nimport {\n Card,\n CardContent,\n CardActions,\n Divider,\n Button,\n TextField,\n Typography,\n FormControl,\n Select,\n MenuItem,\n Box,\n CardMedia,\n CircularProgress\n} from '@material-ui/core';\nimport {\n data_type_sua_thong_tin,\n data_luu_y_rut_tien,\n list_bank\n} from './data';\nimport Axios from 'axios';\nimport CONST_DATA from 'constant';\nimport { napas_link } from 'utility';\n\nconst styles = theme => ({\n root: {\n display: 'flex',\n flexWrap: 'wrap'\n },\n textField: {\n marginTop: theme.spacing(2)\n // width: 200\n },\n media: {\n maxWidth: 400\n },\n formControl: {\n minWidth: 200,\n maxWidth: 400,\n width: '10%'\n }\n});\n\nclass AccountDetails extends Component {\n constructor(props) {\n super(props);\n this.state = {\n ten_tai_khoan: '',\n ten_ngan_hang: '',\n real_ten_ngan_hang: '',\n chi_nhanh: '',\n list_chi_nhanh: [],\n so_tai_khoan: '',\n napas: true,\n bank_full: null,\n error_code: null,\n\n file_data: [],\n error: null,\n file_count: 0,\n list_dia_chi: [],\n dia_chi: '',\n loading: false\n };\n }\n\n search = (nameKey, myArray) => {\n for (var i = 0; i < myArray.length; i++) {\n if (myArray[i].data === nameKey) {\n return myArray[i];\n }\n }\n };\n\n handleChange = text => {\n let obj_find = this.search(text, data_type_sua_thong_tin);\n // console.log(obj_find);\n\n this.setState({\n Loai_tt_can_sua: text,\n Loai_tt_can_sua_type: obj_find.type\n });\n };\n\n check_login = () => {\n const login_data = localStorage.getItem(CONST_DATA.localStorage_login);\n if (login_data == null) {\n this.props.history.push(CONST_DATA.router_sign_in);\n } else {\n this.setState({\n thong_tin_hien_tai: JSON.parse(login_data)\n });\n }\n };\n\n componentDidMount() {\n this.check_login();\n }\n\n componentDidUpdate(prevProps, prevState) {\n if (prevState.real_ten_ngan_hang !== this.state.real_ten_ngan_hang) {\n Axios.get(`${CONST_DATA.get_location_bank}?bank_name=${this.state.real_ten_ngan_hang}`)\n .then(response => {\n const result = response.data;\n if (result.status === 'success') {\n const list_dia_chi = result.data.map(el => {\n return el.location;\n })\n this.setState({ list_dia_chi, dia_chi: '', chi_nhanh: '' })\n }\n })\n .catch(error => {\n console.log(error);\n });\n }\n if ((prevState.dia_chi !== this.state.dia_chi)) {\n Axios.get(`${CONST_DATA.get_branches_bank}?bank_name=${this.state.real_ten_ngan_hang}&location=${this.state.dia_chi}`)\n .then(response => {\n const result = response.data;\n if (result.status === 'success' && Array.isArray(result.data)) {\n const list_chi_nhanh = result.data.map(el => {\n return el.branch_name;\n })\n this.setState({ list_chi_nhanh, chi_nhanh: '' })\n }\n })\n .catch(error => {\n console.log(error);\n });\n }\n }\n\n\n gen_data = ten_tai_khoan => {\n let ticket_new = {\n user_id: this.state.thong_tin_hien_tai.user_profile.user_id,\n\n ticket_type: 'SỬA THÔNG TIN TÀI KHOẢN NGÂN HÀNG',\n ticket_detail: [\n { type: 'Tên ngân hàng', data: this.state.bank_full.shortname },\n { type: 'Chi nhánh', data: this.state.chi_nhanh },\n { type: 'Số tài khoản', data: this.state.so_tai_khoan },\n { type: 'Tên chủ tài khoản', data: ten_tai_khoan },\n { type: 'Địa chỉ', data: this.state.dia_chi },\n ...this.state.file_data\n ]\n };\n return ticket_new;\n };\n\n send_data = () => {\n this.setState({ loading: true })\n if (this.state.bank_code == null) {\n let ticket_new = this.gen_data(this.state.ten_tai_khoan);\n this.props.send_data(ticket_new);\n this.setState({ loading: false })\n } else {\n Axios.get(napas_link(this.state.bank_code, this.state.so_tai_khoan))\n .then(response => {\n this.setState({ loading: false })\n // console.log(response.data);\n if (response.data.error_code === 0) {\n this.setState({ ten_tai_khoan: response.data.result.AccName });\n\n let ticket_new = this.gen_data(response.data.result.AccName);\n this.props.send_data(ticket_new);\n } else {\n this.setState({\n error_code:\n 'Bạn vui lòng kiểm tra lại số tài khoản và tên ngân hàng'\n });\n }\n })\n .catch(error => {\n console.log(error);\n });\n }\n };\n\n render_send = () => {\n if (this.props.loading) {\n return \n }\n if (this.state.so_tai_khoan !== '' && this.state.ten_ngan_hang !== '') {\n return (\n this.send_data()}\n disabled={this.props.disabled_btn}\n >\n Xác nhận và gửi\n \n );\n } else {\n return null;\n }\n };\n\n check_napas = () => {\n Axios.get(napas_link(this.state.bank_code, this.state.so_tai_khoan))\n .then(response => {\n // console.log(response.data);\n if (response.data.error_code === 0) {\n this.setState({ ten_tai_khoan: response.data.result.AccName });\n }\n })\n .catch(error => {\n console.log(error);\n });\n };\n\n render_kiemtra = () => {\n // console.log(this.state.bank_code);\n\n if (this.state.bank_code !== null) {\n return (\n this.check_napas()}>\n Kiểm tra\n \n );\n }\n };\n\n delete_img = i => {\n let array_state = this.state.file_data;\n array_state.splice(i, 1);\n this.setState({\n file_data: array_state,\n file_count: this.state.file_count - 1\n });\n };\n\n handleChange = e => {\n e.preventDefault();\n let file = e.target.files[0];\n let reader = new FileReader();\n reader.readAsDataURL(file);\n reader.onloadend = () => {\n this.upload_image(file, reader.result);\n };\n };\n\n upload_image = (file, base64) => {\n if (file.size >= 2000000) {\n this.setState({\n error: 'File của bạn quá lớn (tối đa 2MB)'\n });\n } else if (this.state.file_count > 5) {\n this.setState({\n error: 'Số lượng file tối đa là 4'\n });\n } else {\n this.setState({\n error: null,\n file_count: this.state.file_count + 1,\n file_data: [\n ...this.state.file_data,\n {\n data: base64,\n type: file.name\n }\n ]\n });\n }\n };\n\n render() {\n const { classes } = this.props;\n return (\n \n \n \n \n Thay đổi thông tin ngân hàng\n \n \n \n \n \n Lưu ý:\n \n {data_luu_y_rut_tien.map(item => (\n {item} \n ))}\n \n \n\n \n \n Tên ngân hàng\n \n \n Cần là tài khoản ngân hàng Hoạt động được tại Việt Nam. Trường hợp\n người dùng sử dụng ngân hàng điện tử Timo để mục này là VPBANK\n \n\n \n {\n const bank_full = list_bank.find(\n item => item.id == event.target.value\n );\n this.setState({\n napas: bank_full.bank_code != null,\n ten_ngan_hang: bank_full.id,\n bank_full: bank_full,\n bank_code: bank_full.bank_code,\n real_ten_ngan_hang: bank_full.shortname.concat(` - ${bank_full.name}`)\n }, () => {\n console.log(this.state.bank_code)\n });\n }}>\n {list_bank.map(item => (\n \n {item.shortname}\n {' - '}\n {item.name}\n \n ))}\n \n \n \n \n \n \n \n Số tài khoản\n \n \n Lưu ý số tài khoản KHÔNG PHẢI là dãy số được in trên thẻ. Số tài\n khoản là dãy số được ngân hàng cung cấp khi bạn đăng ký mở tài\n khoản ngân hàng. Nếu bạn không nhớ hoặc không lưu trữ, bạn có thể\n tìm lại tại mục thông tin tài khoản trong ứng dụng internet\n banking của ngân hàng đang sử dụng hoặc ra trực tiếp ngân hàng để\n lấy lại\n \n \n \n this.setState({ so_tai_khoan: event.target.value })\n }\n />\n {this.render_kiemtra()}\n \n \n\n \n \n \n Tên chủ tài khoản\n \n \n Yêu cầu đúng theo quy định của ngân hàng, đúng thứ tự họ - tên,\n đầy đủ dấu cách, không có dấu ...\n \n \n {this.state.napas ? (\n \n this.setState({ ten_tai_khoan: event.target.value })\n }\n />\n ) : (\n \n this.setState({ ten_tai_khoan: event.target.value })\n }\n />\n )}\n \n \n \n {(this.state.bank_code === '970405' || this.state.bank_code === '970400') && <>\n \n \n Địa điểm\n \n \n {\n this.setState({\n dia_chi: event.target.value\n });\n }}>\n {this.state.list_dia_chi.map(item => (\n \n {item}\n \n ))}\n \n \n \n \n \n Chi nhánh\n \n \n Hai trường hợp đặc biệt là Ngân hàng Nông Nghiệp và Phát triển\n Nông thôn Việt Nam - AGRIBANK và Ngân hàng Sài gòn Công thương -\n SGB yêu cầu thông tin trụ sở chính xác để chuyển tiền. Hai trường\n hợp thiếu thông tin này không thể giải quyết được, người dùng của\n 2 ngân hàng này vui lòng lưu ý điền đầy đủ phần này\n \n \n {\n this.setState({\n chi_nhanh: event.target.value,\n });\n }}>\n {this.state.list_chi_nhanh.map(item => (\n \n {item}\n \n ))}\n \n \n \n >}\n\n \n \n Tải hình ảnh\n \n \n Tải hình ảnh chứng minh bạn đã đóng tài khoản cũ, không còn sử\n dụng\n \n\n {this.state.file_data.map((item, index) => (\n \n \n \n Tên file: {item.type}\n \n this.delete_img(index)}>\n Xóa\n \n \n ))}\n\n \n Upload File\n this.handleChange(e)}\n />\n \n \n \n\n \n {this.state.error_code}\n \n\n \n {!this.state.loading && this.props.clickBack()}>\n Quay lại\n }\n {this.render_send()}\n \n \n \n );\n }\n}\n\nexport default withStyles(styles)(AccountDetails);\n","import React, { Component } from 'react';\nimport { withStyles } from '@material-ui/core/styles';\n\nimport {\n Card,\n CardContent,\n CardActions,\n Divider,\n Button,\n TextField,\n Typography,\n CircularProgress\n} from '@material-ui/core';\nimport { data_type_sua_thong_tin, data_luu_y_sat_nhap } from './data';\nimport Axios from 'axios';\nimport CONST_DATA from 'constant';\n\nconst styles = theme => ({\n root: {\n display: 'flex',\n flexWrap: 'wrap'\n },\n textField: {\n marginTop: theme.spacing(2)\n // width: 200\n },\n media: {\n maxWidth: 400\n },\n formControl: {\n minWidth: 200\n }\n});\n\nclass AccountDetails extends Component {\n constructor(props) {\n super(props);\n this.state = {\n email: '',\n so_dt: '',\n ly_do: ''\n };\n }\n check_login = () => {\n const login_data = localStorage.getItem(CONST_DATA.localStorage_login);\n if (login_data == null) {\n this.props.history.push(CONST_DATA.router_sign_in);\n } else {\n this.setState({\n thong_tin_hien_tai: JSON.parse(login_data)\n });\n }\n };\n\n componentDidMount() {\n this.check_login();\n }\n\n send_data = () => {\n let ticket_new = {\n user_id: this.state.thong_tin_hien_tai.user_profile.user_id,\n ticket_type: 'SÁP NHẬP',\n ticket_detail: [\n { type: 'Email cần sáp nhập', data: this.state.email },\n { type: 'Số điện thoại cần sáp nhập', data: this.state.so_dt },\n { type: 'Chi tiết yêu cầu', data: this.state.ly_do }\n ]\n };\n\n this.props.send_data(ticket_new);\n };\n\n render_send = () => {\n if (this.props.loading) {\n return \n }\n if (this.state.email != '' || this.state.so_dt != '') {\n return (\n this.send_data()}\n disabled={this.props.disabled_btn}\n >\n Xác nhận và gửi\n \n );\n } else {\n return null;\n }\n };\n\n render() {\n const { classes } = this.props;\n return (\n \n \n \n \n Sáp nhập tài khoản\n \n \n \n \n \n Lưu ý:\n \n {data_luu_y_sat_nhap.map(item => (\n {item} \n ))}\n \n \n \n \n Email của tài khoản cần sáp nhập\n \n \n this.setState({ email: event.target.value })}\n />\n \n \n \n \n \n Số điện thoại của tài khoản cần sáp nhập\n \n \n this.setState({ so_dt: event.target.value })}\n />\n \n \n \n \n \n Chi tiết yêu cầu\n \n \n this.setState({ ly_do: event.target.value })}\n />\n \n \n \n \n this.props.clickBack()}>\n Quay lại\n \n {this.render_send()}\n \n \n \n );\n }\n}\n\nexport default withStyles(styles)(AccountDetails);\n","import React, { Component } from 'react';\nimport { withStyles } from '@material-ui/core/styles';\nimport { toast } from 'react-toastify'\nimport { napas_link } from 'utility';\nimport {\n Card,\n CardContent,\n CardActions,\n Divider,\n Typography,\n FormControl,\n Select,\n Input,\n CardMedia,\n Box,\n MenuItem,\n InputLabel,\n CircularProgress\n} from '@material-ui/core';\nimport TextField from '@material-ui/core/TextField';\nimport Button from '@material-ui/core/Button';\nimport { data_type_sua_thong_tin, data_luu_y_sat_nhap, data_luu_y_rut_tien, list_bank } from './data';\nimport Axios from 'axios';\nimport CONST_DATA from 'constant';\nimport { date_format_input } from 'utility';\nimport {\n MuiPickersUtilsProvider,\n KeyboardTimePicker,\n KeyboardDatePicker,\n} from '@material-ui/pickers';\nconst styles = theme => ({\n root: {\n display: 'flex',\n flexWrap: 'wrap'\n },\n textField: {\n marginTop: theme.spacing(2)\n // width: 200\n },\n media: {\n maxWidth: 400\n },\n formControl: {\n margin: theme.spacing(1),\n maxWidth: 400,\n minWidth: 250\n },\n selectEmpty: {\n marginTop: theme.spacing(2)\n }\n});\n\nconst type_of_rut_tien = ['Rút tiết kiệm', 'Rút đầu tư'];\n\nclass AccountDetails extends Component {\n constructor(props) {\n super(props);\n this.state = {\n ngay_rut: null,\n so_tien: '',\n ly_do: '',\n type_of_rut_tien: null,\n xac_nhan_thong_tin_ngan_hang: 0,\n ten_ngan_hang: '',\n so_tai_khoan: '',\n ten_tai_khoan: '',\n dia_chi: '',\n list_dia_chi: [],\n file_count: 0,\n file_data: [],\n napas: true,\n bank_full: null,\n list_chi_nhanh: [],\n chi_nhanh: '',\n real_ten_ngan_hang: '',\n is_thay_doi: false,\n isShowButton:false,\n };\n }\n check_login = () => {\n const login_data = localStorage.getItem(CONST_DATA.localStorage_login);\n if (login_data == null) {\n this.props.history.push(CONST_DATA.router_sign_in);\n } else {\n this.setState({\n thong_tin_hien_tai: JSON.parse(login_data)\n });\n }\n };\n\n componentDidMount() {\n this.check_login();\n this.get_info_bank();\n }\n\n send_data = () => {\n // [\n // { type: 'Tên ngân hàng', data: this.state.bank_full.shortname },\n // { type: 'Chi nhánh', data: this.state.chi_nhanh },\n // { type: 'Số tài khoản', data: this.state.so_tai_khoan },\n // { type: 'Tên chủ tài khoản', data: ten_tai_khoan },\n // { type: 'Địa chỉ', data: this.state.dia_chi },\n // ...this.state.file_data\n // ]\n const ticket_detail = [\n { type: 'Ngày rút tiền', data: date_format_input(this.state.ngay_rut) },\n { type: 'Số tiền rút', data: this.state.so_tien },\n { type: 'Chi tiết yêu cầu', data: this.state.ly_do },\n { type: 'Loại rút', data: this.state.type_of_rut_tien },\n // { type: 'Tên ngân hàng', data: this.state.bank_full.shortname },\n // { type: 'Chi nhánh', data: this.state.chi_nhanh },\n // { type: 'Số tài khoản', data: this.state.so_tai_khoan },\n // { type: 'Tên chủ tài khoản', data: this.state.ten_tai_khoan },\n // { type: 'Địa bàn', data: this.state.dia_chi },\n // ...this.state.file_data\n ];\n if (this.state.is_thay_doi && this.state.bank_full) {\n ticket_detail.push({ type: 'Tên ngân hàng', data: this.state.real_ten_ngan_hang });\n }\n if (this.state.is_thay_doi && this.state.ten_tai_khoan) {\n ticket_detail.push({ type: 'Tên chủ tài khoản', data: this.state.ten_tai_khoan });\n }\n if (this.state.is_thay_doi && this.state.so_tai_khoan) {\n ticket_detail.push({ type: 'Số tài khoản', data: this.state.so_tai_khoan });\n }\n if (this.state.is_thay_doi && this.state.dia_chi) {\n ticket_detail.push({ type: 'Địa bàn', data: this.state.dia_chi });\n }\n if (this.state.is_thay_doi && this.state.chi_nhanh) {\n ticket_detail.push({ type: 'Chi nhánh', data: this.state.chi_nhanh });\n }\n ticket_detail.push(...this.state.file_data)\n let ticket_new = {\n user_id: this.state.thong_tin_hien_tai.user_profile.user_id,\n ticket_type: 'ĐỐI SOÁT',\n ticket_detail\n };\n this.props.send_data(ticket_new);\n };\n\n render_send = () => {\n if (this.props.loading) {\n return \n }\n if (\n this.state.ngay_rut != '' &&\n this.state.ngay_rut != null &&\n this.state.so_tien != '' &&\n this.state.type_of_rut_tien != null\n ) {\n return (\n this.send_data()}\n disabled={this.props.disabled_btn}\n >\n Xác nhận và gửi\n \n );\n } else {\n return null;\n }\n };\n\n get_info_bank = () => {\n Axios.get(CONST_DATA.get_user_bank, {\n headers: { user_id: this.props.user_id, access_token: this.props.access_token }\n // headers: { user_id: 1153, access_token: 'access_token' }\n })\n .then(response => {\n const result = response.data;\n if (result.status === 'success') {\n const data = result.data;\n if (data) {\n this.setState({\n ten_tai_khoan: data.account_name,\n so_tai_khoan: data.account_number,\n ten_ngan_hang: data.bank_name,\n chi_nhanh: data.branch_name,\n dia_chi: data.location,\n })\n }\n else {\n this.setState({\n isShowButton:true\n })\n const notify = () => toast.error(\"Chưa có tài khoản ngân hàng.\",{\n position:\"top-center\", \n autoClose:3000,\n });\n notify();\n setTimeout(() => {\n this.props.history.push('/');\n },3500);\n }\n }\n })\n .catch(error => {\n console.log(error);\n });\n };\n\n // sua thong tin ngan hang\n\n search = (nameKey, myArray) => {\n for (var i = 0; i < myArray.length; i++) {\n if (myArray[i].data === nameKey) {\n return myArray[i];\n }\n }\n };\n\n handleChange = text => {\n let obj_find = this.search(text, data_type_sua_thong_tin);\n // console.log(obj_find);\n\n this.setState({\n Loai_tt_can_sua: text,\n Loai_tt_can_sua_type: obj_find.type\n });\n };\n\n componentDidUpdate(prevProps, prevState) {\n if (prevState.real_ten_ngan_hang !== this.state.real_ten_ngan_hang) {\n Axios.get(`${CONST_DATA.get_location_bank}?bank_name=${this.state.real_ten_ngan_hang}`)\n .then(response => {\n const result = response.data;\n if (result.status === 'success') {\n const list_dia_chi = result.data.map(el => {\n return el.location;\n })\n this.setState({ list_dia_chi, dia_chi: '', chi_nhanh: '' })\n }\n })\n .catch(error => {\n console.log(error);\n });\n }\n if ((prevState.dia_chi !== this.state.dia_chi)) {\n Axios.get(`${CONST_DATA.get_branches_bank}?bank_name=${this.state.real_ten_ngan_hang}&location=${this.state.dia_chi}`)\n .then(response => {\n const result = response.data;\n if (result.status === 'success' && Array.isArray(result.data)) {\n const list_chi_nhanh = result.data.map(el => {\n return el.branch_name;\n })\n this.setState({ list_chi_nhanh, chi_nhanh: '' })\n }\n })\n .catch(error => {\n console.log(error);\n });\n }\n }\n\n\n\n\n\n\n check_napas = () => {\n Axios.get(napas_link(this.state.bank_code, this.state.so_tai_khoan))\n .then(response => {\n console.log(response.data);\n const data = response.data;\n if (data.error_code == 0) {\n this.setState({ ten_tai_khoan: response.data.result.AccName });\n }\n else {\n toast.error(data.message);\n }\n })\n .catch(error => {\n\n console.log(error);\n });\n };\n\n render_kiemtra = () => {\n // console.log(this.state.bank_code);\n\n if (this.state.bank_code != null) {\n return (\n this.check_napas()}\n style={{ marginTop: \"10px\" }}\n >\n Kiểm tra\n \n );\n }\n };\n\n delete_img = i => {\n let array_state = this.state.file_data;\n array_state.splice(i, 1);\n this.setState({\n file_data: array_state,\n file_count: this.state.file_count - 1\n });\n };\n\n handleChange = e => {\n e.preventDefault();\n let file = e.target.files[0];\n let reader = new FileReader();\n reader.readAsDataURL(file);\n reader.onloadend = () => {\n this.upload_image(file, reader.result);\n };\n };\n\n upload_image = (file, base64) => {\n if (file.size >= 2000000) {\n this.setState({\n error: 'File của bạn quá lớn (tối đa 2MB)'\n });\n } else if (this.state.file_count > 5) {\n this.setState({\n error: 'Số lượng file tối đa là 4'\n });\n } else {\n this.setState({\n error: null,\n file_count: this.state.file_count + 1,\n file_data: [\n ...this.state.file_data,\n {\n data: base64,\n type: file.name\n }\n ]\n });\n }\n };\n\n\n handleConfirmInfoBank = () => {\n const regex = /^[a-z -\\.']+$/i;\n if (this.state.ten_tai_khoan.match(regex)) {\n this.setState({ xac_nhan_thong_tin_ngan_hang: 1 })\n }\n else {\n toast.error('Tên chủ tài khoản không hợp lệ, vui lòng nhập lại.')\n }\n }\n\n render_button_info_bank = () => {\n if(this.state.bank_code === '970405' || this.state.bank_code === '970400'){\n if (this.state.so_tai_khoan && this.state.ten_ngan_hang && this.state.ten_tai_khoan && this.state.chi_nhanh && this.state.dia_chi) {\n return (\n this.handleConfirmInfoBank()}>\n Cập nhật thông tin\n \n );\n } else {\n return null;\n }\n }\n else{\n if (this.state.so_tai_khoan && this.state.ten_ngan_hang) {\n return (\n this.handleConfirmInfoBank()}>\n Cập nhật thông tin\n \n );\n } else {\n return null;\n }\n }\n \n };\n\n\n render() {\n const { classes } = this.props;\n console.log(this.state);\n return (\n <>\n {this.state.xac_nhan_thong_tin_ngan_hang === 0 && \n \n \n Xác nhận thông tin tài khoản ngân hàng của bạn\n \n \n \n \n \n Tên ngân hàng\n \n \n Cần là tài khoản ngân hàng Hoạt động được tại Việt Nam. Trường hợp\n người dùng sử dụng ngân hàng điện tử Timo để mục này là VPBANK\n \n \n \n \n \n \n \n \n \n Số tài khoản\n \n \n Lưu ý số tài khoản KHÔNG PHẢI là dãy số được in trên thẻ. Số tài\n khoản là dãy số được ngân hàng cung cấp khi bạn đăng ký mở tài\n khoản ngân hàng. Nếu bạn không nhớ hoặc không lưu trữ, bạn có thể\n tìm lại tại mục thông tin tài khoản trong ứng dụng internet\n banking của ngân hàng đang sử dụng hoặc ra trực tiếp ngân hàng để\n lấy lại\n \n \n \n \n \n \n\n \n \n \n Tên chủ tài khoản\n \n \n \n \n \n \n \n\n {this.state.dia_chi && \n \n Địa chỉ\n \n \n \n \n \n }\n\n\n \n {this.state.chi_nhanh && \n \n Chi nhánh\n \n \n \n \n \n }\n\n \n \n {\n this.setState({ xac_nhan_thong_tin_ngan_hang: 1 })\n }}\n disabled={this.state.isShowButton}\n >\n Xác nhận thông tin\n \n {\n this.setState({\n xac_nhan_thong_tin_ngan_hang: 2,\n ten_tai_khoan: '',\n ten_ngan_hang: '',\n chi_nhanh: '',\n so_tai_khoan: '',\n dia_chi: '',\n is_thay_doi: true\n })\n }}\n disabled={this.state.isShowButton}\n >\n Thông tin không chính xác\n \n \n \n {this.state.error_code}\n \n \n }\n {/* */}\n {this.state.xac_nhan_thong_tin_ngan_hang === 1 && \n \n \n \n Đối soát rút tiền\n \n \n \n \n \n Loại rút tiền\n \n \n \n this.setState({ type_of_rut_tien: event.target.value })\n }>\n {type_of_rut_tien.map(item => (\n {item} \n ))}\n \n \n \n\n \n \n \n Số tiền rút\n \n {/* */}\n \n this.setState({ so_tien: event.target.value })\n }\n />\n {/* */}\n \n \n \n \n Ngày rút tiền\n \n \n {\n this.setState({ ngay_rut: event.target.value });\n }}\n format='DD/MM/YYYY'\n type=\"date\"\n />\n \n \n \n\n \n \n Chi tiết yêu cầu\n \n \n this.setState({ ly_do: event.target.value })}\n />\n \n \n \n \n this.props.clickBack()}>\n Quay lại\n \n {this.render_send()}\n \n \n }\n {/* */}\n {this.state.xac_nhan_thong_tin_ngan_hang === 2 && \n \n \n \n Thay đổi thông tin ngân hàng\n \n \n \n \n \n Lưu ý:\n \n {data_luu_y_rut_tien.map(item => (\n {item} \n ))}\n \n \n\n \n \n Tên ngân hàng\n \n \n Cần là tài khoản ngân hàng Hoạt động được tại Việt Nam. Trường hợp\n người dùng sử dụng ngân hàng điện tử Timo để mục này là VPBANK\n \n\n \n {\n\n const bank_full = list_bank.find(\n item => item.id == event.target.value\n );\n this.setState({\n napas: bank_full.bank_code != null,\n so_tai_khoan: '',\n ten_tai_khoan: '',\n ten_ngan_hang: bank_full.id,\n bank_full: bank_full,\n bank_code: bank_full.bank_code,\n real_ten_ngan_hang: bank_full.shortname.concat(` - ${bank_full.name}`)\n }, () => {\n console.log(this.state.bank_code)\n });\n }}\n >\n {list_bank.map(item => (\n \n {item.shortname}\n {' - '}\n {item.name}\n \n ))}\n \n \n \n \n \n \n \n Số tài khoản\n \n \n Lưu ý số tài khoản KHÔNG PHẢI là dãy số được in trên thẻ. Số tài\n khoản là dãy số được ngân hàng cung cấp khi bạn đăng ký mở tài\n khoản ngân hàng. Nếu bạn không nhớ hoặc không lưu trữ, bạn có thể\n tìm lại tại mục thông tin tài khoản trong ứng dụng internet\n banking của ngân hàng đang sử dụng hoặc ra trực tiếp ngân hàng để\n lấy lại\n \n \n \n this.setState({ so_tai_khoan: event.target.value })\n }\n />\n {this.render_kiemtra()}\n \n \n \n \n \n Tên chủ tài khoản\n \n \n Yêu cầu đúng theo quy định của ngân hàng, đúng thứ tự họ - tên,\n đầy đủ dấu cách, không có dấu ...\n \n \n {this.state.napas && this.state.bank_full ? (\n \n this.setState({ ten_tai_khoan: event.target.value.toUpperCase() })\n }\n />\n ) : (\n \n this.setState({ ten_tai_khoan: event.target.value.toUpperCase() })\n }\n />\n )}\n \n \n \n {(this.state.bank_code === '970405' || this.state.bank_code === '970400') && <>\n \n \n Địa điểm (Trường bắt buộc nhập)\n \n \n {\n this.setState({\n dia_chi: event.target.value\n });\n }}>\n {this.state.list_dia_chi.map(item => (\n \n {item}\n \n ))}\n \n \n \n \n \n Chi nhánh (Trường bắt buộc nhập)\n \n \n Hai trường hợp đặc biệt là Ngân hàng Nông Nghiệp và Phát triển\n Nông thôn Việt Nam - AGRIBANK và Ngân hàng Sài gòn Công thương -\n SGB yêu cầu thông tin trụ sở chính xác để chuyển tiền. Hai trường\n hợp thiếu thông tin này không thể giải quyết được, người dùng của\n 2 ngân hàng này vui lòng lưu ý điền đầy đủ phần này\n \n \n {\n this.setState({\n chi_nhanh: event.target.value,\n });\n }}>\n {this.state.list_chi_nhanh.map(item => (\n \n {item}\n \n ))}\n \n \n \n >}\n\n \n \n Tải hình ảnh\n \n \n Tải hình ảnh chứng minh bạn đã đóng tài khoản cũ, không còn sử\n dụng\n \n\n {this.state.file_data.map((item, index) => (\n \n \n \n Tên file: {item.type}\n \n this.delete_img(index)}>\n Xóa\n \n \n ))}\n\n \n Upload File\n this.handleChange(e)}\n />\n \n \n \n\n \n {this.state.error_code}\n \n\n \n {/* {\n this.setState({ xac_nhan_thong_tin_ngan_hang: 1 })\n }}>\n Cập nhật thông tin\n */}\n {this.render_button_info_bank()}\n \n \n }\n\n >\n\n );\n }\n}\n\nexport default withStyles(styles)(AccountDetails);\n","import React, { Component } from 'react';\nimport { withStyles } from '@material-ui/core/styles';\n\nimport {\n Card,\n CardContent,\n CardActions,\n Divider,\n Button,\n TextField,\n Typography,\n FormControl,\n Select,\n MenuItem,\n RadioGroup,\n FormControlLabel,\n Radio\n} from '@material-ui/core';\nimport {\n data_luu_y_bao_hiem,\n data_type_sua_thong_tin,\n data_type_sua_thong_tin_bao_hiem\n} from './data';\nimport Axios from 'axios';\nimport CONST_DATA from 'constant';\nimport { date_format_input } from 'utility';\n\nconst styles = theme => ({\n root: {\n display: 'flex',\n flexWrap: 'wrap'\n },\n textField: {\n marginTop: theme.spacing(2)\n // width: 200\n },\n media: {\n maxWidth: 400\n },\n formControl: {\n margin: theme.spacing(1),\n maxWidth: 400,\n minWidth: 250\n },\n selectEmpty: {\n marginTop: theme.spacing(2)\n }\n});\n\nconst type_of_rut_tien = ['Rút tiết kiệm', 'Rút đầu tư'];\n\nclass BaoHiem extends Component {\n constructor(props) {\n super(props);\n this.state = {\n loai_thong_tin: null,\n thong_tin_hien_tai: null,\n thong_tin_moi: null,\n ly_do: null,\n login_data: null\n };\n }\n\n check_login = () => {\n const login_data = localStorage.getItem(CONST_DATA.localStorage_login);\n if (login_data == null) {\n this.props.history.push(CONST_DATA.router_sign_in);\n } else {\n this.setState({\n login_data: JSON.parse(login_data)\n });\n }\n };\n\n componentDidMount() {\n this.check_login();\n }\n\n send_data = () => {\n let ticket_new = {\n user_id: this.state.login_data.user_profile.user_id,\n ticket_type: 'BẢO HIỂM',\n ticket_detail: [\n { type: 'Loại thông tin', data: this.state.loai_thong_tin },\n { type: 'Thông tin hiện tại', data: this.state.thong_tin_hien_tai },\n { type: 'Thông tin muốn sửa', data: this.state.thong_tin_moi },\n { type: 'Lý do', data: this.state.ly_do }\n ]\n };\n\n this.props.send_data(ticket_new);\n };\n\n render_send = () => {\n if (\n this.state.loai_thong_tin != null &&\n this.state.thong_tin_hien_tai != null &&\n this.state.thong_tin_moi != null\n ) {\n return (\n this.send_data()}\n disabled={this.props.disabled_btn}\n >\n Xác nhận và gửi\n \n );\n } else {\n return null;\n }\n };\n\n render() {\n const { classes } = this.props;\n return (\n \n \n \n \n Chỉnh sửa thông tin cá nhân mua bảo hiểm\n \n \n \n\n \n \n Lưu ý:\n \n {data_luu_y_bao_hiem.map(item => (\n {item} \n ))}\n \n\n \n\n \n Loại thông tin bạn muốn sửa \n \n \n this.setState({ loai_thong_tin: event.target.value })\n }>\n {data_type_sua_thong_tin_bao_hiem.map(item => {\n return (\n }\n label={item}\n />\n );\n })}\n \n \n \n \n\n \n \n Thông tin sai (thông tin đang hiển thị trên app)\n \n\n \n this.setState({ thong_tin_hien_tai: event.target.value })\n }\n />\n \n \n\n \n Thông tin muốn sửa \n \n this.setState({ thong_tin_moi: event.target.value })\n }\n />\n \n \n\n \n Chi tiết lý do \n this.setState({ ly_do: event.target.value })}\n multiline={true}\n />\n \n \n\n \n this.props.clickBack()}>\n Quay lại\n \n {this.render_send()}\n \n \n \n );\n }\n}\n\nexport default withStyles(styles)(BaoHiem);\n","import React, { Component } from 'react';\nimport { withStyles } from '@material-ui/core/styles';\n\nimport {\n Card,\n CardContent,\n CardActions,\n Divider,\n Button,\n TextField,\n Typography,\n FormControl,\n Select,\n MenuItem,\n CardMedia,\n Box,\n CircularProgress\n} from '@material-ui/core';\nimport { data_luu_y_hoan_tien } from './data';\nimport Axios from 'axios';\nimport CONST_DATA from 'constant';\nimport { date_format_input } from 'utility';\nimport images from '../../images';\n\nconst styles = theme => ({\n root: {\n display: 'flex',\n flexWrap: 'wrap'\n },\n textField: {\n marginLeft: theme.spacing(1)\n // width: 200\n },\n media: {\n maxWidth: 400\n },\n formControl: {\n margin: theme.spacing(1),\n maxWidth: 400,\n minWidth: 250\n },\n selectEmpty: {\n marginTop: theme.spacing(2)\n },\n\n huongDan: {\n marginTop: theme.spacing(2)\n }\n});\n\nconst type_of_van_de = [\n 'Chưa nhận được tiền',\n 'Nhận được ít hơn số tiền được ghi nhận'\n];\n\nclass HoanTien extends Component {\n constructor(props) {\n super(props);\n this.state = {\n ly_do: '',\n type_of_van_de: null,\n file_data: [],\n error: null,\n file_count: 0\n };\n }\n check_login = () => {\n const login_data = localStorage.getItem(CONST_DATA.localStorage_login);\n if (login_data == null) {\n this.props.history.push(CONST_DATA.router_sign_in);\n } else {\n this.setState({\n thong_tin_hien_tai: JSON.parse(login_data)\n });\n }\n };\n\n componentDidMount() {\n this.check_login();\n }\n\n send_data = () => {\n let ticket_new = {\n user_id: this.state.thong_tin_hien_tai.user_profile.user_id,\n ticket_type: 'HOÀN TIỀN',\n ticket_detail: [\n { type: 'Vấn đề gặp phải', data: this.state.type_of_van_de },\n { type: 'Chi tiết yêu cầu', data: this.state.ly_do },\n ...this.state.file_data\n ]\n };\n this.props.send_data(ticket_new);\n\n // console.log(ticket_new);\n };\n\n delete_img = i => {\n let array_state = this.state.file_data;\n array_state.splice(i, 1);\n this.setState({\n file_data: array_state,\n file_count: this.state.file_count - 1\n });\n };\n\n handleChange = e => {\n e.preventDefault();\n let file = e.target.files[0];\n let reader = new FileReader();\n reader.readAsDataURL(file);\n reader.onloadend = () => {\n this.upload_image(file, reader.result);\n };\n };\n\n upload_image = (file, base64) => {\n if (file.size >= 2000000) {\n this.setState({\n error: 'File của bạn quá lớn (tối đa 2MB)'\n });\n } else if (this.state.file_count == 2) {\n this.setState({\n error: 'Số lượng file tối đa là 1'\n });\n } else {\n this.setState({\n error: null,\n file_count: this.state.file_count + 1,\n file_data: [\n ...this.state.file_data,\n {\n data: base64,\n type: file.name\n }\n ]\n });\n }\n };\n\n render_send = () => {\n if (this.props.loading) {\n return \n }\n if (this.state.type_of_van_de != null && this.state.file_count > 0) {\n return (\n this.send_data()}\n disabled={this.props.disabled_btn}\n >\n Xác nhận và gửi\n \n );\n } else {\n return null;\n }\n };\n\n render() {\n const { classes } = this.props;\n return (\n \n \n \n \n Đối soát Hoàn tiền\n \n \n\n \n\n \n \n Lưu ý:\n \n {data_luu_y_hoan_tien.map(item => (\n {item} \n ))}\n \n\n \n\n \n \n Vấn đề gặp phải\n \n \n \n this.setState({ type_of_van_de: event.target.value })\n }>\n {type_of_van_de.map(item => (\n {item} \n ))}\n \n \n \n \n\n \n \n Chi tiết yêu cầu\n \n \n this.setState({ ly_do: event.target.value })}\n />\n \n \n \n\n \n \n Các bước chụp ảnh màn hình biên lai hoàn tiền\n \n \n Bước 1: Trong app Finhay, nhấn chọn mục “Hoàn tiền” (hoặc “Túi Ba\n Gang”)\n \n \n \n Bước 2: Nhấn vào biểu tượng túi túi tiền màu xanh, tại góc trên\n bên phải\n \n\n \n \n Bước 3: Tại danh sách lịch sử đơn hàng, nhấn chọn đơn hàng mà bạn\n cần Finhay kiểm tra\n \n\n \n\n \n Bước 4: Bạn chụp lại màn hình chi tiết đơn hàng\n \n \n \n \n \n \n Bước 5: Tải lên đây ảnh màn hình mà bạn vừa chụp\n \n\n {this.state.file_data.map((item, index) => (\n \n \n \n Tên file: {item.type}\n \n this.delete_img(index)}>\n Xóa\n \n \n ))}\n\n \n Upload File\n this.handleChange(e)}\n />\n \n \n\n \n this.props.clickBack()}>\n Quay lại\n \n {this.render_send()}\n \n \n \n );\n }\n}\n\nexport default withStyles(styles)(HoanTien);\n","import React, { Component } from 'react';\nimport { withStyles } from '@material-ui/core/styles';\n\nimport {\n Card,\n CardContent,\n CardActions,\n Divider,\n Button,\n TextField,\n Typography,\n FormControl,\n Select,\n MenuItem,\n CircularProgress\n} from '@material-ui/core';\nimport { data_type_sua_thong_tin, data_luu_y_sat_nhap } from './data';\nimport Axios from 'axios';\nimport CONST_DATA from 'constant';\nimport { date_format_input } from 'utility';\n\nconst styles = theme => ({\n root: {\n display: 'flex',\n flexWrap: 'wrap'\n },\n textField: {\n marginTop: theme.spacing(2)\n // width: 200\n },\n media: {\n maxWidth: 400\n },\n formControl: {\n margin: theme.spacing(1),\n maxWidth: 400,\n minWidth: 250\n },\n selectEmpty: {\n marginTop: theme.spacing(2)\n }\n});\n\nconst type_of_rut_tien = ['Rút tiết kiệm', 'Rút đầu tư'];\n\nclass AccountDetails extends Component {\n constructor(props) {\n super(props);\n this.state = {\n ly_do: ''\n };\n }\n\n check_login = () => {\n const login_data = localStorage.getItem(CONST_DATA.localStorage_login);\n if (login_data == null) {\n this.props.history.push(CONST_DATA.router_sign_in);\n } else {\n this.setState({\n thong_tin_hien_tai: JSON.parse(login_data)\n });\n }\n };\n\n componentDidMount() {\n this.check_login();\n }\n\n send_data = () => {\n let ticket_new = {\n user_id: this.state.thong_tin_hien_tai.user_profile.user_id,\n ticket_type: 'SỬA CMTND CCCD',\n ticket_detail: [{ type: 'Chi tiết yêu cầu', data: this.state.ly_do }]\n };\n\n this.props.send_data(ticket_new);\n };\n\n render() {\n const { classes } = this.props;\n return (\n \n \n \n \n Finhay cập nhật thông tin CMTND/CCCD hộ chiếu của tôi chưa đúng\n \n \n \n\n \n \n Chi tiết yêu cầu\n \n \n this.setState({ ly_do: event.target.value })}\n />\n \n \n \n\n \n this.props.clickBack()}>\n Quay lại\n \n {this.props.loading ? : this.send_data()}\n disabled={this.props.disabled_btn}\n >\n Xác nhận và gửi\n }\n\n \n \n \n );\n }\n}\n\nexport default withStyles(styles)(AccountDetails);\n","import React, { Component } from 'react';\nimport { makeStyles, withStyles } from '@material-ui/core/styles';\nimport { Grid, Typography, Card } from '@material-ui/core';\n\nimport Main from './MainComponent';\nimport SuaThongTin from './SuaThongTinComponent';\nimport ChuyenTienComponent from './ChuyenTienComponent';\nimport SuaThongTinNganHang from './SuaThongTinNganHang';\nimport SatNhapComponent from './SatNhapComponent';\nimport DoiSoat from './DoiSoat';\nimport CONST_DATA from 'constant';\nimport Axios from 'axios';\nimport { toast } from 'react-toastify'\nimport { data_type_issue } from './data';\nimport BaoHiem from './BaoHiem';\nimport HoanTien from './HoanTien';\nimport Ekyc from './Ekyc';\n\nconst styles = theme => ({\n root: {\n padding: theme.spacing(3)\n }\n});\n\nconst STEP_MAIN = 'main';\nconst STEP_SUA_THONG_TIN = 'main ,sua thong tin';\nconst STEP_CHUYEN_TIEN = 'main , chuyen tien';\nconst STEP_SUA_THONG_TIN_NGAN_HANG = 'main ,sua thong tin ngan hang';\nconst STEP_SAT_NHAP = 'main ,sat nhap';\nconst STEP_DOI_SOAT = 'main ,doi soat';\nconst STEP_BAO_HIEM = 'main ,bao hiem';\nconst STEP_HOAN_TIEN = 'main ,hoan tien';\nconst STEP_EKYC = 'main, ekyc';\n\nclass CreatIssue extends Component {\n constructor(props) {\n super(props);\n this.state = {\n step_type: STEP_MAIN,\n access_token: null,\n user_id: null,\n loading: false,\n disabled_btn:false,\n };\n }\n\n check_login = () => {\n const login_data = localStorage.getItem(CONST_DATA.localStorage_login);\n\n if (login_data == null) {\n this.props.history.push(CONST_DATA.router_sign_in);\n } else {\n let access_token = JSON.parse(login_data).access_token;\n let user_id = JSON.parse(login_data).user_profile.user_id;\n this.setState({\n access_token: access_token,\n user_id: user_id\n });\n\n this.check_token(user_id, access_token);\n }\n };\n\n check_token = (user_id, access_token) => {\n const body_req = {\n user_id: user_id,\n access_token: access_token\n };\n\n Axios.post(CONST_DATA.check_token, body_req)\n .then(response => {\n if (response.data.status != 'success') {\n this.props.history.push(CONST_DATA.router_sign_in);\n }\n })\n .catch(error => {\n console.log(error);\n });\n };\n\n componentDidMount() {\n this.check_login();\n }\n\n selectedTypeIssue = type_issue => {\n // Sửa đổi, chỉnh sửa thông tin cá nhân\n if (type_issue == data_type_issue[0]) {\n this.setState({\n step_type: STEP_SUA_THONG_TIN\n });\n }\n\n // 'Tôi gặp vấn đề khi CHUYỂN TIỀN và cần đối soát thủ công',\n if (type_issue == data_type_issue[1]) {\n this.setState({\n step_type: STEP_CHUYEN_TIEN\n });\n }\n\n // 'Sửa đổi thông tin ngân hàng,\n if (type_issue == data_type_issue[2]) {\n this.setState({\n step_type: STEP_SUA_THONG_TIN_NGAN_HANG\n });\n }\n\n // 'Tôi cần SÁP NHẬP 2 tài khoản'\n if (type_issue == data_type_issue[3]) {\n this.setState({\n step_type: STEP_SAT_NHAP\n });\n }\n\n // 'Tôi cần đối soát tài khoản'\n if (type_issue == data_type_issue[4]) {\n this.setState({\n step_type: STEP_DOI_SOAT\n });\n }\n\n if (type_issue == data_type_issue[5]) {\n this.setState({\n step_type: STEP_HOAN_TIEN\n });\n }\n\n if (type_issue == data_type_issue[6]) {\n this.setState({\n step_type: STEP_EKYC\n });\n }\n };\n\n clickBack = () => {\n this.setState({\n step_type: STEP_MAIN,\n });\n };\n\n send_data = ticket_new => {\n let add_props = {\n access_token: this.state.access_token\n };\n this.setState({ loading: true });\n\n // Axios.get(CONST_DATA.check_spam + this.state.user_id.toString())\n // .then(response => {\n // if (response.data.status == 'success' && response.data.data == true) {\n Axios.post(CONST_DATA.add_ticket, { ...add_props, ...ticket_new })\n .then(response => {\n this.setState({ loading: false })\n if (response.data.status == 'success') {\n\n if (response.data.data != null) {\n this.setState({\n disabled_btn:true,\n })\n const notify = () => toast.success(\"Gửi yêu cầu thành công.\",{\n position:\"top-center\", \n autoClose:3000,\n });\n notify();\n setTimeout(() => {\n this.props.history.push(\n CONST_DATA.router_yeucau + '/' + response.data.data\n );\n },3500);\n \n }\n }\n })\n .catch(error => {\n this.setState({ loading: false })\n console.log(error);\n });\n // } else {\n // //spam\n // console.log('spam');\n // }\n // })\n // .catch(error => {\n // console.log(error);\n // });\n };\n\n go_list = () => {\n this.props.history.push(CONST_DATA.router_list_yeu_cau);\n };\n\n renderMain = () => {\n if (this.state.step_type === STEP_MAIN) {\n return (\n this.go_list()}\n clickNext={text => this.selectedTypeIssue(text)}\n send_data={ticket_new => this.send_data(ticket_new)}\n />\n );\n }\n if (this.state.step_type === STEP_SUA_THONG_TIN) {\n return (\n this.clickBack()}\n send_data={ticket_new => this.send_data(ticket_new)}\n access_token={this.state.access_token}\n loading={this.state.loading}\n disabled_btn={this.state.disabled_btn}\n />\n );\n }\n if (this.state.step_type === STEP_CHUYEN_TIEN) {\n return (\n this.clickBack()}\n send_data={ticket_new => this.send_data(ticket_new)}\n access_token={this.state.access_token}\n loading={this.state.loading}\n disabled_btn={this.state.disabled_btn}\n />\n );\n }\n if (this.state.step_type === STEP_SUA_THONG_TIN_NGAN_HANG) {\n return (\n this.clickBack()}\n send_data={ticket_new => this.send_data(ticket_new)}\n loading={this.state.loading}\n disabled_btn={this.state.disabled_btn}\n />\n );\n }\n if (this.state.step_type === STEP_SAT_NHAP) {\n return (\n this.clickBack()}\n send_data={ticket_new => this.send_data(ticket_new)}\n disabled_btn={this.state.disabled_btn}\n loading={this.state.loading}\n />\n );\n }\n if (this.state.step_type === STEP_DOI_SOAT) {\n return (\n this.clickBack()}\n send_data={ticket_new => this.send_data(ticket_new)}\n user_id={this.state.user_id}\n history={this.props.history}\n disabled_btn={this.state.disabled_btn}\n loading={this.state.loading}\n />\n );\n }\n\n if (this.state.step_type === STEP_BAO_HIEM) {\n return (\n this.clickBack()}\n send_data={ticket_new => this.send_data(ticket_new)}\n disabled_btn={this.state.disabled_btn}\n loading={this.state.loading}\n />\n );\n }\n\n if (this.state.step_type === STEP_HOAN_TIEN) {\n return (\n this.clickBack()}\n send_data={ticket_new => this.send_data(ticket_new)}\n disabled_btn={this.state.disabled_btn}\n loading={this.state.loading}\n />\n );\n }\n if (this.state.step_type == STEP_EKYC) {\n return (\n this.clickBack()}\n send_data={ticket_new => this.send_data(ticket_new)}\n loading={this.state.loading}\n disabled_btn={this.state.disabled_btn}\n />\n );\n } else {\n return null;\n }\n };\n\n render() {\n const { classes } = this.props;\n return (\n \n \n \n {this.renderMain()}\n \n \n
\n );\n }\n}\n\nexport default withStyles(styles)(CreatIssue);\n","import React, { Component } from 'react';\n\nimport CONST_DATA from 'constant';\nimport Axios from 'axios';\n\nclass CreatIssue extends Component {\n constructor(props) {\n super(props);\n this.state = {\n access_token: null,\n user_id: null\n };\n }\n\n check_login = () => {\n Axios.get(\n CONST_DATA.get_profile +\n '/' +\n this.props.match.params.user_id +\n '/' +\n this.props.match.params.token\n )\n .then(response => {\n if (response.data.status == 'success') {\n this.setState({\n access_token: response.data.data.access_token,\n user_id: response.data.data.user_id\n });\n localStorage.setItem(\n CONST_DATA.localStorage_login,\n JSON.stringify(response.data.data)\n );\n this.props.history.push(CONST_DATA.router_taoyeucau);\n } else {\n this.props.history.push(CONST_DATA.router_sign_in);\n }\n })\n .catch(error => {\n console.log(error);\n });\n };\n\n async componentDidMount() {\n await this.check_login();\n }\n\n render() {\n return null;\n }\n}\n\nexport default CreatIssue;\n","import React from 'react';\nimport { Switch, Redirect } from 'react-router-dom';\nimport { RouteWithLayout } from './components';\nimport {\n Main as MainLayout,\n Minimal as MinimalLayout,\n MinimalApp,\n MainApp\n} from './layouts';\n\nimport {\n SignIn as SignInView,\n NotFound as NotFoundView,\n UserList,\n UserListApp,\n CreatIssue,\n CreatIssueApp,\n Issue,\n IssueApp\n} from './views';\nimport CONST_DATA from 'constant';\n\nconst check_mobile = () => {\n if (window.innerWidth > window.innerHeight) {\n return MainLayout;\n } else {\n return MainApp;\n }\n};\n\nconst check_mobile_mini = () => {\n if (window.innerWidth > window.innerHeight) {\n return MinimalLayout;\n } else {\n return MinimalApp;\n }\n};\n\nconst Routes = () => {\n check_mobile();\n return (\n \n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n \n \n );\n};\n\nexport default Routes;\n","import React, { Component } from 'react';\nimport { Router } from 'react-router-dom';\nimport { createBrowserHistory } from 'history';\nimport { Chart } from 'react-chartjs-2';\nimport { ThemeProvider } from '@material-ui/styles';\nimport validate from 'validate.js';\nimport { ToastContainer } from 'react-toastify';\nimport 'react-toastify/dist/ReactToastify.css';\nimport { chartjs } from './helpers';\nimport theme from './theme';\nimport 'react-perfect-scrollbar/dist/css/styles.css';\nimport './assets/scss/index.scss';\nimport validators from './common/validators';\nimport Routes from './Routes';\n\nconst browserHistory = createBrowserHistory();\n\nChart.helpers.extend(Chart.elements.Rectangle.prototype, {\n draw: chartjs.draw\n});\n\nvalidate.validators = {\n ...validate.validators,\n ...validators\n};\n\nexport default class App extends Component {\n render() {\n return (\n \n \n \n \n \n \n );\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport * as serviceWorker from './serviceWorker';\nimport App from './App';\n\nReactDOM.render( , document.getElementById('root'));\n\nserviceWorker.unregister();\n"],"sourceRoot":""}