From 6703bc025d524a81982163b57c19d3e951befa1f Mon Sep 17 00:00:00 2001 From: Dave Richer Date: Tue, 12 Nov 2024 14:51:50 -0800 Subject: [PATCH 1/3] feature/IO-3026-Enhanced-Notifications - final revisions Signed-off-by: Dave Richer --- .../pages/manage/manage.page.component.jsx | 46 ------------------- 1 file changed, 46 deletions(-) diff --git a/client/src/pages/manage/manage.page.component.jsx b/client/src/pages/manage/manage.page.component.jsx index 065fe7b46..6dfd8af6e 100644 --- a/client/src/pages/manage/manage.page.component.jsx +++ b/client/src/pages/manage/manage.page.component.jsx @@ -179,52 +179,6 @@ export function Manage({ conflict, bodyshop, alerts, setAlerts }) { } }, [alerts, displayedAlertIds]); - // useEffect(() => { - // const fetchAlerts = async () => { - // try { - // const response = await fetch(ALERT_FILE_URL); - // - // // Check if the response is OK (status in the range 200-299) - // if (!response.ok) { - // console.error(`Network response was not ok: ${response.status} ${response.statusText}`); - // return; // Exit the function early since we can't proceed - // } - // - // const alerts = await response.json(); - // - // // Check if alerts is an array - // if (!Array.isArray(alerts)) { - // console.error("Alerts data is not an array"); - // return; - // } - // - // const displayedAlerts = JSON.parse(localStorage.getItem("displayedAlerts") || "[]"); - // const alertsNotDisplayed = alerts.filter((alert) => !displayedAlerts.includes(alert.id)); - // - // // Display notifications for alerts not yet displayed - // alertsNotDisplayed.forEach((alert) => { - // // Update localStorage immediately to prevent duplicate notifications - // displayedAlerts.push(alert.id); - // localStorage.setItem("displayedAlerts", JSON.stringify(displayedAlerts)); - // - // notification.open({ - // key: "notification-alerts-" + alert.id, - // message: alert.message, - // description: alert.description, - // type: alert.type || "info", - // duration: 0, - // placement: "bottomRight", - // closable: true - // }); - // }); - // } catch (error) { - // console.error("Error fetching alerts:", error); - // } - // }; - // - // fetchAlerts(); - // }, []); - useEffect(() => { const widgetId = InstanceRenderManager({ imex: "IABVNO4scRKY11XBQkNr", From 5b267f03b9f36bd7594349b66cc46babbc361f70 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Tue, 12 Nov 2024 20:21:43 -0800 Subject: [PATCH 2/3] Add additional GIN indexes for db. --- .../1731471670370_run_sql_migration/down.sql | 10 ++++++++++ .../migrations/1731471670370_run_sql_migration/up.sql | 8 ++++++++ 2 files changed, 18 insertions(+) create mode 100644 hasura/migrations/1731471670370_run_sql_migration/down.sql create mode 100644 hasura/migrations/1731471670370_run_sql_migration/up.sql diff --git a/hasura/migrations/1731471670370_run_sql_migration/down.sql b/hasura/migrations/1731471670370_run_sql_migration/down.sql new file mode 100644 index 000000000..923cf39ca --- /dev/null +++ b/hasura/migrations/1731471670370_run_sql_migration/down.sql @@ -0,0 +1,10 @@ +-- Could not auto-generate a down migration. +-- Please write an appropriate down migration for the SQL below: +-- CREATE INDEX jobs_search_gin_ro_number ON jobs USING GIN ((ro_number) gin_trgm_ops); +-- CREATE INDEX jobs_search_gin_ownrfn ON jobs USING GIN ((ownr_fn) gin_trgm_ops); +-- CREATE INDEX jobs_search_gin_clm_no ON jobs USING GIN ((clm_no) gin_trgm_ops); +-- CREATE INDEX jobs_search_gin_plate_no ON jobs USING GIN ((plate_no) gin_trgm_ops); +-- CREATE INDEX jobs_search_gin_v_make_desc ON jobs USING GIN (( v_make_desc) gin_trgm_ops); +-- CREATE INDEX jobs_search_gin_v_model_desc ON jobs USING GIN (( v_model_desc) gin_trgm_ops); +-- CREATE INDEX jobs_search_gin_ownr_ln ON jobs USING GIN (( ownr_ln) gin_trgm_ops); +-- CREATE INDEX jobs_search_gin_ownr_co_nm ON jobs USING GIN (( ownr_co_nm) gin_trgm_ops); diff --git a/hasura/migrations/1731471670370_run_sql_migration/up.sql b/hasura/migrations/1731471670370_run_sql_migration/up.sql new file mode 100644 index 000000000..4b5ab065f --- /dev/null +++ b/hasura/migrations/1731471670370_run_sql_migration/up.sql @@ -0,0 +1,8 @@ +CREATE INDEX jobs_search_gin_ro_number ON jobs USING GIN ((ro_number) gin_trgm_ops); + CREATE INDEX jobs_search_gin_ownrfn ON jobs USING GIN ((ownr_fn) gin_trgm_ops); + CREATE INDEX jobs_search_gin_clm_no ON jobs USING GIN ((clm_no) gin_trgm_ops); + CREATE INDEX jobs_search_gin_plate_no ON jobs USING GIN ((plate_no) gin_trgm_ops); + CREATE INDEX jobs_search_gin_v_make_desc ON jobs USING GIN (( v_make_desc) gin_trgm_ops); + CREATE INDEX jobs_search_gin_v_model_desc ON jobs USING GIN (( v_model_desc) gin_trgm_ops); + CREATE INDEX jobs_search_gin_ownr_ln ON jobs USING GIN (( ownr_ln) gin_trgm_ops); + CREATE INDEX jobs_search_gin_ownr_co_nm ON jobs USING GIN (( ownr_co_nm) gin_trgm_ops); From bddeae945c8931ab345f0c21d90bfa0bb45d6935 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Wed, 13 Nov 2024 10:06:01 -0800 Subject: [PATCH 3/3] IO-3028 Word Wrap Line Description Signed-off-by: Allan Carr --- .../src/components/job-detail-lines/job-lines.component.jsx | 3 +-- .../job-lines-upsert-modal.component.jsx | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/client/src/components/job-detail-lines/job-lines.component.jsx b/client/src/components/job-detail-lines/job-lines.component.jsx index 984455466..070798452 100644 --- a/client/src/components/job-detail-lines/job-lines.component.jsx +++ b/client/src/components/job-detail-lines/job-lines.component.jsx @@ -118,8 +118,7 @@ export function JobLinesComponent({ ...(record.critical ? { boxShadow: " -.5em 0 0 #FFC107" } : {}) } }), - sortOrder: state.sortedInfo.columnKey === "line_desc" && state.sortedInfo.order, - ellipsis: true + sortOrder: state.sortedInfo.columnKey === "line_desc" && state.sortedInfo.order }, { title: t("joblines.fields.oem_partno"), diff --git a/client/src/components/job-lines-upsert-modal/job-lines-upsert-modal.component.jsx b/client/src/components/job-lines-upsert-modal/job-lines-upsert-modal.component.jsx index e07c54606..668452b9a 100644 --- a/client/src/components/job-lines-upsert-modal/job-lines-upsert-modal.component.jsx +++ b/client/src/components/job-lines-upsert-modal/job-lines-upsert-modal.component.jsx @@ -1,10 +1,10 @@ +import { useSplitTreatments } from "@splitsoftware/splitio-react"; import { Form, Input, InputNumber, Modal, Select, Switch } from "antd"; import React, { useEffect } from "react"; import { useTranslation } from "react-i18next"; import InputCurrency from "../form-items-formatted/currency-form-item.component"; -import LayoutFormRow from "../layout-form-row/layout-form-row.component"; import JoblinesPreset from "../job-lines-preset-button/job-lines-preset-button.component"; -import { useSplitTreatments } from "@splitsoftware/splitio-react"; +import LayoutFormRow from "../layout-form-row/layout-form-row.component"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -61,7 +61,7 @@ export function JobLinesUpsertModalComponent({ bodyshop, open, jobLine, handleCa ]} name="line_desc" > - +