@@ -186,66 +186,6 @@ const OrganizationCard = ({userData, id}) => { | |||||
</Grid> | </Grid> | ||||
</Grid> | </Grid> | ||||
<Grid item lg={4} > | |||||
<Grid container alignItems={"center"}> | |||||
<Grid item xs={4} s={4} md={4} lg={4} | |||||
sx={{ml: 3, mr: 3, display: 'flex', alignItems: 'center'}}> | |||||
Temp Name (Eng): | |||||
</Grid> | |||||
<Grid item xs={7} s={7} md={7} lg={6}> | |||||
<TextField | |||||
fullWidth | |||||
{...register("enCompanyNameTemp")} | |||||
id='enCompanyNameTemp' | |||||
inputProps={{ maxLength: 150 }} | |||||
/> | |||||
</Grid> | |||||
</Grid> | |||||
</Grid> | |||||
<Grid item lg={4} > | |||||
<Grid container alignItems={"center"}> | |||||
<Grid item xs={4} s={4} md={4} lg={4} | |||||
sx={{ml: 3, mr: 3, display: 'flex', alignItems: 'center'}}> | |||||
Temp Name (Ch): | |||||
</Grid> | |||||
<Grid item xs={7} s={7} md={7} lg={6}> | |||||
<TextField | |||||
fullWidth | |||||
{...register("chCompanyNameTemp")} | |||||
id='chCompanyNameTemp' | |||||
inputProps={{ maxLength: 150 }} | |||||
/> | |||||
</Grid> | |||||
</Grid> | |||||
</Grid> | |||||
<Grid item lg={4} > | |||||
<Grid container alignItems={"center"}> | |||||
<Grid item xs={4} s={4} md={4} lg={4} | |||||
sx={{ml: 3, mr: 3, display: 'flex', alignItems: 'center'}}> | |||||
Temp Expiry Date: | |||||
</Grid> | |||||
<Grid item xs={7} s={7} md={7} lg={6}> | |||||
<LocalizationProvider fullWidth dateAdapter={AdapterDayjs}> | |||||
<DatePicker | |||||
fullWidth | |||||
{...register("brExpiryDateTemp")} | |||||
id='brExpiryDateTemp' | |||||
name='brExpiryDateTemp' | |||||
/> | |||||
</LocalizationProvider> | |||||
</Grid> | |||||
</Grid> | |||||
</Grid> | |||||
<Grid item lg={4} > | <Grid item lg={4} > | ||||
<Grid container alignItems={"center"}> | <Grid container alignItems={"center"}> | ||||
<Grid item xs={4} s={4} md={4} lg={4} | <Grid item xs={4} s={4} md={4} lg={4} | ||||
@@ -298,7 +238,7 @@ const OrganizationCard = ({userData, id}) => { | |||||
<Grid container alignItems={"center"}> | <Grid container alignItems={"center"}> | ||||
<Grid item xs={4} s={4} md={4} lg={4} | <Grid item xs={4} s={4} md={4} lg={4} | ||||
sx={{ml: 3, mr: 3, display: 'flex', alignItems: 'center'}}> | sx={{ml: 3, mr: 3, display: 'flex', alignItems: 'center'}}> | ||||
fax No: | |||||
Fax No: | |||||
</Grid> | </Grid> | ||||
<Grid item xs={2}> | <Grid item xs={2}> | ||||
<TextField | <TextField | ||||
@@ -363,7 +303,7 @@ const OrganizationCard = ({userData, id}) => { | |||||
<Grid container alignItems={"top"}> | <Grid container alignItems={"top"}> | ||||
<Grid item xs={4} s={4} md={4} lg={4} | <Grid item xs={4} s={4} md={4} lg={4} | ||||
sx={{ml: 3, mr: 3, display: 'flex', alignItems: 'top'}}> | sx={{ml: 3, mr: 3, display: 'flex', alignItems: 'top'}}> | ||||
<Grid item lg={12} sx={{alignItems: 'center'}}>Adress :</Grid> | |||||
<Grid item lg={12} sx={{alignItems: 'center'}}>Address :</Grid> | |||||
</Grid> | </Grid> | ||||
<Grid item lg={6}> | <Grid item lg={6}> | ||||
<Grid item lg={12}> | <Grid item lg={12}> | ||||
@@ -18,7 +18,7 @@ import * as UrlUtils from "../../utils/ApiPathConst"; | |||||
// ==============================|| DASHBOARD - DEFAULT ||============================== // | // ==============================|| DASHBOARD - DEFAULT ||============================== // | ||||
const UserInformationCard_Individual = ({userData, loadDataFun}) => { | |||||
const UserInformationCard_Individual = ({userData,userFile, loadDataFun}) => { | |||||
const [currentUserData, setCurrentUserData] = useState(userData); | const [currentUserData, setCurrentUserData] = useState(userData); | ||||
const [editMode, setEditMode] = useState(false); | const [editMode, setEditMode] = useState(false); | ||||
@@ -57,38 +57,6 @@ const UserInformationCard_Individual = ({userData, loadDataFun}) => { | |||||
function onSubmitForm(_formData) { | function onSubmitForm(_formData) { | ||||
console.log(_formData); | |||||
// axios.post(UrlUtils.POST_PUBLIC_USER+"/"+userData.id,{ | |||||
// prefix: "1", | |||||
// enName: "Chan", | |||||
// chName: "Chan", | |||||
// idDocType: "Chan", | |||||
// contactTel: { | |||||
// countryCode:"Chan", | |||||
// phoneNumber: "Chan" | |||||
// }, | |||||
// identification: "Chan", | |||||
// faxNo:{ | |||||
// countryCode: "Chan", | |||||
// faxNumber: "Chan" | |||||
// }, | |||||
// emailAddress:"Chan", | |||||
// address:{ | |||||
// country:"Chan", | |||||
// addressLine1: "Chan", | |||||
// addressLine2: "Chan", | |||||
// addressLine3: "Chan", | |||||
// }, | |||||
// }).then( | |||||
// (response)=>{ | |||||
// if(response.status == 200) | |||||
// loadDataFun(); | |||||
// } | |||||
// ).catch(error => { | |||||
// console.log(error); | |||||
// }); | |||||
HttpUtils.post({ | HttpUtils.post({ | ||||
url: UrlUtils.POST_IND_USER+"/"+userData.id, | url: UrlUtils.POST_IND_USER+"/"+userData.id, | ||||
params: { | params: { | ||||
@@ -123,6 +91,15 @@ const UserInformationCard_Individual = ({userData, loadDataFun}) => { | |||||
setEditMode(true); | setEditMode(true); | ||||
}; | }; | ||||
const onVerifiedClick = () => { | |||||
HttpUtils.get({ | |||||
url: UrlUtils.GET_IND_USER_VERIFY+"/"+id, | |||||
onSuccess: function(){ | |||||
loadDataFun(); | |||||
} | |||||
}); | |||||
}; | |||||
const doLock = () => { | const doLock = () => { | ||||
HttpUtils.get({ | HttpUtils.get({ | ||||
url: UrlUtils.GET_USER_LOCK+"/"+userData.id, | url: UrlUtils.GET_USER_LOCK+"/"+userData.id, | ||||
@@ -141,39 +118,14 @@ const UserInformationCard_Individual = ({userData, loadDataFun}) => { | |||||
}); | }); | ||||
}; | }; | ||||
// const uploadFile = (event)=>{ | |||||
// HttpUtils.fileUpload( | |||||
// { | |||||
// refType:"identification", | |||||
// refId: currentUserData.id, | |||||
// file: event.target.files[0], | |||||
// onSuccess: (response)=>{ | |||||
// console.log(response); | |||||
// setOpen(true); | |||||
// } | |||||
// } | |||||
// ); | |||||
// }; | |||||
const downloadFile = ()=>{ | const downloadFile = ()=>{ | ||||
HttpUtils.fileDownload({ | HttpUtils.fileDownload({ | ||||
fileId: 1, | |||||
skey: "W6biVNvk50YVC2T6", | |||||
filename: "idCardSample.jpg" | |||||
fileId: userFile.fileId, | |||||
skey: userFile.skey, | |||||
filename: userFile.filename | |||||
}); | }); | ||||
}; | }; | ||||
{/* <input | |||||
accept="image/*" | |||||
//className={classes.input} | |||||
id="contained-button-file" | |||||
multiple | |||||
type="file" | |||||
onChange={uploadFile} | |||||
style={{display: 'none'}} | |||||
/> */} | |||||
return ( | return ( | ||||
<MainCard elevation={0} | <MainCard elevation={0} | ||||
border={false} | border={false} | ||||
@@ -375,6 +327,7 @@ const UserInformationCard_Individual = ({userData, loadDataFun}) => { | |||||
textTransform: 'capitalize', | textTransform: 'capitalize', | ||||
alignItems: 'end' | alignItems: 'end' | ||||
}} | }} | ||||
onClick={onVerifiedClick} | |||||
> | > | ||||
Verified | Verified | ||||
</Button> | </Button> | ||||
@@ -4,7 +4,6 @@ import {useEffect, useState} from "react"; | |||||
import * as React from "react"; | import * as React from "react"; | ||||
//import axios from "axios"; | //import axios from "axios"; | ||||
import * as HttpUtils from "../../utils/HttpUtils"; | import * as HttpUtils from "../../utils/HttpUtils"; | ||||
import {apiPath} from "../../auth/utils"; | |||||
import {useParams} from "react-router-dom"; | import {useParams} from "react-router-dom"; | ||||
import UserInformationCard from "./UserInformationCard_Individual"; | import UserInformationCard from "./UserInformationCard_Individual"; | ||||
import LoadingComponent from "../extra-pages/LoadingComponent"; | import LoadingComponent from "../extra-pages/LoadingComponent"; | ||||
@@ -16,6 +15,7 @@ import * as UrlUtils from "../../utils/ApiPathConst"; | |||||
const UserMaintainPage_Individual = () => { | const UserMaintainPage_Individual = () => { | ||||
const params = useParams(); | const params = useParams(); | ||||
const [userData, setUserData] = useState({}) | const [userData, setUserData] = useState({}) | ||||
const [userFile, setUserFile] = useState({}) | |||||
const [isLoading, setLoding] = useState(true); | const [isLoading, setLoding] = useState(true); | ||||
@@ -27,9 +27,10 @@ const UserMaintainPage_Individual = () => { | |||||
const loadData = ()=>{ | const loadData = ()=>{ | ||||
setLoding(true); | setLoding(true); | ||||
HttpUtils.get({ | HttpUtils.get({ | ||||
url: `${apiPath}${UrlUtils.GET_USER_PATH}/${params.id}`, | |||||
url: `${UrlUtils.GET_IND_USER_PATH}/${params.id}`, | |||||
onSuccess: function(response){ | onSuccess: function(response){ | ||||
setUserData(response.data) | |||||
setUserData(response.data); | |||||
setUserFile(response.userFile) | |||||
} | } | ||||
}); | }); | ||||
}; | }; | ||||
@@ -53,6 +54,7 @@ const UserMaintainPage_Individual = () => { | |||||
<Grid item xs={12} md={12} lg={12}> | <Grid item xs={12} md={12} lg={12}> | ||||
<UserInformationCard | <UserInformationCard | ||||
userData={userData} | userData={userData} | ||||
userFile={userFile} | |||||
loadDataFun={loadData} | loadDataFun={loadData} | ||||
/> | /> | ||||
</Grid> | </Grid> | ||||
@@ -15,7 +15,7 @@ export const GET_USER_LOCK = apiPath+'/user/lock'; | |||||
export const GET_USER_UNLOCK = apiPath+'/user/unlock'; | export const GET_USER_UNLOCK = apiPath+'/user/unlock'; | ||||
export const GET_IND_USER_PATH = apiPath+'/user/ind'; | export const GET_IND_USER_PATH = apiPath+'/user/ind'; | ||||
export const GET_IND_USER_VERiFY = apiPath+'/user/ind/verify'; | |||||
export const GET_IND_USER_VERIFY = apiPath+'/user/ind/verify'; | |||||
export const POST_IND_USER = apiPath+'/user/ind'; | export const POST_IND_USER = apiPath+'/user/ind'; | ||||
export const GET_ORG_USER_PATH = apiPath+'/user/org'; | export const GET_ORG_USER_PATH = apiPath+'/user/org'; | ||||