hide project selection at local level at - project progress widget
This commit is contained in:
parent
1e51fabaa1
commit
558b663f6b
@ -2,10 +2,13 @@ import React, { useState } from "react";
|
||||
import LineChart from "../Charts/LineChart";
|
||||
import { useProjects } from "../../hooks/useProjects";
|
||||
import { useDashboard_Data } from "../../hooks/useDashboard_Data";
|
||||
import {useSelector} from "react-redux";
|
||||
|
||||
const ProjectProgressChart = () => {
|
||||
const ProjectProgressChart = () =>
|
||||
{
|
||||
const selectedProject = useSelector((store) => store.localVariables.projectId);
|
||||
const { projects } = useProjects();
|
||||
const [selectedProjectId, setSelectedProjectId] = useState("all");
|
||||
// const [selectedProjectId, setSelectedProjectId] = useState("all");
|
||||
const [range, setRange] = useState("1W");
|
||||
|
||||
const getDaysFromRange = (range) => {
|
||||
@ -28,7 +31,7 @@ const ProjectProgressChart = () => {
|
||||
const { dashboard_data, loading: isLineChartLoading } = useDashboard_Data({
|
||||
days,
|
||||
FromDate,
|
||||
projectId: selectedProjectId === "all" ? null : selectedProjectId,
|
||||
projectId: selectedProject === " " ? "all" : selectedProject// selectedProjectId === "all" ? null : selectedProjectId,
|
||||
});
|
||||
|
||||
const sortedDashboardData = [...dashboard_data].sort(
|
||||
@ -63,7 +66,7 @@ const ProjectProgressChart = () => {
|
||||
<p className="card-subtitle">Progress Overview by Project</p>
|
||||
</div>
|
||||
|
||||
<div className="btn-group">
|
||||
{/* <div className="btn-group">
|
||||
<button
|
||||
className="btn btn-outline-primary btn-sm dropdown-toggle"
|
||||
type="button"
|
||||
@ -92,7 +95,7 @@ const ProjectProgressChart = () => {
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
</div> */}
|
||||
</div>
|
||||
|
||||
{/* Row 2: Time Range Buttons */}
|
||||
|
Loading…
x
Reference in New Issue
Block a user