Compare commits

...

27 Commits

Author SHA1 Message Date
Patrick Fic
bee078fe18 Add user definted rates to labor misc for autohouse. 2022-12-20 12:38:41 -08:00
Patrick Fic
8a0281fb43 Merged in release/2022-12-16 (pull request #643)
Release/2022 12 16
2022-12-16 18:59:41 +00:00
Patrick Fic
1df023fd15 Remove unneeded import to fix CI. 2022-12-15 17:09:05 -08:00
Patrick Fic
54277e4548 IO-2131 Resolve job search select filtering issue. 2022-12-15 16:39:47 -08:00
Patrick Fic
cffa1e2172 IO-2121 Add custom label to conversation. 2022-12-15 10:13:30 -08:00
Patrick Fic
6a25dff32d Merged in release/2022-12-16 (pull request #639)
Resolve scheduling loading issue.
2022-12-14 16:59:04 +00:00
Patrick Fic
ecfc365926 Resolve scheduling loading issue. 2022-12-14 08:30:16 -08:00
Patrick Fic
2f0bb4539e Merged in release/2022-12-09 (pull request #638)
Release/2022 12 09
2022-12-10 01:32:06 +00:00
Patrick Fic
2ac7f9b678 Add ownr_co_nm to search own query. 2022-12-09 14:07:27 -08:00
Patrick Fic
e192a63575 IO-2123 Add cc inventory print. 2022-12-09 11:35:13 -08:00
Patrick Fic
4c42522f3a IO-2122 Add time ticket report. 2022-12-09 08:09:53 -08:00
Patrick Fic
dad3dc9e42 Autohouse based updates. 2022-12-08 14:47:51 -08:00
Patrick Fic
b2b754bee0 IO-2118 Add expected production hours to scheduling. 2022-12-05 15:20:37 -08:00
Patrick Fic
8f9f80e8ee IO-2084 Add actualr epair start date. 2022-12-05 14:38:36 -08:00
Patrick Fic
0cf677abbf Merged in release/2022-12-02 (pull request #635)
IO-2116 Add account number to control types for DMS.
2022-12-03 03:16:53 +00:00
Patrick Fic
bc3238aba2 IO-2116 Add account number to control types for DMS. 2022-11-30 08:47:20 -08:00
Patrick Fic
df8c94cda2 Merged in release/2022-11-25 (pull request #632)
IO-2114 Resolve issue with unfound payer.
2022-11-26 00:01:25 +00:00
Patrick Fic
6a2fefc573 IO-2114 Resolve issue with unfound payer. 2022-11-25 15:59:55 -08:00
Patrick Fic
e1dc257279 Merged in release/2022-11-25 (pull request #631)
Release/2022 11 25
2022-11-25 20:57:01 +00:00
Patrick Fic
94e8dc7456 IO-2106 Add payment Ref to QBO export. 2022-11-25 08:40:40 -08:00
Patrick Fic
d6c6e5245d IO-2114 Resolve missing translation on DMS form when no control tpye set. 2022-11-25 08:27:56 -08:00
Patrick Fic
a64f9d8213 IO-2112 Update size of note preset field. 2022-11-25 08:23:02 -08:00
Patrick Fic
e8c727a393 Resolve bounced email tracking. 2022-11-23 14:31:25 -08:00
Patrick Fic
37cef75fef IO-2098 Fix vin search bug on job import. 2022-11-23 12:27:11 -08:00
Patrick Fic
7301d9da85 IO-2098 Remove page size on all jobs. 2022-11-23 11:05:27 -08:00
Patrick Fic
beb7daec5f Remove packages no longer controled by this repo. 2022-11-23 10:53:39 -08:00
Patrick Fic
311da0c028 Merged in revert-pr-628 (pull request #629)
Revert "Release/2022 11 25 (pull request #628)"
2022-11-22 01:31:33 +00:00
102 changed files with 592 additions and 53486 deletions

View File

@@ -17,5 +17,4 @@
"no-console": "off"
},
"settings": {}
//"plugins": ["cypress"]
}

View File

@@ -1,68 +0,0 @@
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
## Available Scripts
In the project directory, you can run:
### `yarn start`
Runs the app in the development mode.<br />
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
The page will reload if you make edits.<br />
You will also see any lint errors in the console.
### `yarn test`
Launches the test runner in the interactive watch mode.<br />
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
### `yarn build`
Builds the app for production to the `build` folder.<br />
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.<br />
Your app is ready to be deployed!
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
### `yarn eject`
**Note: this is a one-way operation. Once you `eject`, you cant go back!**
If you arent satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point youre on your own.
You dont have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldnt feel obligated to use this feature. However we understand that this tool wouldnt be useful if you couldnt customize it when you are ready for it.
## Learn More
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
To learn React, check out the [React documentation](https://reactjs.org/).
### Code Splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
### Analyzing the Bundle Size
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
### Making a Progressive Web App
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
### Advanced Configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
### Deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
### `yarn build` fails to minify
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify

18103
admin/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,47 +0,0 @@
{
"name": "admin",
"version": "0.1.0",
"private": true,
"dependencies": {
"@apollo/client": "^3.3.15",
"@testing-library/jest-dom": "^5.11.10",
"@testing-library/react": "^11.2.6",
"@testing-library/user-event": "^13.1.5",
"@types/prop-types": "^15.7.3",
"apollo-boost": "^0.4.9",
"apollo-link-context": "^1.0.20",
"apollo-link-logger": "^2.0.0",
"dotenv": "^8.2.0",
"firebase": "^8.4.1",
"graphql": "^15.4.0",
"prop-types": "^15.7.2",
"ra-data-hasura-graphql": "^0.1.13",
"react": "^17.0.1",
"react-admin": "^3.14.4",
"react-dom": "^17.0.1",
"react-icons": "^4.2.0",
"react-scripts": "4.0.3",
"sass": "^1.32.10"
},
"scripts": {
"start": "set PORT=3001 && react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -1,43 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
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/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>ImEX Online - ADMIN</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

View File

@@ -1,25 +0,0 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}

View File

@@ -1,3 +0,0 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:

View File

@@ -1,38 +0,0 @@
.App {
text-align: center;
}
.App-logo {
height: 40vmin;
pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
.App-logo {
animation: App-logo-spin infinite 20s linear;
}
}
.App-header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}
.App-link {
color: #61dafb;
}
@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}

View File

@@ -1,12 +0,0 @@
import React from "react";
import AdminRoot from "../components/admin-root/admin-root.component";
import "./App.css";
function App() {
return (
<div className="App">
<AdminRoot />
</div>
);
}
export default App;

View File

@@ -1,9 +0,0 @@
import React from 'react';
import { render } from '@testing-library/react';
import App from './App';
test('renders learn react link', () => {
const { getByText } = render(<App />);
const linkElement = getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
});

View File

@@ -1,7 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3">
<g fill="#61DAFB">
<path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/>
<circle cx="420.9" cy="296.5" r="45.7"/>
<path d="M520.5 78.1z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -1,283 +0,0 @@
import { ApolloClient, ApolloProvider, InMemoryCache } from "@apollo/client";
import { ApolloLink } from "apollo-boost";
import { setContext } from "apollo-link-context";
import { HttpLink } from "apollo-link-http";
import apolloLogger from "apollo-link-logger";
import buildHasuraProvider from "ra-data-hasura-graphql";
import React, { Component } from "react";
import {
Admin,
EditGuesser,
ListGuesser,
Resource,
ShowGuesser,
} from "react-admin";
import { FaFileInvoiceDollar } from "react-icons/fa";
import CircularProgress from "@material-ui/core/CircularProgress";
import { auth } from "../../firebase/admin-firebase-utils";
import authProvider from "../auth-provider/auth-provider";
import JoblinesCreate from "../joblines/joblines.create";
import JoblinesEdit from "../joblines/joblines.edit";
import JoblinesList from "../joblines/joblines.list";
import JoblinesShow from "../joblines/joblines.show";
import JobsCreate from "../jobs/jobs.create";
import JobsEdit from "../jobs/jobs.edit";
import JobsList from "../jobs/jobs.list";
import JobsShow from "../jobs/jobs.show";
const httpLink = new HttpLink({
uri: process.env.REACT_APP_GRAPHQL_ENDPOINT,
headers: {
"x-hasura-admin-secret": `Dev-BodyShopApp!`,
// 'Authorization': `Bearer xxxx`,
},
});
const authLink = setContext((_, { headers }) => {
return (
auth.currentUser &&
auth.currentUser.getIdToken().then((token) => {
if (token) {
return {
headers: {
...headers,
authorization: token ? `Bearer ${token}` : "",
},
};
} else {
return { headers };
}
})
);
});
const middlewares = [];
if (process.env.NODE_ENV === "development") {
middlewares.push(apolloLogger);
}
middlewares.push(authLink.concat(httpLink));
const client = new ApolloClient({
link: ApolloLink.from(middlewares),
cache: new InMemoryCache(),
});
// const client = new ApolloClient({
// uri: process.env.REACT_APP_GRAPHQL_ENDPOINT,
// cache: new InMemoryCache(),
// headers: {
// "x-hasura-admin-secret": `Dev-BodyShopApp!`,
// // 'Authorization': `Bearer xxxx`,
// },
// });
class AdminRoot extends Component {
constructor() {
super();
this.state = { dataProvider: null };
}
componentDidMount() {
buildHasuraProvider({
client,
}).then((dataProvider) => this.setState({ dataProvider }));
}
render() {
const { dataProvider } = this.state;
if (!dataProvider) {
return (
<div>
<CircularProgress />
</div>
);
}
return (
<ApolloProvider client={client}>
<Admin dataProvider={dataProvider} authProvider={authProvider}>
<Resource
icon={FaFileInvoiceDollar}
name="jobs"
list={JobsList}
edit={JobsEdit}
create={JobsCreate}
show={JobsShow}
/>
<Resource
name="joblines"
list={JoblinesList}
edit={JoblinesEdit}
create={JoblinesCreate}
show={JoblinesShow}
/>
<Resource
name="bodyshops"
list={ListGuesser}
edit={EditGuesser}
show={ShowGuesser}
/>
<Resource
name="owners"
list={ListGuesser}
edit={EditGuesser}
show={ShowGuesser}
/>
<Resource
name="vehicles"
list={ListGuesser}
edit={EditGuesser}
show={ShowGuesser}
/>
<Resource
name="appointments"
list={ListGuesser}
edit={EditGuesser}
show={ShowGuesser}
/>
<Resource
name="available_jobs"
list={ListGuesser}
edit={EditGuesser}
show={ShowGuesser}
/>
<Resource
name="cccontracts"
list={ListGuesser}
edit={EditGuesser}
show={ShowGuesser}
/>
<Resource
name="conversations"
list={ListGuesser}
edit={EditGuesser}
show={ShowGuesser}
/>
<Resource
name="counters"
list={ListGuesser}
edit={EditGuesser}
show={ShowGuesser}
/>
<Resource
name="courtesycars"
list={ListGuesser}
edit={EditGuesser}
show={ShowGuesser}
/>
<Resource
name="csi"
list={ListGuesser}
edit={EditGuesser}
show={ShowGuesser}
/>
<Resource
name="csiquestions"
list={ListGuesser}
edit={EditGuesser}
show={ShowGuesser}
/>
<Resource
name="documents"
list={ListGuesser}
edit={EditGuesser}
show={ShowGuesser}
/>
<Resource
name="employees"
list={ListGuesser}
edit={EditGuesser}
show={ShowGuesser}
/>
<Resource
name="invoicelines"
list={ListGuesser}
edit={EditGuesser}
show={ShowGuesser}
/>
<Resource
name="invoices"
list={ListGuesser}
edit={EditGuesser}
show={ShowGuesser}
/>
<Resource
name="job_conversations"
list={ListGuesser}
edit={EditGuesser}
show={ShowGuesser}
/>
<Resource
name="masterdata"
list={ListGuesser}
edit={EditGuesser}
show={ShowGuesser}
/>
<Resource
name="messages"
list={ListGuesser}
edit={EditGuesser}
show={ShowGuesser}
/>
<Resource
name="notes"
list={ListGuesser}
edit={EditGuesser}
show={ShowGuesser}
/>
<Resource
name="parts_order_lines"
list={ListGuesser}
edit={EditGuesser}
show={ShowGuesser}
/>
<Resource
name="parts_orders"
list={ListGuesser}
edit={EditGuesser}
show={ShowGuesser}
/>
<Resource
name="payments"
list={ListGuesser}
edit={EditGuesser}
show={ShowGuesser}
/>
<Resource
name="scoreboard"
list={ListGuesser}
edit={EditGuesser}
show={ShowGuesser}
/>
<Resource
name="templates"
list={ListGuesser}
edit={EditGuesser}
show={ShowGuesser}
/>
<Resource
name="timetickets"
list={ListGuesser}
edit={EditGuesser}
show={ShowGuesser}
/>
<Resource
name="users"
list={ListGuesser}
edit={EditGuesser}
show={ShowGuesser}
/>
<Resource
name="vendors"
list={ListGuesser}
edit={EditGuesser}
show={ShowGuesser}
/>
</Admin>
</ApolloProvider>
);
}
}
export default AdminRoot;

View File

@@ -1,39 +0,0 @@
import { auth, getCurrentUser } from "../../firebase/admin-firebase-utils";
const authProvider = {
login: async ({ username, password }) => {
console.log(username, password);
try {
const { user } = await auth.signInWithEmailAndPassword(
username,
password
);
const token = await user.getIdToken();
localStorage.setItem("token", token);
return Promise.resolve();
} catch (error) {
console.log("error", error);
return Promise.reject();
}
},
logout: async (params) => {
await auth.signOut();
localStorage.removeItem("token");
return Promise.resolve();
},
checkAuth: async (params) => {
const user = await getCurrentUser();
if (!!user) {
return Promise.resolve();
} else {
return Promise.reject();
}
},
checkError: (error) => {
return Promise.resolve();
},
getPermissions: (params) => {
return Promise.resolve();
},
};
export default authProvider;

View File

@@ -1,26 +0,0 @@
import React from "react";
import {
Create,
NumberInput, SimpleForm,
TextInput
} from "react-admin";
const JoblinesCreate = (props) => (
<Create {...props}>
<SimpleForm>
<TextInput source="line_ref" />
<TextInput source="line_ind" />
<NumberInput source="db_price" />
<NumberInput source="act_price" />
<NumberInput source="part_qty" />
<NumberInput source="mod_lb_hrs" />
<TextInput source="mod_lbr_type" />
<TextInput source="lbr_op" />
</SimpleForm>
</Create>
);
export default JoblinesCreate;

View File

@@ -1,70 +0,0 @@
import React from "react";
import {
BooleanInput,
DateField,
Edit,
NumberInput,
SimpleForm,
TextInput,
} from "react-admin";
const JoblinesEdit = (props) => (
<Edit {...props}>
<SimpleForm>
<TextInput source="id" />
<DateField showTime source="created_at" />
<DateField showTime source="updated_at" />
<TextInput source="jobid" />
<NumberInput source="unq_seq" />
<NumberInput source="line_ind" />
<TextInput source="line_desc" />
<TextInput source="part_type" />
<TextInput source="oem_partno" />
<TextInput source="est_seq" />
<TextInput source="db_ref" />
<TextInput source="line_ref" />
<BooleanInput source="tax_part" />
<NumberInput source="db_price" />
<NumberInput source="act_price" />
<NumberInput source="part_qty" />
<TextInput source="alt_partno" />
<TextInput source="mod_lbr_ty" />
<NumberInput source="db_hrs" />
<NumberInput source="mod_lb_hrs" />
<TextInput source="lbr_op" />
<NumberInput source="lbr_amt" />
<BooleanInput source="glass_flag" />
<TextInput source="price_inc" />
<TextInput source="alt_part_i" />
<TextInput source="price_j" />
<TextInput source="cert_part" />
<TextInput source="alt_co_id" />
<TextInput source="alt_overrd" />
<TextInput source="alt_partm" />
<TextInput source="prt_dsmk_p" />
<TextInput source="prt_dsmk_m" />
<TextInput source="lbr_inc" />
<TextInput source="lbr_hrs_j" />
<TextInput source="lbr_typ_j" />
<TextInput source="lbr_op_j" />
<TextInput source="paint_stg" />
<TextInput source="paint_tone" />
<TextInput source="lbr_tax" />
<NumberInput source="misc_amt" />
<TextInput source="misc_sublt" />
<TextInput source="misc_tax" />
<TextInput source="bett_type" />
<NumberInput source="bett_pctg" />
<NumberInput source="bett_amt" />
<TextInput source="bett_tax" />
<TextInput source="op_code_desc" />
<TextInput source="status" />
<TextInput source="removed" />
<NumberInput source="line_no" />
<TextInput source="notes" />
<TextInput source='"location"' />
</SimpleForm>
</Edit>
);
export default JoblinesEdit;

View File

@@ -1,29 +0,0 @@
import React from "react";
import {
Datagrid, List,
NumberField,
ReferenceField, TextField
} from "react-admin";
const JoblinesList = (props) => (
<List {...props}>
<Datagrid rowClick="edit">
<ReferenceField source="jobid" reference="jobs">
<TextField source="ro_number" />
</ReferenceField>
<TextField source="line_ref" />
<TextField source="line_ind" />
<NumberField source="db_price" />
<NumberField source="act_price" />
<NumberField source="part_qty" />
<NumberField source="mod_lb_hrs" />
<TextField source="mod_lbr_type" />
<TextField source="lbr_op" />
</Datagrid>
</List>
);
export default JoblinesList;

View File

@@ -1,24 +0,0 @@
import React from "react";
import {
NumberInput, Show,
SimpleShowLayout,
TextInput
} from "react-admin";
const JoblinesShow = (props) => (
<Show {...props}>
<SimpleShowLayout>
<TextInput source="line_ref" />
<TextInput source="line_ind" />
<NumberInput source="db_price" />
<NumberInput source="act_price" />
<NumberInput source="part_qty" />
<NumberInput source="mod_lb_hrs" />
<TextInput source="mod_lbr_type" />
<TextInput source="lbr_op" />
</SimpleShowLayout>
</Show>
);
export default JoblinesShow;

View File

@@ -1,17 +0,0 @@
import React from "react";
import { Create, EmailField, SimpleForm, TextInput } from "react-admin";
const JobsCreate = (props) => (
<Create {...props}>
<SimpleForm>
<TextInput source="ro_number" />
<TextInput source="ownr_fn" />
<TextInput source="ownr_ln" />
<TextInput source="converted" />
<EmailField source="ownr_ea" />
</SimpleForm>
</Create>
);
export default JobsCreate;

View File

@@ -1,316 +0,0 @@
import React from "react";
//@ts-ignore
import {
AutocompleteInput,
BooleanInput,
Edit,
FormTab,
NumberInput,
ReferenceInput,
SelectInput,
SimpleForm,
TabbedForm,
TextInput,
} from "react-admin";
const JobsEdit = (props) => (
<Edit {...props}>
<TabbedForm>
<FormTab label="Job Info">
<SimpleForm>
<ReferenceInput label="Shopid" source="shopid" reference="bodyshops">
<SelectInput disabled optionText="shopname" />
</ReferenceInput>
<TextInput source="ro_number" />
<ReferenceInput label="Owner ID" source="ownerid" reference="owners">
<AutocompleteInput
matchSuggestion={(filter, choice) =>
choice.ownr_fn &&
choice.ownr_fn.toLowerCase().includes(filter.toLowerCase())
}
optionText={(record) =>
`${record.ownr_fn || ""} ${record.ownr_ln || ""} ${
record.ownr_co_nm || ""
} (${record.ownr_ph1 || ""})`
}
/>
</ReferenceInput>
<ReferenceInput
label="Vehicle Id"
source="vehicleid"
reference="vehicles"
>
<SelectInput optionText="v_vin" />
</ReferenceInput>
<ReferenceInput label="Shopid" source="shopid" reference="bodyshops">
<SelectInput disabled optionText="shopname" />
</ReferenceInput>
<TextInput source="ro_number" />
<ReferenceInput label="Owner ID" source="ownerid" reference="owners">
<AutocompleteInput
matchSuggestion={(filter, choice) =>
choice.ownr_fn &&
choice.ownr_fn.toLowerCase().includes(filter.toLowerCase())
}
optionText={(record) =>
`${record.ownr_fn || ""} ${record.ownr_ln || ""} ${
record.ownr_co_nm || ""
} (${record.ownr_ph1 || ""})`
}
/>
</ReferenceInput>
<ReferenceInput
label="Vehicle Id"
source="vehicleid"
reference="vehicles"
>
<SelectInput optionText="v_vin" />
</ReferenceInput>
<BooleanInput source="inproduction" />
<BooleanInput source="converted" />
<TextInput disabled source="id" />
<TextInput disabled source="created_at" />
<TextInput disabled source="updated_at" />
</SimpleForm>
</FormTab>
<FormTab label="Labor Rates">
<NumberInput source="labor_rate_id" />
<NumberInput source="labor_rate_desc" />
<NumberInput source="rate_lab" />
<NumberInput source="rate_lad" />
<NumberInput source="rate_lae" />
<NumberInput source="rate_lar" />
<NumberInput source="rate_las" />
<NumberInput source="rate_laf" />
<NumberInput source="rate_lam" />
<NumberInput source="rate_lag" />
<NumberInput source="rate_atp" />
<NumberInput source="rate_lau" />
<NumberInput source="rate_la1" />
<NumberInput source="rate_la2" />
<NumberInput source="rate_la3" />
<NumberInput source="rate_la4" />
<NumberInput source="rate_mapa" />
<NumberInput source="rate_mash" />
<NumberInput source="rate_mahw" />
<NumberInput source="rate_ma2s" />
<NumberInput source="rate_ma3s" />
<NumberInput source="rate_ma2t" />
<NumberInput source="rate_mabl" />
<NumberInput source="rate_macs" />
<NumberInput source="rate_matd" />
<NumberInput source="federal_tax_rate" />
<NumberInput source="state_tax_rate" />
<NumberInput source="local_tax_rate" />
</FormTab>
<FormTab label="Dates">
<TextInput source="scheduled_in" />
<TextInput source="actual_in" />
<TextInput source="scheduled_completion" />
<TextInput source="actual_completion" />
<TextInput source="scheduled_delivery" />
<TextInput source="actual_delivery" />
<TextInput source="invoice_date" />
<TextInput source="date_estimated" />
<TextInput source="date_open" />
<TextInput source="date_scheduled" />
<TextInput source="date_invoiced" />
<TextInput source="date_exported" />
</FormTab>
<FormTab label="Insurance info">
<TextInput source="est_co_nm" />
<TextInput source="est_addr1" />
<TextInput source="est_addr2" />
<TextInput source="est_city" />
<TextInput source="est_st" />
<TextInput source="est_zip" />
<TextInput source="est_ctry" />
<TextInput source="est_ph1" />
<TextInput source="est_ea" />
<TextInput source="est_ct_ln" />
<TextInput source="est_ct_fn" />
<TextInput source="regie_number" />
<TextInput source="statusid" />
<TextInput source="ins_co_id" />
<TextInput source="ins_co_nm" />
<TextInput source="ins_addr1" />
<TextInput source="ins_addr2" />
<TextInput source="ins_city" />
<TextInput source="ins_st" />
<TextInput source="ins_zip" />
<TextInput source="ins_ctry" />
<TextInput source="ins_ph1" />
<TextInput source="ins_ph1x" />
<TextInput source="ins_ph2" />
<TextInput source="ins_ph2x" />
<TextInput source="ins_fax" />
<TextInput source="ins_faxx" />
<TextInput source="ins_ct_ln" />
<TextInput source="ins_ct_fn" />
<TextInput source="ins_title" />
<TextInput source="ins_ct_ph" />
<TextInput source="ins_ct_phx" />
<TextInput source="ins_ea" />
<TextInput source="ins_memo" />
<TextInput source="policy_no" />
<TextInput source="ded_amt" />
<TextInput source="ded_status" />
<TextInput source="asgn_no" />
<TextInput source="asgn_date" />
<TextInput source="asgn_type" />
<TextInput source="clm_no" />
<TextInput source="clm_ofc_id" />
<TextInput source="agt_co_id" />
<TextInput source="agt_co_nm" />
<TextInput source="agt_addr1" />
<TextInput source="agt_addr2" />
<TextInput source="agt_city" />
<TextInput source="agt_st" />
<TextInput source="agt_zip" />
<TextInput source="agt_ctry" />
<TextInput source="agt_ph1" />
<TextInput source="agt_ph1x" />
<TextInput source="agt_ph2" />
<TextInput source="agt_ph2x" />
<TextInput source="agt_fax" />
<TextInput source="agt_faxx" />
<TextInput source="agt_ct_ln" />
<TextInput source="agt_ct_fn" />
<TextInput source="agt_ct_ph" />
<TextInput source="agt_ct_phx" />
<TextInput source="agt_ea" />
<TextInput source="agt_lic_no" />
<TextInput source="loss_type" />
<TextInput source="loss_desc" />
<TextInput source="theft_ind" />
<TextInput source="cat_no" />
<TextInput source="tlos_ind" />
<TextInput source="ciecaid" />
<TextInput source="loss_date" />
<TextInput source="clm_ofc_nm" />
<TextInput source="clm_addr1" />
<TextInput source="clm_addr2" />
<TextInput source="clm_city" />
<TextInput source="clm_st" />
<TextInput source="clm_zip" />
<TextInput source="clm_ctry" />
<TextInput source="clm_ph1" />
<TextInput source="clm_ph1x" />
<TextInput source="clm_ph2" />
<TextInput source="clm_ph2x" />
<TextInput source="clm_fax" />
<TextInput source="clm_faxx" />
<TextInput source="clm_ct_ln" />
<TextInput source="clm_ct_fn" />
<TextInput source="clm_title" />
<TextInput source="clm_ct_ph" />
<TextInput source="clm_ct_phx" />
<TextInput source="clm_ea" />
<TextInput source="payee_nms" />
<TextInput source="pay_type" />
<TextInput source="pay_date" />
<TextInput source="pay_chknm" />
<TextInput source="pay_amt" />
</FormTab>
<FormTab label="Owner Data on Job">
<TextInput source="cust_pr" />
<TextInput source="insd_ln" />
<TextInput source="insd_fn" />
<TextInput source="insd_title" />
<TextInput source="insd_co_nm" />
<TextInput source="insd_addr1" />
<TextInput source="insd_addr2" />
<TextInput source="insd_city" />
<TextInput source="insd_st" />
<TextInput source="insd_zip" />
<TextInput source="insd_ctry" />
<TextInput source="insd_ph1" />
<TextInput source="insd_ph1x" />
<TextInput source="insd_ph2" />
<TextInput source="insd_ph2x" />
<TextInput source="insd_fax" />
<TextInput source="insd_faxx" />
<TextInput source="insd_ea" />
<TextInput source="ownr_ln" />
<TextInput source="ownr_fn" />
<TextInput source="ownr_title" />
<TextInput source="ownr_co_nm" />
<TextInput source="ownr_addr1" />
<TextInput source="ownr_addr2" />
<TextInput source="ownr_city" />
<TextInput source="ownr_st" />
<TextInput source="ownr_zip" />
<TextInput source="ownr_ctry" />
<TextInput source="ownr_ph1" />
<TextInput source="ownr_ph1x" />
<TextInput source="ownr_ph2" />
<TextInput source="ownr_ph2x" />
<TextInput source="ownr_fax" />
<TextInput source="ownr_faxx" />
<TextInput source="ownr_ea" />
</FormTab>
<FormTab label="Financial">
<TextInput source="clm_total" />
<TextInput source="owner_owing" />
</FormTab>
<FormTab label="Other">
<TextInput source="area_of_damage" />
<TextInput source="loss_cat" />
<TextInput source="special_coverage_policy" />
<TextInput source="csr" />
<TextInput source="po_number" />
<TextInput source="unit_number" />
<TextInput source="kmin" />
<TextInput source="kmout" />
<TextInput source="referral_source" />
<TextInput source="selling_dealer" />
<TextInput source="servicing_dealer" />
<TextInput source="servicing_dealer_contact" />
<TextInput source="selling_dealer_contact" />
<TextInput source="depreciation_taxes" />
<TextInput source="federal_tax_payable" />
<TextInput source="other_amount_payable" />
<TextInput source="towing_payable" />
<TextInput source="storage_payable" />
<TextInput source="adjustment_bottom_line" />
<TextInput source="tax_pstthr" />
<TextInput source="tax_tow_rt" />
<TextInput source="tax_sub_rt" />
<TextInput source="tax_paint_mat_rt" />
<TextInput source="tax_levies_rt" />
<TextInput source="tax_prethr" />
<TextInput source="tax_thramt" />
<TextInput source="tax_str_rt" />
<TextInput source="tax_lbr_rt" />
<TextInput source="adj_g_disc" />
<TextInput source="adj_towdis" />
<TextInput source="adj_strdis" />
<TextInput source="tax_predis" />
<TextInput source="rate_laa" />
<TextInput source="status" />
<TextInput source="cieca_stl" />
<TextInput source="g_bett_amt" />
<TextInput source="cieca_ttl" />
<TextInput source="plate_no" />
<TextInput source="plate_st" />
<TextInput source="v_vin" />
<TextInput source="v_model_yr" />
<TextInput source="v_model_desc" />
<TextInput source="v_make_desc" />
<TextInput source="v_color" />
<TextInput source="parts_tax_rates" />
<TextInput source="job_totals" />
<TextInput source="production_vars" />
<TextInput source="intakechecklist" />
<TextInput source="invoice_allocation" />
<TextInput source="kanbanparent" />
<TextInput source="employee_body" />
<TextInput source="employee_refinish" />
<TextInput source="employee_prep" />
</FormTab>
</TabbedForm>
</Edit>
);
export default JobsEdit;

View File

@@ -1,69 +0,0 @@
import { useQuery } from "@apollo/client";
import CircularProgress from "@material-ui/core/CircularProgress";
import React from "react";
import {
Datagrid,
Filter,
List,
ReferenceField,
SelectInput,
TextField,
TextInput,
} from "react-admin";
import { QUERY_ALL_SHOPS } from "../../graphql/admin.shop.queries";
const JobsList = (props) => (
<List filters={<JobsFilter />} {...props}>
<Datagrid rowClick="edit">
<TextField source="id" label="Job ID" />
<ReferenceField source="shopid" reference="bodyshops" label="Shop Name">
<TextField source="shopname" />
</ReferenceField>
<TextField source="ro_number" label="RO Number" />
<TextField source="ownr_fn" label="Owner FN" />
<TextField source="ownr_ln" label="Owner LN" />
<TextField source="ownr_co_nm" label="Owner CO" />
<ReferenceField source="ownerid" reference="owners" label="Owner Record">
<TextField source="id" />
</ReferenceField>
<TextField source="v_model_yr" label="Year" />
<TextField source="v_make_desc" label="Make" />
<TextField source="v_model_desc" label="Model" />
<ReferenceField
source="vehicleid"
reference="vehicles"
label="Vehicle ID"
>
<TextField source="id" />
</ReferenceField>
</Datagrid>
</List>
);
const JobsFilter = (props) => {
const { loading, error, data } = useQuery(QUERY_ALL_SHOPS, {
fetchPolicy: "network-only",
nextFetchPolicy: "network-only",
});
if (loading) return <CircularProgress />;
if (error) return JSON.stringify(error);
return (
<Filter {...props}>
<TextInput label="RO Number" source="ro_number" />
<TextInput label="Job ID" source="id" />
<SelectInput
source="shopid"
label="Bodyshop"
choices={data.bodyshops.map((b) => {
return { id: b.id, name: b.shopname };
})}
/>
</Filter>
);
};
export default JobsList;

View File

@@ -1,280 +0,0 @@
import React from "react";
import {
Datagrid,
EditButton,
NumberField,
ReferenceManyField,
Show,
Tab,
TabbedShowLayout,
TextField,
} from "react-admin";
const JobsShow = (props) => (
<Show {...props}>
<TabbedShowLayout>
<Tab label="summary">
<TextField source="id" />
<TextField source="created_at" />
<TextField source="updated_at" />
<TextField source="shopid" />
<TextField source="ro_number" />
<TextField source="ownerid" />
<TextField source="vehicleid" />
</Tab>
<Tab label="Job Lines">
<ReferenceManyField
reference="joblines"
target="jobid"
label="Job Lines"
>
<Datagrid>
<TextField source="id" />
<TextField source="line_ref" />
<TextField source="line_desc" />
<TextField source="line_ind" />
<NumberField source="db_price" />
<NumberField source="act_price" />
<NumberField source="part_qty" />
<NumberField source="mod_lb_hrs" />
<TextField source="mod_lbr_type" />
<TextField source="lbr_op" />
<EditButton />
</Datagrid>
</ReferenceManyField>
</Tab>
<Tab label="other">
<TextField source="labor_rate_id" />
<TextField source="labor_rate_desc" />
<TextField source="rate_lab" />
<TextField source="rate_lad" />
<TextField source="rate_lae" />
<TextField source="rate_lar" />
<TextField source="rate_las" />
<TextField source="rate_laf" />
<TextField source="rate_lam" />
<TextField source="rate_lag" />
<TextField source="rate_atp" />
<TextField source="rate_lau" />
<TextField source="rate_la1" />
<TextField source="rate_la2" />
<TextField source="rate_la3" />
<TextField source="rate_la4" />
<TextField source="rate_mapa" />
<TextField source="rate_mash" />
<TextField source="rate_mahw" />
<TextField source="rate_ma2s" />
<TextField source="rate_ma3s" />
<TextField source="rate_ma2t" />
<TextField source="rate_mabl" />
<TextField source="rate_macs" />
<TextField source="rate_matd" />
<TextField source="federal_tax_rate" />
<TextField source="state_tax_rate" />
<TextField source="local_tax_rate" />
<TextField source="est_co_nm" />
<TextField source="est_addr1" />
<TextField source="est_addr2" />
<TextField source="est_city" />
<TextField source="est_st" />
<TextField source="est_zip" />
<TextField source="est_ctry" />
<TextField source="est_ph1" />
<TextField source="est_ea" />
<TextField source="est_ct_ln" />
<TextField source="est_ct_fn" />
<TextField source="scheduled_in" />
<TextField source="actual_in" />
<TextField source="scheduled_completion" />
<TextField source="actual_completion" />
<TextField source="scheduled_delivery" />
<TextField source="actual_delivery" />
<TextField source="regie_number" />
<TextField source="invoice_date" />
<TextField source="inproduction" />
<TextField source="statusid" />
<TextField source="ins_co_id" />
<TextField source="ins_co_nm" />
<TextField source="ins_addr1" />
<TextField source="ins_addr2" />
<TextField source="ins_city" />
<TextField source="ins_st" />
<TextField source="ins_zip" />
<TextField source="ins_ctry" />
<TextField source="ins_ph1" />
<TextField source="ins_ph1x" />
<TextField source="ins_ph2" />
<TextField source="ins_ph2x" />
<TextField source="ins_fax" />
<TextField source="ins_faxx" />
<TextField source="ins_ct_ln" />
<TextField source="ins_ct_fn" />
<TextField source="ins_title" />
<TextField source="ins_ct_ph" />
<TextField source="ins_ct_phx" />
<TextField source="ins_ea" />
<TextField source="ins_memo" />
<TextField source="policy_no" />
<TextField source="ded_amt" />
<TextField source="ded_status" />
<TextField source="asgn_no" />
<TextField source="asgn_date" />
<TextField source="asgn_type" />
<TextField source="clm_no" />
<TextField source="clm_ofc_id" />
<TextField source="date_estimated" />
<TextField source="date_open" />
<TextField source="date_scheduled" />
<TextField source="date_invoiced" />
<TextField source="date_exported" />
<TextField source="clm_total" />
<TextField source="owner_owing" />
<TextField source="converted" />
<TextField source="ciecaid" />
<TextField source="loss_date" />
<TextField source="clm_ofc_nm" />
<TextField source="clm_addr1" />
<TextField source="clm_addr2" />
<TextField source="clm_city" />
<TextField source="clm_st" />
<TextField source="clm_zip" />
<TextField source="clm_ctry" />
<TextField source="clm_ph1" />
<TextField source="clm_ph1x" />
<TextField source="clm_ph2" />
<TextField source="clm_ph2x" />
<TextField source="clm_fax" />
<TextField source="clm_faxx" />
<TextField source="clm_ct_ln" />
<TextField source="clm_ct_fn" />
<TextField source="clm_title" />
<TextField source="clm_ct_ph" />
<TextField source="clm_ct_phx" />
<TextField source="clm_ea" />
<TextField source="payee_nms" />
<TextField source="pay_type" />
<TextField source="pay_date" />
<TextField source="pay_chknm" />
<TextField source="pay_amt" />
<TextField source="agt_co_id" />
<TextField source="agt_co_nm" />
<TextField source="agt_addr1" />
<TextField source="agt_addr2" />
<TextField source="agt_city" />
<TextField source="agt_st" />
<TextField source="agt_zip" />
<TextField source="agt_ctry" />
<TextField source="agt_ph1" />
<TextField source="agt_ph1x" />
<TextField source="agt_ph2" />
<TextField source="agt_ph2x" />
<TextField source="agt_fax" />
<TextField source="agt_faxx" />
<TextField source="agt_ct_ln" />
<TextField source="agt_ct_fn" />
<TextField source="agt_ct_ph" />
<TextField source="agt_ct_phx" />
<TextField source="agt_ea" />
<TextField source="agt_lic_no" />
<TextField source="loss_type" />
<TextField source="loss_desc" />
<TextField source="theft_ind" />
<TextField source="cat_no" />
<TextField source="tlos_ind" />
<TextField source="cust_pr" />
<TextField source="insd_ln" />
<TextField source="insd_fn" />
<TextField source="insd_title" />
<TextField source="insd_co_nm" />
<TextField source="insd_addr1" />
<TextField source="insd_addr2" />
<TextField source="insd_city" />
<TextField source="insd_st" />
<TextField source="insd_zip" />
<TextField source="insd_ctry" />
<TextField source="insd_ph1" />
<TextField source="insd_ph1x" />
<TextField source="insd_ph2" />
<TextField source="insd_ph2x" />
<TextField source="insd_fax" />
<TextField source="insd_faxx" />
<TextField source="insd_ea" />
<TextField source="ownr_ln" />
<TextField source="ownr_fn" />
<TextField source="ownr_title" />
<TextField source="ownr_co_nm" />
<TextField source="ownr_addr1" />
<TextField source="ownr_addr2" />
<TextField source="ownr_city" />
<TextField source="ownr_st" />
<TextField source="ownr_zip" />
<TextField source="ownr_ctry" />
<TextField source="ownr_ph1" />
<TextField source="ownr_ph1x" />
<TextField source="ownr_ph2" />
<TextField source="ownr_ph2x" />
<TextField source="ownr_fax" />
<TextField source="ownr_faxx" />
<TextField source="ownr_ea" />
<TextField source="area_of_damage" />
<TextField source="loss_cat" />
<TextField source="special_coverage_policy" />
<TextField source="csr" />
<TextField source="po_number" />
<TextField source="unit_number" />
<TextField source="kmin" />
<TextField source="kmout" />
<TextField source="referral_source" />
<TextField source="selling_dealer" />
<TextField source="servicing_dealer" />
<TextField source="servicing_dealer_contact" />
<TextField source="selling_dealer_contact" />
<TextField source="depreciation_taxes" />
<TextField source="federal_tax_payable" />
<TextField source="other_amount_payable" />
<TextField source="towing_payable" />
<TextField source="storage_payable" />
<TextField source="adjustment_bottom_line" />
<TextField source="tax_pstthr" />
<TextField source="tax_tow_rt" />
<TextField source="tax_sub_rt" />
<TextField source="tax_paint_mat_rt" />
<TextField source="tax_levies_rt" />
<TextField source="tax_prethr" />
<TextField source="tax_thramt" />
<TextField source="tax_str_rt" />
<TextField source="tax_lbr_rt" />
<TextField source="adj_g_disc" />
<TextField source="adj_towdis" />
<TextField source="adj_strdis" />
<TextField source="tax_predis" />
<TextField source="rate_laa" />
<TextField source="status" />
<TextField source="cieca_stl" />
<TextField source="g_bett_amt" />
<TextField source="cieca_ttl" />
<TextField source="plate_no" />
<TextField source="plate_st" />
<TextField source="v_vin" />
<TextField source="v_model_yr" />
<TextField source="v_model_desc" />
<TextField source="v_make_desc" />
<TextField source="v_color" />
<TextField source="parts_tax_rates" />
<TextField source="job_totals" />
<TextField source="production_vars" />
<TextField source="intakechecklist" />
<TextField source="invoice_allocation" />
<TextField source="kanbanparent" />
<TextField source="employee_body" />
<TextField source="employee_refinish" />
<TextField source="employee_prep" />
</Tab>
</TabbedShowLayout>
</Show>
);
export default JobsShow;

View File

@@ -1,31 +0,0 @@
import firebase from "firebase/app";
import "firebase/firestore";
import "firebase/auth";
const config = JSON.parse(process.env.REACT_APP_FIREBASE_CONFIG);
firebase.initializeApp(config);
export const auth = firebase.auth();
export const firestore = firebase.firestore();
export default firebase;
export const getCurrentUser = () => {
return new Promise((resolve, reject) => {
const unsubscribe = auth.onAuthStateChanged((userAuth) => {
unsubscribe();
resolve(userAuth);
}, reject);
});
};
export const updateCurrentUser = (userDetails) => {
return new Promise((resolve, reject) => {
const unsubscribe = auth.onAuthStateChanged((userAuth) => {
userAuth.updateProfile(userDetails).then((r) => {
unsubscribe();
resolve(userAuth);
});
}, reject);
});
};

View File

@@ -1,10 +0,0 @@
import { gql } from "@apollo/client";
export const QUERY_ALL_SHOPS = gql`
query QUERY_ALL_SHOPS {
bodyshops {
id
shopname
}
}
`;

View File

@@ -1,13 +0,0 @@
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}

View File

@@ -1,17 +0,0 @@
import React from "react";
import ReactDOM from "react-dom";
import "./index.css";
import App from "./App/App";
import * as serviceWorker from "./serviceWorker";
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById("root")
);
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();

View File

@@ -1,141 +0,0 @@
// This optional code is used to register a service worker.
// register() is not called by default.
// This lets the app load faster on subsequent visits in production, and gives
// it offline capabilities. However, it also means that developers (and users)
// will only see deployed updates on subsequent visits to a page, after all the
// existing tabs open on the page have been closed, since previously cached
// resources are updated in the background.
// To learn more about the benefits of this model and instructions on how to
// opt-in, read https://bit.ly/CRA-PWA
const isLocalhost = Boolean(
window.location.hostname === 'localhost' ||
// [::1] is the IPv6 localhost address.
window.location.hostname === '[::1]' ||
// 127.0.0.0/8 are considered localhost for IPv4.
window.location.hostname.match(
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
)
);
export function register(config) {
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
// The URL constructor is available in all browsers that support SW.
const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);
if (publicUrl.origin !== window.location.origin) {
// Our service worker won't work if PUBLIC_URL is on a different origin
// from what our page is served on. This might happen if a CDN is used to
// serve assets; see https://github.com/facebook/create-react-app/issues/2374
return;
}
window.addEventListener('load', () => {
const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
if (isLocalhost) {
// This is running on localhost. Let's check if a service worker still exists or not.
checkValidServiceWorker(swUrl, config);
// Add some additional logging to localhost, pointing developers to the
// service worker/PWA documentation.
navigator.serviceWorker.ready.then(() => {
console.log(
'This web app is being served cache-first by a service ' +
'worker. To learn more, visit https://bit.ly/CRA-PWA'
);
});
} else {
// Is not localhost. Just register service worker
registerValidSW(swUrl, config);
}
});
}
}
function registerValidSW(swUrl, config) {
navigator.serviceWorker
.register(swUrl)
.then(registration => {
registration.onupdatefound = () => {
const installingWorker = registration.installing;
if (installingWorker == null) {
return;
}
installingWorker.onstatechange = () => {
if (installingWorker.state === 'installed') {
if (navigator.serviceWorker.controller) {
// At this point, the updated precached content has been fetched,
// but the previous service worker will still serve the older
// content until all client tabs are closed.
console.log(
'New content is available and will be used when all ' +
'tabs for this page are closed. See https://bit.ly/CRA-PWA.'
);
// Execute callback
if (config && config.onUpdate) {
config.onUpdate(registration);
}
} else {
// At this point, everything has been precached.
// It's the perfect time to display a
// "Content is cached for offline use." message.
console.log('Content is cached for offline use.');
// Execute callback
if (config && config.onSuccess) {
config.onSuccess(registration);
}
}
}
};
};
})
.catch(error => {
console.error('Error during service worker registration:', error);
});
}
function checkValidServiceWorker(swUrl, config) {
// Check if the service worker can be found. If it can't reload the page.
fetch(swUrl, {
headers: { 'Service-Worker': 'script' },
})
.then(response => {
// Ensure service worker exists, and that we really are getting a JS file.
const contentType = response.headers.get('content-type');
if (
response.status === 404 ||
(contentType != null && contentType.indexOf('javascript') === -1)
) {
// No service worker found. Probably a different app. Reload the page.
navigator.serviceWorker.ready.then(registration => {
registration.unregister().then(() => {
window.location.reload();
});
});
} else {
// Service worker found. Proceed as normal.
registerValidSW(swUrl, config);
}
})
.catch(() => {
console.log(
'No internet connection found. App is running in offline mode.'
);
});
}
export function unregister() {
if ('serviceWorker' in navigator) {
navigator.serviceWorker.ready
.then(registration => {
registration.unregister();
})
.catch(error => {
console.error(error.message);
});
}
}

View File

@@ -1,5 +0,0 @@
// jest-dom adds custom jest matchers for asserting on DOM nodes.
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom/extend-expect';

File diff suppressed because it is too large Load Diff

View File

@@ -736,6 +736,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>expectedprodhrs</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>
<concept_node>
<name>history</name>
<definition_loaded>false</definition_loaded>
@@ -4402,6 +4423,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>sendmaterialscosting</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>
<concept_node>
<name>srcco</name>
<definition_loaded>false</definition_loaded>
@@ -22264,6 +22306,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>date_repairstarted</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>
<concept_node>
<name>date_scheduled</name>
<definition_loaded>false</definition_loaded>
@@ -22456,6 +22519,32 @@
</translation>
</translations>
</concept_node>
<folder_node>
<name>control_type</name>
<children>
<concept_node>
<name>account_number</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>
</folder_node>
<concept_node>
<name>cost</name>
<definition_loaded>false</definition_loaded>
@@ -32581,11 +32670,53 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>updatinglabel</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>
</folder_node>
<folder_node>
<name>labels</name>
<children>
<concept_node>
<name>addlabel</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>
<concept_node>
<name>archive</name>
<definition_loaded>false</definition_loaded>
@@ -36430,6 +36561,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>courtesy_car_inventory</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>
<concept_node>
<name>courtesy_car_terms</name>
<definition_loaded>false</definition_loaded>
@@ -38088,6 +38240,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>timetickets_ro</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>
<concept_node>
<name>vehicle_check_in</name>
<definition_loaded>false</definition_loaded>

View File

@@ -6,8 +6,8 @@ import { setSelectedConversation } from "../../redux/messaging/messaging.actions
import { selectSelectedConversation } from "../../redux/messaging/messaging.selectors";
import { TimeAgoFormatter } from "../../utils/DateFormatter";
import PhoneFormatter from "../../utils/PhoneFormatter";
import "./chat-conversation-list.styles.scss";
import OwnerNameDisplay from "../owner-name-display/owner-name-display.component";
import "./chat-conversation-list.styles.scss";
const mapStateToProps = createStructuredSelector({
selectedConversation: selectSelectedConversation,
@@ -38,17 +38,20 @@ export function ChatConversationListComponent({
: null
}`}
>
{item.job_conversations.length > 0 ? (
<div className="chat-name">
{item.job_conversations.map((j, idx) => (
<div key={idx}>
<OwnerNameDisplay ownerObject={j.job} />
</div>
))}
</div>
) : (
<PhoneFormatter>{item.phone_num}</PhoneFormatter>
)}
<div sryle={{ display: "inline-block" }}>
{item.label && <div className="chat-name">{item.label}</div>}
{item.job_conversations.length > 0 ? (
<div className="chat-name">
{item.job_conversations.map((j, idx) => (
<div key={idx}>
<OwnerNameDisplay ownerObject={j.job} />
</div>
))}
</div>
) : (
<PhoneFormatter>{item.phone_num}</PhoneFormatter>
)}
</div>
<div sryle={{ display: "inline-block" }}>
<div>
{item.job_conversations.length > 0

View File

@@ -3,6 +3,7 @@ import React from "react";
import PhoneNumberFormatter from "../../utils/PhoneFormatter";
import ChatArchiveButton from "../chat-archive-button/chat-archive-button.component";
import ChatConversationTitleTags from "../chat-conversation-title-tags/chat-conversation-title-tags.component";
import ChatLabelComponent from "../chat-label/chat-label.component";
import ChatTagRoContainer from "../chat-tag-ro/chat-tag-ro.container";
export default function ChatConversationTitle({ conversation }) {
@@ -11,6 +12,7 @@ export default function ChatConversationTitle({ conversation }) {
<PhoneNumberFormatter>
{conversation && conversation.phone_num}
</PhoneNumberFormatter>
<ChatLabelComponent conversation={conversation} />
<ChatConversationTitleTags
jobConversations={
(conversation && conversation.job_conversations) || []

View File

@@ -0,0 +1,67 @@
import { PlusOutlined } from "@ant-design/icons";
import { useMutation } from "@apollo/client";
import { Input, notification, Spin, Tag, Tooltip } from "antd";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { UPDATE_CONVERSATION_LABEL } from "../../graphql/conversations.queries";
export default function ChatLabel({ conversation }) {
const [loading, setLoading] = useState(false);
const [editing, setEditing] = useState(false);
const [value, setValue] = useState(conversation.label);
const { t } = useTranslation();
const [updateLabel] = useMutation(UPDATE_CONVERSATION_LABEL);
const handleSave = async () => {
setLoading(true);
try {
const response = await updateLabel({
variables: { id: conversation.id, label: value },
});
if (response.errors) {
notification["error"]({
message: t("messages.errors.updatinglabel", {
error: JSON.stringify(response.errors),
}),
});
} else {
setEditing(false);
}
} catch (error) {
notification["error"]({
message: t("messages.errors.updatinglabel", {
error: JSON.stringify(error),
}),
});
} finally {
setLoading(false);
}
};
if (editing) {
return (
<div>
<Input
autoFocus
value={value}
onChange={(e) => setValue(e.target.value)}
onBlur={handleSave}
allowClear
/>
{loading && <Spin size="small" />}
</div>
);
} else {
return conversation.label && conversation.label.trim() !== "" ? (
<Tag style={{ cursor: "pointer" }} onClick={() => setEditing(true)}>
{conversation.label}
</Tag>
) : (
<Tooltip title={t("messaging.labels.addlabel")}>
<PlusOutlined
style={{ cursor: "pointer" }}
onClick={() => setEditing(true)}
/>
</Tooltip>
);
}
}

View File

@@ -1,5 +1,14 @@
import { SyncOutlined, WarningFilled } from "@ant-design/icons";
import { Button, Card, Input, Space, Table, Tooltip } from "antd";
import {
Button,
Card,
Dropdown,
Input,
Menu,
Space,
Table,
Tooltip,
} from "antd";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { Link } from "react-router-dom";
@@ -7,6 +16,8 @@ import { DateTimeFormatter } from "../../utils/DateFormatter";
import { alphaSort } from "../../utils/sorters";
import { OwnerNameDisplayFunction } from "../owner-name-display/owner-name-display.component";
import moment from "moment";
import { GenerateDocument } from "../../utils/RenderTemplate";
import { TemplateList } from "../../utils/TemplateConstants";
export default function CourtesyCarsList({ loading, courtesycars, refetch }) {
const [state, setState] = useState({
sortedInfo: {},
@@ -166,6 +177,32 @@ export default function CourtesyCarsList({ loading, courtesycars, refetch }) {
<Button onClick={() => refetch()}>
<SyncOutlined />
</Button>
<Dropdown
trigger="click"
overlay={
<Menu>
<Menu.Item
onClick={() =>
GenerateDocument(
{
name: TemplateList("courtesycar").courtesy_car_inventory
.key,
variables: {
//id: contract.id
},
},
{},
"p"
)
}
>
{t("printcenter.courtesycarcontract.courtesy_car_inventory")}
</Menu.Item>
</Menu>
}
>
<Button>{t("general.labels.print")}</Button>
</Dropdown>
<Link to={`/manage/courtesycars/new`}>
<Button>{t("courtesycars.actions.new")}</Button>
</Link>

View File

@@ -21,6 +21,7 @@ import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { determineDmsType } from "../../pages/dms/dms.container";
import { selectBodyshop } from "../../redux/user/user.selectors";
import i18n from "../../translations/i18n";
import DmsCdkMakes from "../dms-cdk-makes/dms-cdk-makes.component";
import DmsCdkMakesRefetch from "../dms-cdk-makes/dms-cdk-makes.refetch.component";
import FormDatePicker from "../form-date-picker/form-date-picker.component";
@@ -335,13 +336,31 @@ export function DmsPostForm({ bodyshop, socket, job, logsRef }) {
bodyshop.cdk_configuration.payers.find(
(i) => i && row && i.name === row.name
);
return (
<div>
{cdkPayer &&
t(`jobs.fields.${cdkPayer.control_type}`)}
</div>
);
if (
i18n.exists(`jobs.fields.${cdkPayer?.control_type}`)
)
return (
<div>
{cdkPayer &&
t(`jobs.fields.${cdkPayer?.control_type}`)}
</div>
);
else if (
i18n.exists(
`jobs.fields.dms.control_type.${cdkPayer?.control_type}`
)
) {
return (
<div>
{cdkPayer &&
t(
`jobs.fields.dms.control_type.${cdkPayer?.control_type}`
)}
</div>
);
} else {
return null;
}
}}
</Form.Item>

View File

@@ -59,14 +59,18 @@ export default function JobDetailCardsDatesComponent({ loading, data }) {
<DateTimeFormatter>{data.scheduled_in}</DateTimeFormatter>
</Timeline.Item>
) : null}
{data.actual_in ? (
<Timeline.Item>
<label>{t("jobs.fields.actual_in")}: </label>
<DateTimeFormatter>{data.actual_in}</DateTimeFormatter>
</Timeline.Item>
) : null}
{data.date_repairstarted ? (
<Timeline.Item>
<label>{t("jobs.fields.date_repairstarted")}: </label>
<DateTimeFormatter>{data.date_repairstarted}</DateTimeFormatter>
</Timeline.Item>
) : null}
{data.scheduled_completion ? (
<Timeline.Item>
<label>{t("jobs.fields.scheduled_completion")}: </label>

View File

@@ -43,11 +43,9 @@ const JobSearchSelect = (
search: value,
...(convertedOnly || notExported
? {
variables: {
...(convertedOnly ? { isConverted: true } : {}),
...(notExported ? { notExported: true } : {}),
...(notInvoiced ? { notInvoiced: true } : {}),
},
...(convertedOnly ? { isConverted: true } : {}),
...(notExported ? { notExported: true } : {}),
...(notInvoiced ? { notInvoiced: true } : {}),
}
: {}),
},
@@ -79,6 +77,7 @@ const JobSearchSelect = (
disabled={disabled}
showSearch
autoFocus
allowClear
style={{
width: "100%",
}}

View File

@@ -126,6 +126,9 @@ export function JobsAdminDatesChange({ insertAuditTrail, job }) {
<Form.Item label={t("jobs.fields.actual_in")} name="actual_in">
<DateTimePicker />
</Form.Item>
<Form.Item label={t("jobs.fields.date_repairstarted")} name="date_repairstarted">
<DateTimePicker />
</Form.Item>
<Form.Item
label={t("jobs.fields.date_last_contacted")}
name="date_last_contacted"

View File

@@ -112,12 +112,12 @@ export function JobsAvailableContainer({
).data;
let existingVehicles;
if (estData.est_data.vehicle && estData.est_data.vin) {
if (estData.est_data.v_vin) {
//There's vehicle data, need to double check the VIN.
existingVehicles = await client.query({
query: SEARCH_VEHICLE_BY_VIN,
variables: {
vin: estData.est_data.vehicle.data.v_vin,
vin: estData.est_data.v_vin || estData.est_data.vehicle.data.v_vin,
},
});
}

View File

@@ -42,7 +42,10 @@ export function JobsDetailDatesComponent({ jobRO, job, bodyshop }) {
<Form.Item label={t("jobs.fields.date_towin")} name="date_towin">
<DateTimePicker disabled={jobRO} />
</Form.Item>
<Form.Item label={t("jobs.fields.date_rentalresp")} name="date_rentalresp">
<Form.Item
label={t("jobs.fields.date_rentalresp")}
name="date_rentalresp"
>
<DateTimePicker disabled={jobRO} />
</Form.Item>
</FormRow>
@@ -73,6 +76,12 @@ export function JobsDetailDatesComponent({ jobRO, job, bodyshop }) {
title={t("jobs.labels.calc_repair_days")}
/>
</Tooltip>
<Form.Item
label={t("jobs.fields.date_repairstarted")}
name="date_repairstarted"
>
<DateTimePicker disabled={jobRO} />
</Form.Item>
</FormRow>
<FormRow header={t("jobs.forms.repairdates")}>
<Form.Item

View File

@@ -233,6 +233,7 @@ export function JobsList({ bodyshop, refetch, loading, jobs, total }) {
pageSize: 25,
current: parseInt(page || 1),
total: total,
showSizeChanger: false,
}}
columns={columns}
rowKey="id"

View File

@@ -159,7 +159,7 @@ export function PayableExportAll({
} else {
notification["error"]({
message: t("bills.errors.exporting", {
error: JSON.stringify(billUpdateResponse.error),
error: JSON.stringify(billUpdateResponse.errors),
}),
});
}

View File

@@ -534,6 +534,7 @@ const r = ({ technician, state, activeStatuses, bodyshop }) => {
<JobPartsQueueCount parts={record.joblines_status} record={record} />
),
},
//Added as a place holder for St Claude. Not implemented as it requires another join for a field used by only 1 client.
// {
// title: i18n.t("vehicles.fields.v_paint_codes", { number: "" }),
@@ -555,6 +556,29 @@ const r = ({ technician, state, activeStatuses, bodyshop }) => {
// </span>
// ) : null,
// },
{
title: i18n.t("jobs.fields.date_repairstarted"),
dataIndex: "date_repairstarted",
key: "date_repairstarted",
ellipsis: true,
sorter: (a, b) => dateSort(a.date_repairstarted, b.date_repairstarted),
sortOrder:
state.sortedInfo.columnKey === "date_repairstarted" &&
state.sortedInfo.order,
render: (text, record) => (
<ProductionListDate record={record} field="date_repairstarted" time />
),
},
{
title: i18n.t("jobs.fields.date_repairstarted") + " (HH:MM)",
dataIndex: "date_repairstarted_time",
key: "date_repairstarted_time",
ellipsis: true,
render: (text, record) => (
<TimeFormatter>{record.date_repairstarted}</TimeFormatter>
),
},
];
};
export default r;

View File

@@ -1,19 +1,17 @@
import { Popover } from "antd";
import { RadarChartOutlined } from "@ant-design/icons";
import { Popover, Space } from "antd";
import React, { useMemo } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import {
PolarAngleAxis,
Legend, PolarAngleAxis,
PolarGrid,
PolarRadiusAxis,
Radar,
Legend,
RadarChart,
Tooltip,
Radar, RadarChart,
Tooltip
} from "recharts";
import { createStructuredSelector } from "reselect";
import { selectBodyshop } from "../../redux/user/user.selectors";
import { RadarChartOutlined } from "@ant-design/icons";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
});
@@ -23,7 +21,7 @@ const mapDispatchToProps = (dispatch) => ({
export function ScheduleCalendarHeaderGraph({ bodyshop, loadData }) {
const { ssbuckets } = bodyshop;
const { t } = useTranslation();
const data = useMemo(() => {
return (
(loadData &&
@@ -43,6 +41,10 @@ export function ScheduleCalendarHeaderGraph({ bodyshop, loadData }) {
const popContent = (
<div>
<Space>
{t("appointments.labels.expectedprodhrs")}
<strong>{loadData?.expectedHours?.toFixed(1)}</strong>
</Space>
<RadarChart
// cx={300}
// cy={250}

View File

@@ -659,7 +659,7 @@ export default function ShopInfoGeneral({ form }) {
},
]}
>
<Input />
<Input.TextArea rows={3} />
</Form.Item>
<Space wrap>
<DeleteFilled

View File

@@ -139,6 +139,12 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
>
<Input />
</Form.Item>
<Form.Item
label={t("bodyshop.fields.dms.sendmaterialscosting")}
name={["cdk_configuration", "sendmaterialscosting"]}
>
<InputNumber min={0} max={100} />
</Form.Item>
{bodyshop.pbs_serialnumber && (
<Form.Item
label={t("bodyshop.fields.dms.disablecontactvehiclecreation")}
@@ -200,7 +206,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
// },
// ]}
>
<Select showSearch>
<Select allowClear showSearch>
<Select.Option value="ro_number">
{t("jobs.fields.ro_number")}
</Select.Option>
@@ -210,6 +216,9 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
<Select.Option value="po_number">
{t("jobs.fields.ponumber")}
</Select.Option>
<Select.Option value="account_number">
{t("jobs.fields.dms.control_type.account_number")}
</Select.Option>
</Select>
</Form.Item>

View File

@@ -43,6 +43,7 @@ export const CONVERSATION_LIST_QUERY = gql`
updated_at
unreadcnt
archived
label
messages_aggregate(
where: { read: { _eq: false }, isoutbound: { _eq: false } }
) {
@@ -88,6 +89,7 @@ export const GET_CONVERSATION_DETAILS = gql`
id
phone_num
archived
label
job_conversations {
jobid
conversationid
@@ -136,3 +138,15 @@ export const TOGGLE_CONVERSATION_ARCHIVE = gql`
}
}
`;
export const UPDATE_CONVERSATION_LABEL = gql`
mutation UPDATE_CONVERSATION_LABEL($id: uuid!, $label: String) {
update_conversations_by_pk(
pk_columns: { id: $id }
_set: { label: $label }
) {
label
id
}
}
`;

View File

@@ -142,6 +142,7 @@ export const QUERY_EXACT_JOB_IN_PRODUCTION = gql`
employee_refinish
employee_prep
employee_csr
date_repairstarted
joblines_status {
part_type
status
@@ -221,6 +222,7 @@ export const QUERY_EXACT_JOBS_IN_PRODUCTION = gql`
employee_refinish
employee_prep
employee_csr
date_repairstarted
joblines_status {
part_type
status
@@ -302,6 +304,7 @@ export const QUERY_JOBS_IN_PRODUCTION = gql`
employee_prep
employee_csr
suspended
date_repairstarted
joblines_status {
part_type
status
@@ -672,6 +675,7 @@ export const GET_JOB_BY_PK = gql`
date_towin
date_rentalresp
date_exported
date_repairstarted
status
owner_owing
tax_registration_number
@@ -917,7 +921,7 @@ export const QUERY_JOB_CARD_DETAILS = gql`
date_next_contact
date_open
date_exported
date_repairstarted
date_scheduled
date_estimated
employee_body_rel {

View File

@@ -5,6 +5,7 @@ export const QUERY_SEARCH_OWNER_BY_IDX = gql`
search_owners(args: { search: $search }, limit: 100) {
ownr_fn
ownr_ln
ownr_co_nm
ownr_ph1
ownr_ph2
ownr_addr1

View File

@@ -35,6 +35,7 @@ export function* calculateScheduleLoad({ payload: end }) {
const load = {
productionTotal: {},
productionHours: 0,
};
//Set the current load.
@@ -45,6 +46,10 @@ export function* calculateScheduleLoad({ payload: end }) {
prodJobs.forEach((item) => {
//Add all of the jobs currently in production to the buckets so that we have a starting point.
const bucketId = CheckJobBucket(buckets, item);
load.productionHours =
load.productionHours +
item.labhrs.aggregate.sum.mod_lb_hrs +
item.larhrs.aggregate.sum.mod_lb_hrs;
if (bucketId) {
load.productionTotal[bucketId].count =
load.productionTotal[bucketId].count + 1;
@@ -131,6 +136,10 @@ export function* calculateScheduleLoad({ payload: end }) {
}
});
console.log(
"🚀 ~ file: application.sagas.js:160 ~ function*calculateScheduleLoad ~ load.productionTotal",
load.productionTotal
);
//Propagate the expected load to each day.
const range = Math.round(moment.duration(end.diff(today)).asDays());
for (var day = 0; day < range; day++) {
@@ -149,6 +158,10 @@ export function* calculateScheduleLoad({ payload: end }) {
load[current].jobsIn || [],
load[current].jobsOut || []
);
load[current].expectedHours =
load.productionHours +
(load[current].hoursIn || 0) -
(load[current].hoursOut || 0);
} else {
load[current].expectedLoad = CalculateLoad(
load[prev].expectedLoad,
@@ -156,6 +169,10 @@ export function* calculateScheduleLoad({ payload: end }) {
load[current].jobsIn || [],
load[current].jobsOut || []
);
load[current].expectedHours =
load[prev].expectedHours +
(load[current].hoursIn || 0) -
(load[current].hoursOut || 0);
}
}
yield put(setProblemJobs(problemJobs));

View File

@@ -50,6 +50,7 @@
"cancelledappointment": "Canceled appointment for: ",
"completingjobs": "Completing Jobs",
"dataconsistency": "{{ro_number}} has a data consistency issue. It has been excluded for scheduling purposes. CODE: {{code}}.",
"expectedprodhrs": "Expected Production Hours:",
"history": "History",
"inproduction": "Jobs In Production",
"manualevent": "Add Manual Appointment",
@@ -273,6 +274,7 @@
"itc_local": "Local Tax is ITC?",
"itc_state": "State Tax is ITC?",
"mappingname": "DMS Mapping Name",
"sendmaterialscosting": "Materials Cost as % of Sale",
"srcco": "Source Company #/Dealer #"
},
"email": "General Shop Email",
@@ -1350,6 +1352,7 @@
"date_next_contact": "Next Contact Date",
"date_open": "Open",
"date_rentalresp": "Shop Rental Responsibility Start",
"date_repairstarted": "Repairs Started",
"date_scheduled": "Scheduled",
"date_towin": "Towed In",
"ded_amt": "Deductible",
@@ -1360,6 +1363,9 @@
"address": "Customer Address",
"amount": "Amount",
"center": "Center",
"control_type": {
"account_number": "Account Number"
},
"cost": "Cost",
"cost_dms_acctnumber": "Cost DMS Acct #",
"dms_make": "DMS Make",
@@ -1909,9 +1915,11 @@
},
"errors": {
"invalidphone": "The phone number is invalid. Unable to open conversation. ",
"noattachedjobs": "No jobs have been associated to this conversation. "
"noattachedjobs": "No jobs have been associated to this conversation. ",
"updatinglabel": "Error updating label. {{error}}"
},
"labels": {
"addlabel": "Add a label to this conversation.",
"archive": "Archive",
"maxtenimages": "You can only select up to a maximum of 10 images at a time.",
"messaging": "Messaging",
@@ -2162,6 +2170,7 @@
"courtesycarcontract": {
"courtesy_car_contract": "Courtesy Car Contract",
"courtesy_car_impound": "Impound Charges",
"courtesy_car_inventory": "Courtesy Car Inventory",
"courtesy_car_terms": "Courtesy Car Terms"
},
"errors": {
@@ -2248,6 +2257,7 @@
"supplement_request": "Supplement Request",
"thank_you_ro": "Thank You Letter",
"thirdpartypayer": "Third Party Payer",
"timetickets_ro": "Time Tickets",
"vehicle_check_in": "Vehicle Intake",
"vehicle_delivery_check": "Vehicle Delivery Checklist",
"window_tag": "Window Tag",

View File

@@ -50,6 +50,7 @@
"cancelledappointment": "Cita cancelada para:",
"completingjobs": "",
"dataconsistency": "",
"expectedprodhrs": "",
"history": "",
"inproduction": "",
"manualevent": "",
@@ -273,6 +274,7 @@
"itc_local": "",
"itc_state": "",
"mappingname": "",
"sendmaterialscosting": "",
"srcco": ""
},
"email": "",
@@ -1350,6 +1352,7 @@
"date_next_contact": "",
"date_open": "Abierto",
"date_rentalresp": "",
"date_repairstarted": "",
"date_scheduled": "Programado",
"date_towin": "",
"ded_amt": "Deducible",
@@ -1360,6 +1363,9 @@
"address": "",
"amount": "",
"center": "",
"control_type": {
"account_number": ""
},
"cost": "",
"cost_dms_acctnumber": "",
"dms_make": "",
@@ -1909,9 +1915,11 @@
},
"errors": {
"invalidphone": "",
"noattachedjobs": ""
"noattachedjobs": "",
"updatinglabel": ""
},
"labels": {
"addlabel": "",
"archive": "",
"maxtenimages": "",
"messaging": "Mensajería",
@@ -2162,6 +2170,7 @@
"courtesycarcontract": {
"courtesy_car_contract": "",
"courtesy_car_impound": "",
"courtesy_car_inventory": "",
"courtesy_car_terms": ""
},
"errors": {
@@ -2248,6 +2257,7 @@
"supplement_request": "",
"thank_you_ro": "",
"thirdpartypayer": "",
"timetickets_ro": "",
"vehicle_check_in": "",
"vehicle_delivery_check": "",
"window_tag": "",

View File

@@ -50,6 +50,7 @@
"cancelledappointment": "Rendez-vous annulé pour:",
"completingjobs": "",
"dataconsistency": "",
"expectedprodhrs": "",
"history": "",
"inproduction": "",
"manualevent": "",
@@ -273,6 +274,7 @@
"itc_local": "",
"itc_state": "",
"mappingname": "",
"sendmaterialscosting": "",
"srcco": ""
},
"email": "",
@@ -1350,6 +1352,7 @@
"date_next_contact": "",
"date_open": "Ouvrir",
"date_rentalresp": "",
"date_repairstarted": "",
"date_scheduled": "Prévu",
"date_towin": "",
"ded_amt": "Déductible",
@@ -1360,6 +1363,9 @@
"address": "",
"amount": "",
"center": "",
"control_type": {
"account_number": ""
},
"cost": "",
"cost_dms_acctnumber": "",
"dms_make": "",
@@ -1909,9 +1915,11 @@
},
"errors": {
"invalidphone": "",
"noattachedjobs": ""
"noattachedjobs": "",
"updatinglabel": ""
},
"labels": {
"addlabel": "",
"archive": "",
"maxtenimages": "",
"messaging": "Messagerie",
@@ -2162,6 +2170,7 @@
"courtesycarcontract": {
"courtesy_car_contract": "",
"courtesy_car_impound": "",
"courtesy_car_inventory": "",
"courtesy_car_terms": ""
},
"errors": {
@@ -2248,6 +2257,7 @@
"supplement_request": "",
"thank_you_ro": "",
"thirdpartypayer": "",
"timetickets_ro": "",
"vehicle_check_in": "",
"vehicle_delivery_check": "",
"window_tag": "",

View File

@@ -488,6 +488,14 @@ export const TemplateList = (type, context) => {
disabled: false,
group: "pre",
},
timetickets_ro: {
title: i18n.t("printcenter.jobs.timetickets_ro"),
description: "CASL Authorization",
subject: i18n.t("printcenter.jobs.timetickets_ro"),
key: "timetickets_ro",
disabled: false,
group: "financial",
},
}
: {}),
...(!type || type === "job_special"
@@ -1731,6 +1739,21 @@ export const TemplateList = (type, context) => {
},
}
: {}),
...(!type || type === "courtesycar"
? {
courtesy_car_inventory: {
title: i18n.t(
"printcenter.courtesycarcontract.courtesy_car_inventory"
),
description: "Est Detail",
subject: i18n.t(
"printcenter.courtesycarcontract.courtesy_car_inventory"
),
key: "courtesy_car_inventory",
disabled: false,
},
}
: {}),
...(!type || type === "bill"
? {
inhouse_invoice: {

View File

@@ -1241,6 +1241,7 @@
- bodyshopid
- created_at
- id
- label
- phone_num
- unreadcnt
- updated_at
@@ -1252,6 +1253,7 @@
- bodyshopid
- created_at
- id
- label
- phone_num
- unreadcnt
- updated_at
@@ -1273,6 +1275,7 @@
- bodyshopid
- created_at
- id
- label
- phone_num
- unreadcnt
- updated_at
@@ -3025,6 +3028,7 @@
- date_next_contact
- date_open
- date_rentalresp
- date_repairstarted
- date_scheduled
- date_towin
- ded_amt
@@ -3288,6 +3292,7 @@
- date_next_contact
- date_open
- date_rentalresp
- date_repairstarted
- date_scheduled
- date_towin
- ded_amt
@@ -3561,6 +3566,7 @@
- date_next_contact
- date_open
- date_rentalresp
- date_repairstarted
- date_scheduled
- date_towin
- ded_amt

View File

@@ -0,0 +1,4 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- alter table "public"."jobs" add column "date_repairstarted" timestamptz
-- null;

View File

@@ -0,0 +1,2 @@
alter table "public"."jobs" add column "date_repairstarted" timestamptz
null;

View File

@@ -0,0 +1,4 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- alter table "public"."conversations" add column "label" text
-- null;

View File

@@ -0,0 +1,2 @@
alter table "public"."conversations" add column "label" text
null;

View File

@@ -1,4 +0,0 @@
FIREBASE_ADMINSDK_JSON=./imex-dev-firebase-adminsdk.json
FIREBASE_DATABASE_URL=https://imex-dev.firebaseio.com
PORT=5000

View File

@@ -1,5 +0,0 @@
NODE_ENV=production
FIREBASE_ADMINSDK_JSON=./imex-prod-firebase-adminsdk.json
FIREBASE_DATABASE_URL=https://imex-prod.firebaseio.com
PORT=5000

View File

@@ -1,35 +0,0 @@
var admin = require("firebase-admin");
const path = require("path");
require("dotenv").config({
path: path.resolve(
process.cwd(),
`.env.${process.env.NODE_ENV || "development"}`
),
});
var serviceAccount = require(process.env.FIREBASE_ADMINSDK_JSON);
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
databaseURL: process.env.FIREBASE_DATABASE_URL,
});
exports.admin = admin;
exports.validateFirebaseIdToken = async (req, res, next) => {
console.log("req.body", req.body);
let idToken = req.body.token;
try {
const decodedIdToken = await admin.auth().verifyIdToken(idToken);
//console.log("ID Token correctly decoded", decodedIdToken);
req.user = decodedIdToken;
res.send({ active: true, username: "admin" });
return;
} catch (error) {
console.error("Error while verifying Firebase ID token:", error);
res.status(403).send({ active: false });
return;
}
};

View File

@@ -1,12 +0,0 @@
{
"type": "service_account",
"project_id": "imex-dev",
"private_key_id": "4cd5bdb92b883cba1309ee8a7dda4b9925e8f264",
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDIWWXzD7vPBc1l\nBlbIQRpu8XnQ5CL4kgv2ZsoJ4tQ8cOYRez/puvwI0lZbMIr4KhVEeoe3am0gOXMY\niYmu3MLm7SZEZW/V7aawx462WprlAP9KcwSlVcNC+lSWLrPVvnuRXGi5SWdDBW60\ne2WRqbZKWkMATQkzLZzOLb8wt9VDU5TcY5t4NB7vrTJZLApxZAhX9jyaqR0WjgdS\nsoGNWwfo+wZqgaLHkdf68ELQ+8bJepbj8sExnJmwwiTvXlsYNSs1lTP1Dis56nKe\nRkSlbevyGgO9PGpWH1WIzZP5/vHANWShdXsvuacZ3TCnhNf+ST78A7mTWw8DMSvI\novtfzHrVAgMBAAECggEARdwGVI6z6igXypY/RGyPDwhcdZ5XI12pli2ZXYEeiETF\ntGrJinKM13agbgOrMYVbDRm8oRQXIRlnLLMoszR/MY6XvVmxeWL4sMOk26kUQa3r\nVsZsZEpXX89yFzwJsQpOhA045wLVYuVOCNjOPdBzo9F9c2lpP9MzziDdfdtcHbE1\nR1o3wdwl3RiRS6wEeOsKTCBI3e9eytSh48wBFbYtFjOO07u4Err7iMfdd7WcaOpC\nCUAbnphq3IEKksSWzA/h/UZYCQFX4SJILwY2A5l8wji31ojoMZn+UTWHZeuhA5zW\nzy1rof1o5NHDoQGmGGBLEWs461ylifq8ZFc/u3kNsQKBgQDn5hDMLJ9dUs5e+Z+6\nxP5gvq4/Bwi6AVX76DdWSaCW+jDV03OC8voH0UzbJKZ81/mMDhFL10KRbbG8tBoU\ncpOMpSrsDqIu9C6iniKK5nggzVaqpWduqiHT59duHh4ohcgmhoRAaeCy5Q1u2aOs\nuhUpsX1CPma73Wuw9otPV8n//wKBgQDdK+wGgBl8otkEtNoOGxVdIjyY/3tSKjJN\nA1oW21Q+KKHk3nQ0MQv69XxwmFuyAkco0aT/9w1YjSLhFiDnPTGdsyOlPyzWjzKt\ny7rQQ99W9E6MxHoT4tA0S6UUY55jsnPB+ytckPW8CMc89MKp1Qw1Wx/HsTNoRLtq\nbjb+USGFKwKBgEUc4Cy5r9VUdIUByIUVaOrUaYIHSqaE92dYUgW5c88LSbqwhmCk\nobfqvQki5yuWAp2nI6iCwygslSg0VQF7FFZ6c0xfIB72T1/P2WOkRHEiQY4iNa1Z\nrzNEiYQcHcjd9kTlGk1IQNuQQGylGI7F9sCyUS6JAn1DBHF9SQ+gjmdpAoGAQVsH\nRex4m5Hrmy5t+RkbuQey7GsiX+dEMem5p2Nsg2myXVU29W1A4wnDmeoLvpBZwsAg\nh9rTQMWD9wt48Zvtm3IiKGSAtW5fRWgcbgqAZsuOop40jMfLSojH4TyGw2MqPbog\n2Bul4cieR270Twc7slCZFYNRc5BL6WlkKsaCpz0CgYBlHGMoqaplAWVYJp+O7bbD\nsW8C8+FlFYoT26q8/TCj7dKxKSARsV9vg3eDBz0qCTMIqZGpMHWzF0Fkpr9ZqYdZ\nEvYdmrI+oSi657IQqan0vZwn7QBooE/opBwElHXjhCeAVLmDseLG3sK8OqcbW3aG\n1K7HV6sirgihrTS8iOqs4Q==\n-----END PRIVATE KEY-----\n",
"client_email": "firebase-adminsdk-f2zkh@imex-dev.iam.gserviceaccount.com",
"client_id": "105392652141030688709",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-f2zkh%40imex-dev.iam.gserviceaccount.com"
}

View File

@@ -1,12 +0,0 @@
{
"type": "service_account",
"project_id": "imex-prod",
"private_key_id": "5eacc85af252be59a0dcf08009b3219eaabced2e",
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDLYLP7i2CDFPQw\n1yz6RM1DV3KEEDF9PmbPDcun4P66n5fK2w4fool81MsfAR2no5j38FNM7cDYpo2S\n9e48T3lFxybBHm8PP1DMfMeTys7FGdW/Q0/pdYQRZbPhqSqwJZuj05lkObI4l6V3\nIDIP5wtiOwYSQAp6Vga8atD/sAq+DsOqTbZ5CniBwIlvCVhwcjhf/dry+Tm0ZH6P\nu4bQGD3GL3PQ6cd00oDKE+Gv2emDrgvjmB03RTQDFoBI+bxsMDYhoN7mYS2PfUQD\ndsH+RXqu8dWzPJhacosp3DMfgvgPIdxCR8/h4LT/v20hYNdhGTwZAZUHbEUCEkgf\nOZ0Xa7IVAgMBAAECggEAIR75kMCtEgvqjL2uPH/R8eKe6rT8akosUhIMFaYFtfzh\nqo6sKSi+PU8mWUFERBXXhqFj34ZkvqO5MLLOfpHuzRdWz2KWcaQ9E2BK3F3N+Llx\nXvmmXP3faTnn5ps3MYKeazq9o13mEWNY9iKPJJna979nCLfXPP8fj7XRnaJczYCt\njh+LuzFxtsP9qFXFhTu+0Ji7g7FttQSq/p4JR5Ybhp4t5m8P6GPg+NzC3qZ4b/96\nP0XQNnKHq2bRE4PKP7n8pomNenIDi4/QPmARlxzpAOvTNHwXqgWGf7HG5Sv0bl1F\nNLnHcS6g2aMXq9ZPaaG+4auFNrQ6mQzsf+nVxvYU7QKBgQDz/Vdvs5eTMyu2Cwf2\noSzxh6YYKwgKMUl2jZqEZb1I5/2fB02/mnlAU01WQfcHewlA4J4uJnMvVo3G6guO\nxBfUDnb4TylbxMVyYesJfprOdRyfeOYBuxbjfqpee2aJKtWANxrDe9MZW1p8Ztcy\nTWZIVgmrGvNiT+Z6xKCrv8apSwKBgQDVY5ZQG6ZAYDfMf7j/G67QG31kUJ1GGJNq\nXfg8cjB5nJnF5tM2tdLNje2fthlmhRV44+/xsqiRbI1p8i6iPS9gW/rEsujoFbaB\nGzfRwFgijTxGjgR1Irk1/rTZxnZXYMqhgap9a6Pgw0PttUkFbduSXpQQV/EYTCWs\nL3yrw7pWHwKBgQC3z+t4VqdhmRJcMhFMx34RdC04VerXquv6aZG4HuGsNEJI9Xqo\nV5rzUA6aZlXRh+qfutjQUd1DE4T6D0anxqlg84jDZvf0j9hkZMpqO7wqv+XRaoZ1\nVVpYBwwY5ASKX/+6eUkrbnTJzJ3tzJhg6BifdFoSUtp6/VDYupuE6JSk4wKBgAeX\nz5VyJmxMADBKqy6IsaO+FqwnIjGIVlaGmXqtJYRuShp8qC9eMO4XiskQFb9MJQN0\nOOmEzfK+xhlrALXNL45iN34gT6FShHf7m/Tev0QbenWYQBha7/Q35/+HzFY3n343\nuvVTizVIPXaL6NlEm3eN3f7m4jFXJFAIMIt8H3lJAoGAfveAtfrMMVru9jDZShmY\n+LaVvauSCdq0mtzB9gz/jFA0LC6LXnPjkk0Vul/fOpq1S9E/0PhKELxTgEeobP7a\n2gqa16r12nMkAUlfjlKwuwy1AxEyqpaCLI1raoOFCa9YbrChDtNJp5cLq2z6CZzU\nt19swf9G6W9RbKi8NUGeu1M=\n-----END PRIVATE KEY-----\n",
"client_email": "firebase-adminsdk-m6ypm@imex-prod.iam.gserviceaccount.com",
"client_id": "107364429775431537388",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-m6ypm%40imex-prod.iam.gserviceaccount.com"
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,27 +0,0 @@
{
"name": "jsreport-auth",
"version": "0.0.1",
"license": "UNLICENSED",
"engines": {
"node": "12.18.3",
"npm": "6.11.3"
},
"scripts": {
"start": "node server.js"
},
"dependencies": {
"body-parser": "^1.18.3",
"compression": "^1.7.4",
"cors": "2.8.5",
"csrf": "^3.1.0",
"dotenv": "8.2.0",
"express": "^4.16.4",
"firebase-admin": "^9.4.2",
"lodash": "^4.17.20",
"node-fetch": "^2.6.1"
},
"devDependencies": {
"concurrently": "^5.3.0",
"eslint-plugin-promise": "^4.2.1"
}
}

View File

@@ -1,54 +0,0 @@
const express = require("express");
const cors = require("cors");
const bodyParser = require("body-parser");
const path = require("path");
const compression = require("compression");
global.fetch = require("node-fetch");
var fb = require("./firebase/firebase-handler");
require("dotenv").config({
path: path.resolve(
process.cwd(),
`.env.${process.env.NODE_ENV || "development"}`
),
});
const https = require("https");
const fs = require("fs");
const app = express();
const port = process.env.PORT || 5000;
//const port = 5000;
//app.use(fb.validateFirebaseIdToken);
app.use(compression());
app.use(bodyParser.json({ limit: "50mb" }));
app.use(bodyParser.urlencoded({ limit: "50mb", extended: true }));
//app.use(enforce.HTTPS({ trustProtoHeader: true }));
app.use(cors());
//Test route to ensure Express is responding.
app.get("/test", async function (req, res) {
console.log("Incoming test request.", req);
res.status(200).send("OK");
});
app.post("/auth", fb.validateFirebaseIdToken);
app.get("/", async function (req, res) {
res.status(200).send("Access Forbidden.");
});
if (process.env.NODE_ENV === "production") {
app.listen(port, (error) => {
if (error) throw error;
console.log("AWS - [PRODUCTION] Server running on port " + port);
});
} else {
app.listen(port, (error) => {
if (error) throw error;
console.log("[DEVELOPMENT] Non Secured Server running on port " + port);
});
}

View File

@@ -1,12 +0,0 @@
{
"name": "Kavia",
"creationDate": {
"$$date": 1609970586507
},
"modificationDate": {
"$$date": 1609970586507
},
"shortid": "DFfQj6G",
"_id": "d1Q1GisfxvFchxnb",
"$entitySet": "folders"
}

View File

@@ -1,14 +0,0 @@
{
"name": "header.html",
"creationDate": {
"$$date": 1609975320390
},
"modificationDate": {
"$$date": 1609981839653
},
"shortid": "pYla8mM",
"inheritedReadPermissions": [],
"inheritedEditPermissions": [],
"_id": "iLQICSvbUjE2vy2Q",
"$entitySet": "assets"
}

View File

@@ -1,14 +0,0 @@
<div style="display: flex; justify-content: center; align-items: center">
<div style="display: flex; flex-direction: row; align-items: center">
<img alt="" src="https://thinkimex.com/imexlogo.png" />
<div>
<div>
<strong>Kavia Autobody</strong>
</div>
<div>1202 - 1001 Homer St</div>
<div>
Vancouver, BC V6B 1M9
</div>
</div>
</div>
</div>

View File

@@ -1,21 +0,0 @@
{
"name": "Starter Template",
"recipe": "html",
"shortid": "dbHQiFF9aR",
"engine": "handlebars",
"chrome": {
"printBackground": true
},
"creationDate": {
"$$date": 1609983284287
},
"modificationDate": {
"$$date": 1609983513111
},
"data": null,
"scripts": [],
"inheritedReadPermissions": [],
"inheritedEditPermissions": [],
"_id": "slk6YH0reas7fIJh",
"$entitySet": "templates"
}

View File

@@ -1,15 +0,0 @@
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<style>
{#asset _globals/styles.css @encoding=utf8}
</style>
</head>
<body>
<div class="container">
<div>{#asset {{headerpath}}}</div>
<span>This is a basic template</span>
</div>
</body>
</html>

View File

@@ -1 +0,0 @@
{#asset _globals/helpers.js @encoding=utf8}

View File

@@ -1,12 +0,0 @@
{
"name": "_Sample Data",
"creationDate": {
"$$date": 1609960203821
},
"modificationDate": {
"$$date": 1609983884494
},
"shortid": "NMAT8M~",
"_id": "NzVW38TsFYuiwkE1",
"$entitySet": "folders"
}

View File

@@ -1,14 +0,0 @@
{
"shortid": "saoWgKHbS6",
"name": "job",
"creationDate": {
"$$date": 1609960213183
},
"modificationDate": {
"$$date": 1609983495622
},
"inheritedReadPermissions": [],
"inheritedEditPermissions": [],
"_id": "kB2g429hShgHLZmO",
"$entitySet": "data"
}

View File

@@ -1,11 +0,0 @@
{
"headerpath":"/Kavia/header.html"
,"jobs_by_pk":{
"start": "2020-12-02T19:45:58.454+00:00",
"title": null,
"job": {
"ownr_fn": "TYLER",
"ownr_ln": "BODNARCHUK",
"ownr_ea": null
}
}}

View File

@@ -1,12 +0,0 @@
{
"name": "_globals",
"creationDate": {
"$$date": 1609959897101
},
"modificationDate": {
"$$date": 1609959897101
},
"shortid": "Ek4vtyE",
"_id": "LGAznUA50hrX9QC2",
"$entitySet": "folders"
}

View File

@@ -1,14 +0,0 @@
{
"name": "helpers.js",
"creationDate": {
"$$date": 1609960774906
},
"modificationDate": {
"$$date": 1609960781053
},
"shortid": "a49TcoN",
"_id": "1lAwHKwaeG3TJBTT",
"$entitySet": "assets",
"inheritedReadPermissions": [],
"inheritedEditPermissions": []
}

View File

@@ -1,25 +0,0 @@
const moment = require('moment')
function formatReportDate (date) {
return moment(date).format('YYYY MMMM DD')
}
function now() {
return new Date().toLocaleDateString()
}
function nowPlus20Days() {
var date = new Date()
date.setDate(date.getDate() + 20);
return date.toLocaleDateString();
}
function total(items) {
var sum = 0
items.forEach(function (i) {
console.log('Calculating item ' + i.name + '; you should see this message in debug run')
sum += i.price
})
return sum
}

View File

@@ -1,14 +0,0 @@
{
"name": "styles.css",
"creationDate": {
"$$date": 1609960168894
},
"modificationDate": {
"$$date": 1609982175635
},
"shortid": "TGu7wUV",
"_id": "9CWHJHWV4GlWHMKC",
"$entitySet": "assets",
"inheritedReadPermissions": [],
"inheritedEditPermissions": []
}

File diff suppressed because one or more lines are too long

View File

@@ -1,12 +0,0 @@
{
"name": "estimate_detail.query",
"creationDate": {
"$$date": 1609978752854
},
"modificationDate": {
"$$date": 1609981955227
},
"shortid": "kPkTOno",
"_id": "YwBpKAPlgA3CWdJ4",
"$entitySet": "assets"
}

View File

@@ -1,32 +0,0 @@
query TEMPLATE_ESTIMATE_DETAIL($id: uuid!) {
jobs_by_pk(id: $id) {
ded_amt
ded_status
id
ownr_co_nm
ownr_ln
ownr_fn
plate_no
plate_st
ro_number
regie_number
tlos_ind
v_color
v_make_desc
v_model_desc
v_model_yr
v_vin
clm_no
joblines(order_by: { line_no: asc }) {
id
mod_lbr_ty
mod_lb_hrs
part_qty
oem_partno
op_code_desc
line_desc
line_no
}
}
}

View File

@@ -1,23 +0,0 @@
{
"shortid": "GPfI1d0AbH",
"name": "estimate_detail",
"recipe": "html",
"engine": "handlebars",
"chrome": {
"printBackground": true
},
"creationDate": {
"$$date": 1609960117288
},
"modificationDate": {
"$$date": 1609983488727
},
"_id": "c3ghpf4MqODO3F6r",
"$entitySet": "templates",
"data": {
"shortid": "saoWgKHbS6"
},
"scripts": [],
"inheritedReadPermissions": [],
"inheritedEditPermissions": []
}

View File

@@ -1,150 +0,0 @@
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<style>
{#asset _globals/styles.css @encoding=utf8}
</style>
<style>@import url('https://fonts.googleapis.com/css2?family=Montserrat&display=swap');
body {
background-color: #ffe8d2;
font-family: 'Montserrat', sans-serif
}
.card {
border: none
}
.logo {
background-color: #eeeeeea8
}
.totals tr td {
font-size: 13px
}
.footer {
background-color: #eeeeeea8
}
.footer span {
font-size: 12px
}
.product-qty span {
font-size: 12px;
color: #dedbdb
}</style>
</head>
<body>
<div class="container mt-5 mb-5">
<div>{#asset {{headerpath}}}</div>
<div class="row d-flex justify-content-center">
<div class="col-md-8">
<div class="card">
<div class="text-left logo p-2 px-5"> <img src="https://i.imgur.com/2zDU056.png" width="50"> </div>
<div class="invoice p-5">
<h5>Your order Confirmed!</h5> <span class="font-weight-bold d-block mt-4">Hello, Chris</span> <span>You order has been confirmed and will be shipped in next two days!</span>
<div class="payment border-top mt-3 mb-3 border-bottom table-responsive">
<table class="table table-borderless">
<tbody>
<tr>
<td>
<div class="py-2"> <span class="d-block text-muted">Order Date</span> <span>12 Jan,2018</span> </div>
</td>
<td>
<div class="py-2"> <span class="d-block text-muted">Order No</span> <span>MT12332345</span> </div>
</td>
<td>
<div class="py-2"> <span class="d-block text-muted">Payment</span> <span><img src="https://img.icons8.com/color/48/000000/mastercard.png" width="20" /></span> </div>
</td>
<td>
<div class="py-2"> <span class="d-block text-muted">Shiping Address</span> <span>414 Advert Avenue, NY,USA</span> </div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="product border-bottom table-responsive">
<table class="table table-borderless">
<tbody>
<tr>
<td width="20%"> <img src="https://i.imgur.com/u11K1qd.jpg" width="90"> </td>
<td width="60%"> <span class="font-weight-bold">Men's Sports cap</span>
<div class="product-qty"> <span class="d-block">Quantity:1</span> <span>Color:Dark</span> </div>
</td>
<td width="20%">
<div class="text-right"> <span class="font-weight-bold">$67.50</span> </div>
</td>
</tr>
<tr>
<td width="20%"> <img src="https://i.imgur.com/SmBOua9.jpg" width="70"> </td>
<td width="60%"> <span class="font-weight-bold">Men's Collar T-shirt</span>
<div class="product-qty"> <span class="d-block">Quantity:1</span> <span>Color:Orange</span> </div>
</td>
<td width="20%">
<div class="text-right"> <span class="font-weight-bold">$77.50</span> </div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="row d-flex justify-content-end">
<div class="col-md-5">
<table class="table table-borderless">
<tbody class="totals">
<tr>
<td>
<div class="text-left"> <span class="text-muted">Subtotal</span> </div>
</td>
<td>
<div class="text-right"> <span>$168.50</span> </div>
</td>
</tr>
<tr>
<td>
<div class="text-left"> <span class="text-muted">Shipping Fee</span> </div>
</td>
<td>
<div class="text-right"> <span>$22</span> </div>
</td>
</tr>
<tr>
<td>
<div class="text-left"> <span class="text-muted">Tax Fee</span> </div>
</td>
<td>
<div class="text-right"> <span>$7.65</span> </div>
</td>
</tr>
<tr>
<td>
<div class="text-left"> <span class="text-muted">Discount</span> </div>
</td>
<td>
<div class="text-right"> <span class="text-success">$168.50</span> </div>
</td>
</tr>
<tr class="border-top border-bottom">
<td>
<div class="text-left"> <span class="font-weight-bold">Subtotal</span> </div>
</td>
<td>
<div class="text-right"> <span class="font-weight-bold">$238.50</span> </div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>We will be sending shipping confirmation email when the item shipped successfully!</p>
<p class="font-weight-bold mb-0">Thanks for shopping with us!</p> <span>Nike Team</span>
</div>
<div class="d-flex justify-content-between footer p-3"> <span>Need Help? visit our <a href="#"> help center</a></span> <span>12 June, 2020</span> </div>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -1 +0,0 @@
{#asset _globals/helpers.js @encoding=utf8}

File diff suppressed because one or more lines are too long

View File

@@ -1,71 +0,0 @@
{
"httpPort": 80,
"httpsPort": 443,
"certificate": {
"key": "/etc/letsencrypt/live/reports.bodyshop.app/privkey.pem",
"cert": "/etc/letsencrypt/live/reports.bodyshop.app/fullchain.pem"
},
"store": {
"provider": "fs"
},
"blobStorage": {
"provider": "fs"
},
"logger": {
"console": {
"transport": "console",
"level": "debug"
},
"file": {
"transport": "file",
"level": "info",
"filename": "logs/reporter.log"
},
"error": {
"transport": "file",
"level": "error",
"filename": "logs/error.log"
}
},
"allowLocalFilesAccess": true,
"reportTimeout": 60000,
"templatingEngines": {
"strategy": "http-server"
},
"extensions": {
"authentication": {
"cookieSession": {
"secret": "imex"
},
"authorizationServer": {
"tokenValidation": {
"endpoint": "http://localhost:5000/auth",
"timeout": 180000,
"sendAsJSON": true,
"hint": null,
"usernameField": "username",
"activeField": "active",
"auth": false
}
},
"admin": {
"username": "admin",
"password": "admin"
},
"enabled": true
},
"express":{
"exposeHttpHeaders":true
},
"child-templates": {
"parallelLimit": 10
},
"sample-template": {
"createSamples": true
},
"scripts": {
"allowedModules": "*",
"strategy": "http-server"
}
}
}

View File

@@ -1,53 +0,0 @@
{
"httpPort": 80,
"httpsPort": 443,
"certificate": {
"key": "/etc/letsencrypt/live/reports.bodyshop.app/privkey.pem",
"cert": "/etc/letsencrypt/live/reports.bodyshop.app/fullchain.pem"
},
"store": {
"provider": "fs"
},
"blobStorage": {
"provider": "fs"
},
"logger": {
"console": {
"transport": "console",
"level": "debug"
},
"file": {
"transport": "file",
"level": "info",
"filename": "logs/reporter.log"
},
"error": {
"transport": "file",
"level": "error",
"filename": "logs/error.log"
}
},
"allowLocalFilesAccess": true,
"reportTimeout": 60000,
"templatingEngines": {
"strategy": "http-server"
},
"extensions": {
"authentication": {
"cookieSession": {
"secret": "imex"
},
"admin": {
"username": "admin",
"password": "admin"
},
"enabled": true
},
"sample-template": {
"createSamples": true
},
"scripts": {
"strategy": "http-server"
}
}
}

View File

@@ -1 +0,0 @@
9602AF13-6E7E-4B0D-BDF9-60CD6EDD5A58

View File

@@ -1,533 +0,0 @@
2021-01-06T18:49:08.795Z - error: Rendering request 1 finished with error in 567 ms
2021-01-06T18:49:08.797Z - error: Error when processing render request 1 Failed to launch chrome!
/root/node_modules/puppeteer/.local-chromium/linux-706915/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
Error: Failed to launch chrome!
/root/node_modules/puppeteer/.local-chromium/linux-706915/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/root/node_modules/puppeteer/lib/Launcher.js:348:14)
at Interface.helper.addEventListener (/root/node_modules/puppeteer/lib/Launcher.js:337:50)
at emitNone (events.js:111:20)
at Interface.emit (events.js:208:7)
at Interface.close (readline.js:368:8)
at Socket.onend (readline.js:147:10)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
2021-01-06T18:49:08.798Z - error: Error during processing request at https://reports.bodyshop.app/api/report/invoice-main
2021-01-06T19:08:24.746Z - error: Rendering request 1 finished with error in 259 ms
2021-01-06T19:08:24.748Z - error: Error when processing render request 1 Failed to launch chrome!
/root/node_modules/puppeteer/.local-chromium/linux-706915/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
Error: Failed to launch chrome!
/root/node_modules/puppeteer/.local-chromium/linux-706915/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/root/node_modules/puppeteer/lib/Launcher.js:348:14)
at Interface.helper.addEventListener (/root/node_modules/puppeteer/lib/Launcher.js:337:50)
at emitNone (events.js:111:20)
at Interface.emit (events.js:208:7)
at Interface.close (readline.js:368:8)
at Socket.onend (readline.js:147:10)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
2021-01-06T19:08:24.750Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:08:37.643Z - error: Rendering request 2 finished with error in 35 ms
2021-01-06T19:08:37.644Z - error: Error when processing render request 2 Failed to launch chrome!
/root/node_modules/puppeteer/.local-chromium/linux-706915/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
Error: Failed to launch chrome!
/root/node_modules/puppeteer/.local-chromium/linux-706915/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/root/node_modules/puppeteer/lib/Launcher.js:348:14)
at Interface.helper.addEventListener (/root/node_modules/puppeteer/lib/Launcher.js:337:50)
at emitNone (events.js:111:20)
at Interface.emit (events.js:208:7)
at Interface.close (readline.js:368:8)
at Socket.onend (readline.js:147:10)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
2021-01-06T19:08:37.645Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:08:38.566Z - error: Rendering request 3 finished with error in 30 ms
2021-01-06T19:08:38.567Z - error: Error when processing render request 3 Failed to launch chrome!
/root/node_modules/puppeteer/.local-chromium/linux-706915/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
Error: Failed to launch chrome!
/root/node_modules/puppeteer/.local-chromium/linux-706915/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/root/node_modules/puppeteer/lib/Launcher.js:348:14)
at Interface.helper.addEventListener (/root/node_modules/puppeteer/lib/Launcher.js:337:50)
at emitNone (events.js:111:20)
at Interface.emit (events.js:208:7)
at Interface.close (readline.js:368:8)
at Socket.onend (readline.js:147:10)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
2021-01-06T19:08:38.568Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:11:36.440Z - error: Rendering request 4 finished with error in 20 ms
2021-01-06T19:11:36.441Z - error: Error when processing render request 4 Asset Invoice logo.png not found in the store and also not on the disk: Unable to find or read file /root/Invoice logo.png. ENOENT: no such file or directory, open '/root/Invoice logo.png' Error: Asset Invoice logo.png not found in the store and also not on the disk: Unable to find or read file /root/Invoice logo.png. ENOENT: no such file or directory, open '/root/Invoice logo.png'
at readAsset (/root/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T19:11:36.442Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:12:30.037Z - error: Rendering request 6 finished with error in 732 ms
2021-01-06T19:12:30.038Z - error: Error when processing render request 6 Asset global/styles.css not found in the store and also not on the disk: Unable to find or read file /root/global/styles.css. ENOENT: no such file or directory, open '/root/global/styles.css' Error: Asset global/styles.css not found in the store and also not on the disk: Unable to find or read file /root/global/styles.css. ENOENT: no such file or directory, open '/root/global/styles.css'
at readAsset (/root/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T19:12:30.039Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:13:04.710Z - error: uncaughtException: Cannot read property 'split' of undefined date=Wed Jan 06 2021 19:13:04 GMT+0000 (UTC), pid=795, uid=0, gid=0, cwd=/root, execPath=/root/.nvm/versions/node/v8.11.3/bin/node, version=v8.11.3, argv=[/root/.nvm/versions/node/v8.11.3/bin/node, /root/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/lib/ProcessContainerForkLegacy.js], rss=128917504, heapTotal=69009408, heapUsed=56299040, external=838587, loadavg=[0, 0, 0.03369140625], uptime=1187
TypeError: Cannot read property 'split' of undefined
at Server.reporter.express.redirectServer.http.createServer (/root/node_modules/jsreport-express/lib/reporter.express.js:59:53)
at emitTwo (events.js:126:13)
at Server.emit (events.js:214:7)
at Server.<anonymous> (/root/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/node_modules/@pm2/io/build/main/metrics/httpMetrics.js:166:33)
at parserOnIncoming (_http_server.js:619:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:112:17)
2021-01-06T19:13:14.701Z - error: Rendering request 1 finished with error in 583 ms
2021-01-06T19:13:14.702Z - error: Error when processing render request 1 Asset _globals/scripts.js not found in the store and also not on the disk: Unable to find or read file /root/_globals/scripts.js. ENOENT: no such file or directory, open '/root/_globals/scripts.js' Error: Asset _globals/scripts.js not found in the store and also not on the disk: Unable to find or read file /root/_globals/scripts.js. ENOENT: no such file or directory, open '/root/_globals/scripts.js'
at readAsset (/root/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T19:13:14.706Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:17:14.427Z - error: Rendering request 2 finished with error in 42 ms
2021-01-06T19:17:14.428Z - error: Error when processing render request 2 Asset _globals/scripts.js not found in the store and also not on the disk: Unable to find or read file /root/_globals/scripts.js. ENOENT: no such file or directory, open '/root/_globals/scripts.js' Error: Asset _globals/scripts.js not found in the store and also not on the disk: Unable to find or read file /root/_globals/scripts.js. ENOENT: no such file or directory, open '/root/_globals/scripts.js'
at readAsset (/root/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T19:17:14.429Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:17:23.439Z - error: Rendering request 3 finished with error in 10 ms
2021-01-06T19:17:23.440Z - error: Error when processing render request 3 Asset _globals/scripts.js not found in the store and also not on the disk: Unable to find or read file /root/_globals/scripts.js. ENOENT: no such file or directory, open '/root/_globals/scripts.js' Error: Asset _globals/scripts.js not found in the store and also not on the disk: Unable to find or read file /root/_globals/scripts.js. ENOENT: no such file or directory, open '/root/_globals/scripts.js'
at readAsset (/root/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T19:17:23.443Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:17:30.701Z - error: Rendering request 4 finished with error in 10 ms
2021-01-06T19:17:30.702Z - error: Error when processing render request 4 Asset _globals/scripts.js not found in the store and also not on the disk: Unable to find or read file /root/_globals/scripts.js. ENOENT: no such file or directory, open '/root/_globals/scripts.js' Error: Asset _globals/scripts.js not found in the store and also not on the disk: Unable to find or read file /root/_globals/scripts.js. ENOENT: no such file or directory, open '/root/_globals/scripts.js'
at readAsset (/root/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T19:17:30.702Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:17:46.493Z - error: Rendering request 5 finished with error in 12 ms
2021-01-06T19:17:46.493Z - error: Error when processing render request 5 Asset scripts.js not found in the store and also not on the disk: Unable to find or read file /root/scripts.js. ENOENT: no such file or directory, open '/root/scripts.js' Error: Asset scripts.js not found in the store and also not on the disk: Unable to find or read file /root/scripts.js. ENOENT: no such file or directory, open '/root/scripts.js'
at readAsset (/root/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T19:17:46.494Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:18:22.800Z - error: Rendering request 6 finished with error in 10 ms
2021-01-06T19:18:22.801Z - error: Error when processing render request 6 Asset scripts.js not found in the store and also not on the disk: Unable to find or read file /root/scripts.js. ENOENT: no such file or directory, open '/root/scripts.js' Error: Asset scripts.js not found in the store and also not on the disk: Unable to find or read file /root/scripts.js. ENOENT: no such file or directory, open '/root/scripts.js'
at readAsset (/root/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T19:18:22.802Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:18:32.060Z - error: Rendering request 7 finished with error in 12 ms
2021-01-06T19:18:32.061Z - error: Error when processing render request 7 Asset scripts.js not found in the store and also not on the disk: Unable to find or read file /root/scripts.js. ENOENT: no such file or directory, open '/root/scripts.js' Error: Asset scripts.js not found in the store and also not on the disk: Unable to find or read file /root/scripts.js. ENOENT: no such file or directory, open '/root/scripts.js'
at readAsset (/root/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T19:18:32.062Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:18:33.067Z - error: Rendering request 8 finished with error in 13 ms
2021-01-06T19:18:33.068Z - error: Error when processing render request 8 Asset scripts.js not found in the store and also not on the disk: Unable to find or read file /root/scripts.js. ENOENT: no such file or directory, open '/root/scripts.js' Error: Asset scripts.js not found in the store and also not on the disk: Unable to find or read file /root/scripts.js. ENOENT: no such file or directory, open '/root/scripts.js'
at readAsset (/root/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T19:18:33.069Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:18:35.980Z - error: Rendering request 9 finished with error in 23 ms
2021-01-06T19:18:35.982Z - error: Error when processing render request 9 Asset scripts.js not found in the store and also not on the disk: Unable to find or read file /root/scripts.js. ENOENT: no such file or directory, open '/root/scripts.js'
logs:
+0 Starting rendering request 9 (user: admin)
+2 Rendering template { name: appointment-confirmation, recipe: chrome-pdf, engine: handlebars, preview: true }
+8 Adding sample data saoWgKHbS6
+8 Resources not defined for this template.
+12 Replaced assets ["_globals/styles.css"]
+23 Rendering request 9 finished with error in 23 ms Error: Asset scripts.js not found in the store and also not on the disk: Unable to find or read file /root/scripts.js. ENOENT: no such file or directory, open '/root/scripts.js'
at readAsset (/root/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T19:18:35.985Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:18:49.204Z - error: Rendering request 10 finished with error in 14 ms
2021-01-06T19:18:49.204Z - error: Error when processing render request 10 Asset scripts not found in the store and also not on the disk: Request to file /root/scripts denied. Please allow it by setting config { "extensions": { "assets": { "allowedFiles": "**/*.*" } } } Error: Asset scripts not found in the store and also not on the disk: Request to file /root/scripts denied. Please allow it by setting config { "extensions": { "assets": { "allowedFiles": "**/*.*" } } }
at readAsset (/root/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T19:18:49.205Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:20:36.763Z - error: Rendering request 12 finished with error in 53 ms
2021-01-06T19:20:36.767Z - error: Error when processing render request 12 Failed to launch chrome!
/root/node_modules/puppeteer/.local-chromium/linux-706915/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
Error: Failed to launch chrome!
/root/node_modules/puppeteer/.local-chromium/linux-706915/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/root/node_modules/puppeteer/lib/Launcher.js:348:14)
at Interface.helper.addEventListener (/root/node_modules/puppeteer/lib/Launcher.js:337:50)
at emitNone (events.js:111:20)
at Interface.emit (events.js:208:7)
at Interface.close (readline.js:368:8)
at Socket.onend (readline.js:147:10)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
2021-01-06T19:20:36.768Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:22:56.946Z - error: Rendering request 13 finished with error in 345 ms
2021-01-06T19:22:56.947Z - error: Error when processing render request 13 Failed to launch chrome!
[0106/192256.936811:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
Error: Failed to launch chrome!
[0106/192256.936811:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/root/node_modules/puppeteer/lib/Launcher.js:348:14)
at Interface.helper.addEventListener (/root/node_modules/puppeteer/lib/Launcher.js:337:50)
at emitNone (events.js:111:20)
at Interface.emit (events.js:208:7)
at Interface.close (readline.js:368:8)
at Socket.onend (readline.js:147:10)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
2021-01-06T19:22:56.947Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:25:14.691Z - error: Rendering request 2 finished with error in 113 ms
2021-01-06T19:25:14.693Z - error: Error when processing render request 2 Failed to launch chrome!
[0106/192514.677982:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
Error: Failed to launch chrome!
[0106/192514.677982:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/root/node_modules/puppeteer/lib/Launcher.js:348:14)
at Interface.helper.addEventListener (/root/node_modules/puppeteer/lib/Launcher.js:337:50)
at emitNone (events.js:111:20)
at Interface.emit (events.js:208:7)
at Interface.close (readline.js:368:8)
at Socket.onend (readline.js:147:10)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
2021-01-06T19:25:14.693Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:26:31.588Z - error: Rendering request 1 finished with error in 329 ms
2021-01-06T19:26:31.590Z - error: Error when processing render request 1 Failed to launch chrome!
[0106/192631.574641:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
Error: Failed to launch chrome!
[0106/192631.574641:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/root/node_modules/puppeteer/lib/Launcher.js:348:14)
at Interface.helper.addEventListener (/root/node_modules/puppeteer/lib/Launcher.js:337:50)
at emitNone (events.js:111:20)
at Interface.emit (events.js:208:7)
at Interface.close (readline.js:368:8)
at Socket.onend (readline.js:147:10)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
2021-01-06T19:26:31.593Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:26:36.527Z - error: Rendering request 2 finished with error in 99 ms
2021-01-06T19:26:36.528Z - error: Error when processing render request 2 Failed to launch chrome!
[0106/192636.521061:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
Error: Failed to launch chrome!
[0106/192636.521061:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/root/node_modules/puppeteer/lib/Launcher.js:348:14)
at Interface.helper.addEventListener (/root/node_modules/puppeteer/lib/Launcher.js:337:50)
at emitNone (events.js:111:20)
at Interface.emit (events.js:208:7)
at Interface.close (readline.js:368:8)
at Socket.onend (readline.js:147:10)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
2021-01-06T19:26:36.529Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:29:53.131Z - error: Rendering request 3 finished with error in 610 ms
2021-01-06T19:29:53.137Z - error: Error when processing render request 3 Failed to launch chrome!
[0106/192953.117926:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
Error: Failed to launch chrome!
[0106/192953.117926:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/root/node_modules/puppeteer/lib/Launcher.js:348:14)
at Interface.helper.addEventListener (/root/node_modules/puppeteer/lib/Launcher.js:337:50)
at emitNone (events.js:111:20)
at Interface.emit (events.js:208:7)
at Interface.close (readline.js:368:8)
at Socket.onend (readline.js:147:10)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
2021-01-06T19:29:53.139Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:31:57.508Z - error: Rendering request 1 finished with error in 761 ms
2021-01-06T19:31:57.511Z - error: Error when processing render request 1 Failed to launch chrome!
[0106/193157.490172:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
Error: Failed to launch chrome!
[0106/193157.490172:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/root/node_modules/puppeteer/lib/Launcher.js:348:14)
at Interface.helper.addEventListener (/root/node_modules/puppeteer/lib/Launcher.js:337:50)
at emitNone (events.js:111:20)
at Interface.emit (events.js:208:7)
at Interface.close (readline.js:368:8)
at Socket.onend (readline.js:147:10)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
2021-01-06T19:31:57.514Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T22:08:23.758Z - error: Rendering request 7 finished with error in 17 ms
2021-01-06T22:08:23.760Z - error: Error when processing render request 7 Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css' Error: Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:08:23.763Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T22:08:27.466Z - error: Rendering request 8 finished with error in 7 ms
2021-01-06T22:08:27.468Z - error: Error when processing render request 8 Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css' Error: Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:08:27.469Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T22:09:19.000Z - error: Rendering request 11 finished with error in 9 ms
2021-01-06T22:09:19.001Z - error: Error when processing render request 11 Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css' Error: Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:09:19.002Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T22:09:49.936Z - error: Rendering request 13 finished with error in 26 ms
2021-01-06T22:09:49.937Z - error: Error when processing render request 13 Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css' Error: Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:09:49.939Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T22:10:15.008Z - error: Rendering request 15 finished with error in 13 ms
2021-01-06T22:10:15.009Z - error: Error when processing render request 15 Asset _globals/helpers.js not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/helpers.js. ENOENT: no such file or directory, open '/home/imex/_globals/helpers.js' Error: Asset _globals/helpers.js not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/helpers.js. ENOENT: no such file or directory, open '/home/imex/_globals/helpers.js'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:10:15.010Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T22:10:30.445Z - error: Rendering request 16 finished with error in 13 ms
2021-01-06T22:10:30.446Z - error: Error when processing render request 16 Asset _globals/helpers.js not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/helpers.js. ENOENT: no such file or directory, open '/home/imex/_globals/helpers.js' Error: Asset _globals/helpers.js not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/helpers.js. ENOENT: no such file or directory, open '/home/imex/_globals/helpers.js'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:10:30.449Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T22:10:33.854Z - error: Rendering request 17 finished with error in 11 ms
2021-01-06T22:10:33.856Z - error: Error when processing render request 17 Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css' Error: Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:10:33.857Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T22:10:36.642Z - error: Rendering request 18 finished with error in 12 ms
2021-01-06T22:10:36.643Z - error: Error when processing render request 18 Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css' Error: Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:10:36.645Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T22:10:37.993Z - error: Rendering request 19 finished with error in 17 ms
2021-01-06T22:10:37.995Z - error: Error when processing render request 19 Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css' Error: Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:10:37.996Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T22:10:49.342Z - error: Rendering request 21 finished with error in 13 ms
2021-01-06T22:10:49.348Z - error: Error when processing render request 21 Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css' Error: Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:10:49.349Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T22:10:50.660Z - error: Rendering request 22 finished with error in 17 ms
2021-01-06T22:10:50.661Z - error: Error when processing render request 22 Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css' Error: Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:10:50.662Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T22:11:28.973Z - error: Rendering request 23 finished with error in 16 ms
2021-01-06T22:11:28.976Z - error: Error when processing render request 23 Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css' Error: Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:11:28.977Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T22:14:55.599Z - error: Rendering request 30 finished with error in 10 ms
2021-01-06T22:14:55.601Z - error: Error when processing render request 30 Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css' Error: Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:14:55.602Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation(clone)
2021-01-06T22:14:56.568Z - error: Rendering request 31 finished with error in 15 ms
2021-01-06T22:14:56.569Z - error: Error when processing render request 31 Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css' Error: Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:14:56.571Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation(clone)
2021-01-06T22:15:02.412Z - error: Rendering request 32 finished with error in 12 ms
2021-01-06T22:15:02.413Z - error: Error when processing render request 32 Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css' Error: Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:15:02.415Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation(clone)
2021-01-06T22:16:17.483Z - error: Rendering request 34 finished with error in 17 ms
2021-01-06T22:16:17.489Z - error: Error when processing render request 34 Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css' Error: Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:16:17.489Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation(clone)
2021-01-06T22:18:46.282Z - error: Rendering request 35 finished with error in 14 ms
2021-01-06T22:18:46.283Z - error: Error when processing render request 35 Asset _globals/helpers.js not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/helpers.js. ENOENT: no such file or directory, open '/home/imex/_globals/helpers.js' Error: Asset _globals/helpers.js not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/helpers.js. ENOENT: no such file or directory, open '/home/imex/_globals/helpers.js'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:18:46.285Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation(clone)
2021-01-06T22:18:52.109Z - error: Rendering request 36 finished with error in 12 ms
2021-01-06T22:18:52.110Z - error: Error when processing render request 36 Asset _globals/helpers.js not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/helpers.js. ENOENT: no such file or directory, open '/home/imex/_globals/helpers.js' Error: Asset _globals/helpers.js not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/helpers.js. ENOENT: no such file or directory, open '/home/imex/_globals/helpers.js'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:18:52.111Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation(clone)
2021-01-06T22:18:52.882Z - error: Rendering request 37 finished with error in 33 ms
2021-01-06T22:18:52.884Z - error: Error when processing render request 37 Asset _globals/helpers.js not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/helpers.js. ENOENT: no such file or directory, open '/home/imex/_globals/helpers.js' Error: Asset _globals/helpers.js not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/helpers.js. ENOENT: no such file or directory, open '/home/imex/_globals/helpers.js'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:18:52.885Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation(clone)
2021-01-07T00:11:09.228Z - error: uncaughtException: Cannot read property 'split' of undefined date=Thu Jan 07 2021 00:11:09 GMT+0000 (UTC), pid=10834, uid=1000, gid=1000, cwd=/home/imex, execPath=/home/imex/.nvm/versions/node/v8.11.3/bin/node, version=v8.11.3, argv=[/home/imex/.nvm/versions/node/v8.11.3/bin/node, /home/imex/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/lib/ProcessContainerForkLegacy.js], rss=134836224, heapTotal=71106560, heapUsed=61470512, external=2032420, loadavg=[0, 0, 0], uptime=16225
TypeError: Cannot read property 'split' of undefined
at Server.reporter.express.redirectServer.http.createServer (/home/imex/node_modules/jsreport-express/lib/reporter.express.js:59:53)
at emitTwo (events.js:126:13)
at Server.emit (events.js:214:7)
at Server.<anonymous> (/home/imex/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/node_modules/@pm2/io/build/main/metrics/httpMetrics.js:166:33)
at parserOnIncoming (_http_server.js:619:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:112:17)
2021-01-07T00:27:01.576Z - error: Error when processing OData GET: /odata/assets/$filter=name%20eq%20'estimate_detail.query' Error: Not Found
at Router.router.dispatch (/home/imex/node_modules/simple-odata-server/lib/router.js:73:17)
at ODataServer.handle (/home/imex/node_modules/simple-odata-server/lib/odataServer.js:64:15)
at app.use (/home/imex/node_modules/jsreport-express/lib/routes.js:24:47)
at Layer.handle [as handle_request] (/home/imex/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/home/imex/node_modules/express/lib/router/index.js:317:13)
at /home/imex/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/home/imex/node_modules/express/lib/router/index.js:335:12)
at next (/home/imex/node_modules/express/lib/router/index.js:275:10)
at reporter.authorization.authorizeRequest.then (/home/imex/node_modules/jsreport-authentication/lib/authentication.js:266:16)
at <anonymous>
2021-01-07T00:52:30.592Z - error: Rendering request 15 finished with error in 40 ms
2021-01-07T00:52:30.593Z - error: Error when processing render request 15 Asset /Kavia/kavia_header.html not found in the store and also not on the disk: Unable to find or read file /Kavia/kavia_header.html. ENOENT: no such file or directory, open '/Kavia/kavia_header.html' Error: Asset /Kavia/kavia_header.html not found in the store and also not on the disk: Unable to find or read file /Kavia/kavia_header.html. ENOENT: no such file or directory, open '/Kavia/kavia_header.html'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-07T00:52:30.593Z - error: Error during processing request at https://reports.bodyshop.app/api/report/estimate_detail
2021-01-07T04:50:24.417Z - error: uncaughtException: Cannot read property 'split' of undefined date=Thu Jan 07 2021 04:50:24 GMT+0000 (UTC), pid=11345, uid=1000, gid=1000, cwd=/home/imex, execPath=/home/imex/.nvm/versions/node/v8.11.3/bin/node, version=v8.11.3, argv=[/home/imex/.nvm/versions/node/v8.11.3/bin/node, /home/imex/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/lib/ProcessContainerForkLegacy.js], rss=134262784, heapTotal=70057984, heapUsed=61962528, external=2504334, loadavg=[0.00244140625, 0.00048828125, 0], uptime=32980
TypeError: Cannot read property 'split' of undefined
at Server.reporter.express.redirectServer.http.createServer (/home/imex/node_modules/jsreport-express/lib/reporter.express.js:59:53)
at emitTwo (events.js:126:13)
at Server.emit (events.js:214:7)
at Server.<anonymous> (/home/imex/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/node_modules/@pm2/io/build/main/metrics/httpMetrics.js:166:33)
at parserOnIncoming (_http_server.js:619:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:112:17)
2021-01-07T06:01:42.695Z - error: uncaughtException: Cannot read property 'split' of undefined date=Thu Jan 07 2021 06:01:42 GMT+0000 (UTC), pid=12929, uid=1000, gid=1000, cwd=/home/imex, execPath=/home/imex/.nvm/versions/node/v8.11.3/bin/node, version=v8.11.3, argv=[/home/imex/.nvm/versions/node/v8.11.3/bin/node, /home/imex/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/lib/ProcessContainerForkLegacy.js], rss=139726848, heapTotal=103612416, heapUsed=68997864, external=793187, loadavg=[0.00146484375, 0.025390625, 0], uptime=37258
TypeError: Cannot read property 'split' of undefined
at Server.reporter.express.redirectServer.http.createServer (/home/imex/node_modules/jsreport-express/lib/reporter.express.js:59:53)
at emitTwo (events.js:126:13)
at Server.emit (events.js:214:7)
at Server.<anonymous> (/home/imex/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/node_modules/@pm2/io/build/main/metrics/httpMetrics.js:166:33)
at parserOnIncoming (_http_server.js:619:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:112:17)
2021-01-07T12:20:05.575Z - error: uncaughtException: Cannot read property 'split' of undefined date=Thu Jan 07 2021 12:20:05 GMT+0000 (UTC), pid=13050, uid=1000, gid=1000, cwd=/home/imex, execPath=/home/imex/.nvm/versions/node/v8.11.3/bin/node, version=v8.11.3, argv=[/home/imex/.nvm/versions/node/v8.11.3/bin/node, /home/imex/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/lib/ProcessContainerForkLegacy.js], rss=129638400, heapTotal=103088128, heapUsed=62987384, external=1658615, loadavg=[0, 0, 0], uptime=59961
TypeError: Cannot read property 'split' of undefined
at Server.reporter.express.redirectServer.http.createServer (/home/imex/node_modules/jsreport-express/lib/reporter.express.js:59:53)
at emitTwo (events.js:126:13)
at Server.emit (events.js:214:7)
at Server.<anonymous> (/home/imex/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/node_modules/@pm2/io/build/main/metrics/httpMetrics.js:166:33)
at parserOnIncoming (_http_server.js:619:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:112:17)
2021-01-07T13:15:41.587Z - error: uncaughtException: Cannot read property 'split' of undefined date=Thu Jan 07 2021 13:15:41 GMT+0000 (UTC), pid=24409, uid=1000, gid=1000, cwd=/home/imex, execPath=/home/imex/.nvm/versions/node/v8.11.3/bin/node, version=v8.11.3, argv=[/home/imex/.nvm/versions/node/v8.11.3/bin/node, /home/imex/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/lib/ProcessContainerForkLegacy.js], rss=134336512, heapTotal=101515264, heapUsed=64572744, external=478275, loadavg=[0, 0.01611328125, 0], uptime=63297
TypeError: Cannot read property 'split' of undefined
at Server.reporter.express.redirectServer.http.createServer (/home/imex/node_modules/jsreport-express/lib/reporter.express.js:59:53)
at emitTwo (events.js:126:13)
at Server.emit (events.js:214:7)
at Server.<anonymous> (/home/imex/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/node_modules/@pm2/io/build/main/metrics/httpMetrics.js:166:33)
at parserOnIncoming (_http_server.js:619:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:112:17)
2021-01-07T14:38:35.885Z - error: uncaughtException: Cannot read property 'split' of undefined date=Thu Jan 07 2021 14:38:35 GMT+0000 (UTC), pid=24479, uid=1000, gid=1000, cwd=/home/imex, execPath=/home/imex/.nvm/versions/node/v8.11.3/bin/node, version=v8.11.3, argv=[/home/imex/.nvm/versions/node/v8.11.3/bin/node, /home/imex/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/lib/ProcessContainerForkLegacy.js], rss=113201152, heapTotal=78446592, heapUsed=53749096, external=726105, loadavg=[0.001953125, 0.0166015625, 0], uptime=68271
TypeError: Cannot read property 'split' of undefined
at Server.reporter.express.redirectServer.http.createServer (/home/imex/node_modules/jsreport-express/lib/reporter.express.js:59:53)
at emitTwo (events.js:126:13)
at Server.emit (events.js:214:7)
at Server.<anonymous> (/home/imex/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/node_modules/@pm2/io/build/main/metrics/httpMetrics.js:166:33)
at parserOnIncoming (_http_server.js:619:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:112:17)
2021-01-07T17:30:51.446Z - error: Error in authorization server request: timeout of 6000ms exceeded
2021-01-07T17:30:51.449Z - error: Error during processing request at https://reports.bodyshop.app/odata/assets?$filter=name%20eq%20%27estimate_detail.query%27, details: timeout of 6000ms exceeded, stack: Error: timeout of 6000ms exceeded
at createError (/home/imex/node_modules/axios/lib/core/createError.js:16:15)
at ClientRequest.handleRequestTimeout (/home/imex/node_modules/axios/lib/adapters/http.js:256:16)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
at ClientRequest.emit (events.js:208:7)
at Socket.emitTimeout (_http_client.js:706:34)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:106:13)
at Socket.emit (events.js:208:7)
at Socket._onTimeout (net.js:410:8)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5)
2021-01-07T17:35:02.398Z - error: Authorization server has sent an invalid status code (403) in response, token assumed as invalid
2021-01-07T17:36:16.794Z - error: Authorization server has sent an invalid status code (403) in response, token assumed as invalid
2021-01-07T17:36:48.572Z - error: Authorization server has sent an invalid status code (403) in response, token assumed as invalid
2021-01-07T17:38:35.128Z - error: Authorization server has no "username" field in its response, token assumed as invalid
2021-01-07T17:38:36.607Z - error: uncaughtException: Cannot read property 'split' of undefined date=Thu Jan 07 2021 17:38:36 GMT+0000 (UTC), pid=27452, uid=1000, gid=1000, cwd=/home/imex, execPath=/home/imex/.nvm/versions/node/v8.11.3/bin/node, version=v8.11.3, argv=[/home/imex/.nvm/versions/node/v8.11.3/bin/node, /home/imex/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/lib/ProcessContainerForkLegacy.js], rss=123133952, heapTotal=62758912, heapUsed=56893952, external=1486040, loadavg=[0.04296875, 0.05126953125, 0.07763671875], uptime=79072
TypeError: Cannot read property 'split' of undefined
at Server.reporter.express.redirectServer.http.createServer (/home/imex/node_modules/jsreport-express/lib/reporter.express.js:59:53)
at emitTwo (events.js:126:13)
at Server.emit (events.js:214:7)
at Server.<anonymous> (/home/imex/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/node_modules/@pm2/io/build/main/metrics/httpMetrics.js:166:33)
at parserOnIncoming (_http_server.js:619:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:112:17)
2021-01-07T17:38:54.133Z - error: Authorization server has no "username" field in its response, token assumed as invalid
2021-01-07T17:39:19.153Z - error: username "patrick@imex.dev" returned from authorization server is not a jsreport user
2021-01-07T17:39:37.869Z - error: Authorization server has sent an invalid status code (403) in response, token assumed as invalid
2021-01-07T17:40:01.092Z - error: Authorization server has sent an invalid status code (403) in response, token assumed as invalid
2021-01-07T17:40:22.192Z - error: Authorization server has no "username" field in its response, token assumed as invalid
2021-01-07T17:40:24.945Z - error: Authorization server has no "username" field in its response, token assumed as invalid
2021-01-07T17:40:26.396Z - error: Authorization server has no "username" field in its response, token assumed as invalid
2021-01-07T17:40:27.743Z - error: Authorization server has no "username" field in its response, token assumed as invalid

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,20 +0,0 @@
{
"name": "jsreport-server",
"main": "server.js",
"scripts": {
"start": "node server",
"jsreport": "jsreport"
},
"jsreport": {
"entryPoint": "server.js"
},
"dependencies": {
"dinero.js": "^1.8.1",
"jsreport": "^2.11.0",
"jsreport-pdf-utils": "^1.10.3",
"lodash": "^4.17.21"
},
"puppeteerArgs": [
"--no-sandbox"
]
}

View File

@@ -1,14 +0,0 @@
const jsreport = require('jsreport')()
if (process.env.JSREPORT_CLI) {
// export jsreport instance to make it possible to use jsreport-cli
module.exports = jsreport
} else {
jsreport.init().then(() => {
// running
}).catch((e) => {
// error during startup
console.error(e.stack)
process.exit(1)
})
}

View File

@@ -281,6 +281,7 @@ async function InsertPayment(
PaymentMethodRef: {
value: paymentMethods[payment.type],
},
PaymentRefNum: payment.transactionid,
...(invoices && invoices.length === 1 && invoices[0]
? {
Line: [
@@ -473,6 +474,7 @@ async function InsertCreditMemo(
...(invoices && invoices[0]
? { InvoiceRef: { value: invoices[0].Id } }
: {}),
PaymentRefNum: payment.transactionid,
Line: [
{
DetailType: "SalesItemLineDetail",

View File

@@ -209,6 +209,48 @@ exports.default = async function (socket, jobid) {
// console.log("NO MASH ACCOUNT FOUND!!");
}
}
console.log(
Number.isInteger(bodyshop?.cdk_configuration?.sendmaterialscosting),
typeof Number.isInteger(bodyshop?.cdk_configuration?.sendmaterialscosting)
);
if (!!bodyshop?.cdk_configuration?.sendmaterialscosting) {
//Manually send the percentage of the costing.
//Paint Mat
const mapaAccountName = selectedDmsAllocationConfig.costs.MAPA;
const mapaAccount = bodyshop.md_responsibility_centers.costs.find(
(c) => c.name === mapaAccountName
);
if (mapaAccount) {
if (!costCenterHash[mapaAccountName])
costCenterHash[mapaAccountName] = Dinero();
costCenterHash[mapaAccountName] = costCenterHash[mapaAccountName].add(
Dinero(job.job_totals.rates.mapa.total).percentage(
bodyshop?.cdk_configuration?.sendmaterialscosting
)
);
} else {
//console.log("NO MAPA ACCOUNT FOUND!!");
}
//Shop Mat
const mashAccountName = selectedDmsAllocationConfig.costs.MASH;
const mashAccount = bodyshop.md_responsibility_centers.costs.find(
(c) => c.name === mashAccountName
);
if (mashAccount) {
if (!costCenterHash[mashAccountName])
costCenterHash[mashAccountName] = Dinero();
costCenterHash[mashAccountName] = costCenterHash[mashAccountName].add(
Dinero(job.job_totals.rates.mash.total).percentage(
bodyshop?.cdk_configuration?.sendmaterialscosting
)
);
} else {
// console.log("NO MASH ACCOUNT FOUND!!");
}
}
const { ca_bc_pvrt } = job;
if (ca_bc_pvrt) {
// const pvrtAccount = bodyshop.md_responsibility_centers.profits.find(

View File

@@ -334,12 +334,17 @@ const CreateRepairOrderTag = (job, errorCallback) => {
.format(AhDateFormat)) ||
"",
InsInspDate: null,
StartDate:
(job.actual_in &&
moment(job.actual_in)
.tz(job.bodyshop.timezone)
.format(AhDateFormat)) ||
"",
StartDate: job.date_repairstarted
? (job.date_repairstarted &&
moment(job.date_repairstarted)
.tz(job.bodyshop.timezone)
.format(AhDateFormat)) ||
""
: (job.date_repairstarted &&
moment(job.actual_in)
.tz(job.bodyshop.timezone)
.format(AhDateFormat)) ||
"",
PartsOrder: null,
TeardownHold: null,
SupplementSubmittedDate: null,
@@ -496,7 +501,13 @@ const CreateRepairOrderTag = (job, errorCallback) => {
FrameHours: job.job_totals.rates.laf.hours.toFixed(2),
GlassHours: job.job_totals.rates.lag.hours.toFixed(2),
DetailHours: job.job_totals.rates.lad.hours.toFixed(2),
LaborMiscHours: 0,
LaborMiscHours: (
job.job_totals.rates.la1.hours +
job.job_totals.rates.la2.hours +
job.job_totals.rates.la3.hours +
job.job_totals.rates.la4.hours +
job.job_totals.rates.lau.hours
).toFixed(2),
PartsTotal: Dinero(job.job_totals.parts.parts.total).toFormat(
AHDineroFormat
@@ -579,8 +590,14 @@ const CreateRepairOrderTag = (job, errorCallback) => {
),
DetailLaborTotalCost:
repairCosts.DetailLaborTotalCost.toFormat(AHDineroFormat),
LaborMiscTotal: 0,
LaborMiscTotalCost: 0,
LaborMiscTotal: Dinero(job.job_totals.rates.la1.total)
.add(Dinero(job.job_totals.rates.la2.total))
.add(Dinero(job.job_totals.rates.la3.total))
.add(Dinero(job.job_totals.rates.la4.total))
.add(Dinero(job.job_totals.rates.lau.total))
.toFormat(AHDineroFormat),
LaborMiscTotalCost:
repairCosts.LaborMiscTotalCost.toFormat(AHDineroFormat),
MiscellaneousChargeTotal: 0,
MiscellaneousChargeTotalCost: 0,
PMTotal: Dinero(job.job_totals.rates.mapa.total).toFormat(
@@ -852,6 +869,12 @@ const CreateCosts = (job) => {
GlassLaborTotalCost: ticketTotalsByCostCenter[defaultCosts.LAG] || Dinero(),
DetailLaborTotalCost:
ticketTotalsByCostCenter[defaultCosts.LAD] || Dinero(),
LaborMiscTotalCost: (ticketTotalsByCostCenter[defaultCosts.LA1] || Dinero())
.add(ticketTotalsByCostCenter[defaultCosts.LA2] || Dinero())
.add(ticketTotalsByCostCenter[defaultCosts.LA2] || Dinero())
.add(ticketTotalsByCostCenter[defaultCosts.LA3] || Dinero())
.add(ticketTotalsByCostCenter[defaultCosts.LA4] || Dinero())
.add(ticketTotalsByCostCenter[defaultCosts.LAU] || Dinero()),
PMTotalCost: billTotalsByCostCenters[defaultCosts.MAPA] || Dinero(),
BMTotalCost: billTotalsByCostCenters[defaultCosts.MASH] || Dinero(),
MiscTotalCost: billTotalsByCostCenters[defaultCosts.PAO] || Dinero(),

Some files were not shown because too many files have changed in this diff Show More