@@ -95,7 +95,7 @@ export function FiDataGrid({ rows, columns, sx, autoHeight, | |||
if (customPageSize) { | |||
setPageSize(customPageSize); | |||
} | |||
console.log(_doLoad) | |||
// console.log(_doLoad) | |||
if (_doLoad !== undefined && Object.keys(_doLoad).length==0 ){ | |||
setLoading(false) | |||
if (applyGridOnReady !== undefined){ | |||
@@ -109,9 +109,13 @@ function Header(props) { | |||
</Typography> | |||
</Link> | |||
</li> | |||
<li> | |||
<Link className="application" to='/application/search'><Typography style={{ opacity: 0.9 }} variant={"pnspsHeaderTitle"} sx={{ ml: 1 }}>Application</Typography></Link> | |||
</li> | |||
{ | |||
isGrantedAny(["VIEW_APPLICATION", "MAINTAIN_APPLICATION"]) ? | |||
<li> | |||
<Link className="application" to='/application/search'><Typography style={{ opacity: 0.9 }} variant={"pnspsHeaderTitle"} sx={{ ml: 1 }}>Application</Typography></Link> | |||
</li> | |||
: <></> | |||
} | |||
{ | |||
isGrantedAny(["VIEW_PROOF", "MAINTAIN_PROOF"]) ? | |||
<li> | |||
@@ -198,12 +202,12 @@ function Header(props) { | |||
} | |||
{ | |||
isGrantedAny(["VIEW_USER", "MAINTAIN_USER", "VIEW_ORG", "MAINTAIN_ORG", "VIEW_GROUP", "MAINTAIN_GROUP"]) ? | |||
isGrantedAny(["VIEW_USER", "MAINTAIN_USER", "VIEW_ORG", "MAINTAIN_ORG", "VIEW_GROUP", "MAINTAIN_GROUP", "VIEW_GLD_USER", "VIEW_IND_USER", "VIEW_ORG_USER", "MAINTAIN_GLD_USER", "MAINTAIN_IND_USER", "MAINTAIN_ORG_USER"]) ? | |||
<li> | |||
<Link className="client" ><Typography style={{ opacity: 0.9 }} variant={"pnspsHeaderTitle"} sx={{ ml: 1 }}>Client</Typography><KeyboardArrowDownIcon sx={{ fontSize: '1vw' }} /></Link> | |||
<ul className='dropdown'> | |||
{ | |||
isGrantedAny(["VIEW_USER", "MAINTAIN_USER"]) ? | |||
isGrantedAny(["VIEW_USER","MAINTAIN_USER"]) ? | |||
<> | |||
<li> | |||
<Link className="userSearchview" to='/userSearchview'><Typography style={{ opacity: 0.9 }} variant={"pnspsHeaderTitle"} sx={{ ml: 2, mt: 1, mb: 1 }}>Users (GLD)</Typography></Link> | |||
@@ -216,9 +220,27 @@ function Header(props) { | |||
</li> | |||
</> | |||
: | |||
<></> | |||
<> | |||
{ | |||
isGrantedAny(["VIEW_GLD_USER" ,"MAINTAIN_GLD_USER"]) ? | |||
<li> | |||
<Link className="userSearchview" to='/userSearchview'><Typography style={{ opacity: 0.9 }} variant={"pnspsHeaderTitle"} sx={{ ml: 2, mt: 1, mb: 1 }}>Users (GLD)</Typography></Link> | |||
</li> : <></> | |||
} | |||
{ | |||
isGrantedAny(["VIEW_IND_USER", "MAINTAIN_IND_USER"]) ? | |||
<li> | |||
<Link className="indUser" to='/indUser'><Typography style={{ opacity: 0.9 }} variant={"pnspsHeaderTitle"} sx={{ ml: 2, mt: 1, mb: 1 }}>Users (Individual)</Typography></Link> | |||
</li> : <></> | |||
} | |||
{ | |||
isGrantedAny(["VIEW_ORG_USER", "MAINTAIN_ORG_USER"]) ? | |||
<li> | |||
<Link className="orgUser" to='/orgUser'><Typography style={{ opacity: 0.9 }} variant={"pnspsHeaderTitle"} sx={{ ml: 2, mt: 1, mb: 1 }}>Users (Organisation)</Typography></Link> | |||
</li> : <></> | |||
} | |||
</> | |||
} | |||
{ | |||
isGrantedAny(["VIEW_ORG", "MAINTAIN_ORG"]) ? | |||
<li> | |||
@@ -227,7 +249,6 @@ function Header(props) { | |||
: | |||
<></> | |||
} | |||
{ | |||
isGrantedAny(["VIEW_GROUP", "MAINTAIN_GROUP"]) ? | |||
<li> | |||
@@ -256,7 +277,7 @@ function Header(props) { | |||
</Link> | |||
</li> | |||
{ | |||
isGranted("MAINTAIN_GAZETTE_ISSUE") ? | |||
isGranted("VIEW_GAZETTE_ISSUE", "MAINTAIN_GAZETTE_ISSUE") ? | |||
<> | |||
<li> | |||
<Link className="holidaySetting" to='/setting/holiday'><Typography style={{ opacity: 0.9 }} variant={"pnspsHeaderTitle"} sx={{ ml: 2, mt: 1, mb: 1 }}>Holiday Settings</Typography></Link> | |||
@@ -31,6 +31,7 @@ import {PNSPS_LONG_BUTTON_THEME} from "themes/buttonConst"; | |||
import {ThemeProvider} from "@emotion/react"; | |||
import { dateStr_Year } from "utils/DateUtils"; | |||
import { notifySaveSuccess } from 'utils/CommonFunction'; | |||
import { isGrantedAny } from "auth/utils"; | |||
// ==============================|| DASHBOARD - DEFAULT ||============================== // | |||
@@ -192,35 +193,37 @@ const Index = () => { | |||
/> | |||
</Grid> | |||
} | |||
<Grid item xs={12} md={12} lg={6} width="100%"> | |||
<Stack direction="row" justifyContent="flex-start" alignItems="center" spacing={2} sx={{ml:2,mt:1}} > | |||
<ThemeProvider theme={PNSPS_LONG_BUTTON_THEME}> | |||
<input | |||
id="uploadFileBtn" | |||
name="file" | |||
type="file" | |||
accept=".xlsx" | |||
style={{ display: 'none' }} | |||
disabled={waitImport} | |||
onChange={(event) => { | |||
readFile(event) | |||
}} | |||
/> | |||
<label htmlFor="uploadFileBtn"> | |||
<Button | |||
component="span" | |||
variant="contained" | |||
size="large" | |||
{isGrantedAny(["MAINTAIN_GAZETTE_ISSUE"]) ? | |||
<Grid item xs={12} md={12} lg={6} width="100%"> | |||
<Stack direction="row" justifyContent="flex-start" alignItems="center" spacing={2} sx={{ml:2,mt:1}} > | |||
<ThemeProvider theme={PNSPS_LONG_BUTTON_THEME}> | |||
<input | |||
id="uploadFileBtn" | |||
name="file" | |||
type="file" | |||
accept=".xlsx" | |||
style={{ display: 'none' }} | |||
disabled={waitImport} | |||
> | |||
<Typography variant="h5">Upload Files</Typography> | |||
</Button> | |||
</label> | |||
</ThemeProvider> | |||
</Stack> | |||
</Grid> | |||
onChange={(event) => { | |||
readFile(event) | |||
}} | |||
/> | |||
<label htmlFor="uploadFileBtn"> | |||
<Button | |||
component="span" | |||
variant="contained" | |||
size="large" | |||
disabled={waitImport} | |||
> | |||
<Typography variant="h5">Upload Files</Typography> | |||
</Button> | |||
</label> | |||
</ThemeProvider> | |||
</Stack> | |||
</Grid> | |||
:null | |||
} | |||
{/*row 1*/} | |||
<Grid item xs={12} md={12} lg={12} width="100%"> | |||
<SearchForm | |||
@@ -32,6 +32,7 @@ import {PNSPS_LONG_BUTTON_THEME} from "themes/buttonConst"; | |||
import {ThemeProvider} from "@emotion/react"; | |||
import { dateStr_Year } from "utils/DateUtils"; | |||
import { notifySaveSuccess } from 'utils/CommonFunction'; | |||
import { isGrantedAny } from "auth/utils"; | |||
// ==============================|| DASHBOARD - DEFAULT ||============================== // | |||
@@ -194,31 +195,32 @@ const Index = () => { | |||
</Button> | |||
</label> | |||
</ThemeProvider> | |||
<ThemeProvider theme={PNSPS_LONG_BUTTON_THEME}> | |||
<input | |||
id="uploadFileBtn" | |||
name="file" | |||
type="file" | |||
accept=".xlsx" | |||
style={{ display: 'none' }} | |||
disabled={waitImport} | |||
onChange={(event) => { | |||
readFile(event) | |||
}} | |||
/> | |||
<label htmlFor="uploadFileBtn"> | |||
<Button | |||
component="span" | |||
variant="contained" | |||
size="large" | |||
{isGrantedAny(["MAINTAIN_GAZETTE_ISSUE"]) ? | |||
<ThemeProvider theme={PNSPS_LONG_BUTTON_THEME}> | |||
<input | |||
id="uploadFileBtn" | |||
name="file" | |||
type="file" | |||
accept=".xlsx" | |||
style={{ display: 'none' }} | |||
disabled={waitImport} | |||
> | |||
<Typography variant="h5">Upload Files</Typography> | |||
</Button> | |||
</label> | |||
</ThemeProvider> | |||
onChange={(event) => { | |||
readFile(event) | |||
}} | |||
/> | |||
<label htmlFor="uploadFileBtn"> | |||
<Button | |||
component="span" | |||
variant="contained" | |||
size="large" | |||
disabled={waitImport} | |||
> | |||
<Typography variant="h5">Upload Files</Typography> | |||
</Button> | |||
</label> | |||
</ThemeProvider> | |||
:null | |||
} | |||
</Stack> | |||
</Grid> | |||
@@ -32,6 +32,7 @@ import EditNoteIcon from '@mui/icons-material/EditNote'; | |||
import DownloadIcon from '@mui/icons-material/Download'; | |||
import ReplayIcon from '@mui/icons-material/Replay'; | |||
import { notifyDownloadSuccess } from 'utils/CommonFunction'; | |||
import { isGrantedAny } from "auth/utils"; | |||
// ==============================|| DASHBOARD - DEFAULT ||============================== // | |||
const ApplicationDetailCard = ( | |||
@@ -196,116 +197,101 @@ const ApplicationDetailCard = ( | |||
content={false} | |||
> | |||
{verified && currentApplicationDetailData.status !== "notAccepted" ? | |||
<Grid container spacing={4} direction="row"> | |||
<Grid item xs={12} md={4} > | |||
<Stack | |||
direction="row" | |||
justifyContent="flex-start" | |||
alignItems="center" | |||
spacing={2} | |||
mb={2} | |||
> | |||
{currentApplicationDetailData.status === "reviewed" && isGranted("MAINTAIN_PROOF") ? | |||
<Button | |||
// size="large" | |||
variant="contained" | |||
onClick={() => { onProofClick() }} | |||
sx={{ | |||
textTransform: 'capitalize', | |||
alignItems: 'end' | |||
}}> | |||
<EditNoteIcon /> | |||
<Typography ml={1} variant="h5"> Create Proof</Typography> | |||
</Button> : | |||
null | |||
} | |||
</Stack> | |||
</Grid> | |||
<Grid item xs={12} md={8} > | |||
<Stack | |||
direction="row" | |||
justifyContent="flex-start" | |||
alignItems="center" | |||
spacing={2} | |||
mb={2} | |||
> | |||
{ | |||
!(orgDetail?.creditor) && currentApplicationDetailData.creditor && currentApplicationDetailData.status === "published" ? | |||
<> | |||
<Button | |||
variant="contained" | |||
onClick={paidClick()} | |||
sx={{ | |||
textTransform: 'capitalize', | |||
alignItems: 'end', | |||
}}> | |||
<DoneIcon /> | |||
<Typography ml={1} variant="h5">Paid</Typography> | |||
</Button> | |||
</> | |||
: | |||
<></> | |||
} | |||
{currentApplicationDetailData.status === "submitted" || currentApplicationDetailData.status == "reviewed" ? | |||
<> | |||
isGrantedAny("MAINTAIN_APPLICATION") ? | |||
<Grid container spacing={4} direction="row"> | |||
<Grid item xs={12} md={4} > | |||
<Stack | |||
direction="row" | |||
justifyContent="flex-start" | |||
alignItems="center" | |||
spacing={2} | |||
mb={2} | |||
> | |||
{currentApplicationDetailData.status === "reviewed" && isGranted("MAINTAIN_PROOF") ? | |||
<Button | |||
// size="large" | |||
variant="contained" | |||
onClick={reSubmitClick()} | |||
color="orange" | |||
> | |||
<ReplayIcon /> | |||
<Typography ml={1} variant="h5"> Re-Submit</Typography> | |||
</Button> | |||
{ | |||
proofId == null || proofId == 0? | |||
onClick={() => { onProofClick() }} | |||
sx={{ | |||
textTransform: 'capitalize', | |||
alignItems: 'end' | |||
}}> | |||
<EditNoteIcon /> | |||
<Typography ml={1} variant="h5"> Create Proof</Typography> | |||
</Button> : | |||
null | |||
} | |||
</Stack> | |||
</Grid> | |||
<Grid item xs={12} md={8} > | |||
<Stack | |||
direction="row" | |||
justifyContent="flex-start" | |||
alignItems="center" | |||
spacing={2} | |||
mb={2} | |||
> | |||
{ | |||
!(orgDetail?.creditor) && currentApplicationDetailData.creditor && currentApplicationDetailData.status === "published" ? | |||
<> | |||
<Button | |||
// size="large" | |||
variant="contained" | |||
onClick={notAcceptedClick()} | |||
color="error" | |||
onClick={paidClick()} | |||
sx={{ | |||
textTransform: 'capitalize', | |||
alignItems: 'end', | |||
}}> | |||
<CloseIcon /> | |||
<Typography ml={1} variant="h5">Not Accept</Typography> | |||
<DoneIcon /> | |||
<Typography ml={1} variant="h5">Paid</Typography> | |||
</Button> | |||
: | |||
null | |||
} | |||
</> : | |||
(currentApplicationDetailData.status == "confirmed" && currentApplicationDetailData.creditor == 1) ? | |||
</> | |||
: | |||
<></> | |||
} | |||
{currentApplicationDetailData.status === "submitted" || currentApplicationDetailData.status == "reviewed" ? | |||
<> | |||
<Button | |||
// size="large" | |||
variant="contained" | |||
onClick={doPublish()} | |||
disabled={setCompleteDisable()} | |||
sx={{ | |||
textTransform: 'capitalize', | |||
alignItems: 'end', | |||
backgroundColor: '#52b202' | |||
}}> | |||
<DoneIcon /> | |||
<Typography ml={1} variant="h5">Publish</Typography> | |||
</Button> | |||
<Button | |||
// size="large" | |||
variant="contained" | |||
onClick={withdrawnClick()} | |||
sx={{ | |||
textTransform: 'capitalize', | |||
alignItems: 'end', | |||
backgroundColor: '#ffa733' | |||
}}> | |||
<CloseIcon /> | |||
<Typography ml={1} variant="h5">Withdraw</Typography> | |||
onClick={reSubmitClick()} | |||
color="orange" | |||
> | |||
<ReplayIcon /> | |||
<Typography ml={1} variant="h5"> Re-Submit</Typography> | |||
</Button> | |||
</> | |||
: | |||
(currentApplicationDetailData.status == "confirmed" && currentApplicationDetailData.creditor == 0) ? | |||
{ | |||
proofId == null || proofId == 0? | |||
<Button | |||
// size="large" | |||
variant="contained" | |||
onClick={notAcceptedClick()} | |||
color="error" | |||
sx={{ | |||
textTransform: 'capitalize', | |||
alignItems: 'end', | |||
}}> | |||
<CloseIcon /> | |||
<Typography ml={1} variant="h5">Not Accept</Typography> | |||
</Button> | |||
: | |||
null | |||
} | |||
</> : | |||
(currentApplicationDetailData.status == "confirmed" && currentApplicationDetailData.creditor == 1) ? | |||
<> | |||
<Button | |||
// size="large" | |||
variant="contained" | |||
onClick={doPublish()} | |||
disabled={setCompleteDisable()} | |||
sx={{ | |||
textTransform: 'capitalize', | |||
alignItems: 'end', | |||
backgroundColor: '#52b202' | |||
}}> | |||
<DoneIcon /> | |||
<Typography ml={1} variant="h5">Publish</Typography> | |||
</Button> | |||
<Button | |||
// size="large" | |||
variant="contained" | |||
@@ -320,56 +306,74 @@ const ApplicationDetailCard = ( | |||
</Button> | |||
</> | |||
: | |||
( | |||
(currentApplicationDetailData.status == "paid" && currentApplicationDetailData.creditor == 0) ? | |||
<> | |||
<Button | |||
// size="large" | |||
variant="contained" | |||
onClick={revokeClick()} | |||
disabled={currentApplicationDetailData.paymentMethod == "online" || currentApplicationDetailData.paymentMethod == null} | |||
sx={{ | |||
textTransform: 'capitalize', | |||
alignItems: 'end', | |||
backgroundColor: '#ffa733' | |||
}}> | |||
<ReplayIcon /> | |||
<Typography ml={1} variant="h5">Revoke Payment</Typography> | |||
</Button> | |||
<Button | |||
// size="large" | |||
variant="contained" | |||
onClick={complatedClick()} | |||
disabled={setCompleteDisable()} | |||
sx={{ | |||
textTransform: 'capitalize', | |||
alignItems: 'end', | |||
backgroundColor: '#52b202' | |||
}}> | |||
<DoneIcon /> | |||
<Typography ml={1} variant="h5">Publish</Typography> | |||
</Button> | |||
<Button | |||
// size="large" | |||
variant="contained" | |||
onClick={withdrawnClick()} | |||
sx={{ | |||
textTransform: 'capitalize', | |||
alignItems: 'end', | |||
backgroundColor: '#ffa733' | |||
}}> | |||
<CloseIcon /> | |||
<Typography ml={1} variant="h5">Withdraw</Typography> | |||
</Button> | |||
</> : null | |||
) | |||
} | |||
</Stack> | |||
</Grid> | |||
</Grid> : null | |||
(currentApplicationDetailData.status == "confirmed" && currentApplicationDetailData.creditor == 0) ? | |||
<> | |||
<Button | |||
// size="large" | |||
variant="contained" | |||
onClick={withdrawnClick()} | |||
sx={{ | |||
textTransform: 'capitalize', | |||
alignItems: 'end', | |||
backgroundColor: '#ffa733' | |||
}}> | |||
<CloseIcon /> | |||
<Typography ml={1} variant="h5">Withdraw</Typography> | |||
</Button> | |||
</> | |||
: | |||
( | |||
(currentApplicationDetailData.status == "paid" && currentApplicationDetailData.creditor == 0) ? | |||
<> | |||
<Button | |||
// size="large" | |||
variant="contained" | |||
onClick={revokeClick()} | |||
disabled={currentApplicationDetailData.paymentMethod == "online" || currentApplicationDetailData.paymentMethod == null} | |||
sx={{ | |||
textTransform: 'capitalize', | |||
alignItems: 'end', | |||
backgroundColor: '#ffa733' | |||
}}> | |||
<ReplayIcon /> | |||
<Typography ml={1} variant="h5">Revoke Payment</Typography> | |||
</Button> | |||
<Button | |||
// size="large" | |||
variant="contained" | |||
onClick={complatedClick()} | |||
disabled={setCompleteDisable()} | |||
sx={{ | |||
textTransform: 'capitalize', | |||
alignItems: 'end', | |||
backgroundColor: '#52b202' | |||
}}> | |||
<DoneIcon /> | |||
<Typography ml={1} variant="h5">Publish</Typography> | |||
</Button> | |||
<Button | |||
// size="large" | |||
variant="contained" | |||
onClick={withdrawnClick()} | |||
sx={{ | |||
textTransform: 'capitalize', | |||
alignItems: 'end', | |||
backgroundColor: '#ffa733' | |||
}}> | |||
<CloseIcon /> | |||
<Typography ml={1} variant="h5">Withdraw</Typography> | |||
</Button> | |||
</> : null | |||
) | |||
} | |||
</Stack> | |||
</Grid> | |||
</Grid> | |||
: null | |||
: null | |||
} | |||
<Typography variant="h4" xs={12} md={12} sx={{ mb: 2, borderBottom: "1px solid black" }}> | |||
Application Details | |||
@@ -145,7 +145,7 @@ const ClientDetailCard = ( | |||
content={false} | |||
sx={{ xs: "12", md: "7" }}> | |||
{isGrantedAny(["VIEW_USER", "MAINTAIN_USER"]) ? | |||
{isGrantedAny(["VIEW_USER", "MAINTAIN_USER", "VIEW_IND_USER", "VIEW_ORG_USER", "MAINTAIN_IND_USER", "MAINTAIN_ORG_USER"]) ? | |||
<Grid container spacing={1} direction="row"> | |||
<Grid item xs={12} md={7} > | |||
<Stack | |||
@@ -19,7 +19,7 @@ import Loadable from 'components/Loadable'; | |||
const LoadingComponent = Loadable(lazy(() => import('../../extra-pages/LoadingComponent'))); | |||
import * as DateUtils from "utils/DateUtils"; | |||
import EditNoteIcon from '@mui/icons-material/EditNote'; | |||
import { isGrantedAny } from "auth/utils"; | |||
// ==============================|| DASHBOARD - DEFAULT ||============================== // | |||
const GazetteDetailCard = ( | |||
{ applicationDetailData, | |||
@@ -89,31 +89,34 @@ const GazetteDetailCard = ( | |||
content={false} | |||
> | |||
{verified && currentStatus != "notAccepted" ? | |||
<Grid container spacing={4} direction="row"> | |||
<Grid item xs={12} md={4} > | |||
<Stack | |||
direction="row" | |||
justifyContent="space-between" | |||
alignItems="center" | |||
spacing={2} | |||
mb={2} | |||
> | |||
<Button | |||
// size="large" | |||
variant="contained" | |||
onClick={groupDetailClick()} | |||
disabled={applicationDetailData.data.status != "submitted" && applicationDetailData.data.status != "reviewed"} | |||
sx={{ | |||
textTransform: 'capitalize', | |||
alignItems: 'end' | |||
}}> | |||
<EditNoteIcon /> | |||
<Typography variant="h5" ml={1}> Gen Gazette Code</Typography> | |||
</Button> | |||
</Stack> | |||
isGrantedAny("MAINTAIN_APPLICATION") ? | |||
<Grid container spacing={4} direction="row"> | |||
<Grid item xs={12} md={4} > | |||
<Stack | |||
direction="row" | |||
justifyContent="space-between" | |||
alignItems="center" | |||
spacing={2} | |||
mb={2} | |||
> | |||
<Button | |||
// size="large" | |||
variant="contained" | |||
onClick={groupDetailClick()} | |||
disabled={applicationDetailData.data.status != "submitted" && applicationDetailData.data.status != "reviewed"} | |||
sx={{ | |||
textTransform: 'capitalize', | |||
alignItems: 'end' | |||
}}> | |||
<EditNoteIcon /> | |||
<Typography variant="h5" ml={1}> Gen Gazette Code</Typography> | |||
</Button> | |||
</Stack> | |||
</Grid> | |||
</Grid> | |||
</Grid> | |||
: null} | |||
: null | |||
: null | |||
} | |||
<Typography variant="h5" sx={{ mb: 2, borderBottom: "1px solid black" }}> | |||
Gazette Details | |||
</Typography> | |||
@@ -18,6 +18,8 @@ import { FiDataGrid } from "components/FiDataGrid"; | |||
import { notifyActionSuccess, clickableLink } from 'utils/CommonFunction'; | |||
import { FormattedMessage, useIntl } from "react-intl"; | |||
import * as utils from "auth/utils" | |||
import { isGrantedAny } from "auth/utils"; | |||
// ==============================|| EVENT TABLE ||============================== // | |||
export default function SearchPublicNoticeTable({ searchCriteria, applyGridOnReady }) { | |||
@@ -161,14 +163,17 @@ export default function SearchPublicNoticeTable({ searchCriteria, applyGridOnRea | |||
return (<> | |||
<div style={{ width: '100%' }}> | |||
<Grid container direction="row" justifyContent="flex-start" alignItems="center" sx={{ p: 1 }} > | |||
<Button | |||
variant="contained" | |||
onClick={() => setIsConfirmPopUp(true)} | |||
> | |||
Published | |||
</Button> | |||
</Grid> | |||
{isGrantedAny(["MAINTAIN_APPLICATION"]) ? | |||
<Grid container direction="row" justifyContent="flex-start" alignItems="center" sx={{ p: 1 }} > | |||
<Button | |||
variant="contained" | |||
onClick={() => setIsConfirmPopUp(true)} | |||
> | |||
Published | |||
</Button> | |||
</Grid> | |||
:null | |||
} | |||
<FiDataGrid | |||
checkboxSelection | |||
@@ -77,10 +77,10 @@ export default function UserGroupTable({setSelectedRow, userGroup,isNewRecord,ed | |||
editMode="row" | |||
initialState={{ | |||
pagination: { | |||
paginationModel: {page: 0, pageSize: 3}, | |||
paginationModel: {page: 0, pageSize: 4}, | |||
}, | |||
}} | |||
pageSizeOptions={[3, 5]} | |||
pageSizeOptions={[4, 8, 16]} | |||
checkboxSelection | |||
rowSelectionModel={currentSelectedRow} | |||
onRowSelectionModelChange={(ids) => { | |||
@@ -268,7 +268,7 @@ const UserMaintainPage = () => { | |||
{/*bottom button*/} | |||
{ | |||
isGrantedAny(["MAINTAIN_USER"]) ? | |||
isGrantedAny(["MAINTAIN_USER", "MAINTAIN_GLD_USER"]) ? | |||
<Grid item s={12} md={12} lg={12} sx={{ mt: 2, mb: 2 }} alignItems={"start"} justifyContent="center"> | |||
<Grid container maxWidth justifyContent="flex-start"> | |||
{ | |||
@@ -268,7 +268,7 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => { | |||
<form onSubmit={formik.handleSubmit} style={{ padding: 12 }}> | |||
{/*top button*/} | |||
{ | |||
isGrantedAny("MAINTAIN_USER") ? | |||
isGrantedAny(["MAINTAIN_USER", "MAINTAIN_IND_USER"]) ? | |||
<Grid item xs={12} sm={12} md={12} lg={12} sx={{ mb: 3 }} alignItems={"start"} justifyContent="center"> | |||
<Grid container maxWidth justifyContent="flex-start"> | |||
{editMode ? | |||
@@ -430,7 +430,7 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => { | |||
<Typography variant="h5">Verified:</Typography> | |||
</Grid> | |||
{ | |||
!isGrantedAny("MAINTAIN_USER") || currentUserData.verifiedBy || editMode ? | |||
!isGrantedAny(["MAINTAIN_USER", "MAINTAIN_IND_USER"]) || currentUserData.verifiedBy || editMode ? | |||
<Grid item xs={12} sm={12} md={6} lg={6} sx={{ mb: 2 }}> | |||
{FieldUtils.initField({ | |||
valueName: "verifiedStatus", | |||
@@ -601,7 +601,7 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => { | |||
</Grid> | |||
{ | |||
!isGrantedAny("MAINTAIN_USER") || editMode ? | |||
!isGrantedAny(["MAINTAIN_USER", "MAINTAIN_IND_USER"]) || editMode ? | |||
<Grid item xs={8} sm={8} md={6} lg={6}> | |||
{FieldUtils.initField({ | |||
valueName: "status", | |||
@@ -179,7 +179,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => | |||
{/*top button*/} | |||
{isGrantedAny("MAINTAIN_USER") ? | |||
{isGrantedAny(["MAINTAIN_USER", "MAINTAIN_ORG_USER"]) ? | |||
<Grid item s={12} md={12} lg={12} sx={{ mb: 3, mt: 2 }} alignItems={"start"} justifyContent="center"> | |||
<Grid container maxWidth justifyContent="flex-start"> | |||
{editMode ? | |||
@@ -352,7 +352,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => | |||
</Grid> | |||
{ | |||
!isGrantedAny("MAINTAIN_USER") || currentUserData.verifiedBy || editMode ? | |||
!isGrantedAny(["MAINTAIN_USER", "MAINTAIN_ORG_USER"]) || currentUserData.verifiedBy || editMode ? | |||
<Grid item xs={12} md={6} lg={6}> | |||
{FieldUtils.initField({ | |||
valueName: "verifiedStatus", | |||
@@ -411,7 +411,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => | |||
<Typography variant="h5">Status:</Typography> | |||
</Grid> | |||
{ | |||
!isGrantedAny("MAINTAIN_USER") || editMode ? | |||
!isGrantedAny(["MAINTAIN_USER", "MAINTAIN_ORG_USER"]) || editMode ? | |||
<Grid item xs={12} md={6} lg={6}> | |||
{FieldUtils.initField({ | |||
valueName: "status", | |||
@@ -467,6 +467,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => | |||
<Grid item lg={12}> | |||
<Grid container alignItems={"center"}> | |||
{currentUserData.orgId == null ? | |||
isGrantedAny("MAINTAIN_ORG")? | |||
<Grid item lg={2} > | |||
<ThemeProvider theme={PNSPS_BUTTON_THEME}> | |||
<Button variant="contained" | |||
@@ -477,6 +478,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => | |||
</ThemeProvider> | |||
</Grid> | |||
: null | |||
: null | |||
} | |||
</Grid> | |||
</Grid> | |||
@@ -12,7 +12,7 @@ import axios from "axios"; | |||
// import { useNavigate, | |||
// useParams | |||
// } from "react-router-dom"; | |||
import { GLD_USER_PATH, | |||
import { GLD_USER_PROFILE_PATH, | |||
// DELETE_USER, | |||
// POST_ADMIN_USER_REGISTER | |||
} from "utils/ApiPathConst"; | |||
@@ -55,7 +55,7 @@ const UserMaintainPage = () => { | |||
const [onReady, setOnReady] = useState(false); | |||
useEffect(() => { | |||
axios.get(`${GLD_USER_PATH}/${getUserId()}`) | |||
axios.get(`${GLD_USER_PROFILE_PATH}/${getUserId()}`) | |||
.then((response) => { | |||
if (response.status === 200) { | |||
setUserData(response.data); | |||
@@ -153,7 +153,7 @@ const UserSearchForm = ({ applySearch, onGridReady }) => { | |||
alignItems="center"> | |||
<ThemeProvider theme={PNSPS_BUTTON_THEME}> | |||
{isGrantedAny(["MAINTAIN_USER"]) ? | |||
{isGrantedAny(["MAINTAIN_USER", "MAINTAIN_GLD_USER"]) ? | |||
<Grid item xs={3} md={3} sx={{ ml: 3, mb: 3 }}> | |||
<Button | |||
variant="contained" | |||
@@ -28,7 +28,7 @@ export default function UserTable({searchCriteria, applyGridOnReady}) { | |||
}, [reloadTime]); | |||
const handleLock = (params) => () => { | |||
if(!isGrantedAny(["MAINTAIN_USER"])) return; | |||
if(!isGrantedAny(["MAINTAIN_USER", "MAINTAIN_GLD_USER"])) return; | |||
if (params.row.locked==true){ | |||
doUnlock(params.id) | |||
}else{ | |||
@@ -51,15 +51,19 @@ const GLDUserRoutes = { | |||
path: '/dashboard', | |||
element: <DashboardDefault /> | |||
}, | |||
isGrantedAny(["VIEW_APPLICATION","MAINTAIN_APPLICATION"])? | |||
{ | |||
path: '/application/:id', | |||
element: <ApplicationDetail/> | |||
}, | |||
}:{}, | |||
isGrantedAny(["VIEW_APPLICATION","MAINTAIN_APPLICATION"])? | |||
{ | |||
path: '/application/search', | |||
element: <ApplicationSearch/> | |||
}, | |||
}:{}, | |||
isGranted(["MAINTAIN_PAYMENT"])? | |||
{ | |||
path: '/application/markAsPaid/search', | |||
@@ -130,7 +134,6 @@ const GLDUserRoutes = { | |||
element: <GFMIS_Search/> | |||
}:{}, | |||
{ | |||
path: '/user/profile', | |||
element: <UserMaintainPage /> | |||
@@ -166,13 +169,13 @@ const GLDUserRoutes = { | |||
element: <EmailTemplateDetailPage/> | |||
}:{}, | |||
isGranted("MAINTAIN_GAZETTE_ISSUE")? | |||
isGrantedAny(["VIEW_GAZETTE_ISSUE","MAINTAIN_GAZETTE_ISSUE"])? | |||
{ | |||
path: '/setting/holiday', | |||
element: <HolidayPage/> | |||
}:{}, | |||
isGranted("MAINTAIN_GAZETTE_ISSUE")? | |||
isGrantedAny(["VIEW_GAZETTE_ISSUE","MAINTAIN_GAZETTE_ISSUE"])? | |||
{ | |||
path: '/setting/gazetteissuepage', | |||
element: <GazetteIssuePage/> | |||
@@ -183,10 +186,12 @@ const GLDUserRoutes = { | |||
path: '/setting/drImport', | |||
element: <DrImport /> | |||
}:{}, | |||
{ | |||
path: '/setting/auditLog', | |||
element: <AuditLogPage /> | |||
}, | |||
{ | |||
path: '/user/changePassword', | |||
element: <ChangePasswordPage /> | |||
@@ -39,37 +39,37 @@ const SettingRoutes = { | |||
element: <UserGroupDetailPage /> | |||
}:{}, | |||
isGrantedAny(["VIEW_USER","MAINTAIN_USER"])? | |||
isGrantedAny(["VIEW_USER","MAINTAIN_USER","VIEW_GLD_USER" ,"MAINTAIN_GLD_USER"])? | |||
{ | |||
path: 'userSearchview', | |||
element: <UserSearchPage /> | |||
}:{}, | |||
isGrantedAny(["VIEW_USER","MAINTAIN_USER"])? | |||
isGrantedAny(["VIEW_USER","MAINTAIN_USER","VIEW_GLD_USER" ,"MAINTAIN_GLD_USER"])? | |||
{ | |||
path: '/user/:id', | |||
element: <UserMaintainPage /> | |||
}:{}, | |||
isGrantedAny(["VIEW_USER","MAINTAIN_USER"])? | |||
isGrantedAny(["VIEW_USER","MAINTAIN_USER","VIEW_IND_USER", "MAINTAIN_IND_USER"])? | |||
{ | |||
path: 'indUser', | |||
element: <UserSearchPage_Individual /> | |||
}:{}, | |||
isGrantedAny(["VIEW_USER","MAINTAIN_USER"])? | |||
isGrantedAny(["VIEW_USER","MAINTAIN_USER","VIEW_IND_USER", "MAINTAIN_IND_USER"])? | |||
{ | |||
path: '/indUser/:id', | |||
element: <UserMaintainPage_Individual /> | |||
}:{}, | |||
isGrantedAny(["VIEW_USER","MAINTAIN_USER"])? | |||
isGrantedAny(["VIEW_USER","MAINTAIN_USER","VIEW_ORG_USER", "MAINTAIN_ORG_USER"])? | |||
{ | |||
path: 'orgUser', | |||
element: <UserSearchPage_Organization /> | |||
}:{}, | |||
isGrantedAny(["VIEW_USER","MAINTAIN_USER"])? | |||
isGrantedAny(["VIEW_USER","MAINTAIN_USER","VIEW_ORG_USER", "MAINTAIN_ORG_USER"])? | |||
{ | |||
path: '/orgUser/:id', | |||
element: <UserMaintainPage_Organization /> | |||
@@ -21,6 +21,7 @@ export const GET_GROUP_MEMBER_LIST_PATH = '/group/member'; | |||
export const GET_GROUP_AUTH_LIST = '/group/auth/combo'; | |||
export const GLD_USER_PATH = apiPath+'/user/gld'; | |||
export const GLD_USER_PROFILE_PATH = apiPath+'/user/gldProfile'; | |||
export const GET_AUTH_LIST = '/user/auth/combo'; | |||
export const GET_USER_COMBO_LIST = '/user/combo'; | |||
export const GET_USER_GLD_COMBO_LIST = '/user/combo/gld'; | |||