IO-1140 Added release notes integration.

This commit is contained in:
Patrick Fic
2021-06-03 10:02:04 -07:00
parent 786d76bb73
commit 95ba0e1f8a
10 changed files with 142 additions and 54 deletions

View File

@@ -12448,6 +12448,27 @@
</translation> </translation>
</translations> </translations>
</concept_node> </concept_node>
<concept_node>
<name>viewreleasenotes</name>
<definition_loaded>false</definition_loaded>
<description></description>
<comment></comment>
<default_text></default_text>
<translations>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>es-MX</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-CA</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
</children> </children>
</folder_node> </folder_node>
<folder_node> <folder_node>
@@ -31034,7 +31055,7 @@
<name>templates</name> <name>templates</name>
<children> <children>
<concept_node> <concept_node>
<name>attendance</name> <name>attendance_detail</name>
<definition_loaded>false</definition_loaded> <definition_loaded>false</definition_loaded>
<description></description> <description></description>
<comment></comment> <comment></comment>

View File

@@ -9,12 +9,50 @@
<!-- <link rel="apple-touch-icon" href="logo192.png" /> --> <!-- <link rel="apple-touch-icon" href="logo192.png" /> -->
<link rel="apple-touch-icon" href="logo192.png" /> <link rel="apple-touch-icon" href="logo192.png" />
<!-- <script <script>
data-jsd-embedded !(function () {
data-key="51adb36e-ee16-46b1-a4c6-4b6d5fcd8530" "use strict";
data-base-url="https://jsd-widget.atlassian.com" var e = [
src="https://jsd-widget.atlassian.com/assets/embed.js" "debug",
></script> --> "destroy",
"do",
"help",
"identify",
"is",
"off",
"on",
"ready",
"render",
"reset",
"safe",
"set",
];
if (window.noticeable)
console.warn("Noticeable SDK code snippet loaded more than once");
else {
var n = (window.noticeable = window.noticeable || []);
function t(e) {
return function () {
var t = Array.prototype.slice.call(arguments);
return t.unshift(e), n.push(t), n;
};
}
!(function () {
for (var o = 0; o < e.length; o++) {
var r = e[o];
n[r] = t(r);
}
})(),
(function () {
var e = document.createElement("script");
(e.async = !0), (e.src = "https://sdk.noticeable.io/l.js");
var n = document.head;
n.insertBefore(e, n.firstChild);
})();
}
})();
</script>
<!-- <!--
manifest.json provides metadata used when your web app is installed on a manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/

View File

