From d4870d3af5d2ab9f40eb84ae9c5e900181e3d42f Mon Sep 17 00:00:00 2001 From: "MSI\\User" Date: Mon, 19 Aug 2024 10:58:44 +0800 Subject: [PATCH] UI FIx --- .../StaffUtilization/StaffUtilization.tsx | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/components/StaffUtilization/StaffUtilization.tsx b/src/components/StaffUtilization/StaffUtilization.tsx index 034743d..9bd1487 100644 --- a/src/components/StaffUtilization/StaffUtilization.tsx +++ b/src/components/StaffUtilization/StaffUtilization.tsx @@ -275,6 +275,8 @@ const StaffUtilization: React.FC = ({ abilities, staff }) => { const [totalLeaveHours, setTotalLeaveHours]: any = React.useState('NA'); const [currentPage, setCurrentPage] = useState(1); const recordsPerPage = 10; + const [datePickerToLabel, setDatePickerToLabel] = React.useState("To"); + const [datePickerToLabel2, setDatePickerToLabel2] = React.useState("To"); const fetchComboData = async () => { const staffComboList = [] @@ -1398,6 +1400,12 @@ const StaffUtilization: React.FC = ({ abilities, staff }) => { setTeamManhoursTeamId(selectedOption.value); } }} + onMenuOpen={() => { + setDatePickerToLabel("") + }} + onMenuClose={() => { + setDatePickerToLabel("To") + }} /> } @@ -1449,7 +1457,7 @@ const StaffUtilization: React.FC = ({ abilities, staff }) => { selectMonthlyPeriodTo(newValue) } defaultValue={totalManHoursMonthlyToValue} - label={"To"} + label={datePickerToLabel} views={["month", "year"]} /> @@ -1522,7 +1530,6 @@ const StaffUtilization: React.FC = ({ abilities, staff }) => { )}
-
{abilityViewDashboardAll &&
@@ -1542,9 +1549,16 @@ const StaffUtilization: React.FC = ({ abilities, staff }) => { setStaffGradeTeamId(selectedOption.value); } }} + onMenuOpen={() => { + setDatePickerToLabel2("") + }} + onMenuClose={() => { + setDatePickerToLabel2("To") + }} />
} +
{staffGradeManhoursSpentSelect === "Weekly" && ( = ({ abilities, staff }) => { )} {staffGradeManhoursSpentSelect === "Monthly" && ( + = ({ abilities, staff }) => { defaultValue={ totalManHoursByStaffGradeMonthlyToValue } - label={"To"} + label={datePickerToLabel2} views={["month", "year"]} />