Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 

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