ATLAS-4583 : (UI)When there is no data, error is encountered on switching UI at a specific page

Signed-off-by: Pinal Shah <pinal.shah@freestoneinfotech.com>
This commit is contained in:
Farhan Khan 2022-05-23 16:28:52 +05:30 committed by Pinal Shah
parent 5bddf56a2b
commit 12438ff2a2
3 changed files with 10 additions and 2 deletions

View File

@ -651,6 +651,9 @@ define(['require',
},
cust_error: function() {},
complete: function() {
if(that.collection.fullCollection.length === 0){
that.setUrl('#!/tag', true);
}
that.notificationModal.hideButtonLoader();
that.notificationModal.remove();
}

View File

@ -212,6 +212,11 @@ define([
var that = this;
require(["views/site/Header", "views/tag/TagContainerLayoutView", "views/site/SideNavLayoutView"], function(Header, TagContainerLayoutView, SideNavLayoutView) {
var paramObj = Utils.getUrlState.getQueryParams();
//Below if condition is added to handle "when Classification tab does not have any classification and selected in Old UI and switched to New UI is show continous loading
if (paramObj === undefined || tagName === "viewType=tree" || tagName === "viewType=flat") {
that.defaultAction();
return;
}
that.renderViewIfNotExists(that.getHeaderOptions(Header));
var options = _.extend({
tag: tagName,
@ -238,7 +243,7 @@ define([
require(["views/site/Header", "views/glossary/GlossaryContainerLayoutView", "views/search/SearchDefaultLayoutView", "views/site/SideNavLayoutView"], function(Header, GlossaryContainerLayoutView, SearchDefaultLayoutView, SideNavLayoutView) {
var paramObj = Utils.getUrlState.getQueryParams();
//Below if condition is added to handle "when Glossary tab does not have any glossary and selected in Old UI and switched to New UI is show continous loading
if (paramObj === undefined) {
if (paramObj === undefined || id === "viewType=category" || id === "viewType=term") {
that.defaultAction();
return;
}

View File

@ -889,7 +889,7 @@ define([
}
// if deleted tag is prviously searched then remove that tag url from save state of tab.
var searchUrl = Globals.saveApplicationState.tabState.searchUrl,
urlObj = Utils.getUrlState.getQueryParams(searchUrl);
urlObj = Utils.getUrlState.getQueryParams(searchUrl) ? Utils.getUrlState.getQueryParams(searchUrl) : Utils.getUrlState.getQueryParams();
that.classificationDefCollection.fullCollection.remove(deleteTagData);
// to update tag list of search tab fetch typeHeaders.
//that.typeHeaders.fetch({ reset: true });