Merged in feature/IO-3468-sentry-exceptions (pull request #2731)
Feature/IO-3468 sentry exceptions
This commit is contained in:
@@ -609,7 +609,7 @@ export function JobsDetailHeaderActions({
|
|||||||
<FormDateTimePickerComponent
|
<FormDateTimePickerComponent
|
||||||
onBlur={() => {
|
onBlur={() => {
|
||||||
const start = form.getFieldValue("start");
|
const start = form.getFieldValue("start");
|
||||||
form.setFieldsValue({ end: start.add(30, "minutes") });
|
form.setFieldsValue({ end: start?.add(30, "minutes") });
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ export function ProductionListEmpAssignment({ insertAuditTrail, bodyshop, record
|
|||||||
<Spin spinning={loading}>
|
<Spin spinning={loading}>
|
||||||
{record[type] ? (
|
{record[type] ? (
|
||||||
<div>
|
<div>
|
||||||
<span>{`${theEmployee.first_name || ""} ${theEmployee.last_name || ""}`}</span>
|
<span>{`${theEmployee?.first_name || ""} ${theEmployee?.last_name || ""}`}</span>
|
||||||
<DeleteFilled style={iconStyle} onClick={() => handleRemove(type)} />
|
<DeleteFilled style={iconStyle} onClick={() => handleRemove(type)} />
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { getFirestore } from "@firebase/firestore";
|
|||||||
import { getMessaging, getToken, onMessage } from "@firebase/messaging";
|
import { getMessaging, getToken, onMessage } from "@firebase/messaging";
|
||||||
import { store } from "../redux/store";
|
import { store } from "../redux/store";
|
||||||
//import * as amplitude from '@amplitude/analytics-browser';
|
//import * as amplitude from '@amplitude/analytics-browser';
|
||||||
import posthog from 'posthog-js'
|
// import posthog from 'posthog-js'
|
||||||
|
|
||||||
const config = JSON.parse(import.meta.env.VITE_APP_FIREBASE_CONFIG);
|
const config = JSON.parse(import.meta.env.VITE_APP_FIREBASE_CONFIG);
|
||||||
initializeApp(config);
|
initializeApp(config);
|
||||||
@@ -74,7 +74,6 @@ onMessage(messaging, (payload) => {
|
|||||||
|
|
||||||
export const logImEXEvent = (eventName, additionalParams, stateProp = null) => {
|
export const logImEXEvent = (eventName, additionalParams, stateProp = null) => {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
const state = stateProp || store.getState();
|
const state = stateProp || store.getState();
|
||||||
|
|
||||||
const eventParams = {
|
const eventParams = {
|
||||||
@@ -99,8 +98,7 @@ export const logImEXEvent = (eventName, additionalParams, stateProp = null) => {
|
|||||||
// );
|
// );
|
||||||
logEvent(analytics, eventName, eventParams);
|
logEvent(analytics, eventName, eventParams);
|
||||||
//amplitude.track(eventName, eventParams);
|
//amplitude.track(eventName, eventParams);
|
||||||
posthog.capture(eventName, eventParams);
|
//posthog.capture(eventName, eventParams);
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
//If it fails, just keep going.
|
//If it fails, just keep going.
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,8 @@ if (!import.meta.env.DEV) {
|
|||||||
"Module specifier, 'fs' does not start",
|
"Module specifier, 'fs' does not start",
|
||||||
"Module specifier, 'zlib' does not start with",
|
"Module specifier, 'zlib' does not start with",
|
||||||
"Messaging: This browser doesn't support the API's required to use the Firebase SDK.",
|
"Messaging: This browser doesn't support the API's required to use the Firebase SDK.",
|
||||||
"Failed to update a ServiceWorker for scope"
|
"Failed to update a ServiceWorker for scope",
|
||||||
|
"Network Error"
|
||||||
],
|
],
|
||||||
integrations: [
|
integrations: [
|
||||||
// See docs for support of different versions of variation of react router
|
// See docs for support of different versions of variation of react router
|
||||||
|
|||||||
@@ -24,11 +24,13 @@ const lightningCssTargets = browserslistToTargets(
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
const currentDatePST = new Date()
|
const pstFormatter = new Intl.DateTimeFormat("en-CA", {
|
||||||
.toLocaleDateString("en-US", { timeZone: "America/Los_Angeles", year: "numeric", month: "2-digit", day: "2-digit" })
|
timeZone: "America/Los_Angeles",
|
||||||
.split("/")
|
year: "numeric",
|
||||||
.reverse()
|
month: "2-digit",
|
||||||
.join("-");
|
day: "2-digit"
|
||||||
|
});
|
||||||
|
const currentDatePST = pstFormatter.format(new Date());
|
||||||
|
|
||||||
const getFormattedTimestamp = () =>
|
const getFormattedTimestamp = () =>
|
||||||
new Date().toLocaleTimeString("en-US", { hour12: true }).replace("AM", "a.m.").replace("PM", "p.m.");
|
new Date().toLocaleTimeString("en-US", { hour12: true }).replace("AM", "a.m.").replace("PM", "p.m.");
|
||||||
|
|||||||
Reference in New Issue
Block a user