Skip to content

Commit

Permalink
Merge pull request #459 from bounswe/feature/victim_request
Browse files Browse the repository at this point in the history
Advanced Countries Selection at Account Page for Accuracy of Phone Numbers
  • Loading branch information
ilgazer authored Nov 26, 2023
2 parents a3163ae + 0b1e98d commit f1525a4
Show file tree
Hide file tree
Showing 5 changed files with 767 additions and 83 deletions.
39 changes: 19 additions & 20 deletions resq/frontend/src/components/AccountProfileDetails.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, {useCallback, useState} from 'react';
import {Box, Card, CardContent, CardHeader, Divider, TextField} from '@mui/material';
import {createTheme, ThemeProvider} from '@mui/material/styles';
import React, { useCallback, useState } from 'react';
import { Box, Card, CardContent, CardHeader, Divider, TextField } from '@mui/material';
import { createTheme, ThemeProvider } from '@mui/material/styles';
import UnstyledSelectRichOptions from './Countries';


const states = [
Expand Down Expand Up @@ -37,7 +38,7 @@ function AccountProfileDetails() {
email: '[email protected]',
phone: '05324054856',
state: 'Izmir',
country: 'Turkey',
country: 'TR',
});

const handleChange = useCallback((event) => {
Expand All @@ -54,13 +55,13 @@ function AccountProfileDetails() {
return (
<ThemeProvider theme={customTheme}>
<form autoComplete="off" noValidate onSubmit={handleSubmit}>
<Card style={{width: '100%', maxWidth: '400px', height: '99.2%'}}>
<CardHeader/>
<CardContent sx={{pt: 0}}>
<Box sx={{m: -1.5}}>
<Card style={{ width: '100%', maxWidth: '400px', height: '99.2%' }}>
<CardHeader />
<CardContent sx={{ pt: 0 }}>
<Box sx={{ m: -1.5 }}>
<TextField
fullWidth
style={{marginBottom: '16px'}}
style={{ marginBottom: '16px' }}
label="First name"
name="firstName"
onChange={handleChange}
Expand All @@ -69,7 +70,7 @@ function AccountProfileDetails() {
/>
<TextField
fullWidth
style={{marginBottom: '16px'}}
style={{ marginBottom: '16px' }}
label="Last name"
name="lastName"
onChange={handleChange}
Expand All @@ -78,7 +79,7 @@ function AccountProfileDetails() {
/>
<TextField
fullWidth
style={{marginBottom: '16px'}}
style={{ marginBottom: '16px' }}
label="Email Address"
name="email"
onChange={handleChange}
Expand All @@ -87,31 +88,29 @@ function AccountProfileDetails() {
/>
<TextField
fullWidth
style={{marginBottom: '16px'}}
style={{ marginBottom: '16px' }}
label="Phone Number"
name="phone"
onChange={handleChange}
type="number"
value={values.phone}
/>
<TextField
fullWidth
style={{marginBottom: '16px'}}
label="Country"
<UnstyledSelectRichOptions
name="country"
value={values.country}
onChange={handleChange}
label="Country"
required
value={values.country}
/>
<TextField
fullWidth
style={{marginBottom: '16px'}}
style={{ marginBottom: '16px' }}
label="Select State"
name="state"
onChange={handleChange}
required
select
SelectProps={{native: true}}
SelectProps={{ native: true }}
value={values.state}
>
{states.map((option) => (
Expand All @@ -122,7 +121,7 @@ function AccountProfileDetails() {
</TextField>
</Box>
</CardContent>
<Divider/>
<Divider />
</Card>
</form>
</ThemeProvider>
Expand Down
Loading

0 comments on commit f1525a4

Please sign in to comment.