@@ -2,8 +2,8 @@ import { Box } from '@mui/system';
22import { MaterialPreview , Project , isGuest } from 'shared' ;
33import { NERButton } from '../../../components/NERButton' ;
44import WarningIcon from '@mui/icons-material/Warning' ;
5+ import React , { useState } from 'react' ;
56import { Tooltip , useTheme } from '@mui/material' ;
6- import { useState } from 'react' ;
77import BOMTableWrapper from './BOM/BOMTableWrapper' ;
88import CreateMaterialModal from './BOM/MaterialForm/CreateMaterialModal' ;
99import CreateAssemblyModal from './BOM/AssemblyForm/CreateAssemblyModal' ;
@@ -20,6 +20,7 @@ import {
2020 useGetMaterialsForWbsElement
2121} from '../../../hooks/bom.hooks' ;
2222import ImportBOMModal from './BOM/ImportBOMModal' ;
23+ import BOMCopyConfirmModal from './BOM/MaterialForm/BOMCopyConfirmModal' ;
2324
2425export const addMaterialCosts = ( accumulator : number , currentMaterial : MaterialPreview ) =>
2526 ( currentMaterial . subtotal ?? 0 ) + accumulator ;
@@ -31,8 +32,9 @@ const BOMTab = ({ project }: { project: Project }) => {
3132 const [ showAddAssembly , setShowAddAssembly ] = useState ( false ) ;
3233 const [ showCopyBOM , setShowCopyBOM ] = useState ( false ) ;
3334 const [ showImportBOM , setShowImportBOM ] = useState ( false ) ;
34- const theme = useTheme ( ) ;
35+ const [ bomConfirmOpen , setBomConfirmOpen ] = useState ( false ) ;
3536
37+ const theme = useTheme ( ) ;
3638 const user = useCurrentUser ( ) ;
3739
3840 const {
@@ -148,6 +150,16 @@ const BOMTab = ({ project }: { project: Project }) => {
148150 Copy Existing BOM
149151 </ NERButton >
150152 </ Box >
153+ < BOMCopyConfirmModal
154+ open = { bomConfirmOpen }
155+ onHide = { ( ) => {
156+ setBomConfirmOpen ( false ) ;
157+ } }
158+ onSuccess = { ( ) => { } }
159+ materialsCount = { 1 }
160+ sourceProjectName = { 'Source Project' }
161+ currentProjectName = { 'Target Project' }
162+ > </ BOMCopyConfirmModal >
151163 < Box display = "flex" gap = "20px" alignItems = "center" >
152164 < Box sx = { { backgroundColor : theme . palette . background . paper , padding : '8px 14px 8px 14px' , borderRadius : '6px' } } >
153165 Budget: ${ project . budget }
0 commit comments