Skip to content

Commit

Permalink
Merge pull request #249 from sitmun/dev
Browse files Browse the repository at this point in the history
Add changes form NEXUS
  • Loading branch information
fjlopez authored Nov 11, 2024
2 parents d9e24b1 + 8914a47 commit 3bd9474
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/app/frontend-gui/src/lib/data-tree/data-tree.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,12 @@ export class FileDatabase {
setOrder(data: any[]){
for(let i=0; i< data.length; i++){
data[i].order=i;
if(! data[i].status) { data[i].status="Modified"; }
if(data[i].id && Number(data[i].id) < 0){
data[i].status="pendingCreation";
}
if(!data[i].status && !data[i]['status']) {
data[i].status="Modified";
}
}
return data;
}
Expand Down Expand Up @@ -196,8 +201,8 @@ export class FileDatabase {
queryableActive: node.queryableActive,
radio: node.radio,
tooltip: node.tooltip,
_links: node._links } as FileNode;

_links: node._links,
status: null } as FileNode;
return newItem;
}

Expand All @@ -206,8 +211,7 @@ export class FileDatabase {
parent.children = [];
}
const newItem = this.getNewItem(node)
newItem.parent = parent==null || parent.id==undefined?null:parent.id;

newItem.parent = parent==null || parent.id==undefined ? null : parent.id;
parent.children.push(newItem);
this.setOrder(parent.children)
this.dataChange.next(changedData);
Expand Down Expand Up @@ -547,7 +551,9 @@ export class DataTreeComponent {
setOrder(data: any[]){
for(let i=0; i< data.length; i++){
data[i].order=i;
if(! data[i].status) { data[i].status="Modified"; }
if(! data[i].status) {
data[i].status="Modified";
}
}
return data;
}
Expand Down

0 comments on commit 3bd9474

Please sign in to comment.