Skip to content

Commit 94b5b5f

Browse files
committed
fix: restored buttons to original ui
1 parent 03c0d59 commit 94b5b5f

File tree

2 files changed

+56
-40
lines changed

2 files changed

+56
-40
lines changed

src/components/Payroll/PayrollOverview/PayrollOverviewPresentation.module.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,17 @@
1515
justify-content: flex-end;
1616
}
1717
}
18+
19+
.actionsContainer {
20+
display: flex;
21+
flex-direction: column;
22+
gap: toRem(12);
23+
align-items: stretch;
24+
width: 100%;
25+
26+
@include container-query(map-get($global-breakpoints, 'small')) {
27+
flex-direction: row;
28+
align-items: center;
29+
width: auto;
30+
}
31+
}

src/components/Payroll/PayrollOverview/PayrollOverviewPresentation.tsx

Lines changed: 42 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -559,46 +559,48 @@ export const PayrollOverviewPresentation = ({
559559

560560
const actions = (
561561
<ActionsLayout justifyContent="end">
562-
{isProcessed ? (
563-
<>
564-
<Button onClick={onPayrollReceipt} variant="secondary" isDisabled={isSubmitting}>
565-
{t('payrollReceiptCta')}
566-
</Button>
567-
<Button
568-
onClick={() => {
569-
setIsCancelDialogOpen(true)
570-
}}
571-
variant="error"
572-
isDisabled={isSubmitting}
573-
>
574-
{t('cancelCta')}
575-
</Button>
576-
</>
577-
) : (
578-
<>
579-
<Button onClick={onEdit} variant="secondary" isDisabled={isSubmitting}>
580-
{t('editCta')}
581-
</Button>
582-
<Button
583-
onClick={onSubmit}
584-
isDisabled={
585-
isSubmitting ||
586-
(submissionBlockers.length > 0 &&
587-
(submissionBlockers.some(
588-
blocker =>
589-
!PAYROLL_RESOLVABLE_SUBMISSION_BLOCKER_TYPES.includes(
590-
blocker.blockerType || '',
591-
),
592-
) ||
593-
submissionBlockers.some(
594-
blocker => !selectedUnblockOptions[blocker.blockerType || ''],
595-
)))
596-
}
597-
>
598-
{t('submitCta')}
599-
</Button>
600-
</>
601-
)}
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>
602604
</ActionsLayout>
603605
)
604606

0 commit comments

Comments
 (0)