diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 8d960bdfe..afae10463 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -26853,6 +26853,27 @@ + + orderedby + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + quantity false diff --git a/client/src/components/accounting-payments-table/accounting-payments-table.component.jsx b/client/src/components/accounting-payments-table/accounting-payments-table.component.jsx index f2a72dd92..94ca9e50b 100644 --- a/client/src/components/accounting-payments-table/accounting-payments-table.component.jsx +++ b/client/src/components/accounting-payments-table/accounting-payments-table.component.jsx @@ -54,7 +54,7 @@ export default function AccountingPayablesTableComponent({ ellipsis: true, sorter: (a, b) => alphaSort(a.job.ownr_ln, b.job.ownr_ln), sortOrder: - state.sortedInfo.columnKey === "ownr_ln" && state.sortedInfo.order, + state.sortedInfo.columnKey === "owner" && state.sortedInfo.order, render: (text, record) => { return record.job.owner ? ( diff --git a/client/src/components/chat-conversation-title/chat-conversation-title.component.jsx b/client/src/components/chat-conversation-title/chat-conversation-title.component.jsx index 61cc3147c..7fa5bf585 100644 --- a/client/src/components/chat-conversation-title/chat-conversation-title.component.jsx +++ b/client/src/components/chat-conversation-title/chat-conversation-title.component.jsx @@ -1,3 +1,4 @@ +import { Space } from "antd"; import React from "react"; import PhoneNumberFormatter from "../../utils/PhoneFormatter"; import ChatConversationTitleTags from "../chat-conversation-title-tags/chat-conversation-title-tags.component"; @@ -5,20 +6,16 @@ import ChatTagRoContainer from "../chat-tag-ro/chat-tag-ro.container"; export default function ChatConversationTitle({ conversation }) { return ( -
-
- - -
-
- - {conversation && conversation.phone_num} - -
-
+ + + {conversation && conversation.phone_num} + + + + ); } diff --git a/client/src/components/chat-tag-ro/chat-tag-ro.component.jsx b/client/src/components/chat-tag-ro/chat-tag-ro.component.jsx index 106e91393..fef423b69 100644 --- a/client/src/components/chat-tag-ro/chat-tag-ro.component.jsx +++ b/client/src/components/chat-tag-ro/chat-tag-ro.component.jsx @@ -1,5 +1,5 @@ import { CloseCircleOutlined, LoadingOutlined } from "@ant-design/icons"; -import { Select, Empty } from "antd"; +import { Select, Empty, Space } from "antd"; import React from "react"; import { useTranslation } from "react-i18next"; @@ -13,27 +13,27 @@ export default function ChatTagRoComponent({ const { t } = useTranslation(); return ( -
- + +
+ +
{loading ? : null} {loading ? ( @@ -41,6 +41,6 @@ export default function ChatTagRoComponent({ ) : ( setVisible(false)} /> )} -
+ ); } diff --git a/client/src/components/job-detail-cards/job-detail-cards.notes.component.jsx b/client/src/components/job-detail-cards/job-detail-cards.notes.component.jsx index 39b27c5f6..57fdec9ba 100644 --- a/client/src/components/job-detail-cards/job-detail-cards.notes.component.jsx +++ b/client/src/components/job-detail-cards/job-detail-cards.notes.component.jsx @@ -29,7 +29,7 @@ export default function JobDetailCardsNotesComponent({ loading, data }) { bordered dataSource={data.notes} renderItem={(item) => ( - + {item.critical ? ( ) : null} diff --git a/client/src/components/job-payments/job-payments.component.jsx b/client/src/components/job-payments/job-payments.component.jsx index eae8bc76e..fd2558492 100644 --- a/client/src/components/job-payments/job-payments.component.jsx +++ b/client/src/components/job-payments/job-payments.component.jsx @@ -8,8 +8,8 @@ import { selectJobReadOnly } from "../../redux/application/application.selectors import { setModalContext } from "../../redux/modals/modals.actions"; import { selectBodyshop } from "../../redux/user/user.selectors"; import CurrencyFormatter from "../../utils/CurrencyFormatter"; -import { DateTimeFormatter } from "../../utils/DateFormatter"; -import { alphaSort } from "../../utils/sorters"; +import { DateFormatter } from "../../utils/DateFormatter"; +import { alphaSort, dateSort } from "../../utils/sorters"; import { TemplateList } from "../../utils/TemplateConstants"; import DataLabel from "../data-label/data-label.component"; import PrintWrapperComponent from "../print-wrapper/print-wrapper.component"; @@ -40,14 +40,14 @@ export function JobPayments({ }); const columns = [ { - title: t("payments.fields.created_at"), - dataIndex: "created_at", - key: "created_at", + title: t("payments.fields.date"), + dataIndex: "date", + key: "date", + sorter: (a, b) => dateSort(a.date, b.date), + sortOrder: - state.sortedInfo.columnKey === "created_at" && state.sortedInfo.order, - render: (text, record) => ( - {record.created_at} - ), + state.sortedInfo.columnKey === "date" && state.sortedInfo.order, + render: (text, record) => {record.date}, }, { title: t("payments.fields.payer"), diff --git a/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.duplicate.util.js b/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.duplicate.util.js index 2a86cd9f7..f7f21864f 100644 --- a/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.duplicate.util.js +++ b/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.duplicate.util.js @@ -39,24 +39,20 @@ export default async function DuplicateJob( line.manual_line = true; }); newJob.joblines = keepJobLines ? _tempLines : []; - newJob.job_totals = ( - await Axios.post("/job/totals", { - job: newJob, - }) - ).data; delete newJob.joblines; newJob.joblines = keepJobLines ? { data: _tempLines } : null; - apolloClient - .mutate({ - mutation: INSERT_NEW_JOB, - variables: { job: [newJob] }, - }) - .then((res2) => { - if (completionCallback) - completionCallback(res2.data.insert_jobs.returning[0].id); - }); + const res2 = await apolloClient.mutate({ + mutation: INSERT_NEW_JOB, + variables: { job: [newJob] }, + }); + await Axios.post("/job/totalsssu", { + id: res2.data.insert_jobs.returning[0].id, + }); + + if (completionCallback) + completionCallback(res2.data.insert_jobs.returning[0].id); //insert the new job. call the callback with the returned ID when done. diff --git a/client/src/components/jobs-documents-gallery/job-documents.utility.js b/client/src/components/jobs-documents-gallery/job-documents.utility.js index 054c51063..49ac4fbef 100644 --- a/client/src/components/jobs-documents-gallery/job-documents.utility.js +++ b/client/src/components/jobs-documents-gallery/job-documents.utility.js @@ -2,7 +2,7 @@ import { DetermineFileType } from "../documents-upload/documents-upload.utility" export const GenerateSrcUrl = (value) => { let extension = value.extension; - if (extension && extension.includes("heic")) extension = "jpg"; + if (extension && extension.toLowerCase().includes("heic")) extension = "jpg"; return `${process.env.REACT_APP_CLOUDINARY_ENDPOINT}/${DetermineFileType( value.type diff --git a/client/src/components/jobs-documents-gallery/jobs-documents-gallery.component.jsx b/client/src/components/jobs-documents-gallery/jobs-documents-gallery.component.jsx index 4a543401c..2b29a7b3c 100644 --- a/client/src/components/jobs-documents-gallery/jobs-documents-gallery.component.jsx +++ b/client/src/components/jobs-documents-gallery/jobs-documents-gallery.component.jsx @@ -166,7 +166,6 @@ function JobsDocumentsComponent({ zIndex: "5", }} onClick={() => { - console.log(`Clicked`); const newWindow = window.open( `${window.location.protocol}//${window.location.host}/edit?documentId=${galleryImages.images[index].id}`, "_blank", diff --git a/client/src/components/jobs-notes/jobs.notes.component.jsx b/client/src/components/jobs-notes/jobs.notes.component.jsx index e8354b026..2f3459211 100644 --- a/client/src/components/jobs-notes/jobs.notes.component.jsx +++ b/client/src/components/jobs-notes/jobs.notes.component.jsx @@ -57,6 +57,9 @@ export function JobNotesComponent({ dataIndex: "text", key: "text", ellipsis: true, + render: (text, record) => ( + {text} + ), }, { diff --git a/client/src/components/parts-order-list-table/parts-order-list-table.component.jsx b/client/src/components/parts-order-list-table/parts-order-list-table.component.jsx index 9ae6695e5..436229c0c 100644 --- a/client/src/components/parts-order-list-table/parts-order-list-table.component.jsx +++ b/client/src/components/parts-order-list-table/parts-order-list-table.component.jsx @@ -237,6 +237,11 @@ export function PartsOrderListTableComponent({ {record.deliver_by} ), }, + { + title: t("parts_orders.fields.orderedby"), + dataIndex: "orderedby", + key: "orderedby", + }, { title: t("general.labels.actions"), dataIndex: "actions", @@ -336,6 +341,7 @@ export function PartsOrderListTableComponent({ /> ), }, + { title: t("general.labels.actions"), dataIndex: "actions", diff --git a/client/src/components/parts-order-modal/parts-order-modal.component.jsx b/client/src/components/parts-order-modal/parts-order-modal.component.jsx index 81c289d95..03f6d4edd 100644 --- a/client/src/components/parts-order-modal/parts-order-modal.component.jsx +++ b/client/src/components/parts-order-modal/parts-order-modal.component.jsx @@ -73,6 +73,7 @@ export default function PartsOrderModalComponent({