Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#255 enable notes when exported #220

Merged
merged 4 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion frontend/src/Pages/StatementDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ const StatementDetails = () => {
extraData={{
connectivity_statement_id: statement.id,
}}
isDisabled={isDisabled}
/>
</Paper>
</Box>
Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/StatementWithProvenances.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from "react";
import {Box} from "@mui/material";
import StatementForm from "./Forms/StatementForm";
import ProvenancesForm from "./Forms/ProvenanceForm";

const StatementWithProvenances = ({ statement, background = "#fff", refreshStatement, isDisabled } : any) => {

Expand Down
3 changes: 0 additions & 3 deletions frontend/src/components/Widgets/CustomEntitiesDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
} from "@mui/material";
import {CheckedItemIcon, CheckedItemIconBG, UncheckedItemIcon} from "../icons";
import HoveredOptionContent from "./HoveredOptionContent";
import ClearOutlinedIcon from "@mui/icons-material/ClearOutlined";
import ArrowDropDownIcon from "@mui/icons-material/ArrowDropDown";
import ArrowDropUpIcon from "@mui/icons-material/ArrowDropUp";
import theme from "../../theme/Theme";
Expand Down Expand Up @@ -209,8 +208,6 @@ export default function CustomEntitiesDropdown({
chipsNumber = 2,
postProcessOptions = false,
refreshStatement,
statement,
fieldName = "",
getPreLevelSelectedValues,
areConnectionsExplicit,
minWidth = '',
Expand Down
35 changes: 16 additions & 19 deletions frontend/src/components/Widgets/NotesFomList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const TimeLineIcon = () => {
</Box>
}
const NoteDetails = (props: any) => {
const { extraData, isDisabled } = props
const { extraData } = props
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: @Salam-Dalloul why not leave the disabled functionality here and solve this in the "caller"

const [noteList, setNoteList] = useState<Note[]>([])
const [refresh, setRefresh] = useState(false)

Expand All @@ -48,24 +48,21 @@ const NoteDetails = (props: any) => {

return (
<Box display='flex' flexDirection='column' >
{
!isDisabled && <Box sx={{
...greyBgContainer,
padding: '0 8px 8px !important',
textAlign: 'center',
"& .MuiGrid-item":
{
paddingTop: 0
},
"& .MuiInputBase-root": {
background: '#fff',
borderRadius: '12px'
}
}}>
<NoteForm setRefresh={setRefresh} extraData={extraData} />
</Box>
}

<Box sx={{
...greyBgContainer,
padding: '0 8px 8px !important',
textAlign: 'center',
"& .MuiGrid-item":
{
paddingTop: 0
},
"& .MuiInputBase-root": {
background: '#fff',
borderRadius: '12px'
}
}}>
<NoteForm setRefresh={setRefresh} extraData={extraData} />
</Box>
<Timeline sx={{
"& .MuiTimelineItem-root": {
"&:before": {
Expand Down
6 changes: 1 addition & 5 deletions frontend/src/components/Widgets/TextfieldWithChips.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@ import React from "react";
import TextField from "@mui/material/TextField";
import FormControl from "@mui/material/FormControl";
import { Autocomplete, styled } from "@mui/material";
import Chip from "@mui/material/Chip";
import ClearOutlinedIcon from "@mui/icons-material/ClearOutlined";
import { vars } from "../../theme/variables";
import Box from "@mui/material/Box";
import CustomTextFieldChip from "./CustomTextFieldChip";

const StyledInput = styled(TextField)(({ theme }) => ({
const StyledInput = styled(TextField)(() => ({

"& .MuiInputBase-root": {
boxShadow: 'none',
Expand Down Expand Up @@ -49,7 +46,6 @@ const TextfieldWithChips = ({
data.map(
(
ele: { id: number; label: string; enableClick: boolean },
index: number,
) => (
<CustomTextFieldChip
id={ele.id}
Expand Down