fix(hr): prevent crash when baseSalary is undefined

This commit is contained in:
yotakii
2026-02-23 12:48:46 +03:00
parent 6c3d9ea43f
commit 6fada5dd4e

View File

@@ -710,7 +710,7 @@ function HRContent() {
</td>
<td className="px-6 py-4">
<span className="text-sm font-semibold text-gray-900">
{employee.baseSalary.toLocaleString()} SAR
{Number(employee.baseSalary ?? 0).toLocaleString()} SAR
</span>
</td>
<td className="px-6 py-4">
@@ -881,4 +881,4 @@ export default function HRPage() {
<HRContent />
</ProtectedRoute>
)
}
}