Skip to content

Commit

Permalink
Bug fixed. Cypress passing.
Browse files Browse the repository at this point in the history
  • Loading branch information
net-runner committed Mar 17, 2021
1 parent a38ce8a commit fb819ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cypress/integration/e2e/table/load-schedule.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import { ShiftCode } from "../../../../src/common-models/shift-info.model";
import { WorkerType } from "../../../../src/common-models/worker-info.model";
import { FoundationInfoRowType, ScheduleName } from "../../../support/commands";
import { FoundationInfoRowType } from "../../../support/commands";
//#region Test data
interface CheckFoundationInfoReadCorrectly {
scheduleName: "childrens_extraworkers.xlsx" | "extraworkers_childrens.xlsx";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { Box } from "@material-ui/core";
import { makeStyles, Theme } from "@material-ui/core/styles";
import { useJiraLikeDrawer } from "./jira-like-drawer-context";
import ScssVars from "../../../assets/styles/styles/custom/_variables.module.scss";
import { useSelector } from "react-redux";
import { ApplicationStateModel } from "../../../state/models/application-state.model";

export interface StyleProps {
width: number;
Expand All @@ -25,12 +27,15 @@ const useStyles = makeStyles<Theme, StyleProps>({
});

export default function JiraLikeDrawer(width): JSX.Element {
const isEditMode = useSelector(
(state: ApplicationStateModel) => state.actualState.mode === "edit"
);
const classes = useStyles(width);
const { title, open, setOpen, childrenComponent } = useJiraLikeDrawer();

return (
<Box>
{title && open && setOpen && childrenComponent && (
{title && open && setOpen && childrenComponent && isEditMode && (
<Box className={classes.drawer}>
<DrawerHeader title={title} setOpen={setOpen}>
{childrenComponent}
Expand Down

0 comments on commit fb819ca

Please sign in to comment.