From 9ff9baa78ccdbd213ebb3ad0e298cb28383bd3ca Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Wed, 2 Jun 2021 08:49:10 -0700 Subject: [PATCH] IO-1096 Added order by to Parts Order --- bodyshop_translations.babel | 21 +++++++++ .../chat-conversation-title.component.jsx | 27 +++++------ .../chat-tag-ro/chat-tag-ro.component.jsx | 46 +++++++++---------- .../job-documents.utility.js | 2 +- .../jobs-documents-gallery.component.jsx | 1 - .../parts-order-list-table.component.jsx | 6 +++ .../parts-order-modal.component.jsx | 1 + .../parts-order-modal.container.jsx | 1 + client/src/graphql/bills.queries.js | 2 +- client/src/translations/en_us/common.json | 1 + client/src/translations/es/common.json | 1 + client/src/translations/fr/common.json | 1 + .../down.yaml | 5 ++ .../up.yaml | 6 +++ .../down.yaml | 5 ++ .../up.yaml | 5 ++ .../down.yaml | 5 ++ .../up.yaml | 10 ++++ .../down.yaml | 37 +++++++++++++++ .../up.yaml | 38 +++++++++++++++ .../down.yaml | 38 +++++++++++++++ .../up.yaml | 39 ++++++++++++++++ .../down.yaml | 36 +++++++++++++++ .../up.yaml | 37 +++++++++++++++ .../down.yaml | 30 ++++++++++++ .../up.yaml | 31 +++++++++++++ .../down.yaml | 29 ++++++++++++ .../up.yaml | 30 ++++++++++++ hasura/migrations/metadata.yaml | 17 ++++--- 29 files changed, 461 insertions(+), 47 deletions(-) create mode 100644 hasura/migrations/1622647828371_alter_table_public_conversations_add_column_archived/down.yaml create mode 100644 hasura/migrations/1622647828371_alter_table_public_conversations_add_column_archived/up.yaml create mode 100644 hasura/migrations/1622648039058_alter_table_public_parts_orders_add_column_orderedby/down.yaml create mode 100644 hasura/migrations/1622648039058_alter_table_public_parts_orders_add_column_orderedby/up.yaml create mode 100644 hasura/migrations/1622648063952_set_fk_public_parts_orders_orderedby/down.yaml create mode 100644 hasura/migrations/1622648063952_set_fk_public_parts_orders_orderedby/up.yaml create mode 100644 hasura/migrations/1622648072730_update_permission_user_public_table_parts_orders/down.yaml create mode 100644 hasura/migrations/1622648072730_update_permission_user_public_table_parts_orders/up.yaml create mode 100644 hasura/migrations/1622648079209_update_permission_user_public_table_parts_orders/down.yaml create mode 100644 hasura/migrations/1622648079209_update_permission_user_public_table_parts_orders/up.yaml create mode 100644 hasura/migrations/1622648087365_update_permission_user_public_table_parts_orders/down.yaml create mode 100644 hasura/migrations/1622648087365_update_permission_user_public_table_parts_orders/up.yaml create mode 100644 hasura/migrations/1622648112396_update_permission_user_public_table_conversations/down.yaml create mode 100644 hasura/migrations/1622648112396_update_permission_user_public_table_conversations/up.yaml create mode 100644 hasura/migrations/1622648118751_update_permission_user_public_table_conversations/down.yaml create mode 100644 hasura/migrations/1622648118751_update_permission_user_public_table_conversations/up.yaml 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/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/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/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({