@@ -12,7 +12,7 @@ import type { PayrollFlowAlert } from '../PayrollFlow/PayrollFlowComponents'
1212import { calculateTotalPayroll } from '../helpers'
1313import { FastAchSubmissionBlockerBanner , GenericBlocker } from './SubmissionBlockers'
1414import styles from './PayrollOverviewPresentation.module.scss'
15- import { ActionsLayout , DataView , Flex , PayrollLoading } from '@/components/Common'
15+ import { DataView , Flex , Grid , PayrollLoading } from '@/components/Common'
1616import { useContainerBreakpoints } from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'
1717import { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'
1818import { useI18n } from '@/i18n'
@@ -234,7 +234,7 @@ export const PayrollOverviewPresentation = ({
234234 key : 'paystubs' ,
235235 title : t ( 'tableHeaders.paystub' ) ,
236236 render : ( employeeCompensations : EmployeeCompensations ) => (
237- < div className = { styles . paystubIconWrapper } >
237+ < Flex justifyContent = "flex-end" >
238238 < ButtonIcon
239239 aria-label = { t ( 'downloadPaystubLabel' ) }
240240 variant = "tertiary"
@@ -246,7 +246,7 @@ export const PayrollOverviewPresentation = ({
246246 >
247247 < DownloadIcon />
248248 </ ButtonIcon >
249- </ div >
249+ </ Flex >
250250 ) ,
251251 } )
252252 }
@@ -557,51 +557,43 @@ export const PayrollOverviewPresentation = ({
557557 } ,
558558 ]
559559
560- const actions = (
561- < ActionsLayout justifyContent = "end" >
562- < div className = { styles . actionsContainer } >
563- { isProcessed ? (
564- < >
565- < Button onClick = { onPayrollReceipt } variant = "secondary" isDisabled = { isSubmitting } >
566- { t ( 'payrollReceiptCta' ) }
567- </ Button >
568- < Button
569- onClick = { ( ) => {
570- setIsCancelDialogOpen ( true )
571- } }
572- variant = "error"
573- isDisabled = { isSubmitting }
574- >
575- { t ( 'cancelCta' ) }
576- </ Button >
577- </ >
578- ) : (
579- < >
580- < Button onClick = { onEdit } variant = "secondary" isDisabled = { isSubmitting } >
581- { t ( 'editCta' ) }
582- </ Button >
583- < Button
584- onClick = { onSubmit }
585- isDisabled = {
586- isSubmitting ||
587- ( submissionBlockers . length > 0 &&
588- ( submissionBlockers . some (
589- blocker =>
590- ! PAYROLL_RESOLVABLE_SUBMISSION_BLOCKER_TYPES . includes (
591- blocker . blockerType || '' ,
592- ) ,
593- ) ||
594- submissionBlockers . some (
595- blocker => ! selectedUnblockOptions [ blocker . blockerType || '' ] ,
596- ) ) )
597- }
598- >
599- { t ( 'submitCta' ) }
600- </ Button >
601- </ >
602- ) }
603- </ div >
604- </ ActionsLayout >
560+ const actions = isProcessed ? (
561+ < >
562+ < Button onClick = { onPayrollReceipt } variant = "secondary" isDisabled = { isSubmitting } >
563+ { t ( 'payrollReceiptCta' ) }
564+ </ Button >
565+ < Button
566+ onClick = { ( ) => {
567+ setIsCancelDialogOpen ( true )
568+ } }
569+ variant = "error"
570+ isDisabled = { isSubmitting }
571+ >
572+ { t ( 'cancelCta' ) }
573+ </ Button >
574+ </ >
575+ ) : (
576+ < >
577+ < Button onClick = { onEdit } variant = "secondary" isDisabled = { isSubmitting } >
578+ { t ( 'editCta' ) }
579+ </ Button >
580+ < Button
581+ onClick = { onSubmit }
582+ isDisabled = {
583+ isSubmitting ||
584+ ( submissionBlockers . length > 0 &&
585+ ( submissionBlockers . some (
586+ blocker =>
587+ ! PAYROLL_RESOLVABLE_SUBMISSION_BLOCKER_TYPES . includes ( blocker . blockerType || '' ) ,
588+ ) ||
589+ submissionBlockers . some (
590+ blocker => ! selectedUnblockOptions [ blocker . blockerType || '' ] ,
591+ ) ) )
592+ }
593+ >
594+ { t ( 'submitCta' ) }
595+ </ Button >
596+ </ >
605597 )
606598
607599 return (
@@ -619,9 +611,17 @@ export const PayrollOverviewPresentation = ({
619611 />
620612 </ Text >
621613 </ Flex >
622- { isDesktop && actions }
614+ { isDesktop && (
615+ < Flex gap = { 8 } justifyContent = "flex-end" >
616+ { actions }
617+ </ Flex >
618+ ) }
623619 </ Flex >
624- { ! isDesktop && actions }
620+ { ! isDesktop && (
621+ < Grid gridTemplateColumns = "1fr" gap = { 8 } >
622+ { actions }
623+ </ Grid >
624+ ) }
625625 { isSubmitting ? (
626626 < PayrollLoading title = { t ( 'loadingTitle' ) } description = { t ( 'loadingDescription' ) } />
627627 ) : (
0 commit comments