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'}>Oauth_accounts organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>Provider</th>
                                
                                
                                
                                <th>Provideruserkey</th>
                                
                                
                                
                                <th>Accesstoken</th>
                                
                                
                                
                                <th>Refreshtoken</th>
                                
                                
                                
                                <th>Tokenexpiresat</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.oauth_accounts_organizations && Array.isArray(organizations.oauth_accounts_organizations) &&
                              organizations.oauth_accounts_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/oauth_accounts/oauth_accounts-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="provider">
                                        { item.provider }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="provider_user_key">
                                        { item.provider_user_key }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="access_token">
                                        { item.access_token }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="refresh_token">
                                        { item.refresh_token }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="token_expires_at">
                                        { dataFormatter.dateTimeFormatter(item.token_expires_at) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.oauth_accounts_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Artist_profiles organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>Artistname</th>
                                
                                
                                
                                <th>Profiletype</th>
                                
                                
                                
                                <th>Legalname</th>
                                
                                
                                
                                <th>Country</th>
                                
                                
                                
                                <th>City</th>
                                
                                
                                
                                <th>Taxresidency</th>
                                
                                
                                
                                <th>Payoutcurrency</th>
                                
                                
                                
                                
                                
                                
                                
                                <th>WebsiteURL</th>
                                
                                
                                
                                <th>VKURL</th>
                                
                                
                                
                                <th>YouTubeURL</th>
                                
                                
                                
                                <th>TikTokURL</th>
                                
                                
                                
                                <th>InstagramURL</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.artist_profiles_organizations && Array.isArray(organizations.artist_profiles_organizations) &&
                              organizations.artist_profiles_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/artist_profiles/artist_profiles-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="artist_name">
                                        { item.artist_name }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="profile_type">
                                        { item.profile_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="legal_name">
                                        { item.legal_name }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="country">
                                        { item.country }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="city">
                                        { item.city }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="tax_residency">
                                        { item.tax_residency }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="payout_currency">
                                        { item.payout_currency }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="website_url">
                                        { item.website_url }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="vk_url">
                                        { item.vk_url }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="youtube_url">
                                        { item.youtube_url }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="tiktok_url">
                                        { item.tiktok_url }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="instagram_url">
                                        { item.instagram_url }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.artist_profiles_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Teams organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>Teamname</th>
                                
                                
                                
                                <th>Description</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.teams_organizations && Array.isArray(organizations.teams_organizations) &&
                              organizations.teams_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/teams/teams-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="name">
                                        { item.name }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="description">
                                        { item.description }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.teams_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Team_memberships organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                
                                
                                <th>Role</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                <th>Invitedat</th>
                                
                                
                                
                                <th>Acceptedat</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.team_memberships_organizations && Array.isArray(organizations.team_memberships_organizations) &&
                              organizations.team_memberships_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/team_memberships/team_memberships-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="role">
                                        { item.role }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="invited_at">
                                        { dataFormatter.dateTimeFormatter(item.invited_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="accepted_at">
                                        { dataFormatter.dateTimeFormatter(item.accepted_at) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.team_memberships_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Plans organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                <th>Planname</th>
                                
                                
                                
                                <th>Plancode</th>
                                
                                
                                
                                <th>Priceamount</th>
                                
                                
                                
                                <th>Pricecurrency</th>
                                
                                
                                
                                <th>Billingperiod</th>
                                
                                
                                
                                <th>Isactive</th>
                                
                                
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.plans_organizations && Array.isArray(organizations.plans_organizations) &&
                              organizations.plans_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/plans/plans-view/?id=${item.id}`)}>
                                    
                                    
                                    <td data-label="name">
                                        { item.name }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="plan_code">
                                        { item.plan_code }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="price_amount">
                                        { item.price_amount }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="price_currency">
                                        { item.price_currency }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="billing_period">
                                        { item.billing_period }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="is_active">
                                        { dataFormatter.booleanFormatter(item.is_active) }
                                    </td>
                                    
                                    
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.plans_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Subscriptions organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                <th>Startsat</th>
                                
                                
                                
                                <th>Endsat</th>
                                
                                
                                
                                <th>Autorenew</th>
                                
                                
                                
                                <th>Externalbillingkey</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.subscriptions_organizations && Array.isArray(organizations.subscriptions_organizations) &&
                              organizations.subscriptions_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/subscriptions/subscriptions-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="starts_at">
                                        { dataFormatter.dateTimeFormatter(item.starts_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="ends_at">
                                        { dataFormatter.dateTimeFormatter(item.ends_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="auto_renew">
                                        { dataFormatter.booleanFormatter(item.auto_renew) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="external_billing_key">
                                        { item.external_billing_key }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.subscriptions_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Distribution_platforms organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                <th>Platformname</th>
                                
                                
                                
                                <th>Category</th>
                                
                                
                                
                                <th>WebsiteURL</th>
                                
                                
                                
                                
                                
                                <th>Isactive</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.distribution_platforms_organizations && Array.isArray(organizations.distribution_platforms_organizations) &&
                              organizations.distribution_platforms_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/distribution_platforms/distribution_platforms-view/?id=${item.id}`)}>
                                    
                                    
                                    <td data-label="name">
                                        { item.name }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="category">
                                        { item.category }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="website_url">
                                        { item.website_url }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="is_active">
                                        { dataFormatter.booleanFormatter(item.is_active) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.distribution_platforms_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Genres organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                <th>Genrename</th>
                                
                                
                                
                                
                                
                                <th>Isactive</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.genres_organizations && Array.isArray(organizations.genres_organizations) &&
                              organizations.genres_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/genres/genres-view/?id=${item.id}`)}>
                                    
                                    
                                    <td data-label="name">
                                        { item.name }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="is_active">
                                        { dataFormatter.booleanFormatter(item.is_active) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.genres_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Releases organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>Releasetitle</th>
                                
                                
                                
                                <th>Releasetype</th>
                                
                                
                                
                                
                                
                                
                                
                                <th>Language</th>
                                
                                
                                
                                
                                
                                
                                
                                <th>Labelname</th>
                                
                                
                                
                                <th>Copyrightnotice</th>
                                
                                
                                
                                <th>Productionnotice</th>
                                
                                
                                
                                <th>UPC/EANcode</th>
                                
                                
                                
                                <th>UPCsource</th>
                                
                                
                                
                                <th>Releasedate</th>
                                
                                
                                
                                <th>Originalreleasedate</th>
                                
                                
                                
                                <th>Moderationstatus</th>
                                
                                
                                
                                <th>Moderationnotes</th>
                                
                                
                                
                                <th>Explicitcontent</th>
                                
                                
                                
                                <th>Licenseaccepted</th>
                                
                                
                                
                                <th>ContentIDenabled</th>
                                
                                
                                
                                <th>Contentmatchenabled</th>
                                
                                
                                
                                <th>Internalcatalogcode</th>
                                
                                
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.releases_organizations && Array.isArray(organizations.releases_organizations) &&
                              organizations.releases_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/releases/releases-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="title">
                                        { item.title }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="release_type">
                                        { item.release_type }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="language">
                                        { item.language }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="label_name">
                                        { item.label_name }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="copyright_notice">
                                        { item.copyright_notice }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="production_notice">
                                        { item.production_notice }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="upc_code">
                                        { item.upc_code }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="upc_source">
                                        { item.upc_source }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="release_date">
                                        { dataFormatter.dateTimeFormatter(item.release_date) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="original_release_date">
                                        { dataFormatter.dateTimeFormatter(item.original_release_date) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="moderation_status">
                                        { item.moderation_status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="moderation_notes">
                                        { item.moderation_notes }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="explicit_content">
                                        { dataFormatter.booleanFormatter(item.explicit_content) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="license_accepted">
                                        { dataFormatter.booleanFormatter(item.license_accepted) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="content_id_enabled">
                                        { dataFormatter.booleanFormatter(item.content_id_enabled) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="content_match_enabled">
                                        { dataFormatter.booleanFormatter(item.content_match_enabled) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="internal_catalog_code">
                                        { item.internal_catalog_code }
                                    </td>
                                    
                                    
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.releases_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Tracks organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>Tracktitle</th>
                                
                                
                                
                                <th>Tracknumber</th>
                                
                                
                                
                                <th>Version</th>
                                
                                
                                
                                
                                
                                <th>ISRCcode</th>
                                
                                
                                
                                <th>ISRCsource</th>
                                
                                
                                
                                
                                
                                <th>Durationseconds</th>
                                
                                
                                
                                <th>SamplerateHz</th>
                                
                                
                                
                                <th>Bitratekbps</th>
                                
                                
                                
                                <th>Audioformat</th>
                                
                                
                                
                                <th>Explicitcontent</th>
                                
                                
                                
                                <th>Lyrics</th>
                                
                                
                                
                                <th>Audiofingerprint</th>
                                
                                
                                
                                <th>Qualitystatus</th>
                                
                                
                                
                                <th>Qualitynotes</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.tracks_organizations && Array.isArray(organizations.tracks_organizations) &&
                              organizations.tracks_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/tracks/tracks-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="title">
                                        { item.title }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="track_number">
                                        { item.track_number }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="version">
                                        { item.version }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="isrc_code">
                                        { item.isrc_code }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="isrc_source">
                                        { item.isrc_source }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="duration_seconds">
                                        { item.duration_seconds }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="sample_rate_hz">
                                        { item.sample_rate_hz }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="bitrate_kbps">
                                        { item.bitrate_kbps }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="audio_format">
                                        { item.audio_format }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="explicit_content">
                                        { dataFormatter.booleanFormatter(item.explicit_content) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="lyrics">
                                        { item.lyrics }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="audio_fingerprint">
                                        { item.audio_fingerprint }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="quality_status">
                                        { item.quality_status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="quality_notes">
                                        { item.quality_notes }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.tracks_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Track_contributors organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>Contributorname</th>
                                
                                
                                
                                <th>Role</th>
                                
                                
                                
                                <th>SpotifyartistURL</th>
                                
                                
                                
                                <th>AppleartistURL</th>
                                
                                
                                
                                <th>Societyidentifier</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.track_contributors_organizations && Array.isArray(organizations.track_contributors_organizations) &&
                              organizations.track_contributors_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/track_contributors/track_contributors-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="name">
                                        { item.name }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="role">
                                        { item.role }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="spotify_artist_url">
                                        { item.spotify_artist_url }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="apple_artist_url">
                                        { item.apple_artist_url }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="society_identifier">
                                        { item.society_identifier }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.track_contributors_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Release_deliveries organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                
                                
                                <th>Deliverystatus</th>
                                
                                
                                
                                <th>Requestedat</th>
                                
                                
                                
                                <th>Sentat</th>
                                
                                
                                
                                <th>Deliveredat</th>
                                
                                
                                
                                <th>PlatformreleaseURL</th>
                                
                                
                                
                                <th>Externalreference</th>
                                
                                
                                
                                <th>Errormessage</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.release_deliveries_organizations && Array.isArray(organizations.release_deliveries_organizations) &&
                              organizations.release_deliveries_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/release_deliveries/release_deliveries-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="delivery_status">
                                        { item.delivery_status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="requested_at">
                                        { dataFormatter.dateTimeFormatter(item.requested_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="sent_at">
                                        { dataFormatter.dateTimeFormatter(item.sent_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="delivered_at">
                                        { dataFormatter.dateTimeFormatter(item.delivered_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="platform_release_url">
                                        { item.platform_release_url }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="external_reference">
                                        { item.external_reference }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="error_message">
                                        { item.error_message }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.release_deliveries_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Smart_links organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>Slug</th>
                                
                                
                                
                                <th>Pagetitle</th>
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                <th>Themecolor</th>
                                
                                
                                
                                <th>Ispublic</th>
                                
                                
                                
                                <th>Publishedat</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.smart_links_organizations && Array.isArray(organizations.smart_links_organizations) &&
                              organizations.smart_links_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/smart_links/smart_links-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="slug">
                                        { item.slug }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="page_title">
                                        { item.page_title }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="theme_color">
                                        { item.theme_color }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="is_public">
                                        { dataFormatter.booleanFormatter(item.is_public) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="published_at">
                                        { dataFormatter.dateTimeFormatter(item.published_at) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.smart_links_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Smart_link_destinations organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                
                                
                                <th>DestinationURL</th>
                                
                                
                                
                                <th>Sortorder</th>
                                
                                
                                
                                <th>Isprimary</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.smart_link_destinations_organizations && Array.isArray(organizations.smart_link_destinations_organizations) &&
                              organizations.smart_link_destinations_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/smart_link_destinations/smart_link_destinations-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="destination_url">
                                        { item.destination_url }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="sort_order">
                                        { item.sort_order }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="is_primary">
                                        { dataFormatter.booleanFormatter(item.is_primary) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.smart_link_destinations_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Smart_link_clicks organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                
                                
                                <th>Clickedat</th>
                                
                                
                                
                                <th>Country</th>
                                
                                
                                
                                <th>City</th>
                                
                                
                                
                                <th>Referrer</th>
                                
                                
                                
                                <th>UTMsource</th>
                                
                                
                                
                                <th>UTMcampaign</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.smart_link_clicks_organizations && Array.isArray(organizations.smart_link_clicks_organizations) &&
                              organizations.smart_link_clicks_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/smart_link_clicks/smart_link_clicks-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="clicked_at">
                                        { dataFormatter.dateTimeFormatter(item.clicked_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="country">
                                        { item.country }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="city">
                                        { item.city }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="referrer">
                                        { item.referrer }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="utm_source">
                                        { item.utm_source }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="utm_campaign">
                                        { item.utm_campaign }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.smart_link_clicks_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Playlists organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                <th>Playlistname</th>
                                
                                
                                
                                
                                
                                <th>Playlisttype</th>
                                
                                
                                
                                <th>Curatorname</th>
                                
                                
                                
                                <th>PlaylistURL</th>
                                
                                
                                
                                <th>Genrefocus</th>
                                
                                
                                
                                <th>Moodtags</th>
                                
                                
                                
                                <th>Isactive</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.playlists_organizations && Array.isArray(organizations.playlists_organizations) &&
                              organizations.playlists_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/playlists/playlists-view/?id=${item.id}`)}>
                                    
                                    
                                    <td data-label="name">
                                        { item.name }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="playlist_type">
                                        { item.playlist_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="curator_name">
                                        { item.curator_name }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="playlist_url">
                                        { item.playlist_url }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="genre_focus">
                                        { item.genre_focus }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="mood_tags">
                                        { item.mood_tags }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="is_active">
                                        { dataFormatter.booleanFormatter(item.is_active) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.playlists_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Pitch_requests organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                
                                
                                
                                
                                <th>Pitchtitle</th>
                                
                                
                                
                                
                                
                                <th>Mood</th>
                                
                                
                                
                                <th>Similarartists</th>
                                
                                
                                
                                <th>Achievements</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                <th>Submittedat</th>
                                
                                
                                
                                <th>Decidedat</th>
                                
                                
                                
                                <th>Decisionnotes</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.pitch_requests_organizations && Array.isArray(organizations.pitch_requests_organizations) &&
                              organizations.pitch_requests_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/pitch_requests/pitch_requests-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="pitch_title">
                                        { item.pitch_title }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="mood">
                                        { item.mood }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="similar_artists">
                                        { item.similar_artists }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="achievements">
                                        { item.achievements }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="submitted_at">
                                        { dataFormatter.dateTimeFormatter(item.submitted_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="decided_at">
                                        { dataFormatter.dateTimeFormatter(item.decided_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="decision_notes">
                                        { item.decision_notes }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.pitch_requests_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Playlist_placements organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                
                                
                                <th>Placedat</th>
                                
                                
                                
                                <th>Removedat</th>
                                
                                
                                
                                <th>Position</th>
                                
                                
                                
                                <th>Notes</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.playlist_placements_organizations && Array.isArray(organizations.playlist_placements_organizations) &&
                              organizations.playlist_placements_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/playlist_placements/playlist_placements-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="placed_at">
                                        { dataFormatter.dateTimeFormatter(item.placed_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="removed_at">
                                        { dataFormatter.dateTimeFormatter(item.removed_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="position">
                                        { item.position }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="notes">
                                        { item.notes }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.playlist_placements_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Royalty_reports organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                
                                
                                <th>Periodstartat</th>
                                
                                
                                
                                <th>Periodendat</th>
                                
                                
                                
                                <th>Sourcetype</th>
                                
                                
                                
                                
                                
                                <th>Sourcereference</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                <th>Errordetails</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.royalty_reports_organizations && Array.isArray(organizations.royalty_reports_organizations) &&
                              organizations.royalty_reports_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/royalty_reports/royalty_reports-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    
                                    
                                    <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>
                                    
                                    
                                    
                                    <td data-label="source_type">
                                        { item.source_type }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="source_reference">
                                        { item.source_reference }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="error_details">
                                        { item.error_details }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.royalty_reports_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Royalty_lines organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                
                                
                                
                                
                                <th>Territory</th>
                                
                                
                                
                                <th>Storename</th>
                                
                                
                                
                                <th>Quantity</th>
                                
                                
                                
                                <th>Unitrate</th>
                                
                                
                                
                                <th>Grossamount</th>
                                
                                
                                
                                <th>Netamount</th>
                                
                                
                                
                                <th>Currency</th>
                                
                                
                                
                                <th>Eventat</th>
                                
                                
                                
                                <th>Usagetype</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.royalty_lines_organizations && Array.isArray(organizations.royalty_lines_organizations) &&
                              organizations.royalty_lines_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/royalty_lines/royalty_lines-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="territory">
                                        { item.territory }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="store_name">
                                        { item.store_name }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="quantity">
                                        { item.quantity }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="unit_rate">
                                        { item.unit_rate }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="gross_amount">
                                        { item.gross_amount }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="net_amount">
                                        { item.net_amount }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="currency">
                                        { item.currency }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="event_at">
                                        { dataFormatter.dateTimeFormatter(item.event_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="usage_type">
                                        { item.usage_type }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.royalty_lines_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Wallets organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>Currency</th>
                                
                                
                                
                                <th>Availablebalance</th>
                                
                                
                                
                                <th>Pendingbalance</th>
                                
                                
                                
                                <th>Lifetimeearned</th>
                                
                                
                                
                                <th>Lifetimepaidout</th>
                                
                                
                                
                                <th>Minimumwithdrawalamount</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.wallets_organizations && Array.isArray(organizations.wallets_organizations) &&
                              organizations.wallets_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/wallets/wallets-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="currency">
                                        { item.currency }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="available_balance">
                                        { item.available_balance }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="pending_balance">
                                        { item.pending_balance }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="lifetime_earned">
                                        { item.lifetime_earned }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="lifetime_paid_out">
                                        { item.lifetime_paid_out }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="minimum_withdrawal_amount">
                                        { item.minimum_withdrawal_amount }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.wallets_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Wallet_transactions organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>Transactiontype</th>
                                
                                
                                
                                <th>Amount</th>
                                
                                
                                
                                <th>Currency</th>
                                
                                
                                
                                <th>Postedat</th>
                                
                                
                                
                                <th>Description</th>
                                
                                
                                
                                <th>Externalreference</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.wallet_transactions_organizations && Array.isArray(organizations.wallet_transactions_organizations) &&
                              organizations.wallet_transactions_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/wallet_transactions/wallet_transactions-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="transaction_type">
                                        { item.transaction_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="amount">
                                        { item.amount }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="currency">
                                        { item.currency }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="posted_at">
                                        { dataFormatter.dateTimeFormatter(item.posted_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="description">
                                        { item.description }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="external_reference">
                                        { item.external_reference }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.wallet_transactions_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Payout_methods organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>Methodtype</th>
                                
                                
                                
                                <th>Methodlabel</th>
                                
                                
                                
                                <th>Accountidentifier</th>
                                
                                
                                
                                <th>Holdername</th>
                                
                                
                                
                                <th>Country</th>
                                
                                
                                
                                <th>Isdefault</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.payout_methods_organizations && Array.isArray(organizations.payout_methods_organizations) &&
                              organizations.payout_methods_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/payout_methods/payout_methods-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="method_type">
                                        { item.method_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="method_label">
                                        { item.method_label }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="account_identifier">
                                        { item.account_identifier }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="holder_name">
                                        { item.holder_name }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="country">
                                        { item.country }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="is_default">
                                        { dataFormatter.booleanFormatter(item.is_default) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.payout_methods_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Withdrawal_requests organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                
                                
                                <th>Amount</th>
                                
                                
                                
                                <th>Currency</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                <th>Requestedat</th>
                                
                                
                                
                                <th>Processedat</th>
                                
                                
                                
                                <th>Processorreference</th>
                                
                                
                                
                                <th>Failurereason</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.withdrawal_requests_organizations && Array.isArray(organizations.withdrawal_requests_organizations) &&
                              organizations.withdrawal_requests_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/withdrawal_requests/withdrawal_requests-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="amount">
                                        { item.amount }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="currency">
                                        { item.currency }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="requested_at">
                                        { dataFormatter.dateTimeFormatter(item.requested_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="processed_at">
                                        { dataFormatter.dateTimeFormatter(item.processed_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="processor_reference">
                                        { item.processor_reference }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="failure_reason">
                                        { item.failure_reason }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.withdrawal_requests_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Tax_documents organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>Documenttype</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                <th>Issuedat</th>
                                
                                
                                
                                <th>Expiresat</th>
                                
                                
                                
                                
                                
                                <th>Notes</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.tax_documents_organizations && Array.isArray(organizations.tax_documents_organizations) &&
                              organizations.tax_documents_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/tax_documents/tax_documents-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="document_type">
                                        { item.document_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="issued_at">
                                        { dataFormatter.dateTimeFormatter(item.issued_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="expires_at">
                                        { dataFormatter.dateTimeFormatter(item.expires_at) }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="notes">
                                        { item.notes }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.tax_documents_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Analytics_daily organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                <th>Metricdate</th>
                                
                                
                                
                                <th>Streams</th>
                                
                                
                                
                                <th>Uniquelisteners</th>
                                
                                
                                
                                <th>Saves</th>
                                
                                
                                
                                <th>Likes</th>
                                
                                
                                
                                <th>Shares</th>
                                
                                
                                
                                <th>Country</th>
                                
                                
                                
                                <th>City</th>
                                
                                
                                
                                <th>Trafficsource</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.analytics_daily_organizations && Array.isArray(organizations.analytics_daily_organizations) &&
                              organizations.analytics_daily_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/analytics_daily/analytics_daily-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="metric_date">
                                        { dataFormatter.dateTimeFormatter(item.metric_date) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="streams">
                                        { item.streams }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="unique_listeners">
                                        { item.unique_listeners }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="saves">
                                        { item.saves }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="likes">
                                        { item.likes }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="shares">
                                        { item.shares }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="country">
                                        { item.country }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="city">
                                        { item.city }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="traffic_source">
                                        { item.traffic_source }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.analytics_daily_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Notifications organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>Channel</th>
                                
                                
                                
                                <th>Eventtype</th>
                                
                                
                                
                                <th>Title</th>
                                
                                
                                
                                <th>Message</th>
                                
                                
                                
                                <th>Scheduledat</th>
                                
                                
                                
                                <th>Sentat</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                <th>Providerreference</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.notifications_organizations && Array.isArray(organizations.notifications_organizations) &&
                              organizations.notifications_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/notifications/notifications-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="channel">
                                        { item.channel }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="event_type">
                                        { item.event_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="title">
                                        { item.title }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="message">
                                        { item.message }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="scheduled_at">
                                        { dataFormatter.dateTimeFormatter(item.scheduled_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="sent_at">
                                        { dataFormatter.dateTimeFormatter(item.sent_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="provider_reference">
                                        { item.provider_reference }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.notifications_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Notification_preferences organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>Emailenabled</th>
                                
                                
                                
                                <th>Pushenabled</th>
                                
                                
                                
                                <th>Telegramenabled</th>
                                
                                
                                
                                <th>SMSenabled</th>
                                
                                
                                
                                <th>Inappenabled</th>
                                
                                
                                
                                <th>Releaseupdatesenabled</th>
                                
                                
                                
                                <th>Financeupdatesenabled</th>
                                
                                
                                
                                <th>Playlistupdatesenabled</th>
                                
                                
                                
                                <th>Marketingupdatesenabled</th>
                                
                                
                                
                                <th>Quiethours</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.notification_preferences_organizations && Array.isArray(organizations.notification_preferences_organizations) &&
                              organizations.notification_preferences_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/notification_preferences/notification_preferences-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="email_enabled">
                                        { dataFormatter.booleanFormatter(item.email_enabled) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="push_enabled">
                                        { dataFormatter.booleanFormatter(item.push_enabled) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="telegram_enabled">
                                        { dataFormatter.booleanFormatter(item.telegram_enabled) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="sms_enabled">
                                        { dataFormatter.booleanFormatter(item.sms_enabled) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="in_app_enabled">
                                        { dataFormatter.booleanFormatter(item.in_app_enabled) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="release_updates_enabled">
                                        { dataFormatter.booleanFormatter(item.release_updates_enabled) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="finance_updates_enabled">
                                        { dataFormatter.booleanFormatter(item.finance_updates_enabled) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="playlist_updates_enabled">
                                        { dataFormatter.booleanFormatter(item.playlist_updates_enabled) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="marketing_updates_enabled">
                                        { dataFormatter.booleanFormatter(item.marketing_updates_enabled) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="quiet_hours">
                                        { item.quiet_hours }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.notification_preferences_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Api_keys organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>Keyname</th>
                                
                                
                                
                                <th>Keyprefix</th>
                                
                                
                                
                                <th>Keyhash</th>
                                
                                
                                
                                <th>Scopes</th>
                                
                                
                                
                                <th>Lastusedat</th>
                                
                                
                                
                                <th>Expiresat</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.api_keys_organizations && Array.isArray(organizations.api_keys_organizations) &&
                              organizations.api_keys_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/api_keys/api_keys-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="name">
                                        { item.name }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="key_prefix">
                                        { item.key_prefix }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="key_hash">
                                        { item.key_hash }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="scopes">
                                        { item.scopes }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="last_used_at">
                                        { dataFormatter.dateTimeFormatter(item.last_used_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="expires_at">
                                        { dataFormatter.dateTimeFormatter(item.expires_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.api_keys_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Dashboard_widgets organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>Widgettype</th>
                                
                                
                                
                                <th>Sortorder</th>
                                
                                
                                
                                <th>Isvisible</th>
                                
                                
                                
                                <th>SettingsJSON</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.dashboard_widgets_organizations && Array.isArray(organizations.dashboard_widgets_organizations) &&
                              organizations.dashboard_widgets_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/dashboard_widgets/dashboard_widgets-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="widget_type">
                                        { item.widget_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="sort_order">
                                        { item.sort_order }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="is_visible">
                                        { dataFormatter.booleanFormatter(item.is_visible) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="settings_json">
                                        { item.settings_json }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.dashboard_widgets_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Activity_events organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>Eventkind</th>
                                
                                
                                
                                <th>Headline</th>
                                
                                
                                
                                <th>Details</th>
                                
                                
                                
                                <th>Occurredat</th>
                                
                                
                                
                                <th>Entityname</th>
                                
                                
                                
                                <th>Entitykey</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.activity_events_organizations && Array.isArray(organizations.activity_events_organizations) &&
                              organizations.activity_events_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/activity_events/activity_events-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="event_kind">
                                        { item.event_kind }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="headline">
                                        { item.headline }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="details">
                                        { item.details }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="occurred_at">
                                        { dataFormatter.dateTimeFormatter(item.occurred_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="entity_name">
                                        { item.entity_name }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="entity_key">
                                        { item.entity_key }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.activity_events_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Blog_posts organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                <th>Title</th>
                                
                                
                                
                                <th>Slug</th>
                                
                                
                                
                                <th>Category</th>
                                
                                
                                
                                
                                
                                <th>Excerpt</th>
                                
                                
                                
                                
                                
                                <th>Ispublished</th>
                                
                                
                                
                                <th>Publishedat</th>
                                
                                
                                
                                <th>SEOtitle</th>
                                
                                
                                
                                <th>SEOdescription</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.blog_posts_organizations && Array.isArray(organizations.blog_posts_organizations) &&
                              organizations.blog_posts_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/blog_posts/blog_posts-view/?id=${item.id}`)}>
                                    
                                    
                                    <td data-label="title">
                                        { item.title }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="slug">
                                        { item.slug }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="category">
                                        { item.category }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="excerpt">
                                        { item.excerpt }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="is_published">
                                        { dataFormatter.booleanFormatter(item.is_published) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="published_at">
                                        { dataFormatter.dateTimeFormatter(item.published_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="seo_title">
                                        { item.seo_title }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="seo_description">
                                        { item.seo_description }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.blog_posts_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Faq_items organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                <th>Category</th>
                                
                                
                                
                                <th>Question</th>
                                
                                
                                
                                
                                
                                <th>Sortorder</th>
                                
                                
                                
                                <th>Ispublished</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.faq_items_organizations && Array.isArray(organizations.faq_items_organizations) &&
                              organizations.faq_items_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/faq_items/faq_items-view/?id=${item.id}`)}>
                                    
                                    
                                    <td data-label="category">
                                        { item.category }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="question">
                                        { item.question }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="sort_order">
                                        { item.sort_order }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="is_published">
                                        { dataFormatter.booleanFormatter(item.is_published) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.faq_items_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Contact_messages organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                <th>Name</th>
                                
                                
                                
                                <th>Email</th>
                                
                                
                                
                                <th>Subject</th>
                                
                                
                                
                                <th>Message</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                <th>Submittedat</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.contact_messages_organizations && Array.isArray(organizations.contact_messages_organizations) &&
                              organizations.contact_messages_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/contact_messages/contact_messages-view/?id=${item.id}`)}>
                                    
                                    
                                    <td data-label="name">
                                        { item.name }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="email">
                                        { item.email }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="subject">
                                        { item.subject }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="message">
                                        { item.message }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="submitted_at">
                                        { dataFormatter.dateTimeFormatter(item.submitted_at) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.contact_messages_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Referral_programs organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                <th>Programname</th>
                                
                                
                                
                                <th>Commissionpercent</th>
                                
                                
                                
                                <th>Validitydays</th>
                                
                                
                                
                                <th>Startsat</th>
                                
                                
                                
                                <th>Endsat</th>
                                
                                
                                
                                <th>Isactive</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.referral_programs_organizations && Array.isArray(organizations.referral_programs_organizations) &&
                              organizations.referral_programs_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/referral_programs/referral_programs-view/?id=${item.id}`)}>
                                    
                                    
                                    <td data-label="name">
                                        { item.name }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="commission_percent">
                                        { item.commission_percent }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="validity_days">
                                        { item.validity_days }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="starts_at">
                                        { dataFormatter.dateTimeFormatter(item.starts_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="ends_at">
                                        { dataFormatter.dateTimeFormatter(item.ends_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="is_active">
                                        { dataFormatter.booleanFormatter(item.is_active) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.referral_programs_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Referral_links organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                
                                
                                <th>Code</th>
                                
                                
                                
                                <th>LandingURL</th>
                                
                                
                                
                                <th>Isactive</th>
                                
                                
                                
                                <th>Createdon</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.referral_links_organizations && Array.isArray(organizations.referral_links_organizations) &&
                              organizations.referral_links_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/referral_links/referral_links-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="code">
                                        { item.code }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="landing_url">
                                        { item.landing_url }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="is_active">
                                        { dataFormatter.booleanFormatter(item.is_active) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="created_on">
                                        { dataFormatter.dateTimeFormatter(item.created_on) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.referral_links_organizations?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Referral_conversions organizations</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                
                                
                                <th>Convertedat</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                <th>Commissionamount</th>
                                
                                
                                
                                <th>Currency</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {organizations.referral_conversions_organizations && Array.isArray(organizations.referral_conversions_organizations) &&
                              organizations.referral_conversions_organizations.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/referral_conversions/referral_conversions-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="converted_at">
                                        { dataFormatter.dateTimeFormatter(item.converted_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="commission_amount">
                                        { item.commission_amount }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="currency">
                                        { item.currency }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!organizations?.referral_conversions_organizations?.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;