Merged in release/2021-11-26 (pull request #279)

IO-233 CDK Updates.

Approved-by: Patrick Fic
This commit is contained in:
Patrick Fic
2021-11-26 17:26:11 +00:00
56 changed files with 152 additions and 153 deletions

View File

@@ -1,4 +1,4 @@
<babeledit_project version="1.2" be_version="2.7.1"> <babeledit_project be_version="2.7.1" version="1.2">
<!-- <!--
BabelEdit project file BabelEdit project file
@@ -4304,6 +4304,27 @@
</translation> </translation>
</translations> </translations>
</concept_node> </concept_node>
<concept_node>
<name>md_email_cc</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>
<folder_node> <folder_node>
<name>md_hour_split</name> <name>md_hour_split</name>
<children> <children>

View File

@@ -27,7 +27,6 @@ export const tracker = new Tracker({
onStart: async ({ sessionID }) => { onStart: async ({ sessionID }) => {
const user = await getCurrentUser(); const user = await getCurrentUser();
if (user) tracker.setUserID(user.email); if (user) tracker.setUserID(user.email);
console.log("ORS SESSION ", sessionID, user && user.email);
}, },
}); });

View File

@@ -53,7 +53,6 @@ export function App({ checkUserSession, currentUser, online, setOnline }) {
const { t } = useTranslation(); const { t } = useTranslation();
window.addEventListener("offline", function (e) { window.addEventListener("offline", function (e) {
console.log("Internet connection lost.");
setOnline(false); setOnline(false);
}); });

View File

@@ -157,16 +157,6 @@ export function BillEnterModalLinesComponent({
billlines: getFieldsValue("billlines").billlines.map( billlines: getFieldsValue("billlines").billlines.map(
(item, idx) => { (item, idx) => {
if (idx === index) { if (idx === index) {
console.log(
"Found and setting.",
!!item.actual_cost
? item.actual_cost
: Math.round(
(parseFloat(e.target.value) * (1 - discount) +
Number.EPSILON) *
100
) / 100
);
return { return {
...item, ...item,
actual_cost: !!item.actual_cost actual_cost: !!item.actual_cost

View File

@@ -14,7 +14,6 @@ const BillLineSearchSelect = ({ options, disabled, ...restProps }, ref) => {
showSearch showSearch
// optionFilterProp="line_desc" // optionFilterProp="line_desc"
filterOption={(inputValue, option) => { filterOption={(inputValue, option) => {
console.log(inputValue);
return ( return (
(option.line_desc && (option.line_desc &&
option.line_desc option.line_desc

View File

@@ -20,7 +20,6 @@ export function ChatNewConversation({ openChatByPhone }) {
const { t } = useTranslation(); const { t } = useTranslation();
const [form] = Form.useForm(); const [form] = Form.useForm();
const handleFinish = (values) => { const handleFinish = (values) => {
console.log("values :>> ", values);
openChatByPhone({ phone_num: values.phoneNumber }); openChatByPhone({ phone_num: values.phoneNumber });
form.resetFields(); form.resetFields();
}; };

View File

@@ -86,10 +86,7 @@ export function DashboardGridComponent({ currentUser, bodyshop }) {
const handleRemoveComponent = (key) => { const handleRemoveComponent = (key) => {
logImEXEvent("dashboard_remove_component", { name: key }); logImEXEvent("dashboard_remove_component", { name: key });
const idxToRemove = state.items.findIndex((i) => i.i === key); const idxToRemove = state.items.findIndex((i) => i.i === key);
console.log(
"🚀 ~ file: dashboard-grid.component.jsx ~ line 81 ~ idxToRemove",
idxToRemove
);
const items = _.cloneDeep(state.items); const items = _.cloneDeep(state.items);
items.splice(idxToRemove, 1); items.splice(idxToRemove, 1);

View File

@@ -19,11 +19,11 @@ export function DmsCdkMakesRefetch({ bodyshop, form, socket }) {
const { t } = useTranslation(); const { t } = useTranslation();
const handleRefetch = async () => { const handleRefetch = async () => {
setLoading(true); setLoading(true);
const response = await axios.post("/cdk/getvehicles", { await axios.post("/cdk/getvehicles", {
cdk_dealerid: bodyshop.cdk_dealerid, cdk_dealerid: bodyshop.cdk_dealerid,
bodyshopid: bodyshop.id, bodyshopid: bodyshop.id,
}); });
console.log(response);
setLoading(false); setLoading(false);
}; };
return ( return (

View File

@@ -86,11 +86,13 @@ export function DmsCustomerSelector({ bodyshop }) {
//dataIndex: ["name2", "fullName"], //dataIndex: ["name2", "fullName"],
key: "address", key: "address",
render: (record, value) => render: (record, value) =>
`${record.address && record.address.addressLine[0]}, ${ `${
record.address && record.address.city record.address &&
} ${record.address && record.address.stateOrProvince} ${ record.address.addressLine &&
record.address && record.address.postalCode record.address.addressLine[0]
}`, }, ${record.address && record.address.city} ${
record.address && record.address.stateOrProvince
} ${record.address && record.address.postalCode}`,
}, },
]; ];

View File

@@ -27,7 +27,7 @@ export function DmsLogEvents({ socket, logs, bodyshop }) {
<Timeline.Item key={idx} color={LogLevelHierarchy(log.level)}> <Timeline.Item key={idx} color={LogLevelHierarchy(log.level)}>
<Space wrap align="start" style={{}}> <Space wrap align="start" style={{}}>
<Tag color={LogLevelHierarchy(log.level)}>{log.level}</Tag> <Tag color={LogLevelHierarchy(log.level)}>{log.level}</Tag>
<span>{moment(log.timestamp).format("MM/DD/YYYY HH:MM:ss")}</span> <span>{moment(log.timestamp).format("MM/DD/YYYY HH:mm:ss")}</span>
<Divider type="vertical" /> <Divider type="vertical" />
<span>{log.message}</span> <span>{log.message}</span>
</Space> </Space>

View File

@@ -58,11 +58,9 @@ export function DocumentEditorComponent({ currentUser, bodyshop, document }) {
if (imgRef.current !== null) { if (imgRef.current !== null) {
// create a marker.js MarkerArea // create a marker.js MarkerArea
markerArea.current = new markerjs2.MarkerArea(imgRef.current); markerArea.current = new markerjs2.MarkerArea(imgRef.current);
console.log(`markerArea.current`, markerArea.current);
// attach an event handler to assign annotated image back to our image element // attach an event handler to assign annotated image back to our image element
markerArea.current.addCloseEventListener((closeEvent) => { markerArea.current.addCloseEventListener((closeEvent) => {});
console.log("Close Event", closeEvent);
});
markerArea.current.addRenderEventListener((dataUrl) => { markerArea.current.addRenderEventListener((dataUrl) => {
imgRef.current.src = dataUrl; imgRef.current.src = dataUrl;

View File

@@ -14,8 +14,6 @@ var cleanAxios = axios.create();
cleanAxios.interceptors.request.eject(axiosAuthInterceptorId); cleanAxios.interceptors.request.eject(axiosAuthInterceptorId);
export const handleUpload = (ev, context) => { export const handleUpload = (ev, context) => {
console.log("Handling Upload", ev);
logImEXEvent("document_upload", { filetype: ev.file.type }); logImEXEvent("document_upload", { filetype: ev.file.type });
const { onError, onSuccess, onProgress } = ev; const { onError, onSuccess, onProgress } = ev;
@@ -61,7 +59,7 @@ export const uploadToCloudinary = async (
// let eager = process.env.REACT_APP_CLOUDINARY_THUMB_TRANSFORMATIONS; // let eager = process.env.REACT_APP_CLOUDINARY_THUMB_TRANSFORMATIONS;
//Get the signed url. //Get the signed url.
console.log("fileType", fileType);
const upload_preset = fileType.startsWith("video") const upload_preset = fileType.startsWith("video")
? "incoming_upload_video" ? "incoming_upload_video"
: "incoming_upload"; : "incoming_upload";
@@ -74,7 +72,6 @@ export const uploadToCloudinary = async (
}); });
if (signedURLResponse.status !== 200) { if (signedURLResponse.status !== 200) {
console.log("Error Getting Signed URL", signedURLResponse.statusText);
if (!!onError) onError(signedURLResponse.statusText); if (!!onError) onError(signedURLResponse.statusText);
notification["error"]({ notification["error"]({
message: i18n.t("documents.errors.getpresignurl", { message: i18n.t("documents.errors.getpresignurl", {
@@ -113,13 +110,8 @@ export const uploadToCloudinary = async (
...options, ...options,
} }
); );
console.log("Upload Response", cloudinaryUploadResponse.data);
if (cloudinaryUploadResponse.status !== 200) { if (cloudinaryUploadResponse.status !== 200) {
console.log(
"Error uploading to cloudinary.",
cloudinaryUploadResponse.statusText
);
if (!!onError) onError(cloudinaryUploadResponse.statusText); if (!!onError) onError(cloudinaryUploadResponse.statusText);
notification["error"]({ notification["error"]({
message: i18n.t("documents.errors.insert", { message: i18n.t("documents.errors.insert", {

View File

@@ -35,10 +35,6 @@ export function EmailDocumentsComponent({
}, },
skip: !emailConfig.jobid, skip: !emailConfig.jobid,
}); });
console.log(
"🚀 ~ file: email-documents.component.jsx ~ line 38 ~ emailConfig",
emailConfig
);
return ( return (
<div> <div>

View File

@@ -111,7 +111,6 @@ export function EmailOverlayContainer({
notification["success"]({ message: t("emails.successes.sent") }); notification["success"]({ message: t("emails.successes.sent") });
toggleEmailOverlayVisible(); toggleEmailOverlayVisible();
} catch (error) { } catch (error) {
console.log(JSON.stringify(error));
notification["error"]({ notification["error"]({
message: t("emails.errors.notsent", { message: error.message }), message: t("emails.errors.notsent", { message: error.message }),
}); });
@@ -149,6 +148,18 @@ export function EmailOverlayContainer({
html: response.data, html: response.data,
fileList: [], fileList: [],
}); });
if (
bodyshop.md_email_cc[emailConfig.template.name] &&
bodyshop.md_email_cc[emailConfig.template.name].length > 0
) {
form.setFieldsValue({
cc: [
...(form.getFieldValue("cc") || []),
...bodyshop.md_email_cc[emailConfig.template.name],
],
});
}
setLoading(false); setLoading(false);
}; };

View File

@@ -21,7 +21,6 @@ export function EmailTestComponent({ currentUser, setEmailOptions }) {
const [form] = Form.useForm(); const [form] = Form.useForm();
const handleFinish = (values) => { const handleFinish = (values) => {
console.log("values", values);
GenerateDocument( GenerateDocument(
{ {
name: values.key, name: values.key,

View File

@@ -10,15 +10,11 @@ export default function HelpRescue() {
var bodyFormData = new FormData(); var bodyFormData = new FormData();
bodyFormData.append("Code", code); bodyFormData.append("Code", code);
bodyFormData.append("hostederrorhandling", 1); bodyFormData.append("hostederrorhandling", 1);
const res1 = await fetch( await fetch("https://secure.logmeinrescue.com/Customer/Code.aspx", {
"https://secure.logmeinrescue.com/Customer/Code.aspx", mode: "no-cors",
{ method: "POST",
mode: "no-cors", body: bodyFormData,
method: "POST", });
body: bodyFormData,
}
);
console.log("handleClick -> res1", await res1.text());
}; };
return ( return (
@@ -40,7 +36,6 @@ export default function HelpRescue() {
method="post" method="post"
id="logmeinsupport" id="logmeinsupport"
onSubmit={(...props) => { onSubmit={(...props) => {
console.log(`props`, props);
alert(); alert();
}} }}
> >

View File

@@ -44,7 +44,7 @@ export function Jobd3RdPartyModal({ bodyshop, jobId }) {
}; };
const handleFinish = (values) => { const handleFinish = (values) => {
const { sendtype, ...restVals } = values; const { sendtype, ...restVals } = values;
console.log(restVals);
GenerateDocument( GenerateDocument(
{ {
name: TemplateList("job_special").thirdpartypayer.key, name: TemplateList("job_special").thirdpartypayer.key,

View File

@@ -56,7 +56,7 @@ export function ScheduleEventColor({ bodyshop, event }) {
<Menu.Item key={"null"}>{t("general.actions.clear")}</Menu.Item> <Menu.Item key={"null"}>{t("general.actions.clear")}</Menu.Item>
</Menu> </Menu>
); );
console.log(`event`, event);
return ( return (
<Dropdown overlay={menu}> <Dropdown overlay={menu}>
<a href=" #" onClick={(e) => e.preventDefault()}> <a href=" #" onClick={(e) => e.preventDefault()}>

View File

@@ -176,7 +176,7 @@ export function ScheduleEventComponent({
t("appointments.labels.reminder", { t("appointments.labels.reminder", {
shopname: bodyshop.shopname, shopname: bodyshop.shopname,
date: moment(event.start).format("MM/DD/YYYY"), date: moment(event.start).format("MM/DD/YYYY"),
time: moment(event.start).format("HH:MM a"), time: moment(event.start).format("HH:mm a"),
}) })
); );
setVisible(false); setVisible(false);

View File

@@ -55,7 +55,6 @@ export default function JobBillsTotalComponent({
); );
} }
if (il.deductedfromlbr) { if (il.deductedfromlbr) {
console.log(i, "Deducting from labor.");
lbrAdjustments = lbrAdjustments.add( lbrAdjustments = lbrAdjustments.add(
Dinero({ Dinero({
amount: Math.round((il.actual_price || 0) * 100), amount: Math.round((il.actual_price || 0) * 100),

View File

@@ -34,7 +34,7 @@ export default function JobIntakeTemplateList({ templates }) {
const renderAllTemplates = async () => { const renderAllTemplates = async () => {
logImEXEvent("checklist_render_all_templates"); logImEXEvent("checklist_render_all_templates");
setLoading(true); setLoading(true);
console.log("templates :>> ", templates);
await GenerateDocuments( await GenerateDocuments(
templates.map((key) => { templates.map((key) => {
return { name: key, variables: { id: jobId } }; return { name: key, variables: { id: jobId } };

View File

@@ -35,7 +35,7 @@ export function JobCostingModalContainer({
async function getData() { async function getData() {
if (jobId && visible) { if (jobId && visible) {
const { data } = await axios.post("/job/costing", { jobid: jobId }); const { data } = await axios.post("/job/costing", { jobid: jobId });
console.log(data);
setCostingData(data); setCostingData(data);
} }
} }

View File

@@ -77,7 +77,6 @@ export default function JobCostingPartsTable({ data, summaryData }) {
.includes(searchText.toLowerCase()) .includes(searchText.toLowerCase())
); );
console.log("data :>> ", data);
return ( return (
<div> <div>
<Table <Table

View File

@@ -42,9 +42,7 @@ export default function ScoreboardAddButton({
}, [visibility, job.id, callQuery]); }, [visibility, job.id, callQuery]);
useEffect(() => { useEffect(() => {
console.log("UE", entryData);
if (entryData && entryData.scoreboard && entryData.scoreboard[0]) { if (entryData && entryData.scoreboard && entryData.scoreboard[0]) {
console.log("Setting FOrm");
form.setFieldsValue(entryData.scoreboard[0]); form.setFieldsValue(entryData.scoreboard[0]);
} }
}, [entryData, form]); }, [entryData, form]);

View File

@@ -22,7 +22,6 @@ export function JobsAdminClass({ bodyshop, job }) {
const [updateJob] = useMutation(UPDATE_JOB); const [updateJob] = useMutation(UPDATE_JOB);
const handleFinish = async (values) => { const handleFinish = async (values) => {
console.log(values);
setLoading(true); setLoading(true);
const result = await updateJob({ const result = await updateJob({
variables: { jobId: job.id, job: values }, variables: { jobId: job.id, job: values },

View File

@@ -13,7 +13,6 @@ export default function JobsAdminDatesChange({ job }) {
const [updateJob] = useMutation(UPDATE_JOB); const [updateJob] = useMutation(UPDATE_JOB);
const handleFinish = async (values) => { const handleFinish = async (values) => {
console.log(values);
setLoading(true); setLoading(true);
const result = await updateJob({ const result = await updateJob({
variables: { jobId: job.id, job: values }, variables: { jobId: job.id, job: values },

View File

@@ -10,7 +10,6 @@ export default function JobAdminOwnerReassociate({ job }) {
const [form] = Form.useForm(); const [form] = Form.useForm();
const [updateJob] = useMutation(UPDATE_JOB); const [updateJob] = useMutation(UPDATE_JOB);
const handleFinish = async (values) => { const handleFinish = async (values) => {
console.log(values);
setLoading(true); setLoading(true);
const result = await updateJob({ const result = await updateJob({
variables: { jobId: job.id, job: { ownerid: values.ownerid } }, variables: { jobId: job.id, job: { ownerid: values.ownerid } },

View File

@@ -10,7 +10,6 @@ export default function JobAdminOwnerReassociate({ job }) {
const [form] = Form.useForm(); const [form] = Form.useForm();
const [updateJob] = useMutation(UPDATE_JOB); const [updateJob] = useMutation(UPDATE_JOB);
const handleFinish = async (values) => { const handleFinish = async (values) => {
console.log(values);
setLoading(true); setLoading(true);
const result = await updateJob({ const result = await updateJob({
variables: { jobId: job.id, job: { vehicleid: values.vehicleid } }, variables: { jobId: job.id, job: { vehicleid: values.vehicleid } },

View File

@@ -3,8 +3,6 @@ import { gql } from "@apollo/client";
import _ from "lodash"; import _ from "lodash";
export const GetSupplementDelta = async (client, jobId, newLines) => { export const GetSupplementDelta = async (client, jobId, newLines) => {
console.log("-----Begin Supplement-----");
const { const {
data: { joblines: existingLinesFromDb }, data: { joblines: existingLinesFromDb },
} = await client.query({ } = await client.query({

View File

@@ -19,7 +19,6 @@ export default async function DuplicateJob(
variables: { id: jobId }, variables: { id: jobId },
}); });
console.log("res", res);
const { jobs_by_pk } = res.data; const { jobs_by_pk } = res.data;
const existingJob = _.cloneDeep(jobs_by_pk); const existingJob = _.cloneDeep(jobs_by_pk);
delete existingJob.__typename; delete existingJob.__typename;

View File

@@ -40,7 +40,6 @@ export function JobsDocumentsGalleryReassign({ bodyshop, galleryImages }) {
const updateImage = async (i, jobid) => { const updateImage = async (i, jobid) => {
//Move the cloudinary image //Move the cloudinary image
console.log(i);
//Update it in the database. //Update it in the database.
const result = await updateDocument({ const result = await updateDocument({

View File

@@ -29,7 +29,7 @@ export function PartnerPingComponent({ setPartnerVersion }) {
//if (process.env.NODE_ENV === "development") return; //if (process.env.NODE_ENV === "development") return;
const PartnerResponse = await axios.post("http://localhost:1337/ping/"); const PartnerResponse = await axios.post("http://localhost:1337/ping/");
const { appver, qbpath } = PartnerResponse.data; const { appver, qbpath } = PartnerResponse.data;
console.log("SETTING PARTNER VERSION.");
setPartnerVersion(appver); setPartnerVersion(appver);
console.log({ appver, qbpath }); console.log({ appver, qbpath });
if (!qbpath) { if (!qbpath) {

View File

@@ -60,12 +60,10 @@ export function PartsStatusPie({ bodyshop, joblines_status }) {
[pieColor, t] [pieColor, t]
); );
const memoizedData = useMemo(() => Calculatedata(joblines_status), [ const memoizedData = useMemo(
joblines_status, () => Calculatedata(joblines_status),
Calculatedata, [joblines_status, Calculatedata]
]); );
console.log("PartsStatusPie -> memoizedData", memoizedData);
return ( return (
<div> <div>

View File

@@ -71,7 +71,7 @@ export function ReportCenterModalComponent({ reportCenterModal }) {
const start = values.dates[0]; const start = values.dates[0];
const end = values.dates[1]; const end = values.dates[1];
const { id } = values; const { id } = values;
console.log("values", values);
await GenerateDocument( await GenerateDocument(
{ {
name: values.key, name: values.key,

View File

@@ -101,7 +101,6 @@ export function ScheduleJobModalContainer({
} }
if (existingAppointments.data.appointments.length > 0) { if (existingAppointments.data.appointments.length > 0) {
console.log("Cancelling all previous appts.");
await Promise.all( await Promise.all(
existingAppointments.data.appointments.map((app) => { existingAppointments.data.appointments.map((app) => {
return cancelAppointment({ return cancelAppointment({

View File

@@ -3,12 +3,9 @@ import { Form } from "antd";
import ConfigFormComponents from "../config-form-components/config-form-components.component"; import ConfigFormComponents from "../config-form-components/config-form-components.component";
export default function ShopCsiConfigForm({ selectedCsi }) { export default function ShopCsiConfigForm({ selectedCsi }) {
console.log("ShopCsiConfigForm -> selectedCsi", selectedCsi);
const readOnly = !!selectedCsi; const readOnly = !!selectedCsi;
const [form] = Form.useForm(); const [form] = Form.useForm();
const handleFinish = (values) => { const handleFinish = (values) => {};
console.log("values :>> ", values);
};
return ( return (
<div> <div>

View File

@@ -467,6 +467,19 @@ export default function ShopInfoGeneral({ form }) {
> >
<Switch /> <Switch />
</Form.Item> </Form.Item>
<Form.Item
name={["md_email_cc", "parts_order"]}
label={t("bodyshop.fields.md_email_cc", { template: "parts_order" })}
rules={[
{
required: true,
//message: t("general.validation.required"),
type: "array",
},
]}
>
<Select mode="tags" />
</Form.Item>
<Form.Item <Form.Item
name={["tt_allow_post_to_invoiced"]} name={["tt_allow_post_to_invoiced"]}
label={t("bodyshop.fields.tt_allow_post_to_invoiced")} label={t("bodyshop.fields.tt_allow_post_to_invoiced")}

View File

@@ -344,10 +344,6 @@ export default function ShopInfoROStatusComponent({ form }) {
const ColorPicker = ({ value, onChange, style, ...restProps }) => { const ColorPicker = ({ value, onChange, style, ...restProps }) => {
const handleChange = (color) => { const handleChange = (color) => {
console.log(
"🚀 ~ file: shop-info.rostatus.component.jsx ~ line 345 ~ color",
color
);
if (onChange) onChange(color.rgb); if (onChange) onChange(color.rgb);
}; };
return ( return (

View File

@@ -116,11 +116,10 @@ export function TimeTicketModalComponent({
<EmployeeSearchSelect <EmployeeSearchSelect
options={employeeAutoCompleteOptions} options={employeeAutoCompleteOptions}
onSelect={(value) => { onSelect={(value) => {
console.log(value);
const emps = const emps =
employeeAutoCompleteOptions && employeeAutoCompleteOptions &&
employeeAutoCompleteOptions.filter((e) => e.id === value)[0]; employeeAutoCompleteOptions.filter((e) => e.id === value)[0];
console.log(emps);
form.setFieldsValue({ flat_rate: emps && emps.flat_rate }); form.setFieldsValue({ flat_rate: emps && emps.flat_rate });
}} }}
/> />

View File

@@ -37,10 +37,9 @@ export function UserValidatePwReset({
async function checkCodeValid() { async function checkCodeValid() {
try { try {
const codeValid = await checkActionCode(auth, oobCode); const codeValid = await checkActionCode(auth, oobCode);
console.log("codeValid :>> ", codeValid);
setCodeValid({ loading: false, ...codeValid }); setCodeValid({ loading: false, ...codeValid });
} catch (error) { } catch (error) {
console.log("error :>> ", error);
setCodeValid({ loading: false, ...error }); setCodeValid({ loading: false, ...error });
} }
} }

View File

@@ -37,7 +37,7 @@ export function VendorsPhonebookAdd({ form, bodyshop, disabled }) {
"zip", "zip",
"country", "country",
]); ]);
console.log(`VendorValues`, VendorValues);
const result = await insertPhonebook({ const result = await insertPhonebook({
variables: { variables: {
phonebook_entry: [ phonebook_entry: [

View File

@@ -99,6 +99,7 @@ export const QUERY_BODYSHOP = gql`
pbs_configuration pbs_configuration
pbs_serialnumber pbs_serialnumber
md_filehandlers md_filehandlers
md_email_cc
employees { employees {
user_email user_email
id id
@@ -195,6 +196,7 @@ export const UPDATE_SHOP = gql`
pbs_configuration pbs_configuration
pbs_serialnumber pbs_serialnumber
md_filehandlers md_filehandlers
md_email_cc
employees { employees {
id id
first_name first_name

View File

@@ -58,7 +58,7 @@ export default class Home extends React.Component {
}, 500); }, 500);
} }
/* 如果不是 dva 2.0 请删除 end */ /* 如果不是 dva 2.0 请删除 end */
console.log("Setting $crisp segments", ["lead"]);
window.$crisp.push(["set", "session:segments", [["lead"]]]); window.$crisp.push(["set", "session:segments", [["lead"]]]);
window.$crisp.push([ window.$crisp.push([
"set", "set",

View File

@@ -124,11 +124,6 @@ export function ContractDetailPageContainer({
if (loading) return <LoadingSpinner />; if (loading) return <LoadingSpinner />;
if (!!!data.cccontracts_by_pk) return <NotFound />; if (!!!data.cccontracts_by_pk) return <NotFound />;
console.log(
"data.cccontracts_by_pk",
!!!data.cccontracts_by_pk,
data.cccontracts_by_pk
);
return ( return (
<RbacWrapper action="contracts:detail"> <RbacWrapper action="contracts:detail">

View File

@@ -92,7 +92,7 @@ export function CsiContainerPage({ currentUser }) {
/> />
</Layout> </Layout>
); );
console.log(bodyshop);
return ( return (
<Layout <Layout
style={{ height: "100vh", display: "flex", flexDirection: "column" }} style={{ height: "100vh", display: "flex", flexDirection: "column" }}

View File

@@ -1,6 +1,6 @@
import { import {
PaymentRequestButtonElement, PaymentRequestButtonElement,
useStripe useStripe,
} from "@stripe/react-stripe-js"; } from "@stripe/react-stripe-js";
import React, { useEffect, useState } from "react"; import React, { useEffect, useState } from "react";
@@ -10,7 +10,6 @@ export default function MobilePaymentComponent() {
const [paymentRequest, setPaymentRequest] = useState(null); const [paymentRequest, setPaymentRequest] = useState(null);
useEffect(() => { useEffect(() => {
if (stripe) { if (stripe) {
console.log("in useeff");
const pr = stripe.paymentRequest({ const pr = stripe.paymentRequest({
country: "CA", country: "CA",
displayItems: [{ label: "Deductible", amount: 1 }], displayItems: [{ label: "Deductible", amount: 1 }],
@@ -23,10 +22,8 @@ export default function MobilePaymentComponent() {
requestPayerEmail: true, requestPayerEmail: true,
}); });
console.log("pr", pr);
// Check the availability of the Payment Request API. // Check the availability of the Payment Request API.
pr.canMakePayment().then((result) => { pr.canMakePayment().then((result) => {
console.log("result", result);
if (result) { if (result) {
setPaymentRequest(pr); setPaymentRequest(pr);
} else { } else {
@@ -45,7 +42,7 @@ export default function MobilePaymentComponent() {
if (paymentRequest) { if (paymentRequest) {
paymentRequest.on("paymentmethod", async (ev) => { paymentRequest.on("paymentmethod", async (ev) => {
//Call server side to get the client secret //Call server side to get the client secret
// Confirm the PaymentIntent without handling potential next actions (yet). // Confirm the PaymentIntent without handling potential next actions (yet).
const { error: confirmError } = await stripe.confirmCardPayment( const { error: confirmError } = await stripe.confirmCardPayment(
"clientSecret", "clientSecret",
@@ -63,14 +60,13 @@ export default function MobilePaymentComponent() {
// it to close the browser payment method collection interface. // it to close the browser payment method collection interface.
ev.complete("success"); ev.complete("success");
// Let Stripe.js handle the rest of the payment flow. // Let Stripe.js handle the rest of the payment flow.
const { error, paymentIntent } = await stripe.confirmCardPayment( const {
"clientSecret" error, //paymentIntent
); } = await stripe.confirmCardPayment("clientSecret");
if (error) { if (error) {
// The payment failed -- ask your customer for a new payment method. // The payment failed -- ask your customer for a new payment method.
} else { } else {
// The payment has succeeded. // The payment has succeeded.
console.log('paymentIntent', paymentIntent)
} }
} }
}); });

View File

@@ -120,8 +120,6 @@ export function* calculateScheduleLoad({ payload: end }) {
yield put(scheduleLoadSuccess(load)); yield put(scheduleLoadSuccess(load));
} catch (error) { } catch (error) {
//console.log("Error in sendEmailFailure saga.", error.message);
console.log("error", error);
yield put(scheduleLoadFailure(error)); yield put(scheduleLoadFailure(error));
} }
} }
@@ -139,14 +137,7 @@ export function* insertAuditTrailSaga({
const state = yield select(); const state = yield select();
const bodyshop = state.user.bodyshop; const bodyshop = state.user.bodyshop;
const currentUser = state.user.currentUser; const currentUser = state.user.currentUser;
console.log(
"Inserting audit trail for",
bodyshop.shopname,
currentUser.email,
jobid,
billid,
operation
);
const variables = { const variables = {
auditObj: { auditObj: {
bodyshopid: bodyshop.id, bodyshopid: bodyshop.id,

View File

@@ -178,13 +178,13 @@ export function* signInSuccessSaga({ payload }) {
try { try {
// window.$crisp.push(["set", "user:email", [payload.email]]); // window.$crisp.push(["set", "user:email", [payload.email]]);
console.log("$crisp set nickname", [payload.displayName || payload.email]);
window.$crisp.push([ window.$crisp.push([
"set", "set",
"user:nickname", "user:nickname",
[payload.displayName || payload.email], [payload.displayName || payload.email],
]); ]);
console.log("Setting $crisp segments", ["user"]);
window.$crisp.push(["set", "session:segments", [["user"]]]); window.$crisp.push(["set", "session:segments", [["user"]]]);
Sentry.setUser({ Sentry.setUser({
@@ -235,7 +235,6 @@ export function* validatePasswordResetStart({ payload: { password, code } }) {
yield confirmPasswordReset(auth, code, password); yield confirmPasswordReset(auth, code, password);
yield put(validatePasswordResetSuccess()); yield put(validatePasswordResetSuccess());
} catch (error) { } catch (error) {
console.log("function*validatePasswordResetStart -> error", error);
yield put(validatePasswordResetFailure(error.message)); yield put(validatePasswordResetFailure(error.message));
} }
} }
@@ -267,7 +266,6 @@ export function* SetAuthLevelFromShopDetails({ payload }) {
try { try {
window.$crisp.push(["set", "user:company", [payload.shopname]]); window.$crisp.push(["set", "user:company", [payload.shopname]]);
if (authRecord[0] && authRecord[0].user.validemail) { if (authRecord[0] && authRecord[0].user.validemail) {
console.log("$crisp user email", authRecord[0].user.email);
window.$crisp.push(["set", "user:email", [authRecord[0].user.email]]); window.$crisp.push(["set", "user:email", [authRecord[0].user.email]]);
} }
} catch (error) { } catch (error) {

View File

@@ -271,6 +271,7 @@
"md_ccc_rates": "Courtesy Car Contract Rate Presets", "md_ccc_rates": "Courtesy Car Contract Rate Presets",
"md_classes": "Classes", "md_classes": "Classes",
"md_ded_notes": "Deductible Notes", "md_ded_notes": "Deductible Notes",
"md_email_cc": "Auto Email CC: $t(printcenter.subjects.jobs.{{template}})",
"md_hour_split": { "md_hour_split": {
"paint": "Paint Hour Split", "paint": "Paint Hour Split",
"prep": "Prep Hour Split" "prep": "Prep Hour Split"

View File

@@ -271,6 +271,7 @@
"md_ccc_rates": "", "md_ccc_rates": "",
"md_classes": "", "md_classes": "",
"md_ded_notes": "", "md_ded_notes": "",
"md_email_cc": "",
"md_hour_split": { "md_hour_split": {
"paint": "", "paint": "",
"prep": "" "prep": ""

View File

@@ -271,6 +271,7 @@
"md_ccc_rates": "", "md_ccc_rates": "",
"md_classes": "", "md_classes": "",
"md_ded_notes": "", "md_ded_notes": "",
"md_email_cc": "",
"md_hour_split": { "md_hour_split": {
"paint": "", "paint": "",
"prep": "" "prep": ""

View File

@@ -195,7 +195,6 @@ export const GenerateDocuments = async (templates) => {
}; };
const fetchContextData = async (templateObject) => { const fetchContextData = async (templateObject) => {
console.log("Fetching context data", templateObject);
const bodyshop = store.getState().user.bodyshop; const bodyshop = store.getState().user.bodyshop;
jsreport.headers["Authorization"] = jsreport.headers["Authorization"] =

View File

@@ -829,6 +829,7 @@
- md_ccc_rates - md_ccc_rates
- md_classes - md_classes
- md_ded_notes - md_ded_notes
- md_email_cc
- md_estimators - md_estimators
- md_filehandlers - md_filehandlers
- md_hour_split - md_hour_split
@@ -908,6 +909,7 @@
- md_ccc_rates - md_ccc_rates
- md_classes - md_classes
- md_ded_notes - md_ded_notes
- md_email_cc
- md_estimators - md_estimators
- md_filehandlers - md_filehandlers
- md_hour_split - md_hour_split

View File

@@ -0,0 +1,4 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- alter table "public"."bodyshops" add column "md_email_cc" jsonb
-- null default jsonb_build_object();

View File

@@ -0,0 +1,2 @@
alter table "public"."bodyshops" add column "md_email_cc" jsonb
null default jsonb_build_object();

View File

@@ -54,18 +54,21 @@ exports.default = async function (socket, { txEnvelope, jobid }) {
const DMSVehCustomer = const DMSVehCustomer =
socket.DMSVeh && socket.DMSVeh &&
socket.DMSVeh.owners &&
socket.DMSVeh.owners.find((o) => o.id.assigningPartyId === "CURRENT"); socket.DMSVeh.owners.find((o) => o.id.assigningPartyId === "CURRENT");
CdkBase.createLogEvent( if (DMSVehCustomer && DMSVehCustomer.id && DMSVehCustomer.id.value) {
socket, CdkBase.createLogEvent(
"DEBUG", socket,
`{2.2} Querying the Customer using the ID from DMSVeh: ${DMSVehCustomer.id.value}` "DEBUG",
); `{2.2} Querying the Customer using the ID from DMSVeh: ${DMSVehCustomer.id.value}`
socket.DMSVehCustomer = await QueryDmsCustomerById( );
socket, socket.DMSVehCustomer = await QueryDmsCustomerById(
JobData, socket,
DMSVehCustomer.id.value JobData,
); DMSVehCustomer.id.value
);
}
} }
CdkBase.createLogEvent( CdkBase.createLogEvent(
@@ -771,26 +774,44 @@ async function UpdateDmsVehicle(socket) {
let ids = []; let ids = [];
const existingOwnerinVeh = socket.DMSVeh.owners.filter( const existingOwnerinVeh =
(o) => o.id.value === socket.DMSCust.id.value socket.DMSVeh &&
); socket.DMSVeh.owners &&
socket.DMSVeh.owners.find((o) => o.id.value === socket.DMSCust.id.value);
if (existingOwnerinVeh) { if (existingOwnerinVeh) {
ids = socket.DMSVeh.owners.filter( ids = socket.DMSVeh.owners.map((o) => {
(o) => o.id.value === socket.DMSCust.id.value return {
); id: {
assigningPartyId:
o.id.value === socket.dmsCust.id.value ? "CURRENT" : "PREVIOUS",
value: o.id.value,
},
};
});
} else { } else {
const oldOwner =
socket.DMSVeh &&
socket.DMSVeh.owners &&
socket.DMSVeh.owners.find((o) => o.id.assigningPartyId === "CURRENT");
ids = [ ids = [
{ {
assigningPartyId: "CURRENT", id: {
value: socket.DMSCust.id.value, assigningPartyId: "CURRENT",
value: socket.DMSCust.id.value,
},
}, },
...socket.DMSVeh.owners.map((o) => { ...(oldOwner
return { ? [
assigningPartyId: "PREVIOUS", {
value: o.id.value, id: {
}; assigningPartyId: "PREVIOUS",
}), value: oldOwner.id.value,
},
},
]
: []),
]; ];
} }
@@ -812,7 +833,7 @@ async function UpdateDmsVehicle(socket) {
socket.DMSVeh.vehicle.deliveryDate socket.DMSVeh.vehicle.deliveryDate
).toISOString(), ).toISOString(),
}, },
owners: { ids: ids }, owners: ids,
}, },
arg3: "VEHICLES", arg3: "VEHICLES",
}); });
@@ -866,9 +887,9 @@ async function InsertServiceVehicleHistory(socket) {
roNumber: socket.JobData.ro_number.match(/\d+/g), roNumber: socket.JobData.ro_number.match(/\d+/g),
mileage: socket.txEnvelope.kmout, mileage: socket.txEnvelope.kmout,
openDate: moment(socket.JobData.actual_in).format("YYYY-MM-DD"), openDate: moment(socket.JobData.actual_in).format("YYYY-MM-DD"),
openTime: moment(socket.JobData.actual_in).format("HH:MM:ss"), openTime: moment(socket.JobData.actual_in).format("HH:mm:ss"),
closeDate: moment(socket.JobData.invoice_date).format("YYYY-MM-DD"), closeDate: moment(socket.JobData.invoice_date).format("YYYY-MM-DD"),
closeTime: moment(socket.JobData.invoice_date).format("HH:MM:ss"), closeTime: moment(socket.JobData.invoice_date).format("HH:mm:ss"),
comments: socket.txEnvelope.story, comments: socket.txEnvelope.story,
cashierID: socket.JobData.bodyshop.cdk_configuration.cashierid, cashierID: socket.JobData.bodyshop.cdk_configuration.cashierid,
}, },