Added parts location to receiving an invoice. BOD-357
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
import { Button, Form, Input, Statistic, Switch, Upload } from "antd";
|
||||
import { Button, Form, Input, Select, Statistic, Switch, Upload } from "antd";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import AlertComponent from "../alert/alert.component";
|
||||
import FormDatePicker from "../form-date-picker/form-date-picker.component";
|
||||
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
|
||||
@@ -9,8 +12,16 @@ import VendorSearchSelect from "../vendor-search-select/vendor-search-select.com
|
||||
import InvoiceFormLines from "./invoice-form.lines.component";
|
||||
import "./invoice-form.styles.scss";
|
||||
import { CalculateInvoiceTotal } from "./invoice-form.totals.utility";
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
//currentUser: selectCurrentUser
|
||||
bodyshop: selectBodyshop,
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||
});
|
||||
|
||||
export default function InvoiceFormComponent({
|
||||
export function InvoiceFormComponent({
|
||||
bodyshop,
|
||||
form,
|
||||
vendorAutoCompleteOptions,
|
||||
lineData,
|
||||
@@ -143,6 +154,19 @@ export default function InvoiceFormComponent({
|
||||
>
|
||||
<CurrencyInput min={0} />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label={t("invoices.fields.allpartslocation")}
|
||||
name="location"
|
||||
>
|
||||
<Select style={{ width: "10rem" }}>
|
||||
{bodyshop.md_parts_locations.map((loc, idx) => (
|
||||
<Select.Option key={idx} value={loc}>
|
||||
{loc}
|
||||
</Select.Option>
|
||||
))}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
</div>
|
||||
<InvoiceFormLines
|
||||
lineData={lineData}
|
||||
@@ -242,3 +266,8 @@ export default function InvoiceFormComponent({
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(InvoiceFormComponent);
|
||||
|
||||
Reference in New Issue
Block a user