import React, { ReactElement, useEffect } from 'react';
import Head from 'next/head'
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import dayjs from "dayjs";
import {useAppDispatch, useAppSelector} from "../../stores/hooks";
import {useRouter} from "next/router";
import { fetch } from '../../stores/organizations/organizationsSlice'
import {saveFile} from "../../helpers/fileSaver";
import dataFormatter from '../../helpers/dataFormatter';
import ImageField from "../../components/ImageField";
import LayoutAuthenticated from "../../layouts/Authenticated";
import {getPageTitle} from "../../config";
import SectionTitleLineWithButton from "../../components/SectionTitleLineWithButton";
import SectionMain from "../../components/SectionMain";
import CardBox from "../../components/CardBox";
import BaseButton from "../../components/BaseButton";
import BaseDivider from "../../components/BaseDivider";
import {mdiChartTimelineVariant} from "@mdi/js";
import {SwitchField} from "../../components/SwitchField";
import FormField from "../../components/FormField";

import {hasPermission} from "../../helpers/userPermissions";


const OrganizationsView = () => {
    const router = useRouter()
    const dispatch = useAppDispatch()
    const { organizations } = useAppSelector((state) => state.organizations)
    
    const { currentUser } = useAppSelector((state) => state.auth);
    

    const { id } = router.query;
    
    function removeLastCharacter(str) {
      console.log(str,`str`)
      return str.slice(0, -1);
    }

    useEffect(() => {
        dispatch(fetch({ id }));
    }, [dispatch, id]);


    return (
      <>
          <Head>
              <title>{getPageTitle('View organizations')}</title>
          </Head>
          <SectionMain>
            <SectionTitleLineWithButton icon={mdiChartTimelineVariant} title={removeLastCharacter('View organizations')} main>
                <BaseButton
                  color='info'
                  label='Edit'
                  href={`/organizations/organizations-edit/?id=${id}`}
                />
            </SectionTitleLineWithButton>
            <CardBox>
            

              
                <div className={'mb-4'}>
                    <p className={'block font-bold mb-2'}>Name</p>
                    <p>{organizations?.name}</p>
                </div>
              

              

              

              

              

              

              

              

              

              

              

              

              
              

                
                <>
                    <p className={'block font-bold mb-2'}>Users Organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                <th>First Name</th>
                                
                                
                                
                                <th>Last Name</th>
                                
                                
                                
                                <th>Phone Number</th>
                                
                                
                                
                                <th>E-Mail</th>
                                
                                
                                
                                <th>Disabled</th>
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.users_organizations && Array.isArray(organizations.users_organizations) &&
                              organizations.users_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/users/users-view/?id=${item.id}`)}>
                                    
                                    
                                    <td data-label="firstName">
                                        { item.firstName }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="lastName">
                                        { item.lastName }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="phoneNumber">
                                        { item.phoneNumber }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="email">
                                        { item.email }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="disabled">
                                        { dataFormatter.booleanFormatter(item.disabled) }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.users_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                
                
                
                <>
                    <p className={'block font-bold mb-2'}>Assets Organization</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>AssetName</th>
                                
                                
                                
                                <th>AssetType</th>
                                
                                
                                
                                <th>Environment</th>
                                
                                
                                
                                <th>IPAddress</th>
                                
                                
                                
                                <th>Hostname</th>
                                
                                
                                
                                <th>OperatingSystem</th>
                                
                                
                                
                                <th>CloudProvider</th>
                                
                                
                                
                                <th>Criticality</th>
                                
                                
                                
                                <th>InternetExposed</th>
                                
                                
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.assets_organization && Array.isArray(organizations.assets_organization) &&
                              organizations.assets_organization.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/assets/assets-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="name">
                                        { item.name }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="asset_type">
                                        { item.asset_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="environment">
                                        { item.environment }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="ip_address">
                                        { item.ip_address }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="hostname">
                                        { item.hostname }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="os">
                                        { item.os }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="cloud_provider">
                                        { item.cloud_provider }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="criticality">
                                        { item.criticality }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="internet_exposed">
                                        { dataFormatter.booleanFormatter(item.internet_exposed) }
                                    </td>
                                    
                                    
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.assets_organization?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Data_sources Organization</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>DataSourceName</th>
                                
                                
                                
                                <th>SourceType</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                <th>ConnectorType</th>
                                
                                
                                
                                <th>EndpointURL</th>
                                
                                
                                
                                <th>AuthMethod</th>
                                
                                
                                
                                <th>PollIntervalSeconds</th>
                                
                                
                                
                                <th>LastIngestedAt</th>
                                
                                
                                
                                <th>Notes</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.data_sources_organization && Array.isArray(organizations.data_sources_organization) &&
                              organizations.data_sources_organization.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/data_sources/data_sources-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="name">
                                        { item.name }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="source_type">
                                        { item.source_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="connector_type">
                                        { item.connector_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="endpoint_url">
                                        { item.endpoint_url }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="auth_method">
                                        { item.auth_method }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="poll_interval_seconds">
                                        { item.poll_interval_seconds }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="last_ingested_at">
                                        { dataFormatter.dateTimeFormatter(item.last_ingested_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="notes">
                                        { item.notes }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.data_sources_organization?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Ingestion_pipelines organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                <th>PipelineName</th>
                                
                                
                                
                                <th>PipelineType</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                
                                
                                <th>KafkaTopic</th>
                                
                                
                                
                                <th>DataLakePath</th>
                                
                                
                                
                                <th>ThroughputEPS</th>
                                
                                
                                
                                <th>ErrorRatePercent</th>
                                
                                
                                
                                <th>LastHealthCheckAt</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.ingestion_pipelines_organizations && Array.isArray(organizations.ingestion_pipelines_organizations) &&
                              organizations.ingestion_pipelines_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/ingestion_pipelines/ingestion_pipelines-view/?id=${item.id}`)}>
                                    
                                    
                                    <td data-label="name">
                                        { item.name }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="pipeline_type">
                                        { item.pipeline_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="kafka_topic">
                                        { item.kafka_topic }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="data_lake_path">
                                        { item.data_lake_path }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="throughput_eps">
                                        { item.throughput_eps }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="error_rate_percent">
                                        { item.error_rate_percent }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="last_health_check_at">
                                        { dataFormatter.dateTimeFormatter(item.last_health_check_at) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.ingestion_pipelines_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Telemetry_events Organization</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                
                                
                                
                                
                                <th>ObservedAt</th>
                                
                                
                                
                                <th>EventType</th>
                                
                                
                                
                                <th>Severity</th>
                                
                                
                                
                                <th>Summary</th>
                                
                                
                                
                                <th>RawPayload</th>
                                
                                
                                
                                <th>EventHash</th>
                                
                                
                                
                                <th>Flagged</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.telemetry_events_organization && Array.isArray(organizations.telemetry_events_organization) &&
                              organizations.telemetry_events_organization.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/telemetry_events/telemetry_events-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="observed_at">
                                        { dataFormatter.dateTimeFormatter(item.observed_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="event_type">
                                        { item.event_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="severity">
                                        { item.severity }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="summary">
                                        { item.summary }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="raw_payload">
                                        { item.raw_payload }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="hash">
                                        { item.hash }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="flagged">
                                        { dataFormatter.booleanFormatter(item.flagged) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.telemetry_events_organization?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Ai_models organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                <th>ModelName</th>
                                
                                
                                
                                <th>ModelType</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                <th>Version</th>
                                
                                
                                
                                <th>Framework</th>
                                
                                
                                
                                <th>ArtifactURI</th>
                                
                                
                                
                                <th>Threshold</th>
                                
                                
                                
                                <th>TrainedAt</th>
                                
                                
                                
                                <th>ActivatedAt</th>
                                
                                
                                
                                <th>Description</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.ai_models_organizations && Array.isArray(organizations.ai_models_organizations) &&
                              organizations.ai_models_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/ai_models/ai_models-view/?id=${item.id}`)}>
                                    
                                    
                                    <td data-label="name">
                                        { item.name }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="model_type">
                                        { item.model_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="version">
                                        { item.version }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="framework">
                                        { item.framework }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="artifact_uri">
                                        { item.artifact_uri }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="threshold">
                                        { item.threshold }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="trained_at">
                                        { dataFormatter.dateTimeFormatter(item.trained_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="activated_at">
                                        { dataFormatter.dateTimeFormatter(item.activated_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="description">
                                        { item.description }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.ai_models_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Detections Organization</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                
                                
                                
                                
                                <th>DetectedAt</th>
                                
                                
                                
                                <th>DetectionType</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                <th>Confidence</th>
                                
                                
                                
                                <th>RiskScore</th>
                                
                                
                                
                                <th>Title</th>
                                
                                
                                
                                <th>Evidence</th>
                                
                                
                                
                                <th>RequiresResponse</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.detections_organization && Array.isArray(organizations.detections_organization) &&
                              organizations.detections_organization.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/detections/detections-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="detected_at">
                                        { dataFormatter.dateTimeFormatter(item.detected_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="detection_type">
                                        { item.detection_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="confidence">
                                        { item.confidence }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="risk_score">
                                        { item.risk_score }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="title">
                                        { item.title }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="evidence">
                                        { item.evidence }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="requires_response">
                                        { dataFormatter.booleanFormatter(item.requires_response) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.detections_organization?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Incidents Organization</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>IncidentName</th>
                                
                                
                                
                                <th>Severity</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                <th>OpenedAt</th>
                                
                                
                                
                                <th>ClosedAt</th>
                                
                                
                                
                                
                                
                                
                                
                                <th>Summary</th>
                                
                                
                                
                                <th>BusinessImpactScore</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.incidents_organization && Array.isArray(organizations.incidents_organization) &&
                              organizations.incidents_organization.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/incidents/incidents-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="name">
                                        { item.name }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="severity">
                                        { item.severity }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="opened_at">
                                        { dataFormatter.dateTimeFormatter(item.opened_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="closed_at">
                                        { dataFormatter.dateTimeFormatter(item.closed_at) }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="summary">
                                        { item.summary }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="business_impact_score">
                                        { item.business_impact_score }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.incidents_organization?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Response_playbooks organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                <th>PlaybookName</th>
                                
                                
                                
                                <th>Category</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                <th>TriggerConditions</th>
                                
                                
                                
                                
                                
                                <th>RequiresApproval</th>
                                
                                
                                
                                <th>ExpectedDurationMinutes</th>
                                
                                
                                
                                <th>Description</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.response_playbooks_organizations && Array.isArray(organizations.response_playbooks_organizations) &&
                              organizations.response_playbooks_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/response_playbooks/response_playbooks-view/?id=${item.id}`)}>
                                    
                                    
                                    <td data-label="name">
                                        { item.name }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="category">
                                        { item.category }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="trigger_conditions">
                                        { item.trigger_conditions }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="requires_approval">
                                        { dataFormatter.booleanFormatter(item.requires_approval) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="expected_duration_minutes">
                                        { item.expected_duration_minutes }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="description">
                                        { item.description }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.response_playbooks_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Response_actions organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                
                                
                                <th>ActionType</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                <th>RequestedAt</th>
                                
                                
                                
                                <th>ExecutedAt</th>
                                
                                
                                
                                
                                
                                <th>Target</th>
                                
                                
                                
                                <th>ActionResult</th>
                                
                                
                                
                                <th>Automated</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.response_actions_organizations && Array.isArray(organizations.response_actions_organizations) &&
                              organizations.response_actions_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/response_actions/response_actions-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="action_type">
                                        { item.action_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="requested_at">
                                        { dataFormatter.dateTimeFormatter(item.requested_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="executed_at">
                                        { dataFormatter.dateTimeFormatter(item.executed_at) }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="target">
                                        { item.target }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="action_result">
                                        { item.action_result }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="automated">
                                        { dataFormatter.booleanFormatter(item.automated) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.response_actions_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Soc_agents organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                <th>AgentName</th>
                                
                                
                                
                                <th>AgentType</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                
                                
                                <th>Capabilities</th>
                                
                                
                                
                                <th>ApprovalRequiredByDefault</th>
                                
                                
                                
                                <th>LastHeartbeatAt</th>
                                
                                
                                
                                <th>ActionsSuccessRate</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.soc_agents_organizations && Array.isArray(organizations.soc_agents_organizations) &&
                              organizations.soc_agents_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/soc_agents/soc_agents-view/?id=${item.id}`)}>
                                    
                                    
                                    <td data-label="name">
                                        { item.name }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="agent_type">
                                        { item.agent_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="capabilities">
                                        { item.capabilities }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="approval_required_by_default">
                                        { dataFormatter.booleanFormatter(item.approval_required_by_default) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="last_heartbeat_at">
                                        { dataFormatter.dateTimeFormatter(item.last_heartbeat_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="actions_success_rate">
                                        { item.actions_success_rate }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.soc_agents_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Threat_actors organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                <th>ThreatActorName</th>
                                
                                
                                
                                <th>ActorType</th>
                                
                                
                                
                                <th>Motivation</th>
                                
                                
                                
                                <th>OriginCountry</th>
                                
                                
                                
                                <th>Aliases</th>
                                
                                
                                
                                
                                
                                <th>ThreatLevel</th>
                                
                                
                                
                                <th>FirstSeenAt</th>
                                
                                
                                
                                <th>LastSeenAt</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.threat_actors_organizations && Array.isArray(organizations.threat_actors_organizations) &&
                              organizations.threat_actors_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/threat_actors/threat_actors-view/?id=${item.id}`)}>
                                    
                                    
                                    <td data-label="name">
                                        { item.name }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="actor_type">
                                        { item.actor_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="motivation">
                                        { item.motivation }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="origin_country">
                                        { item.origin_country }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="aliases">
                                        { item.aliases }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="threat_level">
                                        { item.threat_level }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="first_seen_at">
                                        { dataFormatter.dateTimeFormatter(item.first_seen_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="last_seen_at">
                                        { dataFormatter.dateTimeFormatter(item.last_seen_at) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.threat_actors_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Threat_indicators organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                <th>IndicatorValue</th>
                                
                                
                                
                                <th>IndicatorType</th>
                                
                                
                                
                                <th>Confidence</th>
                                
                                
                                
                                <th>Severity</th>
                                
                                
                                
                                
                                
                                <th>FirstSeenAt</th>
                                
                                
                                
                                <th>LastSeenAt</th>
                                
                                
                                
                                <th>Source</th>
                                
                                
                                
                                <th>Context</th>
                                
                                
                                
                                <th>Active</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.threat_indicators_organizations && Array.isArray(organizations.threat_indicators_organizations) &&
                              organizations.threat_indicators_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/threat_indicators/threat_indicators-view/?id=${item.id}`)}>
                                    
                                    
                                    <td data-label="indicator_value">
                                        { item.indicator_value }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="indicator_type">
                                        { item.indicator_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="confidence">
                                        { item.confidence }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="severity">
                                        { item.severity }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="first_seen_at">
                                        { dataFormatter.dateTimeFormatter(item.first_seen_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="last_seen_at">
                                        { dataFormatter.dateTimeFormatter(item.last_seen_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="source">
                                        { item.source }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="context">
                                        { item.context }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="active">
                                        { dataFormatter.booleanFormatter(item.active) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.threat_indicators_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Threat_campaigns organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                <th>CampaignName</th>
                                
                                
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                <th>StartAt</th>
                                
                                
                                
                                <th>EndAt</th>
                                
                                
                                
                                
                                
                                
                                
                                <th>GlobalRiskScore</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.threat_campaigns_organizations && Array.isArray(organizations.threat_campaigns_organizations) &&
                              organizations.threat_campaigns_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/threat_campaigns/threat_campaigns-view/?id=${item.id}`)}>
                                    
                                    
                                    <td data-label="name">
                                        { item.name }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="start_at">
                                        { dataFormatter.dateTimeFormatter(item.start_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="end_at">
                                        { dataFormatter.dateTimeFormatter(item.end_at) }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="global_risk_score">
                                        { item.global_risk_score }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.threat_campaigns_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Attack_map_events organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                <th>OccurredAt</th>
                                
                                
                                
                                <th>EventKind</th>
                                
                                
                                
                                <th>SourceCountry</th>
                                
                                
                                
                                <th>SourceIP</th>
                                
                                
                                
                                <th>DestinationCountry</th>
                                
                                
                                
                                <th>DestinationIP</th>
                                
                                
                                
                                <th>Latitude</th>
                                
                                
                                
                                <th>Longitude</th>
                                
                                
                                
                                <th>RiskScore</th>
                                
                                
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.attack_map_events_organizations && Array.isArray(organizations.attack_map_events_organizations) &&
                              organizations.attack_map_events_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/attack_map_events/attack_map_events-view/?id=${item.id}`)}>
                                    
                                    
                                    <td data-label="occurred_at">
                                        { dataFormatter.dateTimeFormatter(item.occurred_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="event_kind">
                                        { item.event_kind }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="source_country">
                                        { item.source_country }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="source_ip">
                                        { item.source_ip }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="destination_country">
                                        { item.destination_country }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="destination_ip">
                                        { item.destination_ip }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="latitude">
                                        { item.latitude }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="longitude">
                                        { item.longitude }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="risk_score">
                                        { item.risk_score }
                                    </td>
                                    
                                    
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.attack_map_events_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Risk_assessments Organization</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>AssessedAt</th>
                                
                                
                                
                                <th>Scope</th>
                                
                                
                                
                                
                                
                                <th>OverallRiskScore</th>
                                
                                
                                
                                <th>RiskLevel</th>
                                
                                
                                
                                <th>TopRisks</th>
                                
                                
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.risk_assessments_organization && Array.isArray(organizations.risk_assessments_organization) &&
                              organizations.risk_assessments_organization.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/risk_assessments/risk_assessments-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="assessed_at">
                                        { dataFormatter.dateTimeFormatter(item.assessed_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="scope">
                                        { item.scope }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="overall_risk_score">
                                        { item.overall_risk_score }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="risk_level">
                                        { item.risk_level }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="top_risks">
                                        { item.top_risks }
                                    </td>
                                    
                                    
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.risk_assessments_organization?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Simulation_labs Organization</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                <th>LabName</th>
                                
                                
                                
                                <th>LabType</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                
                                
                                
                                
                                <th>CreatedOn</th>
                                
                                
                                
                                <th>MaxDurationMinutes</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.simulation_labs_organization && Array.isArray(organizations.simulation_labs_organization) &&
                              organizations.simulation_labs_organization.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/simulation_labs/simulation_labs-view/?id=${item.id}`)}>
                                    
                                    
                                    <td data-label="name">
                                        { item.name }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="lab_type">
                                        { item.lab_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="created_on">
                                        { dataFormatter.dateTimeFormatter(item.created_on) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="max_duration_minutes">
                                        { item.max_duration_minutes }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.simulation_labs_organization?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Simulation_runs organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                
                                
                                <th>ScenarioType</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                <th>StartedAt</th>
                                
                                
                                
                                <th>EndedAt</th>
                                
                                
                                
                                <th>SuccessScore</th>
                                
                                
                                
                                
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.simulation_runs_organizations && Array.isArray(organizations.simulation_runs_organizations) &&
                              organizations.simulation_runs_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/simulation_runs/simulation_runs-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="scenario_type">
                                        { item.scenario_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="started_at">
                                        { dataFormatter.dateTimeFormatter(item.started_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="ended_at">
                                        { dataFormatter.dateTimeFormatter(item.ended_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="success_score">
                                        { item.success_score }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.simulation_runs_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Infrastructure_clusters organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                <th>ClusterName</th>
                                
                                
                                
                                <th>ClusterType</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                <th>Region</th>
                                
                                
                                
                                <th>Provider</th>
                                
                                
                                
                                <th>APIGatewayURL</th>
                                
                                
                                
                                <th>CPUCapacity</th>
                                
                                
                                
                                <th>GPUCapacity</th>
                                
                                
                                
                                <th>StorageCapacityTB</th>
                                
                                
                                
                                <th>LastAuditAt</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.infrastructure_clusters_organizations && Array.isArray(organizations.infrastructure_clusters_organizations) &&
                              organizations.infrastructure_clusters_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/infrastructure_clusters/infrastructure_clusters-view/?id=${item.id}`)}>
                                    
                                    
                                    <td data-label="name">
                                        { item.name }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="cluster_type">
                                        { item.cluster_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="region">
                                        { item.region }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="provider">
                                        { item.provider }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="api_gateway_url">
                                        { item.api_gateway_url }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="cpu_capacity">
                                        { item.cpu_capacity }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="gpu_capacity">
                                        { item.gpu_capacity }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="storage_capacity_tb">
                                        { item.storage_capacity_tb }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="last_audit_at">
                                        { dataFormatter.dateTimeFormatter(item.last_audit_at) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.infrastructure_clusters_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Edge_sensors organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                <th>SensorName</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                <th>Location</th>
                                
                                
                                
                                <th>Site</th>
                                
                                
                                
                                <th>HardwareModel</th>
                                
                                
                                
                                <th>FirmwareVersion</th>
                                
                                
                                
                                <th>LastSeenAt</th>
                                
                                
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.edge_sensors_organizations && Array.isArray(organizations.edge_sensors_organizations) &&
                              organizations.edge_sensors_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/edge_sensors/edge_sensors-view/?id=${item.id}`)}>
                                    
                                    
                                    <td data-label="name">
                                        { item.name }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="location">
                                        { item.location }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="site">
                                        { item.site }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="hardware_model">
                                        { item.hardware_model }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="firmware_version">
                                        { item.firmware_version }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="last_seen_at">
                                        { dataFormatter.dateTimeFormatter(item.last_seen_at) }
                                    </td>
                                    
                                    
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.edge_sensors_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Reports Organization</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>ReportName</th>
                                
                                
                                
                                <th>ReportType</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                <th>PeriodStartAt</th>
                                
                                
                                
                                <th>PeriodEndAt</th>
                                
                                
                                
                                
                                
                                
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.reports_organization && Array.isArray(organizations.reports_organization) &&
                              organizations.reports_organization.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/reports/reports-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="name">
                                        { item.name }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="report_type">
                                        { item.report_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="period_start_at">
                                        { dataFormatter.dateTimeFormatter(item.period_start_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="period_end_at">
                                        { dataFormatter.dateTimeFormatter(item.period_end_at) }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.reports_organization?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Ai_recommendations Organization</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                
                                
                                
                                
                                <th>GeneratedAt</th>
                                
                                
                                
                                <th>RecommendationType</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                <th>EstimatedRiskReduction</th>
                                
                                
                                
                                <th>Title</th>
                                
                                
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.ai_recommendations_organization && Array.isArray(organizations.ai_recommendations_organization) &&
                              organizations.ai_recommendations_organization.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/ai_recommendations/ai_recommendations-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="generated_at">
                                        { dataFormatter.dateTimeFormatter(item.generated_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="recommendation_type">
                                        { item.recommendation_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="estimated_risk_reduction">
                                        { item.estimated_risk_reduction }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="title">
                                        { item.title }
                                    </td>
                                    
                                    
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.ai_recommendations_organization?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                

                <BaseDivider />

                <BaseButton
                    color='info'
                    label='Back'
                    onClick={() => router.push('/organizations/organizations-list')}
                />
              </CardBox>
          </SectionMain>
      </>
    );
};

OrganizationsView.getLayout = function getLayout(page: ReactElement) {
    return (
      <LayoutAuthenticated
        
        permission={'READ_ORGANIZATIONS'}
        
      >
          {page}
      </LayoutAuthenticated>
    )
}

export default OrganizationsView;