@@ -20,14 +20,20 @@ export default function AppContainer() {
// Include the Crisp code here, without the <script></script> tags // Include the Crisp code here, without the <script></script> tags
window.$crisp = []; window.$crisp = [];
window.CRISP_WEBSITE_ID = "36724f62-2eb0-4b29-9cdd-9905fb99913e"; window.CRISP_WEBSITE_ID = "36724f62-2eb0-4b29-9cdd-9905fb99913e";
var d = document; var d = document;
var s = d.createElement("script"); var s = d.createElement("script");
s.src = "https://client.crisp.chat/l.js"; s.src = "https://client.crisp.chat/l.js";
s.async = 1; s.async = 1;
d.getElementsByTagName("head")[0].appendChild(s); d.getElementsByTagName("head")[0].appendChild(s);
//Release Notes
// var rs = d.createElement("script");
// rs.src = "https://sdk.noticeable.io/s.js";
// //rs.async = 1;
// d.getElementsByTagName("head")[0].appendChild(rs);
// // window.noticeable.render("widget", "IABVNO4scRKY11XBQkNr");
return () => { return () => {
d.getElementsByTagName("head")[0].removeChild(s); d.getElementsByTagName("head")[0].removeChild(s);
}; };

View File

@@ -14,13 +14,13 @@ import Icon, {
LineChartOutlined, LineChartOutlined,
PaperClipOutlined, PaperClipOutlined,
PhoneOutlined, PhoneOutlined,
QuestionCircleFilled,
ScheduleOutlined, ScheduleOutlined,
SettingOutlined, SettingOutlined,
TeamOutlined, TeamOutlined,
ToolFilled, ToolFilled,
UnorderedListOutlined, UnorderedListOutlined,
UserOutlined, UserOutlined,
QuestionCircleFilled,
} from "@ant-design/icons"; } from "@ant-design/icons";
import { Layout, Menu } from "antd"; import { Layout, Menu } from "antd";
import React from "react"; import React from "react";
@@ -256,6 +256,13 @@ function Header({
{t("menus.header.temporarydocs")} {t("menus.header.temporarydocs")}
</Link> </Link>
</Menu.Item> </Menu.Item>
<Menu.Item
key="help"
onClick={() => {
window.open("https://help.imex.online/", "_blank");
}}
icon={<Icon component={QuestionCircleFilled} />}
/>
<Menu.SubMenu title={t("menus.header.shop")} icon={<SettingOutlined />}> <Menu.SubMenu title={t("menus.header.shop")} icon={<SettingOutlined />}>
<Menu.Item key="shop" icon={<Icon component={GiSettingsKnobs} />}> <Menu.Item key="shop" icon={<Icon component={GiSettingsKnobs} />}>
<Link to="/manage/shop">{t("menus.header.shop_config")}</Link> <Link to="/manage/shop">{t("menus.header.shop_config")}</Link>
@@ -285,15 +292,6 @@ function Header({
<Link to="/manage/shop/csi">{t("menus.header.shop_csi")}</Link> <Link to="/manage/shop/csi">{t("menus.header.shop_csi")}</Link>
</Menu.Item> </Menu.Item>
</Menu.SubMenu> </Menu.SubMenu>
<Menu.Item
key="shop"
onClick={() => {
window.open("https://help.imex.online/", "_blank");
}}
icon={<Icon component={QuestionCircleFilled} />}
>
{t("menus.header.help")}
</Menu.Item>
<Menu.SubMenu <Menu.SubMenu
style={{ float: "right" }} style={{ float: "right" }}
title={ title={

View File

@@ -1,6 +1,6 @@
import { AlertOutlined } from "@ant-design/icons"; import { AlertOutlined } from "@ant-design/icons";
import * as Sentry from "@sentry/react"; import * as Sentry from "@sentry/react";
import { Button, notification } from "antd"; import { Button, notification, Space } from "antd";
//import "antd/dist/antd.css"; //import "antd/dist/antd.css";
import "antd/dist/antd.less"; import "antd/dist/antd.less";
import Dinero from "dinero.js"; import Dinero from "dinero.js";
@@ -26,8 +26,7 @@ Dinero.globalRoundingMode = "HALF_EVEN";
if (process.env.NODE_ENV !== "development") { if (process.env.NODE_ENV !== "development") {
Sentry.init({ Sentry.init({
dsn: dsn: "https://fd7e89369b6b4bdc9c6c4c9f22fa4ee4@o492140.ingest.sentry.io/5651027",
"https://fd7e89369b6b4bdc9c6c4c9f22fa4ee4@o492140.ingest.sentry.io/5651027",
integrations: [ integrations: [
// new Integrations.BrowserTracing(), // new Integrations.BrowserTracing(),
// new Sentry.Integrations.Breadcrumbs({ console: true }), // new Sentry.Integrations.Breadcrumbs({ console: true }),
@@ -57,21 +56,30 @@ const onServiceWorkerUpdate = (registration) => {
console.log("onServiceWorkerUpdate", registration); console.log("onServiceWorkerUpdate", registration);
const btn = ( const btn = (
<Button <Space flex>
type="primary" <Button
onClick={async () => { onClick={async () => {
if (registration && registration.waiting) { window.open("https://imex-online.noticeable.news/", "_blank");
await registration.unregister(); }}
// Makes Workbox call skipWaiting() >
registration.waiting.postMessage({ type: "SKIP_WAITING" }); {i18n.t("general.actions.viewreleasenotes")}
// Once the service worker is unregistered, we can reload the page to let </Button>
// the browser download a fresh copy of our app (invalidating the cache) <Button
window.location.reload(); type="primary"
} onClick={async () => {
}} if (registration && registration.waiting) {
> await registration.unregister();
{i18n.t("general.actions.refresh")} // Makes Workbox call skipWaiting()
</Button> registration.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>
); );
notification.open({ notification.open({
icon: <AlertOutlined />, icon: <AlertOutlined />,

View File

@@ -181,7 +181,10 @@ const mapStateToProps = createStructuredSelector({
export function Manage({ match, conflict, bodyshop }) { export function Manage({ match, conflict, bodyshop }) {
const { t } = useTranslation(); const { t } = useTranslation();
useEffect(() => {
const widgetId = "IABVNO4scRKY11XBQkNr";
window.noticeable.render("widget", widgetId);
}, []);
useEffect(() => { useEffect(() => {
document.title = t("titles.app"); document.title = t("titles.app");
}, [t]); }, [t]);
@@ -383,11 +386,22 @@ export function Manage({ match, conflict, bodyshop }) {
<ChatAffixContainer /> <ChatAffixContainer />
<BackTop /> <BackTop />
<Footer> <Footer>
<div style={{ textAlign: "center", margin: "1rem 0rem" }}> <div
<div> style={{
{`ImEX Online ${ display: "flex",
process.env.REACT_APP_GIT_SHA flexDirection: "column",
} - ${preval`module.exports = new Date().toLocaleString("en-US", {timeZone: "America/Los_Angeles"});`}`} 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>
<Link to="/about" target="_blank" style={{ color: "#ccc" }}> <Link to="/about" target="_blank" style={{ color: "#ccc" }}>
Disclaimer Disclaimer

View File

@@ -797,7 +797,8 @@
"selectall": "Select All", "selectall": "Select All",
"submit": "Submit", "submit": "Submit",
"submitticket": "Submit a Support Ticket", "submitticket": "Submit a Support Ticket",
"view": "View" "view": "View",
"viewreleasenotes": "See What's Changed"
}, },
"errors": { "errors": {
"notfound": "No record was found." "notfound": "No record was found."
@@ -1868,7 +1869,7 @@
"vendor": "Vendor" "vendor": "Vendor"
}, },
"templates": { "templates": {
"attendance": "Attendance (All Employees)", "attendance_detail": "Attendance (All Employees)",
"attendance_employee": "Employee Attendance", "attendance_employee": "Employee Attendance",
"attendance_summary": "Attendance Summary (All Employees)", "attendance_summary": "Attendance Summary (All Employees)",
"credits_not_received_date": "Credits not Received by Date", "credits_not_received_date": "Credits not Received by Date",
@@ -1902,7 +1903,7 @@
"open_orders_ins_co": "Open Orders by Insurance Company", "open_orders_ins_co": "Open Orders by Insurance Company",
"parts_backorder": "Backordered Parts", "parts_backorder": "Backordered Parts",
"payments_by_date": "Payments by Date", "payments_by_date": "Payments by Date",
"payments_by_date_type": "Payments by Date Range", "payments_by_date_type": "Payments by Date and Type",
"purchases_by_cost_center_detail": "Purchases by Cost Center (Detail)", "purchases_by_cost_center_detail": "Purchases by Cost Center (Detail)",
"purchases_by_cost_center_summary": "Purchases by Cost Center (Summary)", "purchases_by_cost_center_summary": "Purchases by Cost Center (Summary)",
"purchases_by_date_range_detail": "Purchases by Date - Detail", "purchases_by_date_range_detail": "Purchases by Date - Detail",

View File

@@ -797,7 +797,8 @@
"selectall": "", "selectall": "",
"submit": "", "submit": "",
"submitticket": "", "submitticket": "",
"view": "" "view": "",
"viewreleasenotes": ""
}, },
"errors": { "errors": {
"notfound": "" "notfound": ""
@@ -1868,7 +1869,7 @@
"vendor": "" "vendor": ""
}, },
"templates": { "templates": {
"attendance": "", "attendance_detail": "",
"attendance_employee": "", "attendance_employee": "",
"attendance_summary": "", "attendance_summary": "",
"credits_not_received_date": "", "credits_not_received_date": "",

View File

@@ -797,7 +797,8 @@
"selectall": "", "selectall": "",
"submit": "", "submit": "",
"submitticket": "", "submitticket": "",
"view": "" "view": "",
"viewreleasenotes": ""
}, },
"errors": { "errors": {
"notfound": "" "notfound": ""
@@ -1868,7 +1869,7 @@
"vendor": "" "vendor": ""
}, },
"templates": { "templates": {
"attendance": "", "attendance_detail": "",
"attendance_employee": "", "attendance_employee": "",
"attendance_summary": "", "attendance_summary": "",
"credits_not_received_date": "", "credits_not_received_date": "",

View File

@@ -555,10 +555,10 @@ export const TemplateList = (type, context) => {
idtype: "employee", idtype: "employee",
disabled: false, disabled: false,
}, },
attendance: { attendance_detail: {
title: i18n.t("reportcenter.templates.attendance"), title: i18n.t("reportcenter.templates.attendance_detail"),
subject: i18n.t("reportcenter.templates.attendance"), subject: i18n.t("reportcenter.templates.attendance_detail"),
key: "attendance", key: "attendance_detail",
disabled: false, disabled: false,
rangeFilter: { rangeFilter: {