diff --git a/client/src/components/parts-queue-card/parts-queue-card.component.jsx b/client/src/components/parts-queue-card/parts-queue-card.component.jsx index 3044c7e97..34c47bf77 100644 --- a/client/src/components/parts-queue-card/parts-queue-card.component.jsx +++ b/client/src/components/parts-queue-card/parts-queue-card.component.jsx @@ -1,9 +1,8 @@ import { useQuery } from "@apollo/client"; import { Card, Divider, Drawer, Grid } from "antd"; import queryString from "query-string"; -import React from "react"; import { useTranslation } from "react-i18next"; -import { Link, useNavigate, useLocation } from "react-router-dom"; +import { Link, useLocation, useNavigate } from "react-router-dom"; import { QUERY_PARTS_QUEUE_CARD_DETAILS } from "../../graphql/jobs.queries"; import AlertComponent from "../alert/alert.component"; import JobsDetailHeader from "../jobs-detail-header/jobs-detail-header.component"; diff --git a/client/src/components/parts-shop-info/parts-business-info.component.jsx b/client/src/components/parts-shop-info/parts-business-info.component.jsx new file mode 100644 index 000000000..ad119477d --- /dev/null +++ b/client/src/components/parts-shop-info/parts-business-info.component.jsx @@ -0,0 +1,129 @@ +import { Form, Input, InputNumber, Select } from "antd"; +import { useTranslation } from "react-i18next"; +import { connect } from "react-redux"; +import { createStructuredSelector } from "reselect"; +import { selectBodyshop } from "../../redux/user/user.selectors"; +import PhoneFormItem, { PhoneItemFormatterValidation } from "../form-items-formatted/phone-form-item.component"; +import LayoutFormRow from "../layout-form-row/layout-form-row.component"; + +// eslint-disable-next-line no-undef +const timeZonesList = Intl.supportedValuesOf("timeZone"); + +const mapStateToProps = createStructuredSelector({ + bodyshop: selectBodyshop +}); + +const mapDispatchToProps = () => ({}); + +export function PartsBusinessInfoComponent({ form }) { + const { t } = useTranslation(); + + return ( +
+ + + + + + + + + + + + + + + + + + + + + + + + + + PhoneItemFormatterValidation(getFieldValue, "phone")]} + > + + + + + + + + + + + + + + + + + + + + + + + + +
+ ); +} + +export default connect(mapStateToProps, mapDispatchToProps)(PartsBusinessInfoComponent); diff --git a/client/src/components/parts-shop-info/parts-email-presets.component.jsx b/client/src/components/parts-shop-info/parts-email-presets.component.jsx new file mode 100644 index 000000000..449a35ac3 --- /dev/null +++ b/client/src/components/parts-shop-info/parts-email-presets.component.jsx @@ -0,0 +1,60 @@ +import { DeleteFilled } from "@ant-design/icons"; +import { Button, Form, Input, Select, Space } from "antd"; +import { useTranslation } from "react-i18next"; +import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.component"; +import LayoutFormRow from "../layout-form-row/layout-form-row.component"; + +export default function PartsEmailPresetsComponent({ form }) { + const { t } = useTranslation(); + + return ( +
+ + + {(fields, { add, remove, move }) => { + return ( +
+ {fields.map((field, index) => ( + + + + + + + + + + { + remove(field.name); + }} + /> + + + + + ))} + + + +
+ ); + }} +
+
+
+ ); +} diff --git a/client/src/components/parts-shop-info/parts-order-comments.component.jsx b/client/src/components/parts-shop-info/parts-order-comments.component.jsx new file mode 100644 index 000000000..536f1a2e9 --- /dev/null +++ b/client/src/components/parts-shop-info/parts-order-comments.component.jsx @@ -0,0 +1,74 @@ +import { DeleteFilled } from "@ant-design/icons"; +import { Button, Form, Input, Space } from "antd"; +import { useTranslation } from "react-i18next"; +import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.component"; +import LayoutFormRow from "../layout-form-row/layout-form-row.component"; + +export default function PartsOrderCommentsComponent({ form }) { + const { t } = useTranslation(); + + return ( +
+ + + {(fields, { add, remove, move }) => { + return ( +
+ {fields.map((field, index) => ( + + + + + + + + + + + { + remove(field.name); + }} + /> + + + + + ))} + + + +
+ ); + }} +
+
+
+ ); +} diff --git a/client/src/components/parts-shop-info/parts-orders-comments.component.jsx b/client/src/components/parts-shop-info/parts-orders-comments.component.jsx new file mode 100644 index 000000000..7815bca9b --- /dev/null +++ b/client/src/components/parts-shop-info/parts-orders-comments.component.jsx @@ -0,0 +1,61 @@ +import { Button, Card, Divider, Form, Input, Space } from "antd"; +import { DeleteOutlined, PlusOutlined } from "@ant-design/icons"; +import { useTranslation } from "react-i18next"; + +const { TextArea } = Input; + +export default function PartsOrdersCommentsComponent({ form }) { + const { t } = useTranslation(); + + return ( + + + {(fields, { add, remove }) => ( + <> + {fields.map(({ key, name, ...restField }) => ( + + + + + +