Styling fixes to allow for printing of pages.

This commit is contained in:
Patrick Fic
2021-06-16 11:41:33 -07:00
parent 914a7e3c7b
commit 145e3e5c44
5 changed files with 62 additions and 67 deletions

View File

@@ -1,17 +1,15 @@
import { useSubscription } from "@apollo/client"; import { useSubscription } from "@apollo/client";
import React from "react"; import React from "react";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { CONVERSATION_LIST_SUBSCRIPTION } from "../../graphql/conversations.queries"; 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 AlertComponent from "../alert/alert.component";
import LoadingSpinner from "../loading-spinner/loading-spinner.component"; import LoadingSpinner from "../loading-spinner/loading-spinner.component";
import ChatAffixComponent from "./chat-affix.component"; import ChatAffixComponent from "./chat-affix.component";
import { Affix } from "antd";
import "./chat-affix.styles.scss"; 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({ const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop, bodyshop: selectBodyshop,
chatVisible: selectChatVisible, chatVisible: selectChatVisible,
@@ -31,8 +29,7 @@ export function ChatAffixContainer({ bodyshop, chatVisible }) {
if (!bodyshop || !bodyshop.messagingservicesid) return <></>; if (!bodyshop || !bodyshop.messagingservicesid) return <></>;
return ( return (
<Affix className={`chat-affix ${chatVisible ? "chat-affix-open" : ""}`}> <div className={`chat-affix ${chatVisible ? "chat-affix-open" : ""}`}>
<div>
{bodyshop && bodyshop.messagingservicesid ? ( {bodyshop && bodyshop.messagingservicesid ? (
<ChatAffixComponent <ChatAffixComponent
conversationList={(data && data.conversations) || []} conversationList={(data && data.conversations) || []}
@@ -46,7 +43,6 @@ export function ChatAffixContainer({ bodyshop, chatVisible }) {
/> />
) : null} ) : null}
</div> </div>
</Affix>
); );
} }
export default connect(mapStateToProps, null)(ChatAffixContainer); export default connect(mapStateToProps, null)(ChatAffixContainer);

View File

@@ -1,6 +1,11 @@
.chat-affix { .chat-affix {
position: absolute; position: fixed;
left: 2vw;
bottom: 2vh; 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 { .chat-affix-open {

View File

@@ -1,5 +1,4 @@
import Icon, { import Icon, {
FileAddOutlined,
BankFilled, BankFilled,
BarChartOutlined, BarChartOutlined,
CarFilled, CarFilled,
@@ -9,6 +8,7 @@ import Icon, {
ExportOutlined, ExportOutlined,
FieldTimeOutlined, FieldTimeOutlined,
FileAddFilled, FileAddFilled,
FileAddOutlined,
FileFilled, FileFilled,
GlobalOutlined, GlobalOutlined,
HomeFilled, HomeFilled,
@@ -85,7 +85,6 @@ function Header({
mode="horizontal" mode="horizontal"
//theme="light" //theme="light"
theme={"dark"} theme={"dark"}
style={{ flex: "auto" }}
selectedKeys={[selectedHeader]} selectedKeys={[selectedHeader]}
onClick={handleMenuClick} onClick={handleMenuClick}
subMenuCloseDelay={0.3} subMenuCloseDelay={0.3}
@@ -263,7 +262,6 @@ function Header({
{t("menus.header.temporarydocs")} {t("menus.header.temporarydocs")}
</Link> </Link>
</Menu.Item> </Menu.Item>
<Menu.SubMenu <Menu.SubMenu
key="shopsubmenu" key="shopsubmenu"
title={t("menus.header.shop")} title={t("menus.header.shop")}
@@ -300,7 +298,6 @@ function Header({
</Menu.Item> </Menu.Item>
</Menu.SubMenu> </Menu.SubMenu>
<Menu.SubMenu <Menu.SubMenu
style={{ float: "right" }}
key="user" key="user"
title={ title={
currentUser.displayName || currentUser.displayName ||
@@ -354,12 +351,7 @@ function Header({
</Menu.Item> </Menu.Item>
</Menu.SubMenu> </Menu.SubMenu>
</Menu.SubMenu> </Menu.SubMenu>
<Menu.SubMenu key="recent" title={<ClockCircleFilled />}>
<Menu.SubMenu
key="recent"
style={{ float: "right" }}
title={<ClockCircleFilled />}
>
{recentItems.map((i, idx) => ( {recentItems.map((i, idx) => (
<Menu.Item key={idx}> <Menu.Item key={idx}>
<Link to={i.url}>{i.label}</Link> <Link to={i.url}>{i.label}</Link>

View File

@@ -378,6 +378,8 @@ export function Manage({ match, conflict, bodyshop }) {
else PageContent = AppRouteTable; else PageContent = AppRouteTable;
return ( return (
<>
<ChatAffixContainer />
<Layout className="layout-container"> <Layout className="layout-container">
<HeaderContainer /> <HeaderContainer />
@@ -385,7 +387,6 @@ export function Manage({ match, conflict, bodyshop }) {
<FcmNotification /> <FcmNotification />
<PartnerPingComponent /> <PartnerPingComponent />
<ErrorBoundary>{PageContent}</ErrorBoundary> <ErrorBoundary>{PageContent}</ErrorBoundary>
<ChatAffixContainer />
<BackTop /> <BackTop />
<Footer> <Footer>
<div <div
@@ -406,13 +407,14 @@ export function Manage({ match, conflict, bodyshop }) {
<div id="noticeable-widget" style={{ marginLeft: "1rem" }} /> <div id="noticeable-widget" style={{ marginLeft: "1rem" }} />
</div> </div>
<Link to="/about" target="_blank" style={{ color: "#ccc" }}> <Link to="/about" target="_blank" style={{ color: "#ccc" }}>
Disclaimer Disclaimer & Notices
</Link> </Link>
<JiraSupportComponent /> <JiraSupportComponent />
</div> </div>
</Footer> </Footer>
</Content> </Content>
</Layout> </Layout>
</>
); );
} }
export default connect(mapStateToProps, null)(Manage); export default connect(mapStateToProps, null)(Manage);

View File

@@ -3,6 +3,6 @@
} }
.layout-container { .layout-container {
height: 100vh; // height: 100vh;
overflow-y: auto; // overflow-y: auto;
} }