Merge pull request 'OnField_Issues_Oct_2W' (#455) from OnField_Issues_Oct_2W into OnFieldWork_V1
Reviewed-on: #455 Merged
This commit is contained in:
commit
2f2215ab8a
@ -12,6 +12,7 @@ import { useAttendancesLogs } from "../../hooks/useAttendance";
|
|||||||
import { queryClient } from "../../layouts/AuthLayout";
|
import { queryClient } from "../../layouts/AuthLayout";
|
||||||
import { ITEMS_PER_PAGE } from "../../utils/constants";
|
import { ITEMS_PER_PAGE } from "../../utils/constants";
|
||||||
import Pagination from "../common/Pagination";
|
import Pagination from "../common/Pagination";
|
||||||
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
const usePagination = (data, itemsPerPage) => {
|
const usePagination = (data, itemsPerPage) => {
|
||||||
const [currentPage, setCurrentPage] = useState(1);
|
const [currentPage, setCurrentPage] = useState(1);
|
||||||
@ -46,6 +47,7 @@ const AttendanceLog = ({ handleModalData, searchTerm ,organizationId}) => {
|
|||||||
|
|
||||||
const [isRefreshing, setIsRefreshing] = useState(false);
|
const [isRefreshing, setIsRefreshing] = useState(false);
|
||||||
const [processedData, setProcessedData] = useState([]);
|
const [processedData, setProcessedData] = useState([]);
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const today = new Date();
|
const today = new Date();
|
||||||
today.setHours(0, 0, 0, 0);
|
today.setHours(0, 0, 0, 0);
|
||||||
@ -326,7 +328,12 @@ const AttendanceLog = ({ handleModalData, searchTerm ,organizationId}) => {
|
|||||||
lastName={attendance.lastName}
|
lastName={attendance.lastName}
|
||||||
/>
|
/>
|
||||||
<div className="d-flex flex-column">
|
<div className="d-flex flex-column">
|
||||||
<a href="#" className="text-heading text-truncate">
|
<a
|
||||||
|
onClick={() =>
|
||||||
|
navigate(`/employee/${attendance.employeeId}?for=attendance`)
|
||||||
|
}
|
||||||
|
className="text-heading text-truncate cursor-pointer"
|
||||||
|
>
|
||||||
<span className="fw-normal">
|
<span className="fw-normal">
|
||||||
{attendance.firstName} {attendance.lastName}
|
{attendance.firstName} {attendance.lastName}
|
||||||
</span>
|
</span>
|
||||||
|
@ -10,12 +10,14 @@ import eventBus from "../../services/eventBus";
|
|||||||
import { cacheData, clearCacheKey, useSelectedProject } from "../../slices/apiDataManager";
|
import { cacheData, clearCacheKey, useSelectedProject } from "../../slices/apiDataManager";
|
||||||
import { useQueryClient } from "@tanstack/react-query";
|
import { useQueryClient } from "@tanstack/react-query";
|
||||||
import Pagination from "../common/Pagination";
|
import Pagination from "../common/Pagination";
|
||||||
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
const Regularization = ({ handleRequest, searchTerm, projectId, organizationId, IncludeInActive }) => {
|
const Regularization = ({ handleRequest, searchTerm, projectId, organizationId, IncludeInActive }) => {
|
||||||
const queryClient = useQueryClient();
|
const queryClient = useQueryClient();
|
||||||
// var selectedProject = useSelector((store) => store.localVariables.projectId);
|
// var selectedProject = useSelector((store) => store.localVariables.projectId);
|
||||||
const selectedProject = useSelectedProject();
|
const selectedProject = useSelectedProject();
|
||||||
const [regularizesList, setregularizedList] = useState([]);
|
const [regularizesList, setregularizedList] = useState([]);
|
||||||
|
const navigate = useNavigate();
|
||||||
const { regularizes, loading, error, refetch } =
|
const { regularizes, loading, error, refetch } =
|
||||||
useRegularizationRequests(selectedProject, organizationId, IncludeInActive);
|
useRegularizationRequests(selectedProject, organizationId, IncludeInActive);
|
||||||
|
|
||||||
@ -149,7 +151,17 @@ const Regularization = ({ handleRequest, searchTerm,projectId, organizationId, I
|
|||||||
lastName={att.lastName}
|
lastName={att.lastName}
|
||||||
/>
|
/>
|
||||||
<div className="d-flex flex-column">
|
<div className="d-flex flex-column">
|
||||||
<a href="#" className="text-heading text-truncate">
|
{/* <a href="#" className="text-heading text-truncate">
|
||||||
|
<span className="fw-normal">
|
||||||
|
{att.firstName} {att.lastName}
|
||||||
|
</span>
|
||||||
|
</a> */}
|
||||||
|
<a
|
||||||
|
onClick={() =>
|
||||||
|
navigate(`/employee/${att.employeeId}?for=attendance`)
|
||||||
|
}
|
||||||
|
className="text-heading text-truncate cursor-pointer"
|
||||||
|
>
|
||||||
<span className="fw-normal">
|
<span className="fw-normal">
|
||||||
{att.firstName} {att.lastName}
|
{att.firstName} {att.lastName}
|
||||||
</span>
|
</span>
|
||||||
|
@ -40,11 +40,12 @@ const Header = () => {
|
|||||||
const isProjectPath = pathname === "/projects";
|
const isProjectPath = pathname === "/projects";
|
||||||
const isDirectory = pathname === "/directory";
|
const isDirectory = pathname === "/directory";
|
||||||
const isEmployeeList = pathname === "/employees";
|
const isEmployeeList = pathname === "/employees";
|
||||||
|
const isMasters = pathname === "/masters";
|
||||||
// const isExpense = pathname === "/expenses";
|
// const isExpense = pathname === "/expenses";
|
||||||
const isEmployeeProfile = UUID_REGEX.test(pathname);
|
const isEmployeeProfile = UUID_REGEX.test(pathname);
|
||||||
|
|
||||||
const hideDropPaths =
|
const hideDropPaths =
|
||||||
isDirectory || isEmployeeList || isEmployeeProfile;
|
isDirectory || isEmployeeList || isMasters || isEmployeeProfile;
|
||||||
|
|
||||||
const showProjectDropdown = !hideDropPaths;
|
const showProjectDropdown = !hideDropPaths;
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@ const ProjectCard = ({ project }) => {
|
|||||||
|
|
||||||
const handleViewProject = () => {
|
const handleViewProject = () => {
|
||||||
dispatch(setProjectId(project.id));
|
dispatch(setProjectId(project.id));
|
||||||
|
localStorage.setItem("lastActiveProjectTab","profile")
|
||||||
navigate(`/projects/details`);
|
navigate(`/projects/details`);
|
||||||
};
|
};
|
||||||
const handleViewActivities = () => {
|
const handleViewActivities = () => {
|
||||||
|
@ -131,6 +131,7 @@ const ProjectListView = ({
|
|||||||
|
|
||||||
const handleMoveDetails = (project) => {
|
const handleMoveDetails = (project) => {
|
||||||
dispatch(setProjectId(project));
|
dispatch(setProjectId(project));
|
||||||
|
localStorage.setItem("lastActiveProjectTab","profile")
|
||||||
navigate("/projects/details");
|
navigate("/projects/details");
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user