import React from 'react'; import CardBox from '../CardBox'; import ImageField from '../ImageField'; import dataFormatter from '../../helpers/dataFormatter'; import {saveFile} from "../../helpers/fileSaver"; import ListActionsPopover from "../ListActionsPopover"; import {useAppSelector} from "../../stores/hooks"; import {Pagination} from "../Pagination"; import LoadingSpinner from "../LoadingSpinner"; import Link from 'next/link'; import {hasPermission} from "../../helpers/userPermissions"; type Props = { fee_plans: any[]; loading: boolean; onDelete: (id: string) => void; currentPage: number; numPages: number; onPageChange: (page: number) => void; }; const ListFee_plans = ({ fee_plans, loading, onDelete, currentPage, numPages, onPageChange }: Props) => { const currentUser = useAppSelector((state) => state.auth.currentUser); const hasUpdatePermission = hasPermission(currentUser, 'UPDATE_FEE_PLANS') const corners = useAppSelector((state) => state.style.corners); const bgColor = useAppSelector((state) => state.style.cardsColor); return ( <>
{loading && } {!loading && fee_plans.map((item) => (
dark:divide-dark-700 overflow-x-auto' } >

Organization

{ dataFormatter.organizationsOneListFormatter(item.organization) }

AcademicYear

{ dataFormatter.academic_yearsOneListFormatter(item.academic_year) }

Grade

{ dataFormatter.gradesOneListFormatter(item.grade) }

FeePlanName

{ item.name }

BillingCycle

{ item.billing_cycle }

TotalAmount

{ item.total_amount }

Active

{ dataFormatter.booleanFormatter(item.active) }

Notes

{ item.notes }

))} {!loading && fee_plans.length === 0 && (

No data to display

)}
) }; export default ListFee_plans