From 145e3e5c44132be2fd2a83e00c77b3ac3815f759 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Wed, 16 Jun 2021 11:41:33 -0700 Subject: [PATCH] Styling fixes to allow for printing of pages. --- .../chat-affix/chat-affix.container.jsx | 40 +++++------ .../chat-affix/chat-affix.styles.scss | 7 +- .../components/header/header.component.jsx | 12 +--- .../pages/manage/manage.page.component.jsx | 66 ++++++++++--------- .../src/pages/manage/manage.page.styles.scss | 4 +- 5 files changed, 62 insertions(+), 67 deletions(-) diff --git a/client/src/components/chat-affix/chat-affix.container.jsx b/client/src/components/chat-affix/chat-affix.container.jsx index 22ba1fdd9..170ad3b55 100644 --- a/client/src/components/chat-affix/chat-affix.container.jsx +++ b/client/src/components/chat-affix/chat-affix.container.jsx @@ -1,17 +1,15 @@ import { useSubscription } from "@apollo/client"; import React from "react"; +import { connect } from "react-redux"; +import { createStructuredSelector } from "reselect"; import { CONVERSATION_LIST_SUBSCRIPTION } from "../../graphql/conversations.queries"; +import { selectChatVisible } from "../../redux/messaging/messaging.selectors"; +import { selectBodyshop } from "../../redux/user/user.selectors"; import AlertComponent from "../alert/alert.component"; import LoadingSpinner from "../loading-spinner/loading-spinner.component"; import ChatAffixComponent from "./chat-affix.component"; -import { Affix } from "antd"; import "./chat-affix.styles.scss"; -import { connect } from "react-redux"; -import { createStructuredSelector } from "reselect"; -import { selectBodyshop } from "../../redux/user/user.selectors"; -import { selectChatVisible } from "../../redux/messaging/messaging.selectors"; - const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, chatVisible: selectChatVisible, @@ -31,22 +29,20 @@ export function ChatAffixContainer({ bodyshop, chatVisible }) { if (!bodyshop || !bodyshop.messagingservicesid) return <>; return ( - -
- {bodyshop && bodyshop.messagingservicesid ? ( - { - return (acc = acc + val.messages_aggregate.aggregate.count); - }, 0)) || - 0 - } - /> - ) : null} -
-
+
+ {bodyshop && bodyshop.messagingservicesid ? ( + { + return (acc = acc + val.messages_aggregate.aggregate.count); + }, 0)) || + 0 + } + /> + ) : null} +
); } export default connect(mapStateToProps, null)(ChatAffixContainer); diff --git a/client/src/components/chat-affix/chat-affix.styles.scss b/client/src/components/chat-affix/chat-affix.styles.scss index 807a3ff93..7d8fecff3 100644 --- a/client/src/components/chat-affix/chat-affix.styles.scss +++ b/client/src/components/chat-affix/chat-affix.styles.scss @@ -1,6 +1,11 @@ .chat-affix { - position: absolute; + position: fixed; + left: 2vw; bottom: 2vh; + z-index: 999; + -webkit-box-shadow: 0px 0px 2px 0px rgba(69, 69, 69, 1); + -moz-box-shadow: 0px 0px 2px 0px rgba(69, 69, 69, 1); + box-shadow: 0px 0px 2px 0px rgba(69, 69, 69, 1); } .chat-affix-open { diff --git a/client/src/components/header/header.component.jsx b/client/src/components/header/header.component.jsx index f1004f4f4..e0a44da56 100644 --- a/client/src/components/header/header.component.jsx +++ b/client/src/components/header/header.component.jsx @@ -1,5 +1,4 @@ import Icon, { - FileAddOutlined, BankFilled, BarChartOutlined, CarFilled, @@ -9,6 +8,7 @@ import Icon, { ExportOutlined, FieldTimeOutlined, FileAddFilled, + FileAddOutlined, FileFilled, GlobalOutlined, HomeFilled, @@ -85,7 +85,6 @@ function Header({ mode="horizontal" //theme="light" theme={"dark"} - style={{ flex: "auto" }} selectedKeys={[selectedHeader]} onClick={handleMenuClick} subMenuCloseDelay={0.3} @@ -263,7 +262,6 @@ function Header({ {t("menus.header.temporarydocs")} - - - } - > + }> {recentItems.map((i, idx) => ( {i.label} diff --git a/client/src/pages/manage/manage.page.component.jsx b/client/src/pages/manage/manage.page.component.jsx index a1400870a..dbf37cca1 100644 --- a/client/src/pages/manage/manage.page.component.jsx +++ b/client/src/pages/manage/manage.page.component.jsx @@ -378,41 +378,43 @@ export function Manage({ match, conflict, bodyshop }) { else PageContent = AppRouteTable; return ( - - + <> + + + - - - - {PageContent} - - - + + + ); } export default connect(mapStateToProps, null)(Manage); diff --git a/client/src/pages/manage/manage.page.styles.scss b/client/src/pages/manage/manage.page.styles.scss index 845ead709..9084e96bb 100644 --- a/client/src/pages/manage/manage.page.styles.scss +++ b/client/src/pages/manage/manage.page.styles.scss @@ -3,6 +3,6 @@ } .layout-container { - height: 100vh; - overflow-y: auto; + // height: 100vh; + // overflow-y: auto; }