@@ -31,7 +31,7 @@ const DocumentModifiedCount = ({documentModifiedCount}) => {
3131 </ h6 >
3232}
3333
34- const BranchCRMessage = ( { css, branch} ) => {
34+ export const BranchCRMessage = ( { css, branch} ) => {
3535 return < React . Fragment >
3636 < Badge bg = { css } className = "fw-bold mr-2 text-dark" >
3737 < BiGitBranch className = " mr-1" /> { branch }
@@ -58,9 +58,6 @@ export const ChangeDiffComponent = () => {
5858 currentCRObject
5959 } = WOQLClientObj ( )
6060
61- /*const {
62- getChangeRequestByID,
63- } = ChangeRequest()*/
6461
6562 const { id} = useParams ( )
6663
@@ -69,16 +66,7 @@ export const ChangeDiffComponent = () => {
6966 const [ loading , setLoading ] = useState ( true )
7067 const [ errorMsg , setErrorMsg ] = useState ( false )
7168
72- /* useEffect(() => {
73- async function getCRID() {
74- await getChangeRequestByID(id,true)
75- }
76- if(id, client) getCRID()
77- }, [id, client])*/
78-
79- //let changeRequestID=localStorage.getItem("TERMINUSCMS_CHANGE_REQUEST_ID")
8069 const result = GetDiffList ( client , id , setLoading , setErrorMsg )
81- //const result = GetDiffList(client, currentCRObject["@id"])
8270
8371 useEffect ( ( ) => {
8472 if ( key === DIFFS ) setAction ( false )
@@ -88,40 +76,41 @@ export const ChangeDiffComponent = () => {
8876
8977 let documentModifiedCount = result ? result . length : 0
9078
91- let author = currentCRObject && currentCRObject . hasOwnProperty ( "creator" ) ? currentCRObject [ "creator" ] : "user"
79+ // email address
80+ let author = currentCRObject && currentCRObject . hasOwnProperty ( "creator_email" ) ? currentCRObject [ "creator_email" ] : "creator"
9281
9382 return < Tabs
94- id = "change_request_tabs"
95- activeKey = { key }
96- onSelect = { ( k ) => setKey ( k ) }
97- className = "mb-3" >
98- < Tab eventKey = { DIFFS } title = { DIFFS } >
99- { loading && < Loading message = { `Loading Diffs ...` } /> }
100- { errorMsg && < Alert variant = { "danger" } className = "mr-3" >
101- { errorMsg }
102- </ Alert > }
103- { ! documentModifiedCount && < h6 className = "text-muted fw-bold mt-3 mb-3" >
104- { `No documents ` }
105- </ h6 > }
106- < Card bg = "transparent" className = "border-secondary mt-5 mb-5" >
107- < Card . Header >
108- < Stack direction = "horizontal" gap = { 2 } className = "mt-1" >
109- < DisplayHeader author = { author }
110- tracking_branch = { currentCRObject . tracking_branch }
111- documentModifiedCount = { documentModifiedCount } />
112- </ Stack >
113- </ Card . Header >
114- < Card . Body >
115-
116- { currentCRObject . status !== MERGED && < ReviewComponent setKey = { setKey } action = { action } setAction = { setAction } /> }
117- < DiffView diffs = { result } CRObject = { currentCRObject } />
118- </ Card . Body >
119- </ Card >
120- </ Tab >
121- < Tab eventKey = { MESSAGES } title = { MESSAGES } >
122- < Messages />
123- </ Tab >
124- </ Tabs >
83+ id = "change_request_tabs"
84+ activeKey = { key }
85+ onSelect = { ( k ) => setKey ( k ) }
86+ className = "mb-3" >
87+ < Tab eventKey = { DIFFS } title = { DIFFS } >
88+ { loading && < Loading message = { `Loading Diffs ...` } /> }
89+ { errorMsg && < Alert variant = { "danger" } className = "mr-3" >
90+ { errorMsg }
91+ </ Alert > }
92+ { ! documentModifiedCount && < h6 className = "text-muted fw-bold mt-3 mb-3" >
93+ { `No documents ` }
94+ </ h6 > }
95+ < Card bg = "transparent" className = "border-secondary mt-5 mb-5" >
96+ < Card . Header >
97+ < Stack direction = "horizontal" gap = { 2 } className = "mt-1" >
98+ < DisplayHeader author = { author }
99+ tracking_branch = { currentCRObject . tracking_branch }
100+ documentModifiedCount = { documentModifiedCount } />
101+ </ Stack >
102+ </ Card . Header >
103+ < Card . Body >
104+
105+ { currentCRObject . status !== MERGED && < ReviewComponent setKey = { setKey } action = { action } setAction = { setAction } /> }
106+ < DiffView diffs = { result } CRObject = { currentCRObject } />
107+ </ Card . Body >
108+ </ Card >
109+ </ Tab >
110+ < Tab eventKey = { MESSAGES } title = { MESSAGES } >
111+ < Messages />
112+ </ Tab >
113+ </ Tabs >
125114}
126115
127116 /*<small className="fw-bold mr-2 h6">You are in change request mode</small>
0 commit comments