diff --git a/src/components/Payroll/PayrollOverview/PayrollOverviewPresentation.tsx b/src/components/Payroll/PayrollOverview/PayrollOverviewPresentation.tsx index 78814d180..ac9c8a126 100644 --- a/src/components/Payroll/PayrollOverview/PayrollOverviewPresentation.tsx +++ b/src/components/Payroll/PayrollOverview/PayrollOverviewPresentation.tsx @@ -12,7 +12,7 @@ import type { PayrollFlowAlert } from '../PayrollFlow/PayrollFlowComponents' import { calculateTotalPayroll } from '../helpers' import { FastAchSubmissionBlockerBanner, GenericBlocker } from './SubmissionBlockers' import styles from './PayrollOverviewPresentation.module.scss' -import { DataView, Flex, FlexItem, PayrollLoading } from '@/components/Common' +import { DataView, Flex, Grid, PayrollLoading } from '@/components/Common' import { useContainerBreakpoints } from '@/hooks/useContainerBreakpoints/useContainerBreakpoints' import { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext' import { useI18n } from '@/i18n' @@ -229,22 +229,24 @@ export const PayrollOverviewPresentation = ({ ), }, ] - if (isProcessed) { + if (isProcessed && isDesktop) { companyPaysColumns.push({ key: 'paystubs', title: t('tableHeaders.paystub'), render: (employeeCompensations: EmployeeCompensations) => ( - { - if (employeeCompensations.employeeUuid) { - onPaystubDownload(employeeCompensations.employeeUuid) - } - }} - > - - + + { + if (employeeCompensations.employeeUuid) { + onPaystubDownload(employeeCompensations.employeeUuid) + } + }} + > + + + ), }) } @@ -257,6 +259,23 @@ export const PayrollOverviewPresentation = ({ label={t('dataViews.companyPaysTable')} columns={companyPaysColumns} data={payrollData.employeeCompensations!} + itemMenu={ + isProcessed && !isDesktop + ? (employeeCompensations: EmployeeCompensations) => ( + { + if (employeeCompensations.employeeUuid) { + onPaystubDownload(employeeCompensations.employeeUuid) + } + }} + > + + + ) + : undefined + } footer={() => ({ employeeName: ( <> @@ -538,16 +557,50 @@ export const PayrollOverviewPresentation = ({ }, ] + const actions = isProcessed ? ( + <> + + + + ) : ( + <> + + + + ) + return (
- - + + {isProcessed ? t('summaryTitle') : t('overviewTitle')} - - - - {isProcessed ? ( - <> - - - - ) : ( - <> - - - - )} + + {isDesktop && ( + + {actions} - + )} + {!isDesktop && ( + + {actions} + + )} {isSubmitting ? ( ) : (