Skip to content

Commit 3db1588

Browse files
author
Kehinde Oki
committed
Merge remote-tracking branch 'upstream/main'
2 parents a66223b + fa7c669 commit 3db1588

4 files changed

Lines changed: 9 additions & 6 deletions

File tree

app/airflow/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "carrot-airflow"
3-
version = "4.2.8"
3+
version = "4.2.9"
44
description = "Add your description here"
55
readme = "README.md"
66
requires-python = ">=3.11"

app/api/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "api"
3-
version = "4.2.8"
3+
version = "4.2.9"
44
description = "Web app for Carrot-Mapper"
55

66
authors = [

app/next-client-app/components/scanreports/CreateScanReportForm.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,14 @@ export function CreateScanReportForm({
137137
validationSchema={validationSchema}
138138
validateOnChange={false}
139139
validateOnBlur={false}
140-
onSubmit={(data) => {
140+
onSubmit={async (data) => {
141+
// Return a Promise so Formik sets isSubmitting and prevents submitting multiple times
141142
toast.info("Validating and uploading...");
142-
handleSubmit(data);
143+
await handleSubmit(data);
143144
}}
144145
>
145-
{({ values, handleChange, handleSubmit, setFieldValue }) => (
146+
{({ values, handleChange, handleSubmit, setFieldValue, isSubmitting }) => (
147+
// added isSubmitting to the form to disable the submit button while upload is in progress
146148
<form
147149
className="w-full max-w-2xl"
148150
onSubmit={handleSubmit}
@@ -365,6 +367,7 @@ export function CreateScanReportForm({
365367
<Button
366368
type="submit"
367369
disabled={
370+
isSubmitting ||
368371
values.dataPartner === 0 ||
369372
values.dataset === 0 ||
370373
values.dataset === -1 ||

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "carrot-mapper"
3-
version = "4.2.8"
3+
version = "4.2.9"
44
description = ""
55
authors = [
66
{ name = "Sam Cox", email = "sam.cox@nottingham.ac.uk" },

0 commit comments

Comments
 (0)