Skip to content

Commit 6ef97d9

Browse files
committed
merge origin newDoc
2 parents 7d97951 + 0ee0dc5 commit 6ef97d9

File tree

13 files changed

+524
-742
lines changed

13 files changed

+524
-742
lines changed

package-lock.json

Lines changed: 436 additions & 731 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"dependencies": {
1313
"bootswatch": "^5.2.3",
1414
"esbuild-jest": "^0.5.0",
15-
"jsonlint-mod": "^1.7.6"
15+
"jsonlint-mod": "^1.7.6",
16+
"react-pro-sidebar": "^0.6.0"
1617
},
1718
"devDependencies": {
1819
"@testing-library/react": "^13.4.0"

packages/tdb-dashboard/src/components/AboutDataProduct.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ export const AboutDataProduct = ({dataProductDetails, setShowDeleteModal, setSho
9696
<Card className="bg-transparent p-1 mb-5 tdb__align__container" border="muted">
9797
<Card.Body>
9898
<h4 className="text-light mb-3 fw-bold">About</h4>
99+
99100
{dataProductDetails.comment!== 'false' && <span className="text-light mb-4 ">
100101
{dataProductDetails.comment}
101102
</span>}
@@ -145,10 +146,10 @@ export const AboutDataProduct = ({dataProductDetails, setShowDeleteModal, setSho
145146
</span>
146147
{accessControlDashboard && accessControlDashboard.createDB() && <Fragment>
147148
<div className="w-100 d-block align-items-center gx-0">
148-
<Button variant="secondary"
149+
<Button variant="light"
149150
id="update_database"
150151
title={`Update Data Product ${dataProduct} info`}
151-
className=" btn btn-lg h2 fw-bold w-100 mt-4"
152+
className=" btn btn-md h4 w-100 mt-4 text-dark"
152153
onClick={showUpdateHandler}>
153154
Update Dataproduct details
154155
</Button>

packages/tdb-dashboard/src/components/ChangeDiffComponent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export const ChangeDiffComponent = () => {
110110
<Card.Body>
111111
{currentCRObject.status === SUBMITTED &&
112112
<ReviewComponent/> }
113-
<DiffView frames={frames} diffs={result} start={start} changePage={changePage} CRObject={currentCRObject}/>
113+
{!loading && <DiffView diffs={result} CRObject={currentCRObject} start={start} setStart={setStart}/>}
114114
</Card.Body>
115115
</Card>
116116
</Tab>

packages/tdb-dashboard/src/hooks/useDiff.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React, {useState,useEffect} from "react";
22
import { WOQLClientObj } from "../init-woql-client";
3+
import { DIFFS_PER_PAGE_LIMIT } from "../components/constants"
34

45
export function useDiff(){
56
const {woqlClient,currentChangeRequest} = WOQLClientObj()
@@ -51,7 +52,7 @@ export function useDiff(){
5152
}finally{setLoading(false)}
5253
}
5354

54-
async function getDiffList(changeRequestID,start=0,count=5) {
55+
async function getDiffList(changeRequestID, start=0, count=DIFFS_PER_PAGE_LIMIT) {
5556
try{
5657
setStart(start)
5758
if(totalResult[`start__${start}`]){

packages/tdb-dashboard/src/pages/ChangeRequestsPage.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@ export const ChangeRequestsPage = () => {
196196
<div className="ms-2 me-auto">
197197
<div className="fw-bold text-success">
198198
{name}
199-
<span class="text-dark ml-1 badge badge-info mr-1">{item.tracking_branch}</span>
199+
<span class="text-dark ml-1 badge bg-light mr-1">{item.tracking_branch}</span>
200200
from branch
201-
<span class="text-dark ml-1 badge badge-success">{item.original_branch}</span>
201+
<span class="text-dark ml-1 badge bg-success">{item.original_branch}</span>
202202

203203
</div>
204204
<div className="text-gray font-italic">

packages/tdb-dashboard/src/pages/DocumentNew.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export const DocumentNew = () => {
5353
<NewDocumentComponent
5454
SearchComponent={DocumentSearchComponent}
5555
frames={frames}
56+
formData={{}}
5657
createDocument={callCreateDocument}
5758
type={type}
5859
closeButtonClick={closeButtonClick}

packages/tdb-documents-ui-template/src/NewDocumentComponent.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {ViewDocumentFrames} from "./components/ViewDocumentFrames"
1010
import { LanguageSelectComponent } from "./components/SelectLanguageComponent"
1111

1212
//onSelect={<SearchComponent/>}
13-
export const NewDocumentComponent = ({type,createDocument,frames,closeButtonClick,SearchComponent}) => {
13+
export const NewDocumentComponent = ({type,createDocument,documentJson,frames,closeButtonClick,SearchComponent}) => {
1414
const [view, setView] = useState(CONST.FORM_VIEW)
1515
const [showFrames, setShowFrames] = useState(false)
1616
const [selectedLanguage, setSelectedLanguage] = useState(false)
@@ -40,6 +40,7 @@ export const NewDocumentComponent = ({type,createDocument,frames,closeButtonClic
4040
{view === CONST.FORM_VIEW &&
4141
<FrameViewer frame={frames}
4242
type={type}
43+
formData={documentJson}
4344
mode={CONST.CREATE_DOCUMENT}
4445
language={selectedLanguage}
4546
onSubmit={createDocument}

packages/tdb-documents-ui-template/src/components/JsonFrameViewer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const JsonFrameViewer = ({type, jsonData, mode, setExtracted}) => {
5050
Syntax Error: {error} </Alert>}
5151

5252
<CodeMirror
53-
value={JSON.stringify(data || {}, null, 2)}
53+
value={JSON.stringify(!data ? {} : data, null, 2)}
5454
options={cmOptions}
5555
className={"document__interface__main"}
5656
onBlur={(editor, data, value) => {

packages/tdb-documents-ui-template/src/hook/useTDBDocuments.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ export const useTDBDocuments = (woqlClient) => {
2222
// bool|Object
2323
const [frames, setFrames]=useState(false)
2424

25+
26+
2527
//get all the Document Classes (no abstract or subdocument)
2628
//improve performance with check last commit
2729
async function getDocumentClasses() {

0 commit comments

Comments
 (0)