Reformat all project files to use the prettier config file.
This commit is contained in:
@@ -1,69 +1,48 @@
|
||||
import {Form, Input, Space} from "antd";
|
||||
import { Form, Input, Space } from "antd";
|
||||
import React from "react";
|
||||
import {useTranslation} from "react-i18next";
|
||||
import {connect} from "react-redux";
|
||||
import {createStructuredSelector} from "reselect";
|
||||
import {selectInventoryUpsert} from "../../redux/modals/modals.selectors";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectInventoryUpsert } from "../../redux/modals/modals.selectors";
|
||||
import FormItemCurrency from "../form-items-formatted/currency-form-item.component";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
inventoryUpsertModal: selectInventoryUpsert,
|
||||
inventoryUpsertModal: selectInventoryUpsert
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||
});
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(NoteUpsertModalComponent);
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(NoteUpsertModalComponent);
|
||||
|
||||
export function NoteUpsertModalComponent({form, inventoryUpsertModal}) {
|
||||
const {t} = useTranslation();
|
||||
const {existingInventory} = inventoryUpsertModal.context;
|
||||
export function NoteUpsertModalComponent({ form, inventoryUpsertModal }) {
|
||||
const { t } = useTranslation();
|
||||
const { existingInventory } = inventoryUpsertModal.context;
|
||||
|
||||
return (
|
||||
<Space wrap>
|
||||
<Form.Item
|
||||
label={t("billlines.fields.line_desc")}
|
||||
rules={[{required: true}]}
|
||||
name="line_desc"
|
||||
>
|
||||
<Input/>
|
||||
</Form.Item>
|
||||
<Form.Item label={t("inventory.fields.comment")} name="comment">
|
||||
<Input/>
|
||||
</Form.Item>
|
||||
return (
|
||||
<Space wrap>
|
||||
<Form.Item label={t("billlines.fields.line_desc")} rules={[{ required: true }]} name="line_desc">
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item label={t("inventory.fields.comment")} name="comment">
|
||||
<Input />
|
||||
</Form.Item>
|
||||
|
||||
{!existingInventory && (
|
||||
<>
|
||||
<Form.Item
|
||||
label={t("inventory.fields.manualinvoicenumber")}
|
||||
name="manualinvoicenumber"
|
||||
>
|
||||
<Input/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("inventory.fields.manualvendor")}
|
||||
name="manualvendor"
|
||||
>
|
||||
<Input/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
rules={[{required: true}]}
|
||||
label={t("billlines.fields.actual_cost")}
|
||||
name="actual_cost"
|
||||
>
|
||||
<FormItemCurrency/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
rules={[{required: true}]}
|
||||
label={t("billlines.fields.actual_price")}
|
||||
name="actual_price"
|
||||
>
|
||||
<FormItemCurrency/>
|
||||
</Form.Item>
|
||||
</>
|
||||
)}
|
||||
</Space>
|
||||
);
|
||||
{!existingInventory && (
|
||||
<>
|
||||
<Form.Item label={t("inventory.fields.manualinvoicenumber")} name="manualinvoicenumber">
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item label={t("inventory.fields.manualvendor")} name="manualvendor">
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item rules={[{ required: true }]} label={t("billlines.fields.actual_cost")} name="actual_cost">
|
||||
<FormItemCurrency />
|
||||
</Form.Item>
|
||||
<Form.Item rules={[{ required: true }]} label={t("billlines.fields.actual_price")} name="actual_price">
|
||||
<FormItemCurrency />
|
||||
</Form.Item>
|
||||
</>
|
||||
)}
|
||||
</Space>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user