diff --git a/src/constants/index.js b/src/constants/index.js
index d0ed4a3..fa1639b 100644
--- a/src/constants/index.js
+++ b/src/constants/index.js
@@ -44,6 +44,7 @@ export const CLINIC_STATUS = {
'APPROVAL_PENDING_DOCUMENT_RESUBMITTED',
INACTIVE: 'inactive',
PAYMENT_DUE: "payment_due",
+ SUBSCRIPTION_ENDED: "subscription_ended",
};
export const CLINIC_DOCUMENT_STATUS = {
diff --git a/src/layouts/mainLayout/components/Sidebar.jsx b/src/layouts/mainLayout/components/Sidebar.jsx
index 168c0fa..7e0cafc 100644
--- a/src/layouts/mainLayout/components/Sidebar.jsx
+++ b/src/layouts/mainLayout/components/Sidebar.jsx
@@ -96,7 +96,7 @@ const checkVisibility = (item, i) => {
if (hasRole) {
// Determine if the link should be disabled
// FIXED LOGIC: If clinic status is rejected, only allow "/" and "/docs" paths
- const isDisabled = (clinicStatus === "rejected" || clinicStatus === "under_review" || clinicStatus === "payment_due") && !(item.path == "" || item.path == "docs");
+ const isDisabled = (clinicStatus == "under_review" || clinicStatus == "inactive" || clinicStatus == "rejected" || clinicStatus == "subscription_ended") && !(item.path == "" || item.path == "docs");
// Set the correct target path
const targetPath = isDisabled ? "#" : `/${item.path}`;
diff --git a/src/layouts/mainLayout/index.jsx b/src/layouts/mainLayout/index.jsx
index bb674c2..6f0d3fb 100644
--- a/src/layouts/mainLayout/index.jsx
+++ b/src/layouts/mainLayout/index.jsx
@@ -19,6 +19,7 @@ import { hideAndShowFunctionality } from '../../views/Signup/signupAction';
import Header from './components/Header';
import Sidebar from './components/Sidebar';
import { useStyles } from './mainLayoutStyles';
+import { selectClinicStatus } from '../../redux/userRoleSlice';
function MainLayout() {
const classes = useStyles();
@@ -26,6 +27,8 @@ function MainLayout() {
const [alertInfo, setAlertInfo] = useState({ message: '', show: false });
const dispatch = useDispatch();
+ const clinicStatus = useSelector(selectClinicStatus);
+
const hideFeature = useSelector((state) => state?.signup?.hideFeatures);
const planDetails = useSelector((state) => state?.login?.user?.account);
@@ -134,14 +137,14 @@ function MainLayout() {
className={classes.functionalityNotAvailableTextBold}
variant="h1"
>
- Note!
+ {clinicStatus =="inactive" ? "Clinic is freezed" : "Note!"}
- This section will accessible after approval
+ {clinicStatus =="inactive" ? `Please contact the AIHCR Admin` : "This section will accessible after approval"}
-
+ {/*
{previewFile.file}
-
+ */}
{
accessorFn: ({ status }) => (
<>
{
);
},
},
+ {
+ enableSorting: false,
+ accessorKey: "status",
+ header: "Status",
+ size: 150,
+ Cell: ({ row }) => {
+ const status =
+ row.original.status === CLINIC_STATUS.INACTIVE
+ ? "Inactive"
+ : row.original.status === CLINIC_STATUS.SUBSCRIPTION_ENDED
+ ? "Subscription Ended"
+ : "Active";
+ return (
+ <>
+
+ >
+ );
+ },
+ },
{
enableSorting: false,
size: 100,