BREAKING - Package upgrades + some WIP on invoice enter.

This commit is contained in:
Patrick Fic
2020-02-28 09:29:44 -08:00
parent 6785ff8aad
commit e2dfd6b60d
5 changed files with 908 additions and 1050 deletions

View File

@@ -4,9 +4,9 @@
"private": true, "private": true,
"proxy": "https://localhost:5000", "proxy": "https://localhost:5000",
"dependencies": { "dependencies": {
"@ckeditor/ckeditor5-build-classic": "^16.0.0", "@ckeditor/ckeditor5-build-classic": "^17.0.0",
"@ckeditor/ckeditor5-react": "^2.1.0", "@ckeditor/ckeditor5-react": "^2.1.0",
"antd": "^3.26.8", "antd": "^4.0.0",
"apollo-boost": "^0.4.4", "apollo-boost": "^0.4.4",
"apollo-link-context": "^1.0.19", "apollo-link-context": "^1.0.19",
"apollo-link-error": "^1.1.12", "apollo-link-error": "^1.1.12",
@@ -15,25 +15,25 @@
"axios": "^0.19.2", "axios": "^0.19.2",
"chart.js": "^2.9.3", "chart.js": "^2.9.3",
"dotenv": "^8.2.0", "dotenv": "^8.2.0",
"firebase": "^7.8.1", "firebase": "^7.9.2",
"graphql": "^14.6.0", "graphql": "^14.6.0",
"i18next": "^19.1.0", "i18next": "^19.3.2",
"node-sass": "^4.13.1", "node-sass": "^4.13.1",
"react": "^16.12.0", "react": "^16.13.0",
"react-apollo": "^3.1.3", "react-apollo": "^3.1.3",
"react-barcode": "^1.4.0", "react-barcode": "^1.4.0",
"react-big-calendar": "^0.23.0", "react-big-calendar": "^0.24.0",
"react-chartjs-2": "^2.9.0", "react-chartjs-2": "^2.9.0",
"react-dom": "^16.12.0", "react-dom": "^16.13.0",
"react-html-email": "^3.0.0", "react-html-email": "^3.0.0",
"react-i18next": "^11.3.1", "react-i18next": "^11.3.3",
"react-icons": "^3.9.0", "react-icons": "^3.9.0",
"react-image-file-resizer": "^0.2.1", "react-image-file-resizer": "^0.2.1",
"react-moment": "^0.9.7", "react-moment": "^0.9.7",
"react-number-format": "^4.3.1", "react-number-format": "^4.4.1",
"react-redux": "^7.1.3", "react-redux": "^7.2.0",
"react-router-dom": "^5.1.2", "react-router-dom": "^5.1.2",
"react-scripts": "3.3.1", "react-scripts": "3.4.0",
"redux": "^4.0.5", "redux": "^4.0.5",
"redux-logger": "^3.0.6", "redux-logger": "^3.0.6",
"redux-persist": "^6.0.0", "redux-persist": "^6.0.0",

View File

@@ -6,7 +6,8 @@ export default function InvoiceAddLineButton({
jobLine, jobLine,
invoiceLineState, invoiceLineState,
form, form,
discount discount,
disabled
}) { }) {
const [visibility, setVisibility] = useState(false); const [visibility, setVisibility] = useState(false);
const { t } = useTranslation(); const { t } = useTranslation();
@@ -41,7 +42,7 @@ export default function InvoiceAddLineButton({
return ( return (
<Popover content={popContent} visible={visibility}> <Popover content={popContent} visible={visibility}>
<Button onClick={() => setVisibility(true)}> <Button onClick={() => setVisibility(true)} disabled={!disabled}>
<Icon type="select" /> <Icon type="select" />
</Button> </Button>
</Popover> </Popover>

View File

@@ -32,7 +32,7 @@ export default function InvoiceEnterModalComponent({
}) { }) {
const { t } = useTranslation(); const { t } = useTranslation();
const { getFieldDecorator, resetFields } = form; const { getFieldDecorator, resetFields } = form;
return ( return (
<Modal <Modal
title={ title={
@@ -128,7 +128,6 @@ export default function InvoiceEnterModalComponent({
})(<InputNumber precision={2} min={0} name="total" />)} })(<InputNumber precision={2} min={0} name="total" />)}
</Form.Item> </Form.Item>
</div> </div>
<Row> <Row>
<Col span={12}> <Col span={12}>
<InvoiceEnterModalTableComponent <InvoiceEnterModalTableComponent
@@ -140,6 +139,7 @@ export default function InvoiceEnterModalComponent({
</Col> </Col>
<Col span={12}>Table of added items.</Col> <Col span={12}>Table of added items.</Col>
</Row> </Row>
);
</Form> </Form>
</Modal> </Modal>
); );

View File

@@ -101,6 +101,7 @@ export default function InvoiceEnterModalTableComponent({
jobLine={record} jobLine={record}
form={form} form={form}
discount={vendor ? vendor.discount : null} discount={vendor ? vendor.discount : null}
disabled={vendor}
/> />
</div> </div>
) )

File diff suppressed because it is too large Load Diff