@@ -12,17 +12,21 @@ import {useTheme} from "@emotion/react"; | |||
import * as HttpUtils from "utils/HttpUtils"; | |||
import {useIntl} from "react-intl"; | |||
import {DEMAND_NOTE_LIST} from "utils/ApiPathConst"; | |||
// ==============================|| EVENT TABLE ||============================== // | |||
export default function SearchDemandNote({ recordList }) { | |||
const [rows, setRows] = React.useState(recordList); | |||
export default function SearchDemandNote({ searchCriteria }) { | |||
const intl = useIntl(); | |||
const theme = useTheme(); | |||
const isMdOrLg = useMediaQuery(theme.breakpoints.up('md')); | |||
const [_searchCriteria, set_searchCriteria] = React.useState(searchCriteria); | |||
React.useEffect(() => { | |||
setRows(recordList); | |||
}, [recordList]); | |||
set_searchCriteria(searchCriteria); | |||
}, [searchCriteria]); | |||
const onDownloadClick = (params) => () => { | |||
HttpUtils.fileDownload({ | |||
@@ -88,10 +92,13 @@ export default function SearchDemandNote({ recordList }) { | |||
<div style={{ height: '100%', width: '100%' }}> | |||
<Box sx={{ backgroundColor: "#fff", ml: 2 }} width="98%"> | |||
<FiDataGrid | |||
rows={rows} | |||
columns={columns} | |||
customPageSize={10} | |||
getRowHeight={() => 'auto'} | |||
doLoad={{ | |||
url: DEMAND_NOTE_LIST, | |||
params: _searchCriteria, | |||
}} | |||
/> | |||
</Box> | |||
</div> | |||
@@ -7,7 +7,7 @@ import { | |||
import MainCard from "components/MainCard"; | |||
import * as React from "react"; | |||
import * as UrlUtils from "utils/ApiPathConst"; | |||
import {GET_ORG_COMBO, GET_ISSUE_COMBO} from "utils/ApiPathConst"; | |||
import * as HttpUtils from "utils/HttpUtils"; | |||
import * as DateUtils from "utils/DateUtils"; | |||
@@ -32,7 +32,6 @@ const BackgroundHead = { | |||
const UserSearchPage_Individual = () => { | |||
const [record, setRecord] = React.useState([]); | |||
const [orgCombo, setOrgCombo] = React.useState([]); | |||
const [issueCombo, setIssueCombo] = React.useState([]); | |||
const [searchCriteria, setSearchCriteria] = React.useState({ | |||
@@ -42,32 +41,18 @@ const UserSearchPage_Individual = () => { | |||
const [onReady, setOnReady] = React.useState(false); | |||
React.useEffect(() => { | |||
getUserList(); | |||
getOrgCombo(); | |||
getIssueCombo(); | |||
}, []); | |||
React.useEffect(() => { | |||
setOnReady(true); | |||
}, [record]); | |||
React.useEffect(() => { | |||
getUserList(); | |||
}, [searchCriteria]); | |||
function getUserList() { | |||
HttpUtils.get({ | |||
url: UrlUtils.DEMAND_NOTE_LIST, | |||
params: searchCriteria, | |||
onSuccess: function (responseData) { | |||
setRecord(responseData); | |||
} | |||
}); | |||
} | |||
function getOrgCombo() { | |||
HttpUtils.get({ | |||
url: UrlUtils.GET_ORG_COMBO, | |||
url: GET_ORG_COMBO, | |||
onSuccess: function (responseData) { | |||
let combo = responseData; | |||
setOrgCombo(combo); | |||
@@ -77,7 +62,7 @@ const UserSearchPage_Individual = () => { | |||
function getIssueCombo() { | |||
HttpUtils.get({ | |||
url: UrlUtils.GET_ISSUE_COMBO, | |||
url: GET_ISSUE_COMBO, | |||
onSuccess: function (responseData) { | |||
let combo = responseData; | |||
setIssueCombo(combo); | |||
@@ -125,8 +110,7 @@ const UserSearchPage_Individual = () => { | |||
sx={{ backgroundColor: '#fff' }} | |||
> | |||
<EventTable | |||
recordList={record} | |||
reloadFun={getUserList} | |||
searchCriteria={searchCriteria} | |||
/> | |||
</MainCard> | |||
</Grid> | |||
@@ -11,16 +11,16 @@ import { FiDataGrid } from "components/FiDataGrid"; | |||
import {useTheme} from "@emotion/react"; | |||
import {useIntl} from "react-intl"; | |||
import { clickableLink } from 'utils/CommonFunction'; | |||
import {PAYMENT_LIST} from "utils/ApiPathConst"; | |||
// ==============================|| EVENT TABLE ||============================== // | |||
export default function SearchPublicNoticeTable({ recordList }) { | |||
const [rows, setRows] = React.useState(recordList); | |||
export default function SearchPublicNoticeTable({ searchCriteria }) { | |||
const navigate = useNavigate() | |||
const theme = useTheme(); | |||
const isMdOrLg = useMediaQuery(theme.breakpoints.up('md')); | |||
const intl = useIntl(); | |||
const { locale } = intl; | |||
const _sx = { | |||
padding: "4 2 4 2", | |||
boxShadow: 1, | |||
@@ -37,9 +37,11 @@ export default function SearchPublicNoticeTable({ recordList }) { | |||
} | |||
} | |||
const [_searchCriteria, set_searchCriteria] = React.useState(searchCriteria); | |||
React.useEffect(() => { | |||
setRows(recordList); | |||
}, [recordList]); | |||
set_searchCriteria(searchCriteria); | |||
}, [searchCriteria]); | |||
const handleEditDoubleClick = (params) =>{ | |||
navigate('/paymentPage/details/' + params.row.id); | |||
@@ -104,10 +106,13 @@ export default function SearchPublicNoticeTable({ recordList }) { | |||
<FiDataGrid | |||
sx={_sx} | |||
rowHeight={80} | |||
rows={rows} | |||
columns={columns} | |||
customPageSize={10} | |||
onRowDoubleClick={handleEditDoubleClick} | |||
doLoad={{ | |||
url: PAYMENT_LIST, | |||
params: _searchCriteria, | |||
}} | |||
/> | |||
</div> | |||
); | |||
@@ -5,9 +5,7 @@ import { | |||
Stack | |||
} from '@mui/material'; | |||
import MainCard from "components/MainCard"; | |||
import * as UrlUtils from "utils/ApiPathConst"; | |||
import * as React from "react"; | |||
import * as HttpUtils from "utils/HttpUtils"; | |||
import * as DateUtils from "utils/DateUtils"; | |||
import Loadable from 'components/Loadable'; | |||
@@ -30,8 +28,6 @@ const BackgroundHead = { | |||
// ==============================|| DASHBOARD - DEFAULT ||============================== // | |||
const Index = () => { | |||
const [record,setRecord] = React.useState([]); | |||
const [searchCriteria, setSearchCriteria] = React.useState({ | |||
dateTo: DateUtils.dateValue(new Date()), | |||
dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), | |||
@@ -40,23 +36,8 @@ const Index = () => { | |||
React.useEffect(() => { | |||
setOnReady(true); | |||
}, [record]); | |||
React.useEffect(() => { | |||
loadGrid(); | |||
}, [searchCriteria]); | |||
function loadGrid(){ | |||
HttpUtils.get({ | |||
url: UrlUtils.PAYMENT_LIST, | |||
params: searchCriteria, | |||
onSuccess: function(responseData){ | |||
setRecord(responseData); | |||
} | |||
}); | |||
} | |||
function applySearch(input) { | |||
setSearchCriteria(input); | |||
} | |||
@@ -94,7 +75,7 @@ const Index = () => { | |||
sx={{width: "-webkit-fill-available"}} | |||
> | |||
<EventTable | |||
recordList={record} | |||
searchCriteria={searchCriteria} | |||
/> | |||
</MainCard> | |||
</Grid> | |||
@@ -11,10 +11,10 @@ import { clickableLink } from 'utils/CommonFunction'; | |||
export default function SearchPublicNoticeTable({searchCriteria}) { | |||
const [_searchCriteria, set_searchCriteria] = React.useState({}); | |||
const navigate = useNavigate() | |||
const [_searchCriteria, set_searchCriteria] = React.useState({}); | |||
React.useEffect(() => { | |||
set_searchCriteria(searchCriteria); | |||
}, [searchCriteria]); | |||
@@ -6,6 +6,7 @@ import { | |||
import * as DateUtils from "utils/DateUtils"; | |||
import * as FormatUtils from "utils/FormatUtils" | |||
import * as ProofStatus from "utils/statusUtils/ProofStatus"; | |||
import { LIST_PROOF } from "utils/ApiPathConst"; | |||
import { useNavigate } from "react-router-dom"; | |||
import { FiDataGrid } from "components/FiDataGrid"; | |||
import { | |||
@@ -16,14 +17,20 @@ import {useIntl} from "react-intl"; | |||
import { clickableLink } from 'utils/CommonFunction'; | |||
// ==============================|| EVENT TABLE ||============================== // | |||
export default function SearchPublicNoticeTable({ recordList }) { | |||
const [rows, setRows] = React.useState(recordList); | |||
export default function SearchPublicNoticeTable({ searchCriteria }) { | |||
const navigate = useNavigate() | |||
const theme = useTheme(); | |||
const isMdOrLg = useMediaQuery(theme.breakpoints.up('md')); | |||
const intl = useIntl(); | |||
const { locale } = intl; | |||
const [_searchCriteria, set_searchCriteria] = React.useState(searchCriteria); | |||
React.useEffect(() => { | |||
set_searchCriteria(searchCriteria); | |||
}, [searchCriteria]); | |||
const _sx = { | |||
padding: "4 2 4 2", | |||
boxShadow: 1, | |||
@@ -40,10 +47,6 @@ export default function SearchPublicNoticeTable({ recordList }) { | |||
} | |||
} | |||
React.useEffect(() => { | |||
setRows(recordList); | |||
}, [recordList]); | |||
/*eslint no-irregular-whitespace: ["error", { "skipComments": true }]*/ | |||
/*const getGroupTitle = (title) => { | |||
@@ -176,11 +179,14 @@ export default function SearchPublicNoticeTable({ recordList }) { | |||
<FiDataGrid | |||
sx={_sx} | |||
rows={rows} | |||
columns={columns} | |||
customPageSize={10} | |||
getRowHeight={() => "auto"} | |||
onRowDoubleClick={handleRowDoubleClick} | |||
doLoad={{ | |||
url: LIST_PROOF, | |||
params: _searchCriteria, | |||
}} | |||
/> | |||
</div> | |||
); |
@@ -31,7 +31,6 @@ const BackgroundHead = { | |||
const UserSearchPage_Individual = () => { | |||
const [record,setRecord] = React.useState([]); | |||
const [issueCombo,setIssueCombo] = React.useState([]); | |||
const [searchCriteria, setSearchCriteria] = React.useState({ | |||
dateTo: DateUtils.dateValue(new Date()), | |||
@@ -45,21 +44,8 @@ const UserSearchPage_Individual = () => { | |||
React.useEffect(() => { | |||
setOnReady(true); | |||
}, [record]); | |||
React.useEffect(() => { | |||
loadGrid(); | |||
}, [searchCriteria]); | |||
function loadGrid(){ | |||
HttpUtils.get({ | |||
url: UrlUtils.LIST_PROOF, | |||
params: searchCriteria, | |||
onSuccess: function(responseData){ | |||
setRecord(responseData); | |||
} | |||
}); | |||
} | |||
function getIssueCombo(){ | |||
HttpUtils.get({ | |||
@@ -110,7 +96,7 @@ const UserSearchPage_Individual = () => { | |||
sx={{width: "-webkit-fill-available"}} | |||
> | |||
<EventTable | |||
recordList={record} | |||
searchCriteria={searchCriteria} | |||
/> | |||
</MainCard> | |||
</Grid> | |||
@@ -47,9 +47,6 @@ const PublicNoticeDetail_GLD = () => { | |||
const params = useParams(); | |||
const navigate = useNavigate() | |||
const [applicationDetailData, setApplicationDetailData] = useState({}); | |||
const [proofList, setProofList] = useState([]); | |||
const [paymentList, setPaymentList] = useState([]); | |||
// const [refApplicationDetailData, setRefApplicationDetailData] = React.useState({}); | |||
const [isLoading, setLoading] = useState(false); | |||
const LoadingComponent = Loadable(lazy(() => import('../../extra-pages/LoadingComponent'))); | |||
const [getUploadStatus, setUploadStatus] = useState(false); | |||
@@ -116,8 +113,6 @@ const PublicNoticeDetail_GLD = () => { | |||
setIssueNum(" No. " + gazetteIssueDetail.issueNo); | |||
setIssueDate(DateUtils.dateFormat(gazetteIssueDetail.issueDate, "D MMM YYYY (ddd)")); | |||
setGroupNo(response.data.data.groupNo); | |||
setProofList(response.data.proofList); | |||
setPaymentList(response.data.paymentList); | |||
setLoading(false); | |||
} | |||
}) | |||
@@ -398,9 +393,7 @@ const PublicNoticeDetail_GLD = () => { | |||
<Grid item xs={12} md={12} lg={12} xl={12}> | |||
<Box xs={12} sx={{ ml: 2, mt: 3, mr: { sm: 2 }, borderRadius: '10px', width: { xs: '92vw', sm: '96.5vw', md: "auto" }, backgroundColor: '#ffffff' }}> | |||
<TabTableDetail | |||
applicationDetailData={applicationDetailData} | |||
proofList={proofList} | |||
paymentList={paymentList} | |||
appId={params?.id} | |||
/> | |||
</Box> | |||
<br /> | |||
@@ -9,11 +9,11 @@ import * as DateUtils from "utils/DateUtils" | |||
import * as PaymentStatus from "utils/statusUtils/PaymentStatus" | |||
import {useTheme} from "@emotion/react"; | |||
import { clickableLink } from 'utils/CommonFunction'; | |||
import {GET_PUBLIC_NOTICE_APPLY_DETAIL_PAYMENT } from "utils/ApiPathConst" | |||
// import * as StatusUtils from "./PublicNoteStatusUtils"; | |||
// ==============================|| EVENT TABLE ||============================== // | |||
export default function SubmittedTab({ rows }) { | |||
export default function SubmittedTab({ appId, setCount }) { | |||
const theme = useTheme(); | |||
const isMdOrLg = useMediaQuery(theme.breakpoints.up('md')); | |||
@@ -63,9 +63,15 @@ export default function SubmittedTab({ rows }) { | |||
<> | |||
<div style={{ height:'20%', width: '98%' }}> | |||
<FiDataGrid | |||
rows={rows} | |||
columns={columns} | |||
customPageSize={5} | |||
customPageSize={10} | |||
doLoad={React.useMemo(() => ({ | |||
url: GET_PUBLIC_NOTICE_APPLY_DETAIL_PAYMENT+"/"+appId, | |||
params: {}, | |||
callback: function (responseData) { | |||
setCount(responseData?.count); | |||
} | |||
}), [appId])} | |||
/> | |||
</div> | |||
</> | |||
@@ -12,19 +12,19 @@ import * as ProofStatus from "utils/statusUtils/ProofStatus"; | |||
import {FiDataGrid} from "components/FiDataGrid"; | |||
import * as FormatUtils from "utils/FormatUtils" | |||
import * as HttpUtils from "utils/HttpUtils" | |||
import * as UrlUtils from "utils/ApiPathConst" | |||
import {GET_PUBLIC_NOTICE_APPLY_DETAIL_PROOF,GEN_GAZETTE_PROOF } from "utils/ApiPathConst" | |||
import {useTheme} from "@emotion/react"; | |||
import { clickableLink } from 'utils/CommonFunction'; | |||
// ==============================|| EVENT TABLE ||============================== // | |||
export default function ProofTab({rows}) { | |||
export default function ProofTab({appId, setCount}) { | |||
const theme = useTheme(); | |||
const isMdOrLg = useMediaQuery(theme.breakpoints.up('md')); | |||
const onDownloadClick = (params) => () => { | |||
HttpUtils.fileDownload({ | |||
url: UrlUtils.GEN_GAZETTE_PROOF+"/"+params.row.id, | |||
url: GEN_GAZETTE_PROOF+"/"+params?.row?.id, | |||
}); | |||
}; | |||
@@ -102,9 +102,15 @@ export default function ProofTab({rows}) { | |||
return ( | |||
<div style={{height:'20%', width: '98%'}}> | |||
<FiDataGrid | |||
rows={rows} | |||
columns={columns} | |||
customPageSize={5} | |||
customPageSize={10} | |||
doLoad={React.useMemo(() => ({ | |||
url: GET_PUBLIC_NOTICE_APPLY_DETAIL_PROOF+"/"+appId, | |||
params: {}, | |||
callback: function (responseData) { | |||
setCount(responseData?.count); | |||
} | |||
}), [appId])} | |||
/> | |||
</div> | |||
); | |||
@@ -10,9 +10,11 @@ import * as StatusUtils from "utils/statusUtils/PublicNoteStatusUtils"; | |||
import {useTheme} from "@emotion/react"; | |||
import {useMediaQuery} from "@mui/material"; | |||
import {GET_PUBLIC_NOTICE_APPLY_DETAIL_STATUS_HISTORY } from "utils/ApiPathConst" | |||
// ==============================|| EVENT TABLE ||============================== // | |||
export default function StatusHistoryTab({rows}) { | |||
export default function StatusHistoryTab({appId, setCount}) { | |||
const theme = useTheme(); | |||
const isMdOrLg = useMediaQuery(theme.breakpoints.up('md')); | |||
@@ -50,9 +52,15 @@ export default function StatusHistoryTab({rows}) { | |||
return ( | |||
<div style={{height:'20%', width: '98%'}}> | |||
<FiDataGrid | |||
rows={rows} | |||
columns={columns} | |||
customPageSize={5} | |||
customPageSize={10} | |||
doLoad={{ | |||
url: GET_PUBLIC_NOTICE_APPLY_DETAIL_STATUS_HISTORY+"/"+appId, | |||
params: {}, | |||
callback: function (responseData) { | |||
setCount(responseData?.count); | |||
} | |||
}} | |||
/> | |||
</div> | |||
); | |||
@@ -13,90 +13,66 @@ import * as React from "react"; | |||
import Loadable from 'components/Loadable'; | |||
import { lazy } from 'react'; | |||
const StatusHistoryTab = Loadable(lazy(() => import('./StatusHistoryTab'))); | |||
const LoadingComponent = Loadable(lazy(() => import('../../../extra-pages/LoadingComponent'))); | |||
const ProofTab = Loadable(lazy(() => import('./ProofTab'))); | |||
const PaymentTab = Loadable(lazy(() => import('./PaymentTab'))); | |||
// const ProofTab = Loadable(lazy(() => import('./ProofTab'))); | |||
// const PaymentTab = Loadable(lazy(() => import('./PaymentTab'))); | |||
// const StatusHistoryTab = Loadable(lazy(() => import('./StatusHistoryTab'))); | |||
import ProofTab from './ProofTab'; | |||
import PaymentTab from './PaymentTab'; | |||
import StatusHistoryTab from './StatusHistoryTab'; | |||
// ==============================|| DASHBOARD - DEFAULT ||============================== // | |||
const PublicNotice = ({ applicationDetailData, proofList, paymentList }) => { | |||
const [_proofList, setProofList] = React.useState([]); | |||
const [_paymentList, setPaymentList] = React.useState([]); | |||
const PublicNotice = ({ appId }) => { | |||
const [proofCount, setProofCount] = React.useState(0); | |||
const [paymentCount, setPaymentCount] = React.useState(0); | |||
const [statusHistoryCount, setStatusHistoryCount] = React.useState(0); | |||
const [onReady, setOnReady] = React.useState(false); | |||
const [selectedTab, setSelectedTab] = React.useState("1"); | |||
// const navigate = useNavigate(); | |||
const [statusHistoryList, setStatusHistoryList] = React.useState([]); | |||
const reloadPage = () => { | |||
window.location.reload(false); | |||
} | |||
React.useEffect(() => { | |||
if (Object.keys(applicationDetailData).length > 0) { | |||
setStatusHistoryList(applicationDetailData.statusHistoryList); | |||
} | |||
}, [applicationDetailData]); | |||
React.useEffect(() => { | |||
setProofList(proofList); | |||
}, [proofList]); | |||
React.useEffect(() => { | |||
setPaymentList(paymentList); | |||
}, [paymentList]); | |||
React.useEffect(() => { | |||
//if state data are ready and assign to different field | |||
if (statusHistoryList.length > 0) { | |||
setOnReady(true); | |||
} | |||
}, [statusHistoryList]); | |||
// useEffect(() => { | |||
// setLoding(false); | |||
// }, [submittedList]); | |||
setOnReady(true); | |||
}, [appId]); | |||
const handleChange = (event, newValue) => { | |||
setSelectedTab(newValue); | |||
} | |||
// const onBtnClick = () => { | |||
// navigate('/publicNotice/apply') | |||
// } | |||
return ( | |||
!onReady ? | |||
<LoadingComponent /> | |||
: | |||
<Grid container sx={{ minHeight: '40vh'}}> | |||
<Grid container sx={{ minHeight: '40vh' }}> | |||
{/*col 2*/} | |||
<Grid item xs={12}> | |||
<TabContext value={selectedTab}> | |||
<Box sx={{ borderBottom: 1, borderColor: 'divider', overflowX: 'auto' }}> | |||
<Box sx={{ borderBottom: 1, borderColor: 'divider', overflowX: 'auto' }}> | |||
<TabList onChange={handleChange} aria-label="lab API tabs example"> | |||
<Tab label={"Proof (" + _proofList?.length + ") "} value="1" /> | |||
<Tab label={"Payment (" + _paymentList.length + ") "} value="2" /> | |||
<Tab label={"Status History (" + statusHistoryList.length + ") "} value="3" /> | |||
<Tab label={"Proof (" + proofCount + ") "} value="1" /> | |||
<Tab label={"Payment (" + paymentCount + ") "} value="2" /> | |||
<Tab label={"Status History (" + statusHistoryCount + ") "} value="3" /> | |||
</TabList> | |||
</Box> | |||
<TabPanel value="1" sx={{p:0}}> | |||
<TabPanel value="1" sx={{ p: 0 }}> | |||
<ProofTab | |||
rows={_proofList} | |||
reloadFunction={reloadPage} | |||
setCount={setProofCount} | |||
appId={appId} | |||
/> | |||
</TabPanel> | |||
<TabPanel value="2" sx={{p:0}}> | |||
<TabPanel value="2" sx={{ p: 0 }}> | |||
<PaymentTab | |||
rows={_paymentList} | |||
reloadFunction={reloadPage} | |||
setCount={setPaymentCount} | |||
appId={appId} | |||
/> | |||
</TabPanel> | |||
<TabPanel value="3" sx={{p:0}}> | |||
<TabPanel value="3" sx={{ p: 0 }}> | |||
<StatusHistoryTab | |||
rows={statusHistoryList} | |||
reloadFunction={reloadPage} | |||
setCount={setStatusHistoryCount} | |||
appId={appId} | |||
/> | |||
</TabPanel> | |||
</TabContext> | |||
@@ -191,9 +191,7 @@ const DashboardDefault = () => { | |||
/> | |||
</Box> | |||
</Grid> | |||
</Grid> | |||
</Grid> | |||
</Grid> | |||
); | |||
@@ -8,7 +8,7 @@ import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' | |||
import Checkbox from '@mui/material/Checkbox'; | |||
import * as React from "react"; | |||
import * as HttpUtils from "utils/HttpUtils"; | |||
import * as UrlUtils from "utils/ApiPathConst"; | |||
import {GET_PUBLIC_ORG_USER_LIST, GET_USER_UNLOCK, GET_SET_PRIMARY_USER, GET_SET_UN_PRIMARY_USER} from "utils/ApiPathConst"; | |||
import * as DateUtils from "utils/DateUtils"; | |||
import { FormattedMessage, useIntl } from "react-intl"; | |||
import { useTheme } from "@emotion/react"; | |||
@@ -28,7 +28,6 @@ const BackgroundHead = { | |||
const ManageOrgUserPage = () => { | |||
const [rows, setRows] = React.useState([]); | |||
const intl = useIntl(); | |||
const theme = useTheme(); | |||
const isMdOrLg = useMediaQuery(theme.breakpoints.up('md')); | |||
@@ -53,28 +52,24 @@ const ManageOrgUserPage = () => { | |||
} | |||
} | |||
const [_searchCriteria, set_searchCriteria] = React.useState({}); | |||
const [reloadTime, setReloadTime] = React.useState(new Date()); | |||
React.useEffect(() => { | |||
setUserId(JSON.parse(localStorage.getItem("userData")).id); | |||
loadData(); | |||
}, []); | |||
React.useEffect(() => { | |||
_searchCriteria["reloadTime"] = reloadTime; | |||
set_searchCriteria(_searchCriteria); | |||
}, [reloadTime]); | |||
function loadData() { | |||
HttpUtils.get( | |||
{ | |||
url: UrlUtils.GET_PUBLIC_ORG_USER_LIST, | |||
onSuccess: function (responseData) { | |||
setRows(responseData); | |||
} | |||
} | |||
); | |||
} | |||
function onActiveClick(params) { | |||
HttpUtils.get({ | |||
url: UrlUtils.GET_USER_UNLOCK + "/" + params.row.id, | |||
url: GET_USER_UNLOCK + "/" + params.row.id, | |||
onSuccess: () => { | |||
loadData(); | |||
setReloadTime(new Date); | |||
} | |||
}); | |||
} | |||
@@ -112,9 +107,9 @@ const ManageOrgUserPage = () => { | |||
setIsWarningPopUp(false) | |||
HttpUtils.get( | |||
{ | |||
url: (!selectUser.row.primaryUser ? UrlUtils.GET_SET_PRIMARY_USER : UrlUtils.GET_SET_UN_PRIMARY_USER) + "/" + selectUser.row.id, | |||
url: (!selectUser.row.primaryUser ? GET_SET_PRIMARY_USER : GET_SET_UN_PRIMARY_USER) + "/" + selectUser.row.id, | |||
onSuccess: function () { | |||
loadData(); | |||
setReloadTime(new Date); | |||
} | |||
} | |||
); | |||
@@ -241,9 +236,12 @@ const ManageOrgUserPage = () => { | |||
<Grid item lg={12} sx={{ padding: 2 }}> | |||
<FiDataGrid | |||
sx={_sx} | |||
rows={rows} | |||
columns={columns} | |||
customPageSize={10} | |||
doLoad={{ | |||
url: GET_PUBLIC_ORG_USER_LIST, | |||
params: _searchCriteria, | |||
}} | |||
/> | |||
</Grid> | |||
<div> | |||
@@ -110,6 +110,9 @@ export const POST_ADMIN_USER_REGISTER = apiPath+'/user/registry'; | |||
export const DELETE_USER = apiPath+'/user'; | |||
export const GET_LOGIN_LOG_LIST = apiPath+'/user/loginLogList'; | |||
export const GET_PUBLIC_NOTICE_APPLY_DETAIL = apiPath+'/application/application-detail'; | |||
export const GET_PUBLIC_NOTICE_APPLY_DETAIL_STATUS_HISTORY = apiPath+'/application/application-detail/status-history'; | |||
export const GET_PUBLIC_NOTICE_APPLY_DETAIL_PROOF = apiPath+'/application/application-detail/proof'; | |||
export const GET_PUBLIC_NOTICE_APPLY_DETAIL_PAYMENT = apiPath+'/application/application-detail/payment'; | |||
export const SET_PUBLIC_NOTICE_GROUP_DETAIL = apiPath+'/application/application-group-detail'; | |||
export const SET_PUBLIC_NOTICE_STATUS_NOT_ACCEPT = apiPath+'/application/application-detail-status-not-accept'; | |||
export const SET_PUBLIC_NOTICE_STATUS_CANCELLED = apiPath+'/application/application-detail-status-cancelled'; | |||