Guest User

Untitled

a guest
Jan 11th, 2024
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.05 KB | None | 0 0
  1.  
  2. return (
  3. <div
  4. style={{
  5. backgroundColor: "#fff",
  6. padding: "20px",
  7. borderRadius: "10px",
  8. border: "2px solid #ccc",
  9. boxShadow: "0 0 10px rgba(0, 0, 0, 0.1)",
  10. }}
  11. >
  12. <Typography
  13. variant="h2"
  14. align="center"
  15. paragraph
  16. style={{ color: "#515254" }}
  17. >
  18. Profiel
  19. </Typography>
  20. <Divider style={{ marginBottom: "20px" }} />
  21. <Grid container spacing={3}>
  22. <Grid item xs={6}>
  23. <Paper
  24. style={{
  25. padding: "10px",
  26. border: "2px solid #ccc",
  27. boxShadow: "0 0 10px rgba(0, 0, 0, 0.1)",
  28. borderRadius: "7px",
  29. }}
  30. >
  31. <div
  32. style={{
  33. position: "relative",
  34. display: "inline-block",
  35. filter: hovered ? "brightness(70%)" : "brightness(100%)",
  36. }}
  37. onMouseEnter={() => setHovered(true)}
  38. onMouseLeave={() => setHovered(false)}
  39. >
  40. {profileData?.firstName || profileData?.lastName ? (
  41. <img
  42. src="/assets/images/default-avatar"
  43. alt="Gebruikers Avatar"
  44. style={{
  45. width: "100px",
  46. height: "100px",
  47. borderRadius: "50%",
  48. }}
  49. />
  50. ) : (
  51. generateLetterAvatar(
  52. profileData?.firstName,
  53. profileData?.lastName
  54. )
  55. )}
  56. </div>
  57.  
  58. <TextField
  59. label="Voornaam"
  60. defaultValue={profileData?.firstName}
  61. onChange={(e) => updateProfileData("firstName", e.target.value)}
  62. fullWidth
  63. margin="normal"
  64. disabled={!editMode}
  65. />
  66. <TextField
  67. label="Achternaam"
  68. defaultValue={profileData?.lastName}
  69. onChange={(e) => updateProfileData("lastName", e.target.value)}
  70. fullWidth
  71. margin="normal"
  72. disabled={!editMode}
  73. />
  74.  
  75. <Typography variant="h6" paragraph>
  76. Beperkingen
  77. </Typography>
  78. <Autocomplete
  79. multiple
  80. id="disabilities"
  81. options={getDisabilitiesOptions()}
  82. value={getDisabilitiesValue(profileData)}
  83. onChange={(_, newValue) =>
  84. updateSensitiveData("disabilities", newValue)
  85. }
  86. disableCloseOnSelect
  87. renderInput={(params) => (
  88. <TextField
  89. {...params}
  90. label="Beperkingen"
  91. margin="normal"
  92. disabled={!editMode}
  93. />
  94. )}
  95. />
  96.  
  97. <Typography variant="h6" paragraph>
  98. Ondersteuningsmiddelen
  99. </Typography>
  100. <Autocomplete
  101. multiple
  102. id="supportTools"
  103. options={getSupportToolsOptions()}
  104. value={getSupportToolsValue(profileData)}
  105. onChange={(_, newValue) =>
  106. updateSensitiveData("assistanceTools", newValue)
  107. }
  108. disableCloseOnSelect
  109. renderInput={(params) => (
  110. <TextField
  111. {...params}
  112. label="Ondersteuningsmiddelen"
  113. margin="normal"
  114. disabled={!editMode}
  115. />
  116. )}
  117. />
  118.  
  119. <Button
  120. variant="contained"
  121. color="primary"
  122. onClick={handleEditClick}
  123. >
  124. {editMode ? "Opslaan" : "Bewerken"}
  125. </Button>
  126. </Paper>
  127. </Grid>
  128.  
  129. <Grid item xs={6}>
  130. <Paper
  131. style={{
  132. padding: "20px",
  133. border: "2px solid #ccc",
  134. boxShadow: "0 0 10px rgba(0, 0, 0, 0.1)",
  135. borderRadius: "7px",
  136. }}
  137. >
  138. <Typography variant="h6" paragraph>
  139. Voorkeursbenadering
  140. <Tooltip title="Dit geeft aan welke manier u graag benaderd wordt over onderzoeken.">
  141. <IconButton
  142. size="small"
  143. style={{ marginLeft: "5px" }}
  144. color="primary"
  145. aria-label="info"
  146. >
  147. <InfoIcon fontSize="inherit" />
  148. </IconButton>
  149. </Tooltip>
  150. </Typography>
  151. <Autocomplete
  152. id="preferredApproachType"
  153. options={getStandardPreferredApproachOptions()}
  154. value={getPreferredApproachValue(profileData)}
  155. onChange={
  156. (_, newValue) =>
  157. updateSensitiveData("preferredApproachType", newValue) // TODO: convert to its respective DTO
  158. }
  159. renderInput={(params) => (
  160. <TextField
  161. {...params}
  162. label="Voorkeursbenadering"
  163. margin="normal"
  164. disabled={!editMode}
  165. />
  166. )}
  167. />
  168.  
  169. <Typography variant="h6" paragraph>
  170. Commerciƫle benaderingen
  171. <Tooltip title="Hiermee geeft u aan of dat u door commerciale bedrijven wil benaderd worden.">
  172. <IconButton
  173. size="small"
  174. style={{ marginLeft: "5px" }}
  175. color="primary"
  176. aria-label="info"
  177. >
  178. <InfoIcon fontSize="inherit" />
  179. </IconButton>
  180. </Tooltip>
  181. </Typography>
  182. <FormControlLabel
  183. control={
  184. <Switch
  185. checked={
  186. profileData?.sensitiveData?.commercialApproaches ?? false
  187. }
  188. onChange={() =>
  189. updateSensitiveData(
  190. "commercialApproaches",
  191. !profileData?.sensitiveData?.commercialApproaches
  192. )
  193. }
  194. color="primary"
  195. disabled={!editMode}
  196. />
  197. }
  198. label={
  199. profileData?.sensitiveData?.commercialApproaches ? "Ja" : "Nee"
  200. }
  201. />
  202.  
  203. <Typography variant="h6" paragraph>
  204. Beschikbaarheid dagen
  205. <Tooltip title="We zullen voor 09:00 en 17:00 proberen te bereiken op de geselecteerde dagen.">
  206. <IconButton
  207. size="small"
  208. style={{ marginLeft: "5px" }}
  209. color="primary"
  210. aria-label="info"
  211. >
  212. <InfoIcon fontSize="inherit" />
  213. </IconButton>
  214. </Tooltip>
  215. </Typography>
  216. <Autocomplete
  217. multiple
  218. id="availabilityDays"
  219. options={getDaysOptions()}
  220. value={getAvailabilityDaysValue(profileData)}
  221. onChange={
  222. (_, newValue) =>
  223. updateSensitiveData("availabilityMoments", newValue) // TODO: convert to its respective DTO
  224. }
  225. disableCloseOnSelect
  226. getOptionLabel={(option) => option}
  227. renderInput={(params) => (
  228. <TextField
  229. {...params}
  230. label="Beschikbaarheid Dagen"
  231. margin="normal"
  232. disabled={!editMode}
  233. />
  234. )}
  235. />
  236.  
  237. <Button
  238. variant="contained"
  239. color="primary"
  240. onClick={handleEditClick}
  241. >
  242. {editMode ? "Opslaan" : "Bewerken"}
  243. </Button>
  244. </Paper>
  245. </Grid>
  246. </Grid>
  247. </div>
  248. );
  249. }
  250.  
Advertisement
Add Comment
Please, Sign In to add comment