Commit e0e10ba38c42854b86785d79b4bcc1006719e7c0
1 parent
a3e88410
Files changes came on switching o PreQA
Showing
5 changed files
with
943 additions
and
790 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js
1 | -AIA.controller("CIController", ["$scope", "$window", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "pages", "BodyRegions", "BodySystems", "ViewOrientations", "ImageTypes", "MedicalSpecialties", "DataService", | ||
2 | -function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout, pages, BodyRegions, BodySystems, ViewOrientations, ImageTypes, MedicalSpecialties, DataService) { | ||
3 | - // $rootScope.currentActiveModuleTitle = pages[3].name; | ||
4 | - $scope.showTabButton = true; | ||
5 | - $scope.IllustrationData; | ||
6 | - $scope.CIAllBodyRegion = []; | ||
7 | - $scope.CIAllBodySystem = []; | ||
8 | - $scope.CIAllOrientation = []; | ||
9 | - $scope.CIAllImageType = []; | ||
10 | - $scope.CIAllSpeciality = []; | ||
11 | - $scope.searchCIListViewData = []; | ||
12 | - $scope.SelectedCIthumbImage = []; | ||
13 | - $scope.SelectedCIImage = []; | ||
14 | - $scope.SelectedCISummary = []; | ||
15 | - $scope.SelectedCIId = []; | ||
16 | - $scope.SelectedCITitle = []; | ||
17 | - $scope.selectedCIListViewData = []; | ||
18 | - $scope.filterstring = false; | ||
19 | - $scope.idSelected; | ||
20 | - $scope.srollListView; | ||
21 | - $scope.query = { | ||
22 | - selectedbodyregion: '', | ||
23 | - selectedbodysystem: '', | ||
24 | - selectedorientation: '', | ||
25 | - selectedimagetype: '', | ||
26 | - selectedspecialty: '', | ||
27 | - }; | ||
28 | - | ||
29 | - $scope.setActiveTab = function (tabToSet) { | ||
30 | - $scope.activeTab = tabToSet; | ||
31 | - localStorage.setItem("currentCITabView", $scope.activeTab); | ||
32 | - }; | ||
33 | - | ||
34 | - $scope.$on('$viewContentLoaded', function (event) { | ||
35 | - | ||
36 | - if ($rootScope.refreshcheck == null) { | ||
37 | - $location.path('/'); | ||
38 | - } | ||
39 | - // code that will be executed ... | ||
40 | - // every time this view is loaded | ||
41 | - | ||
42 | - //get current path | ||
43 | - var currentURL = $location.path(); | ||
44 | - var selectedModuleName = ''; | ||
45 | - //set module title | ||
46 | - angular.forEach($rootScope.userModules, function (value, key) { | ||
47 | - if (value.slug === currentURL.replace('/', '')) { | ||
48 | - selectedModuleName = value.name; | ||
49 | - } | ||
50 | - $rootScope.currentActiveModuleTitle = selectedModuleName; | ||
51 | - }) | ||
52 | - | ||
53 | - $scope.LoadCIJsonData(); | ||
54 | - | ||
55 | - $scope.CIAllBodyRegion = BodyRegions; | ||
56 | - $scope.CIAllBodySystem = BodySystems; | ||
57 | - $scope.CIAllOrientation = ViewOrientations; | ||
58 | - $scope.CIAllImageType = ImageTypes; | ||
59 | - $scope.CIAllSpeciality = MedicalSpecialties; | ||
60 | - $scope.scroll(); | ||
61 | - //push the details of open module in array $rootScope.openModules | ||
62 | - $rootScope.openModules.push({ "ModuleId": 4 }); | ||
63 | - | ||
64 | - //set the local storage | ||
65 | - | ||
66 | - var curtab = $rootScope.getLocalStorageValue("currentCITabView"); | ||
67 | - if (curtab == 2) { | ||
68 | - $scope.setActiveTab(2); | ||
69 | - var curSelectedRowId = $rootScope.getLocalStorageValue("CISelectedRowId"); | ||
70 | - if (typeof (curSelectedRowId) !== "undefined" && curSelectedRowId !== null && curSelectedRowId !== '') { | ||
71 | - $scope.reRunSearchOnLoad(); | ||
72 | - $scope.idSelected = curSelectedRowId; | ||
73 | - $scope.ReloadListViewImageDiv($scope.idSelected); | ||
74 | - } | ||
75 | - else { | ||
76 | - $scope.reRunSearchOnLoad() | ||
77 | - $scope.idSelected = ''; | ||
78 | - } | ||
79 | - } | ||
80 | - else { | ||
81 | - $scope.setActiveTab(1); | ||
82 | - $scope.reRunSearchOnLoad(); | ||
83 | - | ||
84 | - } | ||
85 | - | ||
86 | - | ||
87 | - }); | ||
88 | - | ||
89 | - $scope.reRunSearchOnLoad = function () { | ||
90 | - | ||
91 | - var curBodyRegion = $rootScope.getLocalStorageValue("CICurBodyRegion"); | ||
92 | - if (typeof (curBodyRegion) !== "undefined" && curBodyRegion !== null && curBodyRegion !== '') { | ||
93 | - $scope.query.selectedbodyregion = curBodyRegion; | ||
94 | - } | ||
95 | - else { | ||
96 | - $scope.query.selectedbodyregion = ""; | ||
97 | - } | ||
98 | - | ||
99 | - var curBodySystem = $rootScope.getLocalStorageValue("CICurBodySystem"); | ||
100 | - if (typeof (curBodySystem) !== "undefined" && curBodySystem !== null && curBodySystem !== '') { | ||
101 | - $scope.query.selectedbodysystem = curBodySystem; | ||
102 | - } | ||
103 | - else { | ||
104 | - $scope.query.selectedbodysystem = ""; | ||
105 | - } | ||
106 | - | ||
107 | - var curOrientation = $rootScope.getLocalStorageValue("CICurOrientation"); | ||
108 | - if (typeof (curOrientation) !== "undefined" && curOrientation !== null && curOrientation !== '') { | ||
109 | - $scope.query.selectedorientation = curOrientation; | ||
110 | - } | ||
111 | - else { | ||
112 | - $scope.query.selectedorientation = ""; | ||
113 | - } | ||
114 | - | ||
115 | - var curImageType = $rootScope.getLocalStorageValue("CICurImageType"); | ||
116 | - if (typeof (curImageType) !== "undefined" && curImageType !== null && curImageType !== '') { | ||
117 | - $scope.query.selectedimagetype = curImageType; | ||
118 | - } | ||
119 | - else { | ||
120 | - $scope.query.selectedimagetype = ""; | ||
121 | - } | ||
122 | - | ||
123 | - var curSpeciality = $rootScope.getLocalStorageValue("CICurSpeciality"); | ||
124 | - if (typeof (curSpeciality) !== "undefined" && curSpeciality !== null && curSpeciality !== '') { | ||
125 | - $scope.query.selectedspecialty = curSpeciality; | ||
126 | - } | ||
127 | - else { | ||
128 | - $scope.query.selectedspecialty = ""; | ||
129 | - } | ||
130 | - | ||
131 | - | ||
132 | - if ($scope.query.selectedbodyregion == "" && $scope.query.selectedbodysystem == "" && $scope.query.selectedorientation == "" && $scope.query.selectedimagetype == "" && $scope.query.selectedspecialty == "") { | ||
133 | - $scope.loadAllCI(); | ||
134 | - } | ||
135 | - else { | ||
136 | - $scope.ApplySearch($scope.query); | ||
137 | - } | ||
138 | - | ||
139 | - } | ||
140 | - | ||
141 | - $scope.LoadCIJsonData = function () { | ||
142 | - | ||
143 | - var promise = DataService.getJson('~/../content/data/json/ci/ci_dat_contentlist.json') | ||
144 | - promise.then( | ||
145 | - function (result) { | ||
146 | - $scope.IllustrationData = result; | ||
147 | - $scope.selectedCIListViewData = new jinqJs() | ||
148 | - .from($scope.IllustrationData.root.CIData) | ||
149 | - .orderBy([{ field: '_Title', sort: 'asc' }]) | ||
150 | - .select(); | ||
151 | - | ||
152 | - }, | ||
153 | - function (error) { | ||
154 | - // handle errors here | ||
155 | - console.log(' $scope.IllustrationData = ' + error.statusText); | ||
156 | - } | ||
157 | - ); | ||
158 | - | ||
159 | - | ||
160 | - }; | ||
161 | - | ||
162 | - $scope.loadAllCI = function () { | ||
163 | - $('#ciSpinner').css('visibility', 'visible'); | ||
164 | - $('#ciSpinner').css('zIndex', '20000'); | ||
165 | - var promise = DataService.getJson('~/../content/data/json/ci/ci_dat_contentlist.json') | ||
166 | - promise.then( | ||
167 | - function (result) { | ||
168 | - $scope.IllustrationData = result; | ||
169 | - | ||
170 | - $scope.selectedCIListViewData = new jinqJs() | ||
171 | - .from($scope.IllustrationData.root.CIData) | ||
172 | - .orderBy([{ field: '_Title', sort: 'asc' }]) | ||
173 | - .select(); | ||
174 | - | ||
175 | - // console.log($scope.selectedCIListViewData); | ||
176 | - | ||
177 | - | ||
178 | - | ||
179 | - $('#grid-view').empty(); | ||
180 | - var $e1 = $('<ul><li ng-repeat="value in selectedCIListViewData" class="col-sm-3 col-md-2"><div id="{{value._id}}" title = "{{value._Title}}" class="GridViewDataDivHeight" data-ng-click="openView($event)">' | ||
181 | - + '<div class="thumbnail" >' | ||
182 | - + '<img id="{{value._Title}}" ng-src="~/../content/images/ci/thumbnails/{{value._ThumbnailImage}}" >'//alt="{{value._Title}}" >' | ||
183 | - + '<div class="caption"><p> {{value._Title}}</p></div></a></div></div></li></ul>').appendTo('#grid-view'); | ||
184 | - $compile($e1)($scope); | ||
185 | - //angular.forEach($scope.selectedCIListViewData, function (value, key) { | ||
186 | - // $scope.imagePath = "~/../content/images/ci/thumbnails/" + value._ThumbnailImage; | ||
187 | - | ||
188 | - // var $el = $('<div id="' + value._id + '" class="col-sm-3 col-md-2" title = "' + value._Title + '" data-ng-click="openView($event)">' | ||
189 | - // + '<div class="thumbnail" >' | ||
190 | - // + '<img id="' + value._Title + '"ng-src="' + $scope.imagePath + '" alt="" title="" >' | ||
191 | - // + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | ||
192 | - | ||
193 | - | ||
194 | - // $compile($el)($scope); | ||
195 | - | ||
196 | - // $(".sidebar").mCustomScrollbar({ | ||
197 | - // autoHideScrollbar: true, | ||
198 | - // //theme:"rounded" | ||
199 | - // }); | ||
200 | - | ||
201 | - //}); | ||
202 | - $timeout(function () | ||
203 | - { | ||
204 | - $('#' + $rootScope.getLocalStorageValue("currentBodyViewId")).find('.thumbnail').addClass('HightLightThumbnail'); | ||
205 | - if ($rootScope.getLocalStorageValue('CIGridViewScroll') !== null && $location.url() == "/clinical-illustrations") { | ||
206 | - $('html, body').animate({ scrollTop: $rootScope.getLocalStorageValue('CIGridViewScroll') }); | ||
207 | - } | ||
208 | - }, 100); | ||
209 | - | ||
210 | - | ||
211 | - $timeout(function () { $('#ciSpinner').css('visibility', 'hidden'); }, 300); | ||
212 | - }, | ||
213 | - function (error) { | ||
214 | - // handle errors here | ||
215 | - console.log(' $scope.IllustrationData = ' + error.statusText); | ||
216 | - } | ||
217 | - ); | ||
218 | - | ||
219 | - } | ||
220 | - | ||
221 | - $scope.IsVisible = function () { | ||
222 | - $scope.scroll(); | ||
223 | - | ||
224 | - } | ||
225 | - | ||
226 | - $scope.showItem = function (id) { | ||
227 | - $scope.idSelected = id; | ||
228 | - localStorage.setItem("CISelectedRowId", id); | ||
229 | - | ||
230 | - //Set the vertical scroll value of the table. | ||
231 | - var y = $('#ListViewDiv').scrollTop(); | ||
232 | - localStorage.setItem("CIListViewScroll", y); | ||
233 | - | ||
234 | - $scope.hiderow = true; | ||
235 | - if ($scope.filterstring == false) { | ||
236 | - | ||
237 | - var SelectedCIthumbImage = []; | ||
238 | - SelectedCIthumbImage = new jinqJs() | ||
239 | - .from($scope.selectedCIListViewData) | ||
240 | - .where('_id = ' + id) | ||
241 | - .select('_ThumbnailImage', '_Summary', '_id', '_Title'); | ||
242 | - | ||
243 | - $scope.SelectedCIthumbImage = "~/../content/images/ci/thumbnails/" + SelectedCIthumbImage[0]._ThumbnailImage; | ||
244 | - $scope.SelectedCISummary = SelectedCIthumbImage[0]._Summary; | ||
245 | - $scope.SelectedCIId = SelectedCIthumbImage[0]._id; | ||
246 | - $scope.SelectedCITitle = SelectedCIthumbImage[0]._Title; | ||
247 | - | ||
248 | - } | ||
249 | - else { | ||
250 | - if ($scope.searchCIListViewData.length > 0) { | ||
251 | - | ||
252 | - var SelectedCIthumbImage = []; | ||
253 | - SelectedCIthumbImage = new jinqJs() | ||
254 | - .from($scope.searchCIListViewData) | ||
255 | - .where('_id = ' + id) | ||
256 | - .select('_ThumbnailImage', '_Summary', '_id', '_Title'); | ||
257 | - | ||
258 | - $scope.SelectedCIthumbImage = "~/../content/images/ci/thumbnails/" + SelectedCIthumbImage[0]._ThumbnailImage; | ||
259 | - $scope.SelectedCISummary = SelectedCIthumbImage[0]._Summary; | ||
260 | - $scope.SelectedCIId = SelectedCIthumbImage[0]._id; | ||
261 | - $scope.SelectedCITitle = SelectedCIthumbImage[0]._Title; | ||
262 | - | ||
263 | - } | ||
264 | - } | ||
265 | - }; | ||
266 | - | ||
267 | - $scope.Reset = function (query) { | ||
268 | - | ||
269 | - query.selectedbodyregion = ""; | ||
270 | - query.selectedbodysystem = ""; | ||
271 | - query.selectedorientation = ""; | ||
272 | - query.selectedimagetype = ""; | ||
273 | - query.selectedspecialty = ""; | ||
274 | - | ||
275 | - | ||
276 | - //set localstorage values | ||
277 | - localStorage.setItem("CICurBodyRegion", ''); | ||
278 | - localStorage.setItem("CICurBodySystem", ''); | ||
279 | - localStorage.setItem("CICurOrientation", ''); | ||
280 | - localStorage.setItem("CICurImageType", ''); | ||
281 | - localStorage.setItem("CICurSpeciality", ''); | ||
282 | - localStorage.setItem("CISelectedRowId", ""); | ||
283 | - localStorage.setItem("CIListViewScroll", ''); | ||
284 | - | ||
285 | - if ($('.selected').hasClass("selected")) { $('.selected').removeClass("selected"); } | ||
286 | - | ||
287 | - $('#ListViewDiv').scrollTop(0); | ||
288 | - | ||
289 | - $scope.hideListViewDiv(); | ||
290 | - | ||
291 | - $scope.filterstring = false; | ||
292 | - while ($scope.searchCIListViewData.length) { | ||
293 | - $scope.searchCIListViewData.pop(); | ||
294 | - } | ||
295 | - | ||
296 | - $scope.loadAllCI(); | ||
297 | - | ||
298 | - } | ||
299 | - | ||
300 | - $scope.ApplySearch = function (query) { | ||
301 | - | ||
302 | - | ||
303 | - $scope.filterstring = true; | ||
304 | - | ||
305 | - while ($scope.searchCIListViewData.length) { | ||
306 | - $scope.searchCIListViewData.pop(); | ||
307 | - } | ||
308 | - | ||
309 | - | ||
310 | - | ||
311 | - filtercount = 0; | ||
312 | - if (typeof (query.selectedbodyregion) !== "undefined" && (query.selectedbodyregion !== null && query.selectedbodyregion !== "")) { | ||
313 | - filtercount = filtercount + 1; | ||
314 | - | ||
315 | - localStorage.setItem("CICurBodyRegion", query.selectedbodyregion); | ||
316 | - | ||
317 | - } | ||
318 | - else { | ||
319 | - localStorage.setItem("CICurBodyRegion", ''); | ||
320 | - | ||
321 | - } | ||
322 | - | ||
323 | - if (typeof (query.selectedbodysystem) !== "undefined" && (query.selectedbodysystem !== null && query.selectedbodysystem !== "")) { | ||
324 | - filtercount = filtercount + 1; | ||
325 | - localStorage.setItem("CICurBodySystem", query.selectedbodysystem); | ||
326 | - | ||
327 | - } | ||
328 | - else { | ||
329 | - localStorage.setItem("CICurBodySystem", ''); | ||
330 | - | ||
331 | - } | ||
332 | - | ||
333 | - if (typeof (query.selectedorientation) !== "undefined" && (query.selectedorientation !== null && query.selectedorientation !== '')) { | ||
334 | - filtercount = filtercount + 1; | ||
335 | - localStorage.setItem("CICurOrientation", query.selectedorientation); | ||
336 | - | ||
337 | - } | ||
338 | - else { | ||
339 | - localStorage.setItem("CICurOrientation", ''); | ||
340 | - } | ||
341 | - | ||
342 | - if (typeof (query.selectedimagetype) !== "undefined" && (query.selectedimagetype !== null && query.selectedimagetype !== '')) { | ||
343 | - filtercount = filtercount + 1; | ||
344 | - localStorage.setItem("CICurImageType", query.selectedimagetype); | ||
345 | - | ||
346 | - } | ||
347 | - else { | ||
348 | - localStorage.setItem("CICurImageType", ''); | ||
349 | - | ||
350 | - } | ||
351 | - | ||
352 | - if (typeof (query.selectedspecialty) !== "undefined" && (query.selectedspecialty !== null && query.selectedspecialty !== '')) { | ||
353 | - filtercount = filtercount + 1; | ||
354 | - localStorage.setItem("CICurSpeciality", query.selectedspecialty); | ||
355 | - | ||
356 | - } | ||
357 | - else { | ||
358 | - localStorage.setItem("CICurSpeciality", ''); | ||
359 | - | ||
360 | - } | ||
361 | - | ||
362 | - | ||
363 | - var promise = DataService.getJson('~/../content/data/json/ci/ci_dat_contentlist.json') | ||
364 | - promise.then( | ||
365 | - function (result) { | ||
366 | - $scope.IllustrationData = result; | ||
367 | - | ||
368 | - $scope.selectedCIListViewData = new jinqJs() | ||
369 | - .from($scope.IllustrationData.root.CIData) | ||
370 | - .orderBy([{ field: '_Title', sort: 'asc' }]) | ||
371 | - .select(); | ||
372 | - | ||
373 | - $('#grid-view').empty(); | ||
374 | - | ||
375 | - angular.forEach($scope.selectedCIListViewData, function (value, key) { | ||
376 | - | ||
377 | - var selectimg = true; | ||
378 | - var count = 0; | ||
379 | - | ||
380 | - | ||
381 | - if (typeof (query.selectedbodyregion) !== "undefined" && (query.selectedbodyregion !== null && query.selectedbodyregion !== "")) { | ||
382 | - var posbodyregion = value._BodyRegion.indexOf((query.selectedbodyregion.trim())); | ||
383 | - if (posbodyregion > -1) { | ||
384 | - selectimg = true; | ||
385 | - count = count + 1; | ||
386 | - | ||
387 | - } | ||
388 | - else { | ||
389 | - selectimg = false; | ||
390 | - count = count - 1; | ||
391 | - } | ||
392 | - | ||
393 | - } | ||
394 | - | ||
395 | - if (typeof (query.selectedbodysystem) !== "undefined" && (query.selectedbodysystem !== null && query.selectedbodysystem !== "")) { | ||
396 | - var posbodysystem = value._BodySystem.indexOf(query.selectedbodysystem); | ||
397 | - if (posbodysystem > -1) { | ||
398 | - count = count + 1; | ||
399 | - selectimg = true; | ||
400 | - } else { | ||
401 | - selectimg = false; | ||
402 | - count = count - 1; | ||
403 | - } | ||
404 | - } | ||
405 | - | ||
406 | - if (typeof (query.selectedorientation) !== "undefined" && (query.selectedorientation !== null && query.selectedorientation !== "")) { | ||
407 | - var posorientation = value._ViewOrientation.indexOf(query.selectedorientation); | ||
408 | - if (posorientation > -1) { | ||
409 | - count = count + 1; | ||
410 | - selectimg = true; | ||
411 | - | ||
412 | - } else { | ||
413 | - selectimg = false; | ||
414 | - count = count - 1; | ||
415 | - } | ||
416 | - | ||
417 | - } | ||
418 | - | ||
419 | - if (typeof (query.selectedimagetype) !== "undefined" && (query.selectedimagetype !== null && query.selectedimagetype !== "")) { | ||
420 | - var posimagetype = value._ImageType.indexOf(query.selectedimagetype); | ||
421 | - if (posimagetype > -1) { | ||
422 | - count = count + 1; | ||
423 | - selectimg = true; | ||
424 | - | ||
425 | - } else { | ||
426 | - selectimg = false; | ||
427 | - count = count - 1; | ||
428 | - } | ||
429 | - | ||
430 | - } | ||
431 | - | ||
432 | - if (typeof (query.selectedspecialty) !== "undefined" && (query.selectedspecialty !== null && query.selectedspecialty !== "")) { | ||
433 | - var posspeciality = value._MedicalSpecialty.indexOf(query.selectedspecialty); | ||
434 | - if (posspeciality > -1) { | ||
435 | - count = count + 1; | ||
436 | - selectimg = true; | ||
437 | - } else { | ||
438 | - selectimg = false; | ||
439 | - count = count - 1; | ||
440 | - } | ||
441 | - | ||
442 | - } | ||
443 | - | ||
444 | - if (selectimg === true && count >= filtercount) { | ||
445 | - | ||
446 | - | ||
447 | - $scope.imagePath = "~/../content/images/ci/thumbnails/" + value._ThumbnailImage; | ||
448 | - | ||
449 | - var $el = $('<div id="' + value._id + '" class="col-sm-3 col-md-2" title = "' + value._Title + '" data-ng-click="openView($event)">' | ||
450 | - + '<div class="thumbnail" >' | ||
451 | - + '<img id="' + value._Title + '"ng-src="' + $scope.imagePath + '" alt="" title="" >' | ||
452 | - + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | ||
453 | - | ||
454 | - | ||
455 | - $compile($el)($scope); | ||
456 | - | ||
457 | - $(".sidebar").mCustomScrollbar({ | ||
458 | - autoHideScrollbar: true, | ||
459 | - //theme:"rounded" | ||
460 | - }); | ||
461 | - | ||
462 | - | ||
463 | - $scope.searchCIListViewData.push( | ||
464 | - { | ||
465 | - "_id": value._id, | ||
466 | - "_ImageId": value._ImageId, | ||
467 | - "_Title": value._Title, | ||
468 | - "_contentImage": value._contentImage, | ||
469 | - "_ThumbnailImage": value._ThumbnailImage, | ||
470 | - "_BodySystem": value._BodySystem, | ||
471 | - "_BodyRegion": value._BodyRegion, | ||
472 | - "_ViewOrientation": value._ViewOrientation, | ||
473 | - "_MedicalSpecialty": value._MedicalSpecialty, | ||
474 | - "_ImageType": value._ImageType, | ||
475 | - "_Summary": value._Summary | ||
476 | - | ||
477 | - }); | ||
478 | - } | ||
479 | - }); | ||
480 | - $('table > #ListViewDiv > #searchItem').remove(); | ||
481 | - //Show Error Message in case of gridview if no data is found | ||
482 | - if ($scope.searchCIListViewData.length == 0) { | ||
483 | - var $el = $('<div class="col-sm-12" style="padding-left:25px;padding-top:10px;"><strong style="color:white">No illustration found for the selected search criteria!</strong></div>').appendTo('#grid-view'); | ||
484 | - $compile($el)($scope); | ||
485 | - $('table > #ListViewDiv > #searchItem').remove(); | ||
486 | - | ||
487 | - $('#ListViewDiv').append('<tr id="searchItem"><td colspan="6"><strong style="color:black;">No illustration found for the selected search criteria!</strong></td></tr>'); | ||
488 | - } | ||
489 | - }, | ||
490 | - function (error) { | ||
491 | - // handle errors here | ||
492 | - console.log(' $scope.IllustrationData = ' + error.statusText); | ||
493 | - } | ||
494 | - ); | ||
495 | - } | ||
496 | - | ||
497 | - | ||
498 | - $scope.scroll = function () { | ||
499 | - $("html,body").scrollTop(0); | ||
500 | - } | ||
501 | - | ||
502 | - | ||
503 | - $scope.openView = function ($event) { | ||
504 | - | ||
505 | - $rootScope.MenuModuleName = "CI"; | ||
506 | - $rootScope.disableAnnotationTB = false; | ||
507 | - $rootScope.CIAnotationIdentifyModeOff = true; | ||
508 | - $rootScope.currentBodyViewId = $event.currentTarget.id; | ||
509 | - if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") { | ||
510 | - var CITitle = []; | ||
511 | - CITitle = new jinqJs() | ||
512 | - .from($scope.selectedCIListViewData) | ||
513 | - .where('_id = ' + $event.currentTarget.id) | ||
514 | - .select('_Title'); | ||
515 | - | ||
516 | - // console.log(CITitle); | ||
517 | - // console.log($scope.selectedCIListViewData); | ||
518 | - | ||
519 | - $rootScope.ViewTitle = CITitle[0]._Title; | ||
520 | - } | ||
521 | - else { | ||
522 | - $rootScope.ViewTitle = $event.currentTarget.textContent; | ||
523 | - | ||
524 | - } | ||
525 | - | ||
526 | - | ||
527 | - localStorage.setItem("currentViewTitleFromJson", $rootScope.ViewTitle); | ||
528 | - localStorage.setItem("currentBodyViewId", $event.currentTarget.id); | ||
529 | - | ||
530 | - //Set the vertical scroll value of the Grid-View. | ||
531 | - var y = $($window).scrollTop(); | ||
532 | - localStorage.setItem("CIGridViewScroll", y); | ||
533 | - var u = $location.url(); | ||
534 | - $location.url('/clinical-illustrations-detail'); | ||
535 | - | ||
536 | - // console.log($location.url('/clinical-illustrations-detail')); | ||
537 | - | ||
538 | - } | ||
539 | - | ||
540 | - $scope.openBodyView = function () { | ||
541 | - | ||
542 | - | ||
543 | - if ($rootScope.refreshcheck == null) { | ||
544 | - $location.path('/'); | ||
545 | - } | ||
546 | - | ||
547 | - $rootScope.isLoading = true; | ||
548 | - $('#spinner').css('visibility', 'visible'); | ||
549 | - $scope.voId = $rootScope.getLocalStorageValue("currentBodyViewId"); | ||
550 | - | ||
551 | - // alert($scope.voId); | ||
552 | - | ||
553 | - | ||
554 | - //once you get id in scope push detail in jspanel content | ||
555 | - | ||
556 | - var openViews; | ||
557 | - if ($rootScope.openViews.length > 0) { | ||
558 | - openViews = new jinqJs() | ||
559 | - .from($rootScope.openViews) | ||
560 | - .where("BodyViewId==" + $scope.voId) | ||
561 | - .select(); | ||
562 | - } | ||
563 | - var counter = 1; | ||
564 | - var tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson"); | ||
565 | - | ||
566 | - if (openViews != null && openViews.length > 0) { | ||
567 | - angular.forEach(openViews, function (value, key) { | ||
568 | - | ||
569 | - if (value.body - views == tittle) { | ||
570 | - tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson") + counter++; | ||
571 | - $rootScope.currentActiveViewTitle = tittle; | ||
572 | - localStorage.setItem("currentViewTitle", tittle); | ||
573 | - } | ||
574 | - | ||
575 | - }); | ||
576 | - } | ||
577 | - else { | ||
578 | - localStorage.setItem("currentViewTitle", tittle); | ||
579 | - | ||
580 | - } | ||
581 | - | ||
582 | - //alert($rootScope.getLocalStorageValue("currentViewTitle")); | ||
583 | - | ||
584 | - var promise = DataService.getJson('~/../content/data/json/ci/ci_dat_contentlist.json') | ||
585 | - promise.then( | ||
586 | - function (result) { | ||
587 | - $scope.CIllustrationData = result; | ||
588 | - $scope.CIlistViewData = $scope.CIllustrationData.root.CIData; | ||
589 | - | ||
590 | - var clickedCIImage = []; | ||
591 | - clickedCIImage = new jinqJs() | ||
592 | - .from($scope.CIlistViewData) | ||
593 | - .where('_id == ' + $scope.voId) | ||
594 | - .select('_contentImage'); | ||
595 | - | ||
596 | - $scope.clickedCIImage = "~/../content/images/ci/images/" + clickedCIImage[0]._contentImage; | ||
597 | - | ||
598 | - var clickedCISummary = []; | ||
599 | - clickedCISummary = new jinqJs() | ||
600 | - .from($scope.CIlistViewData) | ||
601 | - .where('_id == ' + $scope.voId) | ||
602 | - .select('_Summary'); | ||
603 | - | ||
604 | - $scope.clickedCISummary = clickedCISummary[0]._Summary | ||
605 | - | ||
606 | - if (clickedCIImage.length > 0 && clickedCISummary.length > 0) { | ||
607 | - | ||
608 | - $.jsPanel({ | ||
609 | - id: 'ciImagePanel', | ||
610 | - selector: '.ciView', | ||
611 | - theme: 'success', | ||
612 | - currentController: 'CIController', | ||
613 | - parentSlug: 'clinical-illustrations', | ||
614 | - content: '<div class="row" id="canvasDiv"><div style="align:left;"><canvas id="canvas" ng-click="onDrawingCanvasClick($event)" width="1369" height="325" class="canvas-annotationStyle" style="position: absolute; background-color: transparent;z-index:1 "></canvas> <canvas id="canvasPaint" ng-click="FreeStylePaint($event)" width="1369" height="325" class="canvas-annotationStyle1" style="position: absolute;z-index:0;"></canvas></div>' + | ||
615 | - '<div class="col-sm-12 img-thumbnail" align="center">' + | ||
616 | - '<img src="' + $scope.clickedCIImage + '" alt="" title="" class="img-responsive "><div class="col-sm-12 well img-subtitle">' + | ||
617 | - '<div align="left" id="sid"><p>' + $scope.clickedCISummary + '</p></div><button id="btnTxtOnOff" class="btn btn-primary pull-right">Text Off</button>' + | ||
618 | - '<script>$(document).ready(function(){ var $ua = navigator.userAgent;if(($ua.match(/(iPod|iPhone|iPad|android)/i))) { var jspanelContainerWidth = $(".jsPanel-content").css("width"); $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth });$("#ciImagePanel").css("width", "100%"); }$("#btnTxtOnOff").click(function(){if($.trim($(this).text()) === "Text Off"){$(this).text("Text On");$("#sid").css("visibility","hidden");}else{$(this).text("Text Off");$("#sid").css("visibility","visible");}});});</script></div>' + | ||
619 | - '</div></div>', | ||
620 | - //ajax: { | ||
621 | - // url: 'app/views/ci/ci-view-detail.html' | ||
622 | - //}, | ||
623 | - title: $rootScope.getLocalStorageValue("currentViewTitle"), | ||
624 | - position: { | ||
625 | - top: 70, | ||
626 | - left: 20, | ||
627 | - }, | ||
628 | - | ||
629 | - size: { width: $(window).outerWidth() - 20, height: $(window).outerHeight() - 110 }, | ||
630 | - | ||
631 | - }); | ||
632 | - | ||
633 | - | ||
634 | - $('#canvasDiv img').load(function () { | ||
635 | - | ||
636 | - $rootScope.isLoading = false; | ||
637 | - $('#spinner').css('visibility', 'hidden'); | ||
638 | - }); | ||
639 | - | ||
640 | - $rootScope.currentSlug = 'clinical-illustrations-detail'; | ||
641 | - | ||
642 | - $rootScope.openViews.push( | ||
643 | - { | ||
644 | - "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId, | ||
645 | - "slug": $rootScope.currentSlug | ||
646 | - }); | ||
647 | - | ||
648 | - | ||
649 | - $("#ciImagePanel .img-thumbnail").css("height", $("#ciImagePanel .jsPanel-content").height()); | ||
650 | - var jspContentHeight = $('.jsPanel-content').height(); | ||
651 | - //var imgHeight = $('.img-thumbnail').find('img').height(); | ||
652 | - //if (imgHeight <= 0) | ||
653 | - // imgHeight = 320; | ||
654 | - //var textH = $('.img-subtitle').height(); | ||
655 | - //textH = textH + 40; | ||
656 | - //var blackBorderHeight = jspContentHeight - (imgHeight + textH); | ||
657 | - //if ($('.jsPanel-content').length > 0) { | ||
658 | - // $('.img-subtitle').css('margin-bottom', blackBorderHeight); | ||
659 | - //} | ||
660 | - } | ||
661 | - | ||
662 | - | ||
663 | - }, | ||
664 | - function (error) { | ||
665 | - // handle errors here | ||
666 | - console.log(' $scope.CIllustrationData = ' + error.statusText); | ||
667 | - } | ||
668 | - | ||
669 | - ); | ||
670 | - | ||
671 | - // console.log($rootScope.openViews); | ||
672 | - $('#CIView').css("height", $(window).outerHeight()); | ||
673 | - | ||
674 | - $('#CIView').css("width", $(window).outerWidth()); | ||
675 | - | ||
676 | - } | ||
677 | - | ||
678 | - $scope.$on('annotationToolEvent', function (event, data) { | ||
679 | - | ||
680 | - $('#editstylebackgroundcolor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", "rgb(255,255,255)") | ||
681 | - $('#editstylebackgroundcolor .minicolors >.minicolors-panel > .minicolors-grid >.minicolors-picker').css({ "top": "145px", "left": "4px" }); | ||
682 | - $('#outlineColor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", "rgb(0,0,0)") | ||
683 | - $('#outlineColor .minicolors >.minicolors-panel > .minicolors-grid >.minicolors-picker').css({ "top": "145px", "left": "4px" }); | ||
684 | - | ||
685 | - $("#canvas").css("display", "block"); | ||
686 | - $("#canvasPaint").css("display", "block"); | ||
687 | - | ||
688 | - $rootScope.onDrawingCanvasClick(); | ||
689 | - $rootScope.FreeStylePaint(); | ||
690 | - }); | ||
691 | - | ||
692 | - $scope.ReloadListViewImageDiv = function (id) { | ||
693 | - //console.log(id); | ||
694 | - $scope.idSelected = id; | ||
695 | - $scope.hiderow = true; | ||
696 | - | ||
697 | - var promise = DataService.getJson('~/../content/data/json/ci/ci_dat_contentlist.json') | ||
698 | - promise.then( | ||
699 | - function (result) { | ||
700 | - $scope.IllustrationData = result; | ||
701 | - | ||
702 | - var SelectedCIthumbImage = []; | ||
703 | - SelectedCIthumbImage = new jinqJs() | ||
704 | - .from($scope.IllustrationData.root.CIData) | ||
705 | - .where('_id = ' + id) | ||
706 | - .select('_ThumbnailImage', '_Summary', '_id', '_Title'); | ||
707 | - | ||
708 | - $scope.SelectedCIthumbImage = "~/../content/images/ci/thumbnails/" + SelectedCIthumbImage[0]._ThumbnailImage; | ||
709 | - $scope.SelectedCISummary = SelectedCIthumbImage[0]._Summary; | ||
710 | - $scope.SelectedCIId = SelectedCIthumbImage[0]._id; | ||
711 | - $scope.SelectedCITitle = SelectedCIthumbImage[0]._Title; | ||
712 | - | ||
713 | - //Set the scroll position of the tablebody to show selected row. | ||
714 | - | ||
715 | - var curCIListViewScroll = $rootScope.getLocalStorageValue("CIListViewScroll"); | ||
716 | - if (typeof (curCIListViewScroll) !== "undefined" && curCIListViewScroll !== null && curCIListViewScroll !== '') { | ||
717 | - if (typeof InstallTrigger !== 'undefined') | ||
718 | - { | ||
719 | - | ||
720 | - $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue("CIListViewScroll") }); | ||
721 | - } | ||
722 | - else | ||
723 | - { | ||
724 | - | ||
725 | - $('#ListViewDiv').scrollTop($rootScope.getLocalStorageValue("CIListViewScroll")); | ||
726 | - } | ||
727 | - | ||
728 | - } | ||
729 | - //else { | ||
730 | - // $('#ListViewDiv').scrollTop(0); | ||
731 | - //} | ||
732 | - | ||
733 | - }, | ||
734 | - function (error) { | ||
735 | - // handle errors here | ||
736 | - console.log(' $scope.AnimationData = ' + error.statusText); | ||
737 | - } | ||
738 | - ); | ||
739 | - }; | ||
740 | - | ||
741 | - $scope.hideListViewDiv = function () { | ||
742 | - if ($rootScope.getLocalStorageValue("currentCITabView") == 2) { | ||
743 | - localStorage.setItem("CISelectedRowId", ""); | ||
744 | - if ($('.selected').hasClass("selected")) { $('.selected').removeClass("selected"); } | ||
745 | - $scope.hiderow = false; | ||
746 | - } | ||
747 | - } | ||
748 | - | ||
749 | - | ||
750 | - | ||
751 | -}] | ||
752 | -); | ||
753 | - | ||
754 | - | ||
755 | - | ||
756 | - | 1 | +AIA.controller("CIController", ["$scope", "$window", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "pages", "BodyRegions", "BodySystems", "ViewOrientations", "ImageTypes", "MedicalSpecialties", "DataService", |
2 | +function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout, pages, BodyRegions, BodySystems, ViewOrientations, ImageTypes, MedicalSpecialties, DataService) { | ||
3 | + // $rootScope.currentActiveModuleTitle = pages[3].name; | ||
4 | + $scope.showTabButton = true; | ||
5 | + $scope.IllustrationData; | ||
6 | + $scope.CIAllBodyRegion = []; | ||
7 | + $scope.CIAllBodySystem = []; | ||
8 | + $scope.CIAllOrientation = []; | ||
9 | + $scope.CIAllImageType = []; | ||
10 | + $scope.CIAllSpeciality = []; | ||
11 | + $scope.searchCIListViewData = []; | ||
12 | + $scope.SelectedCIthumbImage = []; | ||
13 | + $scope.SelectedCIImage = []; | ||
14 | + $scope.SelectedCISummary = []; | ||
15 | + $scope.SelectedCIId = []; | ||
16 | + $scope.SelectedCITitle = []; | ||
17 | + $scope.selectedCIListViewData = []; | ||
18 | + $scope.filterstring = false; | ||
19 | + $scope.idSelected; | ||
20 | + $scope.srollListView; | ||
21 | + $scope.query = { | ||
22 | + selectedbodyregion: '', | ||
23 | + selectedbodysystem: '', | ||
24 | + selectedorientation: '', | ||
25 | + selectedimagetype: '', | ||
26 | + selectedspecialty: '', | ||
27 | + }; | ||
28 | + | ||
29 | + $scope.setActiveTab = function (tabToSet) { | ||
30 | + $scope.activeTab = tabToSet; | ||
31 | + localStorage.setItem("currentCITabView", $scope.activeTab); | ||
32 | + }; | ||
33 | + | ||
34 | + $scope.$on('$viewContentLoaded', function (event) { | ||
35 | + | ||
36 | + if ($rootScope.refreshcheck == null) { | ||
37 | + $location.path('/'); | ||
38 | + } | ||
39 | + // code that will be executed ... | ||
40 | + // every time this view is loaded | ||
41 | + | ||
42 | + //get current path | ||
43 | + var currentURL = $location.path(); | ||
44 | + var selectedModuleName = ''; | ||
45 | + //set module title | ||
46 | + angular.forEach($rootScope.userModules, function (value, key) { | ||
47 | + if (value.slug === currentURL.replace('/', '')) { | ||
48 | + selectedModuleName = value.name; | ||
49 | + } | ||
50 | + $rootScope.currentActiveModuleTitle = selectedModuleName; | ||
51 | + }) | ||
52 | + | ||
53 | + $scope.LoadCIJsonData(); | ||
54 | + | ||
55 | + $scope.CIAllBodyRegion = BodyRegions; | ||
56 | + $scope.CIAllBodySystem = BodySystems; | ||
57 | + $scope.CIAllOrientation = ViewOrientations; | ||
58 | + $scope.CIAllImageType = ImageTypes; | ||
59 | + $scope.CIAllSpeciality = MedicalSpecialties; | ||
60 | + $scope.scroll(); | ||
61 | + //push the details of open module in array $rootScope.openModules | ||
62 | + $rootScope.openModules.push({ "ModuleId": 4 }); | ||
63 | + | ||
64 | + //set the local storage | ||
65 | + | ||
66 | + var curtab = $rootScope.getLocalStorageValue("currentCITabView"); | ||
67 | + if (curtab == 2) { | ||
68 | + $scope.setActiveTab(2); | ||
69 | + var curSelectedRowId = $rootScope.getLocalStorageValue("CISelectedRowId"); | ||
70 | + if (typeof (curSelectedRowId) !== "undefined" && curSelectedRowId !== null && curSelectedRowId !== '') { | ||
71 | + $scope.reRunSearchOnLoad(); | ||
72 | + $scope.idSelected = curSelectedRowId; | ||
73 | + $scope.ReloadListViewImageDiv($scope.idSelected); | ||
74 | + } | ||
75 | + else { | ||
76 | + $scope.reRunSearchOnLoad() | ||
77 | + $scope.idSelected = ''; | ||
78 | + } | ||
79 | + } | ||
80 | + else { | ||
81 | + $scope.setActiveTab(1); | ||
82 | + $scope.reRunSearchOnLoad(); | ||
83 | + | ||
84 | + } | ||
85 | + | ||
86 | + | ||
87 | + }); | ||
88 | + | ||
89 | + $scope.reRunSearchOnLoad = function () { | ||
90 | + | ||
91 | + var curBodyRegion = $rootScope.getLocalStorageValue("CICurBodyRegion"); | ||
92 | + if (typeof (curBodyRegion) !== "undefined" && curBodyRegion !== null && curBodyRegion !== '') { | ||
93 | + $scope.query.selectedbodyregion = curBodyRegion; | ||
94 | + } | ||
95 | + else { | ||
96 | + $scope.query.selectedbodyregion = ""; | ||
97 | + } | ||
98 | + | ||
99 | + var curBodySystem = $rootScope.getLocalStorageValue("CICurBodySystem"); | ||
100 | + if (typeof (curBodySystem) !== "undefined" && curBodySystem !== null && curBodySystem !== '') { | ||
101 | + $scope.query.selectedbodysystem = curBodySystem; | ||
102 | + } | ||
103 | + else { | ||
104 | + $scope.query.selectedbodysystem = ""; | ||
105 | + } | ||
106 | + | ||
107 | + var curOrientation = $rootScope.getLocalStorageValue("CICurOrientation"); | ||
108 | + if (typeof (curOrientation) !== "undefined" && curOrientation !== null && curOrientation !== '') { | ||
109 | + $scope.query.selectedorientation = curOrientation; | ||
110 | + } | ||
111 | + else { | ||
112 | + $scope.query.selectedorientation = ""; | ||
113 | + } | ||
114 | + | ||
115 | + var curImageType = $rootScope.getLocalStorageValue("CICurImageType"); | ||
116 | + if (typeof (curImageType) !== "undefined" && curImageType !== null && curImageType !== '') { | ||
117 | + $scope.query.selectedimagetype = curImageType; | ||
118 | + } | ||
119 | + else { | ||
120 | + $scope.query.selectedimagetype = ""; | ||
121 | + } | ||
122 | + | ||
123 | + var curSpeciality = $rootScope.getLocalStorageValue("CICurSpeciality"); | ||
124 | + if (typeof (curSpeciality) !== "undefined" && curSpeciality !== null && curSpeciality !== '') { | ||
125 | + $scope.query.selectedspecialty = curSpeciality; | ||
126 | + } | ||
127 | + else { | ||
128 | + $scope.query.selectedspecialty = ""; | ||
129 | + } | ||
130 | + | ||
131 | + | ||
132 | + if ($scope.query.selectedbodyregion == "" && $scope.query.selectedbodysystem == "" && $scope.query.selectedorientation == "" && $scope.query.selectedimagetype == "" && $scope.query.selectedspecialty == "") { | ||
133 | + $scope.loadAllCI(); | ||
134 | + } | ||
135 | + else { | ||
136 | + $scope.ApplySearch($scope.query); | ||
137 | + } | ||
138 | + | ||
139 | + } | ||
140 | + | ||
141 | + $scope.LoadCIJsonData = function () { | ||
142 | + | ||
143 | + var promise = DataService.getJson('~/../content/data/json/ci/ci_dat_contentlist.json') | ||
144 | + promise.then( | ||
145 | + function (result) { | ||
146 | + $scope.IllustrationData = result; | ||
147 | + $scope.selectedCIListViewData = new jinqJs() | ||
148 | + .from($scope.IllustrationData.root.CIData) | ||
149 | + .orderBy([{ field: '_Title', sort: 'asc' }]) | ||
150 | + .select(); | ||
151 | + | ||
152 | + }, | ||
153 | + function (error) { | ||
154 | + // handle errors here | ||
155 | + console.log(' $scope.IllustrationData = ' + error.statusText); | ||
156 | + } | ||
157 | + ); | ||
158 | + | ||
159 | + | ||
160 | + }; | ||
161 | + | ||
162 | + $scope.loadAllCI = function () { | ||
163 | + $('#ciSpinner').css('visibility', 'visible'); | ||
164 | + $('#ciSpinner').css('zIndex', '20000'); | ||
165 | + var promise = DataService.getJson('~/../content/data/json/ci/ci_dat_contentlist.json') | ||
166 | + promise.then( | ||
167 | + function (result) { | ||
168 | + $scope.IllustrationData = result; | ||
169 | + | ||
170 | + $scope.selectedCIListViewData = new jinqJs() | ||
171 | + .from($scope.IllustrationData.root.CIData) | ||
172 | + .orderBy([{ field: '_Title', sort: 'asc' }]) | ||
173 | + .select(); | ||
174 | + | ||
175 | + // console.log($scope.selectedCIListViewData); | ||
176 | + | ||
177 | + | ||
178 | + | ||
179 | + $('#grid-view').empty(); | ||
180 | + var $e1 = $('<ul><li ng-repeat="value in selectedCIListViewData" class="col-sm-3 col-md-2"><div id="{{value._id}}" title = "{{value._Title}}" class="GridViewDataDivHeight" data-ng-click="openView($event)">' | ||
181 | + + '<div class="thumbnail" >' | ||
182 | + + '<img id="{{value._Title}}" ng-src="~/../content/images/ci/thumbnails/{{value._ThumbnailImage}}" >'//alt="{{value._Title}}" >' | ||
183 | + + '<div class="caption"><p> {{value._Title}}</p></div></a></div></div></li></ul>').appendTo('#grid-view'); | ||
184 | + $compile($e1)($scope); | ||
185 | + //angular.forEach($scope.selectedCIListViewData, function (value, key) { | ||
186 | + // $scope.imagePath = "~/../content/images/ci/thumbnails/" + value._ThumbnailImage; | ||
187 | + | ||
188 | + // var $el = $('<div id="' + value._id + '" class="col-sm-3 col-md-2" title = "' + value._Title + '" data-ng-click="openView($event)">' | ||
189 | + // + '<div class="thumbnail" >' | ||
190 | + // + '<img id="' + value._Title + '"ng-src="' + $scope.imagePath + '" alt="" title="" >' | ||
191 | + // + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | ||
192 | + | ||
193 | + | ||
194 | + // $compile($el)($scope); | ||
195 | + | ||
196 | + // $(".sidebar").mCustomScrollbar({ | ||
197 | + // autoHideScrollbar: true, | ||
198 | + // //theme:"rounded" | ||
199 | + // }); | ||
200 | + | ||
201 | + //}); | ||
202 | + $timeout(function () | ||
203 | + { | ||
204 | + $('#' + $rootScope.getLocalStorageValue("currentBodyViewId")).find('.thumbnail').addClass('HightLightThumbnail'); | ||
205 | + if ($rootScope.getLocalStorageValue('CIGridViewScroll') !== null && $location.url() == "/clinical-illustrations") { | ||
206 | + $('html, body').animate({ scrollTop: $rootScope.getLocalStorageValue('CIGridViewScroll') }); | ||
207 | + } | ||
208 | + }, 100); | ||
209 | + | ||
210 | + | ||
211 | + $timeout(function () { $('#ciSpinner').css('visibility', 'hidden'); }, 300); | ||
212 | + }, | ||
213 | + function (error) { | ||
214 | + // handle errors here | ||
215 | + console.log(' $scope.IllustrationData = ' + error.statusText); | ||
216 | + } | ||
217 | + ); | ||
218 | + | ||
219 | + } | ||
220 | + | ||
221 | + $scope.IsVisible = function () { | ||
222 | + $scope.scroll(); | ||
223 | + | ||
224 | + } | ||
225 | + | ||
226 | + $scope.showItem = function (id) { | ||
227 | + $scope.idSelected = id; | ||
228 | + localStorage.setItem("CISelectedRowId", id); | ||
229 | + | ||
230 | + //Set the vertical scroll value of the table. | ||
231 | + var y = $('#ListViewDiv').scrollTop(); | ||
232 | + localStorage.setItem("CIListViewScroll", y); | ||
233 | + | ||
234 | + $scope.hiderow = true; | ||
235 | + if ($scope.filterstring == false) { | ||
236 | + | ||
237 | + var SelectedCIthumbImage = []; | ||
238 | + SelectedCIthumbImage = new jinqJs() | ||
239 | + .from($scope.selectedCIListViewData) | ||
240 | + .where('_id = ' + id) | ||
241 | + .select('_ThumbnailImage', '_Summary', '_id', '_Title'); | ||
242 | + | ||
243 | + $scope.SelectedCIthumbImage = "~/../content/images/ci/thumbnails/" + SelectedCIthumbImage[0]._ThumbnailImage; | ||
244 | + $scope.SelectedCISummary = SelectedCIthumbImage[0]._Summary; | ||
245 | + $scope.SelectedCIId = SelectedCIthumbImage[0]._id; | ||
246 | + $scope.SelectedCITitle = SelectedCIthumbImage[0]._Title; | ||
247 | + | ||
248 | + } | ||
249 | + else { | ||
250 | + if ($scope.searchCIListViewData.length > 0) { | ||
251 | + | ||
252 | + var SelectedCIthumbImage = []; | ||
253 | + SelectedCIthumbImage = new jinqJs() | ||
254 | + .from($scope.searchCIListViewData) | ||
255 | + .where('_id = ' + id) | ||
256 | + .select('_ThumbnailImage', '_Summary', '_id', '_Title'); | ||
257 | + | ||
258 | + $scope.SelectedCIthumbImage = "~/../content/images/ci/thumbnails/" + SelectedCIthumbImage[0]._ThumbnailImage; | ||
259 | + $scope.SelectedCISummary = SelectedCIthumbImage[0]._Summary; | ||
260 | + $scope.SelectedCIId = SelectedCIthumbImage[0]._id; | ||
261 | + $scope.SelectedCITitle = SelectedCIthumbImage[0]._Title; | ||
262 | + | ||
263 | + } | ||
264 | + } | ||
265 | + }; | ||
266 | + | ||
267 | + $scope.Reset = function (query) { | ||
268 | + | ||
269 | + query.selectedbodyregion = ""; | ||
270 | + query.selectedbodysystem = ""; | ||
271 | + query.selectedorientation = ""; | ||
272 | + query.selectedimagetype = ""; | ||
273 | + query.selectedspecialty = ""; | ||
274 | + | ||
275 | + | ||
276 | + //set localstorage values | ||
277 | + localStorage.setItem("CICurBodyRegion", ''); | ||
278 | + localStorage.setItem("CICurBodySystem", ''); | ||
279 | + localStorage.setItem("CICurOrientation", ''); | ||
280 | + localStorage.setItem("CICurImageType", ''); | ||
281 | + localStorage.setItem("CICurSpeciality", ''); | ||
282 | + localStorage.setItem("CISelectedRowId", ""); | ||
283 | + localStorage.setItem("CIListViewScroll", ''); | ||
284 | + | ||
285 | + if ($('.selected').hasClass("selected")) { $('.selected').removeClass("selected"); } | ||
286 | + | ||
287 | + $('#ListViewDiv').scrollTop(0); | ||
288 | + | ||
289 | + $scope.hideListViewDiv(); | ||
290 | + | ||
291 | + $scope.filterstring = false; | ||
292 | + while ($scope.searchCIListViewData.length) { | ||
293 | + $scope.searchCIListViewData.pop(); | ||
294 | + } | ||
295 | + | ||
296 | + $scope.loadAllCI(); | ||
297 | + | ||
298 | + } | ||
299 | + | ||
300 | + $scope.ApplySearch = function (query) { | ||
301 | + | ||
302 | + | ||
303 | + $scope.filterstring = true; | ||
304 | + | ||
305 | + while ($scope.searchCIListViewData.length) { | ||
306 | + $scope.searchCIListViewData.pop(); | ||
307 | + } | ||
308 | + | ||
309 | + | ||
310 | + | ||
311 | + filtercount = 0; | ||
312 | + if (typeof (query.selectedbodyregion) !== "undefined" && (query.selectedbodyregion !== null && query.selectedbodyregion !== "")) { | ||
313 | + filtercount = filtercount + 1; | ||
314 | + | ||
315 | + localStorage.setItem("CICurBodyRegion", query.selectedbodyregion); | ||
316 | + | ||
317 | + } | ||
318 | + else { | ||
319 | + localStorage.setItem("CICurBodyRegion", ''); | ||
320 | + | ||
321 | + } | ||
322 | + | ||
323 | + if (typeof (query.selectedbodysystem) !== "undefined" && (query.selectedbodysystem !== null && query.selectedbodysystem !== "")) { | ||
324 | + filtercount = filtercount + 1; | ||
325 | + localStorage.setItem("CICurBodySystem", query.selectedbodysystem); | ||
326 | + | ||
327 | + } | ||
328 | + else { | ||
329 | + localStorage.setItem("CICurBodySystem", ''); | ||
330 | + | ||
331 | + } | ||
332 | + | ||
333 | + if (typeof (query.selectedorientation) !== "undefined" && (query.selectedorientation !== null && query.selectedorientation !== '')) { | ||
334 | + filtercount = filtercount + 1; | ||
335 | + localStorage.setItem("CICurOrientation", query.selectedorientation); | ||
336 | + | ||
337 | + } | ||
338 | + else { | ||
339 | + localStorage.setItem("CICurOrientation", ''); | ||
340 | + } | ||
341 | + | ||
342 | + if (typeof (query.selectedimagetype) !== "undefined" && (query.selectedimagetype !== null && query.selectedimagetype !== '')) { | ||
343 | + filtercount = filtercount + 1; | ||
344 | + localStorage.setItem("CICurImageType", query.selectedimagetype); | ||
345 | + | ||
346 | + } | ||
347 | + else { | ||
348 | + localStorage.setItem("CICurImageType", ''); | ||
349 | + | ||
350 | + } | ||
351 | + | ||
352 | + if (typeof (query.selectedspecialty) !== "undefined" && (query.selectedspecialty !== null && query.selectedspecialty !== '')) { | ||
353 | + filtercount = filtercount + 1; | ||
354 | + localStorage.setItem("CICurSpeciality", query.selectedspecialty); | ||
355 | + | ||
356 | + } | ||
357 | + else { | ||
358 | + localStorage.setItem("CICurSpeciality", ''); | ||
359 | + | ||
360 | + } | ||
361 | + | ||
362 | + | ||
363 | + var promise = DataService.getJson('~/../content/data/json/ci/ci_dat_contentlist.json') | ||
364 | + promise.then( | ||
365 | + function (result) { | ||
366 | + $scope.IllustrationData = result; | ||
367 | + | ||
368 | + $scope.selectedCIListViewData = new jinqJs() | ||
369 | + .from($scope.IllustrationData.root.CIData) | ||
370 | + .orderBy([{ field: '_Title', sort: 'asc' }]) | ||
371 | + .select(); | ||
372 | + | ||
373 | + $('#grid-view').empty(); | ||
374 | + | ||
375 | + angular.forEach($scope.selectedCIListViewData, function (value, key) { | ||
376 | + | ||
377 | + var selectimg = true; | ||
378 | + var count = 0; | ||
379 | + | ||
380 | + | ||
381 | + if (typeof (query.selectedbodyregion) !== "undefined" && (query.selectedbodyregion !== null && query.selectedbodyregion !== "")) { | ||
382 | + var posbodyregion = value._BodyRegion.indexOf((query.selectedbodyregion.trim())); | ||
383 | + if (posbodyregion > -1) { | ||
384 | + selectimg = true; | ||
385 | + count = count + 1; | ||
386 | + | ||
387 | + } | ||
388 | + else { | ||
389 | + selectimg = false; | ||
390 | + count = count - 1; | ||
391 | + } | ||
392 | + | ||
393 | + } | ||
394 | + | ||
395 | + if (typeof (query.selectedbodysystem) !== "undefined" && (query.selectedbodysystem !== null && query.selectedbodysystem !== "")) { | ||
396 | + var posbodysystem = value._BodySystem.indexOf(query.selectedbodysystem); | ||
397 | + if (posbodysystem > -1) { | ||
398 | + count = count + 1; | ||
399 | + selectimg = true; | ||
400 | + } else { | ||
401 | + selectimg = false; | ||
402 | + count = count - 1; | ||
403 | + } | ||
404 | + } | ||
405 | + | ||
406 | + if (typeof (query.selectedorientation) !== "undefined" && (query.selectedorientation !== null && query.selectedorientation !== "")) { | ||
407 | + var posorientation = value._ViewOrientation.indexOf(query.selectedorientation); | ||
408 | + if (posorientation > -1) { | ||
409 | + count = count + 1; | ||
410 | + selectimg = true; | ||
411 | + | ||
412 | + } else { | ||
413 | + selectimg = false; | ||
414 | + count = count - 1; | ||
415 | + } | ||
416 | + | ||
417 | + } | ||
418 | + | ||
419 | + if (typeof (query.selectedimagetype) !== "undefined" && (query.selectedimagetype !== null && query.selectedimagetype !== "")) { | ||
420 | + var posimagetype = value._ImageType.indexOf(query.selectedimagetype); | ||
421 | + if (posimagetype > -1) { | ||
422 | + count = count + 1; | ||
423 | + selectimg = true; | ||
424 | + | ||
425 | + } else { | ||
426 | + selectimg = false; | ||
427 | + count = count - 1; | ||
428 | + } | ||
429 | + | ||
430 | + } | ||
431 | + | ||
432 | + if (typeof (query.selectedspecialty) !== "undefined" && (query.selectedspecialty !== null && query.selectedspecialty !== "")) { | ||
433 | + var posspeciality = value._MedicalSpecialty.indexOf(query.selectedspecialty); | ||
434 | + if (posspeciality > -1) { | ||
435 | + count = count + 1; | ||
436 | + selectimg = true; | ||
437 | + } else { | ||
438 | + selectimg = false; | ||
439 | + count = count - 1; | ||
440 | + } | ||
441 | + | ||
442 | + } | ||
443 | + | ||
444 | + if (selectimg === true && count >= filtercount) { | ||
445 | + | ||
446 | + | ||
447 | + $scope.imagePath = "~/../content/images/ci/thumbnails/" + value._ThumbnailImage; | ||
448 | + | ||
449 | + var $el = $('<div id="' + value._id + '" class="col-sm-3 col-md-2" title = "' + value._Title + '" data-ng-click="openView($event)">' | ||
450 | + + '<div class="thumbnail" >' | ||
451 | + + '<img id="' + value._Title + '"ng-src="' + $scope.imagePath + '" alt="" title="" >' | ||
452 | + + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | ||
453 | + | ||
454 | + | ||
455 | + $compile($el)($scope); | ||
456 | + | ||
457 | + $(".sidebar").mCustomScrollbar({ | ||
458 | + autoHideScrollbar: true, | ||
459 | + //theme:"rounded" | ||
460 | + }); | ||
461 | + | ||
462 | + | ||
463 | + $scope.searchCIListViewData.push( | ||
464 | + { | ||
465 | + "_id": value._id, | ||
466 | + "_ImageId": value._ImageId, | ||
467 | + "_Title": value._Title, | ||
468 | + "_contentImage": value._contentImage, | ||
469 | + "_ThumbnailImage": value._ThumbnailImage, | ||
470 | + "_BodySystem": value._BodySystem, | ||
471 | + "_BodyRegion": value._BodyRegion, | ||
472 | + "_ViewOrientation": value._ViewOrientation, | ||
473 | + "_MedicalSpecialty": value._MedicalSpecialty, | ||
474 | + "_ImageType": value._ImageType, | ||
475 | + "_Summary": value._Summary | ||
476 | + | ||
477 | + }); | ||
478 | + } | ||
479 | + }); | ||
480 | + $('table > #ListViewDiv > #searchItem').remove(); | ||
481 | + //Show Error Message in case of gridview if no data is found | ||
482 | + if ($scope.searchCIListViewData.length == 0) { | ||
483 | + var $el = $('<div class="col-sm-12" style="padding-left:25px;padding-top:10px;"><strong style="color:white">No illustration found for the selected search criteria!</strong></div>').appendTo('#grid-view'); | ||
484 | + $compile($el)($scope); | ||
485 | + $('table > #ListViewDiv > #searchItem').remove(); | ||
486 | + | ||
487 | + $('#ListViewDiv').append('<tr id="searchItem"><td colspan="6"><strong style="color:black;">No illustration found for the selected search criteria!</strong></td></tr>'); | ||
488 | + } | ||
489 | + }, | ||
490 | + function (error) { | ||
491 | + // handle errors here | ||
492 | + console.log(' $scope.IllustrationData = ' + error.statusText); | ||
493 | + } | ||
494 | + ); | ||
495 | + } | ||
496 | + | ||
497 | + | ||
498 | + $scope.scroll = function () { | ||
499 | + $("html,body").scrollTop(0); | ||
500 | + } | ||
501 | + | ||
502 | + | ||
503 | + $scope.openView = function ($event) { | ||
504 | + | ||
505 | + $rootScope.MenuModuleName = "CI"; | ||
506 | + $rootScope.disableAnnotationTB = false; | ||
507 | + $rootScope.CIAnotationIdentifyModeOff = true; | ||
508 | + $rootScope.currentBodyViewId = $event.currentTarget.id; | ||
509 | + if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") { | ||
510 | + var CITitle = []; | ||
511 | + CITitle = new jinqJs() | ||
512 | + .from($scope.selectedCIListViewData) | ||
513 | + .where('_id = ' + $event.currentTarget.id) | ||
514 | + .select('_Title'); | ||
515 | + | ||
516 | + // console.log(CITitle); | ||
517 | + // console.log($scope.selectedCIListViewData); | ||
518 | + | ||
519 | + $rootScope.ViewTitle = CITitle[0]._Title; | ||
520 | + } | ||
521 | + else { | ||
522 | + $rootScope.ViewTitle = $event.currentTarget.textContent; | ||
523 | + | ||
524 | + } | ||
525 | + | ||
526 | + | ||
527 | + localStorage.setItem("currentViewTitleFromJson", $rootScope.ViewTitle); | ||
528 | + localStorage.setItem("currentBodyViewId", $event.currentTarget.id); | ||
529 | + | ||
530 | + //Set the vertical scroll value of the Grid-View. | ||
531 | + var y = $($window).scrollTop(); | ||
532 | + localStorage.setItem("CIGridViewScroll", y); | ||
533 | + var u = $location.url(); | ||
534 | + $location.url('/clinical-illustrations-detail'); | ||
535 | + | ||
536 | + // console.log($location.url('/clinical-illustrations-detail')); | ||
537 | + | ||
538 | + } | ||
539 | + | ||
540 | + $scope.openBodyView = function () { | ||
541 | + | ||
542 | + | ||
543 | + if ($rootScope.refreshcheck == null) { | ||
544 | + $location.path('/'); | ||
545 | + } | ||
546 | + | ||
547 | + $rootScope.isLoading = true; | ||
548 | + $('#spinner').css('visibility', 'visible'); | ||
549 | + $scope.voId = $rootScope.getLocalStorageValue("currentBodyViewId"); | ||
550 | + | ||
551 | + // alert($scope.voId); | ||
552 | + | ||
553 | + | ||
554 | + //once you get id in scope push detail in jspanel content | ||
555 | + | ||
556 | + var openViews; | ||
557 | + if ($rootScope.openViews.length > 0) { | ||
558 | + openViews = new jinqJs() | ||
559 | + .from($rootScope.openViews) | ||
560 | + .where("BodyViewId==" + $scope.voId) | ||
561 | + .select(); | ||
562 | + } | ||
563 | + var counter = 1; | ||
564 | + var tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson"); | ||
565 | + | ||
566 | + if (openViews != null && openViews.length > 0) { | ||
567 | + angular.forEach(openViews, function (value, key) { | ||
568 | + | ||
569 | + if (value.body - views == tittle) { | ||
570 | + tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson") + counter++; | ||
571 | + $rootScope.currentActiveViewTitle = tittle; | ||
572 | + localStorage.setItem("currentViewTitle", tittle); | ||
573 | + } | ||
574 | + | ||
575 | + }); | ||
576 | + } | ||
577 | + else { | ||
578 | + localStorage.setItem("currentViewTitle", tittle); | ||
579 | + | ||
580 | + } | ||
581 | + | ||
582 | + //alert($rootScope.getLocalStorageValue("currentViewTitle")); | ||
583 | + | ||
584 | + var promise = DataService.getJson('~/../content/data/json/ci/ci_dat_contentlist.json') | ||
585 | + promise.then( | ||
586 | + function (result) { | ||
587 | + $scope.CIllustrationData = result; | ||
588 | + $scope.CIlistViewData = $scope.CIllustrationData.root.CIData; | ||
589 | + | ||
590 | + var clickedCIImage = []; | ||
591 | + clickedCIImage = new jinqJs() | ||
592 | + .from($scope.CIlistViewData) | ||
593 | + .where('_id == ' + $scope.voId) | ||
594 | + .select('_contentImage'); | ||
595 | + | ||
596 | + $scope.clickedCIImage = "~/../content/images/ci/images/" + clickedCIImage[0]._contentImage; | ||
597 | + | ||
598 | + var clickedCISummary = []; | ||
599 | + clickedCISummary = new jinqJs() | ||
600 | + .from($scope.CIlistViewData) | ||
601 | + .where('_id == ' + $scope.voId) | ||
602 | + .select('_Summary'); | ||
603 | + | ||
604 | + $scope.clickedCISummary = clickedCISummary[0]._Summary | ||
605 | + | ||
606 | + if (clickedCIImage.length > 0 && clickedCISummary.length > 0) { | ||
607 | + | ||
608 | + $.jsPanel({ | ||
609 | + id: 'ciImagePanel', | ||
610 | + selector: '.ciView', | ||
611 | + theme: 'success', | ||
612 | + currentController: 'CIController', | ||
613 | + parentSlug: 'clinical-illustrations', | ||
614 | + content: '<div class="row" id="canvasDiv"><div style="align:left;"><canvas id="canvas" ng-click="onDrawingCanvasClick($event)" width="1369" height="325" class="canvas-annotationStyle" style="position: absolute; background-color: transparent;z-index:1 "></canvas> <canvas id="canvasPaint" ng-click="FreeStylePaint($event)" width="1369" height="325" class="canvas-annotationStyle1" style="position: absolute;z-index:0;"></canvas></div>' + | ||
615 | + '<div class="col-sm-12 img-thumbnail" align="center">' + | ||
616 | + '<img src="' + $scope.clickedCIImage + '" alt="" title="" class="img-responsive "><div class="col-sm-12 well img-subtitle">' + | ||
617 | + '<div align="left" id="sid"><p>' + $scope.clickedCISummary + '</p></div><button id="btnTxtOnOff" class="btn btn-primary pull-right">Text Off</button>' + | ||
618 | + '<script>$(document).ready(function(){ var $ua = navigator.userAgent;if(($ua.match(/(iPod|iPhone|iPad|android)/i))) { var jspanelContainerWidth = $(".jsPanel-content").css("width"); $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth });$("#ciImagePanel").css("width", "100%"); }$("#btnTxtOnOff").click(function(){if($.trim($(this).text()) === "Text Off"){$(this).text("Text On");$("#sid").css("visibility","hidden");}else{$(this).text("Text Off");$("#sid").css("visibility","visible");}});});</script></div>' + | ||
619 | + '</div></div>', | ||
620 | + //ajax: { | ||
621 | + // url: 'app/views/ci/ci-view-detail.html' | ||
622 | + //}, | ||
623 | + title: $rootScope.getLocalStorageValue("currentViewTitle"), | ||
624 | + position: { | ||
625 | + top: 70, | ||
626 | + left: 20, | ||
627 | + }, | ||
628 | + | ||
629 | + size: { width: $(window).outerWidth() - 20, height: $(window).outerHeight() - 110 }, | ||
630 | + | ||
631 | + }); | ||
632 | + | ||
633 | + | ||
634 | + $('#canvasDiv img').load(function () { | ||
635 | + | ||
636 | + $rootScope.isLoading = false; | ||
637 | + $('#spinner').css('visibility', 'hidden'); | ||
638 | + }); | ||
639 | + | ||
640 | + $rootScope.currentSlug = 'clinical-illustrations-detail'; | ||
641 | + | ||
642 | + $rootScope.openViews.push( | ||
643 | + { | ||
644 | + "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId, | ||
645 | + "slug": $rootScope.currentSlug | ||
646 | + }); | ||
647 | + | ||
648 | + | ||
649 | + $("#ciImagePanel .img-thumbnail").css("height", $("#ciImagePanel .jsPanel-content").height()); | ||
650 | + var jspContentHeight = $('.jsPanel-content').height(); | ||
651 | + //var imgHeight = $('.img-thumbnail').find('img').height(); | ||
652 | + //if (imgHeight <= 0) | ||
653 | + // imgHeight = 320; | ||
654 | + //var textH = $('.img-subtitle').height(); | ||
655 | + //textH = textH + 40; | ||
656 | + //var blackBorderHeight = jspContentHeight - (imgHeight + textH); | ||
657 | + //if ($('.jsPanel-content').length > 0) { | ||
658 | + // $('.img-subtitle').css('margin-bottom', blackBorderHeight); | ||
659 | + //} | ||
660 | + } | ||
661 | + | ||
662 | + | ||
663 | + }, | ||
664 | + function (error) { | ||
665 | + // handle errors here | ||
666 | + console.log(' $scope.CIllustrationData = ' + error.statusText); | ||
667 | + } | ||
668 | + | ||
669 | + ); | ||
670 | + | ||
671 | + // console.log($rootScope.openViews); | ||
672 | + $('#CIView').css("height", $(window).outerHeight()); | ||
673 | + | ||
674 | + $('#CIView').css("width", $(window).outerWidth()); | ||
675 | + | ||
676 | + } | ||
677 | + | ||
678 | + $scope.$on('annotationToolEvent', function (event, data) { | ||
679 | + | ||
680 | + $('#editstylebackgroundcolor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", "rgb(255,255,255)") | ||
681 | + $('#editstylebackgroundcolor .minicolors >.minicolors-panel > .minicolors-grid >.minicolors-picker').css({ "top": "145px", "left": "4px" }); | ||
682 | + $('#outlineColor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", "rgb(0,0,0)") | ||
683 | + $('#outlineColor .minicolors >.minicolors-panel > .minicolors-grid >.minicolors-picker').css({ "top": "145px", "left": "4px" }); | ||
684 | + | ||
685 | + $("#canvas").css("display", "block"); | ||
686 | + $("#canvasPaint").css("display", "block"); | ||
687 | + | ||
688 | + $rootScope.onDrawingCanvasClick(); | ||
689 | + $rootScope.FreeStylePaint(); | ||
690 | + }); | ||
691 | + | ||
692 | + $scope.ReloadListViewImageDiv = function (id) { | ||
693 | + //console.log(id); | ||
694 | + $scope.idSelected = id; | ||
695 | + $scope.hiderow = true; | ||
696 | + | ||
697 | + var promise = DataService.getJson('~/../content/data/json/ci/ci_dat_contentlist.json') | ||
698 | + promise.then( | ||
699 | + function (result) { | ||
700 | + $scope.IllustrationData = result; | ||
701 | + | ||
702 | + var SelectedCIthumbImage = []; | ||
703 | + SelectedCIthumbImage = new jinqJs() | ||
704 | + .from($scope.IllustrationData.root.CIData) | ||
705 | + .where('_id = ' + id) | ||
706 | + .select('_ThumbnailImage', '_Summary', '_id', '_Title'); | ||
707 | + | ||
708 | + $scope.SelectedCIthumbImage = "~/../content/images/ci/thumbnails/" + SelectedCIthumbImage[0]._ThumbnailImage; | ||
709 | + $scope.SelectedCISummary = SelectedCIthumbImage[0]._Summary; | ||
710 | + $scope.SelectedCIId = SelectedCIthumbImage[0]._id; | ||
711 | + $scope.SelectedCITitle = SelectedCIthumbImage[0]._Title; | ||
712 | + | ||
713 | + //Set the scroll position of the tablebody to show selected row. | ||
714 | + | ||
715 | + var curCIListViewScroll = $rootScope.getLocalStorageValue("CIListViewScroll"); | ||
716 | + if (typeof (curCIListViewScroll) !== "undefined" && curCIListViewScroll !== null && curCIListViewScroll !== '') { | ||
717 | + if (typeof InstallTrigger !== 'undefined') | ||
718 | + { | ||
719 | + | ||
720 | + $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue("CIListViewScroll") }); | ||
721 | + } | ||
722 | + else | ||
723 | + { | ||
724 | + | ||
725 | + $('#ListViewDiv').scrollTop($rootScope.getLocalStorageValue("CIListViewScroll")); | ||
726 | + } | ||
727 | + | ||
728 | + } | ||
729 | + //else { | ||
730 | + // $('#ListViewDiv').scrollTop(0); | ||
731 | + //} | ||
732 | + | ||
733 | + }, | ||
734 | + function (error) { | ||
735 | + // handle errors here | ||
736 | + console.log(' $scope.AnimationData = ' + error.statusText); | ||
737 | + } | ||
738 | + ); | ||
739 | + }; | ||
740 | + | ||
741 | + $scope.hideListViewDiv = function () { | ||
742 | + if ($rootScope.getLocalStorageValue("currentCITabView") == 2) { | ||
743 | + localStorage.setItem("CISelectedRowId", ""); | ||
744 | + if ($('.selected').hasClass("selected")) { $('.selected').removeClass("selected"); } | ||
745 | + $scope.hiderow = false; | ||
746 | + } | ||
747 | + } | ||
748 | + | ||
749 | + | ||
750 | + | ||
751 | +}] | ||
752 | +); | ||
753 | + | ||
754 | + | ||
755 | + | ||
756 | + |
400-SOURCECODE/AIAHTML5.Web/app/views/Link/Link-view.html
1 | -<div class="bodyWrap row "> | ||
2 | - <div ng-include="'app/widget/MainMenu.html'" /> | ||
3 | - <div class="main" > | ||
4 | - <div id="siteloader" class="col-sm-12"> | ||
5 | - <!--<object style="width:100%; height:100%" type="text/html" data={{objdata}}></object>--> | ||
6 | - <object id="externalLink" ng-style="myObj" type="text/html" data={{objdata}}></object> | ||
7 | - </div> | ||
8 | - </div> | ||
9 | -</div> | ||
10 | - | ||
11 | -<script> | ||
12 | - $(document).ready(function () { | ||
13 | - var myEventMethod = null; | ||
14 | - var myEventListener = null; | ||
15 | - var myEventMessage = null; | ||
16 | - myEventMethod = window.addEventListener ? "addEventListener" : "attachEvent"; | ||
17 | - // create event listener | ||
18 | - myEventListener = window[myEventMethod]; | ||
19 | - // browser compatibility: attach event uses onmessage | ||
20 | - myEventMessage = myEventMethod == "attachEvent" ? "onmessage" : "message"; | ||
21 | - // register callback function on incoming message | ||
22 | - myEventListener(myEventMessage, function (e) { | ||
23 | - // we will get a string (better browser support) and validate | ||
24 | - // if it is an int - set the height of the iframe #my-iframe-id | ||
25 | - if (e.data == parseInt(e.data)) { | ||
26 | - document.getElementById('externalLink').height = e.data + "px"; | ||
27 | - $('body').scrollTop(0); | ||
28 | - } | ||
29 | - }, false); | ||
30 | - }); | ||
31 | - | ||
32 | -</script> | ||
33 | - | ||
34 | - | 1 | +<div class="bodyWrap row "> |
2 | + <div ng-include="'app/widget/MainMenu.html'" /> | ||
3 | + <div class="main" > | ||
4 | + <div id="siteloader" class="col-sm-12"> | ||
5 | + <!--<object style="width:100%; height:100%" type="text/html" data={{objdata}}></object>--> | ||
6 | + <object id="externalLink" ng-style="myObj" type="text/html" data={{objdata}}></object> | ||
7 | + </div> | ||
8 | + </div> | ||
9 | +</div> | ||
10 | + | ||
11 | +<script> | ||
12 | + $(document).ready(function () { | ||
13 | + var myEventMethod = null; | ||
14 | + var myEventListener = null; | ||
15 | + var myEventMessage = null; | ||
16 | + myEventMethod = window.addEventListener ? "addEventListener" : "attachEvent"; | ||
17 | + // create event listener | ||
18 | + myEventListener = window[myEventMethod]; | ||
19 | + // browser compatibility: attach event uses onmessage | ||
20 | + myEventMessage = myEventMethod == "attachEvent" ? "onmessage" : "message"; | ||
21 | + // register callback function on incoming message | ||
22 | + myEventListener(myEventMessage, function (e) { | ||
23 | + // we will get a string (better browser support) and validate | ||
24 | + // if it is an int - set the height of the iframe #my-iframe-id | ||
25 | + if (e.data == parseInt(e.data)) { | ||
26 | + document.getElementById('externalLink').height = e.data + "px"; | ||
27 | + $('body').scrollTop(0); | ||
28 | + } | ||
29 | + }, false); | ||
30 | + }); | ||
31 | + | ||
32 | +</script> | ||
33 | + | ||
34 | + |
400-SOURCECODE/Admin/dist/assets/styles/bootstrap-spinner.css
0 → 100644
1 | +/* Absolute Center Spinner */ | ||
2 | + | ||
3 | +.loading-mask { | ||
4 | + display: none; | ||
5 | + position: fixed; | ||
6 | + z-index: 100; | ||
7 | + top: 0; | ||
8 | + left: 0; | ||
9 | + width: 100%; | ||
10 | + height: 100%; | ||
11 | + background: black; | ||
12 | + opacity: 0.5; | ||
13 | + filter: alpha(opacity=50); | ||
14 | +} | ||
15 | + | ||
16 | + | ||
17 | +.loading-indicator { | ||
18 | + display: none; | ||
19 | + position: fixed; | ||
20 | + z-index: 1001; | ||
21 | + top: 50%; | ||
22 | + left: 50%; | ||
23 | +} | ||
24 | +.loading-app { | ||
25 | + position: fixed; | ||
26 | + z-index: 999999999; | ||
27 | + height: 2em; | ||
28 | + width: 2em; | ||
29 | + overflow: show; | ||
30 | + margin: auto; | ||
31 | + top: 0; | ||
32 | + left: 0; | ||
33 | + bottom: 0; | ||
34 | + right: 0; | ||
35 | +} | ||
36 | + | ||
37 | + /* Transparent Overlay */ | ||
38 | + .loading-app:before { | ||
39 | + content: ''; | ||
40 | + display: block; | ||
41 | + position: fixed; | ||
42 | + top: 0; | ||
43 | + left: 0; | ||
44 | + width: 100%; | ||
45 | + height: 100%; | ||
46 | + background-color: #000000; | ||
47 | + filter: alpha(opacity=30); | ||
48 | + -moz-opacity: 0.3; | ||
49 | + -khtml-opacity: 0.3; | ||
50 | + opacity: 0.3; | ||
51 | + } | ||
52 | + | ||
53 | + /* :not(:required) hides these rules from IE9 and below */ | ||
54 | + .loading-app:not(:required) { | ||
55 | + font: 0/0 a; | ||
56 | + color: transparent; | ||
57 | + text-shadow: none; | ||
58 | + background-color: transparent; | ||
59 | + border: 0; | ||
60 | + } | ||
61 | + | ||
62 | + .loading-app:not(:required):after { | ||
63 | + content: ''; | ||
64 | + display: block; | ||
65 | + font-size: 10px; | ||
66 | + width: 1em; | ||
67 | + height: 1em; | ||
68 | + margin-top: -0.5em; | ||
69 | + -webkit-animation: spinner 1500ms infinite linear; | ||
70 | + -moz-animation: spinner 1500ms infinite linear; | ||
71 | + -ms-animation: spinner 1500ms infinite linear; | ||
72 | + -o-animation: spinner 1500ms infinite linear; | ||
73 | + animation: spinner 1500ms infinite linear; | ||
74 | + border-radius: 0.5em; | ||
75 | + -webkit-box-shadow: rgba(0, 0, 0, 0.75) 1.5em 0 0 0, rgba(0, 0, 0, 0.75) 1.1em 1.1em 0 0, rgba(0, 0, 0, 0.75) 0 1.5em 0 0, rgba(0, 0, 0, 0.75) -1.1em 1.1em 0 0, rgba(0, 0, 0, 0.5) -1.5em 0 0 0, rgba(0, 0, 0, 0.5) -1.1em -1.1em 0 0, rgba(0, 0, 0, 0.75) 0 -1.5em 0 0, rgba(0, 0, 0, 0.75) 1.1em -1.1em 0 0; | ||
76 | + box-shadow: rgba(0, 0, 0, 0.75) 1.5em 0 0 0, rgba(0, 0, 0, 0.75) 1.1em 1.1em 0 0, rgba(0, 0, 0, 0.75) 0 1.5em 0 0, rgba(0, 0, 0, 0.75) -1.1em 1.1em 0 0, rgba(0, 0, 0, 0.75) -1.5em 0 0 0, rgba(0, 0, 0, 0.75) -1.1em -1.1em 0 0, rgba(0, 0, 0, 0.75) 0 -1.5em 0 0, rgba(0, 0, 0, 0.75) 1.1em -1.1em 0 0; | ||
77 | + } | ||
78 | + | ||
79 | +/* Animation */ | ||
80 | + | ||
81 | +@-webkit-keyframes spinner { | ||
82 | + 0% { | ||
83 | + -webkit-transform: rotate(0deg); | ||
84 | + -moz-transform: rotate(0deg); | ||
85 | + -ms-transform: rotate(0deg); | ||
86 | + -o-transform: rotate(0deg); | ||
87 | + transform: rotate(0deg); | ||
88 | + } | ||
89 | + | ||
90 | + 100% { | ||
91 | + -webkit-transform: rotate(360deg); | ||
92 | + -moz-transform: rotate(360deg); | ||
93 | + -ms-transform: rotate(360deg); | ||
94 | + -o-transform: rotate(360deg); | ||
95 | + transform: rotate(360deg); | ||
96 | + } | ||
97 | +} | ||
98 | + | ||
99 | +@-moz-keyframes spinner { | ||
100 | + 0% { | ||
101 | + -webkit-transform: rotate(0deg); | ||
102 | + -moz-transform: rotate(0deg); | ||
103 | + -ms-transform: rotate(0deg); | ||
104 | + -o-transform: rotate(0deg); | ||
105 | + transform: rotate(0deg); | ||
106 | + } | ||
107 | + | ||
108 | + 100% { | ||
109 | + -webkit-transform: rotate(360deg); | ||
110 | + -moz-transform: rotate(360deg); | ||
111 | + -ms-transform: rotate(360deg); | ||
112 | + -o-transform: rotate(360deg); | ||
113 | + transform: rotate(360deg); | ||
114 | + } | ||
115 | +} | ||
116 | + | ||
117 | +@-o-keyframes spinner { | ||
118 | + 0% { | ||
119 | + -webkit-transform: rotate(0deg); | ||
120 | + -moz-transform: rotate(0deg); | ||
121 | + -ms-transform: rotate(0deg); | ||
122 | + -o-transform: rotate(0deg); | ||
123 | + transform: rotate(0deg); | ||
124 | + } | ||
125 | + | ||
126 | + 100% { | ||
127 | + -webkit-transform: rotate(360deg); | ||
128 | + -moz-transform: rotate(360deg); | ||
129 | + -ms-transform: rotate(360deg); | ||
130 | + -o-transform: rotate(360deg); | ||
131 | + transform: rotate(360deg); | ||
132 | + } | ||
133 | +} | ||
134 | + | ||
135 | +@keyframes spinner { | ||
136 | + 0% { | ||
137 | + -webkit-transform: rotate(0deg); | ||
138 | + -moz-transform: rotate(0deg); | ||
139 | + -ms-transform: rotate(0deg); | ||
140 | + -o-transform: rotate(0deg); | ||
141 | + transform: rotate(0deg); | ||
142 | + } | ||
143 | + | ||
144 | + 100% { | ||
145 | + -webkit-transform: rotate(360deg); | ||
146 | + -moz-transform: rotate(360deg); | ||
147 | + -ms-transform: rotate(360deg); | ||
148 | + -o-transform: rotate(360deg); | ||
149 | + transform: rotate(360deg); | ||
150 | + } | ||
151 | +} |
400-SOURCECODE/Admin/dist/inline.30da24ccb8e2260fa5b7.bundle.js
0 → 100644
1 | +!function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r=window.webpackJsonp;window.webpackJsonp=function(t,c,u){for(var a,i,f,l=0,s=[];l<t.length;l++)i=t[l],o[i]&&s.push(o[i][0]),o[i]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(r&&r(t,c,u);s.length;)s.shift()();if(u)for(l=0;l<u.length;l++)f=n(n.s=u[l]);return f};var t={},o={4:0};n.e=function(e){function r(){a.onerror=a.onload=null,clearTimeout(i);var n=o[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),o[e]=void 0)}var t=o[e];if(0===t)return new Promise(function(e){e()});if(t)return t[2];var c=new Promise(function(n,r){t=o[e]=[n,r]});t[2]=c;var u=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,n.nc&&a.setAttribute("nonce",n.nc),a.src=n.p+""+e+"."+{0:"35726d60cdf25fecc5f1",1:"efda295bc6a63c38233c",2:"f88ccefc30e43cf5330e"}[e]+".chunk.js";var i=setTimeout(r,12e4);return a.onerror=a.onload=r,u.appendChild(a),c},n.m=e,n.c=t,n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n.oe=function(e){throw console.error(e),e}}([]); | ||
0 | \ No newline at end of file | 2 | \ No newline at end of file |
400-SOURCECODE/Admin/dist/main.efda295bc6a63c38233c.bundle.js
0 → 100644
1 | +webpackJsonp([1],{0:function(t,e,r){t.exports=r("cDNt")},"1Nhn":function(t,e){t.exports='<div class="row">\r\n \x3c!-- main-heading --\x3e\r\n <div class="col-sm-12 pageHeading">\r\n <h4>Change User ID</h4>\r\n </div>\r\n \x3c!-- main-heading --\x3e\r\n \x3c!-- container --\x3e\r\n <div class="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3">\r\n <div class="container-fluid main-full">\r\n <div class="row">\r\n <div class="well">\r\n <div class="row">\r\n <div class="col-sm-12">\r\n <h5 class="text-center text-success"><strong>**To change your user ID fill all the text fields carefully.</strong></h5>\r\n <div class="panel-body">\r\n \x3c!-- form --\x3e\r\n <form class="form-horizontal" novalidate [formGroup]="ChangeUserIdFrm">\r\n <div class="form-group" *ngIf="alerts !== \'\'">\r\n <div class="col-xs-12">\r\n <div class="alert alert-danger" [innerHTML]="alerts">\r\n </div>\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputEmail3" class="col-sm-4 control-label">Old User Id <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <label type="text" class="form-control">{{ChangeUserIdFrm.controls.loginid.value}}</label> \r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputPassword3" class="col-sm-4 control-label">New User Id <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <input type="text" class="form-control" id="inputPassword" formControlName="newloginid">\r\n <span class="help-block">(Minimum 8 characters)</span>\r\n <div *ngIf="!ChangeUserIdFrm.controls.newloginid.valid && ChangeUserIdFrm.controls.newloginid.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Minimum 8 characters is required</div> \r\n \r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputPassword3" class="col-sm-4 control-label">Confirm User Id <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <input type="text" class="form-control" id="inputPasswor" formControlName="confirmloginid">\r\n <div *ngIf="!ChangeUserIdFrm.controls.confirmloginid.valid && ChangeUserIdFrm.controls.confirmloginid.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Confirm userid is required</div>\r\n </div>\r\n </div>\r\n\r\n <div class="form-group">\r\n <div class="col-sm-offset-4 col-sm-7 mar-top17">\r\n <button type="button" class="btn btn-primary btn-sm" data-toggle="modal" (click)="UpdateUserId(this)"><i class="fa fa-check"></i> Update</button>\r\n <button type="button" class="btn btn-primary btn-sm" (click)="redirect()"><i class="fa fa-close"></i> Cancel</button>\r\n \x3c!--cancel-button--\x3e\r\n <div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" id="mymodal">\r\n <div class="modal-dialog modal-sm" role="document">\r\n <div class="modal-content">\r\n <div class="modal-header annotation-modal-header ui-draggable-handle">\r\n <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">\xd7</span></button>\r\n <h4 class="modal-title" id="">Alert</h4>\r\n </div>\r\n <div class="modal-body">\r\n <h5>Please enter your old user ID.</h5>\r\n </div>\r\n <div class="modal-footer">\r\n <div class="row">\r\n <div class="col-sm-12"><button class="btn btn-primary btn-sm">Ok</button></div>\r\n </div>\r\n </div>\r\n\r\n </div>\x3c!-- /.modal-content --\x3e\r\n </div>\x3c!-- /.modal-dialog --\x3e\r\n </div>\x3c!-- /.modal --\x3e\r\n \x3c!--cancel-button--\x3e\r\n \r\n </div>\r\n\r\n </div>\r\n </form>\r\n \x3c!-- form --\x3e\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n \x3c!-- container --\x3e\r\n </div>\r\n </div>\r\n\r\n\r\n </div>\r\n'},"2Azi":function(t,e){t.exports='<div class="row">\r\n \x3c!-- main-heading --\x3e\r\n <div class="col-sm-12 pageHeading">\r\n <h4>{{Mode}} Discount Code</h4>\r\n </div>\r\n \x3c!-- main-heading --\x3e\r\n \r\n <ng-template #templatesuccess>\r\n <div class="modal-header">\r\n <h4 class="modal-title pull-left">Confirmation</h4>\r\n <button type="button" class="close pull-right" aria-label="Close" (click)="modalRef.hide()">\r\n <span aria-hidden="true">×</span>\r\n </button>\r\n </div>\r\n <div class="modal-body" [innerHTML]="modalAlerts">\r\n </div>\r\n <div class="modal-footer">\r\n </div>\r\n </ng-template>\r\n\r\n \x3c!-- container --\x3e\r\n <div [className]="divClass">\r\n <div class="container-fluid main-full">\r\n \r\n \x3c!-- form --\x3e\r\n <form class="form-horizontal" [formGroup]="manageDiscountCodeFrm">\r\n <div [style.visibility]="(Mode == \'Manage\') ? \'visible\' : \'hidden\'" class="row">\r\n <div class="well no-margin-btm">\r\n <div class="row">\r\n <div class="col-lg-3 col-sm-4">\r\n <div class="row">\r\n <div class="col-sm-12">\r\n <div class="form-group marginTop5">\r\n <label for="searchDiscountCode" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Discount Code : </label>\r\n <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">\r\n <input type="text" class="form-control" id="searchDiscountCode" formControlName="searchDiscountCode">\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="col-lg-4 col-sm-4">\r\n <div class="row">\r\n <div class="col-sm-12">\r\n <div class="form-group marginTop5">\r\n <label for="searchStartDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Discount Start Date :</label>\r\n <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">\r\n <div id="datetimepicker1" class="input-group input-append date">\r\n <input id="searchStartDate" type="text" class="form-control" formControlName="searchStartDate" formControlName="searchStartDate" #dp1="bsDatepicker" bsDatepicker [(bsValue)]="bsValue1">\r\n <span class="input-group-btn add-on">\r\n <button class="btn btn-default" type="button" (click)="dp1.toggle()"><i class="fa fa-calendar"></i></button>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="col-lg-4 col-sm-4">\r\n <div class="row">\r\n <div class="col-sm-12">\r\n <div class="form-group marginTop5">\r\n <label for="searchEndDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Discount End Date :</label>\r\n <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">\r\n <div id="datetimepicker2" class="input-group input-append date">\r\n <input id="searchEndDate" type="text" class="form-control" formControlName="searchEndDate" formControlName="searchEndDate" #dp2="bsDatepicker" bsDatepicker [(bsValue)]="bsValue2">\r\n <span class="input-group-btn add-on">\r\n <button class="btn btn-default" type="button" (click)="dp2.toggle()"><i class="fa fa-calendar"></i></button>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class="col-lg-1 col-sm-4">\r\n <div class="row">\r\n <div class="col-sm-12">\r\n <div class="form-group marginTop5">\r\n <button (click)="SearchDiscountCodes()" type="button" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> Search</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class="well">\r\n <div class="table-responsive blue table-fixT">\r\n <table id="tblDiscountCodes" class="table table-condensed table-bordered margin-btm0 table-striped table-fixed">\r\n <thead>\r\n <tr>\r\n <th>Discount Code</th>\r\n <th>Percentage</th>\r\n <th>Discount Start Date</th>\r\n <th>Discount End Date</th>\r\n <th>Status</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor="let item of this.manageDiscountCodeFrm.controls[\'discountCodes\'].value; let i = index" (click)="SetClickedRow(i, item)" [class.active]="i == selectedRow" [class.inactive]="i != selectedRow">\r\n <td><input type="hidden" value="{{item.Id}}">{{item.DiscountCode}}</td>\r\n <td>{{item.Percentage | number : \'1.2\'}}</td>\r\n <td>{{item.StartDate | date: \'MM/dd/yyyy\'}}</td>\r\n <td>{{item.EndDate | date: \'MM/dd/yyyy\'}}</td>\r\n <td>\r\n <span *ngIf="item.IsActive" class="label label-success">Active</span>\r\n <span *ngIf="!item.IsActive" class="label label-default">Inactive</span>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n <div class="row">\r\n <div class="col-sm-12 marginTop20 text-center">\r\n <button (click)="AddDiscountCode()" class="btn btn-primary btn-sm"><i class="fa fa-plus-circle"></i> Add</button>\r\n <button (click)="EditDiscountCode()" class="btn btn-primary btn-sm"><i class="fa fa-edit"></i> Edit</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n \x3c!-- form --\x3e\r\n\r\n <div style="position: absolute; z-index: 100;" [style.top]="topPos" [style.visibility]="(Mode==\'Add\' || Mode==\'Edit\') ? \'visible\' : \'hidden\'"\r\n class="well">\r\n <div class="row">\r\n <div class="col-sm-12">\r\n <div class="panel-body">\r\n \x3c!-- form --\x3e\r\n <form class="form-horizontal" [formGroup]="insertUpdateDiscountCodeFrm" (submit)="InsertUpdateDiscountCode(templatesuccess)">\r\n <div class="form-group" *ngIf="alerts != \'\'">\r\n <div class="col-xs-12">\r\n <div class="alert alert-danger" [innerHTML]="alerts">\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class="form-group">\r\n <label for="discountCode" class="col-sm-4 control-label">Discount Code :</label>\r\n <div class="col-sm-7">\r\n <input type="hidden" formControlName="discountId">\r\n <input type="text" class="form-control" id="discountCode" formControlName="discountCode">\r\n </div>\r\n </div>\r\n\r\n <div class="form-group">\r\n <label for="startDate" class="col-sm-4 control-label">Discount Start Date <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <div id="bsdatetimepicker3" class="input-group input-group-sm input-append date">\r\n <input type="text" class="form-control" formControlName="startDate" #dp3="bsDatepicker" bsDatepicker [(bsValue)]="bsValue3">\r\n <div *ngIf="insertUpdateDiscountCodeFrm.controls.startDate.hasError(\'required\') && insertUpdateDiscountCodeFrm.controls.startDate.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Discount start date is required</div>\r\n <span class="input-group-btn add-on">\r\n <button class="btn btn-default" type="button" (click)="dp3.toggle()"><i class="fa fa-calendar"></i></button>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class="form-group">\r\n <label for="endDate" class="col-sm-4 control-label">Discount End Date <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <div id="bdatetimepicker4" class="input-group input-group-sm input-append date">\r\n <input type="text" class="form-control" formControlName="endDate" #dp4="bsDatepicker" bsDatepicker [(bsValue)]="bsValue4">\r\n <div *ngIf="insertUpdateDiscountCodeFrm.controls.endDate.hasError(\'required\') && insertUpdateDiscountCodeFrm.controls.endDate.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Discount end date is required</div>\r\n <span class="input-group-btn add-on">\r\n <button class="btn btn-default" type="button" (click)="dp4.toggle()"><i class="fa fa-calendar"></i></button>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class="form-group">\r\n <label for="percentage" class="col-sm-4 control-label">Percentage <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <input type="text" class="form-control" id="percentage" formControlName="percentage" maxlength="5">\r\n <div *ngIf="insertUpdateDiscountCodeFrm.controls.percentage.hasError(\'required\') && insertUpdateDiscountCodeFrm.controls.percentage.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Discount percentage is required</div>\r\n <div *ngIf="insertUpdateDiscountCodeFrm.controls.percentage.hasError(\'pattern\') && insertUpdateDiscountCodeFrm.controls.percentage.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Discount percentage must be numeric</div>\r\n </div>\r\n </div>\r\n \r\n <div class="form-group">\r\n <label for="status" class="col-sm-4 control-label">Status :</label>\r\n <div class="col-sm-7">\r\n <label class="radio-inline">\r\n <input name="isActive" value="true" type="radio" formControlName="isActive"> \r\n Active \r\n </label> \r\n <label class="radio-inline">\r\n <input name="isActive" value="false" type="radio" formControlName="isActive">\r\n Inactive \r\n </label> \r\n </div>\r\n </div>\r\n\r\n <div class="form-group">\r\n <div class="col-sm-offset-4 col-sm-7 mar-top17">\r\n <button type="submit" [disabled]="!insertUpdateDiscountCodeFrm.valid" class="btn btn-primary btn-sm"><i class="fa fa-plus-circle"></i> Save</button>\r\n <button type="button" (click)="CancelAddEdit()" class="btn btn-primary btn-sm"><i class="fa fa-times-circle"></i> Cancel</button>\r\n </div>\r\n </div>\r\n\r\n \x3c!--cancel-button--\x3e\r\n <div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" id="mymodal">\r\n <div class="modal-dialog modal-sm" role="document">\r\n <div class="modal-content">\r\n <div class="modal-header annotation-modal-header ui-draggable-handle">\r\n <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">\xd7</span></button>\r\n <h4 class="modal-title" id="">Alert</h4>\r\n </div>\r\n <div class="modal-body">\r\n <h5>Discount Percentage should be greater than one.</h5>\r\n </div>\r\n <div class="modal-footer">\r\n <div class="row">\r\n <div class="col-sm-12"><button class="btn btn-primary btn-sm">Ok</button></div>\r\n </div>\r\n </div>\r\n </div>\r\n \x3c!-- /.modal-content --\x3e\r\n </div>\r\n \x3c!-- /.modal-dialog --\x3e\r\n </div>\r\n \x3c!-- /.modal --\x3e\r\n \x3c!--cancel-button--\x3e\r\n\r\n </form>\r\n \x3c!-- form --\x3e\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n \x3c!-- container --\x3e\r\n</div>'},"3cDZ":function(t,e){t.exports=' \r\n\r\n<modal #closeModal [keyboard]="false" [backdrop]="\'static\'" style="z-index:1100">\r\n <div>\r\n <div class="modal-header alert-header-custom">\r\n <button type="button" class="alert-closebutton" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>\r\n <h5 class="modal-title"><b>AIA</b></h5>\r\n\r\n </div>\r\n <modal-body class="bg-gray-lighter">\r\n <div class="row">\r\n <div class="col-sm-12 text-center">\r\n <span style="float:left">\r\n \r\n <img src="assets/img/alertmessage.png" />\r\n </span>\r\n <p>\r\n {{message}}\r\n </p>\r\n <br/> \r\n </div> \r\n <div class="text-center" [hidden]="alertshow">\r\n <input type="button" class="btn btn-default alert-margin" id="okButton" value="Yes">\r\n <input type="button" class="btn btn-default alert-margin" id="noButton" value="No">\r\n <input type="button" class="btn btn-default alert-margin" id="cancelButton" value="Cancel">\r\n </div>\r\n </div>\r\n </modal-body>\r\n </div>\r\n</modal>\r\n<modal #resetModal [keyboard]="false" [backdrop]="\'static\'" style="z-index:1100">\r\n <div >\r\n <div class="modal-header alert-header-custom">\r\n <button type="button" class="alert-closebutton" data-dismiss="modal" aria-label="Close" ><span aria-hidden="true" >×</span></button>\r\n <h5 class="modal-title"><b>AIA</b></h5> \r\n </div>\r\n <modal-body class="bg-gray-lighter">\r\n <div class="row">\r\n <div class="col-sm-12 text-center">\r\n <span style="float:left"> \r\n <img src="assets/img/alertmessage.png" />\r\n </span>\r\n <p>{{message}}\r\n </p>\r\n </div>\r\n \r\n <div class="text-center">\r\n <input type="button" class="btn btn-default alert-margin" id="yesResetButton" value="Yes">\r\n <input type="button" class="btn btn-default alert-margin" id="noResetButton" value="No">\r\n </div>\r\n </div>\r\n</modal-body>\r\n </div>\r\n</modal>\r\n\r\n<modal #alertMessageModal [keyboard]="false" [backdrop]="\'static\'" style="z-index:1100">\r\n <div style="min-height:120px">\r\n <div class="modal-header alert-header-custom">\r\n <button type="button" class="alert-closebutton" id="closeAlert" aria-label="Close"><span aria-hidden="true">×</span></button>\r\n <h5 class="modal-title"><b>AIA</b></h5>\r\n </div> \r\n <modal-body class="bg-gray-lighter">\r\n <div class="row">\r\n <div class="col-sm-12 text-center">\r\n <span style="float:left">\r\n \x3c!--<img src="assets/img/alertmessage.png" />--\x3e\r\n <button class="btn btn-primary btn-sm btn-circle" type="button" style="width: 40px;height: 40px; padding: 7px 12px;font-size: 12px;line-height: 1.33;border-radius: 25px;">\r\n <i class="fa fa-check"></i>\r\n </button>\r\n </span>\r\n <p style="\r\n padding-top: 10px;\r\n">\r\n {{message}}\r\n </p>\r\n </div>\r\n\r\n <div class="text-center">\r\n <input type="button" class="btn btn-primary btn-sm alert-margin" id="okAlert" value="OK" />\r\n </div>\r\n </div>\r\n </modal-body>\r\n \r\n </div>\r\n</modal>\r\n\r\n\r\n\r\n<modal #confirmModel [keyboard]="false" [backdrop]="\'static\'" style="z-index:1100">\r\n <div>\r\n <div class="modal-header alert-header-custom">\r\n <button type="button" class="alert-closebutton" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>\r\n <h5 class="modal-title"><b>AIA</b></h5>\r\n </div>\r\n <modal-body class="bg-gray-lighter">\r\n <div class="row">\r\n <div class="col-sm-12 text-center">\r\n <span style="float:left">\r\n <img src="assets/img/alertmessage.png" />\r\n </span>\r\n <p>\r\n {{message}}\r\n </p>\r\n </div>\r\n\r\n <div class="text-center">\r\n <input type="button" class="btn btn-default alert-margin" id="yesConfirmButton" value="Yes">\r\n <input type="button" class="btn btn-default alert-margin" id="noConfirmButton" value="No">\r\n </div>\r\n </div>\r\n </modal-body>\r\n </div>\r\n</modal>\r\n'},"7QTD":function(t,e){t.exports='<div class="row">\r\n \x3c!-- main-heading --\x3e\r\n <div class="col-sm-12 pageHeading">\r\n <h4>Change User Password</h4>\r\n </div>\r\n \x3c!-- main-heading --\x3e\r\n \x3c!-- container --\x3e\r\n <div class="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3">\r\n <div class="container-fluid main-full">\r\n <div class="row">\r\n <div class="well">\r\n <div class="row">\r\n <div class="col-sm-12">\r\n <h5 class="text-center text-success"><strong>**To change your password fill all the text fields carefully.</strong></h5>\r\n <div class="panel-body">\r\n \x3c!-- form --\x3e\r\n <form class="form-horizontal" [formGroup]="changeUserPasswordFrm" (submit)="onFormSubmit()">\r\n <div class="form-group" *ngIf="alerts != \'\'">\r\n <div class="col-xs-12">\r\n <div class="alert alert-danger" [innerHTML]="alerts">\r\n </div>\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputEmail3" class="col-sm-4 control-label">User Id <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <input type="hidden" class="form-control" formControlName="userId" placeholder="">\r\n <label type="text" class="form-control">{{changeUserPasswordFrm.controls.loginId.value}}</label>\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputPassword3" class="col-sm-4 control-label">Old Password <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <input type="password" class="form-control" formControlName="oldPassword" placeholder="" maxlength="50">\r\n <div *ngIf="!changeUserPasswordFrm.controls.oldPassword.valid && changeUserPasswordFrm.controls.oldPassword.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Old password is required</div>\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputPassword3" class="col-sm-4 control-label">New Password <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <input type="password" class="form-control" formControlName="newPassword" placeholder="" maxlength="50">\r\n <span class="help-block">(Minimum 8 characters)</span>\r\n <div *ngIf="!changeUserPasswordFrm.controls.newPassword.valid && changeUserPasswordFrm.controls.newPassword.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">New password of minimum 8 characters is required</div>\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputPassword3" class="col-sm-4 control-label">Confirm Password <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <input type="password" class="form-control" formControlName="confirmPassword" placeholder="" maxlength="50">\r\n <div *ngIf="!changeUserPasswordFrm.controls.confirmPassword.valid && changeUserPasswordFrm.controls.confirmPassword.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Confirm password is required</div>\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <div class="col-sm-offset-4 col-sm-7 mar-top17">\r\n <button type="submit" class="btn btn-primary btn-sm"><i class="fa fa-check"></i> Update</button>\r\n <button type="button" class="btn btn-primary btn-sm" (click)="redirect()"><i class="fa fa-close"></i> Cancel</button>\r\n </div>\r\n </div>\r\n \x3c!--cancel-button--\x3e\r\n <div class="modal fade bs-example-modal-sm ui-draggable" tabindex="-1" role="dialog" id="mymodal">\r\n <div class="modal-dialog modal-sm" role="document">\r\n <div class="modal-content">\r\n <div class="modal-header annotation-modal-header ui-draggable-handle">\r\n <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">\xd7</span></button>\r\n <h4 class="modal-title" id="">Alert</h4>\r\n </div>\r\n <div class="modal-body">\r\n <h5>Please enter your old password</h5>\r\n </div>\r\n <div class="modal-footer">\r\n <div class="row">\r\n <div class="col-sm-12"><button class="btn btn-primary btn-sm">Ok</button></div>\r\n </div>\r\n </div>\r\n\r\n </div>\x3c!-- /.modal-content --\x3e\r\n </div>\x3c!-- /.modal-dialog --\x3e\r\n </div>\x3c!-- /.modal --\x3e\r\n \x3c!--cancel-button--\x3e\r\n </form>\r\n \x3c!-- form --\x3e\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n\r\n</div>\r\n'},LWbE:function(t,e){t.exports='<div class="row">\r\n \x3c!-- main-heading --\x3e\r\n <div class="col-sm-12 pageHeading">\r\n <h4>Add User</h4>\r\n </div>\r\n <div class="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3">\r\n <div class="container-fluid main-full">\r\n <div class="row">\r\n <div class="well">\r\n <div class="row">\r\n <div class="col-sm-12">\r\n <div class="panel-body">\r\n \x3c!-- form --\x3e\r\n <form class="form-horizontal" [formGroup]="adduserFrm">\r\n <div class="form-group" *ngIf="alerts !== \'\'">\r\n <div class="col-xs-12">\r\n <div class="alert alert-danger" [innerHTML]="alerts">\r\n </div>\r\n\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputEmail3" class="col-sm-4 control-label">User Name <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <input type="text" class="form-control input-sm" id="name" placeholder="User Name" formControlName="UserName">\r\n <div *ngIf="!adduserFrm.controls.UserName.valid && adduserFrm.controls.UserName.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">User Name is required</div>\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputPassword3" class="col-sm-4 control-label">Password <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <input type="password" class="form-control input-sm" id="password" placeholder="" formControlName="Password">\r\n <span class="help-block">(Minimum 8 characters)</span>\r\n <div *ngIf="!adduserFrm.controls.Password.valid && adduserFrm.controls.Password.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Password of minimum 8 characters is required</div>\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputPassword3" class="col-sm-4 control-label">Confirm Password <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <input type="password" class="form-control input-sm" id="cpassword" placeholder="" formControlName="ConfirmPassword">\r\n <div *ngIf="!adduserFrm.controls.ConfirmPassword.valid && adduserFrm.controls.ConfirmPassword.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Confirm Password is required</div>\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputPassword3" class="col-sm-4 control-label">Email Id <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <input type="text" class="form-control" id="inputPassword3" placeholder="Email Id" formControlName="EmailId" pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,3}$">\r\n <div *ngIf="adduserFrm.controls.EmailId.invalid && !adduserFrm.controls.EmailId.value && adduserFrm.controls.EmailId.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Email Id is required</div>\r\n\r\n <div *ngIf="adduserFrm.controls.EmailId.invalid && adduserFrm.controls.EmailId.value" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">\r\n Please enter the correct email.\r\n </div>\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputEmail3" class="col-sm-4 control-label">First Name <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <input class="form-control input-sm" id="FirstName" placeholder="First Name" type="text" formControlName="FirstName">\r\n <div *ngIf="!adduserFrm.controls.FirstName.valid && adduserFrm.controls.FirstName.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">First Name is required</div>\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputEmail3" class="col-sm-4 control-label">Last Name <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <input class="form-control input-sm" id="LastName" placeholder="Last Name" type="text" formControlName="LastName">\r\n <div *ngIf="!adduserFrm.controls.LastName.valid && adduserFrm.controls.LastName.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Last Name is required</div>\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputEmail3" class="col-sm-4 control-label">Account Number <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <select class="form-control input-sm" id="AccountNumber" (change)="BindUserTypeAndProductEdition($event)" [formControl]="adduserFrm.controls[\'AccountNumberId\']">\r\n <option value="0">Select</option>\r\n \x3c!--<option value="noption" disabled>Selected option</option>--\x3e\r\n <option *ngFor="let AccountNumberEntity of AccountNumberList" value="{{AccountNumberEntity.Id}}">{{ AccountNumberEntity.AccountNumber }}</option>\r\n </select>\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputEmail3" class="col-sm-4 control-label">User Type <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <select class="form-control input-sm" id="UserType" [formControl]="adduserFrm.controls[\'UserTypeId\']">\r\n <option value="0">Select</option>\r\n <option *ngFor="let UserTypeEntity of UserTypeList" value="{{UserTypeEntity.Id}}">{{ UserTypeEntity.Title }}</option>\r\n </select>\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputEmail3" class="col-sm-4 control-label">Product Edition <span class="red">*</span> :</label>\r\n <div class="col-sm-7"> \r\n <select class="form-control input-sm" id="ProductEdition" [formControl]="adduserFrm.controls[\'ProductEditionId\']">\r\n <option value="0">Select</option>\r\n <option *ngFor="let ProductEditionEntity of ProductEditionList" value="{{ProductEditionEntity.Id}}">{{ ProductEditionEntity.Title }}</option>\r\n </select>\r\n </div>\r\n </div>\r\n <div class="row">\r\n <div class="col-sm-12 marginTop20 text-center">\r\n <button type="button" class="btn btn-primary btn-sm" data-toggle="modal" (click)="AddUser(this)"><i class="fa fa-plus-circle"></i> Add</button>\r\n \x3c!--modal--\x3e\r\n <div class="modal fade bs-example-modal-sm text-left" tabindex="-1" role="dialog" id="mymodal">\r\n <div class="modal-dialog modal-sm" role="document">\r\n <div class="modal-content">\r\n <div class="modal-header annotation-modal-header ui-draggable-handle">\r\n <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">\xd7</span></button>\r\n <h4 class="modal-title" id="">Alert</h4>\r\n </div>\r\n <div class="modal-body">\r\n <h5>Please enter a username</h5>\r\n </div>\r\n <div class="modal-footer">\r\n <div class="row">\r\n <div class="col-sm-12"><button class="btn btn-primary btn-sm">Ok</button></div>\r\n </div>\r\n </div>\r\n\r\n </div>\x3c!-- /.modal-content --\x3e\r\n </div>\x3c!-- /.modal-dialog --\x3e\r\n </div>\r\n\r\n <button class="btn btn-primary btn-sm" (click)="ResetForm()"><i class="fa fa-refresh"></i> Reset</button>\r\n <button class="btn btn-primary btn-sm" (click)="redirect()"><i class="fa fa-close"></i> Cancel</button>\r\n </div>\r\n\r\n </div>\r\n </form>\r\n \x3c!-- form --\x3e\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n'},cDNt:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r("/oeL"),s=r("Qa4U"),i=r("bm2B"),o=r("fc+i"),a=r("XKz0"),l=r("qbdv"),d=r("CPp0"),c=r("GWzR"),u=(r("GQSG"),r("HT7u"),r("PSNg"),r("ivSB"),r("AP4T")),p=function(){function t(){this.userUrl="",this.resourceBaseUrl="",this.hostURL="",this.LiveURL="",this.UserId=0,this.UserType=1,this.AccountType=0,this.hostURL="http://192.168.84.242:97/",this.LiveURL="http://qa.beta.interactiveanatomy.com/API/Adminapi/",this.resourceBaseUrl=this.hostURL,localStorage.setItem("loggedInUserDetails",JSON.stringify({Id:1,FirstName:"Maribel",LastName:"sfsfsfsfsfsfs",EmailId:"ravi.vishwakarma@ebix.com",LoginId:"superadmin",Password:"ebix@2016",SecurityQuestionId:1,SecurityAnswer:"boxer",CreatorId:1,CreationDate:"2009-03-02T00:00:00",DeactivationDate:null,ModifierId:1,ModifiedDate:"2017-01-24T02:03:19",UserType:"Super Admin",UserTypeId:1,IsActive:!0,IsCorrectPassword:!1,IncorrectLoginAttemptCount:0,IsBlocked:!1,LicenseId:0,EditionId:0,LoginFailureCauseId:0,Modules:[{slug:"da-view-list",name:"Dissectible Anatomy",id:1},{slug:"tile-view-list",name:"Atlas Anatomy",id:2},{slug:"3d-anatomy-list",name:"3D Anatomy",id:3},{slug:"clinical-illustrations",name:"Clinical Illustrations",id:4},{slug:"clinical-animations",name:"Clinical Animations",id:5},{slug:"Link/encyclopedia",name:"Encyclopedia",id:6},{slug:"curriculum-builder",name:"Curriculum Builder",id:7},{slug:"anatomy-test",name:"Anatomy Test",id:8},{slug:"Link/IP-10",name:"IP 10",id:9},{slug:"lab-exercises",name:"Lab Exercises",id:10},{slug:"Link/indepth-reports",name:"In-Depth Reports",id:11},{slug:"Link/complementary-and-alternate-medicine",name:"CAM",id:12},{slug:"ADAM-images",name:"A.D.A.M. Images",id:13},{slug:"Link/bodyguide",name:"Body Guide",id:14},{slug:"Link/health-navigator",name:"Symptom Navigator",id:15},{slug:"Link/wellness-tools",name:"The Wellness Tools",id:16},{slug:"Link/aod",name:"A.D.A.M. OnDemand",id:1017}],LicenseInfo:null,LicenseSubscriptions:null,IsSubscriptionExpired:!1,SubscriptionExpirationDate:null,TermsAndConditionsTitle:null,TermsAndConditionsText:null})),this.loggedInUser=JSON.parse(localStorage.getItem("loggedInUserDetails")),this.UserId=this.loggedInUser.Id,this.UserType=this.loggedInUser.UserTypeId}return t}(),m=this&&this.__decorate||function(t,e,r,n){var s,i=arguments.length,o=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},f=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},h=function(){function t(t,e){this.http=t,this.commonService=e}return t.prototype.GetUserById=function(){var t=this;return this.http.get(this.commonService.resourceBaseUrl+"User/GetUserProfile/"+this.commonService.UserId).map(this.extractData).catch(function(e){return t.handleError(e)})},t.prototype.UpdateUserProfileById=function(t){var e=this;return this.http.post(this.commonService.resourceBaseUrl+"User/UpdateProfile",t).map(this.extractData).catch(function(t){return e.handleError(t)})},t.prototype.ChangeUserPassword=function(t){var e=this,r={id:t.userId,newPassword:t.newPassword};console.log(t);var n=new d.a({"Content-Type":"application/json"});return this.http.post(this.commonService.resourceBaseUrl+"User/ChangeUserPassword",JSON.stringify(r),{headers:n}).map(this.extractData).catch(function(t){return e.handleError(t)})},t.prototype.UpdateUserId=function(t){var e=this;return this.http.post(this.commonService.resourceBaseUrl+"User/UpdateUserId",t).map(this.extractData).catch(function(t){return e.handleError(t)})},t.prototype.GetUserType=function(){var t=this;return this.http.get(this.commonService.resourceBaseUrl+"User/GetUserType/"+this.commonService.UserType).map(this.extractData).catch(function(e){return t.handleError(e)})},t.prototype.GetAccountType=function(){var t=this;return this.http.get(this.commonService.resourceBaseUrl+"User/GetAccountType/"+this.commonService.AccountType).map(this.extractData).catch(function(e){return t.handleError(e)})},t.prototype.GetUserList=function(t){var e=this;return this.http.get(this.commonService.resourceBaseUrl+"User/Users?firstname="+t.FirstName+"&lastname="+t.LastName+"&emailid="+t.EmailId+"&accountnumber="+t.AccountNumber+"&usertypeid="+t.UserTypeId+"&accounttypeid="+t.AccountTypeId).map(this.extractData).catch(function(t){return e.handleError(t)})},t.prototype.UpdateUserEntity=function(t){var e=this,r={id:t.id,FirstName:t.FirstName,LastName:t.LastName,EmailId:t.EmailId,UserName:t.UserName,Password:t.Password,Modifiedby:this.commonService.UserId,IsActive:t.isActive};console.log(t);var n=new d.a({"Content-Type":"application/json"});return this.http.post(this.commonService.resourceBaseUrl+"User/UpdateUser",JSON.stringify(r),{headers:n}).map(this.extractData).catch(function(t){return e.handleError(t)})},t.prototype.GetUserTypeByLicenseType=function(t){var e=this;return this.http.get(this.commonService.resourceBaseUrl+"User/GetUserTypebyLicenseId?UserTypeId="+this.commonService.UserType+"&LicenseId="+t.AccountNumberId).map(this.extractData).catch(function(t){return e.handleError(t)})},t.prototype.GetAccountNumber=function(){var t=this;return this.http.get(this.commonService.resourceBaseUrl+"User/GetAccountNumber").map(this.extractData).catch(function(e){return t.handleError(e)})},t.prototype.GetProductEdition=function(t){var e=this;return this.http.get(this.commonService.resourceBaseUrl+"User/GetProductEdition?LicenseId="+t.AccountNumberId).map(this.extractData).catch(function(t){return e.handleError(t)})},t.prototype.InsertUser=function(t){var e=this,r={id:this.commonService.UserId,FirstName:t.FirstName,LastName:t.LastName,EmailId:t.EmailId,UserName:t.UserName,Password:t.Password,AccountNumberId:t.AccountNumberId,UserTypeId:t.UserTypeId,ProductEditionId:t.ProductEditionId};console.log(t);var n=new d.a({"Content-Type":"application/json"});return this.http.post(this.commonService.resourceBaseUrl+"User/NewUser",JSON.stringify(r),{headers:n}).map(this.extractData).catch(function(t){return e.handleError(t)})},t.prototype.GetBlockUserList=function(t){var e=this;return this.http.get(this.commonService.resourceBaseUrl+"User/BlockedUser?UserTypeId="+t.UserTypeId+"&LicenseId="+t.LicenseId).map(this.extractData).catch(function(t){return e.handleError(t)})},t.prototype.UpdateUnBlockedUser=function(t){var e=this,r=t;console.log(r);var n=new d.a({"Content-Type":"application/json"});return this.http.post(this.commonService.resourceBaseUrl+"User/UnblockedUser",r,{headers:n}).map(this.extractData).catch(function(t){return e.handleError(t)})},t.prototype.extractData=function(t){return t.json()},t.prototype.handleError=function(t){var e=t.message?t.message:t.status?""+t._body:"Server error";return console.error(e),u.Observable.throw(e)},t}();h=m([Object(n.Injectable)(),f("design:paramtypes",["function"==typeof(v=void 0!==d.b&&d.b)&&v||Object,"function"==typeof(b=void 0!==p&&p)&&b||Object])],h);var v,b,g=r("BkNc"),y=function(){function t(){}return t}(),x=function(){function t(){}return t}(),U=function(){function t(){}return t}(),w=this&&this.__decorate||function(t,e,r,n){var s,i=arguments.length,o=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},I=function(){function t(){}return t}();I=w([Object(n.Injectable)()],I);var C=(r("U6yM"),r("Wi6i"),this&&this.__decorate||function(t,e,r,n){var s,i=arguments.length,o=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o}),P=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},D=function(){function t(){}return t.prototype.ShowLoading=function(t){var e=document.getElementById(t),r=document.getElementById("loading-mask");null!=r&&void 0!=r&&($(r).show(),r.className="loading-mask"),void 0!=e&&null!=e&&($(e).show(),e.className="loading-app")},t.prototype.HideLoading=function(t){var e=document.getElementById(t),r=document.getElementById("loading-mask");null!=r&&void 0!=r&&($(r).fadeOut(1e3),setTimeout(function(){return r.className=""},1e3)),void 0!=e&&null!=e&&($(e).fadeOut(300),setTimeout(function(){return e.className=""},300))},t}();D=C([Object(n.Injectable)(),P("design:paramtypes",[])],D);var F=this&&this.__decorate||function(t,e,r,n){var s,i=arguments.length,o=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},S=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},N=function(){function t(t,e,r,n,s,i){this._loadingService=t,this.userservice=e,this.router=r,this.fb=n,this.http=s,this._confirmService=i,this.UserId=1,this.indLoading=!1,this.baseUrl="User",this.emailPattern="^[a-z0-9._%+-]+@[a-z0-9.-]+.[a-z]{2,4}$",this.validationMessages={firstName:{required:"First name is required."},lastName:{required:"Last name is required."},email:{required:"Email is required.",pattern:"Email pattern is not valid."}}}return t.prototype.ngOnInit=function(){this.user=new y,this.alerts="",this.userFrm=this.fb.group({id:[""],firstName:["",i.f.required],lastName:["",i.f.required],emailId:["",i.f.required]}),this._loadingService.ShowLoading("global-loading"),this.GetUserById()},t.prototype.redirect=function(){this.router.navigate(["/"])},t.prototype.GetUserById=function(){var t=this;this.userservice.GetUserById().subscribe(function(e){console.log(e),t.bindUsers(e)},function(e){return t.error=e}),this._loadingService.HideLoading("global-loading")},t.prototype.UpdateUserProfile=function(){var t=this;this.user=this.userFrm.value;var e=this.user;if(this.userFrm.valid)return this.userservice.UpdateUserProfileById(e).subscribe(function(e){return t.AfterInsertData(e)},function(e){return t.error=e})},t.prototype.AfterInsertData=function(t){if("False"==t.Status)return!1;this.status=!0,this._confirmService.activate("User Profile Updated Successfully.","alertMsg")},t.prototype.bindUsers=function(t){this.user=t[0],console.log(this.user),this.userFrm.controls.id.setValue(this.user.Id),this.userFrm.controls.firstName.setValue(this.user.FirstName),this.userFrm.controls.lastName.setValue(this.user.LastName),this.userFrm.controls.emailId.setValue(this.user.EmailId)},t}();N=F([Object(n.Component)({template:r("xbvx")}),S("design:paramtypes",["function"==typeof(E=void 0!==D&&D)&&E||Object,"function"==typeof(A=void 0!==h&&h)&&A||Object,"function"==typeof(R=void 0!==g.a&&g.a)&&R||Object,"function"==typeof(O=void 0!==i.a&&i.a)&&O||Object,"function"==typeof(T=void 0!==d.b&&d.b)&&T||Object,"function"==typeof(L=void 0!==I&&I)&&L||Object])],N);var E,A,R,O,T,L,j=this&&this.__decorate||function(t,e,r,n){var s,i=arguments.length,o=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},k=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},M=function(){function t(t,e,r,n,s){this._loadingService=t,this.changeUserPasswordService=e,this.router=r,this.fb=n,this._confirmService=s}return t.prototype.ngOnInit=function(){this.user=new y,this.alerts="",this.changeUserPasswordFrm=this.fb.group({userId:[""],loginId:["",i.f.required],oldPassword:["",i.f.required],newPassword:["",[i.f.required,i.f.minLength(8)]],confirmPassword:["",i.f.required]}),this._loadingService.ShowLoading("global-loading"),this.GetUserById(),this._loadingService.HideLoading("global-loading")},t.prototype.GetUserById=function(){var t=this;this.changeUserPasswordService.GetUserById().subscribe(function(e){t.BindFormFields(e)},function(e){return t.error=e})},t.prototype.redirect=function(){this.router.navigate(["/"])},t.prototype.onFormSubmit=function(){var t=this;if(this.alerts="",""==this.changeUserPasswordFrm.value.oldPassword&&(this.alerts="<span>Old password is required.</span>"),this.user.Password!=this.changeUserPasswordFrm.value.oldPassword&&""!=this.changeUserPasswordFrm.value.oldPassword&&(this.alerts+="</br><span>Old password is invalid.</span>"),""==this.changeUserPasswordFrm.value.newPassword&&(this.alerts+="</br><span>New password is required.</span>"),this.user.Password==this.changeUserPasswordFrm.value.newPassword&&(this.alerts+="</br><span>New password and old password must be different.</span>"),""==this.changeUserPasswordFrm.value.newPassword&&(this.alerts+="</br><span>Confirm password is required.</span>"),this.changeUserPasswordFrm.value.newPassword!=this.changeUserPasswordFrm.value.confirmPassword&&(this.alerts+="</br><span>New password and confirm password must be same.</span>"),""==this.alerts){var e=this.changeUserPasswordFrm.value;return this.changeUserPasswordService.ChangeUserPassword(e).subscribe(function(e){return t.AfterInsertData(e)},function(e){return t.error=e})}},t.prototype.AfterInsertData=function(t){"false"==t.Status?this.alerts="<span>Password change unsuccessfull</span>":this._confirmService.activate("Password changed successfully.","alertMsg")},t.prototype.BindFormFields=function(t){this.user=t[0],this.changeUserPasswordFrm.controls.userId.setValue(this.user.Id),this.changeUserPasswordFrm.controls.loginId.setValue(this.user.LoginId)},t.prototype.ResetFormFields=function(){this.changeUserPasswordFrm.reset(),this.changeUserPasswordFrm.controls.loginId.setValue(this.user.LoginId),this.changeUserPasswordFrm.controls.oldPassword.setValue(""),this.changeUserPasswordFrm.controls.newPassword.setValue(""),this.changeUserPasswordFrm.controls.confirmPassword.setValue(""),this.alerts=""},t}();M=j([Object(n.Component)({template:r("7QTD")}),k("design:paramtypes",["function"==typeof(_=void 0!==D&&D)&&_||Object,"function"==typeof(B=void 0!==h&&h)&&B||Object,"function"==typeof(q=void 0!==g.a&&g.a)&&q||Object,"function"==typeof(V=void 0!==i.a&&i.a)&&V||Object,"function"==typeof(G=void 0!==I&&I)&&G||Object])],M);var _,B,q,V,G,z=this&&this.__decorate||function(t,e,r,n){var s,i=arguments.length,o=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},H=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Z=function(){function t(t,e,r,n,s,i){this._loadingService=t,this.userservice=e,this.router=r,this.fb=n,this.http=s,this._confirmService=i,this.UserId=1,this.baseUrl="User"}return t.prototype.ngOnInit=function(){this.user=new y,this.alerts="",this.ChangeUserIdFrm=this.fb.group({id:[""],loginid:["",i.f.required],newloginid:["",[i.f.required,i.f.minLength(8)]],confirmloginid:["",i.f.required]}),this._loadingService.ShowLoading("global-loading"),this.GetUserById(),this._loadingService.HideLoading("global-loading")},t.prototype.redirect=function(){this.router.navigate(["/"])},t.prototype.GetUserById=function(){var t=this;this.userservice.GetUserById().subscribe(function(e){console.log(e),t.bindUsers(e)},function(e){return t.error=e})},t.prototype.UpdateUserId=function(){var t=this;if(this.alerts="",this.user.LoginId==this.ChangeUserIdFrm.value.newloginid&&(this.alerts+="</br><span>New userid and old userid must be different</span>"),this.ChangeUserIdFrm.value.newloginid!=this.ChangeUserIdFrm.value.confirmloginid&&(this.alerts+="</br><span>New userid and confirm userid must be same</span>"),""==this.alerts){this.user=this.ChangeUserIdFrm.value,console.log(this.user);var e=this.user;if(this.ChangeUserIdFrm.valid)return this.userservice.UpdateUserId(e).subscribe(function(e){return t.AfterInsertData(e)},function(e){return t.error=e})}},t.prototype.AfterInsertData=function(t){if("success"!=t)return this.alerts+="<span>"+t+"</span>",!1;this._confirmService.activate("Userid Updated Successfully.","alertMsg")},t.prototype.bindUsers=function(t){this.user=t[0],console.log(this.user),this.ChangeUserIdFrm.controls.id.setValue(this.user.Id),this.ChangeUserIdFrm.controls.loginid.setValue(this.user.LoginId),this.ChangeUserIdFrm.controls.newloginid.setValue(this.user.NewLoginId),this.ChangeUserIdFrm.controls.confirmloginid.setValue("")},t.prototype.ResetFormFields=function(){this.ChangeUserIdFrm.reset(),this.ChangeUserIdFrm.controls.id.setValue(this.user.Id),this.ChangeUserIdFrm.controls.loginid.setValue(this.user.LoginId),this.ChangeUserIdFrm.controls.newloginid.setValue(""),this.ChangeUserIdFrm.controls.confirmloginid.setValue(""),this.alerts=""},t}();Z=z([Object(n.Component)({template:r("1Nhn")}),H("design:paramtypes",["function"==typeof(J=void 0!==D&&D)&&J||Object,"function"==typeof(W=void 0!==h&&h)&&W||Object,"function"==typeof(Y=void 0!==g.a&&g.a)&&Y||Object,"function"==typeof(Q=void 0!==i.a&&i.a)&&Q||Object,"function"==typeof(K=void 0!==d.b&&d.b)&&K||Object,"function"==typeof(X=void 0!==I&&I)&&X||Object])],Z);var J,W,Y,Q,K,X,tt=this&&this.__decorate||function(t,e,r,n){var s,i=arguments.length,o=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},et=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},rt=function(){function t(t,e,r,n,s,i){this._loadingService=t,this.userservice=e,this.router=r,this.fb=n,this.http=s,this._confirmService=i,this.Mode="Manage",this.emailPattern="^[a-z0-9._%+-]+@[a-z0-9.-]+.[a-z]{2,4}$",this.topPos="2000px",this.datePipe=new l.DatePipe("en-US"),this.selectedRow=0,this.selectedId=0}return t.prototype.ngOnInit=function(){this.alerts="",this.Users=this.fb.group({FirstName:[""],LastName:[""],EmailId:[""],AccountNumber:[""],UserTypeId:[""],AccountTypeId:[""]}),this.adduserFrm=this.fb.group({id:[""],UserName:["",i.f.required],Password:["",[i.f.required,i.f.minLength(8)]],ConfirmPassword:["",i.f.required],FirstName:["",i.f.required],LastName:["",i.f.required],EmailId:["",i.f.required],AccountNumber:[""],UserType:[""],AccountType:[""],Createddate:[""],LastModifiedDate:[""],Createdby:[""],Modifiedby:[""],DeactivationDate:[""],isActive:[!1],UserStatusActive:[""],UserStatusInActive:[""]}),this._loadingService.ShowLoading("global-loading"),this.GetUserType(),this.GetAccountType(),this._loadingService.HideLoading("global-loading"),$("#fixed_hdr2").fxdHdrCol({fixedCols:0,width:"100%",height:300,colModal:[{width:180,align:"center"},{width:230,align:"center"},{width:150,align:"Center"},{width:150,align:"Center"},{width:350,align:"Center"},{width:500,align:"Center"},{width:130,align:"Center"},{width:120,align:"center"},{width:280,align:"Center"},{width:180,align:"center"},{width:200,align:"center"},{width:170,align:"center"},{width:80,align:"center"},{width:150,align:"center"},{width:150,align:"center"},{width:180,align:"Center"},{width:400,align:"Center"},{width:150,align:"center"},{width:110,align:"center"}],sort:!0}),document.getElementById("fixed_table_rc").remove();var t=document.createElement("script");t.setAttribute("id","fixed_table_rc"),t.setAttribute("src","../assets/scripts/fixed_table_rc.js"),t.setAttribute("type","text/javascript"),document.body.appendChild(t),this._loadingService.ShowLoading("global-loading"),this._loadingService.HideLoading("global-loading")},t.prototype.handleChange=function(t){var e=t.target;"true"==e.value?this.isActive=!0:"false"==e.value&&(this.isActive=!1)},t.prototype.SetClickedRow=function(t,e){this.selectedRow=t,this.selectedId=e.Id,this.UserEntity=e},t.prototype.redirect=function(){this.router.navigate(["/"])},t.prototype.GetUserType=function(){var t=this;this.userservice.GetUserType().subscribe(function(e){t.UserTypeList=e},function(e){return t.error=e})},t.prototype.GetAccountType=function(){var t=this;this.userservice.GetAccountType().subscribe(function(e){t.AccountTypeList=e},function(e){return t.error=e})},t.prototype.GetUserList=function(){},t.prototype.SearchUserList=function(){var t=this;this._loadingService.ShowLoading("global-loading");this.Users.value;this.userservice.GetUserList({FirstName:this.Users.controls.FirstName.value,LastName:this.Users.controls.LastName.value,EmailId:this.Users.controls.EmailId.value,AccountNumber:this.Users.controls.AccountNumber.value,UserTypeId:null!=this.Users.controls.UserTypeId.value&&""!=this.Users.controls.UserTypeId.value?this.Users.controls.UserTypeId.value:0,AccountTypeId:null!=this.Users.controls.AccountTypeId.value&&""!=this.Users.controls.AccountTypeId.value?this.Users.controls.AccountTypeId.value:0}).subscribe(function(e){t.UserList=e},function(e){return t.error=e}),this._loadingService.HideLoading("global-loading")},t.prototype.EditUser=function(){this.Mode="Edit",this.topPos="100px",this.divClass="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3",this.alerts="",this.adduserFrm.controls.id.setValue(this.UserEntity.Id),this.adduserFrm.controls.FirstName.setValue(this.UserEntity.FirstName),this.adduserFrm.controls.LastName.setValue(this.UserEntity.LastName),this.adduserFrm.controls.EmailId.setValue(this.UserEntity.EmailId),this.adduserFrm.controls.UserName.setValue(this.UserEntity.LoginId),this.adduserFrm.controls.Password.setValue(this.UserEntity.Password),this.adduserFrm.controls.ConfirmPassword.setValue(this.UserEntity.Password),this.adduserFrm.controls.AccountNumber.setValue(this.UserEntity.AccountNumber),this.adduserFrm.controls.UserType.setValue(this.UserEntity.UserTypeTitle),this.adduserFrm.controls.AccountType.setValue(this.UserEntity.AccountTypeTitle),this.adduserFrm.controls.Createddate.setValue(this.datePipe.transform(this.UserEntity.CreationDate,"MM/dd/yyyy")),this.adduserFrm.controls.LastModifiedDate.setValue(this.datePipe.transform(this.UserEntity.ModifiedDate,"MM/dd/yyyy")),this.adduserFrm.controls.Createdby.setValue(this.UserEntity.Createdby),this.adduserFrm.controls.Modifiedby.setValue(this.UserEntity.Modifiedby),this.adduserFrm.controls.DeactivationDate.setValue(this.datePipe.transform(this.UserEntity.DeactivationDate,"MM/dd/yyyy")),this.adduserFrm.controls.UserStatusActive.setValue(!0),this.adduserFrm.controls.UserStatusInActive.setValue(!1),this.isActive="Active"==this.UserEntity.UserStatus},t.prototype.UpdateUser=function(){var t=this;if(this.alerts="",""==this.adduserFrm.value.UserName&&(this.alerts+="<span>User Name is required.</span>"),""==this.adduserFrm.value.Password&&(this.alerts+="</br><span>Password of minimum 8 characters is required.</span>"),""==this.adduserFrm.value.ConfirmPassword&&(this.alerts+="</br><span>Confirm Password is required.</span>"),""==this.adduserFrm.value.EmailId&&(this.alerts+="</br><span>Email Id is required.</span>"),""==this.adduserFrm.value.FirstName&&(this.alerts+="</br><span>First Name is required.</span>"),""==this.adduserFrm.value.LastName&&(this.alerts+="</br><span>Last Name is required.</span>"),this.adduserFrm.value.newPassword!=this.adduserFrm.value.confirmPassword&&(this.alerts+="</br><span>Password and confirm password must be same</span>"),this.adduserFrm.valid&&""==this.alerts){this.adduserFrm.controls.isActive.setValue(this.isActive);var e=this.adduserFrm.value;return this.userservice.UpdateUserEntity(e).subscribe(function(e){return t.AfterInsertData(e)},function(e){t.error=e,t.alerts="<span>"+t.error+"</span>"})}},t.prototype.AfterInsertData=function(t){"User updated successfully"==t&&(this.alerts="",this._confirmService.activate("User updated successfully.","alertMsg"))},t.prototype.ResetFormFields=function(){this.alerts=""},t}();rt=tt([Object(n.Component)({template:r("lPoh")}),et("design:paramtypes",["function"==typeof(nt=void 0!==D&&D)&&nt||Object,"function"==typeof(st=void 0!==h&&h)&&st||Object,"function"==typeof(it=void 0!==g.a&&g.a)&&it||Object,"function"==typeof(ot=void 0!==i.a&&i.a)&&ot||Object,"function"==typeof(at=void 0!==d.b&&d.b)&&at||Object,"function"==typeof(lt=void 0!==I&&I)&<||Object])],rt);var nt,st,it,ot,at,lt,dt=this&&this.__decorate||function(t,e,r,n){var s,i=arguments.length,o=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},ct=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},ut=function(){function t(t,e,r,n,s,i,o){this._loadingService=t,this.userservice=e,this.router=r,this.fb=n,this.http=s,this._confirmService=i,this.commonService=o,this.baseUrl="User",this.emailPattern="^[a-z0-9._%+-]+@[a-z0-9.-]+.[a-z]{2,4}$"}return t.prototype.ngOnInit=function(){this.user=new y,this.alerts="",this.adduserFrm=this.fb.group({id:[""],UserName:["",i.f.required],Password:["",[i.f.required,i.f.minLength(8)]],ConfirmPassword:["",i.f.required],FirstName:["",i.f.required],LastName:["",i.f.required],EmailId:["",i.f.required],AccountNumberId:["",i.f.required],UserTypeId:["",i.f.required],ProductEditionId:["",i.f.required]}),this._loadingService.ShowLoading("global-loading"),this.bindUsers(),this.GetAccountNumber(),this.GetUserTypeByLicenseId(),this._loadingService.HideLoading("global-loading")},t.prototype.redirect=function(){this.router.navigate(["/"])},t.prototype.GetUserTypeByLicenseId=function(){var t=this,e=this.adduserFrm.controls.AccountNumberId.value;""==e&&(e=0),this.userservice.GetUserTypeByLicenseType({AccountNumberId:e}).subscribe(function(e){t.UserTypeList=e},function(e){return t.error=e})},t.prototype.GetAccountNumber=function(){var t=this;this.userservice.GetAccountNumber().subscribe(function(e){console.log(e),t.AccountNumberList=e},function(e){return t.error=e})},t.prototype.GetProductEdition=function(){var t=this;this.userservice.GetProductEdition({AccountNumberId:this.adduserFrm.controls.AccountNumberId.value}).subscribe(function(e){console.log(e),t.ProductEditionList=e},function(e){return t.error=e})},t.prototype.BindUserTypeAndProductEdition=function(t){this.GetUserTypeByLicenseId(),this.GetProductEdition()},t.prototype.AddUser=function(){var t=this;if(this.alerts="",""==this.adduserFrm.value.UserName&&(this.alerts+="<span>User Name is required.</span>"),""==this.adduserFrm.value.Password&&(this.alerts+="</br><span>Password of minimum 8 characters is required.</span>"),""==this.adduserFrm.value.ConfirmPassword&&(this.alerts+="</br><span>Confirm Password is required.</span>"),""==this.adduserFrm.value.EmailId&&(this.alerts+="</br><span>Email Id is required.</span>"),""==this.adduserFrm.value.FirstName&&(this.alerts+="</br><span>First Name is required.</span>"),""==this.adduserFrm.value.LastName&&(this.alerts+="</br><span>Last Name is required.</span>"),this.adduserFrm.value.newPassword!=this.adduserFrm.value.confirmPassword&&(this.alerts+="</br><span>Password and confirm password must be same</span>"),"0"==this.adduserFrm.value.AccountNumberId&&(this.alerts+="</br><span>Please select account number</span>"),"0"==this.adduserFrm.value.UserTypeId&&(this.alerts+="</br><span>Please select user type</span>"),"0"==this.adduserFrm.value.ProductEditionId&&(this.alerts+="</br><span>Please select product edition</span>"),this.adduserFrm.valid&&""==this.alerts){var e=this.adduserFrm.value;return this.userservice.InsertUser(e).subscribe(function(e){return t.AfterInsertData(e)},function(e){t.error=e,t.alerts="<span>"+t.error+"</span>"})}},t.prototype.AfterInsertData=function(t){"User added successfully"==t&&(this.alerts="",this._confirmService.activate("User added successfully.","alertMsg"))},t.prototype.ResetForm=function(){this._buildForm()},t.prototype._buildForm=function(){this.adduserFrm=this.fb.group({id:[""],UserName:[""],Password:[""],ConfirmPassword:[""],FirstName:[""],LastName:[""],EmailId:[""],AccountNumberId:["0"],UserTypeId:["0"],ProductEditionId:["0"]})},t.prototype.bindUsers=function(){this.adduserFrm.controls.id.setValue(0),this.adduserFrm.controls.FirstName.setValue(""),this.adduserFrm.controls.LastName.setValue(""),this.adduserFrm.controls.EmailId.setValue(""),this.adduserFrm.controls.UserName.setValue(""),this.adduserFrm.controls.Password.setValue(""),this.adduserFrm.controls.ConfirmPassword.setValue(""),this.adduserFrm.controls.AccountNumberId.setValue(0),this.adduserFrm.controls.UserTypeId.setValue(0),this.adduserFrm.controls.ProductEditionId.setValue(0)},t}();ut=dt([Object(n.Component)({template:r("LWbE")}),ct("design:paramtypes",["function"==typeof(pt=void 0!==D&&D)&&pt||Object,"function"==typeof(mt=void 0!==h&&h)&&mt||Object,"function"==typeof(ft=void 0!==g.a&&g.a)&&ft||Object,"function"==typeof(ht=void 0!==i.a&&i.a)&&ht||Object,"function"==typeof(vt=void 0!==d.b&&d.b)&&vt||Object,"function"==typeof(bt=void 0!==I&&I)&&bt||Object,"function"==typeof(gt=void 0!==p&&p)&>||Object])],ut);var pt,mt,ft,ht,vt,bt,gt,yt=r("WYiA"),xt=this&&this.__decorate||function(t,e,r,n){var s,i=arguments.length,o=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Ut=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},wt=function(){function t(t,e,r,n,s,i,o,a){this._loadingService=t,this.userservice=e,this.router=r,this.fb=n,this.http=s,this._confirmService=i,this.modalService=o,this.commonService=a,this.display="none"}return t.prototype.ngOnInit=function(){this.alerts="",this.UnBlockedUserFrm=this.fb.group({}),this._loadingService.ShowLoading("global-loading"),this.GetBlockUserList(),this._loadingService.HideLoading("global-loading")},t.prototype.redirect=function(){this.router.navigate(["/"])},t.prototype.onChange=function(t,e,r){this.checkedRecords[t]=r?e:0},t.prototype.openModal=function(t){this.display="block",0!=this.checkedRecords.filter(function(t){return t>0}).length&&(this.modalRef=this.modalService.show(t))},t.prototype.UpdateUnBlockedUsers=function(t){var e=this;if(this.modalRef.hide(),console.log(this.checkedRecords),this.alerts="",""==this.alerts){var r=this.checkedRecords.filter(function(t){return t>0});return this.userservice.UpdateUnBlockedUser(r).subscribe(function(r){return e.AfterDeleteData(r,t)},function(t){e.error=t,e.alerts="<span>"+e.error+"</span>"})}},t.prototype.AfterDeleteData=function(t,e){"false"==t.Status?this._confirmService.activate("We have encountered a technical error and same has been notified to our technical team.","alertMsg"):this.GetBlockUserList()},t.prototype.GetBlockUserList=function(){var t=this;this.UnBlockedUserFrm.value;this.userservice.GetBlockUserList({UserTypeId:this.commonService.UserType,LicenseId:0}).subscribe(function(e){t.UserList=e,t.checkedRecords=new Array(t.UserList.length)},function(e){return t.error=e})},t.prototype.AfterInsertData=function(t){if("success"!=t)return this.alerts+="<span>"+t+"</span>",!1;this._confirmService.activate("Userid Updated Successfully.","alertMsg")},t.prototype.ResetFormFields=function(){this.alerts=""},t}();wt=xt([Object(n.Component)({template:r("o9F3")}),Ut("design:paramtypes",["function"==typeof(It=void 0!==D&&D)&&It||Object,"function"==typeof(Ct=void 0!==h&&h)&&Ct||Object,"function"==typeof(Pt=void 0!==g.a&&g.a)&&Pt||Object,"function"==typeof(Dt=void 0!==i.a&&i.a)&&Dt||Object,"function"==typeof(Ft=void 0!==d.b&&d.b)&&Ft||Object,"function"==typeof(St=void 0!==I&&I)&&St||Object,"function"==typeof(Nt=void 0!==yt.a&&yt.a)&&Nt||Object,"function"==typeof(Et=void 0!==p&&p)&&Et||Object])],wt);var It,Ct,Pt,Dt,Ft,St,Nt,Et,At=this&&this.__decorate||function(t,e,r,n){var s,i=arguments.length,o=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Rt=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Ot=function(){function t(t,e){this.http=t,this.commonService=e}return t.prototype.GetDiscountCodes=function(t){var e=this;return""==t.startDate&&(t.startDate="1/1/1"),""==t.endDate&&(t.endDate="1/1/9999"),this.http.get(this.commonService.resourceBaseUrl+"DiscountCode/GetDiscountCodes?discountCode="+t.discountCode+"&startDate="+t.startDate+"&endDate="+t.endDate).map(this.extractData).catch(function(t){return e.handleError(t)})},t.prototype.InsertDiscountCode=function(t){var e=this,r={id:t.discountId,discountCode:t.discountCode,startDate:t.startDate,endDate:t.endDate,percentage:t.percentage,isActive:t.isActive};console.log(t);var n=new d.a({"Content-Type":"application/json"});return this.http.post(this.commonService.resourceBaseUrl+"DiscountCode/InsertDiscountCode",JSON.stringify(r),{headers:n}).map(this.extractData).catch(function(t){return e.handleError(t)})},t.prototype.UpdateDiscountCode=function(t){var e=this,r={id:t.discountId,discountCode:t.discountCode,startDate:t.startDate,endDate:t.endDate,percentage:t.percentage,isActive:t.isActive};console.log(t);var n=new d.a({"Content-Type":"application/json"});return this.http.post(this.commonService.resourceBaseUrl+"DiscountCode/UpdateDiscountCode",JSON.stringify(r),{headers:n}).map(this.extractData).catch(function(t){return e.handleError(t)})},t.prototype.extractData=function(t){return t.json()},t.prototype.handleError=function(t){var e=t.message?t.message:t.status?t.status+" - "+t.statusText:"Server error";return console.error(e),u.Observable.throw(e)},t}();Ot=At([Object(n.Injectable)(),Rt("design:paramtypes",["function"==typeof(Tt=void 0!==d.b&&d.b)&&Tt||Object,"function"==typeof(Lt=void 0!==p&&p)&&Lt||Object])],Ot);var Tt,Lt,jt=this&&this.__decorate||function(t,e,r,n){var s,i=arguments.length,o=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},kt=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Mt=function(){function t(t,e,r,n){this.manageDiscountCodeService=t,this.router=e,this.fb=r,this.modalService=n,this.Mode="Manage",this.divClass="",this.topPos="2000px",this.selectedRow=0,this.datePipe=new l.DatePipe("en-US"),this.bsValue1=new Date,this.bsValue2=new Date,this.bsValue3=new Date,this.bsValue4=new Date,this.selectedId=0}return t.prototype.ngOnInit=function(){this.divClass="col-sm-12",this.discountCode=new x,this.alerts="",this.manageDiscountCodeFrm=this.fb.group({searchDiscountCode:[""],searchStartDate:[""],searchEndDate:[""],discountCodes:this.fb.array([])}),this.insertUpdateDiscountCodeFrm=this.fb.group({discountId:[""],discountCode:[""],startDate:["",i.f.required],endDate:["",i.f.required],percentage:["",[i.f.required,i.f.pattern("[0-9.]*")]],isActive:[!0]}),this.SearchDiscountCodes()},t.prototype.SetClickedRow=function(t,e){this.selectedRow=t,this.selectedId=e.Id,this.discountCode=e},t.prototype.SearchDiscountCodes=function(){var t=this;this.manageDiscountCodeService.GetDiscountCodes({discountCode:this.manageDiscountCodeFrm.controls.searchDiscountCode.value,startDate:this.manageDiscountCodeFrm.controls.searchStartDate.value,endDate:this.manageDiscountCodeFrm.controls.searchEndDate.value}).subscribe(function(e){t.BindFormFields(e)},function(e){return t.error=e})},t.prototype.openModal=function(t){this.modalRef=this.modalService.show(t)},t.prototype.InsertUpdateDiscountCode=function(t){var e=this;if(console.log("InsertUpdateDiscountCode"),this.alerts="",parseInt(this.insertUpdateDiscountCodeFrm.value.percentage)>100&&(this.alerts="<span>Percentage must be between 0 to 100</span>"),""==this.alerts){var r=this.insertUpdateDiscountCodeFrm.value;return 0==r.discountId?this.manageDiscountCodeService.InsertDiscountCode(r).subscribe(function(r){return e.AfterInsertData(r,t)},function(t){return e.error=t}):this.manageDiscountCodeService.UpdateDiscountCode(r).subscribe(function(r){return e.AfterUpdateData(r,t)},function(t){return e.error=t})}},t.prototype.AfterInsertData=function(t,e){"false"==t.Status?this.alerts="<span>Discount code save unsuccessfull</span>":(this.modalAlerts="<p>Discount code saved successfully</p>",this.modalRef=this.modalService.show(e))},t.prototype.AfterUpdateData=function(t,e){"false"==t.Status?this.alerts="<span>Discount code update unsuccessfull</span>":(this.modalAlerts="<p>Discount code updated successfully</p>",this.modalRef=this.modalService.show(e))},t.prototype.BindFormFields=function(t){this.selectedRow=0,this.discountCodes=t,this.discountCode=this.discountCodes[0],this.manageDiscountCodeFrm.setControl("discountCodes",this.fb.array(this.discountCodes))},t.prototype.AddDiscountCode=function(){this.Mode="Add",this.topPos="100px",this.divClass="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3",this.insertUpdateDiscountCodeFrm.reset(),this.alerts="",this.insertUpdateDiscountCodeFrm.controls.discountId.setValue(0),this.insertUpdateDiscountCodeFrm.controls.discountCode.setValue(""),this.insertUpdateDiscountCodeFrm.controls.startDate.setValue(""),this.insertUpdateDiscountCodeFrm.controls.endDate.setValue(""),this.insertUpdateDiscountCodeFrm.controls.percentage.setValue(""),this.insertUpdateDiscountCodeFrm.controls.isActive.setValue(!0)},t.prototype.EditDiscountCode=function(){this.Mode="Edit",this.topPos="100px",this.divClass="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3",this.alerts="",this.insertUpdateDiscountCodeFrm.controls.discountId.setValue(this.discountCode.Id),this.insertUpdateDiscountCodeFrm.controls.discountCode.setValue(this.discountCode.DiscountCode),this.insertUpdateDiscountCodeFrm.controls.startDate.setValue(this.datePipe.transform(this.discountCode.StartDate,"MM/dd/yyyy")),this.insertUpdateDiscountCodeFrm.controls.endDate.setValue(this.datePipe.transform(this.discountCode.EndDate,"MM/dd/yyyy")),this.insertUpdateDiscountCodeFrm.controls.percentage.setValue(this.discountCode.Percentage),this.insertUpdateDiscountCodeFrm.controls.isActive.setValue(this.discountCode.IsActive)},t.prototype.CancelAddEdit=function(){var t=this;this.Mode="Manage",this.topPos="2000px",this.divClass="col-sm-12",this.SearchDiscountCodes(),this.selectedRow=this.discountCodes.findIndex(function(e){return e.Id==t.selectedId}),this.SetClickedRow(this.selectedRow,this.manageDiscountCodeFrm.controls.discountCodes.value.find(function(e){return e.Id==t.selectedId}))},t}();Mt=jt([Object(n.Component)({template:r("2Azi")}),kt("design:paramtypes",["function"==typeof(_t=void 0!==Ot&&Ot)&&_t||Object,"function"==typeof(Bt=void 0!==g.a&&g.a)&&Bt||Object,"function"==typeof(qt=void 0!==i.a&&i.a)&&qt||Object,"function"==typeof(Vt=void 0!==yt.a&&yt.a)&&Vt||Object])],Mt);var _t,Bt,qt,Vt,Gt=this&&this.__decorate||function(t,e,r,n){var s,i=arguments.length,o=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},zt=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Ht=function(){function t(t,e){this.http=t,this.commonService=e}return t.prototype.GetSubscriptionPrices=function(t){var e=this;return this.http.get(this.commonService.resourceBaseUrl+"SubscriptionPrice/GetSubscriptionPrices?editionId="+t.editionId).map(this.extractData).catch(function(t){return e.handleError(t)})},t.prototype.InsertSubscriptionPrice=function(t){var e=this,r={id:t.subscriptionPriceId,title:t.title,price:t.price,duration:t.duration,editionId:t.editionId,isActive:t.isActive};console.log(t);var n=new d.a({"Content-Type":"application/json"});return this.http.post(this.commonService.resourceBaseUrl+"SubscriptionPrice/InsertSubscriptionPrice",JSON.stringify(r),{headers:n}).map(this.extractData).catch(function(t){return e.handleError(t)})},t.prototype.UpdateSubscriptionPrices=function(t){var e=this,r={obj:t};console.log(t);var n=new d.a({"Content-Type":"application/json"});return this.http.post(this.commonService.resourceBaseUrl+"SubscriptionPrice/UpdateSubscriptionPrices",JSON.stringify(r),{headers:n}).map(this.extractData).catch(function(t){return e.handleError(t)})},t.prototype.DeleteSubscriptionPrices=function(t){var e=this,r=t;console.log(r);var n=new d.a({"Content-Type":"application/json"});return this.http.post(this.commonService.resourceBaseUrl+"SubscriptionPrice/DeleteSubscriptionPrices",r,{headers:n}).map(this.extractData).catch(function(t){return e.handleError(t)})},t.prototype.extractData=function(t){return t.json()},t.prototype.handleError=function(t){var e=t.message?t.message:t.status?t.status+" - "+t.statusText:"Server error";return console.error(e),u.Observable.throw(e)},t}();Ht=Gt([Object(n.Injectable)(),zt("design:paramtypes",["function"==typeof($t=void 0!==d.b&&d.b)&&$t||Object,"function"==typeof(Zt=void 0!==p&&p)&&Zt||Object])],Ht);var $t,Zt,Jt=this&&this.__decorate||function(t,e,r,n){var s,i=arguments.length,o=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Wt=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Yt=function(){function t(t,e,r,n){this.subscriptionPriceService=t,this.router=e,this.fb=r,this.modalService=n,this.Mode="Search",this.topPos="2000px",this.datePipe=new l.DatePipe("en-US"),this.selectedEditionId=1,this.divClass=""}return t.prototype.ngOnInit=function(){this.divClass="col-sm-12",this.subscriptionPrice=new U,this.alerts="",this.subscriptionPriceFrm=this.fb.group({subscriptionPrices:this.fb.array([])}),this.insertSubscriptionPriceFrm=this.fb.group({subscriptionPriceId:[""],title:["",i.f.required],price:["",[i.f.required,i.f.pattern("[0-9.]*")]],duration:["",[i.f.required,i.f.pattern("[0-9]*")]],editionId:[""],isActive:[!1]}),this.SearchSubscriptionPrices(this.selectedEditionId)},t.prototype.SearchSubscriptionPrices=function(t){var e=this;this.selectedEditionId=t,this.subscriptionPriceService.GetSubscriptionPrices({editionId:this.selectedEditionId}).subscribe(function(t){e.BindFormFields(t)},function(t){return e.error=t})},t.prototype.openModal=function(t){0!=this.checkedRecords.filter(function(t){return t>0}).length&&(this.modalRef=this.modalService.show(t))},t.prototype.onChange=function(t,e,r){this.checkedRecords[t]=r?e:0},t.prototype.AfterDeleteData=function(t,e){"false"==t.Status?this.alerts="<span>Subscription prices delete unsuccessfull</span>":(this.modalAlerts="<p>Subscription prices deleted successfully</p>",this.modalRef=this.modalService.show(e),this.SearchSubscriptionPrices(this.selectedEditionId))},t.prototype.AfterInsertData=function(t,e){"false"==t.Status?this.alerts="<span>Subscription price save unsuccessfull</span>":(this.modalAlerts="<p>Subscription price saved successfully</p>",this.modalRef=this.modalService.show(e))},t.prototype.AfterUpdateData=function(t,e){"false"==t.Status?this.alerts="<span>Subscription prices update unsuccessfull</span>\n":(this.modalAlerts="<p>Subscription prices updated successfully</p>",this.modalRef=this.modalService.show(e))},t.prototype.BindFormFields=function(t){this.subscriptionPrices=t,this.checkedRecords=new Array(this.subscriptionPrices.length),this.subscriptionPriceFrm.setControl("subscriptionPrices",this.fb.array(this.subscriptionPrices))},t.prototype.UpdateSubscriptionPrices=function(t){var e=this;if(console.log(this.subscriptionPriceFrm.value),this.alerts="",""==this.alerts){var r=this.subscriptionPriceFrm.controls.subscriptionPrices.value;this.subscriptionPriceService.UpdateSubscriptionPrices(r).subscribe(function(r){return e.AfterUpdateData(r,t)},function(t){e.error=t,e.alerts="<span>"+e.error+"</span>"})}},t.prototype.InsertSubscriptionPrice=function(t){var e=this;if(console.log(this.insertSubscriptionPriceFrm.value),this.alerts="",""==this.alerts){var r=this.insertSubscriptionPriceFrm.value;return this.subscriptionPriceService.InsertSubscriptionPrice(r).subscribe(function(r){return e.AfterInsertData(r,t)},function(t){e.error=t,e.alerts="<span>"+e.error+"</span>"})}},t.prototype.DeleteSubscriptionPrices=function(t){var e=this;if(console.log(this.checkedRecords),this.alerts="",""==this.alerts){var r=this.checkedRecords.filter(function(t){return t>0});return this.subscriptionPriceService.DeleteSubscriptionPrices(r).subscribe(function(r){return e.AfterDeleteData(r,t)},function(t){e.error=t,e.alerts="<span>"+e.error+"</span>"})}},t.prototype.AddSubscriptionPrice=function(){this.Mode="Add",this.topPos="100px",this.divClass="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3",this.insertSubscriptionPriceFrm.reset(),this.alerts="",this.insertSubscriptionPriceFrm.controls.subscriptionPriceId.setValue(0),this.insertSubscriptionPriceFrm.controls.title.setValue(""),this.insertSubscriptionPriceFrm.controls.price.setValue(""),this.insertSubscriptionPriceFrm.controls.duration.setValue(""),this.insertSubscriptionPriceFrm.controls.editionId.setValue(this.selectedEditionId),this.insertSubscriptionPriceFrm.controls.isActive.setValue(!1)},t.prototype.CancelAdd=function(){this.Mode="Search",this.topPos="2000px",this.divClass="col-sm-12",this.insertSubscriptionPriceFrm.reset(),this.alerts="",this.SearchSubscriptionPrices(this.selectedEditionId)},t}();Yt=Jt([Object(n.Component)({template:r("wLgm")}),Wt("design:paramtypes",["function"==typeof(Qt=void 0!==Ht&&Ht)&&Qt||Object,"function"==typeof(Kt=void 0!==g.a&&g.a)&&Kt||Object,"function"==typeof(Xt=void 0!==i.a&&i.a)&&Xt||Object,"function"==typeof(te=void 0!==yt.a&&yt.a)&&te||Object])],Yt);var Qt,Kt,Xt,te,ee=this&&this.__decorate||function(t,e,r,n){var s,i=arguments.length,o=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},re=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},ne=function(){function t(t){this.userservice=t}return t.prototype.ngOnInit=function(){},t}();ne=ee([Object(n.Component)({selector:"app-component",template:r("efyd"),providers:[h,Ot,Ht]}),re("design:paramtypes",["function"==typeof(se=void 0!==h&&h)&&se||Object])],ne);var se,ie=this&&this.__decorate||function(t,e,r,n){var s,i=arguments.length,o=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},oe=[{path:"updateuserprofile",component:N},{path:"changeuserpassword",component:M},{path:"changeuserid",component:Z},{path:"users",component:rt},{path:"managediscountcode",component:Mt},{path:"subscriptionprice",component:Yt},{path:"adduser",component:ut},{path:"unblockuser",component:wt}],ae=function(){function t(){}return t}();ae=ie([Object(n.NgModule)({imports:[g.b.forRoot(oe,{enableTracing:!0})],exports:[g.b]})],ae);var le=this&&this.__decorate||function(t,e,r,n){var s,i=arguments.length,o=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},de=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},ce=function(){function t(t){this._defaults={type:"reset",message:"Do you want to cancel your changes?",cancelText:"Cancel",okText:"OK"},this.alertshow=!1,t.activate=this.activate.bind(this)}return t.prototype._setLabels=function(t,e){void 0===t&&(t=this._defaults.message),void 0===e&&(e=this._defaults.type),this.type=e,this.message=t,this.okText=this._defaults.okText,this.cancelText=this._defaults.cancelText},t.prototype.activate=function(t,e){var r=this;return void 0===t&&(t=this._defaults.message),void 0===e&&(e=this._defaults.type),this._setLabels(t,e),new Promise(function(t){r._show(t)})},t.prototype._show=function(t){var e=this;document.onkeyup=null;var r=function(e){return t(1)},n=function(e){return t(2)},s=function(e){return t(3)},i=function(e){return t(1)},o=function(e){return t(2)},a=function(e){return t(6)},l=function(e){return t(7)},d=function(e){return t(5)},c=function(e){return t(8)};if(this._cancelButton&&this._okButton)return this._cancelButton.onclick=function(t){t.preventDefault(),s()||e._hideDialog()},this._okButton.onclick=function(t){t.preventDefault(),r()||e._hideDialog()},this._noButton.onclick=function(t){t.preventDefault(),n()||e._hideDialog()},this._noResetButton.onclick=function(t){t.preventDefault(),o()||e._hideDialog()},this._yesResetButton.onclick=function(t){t.preventDefault(),i()||e._hideDialog()},this._noConfirmButton.onclick=function(t){t.preventDefault(),l()||e._hideDialog()},this._yesConfirmButton.onclick=function(t){t.preventDefault(),a()||e._hideDialog()},this._okAlert.onclick=function(t){t.preventDefault(),d()||e._hideDialog()},this._closeAlert.onclick=function(t){t.preventDefault(),c()||e._hideDialog()},"close"==this.type.toString()?void this.closeModal.open("sm"):"reset"==this.type.toString()?void this.resetModal.open("sm"):"confirmModel"==this.type.toString()?void this.confirmModel.open("sm"):"alertMsg"==this.type.toString()?(clearTimeout(this.timer),void(this.timer=setTimeout(function(){e.alertMessageModal.open("sm")},500))):"alertMsg2"==this.type.toString()?void this.alertMessageModal.open("sm"):void(document.onkeyup=function(t){if(27==t.which)return e._hideDialog(),s()})},t.prototype._hideDialog=function(){return"close"==this.type.toString()?void this.closeModal.close():"reset"==this.type.toString()?void this.resetModal.close():"confirmModel"==this.type.toString()?void this.confirmModel.close():"alertMsg"==this.type.toString()?void this.alertMessageModal.close():"alertMsg2"==this.type.toString()?void this.alertMessageModal.close():void 0},t.prototype.ngOnInit=function(){this._cancelButton=document.getElementById("cancelButton"),this._okButton=document.getElementById("okButton"),this._noButton=document.getElementById("noButton"),this._yesResetButton=document.getElementById("yesResetButton"),this._noResetButton=document.getElementById("noResetButton"),this._yesConfirmButton=document.getElementById("yesConfirmButton"),this._noConfirmButton=document.getElementById("noConfirmButton"),this._okAlert=document.getElementById("okAlert"),this._closeAlert=document.getElementById("closeAlert")},t}();le([Object(n.ViewChild)("closeModal"),de("design:type","function"==typeof(ue=void 0!==c.ModalComponent&&c.ModalComponent)&&ue||Object)],ce.prototype,"closeModal",void 0),le([Object(n.ViewChild)("confirmModel"),de("design:type","function"==typeof(pe=void 0!==c.ModalComponent&&c.ModalComponent)&&pe||Object)],ce.prototype,"confirmModel",void 0),le([Object(n.ViewChild)("resetModal"),de("design:type","function"==typeof(me=void 0!==c.ModalComponent&&c.ModalComponent)&&me||Object)],ce.prototype,"resetModal",void 0),le([Object(n.ViewChild)("alertMessageModal"),de("design:type","function"==typeof(fe=void 0!==c.ModalComponent&&c.ModalComponent)&&fe||Object)],ce.prototype,"alertMessageModal",void 0),ce=le([Object(n.Component)({selector:"modal-confirm",template:r("3cDZ")}),de("design:paramtypes",["function"==typeof(he=void 0!==I&&I)&&he||Object])],ce);var ue,pe,me,fe,he,ve=r("bqRb"),be=this&&this.__decorate||function(t,e,r,n){var s,i=arguments.length,o=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},ge=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},ye=function(){function t(t){this.elRef=t,this.update=new n.EventEmitter}return t.prototype.ngOnChanges=function(t){this._lastViewModel!==t.model.currentValue&&(this._lastViewModel=this.model,this._refreshView())},t.prototype.onBlur=function(){if("checkbox"==this.elRef.nativeElement.type||"radio"==this.elRef.nativeElement.type){var t=this.elRef.nativeElement.checked;this._lastViewModel=t,this.update.emit(t)}else{var t=this.elRef.nativeElement.innerText;this._lastViewModel=t,this.update.emit(t)}},t.prototype._refreshView=function(){"checkbox"==this.elRef.nativeElement.type||"radio"==this.elRef.nativeElement.type?(this.elRef.nativeElement.value=this.model,this.elRef.nativeElement.checked=this.model):this.elRef.nativeElement.innerText=this.model},t}();be([Object(n.Input)("contenteditableModel"),ge("design:type",Object)],ye.prototype,"model",void 0),be([Object(n.Output)("contenteditableModelChange"),ge("design:type",Object)],ye.prototype,"update",void 0),be([Object(n.HostListener)("blur"),ge("design:type",Function),ge("design:paramtypes",[]),ge("design:returntype",void 0)],ye.prototype,"onBlur",null),ye=be([Object(n.Directive)({selector:"[contenteditableModel]"}),ge("design:paramtypes",["function"==typeof(xe=void 0!==n.ElementRef&&n.ElementRef)&&xe||Object])],ye);var xe,Ue=this&&this.__decorate||function(t,e,r,n){var s,i=arguments.length,o=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},we=function(){function t(){}return t}();we=Ue([Object(n.NgModule)({declarations:[M,Z,N,rt,Mt,ut,wt,ne,ce,Yt,Mt,ye],imports:[o.a,ae,a.a,i.b,i.e,d.c,c.Ng2Bs3ModalModule,ve.a.forRoot(),ve.b.forRoot()],providers:[p,I,yt.a,D,{provide:l.APP_BASE_HREF,useValue:"/Admin-UI"}],bootstrap:[ne]})],we),{production:!0}.production&&Object(n.enableProdMode)(),Object(s.a)().bootstrapModule(we)},efyd:function(t,e){t.exports='\r\n\x3c!-- navigation --\x3e\r\n<nav class="navbar navbar-inverse navbar-fixed-top">\r\n <div class="container-fluid">\r\n <div class="navbar-header">\r\n <a class="navbar-brand" href="#"><img src="assets/img/logo-main.png" class="img-responsive" alt=""></a>\r\n <div class="">\r\n <div class="btn-group pull-right">\r\n <ul class="nav navbar-nav navbar-right visible-sm visible-md">\r\n <li class="marginR5" data-toggle="tooltip" data-placement="top" title="Logout"><a href="login.html"><i class="fa fa-power-off"></i></a></li>\r\n </ul>\r\n </div>\r\n <div class="btn-group pull-right mar-top17 visible-sm visible-md">\r\n <button type="button" class="btn btn-primary dropdown-toggle " data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\r\n Welcome Maribel Brogden <span class="caret"></span>\r\n </button>\r\n <ul class="dropdown-menu">\r\n <li><a href="#"><strong>Date:</strong> 11/21/2016</a></li>\r\n </ul>\r\n </div>\r\n </div>\r\n <button type="button" class="navbar-toggle collapsed mar-top17" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">\r\n <span class="sr-only">Toggle navigation</span>\r\n <span class="icon-bar"></span>\r\n <span class="icon-bar"></span>\r\n <span class="icon-bar"></span>\r\n </button>\r\n </div>\r\n\r\n <div id="navbar" class="navbar-collapse collapse">\r\n <ul class="nav navbar-nav toperMenu-spaceleft">\r\n <li class="dropdown">\r\n <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Profile<span class="caret"></span></a>\r\n <ul class="dropdown-menu">\r\n <li><a [routerLink]="[\'updateuserprofile\']">Update Profile</a></li>\r\n \r\n <li><a [routerLink]="[\'changeuserpassword\']">Change Password</a></li>\r\n \r\n <li><a [routerLink]="[\'changeuserid\']">Change User ID</a></li>\r\n <li>\x3c!--<a href="admin-change-user-id.html">Change User ID</a>--\x3e</li>\r\n </ul>\r\n </li>\r\n <li class="dropdown">\r\n <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Licenses<span class="caret"></span></a>\r\n <ul class="dropdown-menu">\r\n \x3c!--<li><a [routerlink]="[\'managediscountcode\']">Search License</a></li>--\x3e\r\n <li><a href="admin-add-new-license.html">Add New License</a></li>\r\n <li><a href="admin-setup-test-account.html">Setup Test Account</a></li>\r\n </ul>\r\n </li>\r\n <li class="dropdown">\r\n <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Product Features<span class="caret"></span></a>\r\n <ul class="dropdown-menu">\r\n <li><a [routerLink]="[\'managediscountcode\']">Manage Discount Code</a></li>\r\n <li><a [routerLink]="[\'subscriptionprice\']">Subscription Price</a></li>\r\n </ul>\r\n </li>\r\n <li class="dropdown">\r\n <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Users<span class="caret"></span></a>\r\n <ul class="dropdown-menu">\r\n <li><a [routerLink]="[\'users\']">List User</a></li>\r\n <li><a [routerLink]="[\'adduser\']">Add User</a></li>\r\n <li><a [routerLink]="[\'unblockuser\']">Unblock User</a></li>\r\n <li><a href="admin-user-group.html">User Group</a></li>\r\n </ul>\r\n </li>\r\n <li class="dropdown">\r\n <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Reports<span class="caret"></span></a>\r\n <ul class="dropdown-menu">\r\n <li><a href="admin-usage-report.html">Usage Report</a></li>\r\n <li><a href="customer-summary-report.html">Customer Summary Report</a></li>\r\n <li><a href="admin-expiring-subscription-report.html">Expiring Subscription Report</a></li>\r\n <li><a href="admin-new-subscription-report.html">New Subscription Report</a></li>\r\n <li><a href="admin-subscription-cancellation-report.html">Subscription Cancellation Report</a></li>\r\n <li><a href="admin-net-ad-subscription-report.html">Net AD Subscription Report</a></li>\r\n <li><a href="admin-site-license-usage-report.html">Site License Usage Report</a></li>\r\n <li><a href="admin-discount-code-report.html">Discount Code Report</a></li>\r\n <li><a href="admin-image-export-report.html">Image Export Report</a></li>\r\n </ul>\r\n </li>\r\n <li class="dropdown">\r\n <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Site Account<span class="caret"></span></a>\r\n <ul class="dropdown-menu">\r\n <li><a href="admin-add-building-level-account.html">Add Building Level Account</a></li>\r\n </ul>\r\n </li>\r\n <li class="dropdown">\r\n <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Profile<span class="caret"></span></a>\r\n <ul class="dropdown-menu">\r\n <li><a href="admin-view-update-profile.html">View/Update Profile</a></li>\r\n <li><a href="admin-manage-modesty-settings.html">Manage Modesty Settings</a></li>\r\n <li><a href="admin-manage-module.html">Manage Module</a></li>\r\n </ul>\r\n </li>\r\n <li><a href="#">Product</a></li>\r\n </ul>\r\n \x3c!--logout--\x3e\r\n <div class="wel-brog">\r\n <div class="btn-group pull-right mob1">\r\n <ul class="nav navbar-nav navbar-right hidden-sm">\r\n <li class="marginR5" data-toggle="tooltip" data-placement="top" title="Logout"><a href="login.html"><i class="fa fa-power-off"></i></a></li>\r\n </ul>\r\n </div>\r\n <div class="btn-group pull-right hidden-sm mar-top17 mob2">\r\n <button type="button" class="btn btn-primary dropdown-toggle btn-sm" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\r\n Welcome Maribel Brogden <span class="caret"></span>\r\n </button>\r\n <ul class="dropdown-menu">\r\n <li><a href="#"><strong>Date:</strong> 11/21/2016</a></li>\r\n </ul>\r\n </div>\r\n </div>\r\n \x3c!--logout--\x3e\r\n </div>\r\n </div>\r\n</nav>\r\n\r\n\x3c!-- navigation --\x3e\r\n<div class="clearfix"></div>\r\n<div class="row">\r\n <router-outlet>\r\n <modal-confirm></modal-confirm>\r\n </router-outlet>\r\n \x3c!-- main-heading --\x3e\r\n \x3c!--<div class="col-sm-12 pageHeading">\r\n <h4>Update Profile</h4>\r\n </div>--\x3e\r\n \x3c!-- main-heading --\x3e\r\n \x3c!-- container --\x3e\r\n \x3c!--<div class="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3">\r\n <div class="container-fluid main-full">--\x3e\r\n \x3c!-- html of other components --\x3e\r\n\r\n\r\n \x3c!--</div>\r\n </div>--\x3e\r\n \x3c!-- container --\x3e\r\n</div>\r\n'},gFIY:function(t,e){function r(t){return Promise.resolve().then(function(){throw new Error("Cannot find module '"+t+"'.")})}r.keys=function(){return[]},r.resolve=r,t.exports=r,r.id="gFIY"},lPoh:function(t,e){t.exports='<div class="row">\r\n <div class="col-sm-12 pageHeading">\r\n <h4>List User</h4>\r\n </div>\r\n <div class="col-sm-12">\r\n <div [className]="divClass">\r\n <div class="container-fluid main-full">\r\n <form [formGroup]="Users">\r\n <div [style.visibility]="(Mode == \'Manage\') ? \'visible\' : \'hidden\'" class="row">\r\n <div class="row">\r\n <div class="well no-margin-btm">\r\n <div class="row">\r\n <div class="col-lg-3 col-sm-3">\r\n <div class="row">\r\n <div class="col-sm-12">\r\n <div class="form-group marginTop5">\r\n <label for="FirstName" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">First Name :</label>\r\n <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">\r\n <input type="text" class="form-control input-sm" id="FirstNames" placeholder="First Name" formControlName="FirstName">\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class="col-sm-12">\r\n <div class="form-group marginTop5">\r\n <label for="LastName" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Last Name :</label>\r\n <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">\r\n <input type="text" class="form-control input-sm" id="LastNames" placeholder="Last Name" formControlName="LastName">\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="col-lg-3 col-sm-3">\r\n <div class="row">\r\n <div class="col-sm-12">\r\n <div class="form-group marginTop5">\r\n <label for="Email" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Email ID :</label>\r\n </div>\r\n <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">\r\n <input type="email" class="form-control input-sm" id="Email" placeholder="Email ID" formControlName="EmailId">\r\n </div>\r\n </div>\r\n\r\n <div class="col-sm-12">\r\n <div class="form-group marginTop5">\r\n <label for="Account" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Account Number :</label>\r\n </div>\r\n <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">\r\n <input type="text" class="form-control input-sm" id="account" placeholder="Account Number" formControlName="AccountNumber">\r\n </div>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n <div class="col-lg-3 col-sm-3">\r\n <div class="row">\r\n <div class="col-sm-12">\r\n <div class="form-group marginTop5">\r\n <label for="State" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">User Type :</label>\r\n <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">\r\n\r\n <select class="form-control input-sm " id="State" [formControl]="Users.controls[\'UserTypeId\']">\r\n <option value="0">All</option>\r\n <option *ngFor="let UserTypeEntity of UserTypeList" value="{{UserTypeEntity.Id}}">{{ UserTypeEntity.Title }}</option>\r\n </select>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n <div class="col-sm-12">\r\n <div class="form-group marginTop5">\r\n <label for="State" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Account Type :</label>\r\n <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">\r\n <select class="form-control input-sm " id="AccountTypes" [formControl]="Users.controls[\'AccountTypeId\']">\r\n <option value="0">All</option>\r\n <option *ngFor="let AccountTypeEntity of AccountTypeList" value="{{AccountTypeEntity.Id}}">{{ AccountTypeEntity.Title }}</option>\r\n </select>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n <div class="col-lg-2 col-sm-3">\r\n <div class="row">\r\n <div class="col-sm-12"><div class="form-group marginTop5"> </div></div>\r\n\r\n <div class="col-sm-12">\r\n <div class="form-group marginTop5">\r\n <div class="checkbox text-right-lg">\r\n <label class="marginR5">\r\n <input type="checkbox" checked> Pagination Results\r\n </label>\r\n <button class="btn btn-primary btn-sm" (click)="SearchUserList(this)">Go <i class="fa fa-arrow-right"></i></button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n <div class="well">\r\n <table id="fixed_hdr2" class="table-hover ">\r\n <thead>\r\n <tr>\r\n <th>First Name</th>\r\n <th>Last Name</th>\r\n <th>User ID</th>\r\n <th>Password</th>\r\n <th>Email ID</th>\r\n <th>User Type</th>\r\n <th>Created Date</th>\r\n <th>Last Modified Date</th>\r\n <th>Account Number</th>\r\n <th>Product Edition</th>\r\n <th>Status</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor="let UserEntity of UserList ;let i = index" (click)="SetClickedRow(i, UserEntity)" [class.active]="i == selectedRow" [class.inactive]="i != selectedRow">\r\n <td><input type="hidden" value="{{UserEntity.Id}}">{{UserEntity.FirstName}}</td>\r\n <td>{{UserEntity.LastName}}</td>\r\n <td>{{UserEntity.LoginId}}</td>\r\n <td>{{UserEntity.Password}}</td>\r\n <td>{{UserEntity.EmailId}}</td>\r\n <td>{{UserEntity.UserTypeTitle}}</td>\r\n <td>{{UserEntity.CreationDate| date: \'MM/dd/yyyy\'}}</td>\r\n <td>{{UserEntity.ModifiedDate | date: \'MM/dd/yyyy\'}}</td>\r\n <td>{{UserEntity.AccountNumber}}</td>\r\n <td>{{UserEntity.EditionType}}</td>\r\n\r\n <td>\r\n <span [ngClass]="(UserEntity.UserStatus==Active?\'label label-success\':\'label label-default\')">{{UserEntity.UserStatus}}</span>\r\n </td>\r\n\r\n\r\n </tr>\r\n\r\n\r\n\r\n </tbody>\r\n </table>\r\n\r\n <div class="row">\r\n <div class="col-sm-12 marginTop20 text-center">\r\n <a href="admin-add-discount-code.html"><button class="btn btn-primary btn-sm"><i class="fa fa-thumbs-up"></i> Manage Rights</button></a>\r\n <button class="btn btn-primary btn-sm" (click)="EditUser()"><i class="fa fa-edit"></i> Edit</button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </form>\r\n\r\n <div style="position: absolute; z-index: 100; width: 80%" [style.top]="topPos" [style.visibility]="(Mode==\'Add\' || Mode==\'Edit\') ? \'visible\' : \'hidden\'"\r\n class="well">\r\n <div class="row">\r\n <div class="col-sm-12">\r\n <div class="panel-body">\r\n \x3c!-- form --\x3e\r\n <form class="form-horizontal" [formGroup]="adduserFrm">\r\n <div class="form-group" *ngIf="alerts !== \'\'">\r\n <div class="col-xs-12">\r\n <div class="alert alert-danger" [innerHTML]="alerts">\r\n </div>\r\n\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputEmail3" class="col-sm-4 control-label">User Name <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <input type="text" class="form-control input-sm" id="name" placeholder="User Name" formControlName="UserName">\r\n <div *ngIf="!adduserFrm.controls.UserName.valid && adduserFrm.controls.UserName.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">User Name is required</div>\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputPassword3" class="col-sm-4 control-label">Password <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <input type="password" class="form-control input-sm" id="password" placeholder="" formControlName="Password">\r\n <span class="help-block">(Minimum 8 characters)</span>\r\n <div *ngIf="!adduserFrm.controls.Password.valid && adduserFrm.controls.Password.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Password of minimum 8 characters is required</div>\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputPassword3" class="col-sm-4 control-label">Confirm Password <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <input type="password" class="form-control input-sm" id="cpassword" placeholder="" formControlName="ConfirmPassword">\r\n <div *ngIf="!adduserFrm.controls.ConfirmPassword.valid && adduserFrm.controls.ConfirmPassword.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Confirm Password is required</div>\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputPassword3" class="col-sm-4 control-label">Email Id <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <input type="text" class="form-control" id="inputPassword3" placeholder="Email Id" formControlName="EmailId" pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,3}$">\r\n <div *ngIf="adduserFrm.controls.EmailId.invalid && !adduserFrm.controls.EmailId.value && adduserFrm.controls.EmailId.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Email Id is required</div>\r\n\r\n <div *ngIf="adduserFrm.controls.EmailId.invalid && adduserFrm.controls.EmailId.value" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">\r\n Please enter the correct email.\r\n </div>\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputEmail3" class="col-sm-4 control-label">First Name <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <input class="form-control input-sm" id="FirstName" placeholder="First Name" type="text" formControlName="FirstName">\r\n <div *ngIf="!adduserFrm.controls.FirstName.valid && adduserFrm.controls.FirstName.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">First Name is required</div>\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputEmail3" class="col-sm-4 control-label">Last Name <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <input class="form-control input-sm" id="LastName" placeholder="Last Name" type="text" formControlName="LastName">\r\n <div *ngIf="!adduserFrm.controls.LastName.valid && adduserFrm.controls.LastName.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Last Name is required</div>\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="status" class="col-sm-4 control-label">Status :</label>\r\n <div class="col-sm-7">\r\n\r\n <label class="radio-inline">\r\n <input name="isActive" value="true" type="radio" formControlName="UserStatusActive" (change)="handleChange($event)">\r\n Active\r\n </label>\r\n <label class="radio-inline">\r\n <input name="isActive" value="false" type="radio" formControlName="UserStatusInActive" (change)="handleChange($event)">\r\n Inactive\r\n </label>\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputEmail3" class="col-sm-4 control-label">User Type:</label>\r\n <div class="col-sm-7">\r\n\r\n <input class="form-control input-sm" id="UserType" placeholder="" type="text" formControlName="UserType" [attr.disabled]="true">\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputEmail3" class="col-sm-4 control-label">Account Type :</label>\r\n <div class="col-sm-7">\r\n\r\n <input class="form-control input-sm" id="AccountType" placeholder="" type="text" formControlName="AccountType" [attr.disabled]="true">\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputEmail3" class="col-sm-4 control-label">Account Number :</label>\r\n <div class="col-sm-7">\r\n <input class="form-control input-sm" id="AccountNumber" placeholder="" type="text" formControlName="AccountNumber" [attr.disabled]="true">\r\n\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputEmail3" class="col-sm-4 control-label">Created Date :</label>\r\n <div class="col-sm-7">\r\n <input class="form-control input-sm" id="Createddate" placeholder="" type="text" formControlName="Createddate" [attr.disabled]="true">\r\n\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputEmail3" class="col-sm-4 control-label">Last Modified Date :</label>\r\n <div class="col-sm-7">\r\n <input class="form-control input-sm" id="LastModifiedDate" placeholder="" type="text" formControlName="LastModifiedDate" [attr.disabled]="true">\r\n\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputEmail3" class="col-sm-4 control-label">Created By :</label>\r\n <div class="col-sm-7">\r\n <input class="form-control input-sm" id="Createdby" placeholder="" type="text" formControlName="Createdby" [attr.disabled]="true">\r\n\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputEmail3" class="col-sm-4 control-label">Modified By :</label>\r\n <div class="col-sm-7">\r\n <input class="form-control input-sm" id="Modifiedby" placeholder="" type="text" formControlName="Modifiedby" [attr.disabled]="true">\r\n\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputEmail3" class="col-sm-4 control-label">Deactivation Date :</label>\r\n <div class="col-sm-7">\r\n <input class="form-control input-sm" id="DeactivationDate" placeholder="" type="text" formControlName="DeactivationDate" [attr.disabled]="true">\r\n\r\n </div>\r\n </div>\r\n <div class="row">\r\n <div class="col-sm-12 marginTop20 text-center">\r\n <button type="button" class="btn btn-primary btn-sm" data-toggle="modal" (click)="UpdateUser(this)"><i class="fa fa-plus-circle"></i> Update</button>\r\n \x3c!--modal--\x3e\r\n <div class="modal fade bs-example-modal-sm text-left" tabindex="-1" role="dialog" id="mymodal">\r\n <div class="modal-dialog modal-sm" role="document">\r\n <div class="modal-content">\r\n <div class="modal-header annotation-modal-header ui-draggable-handle">\r\n <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">\xd7</span></button>\r\n <h4 class="modal-title" id="">Alert</h4>\r\n </div>\r\n <div class="modal-body">\r\n <h5>Please enter a username</h5>\r\n </div>\r\n <div class="modal-footer">\r\n <div class="row">\r\n <div class="col-sm-12"><button class="btn btn-primary btn-sm">Ok</button></div>\r\n </div>\r\n </div>\r\n\r\n </div>\x3c!-- /.modal-content --\x3e\r\n </div>\x3c!-- /.modal-dialog --\x3e\r\n </div>\r\n\r\n <button class="btn btn-primary btn-sm" (click)="EditUser()"><i class="fa fa-refresh"></i> Reset</button>\r\n <button class="btn btn-primary btn-sm" (click)="redirect()"><i class="fa fa-close"></i> Cancel</button>\r\n </div>\r\n\r\n </div>\r\n </form>\r\n \x3c!-- form --\x3e\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n \r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n'},o9F3:function(t,e){t.exports='<div class="row">\r\n <div class="col-sm-12 pageHeading">\r\n <h4>Unblock User</h4>\r\n </div>\r\n <div>\r\n <ng-template #template>\r\n <div class="modal-header">\r\n <h4 class="modal-title pull-left">Confirmation</h4>\r\n <button type="button" class="close pull-right" aria-label="Close" (click)="modalRef.hide()">\r\n <span aria-hidden="true">×</span>\r\n </button>\r\n </div>\r\n <div class="modal-body">\r\n <p>Are you sure to unblock the selected user(s)?</p>\r\n </div>\r\n <div class="modal-footer">\r\n <button type="button" class="btn btn-primary btn-sm" (click)="UpdateUnBlockedUsers()">Yes</button>\r\n <button type="button" class="btn btn-primary btn-sm" (click)="modalRef.hide()">No</button>\r\n </div>\r\n </ng-template>\r\n </div>\r\n <ng-template #templatesuccess>\r\n <div class="modal-header">\r\n <h4 class="modal-title pull-left">Confirmation</h4>\r\n <button type="button" class="close pull-right" aria-label="Close" (click)="modalRef.hide()">\r\n <span aria-hidden="true">×</span>\r\n </button>\r\n </div>\r\n <div class="modal-body" [innerHTML]="modalAlerts">\r\n </div>\r\n <div class="modal-footer">\r\n </div>\r\n </ng-template>\r\n <div class="col-sm-12">\r\n\r\n <div class="container-fluid main-full">\r\n <div class="row">\r\n <div class="well marginBtm12" novalidate [formGroup]="UnBlockedUserFrm">\r\n \x3c!--first-table--\x3e\r\n <div class="table-responsive blue">\r\n <table class="table table-condensed table-bordered margin-btm0 table-striped table-hover">\r\n <thead>\r\n <tr>\r\n <th>Select</th>\r\n <th>First Name</th>\r\n <th>Last Name</th>\r\n <th>User ID</th>\r\n <th>Password</th>\r\n <th>Email ID</th>\r\n <th>Blocked Date</th>\r\n <th>Account Number</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor="let UserEntity of UserList;let i = index">\r\n <td>\r\n <input type="checkbox" (change)="onChange(i, UserEntity.Id, $event.target.checked)">\r\n </td>\r\n <td>{{UserEntity.FirstName}}</td>\r\n <td>{{UserEntity.LastName}}</td>\r\n <td>{{UserEntity.LoginId}}</td>\r\n <td>{{UserEntity.Password}}</td>\r\n <td>{{UserEntity.EmailId}}</td>\r\n <td>{{UserEntity.LoginTime| date: \'MM/dd/yyyy\'}}</td>\r\n <td>{{UserEntity.AccountNumber}}</td>\r\n </tr>\r\n\r\n </tbody>\r\n </table>\r\n </div>\r\n\r\n \x3c!--first-table--\x3e\r\n\r\n <div class="row">\r\n <div class="col-sm-12 marginTop20 text-center">\r\n <button class="btn btn-primary btn-sm" (click)="openModal(template)"><i class="fa fa-times-circle"></i> Unblock</button>\r\n <button class="btn btn-primary btn-sm"><i class="fa fa-close"></i> Cancel</button>\r\n </div>\r\n </div>\r\n \x3c!--tab-content--\x3e\r\n </div>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n</div>\r\n'},wLgm:function(t,e){t.exports='<div class="row">\r\n \x3c!-- main-heading --\x3e\r\n <div class="col-sm-12 pageHeading">\r\n <h4>Subscription Price</h4>\r\n </div>\r\n \x3c!-- main-heading --\x3e\r\n\r\n <ng-template #template>\r\n <div class="modal-header">\r\n <h4 class="modal-title pull-left">Delete</h4>\r\n <button type="button" class="close pull-right" aria-label="Close" (click)="modalRef.hide()">\r\n <span aria-hidden="true">×</span>\r\n </button>\r\n </div>\r\n <div class="modal-body">\r\n <p>Do you want to delete the selected subscription prices?</p>\r\n </div>\r\n <div class="modal-footer">\r\n <button type="button" class="btn btn-primary btn-sm" (click)="DeleteSubscriptionPrices()" >Yes</button>\r\n <button type="button" class="btn btn-primary btn-sm" (click)="modalRef.hide()" >No</button>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #templatesuccess>\r\n <div class="modal-header">\r\n <h4 class="modal-title pull-left">Confirmation</h4>\r\n <button type="button" class="close pull-right" aria-label="Close" (click)="modalRef.hide()">\r\n <span aria-hidden="true">×</span>\r\n </button>\r\n </div>\r\n <div class="modal-body" [innerHTML]="modalAlerts">\r\n </div>\r\n <div class="modal-footer">\r\n </div>\r\n </ng-template>\r\n\r\n \x3c!-- container --\x3e\r\n <div [className]="divClass">\r\n\r\n <div class="container-fluid main-full">\r\n \x3c!-- form --\x3e\r\n <form class="form-horizontal" [formGroup]="subscriptionPriceFrm" (submit)="UpdateSubscriptionPrices(templatesuccess)">\r\n <div [style.visibility]="(Mode == \'Search\') ? \'visible\' : \'hidden\'" class="row">\r\n\r\n <div class="well marginBtm12">\r\n <div class="form-group" *ngIf="alerts != \'\'">\r\n <div class="marginBtm12 text-center">\r\n <div class="alert alert-danger" [innerHTML]="alerts">\r\n </div>\r\n </div>\r\n </div>\r\n \x3c!--tab-content--\x3e\r\n <div>\r\n \x3c!-- Nav tabs --\x3e\r\n <ul class="nav nav-tabs" role="tablist">\r\n <li role="presentation" class="active"><a aria-controls="higher-edu" href="#" (click)="SearchSubscriptionPrices(1)" role="tab" data-toggle="tab">Higher Education Instructor</a></li>\r\n <li role="presentation"><a aria-controls="higher-school" href="#" (click)="SearchSubscriptionPrices(2)" role="tab" data-toggle="tab">Higher School Instructor</a></li>\r\n <li role="presentation"><a aria-controls="higher-student" href="#" (click)="SearchSubscriptionPrices(3)" role="tab" data-toggle="tab">Higher Education Student</a></li>\r\n <li role="presentation"><a aria-controls="higher-school-student" href="#" (click)="SearchSubscriptionPrices(4)" role="tab" data-toggle="tab">Higher School Student</a></li>\r\n <li role="presentation"><a aria-controls="public-library" href="#" (click)="SearchSubscriptionPrices(5)" role="tab" data-toggle="tab">Public Library</a></li>\r\n <li role="presentation"><a aria-controls="academic-library" href="#" (click)="SearchSubscriptionPrices(6)" role="tab" data-toggle="tab">Academic Library</a></li>\r\n </ul>\r\n\r\n \x3c!-- Tab panes --\x3e\r\n <div class="tab-content">\r\n \x3c!--first-table--\x3e\r\n <div role="tabpanel" class="tab-pane active" id="higher-edu">\r\n <div class="table-responsive blue">\r\n <table class="table table-condensed table-bordered margin-btm0 table-striped table-hover">\r\n <thead>\r\n <tr>\r\n <th>Select</th>\r\n <th>Subscription Type</th>\r\n <th>Duration(in Month)</th>\r\n <th>Price</th>\r\n <th>Active</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor="let item of this.subscriptionPriceFrm.controls[\'subscriptionPrices\'].value; let i = index">\r\n <td>\r\n <input type="hidden" [(contenteditableModel)]="item.Id">\r\n <input type="hidden" [(contenteditableModel)]="item.EditionId">\r\n <input type="checkbox" (change)="onChange(i, item.Id, $event.target.checked)">\r\n </td>\r\n <td contenteditable="true" [(contenteditableModel)]="item.Title">{{item.Title}}</td>\r\n <td contenteditable="true" [(contenteditableModel)]="item.Duration">{{item.Duration}}</td>\r\n <td contenteditable="true" [(contenteditableModel)]="item.Price">{{item.Price | number : \'1.2\'}}</td>\r\n <td>\r\n <input type="checkbox" [(checked)]="item.IsActive" [(contenteditableModel)]="item.IsActive">\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n \x3c!--first-table--\x3e\r\n\r\n <div class="row">\r\n <div class="col-sm-12 marginTop20 text-center">\r\n <button class="btn btn-primary btn-sm" type="button" (click)="AddSubscriptionPrice(templatesuccess)"><i class="fa fa-plus-circle"></i> Add</button>\r\n <button class="btn btn-primary btn-sm" type="button" (click)="openModal(template)"><i class="fa fa-trash"></i> Delete</button>\r\n <button class="btn btn-primary btn-sm" type="submit"><i class="fa fa-check"></i> Apply</button>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n \x3c!--tab-content--\x3e\r\n </div>\r\n </div>\r\n </form>\r\n <div style="position: absolute; z-index: 100; width: 80%" [style.top]="topPos" [style.visibility]="(Mode==\'Add\') ? \'visible\' : \'hidden\'" class="well">\r\n <div class="row">\r\n <div class="col-sm-12">\r\n <div class="panel-body">\r\n \x3c!-- form --\x3e\r\n <form class="form-horizontal" [formGroup]="insertSubscriptionPriceFrm" (submit)="InsertSubscriptionPrice(templatesuccess)">\r\n <div class="form-group" *ngIf="alerts != \'\'">\r\n <div class="col-xs-12">\r\n <div class="alert alert-danger" [innerHTML]="alerts">\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class="form-group">\r\n <label for="title" class="col-sm-4 control-label">Title <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <input type="hidden" formControlName="editionId">\r\n <input type="hidden" formControlName="subscriptionPriceId">\r\n <input type="text" class="form-control" id="title" formControlName="title" maxlength="50">\r\n <div *ngIf="insertSubscriptionPriceFrm.controls.title.hasError(\'required\') && insertSubscriptionPriceFrm.controls.title.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Subscription title is required</div>\r\n </div>\r\n </div>\r\n\r\n <div class="form-group">\r\n <label for="price" class="col-sm-4 control-label">Price <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <input type="text" class="form-control" id="price" formControlName="price" maxlength="10">\r\n <div *ngIf="insertSubscriptionPriceFrm.controls.price.hasError(\'required\') && insertSubscriptionPriceFrm.controls.price.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Subscription price is required</div>\r\n <div *ngIf="insertSubscriptionPriceFrm.controls.price.hasError(\'pattern\') && insertSubscriptionPriceFrm.controls.price.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Subscription price must be numeric</div>\r\n </div>\r\n </div>\r\n \r\n <div class="form-group">\r\n <label for="duration" class="col-sm-4 control-label">Duration <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <input type="text" class="form-control" id="duration" formControlName="duration" maxlength="2">\r\n <div *ngIf="insertSubscriptionPriceFrm.controls.duration.hasError(\'required\') && insertSubscriptionPriceFrm.controls.duration.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Subscription duration is required</div>\r\n <div *ngIf="insertSubscriptionPriceFrm.controls.duration.hasError(\'pattern\') && insertSubscriptionPriceFrm.controls.duration.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Subscription duration must be numeric</div>\r\n </div>\r\n </div>\r\n\r\n <div class="form-group">\r\n <label for="status" class="col-sm-4 control-label">Status :</label>\r\n <div class="col-sm-7">\r\n <label class="radio-inline">\r\n <input name="isActive" value="true" type="radio" formControlName="isActive"> \r\n Active \r\n </label> \r\n <label class="radio-inline">\r\n <input name="isActive" value="false" type="radio" formControlName="isActive">\r\n Inactive \r\n </label> \r\n </div>\r\n </div>\r\n\r\n <div class="form-group">\r\n <div class="col-sm-offset-4 col-sm-7 mar-top17">\r\n <button type="submit" [disabled]="!insertSubscriptionPriceFrm.valid" class="btn btn-primary btn-sm"><i class="fa fa-plus-circle"></i> Save</button>\r\n <button type="button" (click)="CancelAdd()" class="btn btn-primary btn-sm"><i class="fa fa-times-circle"></i> Cancel</button>\r\n </div>\r\n </div>\r\n\r\n </form>\r\n \x3c!-- form --\x3e\r\n \r\n \x3c!--modal--\x3e\r\n <div class="modal fade bs-example-modal-sm text-left" tabindex="-1" role="dialog" id="mymodal">\r\n <div class="modal-dialog modal-sm" role="document">\r\n <div class="modal-content">\r\n <div class="modal-header annotation-modal-header ui-draggable-handle">\r\n <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">\xd7</span></button>\r\n <h4 class="modal-title" id="">Alert</h4>\r\n </div>\r\n <div class="modal-body">\r\n <h5>Please select subscription to delete.</h5>\r\n </div>\r\n <div class="modal-footer">\r\n <div class="row">\r\n <div class="col-sm-12"><button class="btn btn-primary btn-sm">Ok</button></div>\r\n </div>\r\n </div>\r\n </div>\r\n \x3c!-- /.modal-content --\x3e\r\n </div>\r\n \x3c!-- /.modal-dialog --\x3e\r\n </div>\r\n \x3c!-- /.modal --\x3e\r\n \x3c!--modal--\x3e\r\n \x3c!--modal--\x3e\r\n <div class="modal fade bs-example-modal-sm text-left" tabindex="-1" role="dialog" id="mymodal1">\r\n <div class="modal-dialog modal-sm" role="document">\r\n <div class="modal-content">\r\n <div class="modal-header annotation-modal-header ui-draggable-handle">\r\n <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">\xd7</span></button>\r\n <h4 class="modal-title" id="">Alert</h4>\r\n </div>\r\n <div class="modal-body">\r\n <h5>Subscription type is required.</h5>\r\n </div>\r\n <div class="modal-footer">\r\n <div class="row">\r\n <div class="col-sm-12"><button class="btn btn-primary btn-sm">Ok</button></div>\r\n </div>\r\n </div>\r\n </div>\r\n \x3c!-- /.modal-content --\x3e\r\n </div>\r\n \x3c!-- /.modal-dialog --\x3e\r\n </div>\r\n \x3c!-- /.modal --\x3e\r\n \x3c!--modal--\x3e\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\x3c!-- container --\x3e\r\n</div>'},xbvx:function(t,e){t.exports='<div class="row">\r\n \x3c!-- main-heading --\x3e\r\n <div class="col-sm-12 pageHeading">\r\n <h4>Update Profile</h4>\r\n </div>\r\n <div class="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3">\r\n <div class="container-fluid main-full">\r\n <div class="row">\r\n <div class="well">\r\n <div class="row">\r\n <div class="col-sm-12">\r\n <h5 class="text-center text-success"><strong>**To update your profile fill all the text fields carefully.</strong></h5>\r\n <div class="panel-body">\r\n \x3c!-- form --\x3e\r\n <form class="form-horizontal" novalidate [formGroup]="userFrm">\r\n <div class="form-group" *ngIf="alerts !== \'\'">\r\n <div class="col-xs-12">\r\n <div class="alert alert-danger" [innerHTML]="alerts">\r\n </div>\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n\r\n <label for="inputEmail3" class="col-sm-4 control-label">First Name <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <input type="text" formControlName="firstName" class="form-control" id="inputEmail3">\r\n <div *ngIf="!userFrm.controls.firstName.valid && userFrm.controls.firstName.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">First Name is required</div>\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputPassword3" class="col-sm-4 control-label">Last Name <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <input type="text" class="form-control" id="inputPassword3" formControlName="lastName">\r\n <div *ngIf="!userFrm.controls.lastName.valid && userFrm.controls.lastName.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Last Name is required</div>\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <label for="inputPassword3" class="col-sm-4 control-label">Email Id <span class="red">*</span> :</label>\r\n <div class="col-sm-7">\r\n <input type="text" class="form-control" required="required" id="inputPassword3" formControlName="emailId" pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,3}$">\r\n\r\n <div *ngIf="userFrm.controls.emailId.invalid && !userFrm.controls.emailId.value && userFrm.controls.emailId.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Email Id is required</div>\r\n\r\n <div *ngIf="userFrm.controls.emailId.invalid && userFrm.controls.emailId.value" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">\r\n Please enter the correct email.\r\n </div>\r\n </div>\r\n </div>\r\n <div class="form-group">\r\n <div class="col-sm-offset-4 col-sm-7 mar-top17">\r\n <button type="submit" class="btn btn-primary btn-sm" data-toggle="modal" (click)="UpdateUserProfile(this)"><i class="fa fa-check"></i> Update</button>\r\n \x3c!--cancel-button--\x3e\r\n\r\n <div class="modal fade bs-example-modal-sm" tabindex="-1" #profileModal role="dialog" id="mymodal">\r\n <div class="modal-dialog modal-sm" role="document">\r\n <div class="modal-content">\r\n <div class="modal-header annotation-modal-header ui-draggable-handle">\r\n <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">\xd7</span></button>\r\n <h4 class="modal-title" id="">Alert</h4>\r\n </div>\r\n <div class="modal-body">\r\n <h5>User profile has been updated successfully.</h5>\r\n </div>\r\n <div class="modal-footer">\r\n <div class="row">\r\n <div class="col-sm-12"><button class="btn btn-primary btn-sm">Ok</button></div>\r\n </div>\r\n </div>\r\n\r\n </div>\x3c!-- /.modal-content --\x3e\r\n </div>\x3c!-- /.modal-dialog --\x3e\r\n </div>\x3c!-- /.modal --\x3e\r\n \x3c!--cancel-button--\x3e\r\n <button type="submit" class="btn btn-primary btn-sm" (click)="redirect()"><i class="fa fa-close"></i> Cancel</button>\r\n </div>\r\n\r\n </div>\r\n </form>\r\n \x3c!-- form --\x3e\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n'}},[0]); | ||
0 | \ No newline at end of file | 2 | \ No newline at end of file |