Merged in release/2021-10-01 (pull request #227)

release/2021-10-01

Approved-by: Patrick Fic
This commit is contained in:
Patrick Fic
2021-09-27 23:52:21 +00:00
298 changed files with 8771 additions and 1266 deletions

View File

@@ -8229,6 +8229,27 @@
</translation> </translation>
</translations> </translations>
</concept_node> </concept_node>
<concept_node>
<name>qbo</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> <concept_node>
<name>rbac</name> <name>rbac</name>
<definition_loaded>false</definition_loaded> <definition_loaded>false</definition_loaded>
@@ -32575,6 +32596,27 @@
</translation> </translation>
</translations> </translations>
</concept_node> </concept_node>
<concept_node>
<name>csi_invitation_action</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> <concept_node>
<name>diagnostic_authorization</name> <name>diagnostic_authorization</name>
<definition_loaded>false</definition_loaded> <definition_loaded>false</definition_loaded>
@@ -33205,6 +33247,48 @@
</translation> </translation>
</translations> </translations>
</concept_node> </concept_node>
<concept_node>
<name>sgi_certificate_of_repairs</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>sgi_windshield_auth</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> <concept_node>
<name>stolen_recovery_checklist</name> <name>stolen_recovery_checklist</name>
<definition_loaded>false</definition_loaded> <definition_loaded>false</definition_loaded>

View File

@@ -4,18 +4,18 @@
"private": true, "private": true,
"proxy": "http://localhost:5000", "proxy": "http://localhost:5000",
"dependencies": { "dependencies": {
"@apollo/client": "^3.4.13", "@apollo/client": "^3.4.14",
"@craco/craco": "^6.3.0", "@craco/craco": "^6.3.0",
"@fingerprintjs/fingerprintjs": "^3.3.0", "@fingerprintjs/fingerprintjs": "^3.3.0",
"@lourenci/react-kanban": "^2.1.0", "@lourenci/react-kanban": "^2.1.0",
"@openreplay/tracker": "^3.3.1", "@openreplay/tracker": "^3.4.0",
"@openreplay/tracker-assist": "^3.1.1", "@openreplay/tracker-assist": "^3.4.0",
"@openreplay/tracker-graphql": "^3.0.0", "@openreplay/tracker-graphql": "^3.0.0",
"@openreplay/tracker-redux": "^3.0.0", "@openreplay/tracker-redux": "^3.0.0",
"@sentry/react": "^6.13.0", "@sentry/react": "^6.13.2",
"@sentry/tracing": "^6.13.0", "@sentry/tracing": "^6.13.2",
"@stripe/react-stripe-js": "^1.4.0", "@stripe/react-stripe-js": "^1.5.0",
"@stripe/stripe-js": "^1.17.1", "@stripe/stripe-js": "^1.18.0",
"@tanem/react-nprogress": "^3.0.79", "@tanem/react-nprogress": "^3.0.79",
"antd": "^4.16.13", "antd": "^4.16.13",
"apollo-link-logger": "^2.0.0", "apollo-link-logger": "^2.0.0",
@@ -26,15 +26,15 @@
"enquire-js": "^0.2.1", "enquire-js": "^0.2.1",
"env-cmd": "^10.1.0", "env-cmd": "^10.1.0",
"exifr": "^7.1.3", "exifr": "^7.1.3",
"firebase": "^9.0.2", "firebase": "^9.1.0",
"graphql": "^15.5.3", "graphql": "^15.6.0",
"i18next": "^21.0.0", "i18next": "^21.1.1",
"i18next-browser-languagedetector": "^6.1.2", "i18next-browser-languagedetector": "^6.1.2",
"jsoneditor": "^9.5.4", "jsoneditor": "^9.5.6",
"jsreport-browser-client-dist": "^1.3.0", "jsreport-browser-client-dist": "^1.3.0",
"libphonenumber-js": "^1.9.34", "libphonenumber-js": "^1.9.34",
"logrocket": "^2.0.0", "logrocket": "^2.0.0",
"markerjs2": "^2.11.2", "markerjs2": "^2.12.0",
"moment-business-days": "^1.2.0", "moment-business-days": "^1.2.0",
"phone": "^3.1.8", "phone": "^3.1.8",
"preval.macro": "^5.0.0", "preval.macro": "^5.0.0",
@@ -59,13 +59,13 @@
"react-scripts": "^4.0.3", "react-scripts": "^4.0.3",
"react-sublime-video": "^0.2.5", "react-sublime-video": "^0.2.5",
"react-virtualized": "^9.22.3", "react-virtualized": "^9.22.3",
"recharts": "^2.1.3", "recharts": "^2.1.4",
"redux": "^4.1.1", "redux": "^4.1.1",
"redux-persist": "^6.0.0", "redux-persist": "^6.0.0",
"redux-saga": "^1.1.3", "redux-saga": "^1.1.3",
"redux-state-sync": "^3.1.2", "redux-state-sync": "^3.1.2",
"reselect": "^4.0.0", "reselect": "^4.0.0",
"sass": "^1.41.1", "sass": "^1.42.1",
"socket.io-client": "^4.2.0", "socket.io-client": "^4.2.0",
"styled-components": "^5.3.1", "styled-components": "^5.3.1",
"subscriptions-transport-ws": "^0.9.18", "subscriptions-transport-ws": "^0.9.18",

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 51 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 51 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.5 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.6 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.4 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.5 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.1 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.1 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.5 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.6 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.5 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.5 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.1 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@@ -11,6 +11,7 @@ import JobsExportAllButton from "../jobs-export-all-button/jobs-export-all-butto
import { connect } from "react-redux"; import { connect } from "react-redux";
import { createStructuredSelector } from "reselect"; import { createStructuredSelector } from "reselect";
import { selectBodyshop } from "../../redux/user/user.selectors"; import { selectBodyshop } from "../../redux/user/user.selectors";
import QboAuthorizeComponent from "../qbo-authorize/qbo-authorize.component";
const mapStateToProps = createStructuredSelector({ const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop, bodyshop: selectBodyshop,
}); });
@@ -206,6 +207,9 @@ export function AccountingReceivablesTableComponent({
completedCallback={setSelectedJobs} completedCallback={setSelectedJobs}
/> />
)} )}
{bodyshop.accountingconfig && bodyshop.accountingconfig.qbo && (
<QboAuthorizeComponent />
)}
<Input.Search <Input.Search
value={state.search} value={state.search}
onChange={handleSearch} onChange={handleSearch}

