@@ -1,31 +1,14 @@
|
|||||||
import { Space, Button, Col } from "antd";
|
import { Space } from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import PhoneNumberFormatter from "../../utils/PhoneFormatter";
|
import PhoneNumberFormatter from "../../utils/PhoneFormatter";
|
||||||
import ChatArchiveButton from "../chat-archive-button/chat-archive-button.component";
|
import ChatArchiveButton from "../chat-archive-button/chat-archive-button.component";
|
||||||
import ChatConversationTitleTags from "../chat-conversation-title-tags/chat-conversation-title-tags.component";
|
import ChatConversationTitleTags from "../chat-conversation-title-tags/chat-conversation-title-tags.component";
|
||||||
import ChatLabelComponent from "../chat-label/chat-label.component";
|
import ChatLabelComponent from "../chat-label/chat-label.component";
|
||||||
import ChatTagRoContainer from "../chat-tag-ro/chat-tag-ro.container";
|
import ChatTagRoContainer from "../chat-tag-ro/chat-tag-ro.container";
|
||||||
import { connect } from "react-redux";
|
|
||||||
import { setSelectedConversation } from "../../redux/messaging/messaging.actions";
|
|
||||||
import { LeftOutlined } from "@ant-design/icons";
|
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
export default function ChatConversationTitle({ conversation }) {
|
||||||
setSelectedConversation: (conversationId) =>
|
|
||||||
dispatch(setSelectedConversation(conversationId)),
|
|
||||||
});
|
|
||||||
|
|
||||||
function ChatConversationTitle({ conversation, setSelectedConversation }) {
|
|
||||||
return (
|
return (
|
||||||
<Space wrap>
|
<Space wrap>
|
||||||
<Col sm={0}>
|
|
||||||
<Button
|
|
||||||
onClick={() => setSelectedConversation()}
|
|
||||||
size="small"
|
|
||||||
type="text"
|
|
||||||
>
|
|
||||||
<LeftOutlined />
|
|
||||||
</Button>
|
|
||||||
</Col>
|
|
||||||
<PhoneNumberFormatter>
|
<PhoneNumberFormatter>
|
||||||
{conversation && conversation.phone_num}
|
{conversation && conversation.phone_num}
|
||||||
</PhoneNumberFormatter>
|
</PhoneNumberFormatter>
|
||||||
@@ -40,5 +23,3 @@ function ChatConversationTitle({ conversation, setSelectedConversation }) {
|
|||||||
</Space>
|
</Space>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(null, mapDispatchToProps)(ChatConversationTitle);
|
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ export function ChatPopupComponent({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<Row gutter={[8, 8]} className="chat-popup-content">
|
<Row gutter={[8, 8]} className="chat-popup-content">
|
||||||
<Col span={8} sm={8} xs={selectedConversation && 0}>
|
<Col span={8}>
|
||||||
{loading ? (
|
{loading ? (
|
||||||
<LoadingSpinner />
|
<LoadingSpinner />
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -108,12 +108,7 @@ export function JobsConvertButton({
|
|||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<Select
|
<Select>
|
||||||
showSearch
|
|
||||||
filterOption={(input, option) => {
|
|
||||||
return option.value.toLowerCase().includes(input.toLowerCase());
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{bodyshop.md_ins_cos.map((s, i) => (
|
{bodyshop.md_ins_cos.map((s, i) => (
|
||||||
<Select.Option key={i} value={s.name}>
|
<Select.Option key={i} value={s.name}>
|
||||||
{s.name}
|
{s.name}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Alert, Button, Space } from "antd";
|
import { Alert, Button, Col, Row, Space } from "antd";
|
||||||
import i18n from "i18next";
|
import i18n from "i18next";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
@@ -28,37 +28,43 @@ export function UpdateAlert({ updateAvailable }) {
|
|||||||
message={t("general.messages.newversiontitle")}
|
message={t("general.messages.newversiontitle")}
|
||||||
showIcon
|
showIcon
|
||||||
icon={<AlertOutlined />}
|
icon={<AlertOutlined />}
|
||||||
description={t("general.messages.newversionmessage")}
|
description={
|
||||||
|
<Row gutter={[16, 16]}>
|
||||||
|
<Col sm={24} md={16} lg={18}>
|
||||||
|
{t("general.messages.newversionmessage")}
|
||||||
|
</Col>
|
||||||
|
<Col sm={24} md={8} lg={6}>
|
||||||
|
<Space wrap>
|
||||||
|
<Button
|
||||||
|
onClick={async () => {
|
||||||
|
window.open("https://imex-online.noticeable.news/", "_blank");
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{i18n.t("general.actions.viewreleasenotes")}
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
onClick={async () => {
|
||||||
|
if (globalRegistration && globalRegistration.waiting) {
|
||||||
|
await globalRegistration.unregister();
|
||||||
|
// Makes Workbox call skipWaiting()
|
||||||
|
globalRegistration.waiting.postMessage({
|
||||||
|
type: "SKIP_WAITING",
|
||||||
|
});
|
||||||
|
// Once the service worker is unregistered, we can reload the page to let
|
||||||
|
// the browser download a fresh copy of our app (invalidating the cache)
|
||||||
|
window.location.reload();
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{i18n.t("general.actions.refresh")}
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
}
|
||||||
closable={false}
|
closable={false}
|
||||||
type="warning"
|
type="warning"
|
||||||
action={
|
|
||||||
<Space flex>
|
|
||||||
<Button
|
|
||||||
onClick={async () => {
|
|
||||||
window.open("https://imex-online.noticeable.news/", "_blank");
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{i18n.t("general.actions.viewreleasenotes")}
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
type="primary"
|
|
||||||
onClick={async () => {
|
|
||||||
if (globalRegistration && globalRegistration.waiting) {
|
|
||||||
await globalRegistration.unregister();
|
|
||||||
// Makes Workbox call skipWaiting()
|
|
||||||
globalRegistration.waiting.postMessage({
|
|
||||||
type: "SKIP_WAITING",
|
|
||||||
});
|
|
||||||
// Once the service worker is unregistered, we can reload the page to let
|
|
||||||
// the browser download a fresh copy of our app (invalidating the cache)
|
|
||||||
window.location.reload();
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{i18n.t("general.actions.refresh")}
|
|
||||||
</Button>
|
|
||||||
</Space>
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user