From 187f4aad282817c1685ba39771caac233692086f Mon Sep 17 00:00:00 2001 From: Birendra Date: Tue, 25 Aug 2020 14:50:12 +0530 Subject: [PATCH] fix da issue and CA issue and subcription report --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js | 135 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js | 73 ++++++++++++++++++++++++++++++++++++------------------------------------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js | 11 +++++------ 400-SOURCECODE/Admin/src/app/components/Reports/subscriptionreport.component.ts | 2 +- 4 files changed, 140 insertions(+), 81 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js index f3d50ab..047d489 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js @@ -7,7 +7,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.CAAllBodySystem = []; $scope.CAAllSpeciality = []; $scope.selectedCAListViewData = []; - // $scope.searchCAListViewData = []; $scope.SelectedCAthumbImage = []; $scope.SelectedCAImage = []; $scope.SelectedCASummary = []; @@ -49,12 +48,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout 'height': 0, 'minimised': false, 'maximised': false - }; return windata; } - $scope.initializeCAWindowData = function (windowviewid, isOpenWithExistsModule, openPanelNo) { if (isOpenWithExistsModule || openPanelNo == 0) { if ($rootScope.CAWindowData != undefined) { @@ -143,7 +140,74 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } $scope.loadAIModuleById = function (moduleId) { + //added by birendra + //direct open CA module + if($rootScope.siteUrlInfo.mtype!=null && $rootScope.siteUrlInfo.id!=null) + { + if($rootScope.siteUrlInfo.mtype.toLowerCase()=='ca' && $rootScope.siteUrlInfo.id!="") + { + $rootScope.isCallFromOtherModule = true; + $rootScope.linkToOpenCa=true; + // store exist module in module service + var ExistData = ModuleService.getModuleData("CLINICAL_ANIMATIONS"); + + if (ExistData != undefined && ExistData.length > 0) { + // clear all module data before open new module in cb + ModuleService.ClearWinDataByModule(ExistData.mType); + } + var promise = DataService.getJson('~/../content/data/json/ca/ca_dat_contentlist.json') + promise.then( + function (result) { + var AnimationTitle = new jinqJs() + .from(result.root.CAData) + .where('_id = ' + $rootScope.siteUrlInfo.id) + .select('_Title'); + + var CAlinkData = { + "id": $rootScope.siteUrlInfo.id, + "mType": 'CLINICAL_ANIMATIONS', + "textVisible": true, + "windowTitle": AnimationTitle[0]._Title, + + }; + ModuleService.setModuleData(CAlinkData, 0); + // close/remove prev panel when in minimised mode + + if($rootScope.CAWindowData!=undefined) + { + if($rootScope.CAWindowData.length>0) + { + for(var x=0 ;x < $rootScope.CAWindowData.length;x++){ + var winid=$rootScope.CAWindowData[x].multiwinid; + if ($('#caImagePanel_' + winid).html() != undefined) { + $('#caImagePanel_' + winid).remove(); + } + } + $rootScope.CAWindowData=[]; + } + } + + $location.url('/clinical-animations-detail'); + + }, + function (error) { + $scope.EnableUI(); + // handle errors here + console.log(' $scope.AnimationData = ' + error.statusText); + }); + } + else + { + $scope.loadCAlist(); + } + } + else + { + $scope.loadCAlist(); + } + }; + $scope.loadCAlist = function () { $rootScope.isCallFromOtherModule = undefined; $rootScope.MULTI_VIEW_ID += 1 @@ -195,7 +259,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $rootScope.currentActiveModuleTitle = selectedModuleName; }) - $scope.SetCAwindowStoreData($rootScope.MULTI_VIEW_ID, 'moduleName', "Clinical Illustrations"); + $scope.SetCAwindowStoreData($rootScope.MULTI_VIEW_ID, 'moduleName', "CLINICAL_ANIMATIONS"); $scope.LoadCAJsonData($rootScope.MULTI_VIEW_ID); @@ -247,9 +311,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout }; }, 200); - - - }; + } $scope.reRunSearchOnLoad = function (windowviewid) { var curBodyRegion = $rootScope.getLocalStorageValue("CACurBodyRegion"); @@ -326,7 +388,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout var $el = $('
' + '
').appendTo('#grid-view'); + + '

