Merge branch 'release/2023-10-20' into rome/test
This commit is contained in:
@@ -38,8 +38,8 @@ const mapStateToProps = createStructuredSelector({
|
|||||||
});
|
});
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
toggleModalVisible: () => dispatch(toggleModalVisible("billEnter")),
|
toggleModalVisible: () => dispatch(toggleModalVisible("billEnter")),
|
||||||
insertAuditTrail: ({ jobid, operation }) =>
|
insertAuditTrail: ({ jobid, billid, operation }) =>
|
||||||
dispatch(insertAuditTrail({ jobid, operation })),
|
dispatch(insertAuditTrail({ jobid, billid, operation })),
|
||||||
});
|
});
|
||||||
|
|
||||||
const Templates = TemplateList("job_special");
|
const Templates = TemplateList("job_special");
|
||||||
@@ -167,7 +167,7 @@ function BillEnterModalContainer({
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
refetchQueries: ["QUERY_PARTS_BILLS_BY_JOBID"],
|
refetchQueries: ["QUERY_PARTS_BILLS_BY_JOBID", "GET_JOB_BY_PK"],
|
||||||
});
|
});
|
||||||
|
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
@@ -354,7 +354,9 @@ function BillEnterModalContainer({
|
|||||||
insertAuditTrail({
|
insertAuditTrail({
|
||||||
jobid: values.jobid,
|
jobid: values.jobid,
|
||||||
billid: billId,
|
billid: billId,
|
||||||
operation: AuditTrailMapping.billposted(remainingValues.invoice_number),
|
operation: AuditTrailMapping.billposted(
|
||||||
|
r1.data.insert_bills.returning[0].invoice_number
|
||||||
|
),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (enterAgain) {
|
if (enterAgain) {
|
||||||
|
|||||||
@@ -8,15 +8,23 @@ import PhoneNumberFormatter from "../../utils/PhoneFormatter";
|
|||||||
|
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
|
import { searchingForConversation } from "../../redux/messaging/messaging.selectors";
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
|
searchingForConversation: searchingForConversation,
|
||||||
});
|
});
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
openChatByPhone: (phone) => dispatch(openChatByPhone(phone)),
|
openChatByPhone: (phone) => dispatch(openChatByPhone(phone)),
|
||||||
});
|
});
|
||||||
|
|
||||||
export function ChatOpenButton({ bodyshop, phone, jobid, openChatByPhone }) {
|
export function ChatOpenButton({
|
||||||
|
bodyshop,
|
||||||
|
searchingForConversation,
|
||||||
|
phone,
|
||||||
|
jobid,
|
||||||
|
openChatByPhone,
|
||||||
|
}) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
if (!phone) return <></>;
|
if (!phone) return <></>;
|
||||||
|
|
||||||
@@ -29,7 +37,7 @@ export function ChatOpenButton({ bodyshop, phone, jobid, openChatByPhone }) {
|
|||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
const p = parsePhoneNumber(phone, "CA");
|
const p = parsePhoneNumber(phone, "CA");
|
||||||
|
if (searchingForConversation) return; //This is to prevent finding the same thing twice.
|
||||||
if (p && p.isValid()) {
|
if (p && p.isValid()) {
|
||||||
openChatByPhone({ phone_num: p.formatInternational(), jobid: jobid });
|
openChatByPhone({ phone_num: p.formatInternational(), jobid: jobid });
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -9,15 +9,15 @@ import {
|
|||||||
Table,
|
Table,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
} from "antd";
|
} from "antd";
|
||||||
|
import moment from "moment";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { DateTimeFormatter } from "../../utils/DateFormatter";
|
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 { GenerateDocument } from "../../utils/RenderTemplate";
|
||||||
import { TemplateList } from "../../utils/TemplateConstants";
|
import { TemplateList } from "../../utils/TemplateConstants";
|
||||||
|
import { alphaSort } from "../../utils/sorters";
|
||||||
|
import { OwnerNameDisplayFunction } from "../owner-name-display/owner-name-display.component";
|
||||||
export default function CourtesyCarsList({ loading, courtesycars, refetch }) {
|
export default function CourtesyCarsList({ loading, courtesycars, refetch }) {
|
||||||
const [state, setState] = useState({
|
const [state, setState] = useState({
|
||||||
sortedInfo: {},
|
sortedInfo: {},
|
||||||
@@ -115,6 +115,14 @@ export default function CourtesyCarsList({ loading, courtesycars, refetch }) {
|
|||||||
sortOrder:
|
sortOrder:
|
||||||
state.sortedInfo.columnKey === "model" && state.sortedInfo.order,
|
state.sortedInfo.columnKey === "model" && state.sortedInfo.order,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: t("courtesycars.fields.color"),
|
||||||
|
dataIndex: "color",
|
||||||
|
key: "color",
|
||||||
|
sorter: (a, b) => alphaSort(a.color, b.color),
|
||||||
|
sortOrder:
|
||||||
|
state.sortedInfo.columnKey === "color" && state.sortedInfo.order,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: t("courtesycars.fields.plate"),
|
title: t("courtesycars.fields.plate"),
|
||||||
dataIndex: "plate",
|
dataIndex: "plate",
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ export function EmailOverlayContainer({
|
|||||||
]
|
]
|
||||||
: []),
|
: []),
|
||||||
],
|
],
|
||||||
media: selectedMedia.filter((m) => m.isSelected).map((m) => m.src),
|
media: selectedMedia.filter((m) => m.isSelected).map((m) => m.fullsize),
|
||||||
//attachments,
|
//attachments,
|
||||||
});
|
});
|
||||||
notification["success"]({ message: t("emails.successes.sent") });
|
notification["success"]({ message: t("emails.successes.sent") });
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export default function JobLinesBillRefernece({ jobline }) {
|
|||||||
return (
|
return (
|
||||||
<div style={{ color: subletRequired && "tomato" }}>
|
<div style={{ color: subletRequired && "tomato" }}>
|
||||||
{subletRequired && <WarningFilled />}
|
{subletRequired && <WarningFilled />}
|
||||||
{`${(billLine.actual_price * billLine.quantity).toFixed(2)} (${
|
{`${billLine.actual_price.toFixed(2)} x ${billLine.quantity} (${
|
||||||
billLine.bill.vendor.name
|
billLine.bill.vendor.name
|
||||||
} #${billLine.bill.invoice_number})`}
|
} #${billLine.bill.invoice_number})`}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -33,7 +33,9 @@ const JobSearchSelect = (
|
|||||||
useLazyQuery(SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE);
|
useLazyQuery(SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE);
|
||||||
|
|
||||||
const executeSearch = (v) => {
|
const executeSearch = (v) => {
|
||||||
if (v && v !== "") callSearch(v);
|
console.log(v);
|
||||||
|
if (v && v.variables?.search !== "" && v.variables.search.length >= 2)
|
||||||
|
callSearch(v);
|
||||||
};
|
};
|
||||||
const debouncedExecuteSearch = _.debounce(executeSearch, 500);
|
const debouncedExecuteSearch = _.debounce(executeSearch, 500);
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ function JobDocumentsLocalGalleryExternal({
|
|||||||
val.type.mime &&
|
val.type.mime &&
|
||||||
val.type.mime.startsWith("image")
|
val.type.mime.startsWith("image")
|
||||||
) {
|
) {
|
||||||
acc.push({ ...val, src: val.thumbnail });
|
acc.push({ ...val, src: val.thumbnail, fullsize: val.src });
|
||||||
}
|
}
|
||||||
return acc;
|
return acc;
|
||||||
}, [])
|
}, [])
|
||||||
|
|||||||
@@ -231,7 +231,14 @@ export function LaborAllocationsTable({
|
|||||||
{summary.adjustments.toFixed(1)}
|
{summary.adjustments.toFixed(1)}
|
||||||
</Table.Summary.Cell>
|
</Table.Summary.Cell>
|
||||||
<Table.Summary.Cell>
|
<Table.Summary.Cell>
|
||||||
{summary.difference.toFixed(1)}
|
<Typography.Text
|
||||||
|
style={{
|
||||||
|
fontWeight: "bold",
|
||||||
|
color: summary.difference >= 0 ? "green" : "red",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{summary.difference.toFixed(1)}
|
||||||
|
</Typography.Text>
|
||||||
</Table.Summary.Cell>
|
</Table.Summary.Cell>
|
||||||
</Table.Summary.Row>
|
</Table.Summary.Row>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ const OwnerSearchSelect = ({ value, onChange, onBlur, disabled }, ref) => {
|
|||||||
useLazyQuery(SEARCH_OWNERS_BY_ID_FOR_AUTOCOMPLETE);
|
useLazyQuery(SEARCH_OWNERS_BY_ID_FOR_AUTOCOMPLETE);
|
||||||
|
|
||||||
const executeSearch = (v) => {
|
const executeSearch = (v) => {
|
||||||
callSearch(v);
|
if (v && v.variables?.search !== "" && v.variables.search.length >= 2)
|
||||||
|
callSearch(v);
|
||||||
};
|
};
|
||||||
const debouncedExecuteSearch = _.debounce(executeSearch, 500);
|
const debouncedExecuteSearch = _.debounce(executeSearch, 500);
|
||||||
|
|
||||||
|
|||||||
@@ -106,7 +106,11 @@ export default function OwnersListComponent({
|
|||||||
<Input.Search
|
<Input.Search
|
||||||
placeholder={search.search || t("general.labels.search")}
|
placeholder={search.search || t("general.labels.search")}
|
||||||
onSearch={(value) => {
|
onSearch={(value) => {
|
||||||
search.search = value;
|
if (value?.length >= 3) {
|
||||||
|
search.search = value;
|
||||||
|
} else {
|
||||||
|
delete search.search;
|
||||||
|
}
|
||||||
history.push({ search: queryString.stringify(search) });
|
history.push({ search: queryString.stringify(search) });
|
||||||
}}
|
}}
|
||||||
enterButton
|
enterButton
|
||||||
|
|||||||
@@ -480,8 +480,8 @@ const r = ({ technician, state, activeStatuses, bodyshop }) => {
|
|||||||
state.sortedInfo.order,
|
state.sortedInfo.order,
|
||||||
sorter: (a, b) =>
|
sorter: (a, b) =>
|
||||||
alphaSort(
|
alphaSort(
|
||||||
bodyshop.employees.find((e) => e.id === a.employee_body)?.first_name,
|
bodyshop.employees?.find((e) => e.id === a.employee_body)?.first_name,
|
||||||
bodyshop.employees.find((e) => e.id === b.employee_body)?.first_name
|
bodyshop.employees?.find((e) => e.id === b.employee_body)?.first_name
|
||||||
),
|
),
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<ProductionListEmployeeAssignment
|
<ProductionListEmployeeAssignment
|
||||||
@@ -499,8 +499,8 @@ const r = ({ technician, state, activeStatuses, bodyshop }) => {
|
|||||||
state.sortedInfo.order,
|
state.sortedInfo.order,
|
||||||
sorter: (a, b) =>
|
sorter: (a, b) =>
|
||||||
alphaSort(
|
alphaSort(
|
||||||
bodyshop.employees.find((e) => e.id === a.employee_prep)?.first_name,
|
bodyshop.employees?.find((e) => e.id === a.employee_prep)?.first_name,
|
||||||
bodyshop.employees.find((e) => e.id === b.employee_prep)?.first_name
|
bodyshop.employees?.find((e) => e.id === b.employee_prep)?.first_name
|
||||||
),
|
),
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<ProductionListEmployeeAssignment
|
<ProductionListEmployeeAssignment
|
||||||
@@ -517,8 +517,8 @@ const r = ({ technician, state, activeStatuses, bodyshop }) => {
|
|||||||
state.sortedInfo.columnKey === "employee_csr" && state.sortedInfo.order,
|
state.sortedInfo.columnKey === "employee_csr" && state.sortedInfo.order,
|
||||||
sorter: (a, b) =>
|
sorter: (a, b) =>
|
||||||
alphaSort(
|
alphaSort(
|
||||||
bodyshop.employees.find((e) => e.id === a.employee_csr)?.first_name,
|
bodyshop.employees?.find((e) => e.id === a.employee_csr)?.first_name,
|
||||||
bodyshop.employees.find((e) => e.id === b.employee_csr)?.first_name
|
bodyshop.employees?.find((e) => e.id === b.employee_csr)?.first_name
|
||||||
),
|
),
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<ProductionListEmployeeAssignment record={record} type="employee_csr" />
|
<ProductionListEmployeeAssignment record={record} type="employee_csr" />
|
||||||
@@ -533,9 +533,9 @@ const r = ({ technician, state, activeStatuses, bodyshop }) => {
|
|||||||
state.sortedInfo.order,
|
state.sortedInfo.order,
|
||||||
sorter: (a, b) =>
|
sorter: (a, b) =>
|
||||||
alphaSort(
|
alphaSort(
|
||||||
bodyshop.employees.find((e) => e.id === a.employee_refinish)
|
bodyshop.employees?.find((e) => e.id === a.employee_refinish)
|
||||||
?.first_name,
|
?.first_name,
|
||||||
bodyshop.employees.find((e) => e.id === b.employee_refinish)
|
bodyshop.employees?.find((e) => e.id === b.employee_refinish)
|
||||||
?.first_name
|
?.first_name
|
||||||
),
|
),
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
|
|||||||
@@ -55,25 +55,27 @@ export function ProductionListPrint({ bodyshop }) {
|
|||||||
<Menu.SubMenu
|
<Menu.SubMenu
|
||||||
title={t("reportcenter.templates.production_by_technician_one")}
|
title={t("reportcenter.templates.production_by_technician_one")}
|
||||||
>
|
>
|
||||||
{bodyshop.employees.map((e) => (
|
{bodyshop.employees
|
||||||
<Menu.Item
|
.filter((e) => e.active)
|
||||||
key={e.id}
|
.map((e) => (
|
||||||
onClick={async () => {
|
<Menu.Item
|
||||||
setLoading(true);
|
key={e.id}
|
||||||
await GenerateDocument(
|
onClick={async () => {
|
||||||
{
|
setLoading(true);
|
||||||
name: production_by_technician_one.key,
|
await GenerateDocument(
|
||||||
variables: { id: e.id },
|
{
|
||||||
},
|
name: production_by_technician_one.key,
|
||||||
{},
|
variables: { id: e.id },
|
||||||
"p"
|
},
|
||||||
);
|
{},
|
||||||
setLoading(false);
|
"p"
|
||||||
}}
|
);
|
||||||
>
|
setLoading(false);
|
||||||
{e.first_name} {e.last_name}
|
}}
|
||||||
</Menu.Item>
|
>
|
||||||
))}
|
{e.first_name} {e.last_name}
|
||||||
|
</Menu.Item>
|
||||||
|
))}
|
||||||
</Menu.SubMenu>
|
</Menu.SubMenu>
|
||||||
<Menu.SubMenu
|
<Menu.SubMenu
|
||||||
title={t("reportcenter.templates.production_by_category_one")}
|
title={t("reportcenter.templates.production_by_category_one")}
|
||||||
|
|||||||
@@ -16,13 +16,12 @@ const VehicleSearchSelect = ({ value, onChange, onBlur, disabled }, ref) => {
|
|||||||
SEARCH_VEHICLES_FOR_AUTOCOMPLETE
|
SEARCH_VEHICLES_FOR_AUTOCOMPLETE
|
||||||
);
|
);
|
||||||
|
|
||||||
const [
|
const [callIdSearch, { loading: idLoading, error: idError, data: idData }] =
|
||||||
callIdSearch,
|
useLazyQuery(SEARCH_VEHICLES_BY_ID_FOR_AUTOCOMPLETE);
|
||||||
{ loading: idLoading, error: idError, data: idData },
|
|
||||||
] = useLazyQuery(SEARCH_VEHICLES_BY_ID_FOR_AUTOCOMPLETE);
|
|
||||||
|
|
||||||
const executeSearch = (v) => {
|
const executeSearch = (v) => {
|
||||||
callSearch(v);
|
if (v && v.variables?.search !== "" && v.variables.search.length >= 2)
|
||||||
|
callSearch(v);
|
||||||
};
|
};
|
||||||
const debouncedExecuteSearch = _.debounce(executeSearch, 500);
|
const debouncedExecuteSearch = _.debounce(executeSearch, 500);
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ export const INSERT_NEW_BILL = gql`
|
|||||||
insert_bills(objects: $bill) {
|
insert_bills(objects: $bill) {
|
||||||
returning {
|
returning {
|
||||||
id
|
id
|
||||||
|
invoice_number
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1298,7 +1298,7 @@ export const SEARCH_JOBS_FOR_AUTOCOMPLETE = gql`
|
|||||||
) {
|
) {
|
||||||
search_jobs(
|
search_jobs(
|
||||||
args: { search: $search }
|
args: { search: $search }
|
||||||
limit: 50
|
limit: 25
|
||||||
where: {
|
where: {
|
||||||
_and: {
|
_and: {
|
||||||
converted: { _eq: $isConverted }
|
converted: { _eq: $isConverted }
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export const SEARCH_OWNERS_FOR_AUTOCOMPLETE = gql`
|
|||||||
query SEARCH_OWNERS_FOR_AUTOCOMPLETE($search: String) {
|
query SEARCH_OWNERS_FOR_AUTOCOMPLETE($search: String) {
|
||||||
search_owners(
|
search_owners(
|
||||||
args: { search: $search }
|
args: { search: $search }
|
||||||
limit: 50
|
limit: 25
|
||||||
order_by: { ownr_ln: desc_nulls_last }
|
order_by: { ownr_ln: desc_nulls_last }
|
||||||
) {
|
) {
|
||||||
id
|
id
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ export const SEARCH_VEHICLES_BY_ID_FOR_AUTOCOMPLETE = gql`
|
|||||||
`;
|
`;
|
||||||
export const SEARCH_VEHICLES_FOR_AUTOCOMPLETE = gql`
|
export const SEARCH_VEHICLES_FOR_AUTOCOMPLETE = gql`
|
||||||
query SEARCH_VEHICLES_FOR_AUTOCOMPLETE($search: String) {
|
query SEARCH_VEHICLES_FOR_AUTOCOMPLETE($search: String) {
|
||||||
search_vehicles(args: { search: $search }, limit: 50) {
|
search_vehicles(args: { search: $search }, limit: 25) {
|
||||||
id
|
id
|
||||||
v_vin
|
v_vin
|
||||||
v_model_yr
|
v_model_yr
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ const INITIAL_STATE = {
|
|||||||
isSending: false,
|
isSending: false,
|
||||||
error: null,
|
error: null,
|
||||||
message: null,
|
message: null,
|
||||||
|
searchingForConversation: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
const messagingReducer = (state = INITIAL_STATE, action) => {
|
const messagingReducer = (state = INITIAL_STATE, action) => {
|
||||||
@@ -17,10 +18,16 @@ const messagingReducer = (state = INITIAL_STATE, action) => {
|
|||||||
...state,
|
...state,
|
||||||
visible: !state.visible,
|
visible: !state.visible,
|
||||||
};
|
};
|
||||||
|
case MessagingActionTypes.OPEN_CHAT_BY_PHONE:
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
searchingForConversation: true,
|
||||||
|
};
|
||||||
case MessagingActionTypes.SET_SELECTED_CONVERSATION:
|
case MessagingActionTypes.SET_SELECTED_CONVERSATION:
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
visible: true,
|
visible: true,
|
||||||
|
searchingForConversation: false,
|
||||||
selectedConversationId: action.payload,
|
selectedConversationId: action.payload,
|
||||||
};
|
};
|
||||||
case MessagingActionTypes.SEND_MESSAGE:
|
case MessagingActionTypes.SEND_MESSAGE:
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { all, call, put, select, takeLatest } from "redux-saga/effects";
|
|||||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||||
import {
|
import {
|
||||||
CONVERSATION_ID_BY_PHONE,
|
CONVERSATION_ID_BY_PHONE,
|
||||||
CREATE_CONVERSATION
|
CREATE_CONVERSATION,
|
||||||
} from "../../graphql/conversations.queries";
|
} from "../../graphql/conversations.queries";
|
||||||
import { INSERT_CONVERSATION_TAG } from "../../graphql/job-conversations.queries";
|
import { INSERT_CONVERSATION_TAG } from "../../graphql/job-conversations.queries";
|
||||||
import client from "../../utils/GraphQLClient";
|
import client from "../../utils/GraphQLClient";
|
||||||
@@ -12,7 +12,7 @@ import { selectBodyshop } from "../user/user.selectors";
|
|||||||
import {
|
import {
|
||||||
sendMessageFailure,
|
sendMessageFailure,
|
||||||
sendMessageSuccess,
|
sendMessageSuccess,
|
||||||
setSelectedConversation
|
setSelectedConversation,
|
||||||
} from "./messaging.actions";
|
} from "./messaging.actions";
|
||||||
import MessagingActionTypes from "./messaging.types";
|
import MessagingActionTypes from "./messaging.types";
|
||||||
|
|
||||||
@@ -79,6 +79,7 @@ export function* openChatByPhone({ payload }) {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
console.log("ERROR: Multiple conversations found. ");
|
console.log("ERROR: Multiple conversations found. ");
|
||||||
|
yield put(setSelectedConversation(null));
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("Error in sendMessage saga.", error);
|
console.log("Error in sendMessage saga.", error);
|
||||||
|
|||||||
@@ -26,3 +26,8 @@ export const selectMessage = createSelector(
|
|||||||
[selectMessaging],
|
[selectMessaging],
|
||||||
(messaging) => messaging.message
|
(messaging) => messaging.message
|
||||||
);
|
);
|
||||||
|
|
||||||
|
export const searchingForConversation = createSelector(
|
||||||
|
[selectMessaging],
|
||||||
|
(messaging) => messaging.searchingForConversation
|
||||||
|
);
|
||||||
|
|||||||
@@ -2660,18 +2660,22 @@
|
|||||||
"gsr_labor_only": "Gross Sales - Labor Only",
|
"gsr_labor_only": "Gross Sales - Labor Only",
|
||||||
"hours_sold_detail_closed": "Hours Sold Detail - Closed",
|
"hours_sold_detail_closed": "Hours Sold Detail - Closed",
|
||||||
"hours_sold_detail_closed_csr": "Hours Sold Detail - Closed by CSR",
|
"hours_sold_detail_closed_csr": "Hours Sold Detail - Closed by CSR",
|
||||||
|
"hours_sold_detail_closed_estimator": "Hours Sold Detail - Closed by Estimator",
|
||||||
"hours_sold_detail_closed_ins_co": "Hours Sold Detail - Closed by Source",
|
"hours_sold_detail_closed_ins_co": "Hours Sold Detail - Closed by Source",
|
||||||
"hours_sold_detail_closed_status": "Hours Sold Detail - Closed by Status",
|
"hours_sold_detail_closed_status": "Hours Sold Detail - Closed by Status",
|
||||||
"hours_sold_detail_open": "Hours Sold Detail - Open",
|
"hours_sold_detail_open": "Hours Sold Detail - Open",
|
||||||
"hours_sold_detail_open_csr": "Hours Sold Detail - Open by CSR",
|
"hours_sold_detail_open_csr": "Hours Sold Detail - Open by CSR",
|
||||||
|
"hours_sold_detail_open_estimator": "Hours Sold Detail - Open by Estimator",
|
||||||
"hours_sold_detail_open_ins_co": "Hours Sold Detail - Open by Source",
|
"hours_sold_detail_open_ins_co": "Hours Sold Detail - Open by Source",
|
||||||
"hours_sold_detail_open_status": "Hours Sold Detail - Open by Status",
|
"hours_sold_detail_open_status": "Hours Sold Detail - Open by Status",
|
||||||
"hours_sold_summary_closed": "Hours Sold Summary - Closed",
|
"hours_sold_summary_closed": "Hours Sold Summary - Closed",
|
||||||
"hours_sold_summary_closed_csr": "Hours Sold Summary - Closed by CSR",
|
"hours_sold_summary_closed_csr": "Hours Sold Summary - Closed by CSR",
|
||||||
|
"hours_sold_summary_closed_estimator": "Hours Sold Summary - Closed by Estimator",
|
||||||
"hours_sold_summary_closed_ins_co": "Hours Sold Summary - Closed by Source",
|
"hours_sold_summary_closed_ins_co": "Hours Sold Summary - Closed by Source",
|
||||||
"hours_sold_summary_closed_status": "Hours Sold Summary - Closed by Status",
|
"hours_sold_summary_closed_status": "Hours Sold Summary - Closed by Status",
|
||||||
"hours_sold_summary_open": "Hours Sold Summary - Open",
|
"hours_sold_summary_open": "Hours Sold Summary - Open",
|
||||||
"hours_sold_summary_open_csr": "Hours Sold Summary - Open CSR",
|
"hours_sold_summary_open_csr": "Hours Sold Summary - Open CSR",
|
||||||
|
"hours_sold_summary_open_estimator": "Hours Sold Summary - Open Estimator",
|
||||||
"hours_sold_summary_open_ins_co": "Hours Sold Summary - Open by Source",
|
"hours_sold_summary_open_ins_co": "Hours Sold Summary - Open by Source",
|
||||||
"hours_sold_summary_open_status": "Hours Sold Summary - Open by Status",
|
"hours_sold_summary_open_status": "Hours Sold Summary - Open by Status",
|
||||||
"job_costing_ro_csr": "Job Costing by CSR",
|
"job_costing_ro_csr": "Job Costing by CSR",
|
||||||
|
|||||||
@@ -2660,18 +2660,22 @@
|
|||||||
"gsr_labor_only": "",
|
"gsr_labor_only": "",
|
||||||
"hours_sold_detail_closed": "",
|
"hours_sold_detail_closed": "",
|
||||||
"hours_sold_detail_closed_csr": "",
|
"hours_sold_detail_closed_csr": "",
|
||||||
|
"hours_sold_detail_closed_estimator": "",
|
||||||
"hours_sold_detail_closed_ins_co": "",
|
"hours_sold_detail_closed_ins_co": "",
|
||||||
"hours_sold_detail_closed_status": "",
|
"hours_sold_detail_closed_status": "",
|
||||||
"hours_sold_detail_open": "",
|
"hours_sold_detail_open": "",
|
||||||
"hours_sold_detail_open_csr": "",
|
"hours_sold_detail_open_csr": "",
|
||||||
|
"hours_sold_detail_open_estimator": "",
|
||||||
"hours_sold_detail_open_ins_co": "",
|
"hours_sold_detail_open_ins_co": "",
|
||||||
"hours_sold_detail_open_status": "",
|
"hours_sold_detail_open_status": "",
|
||||||
"hours_sold_summary_closed": "",
|
"hours_sold_summary_closed": "",
|
||||||
"hours_sold_summary_closed_csr": "",
|
"hours_sold_summary_closed_csr": "",
|
||||||
|
"hours_sold_summary_closed_estimator": "",
|
||||||
"hours_sold_summary_closed_ins_co": "",
|
"hours_sold_summary_closed_ins_co": "",
|
||||||
"hours_sold_summary_closed_status": "",
|
"hours_sold_summary_closed_status": "",
|
||||||
"hours_sold_summary_open": "",
|
"hours_sold_summary_open": "",
|
||||||
"hours_sold_summary_open_csr": "",
|
"hours_sold_summary_open_csr": "",
|
||||||
|
"hours_sold_summary_open_estimator": "",
|
||||||
"hours_sold_summary_open_ins_co": "",
|
"hours_sold_summary_open_ins_co": "",
|
||||||
"hours_sold_summary_open_status": "",
|
"hours_sold_summary_open_status": "",
|
||||||
"job_costing_ro_csr": "",
|
"job_costing_ro_csr": "",
|
||||||
|
|||||||
@@ -2660,18 +2660,22 @@
|
|||||||
"gsr_labor_only": "",
|
"gsr_labor_only": "",
|
||||||
"hours_sold_detail_closed": "",
|
"hours_sold_detail_closed": "",
|
||||||
"hours_sold_detail_closed_csr": "",
|
"hours_sold_detail_closed_csr": "",
|
||||||
|
"hours_sold_detail_closed_estimator": "",
|
||||||
"hours_sold_detail_closed_ins_co": "",
|
"hours_sold_detail_closed_ins_co": "",
|
||||||
"hours_sold_detail_closed_status": "",
|
"hours_sold_detail_closed_status": "",
|
||||||
"hours_sold_detail_open": "",
|
"hours_sold_detail_open": "",
|
||||||
"hours_sold_detail_open_csr": "",
|
"hours_sold_detail_open_csr": "",
|
||||||
|
"hours_sold_detail_open_estimator": "",
|
||||||
"hours_sold_detail_open_ins_co": "",
|
"hours_sold_detail_open_ins_co": "",
|
||||||
"hours_sold_detail_open_status": "",
|
"hours_sold_detail_open_status": "",
|
||||||
"hours_sold_summary_closed": "",
|
"hours_sold_summary_closed": "",
|
||||||
"hours_sold_summary_closed_csr": "",
|
"hours_sold_summary_closed_csr": "",
|
||||||
|
"hours_sold_summary_closed_estimator": "",
|
||||||
"hours_sold_summary_closed_ins_co": "",
|
"hours_sold_summary_closed_ins_co": "",
|
||||||
"hours_sold_summary_closed_status": "",
|
"hours_sold_summary_closed_status": "",
|
||||||
"hours_sold_summary_open": "",
|
"hours_sold_summary_open": "",
|
||||||
"hours_sold_summary_open_csr": "",
|
"hours_sold_summary_open_csr": "",
|
||||||
|
"hours_sold_summary_open_estimator": "",
|
||||||
"hours_sold_summary_open_ins_co": "",
|
"hours_sold_summary_open_ins_co": "",
|
||||||
"hours_sold_summary_open_status": "",
|
"hours_sold_summary_open_status": "",
|
||||||
"job_costing_ro_csr": "",
|
"job_costing_ro_csr": "",
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
import { gql } from "@apollo/client";
|
import { gql } from "@apollo/client";
|
||||||
import { notification } from "antd";
|
|
||||||
import jsreport from "@jsreport/browser-client";
|
import jsreport from "@jsreport/browser-client";
|
||||||
|
import { notification } from "antd";
|
||||||
|
import axios from "axios";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import moment from "moment";
|
|
||||||
import { auth } from "../firebase/firebase.utils";
|
import { auth } from "../firebase/firebase.utils";
|
||||||
import { setEmailOptions } from "../redux/email/email.actions";
|
import { setEmailOptions } from "../redux/email/email.actions";
|
||||||
import { store } from "../redux/store";
|
import { store } from "../redux/store";
|
||||||
import client from "../utils/GraphQLClient";
|
import client from "../utils/GraphQLClient";
|
||||||
import { TemplateList } from "./TemplateConstants";
|
|
||||||
import cleanAxios from "./CleanAxios";
|
import cleanAxios from "./CleanAxios";
|
||||||
import axios from "axios";
|
import { TemplateList } from "./TemplateConstants";
|
||||||
const server = process.env.REACT_APP_REPORTS_SERVER_URL;
|
const server = process.env.REACT_APP_REPORTS_SERVER_URL;
|
||||||
|
|
||||||
jsreport.serverUrl = server;
|
jsreport.serverUrl = server;
|
||||||
@@ -255,7 +254,7 @@ export async function RenderTemplates(
|
|||||||
headerpath: `/${bodyshop.imexshopid}/header.html`,
|
headerpath: `/${bodyshop.imexshopid}/header.html`,
|
||||||
footerpath: `/${bodyshop.imexshopid}/footer.html`,
|
footerpath: `/${bodyshop.imexshopid}/footer.html`,
|
||||||
bodyshop: bodyshop,
|
bodyshop: bodyshop,
|
||||||
offset: moment().utcOffset(),
|
offset: bodyshop.timezone,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -907,6 +907,74 @@ export const TemplateList = (type, context) => {
|
|||||||
},
|
},
|
||||||
group: "sales",
|
group: "sales",
|
||||||
},
|
},
|
||||||
|
hours_sold_detail_closed_estimator: {
|
||||||
|
title: i18n.t(
|
||||||
|
"reportcenter.templates.hours_sold_detail_closed_estimator"
|
||||||
|
),
|
||||||
|
description: "",
|
||||||
|
subject: i18n.t(
|
||||||
|
"reportcenter.templates.hours_sold_detail_closed_estimator"
|
||||||
|
),
|
||||||
|
key: "hours_sold_detail_closed_estimator",
|
||||||
|
//idtype: "vendor",
|
||||||
|
disabled: false,
|
||||||
|
rangeFilter: {
|
||||||
|
object: i18n.t("reportcenter.labels.objects.jobs"),
|
||||||
|
field: i18n.t("jobs.fields.date_invoiced"),
|
||||||
|
},
|
||||||
|
group: "sales",
|
||||||
|
},
|
||||||
|
hours_sold_detail_open_estimator: {
|
||||||
|
title: i18n.t(
|
||||||
|
"reportcenter.templates.hours_sold_detail_open_estimator"
|
||||||
|
),
|
||||||
|
description: "",
|
||||||
|
subject: i18n.t(
|
||||||
|
"reportcenter.templates.hours_sold_detail_open_estimator"
|
||||||
|
),
|
||||||
|
key: "hours_sold_detail_open_estimator",
|
||||||
|
//idtype: "vendor",
|
||||||
|
disabled: false,
|
||||||
|
rangeFilter: {
|
||||||
|
object: i18n.t("reportcenter.labels.objects.jobs"),
|
||||||
|
field: i18n.t("jobs.fields.date_open"),
|
||||||
|
},
|
||||||
|
group: "sales",
|
||||||
|
},
|
||||||
|
hours_sold_summary_closed_estimator: {
|
||||||
|
title: i18n.t(
|
||||||
|
"reportcenter.templates.hours_sold_summary_closed_estimator"
|
||||||
|
),
|
||||||
|
description: "",
|
||||||
|
subject: i18n.t(
|
||||||
|
"reportcenter.templates.hours_sold_summary_closed_estimator"
|
||||||
|
),
|
||||||
|
key: "hours_sold_summary_closed_estimator",
|
||||||
|
//idtype: "vendor",
|
||||||
|
disabled: false,
|
||||||
|
rangeFilter: {
|
||||||
|
object: i18n.t("reportcenter.labels.objects.jobs"),
|
||||||
|
field: i18n.t("jobs.fields.date_invoiced"),
|
||||||
|
},
|
||||||
|
group: "sales",
|
||||||
|
},
|
||||||
|
hours_sold_summary_open_estimator: {
|
||||||
|
title: i18n.t(
|
||||||
|
"reportcenter.templates.hours_sold_summary_open_estimator"
|
||||||
|
),
|
||||||
|
description: "",
|
||||||
|
subject: i18n.t(
|
||||||
|
"reportcenter.templates.hours_sold_summary_open_estimator"
|
||||||
|
),
|
||||||
|
key: "hours_sold_summary_open_estimator",
|
||||||
|
//idtype: "vendor",
|
||||||
|
disabled: false,
|
||||||
|
rangeFilter: {
|
||||||
|
object: i18n.t("reportcenter.labels.objects.jobs"),
|
||||||
|
field: i18n.t("jobs.fields.date_invoiced"),
|
||||||
|
},
|
||||||
|
group: "sales",
|
||||||
|
},
|
||||||
hours_sold_summary_open_status: {
|
hours_sold_summary_open_status: {
|
||||||
title: i18n.t(
|
title: i18n.t(
|
||||||
"reportcenter.templates.hours_sold_summary_open_status"
|
"reportcenter.templates.hours_sold_summary_open_status"
|
||||||
|
|||||||
@@ -4076,12 +4076,7 @@
|
|||||||
event_triggers:
|
event_triggers:
|
||||||
- name: job_status_transition
|
- name: job_status_transition
|
||||||
definition:
|
definition:
|
||||||
enable_manual: false
|
enable_manual: true
|
||||||
insert:
|
|
||||||
columns: '*'
|
|
||||||
update:
|
|
||||||
columns:
|
|
||||||
- status
|
|
||||||
retry_conf:
|
retry_conf:
|
||||||
interval_sec: 10
|
interval_sec: 10
|
||||||
num_retries: 0
|
num_retries: 0
|
||||||
@@ -4097,23 +4092,7 @@
|
|||||||
version: 2
|
version: 2
|
||||||
- name: jobs_arms
|
- name: jobs_arms
|
||||||
definition:
|
definition:
|
||||||
enable_manual: false
|
enable_manual: true
|
||||||
update:
|
|
||||||
columns:
|
|
||||||
- actual_delivery
|
|
||||||
- scheduled_delivery
|
|
||||||
- scheduled_completion
|
|
||||||
- actual_completion
|
|
||||||
- date_scheduled
|
|
||||||
- inproduction
|
|
||||||
- clm_total
|
|
||||||
- suspended
|
|
||||||
- job_totals
|
|
||||||
- converted
|
|
||||||
- employee_body
|
|
||||||
- ro_number
|
|
||||||
- actual_in
|
|
||||||
- scheduled_in
|
|
||||||
retry_conf:
|
retry_conf:
|
||||||
interval_sec: 10
|
interval_sec: 10
|
||||||
num_retries: 0
|
num_retries: 0
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ exports.default = async (req, res) => {
|
|||||||
start: start
|
start: start
|
||||||
? moment(start).startOf("day")
|
? moment(start).startOf("day")
|
||||||
: moment().subtract(5, "days").startOf("day"),
|
: moment().subtract(5, "days").startOf("day"),
|
||||||
...(end && { end: moment(end).startOf("day") }),
|
...(end && { end: moment(end).endOf("day") }),
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -62,22 +62,24 @@ exports.default = async (req, res) => {
|
|||||||
start: start
|
start: start
|
||||||
? moment(start).startOf("day")
|
? moment(start).startOf("day")
|
||||||
: moment().subtract(5, "days").startOf("day"),
|
: moment().subtract(5, "days").startOf("day"),
|
||||||
...(end && { end: moment(end).startOf("day") }),
|
...(end && { end: moment(end).endOf("day") }),
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
const claimsCorpObject = {
|
const claimsCorpObject = {
|
||||||
ClaimsCorpExport: {
|
DataFeed: {
|
||||||
ShopID: bodyshops_by_pk.claimscorpid,
|
ShopInfo: {
|
||||||
ShopName: bodyshops_by_pk.shopname,
|
ShopID: bodyshops_by_pk.claimscorpid,
|
||||||
RO: jobs.map((j) =>
|
ShopName: bodyshops_by_pk.shopname,
|
||||||
CreateRepairOrderTag(
|
RO: jobs.map((j) =>
|
||||||
{ ...j, bodyshop: bodyshops_by_pk },
|
CreateRepairOrderTag(
|
||||||
function ({ job, error }) {
|
{ ...j, bodyshop: bodyshops_by_pk },
|
||||||
erroredJobs.push({ job: job, error: error.toString() });
|
function ({ job, error }) {
|
||||||
}
|
erroredJobs.push({ job: job, error: error.toString() });
|
||||||
)
|
}
|
||||||
),
|
)
|
||||||
|
),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -100,7 +102,7 @@ exports.default = async (req, res) => {
|
|||||||
.end({ allowEmptyTags: true });
|
.end({ allowEmptyTags: true });
|
||||||
|
|
||||||
allxmlsToUpload.push({
|
allxmlsToUpload.push({
|
||||||
count: claimsCorpObject.ClaimsCorpExport.RO.length,
|
count: claimsCorpObject.DataFeed.ShopInfo.RO.length,
|
||||||
xml: ret,
|
xml: ret,
|
||||||
filename: `${bodyshop.claimscorpid}-MIS-${moment().format(
|
filename: `${bodyshop.claimscorpid}-MIS-${moment().format(
|
||||||
"YYYYMMDDTHHMMss"
|
"YYYYMMDDTHHMMss"
|
||||||
@@ -261,8 +263,8 @@ const CreateRepairOrderTag = (job, errorCallback) => {
|
|||||||
VIN: job.v_vin || "",
|
VIN: job.v_vin || "",
|
||||||
},
|
},
|
||||||
Carrier: {
|
Carrier: {
|
||||||
InsuranceCo: job.ins_co_nm || "",
|
UniqueID: job.ins_co_nm || "",
|
||||||
CompanyName: job.ins_co_nm || "",
|
InsuranceCompany: job.ins_co_nm || "",
|
||||||
},
|
},
|
||||||
Claim: job.clm_no || "",
|
Claim: job.clm_no || "",
|
||||||
Contacts: {
|
Contacts: {
|
||||||
@@ -279,7 +281,7 @@ const CreateRepairOrderTag = (job, errorCallback) => {
|
|||||||
: "",
|
: "",
|
||||||
Phone1: "",
|
Phone1: "",
|
||||||
Phone2: "",
|
Phone2: "",
|
||||||
EstimatorName: `${job.est_ct_ln ? job.est_ct_ln : ""}${
|
Estimator: `${job.est_ct_ln ? job.est_ct_ln : ""}${
|
||||||
job.est_ct_ln ? ", " : ""
|
job.est_ct_ln ? ", " : ""
|
||||||
}${job.est_ct_fn ? job.est_ct_fn : ""}`,
|
}${job.est_ct_fn ? job.est_ct_fn : ""}`,
|
||||||
BodyTechnician: job.employee_body_rel
|
BodyTechnician: job.employee_body_rel
|
||||||
@@ -337,7 +339,7 @@ const CreateRepairOrderTag = (job, errorCallback) => {
|
|||||||
.tz(job.bodyshop.timezone)
|
.tz(job.bodyshop.timezone)
|
||||||
.format(AhDateFormat)) ||
|
.format(AhDateFormat)) ||
|
||||||
"",
|
"",
|
||||||
StartDate: job.date_repairstarted
|
DateStart: job.date_repairstarted
|
||||||
? (job.date_repairstarted &&
|
? (job.date_repairstarted &&
|
||||||
moment(job.date_repairstarted)
|
moment(job.date_repairstarted)
|
||||||
.tz(job.bodyshop.timezone)
|
.tz(job.bodyshop.timezone)
|
||||||
@@ -392,9 +394,7 @@ const CreateRepairOrderTag = (job, errorCallback) => {
|
|||||||
.add(Dinero(job.job_totals.rates.lad.total))
|
.add(Dinero(job.job_totals.rates.lad.total))
|
||||||
.add(Dinero(job.job_totals.rates.las.total))
|
.add(Dinero(job.job_totals.rates.las.total))
|
||||||
.toFormat(CCDineroFormat),
|
.toFormat(CCDineroFormat),
|
||||||
Refinish: Dinero(job.job_totals.rates.lar.total).toFormat(
|
Paint: Dinero(job.job_totals.rates.lar.total).toFormat(CCDineroFormat),
|
||||||
CCDineroFormat
|
|
||||||
),
|
|
||||||
Prep: Dinero().toFormat(CCDineroFormat),
|
Prep: Dinero().toFormat(CCDineroFormat),
|
||||||
Frame: Dinero(job.job_totals.rates.laf.total).toFormat(CCDineroFormat),
|
Frame: Dinero(job.job_totals.rates.laf.total).toFormat(CCDineroFormat),
|
||||||
Mechanical: Dinero(job.job_totals.rates.lam.total).toFormat(
|
Mechanical: Dinero(job.job_totals.rates.lam.total).toFormat(
|
||||||
@@ -446,6 +446,7 @@ const CreateRepairOrderTag = (job, errorCallback) => {
|
|||||||
Towing: Dinero(job.job_totals.additional.towing).toFormat(
|
Towing: Dinero(job.job_totals.additional.towing).toFormat(
|
||||||
CCDineroFormat
|
CCDineroFormat
|
||||||
),
|
),
|
||||||
|
Storage: "0.00",
|
||||||
Rental:
|
Rental:
|
||||||
job.job_totals.additional.additionalCostItems.includes(
|
job.job_totals.additional.additionalCostItems.includes(
|
||||||
"ATS Amount"
|
"ATS Amount"
|
||||||
@@ -486,11 +487,11 @@ const CreateRepairOrderTag = (job, errorCallback) => {
|
|||||||
.toFixed(2),
|
.toFixed(2),
|
||||||
Paint: job.job_totals.rates.lar.hours.toFixed(2),
|
Paint: job.job_totals.rates.lar.hours.toFixed(2),
|
||||||
Prep: "0.00",
|
Prep: "0.00",
|
||||||
FrameHours: job.job_totals.rates.laf.hours.toFixed(2),
|
Frame: job.job_totals.rates.laf.hours.toFixed(2),
|
||||||
MechanicalHours: job.job_totals.rates.lam.hours.toFixed(2),
|
Mech: job.job_totals.rates.lam.hours.toFixed(2),
|
||||||
GlassHours: job.job_totals.rates.lag.hours.toFixed(2),
|
Glass: job.job_totals.rates.lag.hours.toFixed(2),
|
||||||
ElectricalHours: job.job_totals.rates.lae.hours.toFixed(2),
|
Elec: job.job_totals.rates.lae.hours.toFixed(2),
|
||||||
DetailHours: detailAdjustments.hours,
|
Detail: detailAdjustments.hours,
|
||||||
Reassem: "0.00",
|
Reassem: "0.00",
|
||||||
Other: (
|
Other: (
|
||||||
job.job_totals.rates.la1.hours +
|
job.job_totals.rates.la1.hours +
|
||||||
|
|||||||
@@ -1,16 +1,12 @@
|
|||||||
exports.FIND_BODYSHOP_BY_MESSAGING_SERVICE_SID = `
|
exports.FIND_BODYSHOP_BY_MESSAGING_SERVICE_SID = `
|
||||||
query FIND_BODYSHOP_BY_MESSAGING_SERVICE_SID(
|
query FIND_BODYSHOP_BY_MESSAGING_SERVICE_SID($mssid: String!, $phone: String!) {
|
||||||
$mssid: String!
|
|
||||||
$phone: String!
|
|
||||||
) {
|
|
||||||
bodyshops(where: { messagingservicesid: { _eq: $mssid } }) {
|
bodyshops(where: { messagingservicesid: { _eq: $mssid } }) {
|
||||||
id
|
id
|
||||||
conversations(where: { phone_num: { _eq: $phone } }) {
|
conversations(where: { phone_num: { _eq: $phone } }) {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.GET_JOB_BY_RO_NUMBER = `
|
exports.GET_JOB_BY_RO_NUMBER = `
|
||||||
query GET_JOB_BY_RO_NUMBER($ro_number: String!) {
|
query GET_JOB_BY_RO_NUMBER($ro_number: String!) {
|
||||||
@@ -20,8 +16,7 @@ exports.GET_JOB_BY_RO_NUMBER = `
|
|||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.INSERT_NEW_PAYMENT = `
|
exports.INSERT_NEW_PAYMENT = `
|
||||||
mutation INSERT_NEW_PAYMENT($paymentInput: [payments_insert_input!]!) {
|
mutation INSERT_NEW_PAYMENT($paymentInput: [payments_insert_input!]!) {
|
||||||
@@ -30,28 +25,23 @@ exports.INSERT_NEW_PAYMENT = `
|
|||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.INSERT_PAYMENT_RESPONSE = `
|
exports.INSERT_PAYMENT_RESPONSE = `
|
||||||
mutation INSERT_PAYMENT_RESPONSE(
|
mutation INSERT_PAYMENT_RESPONSE($paymentResponse: [payment_response_insert_input!]!) {
|
||||||
$paymentResponse: [payment_response_insert_input!]!
|
|
||||||
) {
|
|
||||||
insert_payment_response(objects: $paymentResponse) {
|
insert_payment_response(objects: $paymentResponse) {
|
||||||
returning {
|
returning {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.UNARCHIVE_CONVERSATION = `
|
exports.UNARCHIVE_CONVERSATION = `
|
||||||
mutation UNARCHIVE_CONVERSATION($id: uuid!) {
|
mutation UNARCHIVE_CONVERSATION($id: uuid!) {
|
||||||
update_conversations_by_pk(pk_columns: {id: $id}, _set: {archived: false}) {
|
update_conversations_by_pk(pk_columns: {id: $id}, _set: {archived: false}) {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.INSERT_NEW_JOB_LINE = `
|
exports.INSERT_NEW_JOB_LINE = `
|
||||||
mutation INSERT_NEW_JOB_LINE($lineInput: [joblines_insert_input!]!) {
|
mutation INSERT_NEW_JOB_LINE($lineInput: [joblines_insert_input!]!) {
|
||||||
@@ -60,8 +50,7 @@ exports.INSERT_NEW_JOB_LINE = `
|
|||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.UPDATE_JOB_LINE = `
|
exports.UPDATE_JOB_LINE = `
|
||||||
mutation UPDATE_JOB_LINE($lineId: uuid!, $line: joblines_set_input!) {
|
mutation UPDATE_JOB_LINE($lineId: uuid!, $line: joblines_set_input!) {
|
||||||
@@ -82,8 +71,7 @@ exports.UPDATE_JOB_LINE = `
|
|||||||
removed
|
removed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.RECEIVE_MESSAGE = `
|
exports.RECEIVE_MESSAGE = `
|
||||||
mutation RECEIVE_MESSAGE($msg: [messages_insert_input!]!) {
|
mutation RECEIVE_MESSAGE($msg: [messages_insert_input!]!) {
|
||||||
@@ -92,7 +80,7 @@ mutation RECEIVE_MESSAGE($msg: [messages_insert_input!]!) {
|
|||||||
conversation {
|
conversation {
|
||||||
id
|
id
|
||||||
archived
|
archived
|
||||||
bodyshop{
|
bodyshop {
|
||||||
imexshopid
|
imexshopid
|
||||||
}
|
}
|
||||||
created_at
|
created_at
|
||||||
@@ -114,10 +102,7 @@ mutation RECEIVE_MESSAGE($msg: [messages_insert_input!]!) {
|
|||||||
userid
|
userid
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
|
|
||||||
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports.INSERT_MESSAGE = `
|
exports.INSERT_MESSAGE = `
|
||||||
mutation INSERT_MESSAGE($msg: [messages_insert_input!]!, $conversationid: uuid!) {
|
mutation INSERT_MESSAGE($msg: [messages_insert_input!]!, $conversationid: uuid!) {
|
||||||
@@ -130,7 +115,7 @@ mutation INSERT_MESSAGE($msg: [messages_insert_input!]!, $conversationid: uuid!)
|
|||||||
conversation {
|
conversation {
|
||||||
id
|
id
|
||||||
archived
|
archived
|
||||||
bodyshop{
|
bodyshop {
|
||||||
imexshopid
|
imexshopid
|
||||||
}
|
}
|
||||||
created_at
|
created_at
|
||||||
@@ -152,10 +137,7 @@ mutation INSERT_MESSAGE($msg: [messages_insert_input!]!, $conversationid: uuid!)
|
|||||||
userid
|
userid
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
|
|
||||||
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports.UPDATE_MESSAGE_STATUS = `
|
exports.UPDATE_MESSAGE_STATUS = `
|
||||||
mutation UPDATE_MESSAGE($msid: String!, $fields: messages_set_input!) {
|
mutation UPDATE_MESSAGE($msid: String!, $fields: messages_set_input!) {
|
||||||
@@ -164,8 +146,7 @@ mutation UPDATE_MESSAGE($msid: String!, $fields: messages_set_input!) {
|
|||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.QUERY_JOBS_FOR_RECEIVABLES_EXPORT = `
|
exports.QUERY_JOBS_FOR_RECEIVABLES_EXPORT = `
|
||||||
query QUERY_JOBS_FOR_RECEIVABLES_EXPORT($ids: [uuid!]!) {
|
query QUERY_JOBS_FOR_RECEIVABLES_EXPORT($ids: [uuid!]!) {
|
||||||
@@ -230,7 +211,7 @@ query QUERY_JOBS_FOR_RECEIVABLES_EXPORT($ids: [uuid!]!) {
|
|||||||
owner {
|
owner {
|
||||||
accountingid
|
accountingid
|
||||||
}
|
}
|
||||||
joblines(where:{removed: {_eq:false}}) {
|
joblines(where:{removed: {_eq:false}}) {
|
||||||
id
|
id
|
||||||
line_desc
|
line_desc
|
||||||
part_type
|
part_type
|
||||||
@@ -260,8 +241,7 @@ query QUERY_JOBS_FOR_RECEIVABLES_EXPORT($ids: [uuid!]!) {
|
|||||||
timezone
|
timezone
|
||||||
md_ro_statuses
|
md_ro_statuses
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.QUERY_JOBS_FOR_CDK_EXPORT = `
|
exports.QUERY_JOBS_FOR_CDK_EXPORT = `
|
||||||
query QUERY_JOBS_FOR_CDK_EXPORT($id: uuid!) {
|
query QUERY_JOBS_FOR_CDK_EXPORT($id: uuid!) {
|
||||||
@@ -321,19 +301,19 @@ query QUERY_JOBS_FOR_CDK_EXPORT($id: uuid!) {
|
|||||||
v_make_desc
|
v_make_desc
|
||||||
v_color
|
v_color
|
||||||
ca_customer_gst
|
ca_customer_gst
|
||||||
bodyshop {
|
bodyshop {
|
||||||
id
|
id
|
||||||
md_ro_statuses
|
md_ro_statuses
|
||||||
md_responsibility_centers
|
md_responsibility_centers
|
||||||
accountingconfig
|
accountingconfig
|
||||||
cdk_dealerid
|
cdk_dealerid
|
||||||
cdk_configuration
|
cdk_configuration
|
||||||
timezone
|
timezone
|
||||||
}
|
}
|
||||||
owner {
|
owner {
|
||||||
accountingid
|
accountingid
|
||||||
}
|
}
|
||||||
joblines(where:{removed: {_eq:false}}) {
|
joblines(where:{removed: {_eq:false}}) {
|
||||||
id
|
id
|
||||||
line_desc
|
line_desc
|
||||||
part_type
|
part_type
|
||||||
@@ -348,9 +328,7 @@ query QUERY_JOBS_FOR_CDK_EXPORT($id: uuid!) {
|
|||||||
prt_dsmk_p
|
prt_dsmk_p
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}`;
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports.QUERY_JOBS_FOR_PBS_EXPORT = `
|
exports.QUERY_JOBS_FOR_PBS_EXPORT = `
|
||||||
query QUERY_JOBS_FOR_PBS_EXPORT($id: uuid!) {
|
query QUERY_JOBS_FOR_PBS_EXPORT($id: uuid!) {
|
||||||
@@ -413,24 +391,24 @@ query QUERY_JOBS_FOR_PBS_EXPORT($id: uuid!) {
|
|||||||
v_make_desc
|
v_make_desc
|
||||||
v_color
|
v_color
|
||||||
ca_customer_gst
|
ca_customer_gst
|
||||||
vehicle{
|
vehicle {
|
||||||
v_trimcode
|
v_trimcode
|
||||||
v_makecode
|
v_makecode
|
||||||
}
|
}
|
||||||
bodyshop {
|
bodyshop {
|
||||||
id
|
id
|
||||||
md_ro_statuses
|
md_ro_statuses
|
||||||
md_responsibility_centers
|
md_responsibility_centers
|
||||||
accountingconfig
|
accountingconfig
|
||||||
pbs_serialnumber
|
pbs_serialnumber
|
||||||
pbs_configuration
|
pbs_configuration
|
||||||
timezone
|
timezone
|
||||||
}
|
}
|
||||||
owner {
|
owner {
|
||||||
id
|
id
|
||||||
accountingid
|
accountingid
|
||||||
}
|
}
|
||||||
joblines(where:{removed: {_eq:false}}) {
|
joblines(where:{removed: {_eq:false}}) {
|
||||||
id
|
id
|
||||||
line_desc
|
line_desc
|
||||||
part_type
|
part_type
|
||||||
@@ -447,9 +425,7 @@ query QUERY_JOBS_FOR_PBS_EXPORT($id: uuid!) {
|
|||||||
line_ref
|
line_ref
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}`;
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports.QUERY_BILLS_FOR_PAYABLES_EXPORT = `
|
exports.QUERY_BILLS_FOR_PAYABLES_EXPORT = `
|
||||||
query QUERY_BILLS_FOR_PAYABLES_EXPORT($bills: [uuid!]!) {
|
query QUERY_BILLS_FOR_PAYABLES_EXPORT($bills: [uuid!]!) {
|
||||||
@@ -493,18 +469,17 @@ query QUERY_BILLS_FOR_PAYABLES_EXPORT($bills: [uuid!]!) {
|
|||||||
due_date
|
due_date
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.QUERY_PAYMENTS_FOR_EXPORT = `
|
exports.QUERY_PAYMENTS_FOR_EXPORT = `
|
||||||
query QUERY_PAYMENTS_FOR_EXPORT($payments: [uuid!]!)
|
query QUERY_PAYMENTS_FOR_EXPORT($payments: [uuid!]!) {
|
||||||
{ bodyshops(where: {associations: {active: {_eq: true}}}) {
|
bodyshops(where: {associations: {active: {_eq: true}}}) {
|
||||||
id
|
id
|
||||||
md_responsibility_centers
|
md_responsibility_centers
|
||||||
accountingconfig
|
accountingconfig
|
||||||
timezone
|
timezone
|
||||||
md_ins_cos
|
md_ins_cos
|
||||||
}
|
}
|
||||||
payments(where: {id: {_in: $payments}}) {
|
payments(where: {id: {_in: $payments}}) {
|
||||||
id
|
id
|
||||||
created_at
|
created_at
|
||||||
@@ -512,15 +487,14 @@ exports.QUERY_PAYMENTS_FOR_EXPORT = `
|
|||||||
job {
|
job {
|
||||||
id
|
id
|
||||||
ro_number
|
ro_number
|
||||||
ownerid
|
ownerid
|
||||||
ownr_ln
|
ownr_ln
|
||||||
ownr_fn
|
ownr_fn
|
||||||
ownr_addr1
|
ownr_addr1
|
||||||
ownr_addr2
|
ownr_addr2
|
||||||
ownr_zip
|
ownr_zip
|
||||||
ownr_city
|
ownr_city
|
||||||
ownr_st
|
ownr_st
|
||||||
|
|
||||||
ins_co_nm
|
ins_co_nm
|
||||||
owner{
|
owner{
|
||||||
accountingid
|
accountingid
|
||||||
@@ -528,7 +502,7 @@ exports.QUERY_PAYMENTS_FOR_EXPORT = `
|
|||||||
ownr_fn
|
ownr_fn
|
||||||
ownr_ln
|
ownr_ln
|
||||||
ownr_co_nm
|
ownr_co_nm
|
||||||
bodyshop{
|
bodyshop {
|
||||||
accountingconfig
|
accountingconfig
|
||||||
md_responsibility_centers
|
md_responsibility_centers
|
||||||
md_ins_cos
|
md_ins_cos
|
||||||
@@ -545,8 +519,7 @@ exports.QUERY_PAYMENTS_FOR_EXPORT = `
|
|||||||
paymentnum
|
paymentnum
|
||||||
date
|
date
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.QUERY_UPCOMING_APPOINTMENTS = `query QUERY_UPCOMING_APPOINTMENTS($now: timestamptz!, $jobId: uuid!) {
|
exports.QUERY_UPCOMING_APPOINTMENTS = `query QUERY_UPCOMING_APPOINTMENTS($now: timestamptz!, $jobId: uuid!) {
|
||||||
jobs_by_pk(id: $jobId) {
|
jobs_by_pk(id: $jobId) {
|
||||||
@@ -646,8 +619,7 @@ exports.QUERY_UPCOMING_APPOINTMENTS = `query QUERY_UPCOMING_APPOINTMENTS($now: t
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.QUERY_EMPLOYEE_PIN = `query QUERY_EMPLOYEE_PIN($shopId: uuid!, $employeeId: String!) {
|
exports.QUERY_EMPLOYEE_PIN = `query QUERY_EMPLOYEE_PIN($shopId: uuid!, $employeeId: String!) {
|
||||||
employees(where: {_and: {shopid: {_eq: $shopId}, employee_number: {_eq: $employeeId}}}) {
|
employees(where: {_and: {shopid: {_eq: $shopId}, employee_number: {_eq: $employeeId}}}) {
|
||||||
@@ -838,8 +810,7 @@ exports.AUTOHOUSE_QUERY = `query AUTOHOUSE_EXPORT($start: timestamptz, $bodyshop
|
|||||||
totalliquidcost
|
totalliquidcost
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.CLAIMSCORP_QUERY = `query CLAIMSCORP_EXPORT($start: timestamptz, $bodyshopid: uuid!, $end: timestamptz) {
|
exports.CLAIMSCORP_QUERY = `query CLAIMSCORP_EXPORT($start: timestamptz, $bodyshopid: uuid!, $end: timestamptz) {
|
||||||
bodyshops_by_pk(id: $bodyshopid){
|
bodyshops_by_pk(id: $bodyshopid){
|
||||||
@@ -1011,8 +982,7 @@ exports.CLAIMSCORP_QUERY = `query CLAIMSCORP_EXPORT($start: timestamptz, $bodysh
|
|||||||
totalliquidcost
|
totalliquidcost
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.ENTEGRAL_EXPORT = `
|
exports.ENTEGRAL_EXPORT = `
|
||||||
query ENTEGRAL_EXPORT($bodyshopid: uuid!) {
|
query ENTEGRAL_EXPORT($bodyshopid: uuid!) {
|
||||||
@@ -1101,8 +1071,7 @@ query ENTEGRAL_EXPORT($bodyshopid: uuid!) {
|
|||||||
cieca_ttl
|
cieca_ttl
|
||||||
adjustment_bottom_line
|
adjustment_bottom_line
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.UPDATE_JOB = `
|
exports.UPDATE_JOB = `
|
||||||
mutation UPDATE_JOB($jobId: uuid!, $job: jobs_set_input!) {
|
mutation UPDATE_JOB($jobId: uuid!, $job: jobs_set_input!) {
|
||||||
@@ -1117,8 +1086,7 @@ exports.UPDATE_JOB = `
|
|||||||
lbr_adjustments
|
lbr_adjustments
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.GET_JOB_BY_PK = `query GET_JOB_BY_PK($id: uuid!) {
|
exports.GET_JOB_BY_PK = `query GET_JOB_BY_PK($id: uuid!) {
|
||||||
jobs_by_pk(id: $id) {
|
jobs_by_pk(id: $id) {
|
||||||
@@ -1131,7 +1099,7 @@ exports.GET_JOB_BY_PK = `query GET_JOB_BY_PK($id: uuid!) {
|
|||||||
kmout
|
kmout
|
||||||
comment
|
comment
|
||||||
referral_source
|
referral_source
|
||||||
referral_source_extra
|
referral_source_extra
|
||||||
unit_number
|
unit_number
|
||||||
po_number
|
po_number
|
||||||
special_coverage_policy
|
special_coverage_policy
|
||||||
@@ -1170,6 +1138,10 @@ exports.GET_JOB_BY_PK = `query GET_JOB_BY_PK($id: uuid!) {
|
|||||||
cieca_pfl
|
cieca_pfl
|
||||||
cieca_pft
|
cieca_pft
|
||||||
cieca_pfo
|
cieca_pfo
|
||||||
|
vehicle {
|
||||||
|
id
|
||||||
|
notes
|
||||||
|
}
|
||||||
est_ph1
|
est_ph1
|
||||||
est_ea
|
est_ea
|
||||||
selling_dealer
|
selling_dealer
|
||||||
@@ -1518,19 +1490,17 @@ exports.QUERY_JOB_COSTING_DETAILS_MULTI = ` query QUERY_JOB_COSTING_DETAILS_MULT
|
|||||||
use_paint_scale_data
|
use_paint_scale_data
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.INSERT_IOEVENT = ` mutation INSERT_IOEVENT($event: ioevents_insert_input!) {
|
exports.INSERT_IOEVENT = ` mutation INSERT_IOEVENT($event: ioevents_insert_input!) {
|
||||||
insert_ioevents_one(object: $event) {
|
insert_ioevents_one(object: $event) {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.GET_AUTOHOUSE_SHOPS = `query GET_AUTOHOUSE_SHOPS {
|
exports.GET_AUTOHOUSE_SHOPS = `query GET_AUTOHOUSE_SHOPS {
|
||||||
bodyshops(where: {autohouseid: {_is_null: false}}){
|
bodyshops(where: {autohouseid: {_is_null: false}, _or: {autohouseid: {_neq: ""}}}){
|
||||||
id
|
id
|
||||||
shopname
|
shopname
|
||||||
address1
|
address1
|
||||||
city
|
city
|
||||||
@@ -1546,11 +1516,10 @@ exports.GET_AUTOHOUSE_SHOPS = `query GET_AUTOHOUSE_SHOPS {
|
|||||||
imexshopid
|
imexshopid
|
||||||
timezone
|
timezone
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.GET_CLAIMSCORP_SHOPS = `query GET_CLAIMSCORP_SHOPS {
|
exports.GET_CLAIMSCORP_SHOPS = `query GET_CLAIMSCORP_SHOPS {
|
||||||
bodyshops(where: {claimscorpid: {_is_null: false}}){
|
bodyshops(where: {claimscorpid: {_is_null: false}, _or: {claimscorpid: {_neq: ""}}}){
|
||||||
id
|
id
|
||||||
shopname
|
shopname
|
||||||
address1
|
address1
|
||||||
@@ -1567,12 +1536,11 @@ exports.GET_CLAIMSCORP_SHOPS = `query GET_CLAIMSCORP_SHOPS {
|
|||||||
imexshopid
|
imexshopid
|
||||||
timezone
|
timezone
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.GET_ENTEGRAL_SHOPS = `query GET_AUTOHOUSE_SHOPS {
|
exports.GET_ENTEGRAL_SHOPS = `query GET_AUTOHOUSE_SHOPS {
|
||||||
bodyshops(where: {entegral_id: {_is_null: false}}){
|
bodyshops(where: {entegral_id: {_is_null: false}, _or: {entegral_id: {_neq: ""}}}){
|
||||||
id
|
id
|
||||||
shopname
|
shopname
|
||||||
address1
|
address1
|
||||||
city
|
city
|
||||||
@@ -1588,22 +1556,19 @@ exports.GET_ENTEGRAL_SHOPS = `query GET_AUTOHOUSE_SHOPS {
|
|||||||
timezone
|
timezone
|
||||||
features
|
features
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.DELETE_ALL_DMS_VEHICLES = `mutation DELETE_ALL_DMS_VEHICLES{
|
exports.DELETE_ALL_DMS_VEHICLES = `mutation DELETE_ALL_DMS_VEHICLES{
|
||||||
delete_dms_vehicles(where: {}) {
|
delete_dms_vehicles(where: {}) {
|
||||||
affected_rows
|
affected_rows
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
exports.INSERT_DMS_VEHICLES = `mutation INSERT_DMS_VEHICLES($vehicles: [dms_vehicles_insert_input!]!) {
|
exports.INSERT_DMS_VEHICLES = `mutation INSERT_DMS_VEHICLES($vehicles: [dms_vehicles_insert_input!]!) {
|
||||||
insert_dms_vehicles(objects: $vehicles) {
|
insert_dms_vehicles(objects: $vehicles) {
|
||||||
affected_rows
|
affected_rows
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports.GET_CDK_ALLOCATIONS = `query QUERY_JOB_CLOSE_DETAILS($id: uuid!) {
|
exports.GET_CDK_ALLOCATIONS = `query QUERY_JOB_CLOSE_DETAILS($id: uuid!) {
|
||||||
jobs_by_pk(id: $id) {
|
jobs_by_pk(id: $id) {
|
||||||
@@ -1720,8 +1685,7 @@ exports.GET_CDK_ALLOCATIONS = `query QUERY_JOB_CLOSE_DETAILS($id: uuid!) {
|
|||||||
unq_seq
|
unq_seq
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.GET_QBO_AUTH = `query GET_QBO_AUTH($email: String!) {
|
exports.GET_QBO_AUTH = `query GET_QBO_AUTH($email: String!) {
|
||||||
associations(where: {_and: {active: {_eq: true}, useremail: {_eq: $email}}}){
|
associations(where: {_and: {active: {_eq: true}, useremail: {_eq: $email}}}){
|
||||||
@@ -1735,15 +1699,13 @@ exports.SET_QBO_AUTH_WITH_REALM = `mutation SET_QBO_AUTH($email: String!, $qbo_a
|
|||||||
update_associations(_set: {qbo_auth: $qbo_auth, qbo_realmId: $qbo_realmId}, where: {_and: {active: {_eq: true}, useremail: {_eq: $email}}}){
|
update_associations(_set: {qbo_auth: $qbo_auth, qbo_realmId: $qbo_realmId}, where: {_and: {active: {_eq: true}, useremail: {_eq: $email}}}){
|
||||||
affected_rows
|
affected_rows
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.SET_QBO_AUTH = `mutation SET_QBO_AUTH($email: String!, $qbo_auth: jsonb!) {
|
exports.SET_QBO_AUTH = `mutation SET_QBO_AUTH($email: String!, $qbo_auth: jsonb!) {
|
||||||
update_associations(_set: {qbo_auth: $qbo_auth}, where: {_and: {active: {_eq: true}, useremail: {_eq: $email}}}){
|
update_associations(_set: {qbo_auth: $qbo_auth}, where: {_and: {active: {_eq: true}, useremail: {_eq: $email}}}){
|
||||||
affected_rows
|
affected_rows
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.MARK_JOB_EXPORTED = `
|
exports.MARK_JOB_EXPORTED = `
|
||||||
mutation MARK_JOB_EXPORTED($jobId: uuid!, $job: jobs_set_input!, $log: exportlog_insert_input!, $bill: bills_set_input!) {
|
mutation MARK_JOB_EXPORTED($jobId: uuid!, $job: jobs_set_input!, $log: exportlog_insert_input!, $bill: bills_set_input!) {
|
||||||
@@ -1762,10 +1724,9 @@ mutation MARK_JOB_EXPORTED($jobId: uuid!, $job: jobs_set_input!, $log: exportlog
|
|||||||
id
|
id
|
||||||
}
|
}
|
||||||
update_bills(where:{jobid:{_eq :$jobId}}, _set:$bill){
|
update_bills(where:{jobid:{_eq :$jobId}}, _set:$bill){
|
||||||
affected_rows
|
affected_rows
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.MARK_BILLS_EXPORTED = `
|
exports.MARK_BILLS_EXPORTED = `
|
||||||
mutation UPDATE_BILLS($billids: [uuid!]!, $bill: bills_set_input!, $logs: [exportlog_insert_input!]!) {
|
mutation UPDATE_BILLS($billids: [uuid!]!, $bill: bills_set_input!, $logs: [exportlog_insert_input!]!) {
|
||||||
@@ -1777,28 +1738,25 @@ mutation UPDATE_BILLS($billids: [uuid!]!, $bill: bills_set_input!, $logs: [expor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
insert_exportlog(objects: $logs) {
|
insert_exportlog(objects: $logs) {
|
||||||
returning{
|
returning{
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.INSERT_EXPORT_LOG = `
|
exports.INSERT_EXPORT_LOG = `
|
||||||
mutation INSERT_EXPORT_LOG($log: exportlog_insert_input!) {
|
mutation INSERT_EXPORT_LOG($log: exportlog_insert_input!) {
|
||||||
insert_exportlog_one(object: $log) {
|
insert_exportlog_one(object: $log) {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.QUERY_EXISTING_TRANSITION = `
|
exports.QUERY_EXISTING_TRANSITION = `
|
||||||
mutation INSERT_EXPORT_LOG($log: exportlog_insert_input!) {
|
mutation INSERT_EXPORT_LOG($log: exportlog_insert_input!) {
|
||||||
insert_exportlog_one(object: $log) {
|
insert_exportlog_one(object: $log) {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.UPDATE_OLD_TRANSITION = `mutation UPDATE_OLD_TRANSITION($jobid: uuid!, $existingTransition: transitions_set_input!){
|
exports.UPDATE_OLD_TRANSITION = `mutation UPDATE_OLD_TRANSITION($jobid: uuid!, $existingTransition: transitions_set_input!){
|
||||||
update_transitions(where:{jobid:{_eq:$jobid}, end:{_is_null:true
|
update_transitions(where:{jobid:{_eq:$jobid}, end:{_is_null:true
|
||||||
@@ -1822,9 +1780,7 @@ exports.INSERT_NEW_TRANSITION = `mutation INSERT_NEW_TRANSITION($newTransition:
|
|||||||
update_transitions(where: {id: {_eq: $oldTransitionId}}, _set: {duration: $duration}) {
|
update_transitions(where: {id: {_eq: $oldTransitionId}}, _set: {duration: $duration}) {
|
||||||
affected_rows
|
affected_rows
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports.QUERY_JOB_ID_MIXDATA = `query QUERY_JOB_ID_MIXDATA($roNumbers: [String!]!) {
|
exports.QUERY_JOB_ID_MIXDATA = `query QUERY_JOB_ID_MIXDATA($roNumbers: [String!]!) {
|
||||||
jobs(where: {ro_number: {_in: $roNumbers}}) {
|
jobs(where: {ro_number: {_in: $roNumbers}}) {
|
||||||
@@ -1834,9 +1790,7 @@ exports.QUERY_JOB_ID_MIXDATA = `query QUERY_JOB_ID_MIXDATA($roNumbers: [String!]
|
|||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports.QBO_MARK_JOB_EXPORTED = `
|
exports.QBO_MARK_JOB_EXPORTED = `
|
||||||
mutation QBO_MARK_JOB_EXPORTED($jobId: uuid!, $job: jobs_set_input!, $logs: [exportlog_insert_input!]!) {
|
mutation QBO_MARK_JOB_EXPORTED($jobId: uuid!, $job: jobs_set_input!, $logs: [exportlog_insert_input!]!) {
|
||||||
@@ -1849,9 +1803,8 @@ mutation QBO_MARK_JOB_EXPORTED($jobId: uuid!, $job: jobs_set_input!, $logs: [exp
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
|
|
||||||
`;
|
|
||||||
exports.QBO_MARK_BILL_EXPORTED = `
|
exports.QBO_MARK_BILL_EXPORTED = `
|
||||||
mutation QBO_MARK_BILL_EXPORTED($billId: uuid!, $bill: bills_set_input!, $logs: [exportlog_insert_input!]!) {
|
mutation QBO_MARK_BILL_EXPORTED($billId: uuid!, $bill: bills_set_input!, $logs: [exportlog_insert_input!]!) {
|
||||||
insert_exportlog(objects: $logs) {
|
insert_exportlog(objects: $logs) {
|
||||||
@@ -1862,9 +1815,7 @@ mutation QBO_MARK_BILL_EXPORTED($billId: uuid!, $bill: bills_set_input!, $logs:
|
|||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports.QBO_MARK_PAYMENT_EXPORTED = `
|
exports.QBO_MARK_PAYMENT_EXPORTED = `
|
||||||
mutation QBO_MARK_PAYMENT_EXPORTED($paymentId: uuid!, $payment: payments_set_input!, $logs: [exportlog_insert_input!]!) {
|
mutation QBO_MARK_PAYMENT_EXPORTED($paymentId: uuid!, $payment: payments_set_input!, $logs: [exportlog_insert_input!]!) {
|
||||||
@@ -1879,19 +1830,17 @@ mutation QBO_MARK_PAYMENT_EXPORTED($paymentId: uuid!, $payment: payments_set_inp
|
|||||||
}`;
|
}`;
|
||||||
|
|
||||||
exports.INSERT_EXPORT_LOG = `
|
exports.INSERT_EXPORT_LOG = `
|
||||||
mutation INSERT_EXPORT_LOG($logs: [exportlog_insert_input!]!) {
|
mutation INSERT_EXPORT_LOG($logs: [exportlog_insert_input!]!) {
|
||||||
insert_exportlog(objects: $logs) {
|
insert_exportlog(objects: $logs) {
|
||||||
affected_rows
|
affected_rows
|
||||||
}
|
|
||||||
}
|
}
|
||||||
`;
|
}`;
|
||||||
|
|
||||||
exports.INSERT_EMAIL_AUDIT = `mutation INSERT_EMAIL_AUDIT($email: email_audit_trail_insert_input!) {
|
exports.INSERT_EMAIL_AUDIT = `mutation INSERT_EMAIL_AUDIT($email: email_audit_trail_insert_input!) {
|
||||||
insert_email_audit_trail_one(object: $email) {
|
insert_email_audit_trail_one(object: $email) {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.DELETE_MEDIA_DOCUMENTS = `
|
exports.DELETE_MEDIA_DOCUMENTS = `
|
||||||
mutation DELETE_DOCUMENTS($ids: [uuid!]!) {
|
mutation DELETE_DOCUMENTS($ids: [uuid!]!) {
|
||||||
@@ -1900,8 +1849,7 @@ mutation DELETE_DOCUMENTS($ids: [uuid!]!) {
|
|||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.UPDATE_EMAIL_AUDIT = `
|
exports.UPDATE_EMAIL_AUDIT = `
|
||||||
mutation ($sesid: String!, $status: String, $context: jsonb) {
|
mutation ($sesid: String!, $status: String, $context: jsonb) {
|
||||||
@@ -1953,8 +1901,7 @@ query GET_PBS_AP_ALLOCATIONS($billids: [uuid!]) {
|
|||||||
quantity
|
quantity
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.GET_JOB_FOR_PPC = `query GET_JOB_FOR_PPC($jobid: uuid!) {
|
exports.GET_JOB_FOR_PPC = `query GET_JOB_FOR_PPC($jobid: uuid!) {
|
||||||
jobs_by_pk(id: $jobid) {
|
jobs_by_pk(id: $jobid) {
|
||||||
@@ -1986,8 +1933,7 @@ exports.QUERY_PARTS_SCAN = `query QUERY_PARTS_SCAN ($id: uuid!) {
|
|||||||
critical
|
critical
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
exports.UPDATE_PARTS_CRITICAL = `mutation UPDATE_PARTS_CRITICAL ($IdsToMarkCritical:[uuid!]!, $jobid: uuid!){
|
exports.UPDATE_PARTS_CRITICAL = `mutation UPDATE_PARTS_CRITICAL ($IdsToMarkCritical:[uuid!]!, $jobid: uuid!){
|
||||||
critical: update_joblines(where:{id:{_in:$IdsToMarkCritical}}, _set:{critical: true}){
|
critical: update_joblines(where:{id:{_in:$IdsToMarkCritical}}, _set:{critical: true}){
|
||||||
|
|||||||
Reference in New Issue
Block a user