Changed RO Search Select to use RO searching and possible provided job value for options IMEX-129 IMEX-327
This commit is contained in:
@@ -13,12 +13,7 @@ const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
});
|
||||
|
||||
export function PaymentFormComponent({
|
||||
form,
|
||||
roAutoCompleteOptions,
|
||||
stripeStateArr,
|
||||
bodyshop,
|
||||
}) {
|
||||
export function PaymentFormComponent({ form, stripeStateArr, bodyshop }) {
|
||||
const [stripeState, setStripeState] = stripeStateArr;
|
||||
|
||||
const { t } = useTranslation();
|
||||
@@ -38,7 +33,7 @@ export function PaymentFormComponent({
|
||||
},
|
||||
]}
|
||||
>
|
||||
<JobSearchSelect options={roAutoCompleteOptions} />
|
||||
<JobSearchSelect />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("payments.fields.amount")}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { useQuery } from "@apollo/react-hooks";
|
||||
import React from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { ACTIVE_JOBS_FOR_AUTOCOMPLETE } from "../../graphql/jobs.queries";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import PaymentFormComponent from "./payment-form.component";
|
||||
|
||||
@@ -10,24 +8,10 @@ const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
});
|
||||
|
||||
export function PaymentFormContainer({
|
||||
bodyshop,
|
||||
form,
|
||||
stripeStateArr,
|
||||
|
||||
}) {
|
||||
const { data: RoAutoCompleteData } = useQuery(ACTIVE_JOBS_FOR_AUTOCOMPLETE, {
|
||||
variables: { statuses: bodyshop.md_ro_statuses.open_statuses || ["Open*"] },
|
||||
});
|
||||
|
||||
export function PaymentFormContainer({ bodyshop, form, stripeStateArr }) {
|
||||
return (
|
||||
<div>
|
||||
<PaymentFormComponent
|
||||
form={form}
|
||||
roAutoCompleteOptions={RoAutoCompleteData && RoAutoCompleteData.jobs}
|
||||
stripeStateArr={stripeStateArr}
|
||||
|
||||
/>
|
||||
<PaymentFormComponent form={form} stripeStateArr={stripeStateArr} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user