'+'('+ value._id+') ' + value._Title + '

').appendTo('#grid-view'); $compile($el)($scope); @@ -347,21 +409,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout 200); - $timeout(function () { $scope.EnableUI(); - //open default animation - if($rootScope.siteUrlInfo.mtype!=null && $rootScope.siteUrlInfo.id!=null) - { - if($rootScope.siteUrlInfo.mtype.toLowerCase()=='ca' && $rootScope.siteUrlInfo.id!="") - { - $('#'+$rootScope.siteUrlInfo.id).trigger('click'); - //$('div[title="'+$rootScope.siteUrlInfo.title+'"]').trigger('click'); - } - - // clear detail - $rootScope.siteUrlInfo.mtype=null; - $rootScope.siteUrlInfo.id=null; - } - + $timeout(function () { + $scope.EnableUI(); }, 400); } @@ -810,7 +859,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } - $scope.loadCAAnimation = function (windowviewid) { if ($rootScope.refreshcheck == null) { @@ -840,20 +888,33 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout var vtt = "~/../content/data/vtt/" + hostedFolderId + ".vtt"; if ($rootScope.isCallFromOtherModule) { - // open JS panel for curriculum with define cornonate in CB jason - $scope.jsPanelWidth = $scope.caOpenInOtherModules.size.width;//1000; - if ($scope.caOpenInOtherModules.size.width < 900) - $scope.jsPanelWidth = 900; - - $scope.jsPanelHeight = $scope.caOpenInOtherModules.size.height; - if ($scope.caOpenInOtherModules.size.height > 510) - $scope.jsPanelHeight = 510; - $scope.jsPanelLeft = 320; - $scope.jsPanelTop = $rootScope.cBModulejsPanelTop(); - if($location.url()!= "/curriculum-builder-detail") { + if($rootScope.linkToOpenCa==true) + { + $scope.jsPanelWidth = $(window).outerWidth() - 20; + $scope.jsPanelHeight = $(window).outerHeight() - 105; $scope.jsPanelLeft = 1; - } - + $scope.jsPanelTop = 70; + $rootScope.siteUrlInfo.mtype=null; + $rootScope.siteUrlInfo.id=null; + + } + else + { + // open JS panel for curriculum with define cornonate in CB jason + $scope.jsPanelWidth = $scope.caOpenInOtherModules.size.width;//1000; + if ($scope.caOpenInOtherModules.size.width < 900) + $scope.jsPanelWidth = 900; + + $scope.jsPanelHeight = $scope.caOpenInOtherModules.size.height; + if ($scope.caOpenInOtherModules.size.height > 510) + $scope.jsPanelHeight = 510; + $scope.jsPanelLeft = 320; + $scope.jsPanelTop = $rootScope.cBModulejsPanelTop(); + if($location.url()!= "/curriculum-builder-detail") { + $scope.jsPanelLeft = 1; + } + } + } else { $scope.jsPanelWidth = $(window).outerWidth() - 20; diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 71089db..b04b3b2 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -820,12 +820,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $rootScope.BodyViewData = data; - $scope.loadBodyView(windowviewid); + $scope.loadTermData(windowviewid); }) }) } else { - $scope.loadBodyView(windowviewid); + $scope.loadTermData(windowviewid); } } @@ -840,11 +840,38 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.viewID = 'daViewDA' + '_' + windowviewid; $scope.SetwindowStoreData(windowviewid, 'parentSlugName', 'da-view-list'); - $scope.loadBodyView(windowviewid); + $scope.loadTermData(windowviewid); } } + $scope.loadTermData = function (windowviewid) { + var bodyViewId=$scope.GetwindowStoreData(windowviewid,'voId'); + // set gender + $scope.setGenderNameById(bodyViewId,windowviewid); + $rootScope.daloadSearchData(windowviewid); + //call time interval function until load Illustration data + var timeintval = null; + timeintval = $interval(function () { + var vocabTermDataArray = $scope.GetwindowStoreData(windowviewid, 'vocabTermDataArray'); + if (vocabTermDataArray!=null) { + $scope.stopVocab(); + $scope.loadBodyView(windowviewid); + } + else + { + console.log("waiting for search term Data"); + } + }, 100); + + $scope.stopVocab = function () { + if (angular.isDefined(timeintval)) { + $interval.cancel(timeintval); + timeintval = undefined; + } + }; + }, + $scope.loadBodyView = function (windowviewid) { if (document.getElementById('daBodyview') != null) { @@ -870,9 +897,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } } - - //0.1 - var bodyViewId=$scope.GetwindowStoreData(windowviewid,'voId'); if (bodyViewId == null || bodyViewId == undefined) { @@ -885,17 +909,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $rootScope.isVisibleLogin = false; console.log('currentBodyViewId picked from localStorage: ' + bodyViewId); - - // set gender - $scope.setGenderNameById(bodyViewId,windowviewid); + var currentViewTitle = $scope.GetwindowStoreData(windowviewid,'currentViewTitle'); console.log('current view title: ' + currentViewTitle); // store image title for export image $rootScope.StoreTitleName(currentViewTitle); - $rootScope.daloadSearchData(windowviewid); - - if ($rootScope.isCallFromOtherModule) { if($rootScope.cernerIntegrationActive) { @@ -1522,6 +1541,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.SetwindowStoreData(windowviewid,'TermNumberData',e.data.TermNumberData); + // store image for export + $scope.LoadImageToExport(windowviewid); + console.log("$rootScope.TermNumberData = " + e.data.TermNumberData.TermData.Term.length); console.log("$scope.BodyViewIDs" + e.data.bodyViewID); @@ -1576,10 +1598,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } - } - - // store image for export - $scope.LoadImageToExport(windowviewid); + } } @@ -1872,27 +1891,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $("#btnNormalMode_" + windowviewid).removeClass("btn-primary"); } } - //call time interval function until load Illustration data - var timeintval = null; - timeintval = $interval(function () { - var vocabTermDataArray = $scope.GetwindowStoreData(windowviewid, 'vocabTermDataArray'); - if (vocabTermDataArray!=null) { - $scope.stopVocab(); - $scope.setLayerNumberAndHighlightByTermListforCB(windowviewid); - } - else - { - console.log("waiting for Illustration Data"); - } - }, 100); - - $scope.stopVocab = function () { - if (angular.isDefined(timeintval)) { - $interval.cancel(timeintval); - timeintval = undefined; - } - }; - + $scope.setLayerNumberAndHighlightByTermListforCB(windowviewid); } $scope.setLayerNumberAndHighlightByTermListforCB = function (windowviewid) { diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index 2339e5e..c56c15a 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -922,10 +922,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $location.path('/'); $timeout(function () { - - //currently open CA - $scope.RedirectToModule(); - + $scope.RedirectToModule(); }, 100); } @@ -1023,7 +1020,6 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data else { $location.path('/'); $timeout(function () { - //currently open CA $scope.RedirectToModule(); }, 100); @@ -1071,7 +1067,10 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data if($rootScope.siteUrlInfo.mtype!=null) { if($rootScope.siteUrlInfo.mtype.toLowerCase()=='ca') - $('#clinical-animations').trigger('click'); + { + $('#clinical-animations').trigger('click'); + } + } if ((localStorage.getItem("daDataObject")) != '') { //$rootScope.cernerIntegrationActive=true; diff --git a/400-SOURCECODE/Admin/src/app/components/Reports/subscriptionreport.component.ts b/400-SOURCECODE/Admin/src/app/components/Reports/subscriptionreport.component.ts index bf4f21c..b7a7d58 100644 --- a/400-SOURCECODE/Admin/src/app/components/Reports/subscriptionreport.component.ts +++ b/400-SOURCECODE/Admin/src/app/components/Reports/subscriptionreport.component.ts @@ -75,7 +75,7 @@ export class SubscriptionReport implements OnInit { iAccountTypeId: [0], iStateId: [0], icStartPrice: [0], - icEndPrice: [0], + icEndPrice: [''], iCountryId: [0], }); this.alerts = ''; -- libgit2 0.21.4