From 34dd33ae4bd0b5373004ac743440c8c5a3a44bf4 Mon Sep 17 00:00:00 2001 From: Aaron Lee Date: Wed, 3 Jun 2026 16:44:43 -0400 Subject: [PATCH 1/2] fix: only render alert container when secondary-jobs warning or commission alerts are present The alert wrapper Flex was rendering an empty container in the DOM even when no alerts applied. Also adds a translated body to the willDeleteSecondaryJobs warning so partners can localize it. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../ManagementCompensationFormBody.tsx | 94 ++++++++++--------- src/i18n/en/Employee.Compensation.json | 1 + 2 files changed, 52 insertions(+), 43 deletions(-) diff --git a/src/components/Employee/Compensation/management/ManagementCompensationFormBody.tsx b/src/components/Employee/Compensation/management/ManagementCompensationFormBody.tsx index 967e55647..b50a197d5 100644 --- a/src/components/Employee/Compensation/management/ManagementCompensationFormBody.tsx +++ b/src/components/Employee/Compensation/management/ManagementCompensationFormBody.tsx @@ -44,13 +44,6 @@ export function ManagementCompensationFormBody({ {title} - {compensationForm.status.willDeleteSecondaryJobs && ( - - )} - t(`flsaStatusLabels.${status}`)} formHookResult={compensationForm} /> - {compensationForm.status.showCommissionFederalMinimumPayAlert && ( - - {t('commissionAlerts.federalMinimumPay.body')} - - )} - {compensationForm.status.showCommissionMinimumWageAlert && ( - - - ), - }} - /> - - )} - {compensationForm.status.showOwnerSalaryAlert && ( - + {(compensationForm.status.showCommissionFederalMinimumPayAlert || + compensationForm.status.showCommissionMinimumWageAlert || + compensationForm.status.showOwnerSalaryAlert || + compensationForm.status.willDeleteSecondaryJobs) && ( + + {compensationForm.status.willDeleteSecondaryJobs && ( + + {t('validations.classificationChangeRemovesSecondaryJobs')} + + )} + {compensationForm.status.showCommissionFederalMinimumPayAlert && ( + + {t('commissionAlerts.federalMinimumPay.body')} + + )} + {compensationForm.status.showCommissionMinimumWageAlert && ( + + + ), + }} + /> + + )} + {compensationForm.status.showOwnerSalaryAlert && ( + + )} + )} )} diff --git a/src/i18n/en/Employee.Compensation.json b/src/i18n/en/Employee.Compensation.json index cf3ff91fa..2ba33c20a 100644 --- a/src/i18n/en/Employee.Compensation.json +++ b/src/i18n/en/Employee.Compensation.json @@ -73,6 +73,7 @@ "effectiveDateBeforeHire": "Effective date cannot be before the hire date", "hireDate": "Start date is required", "classificationChangeNotification": "Changing this employee's classification will immediately delete their additional jobs.", + "classificationChangeRemovesSecondaryJobs": "Only employees that are paid by the hour can have multiple jobs.", "exemptThreshold": "Most employees who make under {{limit}}/year should be eligible for overtime.", "paymentUnit": "Payment unit must be one of Hour, Week, Month, or Year", "rate": "Amount is a required field", From 8ccf1e800673947e10901e924d1115143679f01a Mon Sep 17 00:00:00 2001 From: Aaron Lee Date: Wed, 3 Jun 2026 16:46:47 -0400 Subject: [PATCH 2/2] chore: regenerate i18n types Co-Authored-By: Claude Opus 4.7 (1M context) --- src/types/i18next.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/types/i18next.d.ts b/src/types/i18next.d.ts index 3e894d817..7f7a351bb 100644 --- a/src/types/i18next.d.ts +++ b/src/types/i18next.d.ts @@ -1405,6 +1405,7 @@ export interface EmployeeCompensation{ "effectiveDateBeforeHire":string; "hireDate":string; "classificationChangeNotification":string; +"classificationChangeRemovesSecondaryJobs":string; "exemptThreshold":string; "paymentUnit":string; "rate":string;