Minor code clean up.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { useApolloClient, useMutation } from "@apollo/client";
|
import { useApolloClient, useMutation } from "@apollo/client";
|
||||||
import { Button, Form, Modal, notification } from "antd";
|
import { Button, Form, Modal, notification, Space } from "antd";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import React, { useEffect, useState, useMemo } from "react";
|
import React, { useEffect, useState, useMemo } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
@@ -227,7 +227,7 @@ function BillEnterModalContainer({
|
|||||||
onCancel={handleCancel}
|
onCancel={handleCancel}
|
||||||
afterClose={() => form.resetFields()}
|
afterClose={() => form.resetFields()}
|
||||||
footer={
|
footer={
|
||||||
<span>
|
<Space>
|
||||||
<Button onClick={handleCancel}>{t("general.actions.cancel")}</Button>
|
<Button onClick={handleCancel}>{t("general.actions.cancel")}</Button>
|
||||||
<Button loading={loading} onClick={() => form.submit()}>
|
<Button loading={loading} onClick={() => form.submit()}>
|
||||||
{t("general.actions.save")}
|
{t("general.actions.save")}
|
||||||
@@ -243,7 +243,7 @@ function BillEnterModalContainer({
|
|||||||
{t("general.actions.saveandnew")}
|
{t("general.actions.saveandnew")}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</span>
|
</Space>
|
||||||
}
|
}
|
||||||
destroyOnClose
|
destroyOnClose
|
||||||
>
|
>
|
||||||
@@ -255,7 +255,6 @@ function BillEnterModalContainer({
|
|||||||
onFinishFailed={() => {
|
onFinishFailed={() => {
|
||||||
setEnterAgain(false);
|
setEnterAgain(false);
|
||||||
}}
|
}}
|
||||||
// initialValues={formValues}
|
|
||||||
>
|
>
|
||||||
<BillFormContainer
|
<BillFormContainer
|
||||||
form={form}
|
form={form}
|
||||||
|
|||||||
@@ -497,6 +497,7 @@ const EditableCell = ({
|
|||||||
<Space size="small">
|
<Space size="small">
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name={dataIndex}
|
name={dataIndex}
|
||||||
|
labelCol={{ span: 0 }}
|
||||||
{...(formItemProps && formItemProps(record))}
|
{...(formItemProps && formItemProps(record))}
|
||||||
>
|
>
|
||||||
{(formInput && formInput(record, record.key)) || children}
|
{(formInput && formInput(record, record.key)) || children}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ const mapDispatchToProps = (dispatch) => ({
|
|||||||
toggleModalVisible: () => dispatch(toggleModalVisible("courtesyCarReturn")),
|
toggleModalVisible: () => dispatch(toggleModalVisible("courtesyCarReturn")),
|
||||||
});
|
});
|
||||||
|
|
||||||
export function BillEnterModalContainer({
|
export function CCReturnModalContainer({
|
||||||
courtesyCarReturnModal,
|
courtesyCarReturnModal,
|
||||||
toggleModalVisible,
|
toggleModalVisible,
|
||||||
bodyshop,
|
bodyshop,
|
||||||
@@ -85,4 +85,4 @@ export function BillEnterModalContainer({
|
|||||||
export default connect(
|
export default connect(
|
||||||
mapStateToProps,
|
mapStateToProps,
|
||||||
mapDispatchToProps
|
mapDispatchToProps
|
||||||
)(BillEnterModalContainer);
|
)(CCReturnModalContainer);
|
||||||
|
|||||||
@@ -36,10 +36,8 @@ const JobSearchSelect = (
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
const [
|
const [callIdSearch, { loading: idLoading, error: idError, data: idData }] =
|
||||||
callIdSearch,
|
useLazyQuery(SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE);
|
||||||
{ loading: idLoading, error: idError, data: idData },
|
|
||||||
] = useLazyQuery(SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE);
|
|
||||||
|
|
||||||
const executeSearch = (v) => {
|
const executeSearch = (v) => {
|
||||||
callSearch(v);
|
callSearch(v);
|
||||||
@@ -63,6 +61,7 @@ const JobSearchSelect = (
|
|||||||
],
|
],
|
||||||
"id"
|
"id"
|
||||||
);
|
);
|
||||||
|
console.log("restProps", restProps);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
@@ -81,7 +80,7 @@ const JobSearchSelect = (
|
|||||||
>
|
>
|
||||||
{theOptions
|
{theOptions
|
||||||
? theOptions.map((o) => (
|
? theOptions.map((o) => (
|
||||||
<Option key={o.id} value={o.id}>
|
<Option key={o.id} value={o.id} status={o.status}>
|
||||||
{`${clm_no ? `${o.clm_no} | ` : ""}${
|
{`${clm_no ? `${o.clm_no} | ` : ""}${
|
||||||
o.ro_number || t("general.labels.na")
|
o.ro_number || t("general.labels.na")
|
||||||
} | ${o.ownr_ln || ""} ${o.ownr_fn || ""} ${
|
} | ${o.ownr_ln || ""} ${o.ownr_fn || ""} ${
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ const mapDispatchToProps = (dispatch) => ({
|
|||||||
toggleModalVisible: () => dispatch(toggleModalVisible("payment")),
|
toggleModalVisible: () => dispatch(toggleModalVisible("payment")),
|
||||||
});
|
});
|
||||||
|
|
||||||
function BillEnterModalContainer({
|
function PaymentModalContainer({
|
||||||
paymentModal,
|
paymentModal,
|
||||||
toggleModalVisible,
|
toggleModalVisible,
|
||||||
bodyshop,
|
bodyshop,
|
||||||
@@ -237,7 +237,7 @@ function BillEnterModalContainer({
|
|||||||
export default connect(
|
export default connect(
|
||||||
mapStateToProps,
|
mapStateToProps,
|
||||||
mapDispatchToProps
|
mapDispatchToProps
|
||||||
)(BillEnterModalContainer);
|
)(PaymentModalContainer);
|
||||||
|
|
||||||
// const pr = stripe.paymentRequest({
|
// const pr = stripe.paymentRequest({
|
||||||
// country: "CA",
|
// country: "CA",
|
||||||
|
|||||||
@@ -1039,6 +1039,7 @@ export const SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE = gql`
|
|||||||
v_make_desc
|
v_make_desc
|
||||||
v_model_desc
|
v_model_desc
|
||||||
v_model_yr
|
v_model_yr
|
||||||
|
status
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|||||||
Reference in New Issue
Block a user