From 298e59d6bf87571ade2f4f25278cd8b95544f78e Mon Sep 17 00:00:00 2001 From: Kshitij Verma Date: Tue, 5 Sep 2023 23:21:54 +0530 Subject: [PATCH] changed weekly to average weekly for working hours --- src/Components/Users/ManageUsers.tsx | 13 ++++++++----- src/Components/Users/UserProfile.tsx | 9 ++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/Components/Users/ManageUsers.tsx b/src/Components/Users/ManageUsers.tsx index 99cb11e7e6f..d2e0ca415e3 100644 --- a/src/Components/Users/ManageUsers.tsx +++ b/src/Components/Users/ManageUsers.tsx @@ -387,7 +387,10 @@ export default function ManageUsers() { )}
- + {user.weekly_working_hours ? ( {user.weekly_working_hours} hours @@ -438,7 +441,7 @@ export default function ManageUsers() { }} > -

Set weekly working hours

+

Set Average weekly working hours

)} @@ -492,7 +495,7 @@ export default function ManageUsers() { open={expandWorkingHours} setOpen={setExpandWorkingHours} slideFrom="right" - title="Weekly working hours" + title="Average weekly working hours" dialogClass="md:w-[400px]" onCloseClick={() => { setWeeklyHours(0); @@ -500,7 +503,7 @@ export default function ManageUsers() { >
- Set weekly working hours for {selectedUser} + Set Average weekly working hours for {selectedUser}
168 - ? "Weekly working hours should be between 0 and 168" + ? "Average weekly working hours should be between 0 and 168" : "" } required diff --git a/src/Components/Users/UserProfile.tsx b/src/Components/Users/UserProfile.tsx index 37178a2e0cc..3fb4bccc7c7 100644 --- a/src/Components/Users/UserProfile.tsx +++ b/src/Components/Users/UserProfile.tsx @@ -264,7 +264,7 @@ export default function UserProfile() { !/^\d+$/.test(states.form[field] ?? "") ) { errors[field] = - "Weekly working hours must be a number between 0 and 168"; + "Average weekly working hours must be a number between 0 and 168"; invalidForm = true; } return; @@ -416,7 +416,7 @@ export default function UserProfile() { }; return (
-
+
@@ -559,7 +559,7 @@ export default function UserProfile() {
- Weekly working hours + Average weekly working hours
{details.weekly_working_hours ?? "-"} @@ -568,7 +568,6 @@ export default function UserProfile() {
)} - {showEdit && (
@@ -661,7 +660,7 @@ export default function UserProfile() {