View File

@@ -34,6 +34,7 @@ export function JobsCloseExportButton({
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const handleQbxml = async () => { const handleQbxml = async () => {
//Check if it's a CDK setup.
if (bodyshop.cdk_dealerid) { if (bodyshop.cdk_dealerid) {
history.push(`/manage/dms?jobId=${jobId}`); history.push(`/manage/dms?jobId=${jobId}`);
return; return;
@@ -41,48 +42,58 @@ export function JobsCloseExportButton({
logImEXEvent("jobs_close_export"); logImEXEvent("jobs_close_export");
setLoading(true); setLoading(true);
let QbXmlResponse; //Check if it's a QBO Setup.
try {
QbXmlResponse = await axios.post(
"/accounting/qbxml/receivables",
{ jobIds: [jobId] },
{
headers: {
Authorization: `Bearer ${await auth.currentUser.getIdToken()}`,
},
}
);
console.log("handle -> XML", QbXmlResponse);
} catch (error) {
console.log("Error getting QBXML from Server.", error);
notification["error"]({
message: t("jobs.errors.exporting", {
error: "Unable to retrieve QBXML. " + JSON.stringify(error.message),
}),
});
setLoading(false);
return;
}
let PartnerResponse; let PartnerResponse;
try { if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
PartnerResponse = await axios.post( PartnerResponse = await axios.post(`/qbo/receivables`, {
"http://localhost:1337/qb/", withCredentials: true,
// "http://609feaeae986.ngrok.io/qb/", jobIds: [jobId],
QbXmlResponse.data,
{
headers: {
Authorization: `Bearer ${await auth.currentUser.getIdToken()}`,
},
}
);
} catch (error) {
console.log("Error connecting to quickbooks or partner.", error);
notification["error"]({
message: t("jobs.errors.exporting-partner"),
}); });
setLoading(false); } else {
return; //Default is QBD
let QbXmlResponse;
try {
QbXmlResponse = await axios.post(
"/accounting/qbxml/receivables",
{ jobIds: [jobId] },
{
headers: {
Authorization: `Bearer ${await auth.currentUser.getIdToken()}`,
},
}
);
console.log("handle -> XML", QbXmlResponse);
} catch (error) {
console.log("Error getting QBXML from Server.", error);
notification["error"]({
message: t("jobs.errors.exporting", {
error: "Unable to retrieve QBXML. " + JSON.stringify(error.message),
}),
});
setLoading(false);
return;
}
try {
PartnerResponse = await axios.post(
"http://localhost:1337/qb/",
// "http://609feaeae986.ngrok.io/qb/",
QbXmlResponse.data,
{
headers: {
Authorization: `Bearer ${await auth.currentUser.getIdToken()}`,
},
}
);
} catch (error) {
console.log("Error connecting to quickbooks or partner.", error);
notification["error"]({
message: t("jobs.errors.exporting-partner"),
});
setLoading(false);
return;
}
} }
console.log("PartnerResponse", PartnerResponse); console.log("PartnerResponse", PartnerResponse);

View File

@@ -104,7 +104,7 @@ export function JobsDetailHeaderCsi({
replyTo: bodyshop.email, replyTo: bodyshop.email,
}, },
template: { template: {
name: TemplateList("job").csi_invitation.key, name: TemplateList("job_special").csi_invitation_action.key,
variables: { variables: {
id: result.data.insert_csi.returning[0].id, id: result.data.insert_csi.returning[0].id,
}, },

View File

@@ -34,53 +34,61 @@ export function JobsExportAllButton({
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const handleQbxml = async () => { const handleQbxml = async () => {
logImEXEvent("jobs_export_all"); logImEXEvent("jobs_export_all");
setLoading(true);
let QbXmlResponse;
try {
QbXmlResponse = await axios.post(
"/accounting/qbxml/receivables",
{ jobIds: jobIds },
{
headers: {
Authorization: `Bearer ${await auth.currentUser.getIdToken()}`,
},
}
);
} catch (error) {
console.log("Error getting QBXML from Server.", error);
notification["error"]({
message: t("jobs.errors.exporting", {
error: "Unable to retrieve QBXML. " + JSON.stringify(error.message),
}),
});
setLoading(false);
return;
}
let PartnerResponse; let PartnerResponse;
try { setLoading(true);
PartnerResponse = await axios.post( if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
"http://localhost:1337/qb/", PartnerResponse = await axios.post(`/qbo/receivables`, {
// "http://609feaeae986.ngrok.io/qb/", withCredentials: true,
QbXmlResponse.data, jobIds: jobIds,
{
headers: {
Authorization: `Bearer ${await auth.currentUser.getIdToken()}`,
},
}
);
} catch (error) {
console.log("Error connecting to quickbooks or partner.", error);
notification["error"]({
message: t("jobs.errors.exporting-partner"),
}); });
setLoading(false); } else {
return; let QbXmlResponse;
} try {
QbXmlResponse = await axios.post(
"/accounting/qbxml/receivables",
{ jobIds: jobIds },
{
headers: {
Authorization: `Bearer ${await auth.currentUser.getIdToken()}`,
},
}
);
} catch (error) {
console.log("Error getting QBXML from Server.", error);
notification["error"]({
message: t("jobs.errors.exporting", {
error: "Unable to retrieve QBXML. " + JSON.stringify(error.message),
}),
});
setLoading(false);
return;
}
try {
PartnerResponse = await axios.post(
"http://localhost:1337/qb/",
// "http://609feaeae986.ngrok.io/qb/",
QbXmlResponse.data,
{
headers: {
Authorization: `Bearer ${await auth.currentUser.getIdToken()}`,
},
}
);
} catch (error) {
console.log("Error connecting to quickbooks or partner.", error);
notification["error"]({
message: t("jobs.errors.exporting-partner"),
});
setLoading(false);
return;
}
}
console.log("PartnerResponse", PartnerResponse); console.log("PartnerResponse", PartnerResponse);
const groupedData = _.groupBy(PartnerResponse.data, "id"); const groupedData = _.groupBy(
PartnerResponse.data,
bodyshop.accountingconfig.qbo ? "jobid" : "id"
);
await Promise.all( await Promise.all(
Object.keys(groupedData).map(async (key) => { Object.keys(groupedData).map(async (key) => {
@@ -157,6 +165,7 @@ export function JobsExportAllButton({
if (!!completedCallback) completedCallback([]); if (!!completedCallback) completedCallback([]);
if (!!loadingCallback) loadingCallback(false); if (!!loadingCallback) loadingCallback(false);
setLoading(false); setLoading(false);
}; };

View File

@@ -1,28 +1,35 @@
import { Card, Col, Input, Row, Space, Typography } from "antd"; import { Card, Col, Input, Row, Space, Typography } from "antd";
import _ from "lodash"; import _ from "lodash";
import React, { useState } from "react"; import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { createStructuredSelector } from "reselect"; import { createStructuredSelector } from "reselect";
import { selectPrintCenter } from "../../redux/modals/modals.selectors"; import { selectPrintCenter } from "../../redux/modals/modals.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors";
import { TemplateList } from "../../utils/TemplateConstants"; import { TemplateList } from "../../utils/TemplateConstants";
import Jobd3RdPartyModal from "../job-3rd-party-modal/job-3rd-party-modal.component"; import Jobd3RdPartyModal from "../job-3rd-party-modal/job-3rd-party-modal.component";
import PrintCenterItem from "../print-center-item/print-center-item.component"; import PrintCenterItem from "../print-center-item/print-center-item.component";
import PrintCenterSpeedPrint from "../print-center-speed-print/print-center-speed-print.component"; import PrintCenterSpeedPrint from "../print-center-speed-print/print-center-speed-print.component";
import { useTranslation } from "react-i18next";
const mapStateToProps = createStructuredSelector({ const mapStateToProps = createStructuredSelector({
printCenterModal: selectPrintCenter, printCenterModal: selectPrintCenter,
bodyshop: selectBodyshop,
}); });
const mapDispatchToProps = (dispatch) => ({}); const mapDispatchToProps = (dispatch) => ({});
export function PrintCenterJobsComponent({ printCenterModal }) { export function PrintCenterJobsComponent({ printCenterModal, bodyshop }) {
const [search, setSearch] = useState(""); const [search, setSearch] = useState("");
const { id: jobId } = printCenterModal.context; const { id: jobId } = printCenterModal.context;
const tempList = TemplateList("job", {}); const tempList = TemplateList("job", {});
const { t } = useTranslation(); const { t } = useTranslation();
const JobsReportsList = Object.keys(tempList).map((key) => { const JobsReportsList = Object.keys(tempList)
return tempList[key]; .map((key) => {
}); return tempList[key];
})
.filter(
(temp) =>
!temp.regions || (temp.regions && temp.regions[bodyshop.region_config])
);
const filteredJobsReportsList = const filteredJobsReportsList =
search !== "" search !== ""

View File

@@ -1,19 +1,18 @@
import { Button, Space } from "antd"; import { Space, Tag } from "antd";
import Axios from "axios"; import Axios from "axios";
import React, { useEffect } from "react";
//import QboImg from "./qbo_signin.png";
import queryString from "query-string"; import queryString from "query-string";
import { useLocation } from "react-router-dom"; import React, { useEffect } from "react";
import { useCookies } from "react-cookie"; import { useCookies } from "react-cookie";
import { useHistory, useLocation } from "react-router-dom";
import QboSignIn from "../../assets/qbo/C2QB_green_btn_med_default.svg";
export default function QboAuthorizeComponent() { export default function QboAuthorizeComponent() {
const location = useLocation(); const location = useLocation();
const history = useHistory();
const [, setCookie] = useCookies(["access_token", "refresh_token"]); const [cookies, setCookie] = useCookies(["access_token", "refresh_token"]);
const handleQbSignIn = async () => { const handleQbSignIn = async () => {
const result = await Axios.post("/qbo/authorize"); const result = await Axios.post("/qbo/authorize");
console.log("pushing to history", result.data);
window.location.href = result.data; window.location.href = result.data;
}; };
const qs = queryString.parse(location.search); const qs = queryString.parse(location.search);
@@ -35,42 +34,24 @@ export default function QboAuthorizeComponent() {
path: "/", path: "/",
expires, expires,
}); });
history.push({ pathname: `/manage/accounting/receivables` });
} }
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [qs, location, setCookie]); }, [qs, location, setCookie]);
return ( return (
<div> <Space>
<Space wrap> <img
<Button onClick={handleQbSignIn}> onClick={handleQbSignIn}
{/* <img alt="Sign In to QuickBooks Online"
src={QboImg} src={QboSignIn}
alt="Sign in with Intuit" style={{ cursor: "pointer" }}
onClick={handleQbSignIn} />
/> */} {!cookies.qbo_realmId && (
auth <Tag color="red">No QuickBooks company has been connected.</Tag>
</Button> )}
<Button
onClick={async () => {
const response = await Axios.get(`/qbo/refresh`, {
withCredentials: true,
});
console.log(response);
}}
>
Refresh Token
</Button>
<Button
onClick={async () => {
const response = await Axios.post(`/qbo/receivables`, {
withCredentials: true,
});
console.log(response);
}}
>
REC
</Button>
</Space>
{error && JSON.parse(decodeURIComponent(error)).error_description} {error && JSON.parse(decodeURIComponent(error)).error_description}
</div> </Space>
); );
} }

View File

@@ -121,6 +121,13 @@ export default function ShopInfoGeneral({ form }) {
</Form.Item> </Form.Item>
</LayoutFormRow> </LayoutFormRow>
<LayoutFormRow header={t("bodyshop.labels.accountingsetup")}> <LayoutFormRow header={t("bodyshop.labels.accountingsetup")}>
<Form.Item
label={t("bodyshop.labels.qbo")}
valuePropName="checked"
name={["accountingconfig", "qbo"]}
>
<Switch />
</Form.Item>
<Form.Item <Form.Item
label={t("bodyshop.labels.accountingtiers")} label={t("bodyshop.labels.accountingtiers")}
rules={[ rules={[

View File

@@ -77,6 +77,7 @@ export const QUERY_PARTS_QUEUE = gql`
) { ) {
ownr_fn ownr_fn
ownr_ln ownr_ln
ownr_co_nm
ownr_ph1 ownr_ph1
ownr_ea ownr_ea
plate_no plate_no
@@ -98,6 +99,7 @@ export const QUERY_PARTS_QUEUE = gql`
status status
updated_at updated_at
vehicleid vehicleid
ownerid
} }
} }
`; `;
@@ -110,6 +112,7 @@ export const SUBSCRIPTION_JOBS_IN_PRODUCTION = gql`
ro_number ro_number
ownr_fn ownr_fn
ownr_ln ownr_ln
ownr_co_nm
v_model_yr v_model_yr
v_model_desc v_model_desc
clm_no clm_no
@@ -540,6 +543,7 @@ export const GET_JOB_BY_PK = gql`
db_ref db_ref
manual_line manual_line
prt_dsmk_p prt_dsmk_p
prt_dsmk_m
billlines(limit: 1, order_by: { bill: { date: desc } }) { billlines(limit: 1, order_by: { bill: { date: desc } }) {
id id
quantity quantity
@@ -1636,6 +1640,7 @@ export const QUERY_ALL_JOBS_PAGINATED_STATUS_FILTERED = gql`
) { ) {
ownr_fn ownr_fn
ownr_ln ownr_ln
ownr_co_nm
ownerid ownerid
ownr_ph1 ownr_ph1
ownr_ea ownr_ea

View File

@@ -116,8 +116,8 @@ export function PartsQueuePageComponent({ bodyshop }) {
// sorter: (a, b) => alphaSort(a.ownr_ln, b.ownr_ln), // sorter: (a, b) => alphaSort(a.ownr_ln, b.ownr_ln),
// sortOrder: sortcolumn === "owner" && sortorder, // sortOrder: sortcolumn === "owner" && sortorder,
render: (text, record) => { render: (text, record) => {
return record.owner ? ( return record.ownerid ? (
<Link to={"/manage/owners/" + record.owner.id}> <Link to={"/manage/owners/" + record.ownerid}>
{`${record.ownr_fn || ""} ${record.ownr_ln || ""} ${ {`${record.ownr_fn || ""} ${record.ownr_ln || ""} ${
record.ownr_co_nm || "" record.ownr_co_nm || ""
}`} }`}

View File

@@ -509,6 +509,7 @@
"orderstatuses": "Order Statuses", "orderstatuses": "Order Statuses",
"partslocations": "Parts Locations", "partslocations": "Parts Locations",
"printlater": "Print Later", "printlater": "Print Later",
"qbo": "Use QuickBooks Online?",
"rbac": "Role Based Access Control", "rbac": "Role Based Access Control",
"responsibilitycenters": { "responsibilitycenters": {
"costs": "Cost Centers", "costs": "Cost Centers",
@@ -1952,6 +1953,7 @@
"coversheet_landscape": "Coversheet (Landscape)", "coversheet_landscape": "Coversheet (Landscape)",
"coversheet_portrait": "Coversheet Portrait", "coversheet_portrait": "Coversheet Portrait",
"csi_invitation": "CSI Invitation", "csi_invitation": "CSI Invitation",
"csi_invitation_action": "CSI Invite",
"diagnostic_authorization": "Diagnostic Authorization", "diagnostic_authorization": "Diagnostic Authorization",
"estimate": "Estimate Only", "estimate": "Estimate Only",
"estimate_detail": "Estimate Details", "estimate_detail": "Estimate Details",
@@ -1982,6 +1984,8 @@
"qc_sheet": "Quality Control Sheet", "qc_sheet": "Quality Control Sheet",
"ro_totals": "RO Totals", "ro_totals": "RO Totals",
"ro_with_description": "RO Summary with Descriptions", "ro_with_description": "RO Summary with Descriptions",
"sgi_certificate_of_repairs": "SGI - Certificate of Repairs",
"sgi_windshield_auth": "SGI - Windshield Authorization",
"stolen_recovery_checklist": "Stolen Recovery Checklist", "stolen_recovery_checklist": "Stolen Recovery Checklist",
"supplement_request": "Supplement Request", "supplement_request": "Supplement Request",
"thank_you_ro": "Thank You Letter", "thank_you_ro": "Thank You Letter",

View File

@@ -509,6 +509,7 @@
"orderstatuses": "", "orderstatuses": "",
"partslocations": "", "partslocations": "",
"printlater": "", "printlater": "",
"qbo": "",
"rbac": "", "rbac": "",
"responsibilitycenters": { "responsibilitycenters": {
"costs": "", "costs": "",
@@ -1952,6 +1953,7 @@
"coversheet_landscape": "", "coversheet_landscape": "",
"coversheet_portrait": "", "coversheet_portrait": "",
"csi_invitation": "", "csi_invitation": "",
"csi_invitation_action": "",
"diagnostic_authorization": "", "diagnostic_authorization": "",
"estimate": "", "estimate": "",
"estimate_detail": "", "estimate_detail": "",
@@ -1982,6 +1984,8 @@
"qc_sheet": "", "qc_sheet": "",
"ro_totals": "", "ro_totals": "",
"ro_with_description": "", "ro_with_description": "",
"sgi_certificate_of_repairs": "",
"sgi_windshield_auth": "",
"stolen_recovery_checklist": "", "stolen_recovery_checklist": "",
"supplement_request": "", "supplement_request": "",
"thank_you_ro": "", "thank_you_ro": "",

View File

@@ -509,6 +509,7 @@
"orderstatuses": "", "orderstatuses": "",
"partslocations": "", "partslocations": "",
"printlater": "", "printlater": "",
"qbo": "",
"rbac": "", "rbac": "",
"responsibilitycenters": { "responsibilitycenters": {
"costs": "", "costs": "",
@@ -1952,6 +1953,7 @@
"coversheet_landscape": "", "coversheet_landscape": "",
"coversheet_portrait": "", "coversheet_portrait": "",
"csi_invitation": "", "csi_invitation": "",
"csi_invitation_action": "",
"diagnostic_authorization": "", "diagnostic_authorization": "",
"estimate": "", "estimate": "",
"estimate_detail": "", "estimate_detail": "",
@@ -1982,6 +1984,8 @@
"qc_sheet": "", "qc_sheet": "",
"ro_totals": "", "ro_totals": "",
"ro_with_description": "", "ro_with_description": "",
"sgi_certificate_of_repairs": "",
"sgi_windshield_auth": "",
"stolen_recovery_checklist": "", "stolen_recovery_checklist": "",
"supplement_request": "", "supplement_request": "",
"thank_you_ro": "", "thank_you_ro": "",

View File

@@ -352,6 +352,28 @@ export const TemplateList = (type, context) => {
disabled: false, disabled: false,
group: "ro", group: "ro",
}, },
sgi_certificate_of_repairs: {
title: i18n.t("printcenter.jobs.sgi_certificate_of_repairs"),
description: "Thank You Letter by RO",
key: "sgi_certificate_of_repairs",
subject: i18n.t("printcenter.jobs.sgi_certificate_of_repairs"),
disabled: false,
group: "ro",
regions: {
CA_SK: true,
},
},
sgi_windshield_auth: {
title: i18n.t("printcenter.jobs.sgi_windshield_auth"),
description: "Thank You Letter by RO",
key: "sgi_windshield_auth",
subject: i18n.t("printcenter.jobs.sgi_windshield_auth"),
disabled: false,
group: "pre",
regions: {
CA_SK: true,
},
},
// parts_label_multi: { // parts_label_multi: {
// title: i18n.t("printcenter.jobs.parts_label_multi"), // title: i18n.t("printcenter.jobs.parts_label_multi"),
// description: "Thank You Letter by RO", // description: "Thank You Letter by RO",
@@ -370,6 +392,13 @@ export const TemplateList = (type, context) => {
key: "special_thirdpartypayer", key: "special_thirdpartypayer",
disabled: false, disabled: false,
}, },
csi_invitation_action: {
title: i18n.t("printcenter.jobs.csi_invitation_action"),
description: "CSI invite",
key: "csi_invitation_action",
subject: i18n.t("printcenter.jobs.csi_invitation_action"),
disabled: false,
},
} }
: {}), : {}),
...(!type || type === "appointment" ...(!type || type === "appointment"

File diff suppressed because it is too large Load Diff

View File

@@ -1,2 +1,7 @@
version: 2
endpoint: https://bodyshop-dev-db.herokuapp.com endpoint: https://bodyshop-dev-db.herokuapp.com
admin_secret: Dev-BodyShopApp! admin_secret: Dev-BodyShopApp!
metadata_directory: metadata
actions:
kind: synchronous
handler_webhook_baseurl: http://localhost:3000

View File

View File

@@ -0,0 +1,6 @@
actions: []
custom_types:
enums: []
input_objects: []
objects: []
scalars: []

View File

@@ -0,0 +1 @@
[]

View File

@@ -0,0 +1 @@
[]

View File

@@ -0,0 +1,27 @@
- function:
schema: public
name: search_bills
- function:
schema: public
name: search_cccontracts
- function:
schema: public
name: search_dms_vehicles
- function:
schema: public
name: search_exportlog
- function:
schema: public
name: search_jobs
- function:
schema: public
name: search_owners
- function:
schema: public
name: search_payments
- function:
schema: public
name: search_phonebook
- function:
schema: public
name: search_vehicles

View File

@@ -0,0 +1 @@
[]

View File

@@ -0,0 +1 @@
[]

4775
hasura/metadata/tables.yaml Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
version: 2

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."bodyshops" DROP COLUMN "website";

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."bodyshops" ADD COLUMN "website" text NULL;

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."documents" DROP COLUMN "takenat";

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."documents" ADD COLUMN "takenat" timestamptz NULL;

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."bodyshops" ADD CONSTRAINT "bodyshops_autohouseid_key" UNIQUE ("autohouseid");

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."bodyshops" DROP CONSTRAINT "bodyshops_autohouseid_key";

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."bodyshops" DROP COLUMN "jc_hourly_rates";

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."bodyshops" ADD COLUMN "jc_hourly_rates" jsonb NULL DEFAULT jsonb_build_object();

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."vehicles" ALTER COLUMN "v_vin" SET NOT NULL;

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."vehicles" ALTER COLUMN "v_vin" DROP NOT NULL;

View File

@@ -0,0 +1,2 @@
ALTER TABLE ONLY "public"."joblines" ALTER COLUMN "prt_dsmk_p" DROP DEFAULT;

View File

@@ -0,0 +1,2 @@
ALTER TABLE ONLY "public"."joblines" ALTER COLUMN "prt_dsmk_p" SET DEFAULT 0;

View File

@@ -0,0 +1,3 @@
update joblines
set prt_dsmk_p = 0 where joblines.prt_dsmk_p is null;

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."conversations" DROP COLUMN "archived";

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."conversations" ADD COLUMN "archived" boolean NOT NULL DEFAULT false;

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."parts_orders" DROP COLUMN "orderedby";

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."parts_orders" ADD COLUMN "orderedby" text NULL;

View File

@@ -0,0 +1,2 @@
alter table "public"."parts_orders" drop constraint "parts_orders_orderedby_fkey";

View File

@@ -0,0 +1,6 @@
alter table "public"."parts_orders"
add constraint "parts_orders_orderedby_fkey"
foreign key ("orderedby")
references "public"."users"
("email") on update set null on delete set null;

View File

@@ -0,0 +1,8 @@
alter table "public"."exportlog" drop constraint "exportlog_billid_fkey",
add constraint "exportlog_billid_fkey"
foreign key ("billid")
references "public"."bills"
("id")
on update restrict
on delete restrict;

View File

@@ -0,0 +1,6 @@
alter table "public"."exportlog" drop constraint "exportlog_billid_fkey",
add constraint "exportlog_billid_fkey"
foreign key ("billid")
references "public"."bills"
("id") on update cascade on delete cascade;

View File

@@ -0,0 +1,3 @@
ALTER TABLE ONLY "public"."users" ALTER COLUMN "dashboardlayout" SET DEFAULT jsonb_build_array();
ALTER TABLE "public"."users" ALTER COLUMN "dashboardlayout" SET NOT NULL;

View File

@@ -0,0 +1,3 @@
ALTER TABLE "public"."users" ALTER COLUMN "dashboardlayout" DROP DEFAULT;
ALTER TABLE "public"."users" ALTER COLUMN "dashboardlayout" DROP NOT NULL;

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."bodyshops" DROP COLUMN "md_jobline_presets";

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."bodyshops" ADD COLUMN "md_jobline_presets" jsonb NULL DEFAULT jsonb_build_array();

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."bodyshops" DROP COLUMN "cdk_dealerid";

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."bodyshops" ADD COLUMN "cdk_dealerid" text NULL;

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."bodyshops" DROP COLUMN "features";

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."bodyshops" ADD COLUMN "features" jsonb NULL DEFAULT jsonb_build_object();

View File

@@ -0,0 +1,30 @@
CREATE OR REPLACE FUNCTION public.search_payments(search text)
RETURNS SETOF payments
LANGUAGE plpgsql
STABLE
AS $function$
BEGIN
if search = '' then
return query select * from payments ;
else
return query SELECT
p.*
FROM
payments p, jobs j
WHERE
p.jobid = j.id AND
(
search <% p.paymentnum OR
search <% j.ownr_fn OR
search <% j.ownr_ln OR
search <% j.ownr_co_nm OR
search <% j.ro_number OR
search <% (p.payer) OR
search <% (p.transactionid) OR
search <% (p.memo));
end if;
END
$function$;

View File

@@ -0,0 +1,2 @@
alter table "public"."vehicles" add constraint "vehicles_v_vin_shopid_key" unique ("v_vin", "shopid");

View File

@@ -0,0 +1,2 @@
alter table "public"."vehicles" drop constraint "vehicles_v_vin_shopid_key";

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."bodyshops" DROP COLUMN "attach_pdf_to_email";

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."bodyshops" ADD COLUMN "attach_pdf_to_email" boolean NOT NULL DEFAULT False;

View File

@@ -0,0 +1,3 @@
ALTER TABLE "public"."audit_trail" ADD COLUMN "schemaname" text;
ALTER TABLE "public"."audit_trail" ALTER COLUMN "schemaname" DROP NOT NULL;

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."audit_trail" DROP COLUMN "schemaname" CASCADE;

View File

@@ -0,0 +1,3 @@
ALTER TABLE "public"."audit_trail" ADD COLUMN "tabname" text;
ALTER TABLE "public"."audit_trail" ALTER COLUMN "tabname" DROP NOT NULL;

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."audit_trail" DROP COLUMN "tabname" CASCADE;

View File

@@ -0,0 +1,3 @@
ALTER TABLE "public"."audit_trail" ADD COLUMN "recordid" uuid;
ALTER TABLE "public"."audit_trail" ALTER COLUMN "recordid" DROP NOT NULL;

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."audit_trail" DROP COLUMN "recordid" CASCADE;

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."audit_trail" DROP COLUMN "jobid";

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."audit_trail" ADD COLUMN "jobid" uuid NULL;

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."audit_trail" DROP COLUMN "billid";

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."audit_trail" ADD COLUMN "billid" uuid NULL;

View File

@@ -0,0 +1,2 @@
alter table "public"."audit_trail" drop constraint "audit_trail_billid_fkey";

View File

@@ -0,0 +1,6 @@
alter table "public"."audit_trail"
add constraint "audit_trail_billid_fkey"
foreign key ("billid")
references "public"."bills"
("id") on update cascade on delete cascade;

View File

@@ -0,0 +1,8 @@
alter table "public"."audit_trail" drop constraint "audit_trail_billid_fkey",
add constraint "audit_trail_billid_fkey"
foreign key ("billid")
references "public"."bills"
("id")
on update cascade
on delete cascade;

View File

@@ -0,0 +1,6 @@
alter table "public"."audit_trail" drop constraint "audit_trail_billid_fkey",
add constraint "audit_trail_billid_fkey"
foreign key ("billid")
references "public"."bills"
("id") on update cascade on delete set null;

View File

@@ -0,0 +1,8 @@
alter table "public"."audit_trail" drop constraint "audit_trail_billid_fkey",
add constraint "audit_trail_billid_fkey"
foreign key ("billid")
references "public"."bills"
("id")
on update cascade
on delete set null;

View File

@@ -0,0 +1,6 @@
alter table "public"."audit_trail" drop constraint "audit_trail_billid_fkey",
add constraint "audit_trail_billid_fkey"
foreign key ("billid")
references "public"."bills"
("id") on update cascade on delete set null;

View File

@@ -0,0 +1,2 @@
alter table "public"."audit_trail" drop constraint "audit_trail_jobid_fkey";

View File

@@ -0,0 +1,6 @@
alter table "public"."audit_trail"
add constraint "audit_trail_jobid_fkey"
foreign key ("jobid")
references "public"."jobs"
("id") on update cascade on delete set null;

View File

@@ -0,0 +1,8 @@
alter table "public"."audit_trail" drop constraint "audit_trail_useremail_fkey",
add constraint "audit_trail_useremail_fkey"
foreign key ("useremail")
references "public"."users"
("email")
on update restrict
on delete restrict;

View File

@@ -0,0 +1,6 @@
alter table "public"."audit_trail" drop constraint "audit_trail_useremail_fkey",
add constraint "audit_trail_useremail_fkey"
foreign key ("useremail")
references "public"."users"
("email") on update cascade on delete set null;

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."appointments" DROP COLUMN "note";

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."appointments" ADD COLUMN "note" text NULL;

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."audit_trail" ALTER COLUMN "created" TYPE timestamp without time zone;

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."audit_trail" ALTER COLUMN "created" TYPE timestamptz;

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."bodyshops" DROP COLUMN "tt_allow_post_to_invoiced";

View File

@@ -0,0 +1,2 @@
ALTER TABLE "public"."bodyshops" ADD COLUMN "tt_allow_post_to_invoiced" boolean NOT NULL DEFAULT false;

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