From fa505edaab59a707441a378b46955cc7c15dc62b Mon Sep 17 00:00:00 2001 From: elforjani3 Date: Wed, 16 Dec 2020 14:14:33 +0200 Subject: [PATCH 1/3] fix: color status. --- .../Purchases/Bill/BillsDataTable.js | 18 +++++++++--------- .../Sales/Invoice/InvoicesDataTable.js | 14 +++++++------- .../Sales/Receipt/ReceiptsDataTable.js | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/client/src/containers/Purchases/Bill/BillsDataTable.js b/client/src/containers/Purchases/Bill/BillsDataTable.js index c6dc514dc..809e68059 100644 --- a/client/src/containers/Purchases/Bill/BillsDataTable.js +++ b/client/src/containers/Purchases/Bill/BillsDataTable.js @@ -185,26 +185,19 @@ function BillsDataTable({ width: 140, className: 'amount', }, - { - id: 'reference_no', - Header: formatMessage({ id: 'reference_no' }), - accessor: 'reference_no', - width: 140, - className: 'reference_no', - }, { id: 'status', Header: formatMessage({ id: 'status' }), accessor: (row) => ( - + - + @@ -213,6 +206,13 @@ function BillsDataTable({ width: 140, className: 'status', }, + { + id: 'reference_no', + Header: formatMessage({ id: 'reference_no' }), + accessor: 'reference_no', + width: 140, + className: 'reference_no', + }, { id: 'actions', Header: '', diff --git a/client/src/containers/Sales/Invoice/InvoicesDataTable.js b/client/src/containers/Sales/Invoice/InvoicesDataTable.js index 7944be3be..704858eb2 100644 --- a/client/src/containers/Sales/Invoice/InvoicesDataTable.js +++ b/client/src/containers/Sales/Invoice/InvoicesDataTable.js @@ -145,13 +145,6 @@ function InvoicesDataTable({ width: 140, className: 'balance', }, - { - id: 'reference_no', - Header: formatMessage({ id: 'reference_no' }), - accessor: 'reference_no', - width: 140, - className: 'reference_no', - }, { id: 'status', Header: formatMessage({ id: 'status' }), @@ -159,6 +152,13 @@ function InvoicesDataTable({ width: 140, className: 'status', }, + { + id: 'reference_no', + Header: formatMessage({ id: 'reference_no' }), + accessor: 'reference_no', + width: 140, + className: 'reference_no', + }, { id: 'actions', Header: '', diff --git a/client/src/containers/Sales/Receipt/ReceiptsDataTable.js b/client/src/containers/Sales/Receipt/ReceiptsDataTable.js index ed221b606..488e4d64a 100644 --- a/client/src/containers/Sales/Receipt/ReceiptsDataTable.js +++ b/client/src/containers/Sales/Receipt/ReceiptsDataTable.js @@ -159,7 +159,7 @@ function ReceiptsDataTable({ accessor: (row) => ( - + From 7536c28591b451026c1a4be3297798358f7b4baa Mon Sep 17 00:00:00 2001 From: elforjani3 Date: Wed, 16 Dec 2020 17:25:01 +0200 Subject: [PATCH 2/3] feat: estimate status. --- .../Sales/Estimate/EstimateFloatingActions.js | 38 ++--- .../containers/Sales/Estimate/EstimateForm.js | 6 +- .../Sales/Estimate/EstimateForm.schema.js | 1 + .../containers/Sales/Estimate/EstimateList.js | 130 +++++++++++++++++- .../Sales/Estimate/EstimatesDataTable.js | 57 +++++++- .../containers/Sales/Estimate/components.js | 31 +++++ .../Sales/Estimate/withEstimateActions.js | 6 + .../Sales/Invoice/InvoiceFloatingActions.js | 12 +- client/src/lang/en/index.js | 21 +++ .../src/store/Estimate/estimates.actions.js | 14 +- 10 files changed, 282 insertions(+), 34 deletions(-) create mode 100644 client/src/containers/Sales/Estimate/components.js diff --git a/client/src/containers/Sales/Estimate/EstimateFloatingActions.js b/client/src/containers/Sales/Estimate/EstimateFloatingActions.js index bb9b4b93a..3864c01fc 100644 --- a/client/src/containers/Sales/Estimate/EstimateFloatingActions.js +++ b/client/src/containers/Sales/Estimate/EstimateFloatingActions.js @@ -25,38 +25,38 @@ export default function EstimateFloatingActions({ onCancelClick, onClearClick, estimateId, - estimatePublished, + isDelivered, }) { const { resetForm, submitForm } = useFormikContext(); - const handleSubmitPublishBtnClick = (event) => { + const handleSubmitDeliverBtnClick = (event) => { saveInvoke(onSubmitClick, event, { redirect: true, - publish: true, + deliver: true, }); }; - const handleSubmitPublishAndNewBtnClick = (event) => { + const handleSubmitDeliverAndNewBtnClick = (event) => { submitForm(); saveInvoke(onSubmitClick, event, { redirect: false, - publish: true, + deliver: true, resetForm: true, }); }; - const handleSubmitPublishContinueEditingBtnClick = (event) => { + const handleSubmitDeliverContinueEditingBtnClick = (event) => { submitForm(); saveInvoke(onSubmitClick, event, { redirect: false, - publish: true, + deliver: true, }); }; const handleSubmitDraftBtnClick = (event) => { saveInvoke(onSubmitClick, event, { redirect: true, - publish: false, + deliver: false, }); }; @@ -64,7 +64,7 @@ export default function EstimateFloatingActions({ submitForm(); saveInvoke(onSubmitClick, event, { redirect: false, - publish: false, + deliver: false, resetForm: true, }); }; @@ -73,7 +73,7 @@ export default function EstimateFloatingActions({ submitForm(); saveInvoke(onSubmitClick, event, { redirect: false, - publish: false, + deliver: false, }); }; @@ -88,26 +88,26 @@ export default function EstimateFloatingActions({ return (
- {/* ----------- Save And Publish ----------- */} - + {/* ----------- Save And Deliver ----------- */} +