File tree Expand file tree Collapse file tree
src/frontend/src/pages/ProjectDetailPage/ProjectViewContainer/BOM/MaterialForm Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import {
2+ Button ,
23 FormControl ,
34 FormHelperText ,
45 FormLabel ,
@@ -39,6 +40,7 @@ export interface MaterialFormViewProps {
3940 watch : UseFormWatch < MaterialFormInput > ;
4041 createManufacturer : ( name : string ) => void ;
4142 setValue : UseFormSetValue < MaterialFormInput > ;
43+ copyFromExistingBomAction ?: React . ReactNode ;
4244}
4345
4446const manufacturersToAutocomplete = ( manufacturer : Manufacturer ) : { label : string ; id : string } => {
@@ -494,6 +496,30 @@ const MaterialFormView: React.FC<MaterialFormViewProps> = ({
494496 </ FormControl >
495497 </ Box >
496498 </ Grid >
499+ { submitText === 'Add' && (
500+ < Grid item xs = { 12 } sx = { { pl : 0 , pr : 0 } } >
501+ < Box
502+ sx = { {
503+ pt : 1
504+ } }
505+ >
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+ ) }
497523 </ NERFormModal >
498524 ) ;
499525} ;
You can’t perform that action at this time.
0 commit comments