You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

208 lines
6.8 KiB

  1. import React from 'react'
  2. import { makeStyles } from '@material-ui/core/styles'
  3. import Grid from '@material-ui/core/Grid'
  4. import Card from 'components/Card/Card.js'
  5. import CardBody from 'components/Card/CardBody.js'
  6. import CardHeader from 'components/Card/CardHeader.js'
  7. import CardFooter from 'components/Card/CardFooter.js'
  8. import styles from 'assets/jss/nextjs-material-kit/pages/profilePage.js'
  9. import Button from "components/CustomButtons/Button.js";
  10. import Icon from "@material-ui/core/Icon";
  11. import InputLabel from '@material-ui/core/InputLabel';
  12. import TextField from '@material-ui/core/TextField';
  13. import FormControl from '@material-ui/core/FormControl';
  14. import Select from '@material-ui/core/Select';
  15. import MenuItem from '@material-ui/core/MenuItem';
  16. import { Hidden } from '@material-ui/core'
  17. const useStyles = makeStyles(styles)
  18. const EditProfile = function ({ province, cities, editprofile, user, profile, ...props }) {
  19. console.log(province);
  20. const [age, setAge] = React.useState('');
  21. const handleChange = (event) => {
  22. setAge(event.target.value);
  23. };
  24. const classes = useStyles()
  25. // const Province = province.map((data) => {
  26. // return (
  27. // <div>
  28. // </div>
  29. // );
  30. // })
  31. return (
  32. <Card className={classes.textCenter}>
  33. <div align='center'>
  34. <CardHeader color='info'>Edit Profile</CardHeader>
  35. </div>
  36. <CardBody>
  37. <div>
  38. <div align='center'>
  39. <Grid item='item' xs={12}>
  40. <div align='left'>
  41. <h3>Edit Data Pribadi</h3>
  42. <span>
  43. Kelola informasi profil Anda untuk mengontrol, melindungi dan
  44. mengamankan akun
  45. </span>
  46. <hr></hr>
  47. </div>
  48. </Grid>
  49. <Grid
  50. container
  51. spacing={3}
  52. justify='center'
  53. style={{
  54. padding: '10px'
  55. }}
  56. >
  57. <Grid item xs={6}>
  58. <TextField
  59. id='outlined-full-width'
  60. label='Username'
  61. style={{ margin: 8 }}
  62. placeholder='Masukan Username Baru'
  63. fullWidth
  64. margin='normal'
  65. InputLabelProps={{
  66. shrink: true
  67. }}
  68. variant='outlined'
  69. />
  70. </Grid>
  71. <Grid item xs={6}>
  72. <TextField
  73. id='outlined-full-width'
  74. label='Nama'
  75. style={{ margin: 8 }}
  76. placeholder='Masukan Nama Baru'
  77. fullWidth
  78. margin='normal'
  79. InputLabelProps={{
  80. shrink: true
  81. }}
  82. variant='outlined'
  83. />
  84. </Grid>
  85. <Grid item xs={6}>
  86. <TextField
  87. id='outlined-full-width'
  88. label='Email'
  89. style={{ margin: 8 }}
  90. placeholder='Masukan Email Baru'
  91. fullWidth
  92. margin='normal'
  93. InputLabelProps={{
  94. shrink: true
  95. }}
  96. variant='outlined'
  97. />
  98. </Grid>
  99. <Grid item xs={6}>
  100. <TextField
  101. id='outlined-full-width'
  102. label='Nomer Telpon'
  103. style={{ margin: 8 }}
  104. placeholder='Masukan Nomer Telpon Baru'
  105. fullWidth
  106. margin='normal'
  107. InputLabelProps={{
  108. shrink: true
  109. }}
  110. variant='outlined'
  111. />
  112. </Grid>
  113. </Grid>
  114. </div>
  115. <br></br>
  116. <Grid item='item' xs={12}>
  117. <div align='left'>
  118. <h3>Edit Data Alamat</h3>
  119. <span>
  120. Kelola informasi alamat anda untuk kemudahan dalam pengirim barang
  121. </span>
  122. <hr></hr>
  123. </div>
  124. </Grid>
  125. <Grid
  126. container
  127. spacing={3}
  128. justify='center'
  129. style={{
  130. padding: '10px'
  131. }}
  132. >
  133. <Grid item xs={6}>
  134. <FormControl className={classes.formControl}>
  135. <InputLabel id='demo-simple-select-helper-label'>
  136. Provinsi
  137. </InputLabel>
  138. <Select
  139. style={{ width: '580px' }}
  140. labelId='demo-simple-select-helper-label'
  141. id='demo-simple-select-helper'
  142. value={age}
  143. onChange={handleChange}
  144. >
  145. <MenuItem value=''>
  146. <em>None</em>
  147. </MenuItem>
  148. <MenuItem value={1}>asdasdsada</MenuItem>
  149. </Select>
  150. </FormControl>
  151. </Grid>
  152. <Grid item xs={6}>
  153. <FormControl className={classes.formControl}>
  154. <InputLabel id='demo-simple-select-helper-label'>Kota</InputLabel>
  155. <Select
  156. style={{ width: '580px' }}
  157. labelId='demo-simple-select-helper-label'
  158. id='demo-simple-select-helper'
  159. value={age}
  160. onChange={handleChange}
  161. >
  162. <MenuItem value=''>
  163. <em>None</em>
  164. </MenuItem>
  165. <MenuItem value={10}>Ten</MenuItem>
  166. <MenuItem value={20}>Twenty</MenuItem>
  167. <MenuItem value={30}>Thirty</MenuItem>
  168. </Select>
  169. </FormControl>
  170. </Grid>
  171. <Grid item xs={12}>
  172. <TextField
  173. id='outlined-full-width'
  174. label='Alamat Lengkap'
  175. placeholder='Masukan Username Baru'
  176. fullWidth
  177. margin='normal'
  178. InputLabelProps={{
  179. shrink: true
  180. }}
  181. variant='outlined'
  182. />
  183. </Grid>
  184. </Grid>
  185. </div><br/><br/>
  186. <div align="center">
  187. <Button color="info" round href={"/yamaha/cart/checkout?s="}>
  188. <Icon className={classes.icons}>save</Icon>Simpan Perubahan
  189. </Button>
  190. </div>
  191. </CardBody>
  192. <CardFooter className={classes.textMuted} textalign='center'>
  193. © 2020 , All Right Reserved by @Thamrin Brother Company
  194. </CardFooter>
  195. </Card>
  196. )
  197. }
  198. export default EditProfile