diff --git a/src/components/FiDataGrid.js b/src/components/FiDataGrid.js
index 69b6d7a..82545f0 100644
--- a/src/components/FiDataGrid.js
+++ b/src/components/FiDataGrid.js
@@ -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){
diff --git a/src/layout/MainLayout/Header/index.js b/src/layout/MainLayout/Header/index.js
index 88bca62..c017a65 100644
--- a/src/layout/MainLayout/Header/index.js
+++ b/src/layout/MainLayout/Header/index.js
@@ -109,9 +109,13 @@ function Header(props) {
-
- Application
-
+ {
+ isGrantedAny(["VIEW_APPLICATION", "MAINTAIN_APPLICATION"]) ?
+
+ Application
+
+ : <>>
+ }
{
isGrantedAny(["VIEW_PROOF", "MAINTAIN_PROOF"]) ?
@@ -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"]) ?
Client
{
- isGrantedAny(["VIEW_USER", "MAINTAIN_USER"]) ?
+ isGrantedAny(["VIEW_USER","MAINTAIN_USER"]) ?
<>
-
Users (GLD)
@@ -216,9 +220,27 @@ function Header(props) {
>
:
- <>>
+ <>
+ {
+ isGrantedAny(["VIEW_GLD_USER" ,"MAINTAIN_GLD_USER"]) ?
+ -
+ Users (GLD)
+
: <>>
+ }
+ {
+ isGrantedAny(["VIEW_IND_USER", "MAINTAIN_IND_USER"]) ?
+ -
+ Users (Individual)
+
: <>>
+ }
+ {
+ isGrantedAny(["VIEW_ORG_USER", "MAINTAIN_ORG_USER"]) ?
+ -
+ Users (Organisation)
+
: <>>
+ }
+ >
}
-
{
isGrantedAny(["VIEW_ORG", "MAINTAIN_ORG"]) ?
-
@@ -227,7 +249,6 @@ function Header(props) {
:
<>>
}
-
{
isGrantedAny(["VIEW_GROUP", "MAINTAIN_GROUP"]) ?
-
@@ -256,7 +277,7 @@ function Header(props) {
{
- isGranted("MAINTAIN_GAZETTE_ISSUE") ?
+ isGranted("VIEW_GAZETTE_ISSUE", "MAINTAIN_GAZETTE_ISSUE") ?
<>
-
Holiday Settings
diff --git a/src/pages/GazetteIssue/index.js b/src/pages/GazetteIssue/index.js
index 6d5da21..8c68610 100644
--- a/src/pages/GazetteIssue/index.js
+++ b/src/pages/GazetteIssue/index.js
@@ -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 = () => {
/>
}
-
-
-
- {
- readFile(event)
- }}
- />
-
-
-
-
-
-
+ onChange={(event) => {
+ readFile(event)
+ }}
+ />
+
+
+
+
+
+ :null
+ }
{/*row 1*/}
{
-
-
- {
- readFile(event)
- }}
- />
-
-
-
+ onChange={(event) => {
+ readFile(event)
+ }}
+ />
+
+
+ :null
+ }
diff --git a/src/pages/PublicNotice/Details_GLD/ApplicationDetailCard.js b/src/pages/PublicNotice/Details_GLD/ApplicationDetailCard.js
index feb3037..2b27dbb 100644
--- a/src/pages/PublicNotice/Details_GLD/ApplicationDetailCard.js
+++ b/src/pages/PublicNotice/Details_GLD/ApplicationDetailCard.js
@@ -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" ?
-
-
-
- {currentApplicationDetailData.status === "reviewed" && isGranted("MAINTAIN_PROOF") ?
- :
- null
- }
-
-
-
-
- {
- !(orgDetail?.creditor) && currentApplicationDetailData.creditor && currentApplicationDetailData.status === "published" ?
- <>
-
- >
- :
- <>>
- }
- {currentApplicationDetailData.status === "submitted" || currentApplicationDetailData.status == "reviewed" ?
- <>
+ isGrantedAny("MAINTAIN_APPLICATION") ?
+
+
+
+ {currentApplicationDetailData.status === "reviewed" && isGranted("MAINTAIN_PROOF") ?
- {
- proofId == null || proofId == 0?
+ onClick={() => { onProofClick() }}
+ sx={{
+ textTransform: 'capitalize',
+ alignItems: 'end'
+ }}>
+
+ Create Proof
+ :
+ null
+ }
+
+
+
+
+ {
+ !(orgDetail?.creditor) && currentApplicationDetailData.creditor && currentApplicationDetailData.status === "published" ?
+ <>
- :
- null
- }
- > :
- (currentApplicationDetailData.status == "confirmed" && currentApplicationDetailData.creditor == 1) ?
+ >
+ :
+ <>>
+ }
+ {currentApplicationDetailData.status === "submitted" || currentApplicationDetailData.status == "reviewed" ?
<>
-
- >
- :
- (currentApplicationDetailData.status == "confirmed" && currentApplicationDetailData.creditor == 0) ?
+ {
+ proofId == null || proofId == 0?
+
+ :
+ null
+ }
+ > :
+ (currentApplicationDetailData.status == "confirmed" && currentApplicationDetailData.creditor == 1) ?
<>
+
-
- : null
+ (currentApplicationDetailData.status == "confirmed" && currentApplicationDetailData.creditor == 0) ?
+ <>
+
+
+ Withdraw
+
+ >
+ :
+ (
+ (currentApplicationDetailData.status == "paid" && currentApplicationDetailData.creditor == 0) ?
+ <>
+
+
+
+ Revoke Payment
+
+
+
+
+ Publish
+
+
+
+ Withdraw
+
+ > : null
+ )
+
+ }
+
+
+
+ : null
+ : null
}
Application Details
diff --git a/src/pages/PublicNotice/Details_GLD/ClientDetailCard.js b/src/pages/PublicNotice/Details_GLD/ClientDetailCard.js
index 3b914da..5f74986 100644
--- a/src/pages/PublicNotice/Details_GLD/ClientDetailCard.js
+++ b/src/pages/PublicNotice/Details_GLD/ClientDetailCard.js
@@ -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"]) ?
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" ?
-
-
-
-
-
- Gen Gazette Code
-
-
+ isGrantedAny("MAINTAIN_APPLICATION") ?
+
+
+
+
+
+ Gen Gazette Code
+
+
+
-
- : null}
+ : null
+ : null
+ }
Gazette Details
diff --git a/src/pages/PublicNotice/Search_GLD/DataGrid.js b/src/pages/PublicNotice/Search_GLD/DataGrid.js
index 5b7962b..c73c4b1 100644
--- a/src/pages/PublicNotice/Search_GLD/DataGrid.js
+++ b/src/pages/PublicNotice/Search_GLD/DataGrid.js
@@ -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 (<>
-
- setIsConfirmPopUp(true)}
- >
- Published
-
-
+ {isGrantedAny(["MAINTAIN_APPLICATION"]) ?
+
+ setIsConfirmPopUp(true)}
+ >
+ Published
+
+
+ :null
+ }
{
diff --git a/src/pages/User/DetailPage/index.js b/src/pages/User/DetailPage/index.js
index 8f0da7b..87b93ee 100644
--- a/src/pages/User/DetailPage/index.js
+++ b/src/pages/User/DetailPage/index.js
@@ -268,7 +268,7 @@ const UserMaintainPage = () => {
{/*bottom button*/}
{
- isGrantedAny(["MAINTAIN_USER"]) ?
+ isGrantedAny(["MAINTAIN_USER", "MAINTAIN_GLD_USER"]) ?
{
diff --git a/src/pages/User/DetailsPage_Individual/UserInformationCard_Individual.js b/src/pages/User/DetailsPage_Individual/UserInformationCard_Individual.js
index 8f06c78..1e48d10 100644
--- a/src/pages/User/DetailsPage_Individual/UserInformationCard_Individual.js
+++ b/src/pages/User/DetailsPage_Individual/UserInformationCard_Individual.js
@@ -268,7 +268,7 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => {