Commit 22321835db6de949474ca9520684c9bc07fbbf65

Authored by unknown
1 parent c7b2c934

added variable

400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
@@ -1328,6 +1328,11 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, @@ -1328,6 +1328,11 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
1328 1328
1329 } 1329 }
1330 $scope.reportCopyStatus = false; 1330 $scope.reportCopyStatus = false;
  1331 + $scope.reportEmailTitle = "Email Your Performance Report";
  1332 + $scope.notificationMsgWithCopy = "Your report has been sent. A copy has been emailed to you for your records.";
  1333 + $scope.sentReportMsg = "Your report has been sent.";
  1334 + $scope.invalidEmailId = "Invalid email Id";
  1335 + $scope.invalidEmailTitle = "Alert";
1331 $scope.SendLabEXMailToUser = function (User) { 1336 $scope.SendLabEXMailToUser = function (User) {
1332 1337
1333 var reportHtml = ''; 1338 var reportHtml = '';
@@ -1360,7 +1365,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, @@ -1360,7 +1365,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
1360 $scope.senderEmails = $("#emailTo").val(); 1365 $scope.senderEmails = $("#emailTo").val();
1361 1366
1362 1367
1363 - LabExerciseService.LabExerciseReport(User, $scope.reportImage, $scope.reportTitle, $scope.reportCopyStatus, $scope.senderEmails).then( 1368 + LabExerciseService.LabExerciseReport(User, $scope.reportImage, $scope.reportTitle, $scope.reportCopyStatus, $scope.senderEmails, $scope.reportEmailTitle, $scope.notificationMsgWithCopy, $scope.sentReportMsg, $scope.invalidEmailId, $scope.invalidEmailTitle).then(
1364 1369
1365 function (result) { 1370 function (result) {
1366 console.log(result); 1371 console.log(result);
400-SOURCECODE/AIAHTML5.Web/app/services/LabExerciseService.js
@@ -51,7 +51,7 @@ @@ -51,7 +51,7 @@
51 }, 51 },
52 52
53 // code of email report 53 // code of email report
54 - LabExerciseReport: function (User, reportImage, reportTitle, reportCopyStatus, senderEmail) { 54 + LabExerciseReport: function (User, reportImage, reportTitle, reportCopyStatus, senderEmail, emailReportTitle, notiMsgWithCopy, sendMessage, invalidId, invalidIdTitle) {
55 User.reportImage = reportImage; 55 User.reportImage = reportImage;
56 User.reportTitle = reportTitle; 56 User.reportTitle = reportTitle;
57 User.ReportCheck = reportCopyStatus; 57 User.ReportCheck = reportCopyStatus;
@@ -70,19 +70,19 @@ @@ -70,19 +70,19 @@
70 70
71 console.log('success'); 71 console.log('success');
72 72
73 - document.getElementById('notificationTitle').innerText = "Email Your Performance Report"; 73 + document.getElementById('notificationTitle').innerText = emailReportTitle;
74 if (reportCopyStatus == true) { 74 if (reportCopyStatus == true) {
75 - document.getElementById('notificationMessage').innerText = "Your report has been sent. A copy has been emailed to you for your records."; 75 + document.getElementById('notificationMessage').innerText = notiMsgWithCopy;
76 } 76 }
77 else { 77 else {
78 - document.getElementById('notificationMessage').innerText = "Your report has been sent."; 78 + document.getElementById('notificationMessage').innerText = sendMessage;
79 } 79 }
80 document.getElementById('labExEmailSentModalID').style.display = "block"; 80 document.getElementById('labExEmailSentModalID').style.display = "block";
81 deferred.resolve(data); 81 deferred.resolve(data);
82 }).error(function (data, status, headers, config) { 82 }).error(function (data, status, headers, config) {
83 console.log('error'); 83 console.log('error');
84 - document.getElementById('notificationTitle').innerText = "Alert";  
85 - document.getElementById('notificationMessage').innerText = "Invalid email Id"; 84 + document.getElementById('notificationTitle').innerText = invalidIdTitle;
  85 + document.getElementById('notificationMessage').innerText = invalidId;
86 document.getElementById('labExEmailSentModalID').style.display = "block"; 86 document.getElementById('labExEmailSentModalID').style.display = "block";
87 deferred.reject(data); 87 deferred.reject(data);
88 }); 88 });