PageSourceSearch

https://flowpro.herokuapp.com/slds/src/modules/client/profile/controllers.js

js flowpro.herokuapp.com collected 2026-10-03 14:49:14 UTC 30,532 bytes, 732 lines download raw bytes

1client.controller('ClientProfileManageController',[
2            '$scope','$rootScope','$controller','Upload','$stateParams','$state','ClientProfileService','blockUI','Notifications','$sce',
3    function($scope , $rootScope , $controller , Upload,$stateParams , $state,ClientProfileService,blockUI,Notifications ,$sce){
4        var thisCtrl = this;
5        $scope.currentTab='details';
6        $scope.regions=[];
7        $scope.skillSets;
8        $scope.experiances;
9        $scope.editExperianceClass=false;
10        $scope.addExperianceClass=false;
11        $scope.editCertificateClass=false;
12        $scope.addCertificateClass=false;
13        $scope.profileEditMode=false;
14        $scope.EditRegion=[];
15        $scope.RegionList=[];
16        $scope.StateList=[];
17        $scope.existingCertificates;
18        $scope.stateWisePermits=[];
19        $scope.reasonpicklist={};
20        $scope.PermitsData={}
21        
22        $scope.headShot;
23        $scope.bodyShot;
24        $scope.promoShot;
25        $scope.headShotFileName;
26        $scope.bodyShotFileName;
27        $scope.promoShotFileName;
28
29        $scope.profileEdit={};
30
31        $scope.newExperiance={};
32        $scope.newCertificate={};
33        $scope.QuizMasters;
34
35        $scope.tabSelection=function(currentTabSelection){
36            $scope.currentTab=currentTabSelection;
37            if(currentTabSelection=="skills" && $scope.skillSets==undefined){
38                $scope.loadSkillSets();
39            }
40            if(currentTabSelection=="experience" && $scope.experiances==undefined){
41                $scope.loadExistingExperiace();
42            }
43            if(currentTabSelection=="certificate" && $scope.existingCertificates==undefined){
44                $scope.loadStateWiseCertificate();
45                $scope.loadCertificateReason();
46                $scope.loadExistingCertificates();
47            }
48            if(currentTabSelection=="quiz" && $scope.QuizMasters==undefined){
49                $scope.loadQuizDetail();
50            }
51            if(currentTabSelection=="images" && $scope.headShot==undefined){
52                $scope.loadPics();
53            }
54        }
55        $scope.addmodeExperiace=function(editmode){
56            $scope.editExperianceClass=editmode;
57            $scope.addExperianceClass=editmode;
58        }
59        $scope.addExperiace=function(){
60           
61            $scope.experiances.push($scope.newExperiance);
62            $scope.updateExperianceDetail();
63
64        }
65        $scope.editExperiace=function(data,editmode){
66            
67            $scope.editExperianceClass=editmode;
68            data.editMode=editmode;
69        }
70        $scope.updateExperiace=function(data){
71           
72            data.editMode=false;
73            $scope.updateExperianceDetail();
74        }
75
76        $scope.addmodeCertificate=function(editmode){
77            $scope.certificateBody=null;
78            $scope.certificateFileName=null;
79            $scope.editCertificateClass=editmode;
80            $scope.addCertificateClass=editmode;
81        }
82        $scope.addCertificate=function(){
83           
84            if($scope.newCertificate.State__c==undefined || $scope.newCertificate.State__c==""){
85                Notifications.warn('Please Select State');
86                return;
87            }
88            if($scope.newCertificate.Permits_Required__c==undefined || $scope.newCertificate.Permits_Required__c==""){
89                Notifications.warn('Please Select Permits');
90                return;
91            }
92            if(($scope.newCertificate.Permit_Certification_Expiration_Date__c==undefined || $scope.newCertificate.Permit_Certification_Expiration_Date__c=="")
93                && ($scope.newCertificate.Reason_for_no_expiration_date__c==undefined || $scope.newCertificate.Reason_for_no_expiration_date__c=="")){
94                Notifications.warn('Please Select Expiration Date or Reason For No Expiration Date');
95                return;
96            }
97
98            if($scope.certificateFileName==null || $scope.certificateBody==null){
99                Notifications.warn('Please Upload Certificate');
100                return;
101            }
102            
103            $scope.existingCertificates.push($scope.newCertificate);
104            $scope.createUpdateCertificationDetail($scope.newCertificate);
105
106        }
107        $scope.editCertificate=function(data,editmode){
108            $scope.certificateBody=null;
109            $scope.certificateFileName=null;
110            $scope.editCertificateClass=editmode;
111            data.editMode=editmode;
112        }
113        $scope.updateCertificate=function(data){
114            if(data.State__c==undefined || data.State__c==""){
115                Notifications.warn('Please Select State');
116                return;
117            }
118            if(data.Permits_Required__c==undefined || data.Permits_Required__c==""){
119                Notifications.warn('Please Select Permits');
120                return;
121            }
122            if((data.Permit_Certification_Expiration_Date__c==undefined || data.Permit_Certification_Expiration_Date__c=="")
123                && (data.Reason_for_no_expiration_date__c==undefined || data.Reason_for_no_expiration_date__c=="")){
124                Notifications.warn('Please Select Expiration Date or Reason For No Expiration Date');
125                return;
126            }
127            data.editMode=false;
128            $scope.createUpdateCertificationDetail(data);
129        }
130        
131        $scope.updateImage=function(){
132            var cnt=0;
133            if($scope.headShotFileName!=null){
134                cnt++;
135            }
136            if($scope.bodyShotFileName!=null){
137                cnt++;
138            }
139            if($scope.promoShotFileName!=null){
140                cnt++;
141            }
142            var totalUpload=0;
143            if(cnt==0)return;
144            var profileDetailBlock = blockUI.instances.get('imageSection');
145            profileDetailBlock.start('Uploading Image ...');
146
147            if($scope.headShotFileName!=null){
148                ClientProfileService.uploadImage({ "pictureType":"headshot","base64data":$scope.headShot.substring($scope.headShot.indexOf(',')+1)})
149                .success(function (response) {
150                    totalUpload++;
151                    if (response.success) {
152                        if(totalUpload==cnt){
153                            profileDetailBlock.stop();
154                        }
155                        $scope.headShotFileName=null;
156                    }
157                    else {
158                        if(totalUpload==cnt){
159                            profileDetailBlock.stop();
160                        }
161                        console.log('Error',response.message);
162                    
163                    }
164                })
165                .error(function (response) {
166                    console.log('Error','Error While loading upcommung event detail');
167                });
168            }
169            if($scope.bodyShotFileName!=null){
170                ClientProfileService.uploadImage({ "pictureType":"bodyshot","base64data":$scope.bodyShot.substring($scope.bodyShot.indexOf(',')+1)})
171                .success(function (response) {
172                    totalUpload++;
173                    if (response.success) {
174                        if(totalUpload==cnt){
175                            profileDetailBlock.stop();
176                        }
177                        $scope.bodyShotFileName=null;
178                    }
179                    else {
180                        if(totalUpload==cnt){
181                            profileDetailBlock.stop();
182                        }
183                        console.log('Error',response.message);
184                    
185                    }
186                })
187                .error(function (response) {
188                    console.log('Error','Error While loading upcommung event detail');
189                });
190            }
191            if($scope.promoShotFileName!=null){
192                ClientProfileService.uploadImage({ "pictureType":"promotion","base64data":$scope.promoShot.substring($scope.promoShot.indexOf(',')+1)})
193                .success(function (response) {
194                    totalUpload++;
195                    if (response.success) {
196                        if(totalUpload==cnt){
197                            profileDetailBlock.stop();
198                        }
199                        $scope.promoShotFileName=null;
200                    }
201                    else {
202                        if(totalUpload==cnt){
203                            profileDetailBlock.stop();
204                        }
205                        console.log('Error',response.message);
206                    
207                    }
208                })
209                .error(function (response) {
210                    console.log('Error','Error While loading upcommung event detail');
211                });
212            }
213        }
214
215        $scope.loadPics=function(){
216            var cnt=3;
217            var totalUpload=0;
218
219            var profileDetailBlock = blockUI.instances.get('imageSection');
220            profileDetailBlock.start('Uploading Image ...');
221
222            ClientProfileService.loadPicture({ "pictureType":"headshot"})
223            .success(function (response) {
224                totalUpload++;
225                if (response.success) {
226                    if(totalUpload==cnt){
227                        profileDetailBlock.stop();
228                    }
229                    if(response.ProfilePic!=null && response.ProfilePic!=''){
230                        $scope.headShot = 'data:image/png;base64,'+response.ProfilePic;
231                    }
232                    
233                }
234                else {
235                    if(totalUpload==cnt){
236                        profileDetailBlock.stop();
237                    }
238                    console.log('Error',response.message);
239                
240                }
241            })
242            .error(function (response) {
243                console.log('Error','Error While loading upcommung event detail');
244            });
245
246            ClientProfileService.loadPicture({ "pictureType":"bodyshot"})
247            .success(function (response) {
248                totalUpload++;
249                if (response.success) {
250                    if(totalUpload==cnt){
251                        profileDetailBlock.stop();
252                    }
253                    if(response.ProfilePic!=null && response.ProfilePic!=''){
254                        $scope.bodyShot = 'data:image/png;base64,'+response.ProfilePic;
255                    }
256                }
257                else {
258                    if(totalUpload==cnt){
259                        profileDetailBlock.stop();
260                    }
261                    console.log('Error',response.message);
262                
263                }
264            })
265            .error(function (response) {
266                console.log('Error','Error While loading upcommung event detail');
267            });
268        
269            ClientProfileService.loadPicture({ "pictureType":"promotion"})
270            .success(function (response) {
271                totalUpload++;
272                if (response.success) {
273                    if(totalUpload==cnt){
274                        profileDetailBlock.stop();
275                    }
276                    if(response.ProfilePic!=null && response.ProfilePic!=''){
277                        $scope.promoShot = 'data:image/png;base64,'+response.ProfilePic;
278                    }
279                }
280                else {
281                    if(totalUpload==cnt){
282                        profileDetailBlock.stop();
283                    }
284                    console.log('Error',response.message);
285                
286                }
287            })
288            .error(function (response) {
289                console.log('Error','Error While loading upcommung event detail');
290            });
291            
292        }
293
294        $scope.selectFile =function(files, errFiles,type){
295            var file=undefined;
296            filename=undefined;
297            if(errFiles.length>0){
298                Notifications.warn((errFiles[0].$error=="maxSize"?"Max file size exceeded,File must be less then 5 MB":"Someting went wrong"));
299                
300                return;
301            }else{
302            if(files.length>0){
303                    file=files[0];
304                    if(type=='headShot') $scope.headShotFileName=file.name;
305                    if(type=='bodyShot') $scope.bodyShotFileName=file.name;
306                    if(type=='promoShot') $scope.promoShotFileName=file.name;
307                }
308                Upload.base64DataUrl(files).then(function(urls){
309                    if(type=='headShot') $scope.headShot=urls[0];
310                    if(type=='bodyShot') $scope.bodyShot=urls[0];
311                    if(type=='promoShot') $scope.promoShot=urls[0];
312                    
313                });
314            }
315
316            
317        }
318        $scope.certificateBody;
319        $scope.certificateFileName;
320        $scope.uploadCertificate =function(files, errFiles,type){
321            var file=undefined;
322            filename=undefined;
323            if(errFiles.length>0){
324                Notifications.warn((errFiles[0].$error=="maxSize"?"Max file size exceeded,File must be less then 5 MB":"Someting went wrong"));
325                
326                return;
327            }else{
328                if(files.length>0){
329                    file=files[0];
330                    $scope.certificateFileName=file.name;
331                }
332                Upload.base64DataUrl(files).then(function(urls){
333                    $scope.certificateBody=urls[0];
334                });
335            }
336        }
337        $scope.resumeContent;
338        $scope.resumeFileName;
339        $scope.uploadResume =function(files, errFiles){
340            if(files.length>0){
341                $scope.resumeFileName=files[0].name;
342            }
343            Upload.base64DataUrl(files).then(function(urls){
344                $scope.resumeContent=urls[0];
345            });
346
347            
348        }
349        $scope.saveResume=function(){
350            if($scope.resumeFileName==undefined){
351                Notifications.warn('Please select file first');
352                return;
353            }
354            
355            var profileDetailBlock = blockUI.instances.get('experienceSection');
356            profileDetailBlock.start('Uploading Resume ...');
357
358            if($scope.resumeFileName!=null){
359                ClientProfileService.uploadResumeFile({ "fileName":$scope.resumeFileName,"ResumeData":$scope.resumeContent.substring($scope.resumeContent.indexOf(',')+1)})
360                .success(function (response) {
361                    if (response.success) {
362                        profileDetailBlock.stop();
363                        $scope.resumeFileName=null;
364                    }
365                    else {
366                        
367                        profileDetailBlock.stop();
368                        console.log('Error',response.message);
369                    
370                    }
371                })
372                .error(function (response) {
373                    console.log('Error','Error While loading upcommung event detail');
374                });
375            }
376            
377        }
378
379        $scope.switchEditMode=function(editmode){
380           
381            if(editmode==false){
382                $scope.updateProfileData();
383            }else{
384                $scope.profileEditMode=editmode;
385                $scope.profileEdit.Birthdate=new Date($scope.profileEdit.Birthdate);
386                $scope.profileEdit.Date_of_Hire__c=new Date($scope.profileEdit.Date_of_Hire__c);
387    
388            }
389        }
390        $scope.loadExistingCertificates=function(){
391            var profileDetailBlock = blockUI.instances.get('certificateSection');
392            profileDetailBlock.start('loading certificate ...');
393            ClientProfileService.existingcertificateandpermits()
394            .success(function (response) {
395              
396                if (response.success) {
397                    profileDetailBlock.stop();
398                    var data= response.data;
399                    for(var i in data){
400                        data[i].Permit_Certification_Expiration_Date__c=new Date(data[i].Permit_Certification_Expiration_Date__c);
401                    }
402                    
403                    $scope.existingCertificates = response.data;
404                }
405                else {
406                    profileDetailBlock.stop();
407                    console.log('Error',response.message);
408                   
409                }
410            })
411            .error(function (response) {
412                console.log('Error','Error While loading upcommung event detail');
413            });
414        }
415        $scope.loadCertificateReason=function(){
416            ClientProfileService.reasonpicklistvalues()
417            .success(function (response) {
418              
419                if (response.success) {
420                    $scope.reasonpicklist = response.data;
421                }
422                else {
423                    console.log('Error',response.message);
424                   
425                }
426            })
427            .error(function (response) {
428                console.log('Error','Error While loading upcommung event detail');
429            });
430        }
431        $scope.loadStateWiseCertificate=function(){
432             ClientProfileService.statewisecertificate()
433            .success(function (response) {
434              
435                if (response.success) {
436                    var permits={}
437                    var stateWiseData=response.data;
438                    for(var i in stateWiseData){
439                        permits[stateWiseData[i].State]=stateWiseData[i].Permits;
440                    }
441                    $scope.PermitsData=permits;
442                    $scope.stateWisePermits = response.data;
443                }
444                else {
445                    console.log('Error',response.message);
446                   
447                }
448            })
449            .error(function (response) {
450                console.log('Error','Error While loading upcommung event detail');
451            });
452        }
453
454        $scope.createUpdateCertificationDetail=function(data){
455            console.log('createCertificationDetail',data);
456            var finalData=JSON.parse(JSON.stringify(data));
457            if(data.Permit_Certification_Expiration_Date__c!=null){
458                var dt=data.Permit_Certification_Expiration_Date__c;
459                finalData.Permit_Certification_Expiration_Date__c=dt.getFullYear() + "-" + (dt.getMonth() + 1) + "-" + dt.getDate();
460            }
461            if($scope.certificateFileName!=null && $scope.certificateBody!=null){
462                finalData.fileName=$scope.certificateFileName;
463                finalData.certificateBody=$scope.certificateBody.substring($scope.certificateBody.indexOf(',')+1);
464            }
465            
466            var profileDetailBlock = blockUI.instances.get('certificateSection');
467            profileDetailBlock.start('create certificate ...');
468            ClientProfileService.updatecertificateandpermits(finalData)
469            .success(function (response) {
470              
471                if (response.success) {
472                    profileDetailBlock.stop();
473                    data.Id=response.certificateId;
474                    $scope.editCertificateClass=false;
475                    $scope.addCertificateClass=false;
476                }
477                else {
478                    profileDetailBlock.stop();
479                    $scope.editCertificateClass=false;
480                    $scope.addCertificateClass=false;
481                    console.log('Error',response.message);
482                   
483                }
484            })
485            .error(function (response) {
486                console.log('Error','Error While loading upcommung event detail');
487            });
488        }
489
490        
491
492        $scope.updateExperianceDetail=function(){
493            console.log('experiances',$scope.experiances);
494            
495
496            var profileDetailBlock = blockUI.instances.get('experienceSection');
497            profileDetailBlock.start('updating experiances ...');
498            ClientProfileService.updateExperiances({"experiances" : $scope.experiances})
499            .success(function (response) {
500              
501                if (response.success) {
502                    profileDetailBlock.stop();
503                    $scope.editExperianceClass=false;
504                    $scope.addExperianceClass=false;
505                }
506                else {
507                    profileDetailBlock.stop();
508                    $scope.editExperianceClass=false;
509                    $scope.addExperianceClass=false;
510                    console.log('Error',response.message);
511                   
512                }
513            })
514            .error(function (response) {
515                console.log('Error','Error While loading upcommung event detail');
516            });
517        }
518
519        $scope.updateSkills=function(){
520            console.log('skill',$scope.skillSets);
521            var skilltoUpdate=[];
522            for(var i in $scope.skillSets){
523                if( $scope.skillSets[i].isSelected){
524                    skilltoUpdate.push({"Name": $scope.skillSets[i].value});
525                }
526            }
527
528            var profileDetailBlock = blockUI.instances.get('skillSection');
529            profileDetailBlock.start('updating skills ...');
530            ClientProfileService.updateSkills({"skills" : skilltoUpdate})
531            .success(function (response) {
532              
533                if (response.success) {
534                    profileDetailBlock.stop();
535                   
536                }
537                else {
538                    profileDetailBlock.stop();
539                    console.log('Error',response.message);
540                   
541                }
542            })
543            .error(function (response) {
544                console.log('Error','Error While loading upcommung event detail');
545            });
546        }
547        $scope.updateProfileData=function(){
548            console.log('skill',$scope.profileEdit);
549            var dataToupdate={};
550            var hireDate=$scope.profileEdit.Date_of_Hire__c;
551            dataToupdate.Date_of_Hire__c=hireDate.getFullYear() + "-" + (((hireDate.getMonth() + 1)>9)?(hireDate.getMonth() + 1):('0'+(hireDate.getMonth() + 1))) + "-" + (((hireDate.getDate())>9)?(hireDate.getDate()):('0'+(hireDate.getDate())));
552            var birthDate=$scope.profileEdit.Birthdate;
553            dataToupdate.Birthdate=birthDate.getFullYear() + "-" + (((birthDate.getMonth() + 1)>9)?(birthDate.getMonth() + 1):('0'+(birthDate.getMonth() + 1))) + "-" +(((birthDate.getDate())>9)?(birthDate.getDate()):('0'+(birthDate.getDate())));
554
555            dataToupdate.MailingStreet= $scope.profileEdit.MailingStreet;
556            dataToupdate.MailingCity= $scope.profileEdit.MailingCity;
557            dataToupdate.MailingState= $scope.profileEdit.MailingState;
558			dataToupdate.MailingPostalCode= $scope.profileEdit.MailingPostalCode;
559            dataToupdate.Gender__c= $scope.profileEdit.Gender__c;
560            dataToupdate.Race__c= $scope.profileEdit.Race__c;
561            dataToupdate.What_languages_to_you_speak__c= $scope.profileEdit.What_languages_to_you_speak__c;
562            dataToupdate.Bio__c= $scope.profileEdit.Bio__c;
563
564            var profileDetailBlock = blockUI.instances.get('profileSection');
565            profileDetailBlock.start('updating profile ...');
566            ClientProfileService.updateProfile(dataToupdate)
567            .success(function (response) {
568              
569                if (response.success) {
570                    profileDetailBlock.stop();
571                    var hireDate=$scope.profileEdit.Date_of_Hire__c;
572                    $scope.profileEdit.Date_of_Hire__c=hireDate.getFullYear() + "-" + (((hireDate.getMonth() + 1)>9)?(hireDate.getMonth() + 1):('0'+(hireDate.getMonth() + 1))) + "-" +(((hireDate.getDate())>9)?(hireDate.getDate()):('0'+(hireDate.getDate())));
573                    var birthDate=$scope.profileEdit.Birthdate;
574                    $scope.profileEdit.Birthdate=birthDate.getFullYear() + "-" + (((birthDate.getMonth() + 1)>9)?(birthDate.getMonth() + 1):('0'+(birthDate.getMonth() + 1))) + "-" + (((birthDate.getDate())>9)?(birthDate.getDate()):('0'+(birthDate.getDate())));
575
576                    
577                    $rootScope.updateprofile($scope.profileEdit ); 
578                    
579                    $scope.profileEditMode=false;
580                }
581                else {
582                    profileDetailBlock.stop();
583                    console.log('Error',response.message);
584                   
585                }
586            })
587            .error(function (response) {
588                console.log('Error','Error While loading upcommung event detail');
589            });
590        }
591
592        $scope.loadSkillSets = function () {
593            var profileDetailBlock = blockUI.instances.get('skillSection');
594            profileDetailBlock.start('loading skills ...');
595            ClientProfileService.loadskilsetlist()
596            .success(function (response) {
597              
598                if (response.success) {
599                    profileDetailBlock.stop();
600                    for(var i in response.data){
601                        response.data[i].id=response.data[i].value.replace(/\s/g,"_");
602                    }
603                    $scope.skillSets = response.data;
604                }
605                else {
606                    profileDetailBlock.stop();
607                    console.log('Error',response.message);
608                   
609                }
610            })
611            .error(function (response) {
612                console.log('Error','Error While loading upcommung event detail');
613            });
614        };
615        $scope.loadExistingExperiace = function () {
616            var profileDetailBlock = blockUI.instances.get('experienceSection');
617            profileDetailBlock.start('loading experience ...');
618            ClientProfileService.loadExistingExperiace()
619            .success(function (response) {
620              
621                if (response.success) {
622                    profileDetailBlock.stop();
623                    
624                    $scope.experiances = response.experiances;
625                }
626                else {
627                    profileDetailBlock.stop();
628                    console.log('Error',response.message);
629                   
630                }
631            })
632            .error(function (response) {
633                console.log('Error','Error While loading upcommung event detail');
634            });
635        };
636
637        $scope.loadQuizDetail = function () {
638            var profileDetailBlock = blockUI.instances.get('quizSection');
639            profileDetailBlock.start('quiz detail ...');
640            ClientProfileService.quizDetail({ "Type":"QuizMaster"})
641            .success(function (response) {
642              
643                if (response.success) {
644                    profileDetailBlock.stop();
645                    for(var i in response.data){
646                        response.data[i].Link__c=$sce.trustAsResourceUrl(response.data[i].Link__c);
647                    }
648                    $scope.QuizMasters = response.data;
649                }
650                else {
651                    profileDetailBlock.stop();
652                    console.log('Error',response.message);
653                   
654                }
655            })
656            .error(function (response) {
657                console.log('Error','Error While loading upcommung event detail');
658            });
659        };
660        $scope.getGenderAndRateValue = function () {
661            ClientProfileService.getGenderAndRatePicklist()
662            .success(function (response) {
663              
664                if (response.success) {
665                    $scope.GenderList=response.data.Gender;
666                    $scope.RaceList=response.data.Race;
667                }
668                else {
669                    console.log('Error',response.message);
670                   
671                }
672            })
673            .error(function (response) {
674                console.log('Error','Error While loading upcommung event detail');
675            });
676        };
677
678
679        $scope.init = function(){
680            $scope.profileEdit=$rootScope.profile();
681            $scope.getGenderAndRateValue();
682            $scope.EditRegion=($scope.profileEdit.Sub_Regions_Worked__c==undefined || $scope.profileEdit.Sub_Regions_Worked__c=='')?[]:$scope.profileEdit.Sub_Regions_Worked__c.split(';')
683            console.log('ClientProfileManageController loaded!');
684            $scope.regions=($rootScope.profile().Sub_Regions_Worked__c==undefined || $rootScope.profile().Sub_Regions_Worked__c=='')?[]:$rootScope.profile().Sub_Regions_Worked__c.split(';')
685            
686        };
687
688        $scope.init();
689    }
690]);
691
692client.controller('HelpController', [
693    '$scope', '$rootScope', '$state', '$stateParams', 'ClientProfileService',  'blockUI', '$filter', '$appCache','$sce','Notifications',
694    function ($scope, $rootScope, $state, $stateParams, ClientProfileService, blockUI, $filter, $appCache,$sce,Notifications) {
695        $scope.subject;
696        $scope.body;
697        $scope.mail={}
698        $scope.sendEmailWithDetail = function () {
699
700            if($scope.mail.subject==null || $scope.mail.subject.trim()=='' || $scope.mail.body==null || $scope.mail.body.trim()==""){
701                Notifications.warn('Please Fill all fields');
702                return;
703            }
704            var profileDetailBlock = blockUI.instances.get('helpSection');
705            profileDetailBlock.start('Sending Email ...');
706            ClientProfileService.sendemail({"subject":$scope.mail.subject,"body":$scope.mail.body})
707            .success(function (response) {
708              
709                if (response.success) {
710                    profileDetailBlock.stop();
711                    Notifications.success('Email Send Successfully');
712                    
713                }
714                else {
715                    profileDetailBlock.stop();
716                    console.log('Error',response.message);
717                   
718                }
719            })
720            .error(function (response) {
721                console.log('Error','Error While loading my event detail');
722            });
723        };
724
725        $scope.init = function () {
726            console.log('HelpController loaded!');
727            $scope.reportTo=$rootScope.profile().ReportsToEmail;
728            $scope.reportPhone=$rootScope.profile().ReportsToPhone;
729        };
730        $scope.init();
731    }
732]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.