add profession
This commit is contained in:
@ -19,6 +19,7 @@ const CustomerDialog = ({ open, handleClose, handleSubmit, initialData, viewStat
|
||||
const [aldeias, setAldeias] = useState([]);
|
||||
const [postoAdm, setPostoAdm] = useState([]);
|
||||
const [sucos, setSucos] = useState([]);
|
||||
const [profession, setProfession] = useState([]);
|
||||
const [groupData] = useState({
|
||||
reguler: `This fill can not be empty!`,
|
||||
premium: `This field required only for Premium or Agent`,
|
||||
@ -32,6 +33,16 @@ const CustomerDialog = ({ open, handleClose, handleSubmit, initialData, viewStat
|
||||
|
||||
async function fetchMasterData() {
|
||||
try {
|
||||
let getProfession = await axios.get(`${BASE_URL_MASTER_DATA}/profession/list`, {
|
||||
params: {
|
||||
limit: 50,
|
||||
page: 1,
|
||||
with_deleted: false,
|
||||
order_field: 'name',
|
||||
order_direction: 'ASC',
|
||||
}
|
||||
});
|
||||
setProfession(getProfession.data.data.list)
|
||||
let getMunicipios = await axios.get(`${BASE_URL_MASTER_DATA}/municipios/list`, {
|
||||
params: {
|
||||
limit: 50,
|
||||
@ -204,7 +215,17 @@ const CustomerDialog = ({ open, handleClose, handleSubmit, initialData, viewStat
|
||||
<img width={300} height={250} srcSet={formData.file_commercial_license} src={formData.file_commercial_license} alt={"file_commercial_license"} style={{borderRadius: 10}}/>
|
||||
{/* AGENT & PREMIUM DATA */}
|
||||
|
||||
<TextField disabled={viewOnly} fullWidth margin="dense" label="Profession" name="profession" value={formData.profession} onChange={handleChange} />
|
||||
{/* <TextField disabled={viewOnly} fullWidth margin="dense" label="Profession" name="profession" value={formData.profession} onChange={handleChange} /> */}
|
||||
<FormControl fullWidth margin="dense">
|
||||
<InputLabel>Profession</InputLabel>
|
||||
<Select disabled={viewOnly} name="profession" value={formData.profession} onChange={handleChange}>
|
||||
{
|
||||
profession ? profession.map((el: any) => (
|
||||
<MenuItem key={el.id} value={el.id}>{el.name}</MenuItem>
|
||||
)) : ""
|
||||
}
|
||||
</Select>
|
||||
</FormControl>
|
||||
{/* <TextField fullWidth margin="dense" label="Password" name="password" type="password" value={formData.password} onChange={handleChange} /> */}
|
||||
{/* <TextField fullWidth margin="dense" label="PIN" name="pin" value={formData.pin} onChange={handleChange} /> */}
|
||||
<FormControl fullWidth margin="dense">
|
||||
|
||||
@ -39,8 +39,8 @@ const ManageMembers = () => {
|
||||
limit: 20,
|
||||
page: 1,
|
||||
with_deleted: false,
|
||||
order_field: 'fullname',
|
||||
order_direction: 'ASC'
|
||||
order_field: 'created_at',
|
||||
order_direction: 'DESC'
|
||||
}
|
||||
});
|
||||
let temp = 1;
|
||||
|
||||
Reference in New Issue
Block a user