Skip to content

Commit 23ae210

Browse files
authored
Merge pull request #219 from terminusdb/newDoc
New doc
2 parents d3ee05d + 5c35832 commit 23ae210

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ export const DocumentsGraphqlList = ({documentTablesConfig}) => {
6969
handleClose={()=>setShowDeleteModal(false)}
7070
/> }
7171
{error && <ErrorMessageReport error={error} setError={setError}/>}
72-
<ListDocumentsComponent type={type}
72+
{!showDeleteModal && <ListDocumentsComponent type={type}
7373
gqlQuery={query}
7474
apolloClient={apolloClient}
7575
tablesConfig={documentTablesConfig}
7676
onViewButtonClick={onViewClick}
7777
onEditButtonClick={onEditClick}
7878
onRowClick={onViewClick}
7979
onDeleteButtonClick={deleteDocumentHandler}
80-
onCreateButtonClick={handleCreate}/>
80+
onCreateButtonClick={handleCreate}/>}
8181
</React.Fragment>
8282
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export const DocumentsGraphqlTable = ({gqlQuery,apolloClient,tableConfig, type,
6060
evt.stopPropagation()
6161
if (onDeleteButtonClick) {
6262
const rowTmp = row && row.original ? {label:row.original.name, id:row.original.fullID}: {}
63-
onDeleteButtonClick(rowTmp)
63+
onDeleteButtonClick(rowTmp)
6464
}
6565
}
6666

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export const useTDBDocuments = (woqlClient) => {
182182
return true
183183
}catch(err){
184184
//display conflict
185-
setSelectedDocument(jsonDoc)
185+
setSelectedDocument(jsonDocument)
186186
setError(err.data || {message:err.message})
187187
}finally{setLoading(false)}
188188
}

packages/tdb-documents-ui/src/components/EditDocumentLink.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,13 @@ const assignDepth = (data, depth = 0 , propertyLink) => {
151151
depth += 1
152152
return assignDepth(data[propertyLink], depth, propertyLink)
153153
}
154-
return depth
154+
return depth
155155
};
156156

157157
function getAction (formData, unfoldable) {
158158
if(!formData) return false
159-
if(unfoldable &&
160-
typeof formData === CONST.OBJECT_TYPE) return CONST.LINK_NEW_DOCUMENT
161-
return CONST.LINK_EXISTING_DOCUMENT
159+
if(typeof formData === CONST.STRING_TYPE) return CONST.LINK_EXISTING_DOCUMENT
160+
return CONST.LINK_NEW_DOCUMENT
162161
}
163162

164163
const EditHelper = ({ linked_to, cardKey, setDeleteLink, clickedUnlinked }) => {

packages/tdb-documents-ui/src/widgets/oneOfDocumentsWidget.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ function getSelected(oneOfDocumentData, oneOf) {
168168
}
169169
return false
170170
}
171-
171+
172172
export const TDBOneOfDocuments = ({ args, props, property, id, setOneOfDocumentData, oneOfDocumentData }) => {
173173

174174
let { documentFrame, mode } = args

0 commit comments

Comments
 (0)