Merge remote-tracking branch 'origin/master'

This commit is contained in:
Ahmed Bouhuolia
2020-11-29 00:17:05 +02:00
39 changed files with 1410 additions and 680 deletions

View File

@@ -201,11 +201,13 @@ function ReceiptForm({
intent: Intent.SUCCESS,
});
setSubmitting(false);
resetForm();
if (submitPayload.redirect) {
history.push('/receipts');
}
if (submitPayload.resetForm) {
resetForm();
}
};
// Handle the request error.
@@ -243,7 +245,7 @@ function ReceiptForm({
},
[history],
);
return (
<div className={classNames(
CLASSES.PAGE_FORM,
@@ -268,6 +270,7 @@ function ReceiptForm({
<ReceiptFormFloatingActions
isSubmitting={isSubmitting}
receiptId={receiptId}
receiptPublished={true}
onSubmitClick={handleSubmitClick}
onCancelClick={handleCancelClick}
/>