+
diff --git a/src/main/webui/src/ProposalEditorView/proposal/Submit.tsx b/src/main/webui/src/ProposalEditorView/proposal/Submit.tsx
index 1866cb9c..7b254828 100644
--- a/src/main/webui/src/ProposalEditorView/proposal/Submit.tsx
+++ b/src/main/webui/src/ProposalEditorView/proposal/Submit.tsx
@@ -1,5 +1,5 @@
import {ReactElement, useEffect, useState} from "react";
-import {Box, Select, Stack, Text} from "@mantine/core";
+import {Box, Grid, Select, Stack, Text} from "@mantine/core";
import {
fetchProposalCyclesResourceGetProposalCycleDates,
fetchSubmittedProposalResourceSubmitProposal,
@@ -10,11 +10,13 @@ import {useNavigate, useParams} from "react-router-dom";
import {useForm} from "@mantine/form";
import {JSON_SPACES} from "src/constants.tsx";
import {SubmitButton} from "src/commonButtons/save.tsx";
+import DeleteButton from "src/commonButtons/delete.tsx";
import {useQueryClient} from "@tanstack/react-query";
import ValidationOverview from "./ValidationOverview.tsx";
import {EditorPanelHeader, PanelFrame} from "../../commonPanel/appearance.tsx";
import {notifyError, notifySuccess} from "../../commonPanel/notifications.tsx";
import getErrorMessage from "../../errorHandling/getErrorMessage.tsx";
+import {ContextualHelpButton} from "../../commonButtons/contextualHelp.tsx"
function SubmitPanel(): ReactElement {
const {selectedProposalCode} = useParams();
@@ -80,6 +82,10 @@ function SubmitPanel(): ReactElement {
.catch((error) => notifyError("Submission failed", getErrorMessage(error))
)
});
+ function handleCancel(event: SyntheticEvent) {
+ event.preventDefault();
+ navigate("../",{relative:"path"})
+ }
return (
@@ -88,19 +94,31 @@ function SubmitPanel(): ReactElement {
)
diff --git a/src/main/webui/src/ProposalEditorView/proposal/Summary.tsx b/src/main/webui/src/ProposalEditorView/proposal/Summary.tsx
index 2757805e..1ff8fc76 100644
--- a/src/main/webui/src/ProposalEditorView/proposal/Summary.tsx
+++ b/src/main/webui/src/ProposalEditorView/proposal/Summary.tsx
@@ -5,10 +5,11 @@ import {
useProposalResourceGetObservingProposal,
} from "src/generated/proposalToolComponents";
import {useMutation, useQueryClient} from "@tanstack/react-query";
-import {useParams} from "react-router-dom";
-import {Box, Stack, Textarea} from "@mantine/core";
+import {useNavigate, useParams} from "react-router-dom";
+import {Box, Grid, Stack, Textarea} from "@mantine/core";
import {useForm} from "@mantine/form";
import {FormSubmitButton} from 'src/commonButtons/save';
+import DeleteButton from "src/commonButtons/delete";
import {
JSON_SPACES,
MAX_CHARS_FOR_INPUTS, TEXTAREA_MAX_ROWS
@@ -17,6 +18,7 @@ import MaxCharsForInputRemaining from "src/commonInputs/remainingCharacterCount.
import {PanelFrame, PanelHeader} from "../../commonPanel/appearance.tsx";
import {notifyError, notifySuccess} from "../../commonPanel/notifications.tsx";
import getErrorMessage from "../../errorHandling/getErrorMessage.tsx";
+import {ContextualHelpButton} from "../../commonButtons/contextualHelp.tsx"
function SummaryPanel() {
const { selectedProposalCode } = useParams();
@@ -37,6 +39,12 @@ function SummaryPanel() {
// get client for talking to database.
const queryClient = useQueryClient()
+ const navigate = useNavigate();
+ function handleCancel(event: SyntheticEvent) {
+ event.preventDefault();
+ navigate("../",{relative:"path"})
+ }
+
const mutation = useMutation({
mutationFn: () => {
const newSummary: ProposalResourceReplaceSummaryVariables = {
@@ -84,7 +92,6 @@ function SummaryPanel() {
setSummary(val.summary);
mutation.mutate();
});
-
return (
@@ -93,13 +100,23 @@ function SummaryPanel() {
Submitting request :
}
diff --git a/src/main/webui/src/ProposalEditorView/proposal/Title.tsx b/src/main/webui/src/ProposalEditorView/proposal/Title.tsx
index 580bddc6..fc1be3f9 100644
--- a/src/main/webui/src/ProposalEditorView/proposal/Title.tsx
+++ b/src/main/webui/src/ProposalEditorView/proposal/Title.tsx
@@ -5,15 +5,17 @@ import {
useProposalResourceGetObservingProposalTitle,
} from "src/generated/proposalToolComponents";
import {useMutation, useQueryClient} from "@tanstack/react-query";
-import {Stack, TextInput} from "@mantine/core";
-import {useParams} from "react-router-dom";
+import {Grid, Stack, TextInput} from "@mantine/core";
+import {useNavigate, useParams} from "react-router-dom";
import {useForm} from "@mantine/form";
import {FormSubmitButton} from 'src/commonButtons/save';
+import DeleteButton from "src/commonButtons/delete";
import { MAX_CHARS_FOR_INPUTS, JSON_SPACES } from 'src/constants';
import MaxCharsForInputRemaining from "src/commonInputs/remainingCharacterCount.tsx";
import {PanelFrame, PanelHeader} from "../../commonPanel/appearance.tsx";
import {notifyError, notifySuccess} from "../../commonPanel/notifications.tsx";
import getErrorMessage from "../../errorHandling/getErrorMessage.tsx";
+import {ContextualHelpButton} from "../../commonButtons/contextualHelp.tsx"
const titleFormJSON = {
initialValues: {title: "Loading..."},
@@ -86,24 +88,40 @@ function TitlePanel() {
mutation.mutate();
});
+ const navigate = useNavigate();
+
+ function handleCancel(event: SyntheticEvent) {
+ event.preventDefault();
+ navigate("../",{relative:"path"})
+ }
+
return (
{ isLoading ? ("Loading..") :
submitting ? ("Submitting..."):
+
-
+
+
+
+
+
+
+
}
);
-
}
export default TitlePanel
\ No newline at end of file
diff --git a/src/main/webui/src/ProposalEditorView/targets/New.tsx b/src/main/webui/src/ProposalEditorView/targets/New.tsx
index 60c869a1..f5c0c7b5 100644
--- a/src/main/webui/src/ProposalEditorView/targets/New.tsx
+++ b/src/main/webui/src/ProposalEditorView/targets/New.tsx
@@ -1,4 +1,4 @@
-import {Modal, NumberInput, Select, TextInput, Grid, Stack} from "@mantine/core";
+import {Grid, Modal, NumberInput, Select, TextInput, Stack, Space} from "@mantine/core";
import { useForm } from "@mantine/form";
import { useDisclosure } from "@mantine/hooks";
import {
@@ -18,8 +18,9 @@ import {
fetchSimbadResourceSimbadFindTarget, fetchSpaceSystemResourceGetSpaceSystem
} from "src/generated/proposalToolComponents.ts";
import {useQueryClient} from "@tanstack/react-query";
-import {useParams} from "react-router-dom";
+import {useParams, useNavigate} from "react-router-dom";
import AddButton from 'src/commonButtons/add';
+import DeleteButton from "src/commonButtons/delete";
import DatabaseSearchButton from 'src/commonButtons/databaseSearch';
import { SubmitButton } from 'src/commonButtons/save';
import { useHistoryState } from 'src/useHistoryState.ts';
@@ -35,6 +36,7 @@ import {
PopulateAladin
} from './aladinHelperMethods.tsx';
import {notifyError} from "../../commonPanel/notifications.tsx";
+import {ContextualHelpButton} from "../../commonButtons/contextualHelp.tsx"
// NOTE ABS: Aladin seems to be the global holder for the object that we can
// manipulate. This is different to NGOT, but at this point, ill buy anything.
@@ -287,9 +289,17 @@ const TargetForm = (props: FormPropsType
): ReactElement => {
Aladin.gotoRaDec(form.values.RA, value as number);
}
+ const navigate = useNavigate();
+
+ function handleCancel(event: SyntheticEvent) {
+ event.preventDefault();
+ navigate("../",{relative:"path"})
+ }
// return the dynamic HTML.
return (
- <>
+ <>
+
+
{/* handle aladin */}
): ReactElement => {
form.getInputProps("TargetName").onChange(e);
}}
/>
+
+
+
): ReactElement => {
label={"Coordinate System"}
data={[{label:"J2000",value:"J2000"}]}
{...form.getInputProps("SelectedEpoch")} />
-
+
+
+
+
+
+
+
>
@@ -384,7 +406,8 @@ export default function AddTargetModal(): ReactElement {
setHasDoneAladin(false);
close();
}}
- fullScreen>
+ size={"xl"}
+ centered>
{
setHasDoneAladin(false);
diff --git a/src/main/webui/src/ProposalEditorView/targets/targetPanel.tsx b/src/main/webui/src/ProposalEditorView/targets/targetPanel.tsx
index ee3b65b1..5a1e1f73 100644
--- a/src/main/webui/src/ProposalEditorView/targets/targetPanel.tsx
+++ b/src/main/webui/src/ProposalEditorView/targets/targetPanel.tsx
@@ -5,11 +5,12 @@ import {
import AddTargetModal from "./New";
import {useParams} from "react-router-dom";
-import {Box, Stack} from '@mantine/core';
+import {Grid, Box, Stack} from '@mantine/core';
import { ReactElement } from 'react';
import { JSON_SPACES } from 'src/constants.tsx';
import { TargetTable } from './TargetTable.tsx';
import {EditorPanelHeader, PanelFrame} from "../../commonPanel/appearance.tsx";
+import {ContextualHelpButton} from "src/commonButtons/contextualHelp.tsx"
/**
* Renders the target panel containing an add target button
@@ -50,6 +51,7 @@ export function TargetPanel(): ReactElement {
return (
+
{data?.length === 0?
Please add your targets
:
@@ -60,8 +62,14 @@ export function TargetPanel(): ReactElement {
showButtons={true}
selectedTarget={undefined}/>
}
-
+
+
+
+
+
+
+
);
}
\ No newline at end of file
diff --git a/src/main/webui/src/ProposalEditorView/technicalGoals/edit.group.tsx b/src/main/webui/src/ProposalEditorView/technicalGoals/edit.group.tsx
index e68fc84d..f935ca33 100644
--- a/src/main/webui/src/ProposalEditorView/technicalGoals/edit.group.tsx
+++ b/src/main/webui/src/ProposalEditorView/technicalGoals/edit.group.tsx
@@ -3,7 +3,7 @@ import SpectralWindowsSection from "./spectrum.form.tsx";
import {Grid, Stack, Space} from "@mantine/core";
import {TechnicalGoalProps} from "./technicalGoalsPanel.tsx";
import { ReactElement } from 'react';
-import {useParams} from "react-router-dom";
+import {useParams, useNavigate} from "react-router-dom";
import {useQueryClient} from "@tanstack/react-query";
import {
convertToScienceSpectralWindow,
@@ -18,6 +18,7 @@ import {
fetchTechnicalGoalResourceReplacePerformanceParameters, fetchTechnicalGoalResourceReplaceSpectrum
} from "src/generated/proposalToolComponents.ts";
import {FormSubmitButton} from "src/commonButtons/save.tsx";
+import DeleteButton from "src/commonButtons/delete.tsx";
import {
convertToPerformanceParameters,
convertToPerformanceParametersGui,
@@ -263,15 +264,15 @@ export default function TechnicalGoalEditGroup(
}
}
})
+ const navigate = useNavigate();
+ function handleCancel(event: SyntheticEvent) {
+ event.preventDefault();
+ navigate("../",{relative:"path"})
+ }
-const helpButtonCall = (
-
- );
return (
- {helpButtonCall}
+
@@ -279,14 +280,19 @@ const helpButtonCall = (
+
+
+
+
+
+
+
-
-
-
-
-
+
-
)
}
diff --git a/src/main/webui/src/ProposalEditorView/technicalGoals/edit.modal.tsx b/src/main/webui/src/ProposalEditorView/technicalGoals/edit.modal.tsx
index 4c62ba2e..40a8d0e2 100644
--- a/src/main/webui/src/ProposalEditorView/technicalGoals/edit.modal.tsx
+++ b/src/main/webui/src/ProposalEditorView/technicalGoals/edit.modal.tsx
@@ -56,6 +56,10 @@ export default function TechnicalGoalEditModal(
"New Technical Goal" :
"View/Edit Technical Goal No." + technicalGoalProps.technicalGoal?._id}
fullScreen
+ //size="auto"
+ //width={100}
+ //height="auto"
+ //centered
>
diff --git a/src/main/webui/src/ProposalEditorView/technicalGoals/technicalGoalsPanel.tsx b/src/main/webui/src/ProposalEditorView/technicalGoals/technicalGoalsPanel.tsx
index 43e4aee2..0b8fd4b0 100644
--- a/src/main/webui/src/ProposalEditorView/technicalGoals/technicalGoalsPanel.tsx
+++ b/src/main/webui/src/ProposalEditorView/technicalGoals/technicalGoalsPanel.tsx
@@ -2,7 +2,7 @@ import {
useProposalResourceGetObservingProposal,
useTechnicalGoalResourceGetTechnicalGoals,
} from 'src/generated/proposalToolComponents.ts';
-import {Group, Space} from '@mantine/core';
+import {Grid, Group, Space} from '@mantine/core';
import { useParams } from 'react-router-dom';
import {TechnicalGoalsTable } from './technicalGoalTable.tsx';
import { TechnicalGoal } from 'src/generated/proposalToolSchemas.ts';
@@ -10,6 +10,7 @@ import TechnicalGoalEditModal from './edit.modal.tsx';
import { ReactElement } from 'react';
import { JSON_SPACES } from 'src/constants.tsx';
import {EditorPanelHeader, PanelFrame} from "../../commonPanel/appearance.tsx";
+import {ContextualHelpButton} from "../../commonButtons/contextualHelp.tsx"
/**
* the data type shared by the edit components.
@@ -64,12 +65,12 @@ function TechnicalGoalsPanel(): ReactElement {
);
}
-
// is an alias for the "Add +" button,
// the "view/edit" button is found in TechnicalGoalsTable, specifically one per row
return (
+
{goalsLoading ? (`Loading...`) :
}
-
- {goalsLoading ? (`Loading...`) :
-
- }
-
+
+
+
+
);
}
diff --git a/src/main/webui/src/commonButtons/contextualHelp.tsx b/src/main/webui/src/commonButtons/contextualHelp.tsx
index 1a939a8a..a07f1ca3 100644
--- a/src/main/webui/src/commonButtons/contextualHelp.tsx
+++ b/src/main/webui/src/commonButtons/contextualHelp.tsx
@@ -1,11 +1,13 @@
import { useState } from "react";
+import { Button, Grid, Space } from '@mantine/core';
+
import {contextualHelpMessages} from "../../public/contextualHelpMessages.jsx";
export function ContextualHelpButton(props : {messageId : string}) {
const [showingHelp, setShowingHelp] = useState(false);
- const userLang = "-eng" // hard-coded for now, ideally captured from user
+ const userLang = "-eng"; // hard-coded for now, ideally captured from user
const singleMessage = contextualHelpMessages.filter(aMessage =>
aMessage.id === props.messageId + userLang
@@ -13,39 +15,33 @@ export function ContextualHelpButton(props : {messageId : string}) {
// need to trap when no message is found...
-// need to sort out a key for this...
-
- const listMessageItems = singleMessage.map(aMessage =>
- {aMessage.message}
+ const listMessageRow = singleMessage.map(aMessage =>
+
+ <>{aMessage.message}>
+
);
- const extractedRecord = listMessageItems;
-
- function AssembleContextualHelp () {
-
-
- setShowingHelp(!showingHelp);
-
- }
-
+ const extractedRecord = listMessageRow;
const displayHelp = extractedRecord;
-
- const clearHelp = "";
- const labelClearHelp = "Clear Help";
- const labelShowHelp = "Show Help";
+ const clearHelp = "";
+ const labelClearHelp = "Clear Help";
+ const labelShowHelp = "Show Help";
return (
- <>
- AssembleContextualHelp()}>
- {showingHelp ? labelClearHelp : labelShowHelp}
-
+ <>
+
+
+
+ {setShowingHelp(!showingHelp)}}>
+ {showingHelp ? labelClearHelp : labelShowHelp}
+
+
+
-
{showingHelp ? displayHelp : clearHelp}
-
-
- >
-
+ {showingHelp ? displayHelp : clearHelp}
+
+
+ >
)
-}
-export default ContextualHelpButton;
+}
\ No newline at end of file
diff --git a/src/main/webui/src/errorHandling/error-page.jsx b/src/main/webui/src/errorHandling/error-page.jsx
new file mode 100644
index 00000000..a69b0a31
--- /dev/null
+++ b/src/main/webui/src/errorHandling/error-page.jsx
@@ -0,0 +1,19 @@
+// MWA... lifted straight from this tutorial https://reactrouter.com/en/main/start/tutorial#handling-not-found-errors
+
+import { useRouteError } from "react-router-dom";
+
+export default function ErrorPage() {
+ const error = useRouteError();
+ console.error(error);
+
+ return (
+
+
Oops!
+
+ Sorry, an unexpected error has occurred.
+ Polaris reports this message {error.statusText || error.message}
+ ...please report it to the support team.
+
+
+ );
+}
\ No newline at end of file
From 38fb055f520d16be44a5477988fb411b2098aaea Mon Sep 17 00:00:00 2001
From: mwapst <163834242+mwapst@users.noreply.github.com>
Date: Mon, 5 Aug 2024 15:52:20 +0100
Subject: [PATCH 6/7] Update New.tsx
Resolve conflict with being behind master
---
.../src/ProposalEditorView/targets/New.tsx | 84 ++++++++++---------
1 file changed, 45 insertions(+), 39 deletions(-)
diff --git a/src/main/webui/src/ProposalEditorView/targets/New.tsx b/src/main/webui/src/ProposalEditorView/targets/New.tsx
index f5c0c7b5..daf40a84 100644
--- a/src/main/webui/src/ProposalEditorView/targets/New.tsx
+++ b/src/main/webui/src/ProposalEditorView/targets/New.tsx
@@ -1,4 +1,4 @@
-import {Grid, Modal, NumberInput, Select, TextInput, Stack, Space} from "@mantine/core";
+import {Modal, NumberInput, TextInput, Grid, Stack, Alert, Group} from "@mantine/core";
import { useForm } from "@mantine/form";
import { useDisclosure } from "@mantine/hooks";
import {
@@ -18,11 +18,12 @@ import {
fetchSimbadResourceSimbadFindTarget, fetchSpaceSystemResourceGetSpaceSystem
} from "src/generated/proposalToolComponents.ts";
import {useQueryClient} from "@tanstack/react-query";
-import {useParams, useNavigate} from "react-router-dom";
+import {useNavigate, useParams} from "react-router-dom";
import AddButton from 'src/commonButtons/add';
-import DeleteButton from "src/commonButtons/delete";
+import DeleteButton from 'src/commonButtons/delete.tsx';
import DatabaseSearchButton from 'src/commonButtons/databaseSearch';
import { SubmitButton } from 'src/commonButtons/save';
+import {ContextualHelpButton} from "../../commonButtons/contextualHelp.tsx"
import { useHistoryState } from 'src/useHistoryState.ts';
import "./aladin.css";
import {
@@ -36,7 +37,7 @@ import {
PopulateAladin
} from './aladinHelperMethods.tsx';
import {notifyError} from "../../commonPanel/notifications.tsx";
-import {ContextualHelpButton} from "../../commonButtons/contextualHelp.tsx"
+import {IconInfoCircle} from "@tabler/icons-react";
// NOTE ABS: Aladin seems to be the global holder for the object that we can
// manipulate. This is different to NGOT, but at this point, ill buy anything.
@@ -116,8 +117,7 @@ const TargetForm = (props: FormPropsType): ReactElement => {
"Unable to match source " + form.values.TargetName +
" try again?");
form.values.searching = false;
- if(!choice)
- props.onSubmit();
+ if(!choice) props.onSubmit();
}
form.values.searching = true;
@@ -149,7 +149,7 @@ const TargetForm = (props: FormPropsType): ReactElement => {
const saveToDatabase = (val: newTargetData) => {
const sourceCoords: EquatorialPoint = {
"@type": "coords:EquatorialPoint",
- coordSys: {},
+ coordSys: {val: "ICRS"},
lat: {
"@type": "ivoa:RealQuantity",
value: val.RA, unit: { value: "degrees" }
@@ -163,7 +163,7 @@ const TargetForm = (props: FormPropsType): ReactElement => {
"@type": "proposal:CelestialTarget",
sourceName: val.TargetName,
sourceCoordinates: sourceCoords,
- positionEpoch: { value: val.SelectedEpoch }
+ positionEpoch: { value: "J2000"}
};
/**
@@ -289,27 +289,39 @@ const TargetForm = (props: FormPropsType): ReactElement => {
Aladin.gotoRaDec(form.values.RA, value as number);
}
- const navigate = useNavigate();
+ /**
+ * manage the cancel button
+ */
+ const navigate = useNavigate();
+
+ function handleCancel(event: SyntheticEvent) {
+ event.preventDefault();
+ navigate("../",{relative:"path"})
+ }
+
- function handleCancel(event: SyntheticEvent) {
- event.preventDefault();
- navigate("../",{relative:"path"})
- }
// return the dynamic HTML.
return (
<>
- {/* handle aladin */}
-
- {/* handle input */}
+
+ }
+ >
+ All targets are assumed to have an ICRS coordinate system and J2000 epoch.
+
+
): ReactElement => {
form.getInputProps("TargetName").onChange(e);
}}
/>
-
-
-
+ toolTipLabel={"Search Simbad database"}
+ />
): ReactElement => {
UpdateAladinRA(e);
if (form.getInputProps("RA").onChange) {
form.getInputProps("RA").onChange(e);
- }}}/>
+ }}}
+ />
): ReactElement => {
UpdateAladinDec(e);
if (form.getInputProps("Dec").onChange) {
form.getInputProps("Dec").onChange(e);
- }}}/>
-
-
+ }}}
+ />
-
+
-
+ toolTipLabel={"Save this target"}
+ disabled={!form.isValid() ||
+ form.values.searching? true : undefined}/>
+
-
- >
+
+ >
);
};
@@ -406,8 +413,7 @@ export default function AddTargetModal(): ReactElement {
setHasDoneAladin(false);
close();
}}
- size={"xl"}
- centered>
+ fullScreen>
{
setHasDoneAladin(false);
From 7d3b5a94a9000341cc37ef2a8c4af1da1c4ae5a1 Mon Sep 17 00:00:00 2001
From: mwapst <163834242+mwapst@users.noreply.github.com>
Date: Tue, 6 Aug 2024 16:41:56 +0100
Subject: [PATCH 7/7] Fix errors reported by online Build
Fix errors reported by online Build
---
src/main/webui/public/contextualHelpMessages.jsx | 11 ++++-------
.../ProposalEditorView/justifications/edit.modal.tsx | 2 +-
.../justifications/justification.form.tsx | 2 +-
.../observationFields/ObservationFieldsPanel.tsx | 9 +--------
.../observationFields/observationFields.form.tsx | 2 +-
.../ProposalEditorView/observations/edit.group.tsx | 4 ++--
.../observations/observationPanel.tsx | 2 +-
.../src/ProposalEditorView/proposal/Documents.tsx | 2 +-
.../webui/src/ProposalEditorView/proposal/New.tsx | 4 +++-
.../src/ProposalEditorView/proposal/Overview.tsx | 3 +--
.../webui/src/ProposalEditorView/proposal/Submit.tsx | 2 +-
.../webui/src/ProposalEditorView/proposal/Summary.tsx | 2 +-
.../webui/src/ProposalEditorView/proposal/Title.tsx | 2 +-
src/main/webui/src/ProposalEditorView/targets/New.tsx | 4 +++-
.../ProposalEditorView/technicalGoals/edit.group.tsx | 4 ++--
.../technicalGoals/technicalGoalsPanel.tsx | 2 +-
16 files changed, 25 insertions(+), 32 deletions(-)
diff --git a/src/main/webui/public/contextualHelpMessages.jsx b/src/main/webui/public/contextualHelpMessages.jsx
index 1332ad63..fca6f31d 100644
--- a/src/main/webui/public/contextualHelpMessages.jsx
+++ b/src/main/webui/public/contextualHelpMessages.jsx
@@ -6,19 +6,16 @@ export const contextualHelpMessages = [
+ " Create a new proposal by clicking the Create a new proposal button,"
+ " or upload a new one in a zip file by clicking the Import button."
+ " To maintain an existing proposal, select it from the list and then choose one of the menu items that appear such as Title, Summary, etc. "
+ + " The Polaris system will capture only sufficient information to allow the TAC to make an informed decision on time allocation for a proposal."
+ + " The detailed requirements will be negotiated once an allocation has been made."
+ " No viability checks will be made by Polaris, "
+ " it is the PI's responsibility to ensure that the intended Observatory is capable of performing the observations described in the proposal."
}
, {
id: "Overview-eng",
message: " "
- + " An overview of the current proposal is shown below."
- + " Your own proposals are displayed on the left. You can search for others by title or investigator."
- + " Create a new proposal by clicking the Create a new proposal button,"
- + " or upload a new one in a zip file by clicking the Import button."
- + " To maintain an existing proposal, select it from the list and then choose one of the menu items that appear such as Title, Summary, etc. "
- + " No viability checks will be made by Polaris, "
- + " it is the PI's responsibility to ensure that the intended Observatory is capable of performing the observations described in the proposal."
+ + " An overview of the selected proposal is shown below. You can choose another by clicking its dropdown button in the list."
+ + " You can maintain a component by clicking one of the menuitems, eg Title, Summary, etc."
}
, {
id: "CreaProp-eng",
diff --git a/src/main/webui/src/ProposalEditorView/justifications/edit.modal.tsx b/src/main/webui/src/ProposalEditorView/justifications/edit.modal.tsx
index b7a19f9a..4eff5785 100644
--- a/src/main/webui/src/ProposalEditorView/justifications/edit.modal.tsx
+++ b/src/main/webui/src/ProposalEditorView/justifications/edit.modal.tsx
@@ -1,6 +1,6 @@
import {ReactElement} from "react";
import ViewEditButton from "src/commonButtons/viewEdit.tsx";
-import {Modal, xl} from "@mantine/core";
+import {Modal} from "@mantine/core";
import {useDisclosure} from "@mantine/hooks";
import JustificationForm from "./justification.form.tsx";
import {JustificationProps} from "./justifications.table.tsx";
diff --git a/src/main/webui/src/ProposalEditorView/justifications/justification.form.tsx b/src/main/webui/src/ProposalEditorView/justifications/justification.form.tsx
index 63444344..05e0c091 100644
--- a/src/main/webui/src/ProposalEditorView/justifications/justification.form.tsx
+++ b/src/main/webui/src/ProposalEditorView/justifications/justification.form.tsx
@@ -1,4 +1,4 @@
-import {ReactElement} from "react";
+import {ReactElement, SyntheticEvent} from "react";
import {Grid, Paper, Select, Stack} from "@mantine/core";
import {MAX_CHARS_FOR_JUSTIFICATION} from "src/constants.tsx";
import {JustificationProps} from "./justifications.table.tsx";
diff --git a/src/main/webui/src/ProposalEditorView/observationFields/ObservationFieldsPanel.tsx b/src/main/webui/src/ProposalEditorView/observationFields/ObservationFieldsPanel.tsx
index 2becefc4..7deffc67 100644
--- a/src/main/webui/src/ProposalEditorView/observationFields/ObservationFieldsPanel.tsx
+++ b/src/main/webui/src/ProposalEditorView/observationFields/ObservationFieldsPanel.tsx
@@ -1,6 +1,6 @@
import {ReactElement} from "react";
import {PanelFrame, PanelHeader} from "../../commonPanel/appearance.tsx";
-import {useParams, useNavigate} from "react-router-dom";
+import {useParams} from "react-router-dom";
import {useProposalResourceGetObservingProposal} from "../../generated/proposalToolComponents.ts";
import ObservationFieldsTable from "./observationFieldsTable.tsx";
import {Field} from "../../generated/proposalToolSchemas.ts";
@@ -34,13 +34,6 @@ export default function ObservationFieldsPanel() : ReactElement {
obs.field! as number)
)
- const navigate = useNavigate();
-
- function handleCancel(event: SyntheticEvent) {
- event.preventDefault();
- navigate("../",{relative:"path"})
- }
-
//Remove the "Card" once we have this fully implemented
// can be treated as
diff --git a/src/main/webui/src/ProposalEditorView/observationFields/observationFields.form.tsx b/src/main/webui/src/ProposalEditorView/observationFields/observationFields.form.tsx
index ee01bf69..3d8babd6 100644
--- a/src/main/webui/src/ProposalEditorView/observationFields/observationFields.form.tsx
+++ b/src/main/webui/src/ProposalEditorView/observationFields/observationFields.form.tsx
@@ -1,4 +1,4 @@
-import {ReactElement} from "react";
+import {ReactElement, SyntheticEvent} from "react";
import {ObservationFieldsProps} from "./ObservationFieldsPanel.tsx";
import {Badge, Grid, Select, Stack, TextInput, Tooltip} from "@mantine/core";
import {
diff --git a/src/main/webui/src/ProposalEditorView/observations/edit.group.tsx b/src/main/webui/src/ProposalEditorView/observations/edit.group.tsx
index eeb03105..b2c73d20 100644
--- a/src/main/webui/src/ProposalEditorView/observations/edit.group.tsx
+++ b/src/main/webui/src/ProposalEditorView/observations/edit.group.tsx
@@ -1,7 +1,7 @@
import TargetTypeForm from "./targetType.form.tsx";
import TimingWindowsForm from "./timingWindows.form.tsx";
import {ObservationProps} from "./observationPanel.tsx";
-import { Fieldset, Grid, Text, Stack, Space } from '@mantine/core';
+import { Fieldset, Grid, Text, Stack} from '@mantine/core';
import {
CalibrationObservation,
CalibrationTargetIntendedUse, Observation, TargetObservation,
@@ -18,7 +18,7 @@ import {FormSubmitButton} from 'src/commonButtons/save.tsx';
import DeleteButton from 'src/commonButtons/delete.tsx';
import { useNavigate, useParams } from 'react-router-dom';
import { useQueryClient } from '@tanstack/react-query';
-import { FormEvent, ReactElement } from 'react';
+import { FormEvent, ReactElement, SyntheticEvent } from 'react';
import { TimingWindowGui } from './timingWindowGui.tsx';
import {ContextualHelpButton} from "src/commonButtons/contextualHelp.tsx"
diff --git a/src/main/webui/src/ProposalEditorView/observations/observationPanel.tsx b/src/main/webui/src/ProposalEditorView/observations/observationPanel.tsx
index 9aef8786..c5753fdc 100644
--- a/src/main/webui/src/ProposalEditorView/observations/observationPanel.tsx
+++ b/src/main/webui/src/ProposalEditorView/observations/observationPanel.tsx
@@ -1,7 +1,7 @@
import {
useProposalResourceGetObservingProposal,
} from 'src/generated/proposalToolComponents';
-import {useNavigate, useParams} from "react-router-dom";
+import {useParams} from "react-router-dom";
import ObservationRow, { observationTableHeader } from './observationTable.tsx';
import {Container, Grid, Group, List, Space, Table} from "@mantine/core";
import {Observation} from "src/generated/proposalToolSchemas.ts";
diff --git a/src/main/webui/src/ProposalEditorView/proposal/Documents.tsx b/src/main/webui/src/ProposalEditorView/proposal/Documents.tsx
index 3329a5a6..5b4f8264 100644
--- a/src/main/webui/src/ProposalEditorView/proposal/Documents.tsx
+++ b/src/main/webui/src/ProposalEditorView/proposal/Documents.tsx
@@ -6,7 +6,7 @@ import {
} from "src/generated/proposalToolComponents";
import {useNavigate, useParams} from "react-router-dom";
import {Box, FileButton, Grid, Stack, Table, Text} from "@mantine/core";
-import {useState} from "react";
+import {SyntheticEvent, useState} from "react";
import {useQueryClient} from "@tanstack/react-query";
import {modals} from "@mantine/modals";
import {randomId} from "@mantine/hooks";
diff --git a/src/main/webui/src/ProposalEditorView/proposal/New.tsx b/src/main/webui/src/ProposalEditorView/proposal/New.tsx
index 00171f48..81f95fe1 100644
--- a/src/main/webui/src/ProposalEditorView/proposal/New.tsx
+++ b/src/main/webui/src/ProposalEditorView/proposal/New.tsx
@@ -1,4 +1,4 @@
-import { useContext, useState } from "react";
+import { SyntheticEvent, useContext, useState } from "react";
import {ProposalContext} from 'src/App2'
import {
fetchProposalResourceAddNewField,
@@ -102,6 +102,8 @@ const textFormatData = [
notifyError("Create proposal error", getErrorMessage(error))
});
});
+
+
function handleCancel(event: SyntheticEvent) {
event.preventDefault();
navigate("../",{relative:"path"})
diff --git a/src/main/webui/src/ProposalEditorView/proposal/Overview.tsx b/src/main/webui/src/ProposalEditorView/proposal/Overview.tsx
index dd7e26db..0d43bce6 100644
--- a/src/main/webui/src/ProposalEditorView/proposal/Overview.tsx
+++ b/src/main/webui/src/ProposalEditorView/proposal/Overview.tsx
@@ -1,4 +1,4 @@
-import { useNavigate, useParams } from 'react-router-dom'
+import { useParams } from 'react-router-dom'
import {
useProposalResourceGetObservingProposal,
useSupportingDocumentResourceGetSupportingDocuments,
@@ -8,7 +8,6 @@ import {
Avatar,
Box,
Container,
- Grid,
Group,
List,
Table,
diff --git a/src/main/webui/src/ProposalEditorView/proposal/Submit.tsx b/src/main/webui/src/ProposalEditorView/proposal/Submit.tsx
index 7b254828..3a40f164 100644
--- a/src/main/webui/src/ProposalEditorView/proposal/Submit.tsx
+++ b/src/main/webui/src/ProposalEditorView/proposal/Submit.tsx
@@ -1,4 +1,4 @@
-import {ReactElement, useEffect, useState} from "react";
+import {ReactElement, SyntheticEvent, useEffect, useState} from "react";
import {Box, Grid, Select, Stack, Text} from "@mantine/core";
import {
fetchProposalCyclesResourceGetProposalCycleDates,
diff --git a/src/main/webui/src/ProposalEditorView/proposal/Summary.tsx b/src/main/webui/src/ProposalEditorView/proposal/Summary.tsx
index 1ff8fc76..a65c8fc6 100644
--- a/src/main/webui/src/ProposalEditorView/proposal/Summary.tsx
+++ b/src/main/webui/src/ProposalEditorView/proposal/Summary.tsx
@@ -1,4 +1,4 @@
-import {useState, useEffect} from "react";
+import {SyntheticEvent, useState, useEffect} from "react";
import {
fetchProposalResourceReplaceSummary,
ProposalResourceReplaceSummaryVariables,
diff --git a/src/main/webui/src/ProposalEditorView/proposal/Title.tsx b/src/main/webui/src/ProposalEditorView/proposal/Title.tsx
index fc1be3f9..2e3551c5 100644
--- a/src/main/webui/src/ProposalEditorView/proposal/Title.tsx
+++ b/src/main/webui/src/ProposalEditorView/proposal/Title.tsx
@@ -1,4 +1,4 @@
-import {useState, useEffect} from "react";
+import {SyntheticEvent, useState, useEffect} from "react";
import {
fetchProposalResourceReplaceTitle,
ProposalResourceReplaceTitleVariables,
diff --git a/src/main/webui/src/ProposalEditorView/targets/New.tsx b/src/main/webui/src/ProposalEditorView/targets/New.tsx
index daf40a84..42e3d787 100644
--- a/src/main/webui/src/ProposalEditorView/targets/New.tsx
+++ b/src/main/webui/src/ProposalEditorView/targets/New.tsx
@@ -6,6 +6,7 @@ import {
MouseEvent,
ReactElement,
ReactNode,
+ SyntheticEvent,
useEffect,
useRef, useState
} from 'react';
@@ -372,9 +373,10 @@ const TargetForm = (props: FormPropsType): ReactElement => {
form.getInputProps("Dec").onChange(e);
}}}
/>
+
-
+