Skip to content

Commit fda946d

Browse files
Samuel ShresthaSamuel Shrestha
authored andcommitted
only in create form
1 parent 6589127 commit fda946d

1 file changed

Lines changed: 21 additions & 19 deletions

File tree

src/frontend/src/pages/ProjectDetailPage/ProjectViewContainer/BOM/MaterialForm/MaterialFormView.tsx

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -496,28 +496,30 @@ const MaterialFormView: React.FC<MaterialFormViewProps> = ({
496496
</FormControl>
497497
</Box>
498498
</Grid>
499-
<Grid item xs={12} sx={{ pl: 0, pr: 0 }}>
500-
<Box
501-
sx={{
502-
pt: 1
503-
}}
504-
>
505-
<Button
506-
variant="contained"
507-
disableElevation
508-
onClick={() => {}}
499+
{submitText === 'Add' && (
500+
<Grid item xs={12} sx={{ pl: 0, pr: 0 }}>
501+
<Box
509502
sx={{
510-
mx: 0,
511-
textTransform: 'none',
512-
bgcolor: '#EF4345',
513-
color: (t) => t.palette.getContrastText('#EF4345'),
514-
'&:hover': { bgcolor: (t) => t.palette.error.dark }
503+
pt: 1
515504
}}
516505
>
517-
COPY FROM EXISTING BOM
518-
</Button>
519-
</Box>
520-
</Grid>
506+
<Button
507+
variant="contained"
508+
disableElevation
509+
onClick={() => {}}
510+
sx={{
511+
mx: 0,
512+
textTransform: 'none',
513+
bgcolor: '#EF4345',
514+
color: (t) => t.palette.getContrastText('#EF4345'),
515+
'&:hover': { bgcolor: (t) => t.palette.error.dark }
516+
}}
517+
>
518+
COPY FROM EXISTING BOM
519+
</Button>
520+
</Box>
521+
</Grid>
522+
)}
521523
</NERFormModal>
522524
);
523525
};

0 commit comments

Comments
 (0)