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 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 (
<Affix className={`chat-affix ${chatVisible ? "chat-affix-open" : ""}`}>
<div>
{bodyshop && bodyshop.messagingservicesid ? (
<ChatAffixComponent
conversationList={(data && data.conversations) || []}
unreadCount={
(data &&
data.conversations.reduce((acc, val) => {
return (acc = acc + val.messages_aggregate.aggregate.count);
}, 0)) ||
0
}
/>
) : null}
</div>
</Affix>
<div className={`chat-affix ${chatVisible ? "chat-affix-open" : ""}`}>
{bodyshop && bodyshop.messagingservicesid ? (
<ChatAffixComponent
conversationList={(data && data.conversations) || []}
unreadCount={
(data &&
data.conversations.reduce((acc, val) => {
return (acc = acc + val.messages_aggregate.aggregate.count);
}, 0)) ||
0
}
/>
) : null}
</div>
);
}
export default connect(mapStateToProps, null)(ChatAffixContainer);

View File

@@ -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 {

View File

@@ -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")}
</Link>
</Menu.Item>
<Menu.SubMenu
key="shopsubmenu"
title={t("menus.header.shop")}
@@ -300,7 +298,6 @@ function Header({
</Menu.Item>
</Menu.SubMenu>
<Menu.SubMenu
style={{ float: "right" }}
key="user"
title={
currentUser.displayName ||
@@ -354,12 +351,7 @@ function Header({
</Menu.Item>
</Menu.SubMenu>
</Menu.SubMenu>
<Menu.SubMenu
key="recent"
style={{ float: "right" }}
title={<ClockCircleFilled />}
>
<Menu.SubMenu key="recent" title={<ClockCircleFilled />}>
{recentItems.map((i, idx) => (
<Menu.Item key={idx}>
<Link to={i.url}>{i.label}</Link>

View File

@@ -378,41 +378,43 @@ export function Manage({ match, conflict, bodyshop }) {
else PageContent = AppRouteTable;
return (
<Layout className="layout-container">
<HeaderContainer />
<>
<ChatAffixContainer />
<Layout className="layout-container">
<HeaderContainer />
<Content className="content-container">
<FcmNotification />
<PartnerPingComponent />
<ErrorBoundary>{PageContent}</ErrorBoundary>
<ChatAffixContainer />
<BackTop />
<Footer>
<div
style={{
display: "flex",
flexDirection: "column",
justifyContent: "center",
alignItems: "center",
margin: "1rem 0rem",
}}
>
<div style={{ display: "flex" }}>
<div>
{`ImEX Online ${
process.env.REACT_APP_GIT_SHA
} - ${preval`module.exports = new Date().toLocaleString("en-US", {timeZone: "America/Los_Angeles"});`}`}
<Content className="content-container">
<FcmNotification />
<PartnerPingComponent />
<ErrorBoundary>{PageContent}</ErrorBoundary>
<BackTop />
<Footer>
<div
style={{
display: "flex",
flexDirection: "column",
justifyContent: "center",
alignItems: "center",
margin: "1rem 0rem",
}}
>
<div style={{ display: "flex" }}>
<div>
{`ImEX Online ${
process.env.REACT_APP_GIT_SHA
} - ${preval`module.exports = new Date().toLocaleString("en-US", {timeZone: "America/Los_Angeles"});`}`}
</div>
<div id="noticeable-widget" style={{ marginLeft: "1rem" }} />
</div>
<div id="noticeable-widget" style={{ marginLeft: "1rem" }} />
<Link to="/about" target="_blank" style={{ color: "#ccc" }}>
Disclaimer & Notices
</Link>
<JiraSupportComponent />
</div>
<Link to="/about" target="_blank" style={{ color: "#ccc" }}>
Disclaimer
</Link>
<JiraSupportComponent />
</div>
</Footer>
</Content>
</Layout>
</Footer>
</Content>
</Layout>
</>
);
}
export default connect(mapStateToProps, null)(Manage);

View File

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