in src/components/update/Update.tsx [111:161]
function updateForm() {
return (
<Box margin={{ bottom: "l" }} padding="l">
<CustomBreadCrumb items={[{ text: "Update", href: "/update" }]} />
<Container
header={
<Header
className="leftPadded"
variant="h2"
description=""
actions={
<SpaceBetween direction="horizontal" size="xl">
<Button
variant="primary"
loading={isUpdatingResource}
disabled={!updateEnabled}
onClick={async () => {
const response = await updateResource(
JSON.parse(updateJSON)
);
setApiResponse(response);
}}
>
Update
</Button>
</SpaceBetween>
}
>
Update Existing FHIR Resource
</Header>
}
>
<CodeEditor
ace={ace}
language="json"
value={updateJSON}
preferences={preferences}
onPreferencesChange={(e) => setPreferences(e.detail)}
onChange={(e) => setUpdateJSON(e.detail.value)}
loading={loading}
i18nStrings={i18nStrings}
onValidate={(e) => {
e.detail.annotations.length === 0
? setIsJsonValid(true)
: setIsJsonValid(false);
}}
/>
</Container>
</Box>
);
}