diff --git a/src/components/cards/AuthFooter.js b/src/components/cards/AuthFooter.js index 304e729..cdd64c2 100644 --- a/src/components/cards/AuthFooter.js +++ b/src/components/cards/AuthFooter.js @@ -50,8 +50,9 @@ const AuthFooter = () => { W3C WAI Web Content Accessibility Guidelines 2.0"/> - logo + title="Brand Hong Kong"> + logo diff --git a/src/pages/OrganizationDetailPage/OrganizationCard.js b/src/pages/OrganizationDetailPage/OrganizationCard.js index 453801a..6523de4 100644 --- a/src/pages/OrganizationDetailPage/OrganizationCard.js +++ b/src/pages/OrganizationDetailPage/OrganizationCard.js @@ -1,6 +1,6 @@ // material-ui import { - Grid, Button, Checkbox,FormControlLabel + Grid, Button, Checkbox, FormControlLabel, Typography } from '@mui/material'; // import { FormControlLabel } from '@material-ui/core'; import MainCard from "../../components/MainCard"; @@ -129,7 +129,7 @@ const OrganizationCard = ({ userData, loadDataFun, id }) => { <> {createMode ? <> - + {/*col 1*/} - + + + +
-
{/*col 2*/} diff --git a/src/pages/OrganizationSearchPage/index.js b/src/pages/OrganizationSearchPage/index.js index dc4a221..a68e5be 100644 --- a/src/pages/OrganizationSearchPage/index.js +++ b/src/pages/OrganizationSearchPage/index.js @@ -1,10 +1,10 @@ // material-ui import { - Grid, Typography + Grid, Typography, Stack } from '@mui/material'; import MainCard from "../../components/MainCard"; -import {useEffect, useState} from "react"; +import { useEffect, useState } from "react"; import * as UrlUtils from "../../utils/ApiPathConst"; import * as React from "react"; import * as HttpUtils from "../../utils/HttpUtils"; @@ -17,12 +17,22 @@ import { lazy } from 'react'; const LoadingComponent = Loadable(lazy(() => import('../extra-pages/LoadingComponent'))); const SearchForm = Loadable(lazy(() => import('./OrganizationSearchForm'))); const EventTable = Loadable(lazy(() => import('./OrganizationTable'))); +import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' +const BackgroundHead = { + backgroundImage: `url(${titleBackgroundImg})`, + width: '100%', + height: '100%', + backgroundSize:'contain', + backgroundRepeat: 'no-repeat', + backgroundColor: '#0C489E', + backgroundPosition: 'right' +} // ==============================|| DASHBOARD - DEFAULT ||============================== // const OrganizationSearchPage = () => { - const [record,setRecord] = useState([]); + const [record, setRecord] = useState([]); const [searchCriteria, setSearchCriteria] = useState({}); const [onReady, setOnReady] = useState(false); @@ -38,11 +48,11 @@ const OrganizationSearchPage = () => { getUserList(); }, [searchCriteria]); - function getUserList(){ + function getUserList() { HttpUtils.get({ url: UrlUtils.GET_ORG_PATH, params: searchCriteria, - onSuccess: function(responseData){ + onSuccess: function (responseData) { setRecord(responseData); } }); @@ -54,29 +64,32 @@ const OrganizationSearchPage = () => { return ( !onReady ? - + : - - - View Organization + + +
+ + View Organization + +
+
+ {/*row 1*/} + + + + {/*row 2*/} + + + + +
- - {/*row 1*/} - - - - {/*row 2*/} - - - - - -
); }; diff --git a/src/pages/Proof/Reply_GLD/ApplicationDetails.js b/src/pages/Proof/Reply_GLD/ApplicationDetails.js index 73c5830..6e1c1c2 100644 --- a/src/pages/Proof/Reply_GLD/ApplicationDetails.js +++ b/src/pages/Proof/Reply_GLD/ApplicationDetails.js @@ -16,7 +16,7 @@ const MainCard = Loadable(React.lazy(() => import('components/MainCard'))); import * as StatusUtils from "utils/statusUtils/PublicNoteStatusUtils"; import FileList from "components/FileList" // ==============================|| DASHBOARD - DEFAULT ||============================== // -const ApplicationDetailCard = ({ formData, }) => { +const ApplicationDetailCard = ({ formData, setBackButtonPos }) => { const params = useParams(); @@ -63,10 +63,14 @@ const ApplicationDetailCard = ({ formData, }) => { minimumFractionDigits: 2 }); } - + + React.useEffect(()=>{ + if (document.getElementById("applicationDetailsMainCard")) setBackButtonPos(`${document.getElementById("applicationDetailsMainCard")?.getBoundingClientRect().left / 2}px`) + },[document.getElementById("applicationDetailsMainCard")]) return ( - diff --git a/src/pages/Proof/Reply_GLD/index.js b/src/pages/Proof/Reply_GLD/index.js index 7c08a54..5106a94 100644 --- a/src/pages/Proof/Reply_GLD/index.js +++ b/src/pages/Proof/Reply_GLD/index.js @@ -3,7 +3,8 @@ import { Grid, Typography, Stack, - Box + Box, + Button } from '@mui/material'; import * as UrlUtils from "utils/ApiPathConst"; import * as React from "react"; @@ -11,6 +12,7 @@ import * as HttpUtils from "utils/HttpUtils"; import * as DateUtils from "utils/DateUtils"; import { useParams } from "react-router-dom"; import { useNavigate } from "react-router-dom"; +import KeyboardBackspaceOutlinedIcon from '@mui/icons-material/KeyboardBackspaceOutlined'; import Loadable from 'components/Loadable'; const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent'))); @@ -36,11 +38,11 @@ const Index = () => { const [record, setRecord] = React.useState(); const [onReady, setOnReady] = React.useState(false); - React.useEffect(() => { + React.useLayoutEffect(() => { loadForm(); }, []); - React.useEffect(() => { + React.useLayoutEffect(() => { setOnReady(true); }, [record]); @@ -80,6 +82,26 @@ const Index = () => { return Array(+(zero > 0 && zero)).join("0") + num; } + // calculate back button position + + // const applicationDetailsRef = React.useCallback(node => { + // if (node === null) { + // return + // } else { + // setBackButtonLeftPos(`${node.getBoundingClientRect()?.left}px`) + // } + // }) + + const [backButtonPos, setBackButtonPos] = React.useState() + const backButtonRef = React.useRef() + React.useLayoutEffect(()=>{ + // console.log(applicationDetailsRef.current?.getBoundingClientRect()) + if (backButtonRef.current) backButtonRef.current.style.marginLeft = `${backButtonPos}` + },[backButtonPos]) + + // React.useEffect(()=>{ + // if (backButtonRef.current) backButtonRef.current.style.marginLeft = `${backButtonLeftPos}` + // }, [backButtonLeftPos]) return ( !onReady ? @@ -94,13 +116,20 @@ const Index = () => {
+ + + {/*row 1*/}
- + import('./StatusChangeDialog'))); import * as DateUtils from "utils/DateUtils"; import { notifyActionSuccess, notifySaveSuccess } from "utils/CommonFunction"; - +import KeyboardBackspaceOutlinedIcon from '@mui/icons-material/KeyboardBackspaceOutlined'; +import { useNavigate } from "react-router-dom"; // ==============================|| Body - DEFAULT ||============================== // const PublicNoticeDetail_GLD = () => { const params = useParams(); - // const navigate = useNavigate() + const navigate = useNavigate() const [applicationDetailData, setApplicationDetailData] = useState({}); const [proofList, setProofList] = useState([]); // const [refApplicationDetailData, setRefApplicationDetailData] = React.useState({}); @@ -319,6 +321,12 @@ const PublicNoticeDetail_GLD = () => { + + + {title} diff --git a/src/pages/User/DetailPage/UserAuthTable.js b/src/pages/User/DetailPage/UserAuthTable.js index ed5c6ce..2f53a39 100644 --- a/src/pages/User/DetailPage/UserAuthTable.js +++ b/src/pages/User/DetailPage/UserAuthTable.js @@ -19,7 +19,24 @@ export default function UserAuthTable({setSelectedRow, userAuth,isNewRecord}) { const [authData, setAuthData] = useState([]); const [onReady, setOnReady] = useState(false); const [currentSelectedRow, setCurrentSelectedRow] = useState(userAuth); - + const _sx = { + ml: 3, + mb: 3, + mr: 3, + padding: "4 2 4 2", + boxShadow: 1, + border: 1, + borderColor: '#DDD', + '& .MuiDataGrid-cell': { + borderTop: 1, + borderBottom: 1, + borderColor: "#EEE" + }, + '& .MuiDataGrid-footerContainer': { + border: 1, + borderColor: "#EEE" + } + } useEffect(() => { axios.get(`${apiPath}${GET_AUTH_LIST}`) .then((response) => { @@ -78,6 +95,7 @@ export default function UserAuthTable({setSelectedRow, userAuth,isNewRecord}) { setCurrentSelectedRow(ids); }} autoHeight + sx={_sx} /> ); diff --git a/src/pages/User/DetailPage/UserAuthorityCard.js b/src/pages/User/DetailPage/UserAuthorityCard.js index 360d720..deef5ed 100644 --- a/src/pages/User/DetailPage/UserAuthorityCard.js +++ b/src/pages/User/DetailPage/UserAuthorityCard.js @@ -4,7 +4,7 @@ import { } from '@mui/material'; import MainCard from "../../../components/MainCard"; import * as React from "react"; -import {useEffect, useState} from "react"; +import { useEffect, useState } from "react"; import Loadable from 'components/Loadable'; import { lazy } from 'react'; @@ -16,7 +16,7 @@ const LoadingComponent = Loadable(lazy(() => import('../../extra-pages/LoadingCo // ==============================|| DASHBOARD - DEFAULT ||============================== // -const UserAuthorityCard = ({isCollectData, updateUserAuthList,userData,isNewRecord}) => { +const UserAuthorityCard = ({ isCollectData, updateUserAuthList, userData, isNewRecord }) => { const [currentAuthData, setCurrentAuthData] = React.useState({}); const [onReady, setOnReady] = useState(false); const [selectedRow, setSelectedRow] = useState([]); @@ -44,13 +44,13 @@ const UserAuthorityCard = ({isCollectData, updateUserAuthList,userData,isNewReco return ( !onReady ? - + : - + User Authority @@ -59,6 +59,7 @@ const UserAuthorityCard = ({isCollectData, updateUserAuthList,userData,isNewReco setSelectedRow={setSelectedRow} isNewRecord={isNewRecord} /> +
); }; diff --git a/src/pages/User/DetailPage/UserGroupCard.js b/src/pages/User/DetailPage/UserGroupCard.js index bab3c8f..d926c95 100644 --- a/src/pages/User/DetailPage/UserGroupCard.js +++ b/src/pages/User/DetailPage/UserGroupCard.js @@ -49,7 +49,7 @@ const UserGroupCard = ({isCollectData, updateUserGroupList,userData,isNewRecord} border={false} content={false} > - + Group(s) +
); }; diff --git a/src/pages/User/DetailPage/UserGroupTable.js b/src/pages/User/DetailPage/UserGroupTable.js index b4b6fab..060499c 100644 --- a/src/pages/User/DetailPage/UserGroupTable.js +++ b/src/pages/User/DetailPage/UserGroupTable.js @@ -17,6 +17,25 @@ export default function UserGroupTable({setSelectedRow, userGroup,isNewRecord}) const [groupData, setGroupData] = useState([]); const [onReady, setOnReady] = useState(false); const [currentSelectedRow, setCurrentSelectedRow] = useState(userGroup); + + const _sx = { + ml: 3, + mb: 3, + mr: 3, + padding: "4 2 4 2", + boxShadow: 1, + border: 1, + borderColor: '#DDD', + '& .MuiDataGrid-cell': { + borderTop: 1, + borderBottom: 1, + borderColor: "#EEE" + }, + '& .MuiDataGrid-footerContainer': { + border: 1, + borderColor: "#EEE" + } + } useEffect(() => { axios.get(`${apiPath}${GET_GROUP_COMBO_PATH}`) @@ -71,6 +90,7 @@ export default function UserGroupTable({setSelectedRow, userGroup,isNewRecord}) setCurrentSelectedRow(ids); }} autoHeight + sx={_sx} /> ); diff --git a/src/pages/User/DetailPage/UserInformationCard.js b/src/pages/User/DetailPage/UserInformationCard.js index 5346bab..265d9dc 100644 --- a/src/pages/User/DetailPage/UserInformationCard.js +++ b/src/pages/User/DetailPage/UserInformationCard.js @@ -68,17 +68,16 @@ const UserInformationCard = ({isCollectData, updateUserObject,userData,isNewReco border={false} content={false} > - + Information -
- + + sx={{ml: 3, mr: 3, display: 'flex', alignItems: 'center'}}> Username: diff --git a/src/pages/User/DetailPage/index.js b/src/pages/User/DetailPage/index.js index 543f91e..e8d8f76 100644 --- a/src/pages/User/DetailPage/index.js +++ b/src/pages/User/DetailPage/index.js @@ -1,15 +1,16 @@ // material-ui import { Button, - Grid, + Grid, Typography, - Stack + Stack, + Box, } from '@mui/material'; -import {useEffect, useState} from "react"; +import { useEffect, useState } from "react"; import * as React from "react"; import axios from "axios"; -import {useNavigate,useParams} from "react-router-dom"; -import {GLD_USER_PATH,DELETE_USER,POST_ADMIN_USER_REGISTER} from "../../../utils/ApiPathConst"; +import { useNavigate, useParams } from "react-router-dom"; +import { GLD_USER_PATH, DELETE_USER, POST_ADMIN_USER_REGISTER } from "../../../utils/ApiPathConst"; import Loadable from 'components/Loadable'; import { lazy } from 'react'; @@ -23,7 +24,18 @@ import { notifyDeleteSuccess, notifySaveSuccess, } from "../../../utils/CommonFunction"; +import KeyboardBackspaceOutlinedIcon from '@mui/icons-material/KeyboardBackspaceOutlined'; +import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' +const BackgroundHead = { + backgroundImage: `url(${titleBackgroundImg})`, + width: '100%', + height: '100%', + backgroundSize: 'contain', + backgroundRepeat: 'no-repeat', + backgroundColor: '#0C489E', + backgroundPosition: 'right' +} // ==============================|| DASHBOARD - DEFAULT ||============================== // @@ -34,8 +46,8 @@ const UserMaintainPage = () => { const [onReady, setOnReady] = useState(false); const [isCollectData, setIsCollectData] = useState(false); const [editedCustomerData, setEditedCustomerData] = useState({}); - const [userGroupData,setUserGroupData] = useState([]); - const [userAuthData,setUserAuthData] = useState([]); + const [userGroupData, setUserGroupData] = useState([]); + const [userAuthData, setUserAuthData] = useState([]); const [userConfirm, setUserConfirm] = useState(false); const [isNewRecord, setIsNewRecord] = useState(false); const [refUserData, setRefUserData] = React.useState({}); @@ -45,11 +57,11 @@ const UserMaintainPage = () => { setEditedCustomerData(userData); } - function updateUserGroupList(userGroupData){ + function updateUserGroupList(userGroupData) { setUserGroupData(userGroupData); } - function updateUserAuthList(userAuthData){ + function updateUserAuthList(userAuthData) { setUserAuthData(userAuthData); } @@ -68,7 +80,7 @@ const UserMaintainPage = () => { setIsWindowOpen(true); }; - function deleteData(){ + function deleteData() { axios.delete(`${DELETE_USER}/${params.id}`, ) .then((response) => { @@ -83,10 +95,10 @@ const UserMaintainPage = () => { return false; }); } -// ==============================|| DELETE WINDOW RELATED ||============================== // + // ==============================|| DELETE WINDOW RELATED ||============================== // useEffect(() => { - if(params.id > 0 ){ + if (params.id > 0) { axios.get(`${GLD_USER_PATH}/${params.id}`) .then((response) => { if (response.status === 200) { @@ -99,7 +111,7 @@ const UserMaintainPage = () => { return false; }); } - else{ + else { setUserData( { "authIds": [], @@ -123,18 +135,18 @@ const UserMaintainPage = () => { if (Object.keys(userData).length > 0 && userData !== undefined) { setOnReady(true); } - else if(isNewRecord){ + else if (isNewRecord) { setOnReady(true); } }, [userData]); useEffect(() => { - if(userConfirm && onReady){ - const deletedUserAuth = getDeletedRecordWithRefList(refUserData.authIds,userAuthData); - const deletedUserGroup = getDeletedRecordWithRefList(refUserData.groupIds,userGroupData); + if (userConfirm && onReady) { + const deletedUserAuth = getDeletedRecordWithRefList(refUserData.authIds, userAuthData); + const deletedUserGroup = getDeletedRecordWithRefList(refUserData.groupIds, userGroupData); // console.log(userGroupData) // console.log(userAuthData) - if( parseInt(params.id) >= -1){ + if (parseInt(params.id) >= -1) { axios.post(`${GLD_USER_PATH}/${params.id}`, { "enName": editedCustomerData.enName, @@ -157,8 +169,8 @@ const UserMaintainPage = () => { .catch(error => { console.log(error); return false; - }); - }else{ + }); + } else { axios.post(POST_ADMIN_USER_REGISTER, { "username": editedCustomerData.username, @@ -182,58 +194,72 @@ const UserMaintainPage = () => { .catch(error => { console.log(error); return false; - }); + }); } } setUserConfirm(false); - }, [editedCustomerData,userGroupData,userAuthData]); + }, [editedCustomerData, userGroupData, userAuthData]); return ( !onReady ? - + : - - - - Maintain User - + + +
+ + {isNewRecord ? "Create GLD User" : "Maintain GLD User"} + +
+
+ + {/*col 1*/} - + + + - - + + + + {/*col 2*/} - + + + {/*bottom button*/} - + - + {/*col 1*/} - + + + - - - Files - - - - + + + + Files + + + + +
+
{/*col 2*/} diff --git a/src/pages/User/DetailsPage_Organization/UserInformationCard_Organization.js b/src/pages/User/DetailsPage_Organization/UserInformationCard_Organization.js index 4296384..7141b28 100644 --- a/src/pages/User/DetailsPage_Organization/UserInformationCard_Organization.js +++ b/src/pages/User/DetailsPage_Organization/UserInformationCard_Organization.js @@ -165,22 +165,20 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => setIsConfirmPopUp(true); }; - return ( - {!onReady? - - : + {!onReady ? + + : {/*top button*/} - + - {editMode ? <> @@ -236,6 +234,9 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => {/*end top button*/}
+ + Organization User Details + {FieldUtils.getTextField({ @@ -312,8 +313,8 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => ); return displayOptions; }, - getOptionLabel: (item) => item ? typeof item === 'number' ? item + "" : (item["brNo"] ? -
BR No.: {item["brNo"]}
Org. Name(Eng): {item["enCompanyName"] === null ? "N/A" : item["enCompanyName"]}
Org. Name(CH): {item["chCompanyName"] === null ? "N/A" : item["chCompanyName"]}
: "") + getOptionLabel: (item) => item ? typeof item === 'number' ? item + "" : (item["brNo"] ? +
BR No.: {item["brNo"]}
Org. Name(Eng): {item["enCompanyName"] === null ? "N/A" : item["enCompanyName"]}
Org. Name(CH): {item["chCompanyName"] === null ? "N/A" : item["chCompanyName"]}
: "") : "", isOptionEqualToValue: (option, newValue, setValue, setInputValue) => { if (option.id == newValue || option.id == newValue.id) { @@ -324,7 +325,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => return option == newValue || option.id == newValue.id; }, onInputChange: (event, newValue, setInputValue) => { - if (newValue !== "[object Object]" ) { + if (newValue !== "[object Object]") { setInputValue(newValue); } }, @@ -449,28 +450,18 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) =>
} - } - - -
-
+
- - + - - - Organization - - - {currentUserData.orgId==null? + {currentUserData.orgId == null ? - :null + : null } - + + + Organization + + {FieldUtils.getTextField({ label: "Org.Name (English):", @@ -587,7 +582,6 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) =>
- ); }; diff --git a/src/pages/User/DetailsPage_Organization/index.js b/src/pages/User/DetailsPage_Organization/index.js index 4702a12..8197803 100644 --- a/src/pages/User/DetailsPage_Organization/index.js +++ b/src/pages/User/DetailsPage_Organization/index.js @@ -1,10 +1,10 @@ // material-ui -import {Grid, Typography} from '@mui/material'; -import {useEffect, useState} from "react"; +import { Grid, Typography, Stack, Box, Button } from '@mui/material'; +import { useEffect, useState } from "react"; import * as React from "react"; //import axios from "axios"; import * as HttpUtils from "../../../utils/HttpUtils"; -import {useParams} from "react-router-dom"; +import { useParams } from "react-router-dom"; import FileList from "../../../components/FileList" import MainCard from "../../../components/MainCard"; import * as UrlUtils from "../../../utils/ApiPathConst"; @@ -14,74 +14,105 @@ import Loadable from 'components/Loadable'; import { lazy } from 'react'; const LoadingComponent = Loadable(lazy(() => import('../../extra-pages/LoadingComponent'))); const UserInformationCard = Loadable(lazy(() => import('./UserInformationCard_Organization'))); - +import KeyboardBackspaceOutlinedIcon from '@mui/icons-material/KeyboardBackspaceOutlined'; +import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' +import { useNavigate } from 'react-router-dom'; + +const BackgroundHead = { + backgroundImage: `url(${titleBackgroundImg})`, + width: '100%', + height: '100%', + backgroundSize: 'contain', + backgroundRepeat: 'no-repeat', + backgroundColor: '#0C489E', + backgroundPosition: 'right' +} // ==============================|| DASHBOARD - DEFAULT ||============================== // const UserMaintainPage_Organization = () => { const params = useParams(); - const [userData, setUserData] = useState({}) - const [orgData, setOrgData] = useState({}) + const navigate = useNavigate(); + const [userData, setUserData] = useState({}) + const [orgData, setOrgData] = useState({}) const [isLoading, setLoding] = useState(true); + const _sx = { + ml: 3, + mb: 3, + mr: 3, + padding: "4 2 4 2", + boxShadow: 1, + border: 1, + borderColor: '#DDD', + '& .MuiDataGrid-cell': { + borderTop: 1, + borderBottom: 1, + borderColor: "#EEE" + }, + '& .MuiDataGrid-footerContainer': { + border: 1, + borderColor: "#EEE" + } + } - useEffect(()=>{ + useEffect(() => { // console.log(userData); loadData(); - },[]); + }, []); // const reloadPage=()=>{ // window.location.reload(false); // } - const loadData = ()=>{ + const loadData = () => { setLoding(true); HttpUtils.get({ url: `${UrlUtils.GET_ORG_USER_PATH}/${params.id}`, - onSuccess: function(response){ + onSuccess: function (response) { console.log(response) - if(response.data.orgId !=null){ + if (response.data.orgId != null) { response.data["addressBus"] = response.orgDetail.data["addressTemp"]; response.data["contactTel"] = response.orgDetail.data["contactTel"]; response.data["faxNo"] = response.orgDetail.data["faxNo"]; - response.data["brExpiryDate"] = response.orgDetail.data.brExpiryDate?DateUtils.dateStr(response.orgDetail.data.brExpiryDate):""; + response.data["brExpiryDate"] = response.orgDetail.data.brExpiryDate ? DateUtils.dateStr(response.orgDetail.data.brExpiryDate) : ""; response.data["brNo"] = response.orgDetail.data.brNo; response.data["enCompanyName"] = response.orgDetail.data.enCompanyName; response.data["chCompanyName"] = response.orgDetail.data.chCompanyName; response.data["chCompanyName"] = response.orgDetail.data.chCompanyName; - }else{ + } else { response.data["addressBus"] = JSON.parse(response.data["addressBus"]); response.data["contactTel"] = JSON.parse(response.data["contactTel"]); response.data["faxNo"] = JSON.parse(response.data["faxNo"]); - response.data["brExpiryDate"] = response.data.brExpiryDate?DateUtils.dateStr(response.data.brExpiryDate):""; + response.data["brExpiryDate"] = response.data.brExpiryDate ? DateUtils.dateStr(response.data.brExpiryDate) : ""; } let createDate = DateUtils.datetimeStr(response.data.created); - let modifiedBy = DateUtils.datetimeStr(response.data.modified)+", "+response.data.modifiedBy; + let modifiedBy = DateUtils.datetimeStr(response.data.modified) + ", " + response.data.modifiedBy; response.data["createDate"] = createDate; response.data["modifieDate"] = modifiedBy; - response.data["verifiedStatus"] = response.data.verifiedBy? DateUtils.datetimeStr(response.data.verifiedDate)+", "+response.data.verifiedByName: "Not verified"; - - response.data["lastLoginDate"] = response.data.lastLogin?DateUtils.datetimeStr(response.data.lastLoginDate):""; - + response.data["verifiedStatus"] = response.data.verifiedBy ? DateUtils.datetimeStr(response.data.verifiedDate) + ", " + response.data.verifiedByName : "Not verified"; + + response.data["lastLoginDate"] = response.data.lastLogin ? DateUtils.datetimeStr(response.data.lastLoginDate) : ""; + response.data["country"] = response.data.addressBus?.country; response.data["district"] = response.data.addressBus?.district; response.data["addressLine1"] = response.data.addressBus?.addressLine1; response.data["addressLine2"] = response.data.addressBus?.addressLine2; response.data["addressLine3"] = response.data.addressBus?.addressLine3; - + response.data["phoneNumber"] = response.data.contactTel?.phoneNumber; response.data["tel_countryCode"] = response.data.contactTel?.countryCode; - + response.data["faxNumber"] = response.data.faxNo?.faxNumber; response.data["fax_countryCode"] = response.data.faxNo?.countryCode; - + //response.data["orgId"] = response.data.brExpiryDate?DateUtils.dateStr(response.data.brExpiryDate):""; - + setUserData(response.data); setOrgData(response.orgList); } @@ -90,37 +121,53 @@ const UserMaintainPage_Organization = () => { useEffect(() => { - setLoding(false); + setLoding(false); }, [userData]); return ( isLoading ? - + : - - - Organization User Details + + +
+ + Maintain Organization User + +
+
+ + {/*col 1*/} - + + +
+
- - - Files - - - + + + + Files + + + + +
diff --git a/src/pages/User/SearchPage/UserSearchForm.js b/src/pages/User/SearchPage/UserSearchForm.js index aef1307..7adf346 100644 --- a/src/pages/User/SearchPage/UserSearchForm.js +++ b/src/pages/User/SearchPage/UserSearchForm.js @@ -6,21 +6,22 @@ import { Typography } from '@mui/material'; import MainCard from "../../../components/MainCard"; -import {useForm} from "react-hook-form"; +import { useForm } from "react-hook-form"; import { // useEffect, - useState} from "react"; + useState +} from "react"; import Checkbox from "@mui/material/Checkbox"; import * as React from "react"; import AddCircleOutlineIcon from '@mui/icons-material/AddCircleOutline'; -import {useNavigate} from "react-router"; +import { useNavigate } from "react-router"; // ==============================|| DASHBOARD - DEFAULT ||============================== // -const UserSearchForm = ({applySearch}) => { +const UserSearchForm = ({ applySearch }) => { const navigate = useNavigate(); const [type, setType] = useState([]); @@ -32,7 +33,7 @@ const UserSearchForm = ({applySearch}) => { let typeArray = []; - for(let i =0; i < type.length; i++){ + for (let i = 0; i < type.length; i++) { typeArray.push(type[i].label); } @@ -48,21 +49,22 @@ const UserSearchForm = ({applySearch}) => { }; - function resetForm(){ + function resetForm() { setType([]); setLocked(false); reset(); } - const handleNewUserClick = (id) => { + const handleNewUserClick = () => { // console.log(id) - navigate('/user/'+ id); + navigate('/user/-1'); + // navigate('/user/' + id); }; return ( + border={false} + content={false}> {/*row 1*/} @@ -74,7 +76,7 @@ const UserSearchForm = ({applySearch}) => { {/*row 2*/} - + { /> - + { /> - + { /> - + { /> - + { /> - + { - - + - - - + + + - + - +