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