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/payroll_runs/payroll_runsSlice'
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";


const Payroll_runsView = () => {
    const router = useRouter()
    const dispatch = useAppDispatch()
    const { payroll_runs } = useAppSelector((state) => state.payroll_runs)
    

    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 payroll_runs')}</title>
          </Head>
          <SectionMain>
            <SectionTitleLineWithButton icon={mdiChartTimelineVariant} title={removeLastCharacter('View payroll_runs')} main>
                <BaseButton
                  color='info'
                  label='Edit'
                  href={`/payroll_runs/payroll_runs-edit/?id=${id}`}
                />
            </SectionTitleLineWithButton>
            <CardBox>
            

              

              

              

              

              

              
                <FormField label='PeriodFrom'>
                    {payroll_runs.periodFrom ? <DatePicker
                      dateFormat="yyyy-MM-dd hh:mm"
                      showTimeSelect
                      selected={payroll_runs.periodFrom ?
                        new Date(
                          dayjs(payroll_runs.periodFrom).format('YYYY-MM-DD hh:mm'),
                        ) : null
                      }
                      disabled
                    /> : <p>No PeriodFrom</p>}
                </FormField>
              

              

              

              

              

              

              

              
              

              

              

              

              

              

              
                <FormField label='PeriodTo'>
                    {payroll_runs.periodTo ? <DatePicker
                      dateFormat="yyyy-MM-dd hh:mm"
                      showTimeSelect
                      selected={payroll_runs.periodTo ?
                        new Date(
                          dayjs(payroll_runs.periodTo).format('YYYY-MM-DD hh:mm'),
                        ) : null
                      }
                      disabled
                    /> : <p>No PeriodTo</p>}
                </FormField>
              

              

              

              

              

              

              

              
              

              

              

              

              

              

              

              

              
                <div className={'mb-4'}>
                    <p className={'block font-bold mb-2'}>PayrollType</p>
                    <p>{payroll_runs?.payrollType ?? 'No data'}</p>
                </div>
              

              

              

              

              

              
              

              

              

              

              

              

              

              

              
                <div className={'mb-4'}>
                    <p className={'block font-bold mb-2'}>Status</p>
                    <p>{payroll_runs?.status ?? 'No data'}</p>
                </div>
              

              

              

              

              

              
              

              

              

              

              

              

              
                <FormField label='LockedAt'>
                    {payroll_runs.lockedAt ? <DatePicker
                      dateFormat="yyyy-MM-dd hh:mm"
                      showTimeSelect
                      selected={payroll_runs.lockedAt ?
                        new Date(
                          dayjs(payroll_runs.lockedAt).format('YYYY-MM-DD hh:mm'),
                        ) : null
                      }
                      disabled
                    /> : <p>No LockedAt</p>}
                </FormField>
              

              

              

              

              

              

              

              
              

              

              

              

              

              

              
                <FormField label='ComputedAt'>
                    {payroll_runs.computedAt ? <DatePicker
                      dateFormat="yyyy-MM-dd hh:mm"
                      showTimeSelect
                      selected={payroll_runs.computedAt ?
                        new Date(
                          dayjs(payroll_runs.computedAt).format('YYYY-MM-DD hh:mm'),
                        ) : null
                      }
                      disabled
                    /> : <p>No ComputedAt</p>}
                </FormField>
              

              

              

              

              

              

              

              
              

              

              

              

              

              

              
                <FormField label='ApprovedAt'>
                    {payroll_runs.approvedAt ? <DatePicker
                      dateFormat="yyyy-MM-dd hh:mm"
                      showTimeSelect
                      selected={payroll_runs.approvedAt ?
                        new Date(
                          dayjs(payroll_runs.approvedAt).format('YYYY-MM-DD hh:mm'),
                        ) : null
                      }
                      disabled
                    /> : <p>No ApprovedAt</p>}
                </FormField>
              

              

              

              

              

              

              

              
              

              

              

              

              

              

              
                <FormField label='PostedAt'>
                    {payroll_runs.postedAt ? <DatePicker
                      dateFormat="yyyy-MM-dd hh:mm"
                      showTimeSelect
                      selected={payroll_runs.postedAt ?
                        new Date(
                          dayjs(payroll_runs.postedAt).format('YYYY-MM-DD hh:mm'),
                        ) : null
                      }
                      disabled
                    /> : <p>No PostedAt</p>}
                </FormField>
              

              

              

              

              

              

              

              
              

              

              

              

              

              

              

              

              

              

              
              
                <div className={'mb-4'}>
                    <p className={'block font-bold mb-2'}>ApprovedBy</p>
                    
                    
                        <p>{payroll_runs?.approvedByUser?.firstName ?? 'No data'}</p>
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                </div>
                 
              

              

              

              
              

              

              

              

              

              

              

              

              

              

              
              
                <div className={'mb-4'}>
                    <p className={'block font-bold mb-2'}>PostedBy</p>
                    
                    
                        <p>{payroll_runs?.postedByUser?.firstName ?? 'No data'}</p>
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                </div>
                 
              

              

              

              
              

              

              
                <FormField label='Multi Text' hasTextareaHeight>
                  <textarea className={'w-full'} disabled value={payroll_runs?.notes} />
                </FormField>
              

              

              

              

              

              

              

              

              

              

              

              
              

              

              

              

              

              

              

              

              

              

              
              
                <div className={'mb-4'}>
                    <p className={'block font-bold mb-2'}>JournalEntry</p>
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                        <p>{payroll_runs?.journalEntry?.entryNumber ?? 'No data'}</p>
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                </div>
                 
              

              

              

              
              

                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                <>
                    <p className={'block font-bold mb-2'}>Time_records PayrollRun</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                
                                
                                <th>WorkDate</th>
                                
                                
                                
                                <th>ScheduledTimeIn</th>
                                
                                
                                
                                <th>ScheduledTimeOut</th>
                                
                                
                                
                                <th>ActualTimeIn</th>
                                
                                
                                
                                <th>ActualTimeOut</th>
                                
                                
                                
                                <th>TardinessMinutes</th>
                                
                                
                                
                                <th>UndertimeMinutes</th>
                                
                                
                                
                                <th>OvertimeMinutes</th>
                                
                                
                                
                                <th>NightDiffHours</th>
                                
                                
                                
                                <th>WorkType</th>
                                
                                
                                
                                <th>IsAbsent</th>
                                
                                
                                
                                <th>IsHalfDay</th>
                                
                                
                                
                                <th>HalfDayType</th>
                                
                                
                                
                                <th>Source</th>
                                
                                
                                
                                
                                
                                <th>ModificationReason</th>
                                
                                
                                
                                
                                
                                <th>ApprovedAt</th>
                                
                                
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {payroll_runs.time_records_payrollRun && Array.isArray(payroll_runs.time_records_payrollRun) &&
                              payroll_runs.time_records_payrollRun.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/time_records/time_records-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="workDate">
                                        { dataFormatter.dateTimeFormatter(item.workDate) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="scheduledTimeIn">
                                        { item.scheduledTimeIn }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="scheduledTimeOut">
                                        { item.scheduledTimeOut }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="actualTimeIn">
                                        { dataFormatter.dateTimeFormatter(item.actualTimeIn) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="actualTimeOut">
                                        { dataFormatter.dateTimeFormatter(item.actualTimeOut) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="tardinessMinutes">
                                        { item.tardinessMinutes }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="undertimeMinutes">
                                        { item.undertimeMinutes }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="overtimeMinutes">
                                        { item.overtimeMinutes }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="nightDiffHours">
                                        { item.nightDiffHours }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="workType">
                                        { item.workType }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="isAbsent">
                                        { dataFormatter.booleanFormatter(item.isAbsent) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="isHalfDay">
                                        { dataFormatter.booleanFormatter(item.isHalfDay) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="halfDayType">
                                        { item.halfDayType }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="source">
                                        { item.source }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="modificationReason">
                                        { item.modificationReason }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="approvedAt">
                                        { dataFormatter.dateTimeFormatter(item.approvedAt) }
                                    </td>
                                    
                                    
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!payroll_runs?.time_records_payrollRun?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                
                
                
                
                
                
                
                <>
                    <p className={'block font-bold mb-2'}>Payroll_items PayrollRun</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                
                                
                                <th>RegularDaysWorked</th>
                                
                                
                                
                                <th>AbsentDays</th>
                                
                                
                                
                                <th>TardinessMinutes</th>
                                
                                
                                
                                <th>OvertimeHours</th>
                                
                                
                                
                                <th>NightDiffHours</th>
                                
                                
                                
                                <th>HolidayDaysWorked</th>
                                
                                
                                
                                <th>BasicPay</th>
                                
                                
                                
                                <th>OvertimePay</th>
                                
                                
                                
                                <th>NightDifferential</th>
                                
                                
                                
                                <th>HolidayPay</th>
                                
                                
                                
                                <th>Allowances</th>
                                
                                
                                
                                <th>OtherEarnings</th>
                                
                                
                                
                                <th>GrossPay</th>
                                
                                
                                
                                <th>SSSEmployee</th>
                                
                                
                                
                                <th>PhilHealthEmployee</th>
                                
                                
                                
                                <th>PagIbigEmployee</th>
                                
                                
                                
                                <th>WithholdingTax</th>
                                
                                
                                
                                <th>SSSEmployer</th>
                                
                                
                                
                                <th>PhilHealthEmployer</th>
                                
                                
                                
                                <th>PagIbigEmployer</th>
                                
                                
                                
                                <th>SSSLoanDeduction</th>
                                
                                
                                
                                <th>PagIbigLoanDeduction</th>
                                
                                
                                
                                <th>CompanyLoanDeduction</th>
                                
                                
                                
                                <th>OtherDeductions</th>
                                
                                
                                
                                <th>TotalDeductions</th>
                                
                                
                                
                                <th>NetPay</th>
                                
                                
                                
                                <th>YTDGrossPay</th>
                                
                                
                                
                                <th>YTDWithholdingTax</th>
                                
                                
                                
                                <th>YTDSSSEmployee</th>
                                
                                
                                
                                <th>YTDPhilHealthEmployee</th>
                                
                                
                                
                                <th>YTDPagIbigEmployee</th>
                                
                                
                                
                                <th>YTDBasicPay</th>
                                
                                
                                
                                <th>PayslipHash</th>
                                
                                
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {payroll_runs.payroll_items_payrollRun && Array.isArray(payroll_runs.payroll_items_payrollRun) &&
                              payroll_runs.payroll_items_payrollRun.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/payroll_items/payroll_items-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="regularDaysWorked">
                                        { item.regularDaysWorked }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="absentDays">
                                        { item.absentDays }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="tardinessMinutes">
                                        { item.tardinessMinutes }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="overtimeHours">
                                        { item.overtimeHours }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="nightDiffHours">
                                        { item.nightDiffHours }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="holidayDaysWorked">
                                        { item.holidayDaysWorked }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="basicPay">
                                        { item.basicPay }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="overtimePay">
                                        { item.overtimePay }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="nightDifferential">
                                        { item.nightDifferential }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="holidayPay">
                                        { item.holidayPay }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="allowances">
                                        { item.allowances }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="otherEarnings">
                                        { item.otherEarnings }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="grossPay">
                                        { item.grossPay }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="sssEmployee">
                                        { item.sssEmployee }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="philhealthEmployee">
                                        { item.philhealthEmployee }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="pagibigEmployee">
                                        { item.pagibigEmployee }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="withholdingTax">
                                        { item.withholdingTax }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="sssEmployer">
                                        { item.sssEmployer }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="philhealthEmployer">
                                        { item.philhealthEmployer }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="pagibigEmployer">
                                        { item.pagibigEmployer }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="sssLoanDeduction">
                                        { item.sssLoanDeduction }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="pagibigLoanDeduction">
                                        { item.pagibigLoanDeduction }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="companyLoanDeduction">
                                        { item.companyLoanDeduction }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="otherDeductions">
                                        { item.otherDeductions }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="totalDeductions">
                                        { item.totalDeductions }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="netPay">
                                        { item.netPay }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="ytdGrossPay">
                                        { item.ytdGrossPay }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="ytdWithholdingTax">
                                        { item.ytdWithholdingTax }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="ytdSssEmployee">
                                        { item.ytdSssEmployee }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="ytdPhilhealthEmployee">
                                        { item.ytdPhilhealthEmployee }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="ytdPagibigEmployee">
                                        { item.ytdPagibigEmployee }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="ytdBasicPay">
                                        { item.ytdBasicPay }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="payslipHash">
                                        { item.payslipHash }
                                    </td>
                                    
                                    
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!payroll_runs?.payroll_items_payrollRun?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Bank_files PayrollRun</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>BankCode</th>
                                
                                
                                
                                <th>FileFormat</th>
                                
                                
                                
                                
                                
                                <th>TotalAmount</th>
                                
                                
                                
                                <th>RecordCount</th>
                                
                                
                                
                                
                                
                                <th>GeneratedAt</th>
                                
                                
                                
                                <th>SubmittedAt</th>
                                
                                
                                
                                <th>FileHash</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {payroll_runs.bank_files_payrollRun && Array.isArray(payroll_runs.bank_files_payrollRun) &&
                              payroll_runs.bank_files_payrollRun.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/bank_files/bank_files-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="bankCode">
                                        { item.bankCode }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="fileFormat">
                                        { item.fileFormat }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="totalAmount">
                                        { item.totalAmount }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="recordCount">
                                        { item.recordCount }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="generatedAt">
                                        { dataFormatter.dateTimeFormatter(item.generatedAt) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="submittedAt">
                                        { dataFormatter.dateTimeFormatter(item.submittedAt) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="fileHash">
                                        { item.fileHash }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!payroll_runs?.bank_files_payrollRun?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                
                <>
                    <p className={'block font-bold mb-2'}>Journal_entries PayrollRun</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                <th>EntryNumber</th>
                                
                                
                                
                                <th>EntryDate</th>
                                
                                
                                
                                <th>JournalType</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                <th>Description</th>
                                
                                
                                
                                <th>Reference</th>
                                
                                
                                
                                
                                
                                
                                
                                <th>PostedAt</th>
                                
                                
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {payroll_runs.journal_entries_payrollRun && Array.isArray(payroll_runs.journal_entries_payrollRun) &&
                              payroll_runs.journal_entries_payrollRun.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/journal_entries/journal_entries-view/?id=${item.id}`)}>
                                    
                                    
                                    <td data-label="entryNumber">
                                        { item.entryNumber }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="entryDate">
                                        { dataFormatter.dateTimeFormatter(item.entryDate) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="journalType">
                                        { item.journalType }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="description">
                                        { item.description }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="reference">
                                        { item.reference }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="postedAt">
                                        { dataFormatter.dateTimeFormatter(item.postedAt) }
                                    </td>
                                    
                                    
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!payroll_runs?.journal_entries_payrollRun?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                

                <BaseDivider />

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

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

export default Payroll_runsView;