diff --git a/frontend/src/views/Admin.jsx b/frontend/src/views/Admin.jsx
index f653bd2c..e6dc8bc0 100755
--- a/frontend/src/views/Admin.jsx
+++ b/frontend/src/views/Admin.jsx
@@ -1102,6 +1102,40 @@ If you're interested, please let me know a time that works for you, or set up a
toast("Error getting current organization");
});
};
+const handleGetSubOrgs = (orgId) => {
+
+ if (serverside !== true && window.location.search !== undefined && window.location.search !== null) {
+ const urlSearchParams = new URLSearchParams(window.location.search);
+ const params = Object.fromEntries(urlSearchParams.entries());
+ const foundorgid = params["org_id"];
+ if (foundorgid !== undefined && foundorgid !== null) {
+ orgId = foundorgid;
+ }
+ }
+
+ if (orgId.length === 0) {
+ toast("Organization ID not defined. Please contact us on https://shuffler.io if this persists logout.");
+ return;
+ }
+
+ fetch(`${globalUrl}/api/v1/subOrgs/${orgId}`, {
+ method: "GET",
+ credentials: "include",
+ headers: {
+ "Content-Type": "application/json",
+ },
+ })
+ .then((response) => {
+ return response.json();
+ })
+ .then((responseJson) => {
+ setSubOrgs(responseJson);
+ })
+ .catch((error) => {
+ console.log("Error getting sub orgs: ", error);
+ toast("Error getting sub organizations");
+ });
+};
const inviteUser = (data) => {
//console.log("INPUT: ", data);
@@ -4678,6 +4712,84 @@ If you're interested, please let me know a time that works for you, or set up a
backgroundColor: theme.palette.inputColor,
}}
/>
+
+{subOrgs.length > 0 ? (
+
+ Your Sub Organizations of the Current Organization
+
+
+
+ ) : (
+
+ );
+
+ var bgColor = "#27292d";
+ if (index % 2 === 0) {
+ bgColor = "#1f2023";
+ }
+
+ return (
+