diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index d6fc28db9..93d42f810 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -15374,6 +15374,27 @@ + + sizelimit + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + @@ -44929,6 +44950,27 @@ signinerror + + auth/user-disabled + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + auth/user-not-found false diff --git a/client/src/components/documents-upload/documents-upload.utility.js b/client/src/components/documents-upload/documents-upload.utility.js index 9e39c8cf9..48a83c7de 100644 --- a/client/src/components/documents-upload/documents-upload.utility.js +++ b/client/src/components/documents-upload/documents-upload.utility.js @@ -54,7 +54,7 @@ export const uploadToCloudinary = async ( //Set variables for getting the signed URL. let timestamp = Math.floor(Date.now() / 1000); let public_id = key; - let tags = `${bodyshop.textid},${ + let tags = `${bodyshop.imexshopid},${ tagsArray ? tagsArray.map((tag) => `${tag},`) : "" }`; // let eager = process.env.REACT_APP_CLOUDINARY_THUMB_TRANSFORMATIONS; diff --git a/client/src/components/email-documents/email-documents.component.jsx b/client/src/components/email-documents/email-documents.component.jsx index abbcfea0d..7b3f393ae 100644 --- a/client/src/components/email-documents/email-documents.component.jsx +++ b/client/src/components/email-documents/email-documents.component.jsx @@ -38,6 +38,12 @@ export function EmailDocumentsComponent({ nextFetchPolicy: "network-only", }); + console.log( + selectedMedia && + selectedMedia + .filter((s) => s.isSelected) + .reduce((acc, val) => (acc = acc + val.size), 0) + ); return (
{loading && } @@ -45,6 +51,12 @@ export function EmailDocumentsComponent({ {selectedMedia.filter((s) => s.isSelected).length >= 10 ? (
{t("messaging.labels.maxtenimages")}
) : null} + {selectedMedia && + selectedMedia + .filter((s) => s.isSelected) + .reduce((acc, val) => (acc = acc + val.size), 0) >= 9961472 ? ( +
{t("general.errors.sizelimit")}
+ ) : null} {data && ( ({ + validator(rule, value) { + const totalSize = value.reduce( + (acc, val) => (acc = acc + val.size), + 0 + ); + + const limit = 9961472; + + if (totalSize > limit) { + return Promise.reject(t("general.errors.sizelimit")); + } + return Promise.resolve(); + }, + }), + ]} > getDerivedStateFromError -> error", error); + return { hasErrored: true, error: error }; } diff --git a/client/src/components/jobs-documents-gallery/jobs-documents-gallery.external.component.jsx b/client/src/components/jobs-documents-gallery/jobs-documents-gallery.external.component.jsx index 278fe59d9..fe23d8ceb 100644 --- a/client/src/components/jobs-documents-gallery/jobs-documents-gallery.external.component.jsx +++ b/client/src/components/jobs-documents-gallery/jobs-documents-gallery.external.component.jsx @@ -25,6 +25,7 @@ function JobsDocumentGalleryExternal({ id: value.id, type: value.type, tags: [{ value: value.type, title: value.type }], + size: value.size, }); } diff --git a/client/src/components/owner-find-modal/owner-find-modal.container.jsx b/client/src/components/owner-find-modal/owner-find-modal.container.jsx index e79a450cf..9f1397ba1 100644 --- a/client/src/components/owner-find-modal/owner-find-modal.container.jsx +++ b/client/src/components/owner-find-modal/owner-find-modal.container.jsx @@ -31,7 +31,7 @@ export default function OwnerFindModalContainer({ useEffect(() => { if (modalProps.visible && owner) { - const s = OwnerNameDisplayFunction(owner); + const s = OwnerNameDisplayFunction(owner, true); setSearchText(s.trim()); callSearchowners({ variables: { search: s.trim() } }); diff --git a/client/src/components/owner-name-display/owner-name-display.component.jsx b/client/src/components/owner-name-display/owner-name-display.component.jsx index e22065df1..a7e59067d 100644 --- a/client/src/components/owner-name-display/owner-name-display.component.jsx +++ b/client/src/components/owner-name-display/owner-name-display.component.jsx @@ -27,7 +27,7 @@ export function OwnerNameDisplay({ bodyshop, ownerObject }) { }`.trim(); } -export function OwnerNameDisplayFunction(ownerObject) { +export function OwnerNameDisplayFunction(ownerObject, forceFirstLast = false) { const emptyTest = ownerObject.ownr_fn + ownerObject.ownr_ln + ownerObject.ownr_co_nm; @@ -36,7 +36,7 @@ export function OwnerNameDisplayFunction(ownerObject) { const rdxStore = store.getState(); - if (rdxStore.user.bodyshop.last_name_first) + if (rdxStore.user.bodyshop.last_name_first && !forceFirstLast) return `${ownerObject.ownr_ln || ""}, ${ownerObject.ownr_fn || ""} ${ ownerObject.ownr_co_nm || "" }`.trim(); diff --git a/client/src/components/time-tickets-summary-employees/time-tickets-summary-employees.component.jsx b/client/src/components/time-tickets-summary-employees/time-tickets-summary-employees.component.jsx index 8ba00d309..da4e1bbab 100644 --- a/client/src/components/time-tickets-summary-employees/time-tickets-summary-employees.component.jsx +++ b/client/src/components/time-tickets-summary-employees/time-tickets-summary-employees.component.jsx @@ -146,7 +146,8 @@ const JobRelatedTicketsTable = ({ title: t("employees.labels.name"), dataIndex: "empname", key: "empname", - sorter: (a, b) => alphaSort(a.empname, b.empname), + sorter: (a, b) => + alphaSort(a.item.employee.last_name, b.item.employee.last_name), sortOrder: state.sortedInfo.columnKey === "empname" && state.sortedInfo.order, render: (text, record) => @@ -172,7 +173,9 @@ const JobRelatedTicketsTable = ({ title: t("timetickets.fields.efficiency"), dataIndex: "total", key: "total", - sorter: (a, b) => a.total - b.total, + sorter: (a, b) => + (a.actHrs === 0 || !a.actHrs ? 0 : (a.prodHrs / a.actHrs) * 100) - + (b.actHrs === 0 || !b.actHrs ? 0 : (b.prodHrs / b.actHrs) * 100), sortOrder: state.sortedInfo.columnKey === "total" && state.sortedInfo.order, render: (text, record) => diff --git a/client/src/pages/manage/manage.page.component.jsx b/client/src/pages/manage/manage.page.component.jsx index 82017ffae..97f8cb71c 100644 --- a/client/src/pages/manage/manage.page.component.jsx +++ b/client/src/pages/manage/manage.page.component.jsx @@ -24,6 +24,8 @@ import { selectBodyshop, selectInstanceConflict, } from "../../redux/user/user.selectors"; +import * as Sentry from "@sentry/react"; + import "./manage.page.styles.scss"; const ManageRootPage = lazy(() => @@ -407,7 +409,10 @@ export function Manage({ match, conflict, bodyshop }) { - {PageContent} + } showDialog> + {PageContent} + +