Clean up console log statements.
This commit is contained in:
@@ -27,7 +27,6 @@ export const tracker = new Tracker({
|
||||
onStart: async ({ sessionID }) => {
|
||||
const user = await getCurrentUser();
|
||||
if (user) tracker.setUserID(user.email);
|
||||
console.log("ORS SESSION ", sessionID, user && user.email);
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -53,7 +53,6 @@ export function App({ checkUserSession, currentUser, online, setOnline }) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
window.addEventListener("offline", function (e) {
|
||||
console.log("Internet connection lost.");
|
||||
setOnline(false);
|
||||
});
|
||||
|
||||
|
||||
@@ -157,16 +157,6 @@ export function BillEnterModalLinesComponent({
|
||||
billlines: getFieldsValue("billlines").billlines.map(
|
||||
(item, idx) => {
|
||||
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 {
|
||||
...item,
|
||||
actual_cost: !!item.actual_cost
|
||||
|
||||
@@ -14,7 +14,6 @@ const BillLineSearchSelect = ({ options, disabled, ...restProps }, ref) => {
|
||||
showSearch
|
||||
// optionFilterProp="line_desc"
|
||||
filterOption={(inputValue, option) => {
|
||||
console.log(inputValue);
|
||||
return (
|
||||
(option.line_desc &&
|
||||
option.line_desc
|
||||
|
||||
@@ -20,7 +20,6 @@ export function ChatNewConversation({ openChatByPhone }) {
|
||||
const { t } = useTranslation();
|
||||
const [form] = Form.useForm();
|
||||
const handleFinish = (values) => {
|
||||
console.log("values :>> ", values);
|
||||
openChatByPhone({ phone_num: values.phoneNumber });
|
||||
form.resetFields();
|
||||
};
|
||||
|
||||
@@ -86,10 +86,7 @@ export function DashboardGridComponent({ currentUser, bodyshop }) {
|
||||
const handleRemoveComponent = (key) => {
|
||||
logImEXEvent("dashboard_remove_component", { name: 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);
|
||||
|
||||
items.splice(idxToRemove, 1);
|
||||
|
||||
@@ -23,7 +23,7 @@ export function DmsCdkMakesRefetch({ bodyshop, form, socket }) {
|
||||
cdk_dealerid: bodyshop.cdk_dealerid,
|
||||
bodyshopid: bodyshop.id,
|
||||
});
|
||||
console.log(response);
|
||||
|
||||
setLoading(false);
|
||||
};
|
||||
return (
|
||||
|
||||
@@ -58,11 +58,9 @@ export function DocumentEditorComponent({ currentUser, bodyshop, document }) {
|
||||
if (imgRef.current !== null) {
|
||||
// create a marker.js MarkerArea
|
||||
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
|
||||
markerArea.current.addCloseEventListener((closeEvent) => {
|
||||
console.log("Close Event", closeEvent);
|
||||
});
|
||||
markerArea.current.addCloseEventListener((closeEvent) => {});
|
||||
|
||||
markerArea.current.addRenderEventListener((dataUrl) => {
|
||||
imgRef.current.src = dataUrl;
|
||||
|
||||
@@ -14,8 +14,6 @@ var cleanAxios = axios.create();
|
||||
cleanAxios.interceptors.request.eject(axiosAuthInterceptorId);
|
||||
|
||||
export const handleUpload = (ev, context) => {
|
||||
console.log("Handling Upload", ev);
|
||||
|
||||
logImEXEvent("document_upload", { filetype: ev.file.type });
|
||||
|
||||
const { onError, onSuccess, onProgress } = ev;
|
||||
@@ -61,7 +59,7 @@ export const uploadToCloudinary = async (
|
||||
// let eager = process.env.REACT_APP_CLOUDINARY_THUMB_TRANSFORMATIONS;
|
||||
|
||||
//Get the signed url.
|
||||
console.log("fileType", fileType);
|
||||
|
||||
const upload_preset = fileType.startsWith("video")
|
||||
? "incoming_upload_video"
|
||||
: "incoming_upload";
|
||||
@@ -74,7 +72,6 @@ export const uploadToCloudinary = async (
|
||||
});
|
||||
|
||||
if (signedURLResponse.status !== 200) {
|
||||
console.log("Error Getting Signed URL", signedURLResponse.statusText);
|
||||
if (!!onError) onError(signedURLResponse.statusText);
|
||||
notification["error"]({
|
||||
message: i18n.t("documents.errors.getpresignurl", {
|
||||
@@ -113,13 +110,8 @@ export const uploadToCloudinary = async (
|
||||
...options,
|
||||
}
|
||||
);
|
||||
console.log("Upload Response", cloudinaryUploadResponse.data);
|
||||
|
||||
if (cloudinaryUploadResponse.status !== 200) {
|
||||
console.log(
|
||||
"Error uploading to cloudinary.",
|
||||
cloudinaryUploadResponse.statusText
|
||||
);
|
||||
if (!!onError) onError(cloudinaryUploadResponse.statusText);
|
||||
notification["error"]({
|
||||
message: i18n.t("documents.errors.insert", {
|
||||
|
||||
@@ -35,10 +35,6 @@ export function EmailDocumentsComponent({
|
||||
},
|
||||
skip: !emailConfig.jobid,
|
||||
});
|
||||
console.log(
|
||||
"🚀 ~ file: email-documents.component.jsx ~ line 38 ~ emailConfig",
|
||||
emailConfig
|
||||
);
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
||||
@@ -111,7 +111,6 @@ export function EmailOverlayContainer({
|
||||
notification["success"]({ message: t("emails.successes.sent") });
|
||||
toggleEmailOverlayVisible();
|
||||
} catch (error) {
|
||||
console.log(JSON.stringify(error));
|
||||
notification["error"]({
|
||||
message: t("emails.errors.notsent", { message: error.message }),
|
||||
});
|
||||
|
||||
@@ -21,7 +21,6 @@ export function EmailTestComponent({ currentUser, setEmailOptions }) {
|
||||
const [form] = Form.useForm();
|
||||
|
||||
const handleFinish = (values) => {
|
||||
console.log("values", values);
|
||||
GenerateDocument(
|
||||
{
|
||||
name: values.key,
|
||||
|
||||
@@ -18,7 +18,6 @@ export default function HelpRescue() {
|
||||
body: bodyFormData,
|
||||
}
|
||||
);
|
||||
console.log("handleClick -> res1", await res1.text());
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -40,7 +39,6 @@ export default function HelpRescue() {
|
||||
method="post"
|
||||
id="logmeinsupport"
|
||||
onSubmit={(...props) => {
|
||||
console.log(`props`, props);
|
||||
alert();
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -44,7 +44,7 @@ export function Jobd3RdPartyModal({ bodyshop, jobId }) {
|
||||
};
|
||||
const handleFinish = (values) => {
|
||||
const { sendtype, ...restVals } = values;
|
||||
console.log(restVals);
|
||||
|
||||
GenerateDocument(
|
||||
{
|
||||
name: TemplateList("job_special").thirdpartypayer.key,
|
||||
|
||||
@@ -56,7 +56,7 @@ export function ScheduleEventColor({ bodyshop, event }) {
|
||||
<Menu.Item key={"null"}>{t("general.actions.clear")}</Menu.Item>
|
||||
</Menu>
|
||||
);
|
||||
console.log(`event`, event);
|
||||
|
||||
return (
|
||||
<Dropdown overlay={menu}>
|
||||
<a href=" #" onClick={(e) => e.preventDefault()}>
|
||||
|
||||
@@ -55,7 +55,6 @@ export default function JobBillsTotalComponent({
|
||||
);
|
||||
}
|
||||
if (il.deductedfromlbr) {
|
||||
console.log(i, "Deducting from labor.");
|
||||
lbrAdjustments = lbrAdjustments.add(
|
||||
Dinero({
|
||||
amount: Math.round((il.actual_price || 0) * 100),
|
||||
|
||||
@@ -34,7 +34,7 @@ export default function JobIntakeTemplateList({ templates }) {
|
||||
const renderAllTemplates = async () => {
|
||||
logImEXEvent("checklist_render_all_templates");
|
||||
setLoading(true);
|
||||
console.log("templates :>> ", templates);
|
||||
|
||||
await GenerateDocuments(
|
||||
templates.map((key) => {
|
||||
return { name: key, variables: { id: jobId } };
|
||||
|
||||
@@ -35,7 +35,7 @@ export function JobCostingModalContainer({
|
||||
async function getData() {
|
||||
if (jobId && visible) {
|
||||
const { data } = await axios.post("/job/costing", { jobid: jobId });
|
||||
console.log(data);
|
||||
|
||||
setCostingData(data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,6 @@ export default function JobCostingPartsTable({ data, summaryData }) {
|
||||
.includes(searchText.toLowerCase())
|
||||
);
|
||||
|
||||
console.log("data :>> ", data);
|
||||
return (
|
||||
<div>
|
||||
<Table
|
||||
|
||||
@@ -42,9 +42,7 @@ export default function ScoreboardAddButton({
|
||||
}, [visibility, job.id, callQuery]);
|
||||
|
||||
useEffect(() => {
|
||||
console.log("UE", entryData);
|
||||
if (entryData && entryData.scoreboard && entryData.scoreboard[0]) {
|
||||
console.log("Setting FOrm");
|
||||
form.setFieldsValue(entryData.scoreboard[0]);
|
||||
}
|
||||
}, [entryData, form]);
|
||||
|
||||
@@ -22,7 +22,6 @@ export function JobsAdminClass({ bodyshop, job }) {
|
||||
const [updateJob] = useMutation(UPDATE_JOB);
|
||||
|
||||
const handleFinish = async (values) => {
|
||||
console.log(values);
|
||||
setLoading(true);
|
||||
const result = await updateJob({
|
||||
variables: { jobId: job.id, job: values },
|
||||
|
||||
@@ -13,7 +13,6 @@ export default function JobsAdminDatesChange({ job }) {
|
||||
const [updateJob] = useMutation(UPDATE_JOB);
|
||||
|
||||
const handleFinish = async (values) => {
|
||||
console.log(values);
|
||||
setLoading(true);
|
||||
const result = await updateJob({
|
||||
variables: { jobId: job.id, job: values },
|
||||
|
||||
@@ -10,7 +10,6 @@ export default function JobAdminOwnerReassociate({ job }) {
|
||||
const [form] = Form.useForm();
|
||||
const [updateJob] = useMutation(UPDATE_JOB);
|
||||
const handleFinish = async (values) => {
|
||||
console.log(values);
|
||||
setLoading(true);
|
||||
const result = await updateJob({
|
||||
variables: { jobId: job.id, job: { ownerid: values.ownerid } },
|
||||
|
||||
@@ -10,7 +10,6 @@ export default function JobAdminOwnerReassociate({ job }) {
|
||||
const [form] = Form.useForm();
|
||||
const [updateJob] = useMutation(UPDATE_JOB);
|
||||
const handleFinish = async (values) => {
|
||||
console.log(values);
|
||||
setLoading(true);
|
||||
const result = await updateJob({
|
||||
variables: { jobId: job.id, job: { vehicleid: values.vehicleid } },
|
||||
|
||||
@@ -3,8 +3,6 @@ import { gql } from "@apollo/client";
|
||||
import _ from "lodash";
|
||||
|
||||
export const GetSupplementDelta = async (client, jobId, newLines) => {
|
||||
console.log("-----Begin Supplement-----");
|
||||
|
||||
const {
|
||||
data: { joblines: existingLinesFromDb },
|
||||
} = await client.query({
|
||||
|
||||
@@ -19,7 +19,6 @@ export default async function DuplicateJob(
|
||||
variables: { id: jobId },
|
||||
});
|
||||
|
||||
console.log("res", res);
|
||||
const { jobs_by_pk } = res.data;
|
||||
const existingJob = _.cloneDeep(jobs_by_pk);
|
||||
delete existingJob.__typename;
|
||||
|
||||
@@ -40,7 +40,6 @@ export function JobsDocumentsGalleryReassign({ bodyshop, galleryImages }) {
|
||||
|
||||
const updateImage = async (i, jobid) => {
|
||||
//Move the cloudinary image
|
||||
console.log(i);
|
||||
|
||||
//Update it in the database.
|
||||
const result = await updateDocument({
|
||||
|
||||
@@ -29,7 +29,7 @@ export function PartnerPingComponent({ setPartnerVersion }) {
|
||||
//if (process.env.NODE_ENV === "development") return;
|
||||
const PartnerResponse = await axios.post("http://localhost:1337/ping/");
|
||||
const { appver, qbpath } = PartnerResponse.data;
|
||||
console.log("SETTING PARTNER VERSION.");
|
||||
|
||||
setPartnerVersion(appver);
|
||||
console.log({ appver, qbpath });
|
||||
if (!qbpath) {
|
||||
|
||||
@@ -60,12 +60,10 @@ export function PartsStatusPie({ bodyshop, joblines_status }) {
|
||||
[pieColor, t]
|
||||
);
|
||||
|
||||
const memoizedData = useMemo(() => Calculatedata(joblines_status), [
|
||||
joblines_status,
|
||||
Calculatedata,
|
||||
]);
|
||||
|
||||
console.log("PartsStatusPie -> memoizedData", memoizedData);
|
||||
const memoizedData = useMemo(
|
||||
() => Calculatedata(joblines_status),
|
||||
[joblines_status, Calculatedata]
|
||||
);
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
||||
@@ -71,7 +71,7 @@ export function ReportCenterModalComponent({ reportCenterModal }) {
|
||||
const start = values.dates[0];
|
||||
const end = values.dates[1];
|
||||
const { id } = values;
|
||||
console.log("values", values);
|
||||
|
||||
await GenerateDocument(
|
||||
{
|
||||
name: values.key,
|
||||
|
||||
@@ -101,7 +101,6 @@ export function ScheduleJobModalContainer({
|
||||
}
|
||||
|
||||
if (existingAppointments.data.appointments.length > 0) {
|
||||
console.log("Cancelling all previous appts.");
|
||||
await Promise.all(
|
||||
existingAppointments.data.appointments.map((app) => {
|
||||
return cancelAppointment({
|
||||
|
||||
@@ -3,12 +3,9 @@ import { Form } from "antd";
|
||||
import ConfigFormComponents from "../config-form-components/config-form-components.component";
|
||||
|
||||
export default function ShopCsiConfigForm({ selectedCsi }) {
|
||||
console.log("ShopCsiConfigForm -> selectedCsi", selectedCsi);
|
||||
const readOnly = !!selectedCsi;
|
||||
const [form] = Form.useForm();
|
||||
const handleFinish = (values) => {
|
||||
console.log("values :>> ", values);
|
||||
};
|
||||
const handleFinish = (values) => {};
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
||||
@@ -344,10 +344,6 @@ export default function ShopInfoROStatusComponent({ form }) {
|
||||
|
||||
const ColorPicker = ({ value, onChange, style, ...restProps }) => {
|
||||
const handleChange = (color) => {
|
||||
console.log(
|
||||
"🚀 ~ file: shop-info.rostatus.component.jsx ~ line 345 ~ color",
|
||||
color
|
||||
);
|
||||
if (onChange) onChange(color.rgb);
|
||||
};
|
||||
return (
|
||||
|
||||
@@ -116,11 +116,10 @@ export function TimeTicketModalComponent({
|
||||
<EmployeeSearchSelect
|
||||
options={employeeAutoCompleteOptions}
|
||||
onSelect={(value) => {
|
||||
console.log(value);
|
||||
const emps =
|
||||
employeeAutoCompleteOptions &&
|
||||
employeeAutoCompleteOptions.filter((e) => e.id === value)[0];
|
||||
console.log(emps);
|
||||
|
||||
form.setFieldsValue({ flat_rate: emps && emps.flat_rate });
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -37,10 +37,9 @@ export function UserValidatePwReset({
|
||||
async function checkCodeValid() {
|
||||
try {
|
||||
const codeValid = await checkActionCode(auth, oobCode);
|
||||
console.log("codeValid :>> ", codeValid);
|
||||
|
||||
setCodeValid({ loading: false, ...codeValid });
|
||||
} catch (error) {
|
||||
console.log("error :>> ", error);
|
||||
setCodeValid({ loading: false, ...error });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ export function VendorsPhonebookAdd({ form, bodyshop, disabled }) {
|
||||
"zip",
|
||||
"country",
|
||||
]);
|
||||
console.log(`VendorValues`, VendorValues);
|
||||
|
||||
const result = await insertPhonebook({
|
||||
variables: {
|
||||
phonebook_entry: [
|
||||
|
||||
@@ -58,7 +58,7 @@ export default class Home extends React.Component {
|
||||
}, 500);
|
||||
}
|
||||
/* 如果不是 dva 2.0 请删除 end */
|
||||
console.log("Setting $crisp segments", ["lead"]);
|
||||
|
||||
window.$crisp.push(["set", "session:segments", [["lead"]]]);
|
||||
window.$crisp.push([
|
||||
"set",
|
||||
|
||||
@@ -124,11 +124,6 @@ export function ContractDetailPageContainer({
|
||||
if (loading) return <LoadingSpinner />;
|
||||
|
||||
if (!!!data.cccontracts_by_pk) return <NotFound />;
|
||||
console.log(
|
||||
"data.cccontracts_by_pk",
|
||||
!!!data.cccontracts_by_pk,
|
||||
data.cccontracts_by_pk
|
||||
);
|
||||
|
||||
return (
|
||||
<RbacWrapper action="contracts:detail">
|
||||
|
||||
@@ -92,7 +92,7 @@ export function CsiContainerPage({ currentUser }) {
|
||||
/>
|
||||
</Layout>
|
||||
);
|
||||
console.log(bodyshop);
|
||||
|
||||
return (
|
||||
<Layout
|
||||
style={{ height: "100vh", display: "flex", flexDirection: "column" }}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {
|
||||
PaymentRequestButtonElement,
|
||||
useStripe
|
||||
useStripe,
|
||||
} from "@stripe/react-stripe-js";
|
||||
import React, { useEffect, useState } from "react";
|
||||
|
||||
@@ -10,7 +10,6 @@ export default function MobilePaymentComponent() {
|
||||
const [paymentRequest, setPaymentRequest] = useState(null);
|
||||
useEffect(() => {
|
||||
if (stripe) {
|
||||
console.log("in useeff");
|
||||
const pr = stripe.paymentRequest({
|
||||
country: "CA",
|
||||
displayItems: [{ label: "Deductible", amount: 1 }],
|
||||
@@ -23,10 +22,8 @@ export default function MobilePaymentComponent() {
|
||||
requestPayerEmail: true,
|
||||
});
|
||||
|
||||
console.log("pr", pr);
|
||||
// Check the availability of the Payment Request API.
|
||||
pr.canMakePayment().then((result) => {
|
||||
console.log("result", result);
|
||||
if (result) {
|
||||
setPaymentRequest(pr);
|
||||
} else {
|
||||
@@ -45,7 +42,7 @@ export default function MobilePaymentComponent() {
|
||||
|
||||
if (paymentRequest) {
|
||||
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).
|
||||
const { error: confirmError } = await stripe.confirmCardPayment(
|
||||
"clientSecret",
|
||||
@@ -70,7 +67,6 @@ export default function MobilePaymentComponent() {
|
||||
// The payment failed -- ask your customer for a new payment method.
|
||||
} else {
|
||||
// The payment has succeeded.
|
||||
console.log('paymentIntent', paymentIntent)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -120,8 +120,6 @@ export function* calculateScheduleLoad({ payload: end }) {
|
||||
|
||||
yield put(scheduleLoadSuccess(load));
|
||||
} catch (error) {
|
||||
//console.log("Error in sendEmailFailure saga.", error.message);
|
||||
console.log("error", error);
|
||||
yield put(scheduleLoadFailure(error));
|
||||
}
|
||||
}
|
||||
@@ -139,14 +137,7 @@ export function* insertAuditTrailSaga({
|
||||
const state = yield select();
|
||||
const bodyshop = state.user.bodyshop;
|
||||
const currentUser = state.user.currentUser;
|
||||
console.log(
|
||||
"Inserting audit trail for",
|
||||
bodyshop.shopname,
|
||||
currentUser.email,
|
||||
jobid,
|
||||
billid,
|
||||
operation
|
||||
);
|
||||
|
||||
const variables = {
|
||||
auditObj: {
|
||||
bodyshopid: bodyshop.id,
|
||||
|
||||
@@ -178,13 +178,13 @@ export function* signInSuccessSaga({ payload }) {
|
||||
|
||||
try {
|
||||
// window.$crisp.push(["set", "user:email", [payload.email]]);
|
||||
console.log("$crisp set nickname", [payload.displayName || payload.email]);
|
||||
|
||||
window.$crisp.push([
|
||||
"set",
|
||||
"user:nickname",
|
||||
[payload.displayName || payload.email],
|
||||
]);
|
||||
console.log("Setting $crisp segments", ["user"]);
|
||||
|
||||
window.$crisp.push(["set", "session:segments", [["user"]]]);
|
||||
|
||||
Sentry.setUser({
|
||||
@@ -235,7 +235,6 @@ export function* validatePasswordResetStart({ payload: { password, code } }) {
|
||||
yield confirmPasswordReset(auth, code, password);
|
||||
yield put(validatePasswordResetSuccess());
|
||||
} catch (error) {
|
||||
console.log("function*validatePasswordResetStart -> error", error);
|
||||
yield put(validatePasswordResetFailure(error.message));
|
||||
}
|
||||
}
|
||||
@@ -267,7 +266,6 @@ export function* SetAuthLevelFromShopDetails({ payload }) {
|
||||
try {
|
||||
window.$crisp.push(["set", "user:company", [payload.shopname]]);
|
||||
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]]);
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
@@ -195,7 +195,6 @@ export const GenerateDocuments = async (templates) => {
|
||||
};
|
||||
|
||||
const fetchContextData = async (templateObject) => {
|
||||
console.log("Fetching context data", templateObject);
|
||||
const bodyshop = store.getState().user.bodyshop;
|
||||
|
||||
jsreport.headers["Authorization"] =
|
||||
|
||||
Reference in New Issue
Block a user