Skip to content

Commit

Permalink
[New #173] Added anonymized data
Browse files Browse the repository at this point in the history
  • Loading branch information
LaChope committed Dec 29, 2023
1 parent d5a58eb commit d7e98f6
Show file tree
Hide file tree
Showing 2 changed files with 390 additions and 17 deletions.
36 changes: 19 additions & 17 deletions src/components/PlanManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import {
calculatePlannedWorkTimeSumFromParts, getRestrictedTasks, pushResourcesToTaskList, pushRestrictionsToTaskList
} from "../utils/Utils";

import data from "../test/anonymized_data.json"

interface Props {
basename: string;
}
Expand All @@ -28,7 +30,7 @@ const PlanManager = ({ basename }: Props) => {
const [workPackageList, setWorkPackageList] = useState<Array<string>>([]);

// TODO: Set work package interface
const [workPackage, setWorkPackage] = useState<any>(null);
const [workPackage, setWorkPackage] = useState<any>([data]);

const [isWorkPackageListLoading, setIsWorkPackageListLoading] =
useState<boolean>(false);
Expand Down Expand Up @@ -163,7 +165,7 @@ const PlanManager = ({ basename }: Props) => {
if(isWorkPackageLoading){
return;
}

setIsPlanFullScreen(true);

const workPackageTitle = workPackageList[index].split(",")[0];
Expand All @@ -177,21 +179,21 @@ const PlanManager = ({ basename }: Props) => {

const renderWorkPackageList = () => {
return (
<React.Fragment>
{isWorkPackageListLoading && workPackageListErrorMessage && (
<p>{workPackageListErrorMessage}</p>
)}
{isWorkPackageListLoading && !workPackageListErrorMessage && (
<LoadingSpinnerIcon />
)}
{!isWorkPackageListLoading && (
<WorkPackageList
workPackageList={workPackageList}
handleWorkPackageOnClick={handleWorkPackageOnClick}
/>
)}
</React.Fragment>
);
<React.Fragment>
{isWorkPackageListLoading && workPackageListErrorMessage && (
<p>{workPackageListErrorMessage}</p>
)}
{isWorkPackageListLoading && !workPackageListErrorMessage && (
<LoadingSpinnerIcon />
)}
{!isWorkPackageListLoading && process.env.NODE_ENV !== "development" && (
<WorkPackageList
workPackageList={workPackageList}
handleWorkPackageOnClick={handleWorkPackageOnClick}
/>
)}
</React.Fragment>
);
};
const updateData = (workPackage) => {
const dataWithoutRevisionPlan = workPackage[0].planParts;
Expand Down
Loading

0 comments on commit d7e98f6

Please sign in to comment.