Skip to content

Commit

Permalink
Update ready criteria, #10186
Browse files Browse the repository at this point in the history
  • Loading branch information
njkim committed Oct 27, 2023
1 parent 0363edd commit 36e8724
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,25 @@ define([
this.loadId = params.loadId || uuid.generate();
this.resourceids = ko.observable();
this.searchUrl = ko.observable();
this.deleteTiles = ko.observable(false);
this.previewing = ko.observable(false);
this.numberOfResources = ko.observable();
this.numberOfTiles = ko.observable();
this.showPreview = ko.observable(false);

this.activeTab = ko.observable("TileDeletion");
this.deleteTiles.subscribe((val) => {
if (!val){
self.selectedNodegroup(null);
}
this.activeTab.subscribe(() => {
self.selectedGraph(null);
self.selectedNodegroup(null);
self.searchUrl(null);
});

this.ready = ko.computed(()=>{
self.showPreview(false);
self.numberOfResources(null);
self.numberOfTiles(null);
return (self.searchUrl() && !self.deleteTiles()) || (self.selectedGraph() && !self.deleteTiles()) || (self.selectedNodegroup() && self.deleteTiles());
return (self.searchUrl() && self.activeTab() === "DeletionBySearchUrl")
|| (self.selectedGraph() && self.activeTab() === "DeletionByGraph")
|| (self.selectedNodegroup() && self.activeTab() === "TileDeletion");
});

this.getGraphs = function(){
Expand Down

0 comments on commit 36e8724

Please sign in to comment.