diff --git a/src/routes/employee.$employeeId.tsx b/src/routes/employee.$employeeId.tsx index 8460fee..01090c3 100644 --- a/src/routes/employee.$employeeId.tsx +++ b/src/routes/employee.$employeeId.tsx @@ -1945,64 +1945,67 @@ function EmployeeOverview() { {!isSensitiveHidden && 'performancePrograms' in employee && - employee.performancePrograms !== undefined ? ( + employee.performancePrograms !== undefined && + employee.performancePrograms.length > 0 && + employee.performancePrograms[0].status === 'ACTIVE' ? (
0 - ? (employee.performancePrograms[0] as any) - : null - } + program={employee.performancePrograms[0] as any} onUpdate={() => router.invalidate()} />
) : null} -
-
- {showNewSalaryForm ? ( - - ) : null} - {user?.role === ROLES.ADMIN && - !isSensitiveHidden && - !showNewSalaryForm ? ( - - ) : null} - {employee.cartaOptionGrants && - employee.cartaOptionGrants.length > 0 && ( + {(showNewSalaryForm || + (user?.role === ROLES.ADMIN && !isSensitiveHidden) || + (employee.cartaOptionGrants && + employee.cartaOptionGrants.length > 0)) && ( +
+
+ {showNewSalaryForm ? ( - )} + ) : null} + {user?.role === ROLES.ADMIN && + !isSensitiveHidden && + !showNewSalaryForm ? ( + + ) : null} + {employee.cartaOptionGrants && + employee.cartaOptionGrants.length > 0 && ( + + )} +
-
+ )} {employee.cartaOptionGrants && employee.cartaOptionGrants.length > 0 &&