IO-3468 Add sentry exceptions & minor nul coalesce fixes.

This commit is contained in:
Patrick Fic
2025-12-16 10:28:00 -08:00
parent 6ea1c291e6
commit 182a8d59ab
5 changed files with 12 additions and 9 deletions

View File

@@ -609,7 +609,7 @@ export function JobsDetailHeaderActions({
<FormDateTimePickerComponent
onBlur={() => {
const start = form.getFieldValue("start");
form.setFieldsValue({ end: start.add(30, "minutes") });
form.setFieldsValue({ end: start?.add(30, "minutes") });
}}
/>
</Form.Item>

View File

@@ -144,7 +144,7 @@ export function ProductionListEmpAssignment({ insertAuditTrail, bodyshop, record
<Spin spinning={loading}>
{record[type] ? (
<div>
<span>{`${theEmployee.first_name || ""} ${theEmployee.last_name || ""}`}</span>
<span>{`${theEmployee?.first_name || ""} ${theEmployee?.last_name || ""}`}</span>
<DeleteFilled style={iconStyle} onClick={() => handleRemove(type)} />
</div>
) : (

View File

@@ -99,7 +99,7 @@ export const logImEXEvent = (eventName, additionalParams, stateProp = null) => {
// );
logEvent(analytics, eventName, eventParams);
//amplitude.track(eventName, eventParams);
posthog.capture(eventName, eventParams);
//posthog.capture(eventName, eventParams);
} finally {
//If it fails, just keep going.

View File

@@ -31,7 +31,8 @@ if (!import.meta.env.DEV) {
"Module specifier, 'fs' does not start",
"Module specifier, 'zlib' does not start with",
"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: [
// See docs for support of different versions of variation of react router

View File

@@ -24,11 +24,13 @@ const lightningCssTargets = browserslistToTargets(
})
);
const currentDatePST = new Date()
.toLocaleDateString("en-US", { timeZone: "America/Los_Angeles", year: "numeric", month: "2-digit", day: "2-digit" })
.split("/")
.reverse()
.join("-");
const pstFormatter = new Intl.DateTimeFormat("en-CA", {
timeZone: "America/Los_Angeles",
year: "numeric",
month: "2-digit",
day: "2-digit"
});
const currentDatePST = pstFormatter.format(new Date());
const getFormattedTimestamp = () =>
new Date().toLocaleTimeString("en-US", { hour12: true }).replace("AM", "a.m.").replace("PM", "p.m.");