Compare commits

..

1 Commits

Author SHA1 Message Date
Patrick Fic
e31a7eb65f Resolve third party payer template issue. 2022-04-14 10:23:09 -07:00
9 changed files with 7001 additions and 2613 deletions

21
.eslintrc.json Normal file
View File

@@ -0,0 +1,21 @@
{
"env": {
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
"no-console": "off"
},
"settings": {},
"plugins": ["cypress"]
}

View File

@@ -3,27 +3,21 @@
"version": "0.2.1",
"private": true,
"proxy": "http://localhost:4000",
"browser": {
"fs": false,
"path": false,
"os": false
},
"dependencies": {
"@apollo/client": "^3.5.10",
"@asseinfo/react-kanban": "^2.2.0",
"@craco/craco": "^6.4.3",
"@fingerprintjs/fingerprintjs": "^3.3.3",
"@jsreport/browser-client": "^3.1.0",
"@sentry/react": "^6.19.6",
"@sentry/tracing": "^6.19.6",
"@splitsoftware/splitio-react": "^1.4.0",
"@splitsoftware/splitio-react": "^1.3.1-rc.1",
"@stripe/react-stripe-js": "^1.7.1",
"@stripe/stripe-js": "^1.27.0",
"@tanem/react-nprogress": "^5.0.0",
"@tanem/react-nprogress": "^4.0.12",
"antd": "^4.19.5",
"apollo-link-logger": "^2.0.0",
"axios": "^0.26.1",
"craco-less": "^2.0.0",
"craco-less": "^1.20.0",
"dinero.js": "^1.9.1",
"dotenv": "^16.0.0",
"enquire-js": "^0.2.1",
@@ -34,6 +28,7 @@
"i18next": "^21.6.16",
"i18next-browser-languagedetector": "^6.1.4",
"jsoneditor": "^9.7.4",
"jsreport-browser-client-dist": "^1.3.0",
"libphonenumber-js": "^1.9.51",
"logrocket": "^2.2.1",
"markerjs2": "^2.21.0",
@@ -45,15 +40,15 @@
"query-string": "^7.1.1",
"rc-queue-anim": "^2.0.0",
"rc-scroll-anim": "^2.7.6",
"react": "^18.0.0",
"react-big-calendar": "^0.40.0",
"react": "^17.0.2",
"react-big-calendar": "^0.38.2",
"react-color": "^2.19.3",
"react-cookie": "^4.1.1",
"react-dom": "^18.0.0",
"react-dom": "^17.0.2",
"react-drag-listview": "^0.1.9",
"react-grid-gallery": "^0.5.5",
"react-grid-layout": "^1.3.4",
"react-i18next": "^11.16.6",
"react-i18next": "^11.16.5",
"react-icons": "^4.3.1",
"react-number-format": "^4.9.1",
"react-redux": "^7.2.8",
@@ -74,18 +69,18 @@
"styled-components": "^5.3.5",
"subscriptions-transport-ws": "^0.11.0",
"web-vitals": "^2.1.4",
"workbox-background-sync": "^6.5.3",
"workbox-broadcast-update": "^6.5.3",
"workbox-cacheable-response": "^6.5.3",
"workbox-core": "^6.5.3",
"workbox-expiration": "^6.5.3",
"workbox-google-analytics": "^6.5.3",
"workbox-navigation-preload": "^6.5.3",
"workbox-precaching": "^6.5.3",
"workbox-range-requests": "^6.5.3",
"workbox-routing": "^6.5.3",
"workbox-strategies": "^6.5.3",
"workbox-streams": "^6.5.3",
"workbox-background-sync": "^6.5.2",
"workbox-broadcast-update": "^6.5.2",
"workbox-cacheable-response": "^6.5.2",
"workbox-core": "^6.5.2",
"workbox-expiration": "^6.5.2",
"workbox-google-analytics": "^6.5.2",
"workbox-navigation-preload": "^6.5.2",
"workbox-precaching": "^6.5.2",
"workbox-range-requests": "^6.5.2",
"workbox-routing": "^6.5.2",
"workbox-strategies": "^6.5.2",
"workbox-streams": "^6.5.2",
"yauzl": "^2.10.0"
},
"scripts": {
@@ -124,9 +119,9 @@
"devDependencies": {
"@sentry/webpack-plugin": "^1.18.8",
"@testing-library/cypress": "^8.0.2",
"cypress": "^9.5.4",
"cypress": "^9.5.3",
"eslint-plugin-cypress": "^2.12.1",
"react-error-overlay": "6.0.11",
"react-error-overlay": "6.0.10",
"redux-logger": "^3.0.6",
"source-map-explorer": "^2.5.2"
}

View File

@@ -49,11 +49,11 @@ export function Jobd3RdPartyModal({ bodyshop, jobId }) {
GenerateDocument(
{
name: TemplateList("job_special").thirdpartypayer.key,
name: TemplateList("job_special").special_thirdpartypayer.key,
variables: { id: jobId },
context: restVals,
},
{ subject: TemplateList("job_special").thirdpartypayer.subject },
{ subject: TemplateList("job_special").special_thirdpartypayer.subject },
sendtype
);
};

View File

@@ -3,7 +3,7 @@ import * as Sentry from "@sentry/react";
import "antd/dist/antd.less";
import Dinero from "dinero.js";
import React from "react";
import { createRoot } from "react-dom/client";
import ReactDOM from "react-dom";
import { Provider } from "react-redux";
import { BrowserRouter } from "react-router-dom";
import { PersistGate } from "redux-persist/integration/react";
@@ -39,9 +39,7 @@ if (process.env.NODE_ENV !== "development") {
});
}
const container = document.getElementById("root");
const root = createRoot(container); // createRoot(container!) if you use TypeScript
root.render(
ReactDOM.render(
<Provider store={store}>
<BrowserRouter>
<PersistGate
@@ -51,7 +49,48 @@ root.render(
<AppContainer />
</PersistGate>
</BrowserRouter>
</Provider>
</Provider>,
document.getElementById("root")
);
// const onServiceWorkerUpdate = (registration) => {
// console.log("onServiceWorkerUpdate", registration);
// const btn = (
// <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 (registration && registration.waiting) {
// await registration.unregister();
// // Makes Workbox call skipWaiting()
// 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({
// icon: <AlertOutlined />,
// message: i18n.t("general.messages.newversiontitle"),
// description: i18n.t("general.messages.newversionmessage"),
// duration: 0,
// btn,
// key: "updateavailable",
// });
// };
// serviceWorkerRegistration.register({ onUpdate: onServiceWorkerUpdate });
reportWebVitals();

View File

@@ -1,7 +1,7 @@
import { gql } from "@apollo/client";
import { notification } from "antd";
import axios from "axios";
import jsreport from "@jsreport/browser-client";
import jsreport from "jsreport-browser-client-dist";
import _ from "lodash";
import moment from "moment";
import { auth } from "../firebase/firebase.utils";
@@ -24,6 +24,7 @@ export default async function RenderTemplate(
let { contextData, useShopSpecificTemplate } = await fetchContextData(
templateObject
);
console.log(templateObject.name)
const { ignoreCustomMargins } = Templates[templateObject.name];
let reportRequest = {

View File

@@ -476,7 +476,7 @@ export const TemplateList = (type, context) => {
: {}),
...(!type || type === "job_special"
? {
thirdpartypayer: {
special_thirdpartypayer: {
title: i18n.t("printcenter.jobs.thirdpartypayer"),
description: "CSI invite",
key: "special_thirdpartypayer",

File diff suppressed because it is too large Load Diff

5325
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -3,8 +3,8 @@
"version": "0.0.1",
"license": "UNLICENSED",
"engines": {
"node": "16.14.2",
"npm": "8.6.0"
"node": "12.22.6",
"npm": "7.17.0"
},
"scripts": {
"setup": "yarn && cd client && yarn",