- {record.salary_type === "Hybrid" ? (
+ {record.salary_type === "hybrid" ? (
- Base Amount:{" "}
- ${record.salary_base_amount}
+ Base Amount: $
+ {record.salary_base_amount}
) : (
""
)}
- Performance based amount:{" "}
- ${record.salary - record.salary_base_amount}
+ Performance based amount: $
+ {record.performance_based_amount}
}
@@ -113,3 +121,5 @@ const StatTable = ({
};
export default StatTable;
+
+// The calculation of salary begins at the start of the month and continues to the current day. Select a month to review salary details for prior periods.
diff --git a/src/Components/Users/UserEdit.tsx b/src/Components/Users/UserEdit.tsx
index 0237e8a..7926145 100644
--- a/src/Components/Users/UserEdit.tsx
+++ b/src/Components/Users/UserEdit.tsx
@@ -87,13 +87,16 @@ const UserEdit = () => {
const [showInput, setShowInput] = useState(false);
const handleChange = (value: string) => {
- // Agar Hybrid bo'lsa, inputni ko'rsatish; Task based bo'lsa, yashirish
- setShowInput(value === "hybrid");
+ if (data?.role.name === "Checker") {
+ setShowInput(value === "hybrid");
+ }
};
useEffect(() => {
- if (data?.salary_type === "hybrid") {
+ if (data?.role.name === "Checker" && data?.salary_type === "hybrid") {
setShowInput(true);
+ } else if (data?.role.name !== "Checker") {
+ setShowInput(false);
}
}, [data]);
@@ -198,12 +201,12 @@ const UserEdit = () => {
)}
- {data.role.name === "Checker" && (
+ {data?.role?.name === "Checker" && (