mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
revert: form changes
This commit is contained in:
@@ -29,7 +29,7 @@ export default function EstimateFloatingActions() {
|
||||
|
||||
// Handle submit & deliver button click.
|
||||
const handleSubmitDeliverBtnClick = (event) => {
|
||||
setSubmitPayload({ redirect: false, deliverViaMail: true });
|
||||
setSubmitPayload({ redirect: true, deliver: true });
|
||||
submitForm();
|
||||
};
|
||||
|
||||
|
||||
@@ -36,16 +36,11 @@ import {
|
||||
handleErrors,
|
||||
resetFormState,
|
||||
} from './utils';
|
||||
import { DialogsName } from '@/constants/dialogs';
|
||||
import withDialogActions from '@/containers/Dialog/withDialogActions';
|
||||
|
||||
/**
|
||||
* Estimate form.
|
||||
*/
|
||||
function EstimateForm({
|
||||
// #withDialogActions
|
||||
openDialog,
|
||||
|
||||
// #withSettings
|
||||
estimateNextNumber,
|
||||
estimateNumberPrefix,
|
||||
@@ -113,7 +108,7 @@ function EstimateForm({
|
||||
delivered: submitPayload.deliver,
|
||||
};
|
||||
// Handle the request success.
|
||||
const onSuccess = (res) => {
|
||||
const onSuccess = (response) => {
|
||||
AppToaster.show({
|
||||
message: intl.get(
|
||||
isNewMode
|
||||
@@ -131,11 +126,6 @@ function EstimateForm({
|
||||
if (submitPayload.resetForm) {
|
||||
resetFormState({ resetForm, initialValues, values });
|
||||
}
|
||||
if (submitPayload.deliverViaMail) {
|
||||
openDialog(DialogsName.EstimateFormMailDeliver, {
|
||||
estimateId: res.data.id,
|
||||
});
|
||||
}
|
||||
};
|
||||
// Handle the request error.
|
||||
const onError = ({
|
||||
@@ -190,7 +180,6 @@ function EstimateForm({
|
||||
}
|
||||
|
||||
export default compose(
|
||||
withDialogActions,
|
||||
withSettings(({ estimatesSettings }) => ({
|
||||
estimateNextNumber: estimatesSettings?.nextNumber,
|
||||
estimateNumberPrefix: estimatesSettings?.numberPrefix,
|
||||
|
||||
Reference in New Issue
Block a user