var AcademicDiplomaManagementController=function(n,t,i,r){n.InitialDefaultOptions=function(){n.AcademicDiplomasSearchResults=[];n.PostGraduateUniversitiesSearchResults=[];n.searchAcademicDiploma="";n.searchPostGraduateUniversity="";n.showPaging=!0;n.totalItemsAcademicDiploma=0;n.currentPageAcademicDiploma=1;n.viewby=20;n.itemsPerPageAcademicDiploma=20;n.currentPostGraduateUniversityPage=1;n.itemsPerPagePostGraduateUniversity=20;n.currentAcademicDiplomas={};n.currentPostGraduateUniversities={}};n.addAcademicDiplomaDisable=!0;n.searchAcademicDiplomaDisable=!0;n.addsearchPostGraduateUniversityDisable=!1;n.InitialDefaultOptions();n.AcademicCountries=[];n.AllPostGraduateUniversities=[];n.AllAcademicQualifications=[];n.isFullscreen=!1;n.changeAcademicCountry=function(){n.AllPostGraduateUniversitiesSelect=n.AllPostGraduateUniversities.filter(function(t){return t.CountryId==n.currentAcademicDiplomas.CountryId});n.currentAcademicDiplomas.PostGraduateUniversitiesId=n.AllPostGraduateUniversitiesSelect[0].Id};n.handleSearchResultsFullscreen=function(t){var i=!t.currentTarget.closest(".portlet").classList.contains("portlet-fullscreen");n.isFullscreen=i};n.compareByDescription=function(n,t){var i=n.Description.toUpperCase(),r=t.Description.toUpperCase(),u=/^[\u0370-\u03FF]/.test(i),f=/^[\u0370-\u03FF]/.test(r);return u&&!f?-1:!u&&f?1:i.localeCompare(r)};Promise.all([i.getByAll("/api/PersonAcademicQualification/getAllPostGraduateUniversities"),i.getByAll("/api/Country/getCountriesDto")]).then(function(t){var r,i;n.AllPostGraduateUniversities=t[0];n.AllPostGraduateUniversities.sort(n.compareByDescription);n.AllPostGraduateUniversitiesSelect=n.AllPostGraduateUniversities.filter(function(n){return n.CountryId==3});r=[...new Set(n.AllPostGraduateUniversities.map(function(n){return n.CountryId}))];n.AcademicCountries=t[1];n.AllAcademicCountries=n.AcademicCountries;n.AllAcademicCountries.sort(function(n,t){return n.Description.localeCompare(t.Description)});i=n.AllAcademicCountries.filter(function(n){return n.Id==3})[0];n.AcademicCountries.splice(n.AcademicCountries.indexOf(i),1);n.AcademicCountries.unshift(i);n.AcademicCountries=n.AllAcademicCountries.filter(function(n){return r.indexOf(n.Id)>-1});n.addAcademicDiplomaDisable=!1;n.searchAcademicDiplomaDisable=!1}).catch(function(n){r.pop("error","Μήνυμα λάθους",n.data)});i.getByAll("/api/PersonAcademicQualification/getAllAcademicQualifications").then(function(t){n.AllAcademicQualifications=t},function(n){r.pop("error","Μήνυμα λάθους",n.data)});n.clickTab1=function(){n.InitialDefaultOptions();n.addsearchPostGraduateUniversityDisable=!1};n.cancelAddAcademicDiplomas=function(){n.AcademicDiplomasSearchResults=n.AcademicDiplomasSearchResults.filter(function(n){return n.Mode!="add"});n.addAcademicDiplomaDisable=!1};n.cancelAddPostGraduateUniversities=function(){n.PostGraduateUniversitiesSearchResults=n.PostGraduateUniversitiesSearchResults.filter(function(n){return n.Mode!="add"});n.addsearchPostGraduateUniversityDisable=!1};n.clickTab2=function(){n.InitialDefaultOptions();n.addAcademicDiplomaDisable=!1};n.Validate=function(){n.validSubmit=!0;n.validateMessages=[];(n.currentAcademicDiplomas.DiplomaTitle==null||n.currentAcademicDiplomas.DiplomaTitle.trim().length==0)&&(n.validSubmit=!1,n.validateMessages.push({title:"Μή συμπληρωμένος Τίτλος Διπλώματος",desc:"Δεν έχει συμπληρωθεί Τίτλος Διπλώματος"}));n.currentAcademicDiplomas.PostGraduateUniversitiesId||(n.validSubmit=!1,n.validateMessages.push({title:"Μή επιλεγμένο Πανεπιστήμιο",desc:"Δεν έχει Επιλεχθεί Πανεπιστήμιο"}))};n.searchViaEnterKeyPostGraduates=function(t){t.which===13&&(t.preventDefault(),n.academicDiplomaSearch())};n.searchViaEnterKeyUniversity=function(t){t.which===13&&(t.preventDefault(),n.getPostGraduateUniversitiesByKeyword())};n.editAcademicDiplomas=function(t){n.cancelAddAcademicDiplomas();n.currentAcademicDiplomas=angular.copy(t);n.currentAcademicDiplomas.RelevancySMEAE=t.RelevancySMEAE.toString();n.currentAcademicDiplomas.RelevancySchoolPsychology=t.RelevancySchoolPsychology.toString();n.currentAcademicDiplomas.HasPedagogicalCompetency=t.HasPedagogicalCompetency.toString();n.currentAcademicDiplomas.YARelevancyFlag=t.YARelevancyFlag===null?"":t.YARelevancyFlag.toString();n.currentAcademicDiplomas.IsInList=t.IsInList?t.IsInList.toString():"true";n.AllPostGraduateUniversitiesSelect=n.AllPostGraduateUniversities.filter(function(t){return t.CountryId==n.currentAcademicDiplomas.CountryId});n.currentAcademicDiplomas.ActiveEdit=!0;n.currentAcademicDiplomas.Mode="edit"};n.editPostGraduateUniversity=function(t){n.currentPostGraduateUniversities=angular.copy(t);n.currentPostGraduateUniversities.Id=t.Id.toString();n.currentPostGraduateUniversities.CountryId=t.CountryId;n.currentPostGraduateUniversities.ActiveEdit=!0;n.currentPostGraduateUniversities.Mode="edit"};n.checkUpdateOrInsertAcademicDiploma=function(){if(n.Validate(),!n.validSubmit){n.validateMessages.forEach(function(n){r.pop("warning",n.title,n.desc,5e3)});return}$("#AcademicDiplomaAddOrEdit").modal("show")};n.checkUpdateOrInsertPostGraduateUniversities=function(){$("#PostGraduateUniversitiesAddOrEdit").modal("show")};n.UpdateOrInsertPostGraduateUniversity=function(){var t={};t.Description=n.currentPostGraduateUniversities.Description;t.CountryId=n.currentPostGraduateUniversities.CountryId;n.currentPostGraduateUniversities.Mode=="add"&&i.postByParams(t,"/api/Management/InsertPostGraduateUniversity").then(function(){$("#PostGraduateUniversitiesAddOrEdit").modal("hide");n.getPostGraduateUniversitiesByKeyword(t.Description);n.searchPostGraduateUniversity=t.Description;r.pop("success","Επιτυχής Εισαγωγή","Η εισαγωγή του Πανεπιστημίου ολοκληρώθηκε με επιτυχία.")},function(n){r.pop("error","Μήνυμα λάθους",n.data)});n.currentPostGraduateUniversities.Mode=="edit"&&(t.Id=n.currentPostGraduateUniversities.Id,i.postByParams(t,"/api/Management/UpdatePostGraduateUniversity").then(function(){$("#PostGraduateUniversitiesAddOrEdit").modal("hide");n.getPostGraduateUniversitiesByKeyword(t.Description);r.pop("success","Επιτυχής Ενημέρωση","Η ενημέρωση του Πανεπιστημίου ολοκληρώθηκε με επιτυχία.")},function(n){r.pop("error","Μήνυμα λάθους",n.data)}))};n.getPostGraduateUniversitiesByKeyword=function(t=false){var u;u=t==!1?n.searchPostGraduateUniversity:t;i.getByParams({Keyword:u},"/api/Management/getPostGraduateUniversitiesByKeyword").then(function(t){n.PostGraduateUniversitiesSearchResults=t;n.PostGraduateUniversitiesSearchResults.forEach(function(n){n.Mode="edit"});n.addsearchPostGraduateUniversityDisable=!1;n.searchPostGraduateUniversity=u;n.currentPostGraduateUniversities.ActiveEdit=!1},function(n){r.pop("error","Μήνυμα λάθους",n.data)})};n.UpdateOrInsertAcademicDiploma=function(){var t=n.currentAcademicDiplomas,u=n.AllPostGraduateUniversities.filter(n=>n.Id===t.PostGraduateUniversitiesId)[0].Description;t.Description=u+" / "+t.DiplomaTitle;t.Description=t.Description;n.currentAcademicDiplomas.Mode=="add"&&i.postByParams(t,"/api/Management/InsertAcademicDiploma").then(function(){$("#AcademicDiplomaAddOrEdit").modal("hide");n.academicDiplomaSearch(t.Description);n.searchAcademicDiploma=t.Description;r.pop("success","Επιτυχής Εισαγωγή","Η εισαγωγή των στοιχείων του Μεταπτυχιακού Τίτλου ολοκληρώθηκε με επιτυχία.")},function(n){r.pop("error","Μήνυμα λάθους",n.data)});n.currentAcademicDiplomas.Mode=="edit"&&i.postByParams(t,"/api/Management/UpdateAcademicDiploma").then(function(){$("#AcademicDiplomaAddOrEdit").modal("hide");n.academicDiplomaSearch(t.DiplomaTitle);n.searchAcademicDiploma=t.DiplomaTitle;r.pop("success","Επιτυχής Ενημέρωση","Η ενημέρωση των στοιχείων του Μεταπτυχιακού Τίτλου ολοκληρώθηκε με επιτυχία.")},function(n){r.pop("error","Μήνυμα λάθους",n.data)})};n.academicDiplomaSearch=function(t=false){var u;u=t==!1?n.searchAcademicDiploma:t;i.getByParams({Keyword:u},"/api/Management/getAcademicDiplopmasByKeyWord").then(function(t){n.AcademicDiplomasSearchResults=t;n.AcademicDiplomasSearchResults.forEach(function(n){n.Mode="edit"});n.currentAcademicDiplomas={};n.addAcademicDiplomaDisable=!1;n.totalItemsAcademicDiploma=n.AcademicDiplomasSearchResults.length},function(n){r.pop("error","Μήνυμα λάθους",n.data)})};n.addAcademicDiploma=function(){n.addAcademicDiplomaDisable=!0;n.currentAcademicDiplomas.ActiveEdit=!1;var t={};t.Mode="add";t.RelevancySMEAE="false";t.RelevancySchoolPsychology="false";t.HasPedagogicalCompetency="false";t.YARelevancyFlag="false";t.IsInList="true";t.Description="";t.CountryId=3;t.PostGraduateUniversitiesId=0;t.DiplomaTitle="";n.AllPostGraduateUniversitiesSelect=n.AllPostGraduateUniversities.filter(function(n){return n.CountryId==3});n.currentAcademicDiplomas={};n.currentAcademicDiplomas.Mode=t.Mode;n.currentAcademicDiplomas.RelevancySMEAE=t.RelevancySMEAE;n.currentAcademicDiplomas.RelevancySchoolPsychology=t.RelevancySchoolPsychology;n.currentAcademicDiplomas.HasPedagogicalCompetency=t.HasPedagogicalCompetency;n.currentAcademicDiplomas.YARelevancyFlag=t.YARelevancyFlag;n.currentAcademicDiplomas.IsInList=t.IsInList;n.currentAcademicDiplomas.Description=t.Description;n.currentAcademicDiplomas.CountryId=t.CountryId;n.currentAcademicDiplomas.PostGraduateUniversitiesId=t.PostGraduateUniversitiesId;n.currentAcademicDiplomas.DiplomaTitle=t.DiplomaTitle;n.currentAcademicDiplomas.PostGraduateUniversitiesId=n.AllPostGraduateUniversitiesSelect[0].Id;n.AcademicDiplomasSearchResults=[t].concat(n.AcademicDiplomasSearchResults)};n.addPostGraduateUniversity=function(){n.addsearchPostGraduateUniversityDisable=!0;n.currentPostGraduateUniversities.ActiveEdit=!1;var t={};t.Mode="add";t.Description="";t.CountryId=3;n.currentPostGraduateUniversities={};n.currentPostGraduateUniversities.Mode=t.Mode;n.currentPostGraduateUniversities.Description=t.Description;n.currentPostGraduateUniversities.CountryId=t.CountryId;n.PostGraduateUniversitiesSearchResults=[t].concat(n.PostGraduateUniversitiesSearchResults)}},AcademicQualificationsController,AcademicQualificationsControllerRef,AcademicStudiesController,AlgorithmHistoryController,AnnouncementsController,AssociateController,ChangeDataRequest,ChangePasswordController,ClassificationSubstituteController,DeleteChangeDataRequestFileController,DiplomaDateLimitationController,DiplomaManagmentController,DiplomaSpecialityManagmentController,dropdownsController,editAcademicQualification,EditFekController,editMusicSpeciality,editPerson,EditPersonConfirmation,editSpecialEducation,editSpeciality,EducationDirectorsController,FileUploadController,ForgotPasswordController,HistoryController,HomePageController,HourlyTeacherController,HourlyTeacherMusicController,HourlyTeacherMusicForEM16Controller,HourlyTeacherSMEAController,InsertGapHoursInitController,InsertGapInitController,InsertPlacementGapController,IntendancyController,IntendancyInterviewPointsController,LandingPageController,LoginController,ManagmentStatusSecondmentApplications,ManagmentUserAction,OnlineController,OnlineCreditsController,OpenModalController,OpenModalContentUpdateRegions,OpenModalPendingAdasController,CheckDocumentsController,UpdFekController,ChangeLockedDataController,OpenModalIdentificationController,openUploadModalDataController,PermanentController,PermanentEEPEBPController,PermanentMusicController,PermanentSMEAController,PersonComments,PrefectureController,PrefectureInterviewPointsController,PresenceDatesManagmentController,PrintSecondmentRequestController,ProfileMenuController,QualificationsController,RecruitmentServiceAssumed,RefreshController,RegionAndUnitModifications,RemediationController,RemediationMusicController,RemediationSMEAController,ReportsBabisController,ReportsController,ResetPasswordController,search,SearchFekController,SecondmentArtisticController,SecondmentBody1920Controller,SecondmentBodyController,SecondmentBodyRefController,SecondmentBodySepController,SecondmentBodyTechnicalController,SecondmentChurchController,SecondmentEEPEBPController,SecondmentGeneralController,SecondmentGeneralManagmentController,SecondmentKesyController,SecondmentManagement,SecondmentMusicController,SecondmentPyspdeChurchController,SecondmentPyspdeSmeaController,SecondmentResults,SecondmentUpdateTransfer,SeminarManagmentController,ShowAlgorithmResultsController,ShowApplicationPerIntendancy,ShowChangeDataRequestController,showTotalPointsController,ShowTrackChanges,ShowUncheckedDocuments,SignupController,SocialCriteriaController,SpecialityController,SpecialityNewController,StudiesController,Substitute3monthsController,SubstituteController,SubstituteEEPEBP3monthsController,SubstituteEEPEBPController,SubstituteEEPEBPForSchoolController,SubstituteForSchoolController,SubstituteMusic3monthsController,SubstituteMusicController,SubstitutePE8702SchoolController,SubstitutePlacementSchoolController,SubstituteSMEA3monthsController,SubstituteSMEAController,SubstituteSMEAForSchoolController,SubstituteTE0130SchoolController,SubsystemController,TablePerSpecialityController,TokensManagerController,UISelectController,UpdateFekController,UpdateRegionsController,UpdateSubstituteRefRegionsController,UploadController,UserRoleController,ApplicationTypeFactory,ApplicationTypeFekFactory,ApplicationTypeRegionAndUnitFactory,AuthInterceptorService,AuthService,ClassificationFactory,GeneralFactory,HourlyTeacherFactory,HourlyTeacherMusicFactory,HourlyTeacherSmeaFactory,LandingPageFactory,ManagementFactory,PassParameters,PersonFactory,PersonMusicSpecialityFactory,PersonSpecialityFactory,RegionAndFactory,RouteFactory,SecondmentBody1920Factory,SecondmentBodyFactory,SecondmentBodyRefFactory,SecondmentBodySepFactory,SecondmentBodyTechnicalFactory,SecondmentChurchFactory,SecondmentKesyFactory,SecondmentPyspdeChurchFactory,SecondmentPyspdeSmeaFactory,SpecialityFactory,SubstituteEEPEBPFactory,SubstituteFactory,SubstituteMusicFactory,SubstituteSMEAFactory,TokensManagerService,OPSYDMVCApp,configFunction,serviceBase;AcademicDiplomaManagementController.$inject=["$scope","PassParameters","GeneralFactory","toaster"];AcademicQualificationsController=function(n,t,i,r,u,f,e,o,s,h,c){function v(t){f.getByParams({Id:t},"/api/PersonAcademicQualification/getPersonAcademicQualification").then(function(t){n.personAcademicQualifications=t;n.personAcademicQualificationsEEPEBP=e("filter")(n.personAcademicQualifications,function(n){return n.AcademicQualification.IsEEPEBP==!0});n.showDataTableEEPEBP=f.isEmptyValue(n.personAcademicQualificationsEEPEBP)?!1:!0;n.personAcademicQualificationsSMEA=e("filter")(n.personAcademicQualifications,function(n){return n.AcademicQualification.IsEEPEBP==!1});n.showDataTable=f.isEmptyValue(n.personAcademicQualificationsSMEA)?!1:!0;n.AddButton=n.personAcademicQualificationsSMEA.length==7&&n.personMessage.HasPe11||n.personAcademicQualificationsSMEA.length==4&&!n.personMessage.HasPe11?!1:!0;n.showMessages=!0;unblockUI("#divBlockUI")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά το φόρτωμα των προσόντων ειδικής αγωγής",3e3,"trustedHtml");unblockUI("#divBlockUI")})}function y(t){f.getByParams({Id:t},"/api/PersonSpeciality/getPersonSpecialitiesEEPEBPByPersonId").then(function(t){n.AvailableSpecListItems=t;n.showAddButtonEEPEBP=f.isEmptyValue(n.AvailableSpecListItems)?!1:!0;unblockUI("#divBlockUI")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά το φόρτωμα των προσόντων ειδικής αγωγής",3e3,"trustedHtml");unblockUI("#divBlockUI")})}function p(){return dto={Id:f.isEmptyValue(n.peracademicqual.Id)?"":n.peracademicqual.Id,PersonId:l,AcademicQualificationId:n.peracademicqual.AcademicQualification.Id,AcademicDiplomaId:f.isEmptyValue(n.peracademicqual.AcademicDiplomaId)?"":n.peracademicqual.AcademicDiplomaId,Diploma:{Id:"",Description:"",CountryId:""},DiplomaDate:n.peracademicqual.DiplomaDate,DiplomaDegree:n.peracademicqual.DiplomaDegree,DiplomaSource:f.isEmptyValue(n.peracademicqual.DiplomaSource)?"":n.peracademicqual.DiplomaSource,EquivalenceType:n.peracademicqual.EquivalenceType,Relevancy:f.isEmptyValue(n.peracademicqual.Relevancy)?0:n.peracademicqual.Relevancy,FirstSpeciality:f.isEmptyValue(n.peracademicqual.FirstSpeciality)?"":n.peracademicqual.FirstSpeciality,RelevancySMEAE:f.isEmptyValue(n.peracademicqual.RelevancySMEAE)?!1:n.peracademicqual.RelevancySMEAE,RelevancySpeciality:f.isEmptyValue(n.peracademicqual.RelevancySpeciality)?!1:n.peracademicqual.RelevancySpeciality,RelevancySchoolPhychology:f.isEmptyValue(n.peracademicqual.RelevancySchoolPhychology)?!1:n.peracademicqual.RelevancySchoolPhychology,CountClassification:"",IsConfirmed:f.isEmptyValue(n.peracademicqual.IsConfirmed)?!1:n.peracademicqual.IsConfirmed,IsEEPEBP:f.isEmptyValue(n.peracademicqual.AcademicQualification.IsEEPEBP)?!1:n.peracademicqual.AcademicQualification.IsEEPEBP,CreatedBy:"",CreationDate:"",CreatedUserRole:"",CreatedRegionAndUnitDescription:"",ModifiedBy:"",LastEditDate:"",ModifiedUserRole:"",ModifiedRegionAndUnitDescription:"",AcademicQualificationSpecialities:{Id:"",PersonAcademicQualificationId:"",PersonSpecialityId:""},PersonAcademicFile:{Id:"",PersonId:"",PersonAcademicQualificationId:0,FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",ContentType:"",IsActive:!1}},f.isEmptyValue(n.peracademicqual.DiplomaDegree)||(dto.DiplomaDegree=parseFloat(n.peracademicqual.DiplomaDegree.toString().replace(",","."))),f.isEmptyValue(n.peracademicqual.AcademicDiplomaId)&&!f.isEmptyValue(n.DiplomaAbroad)?dto.Diploma={Id:"",Description:n.DiplomaAbroad,CountryId:f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?"":n.peracademicqual.AcademicDiploma.Country.Id}:f.isEmptyValue(n.peracademicqual.AcademicDiplomaId)||f.isEmptyValue(n.DiplomaAbroad)?f.isEmptyValue(n.peracademicqual.AcademicDiploma)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Id)||(dto.AcademicDiplomaId=n.peracademicqual.AcademicDiploma.Id,dto.Diploma={Id:n.peracademicqual.AcademicDiploma.Id,Description:n.peracademicqual.AcademicDiploma.Description,CountryId:f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?"":n.peracademicqual.AcademicDiploma.Country.Id}):(dto.AcademicDiplomaId=n.peracademicqual.AcademicDiplomaId,dto.Diploma={Id:n.peracademicqual.AcademicDiplomaId,Description:n.DiplomaAbroad,CountryId:f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?"":n.peracademicqual.AcademicDiploma.Country.Id}),dto}var a,l;n.pageRules={};n.showMessages=!1;n.showAlertSpec=!1;n.showAlertRelevancy=!1;n.showDataTableEEPEBP=!1;n.AcademicQualificationEducation=!1;n.PersonSpecWithAcademicQualification=0;n.showAlertNoDeleteSpec=!1;n.showDownloadFile=!1;n.showUploadFile=!1;n.upload=[];n.messages={completed:"",percentage:"0",error:""};n.uploadedFileDetails="";n.SendDataForCVDto={Id:"",PersonAcademicQualificationId:"",PersonId:""};n.SendDataForCVFullDto={Id:"",PersonAcademicQualificationId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""};n.showAlertForUpload=!1;blockUI({target:"#divBlockUI",animate:!0});n.authentication.isAuth?(a="specSmea,specSmeaEEPEBP,spec",f.getByParams({role:n.authentication.role,codes:a},"/api/Subsystem/NewCheckPermission").then(function(t){var i=a.split(",");for(var r in i)n.pageRules[i[r]]=e("filter")(t,{Code:i[r]},!0)[0].Rules},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})):i.go("/");l=t.getPersonId();f.isValueInArray(f.getRoleCode(n.authentication.role),"u1, u2")&&(l=n.authentication.personId);n.SendDataForCVDto.PersonId=l;f.getByParams({personId:l},"/api/Person/getPersonSpecialitiesDetails").then(function(t){n.personMessage=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την εμφάνιση των μηνυμάτων του φακέλου σας.")});n.AddButton=!1;n.showAddButtonEEPEBP=!1;n.DisableFieldsEEPEBP={EEPEBP:!1,RelevancySchoolPhychology:!1};n.DisableOrVisibleFields={AcademicQualification:!0,FirstSpeciality:!1,DimplomaSource:!1,Country:!1,DiplomaDate:!1,DiplomaDegree:!1,DiplomaDateAndGrade:!1,AcademicDiploma:!1,DiplomaAbroad:!1,Relevancy:!1,EquivalenceType:!1,Save:!1};n.DisableField={DiplomaDegree:!1,DiplomaDate:!1};n.DisableFieldset=!1;n.ModalTitle="Προσθήκη Ακαδημαϊκών Προσόντων ΕΑΕ";n.Countries=[];n.diplomas=[];n.consts={};n.AcademicQualification={Id:"",IsChanged:!1};n.Country={Id:"",IsChanged:!1};n.DiplomaSource={Id:"",IsChanged:!1};n.delAcademicQualification;n.peracademicqual={};n.peracademicqual.RelevancySpeciality=!1;n.peracademicqual.AcademicQualification=[];n.peracademicqual.AcademicDiploma=[];n.peracademicqual.PersonId=l;n.FilterAcademicQualifications=[];n.AvailableSpecListItems=[];n.SelectedAvailSpecItems=[];n.updateMode=!1;v(l);y(l);n.fillFormControls=function(t){var u,i;if(n.peracademicqual.Id="",n.DiplomaAbroad="",n.uploadedFileDetails="",n.messages={completed:"",percentage:"0",error:""},n.SendDataForCVDto={Id:"",PersonAcademicQualificationId:"",PersonId:""},n.SendDataForCVFullDto={Id:"",PersonAcademicQualificationId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""},n.messages.completed="",t=="Add"?n.ModalTitle="Προσθήκη Ακαδημαϊκών Προσόντων ΕΑΕ":t=="AddEEPEBP"&&(n.ModalTitle="Προσθήκη Ακαδημαϊκών Προσόντων ΕΕΠ - ΕΒΠ"),n.AcademicQualificationEducation=!1,n.showUploadFile=!1,n.DisableOrVisibleFields.AcademicQualification=!0,n.AcademicQualification={Id:"",IsChanged:!1},n.Country={Id:"",IsChanged:!1},n.DiplomaSource={Id:"",IsChanged:!1},n.academicDiplomas="",n.peracademicqual.IsConfirmed="",n.DisableFieldset=!1,n.DisableField={DiplomaDegree:!1,DiplomaDate:!1},n.DisableFieldsEEPEBP.EEPEBP=!1,n.DisableFieldsEEPEBP.RelevancySchoolPhychology=!1,n.SelectedSpecListItems=[],n.SelectedSelectedSpecListItems=[],y(l),n.updateMode=!1,f.isEmpty(n.academicQualifications))f.getByAll("/api/PersonAcademicQualification/getAllAcademicQualification").then(function(i){var u,r;if(n.academicQualifications=i,t=="Add"){for(n.personMessage.HasPe11?angular.copy(e("filter")(n.academicQualifications,{IsEEPEBP:!1},!0),n.FilterAcademicQualifications):angular.copy(e("filter")(n.academicQualifications,{IsOnlyForPE11:!1,IsEEPEBP:!1},!0),n.FilterAcademicQualifications),n.ExistingAcademicQualifications=[],r=n.FilterAcademicQualifications.length-1;r>=0;r--)for(u=0;u<n.personAcademicQualifications.length;u++)n.FilterAcademicQualifications[r].Id===n.personAcademicQualifications[u].AcademicQualification.Id&&n.ExistingAcademicQualifications.push(r);for(n.ExistingAcademicQualifications=e("orderBy")(n.ExistingAcademicQualifications),r=n.ExistingAcademicQualifications.length-1;r>=0;r--)n.FilterAcademicQualifications.splice(n.ExistingAcademicQualifications[r],1)}else t=="AddEEPEBP"?angular.copy(e("filter")(n.academicQualifications,{IsEEPEBP:!0},!0),n.FilterAcademicQualifications):angular.copy(n.academicQualifications,n.FilterAcademicQualifications)},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});else if(t=="Add"){for(n.personMessage.HasPe11?angular.copy(e("filter")(n.academicQualifications,{IsEEPEBP:!1},!0),n.FilterAcademicQualifications):angular.copy(e("filter")(n.academicQualifications,{IsOnlyForPE11:!1,IsEEPEBP:!1},!0),n.FilterAcademicQualifications),n.ExistingAcademicQualifications=[],i=n.FilterAcademicQualifications.length-1;i>=0;i--)for(u=0;u<n.personAcademicQualifications.length;u++)n.FilterAcademicQualifications[i].Id===n.personAcademicQualifications[u].AcademicQualification.Id&&n.ExistingAcademicQualifications.push(i);for(n.ExistingAcademicQualifications=e("orderBy")(n.ExistingAcademicQualifications),i=n.ExistingAcademicQualifications.length-1;i>=0;i--)n.FilterAcademicQualifications.splice(n.ExistingAcademicQualifications[i],1)}else t=="AddEEPEBP"?angular.copy(e("filter")(n.academicQualifications,{IsEEPEBP:!0},!0),n.FilterAcademicQualifications):angular.copy(n.academicQualifications,n.FilterAcademicQualifications);f.isEmpty(n.consts.firstSpecialityType)&&f.getByAll("/api/PersonAcademicQualification/getFirstSpecialityTypes").then(function(t){n.consts.firstSpecialityType=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});f.isEmpty(n.consts.relevancies)&&f.getByAll("/api/PersonAcademicQualification/getRelevancies").then(function(t){n.consts.relevancy=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});f.isEmpty(n.consts.academicDiplomaSourceType)&&f.getByAll("/api/PersonAcademicQualification/getAcademicDiplomaSourceTypes").then(function(t){n.consts.academicDiplomaSourceType=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});f.isEmpty(n.consts.equivalenceType)&&f.getByAll("/api/PersonAcademicQualification/getAcademicEquivalenceTypes").then(function(t){n.consts.equivalenceType=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.DisableAlertsRelevancies=function(){n.showAlertRelevancy=!1;n.showAlertSpec=!1};n.formFields=function(){var t;f.isEmptyValue(n.peracademicqual.AcademicQualification)||(n.AcademicQualificationEducation=n.peracademicqual.AcademicQualification.Id==14?!0:!1,f.isEmptyValue(n.AcademicQualification.Id)?(n.AcademicQualification.Id=n.peracademicqual.AcademicQualification.Id,n.AcademicQualification.IsChanged=!1):n.AcademicQualification.Id!=n.peracademicqual.AcademicQualification.Id?(n.AcademicQualification.Id=n.peracademicqual.AcademicQualification.Id,n.AcademicQualification.IsChanged=!0):n.AcademicQualification.IsChanged=!1,n.showUploadFile=f.isEmptyValue(n.peracademicqual.AcademicQualification.Id)&&!f.isValueInArray(n.pageRules.specSmeaEEPEBP.CanAccess,"u1, u2")?!1:!0,f.isEmptyValue(n.DiplomaSource.Id)&&!f.isEmptyValue(n.peracademicqual.DiplomaSource)?(n.DiplomaSource.Id=n.peracademicqual.DiplomaSource,n.DiplomaSource.IsChanged=!1):f.isEmptyValue(n.DiplomaSource.Id)||f.isEmptyValue(n.peracademicqual.DiplomaSource)?n.DiplomaSource.IsChanged=!1:n.DiplomaSource.Id!=n.peracademicqual.DiplomaSource?(n.DiplomaSource.Id=n.peracademicqual.DiplomaSource,n.DiplomaSource.IsChanged=!0,n.peracademicqual.AcademicDiploma.Country=""):n.DiplomaSource.IsChanged=!1,!f.isEmptyValue(n.Country.Id)||f.isEmptyValue(n.peracademicqual.AcademicDiploma)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?f.isEmptyValue(n.Country.Id)||f.isEmptyValue(n.peracademicqual.AcademicDiploma)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?n.Country.IsChanged=!1:n.Country.Id!=n.peracademicqual.AcademicDiploma.Country.Id?(n.Country.Id=n.peracademicqual.AcademicDiploma.Country.Id,n.Country.IsChanged=!0):n.Country.IsChanged=!1:(n.Country.Id=n.peracademicqual.AcademicDiploma.Country.Id,n.Country.IsChanged=!1),n.peracademicqual.AcademicQualification.Id==3||n.peracademicqual.AcademicQualification.Id==4?(n.peracademicqual.FirstSpeciality="",n.peracademicqual.DiplomaDate="",n.peracademicqual.DiplomaDegree="",n.peracademicqual.DiplomaSource="",f.isEmptyValue(n.peracademicqual.AcademicDiploma)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||(n.peracademicqual.AcademicDiploma.Country=""),n.peracademicqual.EquivalenceType="",n.peracademicqual.AcademicDiploma="",n.DiplomaAbroad="",n.DisableOrVisibleFields={AcademicQualification:!0,FirstSpeciality:!1,DimplomaSource:!1,Country:!1,DiplomaDate:!1,DiplomaDegree:!1,DiplomaDateAndGrade:!1,AcademicDiploma:!1,DiplomaAbroad:!1,Relevancy:!1,EquivalenceType:!1,Save:!0}):n.peracademicqual.AcademicQualification.Id==14?(n.peracademicqual.FirstSpeciality="",n.peracademicqual.DiplomaDegree="",n.peracademicqual.DiplomaSource="",n.DisableFieldsEEPEBP.EEPEBP=n.peracademicqual.AcademicQualification.IsEEPEBP&&n.peracademicqual.DiplomaSource?!0:!1,f.isEmptyValue(n.peracademicqual.AcademicDiploma)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||(n.peracademicqual.AcademicDiploma.Country=""),n.peracademicqual.EquivalenceType="",n.DisableOrVisibleFields={AcademicQualification:!0,FirstSpeciality:!1,DimplomaSource:!1,Country:!1,DiplomaDate:!0,DiplomaDegree:!1,DiplomaDateAndGrade:!1,AcademicDiploma:!1,DiplomaAbroad:!0,Relevancy:!1,EquivalenceType:!1,Save:!0}):n.peracademicqual.AcademicQualification.Id==7?(n.peracademicqual.DiplomaSource="",f.isEmptyValue(n.peracademicqual.AcademicDiploma)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||(n.peracademicqual.AcademicDiploma.Country=""),n.peracademicqual.DiplomaDate="",n.peracademicqual.DiplomaDegree="",n.peracademicqual.EquivalenceType="",n.peracademicqual.AcademicDiploma="",n.peracademicqual.DiplomaAbroad="",n.DisableOrVisibleFields={AcademicQualification:!0,FirstSpeciality:!0,DimplomaSource:!1,Country:!1,DiplomaDate:!1,DiplomaDegree:!1,DiplomaDateAndGrade:!1,AcademicDiploma:!1,DiplomaAbroad:!1,Relevancy:!1,EquivalenceType:!1,Save:!0}):n.peracademicqual.AcademicQualification.Id==2||n.peracademicqual.AcademicQualification.Id==6?(n.peracademicqual.FirstSpeciality="",f.isEmptyValue(n.peracademicqual.AcademicDiploma)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||(n.peracademicqual.AcademicDiploma.Country=""),n.peracademicqual.EquivalenceType="",n.peracademicqual.AcademicDiploma="",f.isEmptyValue(n.peracademicqual.Id)&&(n.peracademicqual.Relevancy=!1),n.DisableOrVisibleFields={AcademicQualification:!0,DimplomaSource:!0,Country:!1,DiplomaDate:!0,DiplomaDegree:!0,DiplomaDateAndGrade:!0,AcademicDiploma:!1,DiplomaAbroad:!0,EquivalenceType:!1,Relevancy:f.isValueInArray(n.pageRules.specSmeaEEPEBP.CanAccess,"a, m1, m2"),Save:!0}):(f.isEmptyValue(n.peracademicqual.Id)&&(n.peracademicqual.Relevancy=!1),n.peracademicqual.FirstSpeciality="",n.peracademicqual.AcademicQualification.IsEEPEBP&&n.peracademicqual.DiplomaSource?(n.DisableFieldsEEPEBP.EEPEBP=!0,n.specialityPhychology=e("filter")(n.AvailableSpecListItems,{Code:"ΠΕ23"},!0)[0],n.DisableFieldsEEPEBP.RelevancySchoolPhychology=f.isEmptyValue(n.specialityPhychology)?!1:!0):(n.DisableFieldsEEPEBP.EEPEBP=!1,n.DisableFieldsEEPEBP.RelevancySchoolPhychology=!1),n.DisableOrVisibleFields.AcademicQualification=!0,n.DisableOrVisibleFields.DimplomaSource=!0,n.DisableOrVisibleFields.FirstSpeciality=!1,!f.isEmptyValue(n.peracademicqual.DiplomaSource)&&n.peracademicqual.DiplomaSource>1?(n.DisableOrVisibleFields.Country=!0,(n.AcademicQualification.IsChanged||f.isEmptyValue(n.countries)||n.countries[0].Id==3)&&(n.peracademicqual.AcademicQualification.IsEEPEBP?f.getByAll("/api/Country/getCountriesWithoutGreece").then(function(t){n.countries=t;n.academicDiplomas=""},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):f.getByParams({AcademicQualificationId:n.peracademicqual.AcademicQualification.Id},"/api/Country/getCountriesByAcademicQualificationId").then(function(t){n.countries=t;n.academicDiplomas=""},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})),(n.AcademicQualification.IsChanged||n.DiplomaSource.IsChanged||n.Country.IsChanged||f.isEmptyValue(n.academicDiplomas))&&(n.peracademicqual.AcademicQualification.IsEEPEBP?(n.DisableOrVisibleFields.DiplomaDate=!0,n.DisableOrVisibleFields.DiplomaDegree=!0,n.DisableOrVisibleFields.DiplomaDateAndGrade=!0,n.DisableOrVisibleFields.EquivalenceType=!0,n.DisableOrVisibleFields.AcademicDiploma=!1,n.DisableOrVisibleFields.DiplomaAbroad=!0,n.DisableOrVisibleFields.AcademicQualification=!1,n.DisableOrVisibleFields.Relevancy=f.isValueInArray(n.pageRules.specSmeaEEPEBP.CanAccess,"a, m1, m2"),n.DisableOrVisibleFields.Save=!0):f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?(n.DisableOrVisibleFields.DiplomaDate=!1,n.DisableOrVisibleFields.DiplomaDegree=!1,n.DisableOrVisibleFields.DiplomaDateAndGrade=!1,n.DisableOrVisibleFields.EquivalenceType=!1,n.DisableOrVisibleFields.AcademicDiploma=!1,n.DisableOrVisibleFields.DiplomaAbroad=!1,n.DisableOrVisibleFields.Relevancy=!1,n.DisableOrVisibleFields.Save=!1):(t={AcademicQualificationId:n.peracademicqual.AcademicQualification.Id,CountryId:n.peracademicqual.AcademicDiploma.Country.Id},f.getByParams(t,"/api/PersonAcademicQualification/getAcademicDiploma").then(function(t){n.academicDiplomas=t;n.DisableOrVisibleFields.DiplomaDate=!0;n.DisableOrVisibleFields.DiplomaDegree=!0;n.DisableOrVisibleFields.DiplomaDateAndGrade=!0;n.DisableOrVisibleFields.EquivalenceType=!0;n.DisableOrVisibleFields.AcademicDiploma=!0;n.DisableOrVisibleFields.DiplomaAbroad=!1;n.DisableOrVisibleFields.Relevancy=f.isValueInArray(n.pageRules.specSmeaEEPEBP.CanAccess,"a, m1, m2");n.DisableOrVisibleFields.Save=!0},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})))):f.isEmptyValue(n.peracademicqual.DiplomaSource)||n.peracademicqual.DiplomaSource!=1?(n.DisableOrVisibleFields.Country=!1,n.DisableOrVisibleFields.DiplomaDate=!1,n.DisableOrVisibleFields.DiplomaDegree=!1,n.DisableOrVisibleFields.DiplomaDateAndGrade=!1,n.DisableOrVisibleFields.EquivalenceType=!1,n.DisableOrVisibleFields.AcademicDiploma=!1,n.DisableOrVisibleFields.DiplomaAbroad=!1,n.DisableOrVisibleFields.Relevancy=!1,n.DisableOrVisibleFields.Save=!1):(n.countries=[{Id:3,Description:"ΕΛΛΑΔΑ",IsEU:!0}],f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)?(n.peracademicqual.AcademicDiploma=[{Country:[]}],n.peracademicqual.AcademicDiploma.Country=n.countries[0]):n.peracademicqual.AcademicDiploma.Country=n.countries[0],(n.AcademicQualification.IsChanged||n.DiplomaSource.IsChanged||n.Country.IsChanged||f.isEmptyValue(n.academicDiplomas))&&(t={AcademicQualificationId:n.peracademicqual.AcademicQualification.Id,CountryId:3},f.getByParams(t,"/api/PersonAcademicQualification/getAcademicDiploma").then(function(t){n.academicDiplomas=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})),n.DisableOrVisibleFields.Country=!1,n.DisableOrVisibleFields.DiplomaDate=!0,n.DisableOrVisibleFields.DiplomaDegree=!0,n.DisableOrVisibleFields.DiplomaDateAndGrade=!0,n.DisableOrVisibleFields.EquivalenceType=!1,n.peracademicqual.AcademicQualification.IsEEPEBP&&n.peracademicqual.DiplomaSource?(n.DisableOrVisibleFields.AcademicDiploma=!1,n.DisableOrVisibleFields.DiplomaAbroad=!0):(n.DisableOrVisibleFields.AcademicDiploma=!0,n.DisableOrVisibleFields.DiplomaAbroad=!1),n.DisableOrVisibleFields.Relevancy=f.isValueInArray(n.pageRules.specSmeaEEPEBP.CanAccess,"a, m1, m2"),n.DisableOrVisibleFields.Save=!0)));n.DisableOrVisibleFields.AcademicQualification=n.updateMode?!1:!0;$("#editAcademicForm").validate().resetForm()};n.openAddAcademicModal=function(t){blockUI({target:"#tblAcademic",animate:!0});y(l);var i=u.all([n.fillFormControls(""),f.getByParams({id:t.Id},"/api/PersonAcademicQualification/getPersonAcademicQualificationById")]);i.then(function(t){o(function(){n.SelectedAcademic=t[1];n.messages={completed:"",percentage:"0",error:""};n.uploadedFileDetails="";n.SendDataForCVDto={Id:"",PersonAcademicQualificationId:"",PersonId:""};n.SendDataForCVFullDto={Id:"",PersonAcademicQualificationId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""};n.SendDataForCVDto.PersonAcademicQualificationId=n.SelectedAcademic.Id;f.getByParams({personAcademicQualificationId:n.SelectedAcademic.Id},"/api/PersonAcademicQualification/GetDetailsForFile").then(function(t){t!=null?(n.SendDataForCVFullDto=t,n.SendDataForCVDto.Id=t.Id,n.showDownloadFile=!0,n.uploadedFileDetails="Έχετε μεταφορτώσει το αρχείο: "+n.SendDataForCVFullDto.FileName):n.showDownloadFile=!1},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης επισυναπτόμενου Βιογραφικού")});n.SelectedAcademic.AcademicQualification.IsEEPEBP?(n.ModalTitle="Προβολή / Επεξεργασία Ακαδημαϊκών Προσόντων ΕΕΠ - ΕΒΠ",n.pageRules.specSmeaEEPEBP.CanUpdate?n.SelectedAcademic.IsConfirmed&&n.pageRules.specSmeaEEPEBP.CanUpdate?f.isValueInArray(n.pageRules.specSmeaEEPEBP.CanAccess,"u1, u2")?n.DisableFieldset=!0:f.isValueInArray(n.pageRules.specSmeaEEPEBP.CanAccess,"a, m1, m2")?n.DisableFieldset=!1:f.isValueInArray(n.pageRules.specSmeaEEPEBP.CanAccess,"d1, d2, p")?(n.DisableFieldset=!1,n.DisableField={DiplomaDegree:!0,DiplomaDate:!0}):n.DisableFieldset=!0:n.DisableFieldset=!n.SelectedAcademic.IsConfirmed&&n.pageRules.specSmeaEEPEBP.CanUpdate?!1:!0:n.DisableFieldset=!0):(n.ModalTitle="Προβολή / Επεξεργασία Ακαδημαϊκών Προσόντων ΕΑΕ",n.pageRules.specSmea.CanUpdate?n.SelectedAcademic.IsConfirmed&&n.pageRules.specSmea.CanUpdate?f.isValueInArray(n.pageRules.specSmea.CanAccess,"u1, u2")?n.DisableFieldset=!0:f.isValueInArray(n.pageRules.specSmea.CanAccess,"a, m1, m2")?n.DisableFieldset=!1:f.isValueInArray(n.pageRules.specSmea.CanAccess,"d1, d2, p")?(n.DisableFieldset=!1,n.DisableField={DiplomaDegree:!0,DiplomaDate:!0}):n.DisableFieldset=!0:n.DisableFieldset=!n.SelectedAcademic.IsConfirmed&&n.pageRules.specSmea.CanUpdate?!1:!0:n.DisableFieldset=!0);n.updateMode=!0;n.peracademicqual.Id=n.SelectedAcademic.Id;n.peracademicqual.Relevancy=n.SelectedAcademic.Relevancy;n.peracademicqual.IsConfirmed=n.SelectedAcademic.IsConfirmed;n.peracademicqual.CountClassification=n.SelectedAcademic.CountClassification;(n.SelectedAcademic.AcademicQualification.Id==3||n.SelectedAcademic.AcademicQualification.Id==4)&&(n.peracademicqual.AcademicQualification=n.SelectedAcademic.AcademicQualification,n.peracademicqual.AcademicQualificationId=n.SelectedAcademic.AcademicQualificationId,n.peracademicqual.FirstSpeciality="",n.peracademicqual.AcademicDiploma="",n.peracademicqual.AcademicDiplomaId="",n.DiplomaAbroad="",n.peracademicqual.DiplomaDate="",n.peracademicqual.DiplomaDegree="",n.peracademicqual.DiplomaSource="",n.peracademicqual.EquivalenceType="");n.SelectedAcademic.AcademicQualification.Id==14?(n.peracademicqual.AcademicQualification=n.SelectedAcademic.AcademicQualification,n.peracademicqual.AcademicQualificationId=n.SelectedAcademic.AcademicQualificationId,n.peracademicqual.FirstSpeciality="",n.peracademicqual.AcademicDiploma=n.SelectedAcademic.AcademicDiploma,n.peracademicqual.AcademicDiplomaId=n.SelectedAcademic.AcademicDiplomaId,n.DiplomaAbroad=n.SelectedAcademic.AcademicDiploma.Description,n.peracademicqual.DiplomaDate=n.SelectedAcademic.DiplomaDate,n.peracademicqual.DiplomaDegree="",n.peracademicqual.DiplomaSource="",n.peracademicqual.EquivalenceType=""):n.SelectedAcademic.AcademicQualification.Id==7?(n.peracademicqual.AcademicQualification=n.SelectedAcademic.AcademicQualification,n.peracademicqual.AcademicQualificationId=n.SelectedAcademic.AcademicQualificationId,n.peracademicqual.FirstSpeciality=n.SelectedAcademic.FirstSpeciality,n.peracademicqual.AcademicDiploma="",n.peracademicqual.AcademicDiplomaId="",n.DiplomaAbroad="",n.peracademicqual.DiplomaDate="",n.peracademicqual.DiplomaDegree="",n.peracademicqual.DiplomaSource="",n.peracademicqual.EquivalenceType=""):n.SelectedAcademic.AcademicQualification.Id==2||n.SelectedAcademic.AcademicQualification.Id==6?(n.peracademicqual.AcademicQualification=n.SelectedAcademic.AcademicQualification,n.peracademicqual.AcademicQualificationId=n.SelectedAcademic.AcademicQualificationId,n.peracademicqual.AcademicDiploma=n.SelectedAcademic.AcademicDiploma,n.peracademicqual.AcademicDiplomaId=n.SelectedAcademic.AcademicDiplomaId,n.DiplomaAbroad=n.SelectedAcademic.AcademicDiploma.Description,n.peracademicqual.DiplomaDate=n.SelectedAcademic.DiplomaDate,n.peracademicqual.DiplomaDegree=n.SelectedAcademic.DiplomaDegree,n.peracademicqual.DiplomaSource=n.SelectedAcademic.DiplomaSource,n.peracademicqual.FirstSpeciality="",n.peracademicqual.EquivalenceType=""):(n.peracademicqual.AcademicQualification=n.SelectedAcademic.AcademicQualification,n.peracademicqual.AcademicQualificationId=n.SelectedAcademic.AcademicQualificationId,n.peracademicqual.AcademicDiploma=n.SelectedAcademic.AcademicDiploma,n.peracademicqual.AcademicDiplomaId=n.SelectedAcademic.AcademicDiplomaId,n.peracademicqual.DiplomaDate=n.SelectedAcademic.DiplomaDate,n.peracademicqual.DiplomaDegree=n.SelectedAcademic.DiplomaDegree,n.peracademicqual.DiplomaSource=n.SelectedAcademic.DiplomaSource,n.peracademicqual.FirstSpeciality="",n.DiplomaAbroad="",n.SelectedAcademic.AcademicQualification.IsEEPEBP&&(n.peracademicqual.RelevancySMEAE=n.SelectedAcademic.RelevancySMEAE,n.peracademicqual.RelevancySpeciality=n.SelectedAcademic.RelevancySpeciality,n.peracademicqual.RelevancySchoolPhychology=n.SelectedAcademic.RelevancySchoolPhychology,n.DiplomaAbroad=n.SelectedAcademic.AcademicDiploma.Description,f.getByParams({Id:n.peracademicqual.Id},"/api/PersonSpeciality/getPersonSpecialitiesEEPEBPByAcademicQualification").then(function(t){n.SelectedSpecListItems=t;n.SelectedAvailSpecItems=t;n.removeDuplicatesSpecsForDualList()},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})),f.isEmptyValue(n.peracademicqual.DiplomaSource)||(n.peracademicqual.DiplomaSource==1?(n.countries=[{Id:3,Description:"ΕΛΛΑΔΑ",IsEU:!0}],n.peracademicqual.AcademicDiploma.Country=n.countries[0]):(n.peracademicqual.AcademicDiploma.Country=n.SelectedAcademic.AcademicDiploma.Country,n.peracademicqual.EquivalenceType=n.SelectedAcademic.EquivalenceType)))},300);o(function(){n.formFields();n.DisableOrVisibleFields.AcademicQualification=!1;unblockUI("#tblAcademic");$("#AddAcademicModal").modal("show")},300)})};n.openModal=function(t){n.delAcademicQualification=t};n.DeleteAction=function(t){var i=t;i.ModifiedBy=n.authentication.userName;i.ModifiedUserRole=n.authentication.role;i.ModifiedRegionAndUnitDescription=n.authentication.unitName;i.PersonId=l;f.postByParams(i,"/api/PersonAcademicQualification/DeleteAcademicQualification").then(function(){n.personAcademicQualifications.splice(n.personAcademicQualifications.indexOf(t),1);n.personAcademicQualificationsEEPEBP=e("filter")(n.personAcademicQualifications,function(n){return n.AcademicQualification.IsEEPEBP==!0});n.showDataTableEEPEBP=f.isEmptyValue(n.personAcademicQualificationsEEPEBP)?!1:!0;n.personAcademicQualificationsSMEA=e("filter")(n.personAcademicQualifications,function(n){return n.AcademicQualification.IsEEPEBP==!1});n.showDataTable=f.isEmptyValue(n.personAcademicQualificationsSMEA)?!1:!0;n.AddButton=n.personAcademicQualificationsSMEA.length==7&&n.personMessage.HasPe11||n.personAcademicQualificationsSMEA.length==4&&!n.personMessage.HasPe11?!1:!0},function(n){r.pop("error","Παρουσιάστηκε σφάλμα. Το Προσόν Ειδικής Αγωγής δεν διαγράφηκε.",n.data)})};n.cancel=function(){n.peracademicqual={};n.peracademicqual.AcademicQualification=[];n.peracademicqual.AcademicDiploma=[];n.peracademicqual.PersonId=l;n.DisableOrVisibleFields={AcademicQualification:!0,FirstSpeciality:!1,DimplomaSource:!1,Country:!1,DiplomaDate:!1,DiplomaDegree:!1,DiplomaDateAndGrade:!1,AcademicDiploma:!1,DiplomaAbroad:!1,Relevancy:!1,EquivalenceType:!1,Save:!1};$("#editAcademicForm").validate().resetForm()};n.saveAction=function(t){n.showAlertSpec=f.isEmpty(n.SelectedSpecListItems)&&n.peracademicqual.AcademicQualification.IsEEPEBP&&n.peracademicqual.RelevancySpeciality?!0:!1;n.showUploadFile&&f.isEmptyValue(n.SendDataForCVFullDto.DirectPdfLink)&&f.isEmptyValue(n.peracademicqual.IsConfirmed)&&!n.DisableFieldsEEPEBP.EEPEBP?(n.showAlertForUpload=!0,h.hash("showAlertRequiredFile"),c()):n.showAlertForUpload=!1;var i=p();!$("#editAcademicForm").valid()||n.showAlertSpec||n.showAlertRelevancy||n.showAlertForUpload||(i.AcademicQualificationSpecialities=n.SelectedSpecListItems,t=="Confirm"?i.IsConfirmed=!0:t=="UnConfirm"&&(i.IsConfirmed=!1),f.isEmptyValue(i.Id)?(i.CreatedBy=n.authentication.userName,i.CreatedUserRole=n.authentication.role,i.CreatedRegionAndUnitDescription=n.authentication.unitName,i.PersonAcademicFile=n.SendDataForCVFullDto,f.postByParams(i,"/api/PersonAcademicQualification/InsertAcademicQualification").then(function(){v(l);$("#AddAcademicModal").modal("hide");n.cancel()},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})):(i.ModifiedBy=n.authentication.userName,i.ModifiedUserRole=n.authentication.role,i.ModifiedRegionAndUnitDescription=n.authentication.unitName,i.personAcademicFile=n.SendDataForCVFullDto,f.postByParams(i,"/api/PersonAcademicQualification/UpdateAcademicQualification").then(function(){v(l);$("#AddAcademicModal").modal("hide");n.cancel()},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})))};n.SelectedSpecAvailItems=[];n.SelectedSelectedSpecListItems=[];n.SelectedSpecListItems=[];n.btnSpecRight=function(){angular.forEach(n.SelectedAvailSpecItems,function(n){this.push(n)},n.SelectedSpecListItems);angular.forEach(n.SelectedAvailSpecItems,function(t){for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].Id==t.Id&&n.AvailableSpecListItems.splice(i,1)});n.SelectedAvailSpecItems=[];n.SelectedSelectedSpecListItems=[]};n.btnSpecLeft=function(){var t={Id:n.peracademicqual.Id,PersonId:l,Specialities:n.SelectedSelectedSpecListItems};f.postByParams(t,"/api/PersonSpeciality/getPersonSpecWithAcademicQualification").then(function(){n.showAlertNoDeleteSpec=!1;angular.forEach(n.SelectedSelectedSpecListItems,function(n){this.push(n)},n.AvailableSpecListItems);angular.forEach(n.SelectedSelectedSpecListItems,function(t){for(var i=n.SelectedSpecListItems.length-1;i>=0;i--)n.SelectedSpecListItems[i].Id==t.Id&&n.SelectedSpecListItems.splice(i,1)});n.SpecialSupport==!1&&(n.sub.AcceptFullSubstitudeForSpecialSupport=!1);n.AvailableRegionsListItems=[];n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]},function(){n.showAlertNoDeleteSpec=!0})};n.btnAllSpecRight=function(){angular.forEach(n.AvailableSpecListItems,function(n){this.push(n)},n.SelectedSpecListItems);for(var t=n.AvailableSpecListItems.length-1;t>=0;t--)n.AvailableSpecListItems.splice(t,1);n.SpecialSupport==!1&&(n.sub.AcceptFullSubstitudeForSpecialSupport=!1);n.AvailableRegionsListItems=[];n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.btnAllSpecLeft=function(){var t={Id:n.peracademicqual.Id,PersonId:l,Specialities:n.SelectedSelectedSpecListItems};f.postByParams(t,"/api/PersonSpeciality/getPersonSpecWithAcademicQualification").then(function(){angular.forEach(n.SelectedSpecListItems,function(n){this.push(n)},n.AvailableSpecListItems);for(var t=n.SelectedSpecListItems.length-1;t>=0;t--)n.SelectedSpecListItems.splice(t,1);n.SpecialSupport==!1&&(n.sub.AcceptFullSubstitudeForSpecialSupport=!1);n.AvailableRegionsListItems=[];n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]},function(){n.showAlertNoDeleteSpec=!0})};n.removeDuplicatesSpecsForDualList=function(){angular.forEach(n.SelectedAvailSpecItems,function(t){for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].Id==t.Id&&n.AvailableSpecListItems.splice(i,1)});n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.onFileSelect=function(t){var r,i;for(n.messages={completed:"",percentage:"0",error:""},n.showAlertForUpload=!1,n.showAlertForUpload=!1,n.SendDataForCVFullDto={Id:"",PersonAcademicQualificationId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""},n.SendDataForCVDto.Id="",n.SendDataForCVDto.PersonId=l,r=0;r<t.length;r++){if(i=t[r],i.type!="application/pdf"){n.messages.error='Μη έγκυρη επέκταση αρχείου "'+i.name+'". Οι επεκτάσεις που υποστηρίζονται είναι: "<b> pdf<\/b>" .';return}if(i.size>=8388608){n.messages.error='Το αρχείο "'+i.name+'" (<b>'+Math.round(i.size/1024)+" KB<\/b>) υπερβαίνει το μέγιστο επιτρεπόμενο μέγεθος μεταφόρτωσης <b>8 MB<\/b>.";return}(function(t){n.upload[t]=s.upload({url:"/api/files/uploadAcademicQualification",method:"POST",data:{SendDataForCVDto:n.SendDataForCVDto},file:i}).progress(function(t){n.messages.percentage=parseInt(100*t.loaded/t.total)}).then(function(t){n.messages.completed="Θα μεταφορτώσετε το αρχείο <b>"+i.name+"<\/b>.";n.SendDataForCVDto.Id=t.data.personAcademicFile.Id;n.SendDataForCVFullDto=t.data.personAcademicFile;n.uploadedFileDetails=""}).catch(function(t){n.messages.error=t.data.Message})})(r)}};n.abortUpload=function(t){n.upload[t].abort()};n.minDate="01/01/1900";n.maxDate=new Date;n.formats=["dd/MM/yyyy"];n.format=n.formats[0];n.clear=function(){n.dt=null};n.toggleMin=function(){n.minDate=n.minDate?null:new Date};n.toggleMin();n.open=function(t,i){t.preventDefault();t.stopPropagation();n[i]=!0};n.dateOptions={formatYear:"yy",startingDay:1,format:"dd/mm/yyyy"}};AcademicQualificationsController.$inject=["$scope","PassParameters","$state","toaster","$q","GeneralFactory","$filter","$timeout","$upload","$location","$anchorScroll"];AcademicQualificationsControllerRef=function(n,t,i,r,u,f,e,o){function c(t){var i=u.all([f.getByParams({Id:t},"/api/PersonAcademicQualificationRef/getPersonAcademicQualificationRef"),f.getByParams({personId:t},"/api/Person/getPersonSpecialitiesDetails")]);i.then(function(t){n.personAcademicQualifications=t[0];n.personMessage=t[1];n.AddButton=n.personAcademicQualifications.length==2||n.personMessage.IntendancyId!=n.authentication.regionAndUnitId&&f.isValueInArray(f.getRoleCode(n.authentication.role),"d1, d2, p")?!1:!0;n.showMessages=!0;unblockUI("#divBlockUI")})}function l(){return dto={Id:f.isEmptyValue(n.peracademicqual.Id)?"":n.peracademicqual.Id,PersonId:s,AcademicQualificationId:n.peracademicqual.AcademicQualification.Id,AcademicDiplomaId:f.isEmptyValue(n.peracademicqual.AcademicDiplomaId)?"":n.peracademicqual.AcademicDiplomaId,Diploma:{Id:"",Description:"",CountryId:""},DiplomaDate:n.peracademicqual.DiplomaDate,DiplomaDegree:n.peracademicqual.DiplomaDegree,DiplomaSource:f.isEmptyValue(n.peracademicqual.DiplomaSource)?"":n.peracademicqual.DiplomaSource,EquivalenceType:n.peracademicqual.EquivalenceType,Relevancy:f.isEmptyValue(n.peracademicqual.Relevancy)?!1:n.peracademicqual.Relevancy,FirstSpeciality:f.isEmptyValue(n.peracademicqual.FirstSpeciality)?"":n.peracademicqual.FirstSpeciality,CountClassification:"",IsConfirmed:f.isEmptyValue(n.peracademicqual.IsConfirmed)?!1:n.peracademicqual.IsConfirmed,CreatedBy:"",CreationDate:"",CreatedUserRole:"",CreatedRegionAndUnitDescription:"",ModifiedBy:"",LastEditDate:"",ModifiedUserRole:"",ModifiedRegionAndUnitDescription:""},f.isEmptyValue(n.peracademicqual.DiplomaDegree)||(dto.DiplomaDegree=parseFloat(n.peracademicqual.DiplomaDegree.toString().replace(",","."))),f.isEmptyValue(n.peracademicqual.AcademicDiplomaId)&&!f.isEmptyValue(n.DiplomaAbroad)?dto.Diploma={Id:"",Description:n.DiplomaAbroad,CountryId:f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?"":n.peracademicqual.AcademicDiploma.Country.Id}:f.isEmptyValue(n.peracademicqual.AcademicDiplomaId)||f.isEmptyValue(n.DiplomaAbroad)?f.isEmptyValue(n.peracademicqual.AcademicDiploma)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Id)||(dto.AcademicDiplomaId=n.peracademicqual.AcademicDiploma.Id,dto.Diploma={Id:n.peracademicqual.AcademicDiploma.Id,Description:n.peracademicqual.AcademicDiploma.Description,CountryId:f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?"":n.peracademicqual.AcademicDiploma.Country.Id}):(dto.AcademicDiplomaId=n.peracademicqual.AcademicDiplomaId,dto.Diploma={Id:n.peracademicqual.AcademicDiplomaId,Description:n.DiplomaAbroad,CountryId:f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?"":n.peracademicqual.AcademicDiploma.Country.Id}),dto}var h,s;n.pageRules={};n.showMessages=!1;blockUI({target:"#divBlockUI",animate:!0});n.authentication.isAuth?(h="academicRef,spec,specSmea",f.getByParams({role:n.authentication.role,codes:h},"/api/Subsystem/NewCheckPermission").then(function(t){var i=h.split(",");for(var r in i)n.pageRules[i[r]]=e("filter")(t,{Code:i[r]},!0)[0].Rules},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})):i.go("/");s=t.getPersonId();f.isValueInArray(f.getRoleCode(n.authentication.role),"u1, u2")&&(s=n.authentication.personId);n.AddButton=!1;n.DisableOrVisibleFields={AcademicQualification:!0,FirstSpeciality:!1,DimplomaSource:!1,Country:!1,DiplomaDate:!1,DiplomaDegree:!1,DiplomaDateAndGrade:!1,AcademicDiploma:!1,DiplomaAbroad:!1,Relevancy:!1,EquivalenceType:!1,Save:!1};n.DisableField={DiplomaDegree:!1,DiplomaDate:!1};n.DisableFieldset=!1;n.DisableConfirm=!1;n.ModalTitle="Προσθήκη Ακαδημαϊκών Προσόντων για ΔΥΕΠ";n.Countries=[];n.diplomas=[];n.consts={};n.AcademicQualification={Id:"",IsChanged:!1};n.Country={Id:"",IsChanged:!1};n.DiplomaSource={Id:"",IsChanged:!1};n.delAcademicQualification;n.peracademicqual={};n.peracademicqual.AcademicQualification=[];n.peracademicqual.AcademicDiploma=[];n.peracademicqual.PersonId=s;n.FilterAcademicQualifications=[];c(s);n.fillFormControls=function(t){var i,u;if(n.peracademicqual.Id="",n.ModalTitle="Προσθήκη Ακαδημαϊκών Προσόντων για ΔΥΕΠ",n.DisableOrVisibleFields.AcademicQualification=!0,n.AcademicQualification={Id:"",IsChanged:!1},n.Country={Id:"",IsChanged:!1},n.DiplomaSource={Id:"",IsChanged:!1},n.academicDiplomas="",n.peracademicqual.IsConfirmed="",n.DisableFieldset=!1,n.DisableField={DiplomaDegree:!1,DiplomaDate:!1},f.isEmpty(n.academicQualifications))f.getByAll("/api/PersonAcademicQualificationRef/getAllAcademicQualificationRef").then(function(i){var r,u;if(n.academicQualifications=i,t=="Add"){for(n.personMessage.HasPe11?angular.copy(n.academicQualifications,n.FilterAcademicQualifications):angular.copy(e("filter")(n.academicQualifications,{IsOnlyForPE11:!1},!0),n.FilterAcademicQualifications),r=n.academicQualifications.length-1;r>=0;r--)for(u=0;u<n.personAcademicQualifications.length;u++)if(n.academicQualifications[r].Id===n.personAcademicQualifications[u].AcademicQualification.Id){n.FilterAcademicQualifications.splice(r,1);break}}else angular.copy(n.academicQualifications,n.FilterAcademicQualifications)},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});else if(t=="Add"){for(n.personMessage.HasPe11?angular.copy(n.academicQualifications,n.FilterAcademicQualifications):angular.copy(e("filter")(n.academicQualifications,{IsOnlyForPE11:!1},!0),n.FilterAcademicQualifications),i=n.academicQualifications.length-1;i>=0;i--)for(u=0;u<n.personAcademicQualifications.length;u++)if(n.academicQualifications[i].Id===n.personAcademicQualifications[u].AcademicQualification.Id){n.FilterAcademicQualifications.splice(i,1);break}}else angular.copy(n.academicQualifications,n.FilterAcademicQualifications);f.isEmpty(n.consts.academicDiplomaSourceType)&&f.getByAll("/api/PersonAcademicQualificationRef/getAcademicDiplomaSourceTypes").then(function(t){n.consts.academicDiplomaSourceType=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});f.isEmpty(n.consts.equivalenceType)&&f.getByAll("/api/PersonAcademicQualificationRef/getAcademicRefEquivalenceTypes").then(function(t){n.consts.equivalenceType=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.formFields=function(){var t;f.isEmptyValue(n.peracademicqual.AcademicQualification)||(f.isEmptyValue(n.AcademicQualification.Id)?(n.AcademicQualification.Id=n.peracademicqual.AcademicQualification.Id,n.AcademicQualification.IsChanged=!1):n.AcademicQualification.Id!=n.peracademicqual.AcademicQualification.Id?(n.AcademicQualification.Id=n.peracademicqual.AcademicQualification.Id,n.AcademicQualification.IsChanged=!0):n.AcademicQualification.IsChanged=!1,f.isEmptyValue(n.DiplomaSource.Id)&&!f.isEmptyValue(n.peracademicqual.DiplomaSource)?(n.DiplomaSource.Id=n.peracademicqual.DiplomaSource,n.DiplomaSource.IsChanged=!1):f.isEmptyValue(n.DiplomaSource.Id)||f.isEmptyValue(n.peracademicqual.DiplomaSource)?n.DiplomaSource.IsChanged=!1:n.DiplomaSource.Id!=n.peracademicqual.DiplomaSource?(n.DiplomaSource.Id=n.peracademicqual.DiplomaSource,n.DiplomaSource.IsChanged=!0,n.peracademicqual.AcademicDiploma.Country="",n.peracademicqual.AcademicDiplomaId=""):n.DiplomaSource.IsChanged=!1,!f.isEmptyValue(n.Country.Id)||f.isEmptyValue(n.peracademicqual.AcademicDiploma)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?f.isEmptyValue(n.Country.Id)||f.isEmptyValue(n.peracademicqual.AcademicDiploma)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?n.Country.IsChanged=!1:n.Country.Id!=n.peracademicqual.AcademicDiploma.Country.Id?(n.Country.Id=n.peracademicqual.AcademicDiploma.Country.Id,n.Country.IsChanged=!0,n.peracademicqual.AcademicDiplomaId=""):n.Country.IsChanged=!1:(n.Country.Id=n.peracademicqual.AcademicDiploma.Country.Id,n.Country.IsChanged=!1),n.peracademicqual.AcademicQualification.Id==11&&n.peracademicqual.DiplomaSource>0||n.peracademicqual.AcademicQualification.Id==10&&n.peracademicqual.DiplomaSource>1?(f.isEmptyValue(n.peracademicqual.DiplomaAbroad)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||(n.peracademicqual.DiplomaAbroad=""),!f.isEmptyValue(n.peracademicqual.DiplomaSource)&&n.peracademicqual.DiplomaSource>1?(n.DisableOrVisibleFields.Country=!0,n.DisableOrVisibleFields.DimplomaSource=!0,f.getByAll("/api/Country/GetCountriesWithoutGreece").then(function(t){n.countriesWithoutGreece=t;n.countries=n.peracademicqual.DiplomaSource==3?e("filter")(n.countriesWithoutGreece,function(n){return n.IsEU==!0}):e("filter")(n.countriesWithoutGreece,function(n){return n.IsEU==!1});n.academicDiplomas=""},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),n.countries=n.peracademicqual.DiplomaSource==3?e("filter")(n.countriesWithoutGreece,function(n){return n.IsEU==!0}):e("filter")(n.countriesWithoutGreece,function(n){return n.IsEU==!1}),(n.AcademicQualification.IsChanged||n.DiplomaSource.IsChanged||n.Country.IsChanged||f.isEmptyValue(n.academicDiplomas))&&(f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?(n.DisableOrVisibleFields.DiplomaDate=!1,n.DisableOrVisibleFields.DiplomaDegree=!1,n.DisableOrVisibleFields.DiplomaDateAndGrade=!1,n.DisableOrVisibleFields.EquivalenceType=!1,n.DisableOrVisibleFields.AcademicDiploma=!1,n.DisableOrVisibleFields.DiplomaAbroad=!1,n.DisableOrVisibleFields.Save=!1):(t={AcademicQualificationId:n.peracademicqual.AcademicQualification.Id,CountryId:n.peracademicqual.AcademicDiploma.Country.Id},n.DisableOrVisibleFields.DiplomaDate=!0,n.DisableOrVisibleFields.DiplomaDegree=!0,n.DisableOrVisibleFields.DiplomaDateAndGrade=!0,n.DisableOrVisibleFields.EquivalenceType=!0,n.DisableOrVisibleFields.AcademicDiploma=!1,n.DisableOrVisibleFields.DiplomaAbroad=!0,n.DisableOrVisibleFields.Save=!0))):f.isEmptyValue(n.peracademicqual.DiplomaSource)||n.peracademicqual.DiplomaSource!=1?(n.DisableOrVisibleFields.Country=!1,n.DisableOrVisibleFields.DiplomaDate=!1,n.DisableOrVisibleFields.DiplomaDegree=!1,n.DisableOrVisibleFields.DiplomaDateAndGrade=!1,n.DisableOrVisibleFields.EquivalenceType=!1,n.DisableOrVisibleFields.AcademicDiploma=!1,n.DisableOrVisibleFields.DiplomaAbroad=!1,n.DisableOrVisibleFields.Save=!1):(n.countries=[{Id:3,Description:"ΕΛΛΑΔΑ",IsEU:!0}],f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)?(n.peracademicqual.AcademicDiploma=[{Country:[]}],n.peracademicqual.AcademicDiploma.Country=n.countries[0]):n.peracademicqual.AcademicDiploma.Country=n.countries[0],(n.AcademicQualification.IsChanged||n.DiplomaSource.IsChanged||n.Country.IsChanged||f.isEmptyValue(n.academicDiplomas))&&(t={AcademicQualificationId:n.peracademicqual.AcademicQualification.Id,CountryId:3},f.getByParams(t,"/api/PersonAcademicQualification/getAcademicDiploma").then(function(t){n.academicDiplomas=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})),n.DisableOrVisibleFields.DimplomaSource=!0,n.DisableOrVisibleFields.Country=!1,n.DisableOrVisibleFields.DiplomaDate=!0,n.DisableOrVisibleFields.DiplomaDegree=!0,n.DisableOrVisibleFields.DiplomaDateAndGrade=!0,n.DisableOrVisibleFields.EquivalenceType=!1,n.DisableOrVisibleFields.AcademicDiploma=!1,n.DisableOrVisibleFields.DiplomaAbroad=!0,n.DisableOrVisibleFields.Save=!0)):(f.isEmptyValue(n.peracademicqual.Id)&&(n.peracademicqual.Relevancy=!1),n.peracademicqual.FirstSpeciality="",n.DisableOrVisibleFields.AcademicQualification=!0,n.DisableOrVisibleFields.DimplomaSource=!0,n.DisableOrVisibleFields.FirstSpeciality=!1,f.isEmptyValue(n.peracademicqual.DiplomaSource)||n.peracademicqual.DiplomaSource!=1?(n.DisableOrVisibleFields.Country=!1,n.DisableOrVisibleFields.DiplomaDate=!1,n.DisableOrVisibleFields.DiplomaDegree=!1,n.DisableOrVisibleFields.DiplomaDateAndGrade=!1,n.DisableOrVisibleFields.EquivalenceType=!1,n.DisableOrVisibleFields.AcademicDiploma=!1,n.DisableOrVisibleFields.DiplomaAbroad=!1,n.DisableOrVisibleFields.Save=!1):(n.countries=[{Id:3,Description:"ΕΛΛΑΔΑ",IsEU:!0}],f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)?(n.peracademicqual.AcademicDiploma=[{Country:[]}],n.peracademicqual.AcademicDiploma.Country=n.countries[0]):n.peracademicqual.AcademicDiploma.Country=n.countries[0],(n.AcademicQualification.IsChanged||n.DiplomaSource.IsChanged||n.Country.IsChanged||f.isEmptyValue(n.academicDiplomas))&&(t={AcademicQualificationId:n.peracademicqual.AcademicQualification.Id,CountryId:3},n.DiplomaAbroad="",f.getByParams(t,"/api/PersonAcademicQualification/getAcademicDiploma").then(function(t){n.academicDiplomas=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})),n.DisableOrVisibleFields.Country=!1,n.DisableOrVisibleFields.DiplomaDate=!0,n.DisableOrVisibleFields.DiplomaDegree=!0,n.DisableOrVisibleFields.DiplomaDateAndGrade=!0,n.DisableOrVisibleFields.EquivalenceType=!1,n.DisableOrVisibleFields.AcademicDiploma=!0,n.DisableOrVisibleFields.DiplomaAbroad=!1,n.DisableOrVisibleFields.Save=!0)));$("#editAcademicForm").validate().resetForm()};n.openAddAcademicModal=function(t){blockUI({target:"#tblAcademic",animate:!0});var i=u.all([n.fillFormControls(""),f.getByParams({id:t.Id},"/api/PersonAcademicQualificationRef/getPersonAcademicQualificationById")]);i.then(function(t){o(function(){n.ModalTitle="Προβολή / Επεξεργασία Ακαδημαϊκών Προσόντων  για ΔΥΕΠ";n.SelectedAcademic=t[1];n.pageRules.academicRef.CanUpdate?n.SelectedAcademic.IsConfirmed&&n.pageRules.academicRef.CanUpdate?f.isValueInArray(n.pageRules.academicRef.CanAccess,"u1, u2")?n.DisableFieldset=!0:f.isValueInArray(n.pageRules.academicRef.CanAccess,"a, m1, m2")?n.DisableFieldset=!1:f.isValueInArray(n.pageRules.academicRef.CanAccess,"d1, d2, p")&&n.personMessage.IntendancyId==n.authentication.regionAndUnitId?(n.DisableFieldset=!1,n.DisableField={DiplomaDegree:!0,DiplomaDate:!0}):n.DisableFieldset=!0:n.DisableFieldset=!n.SelectedAcademic.IsConfirmed&&n.pageRules.academicRef.CanUpdate?f.isValueInArray(n.pageRules.academicRef.CanAccess,"d1, d2, p")&&n.personMessage.IntendancyId==n.authentication.regionAndUnitId||f.isValueInArray(n.pageRules.academicRef.CanAccess,"a, m1, m2")?!1:!0:!0:n.DisableFieldset=!0;n.peracademicqual.Id=n.SelectedAcademic.Id;n.peracademicqual.IsConfirmed=n.SelectedAcademic.IsConfirmed;n.peracademicqual.CountClassification=n.SelectedAcademic.CountClassification;n.SelectedAcademic.AcademicQualification.Id==11||n.SelectedAcademic.AcademicQualification.Id==10&&n.SelectedAcademic.DiplomaSource>1?(n.peracademicqual.AcademicQualification=n.SelectedAcademic.AcademicQualification,n.peracademicqual.AcademicQualificationId=n.SelectedAcademic.AcademicQualificationId,n.peracademicqual.AcademicDiploma=n.SelectedAcademic.AcademicDiploma,n.peracademicqual.AcademicDiplomaId=n.SelectedAcademic.AcademicDiplomaId,n.DiplomaAbroad=n.SelectedAcademic.AcademicDiploma.Description,n.peracademicqual.DiplomaDate=n.SelectedAcademic.DiplomaDate,n.peracademicqual.DiplomaDegree=n.SelectedAcademic.DiplomaDegree,n.peracademicqual.DiplomaSource=n.SelectedAcademic.DiplomaSource,n.peracademicqual.AcademicDiploma.Country=n.SelectedAcademic.AcademicDiploma.Country,n.peracademicqual.EquivalenceType=n.SelectedAcademic.EquivalenceType):(n.peracademicqual.AcademicQualification=n.SelectedAcademic.AcademicQualification,n.peracademicqual.AcademicQualificationId=n.SelectedAcademic.AcademicQualificationId,n.peracademicqual.AcademicDiploma=n.SelectedAcademic.AcademicDiploma,n.peracademicqual.AcademicDiplomaId=n.SelectedAcademic.AcademicDiplomaId,n.peracademicqual.DiplomaDate=n.SelectedAcademic.DiplomaDate,n.peracademicqual.DiplomaDegree=n.SelectedAcademic.DiplomaDegree,n.peracademicqual.DiplomaSource=n.SelectedAcademic.DiplomaSource,n.peracademicqual.DiplomaSource==1?(n.countries=[{Id:3,Description:"ΕΛΛΑΔΑ",IsEU:!0}],n.peracademicqual.AcademicDiploma.Country=n.countries[0]):(n.peracademicqual.AcademicDiploma.Country=n.SelectedAcademic.AcademicDiploma.Country,n.peracademicqual.EquivalenceType=""),n.peracademicqual.FirstSpeciality="",n.DiplomaAbroad="")},300);o(function(){n.formFields();n.DisableOrVisibleFields.AcademicQualification=!1;unblockUI("#tblAcademic");$("#AddAcademicModal").modal("show")},300)})};n.openModal=function(t){n.delAcademicQualification=t};n.DeleteAction=function(t){var i=t;i.ModifiedBy=n.authentication.userName;i.ModifiedUserRole=n.authentication.role;i.ModifiedRegionAndUnitDescription=n.authentication.unitName;i.PersonId=s;f.postByParams(i,"/api/PersonAcademicQualification/DeleteAcademicQualification").then(function(){n.personAcademicQualifications.splice(n.personAcademicQualifications.indexOf(t),1);n.AddButton=n.personAcademicQualifications.length==2||n.personMessage.IntendancyId!=n.authentication.regionAndUnitId&&f.isValueInArray(f.getRoleCode(n.authentication.role),"d1, d2, p")?!1:!0},function(){r.pop("error","Προσοχή","Παρουσιάστηκε σφάλμα. Η μουσική ειδίκευση δεν διαγράφηκε.")})};n.cancel=function(){n.peracademicqual={};n.peracademicqual.AcademicQualification=[];n.peracademicqual.AcademicDiploma=[];n.peracademicqual.PersonId=s;n.DisableOrVisibleFields={AcademicQualification:!0,FirstSpeciality:!1,DimplomaSource:!1,Country:!1,DiplomaDate:!1,DiplomaDegree:!1,DiplomaDateAndGrade:!1,AcademicDiploma:!1,DiplomaAbroad:!1,Relevancy:!1,EquivalenceType:!1,Save:!1};$("#editAcademicForm").validate().resetForm()};n.saveAction=function(t){if($("#editAcademicForm").valid()){var i=l();t=="Confirm"?i.IsConfirmed=!0:t=="UnConfirm"&&(i.IsConfirmed=!1);f.isEmptyValue(i.Id)?(i.CreatedBy=n.authentication.userName,i.CreatedUserRole=n.authentication.role,i.CreatedRegionAndUnitDescription=n.authentication.unitName,f.postByParams(i,"/api/PersonAcademicQualificationRef/InsertAcademicQualification").then(function(){c(s);$("#AddAcademicModal").modal("hide");n.cancel()},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})):(i.ModifiedBy=n.authentication.userName,i.ModifiedUserRole=n.authentication.role,i.ModifiedRegionAndUnitDescription=n.authentication.unitName,f.postByParams(i,"/api/PersonAcademicQualificationRef/UpdateAcademicQualification").then(function(){c(s);$("#AddAcademicModal").modal("hide");n.cancel()},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)}))}};n.minDate="01/01/1900";n.maxDate=new Date;n.formats=["dd/MM/yyyy"];n.format=n.formats[0];n.clear=function(){n.dt=null};n.toggleMin=function(){n.minDate=n.minDate?null:new Date};n.toggleMin();n.open=function(t,i){t.preventDefault();t.stopPropagation();n[i]=!0};n.dateOptions={formatYear:"yy",startingDay:1,format:"dd/mm/yyyy"}};AcademicQualificationsControllerRef.$inject=["$scope","PassParameters","$state","toaster","$q","GeneralFactory","$filter","$timeout"];AcademicStudiesController=function(n,t,i,r,u,f,e,o){function c(t){var i=u.all([f.getByAll("/api/General/getGeneralVariable"),f.getByParams({Id:t},"/api/PersonAcademicQualification/getPersonAcademicStudies"),f.getByParams({personId:t,role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId},"/api/Person/checkPermanentViewFromOfficialDide")]);i.then(function(t){n.updateAfter=t[0];n.personAcademicQualifications=t[1];n.disableDideForViewForPermanent=t[2];n.showDataTable=f.isEmptyValue(n.personAcademicQualifications)?!1:!0;n.PostGradshowMessages=!0;unblockUI("#divBlockUI")})}function a(){var t={};return n.peracademicqual.AcademicQualification.Id==13&&(f.isEmptyValue(n.academicDiplomas)||(t=e("filter")(n.academicDiplomas,{Id:n.peracademicqual.AcademicDiploma.Id},!0)[0],!f.isEmptyValue(t)&&((t.RelevancySMEAE||t.RelevancySchoolPsychology)&&!t.YARelevancyFlag&&n.peracademicqual.DiplomaDate<=n.YADate||t.YARelevancyFlag)?(n.peracademicqual.RelevancySMEAE=t.RelevancySMEAE,n.peracademicqual.RelevancySchoolPhychology=t.RelevancySchoolPsychology):(n.peracademicqual.RelevancySMEAE=!1,n.peracademicqual.RelevancySchoolPhychology=!1,n.peracademicqual.HasPedagogicalCompetency=!1))),dto={Id:f.isEmptyValue(n.peracademicqual.Id)?"":n.peracademicqual.Id,PersonId:s,AcademicQualificationId:n.peracademicqual.AcademicQualification.Id,AcademicDiplomaId:f.isEmptyValue(n.peracademicqual.AcademicDiplomaId)?"":n.peracademicqual.AcademicDiplomaId,Diploma:{Id:"",Description:"",CountryId:""},DiplomaDate:n.peracademicqual.DiplomaDate,DiplomaDegree:n.peracademicqual.DiplomaDegree,DiplomaSource:f.isEmptyValue(n.peracademicqual.DiplomaSource)?"":n.peracademicqual.DiplomaSource,EquivalenceType:n.peracademicqual.EquivalenceType,DiplomaEquivalenceDateNumber:n.peracademicqual.DiplomaEquivalenceDateNumber,DiplomaEquivalenceDate:n.peracademicqual.DiplomaEquivalenceDate,Relevancy:f.isEmptyValue(n.peracademicqual.Relevancy)?0:n.peracademicqual.Relevancy,FirstSpeciality:f.isEmptyValue(n.peracademicqual.FirstSpeciality)?"":n.peracademicqual.FirstSpeciality,RelevancySMEAE:f.isEmptyValue(n.peracademicqual.RelevancySMEAE)?!1:n.peracademicqual.RelevancySMEAE,RelevancySpeciality:!1,RelevancySchoolPhychology:f.isEmptyValue(n.peracademicqual.RelevancySchoolPhychology)?!1:n.peracademicqual.RelevancySchoolPhychology,CountClassification:"",HasPedagogicalCompetency:f.isEmptyValue(n.peracademicqual.HasPedagogicalCompetency)?!1:n.peracademicqual.HasPedagogicalCompetency,CertificateNumber:f.isEmptyValue(n.peracademicqual.CertificateNumber)?"":n.peracademicqual.CertificateNumber,CertificateDate:f.isEmptyValue(n.peracademicqual.CertificateDate)?"":n.peracademicqual.CertificateDate,IsConfirmed:f.isEmptyValue(n.peracademicqual.IsConfirmed)?!1:n.peracademicqual.IsConfirmed,IsLocked:f.isEmptyValue(n.peracademicqual.IsLocked)?!1:n.peracademicqual.IsLocked,CreatedBy:"",CreationDate:"",CreatedUserRole:"",CreatedRegionAndUnitDescription:"",ModifiedBy:"",LastEditDate:"",ModifiedUserRole:"",ModifiedRegionAndUnitDescription:"",AcademicQualificationSpecialities:{Id:"",PersonAcademicQualificationId:"",PersonSpecialityId:""}},f.isEmptyValue(n.peracademicqual.DiplomaDegree)||(dto.DiplomaDegree=parseFloat(n.peracademicqual.DiplomaDegree.toString().replace(",","."))),n.peracademicqual.AcademicQualification.Id==12?f.isEmptyValue(n.peracademicqual.AcademicDiplomaId)&&!f.isEmptyValue(n.DiplomaAbroad)?dto.Diploma={Id:"",Description:n.DiplomaAbroad,CountryId:f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?"":n.peracademicqual.AcademicDiploma.Country.Id}:f.isEmptyValue(n.peracademicqual.AcademicDiplomaId)||f.isEmptyValue(n.DiplomaAbroad)||(dto.AcademicDiplomaId=n.peracademicqual.AcademicDiplomaId,dto.Diploma={Id:n.peracademicqual.AcademicDiplomaId,Description:n.DiplomaAbroad,CountryId:f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?"":n.peracademicqual.AcademicDiploma.Country.Id}):n.peracademicqual.AcademicQualification.Id==13&&(f.isEmptyValue(n.peracademicqual.AcademicDiploma)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Id)||!f.isEmptyValue(n.DiplomaAbroad)?f.isEmptyValue(n.DiplomaAbroad)||(f.isEmptyValue(n.DiplomaAbroad.Description)?n.PostGradDisableOrVisibleFields.DisableDiplomaAbroad?(dto.AcademicDiplomaId=n.peracademicqual.AcademicDiploma.Id,dto.Diploma={Id:n.peracademicqual.AcademicDiploma.Id,Description:n.DiplomaAbroad,CountryId:f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?"":n.peracademicqual.AcademicDiploma.Country.Id}):(dto.AcademicDiplomaId="",dto.Diploma={Id:"",Description:n.DiplomaAbroad,CountryId:f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?"":n.peracademicqual.AcademicDiploma.Country.Id}):(dto.AcademicDiplomaId=n.DiplomaAbroad.Id,dto.Diploma={Id:"",Description:n.DiplomaAbroad.Description,CountryId:f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?"":n.peracademicqual.AcademicDiploma.Country.Id})):(dto.AcademicDiplomaId=n.peracademicqual.AcademicDiploma.Id,dto.Diploma={Id:n.peracademicqual.AcademicDiploma.Id,Description:n.peracademicqual.AcademicDiploma.Description,CountryId:f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?"":n.peracademicqual.AcademicDiploma.Country.Id})),dto}var h,s,l;n.pageRules={};n.PostGradshowMessages=!1;n.showAlertRelevancy=!1;n.PersonSpecWithAcademicQualification=0;n.DisableFieldsetNotActive=!1;n.updateAfter="";n.searchAcademicDiploma={};n.searchAcademicDiploma.selected="";n.firstOpenModal=0;n.universityList=[];n.DiplomaNotInListMessage="";n.ShowDiplomaNotInListMessage=!1;n.disableDideForViewForPermanent=!1;blockUI({target:"#divBlockUI",animate:!0});n.authentication.isAuth?(h="folder,specSmea,specSmeaEEPEBP,spec,specEEPEBP,changeDataRequest",f.getByParams({role:n.authentication.role,codes:h},"/api/Subsystem/NewCheckPermission").then(function(t){var i=h.split(",");for(var r in i)n.pageRules[i[r]]=e("filter")(t,{Code:i[r]},!0)[0].Rules},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})):i.go("/");s=t.getPersonId();f.isValueInArray(f.getRoleCode(n.authentication.role),"u1, u2")&&(s=n.authentication.personId);f.getByParams({personId:s},"/api/Person/getPersonSpecialitiesDetails").then(function(t){n.personMessage=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την εμφάνιση των μηνυμάτων του φακέλου σας.")});n.PostGradDisableOrVisibleFields={AcademicQualification:!0,DimplomaSource:!1,Country:!1,DiplomaDate:!1,DiplomaDegree:!1,DiplomaDateAndGrade:!1,AcademicDiploma:!1,DiplomaAbroad:!1,Relevancy:!1,EquivalenceType:!1,Save:!1,RelevancySchoolPhychology:!1,RelevancySMEAE:!1,HasPedagogicalCompetency:!1,NotRelevant:!1,DisableFromNotRelevant:!1,DisableFromRelevant:!1,DoctoralDetails:!1,DisableDiplomaAbroad:!1,DoctoraRelevancySchoolPhychology:!1,DoctoraRelevancySMEAE:!1,DisableSaveButton:!1,DisableFromSMEA:!1,DisableFromSchoolPhychology:!1,University:!1};n.IsDisabledFromUpdate=!1;n.DisableFieldPostGrad={DiplomaDegree:!1,DiplomaDate:!1};n.academicDiplomas=[];n.DisableFieldsetPostGrad=!1;n.ModalTitle="Προσθήκη Ακαδημαϊκών Προσόντων ΕΑΕ";n.Countries=[];n.diplomas=[];n.consts={};n.AcademicQualification={Id:"",IsChanged:!1};n.Country={Id:"",IsChanged:!1};n.DiplomaSource={Id:"",IsChanged:!1};n.University={Id:"",IsChanged:!1};n.YADate="2019-04-10";n.delAcademicQualification;n.peracademicqual={};n.peracademicqual.NotRelevant=!1;n.peracademicqual.RelevancySchoolPhychology=!1;n.peracademicqual.RelevancySMEAE=!1;n.peracademicqual.HasPedagogicalCompetency=!1;n.peracademicqual.AcademicQualification=[];n.peracademicqual.AcademicDiploma=[];n.PostGraduateUniversities={};n.PostGraduateUniversities={selected:""};n.peracademicqual.PersonId=s;n.IsPostGraduateFromList=0;l={};n.ShowCheckBoxesMessage=!1;n.CheckBoxesMessage="Πρέπει να επιλέξετε τουλάχιστον μία από τις παραπάνω επιλογές";n.ShowMessageForOldRelevancies=!1;n.MessageForOldRelevancies="";n.updateMode=!1;c(s);n.fillFormControlsPostGrad=function(t){n.peracademicqual.Id="";n.peracademicqual.RelevancySchoolPhychology=!1;n.peracademicqual.RelevancySMEAE=!1;n.peracademicqual.HasPedagogicalCompetency=!1;n.peracademicqual.NotRelevant=!1;n.DiplomaAbroad="";n.ShowMessageForOldRelevancies=!1;n.ShowDiplomaNotInListMessage=!1;n.MessageForOldRelevancies="";n.PostGraduateUniversities={};n.PostGraduateUniversities={selected:""};t=="Add"&&(n.ModalTitle="Προσθήκη Ακαδημαϊκών Μεταπτυχιακού / Διδακτορικού",n.searchAcademicDiploma={},n.searchAcademicDiploma.selected="");n.showUploadFile=!1;n.PostGradDisableOrVisibleFields.AcademicQualification=!0;n.AcademicQualification={Id:"",IsChanged:!1};n.Country={Id:"",IsChanged:!1};n.University={Id:"",IsChanged:!1};n.DiplomaSource={Id:"",IsChanged:!1};n.academicDiplomas=[];n.peracademicqual.IsConfirmed="";n.DisableFieldsetPostGrad=!1;n.updateMode=!1;f.isEmpty(n.academicQualifications)&&f.getByAll("/api/PersonAcademicQualification/getAllAcademicStudies").then(function(t){n.academicQualifications=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});f.isEmpty(n.consts.academicDiplomaSourceType)&&f.getByAll("/api/PersonAcademicQualification/getAcademicDiplomaSourceTypes").then(function(t){n.consts.academicDiplomaSourceType=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});f.isEmpty(n.consts.equivalenceType)&&f.getByAll("/api/PersonAcademicQualification/getAcademicEquivalenceTypes").then(function(t){n.consts.equivalenceType=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.DisableAlertsRelevancies=function(){n.showAlertRelevancy=!1;n.showAlertSpec=!1};n.compareDateAndUserForDisable=function(t,i){var r=moment(t).format("YYYY-MM-DD"),u=moment(n.updateAfter).format("YYYY-MM-DD");return r>=u&&i==n.authentication.unitName?!0:!1};n.UpdateForOldDiplomas=function(){f.isEmptyValue(n.peracademicqual.Id)||(n.PostGradDisableOrVisibleFields.DisableDiplomaAbroad=!1,(n.peracademicqual.AcademicDiploma.RelevancySMEAE||n.peracademicqual.AcademicDiploma.RelevancySchoolPsychology)&&n.peracademicqual.AcademicDiploma.YARelevancyFlag==!1&&n.peracademicqual.DiplomaDate<=n.YADate?(n.DiplomaAbroad=n.peracademicqual.AcademicDiploma.Description,n.PostGradDisableOrVisibleFields.AcademicDiploma=!1,n.PostGradDisableOrVisibleFields.DiplomaAbroad=!0,n.PostGradDisableOrVisibleFields.DisableDiplomaAbroad=!0,n.PostGradDisableOrVisibleFields.DisableFromNotRelevant=!0,n.PostGradDisableOrVisibleFields.DisableFromRelevant=!0,n.ShowMessageForOldRelevancies=!0,n.peracademicqual.RelevancySchoolPhychology=n.peracademicqual.AcademicDiploma.RelevancySchoolPsychology,n.peracademicqual.RelevancySMEAE=n.peracademicqual.AcademicDiploma.RelevancySMEAE,n.peracademicqual.NotRelevant=n.peracademicqual.RelevancySMEAE||n.peracademicqual.RelevancySchoolPhychology||n.peracademicqual.HasPedagogicalCompetency?!1:!0,n.MessageForOldRelevancies="Ο ΜΤΣ δίνει συνάφεια στην ΕΑΕ / Σχολική Ψυχολογία εφόσον αποκτήθηκε πριν την έκδοση του ΦΕΚ 1217/τΒ/10-04-2019 (Άρθρο 2Α - Μεταβατικές Διατάξεις)"):(n.peracademicqual.AcademicDiploma.RelevancySMEAE||n.peracademicqual.AcademicDiploma.RelevancySchoolPsychology)&&n.peracademicqual.AcademicDiploma.YARelevancyFlag==!1&&n.peracademicqual.DiplomaDate>n.YADate?(n.PostGradDisableOrVisibleFields.DisableDiplomaAbroad=!0,n.ShowMessageForOldRelevancies=!0,n.peracademicqual.NotRelevant=n.peracademicqual.RelevancySMEAE||n.peracademicqual.RelevancySchoolPhychology||n.peracademicqual.HasPedagogicalCompetency?!1:!0,n.MessageForOldRelevancies="Ο ΜΤΣ δίνει συνάφεια στην ΕΑΕ / Σχολική Ψυχολογία εφόσον αποκτήθηκε πριν την έκδοση του ΦΕΚ 1217/τΒ/10-04-2019 (Άρθρο 2Α - Μεταβατικές Διατάξεις)"):(n.peracademicqual.AcademicDiploma.RelevancySMEAE||n.peracademicqual.AcademicDiploma.RelevancySchoolPsychology)&&n.peracademicqual.AcademicDiploma.YARelevancyFlag==!0?(n.ShowMessageForOldRelevancies=!0,n.MessageForOldRelevancies="Ο ΜΤΣ δίνει συνάφεια στην ΕΑΕ / Σχολική Ψυχολογία."):(n.ShowMessageForOldRelevancies=!1,n.MessageForOldRelevancies=""))};n.checkPanepistimioAndDiploma=function(){n.PostGradDisableOrVisibleFields.Save=f.isEmptyValue(n.searchAcademicDiploma.selected)||f.isEmptyValue(n.PostGraduateUniversities.selected)||f.isEmptyValue(n.peracademicqual.AcademicQualification)||n.peracademicqual.AcademicQualification.Id!=13?!1:!0};n.setAcademicDiploma=function(){n.peracademicqual.AcademicDiploma=n.searchAcademicDiploma.selected;n.checkPanepistimioAndDiploma()};n.formFieldsPostGrad=function(){var t;f.isEmptyValue(n.peracademicqual.AcademicQualification)||(f.isEmptyValue(n.AcademicQualification.Id)?(n.AcademicQualification.Id=n.peracademicqual.AcademicQualification.Id,n.AcademicQualification.IsChanged=!1):n.AcademicQualification.Id!=n.peracademicqual.AcademicQualification.Id?(n.AcademicQualification.Id=n.peracademicqual.AcademicQualification.Id,n.AcademicQualification.IsChanged=!0):n.AcademicQualification.IsChanged=!1,f.isEmptyValue(n.DiplomaSource.Id)&&!f.isEmptyValue(n.peracademicqual.DiplomaSource)?(n.DiplomaSource.Id=n.peracademicqual.DiplomaSource,n.DiplomaSource.IsChanged=!1):f.isEmptyValue(n.DiplomaSource.Id)||f.isEmptyValue(n.peracademicqual.DiplomaSource)?n.DiplomaSource.IsChanged=!1:n.DiplomaSource.Id!=n.peracademicqual.DiplomaSource?(n.DiplomaSource.Id=n.peracademicqual.DiplomaSource,n.DiplomaSource.IsChanged=!0,n.peracademicqual.AcademicDiploma.Country=""):n.DiplomaSource.IsChanged=!1,!f.isEmptyValue(n.Country.Id)||f.isEmptyValue(n.peracademicqual.AcademicDiploma)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?f.isEmptyValue(n.Country.Id)||f.isEmptyValue(n.peracademicqual.AcademicDiploma)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?n.Country.IsChanged=!1:n.Country.Id!=n.peracademicqual.AcademicDiploma.Country.Id?(n.Country.Id=n.peracademicqual.AcademicDiploma.Country.Id,n.Country.IsChanged=!0):n.Country.IsChanged=!1:(n.Country.Id=n.peracademicqual.AcademicDiploma.Country.Id,n.Country.IsChanged=!1),f.isEmptyValue(n.University.Id)?(n.University.Id=n.PostGraduateUniversities.selected.Id,n.University.IsChanged=!0):n.University.Id!=n.PostGraduateUniversities.selected?(n.University.Id=n.PostGraduateUniversities.selected,n.University.IsChanged=!0):n.University.IsChanged=!1,n.peracademicqual.AcademicQualification.Id==12?(n.firstOpenModal=0,n.peracademicqual.NotRelevant=!1,n.peracademicqual.HasPedagogicalCompetency=!1,n.peracademicqual.EquivalenceType="",f.isEmptyValue(n.peracademicqual.Id)&&(n.peracademicqual.Relevancy=!1),n.PostGradDisableOrVisibleFields={AcademicQualification:!0,DimplomaSource:!0,Country:!0,DiplomaDate:!0,DiplomaDegree:!0,DiplomaDateAndGrade:!0,AcademicDiploma:!1,DiplomaAbroad:!0,EquivalenceType:!1,RelevancySchoolPhychology:!1,RelevancySMEAE:!1,HasPedagogicalCompetency:!1,NotRelevant:!1,DisableFromNotRelevant:!1,DisableFromRelevant:!1,Save:!0,DoctoraRelevancySchoolPhychology:!0,DoctoraRelevancySMEAE:!0,DisableSaveButton:!1,DisableFromSMEA:!1,DisableFromSchoolPhychology:!1},!(n.peracademicqual.RelevancySMEAE||n.peracademicqual.RelevancySchoolPhychology)||n.peracademicqual.RelevancySMEAEOld||n.peracademicqual.RelevancySchoolPsychologyOld?(n.PostGradDisableOrVisibleFields.DoctoralDetails=!1,n.peracademicqual.CertificateNumber="",n.peracademicqual.CertificateDate=""):n.PostGradDisableOrVisibleFields.DoctoralDetails=!0,!f.isEmptyValue(n.peracademicqual.DiplomaSource)&&n.peracademicqual.DiplomaSource>1?(f.isEmptyValue(n.countries)||n.countries[0].Id==3)&&f.getByAll("/api/Country/getCountriesWithoutGreece").then(function(t){n.countries=t;n.academicDiplomas=[]},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):f.isEmptyValue(n.peracademicqual.DiplomaSource)||n.peracademicqual.DiplomaSource!=1||(n.countries=[{Id:3,Description:"ΕΛΛΑΔΑ",IsEU:!0}],f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)?(n.peracademicqual.AcademicDiploma=[{Country:[]}],n.peracademicqual.AcademicDiploma.Country=n.countries[0]):n.peracademicqual.AcademicDiploma.Country=n.countries[0])):n.peracademicqual.AcademicQualification.Id==3?(n.firstOpenModal=0,n.peracademicqual.FirstSpeciality="",n.peracademicqual.DiplomaDate="",n.peracademicqual.DiplomaDegree="",n.peracademicqual.DiplomaSource="",f.isEmptyValue(n.peracademicqual.AcademicDiploma)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||(n.peracademicqual.AcademicDiploma.Country=""),n.peracademicqual.EquivalenceType="",n.peracademicqual.AcademicDiploma="",n.DiplomaAbroad="",n.PostGradDisableOrVisibleFields={AcademicQualification:!0,FirstSpeciality:!1,DimplomaSource:!1,Country:!1,DiplomaDate:!1,DiplomaDegree:!1,DiplomaDateAndGrade:!1,AcademicDiploma:!1,DiplomaAbroad:!1,Relevancy:!1,EquivalenceType:!1,Save:!0,RelevancySchoolPhychology:!1,RelevancySMEAE:!1,HasPedagogicalCompetency:!1,NotRelevant:!1,DisableFromNotRelevant:!1,DisableFromRelevant:!1,DisableFromSMEA:!1,DisableFromSchoolPhychology:!1,DoctoraRelevancySchoolPhychology:!1,DoctoraRelevancySMEAE:!1,DisableSaveButton:!1}):(n.IsDisabledFromUpdate=f.isEmptyValue(n.peracademicqual.Id)||f.isValueInArray(f.getRoleCode(n.authentication.role),"a")?!1:!0,n.updateMode&&n.firstOpenModal>1&&(n.searchAcademicDiploma={},n.searchAcademicDiploma.selected=""),n.firstOpenModal=n.firstOpenModal+1,f.isEmptyValue(n.peracademicqual.Id)&&(n.peracademicqual.Relevancy=!1),n.PostGradDisableOrVisibleFields.RelevancySchoolPhychology=!0,n.PostGradDisableOrVisibleFields.RelevancySMEAE=!0,n.PostGradDisableOrVisibleFields.DoctoraRelevancySchoolPhychology=!1,n.PostGradDisableOrVisibleFields.DoctoraRelevancySMEAE=!1,n.PostGradDisableOrVisibleFields.HasPedagogicalCompetency=!0,n.PostGradDisableOrVisibleFields.NotRelevant=!0,n.PostGradDisableOrVisibleFields.DoctoralDetails=!1,n.peracademicqual.CertificateNumber="",n.peracademicqual.CertificateDate="",n.PostGradDisableOrVisibleFields.AcademicDiploma=!1,n.DiplomaAbroad="",n.PostGradDisableOrVisibleFields.DiplomaAbroad=!1,n.peracademicqual.RelevancySMEAE&&(n.peracademicqual.NotRelevant=!1,n.peracademicqual.RelevancySchoolPhychology=!1,n.PostGradDisableOrVisibleFields.DisableFromSMEA=!0),n.peracademicqual.RelevancySchoolPhychology&&(n.peracademicqual.NotRelevant=!1,n.peracademicqual.RelevancySMEAE=!1,n.PostGradDisableOrVisibleFields.DisableFromSchoolPhychology=!0),n.PostGradDisableOrVisibleFields.AcademicQualification=!0,n.PostGradDisableOrVisibleFields.DimplomaSource=f.isEmptyValue(n.peracademicqual.AcademicQualification.Id)?!1:!0,!f.isEmptyValue(n.peracademicqual.DiplomaSource)&&n.peracademicqual.DiplomaSource>1?(n.PostGradDisableOrVisibleFields.Country=!0,(n.AcademicQualification.IsChanged||f.isEmptyValue(n.countries)||n.countries[0].Id==3)&&f.getByAll("/api/Country/getCountriesWithoutGreece").then(function(t){n.countries=t;n.academicDiplomas=[]},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),(n.AcademicQualification.IsChanged||n.DiplomaSource.IsChanged||n.Country.IsChanged||f.isEmptyValue(n.academicDiplomas)||f.isEmpty(n.universityList)||n.University.IsChanged)&&(f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?(n.PostGradDisableOrVisibleFields.DiplomaDate=!1,n.PostGradDisableOrVisibleFields.DiplomaDegree=!1,n.PostGradDisableOrVisibleFields.DiplomaDateAndGrade=!1,n.PostGradDisableOrVisibleFields.EquivalenceType=!1,n.PostGradDisableOrVisibleFields.AcademicDiploma=!1,n.PostGradDisableOrVisibleFields.DiplomaAbroad=!1,n.PostGradDisableOrVisibleFields.Relevancy=!1,n.PostGradDisableOrVisibleFields.Save=!1):(f.getByParams({CountryId:n.peracademicqual.AcademicDiploma.Country.Id},"/api/PersonAcademicQualification/getPostGraduateUniversitiesByCountry").then(function(t){n.PostGradDisableOrVisibleFields.University=!0;n.universityList=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στην εμφάνιση των πανεπιστημίων")}),f.isEmptyValue(n.PostGraduateUniversities.selected)||f.isEmptyValue(n.PostGraduateUniversities.selected.Id)||(n.PostGradDisableOrVisibleFields.AcademicDiploma=!0,t={AcademicQualificationId:n.peracademicqual.AcademicQualification.Id,CountryId:n.peracademicqual.AcademicDiploma.Country.Id,UniversityId:n.PostGraduateUniversities.selected.Id},f.getByParams(t,"/api/PersonAcademicQualification/getAcademicDiplomaByQualificationCountryAndUniversity").then(function(t){n.academicDiplomas=t;n.PostGradDisableOrVisibleFields.DiplomaDate=!0;n.PostGradDisableOrVisibleFields.DiplomaDegree=!0;n.PostGradDisableOrVisibleFields.DiplomaDateAndGrade=!0;n.PostGradDisableOrVisibleFields.EquivalenceType=!0;n.UpdateForOldDiplomas();n.checkPanepistimioAndDiploma()},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}))))):f.isEmptyValue(n.peracademicqual.DiplomaSource)||n.peracademicqual.DiplomaSource!=1?(n.PostGradDisableOrVisibleFields.Country=!1,n.PostGradDisableOrVisibleFields.DiplomaDate=!1,n.PostGradDisableOrVisibleFields.DiplomaDegree=!1,n.PostGradDisableOrVisibleFields.DiplomaDateAndGrade=!1,n.PostGradDisableOrVisibleFields.EquivalenceType=!1,n.PostGradDisableOrVisibleFields.AcademicDiploma=!1,n.PostGradDisableOrVisibleFields.DiplomaAbroad=!1,n.PostGradDisableOrVisibleFields.Relevancy=!1,n.PostGradDisableOrVisibleFields.Save=!1):(n.countries=[{Id:3,Description:"ΕΛΛΑΔΑ",IsEU:!0}],f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)?(n.peracademicqual.AcademicDiploma=[{Country:[]}],n.peracademicqual.AcademicDiploma.Country=n.countries[0]):n.peracademicqual.AcademicDiploma.Country=n.countries[0],(n.AcademicQualification.IsChanged||n.DiplomaSource.IsChanged||n.Country.IsChanged||f.isEmptyValue(n.academicDiplomas)||f.isEmpty(n.universityList)||n.University.IsChanged)&&(f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?(n.academicDiplomas=[],n.UpdateForOldDiplomas()):(f.getByParams({CountryId:n.peracademicqual.AcademicDiploma.Country.Id},"/api/PersonAcademicQualification/getPostGraduateUniversitiesByCountry").then(function(t){n.PostGradDisableOrVisibleFields.University=!0;n.universityList=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στην εμφάνιση των πανεπιστημίων")}),f.isEmptyValue(n.PostGraduateUniversities.selected)||f.isEmptyValue(n.PostGraduateUniversities.selected.Id)||(n.PostGradDisableOrVisibleFields.AcademicDiploma=!0,t={AcademicQualificationId:n.peracademicqual.AcademicQualification.Id,CountryId:n.peracademicqual.AcademicDiploma.Country.Id,UniversityId:n.PostGraduateUniversities.selected.Id},f.getByParams(t,"/api/PersonAcademicQualification/getAcademicDiplomaByQualificationCountryAndUniversity").then(function(t){n.academicDiplomas=t;n.UpdateForOldDiplomas()},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})))),n.PostGradDisableOrVisibleFields.Country=!1,n.PostGradDisableOrVisibleFields.DiplomaDate=!0,n.PostGradDisableOrVisibleFields.DiplomaDegree=!0,n.PostGradDisableOrVisibleFields.DiplomaDateAndGrade=!0,n.PostGradDisableOrVisibleFields.EquivalenceType=!1,(n.peracademicqual.RelevancySMEAE||n.peracademicqual.RelevancySchoolPhychology||n.peracademicqual.HasPedagogicalCompetency)&&(n.DiplomaAbroad=""),n.checkPanepistimioAndDiploma())));n.PostGradDisableOrVisibleFields.AcademicQualification=n.updateMode?!1:!0;$("#editAcademicStudiesForm").validate().resetForm()};n.openAddAcademicModalPostGrad=function(t){blockUI({target:"#tblAcademic",animate:!0});n.PostGraduateUniversities={selected:""};var i=u.all([n.fillFormControlsPostGrad(""),f.getByParams({id:t.Id},"/api/PersonAcademicQualification/getPersonAcademicQualificationById")]);i.then(function(t){o(function(){n.SelectedAcademic=t[1];n.ModalTitle="Προβολή / Επεξεργασία Μεταπτυχιακού / Διδακτορικού";n.DisableFieldsetPostGrad=n.pageRules.specSmea.CanUpdate?n.SelectedAcademic.IsConfirmed&&n.pageRules.specSmea.CanUpdate?f.isValueInArray(n.pageRules.specSmea.CanAccess,"u1, u2")?!0:f.isValueInArray(n.pageRules.specSmea.CanAccess,"a, m1, m2")?!1:f.isValueInArray(n.pageRules.specSmea.CanAccess,"d1, d2, p")?!1:!0:!n.SelectedAcademic.IsConfirmed&&n.pageRules.specSmea.CanUpdate?!1:!0:!0;n.DisableFieldsetNotActive=!f.isValueInArray(f.getRoleCode(n.authentication.role),"m1, m2, a")&&n.SelectedAcademic.IsLocked?!0:!1;n.updateMode=!0;n.firstOpenModal=1;n.canDisableFromUserAndCreationDate=!1;n.peracademicqual.Id=n.SelectedAcademic.Id;n.peracademicqual.Relevancy=n.SelectedAcademic.Relevancy;n.peracademicqual.IsConfirmed=n.SelectedAcademic.IsConfirmed;n.peracademicqual.CountClassification=n.SelectedAcademic.CountClassification;n.peracademicqual.RelevancySMEAEOld=n.SelectedAcademic.RelevancySMEAEOld;n.peracademicqual.RelevancySchoolPsychologyOld=n.SelectedAcademic.RelevancySchoolPsychologyOld;n.peracademicqual.DiplomaEquivalenceDate=n.SelectedAcademic.DiplomaEquivalenceDate;n.peracademicqual.DiplomaEquivalenceDateNumber=n.SelectedAcademic.DiplomaEquivalenceDateNumber;n.peracademicqual.CreationDate=n.SelectedAcademic.CreationDate;n.peracademicqual.CreatedRegionAndUnitDescription=n.SelectedAcademic.CreatedRegionAndUnitDescription;f.isEmptyValue(n.SelectedAcademic.AcademicDiploma.PostGraduateUniversity)||(n.PostGraduateUniversities.selected=n.SelectedAcademic.AcademicDiploma.PostGraduateUniversity);n.canDisableFromUserAndCreationDate=n.compareDateAndUserForDisable(n.peracademicqual.CreationDate,n.peracademicqual.CreatedRegionAndUnitDescription);n.SelectedAcademic.AcademicQualification.Id==12?(n.peracademicqual.AcademicQualification=n.SelectedAcademic.AcademicQualification,n.peracademicqual.AcademicQualificationId=n.SelectedAcademic.AcademicQualificationId,n.peracademicqual.AcademicDiploma=n.SelectedAcademic.AcademicDiploma,n.peracademicqual.AcademicDiplomaId=n.SelectedAcademic.AcademicDiplomaId,n.DiplomaAbroad=n.SelectedAcademic.AcademicDiploma.Description,n.peracademicqual.DiplomaDate=n.SelectedAcademic.DiplomaDate,n.peracademicqual.DiplomaDegree=n.SelectedAcademic.DiplomaDegree,n.peracademicqual.DiplomaSource=n.SelectedAcademic.DiplomaSource,n.peracademicqual.RelevancySMEAE=n.SelectedAcademic.RelevancySMEAE,n.peracademicqual.RelevancySpeciality=n.SelectedAcademic.RelevancySpeciality,n.peracademicqual.RelevancySchoolPhychology=n.SelectedAcademic.RelevancySchoolPhychology,n.peracademicqual.HasPedagogicalCompetency=n.SelectedAcademic.AcademicDiploma.HasPedagogicalCompetency,n.peracademicqual.CertificateNumber=n.SelectedAcademic.CertificateNumber,n.peracademicqual.CertificateDate=n.SelectedAcademic.CertificateDate,n.peracademicqual.NotRelevant=!1,n.peracademicqual.FirstSpeciality="",n.peracademicqual.EquivalenceType=""):(n.peracademicqual.AcademicQualification=n.SelectedAcademic.AcademicQualification,n.peracademicqual.AcademicQualificationId=n.SelectedAcademic.AcademicQualificationId,n.peracademicqual.AcademicDiploma=n.SelectedAcademic.AcademicDiploma,n.peracademicqual.AcademicDiplomaId=n.SelectedAcademic.AcademicDiplomaId,n.searchAcademicDiploma.selected=n.SelectedAcademic.AcademicDiploma,n.DiplomaAbroad=n.SelectedAcademic.AcademicDiploma.Description,n.peracademicqual.DiplomaDate=n.SelectedAcademic.DiplomaDate,n.peracademicqual.DiplomaDegree=n.SelectedAcademic.DiplomaDegree,n.peracademicqual.DiplomaSource=n.SelectedAcademic.DiplomaSource,n.peracademicqual.RelevancySMEAE=n.SelectedAcademic.RelevancySMEAE,n.peracademicqual.RelevancySpeciality=n.SelectedAcademic.RelevancySpeciality,n.peracademicqual.RelevancySchoolPhychology=n.SelectedAcademic.RelevancySchoolPhychology,n.peracademicqual.HasPedagogicalCompetency=n.SelectedAcademic.AcademicDiploma.HasPedagogicalCompetency,n.peracademicqual.CertificateNumber=n.SelectedAcademic.CertificateNumber,n.peracademicqual.CertificateDate=n.SelectedAcademic.CertificateDate,n.peracademicqual.FirstSpeciality="",n.SelectedAcademic.AcademicQualification.Id==13&&f.isEmptyValue(n.PostGraduateUniversities.selected)?(n.ShowDiplomaNotInListMessage=!0,n.DiplomaNotInListMessage="",n.DiplomaNotInListMessage="Το μεταπτυχιακό "+n.DiplomaAbroad+" έχει καταχωριστεί και ελεγχθεί πριν το 2023."):n.ShowDiplomaNotInListMessage=!1,f.isEmptyValue(n.peracademicqual.DiplomaSource)||(n.peracademicqual.DiplomaSource==1?(n.countries=[{Id:3,Description:"ΕΛΛΑΔΑ",IsEU:!0}],n.peracademicqual.AcademicDiploma.Country=n.countries[0]):(n.peracademicqual.AcademicDiploma.Country=n.SelectedAcademic.AcademicDiploma.Country,n.peracademicqual.EquivalenceType=n.SelectedAcademic.EquivalenceType)))},300);o(function(){n.formFieldsPostGrad();n.PostGradDisableOrVisibleFields.AcademicQualification=!1;unblockUI("#tblAcademic");$("#AddAcademicModal").modal("show")},300)})};n.openModal=function(t){n.delAcademicQualification=t};n.DeleteAction=function(t){var i=t;i.ModifiedBy=n.authentication.userName;i.ModifiedUserRole=n.authentication.role;i.ModifiedRegionAndUnitDescription=n.authentication.unitName;i.PersonId=s;f.postByParams(i,"/api/PersonAcademicQualification/DeleteAcademicQualification").then(function(){n.personAcademicQualifications.splice(n.personAcademicQualifications.indexOf(t),1);n.showDataTable=f.isEmptyValue(n.personAcademicQualifications)?!1:!0},function(n){r.pop("error","Παρουσιάστηκε σφάλμα. Η εγγραφή δεν διαγράφηκε.",n.data)})};n.cancel=function(){n.firstOpenModal=0;n.peracademicqual={};n.peracademicqual.AcademicQualification=[];n.peracademicqual.AcademicDiploma=[];n.peracademicqual.PersonId=s;n.peracademicqual.NotRelevant=!1;n.peracademicqual.RelevancySchoolPhychology=!1;n.peracademicqual.RelevancySMEAE=!1;n.peracademicqual.HasPedagogicalCompetency=!1;n.IsDisabledFromUpdate=!1;n.PostGradDisableOrVisibleFields={AcademicQualification:!0,FirstSpeciality:!1,DimplomaSource:!1,Country:!1,DiplomaDate:!1,DiplomaDegree:!1,DiplomaDateAndGrade:!1,AcademicDiploma:!1,DiplomaAbroad:!1,Relevancy:!1,EquivalenceType:!1,Save:!1,RelevancySchoolPhychology:!1,RelevancySMEAE:!1,HasPedagogicalCompetency:!1,NotRelevant:!1,DisableFromNotRelevant:!1,DisableFromRelevant:!1,DoctoralDetails:!1,DoctoraRelevancySchoolPhychology:!1,DoctoraRelevancySMEAE:!1,DisableSaveButton:!1,DisableFromSMEA:!1,DisableFromSchoolPhychology:!1};$("#editAcademicStudiesForm").validate().resetForm()};n.saveActionPostGrad=function(t){if($("#editAcademicStudiesForm").valid()&&!n.ShowCheckBoxesMessage){n.PostGradDisableOrVisibleFields.DisableSaveButton=!0;var i=a();t=="Confirm"?i.IsConfirmed=!0:t=="UnConfirm"&&(i.IsConfirmed=!1);f.isEmptyValue(i.Id)?(i.CreatedBy=n.authentication.userName,i.CreatedUserRole=n.authentication.role,i.CreatedRegionAndUnitDescription=n.authentication.unitName,f.postByParams(i,"/api/PersonAcademicQualification/InsertAcademicStudies").then(function(){c(s);n.PostGradDisableOrVisibleFields.DisableSaveButton=!1;$("#AddAcademicModal").modal("hide");n.cancel()},function(t){r.pop("error","ΠΡΟΣΟΧΗ",t.data);n.PostGradDisableOrVisibleFields.DisableSaveButton=!1})):(i.ModifiedBy=n.authentication.userName,i.ModifiedUserRole=n.authentication.role,i.ModifiedRegionAndUnitDescription=n.authentication.unitName,f.postByParams(i,"/api/PersonAcademicQualification/UpdateAcademicStudies").then(function(){c(s);n.PostGradDisableOrVisibleFields.DisableSaveButton=!1;n.firstOpenModal=0;$("#AddAcademicModal").modal("hide");n.cancel()},function(t){r.pop("error","ΠΡΟΣΟΧΗ",t.data);n.PostGradDisableOrVisibleFields.DisableSaveButton=!1}))}};n.minDate="01/01/1900";n.maxDate=new Date;n.formats=["dd/MM/yyyy"];n.format=n.formats[0];n.clear=function(){n.dt=null};n.toggleMin=function(){n.minDate=n.minDate?null:new Date};n.toggleMin();n.open=function(t,i){t.preventDefault();t.stopPropagation();n[i]=!0};n.dateOptions={formatYear:"yy",startingDay:1,format:"dd/mm/yyyy"}};AcademicStudiesController.$inject=["$scope","PassParameters","$state","toaster","$q","GeneralFactory","$filter","$timeout","$upload","$location","$anchorScroll"];AlgorithmHistoryController=function(n,t,i,r,u,f,e,o,s,h,c,l){function p(n){return a[n.BackgroundProcessId]=n,v[n.AlgorithmId]=n,n.IsLast?'<div class="text-center"><button type="button" class="btn btn-primary btn-xs" uib-tooltip="τροποποίηση φακέλου" onclick="angular.element(this).scope().showResults(\''+n.BackgroundProcessId+"','"+n.AlgorithmId+'\')"><i class="fa fa-pencil"><\/i><\/button> <\/div>':""}var a,v,y;n.AlgorithmType={};n.showButton=!1;n.selType=[];n.dtInstance={};a={};v={};n.firststep=!0;y=function(){l.getByParams({applicationTypeId:n.selType.Id},"/api/Management/getBackroundProcessesForHistoryById").then(function(t){n.dtOptions.data=t},function(n){s.pop("error","ΠΡΟΣΟΧΗ",n.data)})};h.getAlgorithmType().then(function(t){n.AlgorithmType=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Υπήρξε πρόβλημα κατά την φόρτωση των κατηγοριών "+n.error_description)});n.DataFinal=[];n.dtOptions=f.newOptions().withDataProp("data").withPaginationType("full_numbers").withOption("order",[2,"desc"]).withDOM("Blfrtip").withButtons([{extend:"excelHtml5",fileName:"CustomFileName.xlsx",exportOptions:{columns:":visible"},exportData:{decodeEntities:!0}}]);n.dtColumns=[e.newColumn("BackgroundProcessId").withTitle("BackgroundProcessId").notVisible(),e.newColumn("AlgorithmId").withTitle("AlgorithmId").notVisible(),e.newColumn("Description").withTitle("Περιγραφή"),e.newColumn("StartTime").withTitle("Ημερομηνία έναρξης"),e.newColumn("EndTime").withTitle("Ημερομηνια τερματισμού"),e.newColumn(null).withTitle("Εξαγωγή Απότελεσμάτων").notSortable().renderWith(p).withClass("text-center")];n.changedAlgorithmType=function(){n.showButton=n.selType!=null?!0:!1};n.getHistory=function(){n.dtInstance.changeData(y())};n.showResults=function(n,r){t.setBackbgroudProcessId(r);i.go("showalgorithmresults")}};AlgorithmHistoryController.$inject=["$scope","PassParameters","$state","$filter","ClassificationFactory","DTOptionsBuilder","DTColumnBuilder","$q","toaster","ManagementFactory","$compile","GeneralFactory"];AnnouncementsController=function(n,t){n.filteredNews=[];n.viewby=5;n.totalItems=n.filteredNews.length;n.currentPage=4;n.itemsPerPage=n.viewby;n.maxSize=5;n.getAnnouncementsAsync=function(){blockUI({target:"#loadNews",animate:!0});t.getByAll("/api/General/getAnnouncements").then(function(t){n.filteredNews=t;n.totalItems=n.filteredNews.length;n.showPaging=!0;unblockUI("#loadNews")},function(){unblockUI("#loadNews");toaster.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία φόρτωσης ανακοινώσεων")})};n.getAnnouncementsAsync();n.setPage=function(t){n.currentPage=t};n.setItemsPerPage=function(t){n.itemsPerPage=t;n.currentPage=1}};AnnouncementsController.$inject=["$scope","GeneralFactory"];AssociateController=function(n,t,i,r){n.savedSuccessfully=!1;n.message="";n.registerData={userName:r.externalAuthData.userName,provider:r.externalAuthData.provider,externalAccessToken:r.externalAuthData.externalAccessToken};n.registerExternal=function(){r.registerExternal(n.registerData).then(function(){n.savedSuccessfully=!0;n.message="User has been registered successfully, you will be redicted to uiselect page in 2 seconds.";u()},function(t){var i=[];for(var r in t.modelState)i.push(t.modelState[r]);n.message="Failed to register user due to:"+i.join(" ")})};var u=function(){var n=i(function(){i.cancel(n);t.path("/uiselect")},2e3)}};AssociateController.$inject=["$scope","$location","$timeout","AuthService"];ChangeDataRequest=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v){function w(t){v(angular.element(t).contents())(n)}function k(t,i,r,f){n.paramsForDataTable[f.row]=t;var e="";return(u.isValueInArray(u.getRoleCode(n.authentication.role),"a, m1, m2, s,u1, u2")||n.showAnwserForIntendancy)&&(e='<button type="button" class="btn btn-primary btn-xs" uib-tooltip="Ενημέρωση αιτήματος" ng-click="editRequest(paramsForDataTable['+f.row+"], "+f.row+')" ng-show="pageRules.changeDataRequest.CanView"><i class="fa fa-search"><\/i><\/button>',e=e+'<button type="button" class="btn btn-danger btn-xs" uib-tooltip="Διαγραφή αιτήματος" data-toggle="modal" data-target="#myModalDeleteRequest" ng-click="openModalDeleteRequest(paramsForDataTable['+f.row+'])" ng-show="pageRules.changeDataRequest.CanDisable" ><i class="fa fa-ban"><\/i><\/button>'),e}function nt(t,i,r,f){n.paramsForDataTableOld[f.row]=t;var e="";return u.isValueInArray(u.getRoleCode(n.authentication.role),"a, m1, m2, s")&&(e='<button type="button" class="btn btn-primary btn-xs" uib-tooltip="Ενημέρωση αιτήματος" ng-click="editOldRequest(paramsForDataTableOld['+f.row+"], "+f.row+')" ng-show="pageRules.changeDataRequest.CanView"><i class="fa fa-search"><\/i><\/button>'),e}function tt(){return dto={Id:y,IntendancyId:n.person.IntendancyId,ModifiedBy:n.authentication.userName,LastEditDate:"",UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.regionAndUnitId}}function it(){return dto={Id:u.isEmptyValue(n.changeDataRequest.Id)?"":n.changeDataRequest.Id,PersonId:y,ChangeDataRequestId:n.changeDataRequest.ChangeDataRequestItem.selected.Id,FileRequired:n.changeDataRequest.ChangeDataRequestItem.selected.FileRequired,Description:n.changeDataRequest.Description,PedagogicalCompetencyId:u.isEmptyValue(n.changeDataRequest.PedagCompetency.selected.Id)?"":n.changeDataRequest.PedagCompetency.selected.Id,Documents:n.changeDataRequest.Documents,RequestedBy:u.isValueInArray(u.getRoleCode(n.authentication.role),"u1, u2")?n.personMessage.Name:n.changeDataRequest.RequestedBy,SendDocumentsById:u.isEmptyValue(n.changeDataRequest.SendDocuments.selected)?"":u.isEmptyValue(n.changeDataRequest.SendDocuments.selected.Id)?"":n.changeDataRequest.SendDocuments.selected.Id,Answer:u.isEmptyValue(n.changeDataRequest.Answer)?"":n.changeDataRequest.Answer,IsCompleted:n.changeDataRequest.IsCompleted,PersonChangeDataRequestFile:n.SendDataForCVFullDto,CreatedBy:u.isEmptyValue(n.changeDataRequest.CreatedBy)?"":n.changeDataRequest.CreatedBy,CreationDate:u.isEmptyValue(n.changeDataRequest.CreationDate)?"":n.changeDataRequest.CreationDate,CreatedUserRole:u.isEmptyValue(n.changeDataRequest.CreatedUserRole)?"":n.changeDataRequest.CreatedUserRole,CreatedRegionAndUnitDescription:u.isEmptyValue(n.changeDataRequest.CreatedRegionAndUnitDescription)?"":n.changeDataRequest.CreatedRegionAndUnitDescription,IntendancyId:"",IsNew:n.changeDataRequest.IsNew,CreatModifiedByedBy:u.isEmptyValue(n.changeDataRequest.ModifiedBy)?"":n.changeDataRequest.ModifiedBy,LastEditDate:u.isEmptyValue(n.changeDataRequest.LastEditDate)?"":n.changeDataRequest.LastEditDate,ModifiedUserRole:u.isEmptyValue(n.changeDataRequest.ModifiedUserRole)?"":n.changeDataRequest.ModifiedUserRole,ModifiedRegionAndUnitDescription:u.isEmptyValue(n.changeDataRequest.ModifiedRegionAndUnitDescription)?"":n.changeDataRequest.ModifiedRegionAndUnitDescription}}function rt(){n.canSave=!0;(u.isEmptyValue(n.changeDataRequest.ChangeDataRequestItem.selected.Id)||u.isEmptyValue(n.changeDataRequest.Description)||n.VisibleFields.PedagCompetency&&u.isEmptyValue(n.changeDataRequest.PedagCompetency.selected.Id)||n.changeDataRequest.ChangeDataRequestItem.selected.FileRequired&&u.isEmptyValue(n.SendDataForCVDto.Id))&&(n.canSave=!1)}function d(){return dto={Id:u.isEmptyValue(n.perFek.Id)?"":n.perFek.Id,PersonId:y,AsepFekId:n.perFek.AsepFekList.Id,ProtocolNumber:n.perFek.ProtocolNumber,CreatedBy:u.isEmptyValue(n.perFek.CreatedBy)?"":n.perFek.CreatedBy,CreationDate:u.isEmptyValue(n.perFek.CreationDate)?"":n.perFek.CreationDate,ModifiedBy:u.isEmptyValue(n.perFek.ModifiedBy)?"":n.perFek.ModifiedBy,LastEditDate:"",UserRole:n.authentication.role}}var y,g,p,b;n.pageRules={};n.AsepList=[];n.person={};n.person.Id="";n.person.Intendancy="";n.asep="";n.showAsepMessage=!1;n.showAlertForProtocol=!1;n.showAlertNotHaveUploadMessage=!1;n.showAlertForchangeIntendancy=!1;n.ShowOldRequests=!1;n.alertsMessageForAsep=[{type:"info",msg:""}];n.alertsMessageForProtocol=[{type:"danger",msg:"Ο αριθμός πρωτοκόλλου της αίτησης ΑΣΕΠ δεν είναι έγκυρος."}];n.alertsNotHaveUploadMessage=[{type:"danger",msg:"Δεν έχει μεταφορτωθεί αρχείο."}];n.showMessageForGreekLanguage=!1;n.alertsForGreekLanguage=[{type:"danger",msg:"Επισημαίνεται ότι οι μη κάτοχοι πτυχίων από ελληνικά ΑΕΙ οφείλουν να μεταφορτώσουν μαζί με τους τίτλους σπουδών και το απαραίτητο δικαιολογητικό πιστοποίησης ελληνομάθειας (βλ. ΚΕΦΑΛΑΙΟ Δ - ΑΠΑΙΤΟΥΜΕΝΑ ΔΙΚΑΙΟΛΟΓΗΤΙΚΑ της οικείας προκήρυξης του ΑΣΕΠ)."}];n.alertsMessageForchangeIntendancy=[{type:"danger",msg:"Μπορείτε να επιλέξετε μόνο τη ΔιεύθυνσηΠεριφέρεια  στην οποία ανήκετε."}];n.haveAsepFek=!1;n.haveAvailRequest=!1;n.perAsepFeks=[];n.FekListForHtml=[];n.labelButton="Καταχώριση";n.labelButtonRequest="Καταχώριση";n.perFek={};n.perFek.PersonId={};n.IntendancyLabel="";n.IntendancyListAll=[];n.IntendancyListForHtml=[];n.changeDataList=[];n.changeDataListAll=[];n.changeDataListForHtml=[];n.personChangeRequest=[];n.sumOfUpload=0;n.consts={};n.consts.PedagogicalCompetency=[];n.IntendancyType=[{Id:1,Description:"ΔΙΕΥΘΥΝΣΗ ΠΡΩΤΟΒΑΘΜΙΑΣ ΕΚΠΑΙΔΕΥΣΗΣ"},{Id:2,Description:"ΔΙΕΥΘΥΝΣΗ ΔΕΥΤΕΡΟΒΑΘΜΙΑΣ ΕΚΠΑΙΔΕΥΣΗΣ"}];n.chooseIntendancyType={};n.disableIntendancy=!1;n.showIntendancy=!1;n.disableForOtherIntendancy=!1;n.DisableFieldset=!1;n.visible=!1;n.visibleRequest=!1;n.visibleOldRequest=!1;n.showRequest=!1;n.openPopUp=!1;n.disableSave={Request:!1,Fek:!1};n.changeDataRequest={};n.changeDataRequest.ChangeDataRequestItem={selected:""};n.changeDataRequest.SendDocuments={selected:""};n.changeDataRequest.PedagCompetency={selected:""};n.consts={};n.paramsForDataTable={};n.paramsForDataTableOld={};n.upload=[];n.messages={completed:"",percentage:"0",error:""};n.uploadedFileDetails="";n.SendDataForCVDto={Id:"",PersonChangeDataRequestId:"",PersonId:""};n.SendDataForCVFullDto={Id:"",PersonChangeDataRequestId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""};n.ShowDownloadField=!1;n.disableRequest=!1;n.disableOldRequest=!1;n.validTaxnumber=0;g=0;n.dtInstance={};n.VisibleFields={PedagCompetency:!1};y=t.getPersonId();u.isValueInArray(u.getRoleCode(n.authentication.role),"u1, u2")&&(y=n.authentication.personId);n.SendDataForCVDto.PersonId=y;n.dtOptions=l.newOptions().withPaginationType("full_numbers").withOption("order",[2,"desc"]).withOption("createdRow",w);n.dtOptions1=l.newOptions().withPaginationType("full_numbers").withOption("order",[2,"desc"]).withOption("createdRow",w);n.dtColumns3=[a.newColumn("Id").withTitle("Id").notVisible(),a.newColumn("TaxNumber").withTitle("Α.Φ.Μ."),a.newColumn("Lastname").withTitle("Επώνυμο"),a.newColumn("Firstname").withTitle("Όνομα"),a.newColumn("ConcatenateSpecialities").withTitle("Κλάδος"),a.newColumn("ChangeDataRequest").withTitle("Πεδίο προς αλλαγή"),a.newColumn("Completed").withTitle("Διεκπεραιωμένο"),a.newColumn("CreationDateString").withTitle("Ημ. Αιτήματος"),a.newColumn("RequestedBy").withTitle("Αιτήθηκε από "),a.newColumn(null).withTitle("Ενέργειες").notSortable().renderWith(nt).withClass("text-center dataTables_Actions_150")];n.dtColumns2=[a.newColumn("Id").withTitle("Id").notVisible(),a.newColumn("TaxNumber").withTitle("Α.Φ.Μ."),a.newColumn("Lastname").withTitle("Επώνυμο"),a.newColumn("Firstname").withTitle("Όνομα"),a.newColumn("ConcatenateSpecialities").withTitle("Κλάδος"),a.newColumn("ChangeDataRequest").withTitle("Πεδίο προς αλλαγή"),a.newColumn("Completed").withTitle("Διεκπεραιωμένο"),a.newColumn("CreationDateString").withTitle("Ημ. Αιτήματος"),a.newColumn("RequestedBy").withTitle("Αιτήθηκε από "),a.newColumn(null).withTitle("Ενέργειες").notSortable().renderWith(k).withClass("text-center dataTables_Actions_150")];n.dtColumns=[a.newColumn("Id").withTitle("Id").notVisible(),a.newColumn("ChangeDataRequest").withTitle("Πεδίο προς αλλαγή"),a.newColumn("Completed").withTitle("Διεκπεραιωμένο"),a.newColumn("CreationDateString").withTitle("Ημ. Αιτήματος"),a.newColumn("RequestedBy").withTitle("Αιτήθηκε από "),a.newColumn(null).withTitle("Ενέργειες").notSortable().renderWith(k).withClass("text-center dataTables_Actions_150")];p=function(){u.getByParams({personId:y},"/api/ChangeDataRequest/getPersonChangeDataByPersonId").then(function(t){n.dtOptions.data=t;n.findRequestsForHtml()},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.findFeksForHtml=function(){n.FekListForHtml=[];u.isEmptyValue(n.perFek.Id)?n.perAsepFeks.length>0?angular.forEach(n.AsepList,function(t){var i=f("filter")(n.perAsepFeks,{AsepFekId:t.Id},!0);u.isEmpty(i)&&n.FekListForHtml.push(t)}):n.FekListForHtml=n.AsepList:n.FekListForHtml.push(n.perFek.AsepFekList);n.haveAsepFek=n.FekListForHtml.length>0?!0:!1};n.findRequestsForHtml=function(){var r,e,l;n.changeDataListForHtml=[];var o=f("filter")(n.changeDataList,{Id:18},!0)[0],s=f("filter")(n.changeDataList,{Id:19},!0)[0],t=!1,i=!1,h=!1,c=!1;n.personMessage.Nationality!=1&&n.personMessage.Nationality!=2&&n.personMessage.Nationality!=4&&n.personMessage.Nationality!=6&&n.personMessage.Nationality!=7&&(n.personMessage.Nationality!=3||u.isEmptyValue(n.personMessage.NationalityCountryId))?(n.personMessage.Nationality==0||n.personMessage.Nationality==3||n.personMessage.Nationality==5)&&(t=!0):i=!0;u.isEmptyValue(n.changeDataRequest.Id)?n.dtOptions.data.length>0?(r=f("filter")(n.dtOptions.data,{ChangeDataRequestId:18},!0),u.isEmpty(r)||(h=r[0].HasUploadFile),e=f("filter")(n.dtOptions.data,{ChangeDataRequestId:19},!0),u.isEmpty(e)||(c=e[0].HasUploadFile),t&&h||i?n.personMessage.CanSendRequestBecauseHasConfirmSpecForAsep||c?angular.forEach(n.changeDataList,function(t){var i=f("filter")(n.dtOptions.data,{ChangeDataRequestId:t.Id},!0);u.isEmpty(i)&&n.changeDataListForHtml.push(t)}):(l=f("filter")(n.dtOptions.data,{ChangeDataRequestId:19},!0),u.isEmpty(l)&&n.changeDataListForHtml.push(s)):n.changeDataListForHtml.push(o)):t?n.changeDataListForHtml.push(o):i&&!n.personMessage.CanSendRequestBecauseHasConfirmSpecForAsep?n.changeDataListForHtml.push(s):n.changeDataListForHtml=n.changeDataList:n.changeDataListForHtml=f("filter")(n.changeDataList,{Id:n.changeDataRequest.ChangeDataRequestId},!0);n.haveAvailRequest=n.changeDataListForHtml.length>0?!0:!1};n.authentication.isAuth?(b="folder,specSmea,specSmeaEEPEBP,spec,specEEPEBP,changeDataRequest",u.getByParams({role:n.authentication.role,codes:b},"/api/Subsystem/NewCheckPermission").then(function(t){var i=b.split(",");for(var e in i)n.pageRules[i[e]]=f("filter")(t,{Code:i[e]},!0)[0].Rules;u.getByParams({personId:y},"/api/ChangeDataRequest/checkValidTaxNumberForChangeDataRequest").then(function(t){if(n.validTaxnumber=t,n.validTaxnumber!=1&&u.isValueInArray(u.getRoleCode(n.authentication.role),"u1, u2"))n.alertsMessageForNotValidDate=[{type:"danger",msg:"Με βάση το τελευταίο ψηφίο του ΑΦΜ σας, αυτή τη στιγμή δεν είναι επιτρεπτή η πρόσβασή σας στην καρτέλα επικαιροποίησης φακέλου."}];else{var i=s.all([u.getByAll("/api/ChangeDataRequest/GetAsepFekList"),u.getByParams({personId:y},"/api/Person/getPersonSpecialitiesDetails"),u.getByParams({personId:y},"/api/ChangeDataRequest/getPersonAsepFek"),u.getByAll("/api/RegionAndUnit/getIntendanciesAll"),u.getByAll("/api/ChangeDataRequest/getChangeDataRequestList"),u.getByAll("/api/Person/getPedagogicalCompetency"),]);i.then(function(t){if(n.AsepList=t[0],n.personMessage=t[1],n.perAsepFeks=t[2],n.IntendancyListAll=t[3],n.changeDataList=t[4],n.consts.PedagogicalCompetency=t[5],n.showMessages=!0,n.person.Id=n.personMessage.Id,n.person.IntendancyId=n.personMessage.IntendancyId,u.isValueInArray(u.getRoleCode(n.authentication.role),"a,m1,m2")||u.isValueInArray(u.getRoleCode(n.authentication.role),"d1, d2,p")&&n.person.IntendancyId==n.authentication.regionAndUnitId?(n.showAnwserForIntendancy=!0,n.disableForOtherIntendancy=!1):u.isValueInArray(u.getRoleCode(n.authentication.role),"s")?(n.showAnwserForIntendancy=!1,n.disableForOtherIntendancy=!0):(n.showAnwserForIntendancy=!1,n.disableForOtherIntendancy=!1),n.dtOptions=l.fromFnPromise(p()).withPaginationType("full_numbers").withOption("order",[2,"desc"]).withOption("createdRow",w),n.findFeksForHtml(),u.isEmptyValue(n.personMessage.IntendancyId)&&n.pageRules.changeDataRequest.CanUpdate)n.showIntendancy=!0;else{n.showRequest=!0;n.disableIntendancy=!0;n.showIntendancy=!1;var i=f("filter")(n.IntendancyListAll,{Id:n.person.IntendancyId},!0)[0];u.isEmptyValue(i)||(i.RegionAndUnitTypeId==7?(n.IntendancyListForHtml=f("filter")(n.IntendancyListAll,{RegionAndUnitTypeId:7},!0),n.chooseIntendancyType=3):i.LevelId==1?(n.IntendancyListForHtml=f("filter")(n.IntendancyListAll,{RegionAndUnitTypeId:8,LevelId:1},!0),n.chooseIntendancyType=1):(n.IntendancyListForHtml=f("filter")(n.IntendancyListAll,{RegionAndUnitTypeId:8,LevelId:2},!0),n.chooseIntendancyType=2))}n.AsepList.length>0?(n.asep=n.AsepList.map(n=>n.Description).join(", "),n.showAsepMessage=!0,n.alertsMessageForAsep[0].msg="Αυτήν την περίοδο γίνεται ενημέρωση των φακέλων των εκπαιδευτικών που έχουν υποβάλει αίτηση στο ΑΣΕΠ για τις προκηρύξεις "+n.asep+"."):(n.showAsepMessage=!0,n.alertsMessageForAsep[0].msg="Αυτήν την περίοδο δεν υπάρχει ενεργή προκήρυξη στο ΑΣΕΠ που να απαιτεί ενημέρωση του φακέλου. ")})}},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο του ΑΦΜ",3e3,"trustedHtml")})},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})):i.go("/");n.changeIntendancy=function(){n.showIntendancy=!0;n.disableIntendancy=!1};n.changeSelectedIntendancy=function(){n.showAlertForchangeIntendancy=!1;u.isValueInArray(u.getRoleCode(n.authentication.role),"d1,d2,p")&&(u.isEmptyValue(n.person.IntendancyId)||n.person.IntendancyId==n.authentication.regionAndUnitId||(n.showAlertForchangeIntendancy=!0))};n.changeRequest=function(){n.checkForGreekLanguageMessage();n.changeDataRequest.ChangeDataRequestItem.selected.Id==4?(u.isEmpty(n.consts.PedagogicalCompetency)&&u.getByAll("/api/Person/getPedagogicalCompetency").then(function(t){n.consts.PedagogicalCompetency=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα με την εμφάνιση της λίστας με την παιδαγωγική κατάρτιση")}),n.VisibleFields={PedagCompetency:!0,Documents:!1},n.changeDataRequest.Documents=null):(n.VisibleFields={PedagCompetency:!1,Documents:!0},n.changeDataRequest.PedagCompetency={selected:""});n.alertsNotHaveUploadMessage=n.changeDataRequest.ChangeDataRequestItem.selected.FileRequired?[{type:"danger",msg:"Δεν έχει μεταφορτωθεί αρχείο και το πεδίο είναι υποχεωτικό."}]:[{type:"danger",msg:"Δεν έχει μεταφορτωθεί αρχείο."}]};n.changeIntendancyType=function(){u.isEmptyValue(n.chooseIntendancyType)||(n.IntendancyListForHtml=n.chooseIntendancyType==3?f("filter")(n.IntendancyListAll,{RegionAndUnitTypeId:7},!0):n.chooseIntendancyType==2?f("filter")(n.IntendancyListAll,{RegionAndUnitTypeId:8,LevelId:2},!0):n.chooseIntendancyType==1?f("filter")(n.IntendancyListAll,{RegionAndUnitTypeId:8,LevelId:1},!0):[])};n.saveActionIntendancy=function(){var t=tt();u.isEmptyValue(n.chooseIntendancyType)||u.isEmptyValue(n.person.IntendancyId)?r.pop("error","Παρουσιάστηκε σφάλμα","Παρακαλώ συμπληρώστε όλα τα υποχρεωτικά πεδία."):(n.showIntendancy=!1,u.postByParams(t,"api/Person/UpdateIntendancy").then(function(){n.disableIntendancy=!0;n.showRequest=!0;r.pop("success","Η αλλαγή τροποποιήθηκε με επιτυχία","Τα στοιχεία της διεύθυνσης χειρισμού φακέλου ενημερώθηκαν.")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την ενημέρωση της διεύθυνσης χειρισμού φακέλου.")}))};n.toggle=function(){n.visible=!n.visible;n.findFeksForHtml()};n.toggleRequest=function(){$(":file").filestyle("clear");n.visibleRequest=!n.visibleRequest;n.openPopUp=!1;n.changeDataRequest={};n.changeDataRequest.ChangeDataRequestItem={selected:""};n.changeDataRequest.SendDocuments={selected:""};n.changeDataRequest.PedagCompetency={selected:""};n.messages={completed:"",percentage:"0",error:""};n.uploadedFileDetails="";n.SendDataForCVDto={Id:"",PersonChangeDataRequestId:"",PersonId:""};n.SendDataForCVFullDto={Id:"",PersonChangeDataRequestId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""};n.SendDataForCVFullDto.PersonId=y;n.SendDataForCVDto.PersonId=y;n.changeDataRequest.PersonId=y;n.ShowDownloadField=u.isEmptyValue(n.SendDataForCVFullDto.Id)&&u.isEmptyValue(n.changeDataRequest.Id)?!1:!0;n.findRequestsForHtml()};n.toggleOldRequest=function(){$(":file").filestyle("clear");n.visibleOldRequest=!n.visibleOldRequest;n.openPopUp=!1;n.changeDataRequest={};n.changeDataRequest.ChangeDataRequestItem={selected:""};n.changeDataRequest.SendDocuments={selected:""};n.changeDataRequest.PedagCompetency={selected:""};n.messages={completed:"",percentage:"0",error:""};n.uploadedFileDetails="";n.SendDataForCVDto={Id:"",PersonChangeDataRequestId:"",PersonId:""};n.SendDataForCVFullDto={Id:"",PersonChangeDataRequestId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""};n.SendDataForCVFullDto.PersonId=y;n.SendDataForCVDto.PersonId=y;n.changeDataRequest.PersonId=y;n.ShowDownloadField=u.isEmptyValue(n.SendDataForCVFullDto.Id)&&u.isEmptyValue(n.changeDataRequest.Id)?!1:!0};n.changeProtocolNumber=function(){n.showAlertForProtocol=!1;u.isEmptyValue(n.perFek.ProtocolNumber)||(n.showAlertForProtocol=n.perFek.ProtocolNumber.match(/^\d{7}$/)&&n.perFek.ProtocolNumber>=2526566?!1:!0)};n.SaveChangeDataRequest=function(){n.ShowDownloadField=u.isEmptyValue(n.SendDataForCVFullDto.Id)&&u.isEmptyValue(n.changeDataRequest.Id)?!1:!0;rt();n.canSave?(n.disableSave.Request=!0,blockUI({target:"#divBlockUI",animate:!0}),h(function(){var t=it();u.isEmptyValue(n.changeDataRequest.Id)?(t.CreatedBy=n.authentication.userName,t.CreatedUserRole=n.authentication.role,t.CreatedRegionAndUnitDescription=n.authentication.unitName):(t.ModifiedBy=n.authentication.userName,t.ModifiedUserRole=n.authentication.role,t.ModifiedRegionAndUnitDescription=n.authentication.unitName);u.postByParams(t,"/api/ChangeDataRequest/saveWithUpload").then(function(){n.dtInstance.changeData(p());n.disableSave.Request=!1;n.disableRequest=!1;n.toggleRequest();n.showMessageForGreekLanguage=!1;n.alertsNotHaveUploadMessage=[{type:"danger",msg:"Δεν έχει μεταφορτωθεί αρχείο."}];n.dtInstance.reloadData()},function(t){n.toggleRequest();n.disableSave.Request=!1;unblockUI("#divBlockUI");r.pop("error","ΠΡΟΣΟΧΗ",t.data)})},600),h(function(){unblockUI("#divBlockUI")},600)):r.pop("error","ΠΡΟΣΟΧΗ","Δεν έχετε συμπληρώσει όλα τα υποχρεωτικά πεδία")};n.return=function(){n.toggle();i.go("changeDataRequest");y!=null&&(n.perFek={},n.perFek.PersonId=y)};n.onFileSelect=function(t){n.messages={completed:"",percentage:"0",error:""};n.disableSave.Request=!1;u.getByParams({personId:y},"/api/ChangeDataRequest/getSumOfUploadActiveFile").then(function(i){var f,r,s,h;if(n.sumOfUpload=i,n.openPopUp)h=e.open({templateUrl:"openUploadModalData.html",controller:openUploadModalDataController}),h.result.then(function(i){if(i){n.openPopUp=!1;n.onFileSelect(t)}},function(){o.info("Modal dismissed at: "+new Date)});else for(f=0;f<t.length;f++){if(r=t[f],r.type!="application/pdf"){n.messages.error='Μη έγκυρη επέκταση αρχείου "'+r.name+'". Οι επεκτάσεις που υποστηρίζονται είναι: "<b> pdf<\/b>" .';return}if(r.size>=4194304){n.messages.error='Το αρχείο "'+r.name+'" (<b>'+Math.round(r.size/1024)+" KB<\/b>) υπερβαίνει το μέγιστο επιτρεπόμενο μέγεθος μεταφόρτωσης <b>4 MB<\/b>.";return}if(s=n.sumOfUpload+Math.round(r.size/1048576),s>15){n.messages.error='Το αρχείο "'+r.name+'" (<b>'+Math.round(r.size/1024)+" KB<\/b>) δεν μπορεί να μεταφορτωθεί γιατί έχετε υπερβεί τα <b>15ΜΒ <\/b> στο σύνολο των αιτημάτων.";return}(function(t){n.upload[t]=c.upload({url:"/api/files/uploadChangeDataRequest",method:"POST",data:{SendDataForCVDto:n.SendDataForCVDto},file:r}).progress(function(t){n.messages.percentage=parseInt(100*t.loaded/t.total)}).then(function(t){n.messages.completed="Το αρχείο <b>"+r.name+"<\/b> μεγέθους "+Math.round(parseFloat(r.size)/1024,2).toString().replace(".",",")+" KΒ μεταφορτώθηκε με επιτυχία.";n.SendDataForCVDto.Id=t.data.personChangeDataRequestFile.Id;n.SendDataForCVFullDto=t.data.personChangeDataRequestFile;n.uploadedFileDetails="";n.ShowDownloadFile=!0;n.openPopUp=!0;n.ShowDownloadField=u.isEmptyValue(n.SendDataForCVFullDto.Id)&&u.isEmptyValue(n.changeDataRequest.Id)?!1:!0}).catch(function(t){n.messages.error=t.Message})})(f)}},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης του συνολικού μεγέθους των επισυναπτόμενων αρχείων")})};n.openModalFek=function(t){n.delPerFek=t};n.deletePerFek=function(t){n.perFek=t;var i=d();u.postByParams(i,"api/ChangeDataRequest/deletePersonFek").then(function(){u.getByParams({personId:y},"/api/ChangeDataRequest/getPersonAsepFek").then(function(t){n.perAsepFeks=t;n.perFek={};n.perFek.PersonId=y;n.findFeksForHtml()},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των προκηρύξεων.")});r.pop("success","Η αλλαγή τροποποιήθηκε με επιτυχία","Τα στοιχεία της προκήρυξης διαγράφηκαν")},function(){r.pop("error","Παρουσιάστηκε σφάλμα",response)})};n.editPersonAsep=function(t){n.labelButton="Ενημέρωση";n.perFek=f("filter")(n.perAsepFeks,{Id:t},!0)[0];n.toggle()};n.checkForGreekLanguageMessage=function(){n.showMessageForGreekLanguage=n.changeDataRequest.ChangeDataRequestItem.selected.Id==19&&n.personMessage.GreekLanguage!=1?!0:!1};n.fillFields=function(t,i){n.toggleRequest();n.messages={completed:"",percentage:"0",error:""};n.uploadedFileDetails="";n.SendDataForCVDto={Id:"",PersonChangeDataRequestId:"",PersonId:""};n.SendDataForCVFullDto={Id:"",PersonChangeDataRequestId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""};n.SendDataForCVDto.PersonId=t.PersonId;n.SendDataForCVFullDto.PersonId=t.PersonId;n.changeDataRequest.myIndex=i;n.changeDataRequest.ChangeDataRequestItem.selected=f("filter")(n.changeDataListAll,{Id:t.ChangeDataRequestId},!0)[0];n.changeDataRequest.Description=t.Description;n.changeDataRequest.PedagCompetency.selected=u.isEmptyValue(t.PedagogicalCompetencyId)?"":f("filter")(n.consts.PedagogicalCompetency,{Id:t.PedagogicalCompetencyId},!0)[0];n.changeDataRequest.Documents=t.Documents;n.changeDataRequest.IsNew=t.IsNew;n.changeDataRequest.RequestedBy=t.RequestedBy;n.changeDataRequest.Answer=t.Answer;n.changeDataRequest.CreatedBy=t.CreatedBy;n.changeDataRequest.IsCompleted=t.IsCompleted;n.changeDataRequest.CreationDate=t.CreationDate;n.changeDataRequest.CreatedUserRole=t.CreatedRegionAndUnitDescription;n.changeDataRequest.ModifiedBy=t.ModifiedBy;n.changeDataRequest.LastEditDate=t.LastEditDate;n.changeDataRequest.ModifiedUserRole=t.ModifiedUserRole;n.changeDataRequest.Id=t.Id;n.changeDataRequest.ModifiedRegionAndUnitDescription=t.ModifiedRegionAndUnitDescription;u.isValueInArray(u.getRoleCode(n.authentication.role),"a,m1,m2")||u.isValueInArray(u.getRoleCode(n.authentication.role),"d1, d2,p")&&(t.IntendancyId==n.authentication.regionAndUnitId||t.PersonIntendancyId==n.authentication.regionAndUnitId)?(n.showAnwserForIntendancy=!0,n.disableForOtherIntendancy=!1):u.isValueInArray(u.getRoleCode(n.authentication.role),"s")?(n.showAnwserForIntendancy=!1,n.disableForOtherIntendancy=!0):(n.showAnwserForIntendancy=!1,n.disableForOtherIntendancy=!1);n.changeDataRequest.ChangeDataRequestItem.selected.Id==4?(n.VisibleFields={PedagCompetency:!0,Documents:!1},n.changeDataRequest.Documents=null):(n.VisibleFields={PedagCompetency:!1,Documents:!0},n.changeDataRequest.PedagCompetency={selected:""});n.checkForGreekLanguageMessage();n.SendDataForCVDto.PersonChangeDataRequestId=n.changeDataRequest.Id;u.getByParams({PersonChangeDataRequestId:n.SendDataForCVDto.PersonChangeDataRequestId},"/api/ChangeDataRequest/GetDetailsForFile").then(function(t){t!=null?(n.openPopUp=!0,n.SendDataForCVFullDto=t,n.SendDataForCVDto.Id=t.Id,n.ShowDownloadFile=!0,n.uploadedFileDetails="Έχετε μεταφορτώσει το αρχείο: "+n.SendDataForCVFullDto.FileName+" με μέγεθος "+n.SendDataForCVFullDto.FileSizeNumber.toString().replace(".",",")+" KB.",n.ShowDownloadField=u.isEmptyValue(n.SendDataForCVFullDto.Id)&&u.isEmptyValue(n.changeDataRequest.Id)?!1:!0):n.ShowDownloadField=!1},function(){})};n.fillOldFields=function(t,i){n.toggleOldRequest();n.messages={completed:"",percentage:"0",error:""};n.uploadedFileDetails="";n.SendDataForCVDto={Id:"",PersonChangeDataRequestId:"",PersonId:""};n.SendDataForCVFullDto={Id:"",PersonChangeDataRequestId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""};n.SendDataForCVDto.PersonId=t.PersonId;n.SendDataForCVFullDto.PersonId=t.PersonId;n.changeDataRequest.myIndex=i;n.changeDataRequest.ChangeDataRequestItem.selected=f("filter")(n.changeDataListAll,{Id:t.ChangeDataRequestId},!0)[0];n.changeDataRequest.Description=t.Description;n.changeDataRequest.PedagCompetency.selected=u.isEmptyValue(t.PedagogicalCompetencyId)?"":f("filter")(n.consts.PedagogicalCompetency,{Id:t.PedagogicalCompetencyId},!0)[0];n.changeDataRequest.Documents=t.Documents;n.changeDataRequest.IsNew=t.IsNew;n.changeDataRequest.RequestedBy=t.RequestedBy;n.changeDataRequest.Answer=t.Answer;n.changeDataRequest.CreatedBy=t.CreatedBy;n.changeDataRequest.IsCompleted=t.IsCompleted;n.changeDataRequest.CreationDate=t.CreationDate;n.changeDataRequest.CreatedUserRole=t.CreatedRegionAndUnitDescription;n.changeDataRequest.ModifiedBy=t.ModifiedBy;n.changeDataRequest.LastEditDate=t.LastEditDate;n.changeDataRequest.ModifiedUserRole=t.ModifiedUserRole;n.changeDataRequest.Id=t.Id;n.changeDataRequest.ModifiedRegionAndUnitDescription=t.ModifiedRegionAndUnitDescription;u.isValueInArray(u.getRoleCode(n.authentication.role),"a,m1,m2")||u.isValueInArray(u.getRoleCode(n.authentication.role),"d1, d2,p")&&(t.IntendancyId==n.authentication.regionAndUnitId||t.PersonIntendancyId==n.authentication.regionAndUnitId)?(n.showAnwserForIntendancy=!0,n.disableForOtherIntendancy=!1):u.isValueInArray(u.getRoleCode(n.authentication.role),"s")?(n.showAnwserForIntendancy=!1,n.disableForOtherIntendancy=!0):(n.showAnwserForIntendancy=!1,n.disableForOtherIntendancy=!1);n.changeDataRequest.ChangeDataRequestItem.selected.Id==4?(n.VisibleFields={PedagCompetency:!0,Documents:!1},n.changeDataRequest.Documents=null):(n.VisibleFields={PedagCompetency:!1,Documents:!0},n.changeDataRequest.PedagCompetency={selected:""});n.checkForGreekLanguageMessage();n.SendDataForCVDto.PersonChangeDataRequestId=n.changeDataRequest.Id;u.getByParams({PersonChangeDataRequestId:n.SendDataForCVDto.PersonChangeDataRequestId},"/api/ChangeDataRequest/GetDetailsForFile").then(function(t){t!=null?(n.openPopUp=!0,n.SendDataForCVFullDto=t,n.SendDataForCVDto.Id=t.Id,n.ShowDownloadFile=!0,n.uploadedFileDetails="Έχετε μεταφορτώσει το αρχείο: "+n.SendDataForCVFullDto.FileName+" με μέγεθος "+n.SendDataForCVFullDto.FileSizeNumber.toString().replace(".",",")+" KB.",n.ShowDownloadField=u.isEmptyValue(n.SendDataForCVFullDto.Id)&&u.isEmptyValue(n.changeDataRequest.Id)?!1:!0):n.ShowDownloadField=!1},function(){})};n.downloadFile=function(){u.getByParamsDownload({PersonId:n.SendDataForCVFullDto.PersonId,Path:n.SendDataForCVFullDto.DirectPdfLink,ContentType:n.SendDataForCVFullDto.ContentType},"api/files/downloadFolder").then(function(t){var v=t.status,o=t.headers,s=t.data,h="application/octet-stream",u=!1,e,a,c,l,r,i,f;o=o();e=n.SendDataForCVFullDto.FileName||"download.pdf";a=o["content-type"]||h;try{if(i=new Blob([s],{type:a}),navigator.msSaveBlob)navigator.msSaveBlob(i,e);else{if(c=navigator.webkitSaveBlob||navigator.mozSaveBlob||navigator.saveBlob,c===undefined)throw"Not supported";c(i,e)}u=!0}catch(y){}if(!u&&(l=window.URL||window.webkitURL||window.mozURL||window.msURL,l)){if(r=document.createElement("a"),"download"in r)try{r.style="display: none";document.body.appendChild(r);i=new Blob([s],{type:h});f=window.URL.createObjectURL(i);r.href=f;r.download=e;r.click();window.URL.revokeObjectURL(f);u=!0}catch(y){}if(!u)try{i=new Blob([s],{type:h});f=l.createObjectURL(i);window.location=f;u=!0}catch(y){}}u||window.open(httpPath,"_blank","")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση του αρχείου")})};n.cancelOldRequest=function(){n.openPopUp=!1;n.disableOldRequest=!1;n.VisibleFields.PedagCompetency=!1;n.toggleOldRequest();i.go("changeDataRequest")};n.cancelRequest=function(){n.openPopUp=!1;n.disableRequest=!1;n.VisibleFields.PedagCompetency=!1;n.showMessageForGreekLanguage=!1;u.getByParams({personId:y},"/api/files/DeleteChangeDataRequestFile").then(function(){},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","fffgfgfgf")});n.toggleRequest();i.go("changeDataRequest")};n.editRequest=function(t,i){if(n.openPopUp=!0,n.VisibleFields.PedagCompetency=!1,$(":file").filestyle("clear"),u.isValueInArray(u.getRoleCode(n.authentication.role),"s, u1, u2, d1, d2, m1, m2, p")&&!n.pageRules.changeDataRequest.CanUpdate&&(n.DisableFieldset=!0),n.disableRequest=!0,n.disableOldRequest=!1,u.isEmpty(n.changeDataListAll)){var r=s.all([u.getByAll("/api/ChangeDataRequest/getChangeDataRequestListAll"),]);r.then(function(r){n.changeDataListAll=r[0];n.fillFields(t,i)})}else n.fillFields(t,i)};n.editOldRequest=function(t,i){if(n.openPopUp=!0,n.VisibleFields.PedagCompetency=!1,$(":file").filestyle("clear"),n.disableOldRequest=!0,n.disableRequest=!1,u.isEmpty(n.changeDataListAll)){var r=s.all([u.getByAll("/api/ChangeDataRequest/getChangeDataRequestListAll")]);r.then(function(r){n.changeDataListAll=r[0];n.fillOldFields(t,i)})}else n.fillOldFields(t,i)};n.openModalDeleteRequest=function(t){n.delPerRequest=t};n.deleteChangeDataRequest=function(t){blockUI({target:"#divBlockUI",animate:!0});n.changeDataRequest=t;h(function(){n.changeDataRequest.ModifiedBy=n.authentication.userName;n.changeDataRequest.ModifiedUserRole=n.authentication.role;n.changeDataRequest.ModifiedRegionAndUnitDescription=n.authentication.unitName;u.postByParams(n.changeDataRequest,"/api/ChangeDataRequest/deletePersonRequest").then(function(){n.dtInstance.changeData(p());n.dtInstance.reloadData()},function(n){unblockUI("#divBlockUI");r.pop("error","ΠΡΟΣΟΧΗ",n.data)})},600);h(function(){unblockUI("#divBlockUI")},600)};n.saveAction=function(){var t=d();n.disableSave.Fek=!0;u.isEmptyValue(n.perFek.AsepFekList)||u.isEmptyValue(n.perFek.ProtocolNumber)||n.showAlertForProtocol?(n.showAlertForProtocol?r.pop("error","Παρουσιάστηκε σφάλμα","Δεν έχετε εισάγει έγκυρο αριθμό πρωτοκόλλου."):r.pop("error","Παρουσιάστηκε σφάλμα","Παρακαλώ συμπληρώστε όλα τα υποχρεωτικά πεδία."),n.disableSave.Fek=!1):u.isEmptyValue(n.perFek.Id)?(t.CreatedBy=n.authentication.userName,u.postByParams(t,"api/ChangeDataRequest/insertPerAsepFek").then(function(){u.getByParams({personId:y},"/api/ChangeDataRequest/getPersonAsepFek").then(function(t){n.perAsepFeks=t;n.disableSave.Fek=!1;n.return()},function(){n.disableSave.Fek=!1;r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των προκηρύξεων.")})},function(){n.disableSave.Fek=!1;r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την εισαγωγή των στοιχείων")})):(t.ModifiedBy=n.authentication.userName,u.postByParams(t,"api/ChangeDataRequest/updatePerAsepFek").then(function(){u.getByParams({personId:y},"/api/ChangeDataRequest/getPersonAsepFek").then(function(t){n.perAsepFeks=t;n.disableSave.Fek=!1;n.return()},function(){n.disableSave.Fek=!1;r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των προκηρύξεων.")})},function(){n.disableSave.Fek=!1;r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την ενημέρωση των προκηρύξεων")}))};n.getOldRequests=function(){u.isEmpty(n.dtOptions1.data)?u.getByParams({personId:y},"/api/ChangeDataRequest/getPersonOldChangeDataByPersonId").then(function(t){n.dtOptions1.data=t;n.ShowOldRequests=u.isEmpty(n.dtOptions1.data)?!1:!0},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)}):n.ShowOldRequests=!0}};ChangeDataRequest.$inject=["$scope","PassParameters","$state","toaster","GeneralFactory","$filter","$uibModal","$log","$q","$timeout","$upload","DTOptionsBuilder","DTColumnBuilder","$compile"];ChangePasswordController=function(n,t,i,r){n.authentication.isAuth||$location.path("forbidden");n.savedSuccessfully=!1;n.message="";n.changeData={userId:n.authentication.userId,oldPassword:"",newPassword:"",confirmPassword:""};n.change=function(){r.changePassword(n.changeData).then(function(){n.savedSuccessfully=!0;n.message="Η αλλαγή του κωδικού σας έγινε με επιτυχία, θα μεταφερθείτε αυτόματα στην κεντρική σελίδα σε 5 δευτερόλεπτα.";u()},function(t){var u=[],r,i;for(r in t.data.ModelState)for(i=0;i<t.data.ModelState[r].length;i++)u.push(t.data.ModelState[r][i]);n.message=u.join("<br />")})};var u=function(){var n=i(function(){i.cancel(n);t.go("/")},2e3)}};ChangePasswordController.$inject=["$scope","$state","$timeout","AuthService"];ClassificationSubstituteController=function(n,t,i,r,u,f,e,o,s,h,c,l){n.AlgorithmType={};n.group="";n.showButton=!1;n.selType=[];n.schoolYear=n.didacticYear.YearFrom;n.classification={};n.firststep=!0;n.DataFinal=[];n.dtInstances=[];n.backProcesses=[];n.classificationGridButton=!1;n.SelectedSpecAvailItems=[];n.AvailableSpecListItems=[];n.SelectedSelectedSpecListItems=[];n.SelectedSpecListItems=[];n.authentication.isAuth?l.isValueInArray(l.getRoleCode(n.authentication.role),"u1, u2 ,d1, d2, p")?i.go("forbidden"):l.getByParams({role:n.authentication.role,regionAndUnit:n.authentication.regionAndUnitId},"api/Management/getAlgorithmTypeByRoleAndRegionAsync").then(function(t){n.AlgorithmType=t},function(n){h.pop("warning"," Παρουσιάστηκε σφάλμα","Υπήρξε πρόβλημα κατά την φόρτωση των κατηγοριών "+n.error_description)}):i.go("/");n.clearParams=function(){n.SelectedSpecAvailItems=[];n.AvailableSpecListItems=[];n.SelectedSelectedSpecListItems=[];n.SelectedSpecListItems=[]};n.changedAlgorithmType=function(){n.clearParams();n.selType.HasFilter?n.selType.Code=="ClassSubstitute"||n.selType.Code=="ClassSubstituteSmea"?l.getByParams({level:n.authentication.levelId},"api/Speciality/getAllSpecialitiesGroup").then(function(t){n.AvailableSpecListItems=t;n.showButton=n.selType!=null&&n.selType!=""&&n.selType!="undefined"?!0:!1},function(){h.pop("warning"," Παρουσιάστηκε σφάλμα","Δημιουργήθηκε πρόβλημα στην φόρτωση των ομαδοποιημένων κλάδων.")}):n.selType.Id==3&&(n.group="Πιάνο"):n.showButton=n.selType!=null&&n.selType!=""&&n.selType!="undefined"?!0:!1};n.DataFinal=[];n.dtInstance={};n.dtOptions=e.newOptions();n.dtColumns=[o.newColumn("Id").withTitle("Id").notVisible(),o.newColumn("AlgorithmId").withTitle("AlgorithmId").notVisible(),o.newColumn("Description").withTitle("Περιγραφή"),o.newColumn("StartTime").withTitle("Ημερομηνία έναρξης"),o.newColumn("EndTime").withTitle("Ημερομηνια τερματισμού")];var a=function(){l.getByParams({applicationTypeId:n.selType.Id},"/api/Management/getLastBackroundProcessesForHistoryById").then(function(t){n.DataFinal=t;n.dtOptions.data=t},function(n){h.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.showhAlgorithmDetails=function(){n.dtInstance.changeData(a());n.firststep=!1};n.showhHistory=function(){i.go("algorithmhistory")};n.previousStep=function(){n.firststep=!0};n.runSecondmentCalcAll=function(){var t=s.all([c.countActiveProcessesByApplicationTypeId(4),c.countActiveProcesses()]);t.then(function(t){n.activeProcessesByApplicationType=t[0];n.activeProcesses=t[1];n.activeProcesses<2&&n.activeProcessesByApplicationType<1?l.getByAll("/api/Classification/SecondmentCalcAll").then(function(t){n.personAttributesForMenu=t},function(){h.pop("warning"," Παρουσιάστηκε σφάλμα","Υπήρξε πρόβλημα κατά την εκτέλεση")}):(n.activeProcesses>=2&&h.pop("warning","Ο αλγόριθμος δεν θα εκτελεστεί"," Εκτελούνται ήδη στο παρασκήνιο δύο αλγόριθμοι"),n.activeProcesses>=1&&h.pop("warning","Ο αλγόριθμος δεν θα εκτελεστεί"," Εκτελείται ήδη στο παρασκήνιο o αλγόριθμος"))},function(n){h.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.runSecondmentSmeaCalcAll=function(){var t=s.all([c.countActiveProcessesByApplicationTypeId(5),c.countActiveProcesses()]);t.then(function(t){n.activeProcessesByApplicationType=t[0];n.activeProcesses=t[1];n.activeProcesses<2&&n.activeProcessesByApplicationType<1?l.getByAll("/api/Classification/SecondmentSmeaCalcAll").then(function(t){n.personAttributesForMenu=t},function(){h.pop("warning"," Παρουσιάστηκε σφάλμα","Υπήρξε πρόβλημα κατά την εκτέλεση")}):(n.activeProcesses>=2&&h.pop("warning","Ο αλγόριθμος δεν θα εκτελεστεί"," Εκτελούνται ήδη στο παρασκήνιο δύο αλγόριθμοι"),n.activeProcesses>=1&&h.pop("warning","Ο αλγόριθμος δεν θα εκτελεστεί"," Εκτελείται ήδη στο παρασκήνιο o αλγόριθμος"))},function(n){h.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.runSubstituteClassification=function(){var t={SpecialityGroup:n.SelectedSpecListItems,SchoolYear:n.schoolYear,ApplicationType:n.selType.Description},i=t;l.postByParams(i,"/api/Classification/runSubstituteClassification").then(function(){n.classificationGridButton=!0},function(){h.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εκτέλεσης αλγορίθμου")})};n.runSubstituteSmeaClassification=function(){var t={SpecialityGroup:n.SelectedSpecListItems,SchoolYear:n.schoolYear,ApplicationType:n.selType.Description},i=t;l.postByParams(i,"/api/Classification/runSubstituteSMEAClassification").then(function(){},function(){h.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εκτέλεσης αλγορίθμου")});n.classificationGridButton=!0};n.runPlacementApplicationPyspdeChurch=function(){l.getByAll("/api/Classification/runPlacementApplicationPyspdeChurch").then(function(){},function(){h.pop("warning"," Παρουσιάστηκε σφάλμα","Υπήρξε πρόβλημα κατά την εκτέλεση")})};n.runPlacementApplicationPyspdeSMEA=function(){l.getByAll("/api/Classification/runPlacementApplicationPyspdeSMEA").then(function(){},function(){h.pop("warning"," Παρουσιάστηκε σφάλμα","Υπήρξε πρόβλημα κατά την εκτέλεση")})};n.checkForParam=function(){switch(n.selType.Code){case"ClassSecondment":return n.selType.HasFilter==!1?!0:!1;case"ClassSecondmentSmea":return n.selType.HasFilter==!1?!0:!1;case"ClassSubstitute":return l.isEmpty(n.SelectedSpecListItems)?!1:!0;case"ClassSubstituteSmea":return l.isEmpty(n.SelectedSpecListItems)?!1:!0;case"PlaceSecondment":return n.selType.HasFilter==!1?!0:!1;case"PlaceSecondmentSmea":return n.selType.HasFilter==!1?!0:!1}};n.runAlgorithm=function(){var t=s.all([c.countActiveProcessesByApplicationTypeId(n.selType.Id),c.countActiveProcesses()]);n.checkForParam()?t.then(function(t){if(n.activeProcessesByApplicationType=t[0],n.activeProcesses=t[1],n.activeProcesses<2&&n.activeProcessesByApplicationType<1)switch(n.selType.Code){case"ClassSecondment":n.runSecondmentCalcAll();n.classificationGridButton=!0;break;case"ClassSecondmentSmea":n.runSecondmentSmeaCalcAll();n.classificationGridButton=!0;break;case"ClassSubstitute":n.runSubstituteClassification();n.classificationGridButton=!0;break;case"ClassSubstituteSmea":n.runSubstituteSmeaClassification();n.classificationGridButton=!0;break;case"PlaceSecondment":n.runPlacementApplicationPyspdeChurch();break;case"PlaceSecondmentSmea":n.runPlacementApplicationPyspdeSMEA()}else n.activeProcesses>=2&&h.pop("warning","Ο αλγόριθμος δεν θα εκτελεστεί"," Εκτελούνται ήδη στο παρασκήνιο δύο αλγόριθμοι"),n.activeProcesses>=1&&h.pop("warning","Ο αλγόριθμος δεν θα εκτελεστεί"," Εκτελείται ήδη στο παρασκήνιο αλγόριθμος "+n.selType.Description)},function(n){h.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):h.pop("warning"," Αδυναμία εκτέλεσης","Δεν έχουν οριστεί όλες οι παράμετροι!")};n.btnSpecRight=function(){angular.forEach(n.SelectedAvailSpecItems,function(n){this.push(n)},n.SelectedSpecListItems);angular.forEach(n.SelectedAvailSpecItems,function(t){for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].Id==t.Id&&n.AvailableSpecListItems.splice(i,1)});n.SelectedAvailSpecItems=[];n.SelectedSelectedSpecListItems=[]};n.btnSpecLeft=function(){angular.forEach(n.SelectedSelectedSpecListItems,function(n){this.push(n)},n.AvailableSpecListItems);angular.forEach(n.SelectedSelectedSpecListItems,function(t){for(var i=n.SelectedSpecListItems.length-1;i>=0;i--)n.SelectedSpecListItems[i].SpecialityId==t.SpecialityId&&n.SelectedSpecListItems.splice(i,1)});n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.removeDuplicatesSpecsForDualList=function(){angular.forEach(n.SelectedAvailSpecItems,function(t){if(n.showSpecialitiesList)for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].SpecialityId==t.SpecialityId&&n.AvailableSpecListItems.splice(i,1)})}};ClassificationSubstituteController.$inject=["$scope","$http","$state","PassParameters","$filter","ClassificationFactory","DTOptionsBuilder","DTColumnBuilder","$q","toaster","ManagementFactory","GeneralFactory"];DeleteChangeDataRequestFileController=function(n,t,i,r){n.authentication.isAuth?n.authentication.isAuth&&!r.isValueInArray(r.getRoleCode(n.authentication.role),"a")&&t.go("forbidden"):t.go("/");n.filteredNews=[];n.viewby=15;n.currentPage=4;n.itemsPerPage=n.viewby;n.maxSize=5;n.results=[];r.getByAll("/api/ChangeDataRequest/getOrphansFiles").then(function(t){n.results=t;n.totalItems=n.results.length;n.showPaging=r.isEmpty(n.results)?!1:!0},function(){i.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των στοιχείων.")});n.delFile;n.openModal=function(t){n.delFile=t};n.deleteFile=function(t){r.getByParams({Id:t.Id},"/api/files/DeleteChangeDataRequestFileWithFileId").then(function(){r.getByAll("/api/ChangeDataRequest/getOrphansFiles").then(function(t){n.results=t;n.totalItems=n.results.length;n.showPaging=r.isEmpty(n.results)?!1:!0},function(){i.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των στοιχείων.")})},function(){i.pop("warning"," Παρουσιάστηκε σφάλμα","fffgfgfgf")})};n.deleteAllFile=function(){var t=n.results;r.postByParams(t,"/api/files/DeleteChangeDataRequestFileWithFileList").then(function(){r.getByAll("/api/ChangeDataRequest/getOrphansFiles").then(function(t){n.results=t;n.totalItems=n.results.length;n.showPaging=r.isEmpty(n.results)?!1:!0},function(){i.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των στοιχείων.")})},function(){i.pop("warning"," Παρουσιάστηκε σφάλμα","fffgfgfgf")})}};DeleteChangeDataRequestFileController.$inject=["$scope","$state","toaster","GeneralFactory","$filter","$q"];DiplomaDateLimitationController=function(n,t,i,r,u,f){n.updateLimitDate={};n.limitDate=[];n.limitDateNew=[];u.getDateLimitation().then(function(t){n.limitDate=t;angular.copy(n.limitDate,n.limitDateNew)},function(n){f.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});n.changedLevel=function(){n.updateLimitDate.LimitationDate=r("filter")(n.limitDate,{Id:n.updateLimitDate.Id},!0)[0].LimitationDate;n.updateLimitDate.LevelId=r("filter")(n.limitDate,{Id:n.updateLimitDate.Id},!0)[0].LevelId};n.minDate=new Date;var e=new Date,o=e.getDate(),s=e.getMonth(),h=e.getFullYear()+1;n.maxDate=o+"/"+s+"/"+h;n.formats=["dd/MM/yyyy"];n.format=n.formats[0];n.today=function(){};n.today();n.clear=function(){n.dt=null};n.toggleMin=function(){n.minDate=n.minDate?null:new Date};n.toggleMin();n.open=function(t,i){t.preventDefault();t.stopPropagation();n[i]=!0};n.dateOptions={formatYear:"yy",startingDay:1,format:"dd/mm/yyyy"};n.updateLimitationDate=function(){n.updateLimitDate.UserRole=n.authentication.role;$("#LimitationDate").valid()&&u.updateLimitationDate(n.updateLimitDate).then(function(){f.pop("success","Επιτυχής αποθήκευση","Η ημερομηνία αποθηκεύτηκε με επιτυχία");n.updateLimitDate={};u.getDateLimitation().then(function(t){n.limitDate=t;angular.copy(n.limitDate,n.limitDateNew)},function(n){f.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})},function(n){f.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}};DiplomaDateLimitationController.$inject=["$scope","PassParameters","$state","$filter","ManagementFactory","toaster"];DiplomaManagmentController=function(n,t,i,r,u,f){n.authentication.isAuth?n.authentication.isAuth&&!r.isValueInArray(r.getRoleCode(n.authentication.role),"a")&&t.go("forbidden"):t.go("/");n.diploma={Diploma:"",DiplomaTypeId:"",DiplomaCategoryId:"",DiplomaTypeDescription:"",DiplomaCategoryDescription:"",UserRole:""};n.searchDiplomaType={};n.searchDiplomaCategory={};n.searchDiplomaType={selected:""};n.searchDiplomaCategory={selected:""};n.diplomaTypes=[];n.diplomaCategories=[];var e=f.all([r.getByAll("/api/Diploma/getDiplomaTypes"),r.getByAll("/api/Diploma/getDiplomaCategories")]);e.then(function(t){n.diplomaTypes=t[0];n.diplomaCategories=t[1];n.diplomaCategoriesFilter=t[1]});n.changeFilter=function(){n.diplomaCategoriesFilter=r.isEmptyValue(n.searchDiplomaType.selected)?[]:u("filter")(n.diplomaCategories,{DiplomaTypeId:n.searchDiplomaType.selected.Id},!0)};n.saveAction=function(){r.isEmptyValue(n.searchDiplomaType.selected)||r.isEmptyValue(n.searchDiplomaCategory.selected)||r.isEmptyValue(n.diploma.diploma)?i.pop("error","ΠΡΟΣΟΧΗ","Δεν έχετε συμπληρώσει όλα τα απαραίτητα πεδία"):(n.diploma.DiplomaTypeId=n.searchDiplomaType.selected.Id,n.diploma.DiplomaTypeDescription=n.searchDiplomaType.selected.Description,n.diploma.DiplomaCategoryId=n.searchDiplomaCategory.selected.Id,n.diploma.DiplomaCategoryDescription=n.searchDiplomaCategory.selected.Description,n.diploma.UserRole=n.authentication.role,r.postByParams(n.diploma,"/api/Diploma/InsertDiploma").then(function(){i.pop("success","Ενημέρωση","Η καταχώριση του πτυχίου πραγματοποιήθηκε με επιτυχία")},function(n){i.pop("error","ΠΡΟΣΟΧΗ",n.data)}))}};DiplomaManagmentController.$inject=["$scope","$state","toaster","GeneralFactory","$filter","$q"];DiplomaSpecialityManagmentController=function(n,t,i,r,u,f){n.authentication.isAuth?n.authentication.isAuth&&!r.isValueInArray(r.getRoleCode(n.authentication.role),"a")&&t.go("forbidden"):t.go("/");n.diploma={Diploma:"",DiplomaTypeId:"",DiplomaCategoryId:"",DiplomaTypeDescription:"",DiplomaCategoryDescription:"",UserRole:""};n.searchDiplomaType={};n.searchDiplomaCategory={};n.searchDiplomaType={selected:""};n.searchDiplomaCategory={selected:""};n.searchDiploma={};n.searchDiploma={selected:""};n.diplomaTypes=[];n.diplomaCategories=[];n.diplomaCategoriesFilter=[];n.diplomas=[];n.diplomasFilter=[];n.results=[];n.specialities=[];n.showMessage=0;n.specialityDiploma={SpecialityId:"",DiplomaId:"",UserRole:""};n.specDiploma={};var e=f.all([r.getByAll("/api/Diploma/getDiplomaTypes"),r.getByAll("/api/Diploma/getDiplomaCategories"),r.getByParams({countryId:3},"/api/Diploma/getDiplomasDetailsByCountry")]);e.then(function(t){n.diplomaTypes=t[0];n.diplomaCategories=t[1];n.diplomas=t[2];n.diplomaCategoriesFilter=t[1]});n.changeFilter=function(){r.isEmptyValue(n.searchDiplomaType.selected)?(n.diplomaCategoriesFilter=[],n.diplomasFilter=[]):(n.diplomaCategoriesFilter=u("filter")(n.diplomaCategories,{DiplomaTypeId:n.searchDiplomaType.selected.Id},!0),n.diplomasFilter=r.isEmptyValue(n.searchDiplomaCategory.selected)?u("filter")(n.diplomas,{DiplomaTypeId:n.searchDiplomaType.selected.Id},!0):u("filter")(n.diplomas,{DiplomaCategoryId:n.searchDiplomaCategory.selected.Id},!0))};n.openAddSpecialityDiplomaModal=function(){n.specialityDiploma.DiplomaId=n.searchDiploma.selected.Id;r.isEmptyValue(n.specialities)?r.getByAll("/api/Speciality/getSpecialitiesForDiploma").then(function(t){n.specialities=t;n.showMessage=r.isEmptyValue(n.specialities)?2:1},function(n){i.pop("error","ΠΡΟΣΟΧΗ",n.data)}):n.showMessage=1};n.searchAction=function(){r.isEmptyValue(n.searchDiplomaType.selected)||r.isEmptyValue(n.searchDiplomaCategory.selected)||r.isEmptyValue(n.searchDiploma.selected)?i.pop("error","ΠΡΟΣΟΧΗ","Δεν έχετε συμπληρώσει όλα τα απαραίτητα πεδία"):(n.showMessage=0,r.getByParams({diplomaId:n.searchDiploma.selected.Id},"/api/Diploma/getDiplomaSpeciality").then(function(t){n.results=t;n.showMessage=r.isEmptyValue(n.results)?2:1},function(n){i.pop("error","ΠΡΟΣΟΧΗ",n.data)}))};n.saveSpecialityDiploma=function(){r.isEmptyValue(n.specialityDiploma.SpecialityId)?i.pop("error","ΠΡΟΣΟΧΗ","Δεν έχετε συμπληρώσει όλα τα απαραίτητα πεδία"):(n.specialityDiploma.UserRole=n.authentication.role,r.postByParams(n.specialityDiploma,"/api/Diploma/InsertSpecialityDiploma").then(function(){n.searchAction();i.pop("success","Ενημέρωση","Η καταχώριση του κλάδου πραγματοποιήθηκε με επιτυχία");$("#AddDiplomaSpecialityModal").modal("hide")},function(n){i.pop("error","ΠΡΟΣΟΧΗ",n.data)}))};n.openModal=function(t){n.specDiploma=t};n.deleteSpecialityDiploma=function(){r.getByParams({diplomaId:n.specDiploma.DiplomaId,specialityId:n.specDiploma.SpecialityId,UserRole:n.authentication.role},"/api/Management/deleteSpecialityDiploma").then(function(t){t==""?(i.pop("success","Ενημέρωση","Η διαγραφή της συσχέτισης πραγματοποιήθηκε με επιτυχία"),$("#myDeleteModal").modal("hide"),n.searchAction()):i.pop("warning"," Παρουσιάστηκε σφάλμα",t)},function(){i.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα κατά την διαγραφή του κλάδου")})}};DiplomaSpecialityManagmentController.$inject=["$scope","$state","toaster","GeneralFactory","$filter","$q"];dropdownsController=function(n,t,i,r){function o(){return{content:[{style:"tableExample",table:{widths:["*"],body:[[{stack:[{text:"\nΑΙΤΗΣΗ / ΔΗΛΩΣΗ ΠΡΟΤΙΜΗΣΕΩΝ ΥΠΟΨΗΦΙΩΝ\nα.ΑΝΑΠΛΗΡΩΤΩΝ ΕΚΠΑΙΔΕΥΤΙΚΩΝ, β.ΩΡΟΜΙΣΘΙΩΝ ΕΚΠΑΙΔΕΥΤΙΚΩΝ\nΣΧΟΛΙΚΟΥ ΕΤΟΥΣ 2014-15",style:"header",alignment:"center"},{text:["Της ",{text:"αριθμ. 118102/Δ1/25.07.2014 (ΑΔΑ: Β3Ξ69-ΣΦΤ)",bold:!0}," εγκυκλίου του Υ.ΠΑΙ.Θ.\n"],fontSize:9},{text:"(επέχει θέση Υπεύθυνης Δήλωσης του Ν.1599/86)\n\n",fontSize:9}]}]]}},{style:"tableExample",table:{widths:["auto","*"],body:[[{text:["δια μέσου της Διεύθυνσης : ",{text:"Δ.Ε. Αχαΐας",bold:!0}],fontSize:9},{text:["Αρ. Πρωτοκόλου : ",{text:"1234567890",bold:!0}],fontSize:9,alignment:"right"}],[{text:"(συμπληρώνονται αυτόματα κατά την καταχώρηση της αίτησης)\n\n",fontSize:6},{text:["Ημερομηνία : ",{text:"20/04/2015",bold:!0}],fontSize:9,alignment:"right"}]]},layout:"noBorders"},{text:"\nΠΡΟΣΩΠΙΚΑ ΣΤΟΙΧΕΙΑ",style:"header",alignment:"center"},{style:"tableExample",table:{widths:["*"],body:[[{stack:[{style:"tableExample",table:{widths:["*","*"],body:[[{text:["Α.Φ.Μ : ",{text:"000000024",bold:!0}],fontSize:9},{text:["Α.Δ.Τ : ",{text:"ΑΖ 711210",bold:!0}],fontSize:9}],[{text:["ΕΠΩΝΥΜΟ : ",{text:"ΠΕΤΡΟΠΟΥΛΟΣ",bold:!0}],fontSize:9},{text:["ΟΝΟΜΑ : ",{text:"ΔΗΜΗΤΡΗΣ",bold:!0}],fontSize:9}],[{text:["ΠΑΤΡΩΝΥΜΟ : ",{text:"ΙΩΑΝΝΗΣ",bold:!0}],fontSize:9},{text:["ΜΗΤΡΩΝΥΜΟ : ",{text:"ΕΛΕΝΗ",bold:!0}],fontSize:9}],[{text:["ΕΤΟΣ ΓΕΝΝΗΣΗΣ : ",{text:"1979",bold:!0}],fontSize:9},{text:["ΦΥΛΟ : ",{text:"ΑΝΔΡΑΣ",bold:!0}],fontSize:9}],[{text:["ΠΟΛΗ ΜΟΝ. ΚΑΤΟΙΚΙΑΣ : ",{text:"ΠΑΤΡΑ",bold:!0}],fontSize:9},{text:["ΟΔΟΣ/ΑΡΙΘΜΟΣ : ",{text:"ΚΩΝ/ΝΟΥ ΠΑΡΘΕΝΗ 7-9",bold:!0}],fontSize:9}],[{text:["TK : ",{text:"26334",bold:!0}],fontSize:9},{text:["Δ/ΝΣΗ ΗΛ/ΚΟΥ ΤΑΧΥΔΡΟΜΕΙΟΥ (E-MAIL)",{text:"dpetrop@cti.gr",bold:!0}],fontSize:9}],[{text:["ΤΗΛ. ΜΟΝΙΜΗΣ ΚΑΤΟΙΚΙΑΣ : ",{text:"2610960232",bold:!0}],fontSize:9},{text:["ΚΙΝΗΤΟ ΤΗΛ : ",{text:"6936068500",bold:!0}],fontSize:9}],[{text:["ΙΘΑΓΕΝΕΙΑ : ",{text:"ΕΛΛΗΝΙΚΗ",bold:!0}],fontSize:9},{text:["ΕΛΛΗΝΟΜΑΘΕΙΑ : ",{text:"ΜΕ ΕΛΛΗΝΟΜΑΘΕΙΑ",bold:!0}],fontSize:9}],[{text:["ΠΑΙΔΑΓΩΓΙΚΗ ΚΑΤΑΡΤΙΣΗ : ",{text:"12 μηνη",bold:!0}],fontSize:9},{text:[" "]}],[{text:[" "]},{text:[" "]}],[{columns:[{width:"*",image:"imgUncheckedBox",width:12,height:12},{width:235,text:"ΠΟΛΥΤΕΚΝΟΣ (ο ίδιος)",fontSize:9},{width:"*",image:"imgCheckedBox",width:12,height:12},{width:220,text:"ΤΡΙΤΕΚΝΟΣ (ο ίδιος)",fontSize:9}],colSpan:2}],[{columns:[{width:"*",image:"imgUncheckedBox",width:12,height:12},{width:235,text:"ΜΕΣΟΓΕΙΑΚΗ ΑΝΑΙΜΙΑ ",fontSize:9},{width:"*",image:"imgUncheckedBox",width:12,height:12},{width:220,text:"ΣΚΛΗΡΥΝΣΗ ΚΑΤΑ ΠΛΑΚΑΣ ",fontSize:9}],colSpan:2}],[{columns:[{width:"*",image:"imgUncheckedBox",width:12,height:12},{width:235,text:"ΔΗΜΟΣΙΟΣ ΥΠΑΛΛΗΛΟΣ ",fontSize:9},{width:"*",image:"imgCheckedBox",width:12,height:12},{width:"*",text:"ΕΚΠΛΗΡΩΣΗ ΣΤΡΑΤΙΩΤΙΚΩΝ ΥΠΟΧΡΕΩΣΕΩΝ ",fontSize:9}],colSpan:2}]]},layout:"noBorders"}]}]]}},{text:"\nΠΤΥΧΙΑ",style:"header",alignment:"center"},{style:"tableExSM",table:{headerRows:1,body:[[{text:"Κλάδος",style:"tableHeaderSM"},{text:"Λεκτικό",style:"tableHeaderSM"},{text:"Ημ/νία κτήσης",style:"tableHeaderSM"},{text:"Βαθμός",style:"tableHeaderSM"},{text:"Προέλευση",style:"tableHeaderSM"},{text:"Χώρας ΕΕ / εκτός ΕΕ",style:"tableHeaderSM"},{text:"Ισοτιμία-Αντιστοιχία",style:"tableHeaderSM"},{text:"Ειδίκευση απαλλαγής από Ισοτιμία",style:"tableHeaderSM"},{text:"ΠΡΟΫΠΗΡΕΣΙΑΣ ΕΩΣ 30-6-2010",style:"tableHeaderSM"}],["ΠΕ08","ΚΑΛΩΝ ΤΕΧΝΩΝ","30/6/2009",{text:"7.0",alignment:"center"},"Πτυχίο Εξωτερικού","Χώρας εκτός Ε.Ε."," "," ",{text:"0.0",alignment:"center"}],["ΠΕ16.01","ΜΟΥΣΙΚΗΣ","01/01/1990",{text:"5.0",alignment:"center"},"Πτυχίο Εξωτερικού","Χώρας Ε.Ε.","Ισοτιμία-Απαλλαγή από Αντιστοιχία","Πτυχίο με ειδίκευση στη Διεύθυνση Χορωδίας",{text:"0.0",alignment:"center"}]]},layout:"lightHorizontalLines"},{text:"\nΠρόσληψη ως Αναπληρωτής και παραμονή σε Ιδιωτικό Σχολείο",alignment:"left",bold:!0},{style:"tableExample",table:{widths:["*"],body:[[{stack:[{columns:[{width:"*",image:"imgUncheckedBox",width:12,height:12},{text:"2006-07",fontSize:9},{width:"*",image:"imgCheckedBox",width:12,height:12},{text:"2008-09",fontSize:9},{width:"*",image:"imgUncheckedBox",width:12,height:12},{text:"2009-10",fontSize:9},{width:"*",image:"imgCheckedBox",width:12,height:12},{text:"2010-11",fontSize:9}],colSpan:2,margin:[0,0,0,5]},{columns:[{width:"*",image:"imgCheckedBox",width:12,height:12},{text:"2011-12",fontSize:9},{width:"*",image:"imgCheckedBox",width:12,height:12},{text:"2012-13",fontSize:9},{width:"*",image:"imgCheckedBox",width:12,height:12},{text:"2013-14",fontSize:9},{width:"*",image:"imgUncheckedBox",width:12,height:12},{text:"2014-15",fontSize:9}],colSpan:2}]}]]}},{text:"\nΕΠΙΛΟΓΗ ΠΕΡΙΟΧΩΝ",style:"header",alignment:"center"},{style:"tableExample",table:{widths:["*"],body:[[{stack:[{text:"Περιοχές Προτίμησης (κατα σειρά)\n",fontSize:10,bold:!0},"01 - Α-Βοιωτία","02 - Α-Β΄ Θεσσαλονίκης","03 - ΓΕΝ. ΕΚΚΛ. ΛΥΚΕΙΟ ΡΙΖΑΡΕΙΟΥ ΕΚΚΛ/ΚΗΣ ΣΧΟΛΗΣ - Μειωμένου Ωραρίου","04 - ΓΕΝ. ΕΚΚΛ. ΛΥΚΕΙΟ ΡΙΖΑΡΕΙΟΥ ΕΚΚΛ/ΚΗΣ ΣΧΟΛΗΣ","05 - Α-Αιτωλοακαρνανία"],fontSize:9}]]}},{style:"tableExample",table:{widths:["*"],body:[[{stack:[{columns:[{width:"*",image:"imgUncheckedBox",width:12,height:12},{text:"Αποδέχομαι πρόσληψη αναπληρωτή και στις λοιπές περιοχές της Β/θμιας Εκπαίδευσης",fontSize:9}],colSpan:2,margin:[0,0,0,5]},{columns:[{width:"*",image:"imgCheckedBox",width:12,height:12},{text:"Αποδέχομαι πρόσληψη αναπληρωτή με μειωμένο ωράριο διδασκαλίας και στις λοιπές περιοχές της Β/θμιας Εκπαίδευσης",fontSize:9},],margin:[0,0,0,5]},{columns:[{width:"*",image:"imgCheckedBox",width:12,height:12},{text:"Αποδέχομαι πρόσληψη αναπληρωτή και στις λοιπές περιοχές της Α/θμιας Εκπαίδευσης",fontSize:9},],margin:[0,0,0,5]},{columns:[{width:"*",image:"imgCheckedBox",width:12,height:12},{text:"Αποδέχομαι πρόσληψη αναπληρωτή με μειωμένο ωράριο διδασκαλίας και στις λοιπές περιοχές της Α/θμιας Εκπαίδευσης",fontSize:9},],margin:[0,0,0,5]},{columns:[{width:"*",image:"imgCheckedBox",width:12,height:12},{text:"Αποδέχομαι πρόσληψη αναπληρωτή ή ωρομισθίου σε Σ.Μ.Ε.Α.Ε. της Β/θμιας Εκπαίδευσης σε περίπτωση εξάντλησης των πινάκων Σ.Μ.Ε.Α.Ε.",fontSize:9},],margin:[0,0,0,5]},{columns:[{width:"*",image:"imgCheckedBox",width:12,height:12},{text:"Αποδέχομαι πρόσληψη αναπληρωτή ή ωρομισθίου σε Σ.Μ.Ε.Α.Ε. της Α/θμιας Εκπαίδευσης σε περίπτωση εξάντλησης των πινάκων Σ.Μ.Ε.Α.Ε.",fontSize:9},],margin:[0,0,0,5]}]}]]}},{style:"tableExample",table:{widths:["*"],body:[[{stack:[[{text:"Δηλώνω υπεύθυνα και εν γνώσει των συνεπειών του άρθρου 8 του Ν.1599/86 ότι:\n\n",fontSize:9,bold:!0}],[{text:"1. Δεν υπηρετώ σε θέση μόνιμου εκπαιδευτικού της ημεδαπής ή της αλλοδαπής.",fontSize:8}],[{text:"2. Δεν απολύθηκα από θέση δημόσιας υπηρεσίας ή Ο.Τ.Α. ή άλλου νομικού προσώπου του δημοσίου τομέα, λόγω επιβολής της πειθαρχικής ποινής της οριστικής παύσης ή λόγω καταγγελίας της σύμβασης εργασίας για σπουδαίο λόγο, οφειλόμενο σε υπαιτιότητά μου, ή ότι, σε αντίθετη περίπτωση, έχει παρέλθει πενταετία από την απόλυση.",fontSize:8}],[{text:"3. Δεν εμπίπτω στα κωλύματα διορισμού του άρθρου 8 του Ν.3528/2007 (Υπαλληλικός Κώδικας).",fontSize:8}],[{text:"4. Δεν διώκομαι ως φυγόδικος ή φυγόποινος.",fontSize:8}],[{text:"5. Δεν έχω απολυθεί από θέση μόνιμου εκπαιδευτικού, λόγω οριστικής παύσης.",fontSize:8}],[{text:"6. Δεν έχω αποποιηθεί διορισμό σε θέση μόνιμου εκπαιδευτικού (μετά τις 10-06-2003).",fontSize:8}],[{text:"7. Δεν έχω παραιτηθεί εντός του έτους από την ημερομηνία δημοσίευσης της πράξης διορισμού μου σε θέση μόνιμου εκπαιδευτικού (μετά τις 10-06-2003).",fontSize:8}],[{text:"8. Δεν έχω συνταξιοδοτηθεί ανεξάρτητα από το φορέα συνταξιοδότησης.",fontSize:8}],[{text:"9. Δεν είμαι ιδιοκτήτης φροντιστηρίου, ούτε διδάσκω, δεν είμαι μέτοχος σε εταιρεία κατά τις διατάξεις του Υπαλληλικού κώδικα, ούτε έχω οποιαδήποτε εμπορική ιδιότητα.",fontSize:8}],[{text:"10. Κατά την ανάληψη υπηρεσίας θα υποβάλω βεβαιώσεις (α) παθολόγου ή γενικού ιατρού και (β) ψυχιάτρου, είτε του δημοσίου είτε ιδιωτών, όπου θα πιστοποιείται η υγεία και φυσική καταλληλότητα μου να ασκήσω διδακτικά καθήκοντα.",fontSize:9}],[{text:"11. Γνωρίζω ότι αν δεν αναλάβω για οποιονδήποτε λόγο υπηρεσία , κατόπιν πρόσληψης από τους πίνακες αναπληρωτών με πλήρες ή μειωμένο ωράριο, εντός της προθεσμίας που ορίζεται κατά την ανακοίνωση της πρόσληψής μου ή αν παραιτηθώ, διαγράφομαι από τον πίνακα αναπληρωτών για το τρέχον σχολικό έτος και το επόμενο σχολικό έτος.",fontSize:8}],[{text:"12. Υπηρετώ με πλήρη απασχόληση στο Δημόσιο Τομέα ως Μόνιμος.",fontSize:8}],[{text:"13. Έχω εκπληρώσει/έχω νόμιμα απαλλαγεί από τις στρατιωτικές μου υποχρεώσεις.",fontSize:8}],[{text:"14. Έχω διαβάσει την αριθμ. 118232/Δ2/25-07-2014 (ΑΔΑ 7Ζ769-ΟΗΛ),137707/Δ1/02-09-2014 (ΑΔΑ Ω1ΣΩ9-Ε7Ρ),118102/Δ1/25-07-2014 (ΑΔΑ Β3Ξ69-ΣΦΤ) εγκύκλιο του Υ.ΠΑΙ.Θ και ενημερωθεί για τις κατά περίπτωση ισχύουσες νομικές διατάξεις. Υποβάλλω, δε, συνημμένα όλα τα δικαιολογητικά που απαιτούνται βάσει της εν λόγω εγκυκλίου.",fontSize:8}]]}]]}}],styles:{header:{fontSize:12,bold:!0,margin:[0,0,0,10]},subheader:{fontSize:16,bold:!0,margin:[0,10,0,5]},tableExample:{margin:[0,5,0,15]},tableHeader:{bold:!0,fontSize:13,color:"black"},tableHeaderSM:{bold:!0,fontSize:9,alignment:"center"},tableExSM:{fontSize:9,margin:[0,5,0,15]}},images:{imgCheckedBox:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAEQkAABEJABiazSuAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAACAASURBVHic7d153GZ1Xf/x14wDCDngkixiYC6AaUr1Ke3nhqBomSZlJaaACqiEggq44oaKIioaoqIijAtaJq5pJAhuKX1KNCshlyBlc0EHZRmGmd8f5wzes97bdV2fc67zej4e98Px4dzX9Z4R7s/7+p7v+Z4la9euRaMRETsDewB7ArsB2wPLZ/nauiSsJNVbBVw3y9dK4HLgEuDSzLyqJur0WWIBmJ+I2JZmwO/Jr4b9ul9vXxhNkoZgJXApTSG4ZOavM/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IAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQ9uT7Gs9xDEc33oAANigKe+wfduT7G09xTHsbD0AAGzQlHfYXgEAAPMx5R0mAABgTqa8wwQAAMzJlHeYAACAOZnyDpt8AJzeegAA2KAp77DJB8AZrQcAgA2a8g6bfADsLKWc2noIAFiPcXdN/hTAntZTrGLKBQUARzL13bVne5IHWk+xijNbDwAA6zT13fXA9iS7W0+xiue3HgAA1mnqu2v39iT3tZ5iFee1HgAA1um81gOs4r5t+/fvTynlZ5nuxQr7k5xca/1p60EAYDWllF9L8kiSba1nOYo9tdZnHHgc8JSPAmxLcn7rIQBgjc7PdJd/Mu78AwEw9esABAAAi2LqO2t3sjgBcEHrAQBgjaa+sw4JgCmfAkiS55ZSzm49BAAcy7irntt6jlUs1CmAJLms9QAAsIpF2FVPOQXwy3azrMklpZTjWg8BAEcy7qhLWs+xil9mZQDUWh9P8s2WE63BKUkubD0EABzFhRl21ZR9c9z5B48AJMmuRsOsxyIcWgGgT4uwow7u+kULgItKKc9uPQQArDTupotaz7EGRwyAbyR5fOtnWZfjk7y99RAAcJi3Z9hRU/Z4hl2fZEUA1Fp/keRrLSZapyvG2ywCQHPjTrqi9Rxr8LVx1yc59AhAshinAU5McnXrIQBgdHWG3TR1h+z4wwPgS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l4n+M/TvI38ShhAJbPkxl23B/P697+69XsIsCjKaW8MsnH4hMCACyHh5NcOo9H+m7GJI4ArDT+Dzo7ya7WswDAJu1KcvbUln8ywQBIklrrQ0l+L8MzkJ0SAGDRPJlhh/3euNMmZ3KnAA5XSjkvyW1Jntl4FABYix8nuaTWenfrQY5lkkcAVhr/B56d5PONRwGA1Xw+wyH/u1sPsprJHwFYqZTy+iQfTHJa61kAYIUHkry11vrp1oOs1eSPAKw0/o99XpL3JNnXeBwA2JdhJz1vkZZ/smBHAFYqpZyV5MNJLmg9CwBduivJVbXW77ceZCMWNgAOKKW8McnfJXlW61kA6MKDSd5Wa/1E60E2Y+EDIElKKTuSvCvJVUl2NB4HgOW0N8OR5/fUWve2HmazliIADiilnJTkLUnemuSkxuMAsBwezXAB+odqrY+2HmZWlioADhiPCFyZ5C+SnNx4HAAW0yNJPpDkpmX4jf9wSxkAB5RSTkxyRZJ3xDUCAKzNg0nen+TmWutjrYeZl6UOgANKKU9PcnmSNyf53cbjADBN30rykSS3TOWJffPURQCsVEo5M8mbklya5PTG4wDQ1v0ZnkD70Vrr7tbDbKXuAuCAUsq2JC9PclmSNyTZ2XYiALbIniSfSnJrki/XWrtchN0GwEqllBOSvC7JxUleER8lBFg2e5N8KcntST5Ta3288TzNCYDDlFKOS1IyhMD5Sc5JckLToQBYr8eTfC3JrgyLv9Zan2g70rQIgFWMFxC+JEMMnJ/kxUme1nQoAA73yyTfzLDwdyX5Rg8X8m2GAFin8XTBmePXGYf92XUEAPO1J8l9SXaPXwf/7LD++giAGSqlnJpfRcFpGYJgxypfxzcZFqC9fRnOzR/ra0+GR+3uTnJfrfWhNqMun/8PcskwF+bRQ44AAAAASUVORK5CYII="},defaultStyle:{columnGap:5}}}var e,u,f,s,h,c;n.placement={options:["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-top","left-bottom","right","right-top","right-bottom"],selected:"top"};e={content:[{style:"tableExample",table:{widths:["*"],body:[[{stack:[{text:"\nΑΙΤΗΣΗ / ΔΗΛΩΣΗ ΠΡΟΤΙΜΗΣΕΩΝ ΥΠΟΨΗΦΙΩΝ\nα.ΑΝΑΠΛΗΡΩΤΩΝ ΕΚΠΑΙΔΕΥΤΙΚΩΝ, β.ΩΡΟΜΙΣΘΙΩΝ ΕΚΠΑΙΔΕΥΤΙΚΩΝ\nΣΧΟΛΙΚΟΥ ΕΤΟΥΣ 2014-15",style:"header",alignment:"center"},{text:["Της ",{text:"αριθμ. 118102/Δ1/25.07.2014 (ΑΔΑ: Β3Ξ69-ΣΦΤ)",bold:!0}," εγκυκλίου του Υ.ΠΑΙ.Θ.\n"],fontSize:9},{text:"(επέχει θέση Υπεύθυνης Δήλωσης του Ν.1599/86)\n\n",fontSize:9}]}]]}},{style:"tableExample",table:{widths:["auto","*"],body:[[{text:["δια μέσου της Διεύθυνσης : ",{text:"Δ.Ε. Αχαΐας",bold:!0}],fontSize:9},{text:["Αρ. Πρωτοκόλου : ",{text:"1234567890",bold:!0}],fontSize:9,alignment:"right"}],[{text:"(συμπληρώνονται αυτόματα κατά την καταχώρηση της αίτησης)\n\n",fontSize:6},{text:["Ημερομηνία : ",{text:"20/04/2015",bold:!0}],fontSize:9,alignment:"right"}]]},layout:"noBorders"},{text:"\nΠΡΟΣΩΠΙΚΑ ΣΤΟΙΧΕΙΑ",style:"header",alignment:"center"},{style:"tableExample",table:{widths:["*"],body:[[{stack:[{style:"tableExample",table:{widths:["*","*"],body:[[{text:["Α.Φ.Μ : ",{text:"000000024",bold:!0}],fontSize:9},{text:["Α.Δ.Τ : ",{text:"ΑΖ 711210",bold:!0}],fontSize:9}],[{text:["ΕΠΩΝΥΜΟ : ",{text:"ΠΕΤΡΟΠΟΥΛΟΣ",bold:!0}],fontSize:9},{text:["ΟΝΟΜΑ : ",{text:"ΔΗΜΗΤΡΗΣ",bold:!0}],fontSize:9}],[{columns:[{width:90,text:"ΠΟΛΥΤΕΚΝΟΣ ",fontSize:9,alignment:"right"},{width:"*",image:"imgUncheckedBox",width:12,height:12},{width:90,text:"ΤΡΙΤΕΚΝΟΣ ",fontSize:9,alignment:"right"},{width:"*",image:"imgCheckedBox",width:12,height:12},{width:120,text:"ΠΑΙΔΑΓΩΓΙΚΗ ΚΑΤΑΡΤΙΣΗ ",fontSize:9,alignment:"right"},{width:"*",image:"imgUncheckedBox",width:12,height:12},{width:120,text:"ΔΗΜΟΣΙΟΣ ΥΠΑΛΛΗΛΟΣ ",fontSize:9,alignment:"right"},{width:"*",image:"imgCheckedBox",width:12,height:12}],colSpan:2}]]},layout:"noBorders"}]}]]}}],styles:{header:{fontSize:12,bold:!0,margin:[0,0,0,10]},subheader:{fontSize:16,bold:!0,margin:[0,10,0,5]},tableExample:{margin:[0,5,0,15]},tableHeader:{bold:!0,fontSize:13,color:"black"}},images:{imgCheckedBox:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAEQkAABEJABiazSuAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAACAASURBVHic7d153GZ1Xf/x14wDCDngkixiYC6AaUr1Ke3nhqBomSZlJaaACqiEggq44oaKIioaoqIijAtaJq5pJAhuKX1KNCshlyBlc0EHZRmGmd8f5wzes97bdV2fc67zej4e98Px4dzX9Z4R7s/7+p7v+Z4la9euRaMRETsDewB7ArsB2wPLZ/nauiSsJNVbBVw3y9dK4HLgEuDSzLyqJur0WWIBmJ+I2JZmwO/Jr4b9ul9vXxhNkoZgJXApTSG4ZOavM/OGymB9YwGYRURsAzwQ2Lf9egCwVWkoSdKGbga+Bpzffn01M2+qjdRtFoANRMQyIICH0wz8BwHbloaSJM3XDcCXacrA54HMzNW1kbrFAsCty/p/ChxIM/iX1yaSJI3YdTRF4Gzg414uGHABiIglwEOBg4An4PV7SRqKlcBHgBXAFzJzkINwcAUgIvYEngI8Gdi9OI4kqdZlwPuB92XmJdVhJmkQBaDdyHcw8HTgD4rj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nO+c8zE19JckvrIQDozi0ZdtAi2Jlhtx/iSAFw8fxnmYknklzp0D8AW23cPVdmcT4V8JTdfkgAlFKOS/KKLRtnc26stX639RAA9GncQce83/6EvGLc8QcdfgSgJNmxdfNs2M+SXN96CAC6d32GnTR1OzLs+IMOD4BF+e3/w7XWPa2HAKBv4y76cOs51uiQHX94AJy/hYNs1GNZnEMuACy/GzPspqk7ZMcfDIDxsYHnbPk463ezj/0BMBXjTrq59RxrcM7KRwSvPALwkiRP+ZzgxOxLckPrIQDgMDdk2FFTdkKGXZ/k0ABYhMP/d9Raf9R6CABYadxNd7SeYw0O7vpFC4BbWw8AAEexCDvq0AAYbxH44mbjrM3DSe5sPQQAHMWdGXbVlL34wG2BDxwBODPJ09rNsya31VoX5Y5LAHRm3FG3tZ5jFU/LsPMPCYCpW4RDKwD0bRF21SEBcEbDQdbiB7XWe1sPAQDHMu6qH7SeYxVnJItzBOCu1gMAwBpNfWct1CmAXa0HAIA1mvrOWphTAPsz/f+ZAHDArgy7a6rOSJJtL3rRi05N8uPGwxzLd2qtZ7ceAgDWqpRyb5IXtp7jGJ65PdP+7T9J7m49AACs092tB1jFGdsz/fP/32s9AACs09R315nbk5zWeopV7G49AACs09R312nbk+xsPcUq7ms9AACs09R3187tSXa0nuIY9tRaH2o9BACsx7i79rSe4xh2TD0Apl5QAHA0U95hkw+A+1sPAAAbNOUdNvkAmPLhEwA4linvMAEAAHMy5R0mAABgTqa8wwQAAMzJlHeYAACAOZnyDtuxPcnxrac4hn2tBwCADZryDjt+++p/BwBYNgIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQ9uT7Gs9xDEc33oAANigKe+wfduT7G09xTHsbD0AAGzQlHfYXgEAAPMx5R0mAABgTqa8wwQAAMzJlHeYAACAOZnyDpt8AJzeegAA2KAp77DJB8AZrQcAgA2a8g6bfADsLKWc2noIAFiPcXdN/hTAntZTrGLKBQUARzL13bVne5IHWk+xijNbDwAA6zT13fXA9iS7W0+xiue3HgAA1mnqu2v39iT3tZ5iFee1HgAA1um81gOs4r5t+/fvTynlZ5nuxQr7k5xca/1p60EAYDWllF9L8kiSba1nOYo9tdZnHHgc8JSPAmxLcn7rIQBgjc7PdJd/Mu78AwEw9esABAAAi2LqO2t3sjgBcEHrAQBgjaa+sw4JgCmfAkiS55ZSzm49BAAcy7irntt6jlUs1CmAJLms9QAAsIpF2FVPOQXwy3azrMklpZTjWg8BAEcy7qhLWs+xil9mZQDUWh9P8s2WE63BKUkubD0EABzFhRl21ZR9c9z5B48AJMmuRsOsxyIcWgGgT4uwow7u+kULgItKKc9uPQQArDTupotaz7EGRwyAbyR5fOtnWZfjk7y99RAAcJi3Z9hRU/Z4hl2fZEUA1Fp/keRrLSZapyvG2ywCQHPjTrqi9Rxr8LVx1yc59AhAshinAU5McnXrIQBgdHWG3TR1h+z4wwPgS1s4yGZcVUqZ6sOLAOjEuIuuaj3HGh2y4w8PgJpk79bNsmHPSHJt6yEA6N61GXbS1O3NsOMPOiQAaq1PZHGOAlxdSnlB6yEA6NO4gxbllPSXxh1/0OFHAJLk9i0aZrOOS3JTKWXKj1wEYAmNu+emDLtoETxltx8pAD6TZM/8Z5mJlyW5vPUQAHTn8gw7aBHsybDbD/GUABhvEfiprZhoRt7nY4EAbJVx57yv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IUHkry11vrp1oOs1eSPAKw0/o99XpL3JNnXeBwA2JdhJz1vkZZ/smBHAFYqpZyV5MNJLmg9CwBduivJVbXW77ceZCMWNgAOKKW8McnfJXlW61kA6MKDSd5Wa/1E60E2Y+EDIElKKTuSvCvJVUl2NB4HgOW0N8OR5/fUWve2HmazliIADiilnJTkLUnemuSkxuMAsBwezXAB+odqrY+2HmZWlioADhiPCFyZ5C+SnNx4HAAW0yNJPpDkpmX4jf9wSxkAB5RSTkxyRZJ3xDUCAKzNg0nen+TmWutjrYeZl6UOgANKKU9PcnmSNyf53cbjADBN30rykSS3TOWJffPURQCsVEo5M8mbklya5PTG4wDQ1v0ZnkD70Vrr7tbDbKXuAuCAUsq2JC9PclmSNyTZ2XYiALbIniSfSnJrki/XWrtchN0GwEqllBOSvC7JxUleER8lBFg2e5N8KcntST5Ta3288TzNCYDDlFKOS1IyhMD5Sc5JckLToQBYr8eTfC3JrgyLv9Zan2g70rQIgFWMFxC+JEMMnJ/kxUme1nQoAA73yyTfzLDwdyX5Rg8X8m2GAFin8XTBmePXGYf92XUEAPO1J8l9SXaPXwf/7LD++giAGSqlnJpfRcFpGYJgxypfxzcZFqC9fRnOzR/ra0+GR+3uTnJfrfWhNqMun/8PcskwF+bRQ44AAAAASUVORK5CYII="},defaultStyle:{columnGap:5}};n.download=function(){};n.dpetropAnaplirotes=function(){var n=new Date;pdfMake.createPdf(o("94668444-46FB-430B-82BF-2FFC0416AE37",7)).download("export_"+Date.parse(n)+".pdf");r.pop("success","Εξαγωγή σε PDF","Το αρχείο export_"+Date.parse(n)+".pdf δημιουργήθηκε με επιτυχία.")};n.$on("$viewContentLoaded",function(){OpsydCoreJS.initAjax()});n.disabled=function(n,t){return t==="day"&&(n.getDay()===0||n.getDay()===6)};n.dates=[{date:null},{date:null},{date:null}];n.open=function(n,t){n.preventDefault();n.stopPropagation();t.opened=!0};n.dateOptions={formatYear:"yy",startingDay:1};n.format="dd-MMMM-yyyy";n.SelectedCars=[];n.Cars=[{Name:"Car 1",Code:"id01"},{Name:"Car 2",Code:"id02"},{Name:"Car 3",Code:"id03"}];u=3;n.list=[];f=function(){for(var t=n.list.length;t<=u;t++)n.list.push({id:t+1,text:"element "+(t+1)})};n.settings={bootstrap2:!1,filterClear:"Show all!",filterPlaceHolder:"Filter!",moveSelectedLabel:"Move selected only",moveAllLabel:"Move all!",removeSelectedLabel:"Remove selected only",removeAllLabel:"Remove all!",moveOnSelect:!1,preserveSelection:"moved",selectedListLabel:"The selected",nonSelectedListLabel:"The unselected",postfix:"_helperz",selectMinHeight:130,filter:!0,filterNonSelected:"",filterSelected:"",infoAll:"Showing all {0}!",infoFiltered:'<span class="label label-warning">Filtered<\/span> {0} from {1}!',infoEmpty:"Empty list!",filterValues:!0};f();s=1;n.AvailableListItems=[];h=1;c=1;n.saveAction=function(t){for(var u=[{ApplicationSubstituteId:0,PreferedOrder:0,SpecialityId:0}],i=0;i<t.length;i+=1)u[i].ApplicationSubstituteId=1,u[i].PreferedOrder=i+1,u[i].SpecialityId=t[i].Id;var f={Specialities:u,Substitute:{PersonId:1,ProtocolNumber:"ASD",ApplicationDate:"01/01/2000",JustNomination:!1,AcceptFullSubstitudeToAllAreas:!0,AcceptParttimeSubstitudeToAllAreas:!1,AcceptFullSubstitudeToAllPrimaryAreas:!0,AcceptParttimeSubstitudeToAllPrimaryAreas:!1,AcceptAllSubstitudeToSpecialEducation:!0,AcceptAllSubstitudeToPrimarySpecialEducation:!1,AcceptFullSubstitudeForSpecialSupport:!0,AcceptAllSubstitudeToRemoteUnits:!0,PublicServantFull:1,TutoringOwner:1,ConservatoryOwner:1,MilitaryServiceDone:1,IsActive:1}},e=f;GeneralFactory.postByParams(e,"/api/ApplSubstitute/insertApplSubstitute").then(function(t){n.persons=t;n.checkShow(n.persons)},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.combined=function(n){return n.IsFull==1?n.RegionAndUnit.Description:n.RegionAndUnit.Description+" -Μειωμένου Ωραρίου"};n.SelectedAvailItems=[];n.SelectedSelectedListItems=[];n.SelectedListItems=[];n.btnUp=function(){for(var t,r,u,f=n.SelectedSelectedListItems,i=0;i<n.SelectedSelectedListItems.length;i++){if(t=n.SelectedListItems.indexOf(n.SelectedSelectedListItems[i]),t<=0||t>=n.SelectedListItems.length)return;r=n.SelectedListItems[t];u=n.SelectedListItems[t-1];n.SelectedListItems[t-1]=r;n.SelectedListItems[t]=u}};n.btnDown=function(){for(var t,r,u,i=n.SelectedSelectedListItems.length-1;i>=0;i--){if(t=n.SelectedListItems.indexOf(n.SelectedSelectedListItems[i]),t<0||t>=n.SelectedListItems.length-1)return;r=n.SelectedListItems[t];u=n.SelectedListItems[t+1];n.SelectedListItems[t+1]=r;n.SelectedListItems[t]=u}};r.pop("warning"," sdfg sdfgsdfgs dfg","text warning");n.btnRight=function(){n.checkRerions();n.canInsertRegions&&(angular.forEach(n.SelectedAvailItems,function(n){this.push(n)},n.SelectedListItems),angular.forEach(n.SelectedAvailItems,function(t){for(var i=n.AvailableListItems.length-1;i>=0;i--)n.AvailableListItems[i].Id==t.Id&&n.AvailableListItems.splice(i,1)}),n.SelectedAvailItems=[],n.SelectedSelectedListItems=[])};n.checkRerions=function(){var i=0,t=0,f=60,u=30;n.canInsertRegions=!0;n.SelectedListItems.length+n.SelectedAvailItems.length>f&&(r.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών","Δεν μπορείτε να επιλέξετε περισσότερες από "+f+" περιοχές"),n.canInsertRegions=!1);angular.forEach(n.SelectedListItems,function(n){n.Level==1?i=i+1:t=t+1});angular.forEach(n.SelectedAvailItems,function(n){n.Level==1?i=i+1:t=t+1});i>u&&(r.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών Α/βάθμιας","Δεν μπορείτε να επιλέξετε περισσότερες από "+u+" περιοχές Α/βάθμιας"),n.canInsertRegions=!1);t>t&&(r.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών Β/βάθμιας","Δεν μπορείτε να επιλέξετε περισσότερες από "+u+" περιοχές Β/βάθμιας"),n.canInsertRegions=!1)};n.btnAllRight=function(){angular.forEach(n.AvailableListItems,function(n){this.push(n)},n.SelectedListItems);for(var t=n.AvailableListItems.length-1;t>=0;t--)n.AvailableListItems.splice(t,1);n.SelectedSelectedListItems=[];n.SelectedAvailItems=[]};n.btnLeft=function(){angular.forEach(n.SelectedSelectedListItems,function(n){this.push(n)},n.AvailableListItems);angular.forEach(n.SelectedSelectedListItems,function(t){for(var i=n.SelectedListItems.length-1;i>=0;i--)n.SelectedListItems[i].Id==t.Id&&n.SelectedListItems.splice(i,1)});n.SelectedSelectedListItems=[];n.SelectedAvailItems=[]};n.btnAllLeft=function(){angular.forEach(n.SelectedListItems,function(n){this.push(n)},n.AvailableListItems);for(var t=n.SelectedListItems.length-1;t>=0;t--)n.SelectedListItems.splice(t,1);n.SelectedSelectedListItems=[];n.SelectedAvailItems=[]};n.files=[{name:"anap"}];n.fnDownLoad=function(){n.FileExt=n.files[0].name.substr(n.files[0].name.length-4);n.GenerateFileType(n.FileExt);n.RenderFile()};n.RenderFile=function(){};n.GenerateFileType=function(t){switch(t.toLowerCase()){case"doc":case"docx":n.FileType="application/msword";break;case"xls":case"xlsx":n.FileType="application/vnd.ms-excel";break;case"pps":case"ppt":n.FileType="application/vnd.ms-powerpoint";break;case"txt":n.FileType="text/plain";break;case"rtf":n.FileType="application/rtf";break;case"pdf":n.FileType="application/pdf";break;case"msg":case"eml":n.FileType="application/vnd.ms-outlook";break;case"gif":case"bmp":case"png":case"jpg":n.FileType="image/JPEG";break;case"dwg":n.FileType="application/acad";break;case"zip":n.FileType="application/x-zip-compressed";break;case"rar":n.FileType="application/x-rar-compressed"}}};dropdownsController.$inject=["$scope","$state","$rootScope","toaster","$window"];editAcademicQualification=function(n,t,i,r,u,f,e){function a(){if(n.peracademicqual.AcademicQualification.Id==2||n.peracademicqual.AcademicQualification.Id==6){for(var t=0;t<n.academicDiplomas.length;t+=1)if(s=n.academicDiplomas[t],s.Description===n.DiplomaAbroad.Description){c=1;n.peracademicqual.AcademicDiploma=s;n.peracademicqual.AcademicDiploma.Id=s.Id;n.peracademicqual.AcademicDiplomaId=n.peracademicqual.AcademicDiploma.Id;n.peracademicqual.AcademicDiploma.Country=null;n.peracademicqual.AcademicDiploma.CountryId=null;n.peracademicqual.Country=null;n.peracademicqual.DiplomaAbroad=null;break}c==0&&(n.peracademicqual.DiplomaAbroad={Id:0,Description:"",AcademicQualificationId:0,CountryId:0},n.peracademicqual.AcademicDiplomaId=null,n.peracademicqual.DiplomaAbroad.Id=0,n.peracademicqual.DiplomaAbroad.Description=n.DiplomaAbroad,n.peracademicqual.DiplomaAbroad.CountryId=null,n.peracademicqual.DiplomaAbroad.AcademicQualificationId=n.peracademicqual.AcademicQualification.Id,n.peracademicqual.AcademicDiploma=null)}}var h,o,l,s,c;n.pageRules={};n.authentication.isAuth?(h="specSmea",f.getByParams({role:n.authentication.role,codes:h},"/api/Subsystem/NewCheckPermission").then(function(t){var i=h.split(",");for(var r in i)n.pageRules[i[r]]=e("filter")(t,{Code:i[r]},!0)[0].Rules},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})):i.go("/");n.IsDisabled=!1;n.return=function(){n.toggle();i.go("stateEditAcademicQualification");n.peracademicqual={};o!=null&&(n.peracademicqual.PersonId=o,n.peracademicqual.DiplomaAbroad={Id:0,Description:"",AcademicQualificationId:0,CountryId:0})};n.minDate="1950 - 06 - 22";n.DiplomaAbroad="";n.showAddbutton=!0;o=t.getPersonId();f.isValueInArray(f.getRoleCode(n.authentication.role),"u1, u2")&&(o=n.authentication.personId);l=t.getHasMusicSpeciality();n.consts={};n.consts={};n.academicDiplomas=[];n.academicDiplomasWithoutCountry=[];s={};c=0;n.DiplomaAbroad={Id:0,Description:"",AcademicQualificationId:0,CountryId:0};n.labelButton="Προσθήκη Ακαδημαϊκού Προσόντος";n.btnClass="success";n.peracademicqual={};n.peracademicqual.AcademicQualification=[];n.peracademicqual.AcademicDiploma=[];n.peracademicqual.PersonId=o;f.getByParams({id:n.peracademicqual.PersonId},"/api/PersonAcademicQualification/getPersonAcademicQualification").then(function(t){n.personAcademicQualifications=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});n.getAcademicQualifications=function(){f.getByParams({id:n.peracademicqual.PersonId},"/api/PersonAcademicQualification/getAcademicQualification").then(function(t){n.academicQualifications=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.checkForMusic=function(){return l==1?!0:!1};n.changedAcademicQualification=function(){n.peracademicqual.AcademicQualification.Id==7?(n.showDiplomaDate=!1,n.showDiplomaDegree=!1,n.showDiplomaSourceType=!1,n.showCountry=!1,n.showEquivalence=!1,n.showFirstSpecialityType=!0,n.showAcademicFirstSpecialityType()):n.peracademicqual.AcademicQualification.Id==3||n.peracademicqual.AcademicQualification.Id==4?(n.showDiplomaDate=!1,n.showDiplomaDegree=!1,n.showDiplomaSourceType=!1,n.showCountry=!1,n.showEquivalence=!1,n.showFirstSpecialityType=!1):(n.showDiplomaDate=!0,n.showDiplomaDegree=!0,n.showDiplomaSourceType=!0,n.showAcademicDiplomaSourceType(),n.showCountry=!1,n.showFirstSpecialityType=!1,n.peracademicqual.AcademicQualification.Id==1||n.peracademicqual.AcademicQualification.Id==5?(n.showDiplomaAbroad=!1,n.peracademicqual.DiplomaSource!=null?(n.changedAcademicDiplomaSource(),n.showDiploma=!0):n.showDiploma=!1):(n.showDiploma=!1,n.peracademicqual.DiplomaSource!=null?(n.changedAcademicDiplomaSource(),n.showDiplomaAbroad=!0):n.showDiplomaAbroad=!1))};n.edit=function(t){n.labelButton="Ενημέρωση Ακαδημαϊκού Προσόντος";n.toggle();f.getByParams({id:t.Id},"/api/PersonAcademicQualification/getPersonAcademicQualificationById").then(function(t){n.peracademicqual=t;n.changedAcademicQualification()},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});n.disableAcademicQualification=!0;n.enableAcademicQualification=!1;n.IsDisabled=!n.pageRules.specSmea.CanUpdate};n.getPersonAcademicQualification=function(){f.getByParams({id:n.peracademicqual.PersonId},"/api/PersonAcademicQualification/getPersonAcademicQualification").then(function(t){n.personAcademicQualifications=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.changedAcademicDiplomaSource=function(){if(n.peracademicqual.DiplomaSource==2)n.peracademicqual.AcademicQualification.Id==1||n.peracademicqual.AcademicQualification.Id==5?(n.showDiplomaAbroad=!1,n.showCountry=!0,n.academicDiplomas=[],n.showDiploma=!0):(n.academicDiplomasWithoutCountry=[],n.showDiploma=!1,n.showCountry=!1,n.showDiplomaAbroad=!0,f.getByParams({AcademicQualificationId:n.peracademicqual.AcademicQualification.Id},"/api/PersonAcademicQualification/getAcademicDiplomaWithoutCountry").then(function(t){n.academicDiplomasWithoutCountry=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),n.DiplomaAbroad=n.peracademicqual.AcademicDiploma.Description,n.peracademicqual.DiplomaAbroad=n.peracademicqual.AcademicDiploma),n.showEquivalence=!0,f.getByParams({AcademicQualificationId:n.peracademicqual.AcademicQualification.Id},"/api/Country/getCountriesByAcademicQualificationId").then(function(t){n.countries=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),f.getByAll("/api/PersonAcademicQualification/getAcademicEquivalenceTypes").then(function(t){n.consts.equivalenceType=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),n.changedCountry();else if(n.showCountry=!1,n.showEquivalence=!1,n.peracademicqual.AcademicQualification.Id==1||n.peracademicqual.AcademicQualification.Id==5){n.showDiplomaAbroad=!1;n.showDiploma=!0;var t={AcademicQualificationId:n.peracademicqual.AcademicQualification.Id,CountryId:3};f.getByParams(t,"/api/PersonAcademicQualification/getAcademicDiploma").then(function(t){n.academicDiplomas=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}else n.showDiplomaAbroad=!0,f.getByParams({AcademicQualificationId:n.peracademicqual.AcademicQualification.Id},"/api/PersonAcademicQualification/getAcademicDiplomaWithoutCountry").then(function(t){n.academicDiplomasWithoutCountry=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),n.DiplomaAbroad=n.peracademicqual.AcademicDiploma.Description,n.peracademicqual.DiplomaAbroad=n.peracademicqual.AcademicDiploma,n.showDiploma=!1};n.changedCountry=function(){n.showDiploma=!0;var t={AcademicQualificationId:n.peracademicqual.AcademicQualification.Id,CountryId:n.peracademicqual.AcademicDiploma.Country.Id};f.getByParams(t,"/api/PersonAcademicQualification/getAcademicDiploma").then(function(t){n.academicDiplomas=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.showAcademicDiplomaSourceType=function(){f.getByAll("/api/PersonAcademicQualification/getAcademicDiplomaSourceTypes").then(function(t){n.consts.academicDiplomaSourceType=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.showAcademicFirstSpecialityType=function(){f.getByAll("/api/PersonAcademicQualification/getFirstSpecialityTypes").then(function(t){n.consts.firstSpecialityType=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.saveAction=function(t){var i;n.DiplomaAbroad!=null&&a();t.RegionAndUnitDescription=n.authentication.unitName;t.UserRole=n.authentication.role;typeof t.Id!="undefined"&&t.Id>0?(t.ModifiedBy=n.authentication.userName,n.peracademicqual.AcademicQualification.Id>0&&(n.peracademicqual.AcademicQualification.Id==1||n.peracademicqual.AcademicQualification.Id==5)?n.peracademicqual.AcademicDiplomaId=n.peracademicqual.AcademicDiploma.Id:n.peracademicqual.AcademicQualification.Id>0&&n.peracademicqual.DiplomaSource==2&&(n.peracademicqual.AcademicQualification.Id==2||n.peracademicqual.AcademicQualification.Id==6)&&(n.peracademicqual.AcademicDiplomaId=n.peracademicqual.AcademicDiploma.Id),i=t,f.postByParams(i,"/api/PersonAcademicQualification/updatePerAcademicQualification").then(function(){n.getPersonAcademicQualification()}),function(){r.pop("error","Προσοχή","Παρουσιάστηκε σφάλμα. Το Ακαδημαϊκό Προσόν δεν καταχωρήθηκε.")}):(t.CreatedBy=n.authentication.userName,n.peracademicqual.AcademicQualificationId=n.peracademicqual.AcademicQualification.Id,(n.peracademicqual.AcademicQualification.Id==1||n.peracademicqual.AcademicQualification.Id==5)&&(n.peracademicqual.AcademicDiplomaId=n.peracademicqual.AcademicDiploma.Id),n.peracademicqual.PersonId=o,i=t,f.postByParams(i,"/api/PersonAcademicQualification/insertPerAcademicQualification").then(function(){n.getPersonAcademicQualification()}),function(){r.pop("error","Προσοχή","Παρουσιάστηκε σφάλμα. Το Ακαδημαϊκό Προσόν δεν καταχωρήθηκε.")});n.toggle();n.peracademicqual={};o!=null&&(n.peracademicqual.PersonId=o)};n.delAcademicQualification=function(t){t.RegionAndUnitDescription=n.authentication.unitName;t.UserRole=n.authentication.role;var i=t;f.postByParams(i,"/api/PersonAcademicQualification/deletePerAcademicQualification").then(function(){n.getPersonAcademicQualification()}),function(){r.pop("error","Προσοχή","Παρουσιάστηκε σφάλμα. Η μουσική ειδίκευση δεν διαγράφηκε.")};n.peracademicqual={};n.peracademicqual.PersonId=o};n.delPerAcad;n.openModal=function(t){n.delPerAcad=t};n.undisableAll=function(){n.showDiplomaDate=!1;n.showDiplomaDegree=!1;n.showDiplomaSourceType=!1;n.showCountry=!1;n.showEquivalence=!1;n.showFirstSpecialityType=!1;n.showDiploma=!1;n.showDiplomaAbroad=!1};n.visible=!1;n.toggle=function(){n.visible=!n.visible;n.showbutton=!n.showbutton;n.disableAcademicQualification=!1;n.enableAcademicQualification=!0;n.peracademicqual={};n.peracademicqual.PersonId=o;n.getAcademicQualifications();n.undisableAll();n.showAddbutton=!n.showAddbutton;n.IsDisabled=!n.pageRules.specSmea.CanInsert};n.showAlerts=function(){n.showAddbutton=!n.showAddbutton};n.formats=["dd/MM/yyyy"];n.format=n.formats[0];n.today=function(){};n.today();n.clear=function(){n.dt=null};n.disabled=function(n,t){return t==="day"&&(n.getDay()===0||n.getDay()===6)};n.toggleMin=function(){n.minDate=n.minDate?null:new Date};n.toggleMin();n.open=function(t,i){t.preventDefault();t.stopPropagation();n[i]=!0};n.dateOptions={formatYear:"yy",startingDay:1}};editAcademicQualification.$inject=["$scope","PassParameters","$state","toaster","$q","GeneralFactory","$filter"];EditFekController=function(n,t,i,r,u,f,e,o){var s,c;n.fek={};n.ValidTo="";n.ValidFrom="";n.showValid=!0;n.disableFields="";n.showSpecialitiesList=!1;n.tmpfek={};n.applicationTypes={};n.SelectedSpecAvailItems=[];n.AvailableSpecListItems=[];n.SelectedSelectedSpecListItems=[];n.SelectedSpecListItems=[];n.dbSpecListItems=[];s=i.getFek();i.resetFek();n.checkSpecialitiesFields=function(){n.showSpecialitiesList=!0};s!=null&&s!=""&&s!="undefined"?(n.showValid=!1,n.disableFields="disabled",c=t.all([u.getApplicationType(),o.getByAll("/api/Speciality/getAllSpecialitiesDto"),f.getFekById(s),o.getByParams({fek:s},"/api/ApplicationTypeFek/getFekListByFekIdDto")]),c.then(function(t){n.applicationTypes=t[0];n.AvailableSpecListItems=t[1];n.fek=t[2];n.tmpfek=t[3];n.checkSpecialitiesFields();n.findSpecsAndFek()})):(n.checkSpecialitiesFields(),u.getApplicationType().then(function(t){n.applicationTypes=t},function(n){toaster.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),o.getByAll("/api/Speciality/getAllSpecialitiesDto").then(function(t){n.AvailableSpecListItems=t},function(){toaster.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα στη φόρτωση των κλάδων")}));n.findSpecsAndFek=function(){n.SelectedSpecListItems=[];n.SelectedAvailSpecItems=[];n.dbSpecListItems=[];for(var t=n.tmpfek.length-1;t>=0;t--)n.SelectedSpecListItems.push(n.tmpfek[t]),n.SelectedAvailSpecItems.push(n.tmpfek[t]),n.dbSpecListItems.push(n.tmpfek[t]);n.removeDuplicatesSpecsForDualList()};n.minDate=new Date;var h=new Date,l=h.getDate(),a=h.getMonth(),v=h.getFullYear()+1;n.maxDate=l+"/"+a+"/"+v;n.formats=["dd/MM/yyyy"];n.format=n.formats[0];n.today=function(){};n.today();n.clear=function(){n.dt=null};n.disabled=function(n,t){return t==="day"&&(n.getDay()===0||n.getDay()===6)};n.toggleMin=function(){n.minDate=n.minDate?null:new Date};n.toggleMin();n.open=function(t,i){t.preventDefault();t.stopPropagation();n[i]=!0;i.opened=!0};n.dateOptions={formatYear:"yy",startingDay:1};n.btnSpecRight=function(){angular.forEach(n.SelectedAvailSpecItems,function(n){this.push(n)},n.SelectedSpecListItems);angular.forEach(n.SelectedAvailSpecItems,function(t){for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].SpecialityId==t.SpecialityId&&n.AvailableSpecListItems.splice(i,1)});n.SelectedAvailSpecItems=[];n.SelectedSelectedSpecListItems=[]};n.btnSpecLeft=function(){angular.forEach(n.SelectedSelectedSpecListItems,function(n){this.push(n)},n.AvailableSpecListItems);angular.forEach(n.SelectedSelectedSpecListItems,function(t){for(var i=n.SelectedSpecListItems.length-1;i>=0;i--)n.SelectedSpecListItems[i].SpecialityId==t.SpecialityId&&n.SelectedSpecListItems.splice(i,1)});n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.removeDuplicatesSpecsForDualList=function(){angular.forEach(n.SelectedAvailSpecItems,function(t){if(n.showSpecialitiesList)for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].SpecialityId==t.SpecialityId&&n.AvailableSpecListItems.splice(i,1)})};n.saveAction=function(){var u={Specialities:n.SelectedSpecListItems,applFek:n.fek,ValidTo:n.ValidTo,ValidFrom:n.ValidFrom,dbSpecListItems:n.dbSpecListItems,UserRole:n.authentication.role},t=u;n.fek.Id!=null&&n.fek.Id!=""&&n.fek.Id!="undefined"?(f.updateApplicationTypeFek(t).then(function(n){i.setFek(n);r.go("updatefek")}),function(){toaster.pop("error","Προσοχή","Παρουσιάστηκε σφάλμα. Η αίτηση σας δεν καταχωρήθηκε.")}):(f.insertApplicationTypeFek(t).then(function(n){i.setFek(n);r.go("updatefek")}),function(){toaster.pop("error","Προσοχή","Παρουσιάστηκε σφάλμα. Η αίτηση σας δεν καταχωρήθηκε.")})}};EditFekController.$inject=["$scope","$q","PassParameters","$state","ApplicationTypeFactory","ApplicationTypeFekFactory","SpecialityFactory","GeneralFactory"];editMusicSpeciality=function(n,t,i,r,u,f,e){function c(){n.disableDiplomaDate="";n.disableDiplomaDegree=""}function l(){n.disableDiplomaDate="disabled";n.disableDiplomaDegree="disabled"}var s,o,h;n.pageRules={};n.authentication.isAuth?(s="specMusic",f.getByParams({role:n.authentication.role,codes:s},"/api/Subsystem/NewCheckPermission").then(function(t){var i=s.split(",");for(var r in i)n.pageRules[i[r]]=e("filter")(t,{Code:i[r]},!0)[0].Rules},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})):r.go("/");n.IsDisabled=!1;n.return=function(){n.toggle();r.go("stateEditMusicSpeciality")};n.minDate="1950 - 06 - 22";o=i.getPersonId();f.isValueInArray(f.getRoleCode(n.authentication.role),"u1, u2")&&(o=n.authentication.personId);h=0;h=i.getHasSpecialEducation();n.getPersonMusicSpecialists=[];n.getPersonMusicSpecialities=[];n.labelButton="Προσθήκη Μουσικής Ειδίκευσης";n.btnClass="success";o!=null&&(n.personmusicspecialities={},n.personmusicspecialists={},n.musicspecialists={},n.permusicspeciality={},n.musicspecialistscountperpersonspeciality={},n.permusicspeciality.PersonId=o,n.maxMusicSpecialists=0,n.maxAvailableMusicSpecialists=0);f.getByParams({id:n.permusicspeciality.PersonId},"api/PersonMusicSpeciality/getMusicSpecialists").then(function(t){n.personmusicspecialists=t;n.maxSpecialists()},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});n.getPersonMusicSpecialities=function(){f.getByParams({id:n.permusicspeciality.PersonId},"/api/PersonSpeciality/getMusicSpecialities").then(function(t){n.personmusicspecialities=t},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.checkForSpecialEducation=function(){return h==1?!0:!1};n.changedSpeciality=function(){c();n.Klados.Speciality1.Code=="ΕΜ16.00"&&l();f.getByParams({id:n.Klados.Speciality1.Id},"/api/MusicSpecialist/getMusicSpecialistPerSpecialitities").then(function(t){n.musicspecialists=t},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.getSpecialists=function(){f.getByParams({id:n.permusicspeciality.PersonId},"api/PersonMusicSpeciality/getMusicSpecialists").then(function(t){n.personmusicspecialists=t},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.Klados={};n.edit=function(t){n.labelButton="Ενημέρωση Μουσικής Ειδίκευσης";f.getByParams({id:t.Id},"/api/PersonMusicSpeciality/getPersonMusicSpecialityById").then(function(t){n.permusicspeciality=t;n.Klados.Speciality1=n.permusicspeciality.MusicSpecialistPerSpeciality.Speciality;n.changedSpeciality()},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});n.toggle();n.permusicspeciality=[];n.IsDisabled=!n.pageRules.specMusic.CanUpdate};n.saveAction=function(t){var i;t.DiplomaDegree!=null&&(t.DiplomaDegree=parseFloat(t.DiplomaDegree.toString().replace(",",".")));t.RegionAndUnitDescription=n.authentication.unitName;t.UserRole=n.authentication.role;typeof t.Id!="undefined"&&t.Id>0?(t.ModifiedBy=n.authentication.userName,i=t,f.postByParams(i,"/api/PersonMusicSpeciality/updatePerMusicSpeciality").then(function(){n.getSpecialists();n.maxSpecialists()}),function(){u.pop("error","Προσοχή","Παρουσιάστηκε σφάλμα. Η μουσική ειδίκευση δεν καταχωρήθηκε.")}):(t.CreatedBy=n.authentication.userName,n.permusicspeciality.MusicSpecialistPerSpecialityId=n.permusicspeciality.MusicSpecialistPerSpeciality.Id,n.permusicspeciality.PersonId=o,i=t,f.postByParams(i,"/api/PersonMusicSpeciality/insertPerMusicSpeciality").then(function(){n.getSpecialists();n.maxSpecialists()}),function(){u.pop("error","Προσοχή","Παρουσιάστηκε σφάλμα. Η μουσική ειδίκευση δεν καταχωρήθηκε.")});n.toggle();n.permusicspeciality={};o!=null&&(n.permusicspeciality.PersonId=o)};n.delPerSpec=function(t){t.RegionAndUnitDescription=n.authentication.unitName;t.UserRole=n.authentication.role;var i=t;f.postByParams(i,"/api/PersonMusicSpeciality/deletePerMusicSpeciality").then(function(){n.getSpecialists();n.maxSpecialists()}),function(){u.pop("error","Προσοχή","Παρουσιάστηκε σφάλμα. Η μουσική ειδίκευση δεν διαγράφηκε.")};n.permusicspeciality={};n.permusicspeciality.PersonId=o};n.delPerMusicSpeciality;n.openModal=function(t){n.delPerMusicSpeciality=t};n.visible=!1;n.toggle=function(){n.permusicspeciality={};n.visible=!n.visible;n.showbutton=!n.showbutton;n.getPersonMusicSpecialities();n.maxSpecialists();n.IsDisabled=!n.pageRules.specMusic.CanInsert};n.showbutton=!0;n.showAddButton=function(){return!0};n.closeAlert=function(t){n.alerts.splice(t,1)};n.maxSpecialists=function(){f.getByParams({id:n.permusicspeciality.PersonId},"api/PersonMusicSpeciality/getPersonMusicSpecialistsCount").then(function(t){n.maxMusicSpecialists=t},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});f.getByParams({id:n.permusicspeciality.PersonId},"api/PersonMusicSpeciality/getAvailableMusicSpecialistsCount").then(function(t){n.maxAvailableMusicSpecialists=t},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.showAlerts=function(){return n.maxMusicSpecialists>=n.maxAvailableMusicSpecialists?!0:!1};n.minDate="01/01/1900";n.maxDate=new Date;n.formats=["dd/MM/yyyy"];n.format=n.formats[0];n.today=function(){};n.today();n.clear=function(){n.dt=null};n.toggleMin=function(){n.minDate=n.minDate?null:new Date};n.toggleMin();n.open=function(t,i){t.preventDefault();t.stopPropagation();n[i]=!0};n.dateOptions={formatYear:"yy",startingDay:1}};editMusicSpeciality.$inject=["$scope","$q","PassParameters","$state","toaster","GeneralFactory","$filter"];editPerson=function(n,t,r,u,f,e,o,s,h,c,l){function w(){a!=null&&a!=""&&a!="undefined"&&(n.person={},n.personUserDetails={},f.getByParams({Id:a},"/api/Person/GetInsUpdPersonDto").then(function(t){n.person=t;n.person.MilitaryService=n.person.MilitaryService?1:0;n.previous.HavingManyChildren=t.HavingManyChildren;n.PlacementTypeList=n.person.IsEEPEBP?[{Description:"ΣΜΕΑΕ",Id:1},{Description:"Μουσικό Σχολείο",Id:2},{Description:"Καλλιτεχνικό Σχολείο",Id:3},{Description:"Διαπολιτισμικό Σχολείο",Id:4},{Description:"ΣΜΕΑ Braille",Id:5},{Description:"ΣΜΕΑ Νοηματικής Γλώσσας",Id:6},{Description:"ΣΔΕΥ-ΚΕΔΑΣΥ",Id:7},{Description:"ΚΕΔΑΣΥ",Id:8},]:[{Description:"ΣΜΕΑΕ",Id:1},{Description:"Μουσικό Σχολείο",Id:2},{Description:"Καλλιτεχνικό Σχολείο",Id:3},{Description:"Διαπολιτισμικό Σχολείο",Id:4}];c(function(){if(n.geographicMunicipalities.selected=e("filter")(n.geographicMunicipalitiesList,{KalMunicipalityId:t.KalMunicipalityId},!0)[0],n.DisableField=f.isValueInArray(f.getRoleCode(n.authentication.role),"u1, u2")&&n.person.IsNew||f.isValueInArray(f.getRoleCode(n.authentication.role),"d1, d2, p")&&!n.person.IsNew,n.changePedagogicalEducationField(),f.isValueInArray(f.getRoleCode(n.authentication.role),"u1, u2")&&(n.DisableFieldsForTeacher.Infirnity=n.person.Thalassemia&&n.person.IsThalassemiaConfirmed||n.person.MultipleSclerosis&&n.person.IsMultipleSclerosisConfirmed||n.person.Infirmity>=1&&n.person.IsInfirmityConfirmed?!0:!1,n.DisableFieldsForTeacher.FirstChildInfirnity=n.person.DisabledChildren&&n.IsDisabledChildrenConfirmed||n.person.HavingManyChildren==3&&n.person.IsManyChildrenConfirmed?!0:!1),n.MilitaryNumber.selected=n.person.MilitaryNumber,n.intendancies=n.inteLevel!=0?e("filter")(n.intendanciesList,{LevelId:n.inteLevel},!0):angular.copy(n.intendanciesList),f.isEmptyValue(n.intendancy.selected)&&(!f.isEmptyValue(n.person.HavingManyChildren)||!f.isEmptyValue(n.person.DisabledChildren))&&f.isValueInArray(f.getRoleCode(n.authentication.role),"u1, u2")&&(n.showIntendancy=1),!f.isEmptyValue(n.person.IntendancyId)){n.showIntendancy=2;n.intendancyString=n.person.Intendancy;try{n.intendancyEmail=e("filter")(n.intendancies,{Id:n.person.IntendancyId},!0)[0].Email;n.intendancy.selected=e("filter")(n.intendancies,{Id:n.person.IntendancyId},!0)[0]}catch(i){s.error(i)}}n.changeHavingManyChildrenField();n.changeMilitaryFields();n.changeDiseaseInfirmityField();n.changeBraileKnowledgeField();n.changeSignKnowledgeField();n.changeCertificateGreekLanguageField();n.changeMilitaryServiceField();n.hasnationality();f.getByParams({personId:a},"/api/personComments/getPersonComments").then(function(t){n.percommentsList=t;n.messComments=f.isEmptyValue(n.percommentsList)?!1:!0},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Υπήρξε πρόβλημα κατά την φόρτωση των προσωικών στοιχείων")});n.person.HasLoginAccount&&f.getByParams({id:a},"/api/Person/GetPersonUserDetails").then(function(t){n.personUserDetails=t},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Υπήρξε πρόβλημα κατά την φόρτωση των προσωικών στοιχείων")});n.oldEmail=n.person.Email;n.showMessages=!0;n.person.IsPermanent&&n.changedRegionAndUnit();unblockUI("#divBlockUI")},300)},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Υπήρξε πρόβλημα κατά την φόρτωση των προσωικών στοιχείων");unblockUI("#divBlockUI")}))}function v(t){var i=[],r=[];switch(t){case"MilitaryService":n.MilitaryService={IsConfirmed:!1,IsValid:!1};i=e("filter")(n.confirmationList,{confirmationId:3},!0);i.length>0&&(n.MilitaryService.IsConfirmed=!0,r=e("filter")(i,{isValid:!0},!0),r.length>0&&(n.MilitaryService.IsValid=!0));break;case"PedagogicalEducation":n.PedagogicalEducation={IsConfirmed:!1,IsValid:!1};i=e("filter")(n.confirmationList,{confirmationId:5,fieldValue:n.person.PedagogicalEducation},!0);i.length>0&&(n.PedagogicalEducation.IsConfirmed=!0,r=e("filter")(i,{isValid:!0},!0),r.length>0&&(n.PedagogicalEducation.IsValid=!0));break;case"CertificateGreekLanguage":n.CertificateGreekLanguage={IsConfirmed:!1,IsValid:!1};i=e("filter")(n.confirmationList,{confirmationId:6,fieldValue:n.person.CertificateGreekLanguage},!0);i.length>0&&(n.CertificateGreekLanguage.IsConfirmed=!0,r=e("filter")(i,{isValid:!0},!0),r.length>0&&(n.CertificateGreekLanguage.IsValid=!0));break;case"GreekLanguage":n.GreekLanguage={IsConfirmed:!1,IsValid:!1};i=e("filter")(n.confirmationList,{confirmationId:7,fieldValue:n.person.GreekLanguage},!0);i.length>0&&(n.GreekLanguage.IsConfirmed=!0,r=e("filter")(i,{isValid:!0},!0),r.length>0&&(n.GreekLanguage.IsValid=!0));break;case"HavingManyChildren":n.HavingManyChildren={IsConfirmed:!1,IsValid:!1};i=e("filter")(n.confirmationList,{confirmationId:8,fieldValue:n.person.HavingManyChildren},!0);i.length>0&&(n.HavingManyChildren.IsConfirmed=!0,r=e("filter")(i,{isValid:!0},!0),r.length>0&&(n.HavingManyChildren.IsValid=!0));break;case"MultipleSclerosis":n.MultipleSclerosis={IsConfirmed:!1,IsValid:!1};i=e("filter")(n.confirmationList,{confirmationId:10},!0);i.length>0&&(n.MultipleSclerosis.IsConfirmed=!0,r=e("filter")(i,{isValid:!0},!0),r.length>0&&(n.MultipleSclerosis.IsValid=!0));break;case"Thalassemia":n.Thalassemia={IsConfirmed:!1,IsValid:!1};i=e("filter")(n.confirmationList,{confirmationId:11},!0);i.length>0&&(n.Thalassemia.IsConfirmed=!0,r=e("filter")(i,{isValid:!0},!0),r.length>0&&(n.Thalassemia.IsValid=!0));break;case"Infirmity":n.Infirmity={IsConfirmed:!1,IsValid:!1};i=e("filter")(n.confirmationList,{confirmationId:12,fieldValue:n.person.Infirmity},!0);i.length>0&&(n.Infirmity.IsConfirmed=!0,r=e("filter")(i,{isValid:!0},!0),r.length>0&&(n.Infirmity.IsValid=!0));break;case"DisabledChildren":n.DisabledChildren={IsConfirmed:!1,IsValid:!1};i=e("filter")(n.confirmationList,{confirmationId:13,fieldValue:n.person.DisabledChildren},!0);i.length>0&&(n.DisabledChildren.IsConfirmed=!0,r=e("filter")(i,{isValid:!0},!0),r.length>0&&(n.DisabledChildren.IsValid=!0));break;case"BraileKnowledge":n.BraileKnowledge={IsConfirmed:!1,IsValid:!1};i=e("filter")(n.confirmationList,{confirmationId:17},!0);i.length>0&&(n.BraileKnowledge.IsConfirmed=!0,r=e("filter")(i,{isValid:!0},!0),r.length>0&&(n.BraileKnowledge.IsValid=!0));break;case"SignKnowledge":n.SignKnowledge={IsConfirmed:!1,IsValid:!1};i=e("filter")(n.confirmationList,{confirmationId:18},!0);i.length>0&&(n.SignKnowledge.IsConfirmed=!0,r=e("filter")(i,{isValid:!0},!0),r.length>0&&(n.SignKnowledge.IsValid=!0))}}function b(){return dto={Id:f.isEmptyValue(n.changeDataRequest.Id)?"":n.changeDataRequest.Id,PersonId:a,ChangeDataRequestId:n.changeDataRequest.ChangeDataRequestItem.selected.Id,Description:n.changeDataRequest.Description,PedagogicalCompetencyId:f.isEmptyValue(n.changeDataRequest.PedagCompetency.selected.Id)?"":n.changeDataRequest.PedagCompetency.selected.Id,Documents:n.changeDataRequest.Documents,RequestedBy:f.isValueInArray(f.getRoleCode(n.authentication.role),"u1, u2")?n.person.Lastname+" "+n.person.Firstname:n.authentication.unitName,SendDocumentsById:f.isEmptyValue(n.changeDataRequest.SendDocuments.selected.Id)?"":n.changeDataRequest.SendDocuments.selected.Id,Answer:"",IntendancyId:f.isEmptyValue(n.authentication.regionAndUnitId)?"":n.authentication.regionAndUnitId,CreatedBy:"",CreationDate:"",CreatedUserRole:"",CreatedRegionAndUnitDescription:"",ModifiedBy:"",LastEditDate:"",ModifiedUserRole:"",ModifiedRegionAndUnitDescription:""}}var y,a,p;for(n.pageRules={},n.showMessages=!1,n.SendDataForPersonDto=[{Id:"",PersonId:"",CertificateType:""},{Id:"",PersonId:"",CertificateType:""},{Id:"",PersonId:"",CertificateType:""},{Id:"",PersonId:"",CertificateType:""},{Id:"",PersonId:"",CertificateType:""}],n.SendDataForPersonFullDto=[{Id:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:"",CertificateType:""},{Id:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:"",CertificateType:""},{Id:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:"",CertificateType:""},{Id:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:"",CertificateType:""},{Id:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:"",CertificateType:""}],n.uploadedFileDetails=[{message:""},{message:""},{message:""},{message:""},{message:""}],blockUI({target:"#divBlockUI",animate:!0}),n.authentication.isAuth?(y="folder,specSmea,spec,specEEPEBP,specSmeaEEPEBP,changeDataRequest",f.getByParams({role:n.authentication.role,codes:y},"/api/Subsystem/NewCheckPermission").then(function(t){var i=y.split(",");for(var r in i)n.pageRules[i[r]]=e("filter")(t,{Code:i[r]},!0)[0].Rules},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})):r.go("/"),a=t.getPersonId(),f.isValueInArray(f.getRoleCode(n.authentication.role),"u1, u2")&&(a=n.authentication.personId),n.messages=[{completed:"",percentage:"0",error:""},{completed:"",percentage:"0",error:""},{completed:"",percentage:"0",error:""},{completed:"",percentage:"0",error:""},{completed:"",percentage:"0",error:""}],n.DisableOrVisibleUploadFields=[{ShowUploadField:!1,ShowDownloadField:!0,ShowDeleteField:!0},{ShowUploadField:!1,ShowDownloadField:!0,ShowDeleteField:!0},{ShowUploadField:!1,ShowDownloadField:!0,ShowDeleteField:!0},{ShowUploadField:!1,ShowDownloadField:!0,ShowDeleteField:!0},{ShowUploadField:!1,ShowDownloadField:!0,ShowDeleteField:!0}],f.getByParams({personId:a},"/api/Person/GetDetailsForFile").then(function(t){if(t!=null)for(n.SendDataForPersonFullDto=t,i=0;i<t.length;i++)f.isEmptyValue(t[i].Id)?n.DisableOrVisibleUploadFields[i].ShowDownloadField=!1:(n.SendDataForPersonDto[i].Id=t[i].Id,n.uploadedFileDetails[i].message="Έχετε μεταφορτώσει το αρχείο: "+n.SendDataForPersonFullDto[i].FileName,n.DisableOrVisibleUploadFields[i].ShowDownloadField=f.isValueInArray(f.getRoleCode(n.authentication.role),"m1, m2, a, d1, d2, s, u2")?!0:!1)},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης επισυναπτόμενου Βιογραφικού")}),i=0;i<n.SendDataForPersonFullDto.length;i++)n.SendDataForPersonDto[i].PersonId=a;n.IsDisabled=function(){return f.isEmptyValue(n.pageRules.folder)?!1:n.pageRules.folder.CanUpdate==!1&&!f.isEmptyValue(a)||n.pageRules.folder.CanInsert==!1&&f.isEmptyValue(a)};n.disableDideForViewForPermanent=!1;n.consts={};n.hasSpecialEducation=!1;n.confirmationList={};n.person={};n.previous={HavingManyChildren:""};n.person.Id=0;n.personUserDetails={};n.checkDocuments={};n.intendancies=[];n.intendanciesList=[];n.intendancyString="";n.showIntendancy=0;n.intendancyEmail="";n.oldEmail="";n.duplicateMail=!1;n.MilitaryService={IsConfirmed:!1,IsValid:!1};n.PedagogicalEducation={IsConfirmed:!1,IsValid:!1};n.CertificateGreekLanguage={IsConfirmed:!1,IsValid:!1};n.GreekLanguage={IsConfirmed:!1,IsValid:!1};n.HavingManyChildren={IsConfirmed:!1,IsValid:!1};n.MultipleSclerosis={IsConfirmed:!1,IsValid:!1};n.Thalassemia={IsConfirmed:!1,IsValid:!1};n.Infirmity={IsConfirmed:!1,IsValid:!1};n.DisabledChildren={IsConfirmed:!1,IsValid:!1};n.BraileKnowledge={IsConfirmed:!1,IsValid:!1};n.SignKnowledge={IsConfirmed:!1,IsValid:!1};n.showPedagogicalCompetencyId=!1;n.PedagogicalCompetencyList=[];n.showASPENumber=!1;n.showDiseaseInfirmity=!1;n.disabledFromIsNew=!1;n.showMusicSpeciality=!1;n.showSpecialEducation=!1;n.DisableField=!1;n.IsDisabled=n.IsDisabled();n.inteLevel=0;n.geographicMunicipalitiesList=[];n.changeDataList=[];n.changeDataRequest={};n.changeDataRequest.ChangeDataRequestItem={selected:""};n.changeDataRequest.SendDocuments={selected:""};n.changeDataRequest.Intendancy={selected:""};n.changeDataRequest.PedagCompetency={selected:""};n.MilitaryNumber={};n.MilitaryNumber.selected={};n.militarynumbers=["100","101","102","103","104","105","106","107","108","109","110","111","112","113","114","115","116","117","118","119","120","121","122","123","124","125","126","127","128","129","130","131","132","133","134","135","136","137","138","139","140","141","142","143","144","145","146","147","148","149","150","151","152","153","154","155","156","200","201","203","205","208","211","216","219","221","223","225","229","230","237","241","253","254","255","304"];n.MilitaryNumberMessage=!1;n.messComments=!1;n.percommentsList={};n.countries={};n.popoverMsg={SignKnowledge:"",MilitaryService:"",PedagogicalEducation:"",BraileKnowledge:"",SignKnowledge:"",CertificateGreekLanguage:"",MilitaryService:"",HavingManyChildren:"",Thalassemia:"",MultipleSclerosis:"",Infirmity:"",DisabledChildren:""};n.geographicMunicipalities={};n.geographicMunicipalities={selected:""};n.intendancy={};n.intendancy={selected:""};n.personMessage={};n.showMunicipalityField={Field:!1,Message:!1};n.showChildInfirmity={Child1:!1,Child2:!1,Child3:!1,Message:!1};n.VisibleFields={PedagCompetency:!1,Documents:!1,SendDocuments:!1};n.showChangeMessage={ChangeDataRequestItem:!1,Description:!1,Documents:!1,PedagCompetency:!1,Intendancy:!1,SendDocuments:!1};n.showIntendancyForChangeData=!1;n.showUpload={PedagogicalEducationUpload:!1};n.maxNominationDate=new Date;n.upload=[];n.IntendancyMessage=!1;n.DisableFieldsForTeacher={Infirnity:!1,FirstChildInfirnity:!1};n.getPostingTranferAreas=function(){f.getByParams({id:n.person.OfficialRegionAndUnitId},"/api/RegionAndUnit/getPostingTransferAreaByRegionAndUnitId").then(function(t){n.PostingTranferAreas=t},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.changedRegionAndUnit=function(){n.getPostingTranferAreas()};p=h.all([f.getByAll("/api/Person/greekLanguageTypes"),f.getByAll("/api/Person/greekNationalityTypes"),f.getByAll("/api/Person/identityDataTypes"),f.getByAll("/api/Person/certificateGreekLanguageTypes"),f.getByAll("/api/Person/havingManychildenTypes"),f.getByAll("/api/Person/pedagogicalEducationTypes"),f.getByAll("/api/Person/braileSignKnowledgeTypes"),f.getByAll("/api/Person/braileSignKnowledgeTypes"),f.getByAll("/api/Person/teachingAbilityTypes"),f.getByAll("/api/Person/infirmityTypes"),f.getByAll("/api/Person/civilServantTypes"),f.getByAll("/api/Person/getPedagogicalCompetency"),f.getByAll("/api/General/getGeographicKalMunicipalities"),f.getByParams({personId:a},"/api/Person/getPersonSpecialitiesDetails"),f.getByParams({personId:a},"/api/LandingPage/getPersonAttributesForMenu"),f.getByAll("/api/RegionAndUnit/getIntendanciesAll"),f.getByParams({personId:a},"/api/Person/getPersonSpecialitiesLevel"),f.getByAll("/api/RegionAndUnit/getRegionAndUnitForPlacement"),f.getByAll("/api/Person/yesNoEnumTypes"),f.getByAll("/api/Country/getCountriesWithoutGreece"),f.getByParams({personId:a,role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId},"/api/Person/checkPermanentViewFromOfficialDide")]);p.then(function(t){n.consts.greekLanguageType=t[0];n.consts.nationalityType=t[1];n.consts.identityDataType=t[2];n.consts.certificateGreekLanguageType=t[3];n.consts.havingManychildrenType=t[4];n.consts.pedagogicalEducationType=t[5];n.consts.braileSignKnowledgeType=t[6];n.consts.signKnowledgeType=t[7];n.consts.teachingAbilityType=t[8];n.consts.infirmityType=t[9];n.consts.civilServantType=t[10];n.consts.PedagogicalCompetency=t[11];n.geographicMunicipalitiesList=t[12];n.personMessage=t[13];n.personAttributesForMenu=t[14];n.intendanciesList=t[15];n.intendancies=t[15];n.inteLevel=t[16];n.OfficialPlacementUnits=t[17];n.consts.yesNoEnumTypes=t[18];n.countries=t[19];n.disableDideForViewForPermanent=t[20];w()});n.changeCertificateGreekLanguage=function(n){v(n)};n.changeGreekLanguage=function(n){v(n)};n.changePedagogicalEducation=function(n){v(n)};n.changeBraileKnowledge=function(n){v(n)};n.changeSignKnowledge=function(n){v(n)};n.changeHavingManyChildren=function(n){v(n)};n.changeMilitaryService=function(n){v(n)};n.changeThalassemia=function(n){v(n)};n.changeMultipleSclerosis=function(n){v(n)};n.changeInfirmity=function(n){v(n)};n.changeDisabledChildren=function(n){v(n)};n.hasMilitaryService=function(n){return n=="Α"?!0:!1};n.hasinfirmity=function(n){return n=="1"||n=="2"?!0:!1};n.hasnationality=function(){n.person.Nationality=="1"||n.person.Nationality=="2"?(n.countriesFilter=[{Id:3,Description:"ΕΛΛΑΔΑ",IsEU:!0}],n.person.NationalityCountryId=3):n.person.Nationality=="3"?n.countriesFilter=e("filter")(n.countries,{IsEU:!0},!0):n.person.Nationality=="4"?(n.countriesFilter=[{Id:50,Description:"ΑΛΒΑΝΙΑ",IsEU:!1}],n.person.NationalityCountryId=50):n.person.Nationality=="6"?(n.countriesFilter=[{Id:46,Description:"ΑΙΓΥΠΤΟΣ",IsEU:!1}],n.person.NationalityCountryId=46):n.person.Nationality=="7"?(n.countriesFilter=[{Id:162,Description:"ΤΟΥΡΚΙΑ",IsEU:!1}],n.person.NationalityCountryId=162):n.countriesFilter=e("filter")(n.countries,{IsEU:!1},!0);n.person.Nationality!="2"&&(n.person.GreekNationalityDate="")};n.changeMilitaryServiceField=function(){n.person.MilitaryService==1&&n.person.IsMilitaryServiceConfirmed?n.popoverMsg.MilitaryService="Έχει επικυρωθεί":n.person.MilitaryService!=1||n.person.IsMilitaryServiceConfirmed?(n.popoverMsg.MilitaryService="",n.MilitaryNumberMessage=!1):n.popoverMsg.MilitaryService=""};n.changeMilitaryFields=function(){f.isValueInArray(n.MilitaryNumber.selected,n.militarynumbers)||!n.hasMilitaryService(n.person.Sex)||n.person.MilitaryService!=1||n.person.IsMilitaryServiceConfirmed?n.MilitaryNumberMessage=!1:(n.MilitaryNumberMessage=!0,n.MilitaryNumber.selected="")};n.changeCertificateGreekLanguageField=function(){n.popoverMsg.CertificateGreekLanguage=n.person.CertificateGreekLanguage>0&&n.person.IsCertificateGreekLanguageConfirmed?"Έχει επικυρωθεί":n.person.CertificateGreekLanguage>0&&!n.person.IsCertificateGreekLanguageConfirmed?"Εκκρεμεί έλεγχος δικαιολογητικών":""};n.changeGreekLanguageField=function(){n.person.GreekLanguage!=1&&(n.person.CertificateGreekLanguage=0)};n.changeSex=function(){n.person.Sex=="Α"?(n.person.IsMilitaryServiceConfirmed=!1,n.person.MilitaryService=0):(n.person.IsMilitaryServiceConfirmed=!0,n.person.MilitaryService=1);n.changeMilitaryServiceField()};n.changePedagogicalEducationField=function(){c(function(){n.showPedagogicalCompetencyId=!1;n.showUpload.PedagogicalEducationUpload=!1;n.DisableOrVisibleUploadFields[0].ShowUploadField=!1;n.person.PedagogicalEducation==2?(n.showPedagogicalCompetencyId=!0,n.PedagogicalCompetencyList=e("filter")(n.consts.PedagogicalCompetency,{IsTwelveMonths:!0},!0)):n.person.PedagogicalEducation==1?(n.showPedagogicalCompetencyId=!0,n.PedagogicalCompetencyList=e("filter")(n.consts.PedagogicalCompetency,{IsTwelveMonths:!1},!0)):(n.showPedagogicalCompetencyId=!1,n.person.PedagogicalCompetencyId=null);n.popoverMsg.PedagogicalEducation=(n.person.PedagogicalEducation==1||n.person.PedagogicalEducation==2)&&n.person.IsPedagogicalEducationConfirmed?"Έχει επικυρωθεί":n.person.PedagogicalEducation!=1&&n.person.PedagogicalEducation!=2||n.person.IsPedagogicalEducationConfirmed?"":"Εκκρεμεί έλεγχος δικαιολογητικών";f.isValueInArray(f.getRoleCode(n.authentication.role),"m1, m2, a, d1, d2")&&n.showPedagogicalCompetencyId&&!n.person.IsPedagogicalEducationConfirmed&&(n.DisableOrVisibleUploadFields[0].ShowUploadField=!0)},300)};n.changeBraileKnowledgeField=function(){n.popoverMsg.BraileKnowledge=n.person.BraileKnowledge==1&&n.person.IsBraileKnowledgeConfirmed?"Έχει επικυρωθεί":n.person.BraileKnowledge!=1||n.person.IsBraileKnowledgeConfirmed?"":"Εκκρεμεί έλεγχος δικαιολογητικών"};n.changeSignKnowledgeField=function(){n.popoverMsg.SignKnowledge=n.person.SignKnowledge==1&&n.person.IsSignKnowledgeConfirmed?"Έχει επικυρωθεί":n.person.SignKnowledge!=1||n.person.IsSignKnowledgeConfirmed?"":"Εκκρεμεί έλεγχος δικαιολογητικών"};n.changeHavingManyChildrenField=function(){n.DisableOrVisibleUploadFields[1].ShowUploadField=!1;n.person.HavingManyChildren==1?n.showASPENumber=!0:(n.showASPENumber=!1,n.person.ASPENumber=null);n.popoverMsg.HavingManyChildren=n.person.HavingManyChildren>0&&n.person.IsManyChildrenConfirmed?"Έχει επικυρωθεί":n.person.HavingManyChildren>0&&!n.person.IsManyChildrenConfirmed?"Εκκρεμεί έλεγχος δικαιολογητικών":"";n.changeDiseaseInfirmityField();n.showMunicipalityFields();n.showChildInfirmityFields();(f.isEmptyValue(n.person.HavingManyChildren)||n.person.IsManyChildrenConfirmed||!f.isValueInArray(f.getRoleCode(n.authentication.role),"m1, m2, a"))&&(f.isEmptyValue(n.person.HavingManyChildren)||n.person.IsManyChildrenConfirmed||n.person.IntendancyId!=n.authentication.regionAndUnitId)||(n.DisableOrVisibleUploadFields[1].ShowUploadField=!0);n.showIntendancy=(f.isEmptyValue(n.person.HavingManyChildren)||n.person.IsManyChildrenConfirmed)&&(f.isEmptyValue(n.person.DisabledChildren)||n.person.IsDisabledChildrenConfirmed)||!f.isValueInArray(f.getRoleCode(n.authentication.role),"u1, u2")||!f.isEmptyValue(n.intendancy.selected)?(f.isEmptyValue(n.person.HavingManyChildren)&&f.isEmptyValue(n.person.DisabledChildren)||f.isEmptyValue(n.intendancy.selected))&&f.isEmptyValue(n.person.IntendancyId)?0:2:1};n.changeDiseaseInfirmityField=function(){n.person.Thalassemia||n.person.MultipleSclerosis||n.person.Infirmity>=1?n.showDiseaseInfirmity=!0:n.person.Thalassemia||n.person.MultipleSclerosis||!f.isEmptyValue(n.person.Infirmity)||(n.showDiseaseInfirmity=!1,n.person.KEPANumber=null,n.person.SanitaryNumber=null,n.person.KEPAEndDate=null);f.isEmptyValue(n.person.Infirmity)&&(n.person.Deaf=!1,n.person.Blind=!1,n.person.ParaplegicQuadriplegic=!1,n.person.TeachingAbility=null);n.popoverMsg.Thalassemia=n.person.Thalassemia&&n.person.IsThalassemiaConfirmed?"Έχει επικυρωθεί":n.person.Thalassemia&&!n.person.IsThalassemiaConfirmed?"Εκκρεμεί έλεγχος δικαιολογητικών":"";n.popoverMsg.MultipleSclerosis=n.person.MultipleSclerosis&&n.person.IsMultipleSclerosisConfirmed?"Έχει επικυρωθεί":n.person.MultipleSclerosis&&!n.person.IsMultipleSclerosisConfirmed?"Εκκρεμεί έλεγχος δικαιολογητικών":"";n.popoverMsg.Infirmity=n.person.Infirmity>0&&n.person.IsInfirmityConfirmed?"Έχει επικυρωθεί":n.person.Infirmity>0&&!n.person.IsInfirmityConfirmed?"Εκκρεμεί έλεγχος δικαιολογητικών":"";n.popoverMsg.DisabledChildren=n.person.DisabledChildren>0&&n.person.IsDisabledChildrenConfirmed?"Έχει επικυρωθεί":n.person.DisabledChildren>0&&!n.person.IsDisabledChildrenConfirmed?"Εκκρεμεί έλεγχος δικαιολογητικών":"";n.showMunicipalityFields();n.showChildInfirmityFields();n.showIntendancy=(f.isEmptyValue(n.person.HavingManyChildren)||n.person.IsManyChildrenConfirmed)&&(f.isEmptyValue(n.person.DisabledChildren)||n.person.IsDisabledChildrenConfirmed)||!f.isValueInArray(f.getRoleCode(n.authentication.role),"u1, u2")||!f.isEmptyValue(n.intendancy.selected)?(f.isEmptyValue(n.person.HavingManyChildren)&&f.isEmptyValue(n.person.DisabledChildren)||f.isEmptyValue(n.intendancy.selected))&&f.isEmptyValue(n.person.IntendancyId)?0:2:1};n.saveAction=function(i,r){var s=!0,h,o;((f.isEmptyValue(n.person.FEKDate)||f.isEmptyValue(n.person.OfficialRegionAndUnitId)||f.isEmptyValue(n.person.FEKNo))&&(s=!1),n.pageRules.folder.CanUpdate||f.isEmpty(i.Id)||f.isValueInArray(f.getRoleCode(n.authentication.role),"a, d2"))&&(n.changeMilitaryFields(),$("#editPerson").valid()&&(!n.MilitaryNumberMessage||n.person.IsPermanent&&s)?(r=="Confirm"&&(i.IsNew=!1,f.isValueInArray(f.getRoleCode(n.authentication.role),"d1, d2")&&(i.Before2012==1?i.GreekLanguage==1&&i.CertificateGreekLanguage>0&&(i.IsCertificateGreekLanguageConfirmed=!0):i.GreekLanguage==1&&i.CertificateGreekLanguage>0&&(i.IsCertificateGreekLanguageConfirmed=!0),i.IsBraileKnowledgeConfirmed=i.BraileKnowledge==1?!0:!1,i.IsSignKnowledgeConfirmed=i.SignKnowledge==1?!0:!1)),n.person.Sex=="Θ"&&(i.IsMilitaryServiceConfirmed=!0),i.RegionAndUnitDescription=n.authentication.unitName,i.UserRole=n.authentication.role,i.KalMunicipalityId=f.isEmptyValue(n.geographicMunicipalities.selected)?null:n.geographicMunicipalities.selected.KalMunicipalityId,i.IntendancyId=f.isEmptyValue(n.intendancy.selected)?null:n.intendancy.selected.Id,i.MilitaryNumber=f.isEmptyValue(n.MilitaryNumber.selected)?null:n.MilitaryNumber.selected,i.NationalityCountryId=f.isEmptyValue(n.person.NationalityCountryId)?null:n.person.NationalityCountryId,h=i.MilitaryService,i.MilitaryService==0?(i.MilitaryNumber=null,i.MilitaryOfficeNumber=null,i.MilitaryClass=null,i.MilitaryService=!1):i.MilitaryService=!0,f.postByParams(i,"/api/Person/save").then(function(o){t.setPersonId(o);i.MilitaryService=h;r=="Confirm"&&(n.person.IsNew=!1,n.personMessage.IsNew=!1,n.DisableField=f.isValueInArray(f.getRoleCode(n.authentication.role),"u1, u2")||f.isValueInArray(f.getRoleCode(n.authentication.role),"d1, d2, p")&&!n.person.IsNew,f.isValueInArray(f.getRoleCode(n.authentication.role),"d1, d2")&&(i.Before2012==1?i.GreekLanguage==1&&i.CertificateGreekLanguage>0&&(n.person.IsCertificateGreekLanguageConfirmed=!0):i.GreekLanguage==1&&i.CertificateGreekLanguage>0&&(n.person.IsCertificateGreekLanguageConfirmed=!0),i.BraileKnowledge==1&&(n.person.IsBraileKnowledgeConfirmed=!0),i.SignKnowledge==1&&(n.person.IsSignKnowledgeConfirmed=!0)));n.person.Before2012=n.person.IsNew?!1:n.person.Nationality>0&&(n.person.GreekLanguage==2||n.person.GreekLanguage==1&&n.person.CertificateGreekLanguage>0)?!1:!0;n.person.Nationality>0&&(n.personMessage.HasNationality=!0);n.person.NationalityCountryId>0&&(n.personMessage.HasCountry=!0);n.person.GreekLanguage>0&&(n.personMessage.HasCertificateGreekLanguage=!0);f.isEmptyValue(n.person.IntendancyId)||(n.showIntendancy=2,f.isEmptyValue(n.intendancy.selected.Id)||(n.intendancyString=n.intendancy.selected.Description,n.intendancyEmail=e("filter")(n.intendancies,{Id:n.person.IntendancyId},!0)[0].Email));u.pop("success","Επιτυχής ενημέρωση","Ο φάκελός σας ενημερώθηκε με επιτυχία.")}).catch(function(n){u.pop("error","Παρουσιάστηκε σφάλμα",n.data)})):n.person.IsPermanent?u.pop("warning","Η αποθήκευση δεν πραγματοποιήθηκε","Ελέγξτε όλα τα υποχρεωτικά πεδία.",4e3,"trustedHtml"):(o="",(n.showMunicipalityField.Message||n.showChildInfirmity.Message)&&(o=o+"Ελέγξτε όλα τα πεδία και το κομμάτι των κοινωνικών κριτηρίων για τυχόν ενημερωτικά μηνύματα."),n.IntendancyMessage&&(o=o+"Πρέπει να επιλέξετε Διεύθυνση Χειρισμού Φακέλου"),u.pop("warning","Η αποθήκευση δεν πραγματοποιήθηκε",o,4e3,"trustedHtml")))};n.minDate="01/01/1900";n.maxNationalityDate=new Date;n.maxDate=new Date(2016,06,22,0,0,0,0);n.formats=["dd/MM/yyyy"];n.format=n.formats[0];n.today=function(){};n.today();n.clear=function(){n.dt=null};n.toggleMin=function(){n.minDate=n.minDate?null:new Date};n.toggleMin();n.open=function(t,i){t.preventDefault();t.stopPropagation();n[i]=!0};n.dateOptions={formatYear:"yy",startingDay:1,format:"dd/mm/yyyy"};n.goToHistory=function(){t.setPersonId(a);r.go("history")};n.actionsForPerson=function(i){t.setPersonId(a);switch(i){case"Αναπληρωτή":r.go("substitute");break;case"Ωρομισθίου":r.go("hourlyteacher");break;case"Αναπληρωτή ΣΜΕΑΕ":r.go("substitutesmea");break;case"Ωρομισθίου ΣΜΕΑΕ":r.go("hourlyteachersmea");break;case"Αναπληρωτή σε Μουσικά Σχολεία":r.go("substitutemusic");break;case"Ωρομισθίου σε Μουσικά Σχολεία":r.go("hourlyteachermusic");break;case"Ωρομισθίου σε Μουσικά Σχολεία για κλάδο ΕΜ16.00":r.go("hourlyteachermusicforEM16");break;case"Απόσπασης":r.go("secondmentapplicationpyspdechurch");break;case"Απόσπασης σε Εκκλησιαστικά Σχολεία":r.go("secondmentchurch");break;case"Απόσπασης ΣΜΕΑΕ":r.go("secondmentapplicationpyspdesmea");break;case"Απόσπασης ΕΕΠ - ΕΒΠ":r.go("secondmentapplicationeepebp");break;case"Απόσπασης σε Φορέα":r.go("secondmentapplicationbody");break;case"Απόσπασης σε Καλλιτεχνικά Σχολεία":r.go("secondmentapplicationartistic");break;case"Απόσπασης σε Μουσικά Σχολεία":r.go("secondmentapplicationmusic");break;case"Αίτηση Απόσπασης κλάδου Πληροφορικής σε Φορέα":r.go("secondmentapplicationbody1920");break;case"Απόσπασης για Θέση Συντονιστή Εκπαίδευσης Προσφύγων":r.go("secondmentapplicationbodyref");break;case"Ενισχυτικής Διδασκαλίας":r.go("remediation");break;case"Αίτηση - Δήλωση προτίμησης τοποθέτησης αναπληρωτών":r.go("substitutePlacementSchool");break;case"Ιστορικό Αιτήσεων":r.go("history");break;case"Έλεγχος Γνησιότητας":r.go("confirmation");break;case"Παρατηρήσεις":r.go("comments");break;case"Επικύρωση Εγγραφών":t.setPersonId(a);var e=o.open({templateUrl:"CheckDocuments.html",controller:CheckDocumentsController});e.result.then(function(t){if(t){n.personDoc=angular.copy(n.person);n.personDoc.ComputerCertificate={};n.personDoc.IsMilitaryServiceConfirmed=t.IsMilitaryServiceConfirmed;n.personDoc.IsPedagogicalEducationConfirmed=t.IsPedagogicalEducationConfirmed;n.personDoc.IsCertificateGreekLanguageConfirmed=t.IsCertificateGreekLanguageConfirmed;n.personDoc.IsGreekLanguageConfirmed=t.IsGreekLanguageConfirmed;n.personDoc.IsManyChildrenConfirmed=t.IsManyChildrenConfirmed;n.personDoc.IsMultipleSclerosisConfirmed=t.IsMultipleSclerosisConfirmed;n.personDoc.IsThalassemiaConfirmed=t.IsThalassemiaConfirmed;n.personDoc.IsInfirmityConfirmed=t.IsInfirmityConfirmed;n.personDoc.IsDisabledChildrenConfirmed=t.IsDisabledChildrenConfirmed;n.personDoc.IsBraileKnowledgeConfirmed=t.IsBraileKnowledgeConfirmed;n.personDoc.IsSignKnowledgeConfirmed=t.IsSignKnowledgeConfirmed;n.personDoc.DisabledChildren=t.DisabledChildren;n.personDoc.GreekLanguage=t.GreekLanguage;n.personDoc.CertificateGreekLanguage=t.CertificateGreekLanguage;n.personDoc.HavingManyChildren=t.HavingManyChildren;n.personDoc.PedagogicalEducation=t.PedagogicalEducation;n.personDoc.BraileKnowledge=t.BraileKnowledge;n.personDoc.SignKnowledge=t.SignKnowledge;n.personDoc.MilitaryService=t.MilitaryService;n.personDoc.Thalassemia=t.Thalassemia;n.personDoc.MultipleSclerosis=t.MultipleSclerosis;n.personDoc.Infirmity=t.Infirmity;n.personDoc.ASPENumber=t.ASPENumber;n.personDoc.KEPANumber=t.KEPANumber;n.personDoc.SanitaryNumber=t.SanitaryNumber;n.personDoc.PedagogicalCompetencyId=t.PedagogicalCompetencyId;n.personDoc.RegionAndUnitDescription=n.authentication.unitName;n.personDoc.UserRole=n.authentication.role;n.personDoc.DisabilityRate=t.DisabilityRate;n.personDoc.MaritalStatus=t.MaritalStatus;n.personDoc.MateDisabilityRate=t.MateDisabilityRate;n.personDoc.KEPANumberMate=t.KEPANumberMate;n.personDoc.KEPAEndDateMate=t.KEPAEndDateMate;n.personDoc.IsMateDisabilityRateConfirmed=t.IsMateDisabilityRateConfirmed;n.personDoc.SanitaryNumberMate=t.SanitaryNumberMate;n.personDoc.ComputerCertificate.Id=f.isEmptyValue(t.ComputerCertificate)?"":t.ComputerCertificate.Id;n.personDoc.ComputerCertificate.HasCertificate=f.isEmptyValue(t.ComputerCertificate)?"":t.ComputerCertificate.HasCertificate;n.personDoc.ComputerCertificate.ComputerCertificate=f.isEmptyValue(t.ComputerCertificate)?"":t.ComputerCertificate.ComputerCertificate;n.personDoc.ComputerCertificate.IsComputerCertificateConfirmed=f.isEmptyValue(t.ComputerCertificate)?"":t.ComputerCertificate.IsComputerCertificateConfirmed;var i={personData:n.personDoc,UserName:n.authentication.userName,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName},r=i;f.postByParams(r,"/api/Person/UpdatePersonCheckDocAsync").then(function(i){i?(n.person.IsMilitaryServiceConfirmed=t.IsMilitaryServiceConfirmed,n.person.IsPedagogicalEducationConfirmed=t.IsPedagogicalEducationConfirmed,n.person.IsCertificateGreekLanguageConfirmed=t.IsCertificateGreekLanguageConfirmed,n.person.IsGreekLanguageConfirmed=t.IsGreekLanguageConfirmed,n.person.IsManyChildrenConfirmed=t.IsManyChildrenConfirmed,n.person.IsMultipleSclerosisConfirmed=t.IsMultipleSclerosisConfirmed,n.person.IsThalassemiaConfirmed=t.IsThalassemiaConfirmed,n.person.IsInfirmityConfirmed=t.IsInfirmityConfirmed,n.person.IsDisabledChildrenConfirmed=t.IsDisabledChildrenConfirmed,n.person.IsBraileKnowledgeConfirmed=t.IsBraileKnowledgeConfirmed,n.person.IsSignKnowledgeConfirmed=t.IsSignKnowledgeConfirmed,n.person.DisabledChildren=t.DisabledChildren,n.person.GreekLanguage=t.GreekLanguage,n.person.CertificateGreekLanguage=t.CertificateGreekLanguage,n.person.HavingManyChildren=t.HavingManyChildren,n.person.PedagogicalEducation=t.PedagogicalEducation,n.person.BraileKnowledge=t.BraileKnowledge,n.person.SignKnowledge=t.SignKnowledge,n.person.MilitaryService=t.MilitaryService,n.person.Thalassemia=t.Thalassemia,n.person.MultipleSclerosis=t.MultipleSclerosis,n.person.Infirmity=t.Infirmity,n.person.ASPENumber=t.ASPENumber,n.person.KEPANumber=t.KEPANumber,n.person.SanitaryNumber=t.SanitaryNumber,n.person.PedagogicalCompetencyId=t.PedagogicalCompetencyId,n.changePedagogicalEducationField(),n.changeHavingManyChildrenField(),n.changeMilitaryFields(),n.changeDiseaseInfirmityField(),n.changeBraileKnowledgeField(),n.changeSignKnowledgeField(),n.changeCertificateGreekLanguageField(),n.changeMilitaryServiceField(),u.pop("success","Επιτυχής αποθήκευση","Η αποθήκευση πραγματοποιήθηκε με επιτυχία!",3e3,"trustedHtml")):u.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε η επικύρωση!",3e3,"trustedHtml")},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε η επικύρωση!",3e3,"trustedHtml")})}},function(){s.info("Modal dismissed at: "+new Date)});break;case"Βεβαίωση Προϋπηρεσίας":blockUI({target:"#blockui_loading",animate:!0});c(function(){f.getByParams({personId:a,regionAndUnitId:n.authentication.regionAndUnitId,role:n.authentication.role},"/api/Pdf/getPreviousExperienceCertificate").then(function(n){var i=new Date,t={},r;t=n;r=t;pdfMake.createPdf(t).download("export_"+Date.parse(i)+".pdf");unblockUI("#blockui_loading");u.pop("success","Εξαγωγή σε PDF","Το αρχείο export_"+Date.parse(i)+".pdf δημιουργήθηκε με επιτυχία.")},function(){unblockUI("#blockui_loading");u.pop("error","Παρουσιάστηκε σφάλμα","Η αίτηση δεν μπορεί να εκτυπωθεί.")})},1e3);break;case"Απόσπασης σε Σχολείο Ευρωπαϊκής Παιδείας":r.go("secondmentapplicationbodysep");break;case"Περιφερειακοί Διευθυντές Εκπαίδευσης":r.go("prefecture");break;case"Διευθυντές Εκπαίδευσης":r.go("intendancy");break;case"Απόσπασης σε Κ.Ε.Σ.Υ. με εξειδίκευση στη συμβουλευτική και στον επαγγελματικό προσανατολισμό":r.go("secondmentapplicationkesy");break;case"Αίτηση Απόσπασης στη Γενική Διεύθυνση Στρατηγικού Σχεδιασμού, Προγραμματισμού και Ηλεκτρονικής Διακυβέρνησης του Υ.ΠΑΙ.Θ.Α.":r.go("secondmentapplicationbodytechnical");break;case"Αναπληρωτή ΕΕΠ - ΕΒΠ":r.go("substituteEEPEBP");break;case"Αίτηση για Μόνιμο Διορισμό ΕΕΠ - ΕΒΠ":r.go("permanentEEPEBP");break;case"Αίτηση για Μόνιμο Διορισμό ΣΜΕΑΕ":r.go("permanentSMEA");break;case"Αίτηση για Μόνιμο Διορισμό":r.go("permanent");break;case"Αίτηση για Μόνιμο Διορισμό σε Μουσικό Σχολείο":r.go("permanentMusic");break;case"Αναπληρωτή για δια ζώσης διδασκαλία με 3μηνη σύμβαση":r.go("substitute3months");break;case"Αναπληρωτή ΣΜΕΑΕ για δια ζώσης διδασκαλία με 3μηνη σύμβαση":r.go("substituteSMEA3months");break;case"Αναπληρωτή σε Μουσικά Σχολεία για δια ζώσης διδασκαλία με 3μηνη σύμβαση":r.go("substituteMusic3months");break;case"Αναπληρωτή ΕΕΠ-ΕΒΠ για δια ζώσης παροχή υποστηρικτικού έργου με 3μηνη σύμβαση":r.go("substituteEEPEBP3months");break;case"Αναπληρωτή για ειδική προκήρυξη":r.go("substituteForSchool");break;case"Αναπληρωτή ΣΜΕΑΕ για ειδική προκήρυξη":r.go("substituteSMEAForSchool");break;case"Αναπληρωτή ΕΕΠ-ΕΒΠ για ειδική προκήρυξη":r.go("substituteEEPEBPForSchool");break;case"Αναπληρωτή ΠΕ87.02 για κάλυψη θέσεων ΠΕ25 (ειδική προκήρυξη)":r.go("substitutePE8702School");break;case"Ενισχυτικής Διδασκαλίας ΣΜΕΑΕ":r.go("remediationSMEA");break;case"Ενισχυτικής Διδασκαλίας Μουσικών Σχολείων":r.go("remediationMusic");break;case"Γενική Αίτηση Απόσπασης":r.go("secondmentapplicationgeneral")}};n.changeLockedData=function(){n.personLock={};t.setPersonId(a);t.setfirstName(n.person.Firstname);t.setlastName(n.person.Lastname);t.setfatherFirstName(n.person.FatherFirstname);t.setApplicationId(f.isEmptyValue(n.person.IntendancyId)?null:n.person.IntendancyId);t.setIsPermanent(n.person.IsPermanent);var i=o.open({templateUrl:"changeLockedData.html",controller:ChangeLockedDataController});i.result.then(function(t){if(t){n.personLock.Id=t.Id;n.personLock.Lastname=t.Lastname;n.personLock.Firstname=t.Firstname;n.personLock.FatherFirstname=t.FatherFirstname;n.personLock.IntendancyId=t.IntendancyId;n.personLock.RegionAndUnitDescription=n.authentication.unitName;n.personLock.UserRole=n.authentication.role;var i=n.personLock;$("#LockedData").valid()&&f.postByParams(i,"/api/Person/UpdateLockedData").then(function(){n.person.Lastname=t.Lastname;n.person.Firstname=t.Firstname;n.person.FatherFirstname=t.FatherFirstname;n.person.IntendancyId=t.IntendancyId;f.isEmptyValue(n.person.IntendancyId)||(n.intendancyEmail=e("filter")(n.intendancies,{Id:n.person.IntendancyId},!0)[0].Email,n.intendancyString=e("filter")(n.intendancies,{Id:n.person.IntendancyId},!0)[0].Description,n.showIntendancy=2);u.pop("success","Επιτυχής αποθήκευση","Η αποθήκευση πραγματοποιήθηκε με επιτυχία!",3e3,"trustedHtml")},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε η αποθήκευση!",3e3,"trustedHtml")})}},function(){s.info("Modal dismissed at: "+new Date)})};n.openEditPersonModal=function(){if(n.changeDataRequest={},n.changeDataRequest.ChangeDataRequestItem={selected:""},n.changeDataRequest.SendDocuments={selected:""},n.changeDataRequest.Intendancy={selected:""},n.changeDataRequest.PedagCompetency={selected:""},f.isEmpty(n.changeDataList)){var t=h.all([f.getByAll("/api/ChangeDataRequest/getChangeDataRequestList"),f.getByAll("/api/ChangeDataRequest/sendDocumentsTypes")]);t.then(function(t){n.changeDataList=t[0];n.consts.sendDocumentsTypes=t[1];n.consts.sendDocumentsTypesAll=t[1];n.VisibleFields.SendDocuments=f.isEmpty(n.consts.sendDocumentsTypes)?!1:!0})}else n.VisibleFields.SendDocuments=f.isEmpty(n.consts.sendDocumentsTypes)?!1:!0;n.showIntendancyForChangeData=f.isEmptyValue(n.person.IntendancyId)?!0:!1};n.changeRequest=function(){n.changeDataRequest.ChangeDataRequestItem.selected.Id==4?(f.isEmpty(n.consts.PedagogicalCompetency)&&f.getByAll("/api/Person/getPedagogicalCompetency").then(function(t){n.consts.PedagogicalCompetency=t},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα με την εμφάνιση της λίστας με την παιδαγωγική κατάρτιση")}),n.VisibleFields={PedagCompetency:!0,Documents:!1},n.changeDataRequest.Documents=null):(n.VisibleFields={PedagCompetency:!1,Documents:!0},n.changeDataRequest.PedagCompetency={selected:""});f.isEmpty(n.consts.sendDocumentsTypes)?(n.VisibleFields.SendDocuments=!1,n.changeDataRequest.SendDocuments.selected.Id=""):n.VisibleFields.SendDocuments=!0;n.changeDataRequest.ChangeDataRequestItem.selected.Id==10||n.changeDataRequest.ChangeDataRequestItem.selected.Id==11||n.changeDataRequest.ChangeDataRequestItem.selected.Id==12||n.changeDataRequest.ChangeDataRequestItem.selected.Id==13?n.consts.sendDocumentsTypes=angular.copy(n.consts.sendDocumentsTypesAll):(n.consts.sendDocumentsTypes=e("filter")(n.consts.sendDocumentsTypesAll,function(n){return n.Id!=5}),n.changeDataRequest.SendDocuments={selected:""})};n.showChangeMessage=function(){n.showChangeMessage.ChangeDataRequestItem=f.isEmptyValue(n.changeDataRequest.ChangeDataRequestItem.selected.Id)?!0:!1;n.showChangeMessage.Description=f.isEmptyValue(n.changeDataRequest.Description)?!0:!1;n.showChangeMessage.Documents=f.isEmptyValue(n.changeDataRequest.Documents)&&!f.isEmptyValue(n.changeDataRequest.ChangeDataRequestItem.selected.Id)&&n.changeDataRequest.ChangeDataRequestItem.selected.Id!=4?!0:!1;n.showChangeMessage.PedagCompetency=f.isEmptyValue(n.changeDataRequest.PedagCompetency.selected.Id)&&!f.isEmptyValue(n.changeDataRequest.ChangeDataRequestItem.selected.Id)&&n.changeDataRequest.ChangeDataRequestItem.selected.Id==4?!0:!1;n.showChangeMessage.SendDocuments=f.isEmptyValue(n.changeDataRequest.SendDocuments.selected.Id)&&n.changeDataRequest.ChangeDataRequestItem.selected.Id!=8&&n.changeDataRequest.ChangeDataRequestItem.selected.Id!=9?!0:!1;n.showChangeMessage.Intendancy=f.isEmptyValue(n.changeDataRequest.Intendancy.selected)&&n.showIntendancyForChangeData?!0:!1};n.cancel=function(){n.changeDataRequest={};n.changeDataRequest.ChangeDataRequestItem={selected:""};n.changeDataRequest.SendDocuments={selected:""};n.changeDataRequest.PedagCompetency={selected:""};n.changeDataRequest.Intendancy={selected:""}};n.SaveChangeDataRequest=function(){if(n.showChangeMessage(),!n.showChangeMessage.ChangeDataRequestItem&&!n.showChangeMessage.Description&&!n.showChangeMessage.Documents&&!n.showChangeMessage.PedagCompetency){var t=b();t.CreatedBy=n.authentication.userName;t.CreatedUserRole=n.authentication.role;t.CreatedRegionAndUnitDescription=n.authentication.unitName;f.postByParams(t,"/api/ChangeDataRequest/save").then(function(){if(!f.isEmptyValue(n.changeDataRequest.Intendancy.selected)){n.person.IntendancyId=n.changeDataRequest.Intendancy.selected.Id;n.showIntendancy=2;n.intendancyString=e("filter")(n.intendancies,{Id:n.person.IntendancyId},!0)[0].Description;try{n.intendancyEmail=e("filter")(n.intendancies,{Id:n.person.IntendancyId},!0)[0].Email;n.intendancy.selected=e("filter")(n.intendancies,{Id:n.person.IntendancyId},!0)[0]}catch(t){s.error(t)}}$("#editPersonModal").modal("hide");n.cancel()},function(n){u.pop("error","ΠΡΟΣΟΧΗ",n.data)})}};n.showChangeDataHistory=function(){t.setPersonId=a;r.go("showChangeDataRequest")};n.showMunicipalityFields=function(){!f.isEmptyValue(n.person.HavingManyChildren)||n.person.DisabledChildren>0?n.showMunicipalityField.Field=!0:(n.person.MunicipalityNumber=null,n.geographicMunicipalities={selected:""},n.showMunicipalityField.Field=!1,n.showMunicipalityField.Message=!1)};n.showChildInfirmityFields=function(){n.person.DisabledChildren==3?(n.showChildInfirmity.Child1=!0,n.showChildInfirmity.Child2=!0,n.showChildInfirmity.Child3=!0):n.person.DisabledChildren==2?(n.showChildInfirmity.Child1=!0,n.showChildInfirmity.Child2=!0,n.showChildInfirmity.Child3=!1,n.person.KEPANumberChild3=null,n.person.SanitaryNumberChild3=null,n.person.KEPAEndDateChild3=null):(f.isEmptyValue(n.person.HavingManyChildren)||n.person.HavingManyChildren!=3)&&n.person.DisabledChildren!=1?(n.showChildInfirmity.Child1=!1,n.showChildInfirmity.Child2=!1,n.showChildInfirmity.Child3=!1,n.person.KEPANumberChild3=null,n.person.SanitaryNumberChild3=null,n.person.KEPAEndDateChild3=null,n.person.KEPANumberChild2=null,n.person.SanitaryNumberChild2=null,n.person.KEPAEndDateChild2=null,n.person.KEPANumberChild1=null,n.person.SanitaryNumberChild1=null,n.person.KEPAEndDateChild1=null,n.showDiseaseInfirmity||(n.person.OtherNumber=null)):(n.showChildInfirmity.Child1=!0,n.showChildInfirmity.Child2=!1,n.showChildInfirmity.Child3=!1,n.person.KEPANumberChild3=null,n.person.SanitaryNumberChild3=null,n.person.KEPAEndDateChild3=null,n.person.KEPANumberChild2=null,n.person.SanitaryNumberChild2=null,n.person.KEPAEndDateChild2=null);n.changedMunicipalityData=function(){n.showMunicipalityField.Message=f.isEmptyValue(n.geographicMunicipalities.selected)||f.isEmptyValue(n.person.MunicipalityNumber)?!0:!1}};n.checkKEPAFields=function(){n.showChildInfirmity.Message=n.showDiseaseInfirmity&&f.isEmptyValue(n.person.KEPANumber)&&f.isEmptyValue(n.person.SanitaryNumber)&&f.isEmptyValue(n.person.OtherNumber)?!0:n.showChildInfirmity.Child1&&f.isEmptyValue(n.person.KEPANumberChild1)&&f.isEmptyValue(n.person.SanitaryNumberChild1)&&f.isEmptyValue(n.person.OtherNumber)?!0:n.showChildInfirmity.Child2&&f.isEmptyValue(n.person.KEPANumberChild2)&&f.isEmptyValue(n.person.SanitaryNumberChild2)&&f.isEmptyValue(n.person.OtherNumber)?!0:n.showChildInfirmity.Child3&&f.isEmptyValue(n.person.KEPANumberChild3)&&f.isEmptyValue(n.person.SanitaryNumberChild3)&&f.isEmptyValue(n.person.OtherNumber)?!0:!1};n.onFileSelect=function(t,i){var u,r;for(n.messages[i-1]={completed:"",percentage:"0",error:""},n.showAlertForUploadCV=!1,u=0;u<t.length;u++){if(r=t[u],r.type!="application/pdf"){n.messages[i-1].error='Μη έγκυρη επέκταση αρχείου "'+r.name+'". Οι επεκτάσεις που υποστηρίζονται είναι: "<b> pdf<\/b>" .';return}if(r.size>=2097152){n.messages[i-1].error='Το αρχείο "'+r.name+'" (<b>'+Math.round(r.size/1024)+" KB<\/b>) υπερβαίνει το μέγιστο επιτρεπόμενο μέγεθος μεταφόρτωσης <b>2000 KB<\/b>.";return}n.SendDataForPersonDto[i-1].CertificateType=i,function(t){n.upload[t]=l.upload({url:"/api/files/uploadPerson",method:"POST",data:{SendDataForPersonDto:n.SendDataForPersonDto[i-1]},file:r}).progress(function(t){n.messages[i-1].percentage=parseInt(100*t.loaded/t.total)}).then(function(t){n.messages[i-1].completed="Το αρχείο <b>"+r.name+"<\/b> μεταφορτώθηκε με επιτυχία.";n.SendDataForPersonDto[i-1].Id=t.data.personFile.Id;n.SendDataForPersonFullDto[i-1]=t.data.personFile;n.uploadedFileDetails[i-1].message="";n.showUpload.PedagogicalEducationUpload=!1;n.DisableOrVisibleUploadFields[i-1].ShowDownloadField=!1}).catch(function(t){n.messages.error=t.data.Message})}(u)}};n.abortUpload=function(t){n.upload[t].abort()};n.downloadFile=function(t){f.getByParamsDownload({PersonId:a,Path:n.SendDataForPersonFullDto[t-1].DirectPdfLink,ContentType:n.SendDataForPersonFullDto[t-1].ContentType},"/api/files/downloadFolder").then(function(i){var w=i.status,s=i.headers,h=i.data,y="application/octet-stream",r=!1,c,l,p,e,f,v,u,o;s=s();c=n.SendDataForPersonFullDto[t-1].FileName||"download.pdf";l=s["content-type"]||y;try{if(u=new Blob([h],{type:l}),navigator.msSaveBlob)navigator.msSaveBlob(u,c);else if(p=navigator.webkitSaveBlob||navigator.mozSaveBlob||navigator.saveBlob,p===undefined)throw"Not supported";r=!0}catch(a){console.log("saveBlob method failed with the following exception:");console.log(a)}if(!r&&(e=window.URL||window.webkitURL||window.mozURL||window.msURL,e)){if(f=document.createElement("a"),"download"in f)try{console.log("Trying download link method with simulated click ...");u=new Blob([h],{type:l});o=e.createObjectURL(u);f.setAttribute("href",o);f.setAttribute("download",c);v=document.createEvent("MouseEvents");v.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null);f.dispatchEvent(v);r=!0}catch(a){console.log("Download link method with simulated click failed with the following exception:");console.log(a)}if(!r)try{console.log("Trying download link method with window.location ...");u=new Blob([h],{type:y});o=e.createObjectURL(u);window.location=o;console.log("Download link method with window.location succeeded");r=!0}catch(a){console.log("Download link method with window.location failed with the following exception:");console.log(a)}}r||(console.log("No methods worked for saving the arraybuffer, using last resort window.open"),window.open(httpPath,"_blank",""))},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Υπήρξε πρόβλημα κατά την φόρτωση των προσωικών στοιχείων")})}};editPerson.$inject=["$scope","PassParameters","$state","toaster","GeneralFactory","$filter","$uibModal","$log","$q","$timeout","$upload"];EditPersonConfirmation=function(n,t,i,r,u,f,e,o,s,h,c){function v(){n.disableConfirmationId="disabled";n.disabledDiploma="disabled";n.disabledSpeciality="disabled"}function y(){n.disableConfirmationId="disabled";n.disabledSpeciality="disabled";n.disabledMusicSpecialistId="disabled"}function p(){n.disableConfirmationId="disabled"}function w(){n.disableConfirmationId="disabled"}function b(){n.disableConfirmationId="disabled";n.disabledLanguage="disabled"}function k(){n.disableConfirmationId="disabled"}function a(){n.disableConfirmationId="";n.disabledSpeciality="";n.disabledMusicSpecialistId="";n.disabledDiploma=""}n.authentication.isAuth||i.go("/");var l=t.getPersonId();n.perconfirmation={Person:null,Speciality:null,MusicSpecialist:null,Certificate:null,PersonSeminar:null,AcademicDiploma:null};n.Language={CertificateId:""};n.Seminar={Id:""};n.Diploma={DiplomaId:""};n.AcademicDiploma={Id:""};n.specialityList={};n.languageList={};n.seminarList={};n.academicDiplomaList={};n.ConfirmationList={};n.AllList={};n.ConfirmationListForHtml={};n.diplomaList={};n.EnumList={};n.musicSpecialistList={};n.showSpeciality=!1;n.showLanguage=!1;n.showSeminar=!1;n.showMusicSpecialist=!1;n.showDetailsConfirmation=!1;n.showDiploma=!1;n.showAcademicDiploma=!1;n.labelButton="Υποβολή ελέγχου πιστοποιητικού";n.perconfirmation.PersonId=l;n.dtInstance={};n.perconfirmationList={};n.DetailEnumList={};n.ListOfConfirmedId=[7,8];n.disableEnumList="disabled";n.showExportTable=!1;n.filterRow={visible:!0,applyFilter:"auto"};n.headerFilter={visible:!0};n.showColumnLines=!0;n.showRowLines=!0;n.showBorders=!0;n.rowAlternationEnabled=!0;n.gridOptions={bindingOptions:{dataSource:"exports",filterRow:"filterRow",headerFilter:"headerFilter",showColumnLines:"showColumnLines",showRowLines:"showRowLines",showBorders:"showBorders",rowAlternationEnabled:"rowAlternationEnabled",columns:"columns"},allowColumnReordering:!0,allowColumnResizing:!0,columnAutoWidth:!0,columnFixing:{enabled:!0},searchPanel:{visible:!0,width:240,placeholder:"Αναζήτηση..."},selection:{mode:"multiple"},columnChooser:{enabled:!0},"export":{enabled:!0,fileName:"Results",allowExportSelectedData:!0},groupPanel:{visible:!0},paging:{pageSize:10},pager:{showPageSizeSelector:!0,allowedPageSizes:[10,20,50,100],showInfo:!0}};h.getPersonAttributesForMenu(l).then(function(t){n.personAttributesForMenu=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Υπήρξε πρόβλημα κατά την φόρτωση του μενού")});u.getByParams({Id:l},"/api/Person/GetPersonDto").then(function(t){n.person=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των προσωπικών στοιχείων.")});u.getByParams({personId:l},"/api/personConfirmation/getConfirmationListForPerson").then(function(t){n.confirmations=t;n.ConfirmationList=t.ConfirmationList;n.ConfirmationDescription=t.ConfirmationDescription;n.AllList=t.AllList;n.EnumList=t.EnumList},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των στοιχείων ελέγχου.")});u.getByParams({personId:l},"/api/personConfirmation/getPersonConfirmationList").then(function(t){n.perconfirmationList=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των προσωπικών στοιχείων.")});n.actionsForPerson=function(f){t.setPersonId(l);switch(f){case"Αναπληρωτή":i.go("substitute");break;case"Ωρομισθίου":i.go("hourlyteacher");break;case"Αναπληρωτή ΣΜΕΑΕ":i.go("substitutesmea");break;case"Ωρομισθίου ΣΜΕΑΕ":i.go("hourlyteachersmea");break;case"Αναπληρωτή σε Μουσικά Σχολεία":i.go("substitutemusic");break;case"Ωρομισθίου σε Μουσικά Σχολεία":i.go("hourlyteachermusic");break;case"Απόσπασης":i.go("secondmentapplicationpyspdechurch");break;case"Απόσπασης ΣΜΕΑΕ":i.go("secondmentapplicationpyspdesmea");break;case"Απόσπασης ΕΕΠ - ΕΒΠ":i.go("secondmentapplicationeepebp");break;case"Απόσπασης σε Φορέα":i.go("secondmentapplicationbody");break;case"Απόσπασης σε Καλλιτεχνικά Σχολεία":i.go("secondmentapplicationartistic");break;case"Απόσπασης σε Μουσικά Σχολεία":i.go("secondmentapplicationmusic");break;case"Ιστορικό Αιτήσεων":i.go("history");break;case"Έλεγχος Γνησιότητας":i.go("confirmation");break;case"Παρατηρήσεις":i.go("comments");break;case"Βεβαίωση Προϋπηρεσίας":blockUI({target:"#blockui_loading",animate:!0});c(function(){u.getByParams({personId:l,regionAndUnitId:n.authentication.regionAndUnitId,role:n.authentication.role},"/api/Pdf/getPreviousExperienceCertificate").then(function(n){var i=new Date,t={},u;t=n;u=t;pdfMake.createPdf(t).download("export_"+Date.parse(i)+".pdf");unblockUI("#blockui_loading");r.pop("success","Εξαγωγή σε PDF","Το αρχείο export_"+Date.parse(i)+".pdf δημιουργήθηκε με επιτυχία.")},function(){unblockUI("#blockui_loading");r.pop("error","Παρουσιάστηκε σφάλμα","Η αίτηση δεν μπορεί να εκτυπωθεί.")})},1e3);break;case"Αίτηση Απόσπασης κλάδου Πληροφορικής σε Φορέα":i.go("secondmentapplicationbody1920");break;case"Απόσπασης για Θέση Συντονιστή Εκπαίδευσης Προσφύγων":i.go("secondmentapplicationbodyref");break;case"Ενισχυτικής Διδασκαλίας":i.go("remediation");break;case"Απόσπασης σε Εκκλησιαστικά Σχολεία":i.go("secondmentchurch");break;case"Απόσπασης σε Σχολείο Ευρωπαϊκής Παιδείας":i.go("secondmentapplicationbodysep");break;case"Περιφερειακοί Διευθυντές Εκπαίδευσης":i.go("prefecture");break;case"Διευθυντές Εκπαίδευσης":i.go("intendancy");break;case"Απόσπασης στη Διεύθυνση Τεχνικών Υπηρεσίων της Γεν. Γραμματείας του Υ.ΠΑΙ.Θ.Α.":i.go("secondmentapplicationbodytechnical");break;case"Ωρομισθίου σε Μουσικά Σχολεία  για κλάδο ΕΜ16.00":i.go("hourlyteachermusicforEM16");break;case"Αναπληρωτή για δια ζώσης διδασκαλία με 3μηνη σύμβαση":i.go("substitute3months");break;case"Γενική Αίτηση Απόσπασης":i.go("secondmentapplicationgeneral")}};n.Export=function(){n.exports=[];u.getByParams({personId:l},"api/personConfirmation/getPersonConfirmationExport").then(function(t){n.columns=[{dataField:"ConfirmationDescription",caption:"Πιστοποιητικό"},{dataField:"PersonEnum.DisplayName",caption:"Λεπτομέρειες Πιστοποιητικού"},{dataField:"SpecialityCode",caption:"Κλάδος"},{dataField:"MusicSpecialistDescription",caption:"Μουσική ειδίκευση"},{dataField:"ProtocolNumber",caption:"Πρωτόκολλο Ελεγχόμενου Εγγράφου",width:200},{dataField:"PublicationDate",caption:"Ημ/νία Έκδοσης Ελεγχόμενου Εγγράφου",dataType:"date",format:"dd/MM/yyyy"},{dataField:"Authority",caption:"Εκδούσα Αρχή Ελεγχόμενου Εγγράφου",width:200},{dataField:"ValidityDate",caption:"Τελική Ημ/νία Ισχύος Εγγράφου",dataType:"date",format:"dd/MM/yyyy"},{dataField:"AnsweredProtocolNumber",caption:"Πρωτόκολλο Απαντητικού Εγγράφου",width:200},{dataField:"AnsweredPublicationDate",caption:"Ημ/νία Έκδοσης Απαντητικού Εγγράφου",dataType:"date",format:"dd/MM/yyyy"},{dataField:"AnsweredAuthority",caption:"Εκδούσα Αρχή Απαντητικού Εγγράφου",width:200},{dataField:"Description",caption:"Περιγραφή Εγγράφου"}];n.exports=t;n.showExportTable=!0},function(n){r.pop("warning","Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.ExportPdf=function(){blockUI({target:"#blockui_loading",animate:!0});c(function(){u.getByParams({personId:l},"/api/Pdf/getPersonConfirmationPdf").then(function(n){var i=new Date,t={},u;t=n;u=t;pdfMake.createPdf(t).download("export_"+Date.parse(i)+".pdf");unblockUI("#blockui_loading");r.pop("success","Εξαγωγή σε PDF","Το αρχείο export_"+Date.parse(i)+".pdf δημιουργήθηκε με επιτυχία.")},function(){unblockUI("#blockui_loading");r.pop("error","Παρουσιάστηκε σφάλμα","Η αίτηση δεν μπορεί να εκτυπωθεί.")})},1e3)};n.visible=!1;n.toggle=function(){n.visible=!n.visible;n.showExportTable=!1;n.ConfirmationListForHtml=typeof n.perconfirmation.Id!="undefined"&&n.perconfirmation.Id>0?n.AllList:n.ConfirmationList};n.return=function(){n.toggle();i.go("confirmation");l!=null&&(n.perconfirmation={},n.perconfirmation.PersonId=l,n.DetailEnumList={});a();n.showSpeciality=!1;n.showMusicSpecialist=!1;n.showDetailsConfirmation=!1;n.showLanguage=!1;n.showSeminar=!1;n.showDiploma=!1;n.showAcademicDiploma=!1};n.changedConfirmation=function(){if(n.showSpeciality=!1,n.showMusicSpecialist=!1,n.showDetailsConfirmation=!1,n.showSeminar=!1,n.showLanguage=!1,n.showDiploma=!1,n.showAcademicDiploma=!1,n.perconfirmation.ConfirmationList.Id==1?(u.isEmptyValue(n.perconfirmation.Speciality)||(n.showSpeciality=!0,n.specialityList=n.confirmations.Speciality1),u.isEmptyValue(n.perconfirmation.Diploma||!u.isEmptyValue(n.confirmations.Diploma))||(n.diplomaList=n.confirmations.Diploma,n.showDiploma=!0)):n.perconfirmation.ConfirmationList.Id==2?(n.specialityList=n.confirmations.MusicSpeciality,n.showSpeciality=!0):n.perconfirmation.ConfirmationList.Id==4?u.isEmptyValue(n.perconfirmation.Speciality)?(n.diplomaList=n.confirmations.DiplomaAbroad,n.showDiploma=!0):(n.specialityList=n.confirmations.SpecialityAbroad,n.showSpeciality=!0):n.perconfirmation.ConfirmationList.Id==25?(n.languageList=n.confirmations.PersonLanguage,n.showLanguage=!0):n.perconfirmation.ConfirmationList.Id==14||n.perconfirmation.ConfirmationList.Id==15?(n.academicDiplomaList=n.perconfirmation.ConfirmationList.Id==14?f("filter")(n.confirmations.AcademicDiploma,{AcademicQualificationId:12},!0):f("filter")(n.confirmations.AcademicDiploma,{AcademicQualificationId:13},!0),n.showAcademicDiploma=!0):n.perconfirmation.ConfirmationList.Id==26?(n.seminarList=n.confirmations.PersonSeminar,n.showSeminar=!0):n.perconfirmation.ConfirmationList.Id==27&&(typeof n.perconfirmation.Id=="undefined"||n.perconfirmation.Id<=0)&&(n.perconfirmation.Description=f("filter")(n.ConfirmationDescription,{ConfirmationId:27},!0)[0].Description),n.ListOfConfirmedId.indexOf(n.perconfirmation.ConfirmationList.Id)>-1)n.showDetailsConfirmation=!0,(typeof n.perconfirmation.Id=="undefined"||n.perconfirmation.Id<=0)&&(n.DetailEnumList=f("filter")(n.EnumList,{confirmationId:n.perconfirmation.ConfirmationList.Id},!0)[0])};n.changedSpeciality=function(){n.showMusicSpecialist=!1;n.perconfirmation.ConfirmationList.Id==2&&(n.specialityList=n.confirmations.MusicSpeciality,n.musicSpecialistList=n.confirmations.MusicSpecialistPerSpeciality,n.musicSpecialistList=f("filter")(n.musicSpecialistList,{SpecialityId:n.perconfirmation.Speciality.Id},!0),n.musicSpecialist=[],angular.forEach(n.musicSpecialistList,function(t){n.musicSpecialist.push(t.MusicSpecialist)}),n.perconfirmation.Speciality.Id>0&&(n.showMusicSpecialist=!0))};n.changedDiploma=function(){n.perconfirmation.ConfirmationList.Id==1?n.diplomaList=n.confirmations.Diploma:n.perconfirmation.ConfirmationList.Id==4&&(n.diplomaList=n.confirmations.DiplomaAbroad,(typeof n.perconfirmation.Id=="undefined"||n.perconfirmation.Id<=0)&&(n.perconfirmation.Description=f("filter")(n.ConfirmationDescription,{ConfirmationId:4,DiplomaId:n.Diploma.DiplomaId,MusicSpecialistId:0},!0)[0].Description))};n.changedLanguage=function(){n.perconfirmation.ConfirmationList.Id==25&&(n.languageList=n.confirmations.PersonLanguage,(typeof n.perconfirmation.Id=="undefined"||n.perconfirmation.Id<=0)&&(n.perconfirmation.Description=f("filter")(n.ConfirmationDescription,{ConfirmationId:25,CertificateId:n.Language.CertificateId},!0)[0].Description))};n.changedSeminar=function(){n.perconfirmation.ConfirmationList.Id==26&&(n.seminarList=n.confirmations.PersonSeminar,(typeof n.perconfirmation.Id=="undefined"||n.perconfirmation.Id<=0)&&(n.perconfirmation.Description=f("filter")(n.ConfirmationDescription,{ConfirmationId:26,SeminarId:n.Seminar.Id},!0)[0].Description))};n.changedAcademicDiploma=function(){(n.perconfirmation.ConfirmationList.Id==14||n.perconfirmation.ConfirmationList.Id==15)&&(typeof n.perconfirmation.Id=="undefined"||n.perconfirmation.Id<=0)&&(n.perconfirmation.Description=f("filter")(n.ConfirmationDescription,{ConfirmationId:n.perconfirmation.ConfirmationList.Id,AcademinDiplomaId:n.AcademinDiploma.Id},!0)[0].Description)};n.changedMusicSpecialist=function(){n.perconfirmation.ConfirmationList.Id==2&&(typeof n.perconfirmation.Id=="undefined"||n.perconfirmation.Id<=0)&&(n.perconfirmation.Description=f("filter")(n.ConfirmationDescription,{ConfirmationId:2,SpecialityId:n.perconfirmation.Speciality.Id,MusicSpecialistId:n.perconfirmation.MusicSpecialist.Id},!0)[0].Description)};n.chechForInsertUpdate=function(){n.canInsertUpdate=!0;n.perconfirmation.ConfirmationList!=null?(n.perconfirmation.ConfirmationList.Id==1||n.perconfirmation.ConfirmationList.Id==4)&&u.isEmptyValue(n.Diploma.DiplomaId)&&n.perconfirmation.Speciality==null?n.canInsertUpdate=!1:n.perconfirmation.ConfirmationList.Id==25&&u.isEmptyValue(n.Language.CertificateId)?n.canInsertUpdate=!1:n.perconfirmation.ConfirmationList.Id==26&&u.isEmptyValue(n.Seminar.Id)?n.canInsertUpdate=!1:(n.perconfirmation.ConfirmationList.Id==14||n.perconfirmation.ConfirmationList.Id==15)&&u.isEmptyValue(n.AcademicDiploma.Id)&&(n.canInsertUpdate=!1):n.canInsertUpdate=!1};n.saveAction=function(){var t,i;n.chechForInsertUpdate();n.canInsertUpdate?(n.perconfirmation.ConfirmationId=n.perconfirmation.ConfirmationList.Id,n.perconfirmation.SpecialityId=n.perconfirmation.Speciality!=null?n.perconfirmation.Speciality.Id:null,n.perconfirmation.MusicSpecialistId=n.perconfirmation.MusicSpecialist!=null?n.perconfirmation.MusicSpecialist.Id:null,n.perconfirmation.IsActive=!0,n.perconfirmation.CertificateId=n.Language!=null&&n.perconfirmation.ConfirmationId==25?n.Language.CertificateId:null,n.perconfirmation.DiplomaId=n.Diploma!=null&&(n.perconfirmation.ConfirmationId==1||n.perconfirmation.ConfirmationId==4)?n.Diploma.DiplomaId:null,n.perconfirmation.PersonSeminarId=n.Seminar!=null&&n.perconfirmation.ConfirmationId==26?n.Seminar.Id:null,n.perconfirmation.SeminarId=n.Seminar!=null&&n.perconfirmation.ConfirmationId==26?n.Seminar.SeminarId:null,n.perconfirmation.AcademicDiplomaId=n.AcademicDiploma!=null&&(n.perconfirmation.ConfirmationId==14||n.perconfirmation.ConfirmationId==15)?n.AcademicDiploma.Id:null,typeof n.perconfirmation.Id!="undefined"&&n.perconfirmation.Id>0?(n.perconfirmation.ModifiedBy=n.authentication.userName,t={PersonConfirmation:n.perconfirmation,PersonEnum:n.DetailEnumList,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName},i=t,u.postByParams(i,"api/personConfirmation/updatePerConfirmation").then(function(){u.getByParams({personId:l},"/api/personConfirmation/getPersonConfirmationList").then(function(t){n.perconfirmationList=t;n.return()},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των πιστοποιητικών που έχουν ελεγχθεί.")});a()},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την ενημέρωση των στοιχείων")})):(n.perconfirmation.CreatedBy=n.authentication.userName,n.perconfirmation.RegionAndUnitId=n.authentication.regionAndUnitId,u.isEmptyValue(n.DetailEnumList)&&(n.DetailEnumList={}),t={PersonConfirmation:n.perconfirmation,PersonEnum:n.DetailEnumList,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName},i=t,u.postByParams(i,"api/personConfirmation/insertPerConfirmation").then(function(){u.getByParams({personId:l},"/api/personConfirmation/getPersonConfirmationList").then(function(t){n.perconfirmationList=t;n.return()},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των πιστοποιητικών που έχουν ελεγχθεί.")})},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την εισαγωγή των στοιχείων")}))):r.pop("error","Παρουσιάστηκε σφάλμα","Παρακαλώ συμπληρώστε όλα τα υποχρεωτικά πεδία.")};n.edit=function(t){n.labelButton="Ενημέρωση";n.Language={CertificateId:""};n.Seminar={Id:""};n.Diploma={DiplomaId:""};n.AcademicDiploma={Id:""};u.getByParams({Id:t},"/api/personConfirmation/getPersonConfirmationById").then(function(t){n.perconfirmation=t.PersonConfirmation;n.Language=f("filter")(n.confirmations.PersonLanguage,{CertificateId:n.perconfirmation.CertificateId},!0)[0];n.Seminar=f("filter")(n.confirmations.PersonSeminar,{Id:n.perconfirmation.PersonSeminarId},!0)[0];n.Diploma=f("filter")(n.confirmations.Diploma,{DiplomaId:n.perconfirmation.DiplomaId},!0)[0];n.AcademicDiploma=f("filter")(n.confirmations.AcademicDiploma,{Id:n.perconfirmation.AcademicDiplomaId},!0)[0];u.isEmptyValue(n.Diploma)&&(n.Diploma={DiplomaId:""});n.DetailEnumList=t.PersonEnum;n.changedConfirmation();n.changedSpeciality();n.changedDiploma();n.changedMusicSpecialist();n.changedLanguage();n.changedSeminar();n.changedAcademicDiploma();n.perconfirmation.ConfirmationList.Id==1||n.perconfirmation.ConfirmationList.Id==4?v():n.perconfirmation.ConfirmationList.Id==2&&y();n.perconfirmation.ConfirmationList.Id==14||n.perconfirmation.ConfirmationList.Id==15?w():n.perconfirmation.ConfirmationList.Id==26?p():n.perconfirmation.ConfirmationList.Id==25?b():k();n.toggle()},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των προσωπικών στοιχείων.")})};n.delPerConfirmation;n.openModal=function(t){n.delPerConfirmation=t};n.delPerConfirm=function(t){var i={Id:t.Id,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName};u.postByParams(i,"api/personConfirmation/deletePerConfirmation").then(function(){u.getByParams({personId:l},"/api/personConfirmation/getPersonConfirmationList").then(function(t){n.perconfirmationList=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των πιστοποιητικών που έχουν ελεγχθεί.")});r.pop("success","Η αλλαγή τροποποιήθηκε με επιτυχία","Το πιστοποποητικό διαγράφηκε")},function(){r.pop("error","Παρουσιάστηκε σφάλμα",response)})};n.minDate="01/01/1900";n.formats=["dd/MM/yyyy"];n.format=n.formats[0];n.today=function(){};n.today();n.clear=function(){n.dt=null};n.disabled=function(n,t){return t==="day"&&(n.getDay()===0||n.getDay()===6)};n.toggleMin=function(){n.minDate=n.minDate?null:new Date};n.toggleMin();n.open=function(t,i){t.preventDefault();t.stopPropagation();n[i]=!0};n.dateOptions={formatYear:"yy",startingDay:1}};EditPersonConfirmation.$inject=["$scope","PassParameters","$state","toaster","GeneralFactory","$filter","DTOptionsBuilder","DTColumnBuilder","$q","LandingPageFactory","$timeout"];editSpecialEducation=function(n,t,i,r,u){function o(t){u.getByParams({Id:t},"/api/PersonSpeciality/getSpecialSpecialitiesDetailsByPersonId").then(function(t){n.specialspecialities=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}var f,e;n.authentication.isAuth||i.go("/");f=t.getPersonId();u.isValueInArray(u.getRoleCode(n.authentication.role),"u1, u2")&&(f=n.authentication.personId);e=t.getHasMusicSpeciality();n.consts={};f!=null&&f!=""&&f!="undefined"&&(n.person={},u.getByParams({Id:f},"/api/Person/getPerson").then(function(t){n.person=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")}),o(f));n.saveAction=function(n){$("#editSpecialEducationForm").valid()&&typeof n.Id!="undefined"&&n.Id>0&&u.postByParams(params,"/api/Person/update").then(function(){i.go("stateEditSpecialEducation")},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.checkForMusic=function(){return e==1?!0:!1};n.showPsysicalSpecial=function(){var t=0;return angular.forEach(n.specialspecialities,function(n){n.Speciality.Code=="ΠΕ11.ΕΑΕ"&&(t=1)}),t==1?!0:!1};n.minDate="01/01/1900";n.formats=["dd/MM/yyyy"];n.format=n.formats[0];n.today=function(){};n.today();n.clear=function(){n.dt=null};n.disabled=function(n,t){return t==="day"&&(n.getDay()===0||n.getDay()===6)};n.toggleMin=function(){n.minDate=n.minDate?null:new Date};n.toggleMin();n.open=function(t,i){t.preventDefault();t.stopPropagation();n[i]=!0};n.dateOptions={formatYear:"yy",startingDay:1}};editSpecialEducation.$inject=["$scope","PassParameters","$state","toaster","GeneralFactory"];editSpeciality=function(n,t,i,r,u,f,e){function c(t){f.getByParams({Id:t},"/api/PersonSpeciality/getPersonSpecialitiesByPersonId").then(function(t){n.specialities=t;n.GetSpecialitiesWithSpecialists()},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function w(){f.getByAll("/api/Speciality/getSpecialities").then(function(t){n.speciality=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function v(){n.disabledimplomaSourceType="";n.disablecountry="";n.disablediplomaAbroad="";n.disableequivalenceType="";n.disablediplomaDate="";n.disablediplomaDegree=""}function y(){n.disablediplomaDate="disabled";n.disabledimplomaSourceType="disabled";n.disablediplomaDegree="disabled"}function p(){n.disabledimplomaSourceType="disabled";n.disablecountry="disabled";n.disablediplomaAbroad="disabled";n.disableequivalenceType="disabled"}function l(){n.perspeciality.DimplomaSource>0&&n.perspeciality.Speciality1!=null&&n.perspeciality.Country!=null&&f.getByParams({specialityId:n.perspeciality.Speciality1.Id,countryId:n.perspeciality.Country.Id,sourceType:n.perspeciality.DimplomaSource,diplomaDate:n.perspeciality.DiplomaDate},"/api/Diploma/getEquivalenceTypes").then(function(t){n.consts.equivalenceType=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function b(){f.getByAll("/api/PersonSpeciality/getDimplomaSourceTypes").then(function(t){n.consts.dimplomaSourceType=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function k(){f.getByAll("/api/PersonSpeciality/getWorkExperienceTypes").then(function(t){n.consts.workExperienceType=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function d(){f.getByAll("/api/Diploma/getMusicEquivalenceTypes").then(function(t){n.consts.musicequivalenceType=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function g(){if(n.perspeciality.Speciality1.Code=="ΕΜ16.00"&&(n.perspeciality.Speciality1=n.perspeciality.Speciality1,n.perspeciality.SpecialityId=n.perspeciality.Speciality1.Id,n.perspeciality.DiplomaId=null,n.perspeciality.Diploma=null,n.perspeciality.Country=null),n.perspeciality.DimplomaSource=="1")n.perspeciality.SpecialityId=n.perspeciality.Speciality1.Id,n.perspeciality.DiplomaId=n.perspeciality.Diploma.Id,n.perspeciality.Diploma.Country=n.perspeciality.Country,n.perspeciality.Diploma.CountryId=n.perspeciality.Diploma.Country.Id,n.perspeciality.DiplomaAbroad=null;else if(n.perspeciality.DimplomaSource=="2"||n.perspeciality.DimplomaSource=="3"){for(var t=0;t<n.diplomas.length;t+=1)if(s=n.diplomas[t],n.perspeciality.Speciality1.Code!="ΠΕ18.38"&&s.Description===n.DiplomaAbroad.Description){a=1;n.perspeciality.Diploma=s;n.perspeciality.Diploma.Id=s.Id;n.perspeciality.SpecialityId=n.perspeciality.Speciality1.Id;n.perspeciality.DiplomaId=n.perspeciality.Diploma.Id;n.perspeciality.Diploma.Country=n.perspeciality.Country;n.perspeciality.Diploma.CountryId=n.perspeciality.Country.Id;n.perspeciality.Country=null;n.perspeciality.DiplomaAbroad=null;break}a==0&&n.perspeciality.Speciality1.Code!="ΠΕ18.38"&&(n.perspeciality.DiplomaAbroad={Id:0,Description:"",CountryId:0},n.perspeciality.SpecialityId=n.perspeciality.Speciality1.Id,n.perspeciality.DiplomaAbroad.Id=0,n.perspeciality.DiplomaAbroad.Description=n.DiplomaAbroad,n.perspeciality.DiplomaAbroad.CountryId=n.perspeciality.Country.Id,n.perspeciality.Diploma=null)}}var h,o;n.pageRules={};n.authentication.isAuth?(h="spec",f.getByParams({role:n.authentication.role,codes:h},"/api/Subsystem/NewCheckPermission").then(function(t){var i=h.split(",");for(var r in i)n.pageRules[i[r]]=e("filter")(t,{Code:i[r]},!0)[0].Rules},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})):i.go("/");n.IsDisabled=!1;n.return=function(){n.toggle();i.go("stateEditSpeciality");n.perspeciality={};o!=null&&(n.perspeciality.PersonId=o,n.perspeciality.DiplomaAbroad={Id:0,Description:"",CountryId:0},n.DiplomaAbroad=null)};n.minDate="1950 - 06 - 22";o=t.getPersonId();f.isValueInArray(f.getRoleCode(n.authentication.role),"u1, u2")&&(o=n.authentication.personId);n.consts={};n.diplomas=[];n.Speciality1=[];n.hasMusicSpeciality=!1;n.hasSpecialEducation=!1;n.canInsertUpdate=!0;var s={},a=0;n.DiplomaAbroad={Id:0,Description:"",CountryId:0};n.SpecialitiesWithSpecialists=[];n.alerts=[{type:"danger",msg:"Έχετε εισάγει τον μέγιστο αριθμό κλάδων."}];n.labelButton="Προσθήκη Κλάδου";n.btnClass="success";o!=null&&(n.specialities={},n.perspeciality={},n.perspeciality.PersonId=o,n.perspeciality.DiplomaAbroad={Id:0,Description:"",CountryId:0},c(o));n.GetSpecialitiesWithSpecialists=function(){f.getByParams({id:n.perspeciality.PersonId},"api/PersonSpeciality/getSpecialitiesPerSpecialists").then(function(t){n.SpecialitiesWithSpecialists=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.checkDisabled=function(t,i){return t||n.SpecialitiesWithSpecialists!=null&&n.SpecialitiesWithSpecialists!="undefined"&&n.SpecialitiesWithSpecialists.indexOf(i)>-1?!0:!1};b();k();d();n.checkForMusic=function(){var i=0;return angular.forEach(n.specialities,function(n){n.Speciality1.IsMusic==!0&&(i=1)}),i==1?(t.setHasMusicSpeciality(i),!0):!1};n.checkForSpecialEducation=function(){var i=0;return angular.forEach(n.specialities,function(n){n.Speciality!=null&&n.Speciality.IsSpecialEducation==!0&&(i=1)}),i==1?(t.setHasSpecialEducation(i),!0):(t.setHasSpecialEducation(0),!1)};n.changedDiplomaSource=function(){f.getByParams({diplomaType:n.perspeciality.DimplomaSource},"/api/Country/getCountriesByDimplomaSourceTypes").then(function(t){n.countries=t;n.perspeciality.DimplomaSource==1&&(n.perspeciality.Country=n.countries[0]);n.changedCountry()},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});l()};n.showCountry=function(){return n.perspeciality.DimplomaSource>0?!0:!1};n.showDiploma=function(){return n.diplomas.length>0&&n.perspeciality.DimplomaSource==1?!0:!1};n.showWorkExperience=function(){return n.perspeciality.Speciality1!=null&&n.perspeciality.Speciality1.Code.indexOf("ΔΕ01")==0?!0:(n.perspeciality.WorkExperience=null,!1)};n.showExperienceDetails=function(){return n.perspeciality.WorkExperience=="2"?!0:(n.perspeciality.MonthExperience=null,n.perspeciality.DayExperience=null,!1)};n.showMusicEquivalence=function(){return n.perspeciality.EquivalenceType==14&&n.perspeciality.Speciality1.Code=="ΠΕ16.01"?!0:!1};n.showDiplomaDetails=function(){return n.perspeciality.Speciality1!=null&&n.perspeciality.DimplomaSource=="1"&&(n.perspeciality.Speciality1.Code=="ΠΕ19"||n.perspeciality.Speciality1.Code=="ΠΕ20"||n.perspeciality.Speciality1.Code=="ΠΕ32"||n.perspeciality.Speciality1.Code=="ΠΕ03"||n.perspeciality.Speciality1.Code=="ΠΕ04.01"||n.perspeciality.Speciality1.Code=="ΠΕ16.01")?!0:!1};n.showsimulation=function(){if(n.perspeciality.DimplomaSource=="1")return n.perspeciality.Speciality1!=null&&(n.perspeciality.Speciality1.Code=="ΠΕ60"||n.perspeciality.Speciality1.Code=="ΠΕ70")&&n.perspeciality.Diploma!=null&&n.perspeciality.Diploma.Description.indexOf("2ΕΤΟΥΣ")>0?!0:n.perspeciality.Speciality1!=null&&(n.perspeciality.Speciality1.Code=="ΠΕ60"||n.perspeciality.Speciality1.Code=="ΠΕ70")&&n.perspeciality.Diploma!=null&&(n.perspeciality.Diploma.Description.indexOf("ΒΕΛΛΑΣ")>0||n.perspeciality.Diploma.Description.indexOf("ΕΚΚΛ")>0)?!0:(n.perspeciality.DateofSimulation=null,n.perspeciality.SimulationDegree=null,!1)};n.showDiplomaAbroad=function(){return n.perspeciality.DimplomaSource==2||n.perspeciality.DimplomaSource==3?!0:!1};n.showSpecialEducation=function(){return n.perspeciality.Speciality1!=null&&n.perspeciality.Speciality1.Code!="ΕΜ16.00"?!0:!1};n.changedCountry=function(){n.perspeciality.DimplomaSource>0&&n.perspeciality.Speciality1!=null&&n.perspeciality.Speciality1.Id>0&&(f.getByParams({specialityId:n.perspeciality.Speciality1.Id,countryId:n.perspeciality.Country.Id},"/api/Diploma/getDiplomasBySpecAndCountry").then(function(t){n.diplomas=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),l())};n.showreStudy=function(){return n.perspeciality.Speciality1!=null&&n.perspeciality.DimplomaSource=="2"&&(n.perspeciality.Speciality1.Code=="ΠΕ60"||n.perspeciality.Speciality1.Code=="ΠΕ70"||n.perspeciality.Speciality1.Code=="ΠΕ61"||n.perspeciality.Speciality1.Code=="ΠΕ71")?!0:(n.perspeciality.ReStudy=!1,n.perspeciality.DateofReStudy=null,!1)};n.changedSpeciality=function(){if(n.perspeciality.EquivalenceType=null,n.perspeciality.MusicEquivalenceType=null,n.perspeciality.PD130Simulation=!1,n.perspeciality.ReStudy=!1,v(),n.perspeciality.Speciality1!=null&&n.perspeciality.Speciality1.Code=="ΕΜ16.00")y();else if(n.perspeciality.Speciality1!=null&&n.perspeciality.Speciality1.Code=="ΠΕ18.38"){p();var t=u.all([f.getByAll("/api/Diploma/getAllequivalenceTypes"),f.getByAll("/api/Diploma/getDiplomaForPE1838")]);t.then(function(t){n.consts.equivalenceType=t[0];n.perspeciality.DimplomaSource=3;n.perspeciality.EquivalenceType=14;n.diplomas=t[1];n.DiplomaAbroad=t[1].Description;n.countries=[{Id:t[1].Country.Id,Description:t[1].Country.Description}];n.perspeciality.SpecialityId=n.perspeciality.Speciality1.Id;n.perspeciality.Diploma=t[1];n.perspeciality.Country=n.countries[0];n.perspeciality.DiplomaId=t[1].Id})}else n.perspeciality.DimplomaSource>0&&n.perspeciality.Diploma!=null&&n.perspeciality.Diploma.CountryId>0&&f.getByParams({specialityId:n.perspeciality.Speciality1.Id,countryId:n.perspeciality.Country.Id},"/api/Diploma/getDiplomasBySpecAndCountry").then(function(t){n.diplomas=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.showEquivalence=function(){return n.perspeciality.DimplomaSource>1&&n.consts.equivalenceType!=null&&n.consts.equivalenceType.length>0?!0:!1};n.visible=!1;n.toggle=function(){n.visible=!n.visible;v();w();n.IsDisabled=!n.pageRules.spec.CanInsert};n.closeAlert=function(t){n.alerts.splice(t,1)};n.showAlerts=function(){return n.specialities.length>=5?!0:!1};n.disableAll=function(){return n.perspeciality.Speciality1.Code=="ΕΜ16.00"?!0:!1};n.chechForInsertUpdateSpeciality=function(){n.canInsertUpdate=!0;n.perspeciality.Speciality1!=null&&n.perspeciality.Speciality1.Id>0?(n.perspeciality.DimplomaSource==1?n.perspeciality.Speciality1.Code!="ΕΜ16.00"&&((n.perspeciality.DiplomaDate==null||n.perspeciality.Country==null||n.perspeciality.DiplomaDegree==null||n.perspeciality.Diploma==null)&&(n.canInsertUpdate=!1),n.perspeciality.Speciality1.Code=="ΠΕ60"||n.perspeciality.Speciality1.Code=="ΠΕ70"?(n.perspeciality.Diploma.Description.indexOf("2ΕΤΟΥΣ")>0||n.perspeciality.Diploma.Description.indexOf("ΒΕΛΛΑΣ")>0||n.perspeciality.Diploma.Description.indexOf("ΕΚΚΛ")>0)&&n.perspeciality.PD130Simulation&&(n.perspeciality.DateofSimulation==null||n.perspeciality.SimulationDegree==null)&&(n.canInsertUpdate=!1):(n.perspeciality.Speciality1.Code=="ΠΕ19"||n.perspeciality.Speciality1.Code=="ΠΕ20"||n.perspeciality.Speciality1.Code=="ΠΕ32"||n.perspeciality.Speciality1.Code=="ΠΕ03"||n.perspeciality.Speciality1.Code=="ΠΕ04.01"||n.perspeciality.Speciality1.Code=="ΠΕ16.01")&&n.perspeciality.YearsOfStudy==null&&(n.canInsertUpdate=!1)):n.perspeciality.DimplomaSource==2?(n.perspeciality.EquivalenceType==null&&(n.canInsertUpdate=!1),(n.perspeciality.Speciality1.Code=="ΠΕ60"||n.perspeciality.Speciality1.Code=="ΠΕ70"||n.perspeciality.Speciality1.Code=="ΠΕ61"||n.perspeciality.Speciality1.Code=="ΠΕ71")&&(n.perspeciality.ReStudy!=null&&n.perspeciality.ReStudy&&n.perspeciality.DateofReStudy!=null||(n.canInsertUpdate=!1))):n.perspeciality.DimplomaSource==3?(n.perspeciality.EquivalenceType==null&&(n.canInsertUpdate=!1),n.perspeciality.Speciality1.Code=="ΠΕ16.01"&&n.perspeciality.EquivalenceType==14&&n.perspeciality.MusicEquivalenceType==null&&(n.canInsertUpdate=!1)):n.perspeciality.Speciality1.Code!="ΕΜ16.00"&&(n.canInsertUpdate=!1),n.perspeciality.Speciality1.Code.indexOf("ΔΕ01")==0&&n.perspeciality.WorkExperience==2&&(n.perspeciality.MonthExperience==null||n.perspeciality.DayExperience==null)&&(n.canInsertUpdate=!1)):n.canInsertUpdate=!1};n.saveAction=function(t){n.chechForInsertUpdateSpeciality();t.DiplomaDegree!=null&&(t.DiplomaDegree=parseFloat(t.DiplomaDegree.toString().replace(",",".")));t.SimulationDegree!=null&&(t.SimulationDegree=parseFloat(t.SimulationDegree.toString().replace(",",".")));t.RegionAndUnitDescription=n.authentication.unitName;t.UserRole=n.authentication.role;var i=t;$("#editSpeciality").valid()&&n.canInsertUpdate?(g(),typeof t.Id!="undefined"&&t.Id>0?(t.ModifiedBy=n.authentication.userName,f.postByParams(i,"/api/PersonSpeciality/updatePerSpeciality").then(function(){c(o)},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})):(t.CreatedBy=n.authentication.userName,f.postByParams(i,"/api/PersonSpeciality/insertPerSpeciality").then(function(){c(o)},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})),n.toggle(),n.perspeciality={},o!=null&&(n.perspeciality.PersonId=o,n.perspeciality.DiplomaAbroad={Id:0,Description:"",CountryId:0},n.DiplomaAbroad=null)):r.pop("error","Παρουσιάστηκε σφάλμα","Παρακαλώ συμπληρώστε όλα τα υποχρεωτικά πεδία.")};n.edit=function(t){n.labelButton="Ενημέρωση Κλάδου";var i=u.all([f.getByAll("/api/PersonSpeciality/getDimplomaSourceTypes"),f.getByAll("/api/PersonSpeciality/getWorkExperienceTypes"),f.getByAll("/api/Diploma/getMusicEquivalenceTypes"),f.getByParams({Id:t.Id},"/api/PersonSpeciality/getPersonSpecialityBySpecialityId"),]);i.then(function(t){n.consts.dimplomaSourceType=t[0];n.consts.workExperienceType=t[1];n.consts.musicequivalenceType=t[2];n.perspeciality=t[3];n.perspeciality.Speciality1=n.perspeciality.Speciality1;n.perspeciality.Speciality1.Code!="ΕΜ16.00"?(n.perspeciality.Country=n.perspeciality.Diploma.Country,n.perspeciality.Diploma=n.perspeciality.Diploma,n.perspeciality.Diploma.CountryId=n.perspeciality.Diploma.Country.Id,n.changedDiplomaSource(),n.countries=n.perspeciality.Diploma.Country,n.changedCountry(),n.diplomas=n.perspeciality.Diploma,n.perspeciality.DimplomaSource>=2&&(n.perspeciality.Speciality1.Code=="ΠΕ18.38"&&p(),n.DiplomaAbroad=n.perspeciality.Diploma.Description,n.perspeciality.DiplomaAbroad=n.perspeciality.Diploma)):y();l();n.IsDisabled=!n.pageRules.spec.CanUpdate});n.toggle();n.perspeciality=[]};n.delPerSpec=function(t){t.RegionAndUnitDescription=n.authentication.unitName;t.UserRole=n.authentication.role;var i=t;f.postByParams(i,"/api/PersonSpeciality/deletePerSpeciality").then(function(){n.specialities.splice(n.specialities.indexOf(t),1)},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.delPerSpeciality;n.openModal=function(t){n.delPerSpeciality=t};n.minDate="01/01/1900";n.maxDate=new Date;n.formats=["dd/MM/yyyy"];n.format=n.formats[0];n.today=function(){};n.today();n.clear=function(){n.dt=null};n.toggleMin=function(){n.minDate=n.minDate?null:new Date};n.toggleMin();n.open=function(t,i){t.preventDefault();t.stopPropagation();n[i]=!0};n.dateOptions={formatYear:"yy",startingDay:1,format:"dd/mm/yyyy"}};editSpeciality.$inject=["$scope","PassParameters","$state","toaster","$q","GeneralFactory","$filter"];EducationDirectorsController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y){function p(){a.getByAll("/api/EducationDirectors/positiveNegativeAnswers").then(function(t){n.positiveNegative=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function g(){a.getByAll("/api/EducationDirectors/languageLevels").then(function(t){n.languageLevel=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function nt(){a.getByAll("/api/Dbo/getLanguages").then(function(t){n.languages=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function tt(){a.getByParams({applicationId:n.educationDirectors.Id},"/api/EducationDirectors/getQualifications").then(function(t){n.qualifications=t;n.SendDataForPersonDto={Id:"",PersonId:n.educationDirectors.Id,CertificateType:""}},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function it(){a.getByAll("/api/EducationDirectors/getAdministrationStaff").then(function(t){n.administrationStaff=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function rt(){a.getByParams({level:n.educationDirectors.LevelId},"/api/RegionAndUnit/getPyspdeByLevel").then(function(t){n.consts.pyspdeRegionJoin=t;n.consts.pyspdeRegionAndUnit=i("filter")(t,function(n){return n.Description!="Υπό Μετακίνηση"})},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function ut(){c.getPyspdeWithoutJointExaminationByLevel(n.applicationType,n.educationDirectors.LevelId).then(function(t){n.consts.pyspde=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function k(){var t=f.all([a.getByParams({applicationId:n.educationDirectors.Id},"/api/EducationDirectors/getServicesWithDetailsById"),a.getByParams({applicationId:n.educationDirectors.Id},"/api/EducationDirectors/getHoursServicesWithDetailsById")]);t.then(function(t){n.personServices=t[0];n.personHoursServices=t[1];n.DisabledFek=n.personServices.length>0?!0:!1;n.ShowselectionCriteriaTable.BeforeNomination=i("filter")(n.personServices,{BeforeNomination:1},!0).length>0?!0:!1;n.ShowselectionCriteriaTable.AfterNomination=i("filter")(n.personServices,{BeforeNomination:2},!0).length>0?!0:!1},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των Υπηρετήσεων")})}function ft(){a.getByParams({applicationId:n.educationDirectors.Id},"/api/EducationDirectors/getAdminExperienceById").then(function(t){n.personExperiences=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function w(){n.educationDirectors.SpecialityId==364?(n.educationDirectors.CertificateTCCLevelA=1,n.disabledCertificateTCCLevelA=!0):n.disabledCertificateTCCLevelA=!1}function d(){a.getByAll("/api/EducationDirectors/getMunicipalities").then(function(t){n.municipalities=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}if(n.educationDirectors={IsTemporaryStored:!0},n.consts={},n.applicationType=26,n.alerts=[{type:"danger",msg:"Δεν μπορείτε να υποβάλετε αίτηση. Για ήδη υποβληθείσα αίτηση μεταβείτε στο Ιστορικό Αιτήσεων."}],n.protocol="",n.showProtocol=!1,n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.showLevel=!1,n.myfilter={},n.personalStep=!0,n.selectionCriteriaStep=!1,n.regionStep=!1,n.fek={},n.dateForProposal="",n.DisableSave=!1,n.educationDirectorsSrv={},n.educationDirectorsHoursSrv={},n.educationDirectorsExp={},n.IsFromInsert=!1,n.SaveEduTechSrvDisabled=!1,n.SaveEduTechHoursSrvDisabled=!1,n.SaveExperienceDisabled=!1,n.IsDisabledForDE=!1,n.disabledCertificateTCCLevelA=!1,n.showAlertLanguages=!1,n.showAlertLanguagesLevel=!1,n.alertLanguages="",n.alertLanguagesLevel="",n.showAlertPostgraduate=!1,n.alertPostgraduate="",n.showAlertLanguagesLevelSelection=!1,n.alertLanguagesLevelSelection="",n.showAlertBeforeNomination=!0,n.alertBeforeNomination="",n.showAlertCanInsertDates=!1,n.alertCanInsertDates="",n.DisabledFek=!1,n.showAlertServices=!1,n.alertServices="",n.showAlertHoursServices=!1,n.alertHoursServices="",n.showAlertHours=!1,n.alertHours="",n.AvailableIntendancyListItems=[],n.SelectedAvailIntendancyItems=[],n.SelectedSelectedIntendancyListItems=[],n.SelectedIntendancyListItems=[],n.ShowselectionCriteriaTable={BeforeNomination:!1,AfterNomination:!1},n.Educational={Years:0,Months:0,Days:0},n.TeachingSchool={Years:0,Months:0,Days:0},n.TeachingOther={Years:0,Months:0,Days:0},n.TeachingSchoolForPoints={Years:0,Months:0,Days:0},n.personServices=[],n.personHoursServices=[],n.personExperiences=[],n.showAlertRegions=!1,n.AlertRegionsMessage="Πρέπει να δηλώσετε τουλάχιστον μία Διεύθυνση Εκπαίδευσης",n.cannotUpdate=!1,n.notActive=!1,n.noUpdAccess=!1,n.PyspdeFormOfficial=0,n.showAlertPyspdeFormOfficial=!1,n.concatPyspde="",n.messagePyspde="",n.SendDataForPersonDto={Id:"",PersonId:"",CertificateType:""},n.SendDataForPersonFullDto=[],n.uploadedFileDetails=[],n.messages=[],n.onFileSelectLanguage=function(t,i){var u,r;for(n.messages[i]={completed:"",percentage:"0",error:""},n.showAlertForUploadCV=!1,u=0;u<t.length;u++){if(r=t[u],r.type!="application/pdf"){s.pop("error","ΠΡΟΣΟΧΗ",'Μη έγκυρη επέκταση αρχείου "'+r.name+'". Οι επεκτάσεις που υποστηρίζονται είναι: pdf .');return}if(r.size>=2097152){s.pop("error","ΠΡΟΣΟΧΗ",'Το αρχείο "'+r.name+'" ('+Math.round(r.size/1024)+" KB) υπερβαίνει το μέγιστο επιτρεπόμενο μέγεθος μεταφόρτωσης 2000 KB.");return}n.SendDataForPersonDto.CertificateType=i,function(t){n.upload[t]=y.upload({url:"/api/files/uploadEducationDirectorLanguage",method:"POST",data:{SendDataForPersonDto:n.SendDataForPersonDto},file:r}).progress(function(t){n.messages[i-1].percentage=parseInt(100*t.loaded/t.total)}).then(function(t){n.educationDirectors.FirstLanguageFileName=t.data.educationDirectorsFile.FirstLanguageFileName;n.educationDirectors.FirstLanguageFileName.FileSize=t.data.educationDirectorsFile.FirstLanguageFileName;n.educationDirectors.FirstLanguageEncryptedName=t.data.educationDirectorsFile.FirstLanguageEncryptedName;n.educationDirectors.FirstLanguageDirectPdfLink=t.data.educationDirectorsFile.FirstLanguageDirectPdfLink;n.educationDirectors.FirstLanguageContentType=t.data.educationDirectorsFile.FirstLanguageContentType;n.educationDirectors.SecondLanguageFileName=t.data.educationDirectorsFile.SecondLanguageFileName;n.educationDirectors.SecondLanguageFileName.FileSize=t.data.educationDirectorsFile.SecondLanguageFileName;n.educationDirectors.SecondLanguageEncryptedName=t.data.educationDirectorsFile.SecondLanguageEncryptedName;n.educationDirectors.SecondLanguageDirectPdfLink=t.data.educationDirectorsFile.SecondLanguageDirectPdfLink;n.educationDirectors.SecondLanguageContentType=t.data.educationDirectorsFile.SecondLanguageContentType;n.messages[i-1].completed="Το αρχείο <b>"+r.name+"<\/b> μεταφορτώθηκε με επιτυχία."}).catch(function(t){n.messages.error=t.data.Message})}(u)}},n.onFileSelect=function(t,r){var f,u;for(n.messages[r-1]={completed:"",percentage:"0",error:""},n.showAlertForUploadCV=!1,f=0;f<t.length;f++){if(u=t[f],u.type!="application/pdf"){s.pop("error","ΠΡΟΣΟΧΗ",'Μη έγκυρη επέκταση αρχείου "'+u.name+'". Οι επεκτάσεις που υποστηρίζονται είναι: pdf .');return}if(u.size>=2097152){s.pop("error","ΠΡΟΣΟΧΗ",'Το αρχείο "'+u.name+'" ('+Math.round(u.size/1024)+" KB) υπερβαίνει το μέγιστο επιτρεπόμενο μέγεθος μεταφόρτωσης 2000 KB.");return}n.SendDataForPersonDto.CertificateType=r,function(t){n.upload[t]=y.upload({url:"/api/files/uploadEducationDirector",method:"POST",data:{SendDataForPersonDto:n.SendDataForPersonDto},file:u}).progress(function(t){n.messages[r-1].percentage=parseInt(100*t.loaded/t.total)}).then(function(t){var f=i("filter")(n.qualifications,{QualificationsId:r},!0)[0],e;f.FileName=t.qualificationFile.FileName;f.FileSize=t.qualificationFile.FileSize;f.EncryptedName=t.qualificationFile.EncryptedName;f.DirectPdfLink=t.qualificationFile.DirectPdfLink;f.ContentType=t.qualificationFile.ContentType;e=n.qualifications.indexOf(f);n.qualifications.splice(e,1,f);n.messages[r-1].completed="Το αρχείο <b>"+u.name+"<\/b> μεταφορτώθηκε με επιτυχία."}).catch(function(t){n.messages.error=t.Message})}(f)}},n.downloadFile=function(t,i,r){a.getByParamsDownload({PersonId:n.educationDirectors.PersonId,Path:t,ContentType:i},"api/files/downloadFolder").then(function(n){var p=n.status,o=n.headers,s=n.data,v="application/octet-stream",t=!1,h,c,y,f,u,a,i,e;o=o();h=r||"download.pdf";c=o["content-type"]||v;try{if(i=new Blob([s],{type:c}),navigator.msSaveBlob)navigator.msSaveBlob(i,h);else if(y=navigator.webkitSaveBlob||navigator.mozSaveBlob||navigator.saveBlob,y===undefined)throw"Not supported";t=!0}catch(l){console.log("saveBlob method failed with the following exception:");console.log(l)}if(!t&&(f=window.URL||window.webkitURL||window.mozURL||window.msURL,f)){if(u=document.createElement("a"),"download"in u)try{console.log("Trying download link method with simulated click ...");i=new Blob([s],{type:c});e=f.createObjectURL(i);u.setAttribute("href",e);u.setAttribute("download",h);a=document.createEvent("MouseEvents");a.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null);u.dispatchEvent(a);t=!0}catch(l){console.log("Download link method with simulated click failed with the following exception:");console.log(l)}if(!t)try{console.log("Trying download link method with window.location ...");i=new Blob([s],{type:v});e=f.createObjectURL(i);window.location=e;console.log("Download link method with window.location succeeded");t=!0}catch(l){console.log("Download link method with window.location failed with the following exception:");console.log(l)}}t||(console.log("No methods worked for saving the arraybuffer, using last resort window.open"),window.open(httpPath,"_blank",""))},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση αρχείου")})},n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.authentication.isAuth){var b="educationDirectors";a.getByParams({role:n.authentication.role,codes:b},"/api/Subsystem/NewCheckPermission").then(function(t){var r=b.split(","),u,o;for(u in r)n.pageRules[r[u]]=i("filter")(t,{Code:r[u]},!0)[0].Rules;n.educationDirectors.DidacticYearId=n.didacticYear.Id;n.educationDirectors.Id=e.getApplicationId();a.isEmptyValue(n.educationDirectors.Id)&&(n.IsFromInsert=!0);e.resetApplication();n.educationDirectors.PersonId=e.getPersonId();a.isValueInArray(n.pageRules.educationDirectors.CanAccess,"u1, u2")&&(n.educationDirectors.PersonId=n.authentication.personId);o=f.all([l.isFekValidForApplicationTypeId(n.applicationType),a.getByParams({personId:n.educationDirectors.PersonId},"/api/EducationDirectors/canInsertApplication")]);o.then(function(t){n.hasValidFek=t[0];n.fek=t[1];n.fek.Id>0?(n.canInsertAppl=!0,n.educationDirectors.FekId=n.fek.Id):n.canInsertAppl=!1;n.educationDirectors.Id!=null&&n.educationDirectors.Id!=""&&n.educationDirectors.Id!="undefined"?(n.canUpdateAppl=!0,n.showAddEditForm=1):n.canInsertAppl&&n.hasValidFek?(n.canInsertAppl=!0,n.showAddEditForm=1):n.showAddEditForm=2;n.fek.DisplayModal&&a.isEmptyValue(n.educationDirectors.Id)?$("#alertModal").modal("show"):n.doAll();a.isEmptyValue(n.educationDirectors.Id)&&(n.IsDisabled=!n.pageRules.educationDirectors.CanInsert)})},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else o.go("/");n.getPostingTranferAreas=function(){a.getByAll("/api/RegionAndUnit/getPostingTransferAreas").then(function(t){n.PostingTranferAreas=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.changedRegionAndUnit=function(){n.checkForPostingTransferArea();n.getPostingTranferAreas()};n.checkForPostingTransferArea=function(){n.myfilter=i("filter")(n.OfficialPlacementUnits,{Id:n.educationDirectors.OfficialRegionAndUnitId},!0)[0];n.myfilter.RegionAndUnitTypeId==8?(n.showPostingTransferArea=!0,n.showLevel=!1,n.educationDirectors.LevelId=n.myfilter.LevelId):(a.getByAll("/api/Dbo/getLevelsAsync").then(function(t){n.levels=t;n.showLevel=!0},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία φόρτωσης βαθμίδων επιλογής")}),n.showPostingTransferArea=!1,n.educationDirectors.PostingTransferAreaId=null)};n.getApplRegions=function(){n.educationDirectors.RegionAndUnitId>0?(n.AvailableIntendancyListItems=[],blockUI({target:"#divBlockUIRegion",animate:!0}),a.getByParams({municipalityId:n.educationDirectors.RegionAndUnitId,applicationTypeId:n.applicationType},"/api/ApplicationTypeRegionAndUnit/getRegionAndUnitByMunicipality").then(function(t){angular.copy(t,n.AvailableIntendancyListItems);n.SelectedAvailIntendancyItems=n.SelectedIntendancyListItems;n.removeDuplicatesIntendancyForDualList();unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(unblockUI("#divBlockUIRegion"),n.AvailableIntendancyListItems=[],n.SelectedIntendancyListItems=[],n.SelectedSelectedIntendancyListItems=[])};n.changedMunicipality=function(){n.SelectedIntendancyListItems=[];n.SelectedSelectedIntendancyListItems=[];n.getApplRegions()};n.changeLevel=function(){rt();ut()};n.changeService=function(){n.educationDirectorsSrv.TeachingSchoolService==1&&n.educationDirectorsSrv.TeachingOtherService==1?(n.showAlertServices=!0,n.alertServices=[{type:"danger",msg:"Πρέπει να δηλώσετε την Υπηρέτηση είτε ως Διδακτική είτε ως Λοιπή Διδακτική Υπηρεσία."}]):(n.showAlertServices=!1,n.alertServices="")};n.changeBeforeNomination=function(){n.showAlertCanInsertDates=!1;n.alertCanInsertDates="";n.educationDirectorsSrv.BeforeNomination==2?n.educationDirectorsSrv.DateFrom<n.educationDirectors.NominationDate?(n.showAlertBeforeNomination=!0,n.alertBeforeNomination=[{type:"danger",msg:"Δεν μπορείτε να δηλώσετε για τη συγκεκριμένη υπηρέτηση Ημ/νία Έναρξης μικρότερη απή την Ημ/νία ΦΕΚ Διορισμού."}]):(n.showAlertBeforeNomination=!0,n.alertBeforeNomination=""):n.educationDirectorsSrv.BeforeNomination==1&&(n.educationDirectorsSrv.DateTo>=n.educationDirectors.NominationDate?(n.showAlertBeforeNomination=!0,n.alertBeforeNomination=[{type:"danger",msg:"Δεν μπορείτε να δηλώσετε για τη συγκεκριμένη υπηρέτηση Ημ/νία Λήξης μεγαλύτερη απή την Ημ/νία ΦΕΚ Διορισμού."}]):(n.showAlertBeforeNomination=!0,n.alertBeforeNomination=""))};n.changeLanguage=function(){!n.educationDirectors.FirstLanguageId&&n.educationDirectors.FirstLanguageLevel||!n.educationDirectors.SecondLanguageId&&n.educationDirectors.SecondLanguageLevel?(n.showAlertLanguagesLevel=!0,n.alertLanguagesLevel=[{type:"danger",msg:"Θα πρέπει να συμπληρώσετε ξένη γλώσσα"}]):n.educationDirectors.SecondLanguageId&&!n.inteducationDirectorsendancy.FirstLanguageId?(n.showAlertLanguagesLevel=!0,n.alertLanguagesLevel=[{type:"danger",msg:"Δεν έχετε συμπληρώσει την 1η ξένη γλώσσα για να μπορέσετε να συμπληρώσετε και τη 2η ξένη γλώσσα"}]):(n.showAlertLanguagesLevel=!1,n.alertLanguagesLevel="");n.educationDirectors.FirstLanguageLevel==1&&n.educationDirectors.SecondLanguageLevel==2?(n.showAlertLanguagesLevelSelection=!0,n.alertLanguagesLevelSelection=[{type:"danger",msg:"Η γνώση ξένης γλώσσας επιπέδου Aνώτερου του Β2 εισάγεται ως 1η ξένη γλώσσα."}]):(n.showAlertLanguagesLevelSelection=!1,n.alertLanguagesLevelSelection="");n.educationDirectors.FirstLanguageId==n.educationDirectors.SecondLanguageId&&n.educationDirectors.FirstLanguageId&&n.educationDirectors.SecondLanguageId?(n.showAlertLanguages=!0,n.alertLanguages=[{type:"danger",msg:"Δεν μπορείτε να εισάγετε την ίδια ξένη γλώσσα ως 1η και 2η επιλογή."}]):(n.showAlertLanguages=!1,n.alertLanguages="")};n.getOfficialPlacementUnits=function(){var t,i;t=n.educationDirectors.Id!=null&&n.educationDirectors.Id!=""&&n.educationDirectors.Id!="undefined"?n.educationDirectors.OfficialRegionAndUnitId:n.person.OfficialRegionAndUnit.Id;params={OfficialUnitAndRegionId:t,userLevel:n.authentication.levelId};i=f.all([a.getByAll("/api/RegionAndUnit/getRegionAndUnitForPlacement")]);i.then(function(t){n.OfficialPlacementUnits=t[0];for(var i=n.OfficialPlacementUnits.length-1;i>=0;i--)n.OfficialPlacementUnits[i].RegionAndUnitTypeId==7&&(n.OfficialPlacementUnits[i].Description="Π.Δ.Ε. "+n.OfficialPlacementUnits[i].Description);n.changedRegionAndUnit()})};n.doAll=function(){if(n.educationDirectors.Id!=null&&n.educationDirectors.Id!=""&&n.educationDirectors.Id!="undefined"){if(n.canUpdateAppl){n.AvailablePyspdeListItems=[];var t=f.all([a.getByParams({id:n.educationDirectors.PersonId},"/api/Person/GetEducationalStaffPersonDto"),a.getByParams({id:n.educationDirectors.Id},"/api/EducationDirectors/GetEducationDirectorsById")]);t.then(function(t){n.person=t[0];n.educationDirectors.SpecialityId=t[0].Speciality.Id;n.educationDirectors=t[1];n.paramsForCheckUpd.personId=n.educationDirectors.PersonId;n.paramsForCheckUpd.levelUser=n.authentication.levelId;n.paramsForCheckUpd.regionAndUnitId=n.authentication.regionAndUnitId;n.paramsForCheckUpd.userRole=n.authentication.role;n.paramsForCheckUpd.specialityId=n.educationDirectors.SpecialityId;n.paramsForCheckUpd.applicationLevelId=n.educationDirectors.LevelId;n.paramsForCheckUpd.applicationTypeId=n.applicationType;n.paramsForCheckUpd.IsActive=n.educationDirectors.IsActive;n.paramsForCheckUpd.FekId=n.educationDirectors.FekId;a.postByParams(n.paramsForCheckUpd,"/api/General/checkUpdateSecFromFEKAndUser").then(function(t){n.IsDisabled=!t;n.IsDisabled&&(n.noUpdAccess=!0);a.isValueInArray(n.pageRules.educationDirectors.CanAccess,"u1, u2")&&n.educationDirectors.IsActive&&!n.educationDirectors.IsTemporaryStored&&(n.IsDisabled=!0,n.cannotUpdate=!0);n.educationDirectors.IsActive||(n.IsDisabled=!0,n.notActive=!0);a.isValueInArray(n.pageRules.educationDirectors.CanAccess,"d1, d2, p,c1,c2")&&n.educationDirectors.LevelId!=n.authentication.levelId&&(n.IsDisabled=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.educationDirectors.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0);a.isValueInArray(n.pageRules.educationDirectors.CanAccess,"d1, d2")&&(n.IsDisabledForDE=!0);n.getOfficialPlacementUnits();p();d();k()})})}}else n.canInsertAppl&&n.educationDirectors.PersonId!=null&&n.educationDirectors.PersonId!=""&&n.educationDirectors.PersonId!="undefined"&&(n.AvailablePyspdeListItems=[],a.getByParams({id:n.educationDirectors.PersonId},"/api/Person/GetEducationalStaffPersonDto").then(function(t){n.person=t;n.educationDirectors.SpecialityId=t.Speciality.Id;n.educationDirectors.OfficialRegionAndUnitId=t.OfficialRegionAndUnit.Id;n.educationDirectors.OfficialPlacementUnitDescription=t.OfficialPlacementUnitDescription;n.educationDirectors.NominationDate=t.NominationDate;n.educationDirectors.LevelId=t.OfficialRegionAndUnit.LevelId;n.educationDirectors.NominationNo=t.NominationNo;n.getOfficialPlacementUnits();p();d();n.getApplRegions()},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}))};n.insertSrvAction=function(t){n.educationDirectorsSrv.TeachingSchoolService==1&&n.educationDirectorsSrv.TeachingOtherService==1?(n.showAlertServices=!0,n.alertServices=[{type:"danger",msg:"Πρέπει να δηλώσετε την Υπηρέτηση είτε ως Διδακτική είτε ως Λοιπή Διδακτική Υπηρεσία."}]):(n.showAlertServices=!1,n.alertServices="");!$("#editEducationDirectorsServiceForm").valid()||n.showAlertServices||n.showAlertCanInsertDates||(n.SaveEduTechSrvDisabled=!0,t.educationDirectorsApplicationId=n.educationDirectors.Id,a.isEmptyValue(t.Id)?(t.CreatedBy=n.authentication.userName,t.CreatedUserRole=n.authentication.role,t.CreatedRegionAndUnitDescription=n.authentication.unitName,t.IsFromInsert=n.IsFromInsert,a.postByParams(t,"/api/EducationDirectors/InsertEducationDirectorsSrv").then(function(t){n.personServices=t.EducationDirectorsEduTeachList;n.DisabledFek=n.personServices.length>0?!0:!1;n.educationDirectors.EducationalYearsFirstApprove=t.Educational.Years;n.educationDirectors.EducationalMonthsFirstApprove=t.Educational.Months;n.educationDirectors.EducationalDaysFirstApprove=t.Educational.Days;n.educationDirectors.DidacticSchoolYearsFirstApprove=t.TeachingSchool.Years;n.educationDirectors.DidacticSchoolMonthsFirstApprove=t.TeachingSchool.Months;n.educationDirectors.DidacticSchoolDaysFirstApprove=t.TeachingSchool.Days;n.educationDirectors.DidacticOtherYearsFirstApprove=t.TeachingOther.Years;n.educationDirectors.DidacticOtherMonthsFirstApprove=t.TeachingOther.Months;n.educationDirectors.DidacticOtherDaysFirstApprove=t.TeachingOther.Days;n.educationDirectors.DidacticSchoolYearsForPointsFirstApprove=t.TeachingSchoolForPoints.Years;n.educationDirectors.DidacticSchoolMonthsForPointsFirstApprove=t.TeachingSchoolForPoints.Months;n.educationDirectors.DidacticSchoolDaysForPointsFirstApprove=t.TeachingSchoolForPoints.Days;n.educationDirectors.DidacticOtherYearsForPointsFirstApprove=t.TeachingOtherForPoints.Years;n.educationDirectors.DidacticOtherMonthsForPointsFirstApprove=t.TeachingOtherForPoints.Months;n.educationDirectors.DidacticOtherDaysForPointsFirstApprove=t.TeachingOtherForPoints.Days;t.canInsertDates?(n.showAlertCanInsertDates=!1,n.alertCanInsertDates="",$("#AddServiceModal").modal("hide"),n.cancelSrv()):(n.showAlertCanInsertDates=!0,n.alertCanInsertDates=[{type:"danger",msg:"Το χρονικό διάστημα της υπηρέτησης που έχετε συμπληρώσει αλληλοεπικαλύπτεται με χρονικά διαστήματα υπηρετήσεων που έχετε ήδη εισάγει."}],n.SaveEduTechSrvDisabled=!1)},function(n){s.pop("error","ΠΡΟΣΟΧΗ",n.data)})):(t.ModifiedBy=n.authentication.userName,t.ModifiedUserRole=n.authentication.role,t.ModifiedRegionAndUnitDescription=n.authentication.unitName,t.IsFromInsert=n.IsFromInsert,a.postByParams(ieducationDirectorsntendancySrv,"/api/EducationDirectors/UpdateEducationDirectorsSrv").then(function(t){n.personServices=t.EducationDirectorsEduTeachList;n.DisabledFek=n.personServices.length>0?!0:!1;n.educationDirectors.EducationalYearsFirstApprove=t.Educational.Years;n.educationDirectors.EducationalMonthsFirstApprove=t.Educational.Months;n.educationDirectors.EducationalDaysFirstApprove=t.Educational.Days;n.educationDirectors.DidacticSchoolYearsFirstApprove=t.TeachingSchool.Years;n.educationDirectors.DidacticSchoolMonthsFirstApprove=t.TeachingSchool.Months;n.educationDirectors.DidacticSchoolDaysFirstApprove=t.TeachingSchool.Days;n.educationDirectors.DidacticOtherYearsFirstApprove=t.TeachingOther.Years;n.educationDirectors.DidacticOtherMonthsFirstApprove=t.TeachingOther.Months;n.educationDirectors.DidacticOtherDaysFirstApprove=t.TeachingOther.Days;n.educationDirectors.DidacticSchoolYearsForPointsFirstApprove=t.TeachingSchoolForPoints.Years;n.educationDirectors.DidacticSchoolMonthsForPointsFirstApprove=t.TeachingSchoolForPoints.Months;n.educationDirectors.DidacticSchoolDaysForPointsFirstApprove=t.TeachingSchoolForPoints.Days;n.educationDirectors.DidacticOtherYearsForPointsFirstApprove=t.TeachingOtherForPoints.Years;n.educationDirectors.DidacticOtherMonthsForPointsFirstApprove=t.TeachingOtherForPoints.Months;n.educationDirectors.DidacticOtherDaysForPointsFirstApprove=t.TeachingOtherForPoints.Days;t.canInsertDates?(n.showAlertCanInsertDates=!1,n.alertCanInsertDates="",$("#AddServiceModal").modal("hide"),n.cancelSrv()):(n.showAlertCanInsertDates=!0,n.alertCanInsertDates=[{type:"danger",msg:"Τα χρονικά διαστήματα των υπηρετήσεων δεν πρέπει να αλληλοεπικαλύπτονται."}],n.SaveEduTechSrvDisabled=!1)},function(n){s.pop("error","ΠΡΟΣΟΧΗ",n.data)})))};n.cancelSrv=function(){n.educationDirectorsSrv={};n.SaveEduTechSrvDisabled=!1;n.ShowselectionCriteriaTable.BeforeNomination=i("filter")(n.personServices,{BeforeNomination:1},!0).length>0?!0:!1;n.ShowselectionCriteriaTable.AfterNomination=i("filter")(n.personServices,{BeforeNomination:2},!0).length>0?!0:!1};n.insertHoursSrvAction=function(t){n.educationDirectorsHoursSrv.TeachingSchoolService==1&&n.educationDirectorsHoursSrv.TeachingOtherService==1?(n.showAlertHoursServices=!0,n.alertHoursServices=[{type:"danger",msg:"Πρέπει να δηλώσετε την Υπηρέτηση είτε ως Διδακτική είτε ως Λοιπή Διδακτική Υπηρεσία."}]):(n.showAlertHoursServices=!1,n.alertHoursServices="");a.isEmptyValue(n.educationDirectorsHoursSrv.Years)&&a.isEmptyValue(n.educationDirectorsHoursSrv.Months)&&a.isEmptyValue(n.educationDirectorsHoursSrv.Days)?(n.showAlertHours=!0,n.alertHours=[{type:"danger",msg:"Πρέπει να δηλώσετε στην Υπηρέτηση Ωρομισθίου  Έτη ή Μήνες ή Ημέρες."}]):(n.showAlertHours=!1,n.alertHours="");!$("#editEducationDirectorsHoursServiceForm").valid()||n.showAlertHoursServices||n.showAlertHours||(n.SaveEduTechHoursSrvDisabled=!0,t.educationDirectorsApplicationId=n.educationDirectors.Id,a.isEmptyValue(t.Id)?(t.CreatedBy=n.authentication.userName,t.CreatedUserRole=n.authentication.role,t.CreatedRegionAndUnitDescription=n.authentication.unitName,t.IsFromInsert=n.IsFromInsert,a.postByParams(t,"/api/EducationDirectors/InsertEducationDirectorsHoursSrv").then(function(t){n.personHoursServices=t.EducationDirectorsHoursEduTeachList;n.educationDirectors.EducationalYearsFirstApprove=t.Educational.Years;n.educationDirectors.EducationalMonthsFirstApprove=t.Educational.Months;n.educationDirectors.EducationalDaysFirstApprove=t.Educational.Days;n.educationDirectors.DidacticSchoolYearsFirstApprove=t.TeachingSchool.Years;n.educationDirectors.DidacticSchoolMonthsFirstApprove=t.TeachingSchool.Months;n.educationDirectors.DidacticSchoolDaysFirstApprove=t.TeachingSchool.Days;n.educationDirectors.DidacticOtherYearsFirstApprove=t.TeachingOther.Years;n.educationDirectors.DidacticOtherMonthsFirstApprove=t.TeachingOther.Months;n.educationDirectors.DidacticOtherDaysFirstApprove=t.TeachingOther.Days;n.educationDirectors.DidacticSchoolYearsForPointsFirstApprove=t.TeachingSchoolForPoints.Years;n.educationDirectors.DidacticSchoolMonthsForPointsFirstApprove=t.TeachingSchoolForPoints.Months;n.educationDirectors.DidacticSchoolDaysForPointsFirstApprove=t.TeachingSchoolForPoints.Days;n.educationDirectors.DidacticOtherYearsForPointsFirstApprove=t.TeachingOtherForPoints.Years;n.educationDirectors.DidacticOtherMonthsForPointsFirstApprove=t.TeachingOtherForPoints.Months;n.educationDirectors.DidacticOtherDaysForPointsFirstApprove=t.TeachingOtherForPoints.Days;$("#AddHoursServiceModal").modal("hide");n.cancelHoursSrv()},function(n){s.pop("error","ΠΡΟΣΟΧΗ",n.data)})):(t.ModifiedBy=n.authentication.userName,t.ModifiedUserRole=n.authentication.role,t.ModifiedRegionAndUnitDescription=n.authentication.unitName,t.IsFromInsert=n.IsFromInsert,a.postByParams(t,"/api/EducationDirectors/updateEducationDirectorsHoursSrv").then(function(t){n.personHoursServices=t.EducationDirectorsHoursEduTeachList;n.educationDirectors.EducationalYearsFirstApprove=t.Educational.Years;n.educationDirectors.EducationalMonthsFirstApprove=t.Educational.Months;n.educationDirectors.EducationalDaysFirstApprove=t.Educational.Days;n.educationDirectors.DidacticSchoolYearsFirstApprove=t.TeachingSchool.Years;n.educationDirectors.DidacticSchoolMonthsFirstApprove=t.TeachingSchool.Months;n.educationDirectors.DidacticSchoolDaysFirstApprove=t.TeachingSchool.Days;n.educationDirectors.DidacticOtherYearsFirstApprove=t.TeachingOther.Years;n.educationDirectors.DidacticOtherMonthsFirstApprove=t.TeachingOther.Months;n.educationDirectors.DidacticOtherDaysFirstApprove=t.TeachingOther.Days;n.educationDirectors.DidacticSchoolYearsForPointsFirstApprove=t.TeachingSchoolForPoints.Years;n.educationDirectors.DidacticSchoolMonthsForPointsFirstApprove=t.TeachingSchoolForPoints.Months;n.educationDirectors.DidacticSchoolDaysForPointsFirstApprove=t.TeachingSchoolForPoints.Days;n.educationDirectors.DidacticOtherYearsForPointsFirstApprove=t.TeachingOtherForPoints.Years;n.educationDirectors.DidacticOtherMonthsForPointsFirstApprove=t.TeachingOtherForPoints.Months;n.educationDirectors.DidacticOtherDaysForPointsFirstApprove=t.TeachingOtherForPoints.Days;$("#AddHoursServiceModal").modal("hide");n.cancelHoursSrv()},function(n){s.pop("error","ΠΡΟΣΟΧΗ",n.data)})))};n.cancelHoursSrv=function(){n.educationDirectorsHoursSrv={};n.SaveEduTechHoursSrvDisabled=!1};n.insertExpAction=function(t){$("#editEducationDirectorsExperienceForm").valid()&&(n.SaveExperienceDisabled=!0,t.educationDirectorsApplicationId=n.educationDirectors.Id,a.isEmptyValue(t.Id)?(t.CreatedBy=n.authentication.userName,t.CreatedUserRole=n.authentication.role,t.CreatedRegionAndUnitDescription=n.authentication.unitName,t.IsFromInsert=n.IsFromInsert,a.postByParams(t,"/api/EducationDirectors/InsertAdministrationExperience").then(function(t){n.personExperiences=t.AdministrationExperiences;t.canInsertDates?(n.showAlertCanInsertDates=!1,n.alertCanInsertDates="",$("#AddExperienceModal").modal("hide"),n.cancelExp()):(n.showAlertCanInsertDates=!0,n.alertCanInsertDates=[{type:"danger",msg:"Τα χρονικά διαστήματα των υπηρετήσεων δεν πρέπει να αλληλοεπικαλύπτονται."}],n.SaveExperienceDisabled=!1)},function(n){s.pop("error","ΠΡΟΣΟΧΗ",n.data)})):(t.ModifiedBy=n.authentication.userName,t.ModifiedUserRole=n.authentication.role,t.ModifiedRegionAndUnitDescription=n.authentication.unitName,t.IsFromInsert=n.IsFromInsert,a.postByParams(t,"/api/EducationDirectors/UpdateAdministrationExperience").then(function(t){n.personExperiences=t.AdministrationExperiences;t.canInsertDates?(n.showAlertCanInsertDates=!1,n.alertCanInsertDates="",$("#AddExperienceModal").modal("hide"),n.cancelExp()):(n.showAlertCanInsertDates=!0,n.alertCanInsertDates=[{type:"danger",msg:"Το χρονικό διάστημα της διοικητικής εμπειρίας που έχετε συμπληρώσει αλληλοεπικαλύπτεται με χρονικά διαστήματα διοικητικών εμπειριών που έχετε ήδη εισάγει."}],n.SaveExperienceDisabled=!1)},function(n){s.pop("error","ΠΡΟΣΟΧΗ",n.data)})))};n.cancelExp=function(){n.educationDirectorsExp={};n.SaveExperienceDisabled=!1};n.removeDuplicatesIntendancyForDualList=function(){angular.forEach(n.SelectedAvailIntendancyItems,function(t){for(var i=n.AvailableIntendancyListItems.length-1;i>=0;i--)n.AvailableIntendancyListItems[i].Id==t.Id&&n.AvailableIntendancyListItems.splice(i,1)})};n.btnIntendancyUp=function(){for(var t,r,u,f=n.SelectedSelectedIntendancyListItems,i=0;i<n.SelectedSelectedIntendancyListItems.length;i++){if(t=n.SelectedIntendancyListItems.indexOf(n.SelectedSelectedIntendancyListItems[i]),t<=0||t>=n.SelectedIntendancyListItems.length)return;r=n.SelectedIntendancyListItems[t];u=n.SelectedIntendancyListItems[t-1];n.SelectedIntendancyListItems[t-1]=r;n.SelectedIntendancyListItems[t]=u}};n.btnIntendancyDown=function(){for(var t,r,u,i=n.SelectedSelectedIntendancyListItems.length-1;i>=0;i--){if(t=n.SelectedIntendancyListItems.indexOf(n.SelectedSelectedIntendancyListItems[i]),t<0||t>=n.SelectedIntendancyListItems.length-1)return;r=n.SelectedIntendancyListItems[t];u=n.SelectedIntendancyListItems[t+1];n.SelectedIntendancyListItems[t+1]=r;n.SelectedIntendancyListItems[t]=u}};n.btnIntendancyRight=function(){n.checkRegions();n.canInsertRegions&&(angular.forEach(n.SelectedAvailIntendancyItems,function(n){this.push(n)},n.SelectedIntendancyListItems),angular.forEach(n.SelectedAvailIntendancyItems,function(t){for(var i=n.AvailableIntendancyListItems.length-1;i>=0;i--)n.AvailableIntendancyListItems[i].Id==t.Id&&n.AvailableIntendancyListItems.splice(i,1)}),n.SelectedAvailIntendancyItems=[],n.SelectedSelectedIntendancyListItems=[])};n.checkRegions=function(){var t=2;n.canInsertRegions=!0;n.SelectedIntendancyListItems.length+n.SelectedAvailIntendancyItems.length>t&&(s.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών","Δεν μπορείτε να επιλέξετε περισσότερες από "+t+" διευθύνσεις"),n.canInsertRegions=!1)};n.btnIntendancyLeft=function(){angular.forEach(n.SelectedSelectedIntendancyListItems,function(n){this.push(n)},n.AvailableIntendancyListItems);angular.forEach(n.SelectedSelectedIntendancyListItems,function(t){for(var i=n.SelectedIntendancyListItems.length-1;i>=0;i--)n.SelectedIntendancyListItems[i].Id==t.Id&&n.SelectedIntendancyListItems.splice(i,1)});n.SelectedSelectedIntendancyListItems=[];n.SelectedAvailIntendancyItems=[]};n.goToSelectionCriteria=function(){u.scrollTo(0,0);var t={EducationDirectors:n.educationDirectors,RegionAndUnit:n.SelectedIntendancyListItems,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,IsFromInsert:n.IsFromInsert};$("#educationDirectorsStep1").valid()&&(n.DisableSave=!0,p(),n.educationDirectors.Id!=null&&n.educationDirectors.Id!=""&&n.educationDirectors.Id!="undefined"?(n.educationDirectors.ModifiedBy=n.authentication.userName,a.postByParams(t,"/api/EducationDirectors/UpdateEducationDirectors").then(function(){w();n.personalStep=!1;n.selectionCriteriaStep=!0;n.scientificQualificationsStep=!1;n.administrationExperienceStep=!1;k()}).catch(function(n){s.pop("error","Παρουσιάστηκε σφάλμα",n.data)})):(n.educationDirectors.DidacticYearId=n.didacticYear.Id,n.educationDirectors.CreatedBy=n.authentication.userName,n.educationDirectors.CreatedUserRole=n.authentication.role,n.educationDirectors.CreatedRegionAndUnitDescription=n.authentication.unitName,a.postByParams(t,"/api/EducationDirectors/insertApplEducationDirectors").then(function(t){n.educationDirectors.Id=t.Id;n.educationDirectors.CreationDate=t.CreationDate;n.educationDirectors.IsActive=t.IsActive;w();n.personalStep=!1;n.selectionCriteriaStep=!0;n.scientificQualificationsStep=!1;n.administrationExperienceStep=!1;n.ShowselectionCriteriaTable.BeforeNomination=i("filter")(n.personServices,{BeforeNomination:1},!0).length>0?!0:!1;n.ShowselectionCriteriaTable.AfterNomination=i("filter")(n.personServices,{BeforeNomination:2},!0).length>0?!0:!1}).catch(function(n){s.pop("error","Παρουσιάστηκε σφάλμα",n.data)})))};n.goToPersonal=function(){n.personalStep=!0;n.selectionCriteriaStep=!1;n.scientificQualificationsStep=!1;n.administrationExperienceStep=!1;n.DisableSave=!1;u.scrollTo(0,0)};n.goToSelectionSrvs=function(){w();n.personalStep=!1;n.selectionCriteriaStep=!0;n.scientificQualificationsStep=!1;n.administrationExperienceStep=!1;u.scrollTo(0,0)};n.goToScientific=function(){n.personalStep=!1;n.selectionCriteriaStep=!1;n.scientificQualificationsStep=!0;n.administrationExperienceStep=!1;u.scrollTo(0,0)};n.goToExperiences=function(){n.personalStep=!1;n.selectionCriteriaStep=!1;n.scientificQualificationsStep=!1;n.administrationExperienceStep=!0;u.scrollTo(0,0)};n.goToScientificQualifications=function(){u.scrollTo(0,0);var t={EducationDirectors:n.educationDirectors,RegionAndUnit:n.SelectedIntendancyListItems,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,IsFromInsert:n.IsFromInsert};$("#EducationDirectorsStep2").valid()&&(n.educationDirectors.ModifiedBy=n.authentication.userName,a.postByParams(t,"/api/EducationDirectors/updateEducationDirectors").then(function(){n.personalStep=!1;n.selectionCriteriaStep=!1;n.scientificQualificationsStep=!0;n.administrationExperienceStep=!1;g();nt();tt()}).catch(function(n){s.pop("error","Παρουσιάστηκε σφάλμα",n.data)}))};n.goToAdministrationExperience=function(){n.educationDirectors.FirstLanguageId&&!n.educationDirectors.FirstLanguageLevel||n.educationDirectors.SecondLanguageId&&!n.educationDirectors.SecondLanguageLevel?(n.showAlertLanguagesLevel=!0,n.alertLanguagesLevel=[{type:"danger",msg:"Θα πρέπει να συμπληρώσετε και το επίπεδο γνώσης ξένης γλώσσας"}]):n.educationDirectors.SecondLanguageId&&!n.educationDirectors.FirstLanguageId?(n.showAlertLanguagesLevel=!0,n.alertLanguagesLevel=[{type:"danger",msg:"Δεν έχετε συμπληρώσει την 1η ξένη γλώσσα για να μπορέσετε να συμπληρώσετε και τη 2η ξένη γλώσσα"}]):(n.showAlertLanguagesLevel=!1,n.alertLanguagesLevel="");u.scrollTo(0,0);var t={FirstLanguageId:n.educationDirectors.FirstLanguageId,FirstLanguageLevel:n.educationDirectors.FirstLanguageLevel,SecondLevelApproveFirstLanguage:n.educationDirectors.SecondLevelApproveFirstLanguage,ThirdLevelApproveFirstLanguage:n.educationDirectors.ThirdLevelApproveFirstLanguage,SecondLanguageId:n.educationDirectors.SecondLanguageId,SecondLanguageLevel:n.educationDirectors.SecondLanguageLevel,SecondLevelApproveSecondanguage:n.educationDirectors.SecondLevelApproveSecondanguage,ThirdLevelApproveSecondLanguage:n.educationDirectors.ThirdLevelApproveSecondLanguage,Qualifications:n.qualifications,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,IsFromInsert:n.IsFromInsert};n.showAlertLanguagesLevel||n.showAlertLanguages||n.showAlertLanguagesLevelSelection||n.showAlertPostgraduate||(n.educationDirectors.ModifiedBy=n.authentication.userName,a.postByParams(t,"/api/EducationDirectors/UpdateEducationDirectorsQualifications").then(function(){n.personalStep=!1;n.selectionCriteriaStep=!1;n.scientificQualificationsStep=!1;n.administrationExperienceStep=!0;it();ft()}).catch(function(n){s.pop("error","Παρουσιάστηκε σφάλμα",n.data)}))};n.saveAction=function(i){var f,h;u.scrollTo(0,0);f={EducationDirectors:n.educationDirectors,RegionAndUnit:n.SelectedIntendancyListItems,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,IsFromInsert:n.IsFromInsert,Status:i};$("#EducationDirectorsStep4").valid()&&(i=="final"?(h=t.open({templateUrl:"ModalContent.html",controller:OpenModalController}),h.result.then(function(t){t&&a.postByParams(f,"/api/EducationDirectors/updateEducationDirectors").then(function(){e.setPersonId(n.educationDirectors.PersonId);a.isValueInArray(n.pageRules.educationDirectors.CanAccess,"u1, u2, c")?o.go("history"):o.go("showapplicationperintendancy")}).catch(function(n){s.pop("error","Παρουσιάστηκε σφάλμα",n.data)})},function(){r.info("Modal dismissed at: "+new Date)})):a.postByParams(f,"/api/EducationDirectors/updateEducationDirectors").then(function(){e.setPersonId(n.educationDirectors.PersonId);a.isValueInArray(n.pageRules.educationDirectors.CanAccess,"u1, u2, c")?o.go("history"):o.go("showapplicationperintendancy")}).catch(function(n){s.pop("error","Παρουσιάστηκε σφάλμα",n.data)}),n.personalStep=!1,n.selectionCriteriaStep=!1,n.scientificQualificationsStep=!1,n.administrationExperienceStep=!1)};n.fillFormControls=function(t){t=="Srv"?(n.ModalTitle="Προσθήκη Υπηρέτησης",n.educationDirectorsSrv={},n.SaveEduTechSrvDisabled=!1,n.showAlertCanInsertDates=!1,n.alertCanInsertDates="",n.showAlertServices=!1,n.alertServices="",n.showAlertBeforeNomination=!1,n.alertBeforeNomination=""):t=="Exp"?(n.ModalTitle="Προσθήκη Διοικητικής Εμπειρίας",n.educationDirectorsExp={},n.SaveExperienceDisabled=!1,n.showAlertCanInsertDates=!1,n.alertCanInsertDates=""):t=="HoursSrv"&&(n.ModalTitle="Προσθήκη Υπηρέτησης Ωρομισθίου",n.educationDirectorsHoursSrv={},n.SaveEduTechHoursSrvDisabled=!1,n.showAlertHoursServices=!1,n.alertHoursServices="",n.showAlertHours=!1,n.alertHours="")};n.openServiceModal=function(t){blockUI({target:"#tblService",animate:!0});angular.copy(t,n.educationDirectorsSrv);n.ModalTitle="Επεξεργασία Υπηρέτησης";n.SaveEduTechSrvDisabled=!1;n.showAlertCanInsertDates=!1;n.alertCanInsertDates="";n.showAlertServices=!1;n.alertServices="";n.showAlertBeforeNomination=!1;n.alertBeforeNomination="";v(function(){unblockUI("#tblService");$("#AddServiceModal").modal("show")},300)};n.openHoursServiceModal=function(t){blockUI({target:"#tblhoursService",animate:!0});angular.copy(t,n.educationDirectorsHoursSrv);n.ModalTitle="Επεξεργασία Υπηρέτησης Ωρομισθίου";n.SaveEduTechHoursSrvDisabled=!1;n.showAlertHoursServices=!1;n.alertHoursServices="";n.showAlertHours=!1;n.alertHours="";v(function(){unblockUI("#tblhoursService");$("#AddHoursServiceModal").modal("show")},300)};n.openExperienceModal=function(t){blockUI({target:"#tblExperience",animate:!0});angular.copy(t,n.educationDirectorsExp);n.ModalTitle="Επεξεργασία Διοικητικής Εμπειρίας";n.SaveExperienceDisabled=!1;n.showAlertCanInsertDates=!1;n.alertCanInsertDates="";v(function(){unblockUI("#tblExperience");$("#AddExperienceModal").modal("show")},300)};n.DeleteActionSrv=function(t){var i=t;i.ModifiedBy=n.authentication.userName;i.ModifiedUserRole=n.authentication.role;i.ModifiedRegionAndUnitDescription=n.authentication.unitName;a.postByParams(i,"/api/EducationDirectors/DeleteEducationDirectorsEduTeachSrv").then(function(t){n.personServices=t.EducationDirectorsEduTeachList;n.DisabledFek=n.personServices.length>0?!0:!1;n.educationDirectors.EducationalYearsFirstApprove=t.Educational.Years;n.educationDirectors.EducationalMonthsFirstApprove=t.Educational.Months;n.educationDirectors.EducationalDaysFirstApprove=t.Educational.Days;n.educationDirectors.DidacticSchoolYearsFirstApprove=t.TeachingSchool.Years;n.educationDirectors.DidacticSchoolMonthsFirstApprove=t.TeachingSchool.Months;n.educationDirectors.DidacticSchoolDaysFirstApprove=t.TeachingSchool.Days;n.educationDirectors.DidacticOtherYearsFirstApprove=t.TeachingOther.Years;n.educationDirectors.DidacticOtherMonthsFirstApprove=t.TeachingOther.Months;n.educationDirectors.DidacticOtherDaysFirstApprove=t.TeachingOther.Days;n.educationDirectors.DidacticSchoolYearsForPointsFirstApprove=t.TeachingSchoolForPoints.Years;n.educationDirectors.DidacticSchoolMonthsForPointsFirstApprove=t.TeachingSchoolForPoints.Months;n.educationDirectors.DidacticSchoolDaysForPointsFirstApprove=t.TeachingSchoolForPoints.Days;n.educationDirectors.DidacticOtherYearsForPointsFirstApprove=t.TeachingOtherForPoints.Years;n.educationDirectors.DidacticOtherMonthsForPointsFirstApprove=t.TeachingOtherForPoints.Months;n.educationDirectors.DidacticOtherDaysForPointsFirstApprove=t.TeachingOtherForPoints.Days},function(n){s.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.DeleteActionHoursSrv=function(t){var i=t;i.ModifiedBy=n.authentication.userName;i.ModifiedUserRole=n.authentication.role;i.ModifiedRegionAndUnitDescription=n.authentication.unitName;a.postByParams(i,"/api/EducationDirectors/DeleteEducationDirectorsHoursEduTeachSrv").then(function(t){n.personHoursServices=t.EducationDirectorsHoursEduTeachList;n.educationDirectors.EducationalYearsFirstApprove=t.Educational.Years;n.educationDirectors.EducationalMonthsFirstApprove=t.Educational.Months;n.educationDirectors.EducationalDaysFirstApprove=t.Educational.Days;n.ieducationDirectorsntendancy.DidacticSchoolYearsFirstApprove=t.TeachingSchool.Years;n.educationDirectors.DidacticSchoolMonthsFirstApprove=t.TeachingSchool.Months;n.educationDirectors.DidacticSchoolDaysFirstApprove=t.TeachingSchool.Days;n.educationDirectors.DidacticOtherYearsFirstApprove=t.TeachingOther.Years;n.educationDirectors.DidacticOtherMonthsFirstApprove=t.TeachingOther.Months;n.educationDirectors.DidacticOtherDaysFirstApprove=t.TeachingOther.Days;n.educationDirectors.DidacticSchoolYearsForPointsFirstApprove=t.TeachingSchoolForPoints.Years;n.educationDirectors.DidacticSchoolMonthsForPointsFirstApprove=t.TeachingSchoolForPoints.Months;n.educationDirectors.DidacticSchoolDaysForPointsFirstApprove=t.TeachingSchoolForPoints.Days;n.educationDirectors.DidacticOtherYearsForPointsFirstApprove=t.TeachingOtherForPoints.Years;n.educationDirectors.DidacticOtherMonthsForPointsFirstApprove=t.TeachingOtherForPoints.Months;n.educationDirectors.DidacticOtherDaysForPointsFirstApprove=t.TeachingOtherForPoints.Days},function(n){s.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.openModalSrv=function(t){n.delPerService=t};n.DeleteActionExp=function(t){var i=t;i.ModifiedBy=n.authentication.userName;i.ModifiedUserRole=n.authentication.role;i.ModifiedRegionAndUnitDescription=n.authentication.unitName;a.postByParams(i,"/api/EducationDirectors/DeleteAdministrationExperience").then(function(){n.personExperiences.splice(n.personExperiences.indexOf(t),1)},function(n){s.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.openModalExp=function(t){n.delPerExperience=t};n.minDate="01/01/1900";n.maxDate=new Date;n.formats=["dd/MM/yyyy"];n.format=n.formats[0];n.clear=function(){n.dt=null};n.toggleMin=function(){n.minDate=n.minDate?null:new Date};n.toggleMin();n.open=function(t,i){t.preventDefault();t.stopPropagation();n[i]=!0};n.status={opened:!1};n.openDatetimePicker=function(){n.status.opened=!0;n.status.opened1=!0};n.dateOptions={formatYear:"yy",startingDay:1,format:"dd/mm/yyyy"}};EducationDirectorsController.$inject=["$scope","$uibModal","$filter","$log","$window","$q","PassParameters","$state","toaster","PersonFactory","ApplicationTypeRegionAndUnitFactory","ApplicationTypeFekFactory","GeneralFactory","$timeout","$upload"];FileUploadController=function(){};FileUploadController.$inject=["$scope"];ForgotPasswordController=function(n,t,i,r,u){n.authentication.isAuth&&t.path("forbidden");n.forgotData={email:"",reCaptchaResponse:null};n.message="";n.widgetId=null;n.model={key:"6Le9JRcTAAAAAM_gLM8PQ5Bs_ceg-9iDwZa0dGku"};n.setResponse=function(t){n.forgotData.reCaptchaResponse=t};n.setWidgetId=function(t){n.widgetId=t};n.cbExpiration=function(){n.forgotData.reCaptchaResponse=null};n.forgot=function(){n.message="";i.forgotPassword(n.forgotData).then(function(){n.message="OK"},function(t){n.message=t.Message;u.reload(n.widgetId)})}};ForgotPasswordController.$inject=["$scope","$location","AuthService","ngAuthSettings","vcRecaptchaService"];HistoryController=function(n,t,i,r,u,f,e,o,s){var c,h;n.otherSecondmentActionsTmp=[{Description:"Τροποποίηση επιλογών αίτησης",ActionDescription:"UpdateTransfer",Action:1}];n.pageRules={};n.myAction=0;n.authentication.isAuth?(c=e.isValueInArray(e.getRoleCode(n.authentication.role),"s")?"hourly,hourlySmea,sub,hourlyMusic,subSmea,subMusic,subRemediation,subEEPEBP,sub3months,subSMEA3months,subMusic3months,subEEPEBP3months,subSchool,subSMEASchool,subEEPEBPSchool,subPE8702School,subRemediationSMEA,subRemediationMusic,subTE0130School":e.isValueInArray(e.getRoleCode(n.authentication.role),"mk")?"secBody1920,secBodyTechnical,secBody,folder,recruitment,report":"secArtistic,secPyspde,secBody,secBody1920,secBodyTechnical,secBodyRef,secSmea,secKesy,secMusic,hourly,hourlySmea,sub,hourlyMusic,subSmea,subMusic,secBodyRef,subRemediation,secChurch,secBodySep,prefecture,intendancy,permanentEEPEBP,subEEPEBP,hourlyMusicForEM16,permanentSMEA,permanent,sub3months,subSMEA3months,subMusic3months,subEEPEBP3months,subSchool,subSMEASchool,subEEPEBPSchool,subPE8702School,subRemediationSMEA,subRemediationMusic,subTE0130School,permanentMusic,substitutePlacementSchool,secEEPEBP,secGeneral",e.getByParams({role:n.authentication.role,codes:c},"/api/Subsystem/NewCheckPermission").then(function(t){var i=c.split(",");for(var r in i)try{n.pageRules[i[r]]=s("filter")(t,{Code:i[r]},!0)[0].Rules}catch(u){}console.log(n.pageRules)},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})):t.go("/");h=i.getPersonId();e.isValueInArray(e.getRoleCode(n.authentication.role),"u1, u2")&&(h=n.authentication.personId);n.person={};n.applications={};n.applicationsPerYear={};n.searchDidactYear=[];n.showColumns=!0;n.showActionDesctiption=!1;n.Message={showMessage:!1,Reason:null};n.showButtonOk=!1;n.showButtonDelete=!1;n.action={Description:null};n.isNotInSubstitute=!1;n.canUnsubscribeSubmission=0;n.disableApplicationButton=!1;n.showActionTabs=!0;f.getPersonAttributesForMenu(h).then(function(t){n.personAttributesForMenu=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Υπήρξε πρόβλημα κατά την φόρτωση του μενού")});n.searchParams={personId:h,levelUser:n.authentication.levelId,userRole:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId};n.getGistory=function(){e.getByParams(n.searchParams,"/api/HistoryAppl/getHistory").then(function(t){n.applications=t;var i=s("filter")(n.applications,function(n){return(n.ApplicationTypeId==1||n.ApplicationTypeId==3)&&n.IsActive==1}).length;i>0&&e.getByParams({personId:h},"/api/HistoryAppl/CheckIsNotInSubstitute").then(function(t){n.isNotInSubstitute=t},function(){r.pop("error","Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την εύρεση των αιτήσεων.")});e.isEmptyValue(n.applications)||(n.applicationsPerYear=s("filter")(n.applications,function(n){return n.DidacticYear.ApplicationDidacticYear==!0}),n.searchDidactYear=n.applicationsPerYear[0]);n.showColumns=e.isEmpty(n.applications)?!1:n.applications[0].IsPermanent?!0:!1},function(){r.pop("error","Παρουσιάστηκε σφάλμα","Δε έγινε η φόρτωση του ιστορικού")})};e.getByParams({Id:h},"/api/Person/GetPersonDto").then(function(t){n.showActionTabs=!0;n.person=t;e.isValueInArray(e.getRoleCode(n.authentication.role),"d1, d2, p")&&n.person.IsPermanent&&n.authentication.regionAndUnitId!=n.person.OfficialRegionAndUnitId&&(n.showActionTabs=!1)},function(){r.pop("error","Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των προσωπικών στοιχείων.")});n.getGistory();n.edit=function(n,t,r,f,e,o){i.setApplicationId(n);i.setApplicationLevelId(r);i.setPersonId(h);i.setSpecialityId(f);i.setCode(e);i.setMusicSpecialistId(o);u.goToPage(t)};n.searchAction=function(t){n.applicationsPerYear=s("filter")(n.applications,function(n){return n.DidacticYear.Id==t})};n.actionsForPerson=function(u){i.setPersonId(h);switch(u){case"Αναπληρωτή":t.go("substitute");break;case"Ωρομισθίου":t.go("hourlyteacher");break;case"Αναπληρωτή ΣΜΕΑΕ":t.go("substitutesmea");break;case"Ωρομισθίου ΣΜΕΑΕ":t.go("hourlyteachersmea");break;case"Αναπληρωτή σε Μουσικά Σχολεία":t.go("substitutemusic");break;case"Ωρομισθίου σε Μουσικά Σχολεία":t.go("hourlyteachermusic");break;case"Απόσπασης":t.go("secondmentapplicationpyspdechurch");break;case"Απόσπασης ΣΜΕΑΕ":t.go("secondmentapplicationpyspdesmea");break;case"Απόσπασης ΕΕΠ - ΕΒΠ":t.go("secondmentapplicationeepebp");break;case"Απόσπασης σε Φορέα":t.go("secondmentapplicationbody");break;case"Απόσπασης σε Καλλιτεχνικά Σχολεία":t.go("secondmentapplicationartistic");break;case"Απόσπασης σε Μουσικά Σχολεία":t.go("secondmentapplicationmusic");break;case"Ιστορικό Αιτήσεων":t.go("history");break;case"Έλεγχος Γνησιότητας":t.go("confirmation");break;case"Αίτηση Απόσπασης κλάδου Πληροφορικής σε Φορέα":t.go("secondmentapplicationbody1920");break;case"Απόσπασης για Θέση Συντονιστή Εκπαίδευσης Προσφύγων":t.go("secondmentapplicationbodyref");break;case"Ενισχυτικής Διδασκαλίας":t.go("remediation");break;case"Απόσπασης σε Εκκλησιαστικά Σχολεία":t.go("secondmentchurch");break;case"Βεβαίωση Προϋπηρεσίας":blockUI({target:"#blockui_loading",animate:!0});o(function(){e.getByParams({personId:h,regionAndUnitId:n.authentication.regionAndUnitId,role:n.authentication.role},"/api/Pdf/getPreviousExperienceCertificate").then(function(n){var i=new Date,t={},u;t=n;u=t;pdfMake.createPdf(t).download("export_"+Date.parse(i)+".pdf");unblockUI("#blockui_loading");r.pop("success","Εξαγωγή σε PDF","Το αρχείο export_"+Date.parse(i)+".pdf δημιουργήθηκε με επιτυχία.")},function(){unblockUI("#blockui_loading");r.pop("error","Παρουσιάστηκε σφάλμα","Η αίτηση δεν μπορεί να εκτυπωθεί.")})},1e3);break;case"Απόσπασης σε Σχολείο Ευρωπαϊκής Παιδείας":t.go("secondmentapplicationbodysep");break;case"Περιφερειακοί Διευθυντές Εκπαίδευσης":t.go("prefecture");break;case"Διευθυντές Εκπαίδευσης":t.go("intendancy");break;case"Διευθυντές Α/θμιας & Β/θμιας Εκπαίδευσης":t.go("educationDirectors");break;case"Απόσπασης σε Κ.Ε.Σ.Υ. με εξειδίκευση στη συμβουλευτική και στον επαγγελματικό προσανατολισμό":t.go("secondmentapplicationkesy");break;case"Αίτηση Απόσπασης στη Γενική Διεύθυνση Στρατηγικού Σχεδιασμού, Προγραμματισμού και Ηλεκτρονικής Διακυβέρνησης του Υ.ΠΑΙ.Θ.Α.":t.go("secondmentapplicationbodytechnical");break;case"Αναπληρωτή ΕΕΠ - ΕΒΠ":t.go("substituteEEPEBP");break;case"Αίτηση για Μόνιμο Διορισμό ΕΕΠ - ΕΒΠ":t.go("permanentEEPEBP");break;case"Αίτηση για Μόνιμο Διορισμό ΣΜΕΑΕ":t.go("permanentSMEA");break;case"Αίτηση για Μόνιμο Διορισμό":t.go("permanent");break;case"Αίτηση για Μόνιμο Διορισμό σε Μουσικό Σχολείο":t.go("permanentMusic");break;case"Ωρομισθίου σε Μουσικά Σχολεία  για κλάδο ΕΜ16.00":t.go("hourlyteachermusicforEM16");break;case"Αναπληρωτή για δια ζώσης διδασκαλία με 3μηνη σύμβαση":t.go("substitute3months");break;case"Αναπληρωτή ΣΜΕΑΕ για δια ζώσης διδασκαλία με 3μηνη σύμβαση":t.go("substituteSMEA3months");break;case"Αναπληρωτή σε Μουσικά Σχολεία για δια ζώσης διδασκαλία με 3μηνη σύμβαση":t.go("substituteMusic3months");break;case"Αναπληρωτή ΕΕΠ-ΕΒΠ για δια ζώσης παροχή υποστηρικτικού έργου με 3μηνη σύμβαση":t.go("substituteSMEAForSchool");break;case"Αναπληρωτή για ειδική προκήρυξη":t.go("substituteForSchool");break;case"Αναπληρωτή ΣΜΕΑΕ για ειδική προκήρυξη":t.go("substituteSMEAForSchool");break;case"Αναπληρωτή ΕΕΠ-ΕΒΠ για ειδική προκήρυξη":t.go("substituteEEPEBPForSchool");break;case"Αναπληρωτή ΠΕ87.02 για κάλυψη θέσεων ΠΕ25 (ειδική προκήρυξη)":t.go("substitutePE8702School");case"Ενισχυτικής Διδασκαλίας ΣΜΕΑΕ":t.go("remediationSMEA");break;case"Ενισχυτικής Διδασκαλίας Μουσικών Σχολείων":t.go("remediationMusic");break;case"Αναπληρωτή ΤΕ01.30 για κάλυψη θέσεων ΕΒΠ (ειδική προκήρυξη)":t.go("substituteTE0130School");case"Αίτηση - Δήλωση προτίμησης τοποθέτησης προσληφθέντων":t.go("substitutePlacementSchool");case"Γενική Αίτηση Απόσπασης":t.go("secondmentapplicationgeneral")}};n.showTrackChanges=function(n,r){i.setTrackId(n);e.trackTypes(r);t.go("showTrackChanges")};n.canShowTrackChanges=function(t){return n.authentication.isAuth?e.isValueInArray(e.getRoleCode(n.authentication.role),"mk")?t?!0:!1:e.isValueInArray(e.getRoleCode(n.authentication.role),"m1,m2")?t?!1:!0:e.isValueInArray(e.getRoleCode(n.authentication.role),"a"):!1};n.download=function(t){blockUI({target:"#blockui_loading",animate:!0});o(function(){t.DidacticYear.ApplicationDidacticYear?e.getByParams({applicationId:t.ApplId,applicationType:t.ApplicationTypeId,userRole:n.authentication.role},"/api/HistoryAppl/getAdHocPdfTemplateById").then(function(n){var i=new Date,t={},u;t=n;u=t;pdfMake.createPdf(t).download("export_"+Date.parse(i)+".pdf");unblockUI("#blockui_loading");r.pop("success","Εξαγωγή σε PDF","Το αρχείο export_"+Date.parse(i)+".pdf δημιουργήθηκε με επιτυχία.")},function(){unblockUI("#blockui_loading");r.pop("error","Παρουσιάστηκε σφάλμα","Η αίτηση δεν μπορεί να εκτυπωθεί.")}):e.getByParams({id:t.Id},"/api/HistoryAppl/getHistoryTemplateAsync").then(function(n){var i=new Date,t={},u;t=n;u=t;pdfMake.createPdf(t).download("export_"+Date.parse(i)+".pdf");unblockUI("#blockui_loading");r.pop("success","Εξαγωγή σε PDF","Το αρχείο export_"+Date.parse(i)+".pdf δημιουργήθηκε με επιτυχία.")},function(){unblockUI("#blockui_loading");r.pop("error","Παρουσιάστηκε σφάλμα","Η αίτηση δεν μπορεί να εκτυπωθεί.")})},1e3)};n.downloadTeacher=function(n){blockUI({target:"#blockui_loading",animate:!0});o(function(){e.getByParams({id:n.Id},"/api/HistoryAppl/getHistoryTemplateTeacherAsync").then(function(n){var i=new Date,t={},u;t=n;u=t;pdfMake.createPdf(t).download("export_"+Date.parse(i)+".pdf");unblockUI("#blockui_loading");r.pop("success","Εξαγωγή σε PDF","Το αρχείο export_"+Date.parse(i)+".pdf δημιουργήθηκε με επιτυχία.")},function(){unblockUI("#blockui_loading");r.pop("error","Παρουσιάστηκε σφάλμα","Η αίτηση δεν μπορεί να εκτυπωθεί.")})},1e3)};n.disOrEnablApplication=function(t){t.ActivatedBy=n.authentication.userName;t.Unitname=n.authentication.unitName;t.Role=n.authentication.role;var i=t;e.postByParams(i,"/api/HistoryAppl/disOrEnablApplication").then(function(){n.getGistory()},function(){r.pop("error","Παρουσιάστηκε σφάλμα","Δε πραγματοποιήθηκε η απενεργοποίηση της αίτησης")})};n.SaveUnsubscribeSubmission=function(t){var i={ApplicationData:t,RegionAndUnitDescription:n.authentication.unitName},u=i;t.ConfirmedBy=n.authentication.userName;t.Unitname=n.authentication.unitName;t.Role=n.authentication.role;e.postByParams(u,"/api/Intendancy/UnsubscribeSubmission").then(function(){n.getGistory()},function(){r.pop("error","Παρουσιάστηκε σφάλμα","Δε πραγματοποιήθηκε η αναίρεση της οριστικοποίησης της αίτησης")})};n.disApplication;n.disPerson;n.openModal=function(t,i){$("#ChechBoxForDisable").iCheck("uncheck");n.disableApplicationButton=!1;n.disPerson=i;n.showModalAction=!0;var r={};t.ApplicationTypeId!=8||t.IsActive!=!1||e.isValueInArray(e.getRoleCode(n.authentication.role),"a")||(r=s("filter")(n.applications,function(n){return n.ApplicationTypeId==8&&n.IsActive==1&&n.DidacticYear.ApplicationDidacticYear==!0}),n.showModalAction=e.isEmptyValue(r)?!0:!1);n.disApplication=t};n.openUnsubscribeSubmissionModal=function(t){n.disApplication=t;n.canUnsubscribeSubmission=!1;n.showModalAction=!1;e.getByParams({applicationId:t.ApplId},"/api/Intendancy/CheckIfCanUnsubscribeSubmission").then(function(t){n.canUnsubscribeSubmission=t;n.showModalAction=!0},function(){r.pop("error","Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την εύρεση των αιτήσεων.")})};n.deleteForTest=function(t){var i=t;e.postByParams(i,"/api/HistoryAppl/deleteApplication").then(function(){n.getGistory()},function(){r.pop("error","Παρουσιάστηκε σφάλμα","Δε έγινε η φόρτωση του ιστορικού")})};n.viewApplication=function(t,i=null){try{return n.viewApplicationInner(t,i)}catch(r){return!1}};n.viewApplicationInner=function(t,i=null){switch(t){case 1:return n.pageRules.sub.CanView;case 2:return n.pageRules.hourly.CanView;case 3:return n.pageRules.subSmea.CanView;case 4:return n.pageRules.hourlySmea.CanView;case 5:return n.pageRules.subMusic.CanView;case 6:return n.pageRules.hourlyMusic.CanView;case 7:return n.pageRules.secPyspde.CanView;case 8:return n.pageRules.secBody.CanView==!1?!1:e.isValueInArray(e.getRoleCode(n.authentication.role),"mk")?i?!0:!1:e.isValueInArray(e.getRoleCode(n.authentication.role),"m1,m2")?i?!1:!0:n.pageRules.secBody.CanView;case 9:return n.pageRules.secSmea.CanView;case 10:return n.pageRules.secArtistic.CanView;case 11:return n.pageRules.secMusic.CanView;case 12:return n.pageRules.secBody1920.CanView;case 13:return n.pageRules.secBodyRef.CanView;case 14:return n.pageRules.subRemediation.CanView;case 17:return n.pageRules.secChurch.CanView;case 18:return n.pageRules.secBodySep.CanView;case 19:return n.pageRules.prefecture.CanView;case 20:return n.pageRules.secKesy.CanView;case 21:return n.pageRules.intendancy.CanView;case 22:return n.pageRules.secBodyTechnical.CanView;case 23:return n.pageRules.subEEPEBP.CanView;case 28:return n.pageRules.subSchool.CanView;case 29:return n.pageRules.subSMEASchool.CanView;case 30:return n.pageRules.subEEPEBPSchool.CanView;case 35:return n.pageRules.subPE8702School.CanView;case 36:return n.pageRules.subRemediationMusic.CanView;case 37:return n.pageRules.subRemediationSMEA.CanView;case 38:return n.pageRules.subTE0130School.CanView;case 41:return n.pageRules.substitutePlacementSchool.CanView;case 42:return n.pageRules.secEEPEBP.CanView;case 43:return n.pageRules.secGeneral.CanView;default:return!0}};n.pdfExport=function(t,i=null){try{return n.pdfExportInner(t,i)}catch(r){return!1}};n.pdfExportInner=function(t,i=null){switch(t){case 1:return n.pageRules.sub.CanExport;case 2:return n.pageRules.hourly.CanExport;case 3:return n.pageRules.subSmea.CanExport;case 4:return n.pageRules.hourlySmea.CanExport;case 5:return n.pageRules.subMusic.CanExport;case 6:return n.pageRules.hourlyMusic.CanExport;case 7:return n.pageRules.secPyspde.CanExport;case 8:return n.pageRules.secBody.CanExport==!1?!1:e.isValueInArray(e.getRoleCode(n.authentication.role),"mk")?i?!0:!1:e.isValueInArray(e.getRoleCode(n.authentication.role),"m1,m2")?i?!1:!0:n.pageRules.secBody.CanExport;case 9:return n.pageRules.secSmea.CanExport;case 10:return n.pageRules.secArtistic.CanExport;case 11:return n.pageRules.secMusic.CanExport;case 12:return n.pageRules.secBody1920.CanExport;case 13:return n.pageRules.secBodyRef.CanExport;case 14:return n.pageRules.subRemediation.CanExport;case 17:return n.pageRules.secChurch.CanExport;case 18:return n.pageRules.secBodySep.CanExport;case 19:return n.pageRules.prefecture.CanExport;case 20:return n.pageRules.secKesy.CanExport;case 21:return n.pageRules.intendancy.CanExport;case 22:return n.pageRules.secBodyTechnical.CanExport;case 23:return n.pageRules.subEEPEBP.CanExport;case 28:return n.pageRules.subSchool.CanExport;case 29:return n.pageRules.subSMEASchool.CanExport;case 30:return n.pageRules.subEEPEBPSchool.CanExport;case 31:return n.pageRules.sub3months.CanExport;case 32:return n.pageRules.subSMEA3months.CanExport;case 33:return n.pageRules.subMusic3months.CanExport;case 34:return n.pageRules.subEEPEBP3months.CanExport;case 35:return n.pageRules.subPE8702School.CanExport;case 36:return n.pageRules.subRemediationMusic.CanExport;case 37:return n.pageRules.subRemediationSMEA.CanExport;case 38:return n.pageRules.subTE0130School.CanExport;case 41:return n.pageRules.substitutePlacementSchool.CanExport;case 42:return n.pageRules.secEEPEBP.CanExport;case 43:return n.pageRules.secGeneral.CanExport;default:return!0}};n.changeRegions=function(t){switch(t){case 1:return n.pageRules.sub.UpdateTransfer;case 2:return n.pageRules.hourly.UpdateTransfer;case 3:return n.pageRules.subSmea.UpdateTransfer;case 4:return n.pageRules.hourlySmea.UpdateTransfer;case 5:return n.pageRules.subMusic.UpdateTransfer;case 6:return n.pageRules.hourlyMusic.UpdateTransfer;case 23:return n.pageRules.subEEPEBP.UpdateTransfer;default:return!1}};n.disabledFunction=function(t,i,r,u){return t==21||t==28||t==29||t==30||t==35||t==38?n.viewApplication(t,u)&&i?!1:!0:t==43?n.viewApplication(t)&&(i||r)?!1:!0:n.viewApplication(t)&&r?!1:!0};n.insertSchools=function(t){switch(t){case 1:return n.pageRules.sub.UpdateSchools;case 3:return n.pageRules.subSmea.UpdateSchools;default:return!1}};n.disableOpenOtherActions=function(t){if(!t.DidacticYear.ApplicationDidacticYear)return!0;if(t.ApplicationTypeId==8){if(e.isValueInArray(e.getRoleCode(n.authentication.role),"mk"))return t.IsInMKAllowBody?!1:!0;if(e.isValueInArray(e.getRoleCode(n.authentication.role),"m1,m2"))return t.IsInMKAllowBody?!0:!1}return!t.DidacticYear.ApplicationDidacticYear};n.disableApplication=function(t,i){try{return n.disableApplicationInner(t,i)}catch(r){return!1}};n.disableApplicationInner=function(t,i){switch(t){case 1:return n.pageRules.sub.CanDisable;case 2:return n.pageRules.hourly.CanDisable;case 3:return n.pageRules.subSmea.CanDisable;case 4:return n.pageRules.hourlySmea.CanDisable;case 5:return n.pageRules.subMusic.CanDisable;case 6:return n.pageRules.hourlyMusic.CanDisable;case 7:return n.pageRules.secPyspde.CanDisable;case 8:return n.pageRules.secBody.CanDisable==!1?!1:e.isValueInArray(e.getRoleCode(n.authentication.role),"mk")?i?!0:!1:e.isValueInArray(e.getRoleCode(n.authentication.role),"m1,m2")?i?!1:!0:n.pageRules.secBody.CanDisable;case 9:return n.pageRules.secSmea.CanDisable;case 10:return n.pageRules.secArtistic.CanDisable;case 11:return n.pageRules.secMusic.CanDisable;case 12:return n.pageRules.secBody1920.CanDisable;case 13:return n.pageRules.secBodyRef.CanDisable;case 14:return n.pageRules.subRemediation.CanDisable;case 17:return n.pageRules.secChurch.CanDisable;case 18:return n.pageRules.secBodySep.CanDisable;case 19:return n.pageRules.prefecture.CanDisable;case 20:return n.pageRules.secKesy.CanDisable;case 21:return n.pageRules.intendancy.CanDisable;case 22:return n.pageRules.secBodyTechnical.CanDisable;case 23:return n.pageRules.subEEPEBP.CanDisable;case 24:return n.pageRules.hourlyMusicForEM16.CanDisable;case 25:return n.pageRules.permanentEEPEBP.CanDisable;case 26:return n.pageRules.educationDirectors.CanDisable;case 27:return n.pageRules.permanentSMEA.CanDisable;case 28:return n.pageRules.subSchool.CanDisable;case 29:return n.pageRules.subSMEASchool.CanDisable;case 30:return n.pageRules.subEEPEBPSchool.CanDisable;case 31:return n.pageRules.sub3months.CanDisable;case 32:return n.pageRules.subSMEA3months.CanDisable;case 33:return n.pageRules.subMusic3months.CanDisable;case 34:return n.pageRules.subEEPEBP3months.CanDisable;case 35:return n.pageRules.subPE8702School.CanDisable;case 36:return n.pageRules.subRemediationMusic.CanDisable;case 37:return n.pageRules.subRemediationSMEA.CanDisable;case 38:return n.pageRules.subTE0130School.CanDisable;case 39:return n.pageRules.permanent.CanDisable;case 40:return n.pageRules.permanentMusic.CanDisable;case 41:return n.pageRules.substitutePlacementSchool.CanDisable;case 42:return n.pageRules.secEEPEBP.CanDisable;case 43:return n.pageRules.secGeneral.CanDisable;default:return!0}};n.CanReDisable=function(t){switch(t){case 1:return n.pageRules.sub.CanReDisable;case 2:return n.pageRules.hourly.CanReDisable;case 3:return n.pageRules.subSmea.CanReDisable;case 4:return n.pageRules.hourlySmea.CanReDisable;case 5:return n.pageRules.subMusic.CanReDisable;case 6:return n.pageRules.hourlyMusic.CanReDisable;case 14:return n.pageRules.subRemediation.CanReDisable;case 23:return n.pageRules.subEEPEBP.CanReDisable;case 24:return n.pageRules.hourlyMusicForEM16.CanReDisable;case 25:return n.pageRules.permanentEEPEBP.CanReDisable;case 27:return n.pageRules.permanentSMEA.CanReDisable;case 28:return n.pageRules.subSchool.CanReDisable;case 29:return n.pageRules.subSMEASchool.CanReDisable;case 30:return n.pageRules.subEEPEBPSchool.CanReDisable;case 31:return n.pageRules.sub3months.CanReDisable;case 32:return n.pageRules.subSMEA3months.CanReDisable;case 33:return n.pageRules.subMusic3months.CanReDisable;case 34:return n.pageRules.subEEPEBP3months.CanReDisable;case 35:return n.pageRules.subPE8702School.CanReDisable;case 36:return n.pageRules.subRemediationMusic.CanReDisable;case 37:return n.pageRules.subRemediationSMEA.CanReDisable;case 38:return n.pageRules.subTE0130School.CanReDisable;case 39:return n.pageRules.permanent.CanReDisable;case 40:return n.pageRules.permanentMusic.CanReDisable;case 41:return n.pageRules.substitutePlacementSchool.CanReDisable;default:return!0}};n.UnsubscribeSubmission=function(t){switch(t){case 21:return n.pageRules.intendancy.CanUnsubscribeSubmission;default:return!1}};n.openOtherActionsModal=function(t){n.showActionDesctiption=!1;n.Message={showMessage:!1,Reason:null};n.action.Description=null;n.myAction=0;n.showButtonOk=!1;n.showButtonDelete=!1;n.action={};n.application=t;n.UpdateTransfer=!1;n.CanRecallSecondApp=!1;n.CanRevaluation=!1;n.CanObjection=!1;switch(t.ApplicationTypeId){case 7:n.UpdateTransfer=n.pageRules.secPyspde.UpdateTransfer&&t.IsConfirmed&&t.IsActive;n.CanRecallSecondApp=n.pageRules.secPyspde.CanRecallSecondApp&&t.IsConfirmed&&t.IsActive;n.CanRevaluation=n.pageRules.secPyspde.CanRevaluation&&t.IsConfirmed&&t.IsActive;n.CanObjection=n.pageRules.secPyspde.CanObjection&&t.IsConfirmed&&t.IsActive;break;case 8:var i=!0;e.isValueInArray(e.getRoleCode(n.authentication.role),"mk")&&(i=t.IsInMKAllowBody?!0:!1);e.isValueInArray(e.getRoleCode(n.authentication.role),"m1,m2")&&(i=t.IsInMKAllowBody?!1:!0);n.CanRecallSecondApp=i&&n.pageRules.secBody.CanRecallSecondApp&&t.IsConfirmed&&t.IsActive;n.CanRevaluation=i&&n.pageRules.secBody.CanRevaluation&&t.IsConfirmed&&t.IsActive;n.CanObjection=i&&n.pageRules.secBody.CanObjection&&t.IsConfirmed&&t.IsActive;break;case 9:n.UpdateTransfer=n.pageRules.secSmea.UpdateTransfer&&t.IsConfirmed&&t.IsActive;n.CanRecallSecondApp=n.pageRules.secSmea.CanRecallSecondApp&&t.IsConfirmed&&t.IsActive;n.CanRevaluation=n.pageRules.secSmea.CanRevaluation&&t.IsConfirmed&&t.IsActive;n.CanObjection=n.pageRules.secSmea.CanObjection&&t.IsConfirmed&&t.IsActive;break;case 10:n.CanRecallSecondApp=n.pageRules.secArtistic.CanRecallSecondApp&&t.IsConfirmed&&t.IsActive;n.CanRevaluation=n.pageRules.secArtistic.CanRevaluation&&t.IsConfirmed&&t.IsActive;n.CanObjection=n.pageRules.secArtistic.CanObjection&&t.IsConfirmed&&t.IsActive;break;case 11:n.CanRecallSecondApp=n.pageRules.secMusic.CanRecallSecondApp&&t.IsConfirmed&&t.IsActive;n.CanRevaluation=n.pageRules.secMusic.CanRevaluation&&t.IsConfirmed&&t.IsActive;n.CanObjection=n.pageRules.secMusic.CanObjection&&t.IsConfirmed&&t.IsActive;break;case 13:n.CanRecallSecondApp=n.pageRules.secBodyRef.CanRecallSecondApp&&t.IsConfirmed&&t.IsActive;n.CanRevaluation=n.pageRules.secBodyRef.CanRevaluation&&t.IsConfirmed&&t.IsActive;n.CanObjection=n.pageRules.secBodyRef.CanObjection&&t.IsConfirmed&&t.IsActive;break;case 17:n.CanRecallSecondApp=n.pageRules.secChurch.CanRecallSecondApp&&t.IsConfirmed&&t.IsActive;n.CanRevaluation=n.pageRules.secChurch.CanRevaluation&&t.IsConfirmed&&t.IsActive;n.CanObjection=n.pageRules.secChurch.CanObjection&&t.IsConfirmed&&t.IsActive;break;case 18:n.CanRecallSecondApp=n.pageRules.secBodySep.CanRecallSecondApp&&t.IsConfirmed&&t.IsActive;n.CanRevaluation=n.pageRules.secBodySep.CanRevaluation&&t.IsConfirmed&&t.IsActive;n.CanObjection=n.pageRules.secBodySep.CanObjection&&t.IsConfirmed&&t.IsActive;break;case 20:n.CanRecallSecondApp=n.pageRules.secKesy.CanRecallSecondApp&&t.IsConfirmed&&t.IsActive;n.CanRevaluation=n.pageRules.secKesy.CanRevaluation&&t.IsConfirmed&&t.IsActive;n.CanObjection=n.pageRules.secKesy.CanObjection&&t.IsConfirmed&&t.IsActive;break;case 42:n.UpdateTransfer=n.pageRules.secEEPEBP.UpdateTransfer&&t.IsConfirmed&&t.IsActive;n.CanRecallSecondApp=n.pageRules.secEEPEBP.CanRecallSecondApp&&t.IsConfirmed&&t.IsActive;n.CanRevaluation=n.pageRules.secEEPEBP.CanRevaluation&&t.IsConfirmed&&t.IsActive;n.CanObjection=n.pageRules.secEEPEBP.CanObjection&&t.IsConfirmed&&t.IsActive;break;default:n.UpdateTransfer=!1;n.CanRecallSecondApp=!1;n.CanRevaluation=!1;n.CanObjection=!1}};n.DeleteAction=function(t){n.action.ActionId=Number(n.myAction)-1;var i=s("filter")(t.PersonAction,{ActionId:n.action.ActionId},!0)[0];n.action.Id=i.Id;n.action.ApplicationTypeId=t.ApplicationTypeId;n.action.PersonId=t.PersonId;n.action.ApplicationId=t.ApplId;e.postByParams(n.action,"/api/SecondmentManagment/deleteSecondmentPersonAction").then(function(){var r=s("filter")(n.applications,{ApplId:t.ApplId},!0)[0],u=t.PersonAction.indexOf(i);n.applications[n.applications.indexOf(r)].PersonAction.splice(u,1)}).catch(function(n){r.pop("error","Παρουσιάστηκε σφάλμα",n.data)})};n.doAction=function(u){var f;n.showActionDesctiption=!1;switch(n.myAction){case"1":i.setApplicationId(u.ApplId);i.setApplicationTypeId(u.ApplicationTypeId);i.setPersonId(u.PersonId);t.go("secondmentUpdateTransfer");break;case"2":n.action.PersonId=u.PersonId;n.action.PersonId=u.PersonId;n.action.ApplicationId=u.ApplId;n.action.ApplicationTypeId=u.ApplicationTypeId;n.action.ActionId=Number(n.myAction)-1;n.action.ApplicationHistoryId=u.Id;n.action.ActionDescription=e.isEmptyValue(n.action.Description)?"Δεν έχετε δηλώσει αιτιολογία":n.action.Description;f=s("filter")(u.PersonAction,{ActionId:n.action.ActionId},!0)[0];f?(n.action.Id=f.Id,n.action.Creationdate=f.CreationDate,n.action.CreatedBy=f.CreatedBy,e.postByParams(n.action,"/api/SecondmentManagment/updateSecondmentPersonAction").then(function(){n.action.CreationDateString=s("date")(new Date,"dd/MM/yyyy HH:mm");n.action.Action="Ένσταση";var t=s("filter")(n.applications,{ApplId:n.action.ApplicationId},!0)[0],i=u.PersonAction.indexOf(f);n.applications[n.applications.indexOf(t)].PersonAction.splice(i,1);n.applications[n.applications.indexOf(t)].PersonAction.push(n.action)}).catch(function(n){r.pop("error","Παρουσιάστηκε σφάλμα",n.data)})):e.postByParams(n.action,"/api/SecondmentManagment/insertSecondmentPersonAction").then(function(){var t,i;n.action.CreationDateString=s("date")(new Date,"dd/MM/yyyy HH:mm");n.action.Action="Ένσταση";t=new Date;n.action.CreationDate=t.getFullYear()+"-"+("0"+(t.getMonth()+1)).slice(-2)+"-"+("0"+t.getDate()).slice(-2);n.action.CreatedBy=n.authentication.userName;i=s("filter")(n.applications,{ApplId:n.action.ApplicationId},!0)[0];n.applications[n.applications.indexOf(i)].PersonAction.push(n.action)}).catch(function(n){r.pop("error","Παρουσιάστηκε σφάλμα",n.data)});break;case"3":n.action.PersonId=u.PersonId;n.action.PersonId=u.PersonId;n.action.ApplicationId=u.ApplId;n.action.ApplicationTypeId=u.ApplicationTypeId;n.action.ActionId=Number(n.myAction)-1;n.action.ApplicationHistoryId=u.Id;n.action.ActionDescription=e.isEmptyValue(n.action.Description)?"Δεν έχετε δηλώσει αιτιολογία":n.action.Description;f=s("filter")(u.PersonAction,{ActionId:n.action.ActionId},!0)[0];f?(n.action.Id=f.Id,n.action.Creationdate=f.CreationDate,n.action.CreatedBy=f.CreatedBy,e.postByParams(n.action,"/api/SecondmentManagment/updateSecondmentPersonAction").then(function(){n.action.CreationDateString=s("date")(new Date,"dd/MM/yyyy HH:mm");n.action.Action="Επανεξέταση";var t=s("filter")(n.applications,{ApplId:n.action.ApplicationId},!0)[0],i=u.PersonAction.indexOf(f);n.applications[n.applications.indexOf(t)].PersonAction.splice(i,1);n.applications[n.applications.indexOf(t)].PersonAction.push(n.action)}).catch(function(n){r.pop("error","Παρουσιάστηκε σφάλμα",n.data)})):e.postByParams(n.action,"/api/SecondmentManagment/insertSecondmentPersonAction").then(function(){var t,i;n.action.CreationDateString=s("date")(new Date,"dd/MM/yyyy HH:mm");n.action.Action="Επανεξέταση";t=new Date;n.action.CreationDate=t.getFullYear()+"-"+("0"+(t.getMonth()+1)).slice(-2)+"-"+("0"+t.getDate()).slice(-2);n.action.CreatedBy=n.authentication.userName;i=s("filter")(n.applications,{ApplId:n.action.ApplicationId},!0)[0];n.applications[n.applications.indexOf(i)].PersonAction.push(n.action)}).catch(function(n){r.pop("error","Παρουσιάστηκε σφάλμα",n.data)});break;case"4":n.action.PersonId=u.PersonId;n.action.PersonId=u.PersonId;n.action.ApplicationId=u.ApplId;n.action.ApplicationTypeId=u.ApplicationTypeId;n.action.ActionId=Number(n.myAction)-1;n.action.ApplicationHistoryId=u.Id;n.action.ActionDescription=e.isEmptyValue(n.action.Description)?"Δεν έχετε δηλώσει αιτιολογία":n.action.Description;f=s("filter")(u.PersonAction,{ActionId:n.action.ActionId},!0)[0];f?(n.action.Id=f.Id,n.action.Creationdate=f.CreationDate,n.action.CreatedBy=f.CreatedBy,e.postByParams(n.action,"/api/SecondmentManagment/updateSecondmentPersonAction").then(function(){n.action.CreationDateString=s("date")(new Date,"dd/MM/yyyy HH:mm");n.action.Action="Αίτηση Ανάκλησης Απόσπασης";var t=s("filter")(n.applications,{ApplId:n.action.ApplicationId},!0)[0],i=u.PersonAction.indexOf(f);n.applications[n.applications.indexOf(t)].PersonAction.splice(i,1);n.applications[n.applications.indexOf(t)].PersonAction.push(n.action)}).catch(function(n){r.pop("error","Παρουσιάστηκε σφάλμα",n.data)})):e.postByParams(n.action,"/api/SecondmentManagment/insertSecondmentPersonAction").then(function(){var t,i;n.action.CreationDateString=s("date")(new Date,"dd/MM/yyyy HH:mm");n.action.Action="Αίτηση Ανάκλησης Απόσπασης";t=new Date;n.action.CreationDate=t.getFullYear()+"-"+("0"+(t.getMonth()+1)).slice(-2)+"-"+("0"+t.getDate()).slice(-2);n.action.CreatedBy=n.authentication.userName;i=s("filter")(n.applications,{ApplId:n.action.ApplicationId},!0)[0];n.applications[n.applications.indexOf(i)].PersonAction.push(n.action)}).catch(function(n){r.pop("error","Παρουσιάστηκε σφάλμα",n.data)})}};n.changeOption=function(t){var i;n.showActionDesctiption=!1;n.Message={showMessage:!1,Reason:null};n.action.Description=null;n.showButtonOk=!1;n.showButtonDelete=!1;switch(n.myAction){case"1":e.getByParams({actionId:Number(n.myAction)-1,personId:t.PersonId,applicationTypeId:t.ApplicationTypeId,didacticYear:n.applicationDidacticYear.Id},"/api/SecondmentManagment/canHaveAccessToActions").then(function(t){t.canDoAction?n.showButtonOk=!0:(n.Message.showMessage=!0,n.Message.Reason=t.Reason,n.showButtonOk=!1)},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία ελέγχου δικαιωμάτων πρόσβασης",3e3,"trustedHtml")});break;case"2":i=s("filter")(t.PersonAction,{ActionId:Number(n.myAction)-1},!0)[0];i?(n.showActionDesctiption=!0,n.showButtonDelete=!0,n.showButtonOk=!0,n.action.Description=i.ActionDescription):e.getByParams({actionId:Number(n.myAction)-1,personId:t.PersonId,applicationTypeId:t.ApplicationTypeId,didacticYear:n.applicationDidacticYear.Id},"/api/SecondmentManagment/canHaveAccessToActions").then(function(t){t.canDoAction?(n.showActionDesctiption=!0,n.showButtonDelete=!1,n.showButtonOk=!0):(n.Message.showMessage=!0,n.Message.Reason=t.Reason,n.showButtonOk=!1,n.showButtonDelete=!1)},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία ελέγχου δικαιωμάτων πρόσβασης",3e3,"trustedHtml")});break;case"3":i=s("filter")(t.PersonAction,{ActionId:Number(n.myAction)-1},!0)[0];i?(n.showActionDesctiption=!0,n.showButtonDelete=!0,n.showButtonOk=!0,n.action.Description=i.ActionDescription):e.getByParams({actionId:Number(n.myAction)-1,personId:t.PersonId,applicationTypeId:t.ApplicationTypeId,didacticYear:n.applicationDidacticYear.Id},"/api/SecondmentManagment/canHaveAccessToActions").then(function(t){t.canDoAction?(n.showButtonOk=!0,n.showButtonDelete=!1,n.showActionDesctiption=!0):(n.Message.showMessage=!0,n.Message.Reason=t.Reason,n.showButtonOk=!1,n.showButtonDelete=!1)},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία ελέγχου δικαιωμάτων πρόσβασης",3e3,"trustedHtml")});break;case"4":i=s("filter")(t.PersonAction,{ActionId:Number(n.myAction)-1},!0)[0];i?(n.showActionDesctiption=!0,n.showButtonOk=!0,n.showButtonDelete=!0,n.action.Description=i.ActionDescription):e.getByParams({actionId:Number(n.myAction)-1,personId:t.PersonId,applicationTypeId:t.ApplicationTypeId,didacticYear:n.applicationDidacticYear.Id},"/api/SecondmentManagment/canHaveAccessToActions").then(function(t){t.canDoAction?(n.showActionDesctiption=!0,n.showButtonOk=!0,n.showButtonDelete=!1):(n.Message.showMessage=!0,n.Message.Reason=t.Reason,n.showButtonOk=!1,n.showButtonDelete=!1)},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία ελέγχου δικαιωμάτων πρόσβασης",3e3,"trustedHtml")})}};n.editDyep=function(n){e.getByParams({personId:n.PersonId,applId:n.ApplId,applicationTypeId:n.ApplicationTypeId,CreateDate:n.CreationDate,ModifyDate:n.LastEditDate},"/api/HistoryAppl/CheckApplSubstituteRefSubFek").then(function(u){u?(i.setApplicationId(n.ApplId),i.setPersonId(n.PersonId),t.go("updateSubstituteRefRegions")):r.pop("warning","Αδναμία πρόσβασης","Δεν έχετε δικαίωματα εισαγωγής/τροποποίησης των περιοχών ΔΥΕΠ",3e3,"trustedHtml")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία ελέγχου δικαιωμάτων πρόσβασης",3e3,"trustedHtml")})};n.editRegions=function(n){i.setPersonId(n.PersonId);i.setApplicationId(n.ApplId);i.setApplicationTypeId(n.ApplicationTypeId);i.setTrackId(n.Level.Id);t.go("UpdateRegions")};n.editSchools=function(n){i.setPersonId(n.PersonId);i.setApplicationId(n.ApplId);i.setApplicationTypeId(n.ApplicationTypeId);i.setTrackId(n.Level.Id);t.go("substituteForSchool")};n.PersonAssignmentInfo={};n.GetPersonAssignmentInfoAsync=function(t){n.pageRules.substitutePlacementSchool.ShowAssignment?e.postByParams({ApplicationId:t},"/api/ApplSubstitutePlacementSchool/GetPersonAssignmentInfoAsync").then(function(t){t.success?(n.PersonAssignmentInfo=t.data,$("#modalPersonAssignmentInfo").modal("show")):r.pop("error","Παρουσιάστηκε σφάλμα","Πρόβλημα κατά την ανάκτηση των στοιχείων τοποθέτησης")},function(){r.pop("error","Παρουσιάστηκε σφάλμα","Πρόβλημα κατά την ανάκτηση των στοιχείων τοποθέτησης")}):r.pop("info","Προς το παρόν δεν έχετε πρόσβαση σε αυτή την ενέργεια")}};HistoryController.$inject=["$scope","$state","PassParameters","toaster","RouteFactory","LandingPageFactory","GeneralFactory","$timeout","$filter"];HomePageController=function(n,t,i,r,u,f,e,o,s){var h;if(n.loginData={userName:"",password:"",role:"",useRefreshTokens:!0,selectRole:!1},n.message="",n.jsonData=[],n.announcements=[],n.deviceDetector=f,n.DisableLoginRegister=!1,n.DisableLoginRegisterMSG="",n.showBtnAllNews=!1,n.pendingAdas=[],!u.isEmptyValue(n.deviceDetector))if(n.deviceDetector.os!="windows"&&(u.isValueInArray(n.deviceDetector.os,"ios, android, unix, firefox-os, chrome-os, windows-phone, ps4, vita, unknown")||u.isValueInArray(n.deviceDetector.device,"android, ipad, iphone, ipod, blackberry, firefox-os, chrome-book, windows-phone, ps4, vita")))n.DisableLoginRegister=!0,n.DisableLoginRegisterMSG='<p style="text-align:justify;"><i class="fa fa-exclamation-triangle" style="font-size:large;"><\/i> ΠΡΟΣΟΧΗ: Η συσκευή σας δεν υποστηρίζεται και δεν είναι δυνατή η σύνδεσή σας. Παρακαλούμε δοκιμάστε από κάποιο σταθερό υπολογιστή.<\/p>';else{switch(n.deviceDetector.browser){case"chrome":h=n.deviceDetector.browser_version.split(".");h[0]<49&&(n.DisableLoginRegister=!0,n.DisableLoginRegisterMSG='<p style="text-align:justify;"><i class="fa fa-exclamation-triangle" style="font-size:large;"><\/i> ΠΡΟΣΟΧΗ: Χρησιμοποιείτε την έκδοση <b>'+n.deviceDetector.browser_version+"<\/b> από τον browser <b>Google Chrome<\/b> που δεν υποστηρίζεται από το σύστημά μας.<\/p>");break;case"firefox":h=n.deviceDetector.browser_version.split(".");h[0]<44&&(n.DisableLoginRegister=!0,n.DisableLoginRegisterMSG='<p style="text-align:justify;"><i class="fa fa-exclamation-triangle" style="font-size:large;"><\/i> ΠΡΟΣΟΧΗ: Χρησιμοποιείτε την έκδοση <b>'+n.deviceDetector.browser_version+"<\/b> από τον browser <b>Mozilla Firefox<\/b> που δεν υποστηρίζεται από το σύστημά μας.<\/p>");break;case"safari":h=n.deviceDetector.browser_version.split(".");h[0]<5&&(n.DisableLoginRegister=!0,n.DisableLoginRegisterMSG='<p style="text-align:justify;"><i class="fa fa-exclamation-triangle" style="font-size:large;"><\/i> ΠΡΟΣΟΧΗ: Χρησιμοποιείτε την έκδοση <b>'+n.deviceDetector.browser_version+"<\/b> από τον browser <b>Safari<\/b> που δεν υποστηρίζεται από το σύστημά μας.<\/p>");break;case"opera":h=n.deviceDetector.browser_version.split(".");h[0]<35&&(n.DisableLoginRegister=!0,n.DisableLoginRegisterMSG='<p style="text-align:justify;"><i class="fa fa-exclamation-triangle" style="font-size:large;"><\/i> ΠΡΟΣΟΧΗ: Χρησιμοποιείτε την έκδοση <b>'+n.deviceDetector.browser_version+"<\/b> από τον browser <b>Opera<\/b> που δεν υποστηρίζεται από το σύστημά μας.<\/p>");break;case"ie":h=n.deviceDetector.browser_version.split(".");h[0]<10&&(n.DisableLoginRegister=!0,n.DisableLoginRegisterMSG='<p style="text-align:justify;"><i class="fa fa-exclamation-triangle" style="font-size:large;"><\/i> ΠΡΟΣΟΧΗ: Χρησιμοποιείτε την έκδοση <b>'+n.deviceDetector.browser_version+"<\/b> από τον browser <b>Internet Explorer<\/b> που δεν υποστηρίζεται από το σύστημά μας.<\/p>");break;case"ms-edge":break;case"ps4":n.DisableLoginRegister=!0;n.DisableLoginRegisterMSG='<p style="text-align:justify;"><i class="fa fa-exclamation-triangle" style="font-size:large;"><\/i> ΠΡΟΣΟΧΗ: Χρησιμοποιείτε την έκδοση <b>'+n.deviceDetector.browser_version+"<\/b> από τον browser <b>Ps4<\/b> που δεν υποστηρίζεται από το σύστημά μας.<\/p>";break;case"vita":n.DisableLoginRegister=!0;n.DisableLoginRegisterMSG='<p style="text-align:justify;"><i class="fa fa-exclamation-triangle" style="font-size:large;"><\/i> ΠΡΟΣΟΧΗ: Χρησιμοποιείτε την έκδοση <b>'+n.deviceDetector.browser_version+"<\/b> από τον browser <b>Vita<\/b> που δεν υποστηρίζεται από το σύστημά μας.<\/p>";break;case"unknown":n.DisableLoginRegister=!0;n.DisableLoginRegisterMSG='<p style="text-align:justify;"><i class="fa fa-exclamation-triangle" style="font-size:large;"><\/i> ΠΡΟΣΟΧΗ: Η έκδοση του browser που χρησιμοποιείτε δεν υποστηρίζεται από το σύστημά μας.<\/p>';break;default:n.DisableLoginRegister=!0;n.DisableLoginRegisterMSG='<p style="text-align:justify;"><i class="fa fa-exclamation-triangle" style="font-size:large;"><\/i> ΠΡΟΣΟΧΗ: Η έκδοση του browser που χρησιμοποιείτε δεν υποστηρίζεται από το σύστημά μας.<\/p>'}n.DisableLoginRegisterMSG!=""&&(n.DisableLoginRegisterMSG+="<p>Η εφαρμογή υποστηρίζει όλους τους φυλλομετρητές νέας τεχνολογίας:<\/p><ul><li>Microsoft Edge όλες τις εκδόσεις<\/li><li>Internet Explorer έκδοση 10 ή μεταγενέστερο<\/li><li>Google Chrome έκδοση 49 ή μεταγενέστερο<\/li><li>Mozilla Firefox έκδοση 44 ή μεταγενέστερο<\/li><li>Safari έκδοση 5.1 ή μεταγενέστερο<\/li><li>Opera έκδοση 35 ή μεταγενέστερο<\/li><\/ul><p>Σας προτείνουμε να ενημερώνετε τακτικά τον browser που χρησιμοποιείτε στην πιο πρόσφατη έκδοσή του, προκειμένου να έχετε το καλύτερο δυνατό αποτέλεσμα σε ασφάλεια και λειτουργικότητα.<\/p>")}n.login=function(){n.message="";i.login(n.loginData).then(function(t){n.logData={UserId:t.userId,PersonId:t.personId,UserName:t.userName,Role:t.role,UnitName:t.unitName,RegionAndUnitId:t.regionAndUnitId,LoginDateTime:null,UserIP:null,OS:n.deviceDetector.os,OSVersion:n.deviceDetector.os_version,Browser:n.deviceDetector.browser,BrowserVersion:n.deviceDetector.browser_version,Device:n.deviceDetector.device};var r=n.logData;u.postByParams(r,"/api/Account/LoginLog").then(function(){}),function(){};u.isValueInArray(u.getRoleCode(n.authentication.role),"u2");n.loginData={};u.isValueInArray(u.getRoleCode(n.authentication.role),"d1, d2, p, m1, m2, a")&&u.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/RecruitmentServiceAssumed/getPendingSubstitutes").then(function(t){if(n.pendingAdas=t,n.pendingAdas.length>0){s.setArray(n.pendingAdas);var i=e.open({templateUrl:"ModalContentIndex.html",controller:OpenModalPendingAdasController});i.result.then(function(){},function(){o.info("Modal dismissed at: "+new Date)})}},function(){toaster.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης των Α.Δ.Α. που εκκρεμούν")});i.fillAuthData();n.checkIsPermanentHasEEPEBPMain();u.getByAll("api/LandingPage/getCurrentDidacticYear").then(function(t){n.didacticYear=t},function(){toaster.pop("warning"," Παρουσιάστηκε σφάλμα","Υπήρξε πρόβλημα κατά την φόρτωση του διδακτικού έτους")});u.getByAll("api/LandingPage/getApplicationDidacticYear").then(function(t){n.applicationDidacticYear=t},function(){toaster.pop("warning"," Παρουσιάστηκε σφάλμα","Υπήρξε πρόβλημα κατά την φόρτωση του διδακτικού έτους των αιτήσεων")})},function(t){t.data.error=="MultipleRoles"?(n.jsonData=angular.fromJson(t.data.error_description),n.loginData.selectRole=!0):n.message=t.data.error_description})};n.getTopFiveAnnouncementsAsync=function(){blockUI({target:"#loadNews",animate:!0});u.getByAll("/api/General/getTopFiveAnnouncements").then(function(t){n.announcements=t;unblockUI("#loadNews");n.showBtnAllNews=!0},function(){unblockUI("#loadNews");toaster.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία φόρτωσης ανακοινώσεων")})};n.getTopFiveAnnouncementsAsync()};HomePageController.$inject=["$scope","$location","AuthService","ngAuthSettings","GeneralFactory","deviceDetector","$uibModal","$log","PassParameters"];HourlyTeacherController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y){if(n.mess="",n.messInfo="",n.hourlyTeacher={IsTemporaryStored:!0},n.person={},n.perspec={},n.SelectedSpecs=[],n.applicationType=2,n.step1=!0,n.step2=!1,n.continueDisabled=!0,n.intendancies=[],n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.ValidPersonForAppl=[],n.LevelList=[],n.hasValidFekNoConfirmSpeciality=!1,n.showAddEditForm=0,n.userLevel=0,n.DisableDLevel=!1,n.showToConfirmSpeciality=!1,n.alerts="",n.canSave=!0,n.IsCivilServant=!1,n.showCivilServantFull=!1,n.protocol="",n.showProtocol=!1,n.SelectedAvailRegionsItems=[],n.SelectedSelectedRegionsListItems=[],n.SelectedRegionsListItems=[],n.AvailableSpecListItems=[],n.AvailableRegionsListItems=[],n.applHourly=[],n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.hasboth=!1,n.hasMusicSpeciality=!1,n.ArtisticList=[384],n.regionsFor={IsArtistic:!1},n.showAlertSpec=!1,n.showAlertRegion=!1,n.applicationLevelId=0,n.fek={},blockUI({target:"#divBlockUI",animate:!0}),y.isValueInArray(y.getRoleCode(n.authentication.role),"d1, d2")&&(n.userLevel=n.authentication.levelId,n.hourlyTeacher.LevelId=n.authentication.levelId,n.hourlyTeacher.IntendancyId=n.authentication.regionAndUnitId),n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.authentication.isAuth){var p="hourly";y.getByParams({role:n.authentication.role,codes:p},"/api/Subsystem/NewCheckPermission").then(function(r){var u=p.split(","),e,s;for(e in u)n.pageRules[u[e]]=t("filter")(r,{Code:u[e]},!0)[0].Rules;n.hourlyTeacher.Id=f.getApplicationId();n.applicationLevelId=f.getApplicationLevelId();y.isEmptyValue(n.hourlyTeacher.Id)?(n.step1=!0,n.step2=!1):(n.step1=!1,n.step2=!0);y.isEmptyValue(n.applicationLevelId)&&(n.applicationLevelId=0);f.resetApplication();n.hourlyTeacher.PersonId=f.getPersonId();y.isValueInArray(n.pageRules.hourly.CanAccess,"u1, u2")&&(n.hourlyTeacher.PersonId=n.authentication.personId);s=i.all([y.getByParams({personId:n.hourlyTeacher.PersonId},"/api/ApplHourlyTeacher/getSpecialityForHourly"),y.getByParams({Id:n.hourlyTeacher.PersonId},"/api/ApplHourlyTeacher/GetApplHourly")]);s.then(function(i){var u,r;for(angular.copy(i[0],n.AvailableSpecListItems),n.applHourly=i[1],r=n.AvailableSpecListItems.length-1;r>=0;r--)n.AvailableSpecListItems[r].applHourly=0;for(u=n.applHourly.length-1;u>=0;u--)for(r=n.AvailableSpecListItems.length-1;r>=0;r--)n.applHourly[u].SpecialityId==n.AvailableSpecListItems[r].Id&&(n.AvailableSpecListItems[r].applHourly=1);y.isEmpty(n.AvailableSpecListItems)?(n.mess+="<li>Δεν μπορείτε να υποβάλετε αίτηση. Δεν βρίσκεστε στον ενιαίο πίνακα για κάποιον κλάδο<\/li>",n.showAddEditForm=2):n.hourlyTeacher.Id!=null&&n.hourlyTeacher.Id!=""&&n.hourlyTeacher.Id!="undefined"?(y.isEmptyValue(n.hourlyTeacher.SpecialityId)&&(n.hourlyTeacher.SpecialityId=f.getSpecialityId()),y.getByParams({applicationTypeId:n.applicationType,specialityId:n.hourlyTeacher.SpecialityId},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(i){n.SelectedSpecListItems=t("filter")(n.AvailableSpecListItems,{Id:n.hourlyTeacher.SpecialityId},!0)[0];!y.isEmptyValue(i)||y.isValueInArray(y.getRoleCode(n.authentication.role),"a")?(n.canUpdateAppl=!0,n.showAddEditForm=1,n.getApplication()):(n.mess+="<li>Δεν μπορείτε να τροποποιήσετε την αίτηση γιατί δεν υπάρχει ανοιχτό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2)},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(n.canInsertAppl=!0,n.showAddEditForm=1)})},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml");unblockUI("#divBlockUI")})}else e.go("/");n.checkForBoth=function(){n.hasboth=n.SelectedSpecListItems.IsBoth==!0?!0:!1};n.checkCivilServant=function(){n.IsCivilServant==1?n.showCivilServantFull=!1:(n.hourlyTeacher.PublicServantFull=0,n.showCivilServantFull=!0)};n.checkForRegions=function(){n.regionsFor.IsArtistic=!1;n.regionsFor.IsArtistic=n.ArtisticList.indexOf(n.hourlyTeacher.SpecialityId)!=-1?!0:!1};n.showCivilServantBlock=function(){return n.IsCivilServant==!0?!0:!1};n.getApplRegions=function(){n.hourlyTeacher.RegionAndUnitId>0?(n.AvailableRegionsListItems=[],n.hasboth?(blockUI({target:"#divBlockUIRegion",animate:!0}),y.getByParams({municipalityId:n.hourlyTeacher.RegionAndUnitId,applicationTypeId:n.applicationType,sex:n.person.Sex},"/api/ApplicationTypeRegionAndUnit/getTypeRegionAndUnitByMunicipalityAndBothHourly").then(function(i){angular.copy(i,n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.checkForRegions();n.regionsFor.IsArtistic||(n.AvailableRegionsListItems=t("filter")(n.AvailableRegionsListItems,{IsArtistic:!1},!0));n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(blockUI({target:"#divBlockUIRegion",animate:!0}),y.getByParams({municipalityId:n.hourlyTeacher.RegionAndUnitId,applicationTypeId:n.applicationType,level:n.hourlyTeacher.LevelId,sex:n.person.Sex},"/api/ApplicationTypeRegionAndUnit/getTypeRegionAndUnitByMunicipalityHourly").then(function(i){angular.copy(i,n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.checkForRegions();n.regionsFor.IsArtistic||(n.AvailableRegionsListItems=t("filter")(n.AvailableRegionsListItems,{IsArtistic:!1},!0));n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}))):(unblockUI("#divBlockUIRegion"),n.AvailableRegionsListItems=[],n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[])};n.createTemplate=function(){return{content:[{style:"tableExample",table:{widths:["*"],body:[[{stack:[{text:"\nΑΙΤΗΣΗ / ΔΗΛΩΣΗ ΠΡΟΤΙΜΗΣΕΩΝ ΥΠΟΨΗΦΙΩΝ\nα.ΑΝΑΠΛΗΡΩΤΩΝ ΕΚΠΑΙΔΕΥΤΙΚΩΝ, β.ΩΡΟΜΙΣΘΙΩΝ ΕΚΠΑΙΔΕΥΤΙΚΩΝ\nΣΧΟΛΙΚΟΥ ΕΤΟΥΣ 2014-15",style:"header",alignment:"center"},{text:["Της ",{text:"αριθμ. 118102/Δ1/25.07.2014 (ΑΔΑ: Β3Ξ69-ΣΦΤ)",bold:!0}," εγκυκλίου του Υ.ΠΑΙ.Θ.\n"],fontSize:9},{text:"(επέχει θέση Υπεύθυνης Δήλωσης του Ν.1599/86)\n\n",fontSize:9}]}]]}},{style:"tableExample",table:{widths:["auto","*"],body:[[{text:["δια μέσου της Διεύθυνσης : ",{text:"Δ.Ε. Αχαΐας",bold:!0}],fontSize:9},{text:["Αρ. Πρωτοκόλου : ",{text:"1234567890",bold:!0}],fontSize:9,alignment:"right"}],[{text:"(συμπληρώνονται αυτόματα κατά την καταχώρηση της αίτησης)\n\n",fontSize:6},{text:["Ημερομηνία : ",{text:"20/04/2015",bold:!0}],fontSize:9,alignment:"right"}]]},layout:"noBorders"},{text:"\nΠΡΟΣΩΠΙΚΑ ΣΤΟΙΧΕΙΑ",style:"header",alignment:"center"},{style:"tableExample",table:{widths:["*"],body:[[{stack:[{style:"tableExample",table:{widths:["*","*"],body:[[{text:["Α.Φ.Μ : ",{text:"000000024",bold:!0}],fontSize:9},{text:["Α.Δ.Τ : ",{text:"ΑΖ 711210",bold:!0}],fontSize:9}],[{text:["ΕΠΩΝΥΜΟ : ",{text:"ΠΕΤΡΟΠΟΥΛΟΣ",bold:!0}],fontSize:9},{text:["ΟΝΟΜΑ : ",{text:"ΔΗΜΗΤΡΗΣ",bold:!0}],fontSize:9}],[{columns:[{width:90,text:"ΠΟΛΥΤΕΚΝΟΣ ",fontSize:9,alignment:"right"},{width:"*",image:"imgUncheckedBox",width:12,height:12},{width:90,text:"ΤΡΙΤΕΚΝΟΣ ",fontSize:9,alignment:"right"},{width:"*",image:"imgCheckedBox",width:12,height:12},{width:120,text:"ΠΑΙΔΑΓΩΓΙΚΗ ΚΑΤΑΡΤΙΣΗ ",fontSize:9,alignment:"right"},{width:"*",image:"imgUncheckedBox",width:12,height:12},{width:120,text:"ΔΗΜΟΣΙΟΣ ΥΠΑΛΛΗΛΟΣ ",fontSize:9,alignment:"right"},{width:"*",image:"imgCheckedBox",width:12,height:12}],colSpan:2}]]},layout:"noBorders"}]}]]}}],styles:{header:{fontSize:12,bold:!0,margin:[0,0,0,10]},subheader:{fontSize:16,bold:!0,margin:[0,10,0,5]},tableExample:{margin:[0,5,0,15]},tableHeader:{bold:!0,fontSize:13,color:"black"}},images:{imgCheckedBox:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAEQkAABEJABiazSuAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAACAASURBVHic7d153GZ1Xf/x14wDCDngkixiYC6AaUr1Ke3nhqBomSZlJaaACqiEggq44oaKIioaoqIijAtaJq5pJAhuKX1KNCshlyBlc0EHZRmGmd8f5wzes97bdV2fc67zej4e98Px4dzX9Z4R7s/7+p7v+Z4la9euRaMRETsDewB7ArsB2wPLZ/nauiSsJNVbBVw3y9dK4HLgEuDSzLyqJur0WWIBmJ+I2JZmwO/Jr4b9ul9vXxhNkoZgJXApTSG4ZOavM/OGymB9YwGYRURsAzwQ2Lf9egCwVWkoSdKGbga+Bpzffn01M2+qjdRtFoANRMQyIICH0wz8BwHbloaSJM3XDcCXacrA54HMzNW1kbrFAsCty/p/ChxIM/iX1yaSJI3YdTRF4Gzg414uGHABiIglwEOBg4An4PV7SRqKlcBHgBXAFzJzkINwcAUgIvYEngI8Gdi9OI4kqdZlwPuB92XmJdVhJmkQBaDdyHcw8HTgD4rjSJK66SLgPcBZQ9hAONUFICK2Aw4HjgXuUhxHktQPVwBvAE7PzOurw4zLVBaAiFgOHAE8D9ixOI4kqZ+uAd4EnJaZ11WHGbWpKgARcQfgOcBRwB2K40iSpsO1wFuAt2bmtdVhRmUqCkD7if9FwJF4C58kaTyuA04FTpyGFYHeF4CIeCLwRrzGL0majCu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AJy/hYNs1GNZnEMuACy/GzPspqk7ZMcfDIDxsYHnbPk463ezj/0BMBXjTrq59RxrcM7KRwSvPALwkiRP+ZzgxOxLckPrIQDgMDdk2FFTdkKGXZ/k0ABYhMP/d9Raf9R6CABYadxNd7SeYw0O7vpFC4BbWw8AAEexCDvq0AAYbxH44mbjrM3DSe5sPQQAHMWdGXbVlL34wG2BDxwBODPJ09rNsya31VoX5Y5LAHRm3FG3tZ5jFU/LsPMPCYCpW4RDKwD0bRF21SEBcEbDQdbiB7XWe1sPAQDHMu6qH7SeYxVnJItzBOCu1gMAwBpNfWct1CmAXa0HAIA1mvrOWphTAPsz/f+ZAHDArgy7a6rOSJJtL3rRi05N8uPGwxzLd2qtZ7ceAgDWqpRyb5IXtp7jGJ65PdP+7T9J7m49AACs092tB1jFGdsz/fP/32s9AACs09R315nbk5zWeopV7G49AACs09R312nbk+xsPcUq7ms9AACs09R3187tSXa0nuIY9tRaH2o9BACsx7i79rSe4xh2TD0Apl5QAHA0U95hkw+A+1sPAAAbNOUdNvkAmPLhEwA4linvMAEAAHMy5R0mAABgTqa8wwQAAMzJlHeYAACAOZnyDtuxPcnxrac4hn2tBwCADZryDjt+++p/BwBYNgIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQ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uMAsBwezXAB+odqrY+2HmZWlioADhiPCFyZ5C+SnNx4HAAW0yNJPpDkpmX4jf9wSxkAB5RSTkxyRZJ3xDUCAKzNg0nen+TmWutjrYeZl6UOgANKKU9PcnmSNyf53cbjADBN30rykSS3TOWJffPURQCsVEo5M8mbklya5PTG4wDQ1v0ZnkD70Vrr7tbDbKXuAuCAUsq2JC9PclmSNyTZ2XYiALbIniSfSnJrki/XWrtchN0GwEqllBOSvC7JxUleER8lBFg2e5N8KcntST5Ta3288TzNCYDDlFKOS1IyhMD5Sc5JckLToQBYr8eTfC3JrgyLv9Zan2g70rQIgFWMFxC+JEMMnJ/kxUme1nQoAA73yyTfzLDwdyX5Rg8X8m2GAFin8XTBmePXGYf92XUEAPO1J8l9SXaPXwf/7LD++giAGSqlnJpfRcFpGYJgxypfxzcZFqC9fRnOzR/ra0+GR+3uTnJfrfWhNqMun/8PcskwF+bRQ44AAAAASUVORK5CYII="},defaultStyle:{columnGap:5}}};n.removeDuplicatesSpecsForDualList=function(){angular.forEach(n.SelectedAvailSpecItems,function(t){for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].Id==t.Id&&n.AvailableSpecListItems.splice(i,1)});n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.removeDuplicatesRegionsForDualList=function(){angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.hasboth||(n.SelectedRegionsListItems=t("filter")(n.SelectedRegionsListItems,{Level:n.hourlyTeacher.LevelId},!0));n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.showDetails=function(){return n.SelectedSpecs.length>0?!0:!1};n.changedMunicipality=function(){n.SelectedRegionsListItems=[];n.SelectedSelectedRegionsListItems=[];n.getApplRegions()};n.checkForMusic=function(){n.hasMusicSpeciality=n.SelectedSpecListItems.IsMusic==!0?!0:!1;n.hasMusicSpeciality==!1&&(n.hourlyTeacher.ConservatoryOwner=0)};n.goToStep=function(i,r,u,f,e){i==2?y.getByParams({applicationTypeId:n.applicationType,specialityId:r},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(i){n.SelectedSpecListItems=t("filter")(n.AvailableSpecListItems,{Id:r},!0)[0];n.fek=i;y.isEmptyValue(i)?(n.mess="<li>Δεν υπαρχει ενεργό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2):(n.step1=!1,n.step2=!0,n.hourlyTeacher.SpecialityId=r,n.hourlyTeacher.LevelId=u,n.hasboth=f,n.hasMusicSpeciality=e,blockUI({target:"#divBlockUIForm",animate:!0}),n.doAll())},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.step1=!0,n.step2=!1,n.DisableDLevel=y.isEmpty(n.SelectedSpecListItems)&&y.isEmptyValue(n.hourlyTeacher.Id)?!1:!0)};n.changeLevel=function(){y.isEmptyValue(n.hourlyTeacher.LevelId)?(n.hourlyTeacher.LevelId=null,n.intendancies=[],n.hourlyTeacher.IntendancyId=null,n.continueDisabled=!0):(v.getIntendancies(n.hourlyTeacher.LevelId).then(function(t){n.intendancies=t}).catch(function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα στην εύρεση διευθύνσεων")}),y.isEmptyValue(n.hourlyTeacher.Id)&&(n.hourlyTeacher.IntendancyId=null),n.continueDisabled=!1)};n.changeIntendancies=function(){y.isEmptyValue(n.hourlyTeacher.LevelId)||y.isEmptyValue(n.hourlyTeacher.IntendancyId)?(n.continueDisabled=!0,n.hourlyTeacher.IntendancyId=null):n.continueDisabled=!1};n.doAll=function(){var r,u;n.hourlyTeacher.Id!=null&&n.hourlyTeacher.Id!=""&&n.hourlyTeacher.Id!="undefined"?n.canUpdateAppl&&(n.hourlyTeacher.PersonId!=null&&n.hourlyTeacher.PersonId!=""&&n.hourlyTeacher.PersonId!="undefined"&&(y.isValueInArray(n.pageRules.hourly.CanAccess,"d1, d2, m1, m2")&&n.hourlyTeacher.LevelId!=n.authentication.levelId&&(n.canUpdateAppl=!1),y.isEmpty(n.AvailableSpecListItems)||(n.IsDisabled=!n.canUpdateAppl,n.IsDisabled&&(n.noUpdAccess=!0),n.hourlyTeacher.IsActive||(n.IsDisabled=!0,n.notActive=!0),n.IsDisabled||(n.IsDisabled=!n.pageRules.hourly.CanUpdate),n.IsDisabled&&(n.noUpdAccess=!0),y.isEmpty(n.hourlyTeacher.ApplicationHourlyTeacherProtocols)||(n.protocol=n.hourlyTeacher.ApplicationHourlyTeacherProtocols[0].ProtocolString,n.showProtocol=!0),r=i.all([l.getPersonForApplication(n.hourlyTeacher.PersonId)]),r.then(function(r){n.person=r[0];n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1;n.showCivilServantBlock();n.checkCivilServant();n.checkForBoth();n.checkForMusic();var u=i.all([y.getByParams({id:n.hourlyTeacher.Id},"api/ApplHourlyTeacher/GetApplRegionsByApplId"),n.hasboth?y.getByParams({municipalityId:n.hourlyTeacher.RegionAndUnitId,applicationTypeId:n.applicationType,sex:n.person.Sex},"/api/ApplicationTypeRegionAndUnit/getTypeRegionAndUnitByMunicipalityAndBothHourly"):y.getByParams({municipalityId:n.hourlyTeacher.RegionAndUnitId,applicationTypeId:n.applicationType,level:n.hourlyTeacher.LevelId,sex:n.person.Sex},"/api/ApplicationTypeRegionAndUnit/getTypeRegionAndUnitByMunicipalityHourly"),y.getByParams({applicationTypeId:n.applicationType,specialityId:n.hourlyTeacher.SpecialityId},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality"),s.getAllMunicipalities(),]);u.then(function(i){n.SelectedRegionsListItems=i[0];n.SelectedAvailRegionsItems=i[0];angular.copy(i[1],n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.checkForRegions();n.regionsFor.IsArtistic||(n.AvailableRegionsListItems=t("filter")(n.AvailableRegionsListItems,{IsArtistic:!1},!0));n.removeDuplicatesRegionsForDualList();n.fek=i[2];n.municipalities=i[3]},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")}))),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm")):(n.canInsertAppl&&n.hourlyTeacher.PersonId!=null&&n.hourlyTeacher.PersonId!=""&&n.hourlyTeacher.PersonId!="undefined"&&(l.getPersonForApplication(n.hourlyTeacher.PersonId).then(function(t){n.person=t;n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1;n.showCivilServantBlock();n.checkCivilServant()},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),y.isEmpty(n.SelectedSpecListItems)&&(u=i.all([s.getAllMunicipalities(),]),u.then(function(t){n.municipalities=t[0];n.changedMunicipality();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")}))),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm"))};n.getApplication=function(){if(n.hourlyTeacher.Id!=null&&n.hourlyTeacher.Id!=""&&n.hourlyTeacher.Id!="undefined"&&(n.DisableDLevel=!0,n.canUpdateAppl&&n.hourlyTeacher.PersonId!=null&&n.hourlyTeacher.PersonId!=""&&n.hourlyTeacher.PersonId!="undefined")){var t=i.all([s.getHourlyTeacherById(n.hourlyTeacher.Id)]);t.then(function(t){n.hourlyTeacher=t[0];n.doAll()})}};n.SelectedSpecAvailItems=[];n.SelectedSelectedSpecListItems=[];n.SelectedSpecListItems=[];n.btnSpecUp=function(){for(var t,r,u,f=n.SelectedSelectedSpecListItems,i=0;i<n.SelectedSelectedSpecListItems.length;i++){if(t=n.SelectedSpecListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedSpecListItems[i].Id),t<=0||t>=n.SelectedSpecListItems.length)return;r=n.SelectedSpecListItems[t];u=n.SelectedSpecListItems[t-1];n.SelectedSpecListItems[t-1]=r;n.SelectedSpecListItems[t]=u}};n.btnSpecDown=function(){for(var t,r,u,i=n.SelectedSelectedSpecListItems.length-1;i>=0;i--){if(t=n.SelectedSpecListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedSpecListItems[i].Id),t<0||t>=n.SelectedSpecListItems.length-1)return;r=n.SelectedSpecListItems[t];u=n.SelectedSpecListItems[t+1];n.SelectedSpecListItems[t+1]=r;n.SelectedSpecListItems[t]=u}};n.btnSpecRight=function(){angular.forEach(n.SelectedAvailSpecItems,function(n){this.push(n)},n.SelectedSpecListItems);angular.forEach(n.SelectedAvailSpecItems,function(t){for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].Id==t.Id&&n.AvailableSpecListItems.splice(i,1)});n.checkForMusic();n.checkForBoth();n.SelectedAvailSpecItems=[];n.SelectedSelectedSpecListItems=[];n.AvailableRegionsListItems=[];n.getApplRegions()};n.btnSpecLeft=function(){angular.forEach(n.SelectedSelectedSpecListItems,function(n){this.push(n)},n.AvailableSpecListItems);angular.forEach(n.SelectedSelectedSpecListItems,function(t){for(var i=n.SelectedSpecListItems.length-1;i>=0;i--)n.SelectedSpecListItems[i].Id==t.Id&&n.SelectedSpecListItems.splice(i,1)});n.checkForMusic();n.checkForBoth();n.AvailableRegionsListItems=[];n.getApplRegions();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.btnAllSpecRight=function(){angular.forEach(n.AvailableSpecListItems,function(n){this.push(n)},n.SelectedSpecListItems);for(var t=n.AvailableSpecListItems.length-1;t>=0;t--)n.AvailableSpecListItems.splice(t,1);n.checkForMusic();n.checkForBoth();n.AvailableRegionsListItems=[];n.getApplRegions();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.btnAllSpecLeft=function(){angular.forEach(n.SelectedSpecListItems,function(n){this.push(n)},n.AvailableSpecListItems);for(var t=n.SelectedSpecListItems.length-1;t>=0;t--)n.SelectedSpecListItems.splice(t,1);n.checkForMusic();n.checkForBoth();n.AvailableRegionsListItems=[];n.getApplRegions();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.btnRegionsUp=function(){for(var t,r,u,f=n.SelectedSelectedRegionsListItems,i=0;i<n.SelectedSelectedRegionsListItems.length;i++){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<=0||t>=n.SelectedRegionsListItems.length)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t-1];n.SelectedRegionsListItems[t-1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsDown=function(){for(var t,r,u,i=n.SelectedSelectedRegionsListItems.length-1;i>=0;i--){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<0||t>=n.SelectedRegionsListItems.length-1)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t+1];n.SelectedRegionsListItems[t+1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsRight=function(){angular.forEach(n.SelectedAvailRegionsItems,function(n){this.push(n)},n.SelectedRegionsListItems);angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.btnRegionsLeft=function(){angular.forEach(n.SelectedSelectedRegionsListItems,function(n){this.push(n)},n.AvailableRegionsListItems);angular.forEach(n.SelectedSelectedRegionsListItems,function(t){for(var i=n.SelectedRegionsListItems.length-1;i>=0;i--)n.SelectedRegionsListItems[i].Id==t.Id&&n.SelectedRegionsListItems.splice(i,1)});n.SelectedSelectedRegionsListItems=[];n.SelectedAvailRegionsItems=[]};n.editPerson=function(){f.setPersonId(n.hourlyTeacher.PersonId);e.go("stateEditPerson")};n.saveAction=function(t){n.showAlertRegion=y.isEmpty(n.SelectedRegionsListItems)?!0:!1;n.canSave=!0;!n.showAlertRegion&&n.canSave&&n.InsOrUpd(t)};n.InsOrUpd=function(t){var r={HourlyTeacher:n.hourlyTeacher,RegionAndUnit:n.SelectedRegionsListItems,ApplTemplate:"",UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Status:t},i=r;n.hourlyTeacher.Id!=null&&n.hourlyTeacher.Id!=""&&n.hourlyTeacher.Id!="undefined"?(n.hourlyTeacher.ModifiedBy=n.authentication.userName,s.updateApplHourlyTeacher(i).then(function(){f.setPersonId(n.hourlyTeacher.PersonId);e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)})):(n.hourlyTeacher.DidacticYearId=n.applicationDidacticYear.Id,n.hourlyTeacher.CreatedBy=n.authentication.userName,s.insertApplHourlyTeacher(i).then(function(){f.setPersonId(n.hourlyTeacher.PersonId);e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)}))}};HourlyTeacherController.$inject=["$scope","$filter","$q","$uibModal","$log","PassParameters","$state","toaster","HourlyTeacherFactory","PersonSpecialityFactory","ApplicationTypeRegionAndUnitFactory","PersonFactory","ApplicationTypeFekFactory","RegionAndFactory","GeneralFactory"];HourlyTeacherMusicController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p){if(n.mess="",n.messInfo="",n.hourlyTeacherMusic={IsTemporaryStored:!0},n.applicationHourlyTeacherMusicEM16={},n.applicationType=6,n.step1=!0,n.step2=!1,n.continueDisabled=!0,n.intendancies=[],n.perspec={},n.SelectedSpecs=[],n.person={},n.SelectedAvailRegionsItems=[],n.SelectedSelectedRegionsListItems=[],n.SelectedRegionsListItems=[],n.personmusicspecialists=[],n.AvailableSpecListItems=[],n.AvailableRegionsListItems=[],n.DisableDLevel=!1,n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.userLevel=0,n.showTableWithMusic=!1,n.showTableEM16=!1,n.showPe16=!1,n.showTe16=!1,n.showAlertSpec=!1,n.showAlertMusicTE16=!1,n.showAlertMusicPE16=!1,n.showAlertRegion=!1,n.permusicspecialists=[],n.IsCivilServant=!1,n.showCivilServantFull=!1,n.applicationLevelId=0,n.SelectedAvailRegionsItems=[],n.SelectedSelectedRegionsListItems=[],n.SelectedRegionsListItems=[],n.canSave=!0,blockUI({target:"#divBlockUI",animate:!0}),p.isValueInArray(p.getRoleCode(n.authentication.role),"d1, d2")&&(n.userLevel=n.authentication.levelId,n.hourlyTeacherMusic.LevelId=n.authentication.levelId,n.hourlyTeacherMusic.IntendancyId=n.authentication.regionAndUnitId),n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.authentication.isAuth){var w="hourlyMusic";p.getByParams({role:n.authentication.role,codes:w},"/api/Subsystem/NewCheckPermission").then(function(r){var u=w.split(","),e,s;for(e in u)n.pageRules[u[e]]=t("filter")(r,{Code:u[e]},!0)[0].Rules;n.hourlyTeacherMusic.Id=f.getApplicationId();n.applicationLevelId=f.getApplicationLevelId();p.isEmptyValue(n.hourlyTeacherMusic.Id)?(n.step1=!0,n.step2=!1):(n.step1=!1,n.step2=!0);p.isEmptyValue(n.applicationLevelId)&&(n.applicationLevelId=0);f.resetApplication();n.hourlyTeacherMusic.PersonId=f.getPersonId();p.isValueInArray(n.pageRules.hourlyMusic.CanAccess,"u1, u2")&&(n.hourlyTeacherMusic.PersonId=n.authentication.personId);s=i.all([p.getByParams({personId:n.hourlyTeacherMusic.PersonId},"/api/ApplHourlyTeacherMusic/getSpecialityForHourlyMusic"),p.getByParams({Id:n.hourlyTeacherMusic.PersonId},"/api/ApplHourlyTeacherMusic/GetApplHourlyMusic")]);s.then(function(i){var u,r;for(angular.copy(i[0],n.AvailableSpecListItems),n.applHourly=i[1],r=n.AvailableSpecListItems.length-1;r>=0;r--)n.AvailableSpecListItems[r].applHourly=0;for(u=n.applHourly.length-1;u>=0;u--)for(r=n.AvailableSpecListItems.length-1;r>=0;r--)n.applHourly[u].SpecialityId==n.AvailableSpecListItems[r].Id&&(n.AvailableSpecListItems[r].applHourly=1);p.isEmpty(n.AvailableSpecListItems)?(n.mess+="<li>Δεν μπορείτε να υποβάλετε αίτηση. Δεν βρίσκεστε στον ενιαίο πίνακα για κάποιον κλάδο<\/li>",n.showAddEditForm=2):n.hourlyTeacherMusic.Id!=null&&n.hourlyTeacherMusic.Id!=""&&n.hourlyTeacherMusic.Id!="undefined"?(p.isEmptyValue(n.hourlyTeacherMusic.SpecialityId)&&(n.hourlyTeacherMusic.SpecialityId=f.getSpecialityId()),p.getByParams({applicationTypeId:n.applicationType,specialityId:n.hourlyTeacherMusic.SpecialityId},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(i){n.SelectedSpecListItems=t("filter")(n.AvailableSpecListItems,{Id:n.hourlyTeacherMusic.SpecialityId},!0)[0];!p.isEmptyValue(i)||p.isValueInArray(p.getRoleCode(n.authentication.role),"a")?(n.canUpdateAppl=!0,n.showAddEditForm=1,n.getApplication()):(n.mess+="<li>Δεν μπορείτε να τροποποιήσετε την αίτηση γιατί δεν υπάρχει ανοιχτό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2)},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(n.canInsertAppl=!0,n.showAddEditForm=1)})},function(){unblockUI("#divBlockUI");o.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else e.go("/");n.minDate="01/01/1900";n.maxDate=new Date;n.formats=["dd/MM/yyyy"];n.format=n.formats[0];n.today=function(){};n.today();n.clear=function(){n.dt=null};n.toggleMin=function(){n.minDate=n.minDate?null:new Date};n.toggleMin();n.open=function(t,i){t.preventDefault();t.stopPropagation();n[i]=!0};n.dateOptions={formatYear:"yy",startingDay:1};n.checkCivilServant=function(){n.IsCivilServant==1?n.showCivilServantFull=!1:(n.hourlyTeacherMusic.PublicServantFull=0,n.showCivilServantFull=!0)};n.showCivilServantBlock=function(){return n.IsCivilServant==!0?!0:!1};n.goToStep=function(i,r,u){i==2?p.getByParams({applicationTypeId:n.applicationType,specialityId:r},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(i){n.SelectedSpecListItems=t("filter")(n.AvailableSpecListItems,{Id:r},!0)[0];n.fek=i;p.isEmptyValue(i)?(n.mess="<li>Δεν υπαρχει ενεργό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2):(n.step1=!1,n.step2=!0,n.hourlyTeacherMusic.SpecialityId=r,n.hourlyTeacherMusic.LevelId=u,blockUI({target:"#divBlockUIForm",animate:!0}),n.doAll())},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.step1=!0,n.step2=!1,n.DisableDLevel=p.isEmpty(n.SelectedSpecListItems)&&p.isEmptyValue(n.hourlyTeacherMusic.Id)?!1:!0)};n.changeLevel=function(){p.isEmptyValue(n.hourlyTeacherMusic.LevelId)?(n.hourlyTeacherMusic.LevelId=null,n.intendancies=[],n.hourlyTeacherMusic.IntendancyId=null,n.continueDisabled=!0):(y.getIntendancies(n.hourlyTeacherMusic.LevelId).then(function(t){n.intendancies=t}).catch(function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα στην εύρεση διευθύνσεων")}),p.isEmptyValue(n.hourlyTeacherMusic.Id)&&(n.hourlyTeacherMusic.IntendancyId=null),n.continueDisabled=!1)};n.changeIntendancies=function(){p.isEmptyValue(n.hourlyTeacherMusic.LevelId)||p.isEmptyValue(n.hourlyTeacherMusic.IntendancyId)?(n.continueDisabled=!0,n.hourlyTeacherMusic.IntendancyId=null):n.continueDisabled=!1};n.checkSpecificMusicSpeciality=function(){n.showTableWithMusic=!1;n.showTableEM16=!1;n.showPe16=!1;n.showTe16=!1;n.SelectedSpecListItems.Code=="ΠΕ79.01"?n.showPe16=!0:n.SelectedSpecListItems.Code=="ΤΕ16.00"?n.showTe16=!0:n.SelectedSpecListItems.Code=="ΕΜ16.00"?(n.showTableWithMusic=!0,n.showTableEM16=!0):n.showTableWithMusic=!0};n.createTemplate=function(){return{content:[{style:"tableExample",table:{widths:["*"],body:[[{stack:[{text:"\nΑΙΤΗΣΗ / ΔΗΛΩΣΗ ΠΡΟΤΙΜΗΣΕΩΝ ΥΠΟΨΗΦΙΩΝ\nα.ΑΝΑΠΛΗΡΩΤΩΝ ΕΚΠΑΙΔΕΥΤΙΚΩΝ, β.ΩΡΟΜΙΣΘΙΩΝ ΕΚΠΑΙΔΕΥΤΙΚΩΝ\nΣΧΟΛΙΚΟΥ ΕΤΟΥΣ 2014-15",style:"header",alignment:"center"},{text:["Της ",{text:"αριθμ. 118102/Δ1/25.07.2014 (ΑΔΑ: Β3Ξ69-ΣΦΤ)",bold:!0}," εγκυκλίου του Υ.ΠΑΙ.Θ.\n"],fontSize:9},{text:"(επέχει θέση Υπεύθυνης Δήλωσης του Ν.1599/86)\n\n",fontSize:9}]}]]}},{style:"tableExample",table:{widths:["auto","*"],body:[[{text:["δια μέσου της Διεύθυνσης : ",{text:"Δ.Ε. Αχαΐας",bold:!0}],fontSize:9},{text:["Αρ. Πρωτοκόλου : ",{text:"1234567890",bold:!0}],fontSize:9,alignment:"right"}],[{text:"(συμπληρώνονται αυτόματα κατά την καταχώρηση της αίτησης)\n\n",fontSize:6},{text:["Ημερομηνία : ",{text:"20/04/2015",bold:!0}],fontSize:9,alignment:"right"}]]},layout:"noBorders"},{text:"\nΠΡΟΣΩΠΙΚΑ ΣΤΟΙΧΕΙΑ",style:"header",alignment:"center"},{style:"tableExample",table:{widths:["*"],body:[[{stack:[{style:"tableExample",table:{widths:["*","*"],body:[[{text:["Α.Φ.Μ : ",{text:"000000024",bold:!0}],fontSize:9},{text:["Α.Δ.Τ : ",{text:"ΑΖ 711210",bold:!0}],fontSize:9}],[{text:["ΕΠΩΝΥΜΟ : ",{text:"ΠΕΤΡΟΠΟΥΛΟΣ",bold:!0}],fontSize:9},{text:["ΟΝΟΜΑ : ",{text:"ΔΗΜΗΤΡΗΣ",bold:!0}],fontSize:9}],[{columns:[{width:90,text:"ΠΟΛΥΤΕΚΝΟΣ ",fontSize:9,alignment:"right"},{width:"*",image:"imgUncheckedBox",width:12,height:12},{width:90,text:"ΤΡΙΤΕΚΝΟΣ ",fontSize:9,alignment:"right"},{width:"*",image:"imgCheckedBox",width:12,height:12},{width:120,text:"ΠΑΙΔΑΓΩΓΙΚΗ ΚΑΤΑΡΤΙΣΗ ",fontSize:9,alignment:"right"},{width:"*",image:"imgUncheckedBox",width:12,height:12},{width:120,text:"ΔΗΜΟΣΙΟΣ ΥΠΑΛΛΗΛΟΣ ",fontSize:9,alignment:"right"},{width:"*",image:"imgCheckedBox",width:12,height:12}],colSpan:2}]]},layout:"noBorders"}]}]]}}],styles:{header:{fontSize:12,bold:!0,margin:[0,0,0,10]},subheader:{fontSize:16,bold:!0,margin:[0,10,0,5]},tableExample:{margin:[0,5,0,15]},tableHeader:{bold:!0,fontSize:13,color:"black"}},images:{imgCheckedBox:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA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We1sPAQDHMu6qH7SeYxVnJItzBOCu1gMAwBpNfWct1CmAXa0HAIA1mvrOWphTAPsz/f+ZAHDArgy7a6rOSJJtL3rRi05N8uPGwxzLd2qtZ7ceAgDWqpRyb5IXtp7jGJ65PdP+7T9J7m49AACs092tB1jFGdsz/fP/32s9AACs09R315nbk5zWeopV7G49AACs09R312nbk+xsPcUq7ms9AACs09R3187tSXa0nuIY9tRaH2o9BACsx7i79rSe4xh2TD0Apl5QAHA0U95hkw+A+1sPAAAbNOUdNvkAmPLhEwA4linvMAEAAHMy5R0mAABgTqa8wwQAAMzJlHeYAACAOZnyDtuxPcnxrac4hn2tBwCADZryDjt+++p/BwBYNgIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQ9uT7Gs9xDEc33oAANigKe+wfduT7G09xTHsbD0AAGzQlHfYXgEAAPMx5R0mAABgTqa8wwQAAMzJlHeYAACAOZnyDpt8AJzeegAA2KAp77DJB8AZrQcAgA2a8g6bfADsLKWc2noIAFiPcXdN/hTAntZTrGLKBQUARzL13bVne5IHWk+xijNbDwAA6zT13fXA9iS7W0+xiue3HgAA1mnqu2v39iT3tZ5iFee1HgAA1um81gOs4r5t+/fvTynlZ5nuxQr7k5xca/1p60EAYDWllF9L8kiSba1nOYo9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KOS1IyhMD5Sc5JckLToQBYr8eTfC3JrgyLv9Zan2g70rQIgFWMFxC+JEMMnJ/kxUme1nQoAA73yyTfzLDwdyX5Rg8X8m2GAFin8XTBmePXGYf92XUEAPO1J8l9SXaPXwf/7LD++giAGSqlnJpfRcFpGYJgxypfxzcZFqC9fRnOzR/ra0+GR+3uTnJfrfWhNqMun/8PcskwF+bRQ44AAAAASUVORK5CYII="},defaultStyle:{columnGap:5}}};n.removeDuplicatesSpecsForDualList=function(){angular.forEach(n.SelectedAvailSpecItems,function(t){for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].Id==t.Id&&n.AvailableSpecListItems.splice(i,1)});n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.removeDuplicatesRegionsForDualList=function(){angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.changedMunicipality=function(){n.SelectedRegionsListItems=[];n.SelectedSelectedRegionsListItems=[];n.getApplRegions()};n.findSpecsForDetails=function(){n.SelectedSpecs=[];angular.forEach(n.SelectedSpecListItems,function(t){for(var i=n.perspec.length-1;i>=0;i--)n.perspec[i].Speciality1.Id==t.Id&&n.SelectedSpecs.push(n.perspec[i])})};n.showDetails=function(){return n.SelectedSpecs.length>0?!0:!1};n.findMusicSpecialitiesBySpec=function(){n.musicspecialists=[];n.AvailableMusicPE16ListItems=[];n.AvailableMusicTE16ListItems=[];n.specialistother=[];for(var t=n.personmusicspecialists.length-1;t>=0;t--)n.personmusicspecialists[t].MusicSpecialistPerSpeciality.Speciality.Id==n.SelectedSpecListItems.Id&&(n.SelectedSpecListItems.Code=="ΠΕ79.01"?n.AvailableMusicPE16ListItems.push(n.personmusicspecialists[t].MusicSpecialistPerSpeciality):n.SelectedSpecListItems.Code=="ΤΕ16.00"?n.AvailableMusicTE16ListItems.push(n.personmusicspecialists[t].MusicSpecialistPerSpeciality):(n.musicspecialists.push(n.personmusicspecialists[t]),n.specialistother.push(n.personmusicspecialists[t].MusicSpecialistPerSpeciality)));n.removeDuplicatesMusicPE16ForDualListFromSelected();n.removeDuplicatesMusicTE16ForDualListFromSelected()};n.getApplRegions=function(){n.hourlyTeacherMusic.RegionAndUnitId>0?(blockUI({target:"#divBlockUIRegion",animate:!0}),n.AvailableRegionsListItems=[],a.getTypeRegionAndUnitByMunicipality(n.hourlyTeacherMusic.RegionAndUnitId,n.applicationType,n.hourlyTeacherMusic.LevelId).then(function(t){angular.copy(t,n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(unblockUI("#divBlockUIRegion"),n.AvailableRegionsListItems=[],n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[])};n.findMusicSpecialitiesBySpecForUpdate=function(){n.musicspecialists=[];n.SelectedMusicPE16ListItems=[];n.SelectedAvailMusicPE16ListItems=[];n.SelectedMusicTE16ListItems=[];n.SelectedAvailMusicTE16ListItems=[];n.specialistother=[];for(var t=0;t<n.permusicspecialists.length;t++)n.permusicspecialists[t].MusicSpecialistPerSpeciality.Speciality.Id==n.SelectedSpecListItems.Id&&(n.SelectedSpecListItems.Code=="ΠΕ79.01"?(n.SelectedMusicPE16ListItems.push(n.permusicspecialists[t].MusicSpecialistPerSpeciality),n.SelectedAvailMusicPE16ListItems.push(n.permusicspecialists[t].MusicSpecialistPerSpeciality)):n.SelectedSpecListItems.Code=="ΤΕ16.00"?(n.SelectedMusicTE16ListItems.push(n.permusicspecialists[t].MusicSpecialistPerSpeciality),n.SelectedAvailMusicTE16ListItems.push(n.permusicspecialists[t].MusicSpecialistPerSpeciality)):(n.musicspecialists.push(n.permusicspecialists[t]),n.specialistother.push(n.permusicspecialists[t].MusicSpecialistPerSpeciality)));n.removeDuplicatesMusicPE16ForDualList();n.removeDuplicatesMusicTE16ForDualList();n.checkSpecificMusicSpeciality()};n.doAll=function(){var t,r;n.hourlyTeacherMusic.Id!=null&&n.hourlyTeacherMusic.Id!=""&&n.hourlyTeacherMusic.Id!="undefined"?(n.canUpdateAppl&&n.hourlyTeacherMusic.PersonId!=null&&n.hourlyTeacherMusic.PersonId!=""&&n.hourlyTeacherMusic.PersonId!="undefined"&&(p.isValueInArray(n.pageRules.hourlyMusic.CanAccess,"d1, d2, m1,m2")&&n.hourlyTeacherMusic.LevelId!=n.authentication.levelId&&(n.canUpdateAppl=!1),p.isEmpty(n.AvailableSpecListItems)||(n.IsDisabled=!n.canUpdateAppl,n.IsDisabled&&(n.noUpdAccess=!0),n.hourlyTeacherMusic.IsActive||(n.IsDisabled=!0,n.notActive=!0),n.IsDisabled||(n.IsDisabled=!n.pageRules.hourlyMusic.CanUpdate),n.IsDisabled&&(n.noUpdAccess=!0),p.isEmpty(n.hourlyTeacherMusic.ApplicationHourlyTeacherMusicProtocols)||(n.protocol=n.hourlyTeacherMusic.ApplicationHourlyTeacherMusicProtocols[0].ProtocolString,n.showProtocol=!0),t=i.all([s.getPersonForApplication(n.hourlyTeacherMusic.PersonId)]),t.then(function(t){n.person=t[0];n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1;n.showCivilServantBlock();n.checkCivilServant();var r=i.all([h.getAllMunicipalities(),h.getApplRegionsByApplId(n.hourlyTeacherMusic.Id),a.getTypeRegionAndUnitByMunicipality(n.hourlyTeacherMusic.RegionAndUnitId,n.applicationType,n.hourlyTeacherMusic.LevelId),h.getApplHourlyTeacherMusicSpecialistsById(n.hourlyTeacherMusic.Id),p.getByParams({id:n.hourlyTeacherMusic.PersonId},"/api/PersonMusicSpeciality/getMusicSpecialistsFromClassificationHourly"),]);r.then(function(t){n.municipalities=t[0];n.SelectedRegionsListItems=t[1];n.SelectedAvailRegionsItems=t[1];angular.copy(t[2],n.AvailableRegionsListItems);n.removeDuplicatesRegionsForDualList();n.permusicspecialists=t[3];n.personmusicspecialists=t[4];n.findMusicSpecialitiesBySpec();n.findMusicSpecialitiesBySpecForUpdate()},function(){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})},function(){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση tων περιοχών της αίτησης.")}))),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm")):(n.canInsertAppl&&n.hourlyTeacherMusic.PersonId!=null&&n.hourlyTeacherMusic.PersonId!=""&&n.hourlyTeacherMusic.PersonId!="undefined"&&(s.getPersonForApplication(n.hourlyTeacherMusic.PersonId).then(function(t){n.person=t;n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1;n.showCivilServantBlock();n.checkCivilServant()},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),p.isEmpty(n.SelectedSpecListItems)&&(r=i.all([p.getByParams({id:n.hourlyTeacherMusic.PersonId},"/api/PersonMusicSpeciality/getMusicSpecialistsFromClassificationHourly")]),r.then(function(t){n.personmusicspecialists=t[0];var r=i.all([h.getAllMunicipalities(),n.findMusicSpecialitiesBySpec(),]);r.then(function(t){n.municipalities=t[0];angular.copy(n.AvailableMusicTE16ListItems,n.SelectedAvailMusicTE16Items);angular.copy(n.AvailableMusicPE16ListItems,n.SelectedAvailMusicPE16Items);n.checkSpecificMusicSpeciality();n.changedMunicipality();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")},function(){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση tων περιοχών της αίτησης.")})},function(){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")}))),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm"))};n.getApplication=function(){if(n.hourlyTeacherMusic.Id!=null&&n.hourlyTeacherMusic.Id!=""&&n.hourlyTeacherMusic.Id!="undefined"&&(n.DisableDLevel=!0,n.canUpdateAppl&&n.hourlyTeacherMusic.PersonId!=null&&n.hourlyTeacherMusic.PersonId!=""&&n.hourlyTeacherMusic.PersonId!="undefined")){var t=i.all([h.getHourlyTeacherById(n.hourlyTeacherMusic.Id)]);t.then(function(t){n.hourlyTeacherMusic=t[0];n.changeLevel();n.doAll()})}};n.SelectedSpecAvailItems=[];n.SelectedSelectedSpecListItems=[];n.SelectedSpecListItems=[];n.btnSpecUp=function(){for(var t,r,u,f=n.SelectedSelectedSpecListItems,i=0;i<n.SelectedSelectedSpecListItems.length;i++){if(t=n.SelectedSpecListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedSpecListItems[i].Id),t<=0||t>=n.SelectedSpecListItems.length)return;r=n.SelectedSpecListItems[t];u=n.SelectedSpecListItems[t-1];n.SelectedSpecListItems[t-1]=r;n.SelectedSpecListItems[t]=u}};n.btnSpecDown=function(){for(var t,r,u,i=n.SelectedSelectedSpecListItems.length-1;i>=0;i--){if(t=n.SelectedSpecListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedSpecListItems[i].Id),t<0||t>=n.SelectedSpecListItems.length-1)return;r=n.SelectedSpecListItems[t];u=n.SelectedSpecListItems[t+1];n.SelectedSpecListItems[t+1]=r;n.SelectedSpecListItems[t]=u}};n.btnSpecRight=function(){angular.forEach(n.SelectedAvailSpecItems,function(n){this.push(n)},n.SelectedSpecListItems);angular.forEach(n.SelectedAvailSpecItems,function(t){for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].Id==t.Id&&n.AvailableSpecListItems.splice(i,1)});n.findMusicSpecialitiesBySpec();n.checkSpecificMusicSpeciality();n.findSpecsForDetails();n.SelectedAvailSpecItems=[];n.SelectedSelectedSpecListItems=[]};n.btnSpecLeft=function(){angular.forEach(n.SelectedSelectedSpecListItems,function(n){this.push(n)},n.AvailableSpecListItems);angular.forEach(n.SelectedSelectedSpecListItems,function(t){for(var i=n.SelectedSpecListItems.length-1;i>=0;i--)n.SelectedSpecListItems[i].Id==t.Id&&(t.Code=="ΠΕ79.01"?(n.SelectedMusicPE16ListItems=[],n.SelectedAvailMusicPE16ListItems=[]):t.Code=="ΤΕ16.00"?(n.SelectedMusicTE16ListItems=[],n.SelectedAvailMusicTE16ListItems=[]):n.specialistother=[],n.SelectedSpecListItems.splice(i,1))});n.findMusicSpecialitiesBySpec();n.checkSpecificMusicSpeciality();n.findSpecsForDetails();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.btnAllSpecRight=function(){angular.forEach(n.AvailableSpecListItems,function(n){this.push(n)},n.SelectedSpecListItems);for(var t=n.AvailableSpecListItems.length-1;t>=0;t--)n.AvailableSpecListItems.splice(t,1);n.findMusicSpecialitiesBySpec();n.checkSpecificMusicSpeciality();n.findSpecsForDetails();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.btnAllSpecLeft=function(){angular.forEach(n.SelectedSpecListItems,function(n){this.push(n)},n.AvailableSpecListItems);for(var t=n.SelectedSpecListItems.length-1;t>=0;t--)n.SelectedSpecListItems[t].Code=="ΠΕ79.01"?(n.SelectedMusicPE16ListItems=[],n.SelectedAvailMusicPE16ListItems=[]):n.SelectedSpecListItems[t].Code=="ΤΕ16.00"?(n.SelectedMusicTE16ListItems=[],n.SelectedAvailMusicTE16ListItems=[]):n.specialistother=[],n.SelectedSpecListItems.splice(t,1);n.checkSpecificMusicSpeciality();n.findSpecsForDetails();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.SelectedMusicPE16AvailItems=[];n.SelectedSelectedMusicPE16ListItems=[];n.SelectedMusicPE16ListItems=[];n.btnMusicPE16Up=function(){for(var t,r,u,f=n.SelectedSelectedMusicPE16ListItems,i=0;i<n.SelectedSelectedMusicPE16ListItems.length;i++){if(t=n.SelectedMusicPE16ListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedMusicPE16ListItems[i].Id),t<=0||t>=n.SelectedMusicPE16ListItems.length)return;r=n.SelectedMusicPE16ListItems[t];u=n.SelectedMusicPE16ListItems[t-1];n.SelectedMusicPE16ListItems[t-1]=r;n.SelectedMusicPE16ListItems[t]=u}};n.btnMusicPE16Down=function(){for(var t,r,u,i=n.SelectedSelectedMusicPE16ListItems.length-1;i>=0;i--){if(t=n.SelectedMusicPE16ListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedMusicPE16ListItems[i].Id),t<0||t>=n.SelectedMusicPE16ListItems.length-1)return;r=n.SelectedMusicPE16ListItems[t];u=n.SelectedMusicPE16ListItems[t+1];n.SelectedMusicPE16ListItems[t+1]=r;n.SelectedMusicPE16ListItems[t]=u}};n.btnMusicPE16Right=function(){angular.forEach(n.SelectedAvailMusicPE16Items,function(n){this.push(n)},n.SelectedMusicPE16ListItems);angular.forEach(n.SelectedAvailMusicPE16Items,function(t){for(var i=n.AvailableMusicPE16ListItems.length-1;i>=0;i--)n.AvailableMusicPE16ListItems[i].Id==t.Id&&n.AvailableMusicPE16ListItems.splice(i,1)});n.SelectedAvailMusicPE16Items=[];n.SelectedSelectedMusicPE16ListItems=[]};n.btnMusicPE16Left=function(){angular.forEach(n.SelectedSelectedMusicPE16ListItems,function(n){this.push(n)},n.AvailableMusicPE16ListItems);angular.forEach(n.SelectedSelectedMusicPE16ListItems,function(t){for(var i=n.SelectedMusicPE16ListItems.length-1;i>=0;i--)n.SelectedMusicPE16ListItems[i].Id==t.Id&&n.SelectedMusicPE16ListItems.splice(i,1)});n.SelectedSelectedMusicPE16ListItems=[];n.SelectedAvailMusicPE16Items=[]};n.btnAllMusicPE16Right=function(){angular.forEach(n.AvailableMusicPE16ListItems,function(n){this.push(n)},n.SelectedMusicPE16ListItems);for(var t=n.AvailableMusicPE16ListItems.length-1;t>=0;t--)n.AvailableMusicPE16ListItems.splice(t,1);n.SelectedSelectedMusicPE16ListItems=[];n.SelectedAvailMusicPE16Items=[]};n.btnAllMusicPE16Left=function(){angular.forEach(n.SelectedMusicPE16ListItems,function(n){this.push(n)},n.AvailableMusicPE16ListItems);for(var t=n.SelectedMusicPE16ListItems.length-1;t>=0;t--)n.SelectedMusicPE16ListItems.splice(t,1);n.SelectedSelectedMusicPE16ListItems=[];n.SelectedAvailMusicPE16Items=[]};n.SelectedMusicTE16AvailItems=[];n.SelectedSelectedMusicTE16ListItems=[];n.SelectedMusicTE16ListItems=[];n.btnMusicTE16Up=function(){for(var t,r,u,f=n.SelectedSelectedMusicTE16ListItems,i=0;i<n.SelectedSelectedMusicTE16ListItems.length;i++){if(t=n.SelectedMusicTE16ListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedMusicTE16ListItems[i].Id),t<=0||t>=n.SelectedMusicTE16ListItems.length)return;r=n.SelectedMusicTE16ListItems[t];u=n.SelectedMusicTE16ListItems[t-1];n.SelectedMusicTE16ListItems[t-1]=r;n.SelectedMusicTE16ListItems[t]=u}};n.btnMusicTE16Down=function(){for(var t,r,u,i=n.SelectedSelectedMusicTE16ListItems.length-1;i>=0;i--){if(t=n.SelectedMusicTE16ListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedMusicTE16ListItems[i].Id),t<0||t>=n.SelectedMusicTE16ListItems.length-1)return;r=n.SelectedMusicTE16ListItems[t];u=n.SelectedMusicTE16ListItems[t+1];n.SelectedMusicTE16ListItems[t+1]=r;n.SelectedMusicTE16ListItems[t]=u}};n.btnMusicTE16Right=function(){angular.forEach(n.SelectedAvailMusicTE16Items,function(n){this.push(n)},n.SelectedMusicTE16ListItems);angular.forEach(n.SelectedAvailMusicTE16Items,function(t){for(var i=n.AvailableMusicTE16ListItems.length-1;i>=0;i--)n.AvailableMusicTE16ListItems[i].MusicSpecialist.Id==t.MusicSpecialist.Id&&n.AvailableMusicTE16ListItems.splice(i,1)});n.SelectedAvailMusicTE16Items=[];n.SelectedSelectedMusicTE16ListItems=[]};n.btnMusicTE16Left=function(){angular.forEach(n.SelectedSelectedMusicTE16ListItems,function(n){this.push(n)},n.AvailableMusicTE16ListItems);angular.forEach(n.SelectedSelectedMusicTE16ListItems,function(t){for(var i=n.SelectedMusicTE16ListItems.length-1;i>=0;i--)n.SelectedMusicTE16ListItems[i].MusicSpecialist.Id==t.MusicSpecialist.Id&&n.SelectedMusicTE16ListItems.splice(i,1)});n.SelectedSelectedMusicTE16ListItems=[];n.SelectedAvailMusicTE16Items=[]};n.btnAllMusicTE16Right=function(){angular.forEach(n.AvailableMusicTE16ListItems,function(n){this.push(n)},n.SelectedMusicTE16ListItems);for(var t=n.AvailableMusicTE16ListItems.length-1;t>=0;t--)n.AvailableMusicTE16ListItems.splice(t,1);n.SelectedSelectedMusicTE16ListItems=[];n.SelectedAvailMusicTE16Items=[]};n.btnAllMusicTE16Left=function(){angular.forEach(n.SelectedMusicTE16ListItems,function(n){this.push(n)},n.AvailableMusicTE16ListItems);for(var t=n.SelectedMusicTE16ListItems.length-1;t>=0;t--)n.SelectedMusicTE16ListItems.splice(t,1);n.SelectedSelectedMusicTE16ListItems=[];n.SelectedAvailMusicTE16Items=[]};n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[];n.SelectedRegionsListItems=[];n.btnRegionsUp=function(){for(var t,r,u,f=n.SelectedSelectedRegionsListItems,i=0;i<n.SelectedSelectedRegionsListItems.length;i++){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<=0||t>=n.SelectedRegionsListItems.length)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t-1];n.SelectedRegionsListItems[t-1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsDown=function(){for(var t,r,u,i=n.SelectedSelectedRegionsListItems.length-1;i>=0;i--){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<0||t>=n.SelectedRegionsListItems.length-1)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t+1];n.SelectedRegionsListItems[t+1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsRight=function(){angular.forEach(n.SelectedAvailRegionsItems,function(n){this.push(n)},n.SelectedRegionsListItems);angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.btnRegionsLeft=function(){angular.forEach(n.SelectedSelectedRegionsListItems,function(n){this.push(n)},n.AvailableRegionsListItems);angular.forEach(n.SelectedSelectedRegionsListItems,function(t){for(var i=n.SelectedRegionsListItems.length-1;i>=0;i--)n.SelectedRegionsListItems[i].Id==t.Id&&n.SelectedRegionsListItems.splice(i,1)});n.SelectedSelectedRegionsListItems=[];n.SelectedAvailRegionsItems=[]};n.changedMunicipality=function(){n.SelectedRegionsListItems=[];n.SelectedSelectedRegionsListItems=[];n.getApplRegions()};n.hasMusicSpeciality=!1;n.checkForMusic=function(){for(var t=0;t<n.SelectedSpecListItems.length;t+=1)if(n.SelectedSpecListItems[t].IsMusic==!0){n.hasMusicSpeciality=!0;break}else n.hasMusicSpeciality=!1;n.hasMusicSpeciality==!1&&(n.hourlyTeacherMusic.ConservatoryOwner=0)};n.editPerson=function(){f.setPersonId(n.hourlyTeacherMusic.PersonId);e.go("stateEditPerson")};n.saveAction=function(t){n.showAlertMusicPE16=n.showPe16&&p.isEmpty(n.SelectedMusicPE16ListItems)?!0:!1;n.showAlertMusicTE16=n.showTe16&&p.isEmpty(n.SelectedMusicTE16ListItems)?!0:!1;n.showAlertRegion=p.isEmpty(n.SelectedRegionsListItems)?!0:!1;p.isEmptyValue(n.applicationHourlyTeacherMusicEM16)||(p.isEmptyValue(n.applicationHourlyTeacherMusicEM16.AnotherAEITEIMusicSpecialityDegree)||(n.applicationHourlyTeacherMusicEM16.AnotherAEITEIMusicSpecialityDegree=parseFloat(n.applicationHourlyTeacherMusicEM16.AnotherAEITEIMusicSpecialityDegree.toString().replace(",","."))),p.isEmptyValue(n.applicationHourlyTeacherMusicEM16.PedagogicalDepartmentAEITEIDegree)||(n.applicationHourlyTeacherMusicEM16.PedagogicalDepartmentAEITEIDegree=parseFloat(n.applicationHourlyTeacherMusicEM16.PedagogicalDepartmentAEITEIDegree.toString().replace(",","."))),p.isEmptyValue(n.applicationHourlyTeacherMusicEM16.CounterPointDegree)||(n.applicationHourlyTeacherMusicEM16.CounterPointDegree=parseFloat(n.applicationHourlyTeacherMusicEM16.CounterPointDegree.toString().replace(",","."))),p.isEmptyValue(n.applicationHourlyTeacherMusicEM16.AEITEIDegreeNotProfessional)||(n.applicationHourlyTeacherMusicEM16.AEITEIDegreeNotProfessional=parseFloat(n.applicationHourlyTeacherMusicEM16.AEITEIDegreeNotProfessional.toString().replace(",","."))),p.isEmptyValue(n.applicationHourlyTeacherMusicEM16.AnotherPhdMusicSpecialistDegree)||(n.applicationHourlyTeacherMusicEM16.AnotherPhdMusicSpecialistDegree=parseFloat(n.applicationHourlyTeacherMusicEM16.AnotherPhdMusicSpecialistDegree.toString().replace(",","."))),p.isEmptyValue(n.applicationHourlyTeacherMusicEM16.FougkasDegree)||(n.applicationHourlyTeacherMusicEM16.FougkasDegree=parseFloat(n.applicationHourlyTeacherMusicEM16.FougkasDegree.toString().replace(",","."))),p.isEmptyValue(n.applicationHourlyTeacherMusicEM16.AnotherMasterMusicSpecialistDegree)||(n.applicationHourlyTeacherMusicEM16.AnotherMasterMusicSpecialistDegree=parseFloat(n.applicationHourlyTeacherMusicEM16.AnotherMasterMusicSpecialistDegree.toString().replace(",","."))),p.isEmptyValue(n.applicationHourlyTeacherMusicEM16.PhdMasterNotMusicSpecialistDegree)||(n.applicationHourlyTeacherMusicEM16.PhdMasterNotMusicSpecialistDegree=parseFloat(n.applicationHourlyTeacherMusicEM16.PhdMasterNotMusicSpecialistDegree.toString().replace(",","."))),p.isEmptyValue(n.applicationHourlyTeacherMusicEM16.MusicStudiesDegree)||(n.applicationHourlyTeacherMusicEM16.MusicStudiesDegree=parseFloat(n.applicationHourlyTeacherMusicEM16.MusicStudiesDegree.toString().replace(",","."))),p.isEmptyValue(n.applicationHourlyTeacherMusicEM16.ByzantineEcclesiasticalDiplomaDegree)||(n.applicationHourlyTeacherMusicEM16.ByzantineEcclesiasticalDiplomaDegree=parseFloat(n.applicationHourlyTeacherMusicEM16.ByzantineEcclesiasticalDiplomaDegree.toString().replace(",","."))),p.isEmptyValue(n.applicationHourlyTeacherMusicEM16.ByzantineEcclesiasticalDegree)||(n.applicationHourlyTeacherMusicEM16.ByzantineEcclesiasticalDegree=parseFloat(n.applicationHourlyTeacherMusicEM16.ByzantineEcclesiasticalDegree.toString().replace(",","."))),p.isEmptyValue(n.applicationHourlyTeacherMusicEM16.CompositionInstrumentDiplomaDegree)||(n.applicationHourlyTeacherMusicEM16.CompositionInstrumentDiplomaDegree=parseFloat(n.applicationHourlyTeacherMusicEM16.CompositionInstrumentDiplomaDegree.toString().replace(",","."))));n.canSave=!0;!$("#ApplicationHourlyMusicStep1").valid()||n.showAlertMusicPE16||n.showAlertMusicTE16||n.showAlertRegion||!n.canSave||n.InsOrUpd(t)};n.InsOrUpd=function(t){var r={HourlyTeacherMusic:n.hourlyTeacherMusic,RegionAndUnit:n.SelectedRegionsListItems,MusicSpecialistPE16:n.SelectedMusicPE16ListItems,MusicSpecialistTE16:n.SelectedMusicTE16ListItems,MusicSpecialistOthers:n.specialistother,HourlyTeacherMusicEM16:n.applicationHourlyTeacherMusicEM16,ApplTemplate:"",UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Status:t},i=r;n.hourlyTeacherMusic.Id!=null&&n.hourlyTeacherMusic.Id!=""&&n.hourlyTeacherMusic.Id!="undefined"?(n.hourlyTeacherMusic.ModifiedBy=n.authentication.userName,h.updateApplHourlyTeacherMusic(i).then(function(){f.setPersonId(n.person.Id);e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)})):(n.hourlyTeacherMusic.DidacticYearId=n.applicationDidacticYear.Id,n.hourlyTeacherMusic.CreatedBy=n.authentication.userName,h.insertApplHourlyTeacherMusic(i).then(function(){f.setPersonId(n.hourlyTeacherMusic.PersonId);e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)}))};n.removeDuplicatesMusicPE16ForDualList=function(){angular.forEach(n.SelectedAvailMusicPE16ListItems,function(t){for(var i=n.AvailableMusicPE16ListItems.length-1;i>=0;i--)n.AvailableMusicPE16ListItems[i].Id==t.Id&&n.AvailableMusicPE16ListItems.splice(i,1)});n.SelectedAvailMusicPE16ListItems=[];n.SelectedSelectedMusicPE16ListItems=[]};n.removeDuplicatesMusicPE16ForDualListFromSelected=function(){angular.forEach(n.SelectedMusicPE16ListItems,function(t){for(var i=n.AvailableMusicPE16ListItems.length-1;i>=0;i--)n.AvailableMusicPE16ListItems[i].Id==t.Id&&n.AvailableMusicPE16ListItems.splice(i,1)})};n.removeDuplicatesMusicTE16ForDualList=function(){angular.forEach(n.SelectedAvailMusicTE16ListItems,function(t){for(var i=n.AvailableMusicTE16ListItems.length-1;i>=0;i--)n.AvailableMusicTE16ListItems[i].Id==t.Id&&n.AvailableMusicTE16ListItems.splice(i,1)});n.SelectedAvailMusicTE16ListItems=[];n.SelectedSelectedMusicTE16ListItems=[]};n.removeDuplicatesMusicTE16ForDualListFromSelected=function(){angular.forEach(n.SelectedMusicTE16ListItems,function(t){for(var i=n.AvailableMusicTE16ListItems.length-1;i>=0;i--)n.AvailableMusicTE16ListItems[i].Id==t.Id&&n.AvailableMusicTE16ListItems.splice(i,1)})}};HourlyTeacherMusicController.$inject=["$scope","$filter","$q","$uibModal","$log","PassParameters","$state","toaster","PersonFactory","HourlyTeacherMusicFactory","PersonSpecialityFactory","PersonMusicSpecialityFactory","ApplicationTypeRegionAndUnitFactory","ApplicationTypeFekFactory","RegionAndFactory","GeneralFactory"];HourlyTeacherMusicForEM16Controller=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y){if(n.mess="",n.messInfo="",n.hourlyTeacherMusicForEM16={IsTemporaryStored:!0},n.applicationhourlyTeacherMusicForEM16EM16={},n.applicationType=24,n.step1=!0,n.step2=!1,n.continueDisabled=!0,n.intendancies=[],n.perspec={},n.SelectedSpecs=[],n.person={},n.SelectedAvailRegionsItems=[],n.SelectedSelectedRegionsListItems=[],n.SelectedRegionsListItems=[],n.personmusicspecialists=[],n.AvailableSpecListItems=[],n.AvailableRegionsListItems=[],n.DisableDLevel=!1,n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.userLevel=0,n.showTableWithMusic=!1,n.showTableEM16=!1,n.showPe16=!1,n.showTe16=!1,n.showAlertSpec=!1,n.showAlertMusicTE16=!1,n.showAlertMusicPE16=!1,n.showAlertRegion=!1,n.permusicspecialists=[],n.IsCivilServant=!1,n.showCivilServantFull=!1,n.applicationLevelId=0,n.SelectedAvailRegionsItems=[],n.SelectedSelectedRegionsListItems=[],n.SelectedRegionsListItems=[],n.canSave=!0,blockUI({target:"#divBlockUI",animate:!0}),y.isValueInArray(y.getRoleCode(n.authentication.role),"d1, d2")&&(n.userLevel=n.authentication.levelId,n.hourlyTeacherMusicForEM16.LevelId=n.authentication.levelId,n.hourlyTeacherMusicForEM16.IntendancyId=n.authentication.regionAndUnitId),n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.authentication.isAuth){var p="hourlyMusicForEM16";y.getByParams({role:n.authentication.role,codes:p},"/api/Subsystem/NewCheckPermission").then(function(r){var u=p.split(","),e,o;for(e in u)n.pageRules[u[e]]=t("filter")(r,{Code:u[e]},!0)[0].Rules;n.hourlyTeacherMusicForEM16.Id=f.getApplicationId();n.applicationLevelId=f.getApplicationLevelId();y.isEmptyValue(n.applicationLevelId)&&(n.applicationLevelId=0);f.resetApplication();n.hourlyTeacherMusicForEM16.PersonId=f.getPersonId();y.isValueInArray(n.pageRules.hourlyMusicForEM16.CanAccess,"u1, u2")&&(n.hourlyTeacherMusicForEM16.PersonId=n.authentication.personId);o=i.all([y.getByParams({personId:n.hourlyTeacherMusicForEM16.PersonId,level:n.userLevel,applicationType:n.applicationType,didacticYear:n.applicationDidacticYear.Id,applicationLevelId:n.applicationLevelId},"api/HistoryAppl/canInsertApplicationToLevels"),y.getByParams({personId:n.hourlyTeacherMusicForEM16.PersonId},"api/Person/getValidPersonForAppl")]);o.then(function(t){n.hasValidFek=t[0].ValidFek;n.mess=t[0].mess;n.messInfo=t[0].messInfo;n.LevelList=t[0].LevelDto;n.ValidPersonForAppl=t[1];n.mess+=n.ValidPersonForAppl.mess;n.hasValidFekNoConfirmSpeciality=t[0].ValidFekNoConfirmSpeciality;n.LevelList.length>0?(n.canInsertAppl=!0,n.levels=n.LevelList):n.canInsertAppl=!1;n.hasValidFek&&!y.isEmptyValue(n.hourlyTeacherMusicForEM16.Id)&&n.ValidPersonForAppl.ValidPerson||y.isValueInArray(y.getRoleCode(n.authentication.role),"m1, m2, a, s")&&!y.isEmptyValue(n.hourlyTeacherMusicForEM16.Id)?(n.canUpdateAppl=!0,n.showAddEditForm=1,y.isValueInArray(y.getRoleCode(n.authentication.role),"d1, d2")?(n.step1=!1,n.step2=!0,blockUI({target:"#divBlockUIForm",animate:!0}),n.getApplication()):n.getApplication()):n.hasValidFek||n.hourlyTeacherMusicForEM16.Id==null||n.hourlyTeacherMusicForEM16.Id==""||n.hourlyTeacherMusicForEM16.Id=="undefined"?n.canInsertAppl&&n.hasValidFek&&n.ValidPersonForAppl.ValidPerson?(n.canInsertAppl=!0,n.showAddEditForm=1,unblockUI("#divBlockUI"),y.isValueInArray(y.getRoleCode(n.authentication.role),"d1, d2")&&(n.step1=!1,n.step2=!0,blockUI({target:"#divBlockUIForm",animate:!0}),n.doAll())):(y.isEmpty(n.mess)&&(n.mess+="<li>Δεν μπορείτε να υποβάλετε αίτηση. Για ήδη υποβληθείσα αίτηση μεταβείτε στο Ιστορικό Αιτήσεων<\/li>"),n.showAddEditForm=2,unblockUI("#divBlockUI")):n.showAddEditForm=2})},function(){unblockUI("#divBlockUI");o.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else e.go("/");n.minDate="01/01/1900";n.maxDate=new Date;n.formats=["dd/MM/yyyy"];n.format=n.formats[0];n.today=function(){};n.today();n.clear=function(){n.dt=null};n.toggleMin=function(){n.minDate=n.minDate?null:new Date};n.toggleMin();n.open=function(t,i){t.preventDefault();t.stopPropagation();n[i]=!0};n.dateOptions={formatYear:"yy",startingDay:1};n.checkCivilServant=function(){n.IsCivilServant==1?n.showCivilServantFull=!1:(n.hourlyTeacherMusicForEM16.PublicServantFull=0,n.showCivilServantFull=!0)};n.showCivilServantBlock=function(){return n.IsCivilServant==!0?!0:!1};n.goToStep=function(t){t==2?(n.step1=!1,n.step2=!0,n.doAll()):(n.step1=!0,n.step2=!1,n.DisableDLevel=y.isEmpty(n.SelectedSpecListItems)&&y.isEmptyValue(n.hourlyTeacherMusicForEM16.Id)?!1:!0)};n.changeLevel=function(){y.isEmptyValue(n.hourlyTeacherMusicForEM16.LevelId)?(n.hourlyTeacherMusicForEM16.LevelId=null,n.intendancies=[],n.hourlyTeacherMusicForEM16.IntendancyId=null,n.continueDisabled=!0):(v.getIntendancies(n.hourlyTeacherMusicForEM16.LevelId).then(function(t){n.intendancies=t}).catch(function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα στην εύρεση διευθύνσεων")}),y.isEmptyValue(n.hourlyTeacherMusicForEM16.Id)&&(n.hourlyTeacherMusicForEM16.IntendancyId=null),n.continueDisabled=!1)};n.changeIntendancies=function(){y.isEmptyValue(n.hourlyTeacherMusicForEM16.LevelId)||y.isEmptyValue(n.hourlyTeacherMusicForEM16.IntendancyId)?(n.continueDisabled=!0,n.hourlyTeacherMusicForEM16.IntendancyId=null):n.continueDisabled=!1};n.checkSpecificMusicSpeciality=function(){n.showTableWithMusic=!1;n.showTableEM16=!1;n.showPe16=!1;n.showTe16=!1;angular.forEach(n.SelectedSpecListItems,function(t){t.Code=="ΠΕ79.01"?n.showPe16=!0:t.Code=="ΤΕ16.00"?n.showTe16=!0:t.Code=="ΕΜ16.00"?(n.showTableWithMusic=!0,n.showTableEM16=!0):n.showTableWithMusic=!0})};n.createTemplate=function(){return{content:[{style:"tableExample",table:{widths:["*"],body:[[{stack:[{text:"\nΑΙΤΗΣΗ / ΔΗΛΩΣΗ ΠΡΟΤΙΜΗΣΕΩΝ ΥΠΟΨΗΦΙΩΝ\nα.ΑΝΑΠΛΗΡΩΤΩΝ ΕΚΠΑΙΔΕΥΤΙΚΩΝ, β.ΩΡΟΜΙΣΘΙΩΝ ΕΚΠΑΙΔΕΥΤΙΚΩΝ\nΣΧΟΛΙΚΟΥ ΕΤΟΥΣ 2014-15",style:"header",alignment:"center"},{text:["Της ",{text:"αριθμ. 118102/Δ1/25.07.2014 (ΑΔΑ: Β3Ξ69-ΣΦΤ)",bold:!0}," εγκυκλίου του Υ.ΠΑΙ.Θ.\n"],fontSize:9},{text:"(επέχει θέση Υπεύθυνης Δήλωσης του Ν.1599/86)\n\n",fontSize:9}]}]]}},{style:"tableExample",table:{widths:["auto","*"],body:[[{text:["δια μέσου της Διεύθυνσης : ",{text:"Δ.Ε. Αχαΐας",bold:!0}],fontSize:9},{text:["Αρ. Πρωτοκόλου : ",{text:"1234567890",bold:!0}],fontSize:9,alignment:"right"}],[{text:"(συμπληρώνονται αυτόματα κατά την καταχώρηση της αίτησης)\n\n",fontSize:6},{text:["Ημερομηνία : ",{text:"20/04/2015",bold:!0}],fontSize:9,alignment:"right"}]]},layout:"noBorders"},{text:"\nΠΡΟΣΩΠΙΚΑ ΣΤΟΙΧΕΙΑ",style:"header",alignment:"center"},{style:"tableExample",table:{widths:["*"],body:[[{stack:[{style:"tableExample",table:{widths:["*","*"],body:[[{text:["Α.Φ.Μ : ",{text:"000000024",bold:!0}],fontSize:9},{text:["Α.Δ.Τ : ",{text:"ΑΖ 711210",bold:!0}],fontSize:9}],[{text:["ΕΠΩΝΥΜΟ : ",{text:"ΠΕΤΡΟΠΟΥΛΟΣ",bold:!0}],fontSize:9},{text:["ΟΝΟΜΑ : ",{text:"ΔΗΜΗΤΡΗΣ",bold:!0}],fontSize:9}],[{columns:[{width:90,text:"ΠΟΛΥΤΕΚΝΟΣ ",fontSize:9,alignment:"right"},{width:"*",image:"imgUncheckedBox",width:12,height:12},{width:90,text:"ΤΡΙΤΕΚΝΟΣ ",fontSize:9,alignment:"right"},{width:"*",image:"imgCheckedBox",width:12,height:12},{width:120,text:"ΠΑΙΔΑΓΩΓΙΚΗ ΚΑΤΑΡΤΙΣΗ ",fontSize:9,alignment:"right"},{width:"*",image:"imgUncheckedBox",width:12,height:12},{width:120,text:"ΔΗΜΟΣΙΟΣ ΥΠΑΛΛΗΛΟΣ ",fontSize:9,alignment:"right"},{width:"*",image:"imgCheckedBox",width:12,height:12}],colSpan:2}]]},layout:"noBorders"}]}]]}}],styles:{header:{fontSize:12,bold:!0,margin:[0,0,0,10]},subheader:{fontSize:16,bold:!0,margin:[0,10,0,5]},tableExample:{margin:[0,5,0,15]},tableHeader:{bold:!0,fontSize:13,color:"black"}},images:{imgCheckedBox:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIAC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HMu6qH7SeYxVnJItzBOCu1gMAwBpNfWct1CmAXa0HAIA1mvrOWphTAPsz/f+ZAHDArgy7a6rOSJJtL3rRi05N8uPGwxzLd2qtZ7ceAgDWqpRyb5IXtp7jGJ65PdP+7T9J7m49AACs092tB1jFGdsz/fP/32s9AACs09R315nbk5zWeopV7G49AACs09R312nbk+xsPcUq7ms9AACs09R3187tSXa0nuIY9tRaH2o9BACsx7i79rSe4xh2TD0Apl5QAHA0U95hkw+A+1sPAAAbNOUdNvkAmPLhEwA4linvMAEAAHMy5R0mAABgTqa8wwQAAMzJlHeYAACAOZnyDtuxPcnxrac4hn2tBwCADZryDjt+++p/BwBYNgIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQ9uT7Gs9xDEc33oAANigKe+wfduT7G09xTHsbD0AAGzQlHfYXgEAAPMx5R0mAABgTqa8wwQAAMzJlHeYAACAOZnyDpt8AJzeegAA2KAp77DJB8AZrQcAgA2a8g6bfADsLKWc2noIAFiPcXdN/hTAntZTrGLKBQUARzL13bVne5IHWk+xijNbDwAA6zT13fXA9iS7W0+xiue3HgAA1mnqu2v39iT3tZ5iFee1HgAA1um81gOs4r5t+/fvTynlZ5nuxQr7k5xca/1p60EAYDWllF9L8kiSba1nOYo9tdZnHHgc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D5Sc5JckLToQBYr8eTfC3JrgyLv9Zan2g70rQIgFWMFxC+JEMMnJ/kxUme1nQoAA73yyTfzLDwdyX5Rg8X8m2GAFin8XTBmePXGYf92XUEAPO1J8l9SXaPXwf/7LD++giAGSqlnJpfRcFpGYJgxypfxzcZFqC9fRnOzR/ra0+GR+3uTnJfrfWhNqMun/8PcskwF+bRQ44AAAAASUVORK5CYII="},defaultStyle:{columnGap:5}}};n.removeDuplicatesSpecsForDualList=function(){angular.forEach(n.SelectedAvailSpecItems,function(t){for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].Id==t.Id&&n.AvailableSpecListItems.splice(i,1)});n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.removeDuplicatesRegionsForDualList=function(){angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.changedMunicipality=function(){n.SelectedRegionsListItems=[];n.SelectedSelectedRegionsListItems=[];n.getApplRegions()};n.findSpecsForDetails=function(){n.SelectedSpecs=[];angular.forEach(n.SelectedSpecListItems,function(t){for(var i=n.perspec.length-1;i>=0;i--)n.perspec[i].Speciality1.Id==t.Id&&n.SelectedSpecs.push(n.perspec[i])})};n.showDetails=function(){return n.SelectedSpecs.length>0?!0:!1};n.findMusicSpecialitiesBySpec=function(){n.musicspecialists=[];n.AvailableMusicPE16ListItems=[];n.AvailableMusicTE16ListItems=[];n.specialistother=[];angular.forEach(n.SelectedSpecListItems,function(t){for(var i=n.personmusicspecialists.length-1;i>=0;i--)n.personmusicspecialists[i].MusicSpecialistPerSpeciality.Speciality.Id==t.Id&&(t.Code=="ΠΕ79.01"?n.AvailableMusicPE16ListItems.push(n.personmusicspecialists[i].MusicSpecialistPerSpeciality):t.Code=="ΤΕ16.00"?n.AvailableMusicTE16ListItems.push(n.personmusicspecialists[i].MusicSpecialistPerSpeciality):(n.musicspecialists.push(n.personmusicspecialists[i]),n.specialistother.push(n.personmusicspecialists[i].MusicSpecialistPerSpeciality)))});n.removeDuplicatesMusicPE16ForDualListFromSelected();n.removeDuplicatesMusicTE16ForDualListFromSelected()};n.getApplRegions=function(){n.hourlyTeacherMusicForEM16.RegionAndUnitId>0?(blockUI({target:"#divBlockUIRegion",animate:!0}),n.AvailableRegionsListItems=[],l.getTypeRegionAndUnitByMunicipality(n.hourlyTeacherMusicForEM16.RegionAndUnitId,n.applicationType,n.hourlyTeacherMusicForEM16.LevelId).then(function(t){angular.copy(t,n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(unblockUI("#divBlockUIRegion"),n.AvailableRegionsListItems=[],n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[])};n.findMusicSpecialitiesBySpecForUpdate=function(){n.musicspecialists=[];n.SelectedMusicPE16ListItems=[];n.SelectedAvailMusicPE16ListItems=[];n.SelectedMusicTE16ListItems=[];n.SelectedAvailMusicTE16ListItems=[];n.specialistother=[];angular.forEach(n.SelectedSpecListItems,function(t){for(var i=0;i<n.permusicspecialists.length;i++)n.permusicspecialists[i].MusicSpecialistPerSpeciality.Speciality.Id==t.Id&&(t.Code=="ΠΕ79.01"?(n.SelectedMusicPE16ListItems.push(n.permusicspecialists[i].MusicSpecialistPerSpeciality),n.SelectedAvailMusicPE16ListItems.push(n.permusicspecialists[i].MusicSpecialistPerSpeciality)):t.Code=="ΤΕ16.00"?(n.SelectedMusicTE16ListItems.push(n.permusicspecialists[i].MusicSpecialistPerSpeciality),n.SelectedAvailMusicTE16ListItems.push(n.permusicspecialists[i].MusicSpecialistPerSpeciality)):(n.musicspecialists.push(n.permusicspecialists[i]),n.specialistother.push(n.permusicspecialists[i].MusicSpecialistPerSpeciality)))});n.removeDuplicatesMusicPE16ForDualList();n.removeDuplicatesMusicTE16ForDualList();n.checkSpecificMusicSpeciality()};n.doAll=function(){var t;n.hourlyTeacherMusicForEM16.Id!=null&&n.hourlyTeacherMusicForEM16.Id!=""&&n.hourlyTeacherMusicForEM16.Id!="undefined"?(n.canUpdateAppl&&n.hourlyTeacherMusicForEM16.PersonId!=null&&n.hourlyTeacherMusicForEM16.PersonId!=""&&n.hourlyTeacherMusicForEM16.PersonId!="undefined"&&(s.getPersonForApplication(n.hourlyTeacherMusicForEM16.PersonId).then(function(t){n.person=t;n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1;n.showCivilServantBlock();n.checkCivilServant()},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),y.isEmpty(n.SelectedSpecListItems)&&(y.isValueInArray(n.pageRules.hourlyMusicForEM16.CanAccess,"d1, d2, m1,m2")&&n.hourlyTeacherMusicForEM16.LevelId!=n.authentication.levelId&&(n.canUpdateAppl=!1),n.IsDisabled=!n.canUpdateAppl,n.IsDisabled&&(n.noUpdAccess=!0),n.hourlyTeacherMusicForEM16.IsActive||(n.IsDisabled=!0,n.notActive=!0),n.IsDisabled||(n.IsDisabled=!n.pageRules.hourlyMusicForEM16.CanUpdate),n.IsDisabled&&(n.noUpdAccess=!0),y.isEmpty(n.hourlyTeacherMusicForEM16.ApplicationhourlyTeacherMusicForEM16Protocols)||(n.protocol=n.hourlyTeacherMusicForEM16.ApplicationhourlyTeacherMusicForEM16Protocols[0].ProtocolString,n.showProtocol=!0),t=i.all([y.getByParams({id:n.hourlyTeacherMusicForEM16.Id},"/api/ApplHourlyTeacherMusicForEM16/GetApplHourlyTeacherMusicForEM16SpecsById"),h.getMusicSpecialitiesByPersonIdAndValidFekAndLevel(n.hourlyTeacherMusicForEM16.PersonId,n.applicationType,n.hourlyTeacherMusicForEM16.LevelId),c.getMusicSpecialists(n.hourlyTeacherMusicForEM16.PersonId),y.getByParams({id:n.hourlyTeacherMusicForEM16.PersonId},"/api/ApplHourlyTeacherMusicForEM16/GetApplHourlyTeacherMusicForEM16SpecialistsById"),y.getByParams({applicationId:n.hourlyTeacherMusicForEM16.Id},"/api/ApplHourlyTeacherMusicForEM16/GetHourlyTeacherMusicForEM16EM16"),]),t.then(function(t){n.SelectedSpecListItems=t[0];n.SelectedAvailSpecItems=t[0];angular.copy(t[1],n.AvailableSpecListItems);n.personmusicspecialists=t[2];n.permusicspecialists=t[3];n.removeDuplicatesSpecsForDualList();n.findMusicSpecialitiesBySpec();n.findMusicSpecialitiesBySpecForUpdate();n.applicationhourlyTeacherMusicForEM16EM16=t[4];var r=i.all([y.getByAll("api/ApplHourlyTeacherMusicForEM16/getMunicipalities"),y.getByParams({id:n.hourlyTeacherMusicForEM16.Id},"api/ApplHourlyTeacherMusicForEM16/GetApplRegionsByApplId"),l.getTypeRegionAndUnitByMunicipality(n.hourlyTeacherMusicForEM16.RegionAndUnitId,n.applicationType,n.hourlyTeacherMusicForEM16.LevelId),]);r.then(function(t){n.municipalities=t[0];n.SelectedRegionsListItems=t[1];n.SelectedAvailRegionsItems=t[1];angular.copy(t[2],n.AvailableRegionsListItems);n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")},function(){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση tων περιοχών της αίτησης.")})},function(){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")}))),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm")):(n.canInsertAppl&&n.hourlyTeacherMusicForEM16.PersonId!=null&&n.hourlyTeacherMusicForEM16.PersonId!=""&&n.hourlyTeacherMusicForEM16.PersonId!="undefined"&&(s.getPersonForApplication(n.hourlyTeacherMusicForEM16.PersonId).then(function(t){n.person=t;n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1;n.showCivilServantBlock();n.checkCivilServant()},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),y.isEmpty(n.SelectedSpecListItems)&&(t=i.all([h.getMusicSpecialitiesByPersonIdAndValidFekAndLevel(n.hourlyTeacherMusicForEM16.PersonId,n.applicationType,n.hourlyTeacherMusicForEM16.LevelId),c.getMusicSpecialists(n.hourlyTeacherMusicForEM16.PersonId)]),t.then(function(t){angular.copy(t[0],n.AvailableSpecListItems);angular.copy(t[0],n.SelectedAvailSpecItems);n.personmusicspecialists=t[1];n.btnAllSpecRight();var r=i.all([y.getByAll("api/ApplHourlyTeacherMusicForEM16/getMunicipalities"),n.findMusicSpecialitiesBySpec(),]);r.then(function(t){n.municipalities=t[0];angular.copy(n.AvailableMusicTE16ListItems,n.SelectedAvailMusicTE16Items);angular.copy(n.AvailableMusicPE16ListItems,n.SelectedAvailMusicPE16Items);n.btnAllMusicPE16Right();n.btnAllMusicTE16Right();n.changedMunicipality();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")},function(){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση tων περιοχών της αίτησης.")})},function(){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")}))),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm"))};n.getApplication=function(){if(n.hourlyTeacherMusicForEM16.Id!=null&&n.hourlyTeacherMusicForEM16.Id!=""&&n.hourlyTeacherMusicForEM16.Id!="undefined"&&(n.DisableDLevel=!0,n.canUpdateAppl&&n.hourlyTeacherMusicForEM16.PersonId!=null&&n.hourlyTeacherMusicForEM16.PersonId!=""&&n.hourlyTeacherMusicForEM16.PersonId!="undefined")){var t=i.all([y.getByParams({id:n.hourlyTeacherMusicForEM16.Id},"/api/ApplHourlyTeacherMusicForEM16/GetApplHourlyTeacherMusicForEM16ById")]);t.then(function(t){n.hourlyTeacherMusicForEM16=t[0];n.doAll();var r=i.all([y.getByParams({personId:n.hourlyTeacherMusicForEM16.PersonId,applicationTypeId:n.applicationType,didacticYearId:n.hourlyTeacherMusicForEM16.DidacticYearId,applicationId:n.hourlyTeacherMusicForEM16.Id},"api/HistoryAppl/getLevelByApplTypeIdAndPersonIdAndYear")]);r.then(function(t){n.levels=t[0];n.changeLevel();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})})}};n.SelectedSpecAvailItems=[];n.SelectedSelectedSpecListItems=[];n.SelectedSpecListItems=[];n.btnSpecUp=function(){for(var t,r,u,f=n.SelectedSelectedSpecListItems,i=0;i<n.SelectedSelectedSpecListItems.length;i++){if(t=n.SelectedSpecListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedSpecListItems[i].Id),t<=0||t>=n.SelectedSpecListItems.length)return;r=n.SelectedSpecListItems[t];u=n.SelectedSpecListItems[t-1];n.SelectedSpecListItems[t-1]=r;n.SelectedSpecListItems[t]=u}};n.btnSpecDown=function(){for(var t,r,u,i=n.SelectedSelectedSpecListItems.length-1;i>=0;i--){if(t=n.SelectedSpecListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedSpecListItems[i].Id),t<0||t>=n.SelectedSpecListItems.length-1)return;r=n.SelectedSpecListItems[t];u=n.SelectedSpecListItems[t+1];n.SelectedSpecListItems[t+1]=r;n.SelectedSpecListItems[t]=u}};n.btnSpecRight=function(){angular.forEach(n.SelectedAvailSpecItems,function(n){this.push(n)},n.SelectedSpecListItems);angular.forEach(n.SelectedAvailSpecItems,function(t){for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].Id==t.Id&&n.AvailableSpecListItems.splice(i,1)});n.findMusicSpecialitiesBySpec();n.checkSpecificMusicSpeciality();n.findSpecsForDetails();n.SelectedAvailSpecItems=[];n.SelectedSelectedSpecListItems=[]};n.btnSpecLeft=function(){angular.forEach(n.SelectedSelectedSpecListItems,function(n){this.push(n)},n.AvailableSpecListItems);angular.forEach(n.SelectedSelectedSpecListItems,function(t){for(var i=n.SelectedSpecListItems.length-1;i>=0;i--)n.SelectedSpecListItems[i].Id==t.Id&&(t.Code=="ΠΕ79.01"?(n.SelectedMusicPE16ListItems=[],n.SelectedAvailMusicPE16ListItems=[]):t.Code=="ΤΕ16.00"?(n.SelectedMusicTE16ListItems=[],n.SelectedAvailMusicTE16ListItems=[]):n.specialistother=[],n.SelectedSpecListItems.splice(i,1))});n.findMusicSpecialitiesBySpec();n.checkSpecificMusicSpeciality();n.findSpecsForDetails();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.btnAllSpecRight=function(){angular.forEach(n.AvailableSpecListItems,function(n){this.push(n)},n.SelectedSpecListItems);for(var t=n.AvailableSpecListItems.length-1;t>=0;t--)n.AvailableSpecListItems.splice(t,1);n.findMusicSpecialitiesBySpec();n.checkSpecificMusicSpeciality();n.findSpecsForDetails();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.btnAllSpecLeft=function(){angular.forEach(n.SelectedSpecListItems,function(n){this.push(n)},n.AvailableSpecListItems);for(var t=n.SelectedSpecListItems.length-1;t>=0;t--)n.SelectedSpecListItems[t].Code=="ΠΕ79.01"?(n.SelectedMusicPE16ListItems=[],n.SelectedAvailMusicPE16ListItems=[]):n.SelectedSpecListItems[t].Code=="ΤΕ16.00"?(n.SelectedMusicTE16ListItems=[],n.SelectedAvailMusicTE16ListItems=[]):n.specialistother=[],n.SelectedSpecListItems.splice(t,1);n.checkSpecificMusicSpeciality();n.findSpecsForDetails();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.SelectedMusicPE16AvailItems=[];n.SelectedSelectedMusicPE16ListItems=[];n.SelectedMusicPE16ListItems=[];n.btnMusicPE16Up=function(){for(var t,r,u,f=n.SelectedSelectedMusicPE16ListItems,i=0;i<n.SelectedSelectedMusicPE16ListItems.length;i++){if(t=n.SelectedMusicPE16ListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedMusicPE16ListItems[i].Id),t<=0||t>=n.SelectedMusicPE16ListItems.length)return;r=n.SelectedMusicPE16ListItems[t];u=n.SelectedMusicPE16ListItems[t-1];n.SelectedMusicPE16ListItems[t-1]=r;n.SelectedMusicPE16ListItems[t]=u}};n.btnMusicPE16Down=function(){for(var t,r,u,i=n.SelectedSelectedMusicPE16ListItems.length-1;i>=0;i--){if(t=n.SelectedMusicPE16ListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedMusicPE16ListItems[i].Id),t<0||t>=n.SelectedMusicPE16ListItems.length-1)return;r=n.SelectedMusicPE16ListItems[t];u=n.SelectedMusicPE16ListItems[t+1];n.SelectedMusicPE16ListItems[t+1]=r;n.SelectedMusicPE16ListItems[t]=u}};n.btnMusicPE16Right=function(){angular.forEach(n.SelectedAvailMusicPE16Items,function(n){this.push(n)},n.SelectedMusicPE16ListItems);angular.forEach(n.SelectedAvailMusicPE16Items,function(t){for(var i=n.AvailableMusicPE16ListItems.length-1;i>=0;i--)n.AvailableMusicPE16ListItems[i].Id==t.Id&&n.AvailableMusicPE16ListItems.splice(i,1)});n.SelectedAvailMusicPE16Items=[];n.SelectedSelectedMusicPE16ListItems=[]};n.btnMusicPE16Left=function(){angular.forEach(n.SelectedSelectedMusicPE16ListItems,function(n){this.push(n)},n.AvailableMusicPE16ListItems);angular.forEach(n.SelectedSelectedMusicPE16ListItems,function(t){for(var i=n.SelectedMusicPE16ListItems.length-1;i>=0;i--)n.SelectedMusicPE16ListItems[i].Id==t.Id&&n.SelectedMusicPE16ListItems.splice(i,1)});n.SelectedSelectedMusicPE16ListItems=[];n.SelectedAvailMusicPE16Items=[]};n.btnAllMusicPE16Right=function(){angular.forEach(n.AvailableMusicPE16ListItems,function(n){this.push(n)},n.SelectedMusicPE16ListItems);for(var t=n.AvailableMusicPE16ListItems.length-1;t>=0;t--)n.AvailableMusicPE16ListItems.splice(t,1);n.SelectedSelectedMusicPE16ListItems=[];n.SelectedAvailMusicPE16Items=[]};n.btnAllMusicPE16Left=function(){angular.forEach(n.SelectedMusicPE16ListItems,function(n){this.push(n)},n.AvailableMusicPE16ListItems);for(var t=n.SelectedMusicPE16ListItems.length-1;t>=0;t--)n.SelectedMusicPE16ListItems.splice(t,1);n.SelectedSelectedMusicPE16ListItems=[];n.SelectedAvailMusicPE16Items=[]};n.SelectedMusicTE16AvailItems=[];n.SelectedSelectedMusicTE16ListItems=[];n.SelectedMusicTE16ListItems=[];n.btnMusicTE16Up=function(){for(var t,r,u,f=n.SelectedSelectedMusicTE16ListItems,i=0;i<n.SelectedSelectedMusicTE16ListItems.length;i++){if(t=n.SelectedMusicTE16ListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedMusicTE16ListItems[i].Id),t<=0||t>=n.SelectedMusicTE16ListItems.length)return;r=n.SelectedMusicTE16ListItems[t];u=n.SelectedMusicTE16ListItems[t-1];n.SelectedMusicTE16ListItems[t-1]=r;n.SelectedMusicTE16ListItems[t]=u}};n.btnMusicTE16Down=function(){for(var t,r,u,i=n.SelectedSelectedMusicTE16ListItems.length-1;i>=0;i--){if(t=n.SelectedMusicTE16ListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedMusicTE16ListItems[i].Id),t<0||t>=n.SelectedMusicTE16ListItems.length-1)return;r=n.SelectedMusicTE16ListItems[t];u=n.SelectedMusicTE16ListItems[t+1];n.SelectedMusicTE16ListItems[t+1]=r;n.SelectedMusicTE16ListItems[t]=u}};n.btnMusicTE16Right=function(){angular.forEach(n.SelectedAvailMusicTE16Items,function(n){this.push(n)},n.SelectedMusicTE16ListItems);angular.forEach(n.SelectedAvailMusicTE16Items,function(t){for(var i=n.AvailableMusicTE16ListItems.length-1;i>=0;i--)n.AvailableMusicTE16ListItems[i].MusicSpecialist.Id==t.MusicSpecialist.Id&&n.AvailableMusicTE16ListItems.splice(i,1)});n.SelectedAvailMusicTE16Items=[];n.SelectedSelectedMusicTE16ListItems=[]};n.btnMusicTE16Left=function(){angular.forEach(n.SelectedSelectedMusicTE16ListItems,function(n){this.push(n)},n.AvailableMusicTE16ListItems);angular.forEach(n.SelectedSelectedMusicTE16ListItems,function(t){for(var i=n.SelectedMusicTE16ListItems.length-1;i>=0;i--)n.SelectedMusicTE16ListItems[i].MusicSpecialist.Id==t.MusicSpecialist.Id&&n.SelectedMusicTE16ListItems.splice(i,1)});n.SelectedSelectedMusicTE16ListItems=[];n.SelectedAvailMusicTE16Items=[]};n.btnAllMusicTE16Right=function(){angular.forEach(n.AvailableMusicTE16ListItems,function(n){this.push(n)},n.SelectedMusicTE16ListItems);for(var t=n.AvailableMusicTE16ListItems.length-1;t>=0;t--)n.AvailableMusicTE16ListItems.splice(t,1);n.SelectedSelectedMusicTE16ListItems=[];n.SelectedAvailMusicTE16Items=[]};n.btnAllMusicTE16Left=function(){angular.forEach(n.SelectedMusicTE16ListItems,function(n){this.push(n)},n.AvailableMusicTE16ListItems);for(var t=n.SelectedMusicTE16ListItems.length-1;t>=0;t--)n.SelectedMusicTE16ListItems.splice(t,1);n.SelectedSelectedMusicTE16ListItems=[];n.SelectedAvailMusicTE16Items=[]};n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[];n.SelectedRegionsListItems=[];n.btnRegionsUp=function(){for(var t,r,u,f=n.SelectedSelectedRegionsListItems,i=0;i<n.SelectedSelectedRegionsListItems.length;i++){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<=0||t>=n.SelectedRegionsListItems.length)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t-1];n.SelectedRegionsListItems[t-1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsDown=function(){for(var t,r,u,i=n.SelectedSelectedRegionsListItems.length-1;i>=0;i--){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<0||t>=n.SelectedRegionsListItems.length-1)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t+1];n.SelectedRegionsListItems[t+1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsRight=function(){angular.forEach(n.SelectedAvailRegionsItems,function(n){this.push(n)},n.SelectedRegionsListItems);angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.btnRegionsLeft=function(){angular.forEach(n.SelectedSelectedRegionsListItems,function(n){this.push(n)},n.AvailableRegionsListItems);angular.forEach(n.SelectedSelectedRegionsListItems,function(t){for(var i=n.SelectedRegionsListItems.length-1;i>=0;i--)n.SelectedRegionsListItems[i].Id==t.Id&&n.SelectedRegionsListItems.splice(i,1)});n.SelectedSelectedRegionsListItems=[];n.SelectedAvailRegionsItems=[]};n.changedMunicipality=function(){n.SelectedRegionsListItems=[];n.SelectedSelectedRegionsListItems=[];n.getApplRegions()};n.hasMusicSpeciality=!1;n.checkForMusic=function(){for(var t=0;t<n.SelectedSpecListItems.length;t+=1)if(n.SelectedSpecListItems[t].IsMusic==!0){n.hasMusicSpeciality=!0;break}else n.hasMusicSpeciality=!1;n.hasMusicSpeciality==!1&&(n.hourlyTeacherMusicForEM16.ConservatoryOwner=0)};n.editPerson=function(){f.setPersonId(n.hourlyTeacherMusicForEM16.PersonId);e.go("stateEditPerson")};n.saveAction=function(t){n.showAlertSpec=y.isEmpty(n.SelectedSpecListItems)?!0:!1;n.showAlertMusicPE16=n.showPe16&&y.isEmpty(n.SelectedMusicPE16ListItems)?!0:!1;n.showAlertMusicTE16=n.showTe16&&y.isEmpty(n.SelectedMusicTE16ListItems)?!0:!1;n.showAlertRegion=y.isEmpty(n.SelectedRegionsListItems)?!0:!1;y.isEmptyValue(n.applicationhourlyTeacherMusicForEM16EM16)||(y.isEmptyValue(n.applicationhourlyTeacherMusicForEM16EM16.AnotherAEITEIMusicSpecialityDegree)||(n.applicationhourlyTeacherMusicForEM16EM16.AnotherAEITEIMusicSpecialityDegree=parseFloat(n.applicationhourlyTeacherMusicForEM16EM16.AnotherAEITEIMusicSpecialityDegree.toString().replace(",","."))),y.isEmptyValue(n.applicationhourlyTeacherMusicForEM16EM16.PedagogicalDepartmentAEITEIDegree)||(n.applicationhourlyTeacherMusicForEM16EM16.PedagogicalDepartmentAEITEIDegree=parseFloat(n.applicationhourlyTeacherMusicForEM16EM16.PedagogicalDepartmentAEITEIDegree.toString().replace(",","."))),y.isEmptyValue(n.applicationhourlyTeacherMusicForEM16EM16.CounterPointDegree)||(n.applicationhourlyTeacherMusicForEM16EM16.CounterPointDegree=parseFloat(n.applicationhourlyTeacherMusicForEM16EM16.CounterPointDegree.toString().replace(",","."))),y.isEmptyValue(n.applicationhourlyTeacherMusicForEM16EM16.AEITEIDegreeNotProfessional)||(n.applicationhourlyTeacherMusicForEM16EM16.AEITEIDegreeNotProfessional=parseFloat(n.applicationhourlyTeacherMusicForEM16EM16.AEITEIDegreeNotProfessional.toString().replace(",","."))),y.isEmptyValue(n.applicationhourlyTeacherMusicForEM16EM16.AnotherPhdMusicSpecialistDegree)||(n.applicationhourlyTeacherMusicForEM16EM16.AnotherPhdMusicSpecialistDegree=parseFloat(n.applicationhourlyTeacherMusicForEM16EM16.AnotherPhdMusicSpecialistDegree.toString().replace(",","."))),y.isEmptyValue(n.applicationhourlyTeacherMusicForEM16EM16.FougkasDegree)||(n.applicationhourlyTeacherMusicForEM16EM16.FougkasDegree=parseFloat(n.applicationhourlyTeacherMusicForEM16EM16.FougkasDegree.toString().replace(",","."))),y.isEmptyValue(n.applicationhourlyTeacherMusicForEM16EM16.AnotherMasterMusicSpecialistDegree)||(n.applicationhourlyTeacherMusicForEM16EM16.AnotherMasterMusicSpecialistDegree=parseFloat(n.applicationhourlyTeacherMusicForEM16EM16.AnotherMasterMusicSpecialistDegree.toString().replace(",","."))),y.isEmptyValue(n.applicationhourlyTeacherMusicForEM16EM16.PhdMasterNotMusicSpecialistDegree)||(n.applicationhourlyTeacherMusicForEM16EM16.PhdMasterNotMusicSpecialistDegree=parseFloat(n.applicationhourlyTeacherMusicForEM16EM16.PhdMasterNotMusicSpecialistDegree.toString().replace(",","."))),y.isEmptyValue(n.applicationhourlyTeacherMusicForEM16EM16.MusicStudiesDegree)||(n.applicationhourlyTeacherMusicForEM16EM16.MusicStudiesDegree=parseFloat(n.applicationhourlyTeacherMusicForEM16EM16.MusicStudiesDegree.toString().replace(",","."))),y.isEmptyValue(n.applicationhourlyTeacherMusicForEM16EM16.ByzantineEcclesiasticalDiplomaDegree)||(n.applicationhourlyTeacherMusicForEM16EM16.ByzantineEcclesiasticalDiplomaDegree=parseFloat(n.applicationhourlyTeacherMusicForEM16EM16.ByzantineEcclesiasticalDiplomaDegree.toString().replace(",","."))),y.isEmptyValue(n.applicationhourlyTeacherMusicForEM16EM16.ByzantineEcclesiasticalDegree)||(n.applicationhourlyTeacherMusicForEM16EM16.ByzantineEcclesiasticalDegree=parseFloat(n.applicationhourlyTeacherMusicForEM16EM16.ByzantineEcclesiasticalDegree.toString().replace(",","."))),y.isEmptyValue(n.applicationhourlyTeacherMusicForEM16EM16.CompositionInstrumentDiplomaDegree)||(n.applicationhourlyTeacherMusicForEM16EM16.CompositionInstrumentDiplomaDegree=parseFloat(n.applicationhourlyTeacherMusicForEM16EM16.CompositionInstrumentDiplomaDegree.toString().replace(",","."))));n.canSave=!0;!$("#ApplicationHourlyMusicForEM16Step1").valid()||n.showAlertSpec||n.showAlertMusicPE16||n.showAlertMusicTE16||n.showAlertRegion||!n.canSave||n.InsOrUpd(t)};n.InsOrUpd=function(t){var r={Specialities:n.SelectedSpecListItems,HourlyTeacherMusicForEM16:n.hourlyTeacherMusicForEM16,RegionAndUnit:n.SelectedRegionsListItems,MusicSpecialistOthers:n.specialistother,HourlyTeacherMusicForEM16EM16:n.applicationhourlyTeacherMusicForEM16EM16,ApplTemplate:"",UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Status:t},i=r;n.hourlyTeacherMusicForEM16.Id!=null&&n.hourlyTeacherMusicForEM16.Id!=""&&n.hourlyTeacherMusicForEM16.Id!="undefined"?(n.hourlyTeacherMusicForEM16.ModifiedBy=n.authentication.userName,y.postByParams(i,"/api/ApplHourlyTeacherMusicForEM16/updateApplHourlyTeacherMusicForEM16").then(function(){f.setPersonId(n.person.Id);e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)})):(n.hourlyTeacherMusicForEM16.DidacticYearId=n.applicationDidacticYear.Id,n.hourlyTeacherMusicForEM16.CreatedBy=n.authentication.userName,y.postByParams(i,"/api/ApplHourlyTeacherMusicForEM16/insertApplHourlyTeacherMusicForEM16").then(function(){f.setPersonId(n.hourlyTeacherMusicForEM16.PersonId);e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)}))};n.removeDuplicatesMusicPE16ForDualList=function(){angular.forEach(n.SelectedAvailMusicPE16ListItems,function(t){for(var i=n.AvailableMusicPE16ListItems.length-1;i>=0;i--)n.AvailableMusicPE16ListItems[i].Id==t.Id&&n.AvailableMusicPE16ListItems.splice(i,1)});n.SelectedAvailMusicPE16ListItems=[];n.SelectedSelectedMusicPE16ListItems=[]};n.removeDuplicatesMusicPE16ForDualListFromSelected=function(){angular.forEach(n.SelectedMusicPE16ListItems,function(t){for(var i=n.AvailableMusicPE16ListItems.length-1;i>=0;i--)n.AvailableMusicPE16ListItems[i].Id==t.Id&&n.AvailableMusicPE16ListItems.splice(i,1)})};n.removeDuplicatesMusicTE16ForDualList=function(){angular.forEach(n.SelectedAvailMusicTE16ListItems,function(t){for(var i=n.AvailableMusicTE16ListItems.length-1;i>=0;i--)n.AvailableMusicTE16ListItems[i].Id==t.Id&&n.AvailableMusicTE16ListItems.splice(i,1)});n.SelectedAvailMusicTE16ListItems=[];n.SelectedSelectedMusicTE16ListItems=[]};n.removeDuplicatesMusicTE16ForDualListFromSelected=function(){angular.forEach(n.SelectedMusicTE16ListItems,function(t){for(var i=n.AvailableMusicTE16ListItems.length-1;i>=0;i--)n.AvailableMusicTE16ListItems[i].Id==t.Id&&n.AvailableMusicTE16ListItems.splice(i,1)})}};HourlyTeacherMusicForEM16Controller.$inject=["$scope","$filter","$q","$uibModal","$log","PassParameters","$state","toaster","PersonFactory","PersonSpecialityFactory","PersonMusicSpecialityFactory","ApplicationTypeRegionAndUnitFactory","ApplicationTypeFekFactory","RegionAndFactory","GeneralFactory"];HourlyTeacherSMEAController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y){if(n.mess="",n.messInfo="",n.hourlyTeacherSmea={IsTemporaryStored:!0},n.person={},n.applicationType=4,n.perspec={},n.SelectedSpecs=[],n.hasValidFekNoConfirmSpeciality=!1,n.showToConfirmSpeciality=!1,n.step1=!0,n.step2=!1,n.continueDisabled="disabled",n.intendancies=[],n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=!1,n.userLevel=0,n.IsCivilServant=!1,n.showCivilServantFull=!1,n.SelectedAvailRegionsItems=[],n.SelectedSelectedRegionsListItems=[],n.SelectedRegionsListItems=[],n.SelectedSpecAvailItems=[],n.SelectedSelectedSpecListItems=[],n.SelectedSpecListItems=[],n.AvailableSpecListItems=[],n.AvailableRegionsListItems=[],n.DisableDLevel=!1,n.hasMusicSpeciality=!1,n.hasboth=!1,n.applicationLevelId=0,n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=!1,n.showAlertSpec=!1,n.showAlertRegion=!1,n.visibleColumns={FirstSpeciality:!1,EquivalenceType:!1},n.canSave=!0,n.fek={},y.isValueInArray(y.getRoleCode(n.authentication.role),"d1, d2")&&(n.userLevel=n.authentication.levelId,n.hourlyTeacherSmea.LevelId=n.authentication.levelId,n.hourlyTeacherSmea.IntendancyId=n.authentication.regionAndUnitId),n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},blockUI({target:"#divBlockUI",animate:!0}),n.authentication.isAuth){var p="hourlySmea";y.getByParams({role:n.authentication.role,codes:p},"/api/Subsystem/NewCheckPermission").then(function(r){var u=p.split(","),e,s;for(e in u)n.pageRules[u[e]]=t("filter")(r,{Code:u[e]},!0)[0].Rules;n.hourlyTeacherSmea.Id=f.getApplicationId();n.applicationLevelId=f.getApplicationLevelId();y.isEmptyValue(n.applicationLevelId)&&(n.applicationLevelId=0);f.resetApplication();n.hourlyTeacherSmea.PersonId=f.getPersonId();y.isEmptyValue(n.hourlyTeacherSmea.Id)?(n.step1=!0,n.step2=!1):(n.step1=!1,n.step2=!0);y.isValueInArray(n.pageRules.hourlySmea.CanAccess,"u1, u2")&&(n.hourlyTeacherSmea.PersonId=n.authentication.personId);s=i.all([y.getByParams({personId:n.hourlyTeacherSmea.PersonId},"/api/ApplHourlyTeacherSmea/getSpecialityForHourlySMEA"),y.getByParams({Id:n.hourlyTeacherSmea.PersonId},"/api/ApplHourlyTeacherSmea/GetApplHourlySMEA")]);s.then(function(i){var u,r;for(angular.copy(i[0],n.AvailableSpecListItems),n.applHourlySMEA=i[1],r=n.AvailableSpecListItems.length-1;r>=0;r--)n.AvailableSpecListItems[r].applHourlySMEA=0;for(u=n.applHourlySMEA.length-1;u>=0;u--)for(r=n.AvailableSpecListItems.length-1;r>=0;r--)n.applHourlySMEA[u].SpecialityId==n.AvailableSpecListItems[r].Id&&(n.AvailableSpecListItems[r].applHourlySMEA=1);y.isEmpty(n.AvailableSpecListItems)?(n.mess+="<li>Δεν μπορείτε να υποβάλετε αίτηση. Δεν βρίσκεστε στον ενιαίο πίνακα για κάποιον κλάδο<\/li>",n.showAddEditForm=2):n.hourlyTeacherSmea.Id!=null&&n.hourlyTeacherSmea.Id!=""&&n.hourlyTeacherSmea.Id!="undefined"?(y.isEmptyValue(n.hourlyTeacherSmea.SpecialityId)&&(n.hourlyTeacherSmea.SpecialityId=f.getSpecialityId()),y.getByParams({applicationTypeId:n.applicationType,specialityId:n.hourlyTeacherSmea.SpecialityId},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(i){n.SelectedSpecListItems=t("filter")(n.AvailableSpecListItems,{Id:n.hourlyTeacherSmea.SpecialityId},!0)[0];!y.isEmptyValue(i)||y.isValueInArray(y.getRoleCode(n.authentication.role),"a")?(n.canUpdateAppl=!0,n.showAddEditForm=1,n.getApplication()):(n.mess+="<li>Δεν μπορείτε να τροποποιήσετε την αίτηση γιατί δεν υπάρχει ανοιχτό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2)},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(n.canInsertAppl=!0,n.showAddEditForm=1)})},function(){unblockUI("#divBlockUI");o.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else e.go("/");n.checkCivilServant=function(){n.IsCivilServant==1?n.showCivilServantFull=!1:(n.hourlyTeacherSmea.PublicServantFull=0,n.showCivilServantFull=!0)};n.checkForBoth=function(){n.hasboth=n.SelectedSpecListItems.IsBoth==!0?!0:!1};n.showCivilServantBlock=function(){return n.IsCivilServant==!0?!0:!1};n.changedMunicipality=function(){n.SelectedRegionsListItems=[];n.SelectedSelectedRegionsListItems=[];n.getApplRegions()};n.checkForMusic=function(){n.hasMusicSpeciality=n.SelectedSpecListItems.IsMusic==!0?!0:!1;n.hasMusicSpeciality==!1&&(n.hourlyTeacherSmea.ConservatoryOwner=0)};n.getApplRegions=function(){n.hourlyTeacherSmea.RegionAndUnitId>0?(n.AvailableRegionsListItems=[],n.hasboth?(blockUI({target:"#divBlockUIRegion",animate:!0}),l.getTypeRegionAndUnitByMunicipalityAndBoth(n.hourlyTeacherSmea.RegionAndUnitId,n.applicationType).then(function(t){angular.copy(t,n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(blockUI({target:"#divBlockUIRegion",animate:!0}),l.getTypeRegionAndUnitByMunicipality(n.hourlyTeacherSmea.RegionAndUnitId,n.applicationType,n.hourlyTeacherSmea.LevelId).then(function(t){angular.copy(t,n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}))):(unblockUI("#divBlockUIRegion"),n.AvailableRegionsListItems=[],n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[])};n.createTemplate=function(){return{content:[{style:"tableExample",table:{widths:["*"],body:[[{stack:[{text:"\nΑΙΤΗΣΗ / ΔΗΛΩΣΗ ΠΡΟΤΙΜΗΣΕΩΝ ΥΠΟΨΗΦΙΩΝ\nα.ΑΝΑΠΛΗΡΩΤΩΝ ΕΚΠΑΙΔΕΥΤΙΚΩΝ, β.ΩΡΟΜΙΣΘΙΩΝ ΕΚΠΑΙΔΕΥΤΙΚΩΝ\nΣΧΟΛΙΚΟΥ ΕΤΟΥΣ 2014-15",style:"header",alignment:"center"},{text:["Της ",{text:"αριθμ. 118102/Δ1/25.07.2014 (ΑΔΑ: Β3Ξ69-ΣΦΤ)",bold:!0}," εγκυκλίου του Υ.ΠΑΙ.Θ.\n"],fontSize:9},{text:"(επέχει θέση Υπεύθυνης Δήλωσης του Ν.1599/86)\n\n",fontSize:9}]}]]}},{style:"tableExample",table:{widths:["auto","*"],body:[[{text:["δια μέσου της Διεύθυνσης : ",{text:"Δ.Ε. Αχαΐας",bold:!0}],fontSize:9},{text:["Αρ. Πρωτοκόλου : ",{text:"1234567890",bold:!0}],fontSize:9,alignment:"right"}],[{text:"(συμπληρώνονται αυτόματα κατά την καταχώρηση της αίτησης)\n\n",fontSize:6},{text:["Ημερομηνία : ",{text:"20/04/2015",bold:!0}],fontSize:9,alignment:"right"}]]},layout:"noBorders"},{text:"\nΠΡΟΣΩΠΙΚΑ ΣΤΟΙΧΕΙΑ",style:"header",alignment:"center"},{style:"tableExample",table:{widths:["*"],body:[[{stack:[{style:"tableExample",table:{widths:["*","*"],body:[[{text:["Α.Φ.Μ : ",{text:"000000024",bold:!0}],fontSize:9},{text:["Α.Δ.Τ : ",{text:"ΑΖ 711210",bold:!0}],fontSize:9}],[{text:["ΕΠΩΝΥΜΟ : ",{text:"ΠΕΤΡΟΠΟΥΛΟΣ",bold:!0}],fontSize:9},{text:["ΟΝΟΜΑ : ",{text:"ΔΗΜΗΤΡΗΣ",bold:!0}],fontSize:9}],[{columns:[{width:90,text:"ΠΟΛΥΤΕΚΝΟΣ ",fontSize:9,alignment:"right"},{width:"*",image:"imgUncheckedBox",width:12,height:12},{width:90,text:"ΤΡΙΤΕΚΝΟΣ ",fontSize:9,alignment:"right"},{width:"*",image:"imgCheckedBox",width:12,height:12},{width:120,text:"ΠΑΙΔΑΓΩΓΙΚΗ ΚΑΤΑΡΤΙΣΗ ",fontSize:9,alignment:"right"},{width:"*",image:"imgUncheckedBox",width:12,height:12},{width:120,text:"ΔΗΜΟΣΙΟΣ ΥΠΑΛΛΗΛΟΣ ",fontSize:9,alignment:"right"},{width:"*",image:"imgCheckedBox",width:12,height:12}],colSpan:2}]]},layout:"noBorders"}]}]]}}],styles:{header:{fontSize:12,bold:!0,margin:[0,0,0,10]},subheader:{fontSize:16,bold:!0,margin:[0,10,0,5]},tableExample:{margin:[0,5,0,15]},tableHeader:{bold:!0,fontSize:13,color:"black"}},images:{imgCheckedBox:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAEQkAABEJABiazSuAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAACAASURBVHic7d153GZ1Xf/x14wDCDngkixiYC6AaUr1Ke3nhqBomSZlJaaACqiEggq44oaKIioaoqIijAtaJq5pJAhuKX1KNCshlyBlc0EHZRmGmd8f5wzes97bdV2fc67zej4e98Px4dzX9Z4R7s/7+p7v+Z4la9euRaMRETsDewB7ArsB2wPLZ/nauiSsJNVbBVw3y9dK4HLgEuDSzLyqJur0WWIBmJ+I2JZmwO/Jr4b9ul9vXxhNkoZgJXApTSG4ZOavM/OGymB9YwGYRURsAzwQ2Lf9egCwVWkoSdKGbga+Bpzffn01M2+qjdRtFoANRMQyIICH0wz8BwHbloaSJM3XDcCXacrA54HMzNW1kbrFAsCty/p/ChxIM/iX1yaSJI3YdTRF4Gzg414uGHABiIglwEOBg4An4PV7SRqKlcBHgBXAFzJzkINwcAUgIvYEngI8Gdi9OI4kqdZlwPuB92XmJdVhJmkQBaDdyHcw8HTgD4rjSJK66SLgPcBZQ9hAONUFICK2Aw4HjgXuUhxHktQPVwBvAE7PzOurw4zLVBaAiFgOHAE8D9ixOI4kqZ+uAd4EnJaZ11WHGbWpKgARcQfgOcBRwB2K40iSpsO1wFuAt2bmtdVhRmUqCkD7if9FwJF4C58kaTyuA04FTpyG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Pa2HAKBv4y76cOs51uiQHX94AJy/hYNs1GNZnEMuACy/GzPspqk7ZMcfDIDxsYHnbPk463ezj/0BMBXjTrq59RxrcM7KRwSvPALwkiRP+ZzgxOxLckPrIQDgMDdk2FFTdkKGXZ/k0ABYhMP/d9Raf9R6CABYadxNd7SeYw0O7vpFC4BbWw8AAEexCDvq0AAYbxH44mbjrM3DSe5sPQQAHMWdGXbVlL34wG2BDxwBODPJ09rNsya31VoX5Y5LAHRm3FG3tZ5jFU/LsPMPCYCpW4RDKwD0bRF21SEBcEbDQdbiB7XWe1sPAQDHMu6qH7SeYxVnJItzBOCu1gMAwBpNfWct1CmAXa0HAIA1mvrOWphTAPsz/f+ZAHDArgy7a6rOSJJtL3rRi05N8uPGwxzLd2qtZ7ceAgDWqpRyb5IXtp7jGJ65PdP+7T9J7m49AACs092tB1jFGdsz/fP/32s9AACs09R315nbk5zWeopV7G49AACs09R312nbk+xsPcUq7ms9AACs09R3187tSXa0nuIY9tRaH2o9BACsx7i79rSe4xh2TD0Apl5QAHA0U95hkw+A+1sPAAAbNOUdNvkAmPLhEwA4linvMAEAAHMy5R0mAABgTqa8wwQAAMzJlHeYAACAOZnyDtuxPcnxrac4hn2tBwCADZryDjt+++p/BwBYNgIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokA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2HmazliIADiilnJTkLUnemuSkxuMAsBwezXAB+odqrY+2HmZWlioADhiPCFyZ5C+SnNx4HAAW0yNJPpDkpmX4jf9wSxkAB5RSTkxyRZJ3xDUCAKzNg0nen+TmWutjrYeZl6UOgANKKU9PcnmSNyf53cbjADBN30rykSS3TOWJffPURQCsVEo5M8mbklya5PTG4wDQ1v0ZnkD70Vrr7tbDbKXuAuCAUsq2JC9PclmSNyTZ2XYiALbIniSfSnJrki/XWrtchN0GwEqllBOSvC7JxUleER8lBFg2e5N8KcntST5Ta3288TzNCYDDlFKOS1IyhMD5Sc5JckLToQBYr8eTfC3JrgyLv9Zan2g70rQIgFWMFxC+JEMMnJ/kxUme1nQoAA73yyTfzLDwdyX5Rg8X8m2GAFin8XTBmePXGYf92XUEAPO1J8l9SXaPXwf/7LD++giAGSqlnJpfRcFpGYJgxypfxzcZFqC9fRnOzR/ra0+GR+3uTnJfrfWhNqMun/8PcskwF+bRQ44AAAAASUVORK5CYII="},defaultStyle:{columnGap:5}}};n.goToStep=function(i,r,u,f,e){i==2?y.getByParams({applicationTypeId:n.applicationType,specialityId:r},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(i){n.SelectedSpecListItems=t("filter")(n.AvailableSpecListItems,{Id:r},!0)[0];n.fek=i;y.isEmptyValue(i)?(n.mess="<li>Δεν υπαρχει ενεργό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2):(n.step1=!1,n.step2=!0,n.hourlyTeacherSmea.SpecialityId=r,n.hourlyTeacherSmea.LevelId=u,n.hasboth=f,n.hasMusicSpeciality=e,blockUI({target:"#divBlockUIForm",animate:!0}),n.doAll())},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.step1=!0,n.step2=!1,n.DisableDLevel=y.isEmpty(n.SelectedSpecListItems)&&y.isEmptyValue(n.hourlyTeacherSmea.Id)?!1:!0)};n.findSpecsForDetails=function(){n.SelectedSpecs=[];angular.forEach(n.SelectedSpecListItems,function(t){for(var i=n.perspec.length-1;i>=0;i--)n.perspec[i].Speciality.Id==t.Id&&n.SelectedSpecs.push(n.perspec[i])})};n.showDetails=function(){return n.SelectedSpecs.length>0?!0:!1};n.removeDuplicatesSpecsForDualList=function(){angular.forEach(n.SelectedAvailSpecItems,function(t){for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].Id==t.Id&&n.AvailableSpecListItems.splice(i,1)});n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.removeDuplicatesRegionsForDualList=function(){angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.hasboth||(n.SelectedRegionsListItems=t("filter")(n.SelectedRegionsListItems,{Level:n.hourlyTeacherSmea.LevelId},!0));n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.changeLevel=function(){y.isEmptyValue(n.hourlyTeacherSmea.LevelId)?(n.hourlyTeacherSmea.LevelId=null,n.intendancies=[],n.hourlyTeacherSmea.IntendancyId=null,n.continueDisabled=!0):(v.getIntendancies(n.hourlyTeacherSmea.LevelId).then(function(t){n.intendancies=t}).catch(function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα στην εύρεση διευθύνσεων")}),y.isEmptyValue(n.hourlyTeacherSmea.Id)&&(n.hourlyTeacherSmea.IntendancyId=null),n.continueDisabled=!1)};n.changeIntendancies=function(){y.isEmptyValue(n.hourlyTeacherSmea.LevelId)||y.isEmptyValue(n.hourlyTeacherSmea.IntendancyId)?(n.continueDisabled=!0,n.hourlyTeacherSmea.IntendancyId=null):n.continueDisabled=!1};n.doAll=function(){var r,u;n.hourlyTeacherSmea.Id!=null&&n.hourlyTeacherSmea.Id!=""&&n.hourlyTeacherSmea.Id!="undefined"?n.canUpdateAppl&&(n.hourlyTeacherSmea.PersonId!=null&&n.hourlyTeacherSmea.PersonId!=""&&n.hourlyTeacherSmea.PersonId!="undefined"&&(y.isValueInArray(n.pageRules.hourlySmea.CanAccess,"d1, d2, m1, m2")&&n.hourlyTeacherSmea.LevelId!=n.authentication.levelId&&(n.canUpdateAppl=!1),y.isEmpty(n.AvailableSpecListItems)||(n.IsDisabled=!n.canUpdateAppl,n.IsDisabled&&(n.noUpdAccess=!0),n.hourlyTeacherSmea.IsActive||(n.IsDisabled=!0,n.notActive=!0),n.IsDisabled||(n.IsDisabled=!n.pageRules.hourlySmea.CanUpdate),n.IsDisabled&&(n.noUpdAccess=!0),y.isEmpty(n.hourlyTeacherSmea.ApplicationHourlyTeacherSMEAProtocols)||(n.protocol=n.hourlyTeacherSmea.ApplicationHourlyTeacherSMEAProtocols[0].ProtocolString,n.showProtocol=!0),r=i.all([y.getByParams({id:n.hourlyTeacherSmea.PersonId,specialityId:n.hourlyTeacherSmea.SpecialityId},"/api/Person/GetPersonDtoSmea")]),r.then(function(t){n.person=t[0];n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1;n.showCivilServantBlock();n.checkCivilServant();n.checkForBoth();n.checkForMusic();var r=i.all([y.getByParams({id:n.hourlyTeacherSmea.Id},"api/ApplHourlyTeacherSmea/GetApplRegionsByApplId"),n.hasboth?l.getTypeRegionAndUnitByMunicipalityAndBoth(n.hourlyTeacherSmea.RegionAndUnitId,n.applicationType):l.getTypeRegionAndUnitByMunicipality(n.hourlyTeacherSmea.RegionAndUnitId,n.applicationType,n.hourlyTeacherSmea.LevelId),y.getByParams({applicationTypeId:n.applicationType,specialityId:n.hourlyTeacherSmea.SpecialityId},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality"),h.getAllMunicipalities()]);r.then(function(t){n.SelectedRegionsListItems=t[0];n.SelectedAvailRegionsItems=t[0];angular.copy(t[1],n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.fek=t[2];n.municipalities=t[3];n.removeDuplicatesRegionsForDualList()},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")}))),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm")):(n.canInsertAppl&&n.hourlyTeacherSmea.PersonId!=null&&n.hourlyTeacherSmea.PersonId!=""&&n.hourlyTeacherSmea.PersonId!="undefined"&&(y.getByParams({id:n.hourlyTeacherSmea.PersonId,specialityId:n.hourlyTeacherSmea.SpecialityId},"/api/Person/GetPersonDtoSmea").then(function(i){n.person=i;n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1;n.visibleColumns.FirstSpeciality=y.isEmptyValue(t("filter")(n.person.ListSmea,{Id:7},!0)[0])?!1:!0;n.visibleColumns.EquivalenceType=y.isEmptyValue(t("filter")(n.person.ListSmea,function(n){return n.EquivalenceType!=""}))?!1:!0;n.showCivilServantBlock();n.checkCivilServant()},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),y.isEmpty(n.SelectedSpecListItems)&&(u=i.all([h.getAllMunicipalities(),]),u.then(function(t){n.municipalities=t[0];n.changedMunicipality();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")}))),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm"))};n.getApplication=function(){if(n.hourlyTeacherSmea.Id!=null&&n.hourlyTeacherSmea.Id!=""&&n.hourlyTeacherSmea.Id!="undefined"&&(n.DisableDLevel=!0,n.canUpdateAppl&&n.hourlyTeacherSmea.PersonId!=null&&n.hourlyTeacherSmea.PersonId!=""&&n.hourlyTeacherSmea.PersonId!="undefined")){var t=i.all([h.getHourlyTeacherSmeaById(n.hourlyTeacherSmea.Id)]);t.then(function(t){n.hourlyTeacherSmea=t[0];n.doAll()})}};n.btnSpecUp=function(){for(var t,r,u,f=n.SelectedSelectedSpecListItems,i=0;i<n.SelectedSelectedSpecListItems.length;i++){if(t=n.SelectedSpecListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedSpecListItems[i].Id),t<=0||t>=n.SelectedSpecListItems.length)return;r=n.SelectedSpecListItems[t];u=n.SelectedSpecListItems[t-1];n.SelectedSpecListItems[t-1]=r;n.SelectedSpecListItems[t]=u}};n.btnSpecDown=function(){for(var t,r,u,i=n.SelectedSelectedSpecListItems.length-1;i>=0;i--){if(t=n.SelectedSpecListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedSpecListItems[i].Id),t<0||t>=n.SelectedSpecListItems.length-1)return;r=n.SelectedSpecListItems[t];u=n.SelectedSpecListItems[t+1];n.SelectedSpecListItems[t+1]=r;n.SelectedSpecListItems[t]=u}};n.btnSpecRight=function(){angular.forEach(n.SelectedAvailSpecItems,function(n){this.push(n)},n.SelectedSpecListItems);angular.forEach(n.SelectedAvailSpecItems,function(t){for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].Id==t.Id&&n.AvailableSpecListItems.splice(i,1)});n.checkForMusic();n.checkForBoth();n.findSpecsForDetails();n.SelectedAvailSpecItems=[];n.SelectedSelectedSpecListItems=[];n.AvailableRegionsListItems=[];n.getApplRegions()};n.btnSpecLeft=function(){angular.forEach(n.SelectedSelectedSpecListItems,function(n){this.push(n)},n.AvailableSpecListItems);angular.forEach(n.SelectedSelectedSpecListItems,function(t){for(var i=n.SelectedSpecListItems.length-1;i>=0;i--)n.SelectedSpecListItems[i].Id==t.Id&&n.SelectedSpecListItems.splice(i,1)});n.checkForMusic();n.checkForBoth();n.findSpecsForDetails();n.AvailableRegionsListItems=[];n.getApplRegions();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.btnAllSpecRight=function(){angular.forEach(n.AvailableSpecListItems,function(n){this.push(n)},n.SelectedSpecListItems);for(var t=n.AvailableSpecListItems.length-1;t>=0;t--)n.AvailableSpecListItems.splice(t,1);n.checkForMusic();n.checkForBoth();n.findSpecsForDetails();n.AvailableRegionsListItems=[];n.getApplRegions();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.btnAllSpecLeft=function(){angular.forEach(n.SelectedSpecListItems,function(n){this.push(n)},n.AvailableSpecListItems);for(var t=n.SelectedSpecListItems.length-1;t>=0;t--)n.SelectedSpecListItems.splice(t,1);n.checkForMusic();n.checkForBoth();n.findSpecsForDetails();n.AvailableRegionsListItems=[];n.getApplRegions();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.btnRegionsUp=function(){for(var t,r,u,f=n.SelectedSelectedRegionsListItems,i=0;i<n.SelectedSelectedRegionsListItems.length;i++){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<=0||t>=n.SelectedRegionsListItems.length)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t-1];n.SelectedRegionsListItems[t-1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsDown=function(){for(var t,r,u,i=n.SelectedSelectedRegionsListItems.length-1;i>=0;i--){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<0||t>=n.SelectedRegionsListItems.length-1)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t+1];n.SelectedRegionsListItems[t+1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsRight=function(){angular.forEach(n.SelectedAvailRegionsItems,function(n){this.push(n)},n.SelectedRegionsListItems);angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.btnRegionsLeft=function(){angular.forEach(n.SelectedSelectedRegionsListItems,function(n){this.push(n)},n.AvailableRegionsListItems);angular.forEach(n.SelectedSelectedRegionsListItems,function(t){for(var i=n.SelectedRegionsListItems.length-1;i>=0;i--)n.SelectedRegionsListItems[i].Id==t.Id&&n.SelectedRegionsListItems.splice(i,1)});n.SelectedSelectedRegionsListItems=[];n.SelectedAvailRegionsItems=[]};n.editPerson=function(){f.setPersonId(n.hourlyTeacherSmea.PersonId);e.go("stateEditPerson")};n.saveAction=function(t){n.showAlertSpec=y.isEmpty(n.SelectedSpecListItems)?!0:!1;n.showAlertRegion=y.isEmpty(n.SelectedRegionsListItems)?!0:!1;n.canSave=!0;!n.showAlertRegion&&n.canSave&&n.InsOrUpd(t)};n.InsOrUpd=function(t){var r={HourlyTeacherSmea:n.hourlyTeacherSmea,RegionAndUnit:n.SelectedRegionsListItems,ApplTemplate:"",UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Status:t},i=r;n.hourlyTeacherSmea.Id!=null&&n.hourlyTeacherSmea.Id!=""&&n.hourlyTeacherSmea.Id!="undefined"?(n.hourlyTeacherSmea.ModifiedBy=n.authentication.userName,h.updateApplHourlyTeacherSmea(i).then(function(){f.setPersonId(n.hourlyTeacherSmea.PersonId);e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)})):(n.hourlyTeacherSmea.DidacticYearId=n.applicationDidacticYear.Id,n.hourlyTeacherSmea.CreatedBy=n.authentication.userName,h.insertApplHourlyTeacherSmea(i).then(function(){f.setPersonId(n.hourlyTeacherSmea.PersonId);e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)}))}};HourlyTeacherSMEAController.$inject=["$scope","$filter","$q","$uibModal","$log","PassParameters","$state","toaster","PersonFactory","HourlyTeacherSmeaFactory","PersonSpecialityFactory","ApplicationTypeRegionAndUnitFactory","ApplicationTypeFekFactory","RegionAndFactory","GeneralFactory"];InsertGapHoursInitController=function(n,t,i,r,u,f,e,o){function h(){n.pageRules.substituteMusicGapHours.CanView&&e.isValueInArray(e.getRoleCode(n.authentication.role),"d2, m2, p, a")&&n.pagesList.push("substituteMusicGapHours");n.pageRules.substituteGapHoursPerSchool.CanView&&e.isValueInArray(e.getRoleCode(n.authentication.role),"d1, d2, m1, m2, p, a")&&(n.pagesList.push("substituteGapHoursPerSchool"),n.pagesList.push("substituteNotFullGapHoursPerSchool"));n.pageRules.substituteGapSmeaHoursPerSchool.CanView&&e.isValueInArray(e.getRoleCode(n.authentication.role),"d1, d2, m1, m2, p, a")&&(n.pagesList.push("substituteGapSmeaHoursPerSchool"),n.pagesList.push("substituteGapSmeaNotFullHoursPerSchool"));n.pageRules.substituteEEPEBPGapHoursPerSchool.CanView&&e.isValueInArray(e.getRoleCode(n.authentication.role),"d1, d2, m1, m2, p, a")&&(n.pagesList.push("substituteEEPEBPGapHoursPerSchool"),n.pagesList.push("substituteEEPEBPNotFullGapHoursPerSchool"))}if(n.specOrGroup=[],n.pageRules={},n.pagesList=[],n.hasAccess=!0,!n.authentication.isAuth||e.isValueInArray(e.getRoleCode(n.authentication.role),"u1, u2"))r.go("/");else{var s="substituteMusicGapHours,substituteGapHoursPerSchool,substituteGapSmeaHoursPerSchool,substituteEEPEBPGapHoursPerSchool";e.getByParams({role:n.authentication.role,codes:s},"/api/Subsystem/NewCheckPermission").then(function(i){var r=s.split(","),u,f;for(u in r)n.pageRules[r[u]]=o("filter")(i,{Code:r[u]},!0)[0].Rules;h();f=t.all([e.getByAll("/api/Dbo/getLevelsAsync"),e.getByParams({optionList:n.pagesList},"/api/Dbo/getGapList")]);f.then(function(t){n.levels=t[0];n.gapType=t[1];e.isEmpty(n.gapType)&&(n.hasAccess=!1);e.isValueInArray(e.getRoleCode(n.authentication.role),"d1, d2, m1, m2")&&(n.level=o("filter")(t[0],{Id:Number(n.authentication.levelId)},!0)[0].Id)})},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}n.smeaType=[{Type:"ΕΙΔΙΚΗΣ ΑΓΩΓΗΣ"},{Type:"BRAILLE"},{Type:"ΝΟΗΜΑΤΙΚΗ"},{Type:"BRAILLE/ΝΟΗΜΑΤΙΚΗ"},{Type:"ΠΑΡΑΛΛΗΛΗ ΣΤΗΡΙΞΗ ΕΙΔΙΚΗΣ ΑΓΩΓΗΣ"},{Type:"ΠΑΡΑΛΛΗΛΗ ΣΤΗΡΙΞΗ BRAILLE"},{Type:"ΠΑΡΑΛΛΗΛΗ ΣΤΗΡΙΞΗ ΝΟΗΜΑΤΙΚΗ"},{Type:"ΠΑΡΑΛΛΗΛΗ ΣΤΗΡΙΞΗ BRAILLE/ΝΟΗΜΑΤΙΚΗ"},{Type:"ΤΜΗΜΑ ΕΝΤΑΞΗΣ ΕΙΔΙΚΗΣ ΑΓΩΓΗΣ"},{Type:"ΤΜΗΜΑ ΕΝΤΑΞΗΣ BRAILLE"},{Type:"ΤΜΗΜΑ ΕΝΤΑΞΗΣ ΝΟΗΜΑΤΙΚΗ"},{Type:"ΤΜΗΜΑ ΕΝΤΑΞΗΣ BRAILLE/ΝΟΗΜΑΤΙΚΗ"}];n.EEPEBPgapType=e.isValueInArray(e.getRoleCode(n.authentication.role),"m1, m2, a")?[{Type:"BRAILLE/ΝΟΗΜΑΤΙΚΗ"},{Type:"ΝΟΗΜΑΤΙΚΗ"},{Type:"BRAILLE"},{Type:"ΕΙΔΙΚΗΣ ΑΓΩΓΗΣ"},{Type:"ΕΞΕΙΔΙΚΕΥΜΕΝΗ ΠΕΠ"},{Type:"ΕΞΕΙΔΙΚΕΥΜΕΝΗ ΤΟΜΕΑΚΟ"},{Type:"ΣΔΕΥ"},{Type:"ΓΕΝΙΚΗΣ ΠΑΙΔΕΙΑΣ"},{Type:"Μ.Ν.Α.Ε."},{Type:"ΤΥ-ΖΕΠ"},{Type:"ΔΥΕΠ"}]:e.isValueInArray(e.getRoleCode(n.authentication.role)," p")?[{Type:"BRAILLE/ΝΟΗΜΑΤΙΚΗ"},{Type:"ΝΟΗΜΑΤΙΚΗ"},{Type:"BRAILLE"},{Type:"ΕΙΔΙΚΗΣ ΑΓΩΓΗΣ"},{Type:"ΕΞΕΙΔΙΚΕΥΜΕΝΗ ΠΕΠ"},{Type:"ΣΔΕΥ"},{Type:"ΓΕΝΙΚΗΣ ΠΑΙΔΕΙΑΣ"},{Type:"Μ.Ν.Α.Ε."},{Type:"ΤΥ-ΖΕΠ"},{Type:"ΔΥΕΠ"}]:[{Type:"BRAILLE/ΝΟΗΜΑΤΙΚΗ"},{Type:"ΝΟΗΜΑΤΙΚΗ"},{Type:"BRAILLE"},{Type:"ΕΙΔΙΚΗΣ ΑΓΩΓΗΣ"},{Type:"ΕΞΕΙΔΙΚΕΥΜΕΝΗ ΠΕΠ"},{Type:"ΓΕΝΙΚΗΣ ΠΑΙΔΕΙΑΣ"},{Type:"Μ.Ν.Α.Ε."},{Type:"ΤΥ-ΖΕΠ"},{Type:"ΔΥΕΠ"}];n.regionAndUnit=[];n.gaps=[];n.selType=[];n.selregionAndUnit=[];n.selspecOrGroup=[];n.showGapTable=!1;n.showButton=!1;n.showChoice=!1;n.firststep=!0;n.hasKeddy=!1;n.showAddButton=!1;n.status="";n.previousGapsPerSchool=!1;n.previousGapsSmeaPerSchool=!1;n.previousEEPEBPGapsPerSchool=!1;n.response=2;n.setGapTypeForsubstituteGapHours=function(){n.substituteType=e.isValueInArray(e.getRoleCode(n.authentication.role),"m1, m2, a")?n.level!=2?(n.selType.Code=="substituteGapHoursPerSchool"||n.selType.Code=="substituteNotFullGapHoursPerSchool")&&n.specOrGroup!=null&&n.specOrGroup!=""&&n.specOrGroup!="undefined"&&n.specOrGroup.Id==80&&n.level==1?[{Type:"ΤΥ-ΖΕΠ"},{Type:"ΓΕΝΙΚΗΣ ΠΑΙΔΕΙΑΣ"},{Type:"ΔΥΕΠ"},{Type:"ΠΑΡΑΛΛΗΛΗΣ ΣΤΗΡΙΞΗΣ"},{Type:"ΣΜΕΑΕ"},{Type:"ΝΗΠΙΑΓΩΓΕΙΟ"}]:[{Type:"ΤΥ-ΖΕΠ"},{Type:"ΓΕΝΙΚΗΣ ΠΑΙΔΕΙΑΣ"},{Type:"ΔΥΕΠ"},{Type:"ΠΑΡΑΛΛΗΛΗΣ ΣΤΗΡΙΞΗΣ"},{Type:"ΣΜΕΑΕ"}]:[{Type:"ΤΥ-ΖΕΠ"},{Type:"ΓΕΝΙΚΗΣ ΠΑΙΔΕΙΑΣ"},{Type:"Μ.Ν.Α.Ε."},{Type:"ΔΥΕΠ"},{Type:"ΠΑΡΑΛΛΗΛΗΣ ΣΤΗΡΙΞΗΣ"},{Type:"ΣΜΕΑΕ"},{Type:"ΜΑΘΗΤΕΙΑ"}]:n.level!=2?(n.selType.Code=="substituteGapHoursPerSchool"||n.selType.Code=="substituteNotFullGapHoursPerSchool")&&n.specOrGroup!=null&&n.specOrGroup!=""&&n.specOrGroup!="undefined"&&n.specOrGroup.Id==80&&n.level==1?[{Type:"ΤΥ-ΖΕΠ"},{Type:"ΓΕΝΙΚΗΣ ΠΑΙΔΕΙΑΣ"},{Type:"Μ.Ν.Α.Ε."},{Type:"ΔΥΕΠ"},{Type:"ΝΗΠΙΑΓΩΓΕΙΟ"}]:[{Type:"ΤΥ-ΖΕΠ"},{Type:"ΓΕΝΙΚΗΣ ΠΑΙΔΕΙΑΣ"},{Type:"Μ.Ν.Α.Ε."},{Type:"ΔΥΕΠ"}]:[{Type:"ΤΥ-ΖΕΠ"},{Type:"ΓΕΝΙΚΗΣ ΠΑΙΔΕΙΑΣ"},{Type:"Μ.Ν.Α.Ε."},{Type:"ΔΥΕΠ"},{Type:"ΜΑΘΗΤΕΙΑ"}]};n.changedTypeGap=function(){n.selsmeaType="";n.regionAndUnit=[];n.specOrGroup=[];n.showButton=!1;n.selsubstituteEEPEBPType="";n.setGapTypeForsubstituteGapHours();n.selType.Code=="substituteMusicGapHours"?(n.selType.Code=="substituteMusicGapHours"&&(n.level=2),e.isValueInArray(e.getRoleCode(n.authentication.role),"a,p")&&(!e.isValueInArray(e.getRoleCode(n.authentication.role),"a,p")||e.isEmptyValue(n.level)||e.isEmptyValue(n.selType.Description))||(e.getByParams({level:n.level,parentId:n.authentication.regionAndUnitId,Code:n.selType.Code,UserRole:n.authentication.role},"/api/RegionAndUnit/getTypeRegionUnitSubstituteForGaps").then(function(t){n.selregionAndUnit=t.regions;n.selspecOrGroup=t.specialities},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")}),n.showChoice=n.selType.Description!=null?!0:!1)):(n.selType.Code=="substituteGapHoursPerSchool"||n.selType.Code=="substituteNotFullGapHoursPerSchool"||n.selType.Code=="substituteGapSmeaHoursPerSchool"||n.selType.Code=="substituteGapSmeaNotFullHoursPerSchool"||n.selType.Code=="substituteEEPEBPGapHoursPerSchool"||n.selType.Code=="substituteEEPEBPNotFullGapHoursPerSchool")&&(e.isValueInArray(e.getRoleCode(n.authentication.role),"a,p")&&(!e.isValueInArray(e.getRoleCode(n.authentication.role),"a,p")||e.isEmptyValue(n.level)||e.isEmptyValue(n.selType.Description))||(e.getByParams({level:n.level,Code:n.selType.Code,parentId:n.authentication.regionAndUnitId,UserRole:n.authentication.role},"/api/RegionAndUnit/getRegionAndUnitForSubstituteGapsHoursPerSchool").then(function(t){n.selregionAndUnit=t},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")}),e.getByParams({level:n.level,Code:n.selType.Code},"/api/RegionAndUnit/getSpecialitiesForSubstituteGapsHoursPerSchool").then(function(t){n.selspecOrGroup=t},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")}),n.showChoice=n.selType.Description!=null?!0:!1))};n.checkButton=function(){n.setGapTypeForsubstituteGapHours();n.selType.Code.indexOf("Music")>-1?n.showButton=e.isEmptyValue(n.specOrGroup)&&e.isEmptyValue(n.regionAndUnit)?!1:!0:n.specOrGroup!=null&&n.specOrGroup!=""&&n.specOrGroup!="undefined"&&n.regionAndUnit!=null&&n.regionAndUnit!=""&&n.regionAndUnit!="undefined"?(n.showButton=n.selType.Code.indexOf("Smea")>-1?e.isEmptyValue(n.selsmeaType)?!1:!0:!0,n.showButton=n.selType.Code.indexOf("EEPEBP")>-1?e.isEmptyValue(n.selsubstituteEEPEBPType)?!1:!0:!0):n.showButton=!1};n.searchAction=function(){var t,i;n.selType.Code=="substituteMusicGapHours"?(n.status="init",t={SpecGap:n.specOrGroup,RegionGap:n.regionAndUnit,ApplicationType:n.selType.Type,ApplicationType:n.selType.Code,UserRole:n.authentication.role,RegionAndUnitId:n.authentication.regionAndUnitId},i=t,e.postByParams(i,"api/Management/getGapsHoursForInsertUpdateSubstituteMusic").then(function(t){n.gaps=t;n.gaps.length>0?(n.showGapTable=!0,n.firststep=!1):(n.showGapTable=!1,n.firststep=!0,u.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση."))},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="substituteGapHoursPerSchool"||n.selType.Code=="substituteNotFullGapHoursPerSchool"?(n.status="view",t={Status:n.status,SpecGap:n.specOrGroup,RegionGap:n.regionAndUnit,ApplicationType:n.selType.Type,LevelId:n.level,ApplicationType:n.selType.Code,UserRole:n.authentication.role,RegionAndUnitId:n.authentication.regionAndUnitId,substituteType:n.selsubstituteType.Type},i=t,e.postByParams(i,"api/Management/getSubstituteGapsHoursPerSchool").then(function(t){n.gaps=t;n.gaps.length>0?(n.showGapTable=!0,n.firststep=!1,n.previousGapsPerSchool=!1):n.previousGapsPerSchool==!0?(n.showGapTable=!1,n.firststep=!0,n.previousGapsPerSchool=!1):(n.showGapTable=!0,n.firststep=!1,n.previousGapsPerSchool=!0)},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="substituteGapSmeaHoursPerSchool"||n.selType.Code=="substituteGapSmeaNotFullHoursPerSchool"?(n.status="view",t={Status:n.status,SpecGap:n.specOrGroup,RegionGap:n.regionAndUnit,ApplicationType:n.selType.Type,LevelId:n.level,ApplicationType:n.selType.Code,UserRole:n.authentication.role,RegionAndUnitId:n.authentication.regionAndUnitId,SmeaType:n.selsmeaType.Type},i=t,e.postByParams(i,"api/Management/getSubstituteSMEAGapsHoursPerSchool").then(function(t){n.gaps=t;n.gaps.length>0?(n.showGapTable=!0,n.firststep=!1,n.previousGapsSmeaPerSchool=!1):n.previousGapsSmeaPerSchool==!0?(n.showGapTable=!1,n.firststep=!0,n.previousGapsSmeaPerSchool=!1):(n.showGapTable=!0,n.firststep=!1,n.previousGapsSmeaPerSchool=!0)},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(n.selType.Code=="substituteEEPEBPGapHoursPerSchool"||n.selType.Code=="substituteEEPEBPNotFullGapHoursPerSchool")&&(n.status="view",t={Status:n.status,SpecGap:n.specOrGroup,RegionGap:n.regionAndUnit,ApplicationType:n.selType.Type,LevelId:n.level,ApplicationType:n.selType.Code,UserRole:n.authentication.role,RegionAndUnitId:n.authentication.regionAndUnitId,substituteType:n.selsubstituteEEPEBPType.Type},i=t,e.postByParams(i,"api/Management/getSubstituteEEPEBPGapsHoursPerSchool").then(function(t){n.gaps=t;n.gaps.length>0?(n.showGapTable=!0,n.firststep=!1,n.previousEEPEBPGapsPerSchool=!1):n.previousEEPEBPGapsPerSchool==!0?(n.showGapTable=!1,n.firststep=!0,n.previousEEPEBPGapsPerSchool=!1):(n.showGapTable=!0,n.firststep=!1,n.previousEEPEBPGapsPerSchool=!0)},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}))};n.addGapPerSchool=function(){var t,i;n.showAddButton=!0;n.gaps=[];n.status="init";n.response=2;n.selType.Code=="substituteGapHoursPerSchool"||n.selType.Code=="substituteNotFullGapHoursPerSchool"?(t={Status:n.status,SpecGap:n.specOrGroup,RegionGap:n.regionAndUnit,ApplicationType:n.selType.Code,LevelId:n.level,UserRole:n.authentication.role,RegionAndUnitId:n.authentication.regionAndUnitId,substituteType:n.selsubstituteType.Type},i=t,blockUI({target:"#divBlockUI",animate:!0}),e.postByParams(i,"api/Management/getSubstituteGapsHoursPerSchool").then(function(t){n.gaps=t;unblockUI("#divBlockUI");n.gaps.length>0?(n.showGapTable=!0,n.firststep=!1,n.previousGapsPerSchool=!0,n.statementFilter=""):(n.showGapTable=!1,n.firststep=!0,n.previousGapsPerSchool=!1,unblockUI("#divBlockUI"),u.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση."))},function(n){unblockUI("#divBlockUI");u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(n.selType.Code=="substituteGapSmeaHoursPerSchool"||n.selType.Code=="substituteGapSmeaNotFullHoursPerSchool")&&(t={Status:n.status,SpecGap:n.specOrGroup,RegionGap:n.regionAndUnit,ApplicationType:n.selType.Type,LevelId:n.level,ApplicationType:n.selType.Code,UserRole:n.authentication.role,RegionAndUnitId:n.authentication.regionAndUnitId,SmeaType:n.selsmeaType.Type},i=t,blockUI({target:"#divSmeaBlockUI",animate:!0}),e.postByParams(i,"api/Management/getSubstituteSMEAGapsHoursPerSchool").then(function(t){n.gaps=t;unblockUI("#divSmeaBlockUI");n.gaps.length>0?(n.showGapTable=!0,n.firststep=!1,n.previousGapsSmeaPerSchool=!0,n.statementFilter=""):(n.showGapTable=!1,n.firststep=!0,n.previousGapsSmeaPerSchool=!1,unblockUI("#divSmeaBlockUI"),u.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση."))},function(n){unblockUI("#divSmeaBlockUI");u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}));(n.selType.Code=="substituteEEPEBPGapHoursPerSchool"||n.selType.Code=="substituteEEPEBPNotFullGapHoursPerSchool")&&(t={Status:n.status,SpecGap:n.specOrGroup,RegionGap:n.regionAndUnit,ApplicationType:n.selType.Code,LevelId:n.level,UserRole:n.authentication.role,RegionAndUnitId:n.authentication.regionAndUnitId,substituteType:n.selsubstituteEEPEBPType.Type},i=t,blockUI({target:"#divBlockUI",animate:!0}),e.postByParams(i,"api/Management/getSubstituteEEPEBPGapsHoursPerSchool").then(function(t){n.gaps=t;unblockUI("#divBlockUI");n.gaps.length>0?(n.showGapTable=!0,n.firststep=!1,n.previousEEPEBPGapsPerSchool=!0,n.statementFilter=""):(n.showGapTable=!1,n.firststep=!0,n.previousEEPEBPGapsPerSchool=!1,unblockUI("#divBlockUI"),u.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση."))},function(n){unblockUI("#divBlockUI");u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}))};n.previousStep=function(){n.gaps=[];(n.selType.Code=="substituteGapHoursPerSchool"||n.selType.Code=="substituteNotFullGapHoursPerSchool")&&n.previousGapsPerSchool?(n.showGapTable=!0,n.firststep=!1,n.searchAction()):(n.selType.Code=="substituteGapSmeaHoursPerSchool"||n.selType.Code=="substituteGapSmeaNotFullHoursPerSchool")&&n.previousGapsSmeaPerSchool&&(n.showGapTable=!0,n.firststep=!1,n.searchAction());(n.selType.Code=="substituteEEPEBPGapHoursPerSchool"||n.selType.Code=="substituteEEPEBPNotFullGapHoursPerSchool")&&n.previousEEPEBPGapsPerSchool?(n.showGapTable=!0,n.firststep=!1,n.searchAction()):(n.showGapTable=!1,n.firststep=!0)};n.saveAction=function(){var r,i,t;n.selType.Code=="substituteMusicGapHours"?(n.gaps.RegionAndUnitId=n.authentication.regionAndUnitId,r={gaps:n.gaps,UserRole:n.authentication.role},t=r,e.postByParams(t,"api/Management/updateSubstituteMusicGapHours").then(function(){n.previousStep();u.pop("success","Η διαδικασία ολοκληρώθηκε με επιτυχία","Η εισαγωγή κενών πραγματοποιήθηκε με επιτυχία")},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="substituteGapHoursPerSchool"||n.selType.Code=="substituteNotFullGapHoursPerSchool"?(n.gaps.RegionAndUnitId=n.authentication.regionAndUnitId,i={gaps:n.gaps,UserRole:n.authentication.role},t=i,e.postByParams(t,"api/Management/insertSubstituteGapsHoursPerSchool").then(function(){n.previousStep();u.pop("success","Η διαδικασία ολοκληρώθηκε με επιτυχία","Η εισαγωγή κενών πραγματοποιήθηκε με επιτυχία")},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="substituteGapSmeaHoursPerSchool"||n.selType.Code=="substituteGapSmeaNotFullHoursPerSchool"?(n.gaps.RegionAndUnitId=n.authentication.regionAndUnitId,i={gaps:n.gaps,UserRole:n.authentication.role},t=i,e.postByParams(t,"api/Management/insertSubstituteSMEAGapsHoursPerSchool").then(function(){n.previousStep();u.pop("success","Η διαδικασία ολοκληρώθηκε με επιτυχία","Η εισαγωγή κενών πραγματοποιήθηκε με επιτυχία")},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(n.selType.Code=="substituteEEPEBPGapHoursPerSchool"||n.selType.Code=="substituteEEPEBPNotFullGapHoursPerSchool")&&(n.gaps.RegionAndUnitId=n.authentication.regionAndUnitId,i={gaps:n.gaps,UserRole:n.authentication.role},t=i,e.postByParams(t,"api/Management/insertSubstituteEEPEBPGapsHoursPerSchool").then(function(){n.previousStep();u.pop("success","Η διαδικασία ολοκληρώθηκε με επιτυχία","Η εισαγωγή κενών πραγματοποιήθηκε με επιτυχία")},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}))};n.openModal=function(t){n.delSubstituteGapsHoursPerSchool=0;n.delSubstituteGapsHours=0;n.delSubstituteGapsHoursPerSchool=t.Ids;n.selType.Code=="substituteGapHoursPerSchool"||n.selType.Code=="substituteNotFullGapHoursPerSchool"?n.delSubstituteGapsHours=t.SubstitutesGapsHoursId:n.selType.Code=="substituteGapSmeaHoursPerSchool"||n.selType.Code=="substituteGapSmeaNotFullHoursPerSchool"?n.delSubstituteGapsHours=t.SubstitutesSMEAGapsHoursId:(n.selType.Code=="substituteEEPEBPGapHoursPerSchool"||n.selType.Code=="substituteEEPEBPNotFullGapHoursPerSchool")&&(n.delSubstituteGapsHours=t.SubstitutesEEPEBPGapsHoursId);n.SchoolNames={};n.SchoolNames=t.SchoolNameConcat};n.delSubstituteGapsHoursPerSchools=function(){var i,t;n.selType.Code=="substituteGapHoursPerSchool"||n.selType.Code=="substituteNotFullGapHoursPerSchool"?(t={ids:n.delSubstituteGapsHoursPerSchool,SubstitutesGapsHoursId:n.delSubstituteGapsHours},e.postByParams(t,"api/Management/deleteSubstitutesGapsHoursPerSchool").then(function(){n.previousStep();u.pop("success","Η διαγραφή ολοκληρώθηκε με επιτυχία","Η εισαγωγή κενών πραγματοποιήθηκε με επιτυχία")},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="substituteGapSmeaHoursPerSchool"||n.selType.Code=="substituteGapSmeaNotFullHoursPerSchool"?(i={ids:n.delSubstituteGapsHoursPerSchool,SubstitutesSMEAGapsHoursId:n.delSubstituteGapsHours},e.postByParams(i,"api/Management/deleteSubstitutesSMEAGapsHoursPerSchool").then(function(){n.previousStep();u.pop("success","Η διαγραφή ολοκληρώθηκε με επιτυχία","Η εισαγωγή κενών πραγματοποιήθηκε με επιτυχία")},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(n.selType.Code=="substituteEEPEBPGapHoursPerSchool"||n.selType.Code=="substituteEEPEBPNotFullGapHoursPerSchool")&&(t={ids:n.delSubstituteGapsHoursPerSchool,SubstitutesEEPEBPGapsHoursId:n.delSubstituteGapsHours},e.postByParams(t,"api/Management/deleteSubstitutesEEPEBPGapsHoursPerSchool").then(function(){n.previousStep();u.pop("success","Η διαγραφή ολοκληρώθηκε με επιτυχία","Η εισαγωγή κενών πραγματοποιήθηκε με επιτυχία")},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}))};n.sum=function(t){var r=0,i,f,o;angular.forEach(t,function(n){r+=parseInt(n.Gap)});i=!1;i=n.selType.Code=="substituteGapHoursPerSchool"||n.selType.Code=="substituteGapSmeaHoursPerSchool"||n.selType.Code=="substituteEEPEBPGapHoursPerSchool"?!0:!1;f={Code:n.specOrGroup.Code,IsFull:i,Sum:r,LevelId:t[0].LevelId};o=f;e.getByParams(o,"api/Management/CheckLimits").then(function(t){return n.response=t,n.response},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}};InsertGapHoursInitController.$inject=["$scope","$q","PassParameters","$state","toaster","ApplicationTypeRegionAndUnitFactory","GeneralFactory","$filter"];InsertGapInitController=function(n,t,i,r,u,f,e,o,s){function c(){n.pageRules.secGap.CanView&&n.pagesList.push("secGap");n.pageRules.secSmeaGap.CanView&&n.pagesList.push("secSmeaGap");n.pageRules.secEEPEBPGap.CanView&&n.pagesList.push("secEEPEBPGap");n.pageRules.secMusicGap.CanView&&n.pagesList.push("secMusicGap");n.pageRules.secArtisticGap.CanView&&n.pagesList.push("secArtisticGap");n.pageRules.secSmeaKEDASYGap.CanView&&n.pagesList.push("secSmeaKEDASYGap");n.pageRules.substituteGap.CanView&&(n.pagesList.push("substituteGap"),n.pagesList.push("substituteNotFullGap"));n.pageRules.substituteSMEAGap.CanView&&(n.pagesList.push("substituteSMEAGap"),n.pagesList.push("substituteSMEANotFullGap"),o.isValueInArray(o.getRoleCode(n.authentication.role),"p, m1 , m2, a")&&n.pagesList.push("substituteSMEAKEDDYGap"));n.pageRules.substituteMusicGap.CanView&&o.isValueInArray(o.getRoleCode(n.authentication.role),"d2, m2,p, a")&&(n.pagesList.push("substituteMusicGap"),n.pagesList.push("substituteMusicGapNotFullGap"));n.pageRules.substituteGapRef.CanView&&(n.pagesList.push("substituteGapRef"),n.pagesList.push("substituteGapRefNotFullGap"));n.pageRules.substituteEEPEBPGap.CanView&&(n.pagesList.push("substituteEEPEBPGap"),n.pagesList.push("substituteEEPEBPNotFullGap"),o.isValueInArray(o.getRoleCode(n.authentication.role),"p, m1 , m2, a")&&(n.pagesList.push("substituteEEPKESYGap"),n.pagesList.push("substituteEEPSDEYKEDASYGap")));n.pageRules.PermanentGapEEPEBP.CanView&&n.pagesList.push("permanentEEPEBPGap");!o.isEmptyValue(n.pageRules.PermanentGapSMEA)&&n.pageRules.PermanentGapSMEA.CanView&&n.pagesList.push("PermanentGapSMEA");!o.isEmptyValue(n.pageRules.PermanentGap)&&n.pageRules.PermanentGap.CanView&&n.pagesList.push("PermanentGap");!o.isEmptyValue(n.pageRules.PermanentMusicGap)&&n.pageRules.PermanentMusicGap.CanView&&n.pagesList.push("PermanentMusicGap")}if(n.specOrGroup=[],n.musicSpecialist=[],n.pageRules={},n.pagesList=[],n.hasAccess=!0,n.showLevel=!0,n.showLevelForEEPEBP=!1,n.const={},n.const.Levels=[],n.const.AllLevels=[],n.level=0,n.HasLessonDescription=!1,!n.authentication.isAuth||o.isValueInArray(o.getRoleCode(n.authentication.role),"u1, u2"))r.go("/");else{var h="secGap,secSmeaGap,substituteGap,substituteSMEAGap,substituteMusicGap,substituteGapRef,PermanentGapEEPEBP,substituteEEPEBPGap,PermanentGapSMEA,PermanentGap,PermanentMusicGap,secEEPEBPGap,secMusicGap,secArtisticGap,secSmeaKEDASYGap,secSmeaEEEEKGap";o.getByParams({role:n.authentication.role,codes:h},"/api/Subsystem/NewCheckPermission").then(function(i){var r=h.split(","),u,f;for(u in r)s("filter")(i,{Code:r[u]},!0).length>0&&(n.pageRules[r[u]]=s("filter")(i,{Code:r[u]},!0)[0].Rules);c();f=t.all([o.getByAll("/api/Dbo/getLevelsAsync"),o.getByParams({optionList:n.pagesList},"/api/Dbo/getGapList"),o.getByAll("/api/Dbo/getAllLevelsAsync"),]);f.then(function(t){n.const.Levels=t[0];n.gapType=t[1];n.const.AllLevels=t[2];o.isEmpty(n.gapType)&&(n.hasAccess=!1);o.isValueInArray(o.getRoleCode(n.authentication.role),"d1, d2, m1, m2")&&(n.level=s("filter")(t[0],{Id:Number(n.authentication.levelId)},!0)[0].Id)})},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}n.regionAndUnit=[];n.gaps=[];n.selType=[];n.selsmeaType=null;n.selgapType=null;o.getByAll("api/Dbo/getGapTypes").then(t=>{n.gapsubType=t}).catch(t=>{n.gapsubType=[],console.error(t)});n.gapsubTypeFilter=[];n.smeaType=[{Type:"ΕΙΔΙΚΗΣ ΑΓΩΓΗΣ"},{Type:"BRAILLE"},{Type:"ΝΟΗΜΑΤΙΚΗ"}];n.EEPEBPgapType=[];n.EEPEBPgapTypeList=[];o.getByAll("api/Dbo/getEEPEBPgapTypes").then(t=>{n.EEPEBPgapType=t,n.EEPEBPgapTypeList=t}).catch(t=>{n.smeaTypesList=[],console.error(t)});n.gapType=[{Type:"ΓΕΝΙΚΗΣ ΠΑΙΔΕΙΑΣ"}];n.selregionAndUnit=[];n.selspecOrGroup=[];n.sellessons=[];n.showGapTable=!1;n.showButton=!1;n.showChoice=!1;n.firststep=!0;n.hasKeddy=!1;n.changedTypeGap=function(){n.selsmeaType=null;n.regionAndUnit=[];n.specOrGroup=[];n.musicSpecialist=[];n.levels=n.selType.Code=="secEEPEBPGap"?n.const.AllLevels:n.const.Levels;o.isValueInArray(o.getRoleCode(n.authentication.role),"m1,m2")&&n.selType.Code=="secEEPEBPGap"?(n.showLevelForEEPEBP=!0,n.levels=s("filter")(n.const.AllLevels,function(t){return t.Id==Number(n.authentication.levelId)||t.Id==3})):n.showLevelForEEPEBP=!1;n.selType.Code=="secGap"||n.selType.Code=="secSmeaGap"||n.selType.Code=="secEEPEBPGap"||n.selType.Code=="secMusicGap"||n.selType.Code=="secArtisticGap"?((n.selType.Code=="secMusicGap"||n.selType.Code=="secArtisticGap")&&(n.level=2),o.isValueInArray(o.getRoleCode(n.authentication.role),"a,p,m1,m2")&&(!o.isValueInArray(o.getRoleCode(n.authentication.role),"a,p,m1,m2")||o.isEmptyValue(n.level)||o.isEmptyValue(n.selType.Description))||(o.getByParams({level:n.level,parentId:n.authentication.regionAndUnitId,Code:n.selType.Code,UserRole:n.authentication.role},"/api/RegionAndUnit/getTypeRegionUnitForGaps").then(function(t){n.selregionAndUnit=t.regions;n.selspecOrGroup=t.specialities;n.sellessons=t.lessons},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")}),n.showChoice=n.selType.Description!=null?!0:!1),n.selType.Code=="secEEPEBPGap"&&o.isValueInArray(o.getRoleCode(n.authentication.role),"p")||(n.showLevel=!0),(n.selType.Code=="secSmeaGap"||n.selType.Code=="secEEPEBPGap")&&(n.smeaType=[{Type:"ΕΙΔΙΚΗΣ ΑΓΩΓΗΣ"},{Type:"BRAILLE"},{Type:"ΝΟΗΜΑΤΙΚΗ"}])):n.selType.Code=="substituteGap"||n.selType.Code=="substituteNotFullGap"||n.selType.Code=="substituteSMEAGap"||n.selType.Code=="substituteSMEANotFullGap"||n.selType.Code=="substituteSMEAKEDDYGap"||n.selType.Code=="substituteMusicGap"||n.selType.Code=="substituteMusicGapNotFullGap"||n.selType.Code=="substituteGapRef"||n.selType.Code=="substituteGapRefNotFullGap"||n.selType.Code=="substituteEEPEBPGap"||n.selType.Code=="substituteEEPEBPNotFullGap"||n.selType.Code=="substituteEEPKESYGap"||n.selType.Code=="substituteEEPSDEYKEDASYGap"?((n.selType.Code=="substituteMusicGap"||n.selType.Code=="substituteMusicGapNotFullGap")&&(n.level=2),(n.selType.Code=="substituteGap"||n.selType.Code=="substituteNotFullGap")&&(n.gapsubTypeFilter=o.isValueInArray(o.getRoleCode(n.authentication.role),"a,m1,m2")?n.gapsubType:s("filter")(n.gapsubType,{Category:"anap"},!0)),n.selType.Code!="substituteEEPKESYGap"&&n.selType.Code!="substituteEEPSDEYKEDASYGap"?(o.isValueInArray(o.getRoleCode(n.authentication.role),"a,p")&&(!o.isValueInArray(o.getRoleCode(n.authentication.role),"a,p")||o.isEmptyValue(n.level)||o.isEmptyValue(n.selType.Description))||(o.getByParams({level:n.level,parentId:n.authentication.regionAndUnitId,Code:n.selType.Code,UserRole:n.authentication.role},"/api/RegionAndUnit/getTypeRegionUnitSubstituteForGaps").then(function(t){n.selregionAndUnit=t.regions;n.selspecOrGroup=t.specialities},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")}),n.showChoice=n.selType.Description!=null?!0:!1),n.showLevel=!0,n.EEPEBPgapType=[],angular.forEach(n.EEPEBPgapTypeList,function(t){if(!(t.RegionAndUnitTypeId==32||t.RegionAndUnitTypeId==35)){const i={Type:t.Type};n.EEPEBPgapType.push(i)}}),n.EEPEBPgapType=n.EEPEBPgapType.filter((n,t,i)=>t===i.findIndex(t=>t.Type===n.Type))):(n.EEPEBPgapType=[],angular.forEach(n.EEPEBPgapTypeList,function(t){if(t.RegionAndUnitTypeId==32||t.RegionAndUnitTypeId==35){const i={Type:t.Type};n.EEPEBPgapType.push(i)}}),n.EEPEBPgapType=n.EEPEBPgapType.filter((n,t,i)=>t===i.findIndex(t=>t.Type===n.Type)),o.getByParams({level:0,parentId:n.authentication.regionAndUnitId,Code:n.selType.Code,UserRole:n.authentication.role},"/api/RegionAndUnit/getTypeRegionUnitSubstituteForGaps").then(function(t){n.selregionAndUnit=t.regions;n.selspecOrGroup=t.specialities},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")}),n.showChoice=n.selType.Description!=null?!0:!1,n.showLevel=!1),n.showLevelForEEPEBP=o.isValueInArray(o.getRoleCode(n.authentication.role),"m1,m2")&&(n.selType.Code=="substituteEEPEBPGap"||n.selType.Code=="substituteEEPEBPNotFullGap")?!0:!1,n.smeaType=[],(n.selType.Code=="substituteSMEAGap"||n.selType.Code=="substituteSMEANotFullGap"||n.selType.Code=="substituteSMEAKEDDYGap")&&o.getByAll("api/Dbo/getGapSMEATypes").then(t=>{n.smeaTypesList=t,n.selType.Code=="substituteSMEAGap"||n.selType.Code=="substituteSMEANotFullGap"?angular.forEach(n.smeaTypesList,function(t){if(t.RegionAndUnitTypeId!=34){const i={Type:t.Type};n.smeaType.push(i)}}):angular.forEach(n.smeaTypesList,function(t){if(t.RegionAndUnitTypeId==34){const i={Type:t.Type};n.smeaType.push(i)}}),n.smeaType=n.smeaType.filter((n,t,i)=>t===i.findIndex(t=>t.Type===n.Type))}).catch(t=>{n.smeaTypesList=[],console.error(t)})):n.selType.Code=="permanentEEPEBPGap"?(o.getByParams({parentId:n.authentication.regionAndUnitId,Code:n.selType.Code,UserRole:n.authentication.role,level:n.level},"/api/RegionAndUnit/getTypeRegionUnitPermanentForGaps").then(function(t){n.selregionAndUnit=t.regions;n.selspecOrGroup=t.specialities},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")}),n.showChoice=n.selType.Description!=null?!0:!1,n.smeaType=[{Type:"ΕΙΔΙΚΗΣ ΑΓΩΓΗΣ"},{Type:"BRAILLE/ΝΟΗΜΑΤΙΚΗ"},{Type:"BRAILLE"},{Type:"ΝΟΗΜΑΤΙΚΗ"}],n.showLevel=!1):n.selType.Code=="PermanentGapSMEA"?(o.isValueInArray(o.getRoleCode(n.authentication.role),"a,p")&&(!o.isValueInArray(o.getRoleCode(n.authentication.role),"a,p")||o.isEmptyValue(n.level)||o.isEmptyValue(n.selType.Description))||(o.getByParams({parentId:n.authentication.regionAndUnitId,Code:n.selType.Code,UserRole:n.authentication.role,level:n.level},"/api/RegionAndUnit/getTypeRegionUnitPermanentForGaps").then(function(t){n.selregionAndUnit=t.regions;n.selspecOrGroup=t.specialities},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")}),n.showChoice=n.selType.Description!=null?!0:!1),n.smeaType=[{Type:"ΕΙΔΙΚΗΣ ΑΓΩΓΗΣ"},{Type:"BRAILLE/ΝΟΗΜΑΤΙΚΗ"},{Type:"BRAILLE"},{Type:"ΝΟΗΜΑΤΙΚΗ"}],n.showLevel=!0):n.selType.Code=="PermanentGap"?(o.isValueInArray(o.getRoleCode(n.authentication.role),"a,p")&&(!o.isValueInArray(o.getRoleCode(n.authentication.role),"a,p")||o.isEmptyValue(n.level)||o.isEmptyValue(n.selType.Description))||(o.getByParams({parentId:n.authentication.regionAndUnitId,Code:n.selType.Code,UserRole:n.authentication.role,level:n.level},"/api/RegionAndUnit/getTypeRegionUnitPermanentForGaps").then(function(t){n.selregionAndUnit=t.regions;n.selspecOrGroup=t.specialities},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")}),n.showChoice=n.selType.Description!=null?!0:!1),n.showLevel=!0):n.selType.Code=="PermanentMusicGap"?(n.level=2,o.isValueInArray(o.getRoleCode(n.authentication.role),"a,p")&&(!o.isValueInArray(o.getRoleCode(n.authentication.role),"a,p")||o.isEmptyValue(n.level)||o.isEmptyValue(n.selType.Description))||(o.getByParams({parentId:n.authentication.regionAndUnitId,Code:n.selType.Code,UserRole:n.authentication.role,level:n.level},"/api/RegionAndUnit/getTypeRegionUnitPermanentForGaps").then(function(t){n.selregionAndUnit=t.regions;n.selspecOrGroup=t.specialities},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")}),n.showChoice=n.selType.Description!=null?!0:!1),n.showLevel=!0):n.selType.Code=="secSmeaKEDASYGap"&&(o.isValueInArray(o.getRoleCode(n.authentication.role),"a,p")&&(!o.isValueInArray(o.getRoleCode(n.authentication.role),"a,p")||o.isEmptyValue(n.level)||o.isEmptyValue(n.selType.Description))||(o.getByParams({parentId:n.authentication.regionAndUnitId,Code:n.selType.Code,UserRole:n.authentication.role,level:n.level},"/api/RegionAndUnit/getTypeRegionUnitForGaps").then(function(t){n.selregionAndUnit=t.regions;n.selspecOrGroup=t.specialities;n.smeaType=[{Type:"ΕΙΔΙΚΗΣ ΑΓΩΓΗΣ"}];n.selsmeaType=n.smeaType[0].Type;var i=[158,159],r=[2,3];n.level==1&&(n.selspecOrGroup=s("filter")(n.selspecOrGroup,function(n){return i.includes(n.SecondmentSpecialityId)}));n.level==2&&(n.selspecOrGroup=s("filter")(n.selspecOrGroup,function(n){return r.includes(n.SecondmentSpecialityId)}));n.showLevel=!0},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")}),n.showChoice=n.selType.Description!=null?!0:!1))};n.checkButton=function(){n.specOrGroup!=null&&n.specOrGroup!=""&&n.specOrGroup!="undefined"||n.regionAndUnit!=null&&n.regionAndUnit!=""&&n.regionAndUnit!="undefined"?n.selType.Code.indexOf("SMEA")>-1||n.selType.Code=="permanentEEPEBPGap"||n.selType.Code.indexOf("Smea")>-1?o.isEmptyValue(n.selsmeaType)?(n.showButton=!1,u.pop("warning","Πρέπει να επιλέξετε υποχρεωτικά τύπο ΣΜΕΑΕ.","")):n.showButton=!0:n.selType.Code=="secGap"?n.showButton=!0:n.selType.Code=="substituteGap"||n.selType.Code=="substituteNotFullGap"?o.isEmptyValue(n.selgapType)?(n.showButton=!1,u.pop("warning","Πρέπει να επιλέξετε υποχρεωτικά τύπο κενού.","")):n.showButton=!0:n.selType.Code=="substituteEEPEBPGap"||n.selType.Code=="substituteEEPEBPNotFullGap"||n.selType.Code=="substituteEEPKESYGap"?o.isEmptyValue(n.selgapType)?(n.showButton=!1,u.pop("warning","Πρέπει να επιλέξετε υποχρεωτικά τύπο κενού.","")):n.showButton=!0:n.selType.Code=="secMusicGap"?o.isEmptyValue(n.specOrGroup)?(n.showButton=!1,u.pop("warning","Πρέπει να επιλέξετε υποχρεωτικά κλάδο.","")):!o.isEmptyValue(n.specOrGroup)&&(n.specOrGroup.SecondmentSpecialityId==4||n.specOrGroup.SecondmentSpecialityId==356)&&o.isEmptyValue(n.regionAndUnit)&&o.isEmptyValue(n.lesson)?(n.showButton=!1,u.pop("warning","Πρέπει να επιλέξετε υποχρεωτικά είτε Μουσικό Σχολείο είτε Μουσική Ειδίκευση.","")):n.showButton=!0:n.selType.Code=="secArtisticGap"?o.isEmptyValue(n.specOrGroup)?(n.showButton=!1,u.pop("warning","Πρέπει να επιλέξετε υποχρεωτικά κλάδο.","")):!o.isEmptyValue(n.specOrGroup)&&(n.specOrGroup.SecondmentSpecialityId==4||n.specOrGroup.SecondmentSpecialityId==356)&&o.isEmptyValue(n.regionAndUnit)&&o.isEmptyValue(n.lesson)?(n.showButton=!1,u.pop("warning","Πρέπει να επιλέξετε υποχρεωτικά είτε Καλλιστεχνικό Σχολείο είτε Ειδίκευση/Μάθημα.","")):n.showButton=!0:n.showButton=!0:(n.showButton=!1,n.selType.Code.indexOf("Music")>-1?u.pop("warning"," Αδυναμία αναζήτησης","Πρέπει να επιλέξετε υποχρεωτικά όργανο ή Μουσικό Σχολείο"):u.pop("warning"," Αδυναμία αναζήτησης","Πρέπει να επιλέξετε υποχρεωτικά κλάδο ή περιοχή προτίμησης"))};n.searchAction=function(){var t,i;n.selType.Code=="substituteGap"||n.selType.Code=="substituteNotFullGap"?(t={SpecGap:n.specOrGroup,RegionGap:n.regionAndUnit,ApplicationType:n.selType.Code,LevelId:n.level,UserRole:n.authentication.role,RegionAndUnitId:n.authentication.regionAndUnitId,SmeaType:n.selgapType.Type},i=t,e.getGapsForInsertUpdateSubstitute(i).then(function(t){n.gaps=t;n.gaps.length>0?(n.showGapTable=!0,n.firststep=!1):(n.showGapTable=!1,n.firststep=!0,u.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση."))},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="substituteSMEAGap"||n.selType.Code=="substituteSMEANotFullGap"||n.selType.Code=="substituteSMEAKEDDYGap"?(t={SpecGap:n.specOrGroup,RegionGap:n.regionAndUnit,ApplicationType:n.selType.Code,LevelId:n.level,UserRole:n.authentication.role,RegionAndUnitId:n.authentication.regionAndUnitId,SmeaType:n.selsmeaType.Type},i=t,e.getGapsForInsertUpdateSubstituteSmea(i).then(function(t){n.gaps=t;n.gaps.length>0?(n.showGapTable=!0,n.firststep=!1):(n.showGapTable=!1,n.firststep=!0,u.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση."))},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="substituteGapRef"||n.selType.Code=="substituteGapRefNotFullGap"?(t={SpecGap:n.specOrGroup,RegionGap:n.regionAndUnit,ApplicationType:n.selType.Code,LevelId:n.level,UserRole:n.authentication.role,RegionAndUnitId:n.authentication.regionAndUnitId},i=t,e.getGapsForInsertUpdateSubstituteRef(i).then(function(t){n.gaps=t;n.gaps.length>0?(n.showGapTable=!0,n.firststep=!1):(n.showGapTable=!1,n.firststep=!0,u.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση."))},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="substituteMusicGap"||n.selType.Code=="substituteMusicGapNotFullGap"?(t={SpecGap:n.specOrGroup,RegionGap:n.regionAndUnit,ApplicationType:n.selType.Type,ApplicationType:n.selType.Code,UserRole:n.authentication.role,RegionAndUnitId:n.authentication.regionAndUnitId},i=t,e.getGapsForInsertUpdateSubstituteMusic(i).then(function(t){n.gaps=t;n.gaps.length>0?(n.showGapTable=!0,n.firststep=!1):(n.showGapTable=!1,n.firststep=!0,u.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση."))},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="substituteEEPEBPGap"||n.selType.Code=="substituteEEPEBPNotFullGap"||n.selType.Code=="substituteEEPKESYGap"||n.selType.Code=="substituteEEPSDEYKEDASYGap"?(t={SpecGap:n.specOrGroup,RegionGap:n.regionAndUnit,ApplicationType:n.selType.Code,LevelId:n.level,UserRole:n.authentication.role,RegionAndUnitId:n.authentication.regionAndUnitId,SmeaType:n.selgapType.Type},i=t,o.postByParams(i,"/api/Management/getGapsForInsertUpdateSubstituteEEPEBP").then(function(t){n.gaps=t;n.gaps.length>0?(n.showGapTable=!0,n.firststep=!1):(n.showGapTable=!1,n.firststep=!0,u.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση."))},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="secGap"?(o.isEmptyValue(n.regionAndUnit)&&(n.regionAndUnit={RegionAndUnitId:null}),o.isEmptyValue(n.specOrGroup)&&(n.specOrGroup={SecondmentSpecialityId:null}),o.postByParams({SecondmentSpecialityId:n.specOrGroup.SecondmentSpecialityId,RegionAndUnitId:n.regionAndUnit.RegionAndUnitId,LevelId:n.level,UserRole:n.authentication.role,DideRegion:n.authentication.regionAndUnitId},"api/Management/getGapsForInsertUpdateSecondment").then(function(t){n.gaps=t;n.gaps.length>0?(n.showGapTable=!0,n.firststep=!1):(n.showGapTable=!1,n.firststep=!0,u.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση."))},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="secSmeaGap"||n.selType.Code=="secSmeaKEDASYGap"?(o.isEmptyValue(n.regionAndUnit)&&(n.regionAndUnit={RegionAndUnitId:null}),o.isEmptyValue(n.specOrGroup)&&(n.specOrGroup={SecondmentSpecialityId:null}),o.postByParams({SecondmentSpecialityId:n.specOrGroup.SecondmentSpecialityId,RegionAndUnitId:n.regionAndUnit.RegionAndUnitId,LevelId:n.level,UserRole:n.authentication.role,DideRegion:n.authentication.regionAndUnitId,SmeaType:n.selsmeaType,selType:n.selType.Code},"api/Management/getGapsForInsertUpdateSecondmentSmea").then(function(t){n.gaps=t;n.gaps.length>0?(n.showGapTable=!0,n.firststep=!1):(n.showGapTable=!1,n.firststep=!0,u.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση."))},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="secEEPEBPGap"?(o.isEmptyValue(n.regionAndUnit)&&(n.regionAndUnit={RegionAndUnitId:null}),o.isEmptyValue(n.specOrGroup)&&(n.specOrGroup={SecondmentSpecialityId:null}),o.postByParams({SecondmentSpecialityId:n.specOrGroup.SecondmentSpecialityId,RegionAndUnitId:n.regionAndUnit.RegionAndUnitId,LevelId:n.level,UserRole:n.authentication.role,DideRegion:n.authentication.regionAndUnitId,SmeaType:n.selsmeaType},"api/Management/getGapsForInsertUpdateSecondmentEEPEBP").then(function(t){n.gaps=t;n.gaps.length>0?(n.showGapTable=!0,n.firststep=!1):(n.showGapTable=!1,n.firststep=!0,u.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση."))},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="secMusicGap"?(o.isEmptyValue(n.regionAndUnit)&&(n.regionAndUnit={RegionAndUnitId:null}),o.isEmptyValue(n.specOrGroup)&&(n.specOrGroup={SecondmentSpecialityId:null}),o.isEmptyValue(n.lesson)&&(n.lesson={LessonId:null}),o.postByParams({SecondmentSpecialityId:n.specOrGroup.SecondmentSpecialityId,RegionAndUnitId:n.regionAndUnit.RegionAndUnitId,LevelId:2,UserRole:n.authentication.role,DideRegion:n.authentication.regionAndUnitId,LessonId:n.lesson.SecondmentLessonId},"api/Management/getGapsForInsertUpdateSecondmentMusic").then(function(t){n.gaps=t;n.gaps.length>0?(n.showGapTable=!0,n.firststep=!1):(n.showGapTable=!1,n.firststep=!0,u.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση."))},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="secArtisticGap"?(n.HasLessonDescription=!1,o.isEmptyValue(n.regionAndUnit)&&(n.regionAndUnit={RegionAndUnitId:null}),o.isEmptyValue(n.specOrGroup)&&(n.specOrGroup={SecondmentSpecialityId:null}),o.isEmptyValue(n.lesson)&&(n.lesson={LessonId:null}),o.postByParams({SecondmentSpecialityId:n.specOrGroup.SecondmentSpecialityId,RegionAndUnitId:n.regionAndUnit.RegionAndUnitId,LevelId:2,UserRole:n.authentication.role,DideRegion:n.authentication.regionAndUnitId,LessonId:n.lesson.SecondmentLessonId},"api/Management/getGapsForInsertUpdateSecondmentArtistic").then(function(t){if(n.gaps=t,n.gaps.length>0){for(var i=0;i<n.gaps.length;i+=1)if(n.gaps[i].LessonId==6||n.gaps[i].LessonId==7||n.gaps[i].LessonId==8){n.HasLessonDescription=!0;break}n.showGapTable=!0;n.firststep=!1}else n.showGapTable=!1,n.firststep=!0,u.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση.")},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="permanentEEPEBPGap"?(o.isEmptyValue(n.regionAndUnit)&&(n.regionAndUnit={RegionAndUnitId:null}),o.isEmptyValue(n.specOrGroup)&&(n.specOrGroup={SecondmentSpecialityId:null}),o.postByParams({PermanentEEPEBPSpecialityId:n.specOrGroup.Id,RegionAndUnitId:n.regionAndUnit.RegionAndUnitId,UserRole:n.authentication.role,DideRegion:n.authentication.regionAndUnitId,SmeaType:n.selsmeaType.Type},"api/Management/getPermanentEEPEBPGapsByParams").then(function(t){n.gaps=t;n.gaps.length>0?(n.showGapTable=!0,n.firststep=!1):(n.showGapTable=!1,n.firststep=!0,u.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση."))},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="PermanentGapSMEA"?(o.isEmptyValue(n.regionAndUnit)&&(n.regionAndUnit={RegionAndUnitId:null}),o.isEmptyValue(n.specOrGroup)&&(n.specOrGroup={SecondmentSpecialityId:null}),o.postByParams({Id:n.specOrGroup.Id,isSpec:n.specOrGroup.isSpec,RegionAndUnitId:n.regionAndUnit.RegionAndUnitId,UserRole:n.authentication.role,DideRegion:n.authentication.regionAndUnitId,SmeaType:n.selsmeaType.Type},"api/Management/getPermanentSMEAGapsByParams").then(function(t){n.gaps=t;n.gaps.length>0?(n.showGapTable=!0,n.firststep=!1):(n.showGapTable=!1,n.firststep=!0,u.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση."))},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="PermanentGap"?(o.isEmptyValue(n.regionAndUnit)&&(n.regionAndUnit={RegionAndUnitId:null}),o.isEmptyValue(n.specOrGroup)&&(n.specOrGroup={SecondmentSpecialityId:null}),o.postByParams({Id:n.specOrGroup.Id,isSpec:n.specOrGroup.isSpec,RegionAndUnitId:n.regionAndUnit.RegionAndUnitId,UserRole:n.authentication.role,DideRegion:n.authentication.regionAndUnitId,LevelId:n.level},"api/Management/getPermanentGapsByParams").then(function(t){n.gaps=t;n.gaps.length>0?(n.showGapTable=!0,n.firststep=!1):(n.showGapTable=!1,n.firststep=!0,u.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση."))},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="PermanentMusicGap"&&(o.isEmptyValue(n.regionAndUnit)&&(n.regionAndUnit={RegionAndUnitId:null}),o.isEmptyValue(n.specOrGroup)&&(n.specOrGroup={SecondmentSpecialityId:null}),o.postByParams({Id:n.specOrGroup.Id,isSpec:!1,RegionAndUnitId:n.regionAndUnit.RegionAndUnitId,UserRole:n.authentication.role,DideRegion:n.authentication.regionAndUnitId},"api/Management/getPermanentMusicGapsByParams").then(function(t){n.gaps=t;n.gaps.length>0?(n.showGapTable=!0,n.firststep=!1):(n.showGapTable=!1,n.firststep=!0,u.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση."))},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}))};n.previousStep=function(){n.showGapTable=!1;n.firststep=!0};n.saveAction=function(){var t,i;(n.selType.Code=="substituteGap"||n.selType.Code=="substituteNotFullGap")&&(n.gaps.RegionAndUnitId=n.authentication.regionAndUnitId,t={gaps:n.gaps,UserRole:n.authentication.role},i=t,o.postByParams(i,"api/Management/updateSubstituteGap").then(function(){n.previousStep();u.pop("success","Η διαδικασία ολοκληρώθηκε με επιτυχία","Η εισαγωγή κενών πραγματοποιήθηκε με επιτυχία")},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}));n.selType.Code=="substituteEEPEBPGap"||n.selType.Code=="substituteEEPEBPNotFullGap"||n.selType.Code=="substituteEEPKESYGap"||n.selType.Code=="substituteEEPSDEYKEDASYGap"?(n.gaps.RegionAndUnitId=n.authentication.regionAndUnitId,t={gaps:n.gaps,UserRole:n.authentication.role},i=t,o.postByParams(i,"api/Management/updateSubstituteEEPEBPGap").then(function(){n.previousStep();u.pop("success","Η διαδικασία ολοκληρώθηκε με επιτυχία","Η εισαγωγή κενών πραγματοποιήθηκε με επιτυχία")},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="substituteSMEAGap"||n.selType.Code=="substituteSMEANotFullGap"||n.selType.Code=="substituteSMEAKEDDYGap"?(t={gaps:n.gaps,UserRole:n.authentication.role},i=t,o.postByParams(i,"api/Management/updateSubstituteSmeaGap").then(function(){n.previousStep();u.pop("success","Η διαδικασία ολοκληρώθηκε με επιτυχία","Η εισαγωγή κενών πραγματοποιήθηκε με επιτυχία")},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="substituteGapRef"||n.selType.Code=="substituteGapRefNotFullGap"?(n.gaps.RegionAndUnitId=n.authentication.regionAndUnitId,t={gaps:n.gaps,UserRole:n.authentication.role},i=t,o.postByParams(i,"api/Management/updateSubstituteGapRef").then(function(){n.previousStep();u.pop("success","Η διαδικασία ολοκληρώθηκε με επιτυχία","Η εισαγωγή κενών πραγματοποιήθηκε με επιτυχία")},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="substituteMusicGap"||n.selType.Code=="substituteMusicGapNotFullGap"?(n.gaps.RegionAndUnitId=n.authentication.regionAndUnitId,t={gaps:n.gaps,UserRole:n.authentication.role},i=t,o.postByParams(i,"api/Management/updateSubstituteMusicGap").then(function(){n.previousStep();u.pop("success","Η διαδικασία ολοκληρώθηκε με επιτυχία","Η εισαγωγή κενών πραγματοποιήθηκε με επιτυχία")},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="secGap"?(t={gaps:n.gaps,UserRole:n.authentication.role},i=t,o.postByParams(i,"api/Management/updateSecGap").then(function(){n.previousStep();u.pop("success","Η διαδικασία ολοκληρώθηκε με επιτυχία","Η εισαγωγή κενών πραγματοποιήθηκε με επιτυχία")},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="secSmeaGap"||n.selType.Code=="secSmeaKEDASYGap"?(t={gaps:n.gaps,UserRole:n.authentication.role},i=t,o.postByParams(i,"api/Management/updateSecSmeaGap").then(function(){n.previousStep();u.pop("success","Η διαδικασία ολοκληρώθηκε με επιτυχία","Η εισαγωγή κενών πραγματοποιήθηκε με επιτυχία")},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="secMusicGap"?(t={gaps:n.gaps,UserRole:n.authentication.role},i=t,o.postByParams(i,"api/Management/updateSecMusicGap").then(function(){n.previousStep();u.pop("success","Η διαδικασία ολοκληρώθηκε με επιτυχία","Η εισαγωγή κενών πραγματοποιήθηκε με επιτυχία")},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="secArtisticGap"?(t={gaps:n.gaps,UserRole:n.authentication.role},i=t,o.postByParams(i,"api/Management/updateSecArtisticGap").then(function(){n.previousStep();u.pop("success","Η διαδικασία ολοκληρώθηκε με επιτυχία","Η εισαγωγή κενών πραγματοποιήθηκε με επιτυχία")},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="secEEPEBPGap"?(t={gaps:n.gaps,UserRole:n.authentication.role},i=t,o.postByParams(i,"api/Management/updateSecEEPEBPGap").then(function(){n.previousStep();u.pop("success","Η διαδικασία ολοκληρώθηκε με επιτυχία","Η εισαγωγή κενών πραγματοποιήθηκε με επιτυχία")},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="permanentEEPEBPGap"?(n.gaps.RegionAndUnitId=n.authentication.regionAndUnitId,t={gaps:n.gaps,UserRole:n.authentication.role},i=t,o.postByParams(i,"api/Management/updatePermanentEEPEBPGap").then(function(){n.previousStep();u.pop("success","Η διαδικασία ολοκληρώθηκε με επιτυχία","Η εισαγωγή κενών πραγματοποιήθηκε με επιτυχία")},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="PermanentGapSMEA"?(n.gaps.RegionAndUnitId=n.authentication.regionAndUnitId,t={gaps:n.gaps,UserRole:n.authentication.role},i=t,o.postByParams(i,"api/Management/updatePermanentSMEAGap").then(function(){n.previousStep();u.pop("success","Η διαδικασία ολοκληρώθηκε με επιτυχία","Η εισαγωγή κενών πραγματοποιήθηκε με επιτυχία")},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="PermanentGap"?(n.gaps.RegionAndUnitId=n.authentication.regionAndUnitId,t={gaps:n.gaps,UserRole:n.authentication.role},i=t,o.postByParams(i,"api/Management/updatePermanentGap").then(function(){n.previousStep();u.pop("success","Η διαδικασία ολοκληρώθηκε με επιτυχία","Η εισαγωγή κενών πραγματοποιήθηκε με επιτυχία")},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.selType.Code=="PermanentMusicGap"&&(n.gaps.RegionAndUnitId=n.authentication.regionAndUnitId,t={gaps:n.gaps,UserRole:n.authentication.role},i=t,o.postByParams(i,"api/Management/updatePermanentMusicGap").then(function(){n.previousStep();u.pop("success","Η διαδικασία ολοκληρώθηκε με επιτυχία","Η εισαγωγή κενών πραγματοποιήθηκε με επιτυχία")},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}))}};InsertGapInitController.$inject=["$scope","$q","PassParameters","$state","toaster","ApplicationTypeRegionAndUnitFactory","ManagementFactory","GeneralFactory","$filter"];InsertPlacementGapController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v){function b(){n.pageRules.PlacementGap.CanView&&e.isValueInArray(e.getRoleCode(n.authentication.role),"d1, d2, m1, m2, p, a")&&(n.pagesList.push("substituteGap"),n.pagesList.push("substituteNotFullGap"));n.pageRules.PlacementSMEAGap.CanView&&e.isValueInArray(e.getRoleCode(n.authentication.role),"d1, d2, m1, m2, p, a")&&(n.pagesList.push("substituteSMEAGap"),n.pagesList.push("substituteSMEANotFullGap"));n.pageRules.PlacementEEPEBPGap.CanView&&e.isValueInArray(e.getRoleCode(n.authentication.role),"d1, d2, m1, m2, p, a")&&(n.pagesList.push("substituteEEPEBPGap"),n.pagesList.push("substituteEEPEBPNotFullGap"));n.pageRules.PlacementEEPEBPGap.CanView&&e.isValueInArray(e.getRoleCode(n.authentication.role),"m1, m2, p, a")&&n.pagesList.push("substituteEEPSDEYKEDASYGap")}function k(t){l(angular.element(t).contents())(n)}function d(t){n.paramsForDataTable[y]=t;let i="";return t.IsConfirmed==="ΟΧΙ"?(i+='<button type="button" class="btn btn-danger btn-xs" uib-tooltip="Οριστικοποίηση" ng-click="openConfirmModal(paramsForDataTable['+y+'])"><i class="fa fa-check"><\/i><\/button>',e.isValueInArray(e.getRoleCode(n.authentication.role),"a")&&(i+='<button type="button" class="btn btn-warning btn-xs" uib-tooltip="Διαγραφή" ng-click="openDeleteGapmModal(paramsForDataTable['+y+'])"><i class="fa fa-trash-o"><\/i><\/button>')):(e.isValueInArray(e.getRoleCode(n.authentication.role),"a, p, d1, d2")&&(i+='<button type="button" class="btn btn-default btn-xs" uib-tooltip="Αποριστικοποίηση" ng-click="openUnConfirmModal(paramsForDataTable['+y+'])"><i class="fa fa-check"><\/i><\/button>'),e.isValueInArray(e.getRoleCode(n.authentication.role),"a")&&(i+='<button type="button" class="btn btn-warning btn-xs" uib-tooltip="Διαγραφή" ng-click="openDeleteGapmModal(paramsForDataTable['+y+'])"><i class="fa fa-trash-o"><\/i><\/button>')),y=y+1,i}var p,y,w;n.specOrGroup=[];n.pageRules={};n.pagesList=[];n.hasAccess=!0;n.showLevelForEEPEBP=!0;!n.authentication.isAuth||e.isValueInArray(e.getRoleCode(n.authentication.role),"u1, u2")?r.go("/"):(p="PlacementGap,PlacementSMEAGap,PlacementEEPEBPGap",e.getByParams({role:n.authentication.role,codes:p},"/api/Subsystem/NewCheckPermission").then(function(i){var r=p.split(","),u,f;for(u in r)n.pageRules[r[u]]=o("filter")(i,{Code:r[u]},!0)[0].Rules;b();f=t.all([e.getByAll("/api/Dbo/getLevelsAsync"),e.getByParams({optionList:n.pagesList},"/api/Dbo/getGapList")]);f.then(function(t){n.levels=t[0];n.gapType=t[1];e.isEmpty(n.gapType)&&(n.hasAccess=!1);e.isValueInArray(e.getRoleCode(n.authentication.role),"d1, d2, m1, m2")&&(n.level=o("filter")(t[0],{Id:Number(n.authentication.levelId)},!0)[0].Id)})},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")}));n.smeaType=[{Type:"ΕΙΔΙΚΗΣ ΑΓΩΓΗΣ",LevelId:0},{Type:"BRAILLE",LevelId:0},{Type:"ΝΟΗΜΑΤΙΚΗ",LevelId:0},{Type:"BRAILLE/ΝΟΗΜΑΤΙΚΗ",LevelId:0},{Type:"ΠΑΡΑΛΛΗΛΗ ΣΤΗΡΙΞΗ ΕΙΔΙΚΗΣ ΑΓΩΓΗΣ",LevelId:0},{Type:"ΠΑΡΑΛΛΗΛΗ ΣΤΗΡΙΞΗ BRAILLE",LevelId:0},{Type:"ΠΑΡΑΛΛΗΛΗ ΣΤΗΡΙΞΗ ΝΟΗΜΑΤΙΚΗ",LevelId:0},{Type:"ΠΑΡΑΛΛΗΛΗ ΣΤΗΡΙΞΗ BRAILLE/ΝΟΗΜΑΤΙΚΗ",LevelId:0},{Type:"ΤΜΗΜΑ ΕΝΤΑΞΗΣ ΕΙΔΙΚΗΣ ΑΓΩΓΗΣ",LevelId:0},{Type:"ΤΜΗΜΑ ΕΝΤΑΞΗΣ BRAILLE",LevelId:0},{Type:"ΤΜΗΜΑ ΕΝΤΑΞΗΣ ΝΟΗΜΑΤΙΚΗ",LevelId:0},{Type:"ΤΜΗΜΑ ΕΝΤΑΞΗΣ BRAILLE/ΝΟΗΜΑΤΙΚΗ",LevelId:0},{Type:"COVID-19, ΕΙΔΙΚΗΣ ΑΓΩΓΗΣ",LevelId:0},{Type:"COVID-19, BRAILLE",LevelId:0},{Type:"COVID-19, ΝΟΗΜΑΤΙΚΗ",LevelId:0},{Type:"COVID-19, BRAILLE/ΝΟΗΜΑΤΙΚΗ",LevelId:0},{Type:"COVID-19, ΠΑΡΑΛΛΗΛΗ ΣΤΗΡΙΞΗ ΕΙΔΙΚΗΣ ΑΓΩΓΗΣ",LevelId:0},{Type:"COVID-19, ΠΑΡΑΛΛΗΛΗ ΣΤΗΡΙΞΗ BRAILLE",LevelId:0},{Type:"COVID-19, ΠΑΡΑΛΛΗΛΗ ΣΤΗΡΙΞΗ ΝΟΗΜΑΤΙΚΗ",LevelId:0},{Type:"COVID-19, ΠΑΡΑΛΛΗΛΗ ΣΤΗΡΙΞΗ BRAILLE/ΝΟΗΜΑΤΙΚΗ",LevelId:0},{Type:"COVID-19, ΤΜΗΜΑ ΕΝΤΑΞΗΣ ΕΙΔΙΚΗΣ ΑΓΩΓΗΣ",LevelId:0},{Type:"COVID-19, ΤΜΗΜΑ ΕΝΤΑΞΗΣ BRAILLE",LevelId:0},{Type:"COVID-19, ΤΜΗΜΑ ΕΝΤΑΞΗΣ ΝΟΗΜΑΤΙΚΗ",LevelId:0},{Type:"COVID-19, ΤΜΗΜΑ ΕΝΤΑΞΗΣ BRAILLE/ΝΟΗΜΑΤΙΚΗ",LevelId:0}];n.EEPEBPgapType=[{Type:"BRAILLE/ΝΟΗΜΑΤΙΚΗ",LevelId:0},{Type:"ΝΟΗΜΑΤΙΚΗ",LevelId:0},{Type:"BRAILLE",LevelId:0},{Type:"ΕΙΔΙΚΗΣ ΑΓΩΓΗΣ",LevelId:0},{Type:"ΕΞΕΙΔΙΚΕΥΜΕΝΗ ΠΕΠ",LevelId:0},{Type:"ΕΞΕΙΔΙΚΕΥΜΕΝΗ ΤΟΜΕΑΚΟ",LevelId:0},{Type:"ΓΕΝΙΚΗΣ ΠΑΙΔΕΙΑΣ",LevelId:0},{Type:"Μ.Ν.Α.Ε.",LevelId:0},{Type:"ΤΥ-ΖΕΠ",LevelId:0},{Type:"ΔΥΕΠ",LevelId:0},{Type:"COVID-19, BRAILLE/ΝΟΗΜΑΤΙΚΗ",LevelId:0},{Type:"COVID-19, ΝΟΗΜΑΤΙΚΗ",LevelId:0},{Type:"COVID-19, BRAILLE",LevelId:0},{Type:"COVID-19, ΕΙΔΙΚΗΣ ΑΓΩΓΗΣ",LevelId:0},{Type:"COVID-19, ΕΞΕΙΔΙΚΕΥΜΕΝΗ ΠΕΠ",LevelId:0},{Type:"COVID-19, ΕΞΕΙΔΙΚΕΥΜΕΝΗ ΤΟΜΕΑΚΟ",LevelId:0},{Type:"COVID-19, ΓΕΝΙΚΗΣ ΠΑΙΔΕΙΑΣ",LevelId:0},{Type:"COVID-19, Μ.Ν.Α.Ε.",LevelId:0},{Type:"COVID-19, ΤΥ-ΖΕΠ",LevelId:0},{Type:"COVID-19, ΔΥΕΠ",LevelId:0}];n.substituteType=e.isValueInArray(e.getRoleCode(n.authentication.role),"m1, m2, a")?[{Type:"ΤΥ-ΖΕΠ",LevelId:0},{Type:"ΓΕΝΙΚΗΣ ΠΑΙΔΕΙΑΣ",LevelId:0},{Type:"ΝΗΠΙΑΓΩΓΕΙΟ",LevelId:1},{Type:"Μ.Ν.Α.Ε.",LevelId:0},{Type:"ΔΥΕΠ",LevelId:0},{Type:"ΠΑΡΑΛΛΗΛΗΣ ΣΤΗΡΙΞΗΣ",LevelId:0},{Type:"ΣΜΕΑΕ",LevelId:0},{Type:"ΓΕΝΙΚΗΣ ΠΑΙΔΕΙΑΣ - ΓΥΜΝΑΣΙΟ",LevelId:2},{Type:"COVID-19, ΤΥ-ΖΕΠ",LevelId:0},{Type:"COVID-19, ΓΕΝΙΚΗΣ ΠΑΙΔΕΙΑΣ",LevelId:0},{Type:"COVID-19, ΝΗΠΙΑΓΩΓΕΙΟ",LevelId:1},{Type:"COVID-19, Μ.Ν.Α.Ε.",LevelId:0},{Type:"COVID-19, ΔΥΕΠ",LevelId:0},{Type:"COVID-19, ΠΑΡΑΛΛΗΛΗΣ ΣΤΗΡΙΞΗΣ",LevelId:0},{Type:"COVID-19, ΣΜΕΑΕ",LevelId:0},{Type:"COVID-19, ΓΕΝΙΚΗΣ ΠΑΙΔΕΙΑΣ - ΓΥΜΝΑΣΙΟ",LevelId:2}]:[{Type:"ΤΥ-ΖΕΠ",LevelId:0},{Type:"ΓΕΝΙΚΗΣ ΠΑΙΔΕΙΑΣ",LevelId:0},{Type:"ΝΗΠΙΑΓΩΓΕΙΟ",LevelId:1},{Type:"Μ.Ν.Α.Ε.",LevelId:0},{Type:"ΔΥΕΠ",LevelId:0},{Type:"ΓΕΝΙΚΗΣ ΠΑΙΔΕΙΑΣ - ΓΥΜΝΑΣΙΟ",LevelId:2},{Type:"COVID-19, ΤΥ-ΖΕΠ",LevelId:0},{Type:"COVID-19, ΓΕΝΙΚΗΣ ΠΑΙΔΕΙΑΣ",LevelId:0},{Type:"COVID-19, ΝΗΠΙΑΓΩΓΕΙΟ",LevelId:1},{Type:"COVID-19, Μ.Ν.Α.Ε.",LevelId:0},{Type:"COVID-19, ΔΥΕΠ",LevelId:0},{Type:"COVID-19, ΓΕΝΙΚΗΣ ΠΑΙΔΕΙΑΣ - ΓΥΜΝΑΣΙΟ",LevelId:2}];n.AddOrEditGroup=!1;n.FixCss="";n.NewGapGroup={Id:0,Quantity:1,TotalWorkHours:25,HasPanhellenic:!1,IsActive:!0,Schools:[]};n.regionAndUnit=[];n.gaps=[];n.selType=[];n.selregionAndUnit=[];n.selspecOrGroup=[];n.showGapTable=!1;n.showGapInfo=!1;n.showGapReport=!1;n.showButton=!1;n.showChoice=!1;n.hasKeddy=!1;n.showAddButton=!1;n.status="";n.schools=[];n.orderList="Name";n.PlacementGap={};n.NumberOfRecruits=0;n.response=2;n.GroupId=0;n.TotalActiveGroups=0;n.search={regionAndUnitId:"",IsConfirmed:!1,userRole:n.authentication.role,levelUser:n.authentication.levelId};n.regionAndUnitId={};n.recruitmentDate={};n.recruitmentDateReport1={};n.recruitmentDateReport2={};n.recruitmentDateReport3={};n.recruitmentDateReport4={};n.DisableQuantity=!1;n.results=[];n.filterRow={visible:!0,applyFilter:"auto"};n.headerFilter={visible:!0};n.showColumnLines=!0;n.showRowLines=!0;n.showBorders=!0;n.rowAlternationEnabled=!0;n.Reports={ReportTypes:[{Id:1,Description:"Καταχωρισμένων Κενών"},{Id:2,Description:"Προσλήψεων"},{Id:3,Description:"Τοποθετήσεων"},{Id:4,Description:"Αναλήψεων"}],Selected:{}};n.paramsForDataTable=[];n.dtConfirmGap={};n.gridOptions={bindingOptions:{dataSource:"results",filterRow:"filterRow",headerFilter:"headerFilter",showColumnLines:"showColumnLines",showRowLines:"showRowLines",showBorders:"showBorders",rowAlternationEnabled:"rowAlternationEnabled",columns:"columns"},allowColumnReordering:!0,allowColumnResizing:!0,columnAutoWidth:!0,columnFixing:{enabled:!0},searchPanel:{visible:!0,width:240,placeholder:"Αναζήτηση..."},selection:{mode:"multiple"},columnChooser:{enabled:!0},"export":{enabled:!0,fileName:"Results",allowExportSelectedData:!0},groupPanel:{visible:!0},paging:{pageSize:10},pager:{showPageSizeSelector:!0,allowedPageSizes:[10,20,50,100],showInfo:!0}};n.dtInstance={};n.dtOptions=a.newOptions().withPaginationType("full_numbers").withOption("order",[2,"desc"]).withOption("createdRow",k);n.dtColumns=[v.newColumn("Id").withTitle("Id").notVisible(),v.newColumn("RecruitmentDate").withTitle("Ημ. Πρόσληψης"),v.newColumn("UnitDesc").withTitle("Περιοχή"),v.newColumn("IsFull").withTitle("Ωράριο"),v.newColumn("GapType").withTitle("Τύπος Κενού"),v.newColumn("SpecialityCode").withTitle("Κλάδος"),v.newColumn("TotalTeachers").withTitle("Προσλήψεις").withClass("text-center"),v.newColumn("TotalActiveGaps").withTitle("Ενεργά Κενά").withClass("text-center"),v.newColumn("IsConfirmed").withTitle("Οριστ/μένο").withClass("text-center"),v.newColumn(null).withTitle("Ενέργειες").notSortable().renderWith(d).withClass("text-center")];y=0;w=function(){e.getByParams({regionAndUnitTypeId:n.RegionAndUnits.Selected.RegionAndUnitTypeId,regionAndUnitId:n.RegionAndUnits.Selected.Id,recruitmentDate:n.recruitmentDate&&n.recruitmentDate.DisplayRecruitmentDate?n.recruitmentDate.RecruitmentDate:""},"/api/InsertPlacementGap/CheckPlacementGapAsync").then(function(t){t.success&&(y=0,n.dtOptions.data=t.data)},function(n){u.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.RegionAndUnits={Data:[],Selected:{},IsDisable:!0};n.GetRegionAndUnitsAsync=function(){e.getByAll("/api/InsertPlacementGap/GetRegionAndUnitsAsync").then(function(t){t.success?(n.RegionAndUnits.Data=t.data,e.isValueInArray(e.getRoleCode(n.authentication.role),"a, m1, m2")?(n.RegionAndUnits.Selected=t.data[0],n.RegionAndUnits.IsDisable=!1):e.isValueInArray(e.getRoleCode(n.authentication.role),"p")?(n.RegionAndUnits.Data=o("filter")(t.data,function(t){return t.RegionAndUnitTypeId==7&&t.Id==n.authentication.regionAndUnitId||t.RegionAndUnitTypeId==8&&t.RegionParentId==n.authentication.regionAndUnitId}),n.RegionAndUnits.Selected=n.RegionAndUnits.Data[0],n.RegionAndUnits.IsDisable=!1):(n.RegionAndUnits.Selected=t.data.filter(function(t){return t.Id==n.authentication.regionAndUnitId})[0],n.RegionAndUnits.IsDisable=!0)):u.pop("error","Παρουσιάστηκε σφάλμα","Πρόβλημα κατά την ανάκτηση των Διευθύνσεων")},function(){u.pop("error","Παρουσιάστηκε σφάλμα","Πρόβλημα κατά την ανάκτηση των Διευθύνσεων")})};n.GetRegionAndUnitsAsync();n.RecruitmentDates=[];n.GetRecruitmentDatesAsync=function(){e.getByAll("/api/InsertPlacementGap/GetRecruitmentDatesAsync").then(function(t){t.success?n.RecruitmentDates=t.data:u.pop("error","Παρουσιάστηκε σφάλμα","Πρόβλημα κατά την ανάκτηση των Ημ. Πρόσληψης")},function(){u.pop("error","Παρουσιάστηκε σφάλμα","Πρόβλημα κατά την ανάκτηση των Ημ. Πρόσληψης")})};n.GetRecruitmentDatesAsync();n.SpecialityRecruitmentDate={};n.SpecialityRecruitmentDates=[];n.GetRecruitmentDatesBySpecialityAsync=function(t){let i={SpecialityId:n.specOrGroup.Id,IsSpeciality:n.specOrGroup.isSpec,RegionAndUnitId:n.regionAndUnit.RegionAndUnitId,IsFull:n.GetIsFullValue(n.selType.Code),GapType:n.selgapType.Type,GapListCode:n.selType.Code};e.postByParams(i,"/api/InsertPlacementGap/GetRecruitmentDatesBySpecialityAsync").then(function(i){i.success?(n.SpecialityRecruitmentDates=i.data,t&&$("#modalConfirm").modal("show")):u.pop("error","Παρουσιάστηκε σφάλμα","Πρόβλημα κατά την ανάκτηση των Ημ. Πρόσληψης")},function(){u.pop("error","Παρουσιάστηκε σφάλμα","Πρόβλημα κατά την ανάκτηση των Ημ. Πρόσληψης")})};n.GetRecruitmentDatesByGapIdAsync=function(t){let i={Id:n.dtConfirmGap.Id};e.postByParams(i,"/api/InsertPlacementGap/GetRecruitmentDatesByGapIdAsync").then(function(i){i.success?(n.SpecialityRecruitmentDates=i.data,t&&$("#modalConfirm").modal("show")):u.pop("error","Παρουσιάστηκε σφάλμα","Πρόβλημα κατά την ανάκτηση των Ημ. Πρόσληψης")},function(){u.pop("error","Παρουσιάστηκε σφάλμα","Πρόβλημα κατά την ανάκτηση των Ημ. Πρόσληψης")})};n.GetIsFullValue=function(n){return n=="substituteGap"||n=="substituteSMEAGap"||n=="substituteEEPEBPGap"||n=="substituteEEPSDEYKEDASYGap"?!0:!1};n.resetNewGapGroup=function(){n.NewGapGroup.Id=0;n.NewGapGroup.Quantity=1;n.NewGapGroup.TotalWorkHours=25;n.NewGapGroup.HasPanhellenic=!1;n.NewGapGroup.IsActive=!0;n.NewGapGroup.Schools=[]};n.InputWorkHours={MinValue:1,MaxValue:25};n.GetPlacementGapConfigAsync=function(){e.postByParams({SpecialityId:n.specOrGroup.Id,LevelId:n.level,IsSpeciality:n.specOrGroup.isSpec},"/api/InsertPlacementGap/GetPlacementGapConfigAsync").then(function(t){t.success?(n.PlacementGapConfig=t.data,n.PlacementGapConfig.EnablePanhellenic||(n.FixCss="-no-panhellenic"),n.InputWorkHours=n.GetIsFullValue(n.selType.Code)?{MinValue:n.PlacementGapConfig.MinFullTotalHours,MaxValue:n.PlacementGapConfig.MaxFullTotalHours}:{MinValue:n.PlacementGapConfig.MinNonFullTotalHours,MaxValue:n.PlacementGapConfig.MaxNonFullTotalHours}):u.pop("error"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά την ανάκτηση των ρυθμίσεων")},function(){u.pop("error"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά την ανάκτηση των ρυθμίσεων")})};n.clickTab=function(){n.showGapTable=!1;n.showGapInfo=!1;n.showGapReport=!1};n.calcTotalActiveGroups=function(){let t=0;n.PlacementGap&&n.PlacementGap.Groups&&angular.forEach(n.PlacementGap.Groups,function(n){n.IsActive&&(t+=n.Quantity)});n.TotalActiveGroups=t};n.changedTypeGap=function(){n.regionAndUnit=[];n.specOrGroup=[];n.selgapType=null;n.showButton=!1;n.showGapTable=!1;n.resetNewGapGroup();n.selType.Code=="substituteEEPSDEYKEDASYGap"?(n.showLevelForEEPEBP=!1,n.level=3):n.showLevelForEEPEBP=!0;(n.selType.Code=="substituteGap"||n.selType.Code=="substituteNotFullGap"||n.selType.Code=="substituteSMEAGap"||n.selType.Code=="substituteSMEANotFullGap"||n.selType.Code=="substituteEEPEBPGap"||n.selType.Code=="substituteEEPEBPNotFullGap"||n.selType.Code=="substituteEEPSDEYKEDASYGap")&&(e.isValueInArray(e.getRoleCode(n.authentication.role),"a,p")&&(!e.isValueInArray(e.getRoleCode(n.authentication.role),"a,p")||e.isEmptyValue(n.level)||e.isEmptyValue(n.selType.Description))||(blockUI({target:".tabbable-tabdrop",animate:!0}),e.getByParams({level:n.level,parentId:n.authentication.regionAndUnitId,Code:n.selType.Code,UserRole:n.authentication.role},"/api/RegionAndUnit/getTypeRegionUnitSubstituteForGaps").then(function(t){n.selregionAndUnit=t.regions;n.selspecOrGroup=t.specialities;unblockUI(".tabbable-tabdrop")},function(){unblockUI(".tabbable-tabdrop");u.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")}),n.showChoice=n.selType.Description!=null?!0:!1),n.showLevel=!0)};n.checkButton=function(){n.showGapTable=!1;n.resetNewGapGroup();n.showButton=n.specOrGroup!=null&&n.specOrGroup!=""&&n.specOrGroup!="undefined"&&n.regionAndUnit!=null&&n.regionAndUnit!=""&&n.regionAndUnit!="undefined"&&n.selgapType!=null&&n.selgapType!=""&&n.selgapType!="undefined"?!0:!1};n.searchAction=function(){var t,i,r;n.selType.Code&&(n.PlacementGap={},n.NumberOfRecruits=0,blockUI({target:".tabbable-tabdrop",animate:!0}),n.GetPlacementGapConfigAsync(),t={RegionAndUnitId:n.regionAndUnit.RegionAndUnitId,LevelId:n.level,SpecialityId:n.specOrGroup.Id,IsSpeciality:n.specOrGroup.isSpec,GapType:n.selgapType.Type,GapListCode:n.selType.Code},e.postByParams(t,"/api/InsertPlacementGap/GetSchoolsAsync").then(function(t){t.success?n.schools=t.data:u.pop("error","Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την ανάκτηση των σχολικών μονάδων")},function(){u.pop("error","Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την ανάκτηση των σχολικών μονάδων")}),i={RegionAndUnitId:n.regionAndUnit.RegionAndUnitId,LevelId:n.level,SpecialityId:n.specOrGroup.Id,IsSpeciality:n.specOrGroup.isSpec,IsFull:n.GetIsFullValue(n.selType.Code),GapType:n.selgapType.Type,GapListCode:n.selType.Code},e.postByParams(i,"/api/InsertPlacementGap/GetNumberOfRecruitsAsync").then(function(t){t.success?n.NumberOfRecruits=t.data:u.pop("warning","Παρουσιάστηκε πρόβλημα κατά την ανάκτηση του αριθμού προσληφθέντων αναπληρωτών")},function(){u.pop("error","Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την ανάκτηση του αριθμού προσληφθέντων αναπληρωτών")}),r={RegionAndUnitId:n.regionAndUnit.RegionAndUnitId,LevelId:n.level,SpecialityId:n.specOrGroup.Id,IsSpeciality:n.specOrGroup.isSpec,IsFull:n.GetIsFullValue(n.selType.Code),GapType:n.selgapType.Type},e.postByParams(r,"/api/InsertPlacementGap/GetPlacementGapAsync").then(function(t){unblockUI(".tabbable-tabdrop");t.success?(n.PlacementGap=t.data,n.calcTotalActiveGroups(),n.showGapTable=!0):u.pop("error","Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την ανάκτηση των κενών")},function(){unblockUI(".tabbable-tabdrop");u.pop("error","Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την ανάκτηση των κενών")}))};n.searchCheckGaps=function(){n.results=[];n.showGapInfo=!0;n.dtInstance.changeData(w())};n.searchReportGaps=function(){n.results=[];n.Reports.Selected.Id==1?e.getByParams({regionAndUnitTypeId:n.RegionAndUnits.Selected.RegionAndUnitTypeId,regionAndUnitId:n.RegionAndUnits.Selected.Id,recruitmentDate:n.recruitmentDateReport1&&n.recruitmentDateReport1.DisplayRecruitmentDate?n.recruitmentDateReport1.RecruitmentDate:""},"/api/InsertPlacementGap/GetReportGapsAsync").then(function(t){t.success?t.data&&t.data.length>0?(n.showGapReport=!0,n.columns=[{dataField:"Region",caption:"ΠΕΡΙΟΧΗ"},{dataField:"RecruitmentDate",caption:"ΗΜ. ΠΡΟΣΛΗΨΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"Code",caption:"ΚΩΔ.ΕΙΔΙΚΟΤΗΤΑΣ"},{dataField:"IsFull",caption:"ΩΡΑΡΙΟ"},{dataField:"GapType",caption:"ΤΥΠΟΣ ΚΕΝΟΥ"},{dataField:"IsConfirmed",caption:"ΟΡΙΣΤΙΚΟΠΟΙΗΜΕΝΟ"},{dataField:"GroupId",caption:"ΚΩΔ. ΟΜΑΔΑΣ"},{dataField:"Quantity",caption:"ΠΛΗΘΟΣ ΚΕΝΩΝ"},{dataField:"TotalWorkHours",caption:"ΣΥΝΟΛΟ ΩΡΩΝ"},{dataField:"IsActive",caption:"ΕΝΕΡΓΟ"},{dataField:"RegistryNo",caption:"ΚΩΔ. ΣΧΟΛΕΙΟΥ"},{dataField:"SchoolName",caption:"ΣΧΟΛΕΙΟ"},{dataField:"WorkHours",caption:"ΩΡΕΣ"},{dataField:"Notes",caption:"ΠΑΡΑΤΗΡΗΣΕΙΣ"},{dataField:"PointsPerYear",caption:"ΜΣΔ"},{dataField:"PresenceSchool",caption:"ΣΧ. ΑΝΑΛΗΨΗΣ"}],n.results=t.data):(n.showGapReport=!1,u.pop("info","Δεν βρέθηκαν αποτελέσματα")):u.pop("warning","Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα κατά την ανάκτηση της αναφοράς")},function(){u.pop("warning","Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα κατά την ανάκτηση της αναφοράς")}):n.Reports.Selected.Id==2?e.getByParams({regionAndUnitTypeId:n.RegionAndUnits.Selected.RegionAndUnitTypeId,regionAndUnitId:n.RegionAndUnits.Selected.Id,recruitmentDate:n.recruitmentDateReport2&&n.recruitmentDateReport2.DisplayRecruitmentDate?n.recruitmentDateReport2.RecruitmentDate:""},"/api/InsertPlacementGap/GetReportRecruitmentSumAsync").then(function(t){t.success?t.data&&t.data.length>0?(n.showGapReport=!0,n.columns=[{dataField:"RecruitmentDate",caption:"ΗΜ. ΠΡΟΣΛΗΨΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RegionAndUnitDesc",caption:"ΠΕΡΙΟΧΗ"},{dataField:"SpecialityCode",caption:"ΕΙΔΙΚΟΤΗΤΑ"},{dataField:"IsFull",caption:"ΩΡΑΡΙΟ"},{dataField:"GapType",caption:"ΤΥΠΟΣ ΚΕΝΟΥ"},{dataField:"Total",caption:"ΠΛΗΘΟΣ"}],n.results=t.data):(n.showGapReport=!1,u.pop("info","Δεν βρέθηκαν αποτελέσματα")):u.pop("warning","Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα κατά την ανάκτηση της αναφοράς")},function(){u.pop("warning","Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα κατά την ανάκτηση της αναφοράς")}):n.Reports.Selected.Id==3?e.getByParams({regionAndUnitTypeId:n.RegionAndUnits.Selected.RegionAndUnitTypeId,regionAndUnitId:n.RegionAndUnits.Selected.Id,recruitmentDate:n.recruitmentDateReport3.RecruitmentDate},"/api/InsertPlacementGap/PlacementAssignmentAsync").then(function(t){t.success?t.data&&t.data.length>0?(n.showGapReport=!0,n.columns=[{dataField:"RecruitmentDate",caption:"ΗΜ. ΠΡΟΣΛΗΨΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"Lastname",caption:"ΕΠΙΘΕΤΟ"},{dataField:"Firstname",caption:"ΟΝΟΜΑ"},{dataField:"FatherFirstname",caption:"ΟΝ. ΠΑΤΡOΣ"},{dataField:"TaxNumber",caption:"Α.Φ.Μ."},{dataField:"RegionAndUnit",caption:"ΠΕΡΙΟΧΗ"},{dataField:"SpecialityCode",caption:"ΕΙΔΙΚΟΤΗΤΑ"},{dataField:"IsFull",caption:"ΩΡΑΡΙΟ"},{dataField:"GapType",caption:"ΤΥΠΟΣ ΚΕΝΟΥ"},{dataField:"TotalWorkHours",caption:"ΣΥΝΟΛΟ ΩΡΩΝ"},{dataField:"PresenceSchool",caption:"ΣΧ. ΑΝΑΛΗΨΗΣ"},{dataField:"RegistryNo",caption:"ΚΩΔ. ΣΧΟΛΕΙΟΥ"},{dataField:"SchoolName",caption:"ΣΧΟΛΕΙΟ"},{dataField:"WorkHours",caption:"ΩΡΕΣ"},{dataField:"Notes",caption:"ΠΑΡΑΤΗΡΗΣΕΙΣ"},{dataField:"HasApplication",caption:"ΔΗΛΩΣΗ"}],n.results=t.data):(n.showGapReport=!1,u.pop("info","Δεν βρέθηκαν αποτελέσματα")):u.pop("warning","Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα κατά την ανάκτηση της αναφοράς")},function(){u.pop("warning","Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα κατά την ανάκτηση της αναφοράς")}):n.Reports.Selected.Id==4&&e.getByParams({regionAndUnitTypeId:n.RegionAndUnits.Selected.RegionAndUnitTypeId,regionAndUnitId:n.RegionAndUnits.Selected.Id,recruitmentDate:n.recruitmentDateReport4.RecruitmentDate},"/api/InsertPlacementGap/PersonAssignmentAsync").then(function(t){t.success?t.data&&t.data.length>0?(n.showGapReport=!0,n.columns=[{dataField:"RecruitmentDate",caption:"ΗΜ. ΠΡΟΣΛΗΨΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"Lastname",caption:"ΕΠΙΘΕΤΟ"},{dataField:"Firstname",caption:"ΟΝΟΜΑ"},{dataField:"FatherFirstname",caption:"ΟΝ. ΠΑΤΡOΣ"},{dataField:"TaxNumber",caption:"Α.Φ.Μ."},{dataField:"RegionAndUnit",caption:"ΠΕΡΙΟΧΗ"},{dataField:"SpecialityCode",caption:"ΕΙΔΙΚΟΤΗΤΑ"},{dataField:"IsFull",caption:"ΩΡΑΡΙΟ"},{dataField:"GapType",caption:"ΤΥΠΟΣ ΚΕΝΟΥ"},{dataField:"PresenceDateTime",caption:"ΗΜ. ΑΝΑΛΗΨΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RegistryNo",caption:"ΚΩΔ. ΣΧΟΛΕΙΟΥ"}],n.results=t.data):(n.showGapReport=!1,u.pop("info","Δεν βρέθηκαν αποτελέσματα")):u.pop("warning","Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα κατά την ανάκτηση της αναφοράς")},function(){u.pop("warning","Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα κατά την ανάκτηση της αναφοράς")})};n.addSchool=function(t){if(n.NewGapGroup&&n.NewGapGroup.Schools){if(n.selgapType.Type==="ΠΑΡΑΛΛΗΛΗ ΣΤΗΡΙΞΗ ΕΙΔΙΚΗΣ ΑΓΩΓΗΣ"){if(n.PlacementGapConfig.ParallelMaxNumberOfSchools==n.NewGapGroup.Schools.length){u.pop("warning","Δεν μπορείτε να προσθέσετε παραπάνω από "+n.PlacementGapConfig.ParallelMaxNumberOfSchools+" σχ. μονάδες");return}}else if(n.PlacementGapConfig.MaxNumberOfSchools==n.NewGapGroup.Schools.length){u.pop("warning","Δεν μπορείτε να προσθέσετε παραπάνω από "+n.PlacementGapConfig.MaxNumberOfSchools+" σχ. μονάδες");return}let i=n.NewGapGroup.Schools.some(function(n){return n.SchoolId===t.Id});if(i)u.pop("warning","Υπάρχει ήδη η σχ. μονάδα: "+t.Name);else{let i={Id:0,SchoolId:t.Id,Name:t.Name,RegistryNo:t.RegistryNo,PointsPerYear:t.PointsPerYear,WorkHours:n.InputWorkHours.MaxValue,Notes:t.Notes};n.NewGapGroup.Schools.push(i);n.NewGapGroup.Schools.length>1?(n.NewGapGroup.Quantity=1,n.DisableQuantity=!0):n.DisableQuantity=!1}}};n.removeSchool=function(t){let i=-1,r=n.NewGapGroup.Schools.some(function(n,r){return i=r,n.SchoolId===t.SchoolId});if(r&&i!==-1)n.NewGapGroup.Schools.splice(i,1);else return;n.NewGapGroup.Schools.length>1?(n.NewGapGroup.Quantity=1,n.DisableQuantity=!0):n.DisableQuantity=!1};n.saveGroup=function(t){var i,r;if(!t.Schools||t.Schools.length==0){u.pop("warning","Δεν έχετε προσθέσει σχ. μονάδες");return}if(i=0,angular.forEach(t.Schools,function(n){i+=parseInt(n.WorkHours)}),r={Gap:{RegionAndUnitId:n.regionAndUnit.RegionAndUnitId,LevelId:n.level,IsFull:n.GetIsFullValue(n.selType.Code),SpecialityId:n.specOrGroup.Id,GapType:n.selgapType.Type},Group:{},GapListId:n.selType.Id,GapListCode:n.selType.Code,IsSpeciality:n.specOrGroup.isSpec},!i||i>n.InputWorkHours.MaxValue||i<n.InputWorkHours.MinValue){u.pop("warning","Οι συνολικές διδακτικές ώρες πρέπει να είναι από "+n.InputWorkHours.MinValue+" έως "+n.InputWorkHours.MaxValue);return}if(t.Id==0){let f={Id:t.Id,Quantity:t.Quantity,TotalWorkHours:i,HasPanhellenic:t.HasPanhellenic,IsActive:t.IsActive,Schools:[]};angular.forEach(t.Schools,function(n){f.Schools.push({Id:0,SchoolId:n.SchoolId,Name:n.Name,RegistryNo:n.RegistryNo,PresenceSchool:!1,WorkHours:n.WorkHours,SchoolCapacityTypeId:null,PointsPerYear:n.PointsPerYear,Notes:n.Notes})});r.Group=f;blockUI({target:".div-add-edit-group",animate:!0});e.postByParams(r,"/api/InsertPlacementGap/SaveGroupAsync").then(function(t){t.success?(n.PlacementGap.Id=t.data.Id,n.PlacementGap.Groups.push(t.data.Group),n.resetNewGapGroup(),unblockUI(".div-add-edit-group"),u.pop("success","H εισαγωγή έγινε με επιτυχία"),n.calcTotalActiveGroups()):(unblockUI(".div-add-edit-group"),u.pop("error","Παρουσιάστηκε σφάλμα","H εισαγωγή δεν πραγματοποιήθηκε"))},function(){unblockUI(".div-add-edit-group");u.pop("error","Παρουσιάστηκε σφάλμα","H ενημέρωση δεν πραγματοποιήθηκε")})}else{let f={Id:t.Id,Quantity:t.Quantity,TotalWorkHours:i,HasPanhellenic:t.HasPanhellenic,IsActive:t.IsActive,Schools:[]};angular.forEach(t.Schools,function(n){f.Schools.push({Id:n.Id,SchoolId:n.SchoolId,Name:n.Name,RegistryNo:n.RegistryNo,PresenceSchool:!1,WorkHours:n.WorkHours,SchoolCapacityTypeId:null,PointsPerYear:n.PointsPerYear,Notes:n.Notes})});r.Group=f;blockUI({target:".div-add-edit-group",animate:!0});e.postByParams(r,"/api/InsertPlacementGap/SaveGroupAsync").then(function(i){if(i.success){let r=-1;n.PlacementGap.Groups.some(function(n,i){return r=i,n.Id===t.Id});n.PlacementGap.Groups[r]=i.data.Group;n.resetNewGapGroup();unblockUI(".div-add-edit-group");u.pop("success","H ενημέρωση έγινε με επιτυχία");n.calcTotalActiveGroups()}else unblockUI(".div-add-edit-group"),u.pop("error"," Παρουσιάστηκε σφάλμα","H ενημέρωση δεν πραγματοποιήθηκε")},function(){unblockUI(".div-add-edit-group");u.pop("error"," Παρουσιάστηκε σφάλμα","H ενημέρωση δεν πραγματοποιήθηκε")})}};n.gotoAnchor=function(n){var t="anchor"+n;s.hash()!==t?s.hash("anchor"+n):h()};n.editGroup=function(t){n.AddOrEditGroup=!0;n.resetNewGapGroup();n.NewGapGroup=angular.copy(t);n.gotoAnchor(1)};n.openDeleteModal=function(t){n.GroupId=t;$("#deleteModal").modal("show")};n.deleteAction=function(){e.postByParams({Id:n.GroupId},"/api/InsertPlacementGap/DeleteGroupAsync").then(function(t){if(t.success&&t.data){let t=-1;n.PlacementGap.Groups.some(function(i,r){return t=r,i.Id===n.GroupId});n.PlacementGap.Groups.splice(t,1);$("#deleteModal").modal("hide");n.calcTotalActiveGroups();u.pop("success","Η διαγραφή έγινε με επιτυχία")}else $("#deleteModal").modal("hide"),u.pop("warning","Η διαγραφή δεν έγινε")},function(n){$("#DeleteModal").modal("hide");u.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.changePanhellenic=function(t,i){e.postByParams({Id:t,HasPanhellenic:i},"/api/InsertPlacementGap/ChangePanhellenicAsync").then(function(t){t.success&&t.data?u.pop("success","Η κατάσταση Πανελλαδικών εξεταζόμενων μαθημάτων άλλαξε"):(u.pop("error","Η κατάσταση Πανελλαδικών εξεταζόμενων μαθημάτων δεν άλλαξε"),n.searchAction())},function(){u.pop("error","Η κατάσταση Πανελλαδικών εξεταζόμενων μαθημάτων δεν άλλαξε");n.searchAction()})};n.changeGroupStatus=function(t,i){e.postByParams({Id:t,IsActive:i},"/api/InsertPlacementGap/ChangeGroupStatusAsync").then(function(t){t.success&&t.data?(n.calcTotalActiveGroups(),u.pop("success","Η κατάσταση άλλαξε")):(n.searchAction(),u.pop("error","Η κατάσταση δεν άλλαξε"))},function(){n.searchAction();u.pop("error","Η κατάσταση δεν άλλαξε")})};n.openConfirmModal=function(t){t?(n.dtConfirmGap=t,n.GetRecruitmentDatesByGapIdAsync(!0)):(n.dtConfirmGap={},n.GetRecruitmentDatesBySpecialityAsync(!0))};n.ConfirmGapAsync=function(){if(n.dtConfirmGap&&n.dtConfirmGap.Id){if(n.dtConfirmGap.TotalTeachers!=n.dtConfirmGap.TotalActiveGaps){u.pop("warning","To πλήθος των Κενών πρέπει να ισούται με τον αριθμό Προσληφθέντων Αναπληρωτών");return}if(!n.SpecialityRecruitmentDate||n.SpecialityRecruitmentDate.DisplayRecruitmentDate==""){u.pop("warning","Επιλέξτε Ημ. Πρόσληψης πριν την οριστικοποίηση");return}if(!n.dtConfirmGap.Id||n.dtConfirmGap.Id==0){u.pop("warning","Δεν υπάρχουν καταχωρημένα κενά για να οριστικοποιθούν");return}e.postByParams({Id:n.dtConfirmGap.Id,RecruitmentDate:n.SpecialityRecruitmentDate.RecruitmentDate},"/api/InsertPlacementGap/ConfirmGapAsync").then(function(t){t.success&&t.data?(n.searchCheckGaps(),u.pop("success","Τα κενά οριστικοποιήθηκαν"),$("#modalConfirm").modal("hide")):t.success&&!t.data?u.pop("warning","Η συγκεκριμένη κατηγορία κενών έχει ήδη οριστικοποιηθεί"):u.pop("error","Παρουσιάστηκε σφάλμα και τα κενά δεν οριστικοποιήθηκαν")},function(){u.pop("error","Παρουσιάστηκε σφάλμα και τα κενά δεν οριστικοποιήθηκαν")})}else{if(n.NumberOfRecruits!=n.TotalActiveGroups){u.pop("warning","To πλήθος των Κενών πρέπει να ισούται με τον αριθμό Προσληφθέντων Αναπληρωτών");return}if(!n.SpecialityRecruitmentDate||n.SpecialityRecruitmentDate.DisplayRecruitmentDate==""){u.pop("warning","Επιλέξτε Ημ. Πρόσληψης πριν την οριστικοποίηση");return}if(!n.PlacementGap.Id||n.PlacementGap.Id==0){u.pop("warning","Δεν υπάρχουν καταχωρημένα κενά για να οριστικοποιθούν");return}e.postByParams({Id:n.PlacementGap.Id,RecruitmentDate:n.SpecialityRecruitmentDate.RecruitmentDate},"/api/InsertPlacementGap/ConfirmGapAsync").then(function(t){t.success&&t.data?(n.searchAction(),u.pop("success","Τα κενά οριστικοποιήθηκαν"),$("#modalConfirm").modal("hide")):t.success&&!t.data?u.pop("warning","Η συγκεκριμένη κατηγορία κενών έχει ήδη οριστικοποιηθεί"):u.pop("error","Παρουσιάστηκε σφάλμα και τα κενά δεν οριστικοποιήθηκαν")},function(){u.pop("error","Παρουσιάστηκε σφάλμα και τα κενά δεν οριστικοποιήθηκαν")})}};n.openUnConfirmModal=function(t){n.dtConfirmGap=t;$("#unConfirmModal").modal("show")};n.UnConfirmGapAsync=function(){let t={Id:n.dtConfirmGap.Id};e.postByParams(t,"/api/InsertPlacementGap/UnConfirmGapAsync").then(function(t){t.success&&t.data?(n.searchCheckGaps(),u.pop("success","Τα κενά Αποριστικοποιήθηκαν")):t.success&&!t.data?u.pop("warning","Προσοχή","Δεν μπορεί να γίνει αποριστικοποίηση γιατί έχει χρησιμοποιηθεί σε αίτηση"):u.pop("error","Παρουσιάστηκε σφάλμα","Πρόβλημα κατά την Αποριστικοποίηση")},function(){u.pop("error","Παρουσιάστηκε σφάλμα","Πρόβλημα κατά την Αποριστικοποίηση")})};n.openDeleteGapmModal=function(t){n.dtConfirmGap=t;$("#deleteGapModal").modal("show")};n.DeleteGapAsync=function(){let t={Id:n.dtConfirmGap.Id};e.postByParams(t,"/api/InsertPlacementGap/DeleteGapAsync").then(function(t){t.success&&t.data?(n.searchCheckGaps(),u.pop("success","Τα κενά διαγράφηκαν")):t.success&&!t.data?u.pop("warning","Προσοχή","Δεν μπορεί να γίνει διαγραφή γιατί έχει χρησιμοποιηθεί σε αίτηση"):u.pop("error","Παρουσιάστηκε σφάλμα","Πρόβλημα κατά την διαγραφή")},function(){u.pop("error","Παρουσιάστηκε σφάλμα","Πρόβλημα κατά την διαγραφή")})};n.hideReportGridOnChange=function(){n.showGapReport=!1};n.customFilterByLevel=function(t){return t.LevelId==0||t.LevelId==n.level?!0:!1}};InsertPlacementGapController.$inject=["$scope","$q","PassParameters","$state","toaster","ApplicationTypeRegionAndUnitFactory","GeneralFactory","$filter","$location","$anchorScroll","RouteFactory","$compile","DTOptionsBuilder","DTColumnBuilder"];IntendancyController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v){function y(){a.getByAll("/api/Intendancy/positiveNegativeAnswers").then(function(t){n.positiveNegative=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function g(){a.getByAll("/api/Intendancy/languageLevels").then(function(t){n.languageLevel=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function nt(){a.getByAll("/api/Dbo/getLanguages").then(function(t){n.languages=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function tt(){a.getByAll("/api/Intendancy/getAdministrationStaff").then(function(t){n.administrationStaff=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function it(){a.getByParams({level:n.intendancy.LevelId},"/api/RegionAndUnit/getPyspdeByLevel").then(function(t){n.consts.pyspdeRegionJoin=t;n.consts.pyspdeRegionAndUnit=i("filter")(t,function(n){return n.Description!="Υπό Μετακίνηση"})},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function rt(){c.getPyspdeWithoutJointExaminationByLevel(n.applicationType,n.intendancy.LevelId).then(function(t){n.consts.pyspde=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function b(){var t=f.all([a.getByParams({applicationId:n.intendancy.Id},"/api/Intendancy/getServicesWithDetailsById"),a.getByParams({applicationId:n.intendancy.Id},"/api/Intendancy/getHoursServicesWithDetailsById")]);t.then(function(t){n.personServices=t[0];n.personHoursServices=t[1];n.DisabledFek=n.personServices.length>0?!0:!1;n.ShowselectionCriteriaTable.BeforeNomination=i("filter")(n.personServices,{BeforeNomination:1},!0).length>0?!0:!1;n.ShowselectionCriteriaTable.AfterNomination=i("filter")(n.personServices,{BeforeNomination:2},!0).length>0?!0:!1},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των Υπηρετήσεων")})}function ut(){a.getByParams({applicationId:n.intendancy.Id},"/api/Intendancy/getAdminExperienceById").then(function(t){n.personExperiences=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function k(){n.IsDisabled||n.IsDisabledForDE?($("#CertificateMineduTrainingPrograms :input").prop("disabled",!0),$("#SelfTaughtTeaching :input").prop("disabled",!0),$("#MineduTrainer :input").prop("disabled",!0),$("#ResearchPrograms :input").prop("disabled",!0),$("#PersonalWritingBooksISBN :input").prop("disabled",!0),$("#GroupWritingBooksISBN :input").prop("disabled",!0),$("#PersonalScientificPublication :input").prop("disabled",!0),$("#GroupScientificPublication :input").prop("disabled",!0),$("#PersonalMineduContributions :input").prop("disabled",!0),$("#GroupMineduContributions :input").prop("disabled",!0),$("#StudyProgramsParticipation :input").prop("disabled",!0),$("#InterviewPoints :input").prop("disabled",!0),$("#CertificateMineduTrainingPrograms").parent().find(".input-group-btn button").prop("disabled",!0),$("#SelfTaughtTeaching").parent().find(".input-group-btn button").prop("disabled",!0),$("#MineduTrainer").parent().find(".input-group-btn button").prop("disabled",!0),$("#ResearchPrograms").parent().find(".input-group-btn button").prop("disabled",!0),$("#PersonalWritingBooksISBN").parent().find(".input-group-btn button").prop("disabled",!0),$("#GroupWritingBooksISBN").parent().find(".input-group-btn button").prop("disabled",!0),$("#PersonalScientificPublication").parent().find(".input-group-btn button").prop("disabled",!0),$("#GroupScientificPublication").parent().find(".input-group-btn button").prop("disabled",!0),$("#PersonalMineduContributions").parent().find(".input-group-btn button").prop("disabled",!0),$("#GroupMineduContributions").parent().find(".input-group-btn button").prop("disabled",!0),$("#StudyProgramsParticipation").parent().find(".input-group-btn button").prop("disabled",!0),$("#InterviewPoints").parent().find(".input-group-btn button").prop("disabled",!0)):($("#CertificateMineduTrainingPrograms :input").prop("disabled",!1),$("#SelfTaughtTeaching :input").prop("disabled",!1),$("#MineduTrainer :input").prop("disabled",!1),$("#ResearchPrograms :input").prop("disabled",!1),$("#PersonalWritingBooksISBN :input").prop("disabled",!1),$("#GroupWritingBooksISBN :input").prop("disabled",!1),$("#PersonalScientificPublication :input").prop("disabled",!1),$("#GroupScientificPublication :input").prop("disabled",!1),$("#PersonalMineduContributions :input").prop("disabled",!1),$("#GroupMineduContributions :input").prop("disabled",!1),$("#StudyProgramsParticipation :input").prop("disabled",!1),$("#InterviewPoints :input").prop("disabled",!1),$("#CertificateMineduTrainingPrograms").parent().find(".input-group-btn button").prop("disabled",!1),$("#SelfTaughtTeaching").parent().find(".input-group-btn button").prop("disabled",!1),$("#MineduTrainer").parent().find(".input-group-btn button").prop("disabled",!1),$("#ResearchPrograms").parent().find(".input-group-btn button").prop("disabled",!1),$("#PersonalWritingBooksISBN").parent().find(".input-group-btn button").prop("disabled",!1),$("#GroupWritingBooksISBN").parent().find(".input-group-btn button").prop("disabled",!1),$("#PersonalScientificPublication").parent().find(".input-group-btn button").prop("disabled",!1),$("#GroupScientificPublication").parent().find(".input-group-btn button").prop("disabled",!1),$("#PersonalMineduContributions").parent().find(".input-group-btn button").prop("disabled",!1),$("#GroupMineduContributions").parent().find(".input-group-btn button").prop("disabled",!1),$("#StudyProgramsParticipation").parent().find(".input-group-btn button").prop("disabled",!1),$("#InterviewPoints").parent().find(".input-group-btn button").prop("disabled",!1))}function p(){n.intendancy.SpecialityId==364?(n.intendancy.CertificateTCCLevelA=1,n.disabledCertificateTCCLevelA=!0):n.disabledCertificateTCCLevelA=!1}function d(){a.getByAll("/api/Intendancy/getMunicipalities").then(function(t){n.municipalities=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}if(n.intendancy={IsTemporaryStored:!0},n.consts={},n.applicationType=21,n.alerts=[{type:"danger",msg:"Δεν μπορείτε να υποβάλετε αίτηση. Για ήδη υποβληθείσα αίτηση μεταβείτε στο Ιστορικό Αιτήσεων."}],n.protocol="",n.showProtocol=!1,n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.showLevel=!1,n.myfilter={},n.personalStep=!0,n.selectionCriteriaStep=!1,n.regionStep=!1,n.fek={},n.dateForProposal="",n.DisableSave=!1,n.intendancySrv={},n.intendancyHoursSrv={},n.intendancyExp={},n.IsFromInsert=!1,n.SaveEduTechSrvDisabled=!1,n.SaveEduTechHoursSrvDisabled=!1,n.SaveExperienceDisabled=!1,n.IsDisabledForDE=!1,n.disabledCertificateTCCLevelA=!1,n.showAlertLanguages=!1,n.showAlertLanguagesLevel=!1,n.alertLanguages="",n.alertLanguagesLevel="",n.showAlertPostgraduate=!1,n.alertPostgraduate="",n.showAlertLanguagesLevelSelection=!1,n.alertLanguagesLevelSelection="",n.showAlertBeforeNomination=!0,n.alertBeforeNomination="",n.showAlertCanInsertDates=!1,n.alertCanInsertDates="",n.DisabledFek=!1,n.showAlertServices=!1,n.alertServices="",n.showAlertHoursServices=!1,n.alertHoursServices="",n.showAlertHours=!1,n.alertHours="",n.AvailableIntendancyListItems=[],n.SelectedAvailIntendancyItems=[],n.SelectedSelectedIntendancyListItems=[],n.SelectedIntendancyListItems=[],n.ShowselectionCriteriaTable={BeforeNomination:!1,AfterNomination:!1},n.Educational={Years:0,Months:0,Days:0},n.TeachingSchool={Years:0,Months:0,Days:0},n.TeachingOther={Years:0,Months:0,Days:0},n.TeachingSchoolForPoints={Years:0,Months:0,Days:0},n.personServices=[],n.personHoursServices=[],n.personExperiences=[],n.showAlertRegions=!1,n.AlertRegionsMessage="Πρέπει να δηλώσετε τουλάχιστον μία Διεύθυνση Εκπαίδευσης",n.cannotUpdate=!1,n.notActive=!1,n.noUpdAccess=!1,n.PyspdeFormOfficial=0,n.showAlertPyspdeFormOfficial=!1,n.concatPyspde="",n.messagePyspde="",n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.authentication.isAuth){var w="intendancy";a.getByParams({role:n.authentication.role,codes:w},"/api/Subsystem/NewCheckPermission").then(function(t){var r=w.split(","),u,o;for(u in r)n.pageRules[r[u]]=i("filter")(t,{Code:r[u]},!0)[0].Rules;n.intendancy.DidacticYearId=n.didacticYear.Id;n.intendancy.Id=e.getApplicationId();a.isEmptyValue(n.intendancy.Id)&&(n.IsFromInsert=!0);e.resetApplication();n.intendancy.PersonId=e.getPersonId();a.isValueInArray(n.pageRules.intendancy.CanAccess,"u1, u2")&&(n.intendancy.PersonId=n.authentication.personId);o=f.all([l.isFekValidForApplicationTypeId(n.applicationType),a.getByParams({personId:n.intendancy.PersonId},"/api/Intendancy/canInsertApplication")]);o.then(function(t){n.hasValidFek=t[0];n.fek=t[1];n.fek.Id>0?(n.canInsertAppl=!0,n.intendancy.FekId=n.fek.Id):n.canInsertAppl=!1;n.intendancy.Id!=null&&n.intendancy.Id!=""&&n.intendancy.Id!="undefined"?(n.canUpdateAppl=!0,n.showAddEditForm=1):n.canInsertAppl&&n.hasValidFek?(n.canInsertAppl=!0,n.showAddEditForm=1):n.showAddEditForm=2;n.fek.DisplayModal&&a.isEmptyValue(n.intendancy.Id)?$("#alertModal").modal("show"):n.doAll();a.isEmptyValue(n.intendancy.Id)&&(n.IsDisabled=!n.pageRules.intendancy.CanInsert)})},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else o.go("/");n.getPostingTranferAreas=function(){a.getByAll("/api/RegionAndUnit/getPostingTransferAreas").then(function(t){n.PostingTranferAreas=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.changedRegionAndUnit=function(){n.checkForPostingTransferArea();n.getPostingTranferAreas()};n.checkForPostingTransferArea=function(){n.myfilter=i("filter")(n.OfficialPlacementUnits,{Id:n.intendancy.OfficialRegionAndUnitId},!0)[0];n.myfilter.RegionAndUnitTypeId==8?(n.showPostingTransferArea=!0,n.showLevel=!1,n.intendancy.LevelId=n.myfilter.LevelId):(a.getByAll("/api/Dbo/getLevelsAsync").then(function(t){n.levels=t;n.showLevel=!0},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία φόρτωσης βαθμίδων επιλογής")}),n.showPostingTransferArea=!1,n.intendancy.PostingTransferAreaId=null)};n.getApplRegions=function(){n.intendancy.RegionAndUnitId>0?(n.AvailableIntendancyListItems=[],blockUI({target:"#divBlockUIRegion",animate:!0}),a.getByParams({municipalityId:n.intendancy.RegionAndUnitId,applicationTypeId:n.applicationType},"/api/ApplicationTypeRegionAndUnit/getRegionAndUnitByMunicipality").then(function(t){angular.copy(t,n.AvailableIntendancyListItems);n.SelectedAvailIntendancyItems=n.SelectedIntendancyListItems;n.removeDuplicatesIntendancyForDualList();unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(unblockUI("#divBlockUIRegion"),n.AvailableIntendancyListItems=[],n.SelectedIntendancyListItems=[],n.SelectedSelectedIntendancyListItems=[])};n.changedMunicipality=function(){n.SelectedIntendancyListItems=[];n.SelectedSelectedIntendancyListItems=[];n.getApplRegions()};n.changeLevel=function(){it();rt()};n.changePostgraduate=function(){n.intendancy.PostgraduateEducation!=1&&n.intendancy.SecondPostgraduateEducation==1?(n.showAlertPostgraduate=!0,n.alertPostgraduate=[{type:"danger",msg:"Δεν μπορείτε να δηλώσετε δεύτερο μεταπτυχιακό τίτλο εφόσον δεν έχει δηλωθεί ο πρώτος."}]):(n.showAlertPostgraduate=!1,n.alertPostgraduate="")};n.changeService=function(){n.intendancySrv.TeachingSchoolService==1&&n.intendancySrv.TeachingOtherService==1?(n.showAlertServices=!0,n.alertServices=[{type:"danger",msg:"Πρέπει να δηλώσετε την Υπηρέτηση είτε ως Διδακτική είτε ως Λοιπή Διδακτική Υπηρεσία."}]):(n.showAlertServices=!1,n.alertServices="")};n.changeBeforeNomination=function(){n.showAlertCanInsertDates=!1;n.alertCanInsertDates="";n.intendancySrv.BeforeNomination==2?n.intendancySrv.DateFrom<n.intendancy.NominationDate?(n.showAlertBeforeNomination=!0,n.alertBeforeNomination=[{type:"danger",msg:"Δεν μπορείτε να δηλώσετε για τη συγκεκριμένη υπηρέτηση Ημ/νία Έναρξης μικρότερη απή την Ημ/νία ΦΕΚ Διορισμού."}]):(n.showAlertBeforeNomination=!0,n.alertBeforeNomination=""):n.intendancySrv.BeforeNomination==1&&(n.intendancySrv.DateTo>=n.intendancy.NominationDate?(n.showAlertBeforeNomination=!0,n.alertBeforeNomination=[{type:"danger",msg:"Δεν μπορείτε να δηλώσετε για τη συγκεκριμένη υπηρέτηση Ημ/νία Λήξης μεγαλύτερη απή την Ημ/νία ΦΕΚ Διορισμού."}]):(n.showAlertBeforeNomination=!0,n.alertBeforeNomination=""))};n.changeLanguage=function(){!n.intendancy.FirstLanguageId&&n.intendancy.FirstLanguageLevel||!n.intendancy.SecondLanguageId&&n.intendancy.SecondLanguageLevel?(n.showAlertLanguagesLevel=!0,n.alertLanguagesLevel=[{type:"danger",msg:"Θα πρέπει να συμπληρώσετε ξένη γλώσσα"}]):n.intendancy.SecondLanguageId&&!n.intendancy.FirstLanguageId?(n.showAlertLanguagesLevel=!0,n.alertLanguagesLevel=[{type:"danger",msg:"Δεν έχετε συμπληρώσει την 1η ξένη γλώσσα για να μπορέσετε να συμπληρώσετε και τη 2η ξένη γλώσσα"}]):(n.showAlertLanguagesLevel=!1,n.alertLanguagesLevel="");n.intendancy.FirstLanguageLevel==1&&n.intendancy.SecondLanguageLevel==2?(n.showAlertLanguagesLevelSelection=!0,n.alertLanguagesLevelSelection=[{type:"danger",msg:"Η γνώση ξένης γλώσσας επιπέδου Aνώτερου του Β2 εισάγεται ως 1η ξένη γλώσσα."}]):(n.showAlertLanguagesLevelSelection=!1,n.alertLanguagesLevelSelection="");n.intendancy.FirstLanguageId==n.intendancy.SecondLanguageId&&n.intendancy.FirstLanguageId&&n.intendancy.SecondLanguageId?(n.showAlertLanguages=!0,n.alertLanguages=[{type:"danger",msg:"Δεν μπορείτε να εισάγετε την ίδια ξένη γλώσσα ως 1η και 2η επιλογή."}]):(n.showAlertLanguages=!1,n.alertLanguages="")};n.getOfficialPlacementUnits=function(){var t,i;t=n.intendancy.Id!=null&&n.intendancy.Id!=""&&n.intendancy.Id!="undefined"?n.intendancy.OfficialRegionAndUnitId:n.person.OfficialRegionAndUnit.Id;params={OfficialUnitAndRegionId:t,userLevel:n.authentication.levelId};i=f.all([a.getByAll("/api/RegionAndUnit/getRegionAndUnitForPlacement")]);i.then(function(t){n.OfficialPlacementUnits=t[0];for(var i=n.OfficialPlacementUnits.length-1;i>=0;i--)n.OfficialPlacementUnits[i].RegionAndUnitTypeId==7&&(n.OfficialPlacementUnits[i].Description="Π.Δ.Ε. "+n.OfficialPlacementUnits[i].Description);n.changedRegionAndUnit()})};n.doAll=function(){if(n.intendancy.Id!=null&&n.intendancy.Id!=""&&n.intendancy.Id!="undefined"){if(n.canUpdateAppl){n.AvailablePyspdeListItems=[];var t=f.all([a.getByParams({id:n.intendancy.PersonId},"/api/Person/GetEducationalStaffPersonDto"),a.getByParams({id:n.intendancy.Id},"/api/Intendancy/GetIntendancyById")]);t.then(function(t){n.person=t[0];n.intendancy.SpecialityId=t[0].Speciality.Id;n.intendancy=t[1];var i=f.all([a.getByParams({applicationId:n.intendancy.Id},"/api/Intendancy/getApplRegionsByApplId"),a.getByParams({municipalityId:n.intendancy.RegionAndUnitId,applicationTypeId:n.applicationType},"/api/ApplicationTypeRegionAndUnit/getRegionAndUnitByMunicipality")]);i.then(function(t){n.SelectedIntendancyListItems=t[0];n.SelectedAvailIntendancyItems=t[0];angular.copy(t[1],n.AvailableIntendancyListItems);n.removeDuplicatesIntendancyForDualList();unblockUI("#divBlockUIRegion")},function(){unblockUI("#divBlockUIRegion");s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των διευθύνσεων εκπαίδευσης.")});n.paramsForCheckUpd.personId=n.intendancy.PersonId;n.paramsForCheckUpd.levelUser=n.authentication.levelId;n.paramsForCheckUpd.regionAndUnitId=n.authentication.regionAndUnitId;n.paramsForCheckUpd.userRole=n.authentication.role;n.paramsForCheckUpd.specialityId=n.intendancy.SpecialityId;n.paramsForCheckUpd.applicationLevelId=n.intendancy.LevelId;n.paramsForCheckUpd.applicationTypeId=n.applicationType;n.paramsForCheckUpd.IsActive=n.intendancy.IsActive;n.paramsForCheckUpd.FekId=n.intendancy.FekId;a.postByParams(n.paramsForCheckUpd,"/api/General/checkUpdateSecFromFEKAndUser").then(function(t){n.IsDisabled=!t;n.IsDisabled&&(n.noUpdAccess=!0);a.isValueInArray(n.pageRules.intendancy.CanAccess,"u1, u2")&&n.intendancy.IsActive&&!n.intendancy.IsTemporaryStored&&(n.IsDisabled=!0,n.cannotUpdate=!0);n.intendancy.IsActive||(n.IsDisabled=!0,n.notActive=!0);a.isValueInArray(n.pageRules.intendancy.CanAccess,"d1, d2, p,c1,c2")&&n.intendancy.LevelId!=n.authentication.levelId&&(n.IsDisabled=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.intendancy.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0);a.isValueInArray(n.pageRules.intendancy.CanAccess,"d1, d2")&&(n.IsDisabledForDE=!0);n.getOfficialPlacementUnits();y();k();d();b()})})}}else n.canInsertAppl&&n.intendancy.PersonId!=null&&n.intendancy.PersonId!=""&&n.intendancy.PersonId!="undefined"&&(n.AvailablePyspdeListItems=[],a.getByParams({id:n.intendancy.PersonId},"/api/Person/GetEducationalStaffPersonDto").then(function(t){n.person=t;n.intendancy.SpecialityId=t.Speciality.Id;n.intendancy.OfficialRegionAndUnitId=t.OfficialRegionAndUnit.Id;n.intendancy.OfficialPlacementUnitDescription=t.OfficialPlacementUnitDescription;n.intendancy.NominationDate=t.NominationDate;n.intendancy.LevelId=t.OfficialRegionAndUnit.LevelId;n.intendancy.NominationNo=t.NominationNo;n.getOfficialPlacementUnits();y();k();d();n.getApplRegions()},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}))};n.insertSrvAction=function(t){n.intendancySrv.TeachingSchoolService==1&&n.intendancySrv.TeachingOtherService==1?(n.showAlertServices=!0,n.alertServices=[{type:"danger",msg:"Πρέπει να δηλώσετε την Υπηρέτηση είτε ως Διδακτική είτε ως Λοιπή Διδακτική Υπηρεσία."}]):(n.showAlertServices=!1,n.alertServices="");!$("#editIntendancyServiceForm").valid()||n.showAlertServices||n.showAlertCanInsertDates||(n.SaveEduTechSrvDisabled=!0,t.intendancyApplicationId=n.intendancy.Id,a.isEmptyValue(t.Id)?(t.CreatedBy=n.authentication.userName,t.CreatedUserRole=n.authentication.role,t.CreatedRegionAndUnitDescription=n.authentication.unitName,t.IsFromInsert=n.IsFromInsert,a.postByParams(t,"/api/Intendancy/InsertIntendancySrv").then(function(t){n.personServices=t.IntendancyEduTeachList;n.DisabledFek=n.personServices.length>0?!0:!1;n.intendancy.EducationalYears=t.Educational.Years;n.intendancy.EducationalMonths=t.Educational.Months;n.intendancy.EducationalDays=t.Educational.Days;n.intendancy.DidacticSchoolYears=t.TeachingSchool.Years;n.intendancy.DidacticSchoolMonths=t.TeachingSchool.Months;n.intendancy.DidacticSchoolDays=t.TeachingSchool.Days;n.intendancy.DidacticOtherYears=t.TeachingOther.Years;n.intendancy.DidacticOtherMonths=t.TeachingOther.Months;n.intendancy.DidacticOtherDays=t.TeachingOther.Days;n.intendancy.DidacticSchoolYearsForPoints=t.TeachingSchoolForPoints.Years;n.intendancy.DidacticSchoolMonthsForPoints=t.TeachingSchoolForPoints.Months;n.intendancy.DidacticSchoolDaysForPoints=t.TeachingSchoolForPoints.Days;n.intendancy.DidacticOtherYearsForPoints=t.TeachingOtherForPoints.Years;n.intendancy.DidacticOtherMonthsForPoints=t.TeachingOtherForPoints.Months;n.intendancy.DidacticOtherDaysForPoints=t.TeachingOtherForPoints.Days;t.canInsertDates?(n.showAlertCanInsertDates=!1,n.alertCanInsertDates="",$("#AddServiceModal").modal("hide"),n.cancelSrv()):(n.showAlertCanInsertDates=!0,n.alertCanInsertDates=[{type:"danger",msg:"Το χρονικό διάστημα της υπηρέτησης που έχετε συμπληρώσει αλληλοεπικαλύπτεται με χρονικά διαστήματα υπηρετήσεων που έχετε ήδη εισάγει."}],n.SaveEduTechSrvDisabled=!1)},function(n){s.pop("error","ΠΡΟΣΟΧΗ",n.data)})):(t.ModifiedBy=n.authentication.userName,t.ModifiedUserRole=n.authentication.role,t.ModifiedRegionAndUnitDescription=n.authentication.unitName,t.IsFromInsert=n.IsFromInsert,a.postByParams(t,"/api/Intendancy/UpdateIntendancySrv").then(function(t){n.personServices=t.IntendancyEduTeachList;n.DisabledFek=n.personServices.length>0?!0:!1;n.intendancy.EducationalYears=t.Educational.Years;n.intendancy.EducationalMonths=t.Educational.Months;n.intendancy.EducationalDays=t.Educational.Days;n.intendancy.DidacticSchoolYears=t.TeachingSchool.Years;n.intendancy.DidacticSchoolMonths=t.TeachingSchool.Months;n.intendancy.DidacticSchoolDays=t.TeachingSchool.Days;n.intendancy.DidacticOtherYears=t.TeachingOther.Years;n.intendancy.DidacticOtherMonths=t.TeachingOther.Months;n.intendancy.DidacticOtherDays=t.TeachingOther.Days;n.intendancy.DidacticSchoolYearsForPoints=t.TeachingSchoolForPoints.Years;n.intendancy.DidacticSchoolMonthsForPoints=t.TeachingSchoolForPoints.Months;n.intendancy.DidacticSchoolDaysForPoints=t.TeachingSchoolForPoints.Days;n.intendancy.DidacticOtherYearsForPoints=t.TeachingOtherForPoints.Years;n.intendancy.DidacticOtherMonthsForPoints=t.TeachingOtherForPoints.Months;n.intendancy.DidacticOtherDaysForPoints=t.TeachingOtherForPoints.Days;t.canInsertDates?(n.showAlertCanInsertDates=!1,n.alertCanInsertDates="",$("#AddServiceModal").modal("hide"),n.cancelSrv()):(n.showAlertCanInsertDates=!0,n.alertCanInsertDates=[{type:"danger",msg:"Τα χρονικά διαστήματα των υπηρετήσεων δεν πρέπει να αλληλοεπικαλύπτονται."}],n.SaveEduTechSrvDisabled=!1)},function(n){s.pop("error","ΠΡΟΣΟΧΗ",n.data)})))};n.cancelSrv=function(){n.intendancySrv={};n.SaveEduTechSrvDisabled=!1;n.ShowselectionCriteriaTable.BeforeNomination=i("filter")(n.personServices,{BeforeNomination:1},!0).length>0?!0:!1;n.ShowselectionCriteriaTable.AfterNomination=i("filter")(n.personServices,{BeforeNomination:2},!0).length>0?!0:!1};n.insertHoursSrvAction=function(t){n.intendancyHoursSrv.TeachingSchoolService==1&&n.intendancyHoursSrv.TeachingOtherService==1?(n.showAlertHoursServices=!0,n.alertHoursServices=[{type:"danger",msg:"Πρέπει να δηλώσετε την Υπηρέτηση είτε ως Διδακτική είτε ως Λοιπή Διδακτική Υπηρεσία."}]):(n.showAlertHoursServices=!1,n.alertHoursServices="");a.isEmptyValue(n.intendancyHoursSrv.Years)&&a.isEmptyValue(n.intendancyHoursSrv.Months)&&a.isEmptyValue(n.intendancyHoursSrv.Days)?(n.showAlertHours=!0,n.alertHours=[{type:"danger",msg:"Πρέπει να δηλώσετε στην Υπηρέτηση Ωρομισθίου  Έτη ή Μήνες ή Ημέρες."}]):(n.showAlertHours=!1,n.alertHours="");!$("#editIntendancyHoursServiceForm").valid()||n.showAlertHoursServices||n.showAlertHours||(n.SaveEduTechHoursSrvDisabled=!0,t.intendancyApplicationId=n.intendancy.Id,a.isEmptyValue(t.Id)?(t.CreatedBy=n.authentication.userName,t.CreatedUserRole=n.authentication.role,t.CreatedRegionAndUnitDescription=n.authentication.unitName,t.IsFromInsert=n.IsFromInsert,a.postByParams(t,"/api/Intendancy/InsertIntendancyHoursSrv").then(function(t){n.personHoursServices=t.IntendancyHoursEduTeachList;n.intendancy.EducationalYears=t.Educational.Years;n.intendancy.EducationalMonths=t.Educational.Months;n.intendancy.EducationalDays=t.Educational.Days;n.intendancy.DidacticSchoolYears=t.TeachingSchool.Years;n.intendancy.DidacticSchoolMonths=t.TeachingSchool.Months;n.intendancy.DidacticSchoolDays=t.TeachingSchool.Days;n.intendancy.DidacticOtherYears=t.TeachingOther.Years;n.intendancy.DidacticOtherMonths=t.TeachingOther.Months;n.intendancy.DidacticOtherDays=t.TeachingOther.Days;n.intendancy.DidacticSchoolYearsForPoints=t.TeachingSchoolForPoints.Years;n.intendancy.DidacticSchoolMonthsForPoints=t.TeachingSchoolForPoints.Months;n.intendancy.DidacticSchoolDaysForPoints=t.TeachingSchoolForPoints.Days;n.intendancy.DidacticOtherYearsForPoints=t.TeachingOtherForPoints.Years;n.intendancy.DidacticOtherMonthsForPoints=t.TeachingOtherForPoints.Months;n.intendancy.DidacticOtherDaysForPoints=t.TeachingOtherForPoints.Days;$("#AddHoursServiceModal").modal("hide");n.cancelHoursSrv()},function(n){s.pop("error","ΠΡΟΣΟΧΗ",n.data)})):(t.ModifiedBy=n.authentication.userName,t.ModifiedUserRole=n.authentication.role,t.ModifiedRegionAndUnitDescription=n.authentication.unitName,t.IsFromInsert=n.IsFromInsert,a.postByParams(t,"/api/Intendancy/updateIntendancyHoursSrv").then(function(t){n.personHoursServices=t.IntendancyHoursEduTeachList;n.intendancy.EducationalYears=t.Educational.Years;n.intendancy.EducationalMonths=t.Educational.Months;n.intendancy.EducationalDays=t.Educational.Days;n.intendancy.DidacticSchoolYears=t.TeachingSchool.Years;n.intendancy.DidacticSchoolMonths=t.TeachingSchool.Months;n.intendancy.DidacticSchoolDays=t.TeachingSchool.Days;n.intendancy.DidacticOtherYears=t.TeachingOther.Years;n.intendancy.DidacticOtherMonths=t.TeachingOther.Months;n.intendancy.DidacticOtherDays=t.TeachingOther.Days;n.intendancy.DidacticSchoolYearsForPoints=t.TeachingSchoolForPoints.Years;n.intendancy.DidacticSchoolMonthsForPoints=t.TeachingSchoolForPoints.Months;n.intendancy.DidacticSchoolDaysForPoints=t.TeachingSchoolForPoints.Days;n.intendancy.DidacticOtherYearsForPoints=t.TeachingOtherForPoints.Years;n.intendancy.DidacticOtherMonthsForPoints=t.TeachingOtherForPoints.Months;n.intendancy.DidacticOtherDaysForPoints=t.TeachingOtherForPoints.Days;$("#AddHoursServiceModal").modal("hide");n.cancelHoursSrv()},function(n){s.pop("error","ΠΡΟΣΟΧΗ",n.data)})))};n.cancelHoursSrv=function(){n.intendancyHoursSrv={};n.SaveEduTechHoursSrvDisabled=!1};n.insertExpAction=function(t){$("#editIntendancyExperienceForm ").valid()&&(n.SaveExperienceDisabled=!0,t.intendancyApplicationId=n.intendancy.Id,a.isEmptyValue(t.Id)?(t.CreatedBy=n.authentication.userName,t.CreatedUserRole=n.authentication.role,t.CreatedRegionAndUnitDescription=n.authentication.unitName,t.IsFromInsert=n.IsFromInsert,a.postByParams(t,"/api/Intendancy/InsertAdministrationExperience").then(function(t){n.personExperiences=t.AdministrationExperiences;t.canInsertDates?(n.showAlertCanInsertDates=!1,n.alertCanInsertDates="",$("#AddExperienceModal").modal("hide"),n.cancelExp()):(n.showAlertCanInsertDates=!0,n.alertCanInsertDates=[{type:"danger",msg:"Τα χρονικά διαστήματα των υπηρετήσεων δεν πρέπει να αλληλοεπικαλύπτονται."}],n.SaveExperienceDisabled=!1)},function(n){s.pop("error","ΠΡΟΣΟΧΗ",n.data)})):(t.ModifiedBy=n.authentication.userName,t.ModifiedUserRole=n.authentication.role,t.ModifiedRegionAndUnitDescription=n.authentication.unitName,t.IsFromInsert=n.IsFromInsert,a.postByParams(t,"/api/Intendancy/UpdateAdministrationExperience").then(function(t){n.personExperiences=t.AdministrationExperiences;t.canInsertDates?(n.showAlertCanInsertDates=!1,n.alertCanInsertDates="",$("#AddExperienceModal").modal("hide"),n.cancelExp()):(n.showAlertCanInsertDates=!0,n.alertCanInsertDates=[{type:"danger",msg:"Το χρονικό διάστημα της διοικητικής εμπειρίας που έχετε συμπληρώσει αλληλοεπικαλύπτεται με χρονικά διαστήματα διοικητικών εμπειριών που έχετε ήδη εισάγει."}],n.SaveExperienceDisabled=!1)},function(n){s.pop("error","ΠΡΟΣΟΧΗ",n.data)})))};n.cancelExp=function(){n.intendancyExp={};n.SaveExperienceDisabled=!1};n.removeDuplicatesIntendancyForDualList=function(){angular.forEach(n.SelectedAvailIntendancyItems,function(t){for(var i=n.AvailableIntendancyListItems.length-1;i>=0;i--)n.AvailableIntendancyListItems[i].Id==t.Id&&n.AvailableIntendancyListItems.splice(i,1)})};n.btnIntendancyUp=function(){for(var t,r,u,f=n.SelectedSelectedIntendancyListItems,i=0;i<n.SelectedSelectedIntendancyListItems.length;i++){if(t=n.SelectedIntendancyListItems.indexOf(n.SelectedSelectedIntendancyListItems[i]),t<=0||t>=n.SelectedIntendancyListItems.length)return;r=n.SelectedIntendancyListItems[t];u=n.SelectedIntendancyListItems[t-1];n.SelectedIntendancyListItems[t-1]=r;n.SelectedIntendancyListItems[t]=u}};n.btnIntendancyDown=function(){for(var t,r,u,i=n.SelectedSelectedIntendancyListItems.length-1;i>=0;i--){if(t=n.SelectedIntendancyListItems.indexOf(n.SelectedSelectedIntendancyListItems[i]),t<0||t>=n.SelectedIntendancyListItems.length-1)return;r=n.SelectedIntendancyListItems[t];u=n.SelectedIntendancyListItems[t+1];n.SelectedIntendancyListItems[t+1]=r;n.SelectedIntendancyListItems[t]=u}};n.btnIntendancyRight=function(){n.checkRegions();n.canInsertRegions&&(angular.forEach(n.SelectedAvailIntendancyItems,function(n){this.push(n)},n.SelectedIntendancyListItems),angular.forEach(n.SelectedAvailIntendancyItems,function(t){for(var i=n.AvailableIntendancyListItems.length-1;i>=0;i--)n.AvailableIntendancyListItems[i].Id==t.Id&&n.AvailableIntendancyListItems.splice(i,1)}),n.SelectedAvailIntendancyItems=[],n.SelectedSelectedIntendancyListItems=[])};n.checkRegions=function(){var t=2;n.canInsertRegions=!0;n.SelectedIntendancyListItems.length+n.SelectedAvailIntendancyItems.length>t&&(s.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών","Δεν μπορείτε να επιλέξετε περισσότερες από "+t+" διευθύνσεις"),n.canInsertRegions=!1)};n.btnIntendancyLeft=function(){angular.forEach(n.SelectedSelectedIntendancyListItems,function(n){this.push(n)},n.AvailableIntendancyListItems);angular.forEach(n.SelectedSelectedIntendancyListItems,function(t){for(var i=n.SelectedIntendancyListItems.length-1;i>=0;i--)n.SelectedIntendancyListItems[i].Id==t.Id&&n.SelectedIntendancyListItems.splice(i,1)});n.SelectedSelectedIntendancyListItems=[];n.SelectedAvailIntendancyItems=[]};n.goToSelectionCriteria=function(){u.scrollTo(0,0);var t={Intendancy:n.intendancy,RegionAndUnit:n.SelectedIntendancyListItems,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,IsFromInsert:n.IsFromInsert};$("#IntendancyStep1").valid()&&(n.DisableSave=!0,y(),n.intendancy.Id!=null&&n.intendancy.Id!=""&&n.intendancy.Id!="undefined"?(n.intendancy.ModifiedBy=n.authentication.userName,a.postByParams(t,"/api/Intendancy/updateIntendancy").then(function(){p();n.personalStep=!1;n.selectionCriteriaStep=!0;n.scientificQualificationsStep=!1;n.administrationExperienceStep=!1;b()}).catch(function(n){s.pop("error","Παρουσιάστηκε σφάλμα",n.data)})):(n.intendancy.DidacticYearId=n.didacticYear.Id,n.intendancy.CreatedBy=n.authentication.userName,n.intendancy.CreatedUserRole=n.authentication.role,n.intendancy.CreatedRegionAndUnitDescription=n.authentication.unitName,a.postByParams(t,"/api/Intendancy/insertApplIntendancy").then(function(t){n.intendancy.Id=t.Id;n.intendancy.CreationDate=t.CreationDate;n.intendancy.IsActive=t.IsActive;p();n.personalStep=!1;n.selectionCriteriaStep=!0;n.scientificQualificationsStep=!1;n.administrationExperienceStep=!1;n.ShowselectionCriteriaTable.BeforeNomination=i("filter")(n.personServices,{BeforeNomination:1},!0).length>0?!0:!1;n.ShowselectionCriteriaTable.AfterNomination=i("filter")(n.personServices,{BeforeNomination:2},!0).length>0?!0:!1}).catch(function(n){s.pop("error","Παρουσιάστηκε σφάλμα",n.data)})))};n.goToPersonal=function(){n.personalStep=!0;n.selectionCriteriaStep=!1;n.scientificQualificationsStep=!1;n.administrationExperienceStep=!1;n.DisableSave=!1;u.scrollTo(0,0)};n.goToSelectionSrvs=function(){p();n.personalStep=!1;n.selectionCriteriaStep=!0;n.scientificQualificationsStep=!1;n.administrationExperienceStep=!1;u.scrollTo(0,0)};n.goToScientific=function(){n.personalStep=!1;n.selectionCriteriaStep=!1;n.scientificQualificationsStep=!0;n.administrationExperienceStep=!1;u.scrollTo(0,0)};n.goToExperiences=function(){n.personalStep=!1;n.selectionCriteriaStep=!1;n.scientificQualificationsStep=!1;n.administrationExperienceStep=!0;u.scrollTo(0,0)};n.goToScientificQualifications=function(){u.scrollTo(0,0);n.showAlertRegions=a.isEmpty(n.SelectedIntendancyListItems)?!0:!1;var t={Intendancy:n.intendancy,RegionAndUnit:n.SelectedIntendancyListItems,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,IsFromInsert:n.IsFromInsert};$("#IntendancyStep2").valid()&&!n.showAlertRegions&&(n.intendancy.ModifiedBy=n.authentication.userName,a.postByParams(t,"/api/Intendancy/updateIntendancy").then(function(){n.personalStep=!1;n.selectionCriteriaStep=!1;n.scientificQualificationsStep=!0;n.administrationExperienceStep=!1;g();nt()}).catch(function(n){s.pop("error","Παρουσιάστηκε σφάλμα",n.data)}))};n.goToAdministrationExperience=function(){n.intendancy.FirstLanguageId&&!n.intendancy.FirstLanguageLevel||n.intendancy.SecondLanguageId&&!n.intendancy.SecondLanguageLevel?(n.showAlertLanguagesLevel=!0,n.alertLanguagesLevel=[{type:"danger",msg:"Θα πρέπει να συμπληρώσετε και το επίπεδο γνώσης ξένης γλώσσας"}]):n.intendancy.SecondLanguageId&&!n.intendancy.FirstLanguageId?(n.showAlertLanguagesLevel=!0,n.alertLanguagesLevel=[{type:"danger",msg:"Δεν έχετε συμπληρώσει την 1η ξένη γλώσσα για να μπορέσετε να συμπληρώσετε και τη 2η ξένη γλώσσα"}]):(n.showAlertLanguagesLevel=!1,n.alertLanguagesLevel="");u.scrollTo(0,0);var t={Intendancy:n.intendancy,RegionAndUnit:n.SelectedIntendancyListItems,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,IsFromInsert:n.IsFromInsert};!$("#IntendancyStep3").valid()||n.showAlertLanguagesLevel||n.showAlertLanguages||n.showAlertLanguagesLevelSelection||n.showAlertPostgraduate||(n.intendancy.ModifiedBy=n.authentication.userName,a.postByParams(t,"/api/Intendancy/updateIntendancy").then(function(){n.personalStep=!1;n.selectionCriteriaStep=!1;n.scientificQualificationsStep=!1;n.administrationExperienceStep=!0;tt();ut()}).catch(function(n){s.pop("error","Παρουσιάστηκε σφάλμα",n.data)}))};n.saveAction=function(i){var f,h;u.scrollTo(0,0);f={Intendancy:n.intendancy,RegionAndUnit:n.SelectedIntendancyListItems,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,IsFromInsert:n.IsFromInsert,Status:i};$("#IntendancyStep4").valid()&&(i=="final"?(h=t.open({templateUrl:"ModalContent.html",controller:OpenModalController}),h.result.then(function(t){t&&a.postByParams(f,"/api/Intendancy/updateIntendancy").then(function(){e.setPersonId(n.intendancy.PersonId);a.isValueInArray(n.pageRules.intendancy.CanAccess,"u1, u2, c")?o.go("history"):o.go("showapplicationperintendancy")}).catch(function(n){s.pop("error","Παρουσιάστηκε σφάλμα",n.data)})},function(){r.info("Modal dismissed at: "+new Date)})):a.postByParams(f,"/api/Intendancy/updateIntendancy").then(function(){e.setPersonId(n.intendancy.PersonId);a.isValueInArray(n.pageRules.intendancy.CanAccess,"u1, u2, c")?o.go("history"):o.go("showapplicationperintendancy")}).catch(function(n){s.pop("error","Παρουσιάστηκε σφάλμα",n.data)}),n.personalStep=!1,n.selectionCriteriaStep=!1,n.scientificQualificationsStep=!1,n.administrationExperienceStep=!1)};n.fillFormControls=function(t){t=="Srv"?(n.ModalTitle="Προσθήκη Υπηρέτησης",n.intendancySrv={},n.SaveEduTechSrvDisabled=!1,n.showAlertCanInsertDates=!1,n.alertCanInsertDates="",n.showAlertServices=!1,n.alertServices="",n.showAlertBeforeNomination=!1,n.alertBeforeNomination=""):t=="Exp"?(n.ModalTitle="Προσθήκη Διοικητικής Εμπειρίας",n.intendancyExp={},n.SaveExperienceDisabled=!1,n.showAlertCanInsertDates=!1,n.alertCanInsertDates=""):t=="HoursSrv"&&(n.ModalTitle="Προσθήκη Υπηρέτησης Ωρομισθίου",n.intendancyHoursSrv={},n.SaveEduTechHoursSrvDisabled=!1,n.showAlertHoursServices=!1,n.alertHoursServices="",n.showAlertHours=!1,n.alertHours="")};n.openServiceModal=function(t){blockUI({target:"#tblService",animate:!0});angular.copy(t,n.intendancySrv);n.ModalTitle="Επεξεργασία Υπηρέτησης";n.SaveEduTechSrvDisabled=!1;n.showAlertCanInsertDates=!1;n.alertCanInsertDates="";n.showAlertServices=!1;n.alertServices="";n.showAlertBeforeNomination=!1;n.alertBeforeNomination="";v(function(){unblockUI("#tblService");$("#AddServiceModal").modal("show")},300)};n.openHoursServiceModal=function(t){blockUI({target:"#tblhoursService",animate:!0});angular.copy(t,n.intendancyHoursSrv);n.ModalTitle="Επεξεργασία Υπηρέτησης Ωρομισθίου";n.SaveEduTechHoursSrvDisabled=!1;n.showAlertHoursServices=!1;n.alertHoursServices="";n.showAlertHours=!1;n.alertHours="";v(function(){unblockUI("#tblhoursService");$("#AddHoursServiceModal").modal("show")},300)};n.openExperienceModal=function(t){blockUI({target:"#tblExperience",animate:!0});angular.copy(t,n.intendancyExp);n.ModalTitle="Επεξεργασία Διοικητικής Εμπειρίας";n.SaveExperienceDisabled=!1;n.showAlertCanInsertDates=!1;n.alertCanInsertDates="";v(function(){unblockUI("#tblExperience");$("#AddExperienceModal").modal("show")},300)};n.DeleteActionSrv=function(t){var i=t;i.ModifiedBy=n.authentication.userName;i.ModifiedUserRole=n.authentication.role;i.ModifiedRegionAndUnitDescription=n.authentication.unitName;a.postByParams(i,"/api/Intendancy/DeleteIntendancyEduTeachSrv").then(function(t){n.personServices=t.IntendancyEduTeachList;n.DisabledFek=n.personServices.length>0?!0:!1;n.intendancy.EducationalYears=t.Educational.Years;n.intendancy.EducationalMonths=t.Educational.Months;n.intendancy.EducationalDays=t.Educational.Days;n.intendancy.DidacticSchoolYears=t.TeachingSchool.Years;n.intendancy.DidacticSchoolMonths=t.TeachingSchool.Months;n.intendancy.DidacticSchoolDays=t.TeachingSchool.Days;n.intendancy.DidacticOtherYears=t.TeachingOther.Years;n.intendancy.DidacticOtherMonths=t.TeachingOther.Months;n.intendancy.DidacticOtherDays=t.TeachingOther.Days;n.intendancy.DidacticSchoolYearsForPoints=t.TeachingSchoolForPoints.Years;n.intendancy.DidacticSchoolMonthsForPoints=t.TeachingSchoolForPoints.Months;n.intendancy.DidacticSchoolDaysForPoints=t.TeachingSchoolForPoints.Days;n.intendancy.DidacticOtherYearsForPoints=t.TeachingOtherForPoints.Years;n.intendancy.DidacticOtherMonthsForPoints=t.TeachingOtherForPoints.Months;n.intendancy.DidacticOtherDaysForPoints=t.TeachingOtherForPoints.Days},function(n){s.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.DeleteActionHoursSrv=function(t){var i=t;i.ModifiedBy=n.authentication.userName;i.ModifiedUserRole=n.authentication.role;i.ModifiedRegionAndUnitDescription=n.authentication.unitName;a.postByParams(i,"/api/Intendancy/DeleteIntendancyHoursEduTeachSrv").then(function(t){n.personHoursServices=t.IntendancyHoursEduTeachList;n.intendancy.EducationalYears=t.Educational.Years;n.intendancy.EducationalMonths=t.Educational.Months;n.intendancy.EducationalDays=t.Educational.Days;n.intendancy.DidacticSchoolYears=t.TeachingSchool.Years;n.intendancy.DidacticSchoolMonths=t.TeachingSchool.Months;n.intendancy.DidacticSchoolDays=t.TeachingSchool.Days;n.intendancy.DidacticOtherYears=t.TeachingOther.Years;n.intendancy.DidacticOtherMonths=t.TeachingOther.Months;n.intendancy.DidacticOtherDays=t.TeachingOther.Days;n.intendancy.DidacticSchoolYearsForPoints=t.TeachingSchoolForPoints.Years;n.intendancy.DidacticSchoolMonthsForPoints=t.TeachingSchoolForPoints.Months;n.intendancy.DidacticSchoolDaysForPoints=t.TeachingSchoolForPoints.Days;n.intendancy.DidacticOtherYearsForPoints=t.TeachingOtherForPoints.Years;n.intendancy.DidacticOtherMonthsForPoints=t.TeachingOtherForPoints.Months;n.intendancy.DidacticOtherDaysForPoints=t.TeachingOtherForPoints.Days},function(n){s.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.openModalSrv=function(t){n.delPerService=t};n.DeleteActionExp=function(t){var i=t;i.ModifiedBy=n.authentication.userName;i.ModifiedUserRole=n.authentication.role;i.ModifiedRegionAndUnitDescription=n.authentication.unitName;a.postByParams(i,"/api/Intendancy/DeleteAdministrationExperience").then(function(){n.personExperiences.splice(n.personExperiences.indexOf(t),1)},function(n){s.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.openModalExp=function(t){n.delPerExperience=t};n.minDate="01/01/1900";n.maxDate=new Date;n.formats=["dd/MM/yyyy"];n.format=n.formats[0];n.clear=function(){n.dt=null};n.toggleMin=function(){n.minDate=n.minDate?null:new Date};n.toggleMin();n.open=function(t,i){t.preventDefault();t.stopPropagation();n[i]=!0};n.status={opened:!1};n.openDatetimePicker=function(){n.status.opened=!0;n.status.opened1=!0};n.dateOptions={formatYear:"yy",startingDay:1,format:"dd/mm/yyyy"}};IntendancyController.$inject=["$scope","$uibModal","$filter","$log","$window","$q","PassParameters","$state","toaster","PersonFactory","ApplicationTypeRegionAndUnitFactory","ApplicationTypeFekFactory","GeneralFactory","$timeout"];Globalize.culture("el");IntendancyInterviewPointsController=function(n,t,i,r,u){if(n.authentication.isAuth)if(i.isValueInArray(i.getRoleCode(n.authentication.role),"c1, c2")){var f="intendancy";i.getByParams({role:n.authentication.role,codes:f},"/api/Subsystem/NewCheckPermission").then(function(t){var i=f.split(",");for(var r in i)n.pageRules[i[r]]=u("filter")(t,{Code:i[r]},!0)[0].Rules},function(){unblockUI("#divBlockUI");t.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else r.go("forbidden");else r.go("/");n.pageRules={};n.filteredNews=[];n.viewby=15;n.currentPage=4;n.itemsPerPage=n.viewby;n.maxSize=5;n.disableButton=!1;n.READ=function(){var r,t,i;n.data=[];n.item={RegistryNo:"",InterviewPoints:""};r=/^([a-zA-Z0-9\s_\\.\-:])+(.xlsx|.xls)$/;t=!1;$("#ngexcelfile").val().toLowerCase().indexOf(".xlsx")>0&&(t=!0);i=new FileReader;i.onload=function(i){var f="",e,o,r,u,s,h;for(i.target.result,e=new Uint8Array(i.target.result),o=e.byteLength,r=0;r<o;r++)f+=String.fromCharCode(e[r]);u=t?XLSX.read(f,{type:"binary"}):XLS.read(f,{type:"binary"});s=u.SheetNames;h=0;s.forEach(function(i){var r,e,o,f;if(r=t?XLSX.utils.sheet_to_json(u.Sheets[i]):XLS.utils.sheet_to_row_object_array(u.Sheets[i]),n.IsNumber=!0,e=angular.isNumber(9,9),o=angular.isNumber(9.9),r.length>0)for(f=0;f<r.length;f++){if(!angular.isNumber(parseFloat(r[f].InterviewPoints))){n.IsNumber=!1;break}n.item={RegistryNo:r[f].RegistryNo,InterviewPoints:parseFloat(r[f].InterviewPoints.toString().replace(",","."))};n.data.push(n.item);n.$apply()}})};t?i.readAsArrayBuffer($("#ngexcelfile")[0].files[0]):i.readAsBinaryString($("#ngexcelfile")[0].files[0])};n.save=function(){var r={ExcelParamsList:n.data,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName},u=r;n.disableButton=!0;n.IsNumber?i.postByParams(u,"/api/Intendancy/UpdateInterviewPoints").then(function(){n.data=[];t.pop("success","Επιτυχής αποθήκευση","Η ενημέρωση των μονάδων προσωπικότητας - γενικής συγκρότησης πραγματοποιήθηκε με επιτυχία",3e3,"trustedHtml");n.disableButton=!1},function(i){t.pop("error"," Παρουσιάστηκε σφάλμα",i.data,5e3,"trustedHtml");n.disableButton=!1}):(t.pop("error"," Παρουσιάστηκε σφάλμα","Παρακαλώ να κάνετε έλεγχο στη στήλη με τα μόρια καθώς δεν αναγνωρίζονται ως αριθμοί",5e3,"trustedHtml"),n.disableButton=!1)};n.setPage=function(t){n.currentPage=t};n.setItemsPerPage=function(t){n.itemsPerPage=t;n.currentPage=1}};IntendancyInterviewPointsController.$inject=["$scope","toaster","GeneralFactory","$state","$filter"];LandingPageController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y){function p(){var t=!1;u.getByParams({userId:n.authentication.userId,role:n.authentication.role},"/api/Account/LogOutBecauseNotHaveRole").then(function(i){t=i;t&&n.logOut()},function(){n.logOut()});h.warning&&(h.warning.close(),h.warning=null);h.timedout&&(h.timedout.close(),h.timedout=null)}n.personAttributesForMenu={};n.appVersion={Version:"0",Revision:"",DeployDate:"",DeployTime:""};n.logOut=function(){i.logOut();h.stop();h.SearchFilters=null;t.go("/")};n.isValueInArray=function(n,t){return t.indexOf(n)!==-1?!0:!1};n.isEmpty=function(n){return typeof n!="undefined"&&n!=undefined&&n!=null&&n.length>0?!1:!0};n.isEmptyValue=function(n){return typeof n!="undefined"&&n!=null&&n!=""?!1:!0};n.getRoleCode=function(n){switch(n){case"Χρήστης":return"u1";case"Εκπαιδευτικός":return"u2";case"Χρήστης Διεύθυνσης Α/θμιας":return"d1";case"Χρήστης Διεύθυνσης Β/θμιας":return"d2";case"Χρήστης Περιφέρειας":return"p";case"Χρήστης Υπουργείου Α/θμιας":return"m1";case"Χρήστης Υπουργείου Β/θμιας":return"m2";case"Διαχειριστής":return"a";case"Χρήστης ΑΣΕΠ":return"s";case"Χρήστης Συμβουλίου":return"c";case"Χρήστης Συμβουλίου Α/θμιας":return"c1";case"Χρήστης Συμβουλίου Β/θμιας":return"c2";case"Χρήστης Κεντρικής Υπηρεσίας Υπουργείου":return"mk";default:return""}};n.authentication=i.authentication;n.resetPerson=function(){c.resetPerson();t.go("showChangeDataRequest",{},{reload:!0},{location:"replace"})};n.personApplication=function(n){c.setApplicationLevelId(0);switch(n){case"substitute":t.go("substitute",{},{reload:!0},{location:"replace"});break;case"hourlyteacher":t.go("hourlyteacher",{},{reload:!0},{location:"replace"});break;case"substitutesmea":t.go("substitutesmea",{},{reload:!0},{location:"replace"});break;case"hourlyteachersmea":t.go("hourlyteachersmea",{},{reload:!0},{location:"replace"});break;case"substitutemusic":t.go("substitutemusic",{},{reload:!0},{location:"replace"});break;case"hourlyteachermusic":t.go("hourlyteachermusic",{},{reload:!0},{location:"replace"});break;case"remediation":t.go("remediation",{},{reload:!0},{location:"replace"});break;case"remediationSMEA":t.go("remediationSMEA",{},{reload:!0},{location:"replace"});break;case"remediationMusic":t.go("remediationMusic",{},{reload:!0},{location:"replace"});break;case"substituteEEPEBP":t.go("substituteEEPEBP",{},{reload:!0},{location:"replace"});break;case"hourlyteachermusicforEM16":t.go("hourlyteachermusicforEM16",{},{reload:!0},{location:"replace"});break;case"permanentEEPEBP":t.go("permanentEEPEBP",{},{reload:!0},{location:"replace"});break;case"permanentSMEA":t.go("permanentSMEA",{},{reload:!0},{location:"replace"});break;case"permanent":t.go("permanent",{},{reload:!0},{location:"replace"});break;case"permanentMusic":t.go("permanentMusic",{},{reload:!0},{location:"replace"});break;case"substitute3months":t.go("substitute3months",{},{reload:!0},{location:"replace"});break;case"substituteSMEA3months":t.go("substituteSMEA3months",{},{reload:!0},{location:"replace"});break;case"substituteMusic3months":t.go("substituteMusic3months",{},{reload:!0},{location:"replace"});break;case"substituteEEPEBP3months":t.go("substituteEEPEBP3months",{},{reload:!0},{location:"replace"});break;case"substituteForSchool":t.go("substituteForSchool",{},{reload:!0},{location:"replace"});break;case"substituteEEPEBPForSchool":t.go("substituteEEPEBPForSchool",{},{reload:!0},{location:"replace"});break;case"substituteSMEAForSchool":t.go("substituteSMEAForSchool",{},{reload:!0},{location:"replace"});break;case"substitutePE8702School":t.go("substitutePE8702School",{},{reload:!0},{location:"replace"});break;case"substituteTE0130School":t.go("substituteTE0130School",{},{reload:!0},{location:"replace"});break;case"substitutePlacementSchool":t.go("substitutePlacementSchool",{},{reload:!0},{location:"replace"})}};n.$on("$viewContentLoaded",function(){OpsydCoreJS.initAjax()});n.remainTime=0;n.refreshTokenCheck=function(t){test=0;var i=a(function(){var u=v.get("authorizationData");if(u){var e=moment(u.expiration),o=moment(),i=e.diff(o,"seconds"),f=60,s=t,r=i/s*100,h="linear-gradient(180deg, #4DB3A2 "+r+"%, #4DB3A2 "+r+"%, #F3565D  "+r+"%, #F3565D 100%)";$("#refresh-token-clock").css({background:h,"-webkit-background-clip":"text",display:"initial"});n.remainTime=i;i<f?($("#modalOpenRefreshTokenController").data("bs.modal")||{}).isShown||$("#modalOpenRefreshTokenController").modal("show"):($("#modalOpenRefreshTokenController").data("bs.modal")||{}).isShown&&$("#modalOpenRefreshTokenController").modal("hide");i<f-30&&($("#modalOpenRefreshTokenController").modal("hide"),n.RefreshTokenCancel())}else($("#modalOpenRefreshTokenController").data("bs.modal")||{}).isShown&&($("#modalOpenRefreshTokenController").modal("hide"),n.RefreshTokenCancel())},1e3)};n.refreshTokenCheckInitial=function(){u.getByAll("api/LandingPage/getAccessTokenExpireTime").then(function(t){n.refreshTokenCheck(t)},function(){f.pop("warning"," Παρουσιάστηκε σφάλμα","Υπήρξε πρόβλημα κατά την φόρτωση του διδακτικού έτους")})};n.refreshTokenCheckInitial();n.RefreshTokenContinue=function(){var n=y.get("AuthService");n.refreshToken().then(function(){f.pop("success"," Ανανέωση χρόνου","Η σύνδεσή σας ανανεώθηκε!")},function(){n.logOut()})};n.RefreshTokenCancel=function(){n.logOut()};u.getByAll("api/LandingPage/getCurrentDidacticYear").then(function(t){n.didacticYear=t},function(){f.pop("warning"," Παρουσιάστηκε σφάλμα","Υπήρξε πρόβλημα κατά την φόρτωση του διδακτικού έτους")});u.getByAll("api/LandingPage/getApplicationDidacticYear").then(function(t){n.applicationDidacticYear=t},function(){f.pop("warning"," Παρουσιάστηκε σφάλμα","Υπήρξε πρόβλημα κατά την φόρτωση του διδακτικού έτους των αιτήσεων")});u.getByAll("api/General/getAppVersion").then(function(t){n.appVersion=t},function(){f.pop("warning"," Παρουσιάστηκε σφάλμα","Υπήρξε πρόβλημα κατά την φόρτωση της έκδοσης")});n.isPermanentHasEEPEBPMain=!1;n.checkIsPermanentHasEEPEBPMain=function(){n.isPermanentHasEEPEBPMain=!1;n.authentication.isPermanent=="True"&&u.getByParams({Id:n.authentication.personId},"/api/PersonSpeciality/isPermanentHasEEPEBPMainByPersonId").then(function(t){n.isPermanentHasEEPEBPMain=u.isEmptyValue(t)?!1:!0},function(){f.pop("warning"," Παρουσιάστηκε σφάλμα","Υπήρξε πρόβλημα κατά την φόρτωση της έκδοσης")})};n.checkIsPermanentHasEEPEBPMain();h.started=!1;h.$on("IdleStart",function(){p();h.warning=s.open({templateUrl:"autologout-warning-dialog",windowClass:"modal-danger"})});h.$on("IdleEnd",function(){p()});h.$on("IdleTimeout",function(){i.logOut();e.unwatch();h.started=!1;t.go("/");try{p()}catch(n){console.log("Got an error!",n)}h.timedout=s.open({templateUrl:"autologout-timedout-dialog",windowClass:"modal-danger"})});h.start=function(){p();e.watch();h.started=!0};h.stop=function(){p();e.unwatch();h.started=!1};h.dismissAutoLogout=function(){p()}};LandingPageController.$inject=["$scope","$state","AuthService","LandingPageFactory","GeneralFactory","toaster","Idle","Keepalive","$uibModal","$rootScope","PassParameters","$location","$interval","localStorageService","$injector"];LoginController=function(n,t,i){n.authentication.isAuth&&t.path("/");n.loginData={userName:"",password:"",role:"",useRefreshTokens:!0,selectRole:!1};n.message="";n.jsonData=[];n.login=function(){n.message="";i.login(n.loginData).then(function(){t.path("/")},function(t){t.error=="MultipleRoles"?(n.jsonData=angular.fromJson(t.error_description),n.loginData.selectRole=!0):n.message=t.error_description})}};LoginController.$inject=["$scope","$location","AuthService","ngAuthSettings"];ManagmentStatusSecondmentApplications=function(n,t,i,r,u,f,e,o,s){n.SecondnmentApplicationList={};n.SecondnmentApplicationId=0;n.SecondnmentApplicationTableList={};n.ApplicationIdsList=[];n.amtextarealist="";n.amList={};n.showFrontEnd=!1;n.showDetailsTable=!1;n.showFinalSubmit=!1;n.CanChangeTemp=!1;n.CanChangePermanent=!1;n.SubmitResponse="";n.SecondnmentApplicationAction="";s.getByParams({type:"secondment"},"/api/ApplicationType/getApplicationByType").then(function(t){n.SecondnmentApplicationList=t;n.showFrontEnd=!1},function(n){o.pop("error","Δεν φορτώθηκαν οι Αιτήσεις",n.data)});n.SecondnmentTypeChange=function(){console.log(n.SecondnmentApplicationId)};n.amListChange=function(){n.amList=f("filter")(n.amtextarealist.split(/\r?\n/),function(n){return n.trim()!=""})};n.getSecondmentApplications=function(){s.postByParams({AMs:n.amList,ApplicationTypeId:n.SecondnmentApplicationId},"/api/Management/getApplicationsByAMs").then(function(t){n.SecondnmentApplicationTableList=t;n.showDetailsTable=!0;n.showFinalSubmit=!0;var i=n.SecondnmentApplicationTableList[0].applicationIsActive,r=n.SecondnmentApplicationTableList[0].historyIsActive;n.CanChangeTemp=!0;n.CanChangePermanent=!0;n.CurrentTempStatus=i;n.CurrentPermanentStatus=r;n.ApplicationIdsList=[];angular.forEach(n.SecondnmentApplicationTableList,function(t){n.CanChangeTemp==!0&&i!=t.applicationIsActive&&(n.CanChangeTemp=!1);n.CanChangePermanent==!0&&r!=t.historyIsActive&&(n.CanChangePermanent=!1);n.ApplicationIdsList.push(t.applicationId)})},function(t){n.showDetailsTable=!1;n.showFinalSubmit=!0;o.pop("error","Δεν φορτώθηκαν οι Αιτήσεις",t.data)})};n.submitChanges=function(){var i=t.open({templateUrl:"ModalContent.html",controller:OpenModalController});i.result.then(function(){var t={ApplIds:n.ApplicationIdsList,ApplicationTypeId:n.SecondnmentApplicationId,Action:n.SecondnmentApplicationAction,Role:n.authentication.role,Unitname:n.authentication.unitName};s.postByParams(t,"/api/Management/updateSecondmentMassStatus").then(function(t){n.SubmitResponse=t;n.getSecondmentApplications()},function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)})},function(){$log.info("Modal dismissed at: "+new Date)})}};ManagmentStatusSecondmentApplications.$inject=["$scope","$uibModal","$q","$compile","PassParameters","$filter","$state","toaster","GeneralFactory","DTOptionsBuilder","DTColumnBuilder","AuthService"];ManagmentUserAction=function(n,t,i,r,u,f,e,o,s,h){function a(t){i(angular.element(t).contents())(n)}function v(t){return n.paramsForDataTable[c]=t,stringButtons="",t.EmailConfirmedString=="Ανενεργός"&&(stringButtons='<button type="button" class="btn btn-primary btn-xs" uib-tooltip="Ενεργοποίηση" data-toggle="modal" data-target="#useractivateModal" ng-click="openModal(paramsForDataTable['+c+'])"><i class="fa fa-check"><\/i><\/button>'),stringButtons=stringButtons+'<button type="button" class="btn btn-success btn-xs" uib-tooltip="Αλλαγή Email" data-toggle="modal" data-target="#userModal" ng-click="openModal(paramsForDataTable['+c+'])"><i class="fa fa-envelope"><\/i><\/button> <\/div>',stringButtons=stringButtons+'<button type="button" class="btn btn-danger btn-xs" uib-tooltip="Διαγραφή λογαριασμού" data-toggle="modal" data-target="#userdeleteModal" ng-click="openModal(paramsForDataTable['+c+'])"><i class="fa fa-times"><\/i><\/button> <\/div>',c=c+1,stringButtons}var c,l;n.authentication.isAuth?n.authentication.isAuth&&!o.isValueInArray(o.getRoleCode(n.authentication.role),"a")&&f.go("forbidden"):f.go("/");n.searchuser={TaxNumber:"",Email:"",EmailConfirmed:!1,RegistryNo:"",UserName:""};n.dtInstance={};n.paramsForDataTable=[];n.dtOptions=s.newOptions().withPaginationType("full_numbers").withOption("order",[2,"desc"]).withOption("createdRow",a);n.dtColumns=[h.newColumn("UserId").withTitle("UserId").notVisible(),h.newColumn("PersonId").withTitle("PersonId").notVisible(),h.newColumn("Email").withTitle("Email"),h.newColumn("EmailConfirmedString").withTitle("Κατάσταση Λογαριασμού").withClass("text-center"),h.newColumn("UserName").withTitle("Όνομα Χρήστη"),h.newColumn("Lastname").withTitle("Επώνυμο"),h.newColumn("Firstname").withTitle("Όνομα"),h.newColumn("FatherFirstname").withTitle("Πατρώνυμο"),h.newColumn("TaxNumber").withTitle("Α.Φ.Μ."),h.newColumn("RegistryNo").withTitle("Α.Μ."),h.newColumn("Telephone").withTitle("Τηλέφωνο"),h.newColumn("TelephoneMobile").withTitle("Κινητό"),h.newColumn("CreateDate").withTitle("Ημ/νια Εγγραφής"),h.newColumn(null).withTitle("Ενέργειες").notSortable().renderWith(v).withClass("text-center dataTables_Actions_150")];c=0;l=function(){o.getByParams(n.searchuser,"/api/Management/getUsers").then(function(t){n.dtOptions.data=t},function(n){e.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.searchAction=function(){n.dtInstance.changeData(l());var t=n.searchuser};n.enableAccount=function(t){o.getByParams({UserId:t.UserId,Confirmed:!0},"/api/Account/SetEmailConfirmedAsync").then(function(t){t==""?(e.pop("success"," Ενεργοποίηση Λογαριασμού","Ο λογαριασμός ενεργοποιήθηκε με επιτυχία!"),n.searchAction()):e.pop("warning"," Παρουσιάστηκε σφάλμα",t)},function(){e.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την ενεργοποίηση του λογαριασμού.")})};n.deleteAccount=function(t){o.getByParams({UserId:t.UserId,PersonId:t.PersonId},"/api/Account/DeleteRegistrationAsync").then(function(t){t==""?(e.pop("success"," Διαγραφή Λογαριασμού","Ο λογαριασμός διαγράφηκε με επιτυχία!"),n.searchAction()):e.pop("warning"," Παρουσιάστηκε σφάλμα",t)},function(){e.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη διαγραφή του λογαριασμού.")})};n.changeAccount=function(t){o.getByParams({UserId:t.UserId,PersonId:t.PersonId,NewEmail:t.NewEmail},"/api/Account/ChangeEmailAsync").then(function(t){t==""?(e.pop("success"," Αλλαγή Email","To Email άλλαξε με επιτυχία!"),n.searchAction()):e.pop("warning"," Παρουσιάστηκε σφάλμα",t)},function(){e.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την αλλαγή του Email.")})};n.openModal=function(t){n.account=t}};ManagmentUserAction.$inject=["$scope","$q","$compile","PassParameters","$filter","$state","toaster","GeneralFactory","DTOptionsBuilder","DTColumnBuilder","AuthService"];OnlineController=function(n,t,i,r,u,f){n.authentication.isAuth||i.go("/");u.isValueInArray(u.getRoleCode(n.authentication.role),"u1, u2, p")&&i.go("forbidden");n.test1=!1;n.showAlert=!1;n.smeaType=[{Id:1,Description:"ΕΙΔΙΚΗΣ ΑΓΩΓΗΣ"},{Id:2,Description:"BRAILLE"},{Id:3,Description:"ΝΟΗΜΑΤΙΚΗ"}];n.DisplayOptions={TypeNo:0,ActionNo:0};n.Choices={Recruitment:{selected:""},Action:{selected:""}};n.StatusAll=[{Id:1,Description:"Διαθέσιμος"},{Id:2,Description:"Υπό Πρόσληψη"},{Id:3,Description:"Προσήλθε"},{Id:4,Description:"Δεν Προσήλθε"},{Id:5,Description:"Απόλυση"}];n.Status=[];n.StatusAction4=f("filter")(n.StatusAll,function(n){return n.Id!=1});n.Recruitments=u.isValueInArray(u.getRoleCode(n.authentication.role),"d1, m1")?[{Id:1,Description:"Ωρομίσθιων"},{Id:2,Description:"Ωρομίσθιων ΣΜΕΑ"}]:[{Id:3,Description:"Ωρομίσθιων Μουσικών"},{Id:2,Description:"Ωρομίσθιων ΣΜΕΑ"},{Id:1,Description:"Ωρομίσθιων"}];n.ActionsAll=[{Id:1,Description:"Δέσμευση ωρών"},{Id:2,Description:"Προσλήψεις"},{Id:3,Description:"Απολύσεις"},{Id:4,Description:"Κατάσταση Προσλήψεων"},{Id:5,Description:"Αναζήτηση βάσει ΑΦΜ"}];n.Actions=[];n.Actions=u.isValueInArray(u.getRoleCode(n.authentication.role),"a, m2")?f("filter")(n.ActionsAll,function(n){return n.Id!=3}):n.ActionsAll;n.recruitments1=[];n.recruitments2=[];n.recruitments3=[];n.recruitments4=[];n.recruitments5=[];n.regions=[];n.Region={selected:""};n.specialityGroups=[];n.specialitySMEAGroups=[];n.selsmeaType=[];n.SpecialityGroup={selected:""};n.WrkNo="";n.MusicSchools=[];n.MusicSchool={selected:""};n.MusicSpecialists=[];n.MusicSpecialist={selected:""};n.MusicWrkNo="";n.OnlineCreditsNo=0;n.OnlineRecruitmentNo=0;n.DiffRecruitmentDate=0;n.OnlineCreditMaxPerson="";n.PendingRecruitments=!1;n.SumCredits=0;n.SumInRecruitment=0;n.SumPeople=0;n.searchFilter=!1;n.TaxNumber="";n.TaxNumberValidation=!1;n.ShowSubmit=!1;n.messInfo="";n.ShowTable={Table1:!1,Table2:!1,Table3:!1,Table4:!1,Table1_SMEA:!1,Table2_SMEA:!1,Table3_SMEA:!1,Table4_SMEA:!1,Table1_Music:!1,Table2_Music:!1,Table3_Music:!1,Table4_Music:!1};u.getByParams({parentId:n.authentication.regionAndUnitId,userRole:n.authentication.role},"/api/RegionAndUnit/GetMusicUnitsByDideIdAsync").then(function(t){n.MusicSchools=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε",3e3,"trustedHtml")});u.getByAll("/api/Management/GetMusicSpecialistsWithoutMusicSpecialistAsync").then(function(t){n.MusicSpecialists=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")});u.getByParams({regionAndUnitId:n.authentication.regionAndUnitId,userRole:n.authentication.role,level:n.authentication.levelId},"/api/RegionAndUnit/GetRegionByDideIdAsync").then(function(t){n.regions=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε",3e3,"trustedHtml")});u.getByParams({level:n.authentication.levelId},"/api/Management/GetOnlineSpecialityGroupAsync").then(function(t){n.specialityGroups=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")});u.getByParams({level:n.authentication.levelId},"/api/Management/GetOnlineSMEASpecialityGroupAsync").then(function(t){n.specialitySMEAGroups=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")});n.pendingRecruitment=function(){var t={parentId:n.authentication.regionAndUnitId,userRole:n.authentication.role};n.Choices.Recruitment.selected.Id==1?u.getByParams(t,"api/Online/getPendingRecruitments").then(function(t){n.recruitments2=t;u.isValueInArray(u.getRoleCode(n.authentication.role),"a, m2, m1")?$.each(n.recruitments2,function(n,t){t.MaxHours=t.HoursPerSpecialityHours}):$.each(n.recruitments2,function(t,i){i.MaxHours=Math.min(n.OnlineCreditsNo,i.HoursPerSpecialityHours);i.EditHours=i.InRecruitmentHours>0?i.InRecruitmentHours:null});n.ShowTable.Table2=!0;n.Region.selected="";n.SpecialityGroup.selected="";n.showAlert=!1;n.PendingRecruitments=!0;n.ShowTable.Table1=!1;n.Choices.Action.selected=f("filter")(n.Actions,{Id:2},!0)[0];n.Status=f("filter")(n.StatusAll,function(n){return n.Id!=1&&n.Id!=2&&n.Id!=5})},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")}):u.getByParams(t,"api/Online/getPendingRecruitmentsMusic").then(function(t){n.recruitments2=t;u.isValueInArray(u.getRoleCode(n.authentication.role),"a, m2")?$.each(n.recruitments2,function(n,t){t.MaxHours=t.HoursPerSpecialityHours}):$.each(n.recruitments2,function(t,i){i.MaxHours=Math.min(n.OnlineCreditsNo,i.HoursPerSpecialityHours);i.EditHours=i.InRecruitmentHours>0?i.InRecruitmentHours:null});n.ShowTable.Table2_Music=!0;n.MusicSchool.selected="";n.MusicSpecialist.selected="";n.showAlert=!1;n.PendingRecruitments=!0;n.ShowTable.Table1_Music=!1;n.Choices.Action.selected=f("filter")(n.Actions,{Id:2},!0)[0];n.Status=f("filter")(n.StatusAll,function(n){return n.Id!=1&&n.Id!=2&&n.Id!=5})},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")})};n.HourlyRecruitmentOptions=function(){n.Choices.Recruitment.selected.Id&&n.Choices.Action.selected.Id&&(blockUI({target:"#blockui_portlet",animate:!0}),n.DisplayOptions.TypeNo=n.Choices.Recruitment.selected.Id,n.DisplayOptions.ActionNo=n.Choices.Action.selected.Id,n.levelId=0,n.ShowTable.Table1_Music=!1,n.ShowTable.Table2_Music=!1,n.ShowTable.Table3_Music=!1,n.ShowTable.Table4_Music=!1,n.ShowTable.Table5_Music=!1,n.MusicSchool.selected="",n.MusicSpecialist.selected="",n.MusicWrkNo="",n.ShowTable.Table1=!1,n.ShowTable.Table2=!1,n.ShowTable.Table3=!1,n.ShowTable.Table4=!1,n.ShowTable.Table5=!1,n.Region.selected="",n.SpecialityGroup.selected="",n.WrkNo="",n.showAlert=!1,n.PendingRecruitments=!1,n.exports=[],n.TaxNumber="",n.Choices.Recruitment.selected.Id==1?u.isValueInArray(u.getRoleCode(n.authentication.role),"d2, d1")&&(u.getByParams({regionAndUnitId:n.authentication.regionAndUnitId,onlineTypeId:n.DisplayOptions.TypeNo,levelId:n.levelId},"/api/Online/getCredits").then(function(t){n.OnlineCreditsNo=t[0].CreditHoursOld;n.OnlineCreditMaxPerson=t[0].MaxPerson},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")}),u.getByParams({parentId:n.authentication.regionAndUnitId},"/api/Online/getRecruitments").then(function(t){n.OnlineRecruitmentNo=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")}),u.getByParams({parentId:n.authentication.regionAndUnitId},"/api/Online/getDiffRecruitmentDate").then(function(t){n.DiffRecruitmentDate=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")})):n.Choices.Recruitment.selected.Id==3&&(u.isValueInArray(u.getRoleCode(n.authentication.role),"d2")?(u.getByParams({regionAndUnitId:n.authentication.regionAndUnitId,onlineTypeId:n.DisplayOptions.TypeNo,levelId:n.levelId},"/api/Online/getCredits").then(function(t){n.OnlineCreditsNo=t[0].CreditHoursOld;n.OnlineCreditMaxPerson=t[0].MaxPerson},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")}),u.getByParams({parentId:n.authentication.regionAndUnitId},"/api/Online/getRecruitmentsMusic").then(function(t){n.OnlineRecruitmentNo=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")}),u.getByParams({parentId:n.authentication.regionAndUnitId},"/api/Online/getDiffRecruitmentDateMusic").then(function(t){n.DiffRecruitmentDate=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")})):(n.OnlineCreditsNo=0,n.OnlineCreditMaxPerson=0)),unblockUI("#blockui_portlet"))};n.searchOptions=function(){n.searchFilter=!0};n.checkValidTaxNumber=function(){var u,i,r,t;if(n.TaxNumberValidation=!1,n.TaxNumber!=="000000000"&&n.TaxNumber.match(/^\d{9}$/)){for(i=1,r=0,t=7;t>=0;t--)i*=2,r+=n.TaxNumber.charAt(t)*i;u=r%11%10==n.TaxNumber.charAt(8);n.TaxNumberValidation=u?!1:!0}else n.TaxNumberValidation=!0};n.regionChange=function(){n.selectedRegion=f("filter")(n.regions,{Id:n.Region.selected.Id},!0)[0];n.levelId=n.selectedRegion.LevelId;n.Choices.Recruitment.selected.Id==2?u.getByParams({level:n.levelId},"/api/Management/GetOnlineSMEASpecialityGroupAsync").then(function(t){n.specialitySMEAGroups=t;n.messInfo=u.isEmptyValue(n.specialitySMEAGroups)?"Δεν υπάρχει ενεργοποιημένη ομάδα κλάδου για πρόσληψη ωρομισθίων ΣΜΕΑΕ":""},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")}):u.getByParams({level:n.levelId},"/api/Management/GetOnlineSpecialityGroupAsync").then(function(t){n.specialityGroups=t;n.messInfo=u.isEmptyValue(n.specialityGroups)?"Δεν υπάρχει ενεργοποιημένη ομάδα κλάδου για πρόσληψη ωρομισθίων":""},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")})};n.Action=function(t){var l,h,c,a,o,s,i,e;if(n.Choices.Recruitment.selected.Id&&n.Choices.Action.selected.Id){n.exports=[];switch(n.Choices.Recruitment.selected.Id){case 1:switch(n.Choices.Action.selected.Id){case 1:if(t=="clear")n.ShowTable.Table1=!1,n.Region.selected="",n.SpecialityGroup.selected="",n.WrkNo="",n.showAlert=!1;else if(t=="search")n.Region.selected.Id&&n.SpecialityGroup.selected.Id&&n.WrkNo!=""?(n.showAlert=!1,n.SumCredits=0,n.SumInRecruitment=0,u.isValueInArray(u.getRoleCode(n.authentication.role),"a, m2, m1")&&u.getByParams({regionAndUnitId:n.Region.selected.RegionParentId,onlineTypeId:n.DisplayOptions.TypeNo,levelId:n.levelId},"/api/Online/getCredits").then(function(t){n.OnlineCreditsNo=t[0].CreditHoursOld;n.OnlineCreditMaxPerson=t[0].MaxPerson},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")}),n.SpecialityGroupSelected=f("filter")(n.specialityGroups,{Id:n.SpecialityGroup.selected.Id},!0)[0],n.UsingSpeciality=n.SpecialityGroupSelected.UsingSpeciality,e={regionAndUnitId:n.Region.selected.Id,specialityGroupId:n.SpecialityGroup.selected.Id,WrkNo:n.WrkNo,levelId:n.levelId,UsingSpeciality:n.UsingSpeciality},u.getByParams(e,"api/Online/getOnlineRecruitments").then(function(t){if(n.recruitments1=t,n.recruitments1.length>0){for(var i=n.recruitments1.length-1;i>=0;i--)n.recruitments1[i].MaxHours=n.recruitments1[i].StatusId==3?n.recruitments1[i].HoursPerSpecialityHours-n.recruitments1[i].SumInRecruitmentOrRecruitmentHours:n.recruitments1[i].HoursPerSpecialityHours,u.isValueInArray(u.getRoleCode(n.authentication.role),"d2, d1")&&n.recruitments1[i].SumInRecruitmentHours>0&&(n.SumInRecruitment=n.SumInRecruitment+n.recruitments1[i].SumInRecruitmentHours),n.recruitments1[i].EditHours==0&&(n.recruitments1[i].EditHours=null),(n.recruitments1[i].StatusId==2||n.recruitments1[i].StatusId==3&&!u.isEmptyValue(n.recruitments1[i].RegionAndUnitRecIds[n.recruitments1[i].StatusId])&&u.isValueInArray(n.Region.selected.Id,n.recruitments1[i].RegionAndUnitRecIds[n.recruitments1[i].StatusId])||n.recruitments1[i].StatusId==4&&!u.isEmptyValue(n.recruitments1[i].RegionAndUnitRecIds[n.recruitments1[i].StatusId])&&u.isValueInArray(n.Region.selected.Id,n.recruitments1[i].RegionAndUnitRecIds[n.recruitments1[i].StatusId]))&&(n.recruitments1[i].IsDisabled=!0);n.ShowTable.Table1=!0}else r.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση.")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")})):n.showAlert=!0;else if(t=="save"){for(h=-1,n.saveRecruitments=[],i=0;i<n.recruitments1.length;i++)n.recruitments1[i].EditHours>0&&(h++,n.saveRecruitments[h]=n.recruitments1[i]);h>=0&&(e={OnlineRecruitments:n.saveRecruitments,Action:n.Choices.Action.selected.Id,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName},u.postByParams(e,"api/Online/insertOrUpdateOnlineReqruitmentsMusic").then(function(){r.pop("success","Αποθήκευση","Η δέσμευση ωρών πραγματοποιήθηκε με επιτυχία.");n.ShowTable.Table1=!1;n.Region.selected="";n.SpecialityGroup.selected="";n.WrkNo="";n.showAlert=!1;n.recruitments1=[];u.isValueInArray(u.getRoleCode(n.authentication.role),"a, m2")&&(n.OnlineCreditsNo=0);u.getByParams({parentId:n.authentication.regionAndUnitId},"/api/Online/getRecruitments").then(function(t){n.OnlineRecruitmentNo=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")})},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")}))}else t=="export"?n.recruitmentsForExport():n.showAlert=!0;break;case 2:if(t=="clear")n.ShowTable.Table2=!1,n.Region.selected="",n.SpecialityGroup.selected="",n.showAlert=!1;else if(t=="search")n.Region.selected.Id&&n.SpecialityGroup.selected.Id?(n.showAlert=!1,n.SumCredits=0,u.isValueInArray(u.getRoleCode(n.authentication.role),"a, m2, m1")&&u.getByParams({regionAndUnitId:n.Region.selected.RegionParentId,onlineTypeId:n.DisplayOptions.TypeNo,levelId:n.levelId},"/api/Online/getCredits").then(function(t){n.OnlineCreditsNo=t[0].CreditHoursOld;n.OnlineCreditMaxPerson=t[0].MaxPerson},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")}),e={regionAndUnitId:n.Region.selected.Id,SpecialityGroupId:n.SpecialityGroup.selected.Id,statusId:2},u.getByParams(e,"api/Online/getOnlineRecruitmentsByStatus").then(function(t){n.recruitments2=t;n.recruitments2.length>0?(n.Status=f("filter")(n.StatusAll,function(n){return n.Id!=1&&n.Id!=2&&n.Id!=5}),n.ShowTable.Table2=!0,$.each(n.recruitments2,function(n,t){t.MaxHours=t.HoursPerSpecialityHours;t.InRecruitmentHours>0?t.EditHours=t.InRecruitmentHours:t.EditHours==0&&(t.EditHours=null);t.SumInRecruitmentOrRecruitmentHours-t.InRecruitmentHours>0&&(t.MaxHours-=t.SumInRecruitmentOrRecruitmentHours-t.InRecruitmentHours)})):r.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση.")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")})):n.showAlert=!0;else if(t=="save"){for(o=-1,n.saveRecruitments=[],i=0;i<n.recruitments2.length;i++)(n.recruitments2[i].StatusId==3||n.recruitments2[i].StatusId==4)&&(o++,n.saveRecruitments[o]=n.recruitments2[i]);o>=0?(e={OnlineRecruitments:n.saveRecruitments,Action:n.Choices.Action.selected.Id,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName},u.postByParams(e,"api/Online/insertOrUpdateOnlineReqruitmentsMusic").then(function(){r.pop("success","Αποθήκευση","Η διαδικασία πρόσληψης πραγματοποιήθηκε με επιτυχία.");n.ShowTable.Table2=!1;n.Region.selected="";n.SpecialityGroup.selected="";n.WrkNo="";n.showAlert=!1;n.recruitments2=[];n.PendingRecruitments=!1;u.isValueInArray(u.getRoleCode(n.authentication.role),"a, m2, m1")?n.OnlineCreditsNo=0:(u.getByParams({regionAndUnitId:n.authentication.regionAndUnitId,onlineTypeId:n.DisplayOptions.TypeNo,levelId:n.levelId},"/api/Online/getCredits").then(function(t){n.OnlineCreditsNo=t[0].CreditHoursOld},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")}),u.getByParams({parentId:n.authentication.regionAndUnitId},"/api/Online/getRecruitments").then(function(t){n.OnlineRecruitmentNo=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")}))},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")})):r.pop("warning","Ελλιπείς Πληροφορίες",'Συμπληρώστε το πεδίο "Προσήλθε".')}else n.showAlert=!0;break;case 3:if(t=="clear")n.ShowTable.Table3=!1,n.Region.selected="",n.SpecialityGroup.selected="",n.showAlert=!1;else if(t=="search")n.Region.selected.Id&&n.SpecialityGroup.selected.Id?(n.showAlert=!1,n.SumCredits=0,e={regionAndUnitId:n.Region.selected.Id,SpecialityGroupId:n.SpecialityGroup.selected.Id,statusId:3},u.getByParams(e,"api/Online/getOnlineRecruitmentsByStatus").then(function(t){n.recruitments3=t;n.recruitments3.length>0?n.ShowTable.Table3=!0:r.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση.")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")})):n.showAlert=!0;else if(t=="save"){for(c=-1,n.saveRecruitments=[],i=0;i<n.recruitments3.length;i++)n.recruitments3[i].isSelected&&(c++,n.saveRecruitments[c]=n.recruitments3[i]);c>=0?(e={OnlineRecruitments:n.saveRecruitments,Action:n.Choices.Action.selected.Id,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName},u.postByParams(e,"api/Online/insertOrUpdateOnlineReqruitmentsMusic").then(function(){r.pop("success","Αποθήκευση","Η διαδικασία απόλυσης πραγματοποιήθηκε με επιτυχία.");n.ShowTable.Table3=!1;n.Region.selected="";n.SpecialityGroup.selected="";n.WrkNo="";n.showAlert=!1;n.recruitments3=[];n.PendingRecruitments=!1},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")})):r.pop("warning","Ελλιπείς Πληροφορίες","Πρέπει να επιλέξετε εκπαιδευτικό προς απόλυση.")}else t=="export"?n.recruitmentsForExport():n.showAlert=!0;break;case 4:if(t=="clear")n.ShowTable.Table4=!1,n.Region.selected="",n.SpecialityGroup.selected="",n.StatusAll.selected="",n.showAlert=!1;else if(t=="search")n.Region.selected.Id&&n.StatusAll.selected.Id?(n.showAlert=!1,n.Status=[],n.SumCredits=0,n.ShowSubmit=!1,u.isValueInArray(u.getRoleCode(n.authentication.role),"a, m2, m1")&&u.getByParams({regionAndUnitId:n.Region.selected.RegionParentId,onlineTypeId:n.DisplayOptions.TypeNo,levelId:n.levelId},"/api/Online/getCredits").then(function(t){n.OnlineCreditsNo=t[0].CreditHoursOld;n.OnlineCreditMaxPerson=t[0].MaxPerson},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")}),l=0,n.SpecialityGroup.selected.Id>0&&(l=n.SpecialityGroup.selected.Id),e={regionAndUnitId:n.Region.selected.Id,SpecialityGroupId:l,statusId:n.StatusAll.selected.Id},u.getByParams(e,"api/Online/getOnlineRecruitmentsByStatus").then(function(t){n.recruitments4=t;n.recruitments4.length>0?($.each(n.recruitments4,function(t,i){i.EditHours=n.StatusAll.selected.Id==2?i.InRecruitmentHours:n.StatusAll.selected.Id==3?i.RecruitmentHours:null;i.SumInRecruitmentOrRecruitmentHours-i.InRecruitmentOrRecruitmentHours>0&&(i.HoursPerSpecialityHours-=i.SumInRecruitmentOrRecruitmentHours-i.InRecruitmentOrRecruitmentHours);i.MaxHours=Math.min(n.OnlineCreditsNo,i.HoursPerSpecialityHours)}),u.isValueInArray(u.getRoleCode(n.authentication.role),"d2, d1")?n.Status=f("filter")(n.StatusAll,function(n){return n.Id!=2&&n.Id!=3&&n.Id!=5}):n.StatusAll.selected.Id==2?n.Status=f("filter")(n.StatusAll,function(n){return n.Id!=2&&n.Id!=5}):n.StatusAll.selected.Id==3?n.Status=f("filter")(n.StatusAll,function(n){return n.Id!=2}):n.StatusAll.selected.Id==4?n.Status=f("filter")(n.StatusAll,function(n){return n.Id!=2&&n.Id!=4&&n.Id!=5}):n.StatusAll.selected.Id==5&&(n.Status=f("filter")(n.StatusAll,function(n){return n.Id!=2&&n.Id!=5})),n.ShowTable.Table4=!0):r.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση.")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")})):n.showAlert=!0;else if(t=="saveStatus"){if(n.StatusAll.selected.Id==4){for(o=-1,n.saveRecruitments=[],i=0;i<n.recruitments4.length;i++)n.recruitments4[i].StatusId==1&&(o++,n.saveRecruitments[o]=n.recruitments4[i]);o>=0&&(e={OnlineRecruitments:n.saveRecruitments,Action:n.Choices.Action.selected.Id,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName},u.postByParams(e,"api/Online/insertOrUpdateOnlineReqruitmentsMusic").then(function(){r.pop("success","Αποθήκευση","Η αλλαγή κατάστασης πραγματοποιήθηκε με επιτυχία.");n.ShowTable.Table4=!1;n.Region.selected="";n.SpecialityGroup.selected="";n.StatusAll.selected="";n.WrkNo="";n.showAlert=!1;n.recruitments4=[];n.PendingRecruitments=!1;u.getByParams({parentId:n.authentication.regionAndUnitId},"/api/Online/getRecruitments").then(function(t){n.OnlineRecruitmentNo=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")})},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")}))}}else if(t=="saveHours"){if(n.StatusAll.selected.Id==3){for(s=-1,n.saveRecruitments=[],i=0;i<n.recruitments4.length;i++)n.recruitments4[i].RecruitmentHours!=n.recruitments4[i].EditHours&&n.recruitments4[i].EditHours>0&&(s++,n.saveRecruitments[s]=n.recruitments4[i]);s>=0&&(e={OnlineRecruitments:n.saveRecruitments,Action:n.Choices.Action.selected.Id,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName},u.postByParams(e,"api/Online/insertOrUpdateOnlineReqruitmentsMusic").then(function(){r.pop("success","Αποθήκευση","Η αλλαγή ωρών πραγματοποιήθηκε με επιτυχία.");n.ShowTable.Table4=!1;n.Region.selected="";n.SpecialityGroup.selected="";n.WrkNo="";n.showAlert=!1;n.recruitments4=[];n.PendingRecruitments=!1;u.getByParams({parentId:n.authentication.regionAndUnitId},"/api/Online/getRecruitments").then(function(t){n.OnlineRecruitmentNo=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")})},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")}))}}else if(t=="save"){for(o=-1,s=-1,n.saveRecruitments=[],i=0;i<n.recruitments4.length;i++)(n.recruitments4[i].StatusId!=n.StatusAll.selected.Id&&n.StatusAll.selected.Id>0||n.recruitments4[i].RecruitmentHours!=n.recruitments4[i].EditHours&&n.recruitments4[i].EditHours>0&&n.recruitments4[i].StatusId==3)&&(o++,n.saveRecruitments[o]=n.recruitments4[i]);o>=0&&(e={OnlineRecruitments:n.saveRecruitments,Action:n.Choices.Action.selected.Id,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName},u.postByParams(e,"api/Online/insertOrUpdateOnlineReqruitmentsMusic").then(function(){r.pop("success","Αποθήκευση","Η αλλαγή ωρών πραγματοποιήθηκε με επιτυχία.");n.ShowTable.Table4=!1;n.Region.selected="";n.SpecialityGroup.selected="";n.StatusAll.selected="";n.WrkNo="";n.showAlert=!1;n.recruitments4=[];n.PendingRecruitments=!1;u.getByParams({parentId:n.authentication.regionAndUnitId},"/api/Online/getRecruitments").then(function(t){n.OnlineRecruitmentNo=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")})},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")}))}else t=="export"?n.recruitmentsForExport():n.showAlert=!0;break;case 5:t=="clear"?(n.ShowTable.Table5=!1,n.Region.selected="",n.SpecialityGroup.selected="",n.showAlert=!1,n.TaxNumber=""):t=="search"?(n.TaxNumber!=""&&n.TaxNumber!="undefined"&&n.TaxNumber.length>0&&n.checkValidTaxNumber(),n.TaxNumberValidation?n.showAlert=!0:(n.showAlert=!1,n.SumCredits=0,e={TaxNumber:n.TaxNumber},u.getByParams(e,"api/Online/getOnlineRecruitmentsByTaxNumber").then(function(t){n.recruitments5=t;n.recruitments5.length>0?n.ShowTable.Table5=!0:r.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση.")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")}))):n.showAlert=!0}break;case 2:switch(n.Choices.Action.selected.Id){case 1:if(t=="clear")n.ShowTable.Table1=!1,n.Region.selected="",n.SpecialityGroup.selected="",n.WrkNo="",n.showAlert=!1;else if(t=="search")n.Region.selected.Id&&n.SpecialityGroup.selected.Id&&n.WrkNo!=""?(n.showAlert=!1,n.SumCredits=0,n.SumInRecruitment=0,u.isValueInArray(u.getRoleCode(n.authentication.role),"a, m2, m1")&&u.getByParams({regionAndUnitId:n.Region.selected.RegionParentId,onlineTypeId:n.DisplayOptions.TypeNo,levelId:n.levelId},"/api/Online/getCredits").then(function(t){n.OnlineCreditsNo=t[0].CreditHoursOld;n.OnlineCreditMaxPerson=t[0].MaxPerson},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")}),n.SpecialityGroupSelected=f("filter")(n.specialitySMEAGroups,{Id:n.SpecialityGroup.selected.Id},!0)[0],n.UsingSpeciality=n.SpecialityGroupSelected.UsingSpeciality,e={regionAndUnitId:n.Region.selected.Id,specialityGroupId:n.SpecialityGroup.selected.Id,WrkNo:n.WrkNo,levelId:n.levelId,UsingSpeciality:n.UsingSpeciality,smeaTypeId:n.selsmeaType.selected.Id},u.getByParams(e,"api/Online/getOnlineSmeaRecruitments").then(function(t){if(n.recruitments1=t,n.recruitments1.length>0){for(var i=n.recruitments1.length-1;i>=0;i--)n.recruitments1[i].MaxHours=n.recruitments1[i].StatusId==3?n.recruitments1[i].HoursPerSpecialityHours-n.recruitments1[i].SumInRecruitmentOrRecruitmentHours:n.recruitments1[i].HoursPerSpecialityHours,u.isValueInArray(u.getRoleCode(n.authentication.role),"d2, d1")&&n.recruitments1[i].SumInRecruitmentHours>0&&(n.SumInRecruitment=n.SumInRecruitment+n.recruitments1[i].SumInRecruitmentHours),n.recruitments1[i].EditHours==0&&(n.recruitments1[i].EditHours=null),(n.recruitments1[i].StatusId==2||n.recruitments1[i].StatusId==3&&!u.isEmptyValue(n.recruitments1[i].RegionAndUnitRecIds[n.recruitments1[i].StatusId])&&u.isValueInArray(n.Region.selected.Id,n.recruitments1[i].RegionAndUnitRecIds[n.recruitments1[i].StatusId])||n.recruitments1[i].StatusId==4&&!u.isEmptyValue(n.recruitments1[i].RegionAndUnitRecIds[n.recruitments1[i].StatusId])&&u.isValueInArray(n.Region.selected.Id,n.recruitments1[i].RegionAndUnitRecIds[n.recruitments1[i].StatusId]))&&(n.recruitments1[i].IsDisabled=!0);n.ShowTable.Table1=!0}else r.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση.")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")})):n.showAlert=!0;else if(t=="save"){for(h=-1,n.saveRecruitments=[],i=0;i<n.recruitments1.length;i++)n.recruitments1[i].EditHours>0&&(h++,n.saveRecruitments[h]=n.recruitments1[i]);h>=0&&(e={OnlineRecruitments:n.saveRecruitments,Action:n.Choices.Action.selected.Id,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName},u.postByParams(e,"api/Online/insertOrUpdateOnlineReqruitmentsMusic").then(function(){r.pop("success","Αποθήκευση","Η δέσμευση ωρών πραγματοποιήθηκε με επιτυχία.");n.ShowTable.Table1=!1;n.Region.selected="";n.SpecialityGroup.selected="";n.WrkNo="";n.showAlert=!1;n.recruitments1=[];u.isValueInArray(u.getRoleCode(n.authentication.role),"a, m2")&&(n.OnlineCreditsNo=0);u.getByParams({parentId:n.authentication.regionAndUnitId},"/api/Online/getRecruitments").then(function(t){n.OnlineRecruitmentNo=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")})},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")}))}else t=="export"?n.recruitmentsForExport():n.showAlert=!0;break;case 2:if(t=="clear")n.ShowTable.Table2=!1,n.Region.selected="",n.SpecialityGroup.selected="",n.showAlert=!1;else if(t=="search")n.Region.selected.Id&&n.SpecialityGroup.selected.Id?(n.showAlert=!1,n.SumCredits=0,u.isValueInArray(u.getRoleCode(n.authentication.role),"a, m2, m1")&&u.getByParams({regionAndUnitId:n.Region.selected.RegionParentId,onlineTypeId:n.DisplayOptions.TypeNo,levelId:n.levelId},"/api/Online/getCredits").then(function(t){n.OnlineCreditsNo=t[0].CreditHoursOld;n.OnlineCreditMaxPerson=t[0].MaxPerson},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")}),e={regionAndUnitId:n.Region.selected.Id,SpecialityGroupId:n.SpecialityGroup.selected.Id,statusId:2},u.getByParams(e,"api/Online/getOnlineRecruitmentsSmeaByStatus").then(function(t){n.recruitments2=t;n.recruitments2.length>0?(n.Status=f("filter")(n.StatusAll,function(n){return n.Id!=1&&n.Id!=2&&n.Id!=5}),n.ShowTable.Table2=!0,$.each(n.recruitments2,function(n,t){t.MaxHours=t.HoursPerSpecialityHours;t.InRecruitmentHours>0?t.EditHours=t.InRecruitmentHours:t.EditHours==0&&(t.EditHours=null);t.SumInRecruitmentOrRecruitmentHours-t.InRecruitmentHours>0&&(t.MaxHours-=t.SumInRecruitmentOrRecruitmentHours-t.InRecruitmentHours)})):r.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση.")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")})):n.showAlert=!0;else if(t=="save"){for(o=-1,n.saveRecruitments=[],i=0;i<n.recruitments2.length;i++)(n.recruitments2[i].StatusId==3||n.recruitments2[i].StatusId==4)&&(o++,n.saveRecruitments[o]=n.recruitments2[i]);o>=0?(e={OnlineRecruitments:n.saveRecruitments,Action:n.Choices.Action.selected.Id,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName},u.postByParams(e,"api/Online/insertOrUpdateOnlineReqruitmentsMusic").then(function(){r.pop("success","Αποθήκευση","Η διαδικασία πρόσληψης πραγματοποιήθηκε με επιτυχία.");n.ShowTable.Table2=!1;n.Region.selected="";n.SpecialityGroup.selected="";n.WrkNo="";n.showAlert=!1;n.recruitments2=[];n.PendingRecruitments=!1;u.isValueInArray(u.getRoleCode(n.authentication.role),"a, m2, m1")?n.OnlineCreditsNo=0:(u.getByParams({regionAndUnitId:n.authentication.regionAndUnitId,onlineTypeId:n.DisplayOptions.TypeNo,levelId:n.levelId},"/api/Online/getCredits").then(function(t){n.OnlineCreditsNo=t[0].CreditHoursOld},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")}),u.getByParams({parentId:n.authentication.regionAndUnitId},"/api/Online/getRecruitments").then(function(t){n.OnlineRecruitmentNo=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")}))},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")})):r.pop("warning","Ελλιπείς Πληροφορίες",'Συμπληρώστε το πεδίο "Προσήλθε".')}else n.showAlert=!0;break;case 3:if(t=="clear")n.ShowTable.Table3=!1,n.Region.selected="",n.SpecialityGroup.selected="",n.showAlert=!1;else if(t=="search")n.Region.selected.Id&&n.SpecialityGroup.selected.Id?(n.showAlert=!1,n.SumCredits=0,e={regionAndUnitId:n.Region.selected.Id,SpecialityGroupId:n.SpecialityGroup.selected.Id,statusId:3},u.getByParams(e,"api/Online/getOnlineRecruitmentsSmeaByStatus").then(function(t){n.recruitments3=t;n.recruitments3.length>0?n.ShowTable.Table3=!0:r.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση.")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")})):n.showAlert=!0;else if(t=="save"){for(c=-1,n.saveRecruitments=[],i=0;i<n.recruitments3.length;i++)n.recruitments3[i].isSelected&&(c++,n.saveRecruitments[c]=n.recruitments3[i]);c>=0?(e={OnlineRecruitments:n.saveRecruitments,Action:n.Choices.Action.selected.Id,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName},u.postByParams(e,"api/Online/insertOrUpdateOnlineReqruitmentsMusic").then(function(){r.pop("success","Αποθήκευση","Η διαδικασία απόλυσης πραγματοποιήθηκε με επιτυχία.");n.ShowTable.Table3=!1;n.Region.selected="";n.SpecialityGroup.selected="";n.WrkNo="";n.showAlert=!1;n.recruitments3=[];n.PendingRecruitments=!1},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")})):r.pop("warning","Ελλιπείς Πληροφορίες","Πρέπει να επιλέξετε εκπαιδευτικό προς απόλυση.")}else t=="export"?n.recruitmentsForExport():n.showAlert=!0;break;case 4:if(t=="clear")n.ShowTable.Table4=!1,n.Region.selected="",n.SpecialityGroup.selected="",n.StatusAll.selected="",n.showAlert=!1;else if(t=="search")n.Region.selected.Id&&n.StatusAll.selected.Id?(n.showAlert=!1,n.Status=[],n.SumCredits=0,n.ShowSubmit=!1,u.isValueInArray(u.getRoleCode(n.authentication.role),"a, m2, m1")&&u.getByParams({regionAndUnitId:n.Region.selected.RegionParentId,onlineTypeId:n.DisplayOptions.TypeNo,levelId:n.levelId},"/api/Online/getCredits").then(function(t){n.OnlineCreditsNo=t[0].CreditHoursOld;n.OnlineCreditMaxPerson=t[0].MaxPerson},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")}),l=0,n.SpecialityGroup.selected.Id>0&&(l=n.SpecialityGroup.selected.Id),e={regionAndUnitId:n.Region.selected.Id,SpecialityGroupId:l,statusId:n.StatusAll.selected.Id},u.getByParams(e,"api/Online/getOnlineRecruitmentsSmeaByStatus").then(function(t){n.recruitments4=t;n.recruitments4.length>0?($.each(n.recruitments4,function(t,i){i.EditHours=n.StatusAll.selected.Id==2?i.InRecruitmentHours:n.StatusAll.selected.Id==3?i.RecruitmentHours:null;i.SumInRecruitmentOrRecruitmentHours-i.InRecruitmentOrRecruitmentHours>0&&(i.HoursPerSpecialityHours-=i.SumInRecruitmentOrRecruitmentHours-i.InRecruitmentOrRecruitmentHours);i.MaxHours=Math.min(n.OnlineCreditsNo,i.HoursPerSpecialityHours)}),u.isValueInArray(u.getRoleCode(n.authentication.role),"d2, d1")?n.Status=f("filter")(n.StatusAll,function(n){return n.Id!=2&&n.Id!=3&&n.Id!=5}):n.StatusAll.selected.Id==2?n.Status=f("filter")(n.StatusAll,function(n){return n.Id!=2&&n.Id!=5}):n.StatusAll.selected.Id==3?n.Status=f("filter")(n.StatusAll,function(n){return n.Id!=2}):n.StatusAll.selected.Id==4?n.Status=f("filter")(n.StatusAll,function(n){return n.Id!=2&&n.Id!=4&&n.Id!=5}):n.StatusAll.selected.Id==5&&(n.Status=f("filter")(n.StatusAll,function(n){return n.Id!=2&&n.Id!=5})),n.ShowTable.Table4=!0):r.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση.")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")})):n.showAlert=!0;else if(t=="saveStatus"){if(n.StatusAll.selected.Id==4){for(o=-1,n.saveRecruitments=[],i=0;i<n.recruitments4.length;i++)n.recruitments4[i].StatusId==1&&(o++,n.saveRecruitments[o]=n.recruitments4[i]);o>=0&&(e={OnlineRecruitments:n.saveRecruitments,Action:n.Choices.Action.selected.Id,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName},u.postByParams(e,"api/Online/insertOrUpdateOnlineReqruitmentsMusic").then(function(){r.pop("success","Αποθήκευση","Η αλλαγή κατάστασης πραγματοποιήθηκε με επιτυχία.");n.ShowTable.Table4=!1;n.Region.selected="";n.SpecialityGroup.selected="";n.StatusAll.selected="";n.WrkNo="";n.showAlert=!1;n.recruitments4=[];n.PendingRecruitments=!1;u.getByParams({parentId:n.authentication.regionAndUnitId},"/api/Online/getRecruitments").then(function(t){n.OnlineRecruitmentNo=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")})},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")}))}}else if(t=="saveHours"){if(n.StatusAll.selected.Id==3){for(s=-1,n.saveRecruitments=[],i=0;i<n.recruitments4.length;i++)n.recruitments4[i].RecruitmentHours!=n.recruitments4[i].EditHours&&n.recruitments4[i].EditHours>0&&(s++,n.saveRecruitments[s]=n.recruitments4[i]);s>=0&&(e={OnlineRecruitments:n.saveRecruitments,Action:n.Choices.Action.selected.Id,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName},u.postByParams(e,"api/Online/insertOrUpdateOnlineReqruitmentsMusic").then(function(){r.pop("success","Αποθήκευση","Η αλλαγή ωρών πραγματοποιήθηκε με επιτυχία.");n.ShowTable.Table4=!1;n.Region.selected="";n.SpecialityGroup.selected="";n.WrkNo="";n.showAlert=!1;n.recruitments4=[];n.PendingRecruitments=!1;u.getByParams({parentId:n.authentication.regionAndUnitId},"/api/Online/getRecruitments").then(function(t){n.OnlineRecruitmentNo=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")})},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")}))}}else if(t=="save"){for(o=-1,s=-1,n.saveRecruitments=[],i=0;i<n.recruitments4.length;i++)(n.recruitments4[i].StatusId!=n.StatusAll.selected.Id&&n.StatusAll.selected.Id>0||n.recruitments4[i].RecruitmentHours!=n.recruitments4[i].EditHours&&n.recruitments4[i].EditHours>0&&n.recruitments4[i].StatusId==3)&&(o++,n.saveRecruitments[o]=n.recruitments4[i]);o>=0&&(e={OnlineRecruitments:n.saveRecruitments,Action:n.Choices.Action.selected.Id,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName},u.postByParams(e,"api/Online/insertOrUpdateOnlineReqruitmentsMusic").then(function(){r.pop("success","Αποθήκευση","Η αλλαγή ωρών πραγματοποιήθηκε με επιτυχία.");n.ShowTable.Table4=!1;n.Region.selected="";n.SpecialityGroup.selected="";n.StatusAll.selected="";n.WrkNo="";n.showAlert=!1;n.recruitments4=[];n.PendingRecruitments=!1;u.getByParams({parentId:n.authentication.regionAndUnitId},"/api/Online/getRecruitments").then(function(t){n.OnlineRecruitmentNo=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")})},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")}))}else t=="export"?n.recruitmentsForExport():n.showAlert=!0;break;case 5:t=="clear"?(n.ShowTable.Table5=!1,n.Region.selected="",n.SpecialityGroup.selected="",n.showAlert=!1,n.TaxNumber=""):t=="search"?(n.TaxNumber!=""&&n.TaxNumber!="undefined"&&n.TaxNumber.length>0&&n.checkValidTaxNumber(),n.TaxNumberValidation?n.showAlert=!0:(n.showAlert=!1,n.SumCredits=0,e={TaxNumber:n.TaxNumber},u.getByParams(e,"api/Online/getOnlineRecruitmentsByTaxNumber").then(function(t){n.recruitments5=t;n.recruitments5.length>0?n.ShowTable.Table5=!0:r.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση.")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")}))):n.showAlert=!0}break;case 3:switch(n.Choices.Action.selected.Id){case 1:if(t=="clear")n.ShowTable.Table1_Music=!1,n.MusicSchool.selected="",n.MusicSpecialist.selected="",n.MusicWrkNo="",n.showAlert=!1;else if(t=="search")n.MusicSchool.selected.Id&&n.MusicSpecialist.selected.Id&&n.MusicWrkNo!=""?(n.showAlert=!1,n.SumCredits=0,n.SumInRecruitment=0,u.isValueInArray(u.getRoleCode(n.authentication.role),"a, m2")&&u.getByParams({regionAndUnitId:n.MusicSchool.selected.RegionParentId,onlineTypeId:n.DisplayOptions.TypeNo,levelId:n.levelId},"/api/Online/getCredits").then(function(t){n.OnlineCreditsNo=t[0].CreditHoursOld;n.OnlineCreditMaxPerson=t[0].MaxPerson},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")}),e={regionAndUnitId:n.MusicSchool.selected.Id,musicSpecialist:n.MusicSpecialist.selected.Id,musicWrkNo:n.MusicWrkNo},u.getByParams(e,"api/Online/getOnlineRecruitmentsMusic").then(function(t){if(n.recruitments1=t,n.recruitments1.length>0){for(var i=n.recruitments1.length-1;i>=0;i--)n.recruitments1[i].MaxHours=n.recruitments1[i].StatusId==3?n.recruitments1[i].HoursPerSpecialityHours-n.recruitments1[i].SumInRecruitmentOrRecruitmentHours:n.recruitments1[i].HoursPerSpecialityHours,u.isValueInArray(u.getRoleCode(n.authentication.role),"d2")&&n.recruitments1[i].SumInRecruitmentHours>0&&(n.SumInRecruitment=n.SumInRecruitment+n.recruitments1[i].SumInRecruitmentHours),n.recruitments1[i].EditHours==0&&(n.recruitments1[i].EditHours=null),(n.recruitments1[i].StatusId==2||n.recruitments1[i].StatusId==3&&!u.isEmptyValue(n.recruitments1[i].RegionAndUnitRecIds[n.recruitments1[i].StatusId])&&u.isValueInArray(n.MusicSchool.selected.Id,n.recruitments1[i].RegionAndUnitRecIds[n.recruitments1[i].StatusId])||n.recruitments1[i].StatusId==4&&!u.isEmptyValue(n.recruitments1[i].RegionAndUnitRecIds[n.recruitments1[i].StatusId])&&u.isValueInArray(n.MusicSchool.selected.Id,n.recruitments1[i].RegionAndUnitRecIds[n.recruitments1[i].StatusId]))&&(n.recruitments1[i].IsDisabled=!0);n.ShowTable.Table1_Music=!0}else r.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση.")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")})):n.showAlert=!0;else if(t=="save"){for(h=-1,n.saveRecruitments=[],i=0;i<n.recruitments1.length;i++)n.recruitments1[i].EditHours>0&&(h++,n.saveRecruitments[h]=n.recruitments1[i]);h>=0&&(e={OnlineRecruitments:n.saveRecruitments,Action:n.Choices.Action.selected.Id,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName},u.postByParams(e,"api/Online/insertOrUpdateOnlineReqruitmentsMusic").then(function(){r.pop("success","Αποθήκευση","Η δέσμευση ωρών πραγματοποιήθηκε με επιτυχία.");n.ShowTable.Table1_Music=!1;n.MusicSchool.selected="";n.MusicSpecialist.selected="";n.MusicWrkNo="";n.showAlert=!1;n.recruitments1=[];u.isValueInArray(u.getRoleCode(n.authentication.role),"a, m2")&&(n.OnlineCreditsNo=0);u.getByParams({parentId:n.authentication.regionAndUnitId},"/api/Online/getRecruitmentsMusic").then(function(t){n.OnlineRecruitmentNo=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")})},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")}))}else t=="export"?n.recruitmentsForExport():n.showAlert=!0;break;case 2:if(t=="clear")n.ShowTable.Table2_Music=!1,n.MusicSchool.selected="",n.MusicSpecialist.selected="",n.showAlert=!1;else if(t=="search")n.MusicSchool.selected.Id&&n.MusicSpecialist.selected.Id?(n.showAlert=!1,n.SumCredits=0,u.isValueInArray(u.getRoleCode(n.authentication.role),"a, m2")&&u.getByParams({regionAndUnitId:n.MusicSchool.selected.RegionParentId,onlineTypeId:n.DisplayOptions.TypeNo,levelId:n.levelId},"/api/Online/getCredits").then(function(t){n.OnlineCreditsNo=t[0].CreditHoursOld;n.OnlineCreditMaxPerson=t[0].MaxPerson},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")}),e={regionAndUnitId:n.MusicSchool.selected.Id,musicSpecialist:n.MusicSpecialist.selected.Id,statusId:2},u.getByParams(e,"api/Online/getOnlineRecruitmentsMusicByStatus").then(function(t){n.recruitments2=t;n.recruitments2.length>0?(n.Status=f("filter")(n.StatusAll,function(n){return n.Id!=1&&n.Id!=2&&n.Id!=5}),n.ShowTable.Table2_Music=!0,$.each(n.recruitments2,function(n,t){t.MaxHours=t.HoursPerSpecialityHours;t.InRecruitmentHours>0?t.EditHours=t.InRecruitmentHours:t.EditHours==0&&(t.EditHours=null);t.SumInRecruitmentOrRecruitmentHours-t.InRecruitmentHours>0&&(t.MaxHours-=t.SumInRecruitmentOrRecruitmentHours-t.InRecruitmentHours)})):r.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση.")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")})):n.showAlert=!0;else if(t=="save"){for(o=-1,n.saveRecruitments=[],i=0;i<n.recruitments2.length;i++)(n.recruitments2[i].StatusId==3||n.recruitments2[i].StatusId==4)&&(o++,n.saveRecruitments[o]=n.recruitments2[i]);o>=0?(e={OnlineRecruitments:n.saveRecruitments,Action:n.Choices.Action.selected.Id,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName},u.postByParams(e,"api/Online/insertOrUpdateOnlineReqruitmentsMusic").then(function(){r.pop("success","Αποθήκευση","Η διαδικασία πρόσληψης πραγματοποιήθηκε με επιτυχία.");n.ShowTable.Table2_Music=!1;n.MusicSchool.selected="";n.MusicSpecialist.selected="";n.MusicWrkNo="";n.showAlert=!1;n.recruitments2=[];n.PendingRecruitments=!1;u.isValueInArray(u.getRoleCode(n.authentication.role),"a, m2")?n.OnlineCreditsNo=0:(u.getByParams({regionAndUnitId:n.authentication.regionAndUnitId,onlineTypeId:n.DisplayOptions.TypeNo,levelId:n.levelId},"/api/Online/getCredits").then(function(t){n.OnlineCreditsNo=t[0].CreditHoursOld},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")}),u.getByParams({parentId:n.authentication.regionAndUnitId},"/api/Online/getRecruitmentsMusic").then(function(t){n.OnlineRecruitmentNo=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")}))},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")})):r.pop("warning","Ελλιπείς Πληροφορίες",'Συμπληρώστε το πεδίο "Προσήλθε".')}else n.showAlert=!0;break;case 3:if(t=="clear")n.ShowTable.Table3_Music=!1,n.MusicSchool.selected="",n.MusicSpecialist.selected="",n.showAlert=!1;else if(t=="search")n.MusicSchool.selected.Id&&n.MusicSpecialist.selected.Id?(n.showAlert=!1,n.SumCredits=0,e={regionAndUnitId:n.MusicSchool.selected.Id,musicSpecialist:n.MusicSpecialist.selected.Id,statusId:3},u.getByParams(e,"api/Online/getOnlineRecruitmentsMusicByStatus").then(function(t){n.recruitments3=t;n.recruitments3.length>0?n.ShowTable.Table3_Music=!0:r.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση.")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")})):n.showAlert=!0;else if(t=="save"){for(c=-1,n.saveRecruitments=[],i=0;i<n.recruitments3.length;i++)n.recruitments3[i].isSelected&&(c++,n.saveRecruitments[c]=n.recruitments3[i]);c>=0?(e={OnlineRecruitments:n.saveRecruitments,Action:n.Choices.Action.selected.Id,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName},u.postByParams(e,"api/Online/insertOrUpdateOnlineReqruitmentsMusic").then(function(){r.pop("success","Αποθήκευση","Η διαδικασία απόλυσης πραγματοποιήθηκε με επιτυχία.");n.ShowTable.Table3_Music=!1;n.MusicSchool.selected="";n.MusicSpecialist.selected="";n.MusicWrkNo="";n.showAlert=!1;n.recruitments3=[];n.PendingRecruitments=!1},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")})):r.pop("warning","Ελλιπείς Πληροφορίες","Πρέπει να επιλέξετε εκπαιδευτικό προς απόλυση.")}else t=="export"?n.recruitmentsForExport():n.showAlert=!0;break;case 4:if(t=="clear")n.ShowTable.Table4_Music=!1,n.MusicSchool.selected="",n.MusicSpecialist.selected="",n.StatusAll.selected="",n.showAlert=!1;else if(t=="search")n.MusicSchool.selected.Id&&n.StatusAll.selected.Id?(n.showAlert=!1,n.Status=[],n.SumCredits=0,n.ShowSubmit=!1,u.isValueInArray(u.getRoleCode(n.authentication.role),"a, m2")&&u.getByParams({regionAndUnitId:n.MusicSchool.selected.RegionParentId,onlineTypeId:n.DisplayOptions.TypeNo,levelId:n.levelId},"/api/Online/getCredits").then(function(t){n.OnlineCreditsNo=t[0].CreditHoursOld;n.OnlineCreditMaxPerson=t[0].MaxPerson},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")}),a=0,n.MusicSpecialist.selected.Id>0&&(a=n.MusicSpecialist.selected.Id),e={regionAndUnitId:n.MusicSchool.selected.Id,musicSpecialist:a,statusId:n.StatusAll.selected.Id},u.getByParams(e,"api/Online/getOnlineRecruitmentsMusicByStatus").then(function(t){n.recruitments4=t;n.recruitments4.length>0?($.each(n.recruitments4,function(t,i){i.EditHours=n.StatusAll.selected.Id==2?i.InRecruitmentHours:n.StatusAll.selected.Id==3?i.RecruitmentHours:null;i.SumInRecruitmentOrRecruitmentHours-i.InRecruitmentOrRecruitmentHours>0&&(i.HoursPerSpecialityHours-=i.SumInRecruitmentOrRecruitmentHours-i.InRecruitmentOrRecruitmentHours);i.MaxHours=Math.min(n.OnlineCreditsNo,i.HoursPerSpecialityHours)}),u.isValueInArray(u.getRoleCode(n.authentication.role),"d2")?n.Status=f("filter")(n.StatusAll,function(n){return n.Id!=2&&n.Id!=3&&n.Id!=5}):n.StatusAll.selected.Id==2?n.Status=f("filter")(n.StatusAll,function(n){return n.Id!=2&&n.Id!=5}):n.StatusAll.selected.Id==3?n.Status=f("filter")(n.StatusAll,function(n){return n.Id!=2}):n.StatusAll.selected.Id==4?n.Status=f("filter")(n.StatusAll,function(n){return n.Id!=2&&n.Id!=4&&n.Id!=5}):n.StatusAll.selected.Id==5&&(n.Status=f("filter")(n.StatusAll,function(n){return n.Id!=2&&n.Id!=5})),n.ShowTable.Table4_Music=!0):r.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση.")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")})):n.showAlert=!0;else if(t=="saveStatus"){if(n.StatusAll.selected.Id==4){for(o=-1,n.saveRecruitments=[],i=0;i<n.recruitments4.length;i++)n.recruitments4[i].StatusId==1&&(o++,n.saveRecruitments[o]=n.recruitments4[i]);o>=0&&(e={OnlineRecruitments:n.saveRecruitments,Action:n.Choices.Action.selected.Id,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName},u.postByParams(e,"api/Online/insertOrUpdateOnlineReqruitmentsMusic").then(function(){r.pop("success","Αποθήκευση","Η αλλαγή κατάστασης πραγματοποιήθηκε με επιτυχία.");n.ShowTable.Table4_Music=!1;n.MusicSchool.selected="";n.MusicSpecialist.selected="";n.StatusAll.selected="";n.MusicWrkNo="";n.showAlert=!1;n.recruitments4=[];n.PendingRecruitments=!1;u.getByParams({parentId:n.authentication.regionAndUnitId},"/api/Online/getRecruitmentsMusic").then(function(t){n.OnlineRecruitmentNo=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")})},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")}))}}else if(t=="saveHours"){if(n.StatusAll.selected.Id==3){for(s=-1,n.saveRecruitments=[],i=0;i<n.recruitments4.length;i++)n.recruitments4[i].RecruitmentHours!=n.recruitments4[i].EditHours&&n.recruitments4[i].EditHours>0&&(s++,n.saveRecruitments[s]=n.recruitments4[i]);s>=0&&(e={OnlineRecruitments:n.saveRecruitments,Action:n.Choices.Action.selected.Id,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName},u.postByParams(e,"api/Online/insertOrUpdateOnlineReqruitmentsMusic").then(function(){r.pop("success","Αποθήκευση","Η αλλαγή ωρών πραγματοποιήθηκε με επιτυχία.");n.ShowTable.Table4_Music=!1;n.MusicSchool.selected="";n.MusicSpecialist.selected="";n.MusicWrkNo="";n.showAlert=!1;n.recruitments4=[];n.PendingRecruitments=!1;u.getByParams({parentId:n.authentication.regionAndUnitId},"/api/Online/getRecruitmentsMusic").then(function(t){n.OnlineRecruitmentNo=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")})},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")}))}}else if(t=="save"){for(o=-1,s=-1,n.saveRecruitments=[],i=0;i<n.recruitments4.length;i++)(n.recruitments4[i].StatusId!=n.StatusAll.selected.Id&&n.StatusAll.selected.Id>0||n.recruitments4[i].RecruitmentHours!=n.recruitments4[i].EditHours&&n.recruitments4[i].EditHours>0&&n.recruitments4[i].StatusId==3)&&(o++,n.saveRecruitments[o]=n.recruitments4[i]);o>=0&&(e={OnlineRecruitments:n.saveRecruitments,Action:n.Choices.Action.selected.Id,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName},u.postByParams(e,"api/Online/insertOrUpdateOnlineReqruitmentsMusic").then(function(){r.pop("success","Αποθήκευση","Η αλλαγή ωρών πραγματοποιήθηκε με επιτυχία.");n.ShowTable.Table4_Music=!1;n.MusicSchool.selected="";n.MusicSpecialist.selected="";n.StatusAll.selected="";n.MusicWrkNo="";n.showAlert=!1;n.recruitments4=[];n.PendingRecruitments=!1;u.getByParams({parentId:n.authentication.regionAndUnitId},"/api/Online/getRecruitmentsMusic").then(function(t){n.OnlineRecruitmentNo=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε ",3e3,"trustedHtml")})},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")}))}else t=="export"?n.recruitmentsForExport():n.showAlert=!0;break;case 5:t=="clear"?(n.ShowTable.Table5_Music=!1,n.MusicSchool.selected="",n.MusicSpecialist.selected="",n.showAlert=!1,n.TaxNumber=""):t=="search"?(n.TaxNumber!=""&&n.TaxNumber!="undefined"&&n.TaxNumber.length>0&&n.checkValidTaxNumber(),n.TaxNumberValidation?n.showAlert=!0:(n.showAlert=!1,n.SumCredits=0,e={TaxNumber:n.TaxNumber},u.getByParams(e,"api/Online/getOnlineRecruitmentsMusicByTaxNumber").then(function(t){n.recruitments5=t;n.recruitments5.length>0?n.ShowTable.Table5_Music=!0:r.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση.")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα.")}))):n.showAlert=!0}}}};n.SetRequired=function(){var i=0,t;for(n.SumCredits=0,$.each(n.recruitments1,function(t,r){r.EditHours>0&&(n.SumCredits=n.SumCredits+r.EditHours);r.DisplayOrder>i&&r.EditHours>0&&(i=r.DisplayOrder)}),t=0;t<n.recruitments1.length;t++)n.recruitments1[t].IsRequired=n.recruitments1[t].DisplayOrder<i&&!n.recruitments1[t].IsDisabled&&n.recruitments1[t].StatusId!=3?!0:!1};n.SetRequiredHours=function(){if(n.ShowSubmit=!0,u.isValueInArray(u.getRoleCode(n.authentication.role),"a, m2"))for(var t=0;t<n.recruitments4.length;t++)n.recruitments4[t].StatusId==3?(n.recruitments4[t].IsRequired=!0,n.StatusAll.selected.Id==5?n.recruitments4[t].EditHours>0&&(n.SumCredits=n.SumCredits+n.recruitments4[t].EditHours):n.recruitments4[t].EditHours-n.recruitments4[t].RecruitmentHours!=0&&(n.SumCredits=n.SumCredits+(n.recruitments4[t].EditHours-n.recruitments4[t].RecruitmentHours))):n.recruitments4[t].IsRequired=!1};n.SetPeople=function(){n.SumPeople=0;n.SumCredits=0;$.each(n.recruitments2,function(t,i){i.StatusId==3&&(n.SumPeople++,i.EditHours>0&&(n.SumCredits=n.SumCredits+i.EditHours))})};n.SetDiffHours=function(){n.ShowSubmit=!0;n.SumCredits=0;$.each(n.recruitments4,function(t,i){n.StatusAll.selected.Id==5?i.EditHours>0&&(n.SumCredits=n.SumCredits+i.EditHours):i.EditHours-i.RecruitmentHours!=0&&(n.SumCredits=n.SumCredits+(i.EditHours-i.RecruitmentHours))})};n.filterRow={visible:!0,applyFilter:"auto"};n.headerFilter={visible:!0};n.showColumnLines=!0;n.showRowLines=!0;n.showBorders=!0;n.rowAlternationEnabled=!0;n.gridOptions={bindingOptions:{dataSource:"exports",filterRow:"filterRow",headerFilter:"headerFilter",showColumnLines:"showColumnLines",showRowLines:"showRowLines",showBorders:"showBorders",rowAlternationEnabled:"rowAlternationEnabled",columns:"columns"},allowColumnReordering:!0,allowColumnResizing:!0,columnAutoWidth:!0,columnFixing:{enabled:!0},searchPanel:{visible:!0,width:240,placeholder:"Αναζήτηση..."},selection:{mode:"multiple"},columnChooser:{enabled:!0},"export":{enabled:!0,fileName:"Exports",allowExportSelectedData:!0},groupPanel:{visible:!0},paging:{pageSize:10},pager:{showPageSizeSelector:!0,allowedPageSizes:[10,20,50,100],showInfo:!0}};n.exports=[];n.recruitmentsForExport=function(){var t;n.exports=[];n.Choices.Recruitment.selected.Id==1&&(n.Choices.Action.selected.Id==1?(t={regionAndUnitId:n.Region.selected.Id,specialityGroupId:n.SpecialityGroup.selected.Id,WrkNo:n.WrkNo,levelId:n.levelId,UsingSpeciality:n.UsingSpeciality},u.getByParams(t,"api/Online/getOnlineRecruitments").then(function(t){n.columns=[{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"FatherFirstname",caption:"Πατρώνυμο"},{dataField:"SpecialityCode",caption:"Κλάδος"},{dataField:"Telephone",caption:"Τηλέφωνο"},{dataField:"TelephoneMobile",caption:"Κινητό"},{dataField:"StatusDescription",caption:"Τρέχουσα Κατάσταση"},{dataField:"SumInRecruitmentOrRecruitmentHours",caption:"Ώρες"},{dataField:"TypeClassificationTable",caption:"Ενιαίος"}];n.exports=t;n.ShowTable.Table1=!1},function(n){r.pop("warning","Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.Choices.Action.selected.Id==3?(t={regionAndUnitId:n.Region.selected.Id,SpecialityGroupId:n.SpecialityGroup.selected.Id,statusId:3},u.getByParams(t,"api/Online/getOnlineRecruitmentsByStatus").then(function(t){n.columns=[{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"FatherFirstname",caption:"Πατρώνυμο"},{dataField:"SpecialityCode",caption:"Κλάδος"},{dataField:"RecruitmentDate",caption:"Ημ/νία Πρόσληψης",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RecruitmentHours",caption:"Ώρες Πρόσληψης"},{dataField:"StatusDescription",caption:"Τρέχουσα Κατάσταση"}];n.exports=t;n.ShowTable.Table3=!1},function(n){r.pop("warning","Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):n.Choices.Action.selected.Id==4&&(t={regionAndUnitId:n.Region.selected.Id,SpecialityGroupId:n.SpecialityGroup.selected.Id,statusId:n.StatusAll.selected.Id},u.getByParams(t,"api/Online/getOnlineRecruitmentsByStatus").then(function(t){n.columns=[{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"FatherFirstname",caption:"Πατρώνυμο"},{dataField:"SpecialityCode",caption:"Κλάδος"},{dataField:"InRecruitmentDate",caption:"Ημ/νία Υπό Πρόσληψης",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RecruitmentDate",caption:"Ημ/νία Πρόσληψης",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RecruitmentHours",caption:"Ώρες Πρόσληψης"},{dataField:"DismissDate",caption:"Ημ/νία Απόλυσης",dataType:"date",format:"dd/MM/yyyy"},{dataField:"NoRecruitmentDate",caption:"Ημ/νία Δεν Προσήλθε",dataType:"date",format:"dd/MM/yyyy"}];n.exports=t;n.ShowTable.Table4=!1},function(n){r.pop("warning","Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})));n.Choices.Recruitment.selected.Id==3&&n.Choices.Action.selected.Id==1?u.getByParams({regionAndUnitId:n.MusicSchool.selected.Id,musicSpecialist:n.MusicSpecialist.selected.Id,musicWrkNo:n.MusicWrkNo},"/api/Online/getOnlineRecruitmentsMusic").then(function(t){n.columns=[{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"FatherFirstname",caption:"Πατρώνυμο"},{dataField:"SpecialityCode",caption:"Κλάδος"},{dataField:"Telephone",caption:"Τηλέφωνο"},{dataField:"TelephoneMobile",caption:"Κινητό"},{dataField:"StatusDescription",caption:"Τρέχουσα Κατάσταση"},{dataField:"SumInRecruitmentOrRecruitmentHours",caption:"Ώρες"},{dataField:"TypeClassificationTable",caption:"Ενιαίος"}];n.exports=t;n.ShowTable.Table1_Music=!1},function(n){r.pop("warning","Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):n.Choices.Recruitment.selected.Id==3&&n.Choices.Action.selected.Id==3?u.getByParams({regionAndUnitId:n.MusicSchool.selected.Id,musicSpecialist:n.MusicSpecialist.selected.Id,statusId:3},"/api/Online/getOnlineRecruitmentsMusicByStatus").then(function(t){n.columns=[{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"FatherFirstname",caption:"Πατρώνυμο"},{dataField:"SpecialityCode",caption:"Κλάδος"},{dataField:"RecruitmentDate",caption:"Ημ/νία Πρόσληψης",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RecruitmentHours",caption:"Ώρες Πρόσληψης"},{dataField:"StatusDescription",caption:"Τρέχουσα Κατάσταση"}];n.exports=t;n.ShowTable.Table3_Music=!1},function(n){r.pop("warning","Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):n.Choices.Recruitment.selected.Id==3&&n.Choices.Action.selected.Id==4&&u.getByParams({regionAndUnitId:n.MusicSchool.selected.Id,musicSpecialist:n.MusicSpecialist.selected.Id,statusId:n.StatusAll.selected.Id},"/api/Online/getOnlineRecruitmentsMusicByStatus").then(function(t){n.columns=[{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"FatherFirstname",caption:"Πατρώνυμο"},{dataField:"SpecialityCode",caption:"Κλάδος"},{dataField:"InRecruitmentDate",caption:"Ημ/νία Υπό Πρόσληψης",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RecruitmentDate",caption:"Ημ/νία Πρόσληψης",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RecruitmentHours",caption:"Ώρες Πρόσληψης"},{dataField:"DismissDate",caption:"Ημ/νία Απόλυσης",dataType:"date",format:"dd/MM/yyyy"},{dataField:"NoRecruitmentDate",caption:"Ημ/νία Δεν Προσήλθε",dataType:"date",format:"dd/MM/yyyy"}];n.exports=t;n.ShowTable.Table4_Music=!1},function(n){r.pop("warning","Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}};OnlineController.$inject=["$scope","$q","$state","toaster","GeneralFactory","$filter"];OnlineCreditsController=function(n,t,i,r,u,f,e){if(n.showButton=!1,n.firststep=!0,n.regionAndUnit=[],n.level=0,n.RegionAndUnitList=[],n.RegionAndUnitFilteredList=[],n.RegionAndUnitList.selected=0,n.showCreditsTable=!1,n.onlineTypeId=0,n.consts={},n.onlineTypeFiltered=[],n.authentication.isAuth&&f.isValueInArray(f.getRoleCode(n.authentication.role),"a")){f.isEmpty(n.consts.onlineType)&&f.getByAll("/api/Online/getOnlineTypes").then(function(t){n.consts.onlineType=t;n.onlineTypeFiltered=n.consts.onlineType},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});var o=t.all([f.getByAll("/api/Dbo/getLevelsAsync"),f.getByAll("/api/RegionAndUnit/GetIntendanciesAll")]);o.then(function(t){n.Levels=t[0];n.RegionAndUnitList=t[1]})}else r.go("forbidden");n.changeLevel=function(){n.RegionAndUnitList.selected=0;n.RegionAndUnitFilteredList=e("filter")(n.RegionAndUnitList,{LevelId:n.level},!0);n.onlineTypeFiltered=n.level==1?e("filter")(n.consts.onlineType,function(n){return n.Description!="Ωρομισθίων Μουσικών Σχ."}):n.consts.onlineType;n.changeFields()};n.changeFields=function(){n.showButton=f.isEmptyValue(n.onlineTypeId)&&f.isEmptyValue(n.RegionAndUnitList.selected)?!1:!0};n.clearButton=function(){n.RegionAndUnitList.selected=undefined;f.isEmptyValue(n.onlineTypeId)&&(n.showButton=!1)};n.searchAction=function(){f.isEmptyValue(n.level)&&(n.level=0);f.isEmptyValue(n.RegionAndUnitList.selected)&&(n.RegionAndUnitList.selected={Id:0});f.isEmptyValue(n.onlineTypeId)&&(n.onlineTypeId=0);f.getByParams({regionAndUnitId:n.RegionAndUnitList.selected.Id,onlineTypeId:n.onlineTypeId,levelId:n.level},"api/Online/getCredits").then(function(t){n.credits=t;n.credits.length>0?(n.showCreditsTable=!0,n.firststep=!1):(n.showCreditsTable=!1,n.firststep=!0,u.pop("warning"," Δεν βρέθηκαν αποτελέσματα","Η αναζήτηση που πραγματοποιήσατε δεν έχει εγγραφές στη βάση."))},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.previousStep=function(){n.showCreditsTable=!1;n.firststep=!0};n.saveAction=function(){var t={credits:n.credits},i=t;f.postByParams(i,"api/Online/updateCredits").then(function(){n.previousStep();u.pop("success","Η διαδικασία ολοκληρώθηκε με επιτυχία","Η εισαγωγή κενών πραγματοποιήθηκε με επιτυχία")},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}};OnlineCreditsController.$inject=["$scope","$q","PassParameters","$state","toaster","GeneralFactory","$filter"];OpenModalController=function(n,t){n.ok=function(){t.close(!0)};n.cancel=function(){t.dismiss("cancel")}};OpenModalController.$inject=["$scope","$uibModalInstance"];OpenModalContentUpdateRegions=function(n,t,i,r){n.ok=function(){t.close(!0)};n.cancel=function(){t.dismiss("cancel");i.setPersonId(i.getPersonId());r.go("history")}};OpenModalContentUpdateRegions.$inject=["$scope","$uibModalInstance","PassParameters","$state"];OpenModalPendingAdasController=function(n,t,i){n.adas=i.getArray();n.ok=function(){t.close(!0)};n.cancel=function(){t.dismiss("cancel")}};OpenModalPendingAdasController.$inject=["$scope","$uibModalInstance","PassParameters"];CheckDocumentsController=function(n,t,i,r,u,f,e){n.consts={};n.checkDocuments={};n.computerCertificateList=[];n.ShowDisabilityMessage=!1;n.disabilityMessage="Το πεδίο πρέπει να έχει τιμή 0 ή μεταξύ 50-100.";n.computerCertificate={};n.computerCertificate={selected:""};n.disabled={IsMilitaryServiceConfirmed:!1,IsPedagogicalEducationConfirmed:!1,IsCertificateGreekLanguageConfirmed:!1,IsGreekLanguageConfirmed:!1,IsManyChildrenConfirmed:!1,IsMultipleSclerosisConfirmed:!1,IsThalassemiaConfirmed:!1,IsInfirmityConfirmed:!1,IsDisabledChildrenConfirmed:!1,IsBraileKnowledgeConfirmed:!1,IsSignKnowledgeConfirmed:!1,IsComputerCertificateConfirmed:!1,IsMateDisabilityRateConfirmed:!1};var o=f.getPersonId(),s=i.all([u.getByAll("/api/Person/greekLanguageTypes"),u.getByAll("/api/Person/certificateGreekLanguageTypes"),u.getByAll("/api/Person/havingManychildenTypes"),u.getByAll("/api/Person/pedagogicalEducationTypes"),u.getByAll("/api/Person/braileSignKnowledgeTypes"),u.getByAll("/api/Person/braileSignKnowledgeTypes"),u.getByAll("/api/Person/infirmityTypes"),u.getByAll("/api/Dbo/getComputerCertificatesDto"),u.getByParams({id:o},"/api/Person/getPersonCheckDocumentsAsync")]);s.then(function(t){n.consts.greekLanguage=t[0];n.consts.certificateGreekLanguage=t[1];n.consts.havingManychildren=t[2];n.consts.pedagogicalEducation=t[3];n.consts.braileSignKnowledge=t[4];n.consts.signKnowledge=t[5];n.consts.infirmity=t[6];n.computerCertificateList=t[7];n.checkDocuments=t[8];!u.isEmptyValue(n.checkDocuments.ComputerCertificate)&&n.checkDocuments.ComputerCertificate.HasCertificate&&(n.computerCertificate.selected=e("filter")(n.computerCertificateList,{Id:n.checkDocuments.ComputerCertificate.ComputerCertificate},!0)[0]);n.changeGreekLanguage();n.changeCertificateGreekLanguage();n.changePedagogicalEducation();n.changeBraileKnowledge();n.changeSignKnowledge();n.changeMilitaryService();n.changeComputerCertificate();n.changeDisabilityRate();n.changeMateDisabilityRate()});n.ok=function(){u.isEmptyValue(n.computerCertificate.selected)?n.checkDocuments.ComputerCertificateId="":(n.checkDocuments.ComputerCertificate.ComputerCertificate=n.computerCertificate.selected.Id,n.checkDocuments.ComputerCertificate.HasCertificate=!0);t.close(n.checkDocuments)};n.okGeneral=function(){u.postByParams(params,"/api/Person/UpdatePersonCheckDocAsync").then(function(n){n?(toaster.pop("success","Επιτυχής αποθήκευση","Η αποθήκευση πραγματοποιήθηκε με επιτυχία!",3e3,"trustedHtml"),t.close(!0)):toaster.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε η επικύρωση!",3e3,"trustedHtml")},function(){toaster.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε η επικύρωση!",3e3,"trustedHtml")})};n.cancel=function(){t.dismiss("cancel")};n.changeGreekLanguage=function(){n.checkDocuments.GreekLanguage==2?(n.checkDocuments.IsGreekLanguageConfirmed=!1,n.disabled.IsGreekLanguageConfirmed=!0,n.checkDocuments.CertificateGreekLanguage=null,n.checkDocuments.IsCertificateGreekLanguageConfirmed=!1,n.disabled.IsCertificateGreekLanguageConfirmed=!0):n.disabled.IsGreekLanguageConfirmed=!1};n.changeCertificateGreekLanguage=function(){n.checkDocuments.CertificateGreekLanguage==null?(n.checkDocuments.IsCertificateGreekLanguageConfirmed=!1,n.disabled.IsCertificateGreekLanguageConfirmed=!0):n.disabled.IsCertificateGreekLanguageConfirmed=!1};n.changeHavingManyChildren=function(){n.checkDocuments.HavingManyChildren==null?(n.checkDocuments.IsManyChildrenConfirmed=!1,n.disabled.IsManyChildrenConfirmed=!0):n.disabled.IsManyChildrenConfirmed=!1;n.checkDocuments.HavingManyChildren==1?n.showASPENumber=!0:(n.showASPENumber=!1,n.checkDocuments.ASPENumber=null)};n.changePedagogicalEducation=function(){n.checkDocuments.PedagogicalEducation=="3"?(n.checkDocuments.IsPedagogicalEducationConfirmed=!1,n.disabled.IsPedagogicalEducationConfirmed=!0):n.disabled.IsPedagogicalEducationConfirmed=!1};n.changeBraileKnowledge=function(){n.checkDocuments.BraileKnowledge=="2"?(n.checkDocuments.IsBraileKnowledgeConfirmed=!1,n.disabled.IsBraileKnowledgeConfirmed=!0):n.disabled.IsBraileKnowledgeConfirmed=!1};n.changeSignKnowledge=function(){n.checkDocuments.SignKnowledge=="2"?(n.checkDocuments.IsSignKnowledgeConfirmed=!1,n.disabled.IsSignKnowledgeConfirmed=!0):n.disabled.IsSignKnowledgeConfirmed=!1};n.changeComputerCertificate=function(){u.isEmptyValue(n.computerCertificate.selected)?(n.checkDocuments.ComputerCertificate={},n.checkDocuments.ComputerCertificate.IsComputerCertificateConfirmed=!1,n.disabled.IsComputerCertificateConfirmed=!0):n.disabled.IsComputerCertificateConfirmed=!1};n.changeDisabledChildren=function(){n.checkDocuments.DisabledChildren==" "?(n.checkDocuments.IsDisabledChildrenConfirmed=!1,n.disabled.IsDisabledChildrenConfirmed=!0):n.disabled.IsDisabledChildrenConfirmed=!1};n.changeThalassemia=function(){n.checkDocuments.Thalassemia?n.disabled.IsThalassemiaConfirmed=!1:(n.checkDocuments.IsThalassemiaConfirmed=!1,n.disabled.IsThalassemiaConfirmed=!0)};n.changeMultipleSclerosis=function(){n.checkDocuments.MultipleSclerosis?n.disabled.IsMultipleSclerosisConfirmed=!1:(n.checkDocuments.IsMultipleSclerosisConfirmed=!1,n.disabled.IsMultipleSclerosisConfirmed=!0)};n.changeMilitaryService=function(){n.checkDocuments.Sex=="Α"?n.checkDocuments.MilitaryService?n.disabled.IsMilitaryServiceConfirmed=!1:(n.checkDocuments.IsMilitaryServiceConfirmed=!1,n.disabled.IsMilitaryServiceConfirmed=!0):(n.checkDocuments.IsMilitaryServiceConfirmed=!0,n.disabled.IsMilitaryServiceConfirmed=!0)};n.changeDisabilityRate=function(){n.checkDocuments.DisabilityRate>0?n.ShowDisabilityMessage=n.checkDocuments.DisabilityRate.toString().match(/^(0|[5-9][0-9]|100)$/)?!1:!0:(n.ShowDisabilityMessage=!1,n.DisabilityDetails=!1,n.checkDocuments.DisabilityRate=0,n.checkDocuments.KEPANumber=null,n.checkDocuments.SanitaryNumber=null,n.checkDocuments.KEPAEndDate=null)};n.changeMateDisabilityRate=function(){n.checkDocuments.MateDisabilityRate>0?n.ShowMateDisabilityMessage=n.checkDocuments.MateDisabilityRate.toString().match(/^(0|[5-9][0-9]|100)$/)?!1:!0:(n.ShowMateDisabilityMessage=!1,n.checkDocuments.MateDisabilityRate=0,n.checkDocuments.KEPANumberMate=null,n.checkDocuments.SanitaryNumberMate=null,n.checkDocuments.KEPAEndDateMate=null)}};CheckDocumentsController.$inject=["$scope","$uibModalInstance","$q","$http","GeneralFactory","PassParameters","$filter"];UpdFekController=function(n,t,i,r,u,f){n.minDate=new Date;var e=new Date,o=e.getDate(),s=e.getMonth(),h=e.getFullYear()+1;n.maxDate=o+"/"+s+"/"+h;n.formats=["dd/MM/yyyy"];n.format=n.formats[0];n.clear=function(){n.dt=null};n.toggleMin=function(){n.minDate=n.minDate?null:new Date};n.toggleMin();n.dateOptions={formatYear:"yy",startingDay:1,format:"dd/mm/yyyy"};n.open=function(t,i){t.preventDefault();t.stopPropagation();n[i]=!0};n.updSpec={};n.updSpec.Fek=f.getFek();n.updSpec.FekId=f.getFekId();n.updSpec.ValidFrom=f.getFekValidFrom();n.updSpec.ValidTo=f.getFekValidTo();n.updSpec.Code=f.getCode();n.updSpec.Description=f.getApplicationId();n.ok=function(){$("#fekEdit").valid()&&t.close(n.updSpec)};n.cancel=function(){t.dismiss("cancel")}};UpdFekController.$inject=["$scope","$uibModalInstance","$q","$http","GeneralFactory","PassParameters"];ChangeLockedDataController=function(n,t,i,r,u,f,e){n.personLock={};n.intendancyLock={};n.intendancyLock={selected:""};n.personLock.Id=f.getPersonId();n.personLock.Lastname=f.getlastName();n.personLock.FatherFirstname=f.getfatherFirstName();n.personLock.Firstname=f.getfirstName();n.personLock.IntendancyId=f.getApplicationId();n.personLock.IsPermanent=f.getIsPermanent();u.getByAll("/api/RegionAndUnit/getMunicipalitiesAndIntendancies").then(function(t){n.intendanciesAll=t;n.intendancyLock.selected=e("filter")(n.intendanciesAll,{Id:n.personLock.IntendancyId},!0)[0]},function(){toaster.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")});n.ok=function(){$("#LockedData").valid()&&(n.personLock.IntendancyId=u.isEmptyValue(n.intendancyLock.selected)?null:n.intendancyLock.selected.Id,t.close(n.personLock))};n.cancel=function(){t.dismiss("cancel")}};ChangeLockedDataController.$inject=["$scope","$uibModalInstance","$q","$http","GeneralFactory","PassParameters","$filter"];OpenModalIdentificationController=function(n,t,i,r){var u=i.getPersonId();n.ok=function(){r.getByParams({personId:u},"/api/Person/updatePersonIdentification").then(function(n){n?(toaster.pop("success","Επιτυχής αποθήκευση","Η αποθήκευση πραγματοποιήθηκε με επιτυχία!",3e3,"trustedHtml"),t.close(!0)):toaster.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε η επικύρωση!",3e3,"trustedHtml")},function(){toaster.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε η επικύρωση!",3e3,"trustedHtml")});t.close(!0)};n.cancel=function(){t.dismiss("cancel")}};OpenModalIdentificationController.$inject=["$scope","$uibModalInstance","PassParameters","GeneralFactory"];openUploadModalDataController=function(n,t){n.ok=function(){t.close(!0)};n.cancel=function(){t.dismiss("cancel")}};openUploadModalDataController.$inject=["$scope","$uibModalInstance"];PermanentController=function(n,t,i,r,u,f,e,o,s){if(n.mess="",n.messInfo="",n.permanent={IsTemporaryStored:!0},n.permanent.LevelId=0,n.person={},n.applicationType=39,n.continueDisabled=!0,n.perspec={},n.Years=[],n.hasValidFekNoConfirmSpeciality=!1,n.alerts="",n.showToConfirmSpeciality=!1,n.selected={Years:[]},n.AvailableRegionsListItems=[],n.SelectedAvailRegionsItems=[],n.SelectedSelectedRegionsListItems=[],n.SelectedRegionsListItems=[],n.SelectedSpecListItems=[],n.AvailableSpecListItems=[],n.SelectedAvailSpecItems=[],n.showAlertRegion=!1,n.DisableDLevel=!1,n.protocol="",n.showProtocol=!1,n.cannotUpdate=!1,n.notActive=!1,n.noUpdAccess=!1,n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.fek={},n.applPerm=[],n.userLevel=0,blockUI({target:"#divBlockUI",animate:!0}),n.canSave=!0,n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},f.isValueInArray(f.getRoleCode(n.authentication.role),"d1, d2")&&(n.userLevel=n.authentication.levelId,n.permanent.LevelId=n.authentication.levelId,n.permanent.IntendancyId=n.authentication.regionAndUnitId),n.authentication.isAuth){var h="permanent";f.getByParams({role:n.authentication.role,codes:h},"/api/Subsystem/NewCheckPermission").then(function(i){var r=h.split(","),s,c;for(s in r)n.pageRules[r[s]]=e("filter")(i,{Code:r[s]},!0)[0].Rules;n.permanent.Id=t.getApplicationId();f.isEmptyValue(n.applicationLevelId)&&(n.applicationLevelId=0);f.isEmptyValue(n.permanent.Id)?(n.step1=!0,n.step2=!1):(n.step1=!1,n.step2=!0);n.applicationLevelId=t.getApplicationLevelId();f.isEmptyValue(n.applicationLevelId)&&(n.applicationLevelId=0);t.resetApplication();n.permanent.PersonId=t.getPersonId();f.isValueInArray(n.pageRules.permanent.CanAccess,"u1, u2")&&(n.permanent.PersonId=n.authentication.personId);c=o.all([f.getByParams({personId:n.permanent.PersonId},"/api/ApplPermanent/getSpecialityForPermanent"),f.getByParams({Id:n.permanent.PersonId},"/api/ApplPermanent/GetApplPermanent"),f.getByParams({personId:n.permanent.PersonId},"/api/Person/checkActivePerson")]);c.then(function(i){var s,o,r;for(angular.copy(i[0],n.AvailableSpecListItems),n.applPerm=i[1],s=i[2],r=n.AvailableSpecListItems.length-1;r>=0;r--)n.AvailableSpecListItems[r].hasApplPerm=0;for(o=n.applPerm.length-1;o>=0;o--)for(r=n.AvailableSpecListItems.length-1;r>=0;r--)n.applPerm[o].SpecialityId==n.AvailableSpecListItems[r].Id&&(n.AvailableSpecListItems[r].hasApplPerm=1);f.isEmpty(n.AvailableSpecListItems)?(n.mess+="<li>Δεν έχετε δικαίωμα υποβολής αίτησης για το συγκεκριμένο κλάδο.<\/li>",n.showAddEditForm=2):s?n.permanent.Id!=null&&n.permanent.Id!=""&&n.permanent.Id!="undefined"?(f.isEmptyValue(n.permanent.SpecialityId)&&(n.permanent.SpecialityId=t.getSpecialityId()),f.getByParams({applicationTypeId:n.applicationType,specialityId:n.permanent.SpecialityId},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(t){n.SelectedSpecListItems=e("filter")(n.AvailableSpecListItems,{Id:n.permanent.SpecialityId},!0)[0];!f.isEmptyValue(t)||f.isValueInArray(f.getRoleCode(n.authentication.role),"a")?(n.canUpdateAppl=!0,n.showAddEditForm=1,n.getApplication()):(n.mess+="<li>Δεν μπορείτε να τροποποιήσετε την αίτηση γιατί δεν υπάρχει ανοιχτό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2)},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(n.canInsertAppl=!0,n.showAddEditForm=1):(n.mess+="<li>Δεν έχετε δικαίωμα υποβολής αίτησης γιατί ο φάκελος σας είναι απενεργοποιημένος<\/li>",n.showAddEditForm=2)})},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml");unblockUI("#divBlockUI")})}else i.go("/");f.isValueInArray(f.getRoleCode(n.authentication.role),"d1, d2")&&(n.userLevel=n.authentication.levelId,n.permanent.LevelId=n.authentication.levelId,n.permanent.IntendancyId=n.authentication.regionAndUnitId);n.hasMusicSpeciality=!1;n.hasboth=!1;n.IsCivilServant=!1;n.showCivilServantFull=!1;n.SpecialSupport=!1;n.goToStep=function(t,i){t==2?f.getByParams({applicationTypeId:n.applicationType,specialityId:i},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(t){n.SelectedSpecListItems=e("filter")(n.AvailableSpecListItems,{Id:i},!0)[0];n.fek=t;f.isEmptyValue(t)?(n.mess="<li>Δεν υπαρχει ενεργό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2):(n.step1=!1,n.step2=!0,n.permanent.SpecialityId=i,blockUI({target:"#divBlockUIForm",animate:!0}),n.doAll())},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.step1=!0,n.step2=!1,n.DisableDLevel=f.isEmpty(n.SelectedSpecListItems)&&f.isEmptyValue(n.permanent.Id)?!1:!0)};n.doAll=function(){if(n.permanent.Id!=null&&n.permanent.Id!=""&&n.permanent.Id!="undefined"){if(n.canUpdateAppl){if(n.permanent.PersonId!=null&&n.permanent.PersonId!=""&&n.permanent.PersonId!="undefined"&&(f.isValueInArray(n.pageRules.permanent.CanAccess,"d1, d2, m1, m2")&&n.permanent.LevelId!=n.authentication.levelId&&(n.canUpdateAppl=!1),!f.isEmpty(n.AvailableSpecListItems))){n.IsDisabled=!n.canUpdateAppl;n.permanent.IsActive||(n.IsDisabled=!0,n.notActive=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.permanent.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0);f.isEmpty(n.permanent.ApplicationPermanentProtocols)||(n.protocol=n.permanent.ApplicationPermanentProtocols[0].ProtocolString,n.showProtocol=!0);var t=o.all([s.getPersonForApplication(n.permanent.PersonId),f.getByParams({id:n.permanent.Id},"api/ApplPermanent/GetApplRegionsByApplId"),f.getByParams({specialityId:n.permanent.SpecialityId,personId:n.permanent.PersonId},"/api/ApplPermanent/getRegionGaps"),f.getByParams({applicationTypeId:n.applicationType,specialityId:n.permanent.SpecialityId},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality")]);t.then(function(t){n.person=t[0];n.SelectedRegionsListItems=t[1];n.SelectedAvailRegionsItems=t[1];angular.copy(t[2],n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList();n.fek=t[3]},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})}unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")}}else n.canInsertAppl&&n.permanent.PersonId!=null&&n.permanent.PersonId!=""&&n.permanent.PersonId!="undefined"&&(n.AvailableRegionsListItems=[],f.getByParams({id:n.permanent.PersonId},"/api/Person/GetPersonDto").then(function(t){n.person=t;n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),f.getByParams({specialityId:n.permanent.SpecialityId,personId:n.permanent.PersonId},"/api/ApplPermanent/getRegionGaps").then(function(t){n.AvailableRegionsListItems=t;n.removeDuplicatesRegionsForDualList()},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm")};n.getApplication=function(){if(n.permanent.Id!=null&&n.permanent.Id!=""&&n.permanent.Id!="undefined"&&(n.DisableDLevel=!0,n.canUpdateAppl&&n.permanent.PersonId!=null&&n.permanent.PersonId!=""&&n.permanent.PersonId!="undefined")){var t=o.all([f.getByParams({id:n.permanent.Id},"/api/ApplPermanent/GetApplPermanentById")]);t.then(function(t){n.permanent=t[0];n.doAll()})}};n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[];n.SelectedRegionsListItems=[];n.btnRegionsUp=function(){for(var t,r,u,f=n.SelectedSelectedRegionsListItems,i=0;i<n.SelectedSelectedRegionsListItems.length;i++){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<=0||t>=n.SelectedRegionsListItems.length)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t-1];n.SelectedRegionsListItems[t-1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsDown=function(){for(var t,r,u,i=n.SelectedSelectedRegionsListItems.length-1;i>=0;i--){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<0||t>=n.SelectedRegionsListItems.length-1)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t+1];n.SelectedRegionsListItems[t+1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsRight=function(){angular.forEach(n.SelectedAvailRegionsItems,function(n){this.push(n)},n.SelectedRegionsListItems);angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.btnRegionsLeft=function(){angular.forEach(n.SelectedSelectedRegionsListItems,function(n){this.push(n)},n.AvailableRegionsListItems);angular.forEach(n.SelectedSelectedRegionsListItems,function(t){for(var i=n.SelectedRegionsListItems.length-1;i>=0;i--)n.SelectedRegionsListItems[i].Id==t.Id&&n.SelectedRegionsListItems.splice(i,1)});n.SelectedSelectedRegionsListItems=[];n.SelectedAvailRegionsItems=[]};n.checkRegions=function(){var i=0,t=0,f=60,r=30;n.canInsertRegions=!0;n.SelectedRegionsListItems.length+n.SelectedAvailRegionsItems.length>f&&(u.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών","Δεν μπορείτε να επιλέξετε περισσότερες από "+f+" περιοχές"),n.canInsertRegions=!1);angular.forEach(n.SelectedRegionsListItems,function(n){n.Level==1?i=i+1:t=t+1});angular.forEach(n.SelectedAvailRegionsItems,function(n){n.Level==1?i=i+1:t=t+1});i>r&&(u.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών Α/βάθμιας","Δεν μπορείτε να επιλέξετε περισσότερες από "+r+" περιοχές Α/βάθμιας"),n.canInsertRegions=!1);t>t&&(u.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών Β/βάθμιας","Δεν μπορείτε να επιλέξετε περισσότερες από "+r+" περιοχές Β/βάθμιας"),n.canInsertRegions=!1)};n.getApplRegions=function(){n.SelectedSpecListItems.length>0?(n.AvailableRegionsListItems=[],n.hasboth?(blockUI({target:"#divBlockUIRegion",animate:!0}),f.postByParams({applicationTypeId:n.applicationType,sex:n.person.Sex,specialities:n.SelectedSpecListItems,personId:n.permanent.PersonId},"/api/ApplicationTypeRegionAndUnit/getApplicationRegionByAppTypeAndBothSubst").then(function(t){angular.copy(t,n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.HasSpecPe70=e("filter")(n.SelectedSpecListItems,{Id:164},!0).length>0?1:0;n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(blockUI({target:"#divBlockUIRegion",animate:!0}),f.postByParams({speco:n.permanent.LevelId,applicationTypeId:n.applicationType,sex:n.person.Sex,specialities:n.SelectedSpecListItems},"/api/ApplicationTypeRegionAndUnit/getApplicationRegionByAppTypeAndLevelSubst").then(function(t){angular.copy(t,n.AvailableRegionsListItems);n.HasSpecPe70=e("filter")(n.SelectedSpecListItems,{Id:164},!0).length>0?1:0;n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}))):(unblockUI("#divBlockUIRegion"),n.AvailableRegionsListItems=[],n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[])};n.removeDuplicatesRegionsForDualList=function(){angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)})};n.editPerson=function(){t.setPersonId(n.permanent.PersonId);i.go("stateEditPerson")};n.saveAction=function(t){n.showAlertRegion=f.isEmpty(n.SelectedRegionsListItems)?!0:!1;n.canSave=!0;!n.showAlertRegion&&n.canSave&&n.InsOrUpd(t)};n.InsOrUpd=function(r){var o={Permanent:n.permanent,RegionAndUnit:n.SelectedRegionsListItems,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Status:r,LevelId:n.SelectedSpecListItems.LevelId},e=o;n.permanent.Id!=null&&n.permanent.Id!=""&&n.permanent.Id!="undefined"?(n.permanent.ModifiedBy=n.authentication.userName,f.postByParams(e,"/api/ApplPermanent/updateApplPermanent").then(function(){t.setPersonId(n.permanent.PersonId);i.go("history")},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα",response)})):(n.permanent.DidacticYearId=n.applicationDidacticYear.Id,n.permanent.CreatedBy=n.authentication.userName,f.postByParams(e,"/api/ApplPermanent/insertApplPermanent").then(function(){t.setPersonId(n.permanent.PersonId);i.go("history")},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα",response)}))}};PermanentController.$inject=["$scope","PassParameters","$state","$stateParams","toaster","GeneralFactory","$filter","$q","PersonFactory"];PermanentEEPEBPController=function(n,t,i,r,u,f,e,o,s){if(n.mess="",n.messInfo="",n.permanentEEPEBP={IsTemporaryStored:!0},n.person={},n.applicationType=25,n.continueDisabled=!0,n.perspec={},n.Years=[],n.hasValidFekNoConfirmSpeciality=!1,n.alerts="",n.showToConfirmSpeciality=!1,n.selected={Years:[]},n.AvailableRegionsListItems=[],n.SelectedAvailRegionsItems=[],n.SelectedSelectedRegionsListItems=[],n.SelectedRegionsListItems=[],n.AvailableSpecListItems=[],n.showAlertRegion=!1,n.DisableDLevel=!1,n.protocol="",n.showProtocol=!1,n.cannotUpdate=!1,n.notActive=!1,n.noUpdAccess=!1,n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.fek={},n.applPerm=[],blockUI({target:"#divBlockUI",animate:!0}),n.canSave=!0,n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.authentication.isAuth){var h="permanentEEPEBP";f.getByParams({role:n.authentication.role,codes:h},"/api/Subsystem/NewCheckPermission").then(function(i){var r=h.split(","),s,c;for(s in r)n.pageRules[r[s]]=e("filter")(i,{Code:r[s]},!0)[0].Rules;n.permanentEEPEBP.Id=t.getApplicationId();f.isEmptyValue(n.permanentEEPEBP.Id)?(n.step1=!0,n.step2=!1):(n.step1=!1,n.step2=!0);t.resetApplication();n.permanentEEPEBP.PersonId=t.getPersonId();f.isValueInArray(n.pageRules.permanentEEPEBP.CanAccess,"u1, u2")&&(n.permanentEEPEBP.PersonId=n.authentication.personId);c=o.all([f.getByParams({personId:n.permanentEEPEBP.PersonId},"/api/ApplPermanentEEPEBP/getSpecialityForPermanent"),f.getByParams({Id:n.permanentEEPEBP.PersonId},"/api/ApplPermanentEEPEBP/GetApplPermanent"),f.getByParams({personId:n.permanentEEPEBP.PersonId},"/api/Person/checkActivePerson")]);c.then(function(i){var s,o,r;for(angular.copy(i[0],n.AvailableSpecListItems),n.applPerm=i[1],s=i[2],r=n.AvailableSpecListItems.length-1;r>=0;r--)n.AvailableSpecListItems[r].hasApplPerm=0;for(o=n.applPerm.length-1;o>=0;o--)for(r=n.AvailableSpecListItems.length-1;r>=0;r--)n.applPerm[o].SpecialityId==n.AvailableSpecListItems[r].Id&&(n.AvailableSpecListItems[r].hasApplPerm=1);f.isEmpty(n.AvailableSpecListItems)?(n.mess+="<li>Δεν έχετε δικαίωμα υποβολής αίτησης για το συγκεκριμένο κλάδο.<\/li>",n.showAddEditForm=2):s?n.permanentEEPEBP.Id!=null&&n.permanentEEPEBP.Id!=""&&n.permanentEEPEBP.Id!="undefined"?(f.isEmptyValue(n.permanentEEPEBP.SpecialityId)&&(n.permanentEEPEBP.SpecialityId=t.getSpecialityId()),f.getByParams({applicationTypeId:n.applicationType,specialityId:n.permanentEEPEBP.SpecialityId},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(t){n.SelectedSpecListItems=e("filter")(n.AvailableSpecListItems,{Id:n.permanentEEPEBP.SpecialityId},!0)[0];!f.isEmptyValue(t)||f.isValueInArray(f.getRoleCode(n.authentication.role),"a")?(n.canUpdateAppl=!0,n.showAddEditForm=1,n.getApplication()):(n.mess+="<li>Δεν μπορείτε να τροποποιήσετε την αίτηση γιατί δεν υπάρχει ανοιχτό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2)},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(n.canInsertAppl=!0,n.showAddEditForm=1):(n.mess+="<li>Δεν έχετε δικαίωμα υποβολής αίτησης γιατί ο φάκελος σας είναι απενεργοποιημένος<\/li>",n.showAddEditForm=2)})},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml");unblockUI("#divBlockUI")})}else i.go("/");f.isValueInArray(f.getRoleCode(n.authentication.role),"d1, d2")&&(n.userLevel=n.authentication.levelId,n.permanentEEPEBP.LevelId=n.authentication.levelId,n.permanentEEPEBP.IntendancyId=n.authentication.regionAndUnitId);n.hasMusicSpeciality=!1;n.hasboth=!1;n.IsCivilServant=!1;n.showCivilServantFull=!1;n.SpecialSupport=!1;n.goToStep=function(t,i){t==2?f.getByParams({applicationTypeId:n.applicationType,specialityId:i},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(t){n.SelectedSpecListItems=e("filter")(n.AvailableSpecListItems,{Id:i},!0)[0];n.fek=t;f.isEmptyValue(t)?(n.mess="<li>Δεν υπαρχει ενεργό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2):(n.step1=!1,n.step2=!0,n.permanentEEPEBP.SpecialityId=i,blockUI({target:"#divBlockUIForm",animate:!0}),n.doAll())},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.step1=!0,n.step2=!1,n.DisableDLevel=f.isEmpty(n.SelectedSpecListItems)&&f.isEmptyValue(n.permanentEEPEBP.Id)?!1:!0)};n.doAll=function(){var t,i;n.permanentEEPEBP.Id!=null&&n.permanentEEPEBP.Id!=""&&n.permanentEEPEBP.Id!="undefined"?n.canUpdateAppl&&(n.permanentEEPEBP.PersonId!=null&&n.permanentEEPEBP.PersonId!=""&&n.permanentEEPEBP.PersonId!="undefined"&&(f.isValueInArray(n.pageRules.permanentEEPEBP.CanAccess,"d1, d2, m1, m2")&&n.permanentEEPEBP.LevelId!=n.authentication.levelId&&(n.canUpdateAppl=!1),n.IsDisabled=!n.canUpdateAppl,n.permanentEEPEBP.IsActive||(n.IsDisabled=!0,n.notActive=!0),n.IsDisabled||(n.IsDisabled=!n.pageRules.permanentEEPEBP.CanUpdate),n.IsDisabled&&(n.noUpdAccess=!0),f.isEmpty(n.permanentEEPEBP.ApplicationPermanentEEPEBPProtocols)||(n.protocol=n.permanentEEPEBP.ApplicationPermanentEEPEBPProtocols[0].ProtocolString,n.showProtocol=!0),t=o.all([s.getPersonForApplication(n.permanentEEPEBP.PersonId),f.getByParams({id:n.permanentEEPEBP.Id},"api/ApplPermanentEEPEBP/GetApplRegionsByApplId"),f.getByParams({specialityId:n.permanentEEPEBP.SpecialityId,personId:n.permanentEEPEBP.PersonId},"/api/ApplPermanentEEPEBP/getRegionGaps"),f.getByParams({applicationTypeId:n.applicationType,specialityId:n.permanentEEPEBP.SpecialityId},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality")]),t.then(function(t){n.person=t[0];n.SelectedRegionsListItems=t[1];n.SelectedAvailRegionsItems=t[1];angular.copy(t[2],n.AvailableRegionsListItems);n.fek=t[3];n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList()},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm")):n.canInsertAppl&&(n.permanentEEPEBP.PersonId!=null&&n.permanentEEPEBP.PersonId!=""&&n.permanentEEPEBP.PersonId!="undefined"&&(n.AvailableRegionsListItems=[],i=o.all([s.getPersonForApplication(n.permanentEEPEBP.PersonId),f.getByParams({specialityId:n.permanentEEPEBP.SpecialityId,personId:n.permanentEEPEBP.PersonId},"/api/ApplPermanentEEPEBP/getRegionGaps")]),i.then(function(t){n.person=t[0];n.AvailableRegionsListItems=t[1];n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των περιοχών της αίτησης.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm"))};n.getApplication=function(){if(n.permanentEEPEBP.Id!=null&&n.permanentEEPEBP.Id!=""&&n.permanentEEPEBP.Id!="undefined"&&(n.DisableDLevel=!0,n.canUpdateAppl&&n.permanentEEPEBP.PersonId!=null&&n.permanentEEPEBP.PersonId!=""&&n.permanentEEPEBP.PersonId!="undefined")){var t=o.all([f.getByParams({id:n.permanentEEPEBP.Id},"/api/ApplPermanentEEPEBP/GetApplPermanentEEPEBPById")]);t.then(function(t){n.permanentEEPEBP=t[0];n.doAll()})}};n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[];n.SelectedRegionsListItems=[];n.btnRegionsUp=function(){for(var t,r,u,f=n.SelectedSelectedRegionsListItems,i=0;i<n.SelectedSelectedRegionsListItems.length;i++){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<=0||t>=n.SelectedRegionsListItems.length)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t-1];n.SelectedRegionsListItems[t-1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsDown=function(){for(var t,r,u,i=n.SelectedSelectedRegionsListItems.length-1;i>=0;i--){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<0||t>=n.SelectedRegionsListItems.length-1)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t+1];n.SelectedRegionsListItems[t+1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsRight=function(){angular.forEach(n.SelectedAvailRegionsItems,function(n){this.push(n)},n.SelectedRegionsListItems);angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.btnRegionsLeft=function(){angular.forEach(n.SelectedSelectedRegionsListItems,function(n){this.push(n)},n.AvailableRegionsListItems);angular.forEach(n.SelectedSelectedRegionsListItems,function(t){for(var i=n.SelectedRegionsListItems.length-1;i>=0;i--)n.SelectedRegionsListItems[i].Id==t.Id&&n.SelectedRegionsListItems.splice(i,1)});n.SelectedSelectedRegionsListItems=[];n.SelectedAvailRegionsItems=[]};n.checkRegions=function(){var i=0,t=0,f=60,r=30;n.canInsertRegions=!0;n.SelectedRegionsListItems.length+n.SelectedAvailRegionsItems.length>f&&(u.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών","Δεν μπορείτε να επιλέξετε περισσότερες από "+f+" περιοχές"),n.canInsertRegions=!1);angular.forEach(n.SelectedRegionsListItems,function(n){n.Level==1?i=i+1:t=t+1});angular.forEach(n.SelectedAvailRegionsItems,function(n){n.Level==1?i=i+1:t=t+1});i>r&&(u.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών Α/βάθμιας","Δεν μπορείτε να επιλέξετε περισσότερες από "+r+" περιοχές Α/βάθμιας"),n.canInsertRegions=!1);t>t&&(u.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών Β/βάθμιας","Δεν μπορείτε να επιλέξετε περισσότερες από "+r+" περιοχές Β/βάθμιας"),n.canInsertRegions=!1)};n.getApplRegions=function(){n.SelectedSpecListItems.length>0?(n.AvailableRegionsListItems=[],n.hasboth?(blockUI({target:"#divBlockUIRegion",animate:!0}),f.postByParams({applicationTypeId:n.applicationType,sex:n.person.Sex,specialities:n.SelectedSpecListItems,personId:n.permanentEEPEBP.PersonId},"/api/ApplicationTypeRegionAndUnit/getApplicationRegionByAppTypeAndBothSubst").then(function(t){angular.copy(t,n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.HasSpecPe70=e("filter")(n.SelectedSpecListItems,{Id:164},!0).length>0?1:0;n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(blockUI({target:"#divBlockUIRegion",animate:!0}),f.postByParams({speco:n.permanentEEPEBP.LevelId,applicationTypeId:n.applicationType,sex:n.person.Sex,specialities:n.SelectedSpecListItems},"/api/ApplicationTypeRegionAndUnit/getApplicationRegionByAppTypeAndLevelSubst").then(function(t){angular.copy(t,n.AvailableRegionsListItems);n.HasSpecPe70=e("filter")(n.SelectedSpecListItems,{Id:164},!0).length>0?1:0;n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}))):(unblockUI("#divBlockUIRegion"),n.AvailableRegionsListItems=[],n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[])};n.removeDuplicatesRegionsForDualList=function(){angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].RegionAndUnitId==t.RegionAndUnitId&&n.AvailableRegionsListItems.splice(i,1)})};n.editPerson=function(){t.setPersonId(n.permanentEEPEBP.PersonId);i.go("stateEditPerson")};n.saveAction=function(t){n.showAlertRegion=f.isEmpty(n.SelectedRegionsListItems)?!0:!1;n.canSave=!0;!n.showAlertRegion&&n.canSave&&n.InsOrUpd(t)};n.InsOrUpd=function(r){var o={PermanentEEPEBP:n.permanentEEPEBP,RegionAndUnit:n.SelectedRegionsListItems,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Status:r},e=o;n.permanentEEPEBP.Id!=null&&n.permanentEEPEBP.Id!=""&&n.permanentEEPEBP.Id!="undefined"?(n.permanentEEPEBP.ModifiedBy=n.authentication.userName,f.postByParams(e,"/api/ApplPermanentEEPEBP/updateApplPermanentEEPEBP").then(function(){t.setPersonId(n.permanentEEPEBP.PersonId);i.go("history")},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα",response)})):(n.permanentEEPEBP.DidacticYearId=n.applicationDidacticYear.Id,n.permanentEEPEBP.CreatedBy=n.authentication.userName,f.postByParams(e,"/api/ApplPermanentEEPEBP/insertApplPermanentEEPEBP").then(function(){t.setPersonId(n.permanentEEPEBP.PersonId);i.go("history")},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα",response)}))}};PermanentEEPEBPController.$inject=["$scope","PassParameters","$state","$stateParams","toaster","GeneralFactory","$filter","$q","PersonFactory"];PermanentMusicController=function(n,t,i,r,u,f,e,o,s){if(n.mess="",n.messInfo="",n.permanentMusic={IsTemporaryStored:!0},n.permanentMusic.LevelId=2,n.person={},n.applicationType=40,n.continueDisabled=!0,n.perspec={},n.Years=[],n.hasValidFekNoConfirmSpeciality=!1,n.alerts="",n.showToConfirmSpeciality=!1,n.selected={Years:[]},n.AvailableRegionsListItems=[],n.SelectedAvailRegionsItems=[],n.SelectedSelectedRegionsListItems=[],n.SelectedRegionsListItems=[],n.SelectedSpecListItems=[],n.AvailableSpecListItems=[],n.SelectedAvailSpecItems=[],n.showAlertRegion=!1,n.DisableDLevel=!1,n.protocol="",n.showProtocol=!1,n.cannotUpdate=!1,n.notActive=!1,n.noUpdAccess=!1,n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.fek={},n.applPerm=[],n.userLevel=0,blockUI({target:"#divBlockUI",animate:!0}),n.canSave=!0,n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},f.isValueInArray(f.getRoleCode(n.authentication.role),"d1, d2")&&(n.userLevel=n.authentication.levelId,n.permanentMusic.LevelId=n.authentication.levelId,n.permanentMusic.IntendancyId=n.authentication.regionAndUnitId),n.authentication.isAuth){var h="permanentMusic";f.getByParams({role:n.authentication.role,codes:h},"/api/Subsystem/NewCheckPermission").then(function(i){var r=h.split(","),s,c;for(s in r)n.pageRules[r[s]]=e("filter")(i,{Code:r[s]},!0)[0].Rules;n.permanentMusic.Id=t.getApplicationId();f.isEmptyValue(n.applicationLevelId)&&(n.applicationLevelId=0);f.isEmptyValue(n.permanentMusic.Id)?(n.step1=!0,n.step2=!1):(n.step1=!1,n.step2=!0);n.applicationLevelId=t.getApplicationLevelId();f.isEmptyValue(n.applicationLevelId)&&(n.applicationLevelId=0);t.resetApplication();n.permanentMusic.PersonId=t.getPersonId();f.isValueInArray(n.pageRules.permanentMusic.CanAccess,"u1, u2")&&(n.permanentMusic.PersonId=n.authentication.personId);c=o.all([f.getByParams({personId:n.permanentMusic.PersonId},"/api/ApplPermanentMusic/getSpecialityForPermanentMusic"),f.getByParams({Id:n.permanentMusic.PersonId},"/api/ApplPermanentMusic/GetApplpermanentMusic"),f.getByParams({personId:n.permanentMusic.PersonId},"/api/Person/checkActivePerson")]);c.then(function(i){var s,o,r;for(angular.copy(i[0],n.AvailableSpecListItems),n.applPerm=i[1],s=i[2],r=n.AvailableSpecListItems.length-1;r>=0;r--)n.AvailableSpecListItems[r].hasApplPerm=0;for(o=n.applPerm.length-1;o>=0;o--)for(r=n.AvailableSpecListItems.length-1;r>=0;r--)n.applPerm[o].MusicSpecialistId==n.AvailableSpecListItems[r].MusicSpecialistId&&n.applPerm[o].SpecialityId==n.AvailableSpecListItems[r].Id&&(n.AvailableSpecListItems[r].hasApplPerm=1);f.isEmpty(n.AvailableSpecListItems)?(n.mess+="<li>Δεν έχετε δικαίωμα υποβολής αίτησης για το συγκεκριμένο κλάδο.<\/li>",n.showAddEditForm=2):s?n.permanentMusic.Id!=null&&n.permanentMusic.Id!=""&&n.permanentMusic.Id!="undefined"?(f.isEmptyValue(n.permanentMusic.SpecialityId)&&(n.permanentMusic.SpecialityId=t.getSpecialityId(),n.permanentMusic.MusicSpecialistId=t.getMusicSpecialistId()),f.getByParams({applicationTypeId:n.applicationType,specialityId:n.permanentMusic.SpecialityId},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(t){n.SelectedSpecListItems=e("filter")(n.AvailableSpecListItems,{Id:n.permanentMusic.SpecialityId,MusicSpecialistId:n.permanentMusic.MusicSpecialistId},!0)[0];!f.isEmptyValue(t)||f.isValueInArray(f.getRoleCode(n.authentication.role),"a")?(n.canUpdateAppl=!0,n.showAddEditForm=1,n.getApplication()):(n.mess+="<li>Δεν μπορείτε να τροποποιήσετε την αίτηση γιατί δεν υπάρχει ανοιχτό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2)},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(n.canInsertAppl=!0,n.showAddEditForm=1):(n.mess+="<li>Δεν έχετε δικαίωμα υποβολής αίτησης γιατί ο φάκελος σας είναι απενεργοποιημένος<\/li>",n.showAddEditForm=2)})},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml");unblockUI("#divBlockUI")})}else i.go("/");f.isValueInArray(f.getRoleCode(n.authentication.role),"d1, d2")&&(n.userLevel=n.authentication.levelId,n.permanentMusic.LevelId=n.authentication.levelId,n.permanentMusic.IntendancyId=n.authentication.regionAndUnitId);n.hasMusicSpeciality=!1;n.hasboth=!1;n.IsCivilServant=!1;n.showCivilServantFull=!1;n.SpecialSupport=!1;n.goToStep=function(t,i,r){t==2?f.getByParams({applicationTypeId:n.applicationType,specialityId:i},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(t){n.SelectedSpecListItems=e("filter")(n.AvailableSpecListItems,{Id:i,MusicSpecialistId:r},!0)[0];n.fek=t;f.isEmptyValue(t)?(n.mess="<li>Δεν υπαρχει ενεργό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2):(n.step1=!1,n.step2=!0,n.permanentMusic.SpecialityId=i,n.permanentMusic.musicSpecialistId=n.SelectedSpecListItems.MusicSpecialistId,blockUI({target:"#divBlockUIForm",animate:!0}),n.doAll())},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.step1=!0,n.step2=!1,n.DisableDLevel=f.isEmpty(n.SelectedSpecListItems)&&f.isEmptyValue(n.permanentMusic.Id)?!1:!0)};n.doAll=function(){if(n.permanentMusic.Id!=null&&n.permanentMusic.Id!=""&&n.permanentMusic.Id!="undefined"){if(n.canUpdateAppl){if(n.permanentMusic.PersonId!=null&&n.permanentMusic.PersonId!=""&&n.permanentMusic.PersonId!="undefined"&&(f.isValueInArray(n.pageRules.permanentMusic.CanAccess,"d1, d2, m1, m2")&&n.permanentMusic.LevelId!=n.authentication.levelId&&(n.canUpdateAppl=!1),!f.isEmpty(n.AvailableSpecListItems))){n.IsDisabled=!n.canUpdateAppl;n.permanentMusic.IsActive||(n.IsDisabled=!0,n.notActive=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.permanentMusic.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0);f.isEmpty(n.permanentMusic.ApplicationPermanentMusicProtocols)||(n.protocol=n.permanentMusic.ApplicationPermanentMusicProtocols[0].ProtocolString,n.showProtocol=!0);var t=o.all([s.getPersonForApplication(n.permanentMusic.PersonId),f.getByParams({id:n.permanentMusic.Id},"api/ApplPermanentMusic/GetApplRegionsByApplId"),f.getByParams({musicSpecialistId:n.permanentMusic.MusicSpecialistId,personId:n.permanentMusic.PersonId},"/api/ApplPermanentMusic/getRegionGaps"),f.getByParams({applicationTypeId:n.applicationType,specialityId:n.permanentMusic.SpecialityId},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality")]);t.then(function(t){n.person=t[0];n.SelectedRegionsListItems=t[1];n.SelectedAvailRegionsItems=t[1];angular.copy(t[2],n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList();n.fek=t[3]},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})}unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")}}else n.canInsertAppl&&n.permanentMusic.PersonId!=null&&n.permanentMusic.PersonId!=""&&n.permanentMusic.PersonId!="undefined"&&(n.AvailableRegionsListItems=[],f.getByParams({id:n.permanentMusic.PersonId},"/api/Person/GetPersonDto").then(function(t){n.person=t;n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),f.getByParams({musicSpecialistId:n.permanentMusic.musicSpecialistId,personId:n.permanentMusic.PersonId},"/api/ApplPermanentMusic/getRegionGaps").then(function(t){n.AvailableRegionsListItems=t;n.removeDuplicatesRegionsForDualList()},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm")};n.getApplication=function(){if(n.permanentMusic.Id!=null&&n.permanentMusic.Id!=""&&n.permanentMusic.Id!="undefined"&&(n.DisableDLevel=!0,n.canUpdateAppl&&n.permanentMusic.PersonId!=null&&n.permanentMusic.PersonId!=""&&n.permanentMusic.PersonId!="undefined")){var t=o.all([f.getByParams({id:n.permanentMusic.Id},"/api/ApplPermanentMusic/GetApplPermanentMusicById")]);t.then(function(t){n.permanentMusic=t[0];n.permanentMusic.LevelId=2;n.doAll()})}};n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[];n.SelectedRegionsListItems=[];n.btnRegionsUp=function(){for(var t,r,u,f=n.SelectedSelectedRegionsListItems,i=0;i<n.SelectedSelectedRegionsListItems.length;i++){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<=0||t>=n.SelectedRegionsListItems.length)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t-1];n.SelectedRegionsListItems[t-1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsDown=function(){for(var t,r,u,i=n.SelectedSelectedRegionsListItems.length-1;i>=0;i--){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<0||t>=n.SelectedRegionsListItems.length-1)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t+1];n.SelectedRegionsListItems[t+1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsRight=function(){angular.forEach(n.SelectedAvailRegionsItems,function(n){this.push(n)},n.SelectedRegionsListItems);angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.btnRegionsLeft=function(){angular.forEach(n.SelectedSelectedRegionsListItems,function(n){this.push(n)},n.AvailableRegionsListItems);angular.forEach(n.SelectedSelectedRegionsListItems,function(t){for(var i=n.SelectedRegionsListItems.length-1;i>=0;i--)n.SelectedRegionsListItems[i].Id==t.Id&&n.SelectedRegionsListItems.splice(i,1)});n.SelectedSelectedRegionsListItems=[];n.SelectedAvailRegionsItems=[]};n.checkRegions=function(){var i=0,t=0,f=60,r=30;n.canInsertRegions=!0;n.SelectedRegionsListItems.length+n.SelectedAvailRegionsItems.length>f&&(u.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών","Δεν μπορείτε να επιλέξετε περισσότερες από "+f+" περιοχές"),n.canInsertRegions=!1);angular.forEach(n.SelectedRegionsListItems,function(n){n.Level==1?i=i+1:t=t+1});angular.forEach(n.SelectedAvailRegionsItems,function(n){n.Level==1?i=i+1:t=t+1});i>r&&(u.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών Α/βάθμιας","Δεν μπορείτε να επιλέξετε περισσότερες από "+r+" περιοχές Α/βάθμιας"),n.canInsertRegions=!1);t>t&&(u.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών Β/βάθμιας","Δεν μπορείτε να επιλέξετε περισσότερες από "+r+" περιοχές Β/βάθμιας"),n.canInsertRegions=!1)};n.getApplRegions=function(){n.SelectedSpecListItems.length>0?(n.AvailableRegionsListItems=[],n.hasboth?(blockUI({target:"#divBlockUIRegion",animate:!0}),f.postByParams({applicationTypeId:n.applicationType,sex:n.person.Sex,specialities:n.SelectedSpecListItems,personId:n.permanentMusic.PersonId},"/api/ApplicationTypeRegionAndUnit/getApplicationRegionByAppTypeAndBothSubst").then(function(t){angular.copy(t,n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.HasSpecPe70=e("filter")(n.SelectedSpecListItems,{Id:164},!0).length>0?1:0;n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(blockUI({target:"#divBlockUIRegion",animate:!0}),f.postByParams({speco:n.permanentMusic.LevelId,applicationTypeId:n.applicationType,sex:n.person.Sex,specialities:n.SelectedSpecListItems},"/api/ApplicationTypeRegionAndUnit/getApplicationRegionByAppTypeAndLevelSubst").then(function(t){angular.copy(t,n.AvailableRegionsListItems);n.HasSpecPe70=e("filter")(n.SelectedSpecListItems,{Id:164},!0).length>0?1:0;n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}))):(unblockUI("#divBlockUIRegion"),n.AvailableRegionsListItems=[],n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[])};n.removeDuplicatesRegionsForDualList=function(){angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)})};n.editPerson=function(){t.setPersonId(n.permanentMusic.PersonId);i.go("stateEditPerson")};n.saveAction=function(t){n.showAlertRegion=f.isEmpty(n.SelectedRegionsListItems)?!0:!1;n.canSave=!0;!n.showAlertRegion&&n.canSave&&n.InsOrUpd(t)};n.InsOrUpd=function(r){var o={PermanentMusic:n.permanentMusic,RegionAndUnit:n.SelectedRegionsListItems,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Status:r,LevelId:n.SelectedSpecListItems.LevelId},e=o;n.permanentMusic.Id!=null&&n.permanentMusic.Id!=""&&n.permanentMusic.Id!="undefined"?(n.permanentMusic.ModifiedBy=n.authentication.userName,f.postByParams(e,"/api/ApplPermanentMusic/updateApplPermanentMusic").then(function(){t.setPersonId(n.permanentMusic.PersonId);i.go("history")},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα",response)})):(n.permanentMusic.DidacticYearId=n.applicationDidacticYear.Id,n.permanentMusic.CreatedBy=n.authentication.userName,f.postByParams(e,"/api/ApplPermanentMusic/insertApplPermanentMusic").then(function(){t.setPersonId(n.permanentMusic.PersonId);i.go("history")},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα",response)}))}};PermanentMusicController.$inject=["$scope","PassParameters","$state","$stateParams","toaster","GeneralFactory","$filter","$q","PersonFactory"];PermanentSMEAController=function(n,t,i,r,u,f,e,o,s){if(n.mess="",n.messInfo="",n.permanentSMEA={IsTemporaryStored:!0},n.permanentSMEA.LevelId=0,n.person={},n.applicationType=27,n.continueDisabled=!0,n.perspec={},n.Years=[],n.hasValidFekNoConfirmSpeciality=!1,n.alerts="",n.showToConfirmSpeciality=!1,n.selected={Years:[]},n.AvailableRegionsListItems=[],n.SelectedAvailRegionsItems=[],n.SelectedSelectedRegionsListItems=[],n.SelectedRegionsListItems=[],n.SelectedSpecListItems=[],n.AvailableSpecListItems=[],n.SelectedAvailSpecItems=[],n.showAlertRegion=!1,n.DisableDLevel=!1,n.protocol="",n.showProtocol=!1,n.cannotUpdate=!1,n.notActive=!1,n.noUpdAccess=!1,n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.fek={},n.applPerm=[],n.userLevel=0,blockUI({target:"#divBlockUI",animate:!0}),n.canSave=!0,n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},f.isValueInArray(f.getRoleCode(n.authentication.role),"d1, d2")&&(n.userLevel=n.authentication.levelId,n.permanentSMEA.LevelId=n.authentication.levelId,n.permanentSMEA.IntendancyId=n.authentication.regionAndUnitId),n.authentication.isAuth){var h="permanentSMEA";f.getByParams({role:n.authentication.role,codes:h},"/api/Subsystem/NewCheckPermission").then(function(i){var r=h.split(","),s,c;for(s in r)n.pageRules[r[s]]=e("filter")(i,{Code:r[s]},!0)[0].Rules;n.permanentSMEA.Id=t.getApplicationId();f.isEmptyValue(n.applicationLevelId)&&(n.applicationLevelId=0);f.isEmptyValue(n.permanentSMEA.Id)?(n.step1=!0,n.step2=!1):(n.step1=!1,n.step2=!0);n.applicationLevelId=t.getApplicationLevelId();f.isEmptyValue(n.applicationLevelId)&&(n.applicationLevelId=0);t.resetApplication();n.permanentSMEA.PersonId=t.getPersonId();f.isValueInArray(n.pageRules.permanentSMEA.CanAccess,"u1, u2")&&(n.permanentSMEA.PersonId=n.authentication.personId);c=o.all([f.getByParams({personId:n.permanentSMEA.PersonId},"/api/ApplPermanentSMEA/getSMEASpecialityForPermanentSMEA"),f.getByParams({Id:n.permanentSMEA.PersonId},"/api/ApplPermanentSMEA/GetApplPermanentSMEA"),f.getByParams({personId:n.permanentSMEA.PersonId},"/api/Person/checkActivePerson")]);c.then(function(i){var s,o,r;for(angular.copy(i[0],n.AvailableSpecListItems),n.applPerm=i[1],s=i[2],r=n.AvailableSpecListItems.length-1;r>=0;r--)n.AvailableSpecListItems[r].hasApplPerm=0;for(o=n.applPerm.length-1;o>=0;o--)for(r=n.AvailableSpecListItems.length-1;r>=0;r--)n.applPerm[o].SpecialityId==n.AvailableSpecListItems[r].Id&&(n.AvailableSpecListItems[r].hasApplPerm=1);f.isEmpty(n.AvailableSpecListItems)?(n.mess+="<li>Δεν έχετε δικαίωμα υποβολής αίτησης για το συγκεκριμένο κλάδο.<\/li>",n.showAddEditForm=2):s?n.permanentSMEA.Id!=null&&n.permanentSMEA.Id!=""&&n.permanentSMEA.Id!="undefined"?(f.isEmptyValue(n.permanentSMEA.SpecialityId)&&(n.permanentSMEA.SpecialityId=t.getSpecialityId()),f.getByParams({applicationTypeId:n.applicationType,specialityId:n.permanentSMEA.SpecialityId},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(t){n.SelectedSpecListItems=e("filter")(n.AvailableSpecListItems,{Id:n.permanentSMEA.SpecialityId},!0)[0];!f.isEmptyValue(t)||f.isValueInArray(f.getRoleCode(n.authentication.role),"a")?(n.canUpdateAppl=!0,n.showAddEditForm=1,n.getApplication()):(n.mess+="<li>Δεν μπορείτε να τροποποιήσετε την αίτηση γιατί δεν υπάρχει ανοιχτό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2)},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(n.canInsertAppl=!0,n.showAddEditForm=1):(n.mess+="<li>Δεν έχετε δικαίωμα υποβολής αίτησης γιατί ο φάκελος σας είναι απενεργοποιημένος<\/li>",n.showAddEditForm=2)})},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml");unblockUI("#divBlockUI")})}else i.go("/");f.isValueInArray(f.getRoleCode(n.authentication.role),"d1, d2")&&(n.userLevel=n.authentication.levelId,n.permanentSMEA.LevelId=n.authentication.levelId,n.permanentSMEA.IntendancyId=n.authentication.regionAndUnitId);n.hasMusicSpeciality=!1;n.hasboth=!1;n.IsCivilServant=!1;n.showCivilServantFull=!1;n.SpecialSupport=!1;n.goToStep=function(t,i){t==2?f.getByParams({applicationTypeId:n.applicationType,specialityId:i},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(t){n.SelectedSpecListItems=e("filter")(n.AvailableSpecListItems,{Id:i},!0)[0];n.fek=t;f.isEmptyValue(t)?(n.mess="<li>Δεν υπαρχει ενεργό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2):(n.step1=!1,n.step2=!0,n.permanentSMEA.SpecialityId=i,blockUI({target:"#divBlockUIForm",animate:!0}),n.doAll())},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.step1=!0,n.step2=!1,n.DisableDLevel=f.isEmpty(n.SelectedSpecListItems)&&f.isEmptyValue(n.permanentSMEA.Id)?!1:!0)};n.doAll=function(){if(n.permanentSMEA.Id!=null&&n.permanentSMEA.Id!=""&&n.permanentSMEA.Id!="undefined"){if(n.canUpdateAppl){if(n.permanentSMEA.PersonId!=null&&n.permanentSMEA.PersonId!=""&&n.permanentSMEA.PersonId!="undefined"&&(f.isValueInArray(n.pageRules.permanentSMEA.CanAccess,"d1, d2, m1, m2")&&n.permanentSMEA.LevelId!=n.authentication.levelId&&(n.canUpdateAppl=!1),!f.isEmpty(n.AvailableSpecListItems))){n.IsDisabled=!n.canUpdateAppl;n.permanentSMEA.IsActive||(n.IsDisabled=!0,n.notActive=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.permanentSMEA.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0);f.isEmpty(n.permanentSMEA.ApplicationPermanentSMEAProtocols)||(n.protocol=n.permanentSMEA.ApplicationPermanentSMEAProtocols[0].ProtocolString,n.showProtocol=!0);var t=o.all([s.getPersonForApplication(n.permanentSMEA.PersonId),f.getByParams({id:n.permanentSMEA.Id},"api/ApplPermanentSMEA/GetApplRegionsByApplId"),f.getByParams({specialityId:n.permanentSMEA.SpecialityId,personId:n.permanentSMEA.PersonId},"/api/ApplPermanentSMEA/getRegionGaps"),f.getByParams({applicationTypeId:n.applicationType,specialityId:n.permanentSMEA.SpecialityId},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality")]);t.then(function(t){n.person=t[0];n.SelectedRegionsListItems=t[1];n.SelectedAvailRegionsItems=t[1];angular.copy(t[2],n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList();n.fek=t[3]},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})}unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")}}else n.canInsertAppl&&n.permanentSMEA.PersonId!=null&&n.permanentSMEA.PersonId!=""&&n.permanentSMEA.PersonId!="undefined"&&(n.AvailableRegionsListItems=[],f.getByParams({id:n.permanentSMEA.PersonId},"/api/Person/GetPersonDtoSmea").then(function(t){n.person=t;n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),f.getByParams({specialityId:n.permanentSMEA.SpecialityId,personId:n.permanentSMEA.PersonId},"/api/ApplPermanentSMEA/getRegionGaps").then(function(t){n.AvailableRegionsListItems=t;n.removeDuplicatesRegionsForDualList()},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm")};n.getApplication=function(){if(n.permanentSMEA.Id!=null&&n.permanentSMEA.Id!=""&&n.permanentSMEA.Id!="undefined"&&(n.DisableDLevel=!0,n.canUpdateAppl&&n.permanentSMEA.PersonId!=null&&n.permanentSMEA.PersonId!=""&&n.permanentSMEA.PersonId!="undefined")){var t=o.all([f.getByParams({id:n.permanentSMEA.Id},"/api/ApplPermanentSMEA/GetApplPermanentSMEAById")]);t.then(function(t){n.permanentSMEA=t[0];n.doAll()})}};n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[];n.SelectedRegionsListItems=[];n.btnRegionsUp=function(){for(var t,r,u,f=n.SelectedSelectedRegionsListItems,i=0;i<n.SelectedSelectedRegionsListItems.length;i++){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<=0||t>=n.SelectedRegionsListItems.length)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t-1];n.SelectedRegionsListItems[t-1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsDown=function(){for(var t,r,u,i=n.SelectedSelectedRegionsListItems.length-1;i>=0;i--){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<0||t>=n.SelectedRegionsListItems.length-1)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t+1];n.SelectedRegionsListItems[t+1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsRight=function(){angular.forEach(n.SelectedAvailRegionsItems,function(n){this.push(n)},n.SelectedRegionsListItems);angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.btnRegionsLeft=function(){angular.forEach(n.SelectedSelectedRegionsListItems,function(n){this.push(n)},n.AvailableRegionsListItems);angular.forEach(n.SelectedSelectedRegionsListItems,function(t){for(var i=n.SelectedRegionsListItems.length-1;i>=0;i--)n.SelectedRegionsListItems[i].Id==t.Id&&n.SelectedRegionsListItems.splice(i,1)});n.SelectedSelectedRegionsListItems=[];n.SelectedAvailRegionsItems=[]};n.checkRegions=function(){var i=0,t=0,f=60,r=30;n.canInsertRegions=!0;n.SelectedRegionsListItems.length+n.SelectedAvailRegionsItems.length>f&&(u.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών","Δεν μπορείτε να επιλέξετε περισσότερες από "+f+" περιοχές"),n.canInsertRegions=!1);angular.forEach(n.SelectedRegionsListItems,function(n){n.Level==1?i=i+1:t=t+1});angular.forEach(n.SelectedAvailRegionsItems,function(n){n.Level==1?i=i+1:t=t+1});i>r&&(u.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών Α/βάθμιας","Δεν μπορείτε να επιλέξετε περισσότερες από "+r+" περιοχές Α/βάθμιας"),n.canInsertRegions=!1);t>t&&(u.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών Β/βάθμιας","Δεν μπορείτε να επιλέξετε περισσότερες από "+r+" περιοχές Β/βάθμιας"),n.canInsertRegions=!1)};n.getApplRegions=function(){n.SelectedSpecListItems.length>0?(n.AvailableRegionsListItems=[],n.hasboth?(blockUI({target:"#divBlockUIRegion",animate:!0}),f.postByParams({applicationTypeId:n.applicationType,sex:n.person.Sex,specialities:n.SelectedSpecListItems,personId:n.permanentSMEA.PersonId},"/api/ApplicationTypeRegionAndUnit/getApplicationRegionByAppTypeAndBothSubst").then(function(t){angular.copy(t,n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.HasSpecPe70=e("filter")(n.SelectedSpecListItems,{Id:164},!0).length>0?1:0;n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(blockUI({target:"#divBlockUIRegion",animate:!0}),f.postByParams({speco:n.permanentSMEA.LevelId,applicationTypeId:n.applicationType,sex:n.person.Sex,specialities:n.SelectedSpecListItems},"/api/ApplicationTypeRegionAndUnit/getApplicationRegionByAppTypeAndLevelSubst").then(function(t){angular.copy(t,n.AvailableRegionsListItems);n.HasSpecPe70=e("filter")(n.SelectedSpecListItems,{Id:164},!0).length>0?1:0;n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}))):(unblockUI("#divBlockUIRegion"),n.AvailableRegionsListItems=[],n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[])};n.removeDuplicatesRegionsForDualList=function(){angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)})};n.editPerson=function(){t.setPersonId(n.permanentSMEA.PersonId);i.go("stateEditPerson")};n.saveAction=function(t){n.showAlertRegion=f.isEmpty(n.SelectedRegionsListItems)?!0:!1;n.canSave=!0;!n.showAlertRegion&&n.canSave&&n.InsOrUpd(t)};n.InsOrUpd=function(r){var o={PermanentSMEA:n.permanentSMEA,RegionAndUnit:n.SelectedRegionsListItems,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Status:r,LevelId:n.SelectedSpecListItems.LevelId},e=o;n.permanentSMEA.Id!=null&&n.permanentSMEA.Id!=""&&n.permanentSMEA.Id!="undefined"?(n.permanentSMEA.ModifiedBy=n.authentication.userName,f.postByParams(e,"/api/ApplPermanentSMEA/updateApplPermanentSMEA").then(function(){t.setPersonId(n.permanentSMEA.PersonId);i.go("history")},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα",response)})):(n.permanentSMEA.DidacticYearId=n.applicationDidacticYear.Id,n.permanentSMEA.CreatedBy=n.authentication.userName,f.postByParams(e,"/api/ApplPermanentSMEA/insertApplPermanentSMEA").then(function(){t.setPersonId(n.permanentSMEA.PersonId);i.go("history")},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα",response)}))}};PermanentSMEAController.$inject=["$scope","PassParameters","$state","$stateParams","toaster","GeneralFactory","$filter","$q","PersonFactory"];PersonComments=function(n,t,i,r,u,f,e,o,s,h){n.authentication.isAuth||i.go("/");var c=t.getPersonId();n.labelButton="Υποβολή Παρατήρησης";n.percommentsList={};n.percomments={};n.percomments.PersonId=c;n.personWithcomments=!1;h.getPersonAttributesForMenu(c).then(function(t){n.personAttributesForMenu=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Υπήρξε πρόβλημα κατά την φόρτωση του μενού")});u.getByParams({Id:c},"/api/Person/GetPersonDto").then(function(t){n.person=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των προσωπικών στοιχείων.")});u.getByParams({personId:c},"/api/personComments/getPersonComments").then(function(t){n.percommentsList=t;u.isEmptyValue(n.percommentsList)||(n.personWithcomments=!0)},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των στοιχείων ελέγχου.")});n.actionsForPerson=function(n){t.setPersonId(c);switch(n){case"Αναπληρωτή":i.go("substitute");break;case"Ωρομισθίου":i.go("hourlyteacher");break;case"Αναπληρωτή ΣΜΕΑΕ":i.go("substitutesmea");break;case"Ωρομισθίου ΣΜΕΑΕ":i.go("hourlyteachersmea");break;case"Αναπληρωτή σε Μουσικά Σχολεία":i.go("substitutemusic");break;case"Ωρομισθίου σε Μουσικά Σχολεία":i.go("hourlyteachermusic");break;case"Απόσπασης":i.go("secondmentapplicationpyspdechurch");break;case"Απόσπασης ΣΜΕΑΕ":i.go("secondmentapplicationpyspdesmea");break;case"Απόσπασης ΕΕΠ - ΕΒΠ":i.go("secondmentapplicationeepebp");break;case"Απόσπασης σε Φορέα":i.go("secondmentapplicationbody");break;case"Απόσπασης σε Καλλιτεχνικά Σχολεία":i.go("secondmentapplicationartistic");break;case"Απόσπασης σε Μουσικά Σχολεία":i.go("secondmentapplicationmusic");break;case"Ιστορικό Αιτήσεων":i.go("history");break;case"Έλεγχος Γνησιότητας":i.go("confirmation");break;case"Παρατηρήσεις":i.go("comments");break;case"Περιφερειακοί Διευθυντές Εκπαίδευσης":i.go("prefecture");break;case"Διευθυντές Εκπαίδευσης":i.go("intendancy");break;case"Απόσπασης σε Κ.Ε.Σ.Υ. με εξειδίκευση στη συμβουλευτική και στον επαγγελματικό προσανατολισμό":i.go("secondmentapplicationkesy");break;case"Ωρομισθίου σε Μουσικά Σχολεία  για κλάδο ΕΜ16.00":i.go("hourlyteachermusicforEM16")}};n.visible=!1;n.toggle=function(){n.visible=!n.visible};n.return=function(){n.toggle();i.go("comments");c!=null&&(n.percomments={},n.percomments.PersonId=c)};n.chechForInsertUpdate=function(){n.canInsertUpdate=!1;n.percomments.Comments!=null&&(n.canInsertUpdate=!0)};n.saveAction=function(){n.chechForInsertUpdate();n.canInsertUpdate?(typeof n.percomments.Id!="undefined"&&n.percomments.Id>0?(n.percomments.ModifiedBy=n.authentication.userName,n.percomments.ModifiedUserRole=n.authentication.role,n.percomments.ModifiedRegionAndUnitDescription=n.authentication.unitName,u.postByParams(n.percomments,"api/personComments/updatePerComment").then(function(){u.getByParams({personId:c},"/api/personComments/getPersonComments").then(function(t){n.percommentsList=t;n.personWithcomments=u.isEmptyValue(n.percommentsList)?!1:!0},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των πιστοποιητικών που έχουν ελεγχθεί.")})},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την ενημέρωση των στοιχείων")})):(n.percomments.CreatedBy=n.authentication.userName,n.percomments.CreationUserRole=n.authentication.role,n.percomments.CreationRegionAndUnitDescription=n.authentication.unitName,u.postByParams(n.percomments,"api/personComments/insertPerComment").then(function(){u.getByParams({personId:c},"/api/personComments/getPersonComments").then(function(t){n.percommentsList=t;n.personWithcomments=u.isEmptyValue(n.percommentsList)?!1:!0},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των πιστοποιητικών που έχουν ελεγχθεί.")})},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την εισαγωγή των στοιχείων")})),n.toggle(),c!=null&&(n.percomments={},n.percomments.PersonId=c)):r.pop("error","Παρουσιάστηκε σφάλμα","Παρακαλώ συμπληρώστε όλα τα υποχρεωτικά πεδία.")};n.insert=function(){n.labelButton="Υποβολή Παρατήρησης";n.toggle()};n.edit=function(t){n.labelButton="Ενημέρωση";u.getByParams({Id:t},"/api/personComments/getPersonCommentsById").then(function(t){n.percomments=t;n.toggle()},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των προσωπικών στοιχείων.")})};n.delPerComment;n.openModal=function(t){n.delPerComment=t};n.delPersonComment=function(t){var i={Id:t.Id,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName};u.postByParams(i,"api/personComments/disablePerComment").then(function(){u.getByParams({personId:c},"/api/personComments/getPersonComments").then(function(t){n.percommentsList=t;n.personWithcomments=u.isEmptyValue(n.percommentsList)?!1:!0},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των πιστοποιητικών που έχουν ελεγχθεί.")});r.pop("success","Η αλλαγή τροποποιήθηκε με επιτυχία","Το πιστοποποητικό απενεργοποιήθηκε")},function(){r.pop("error","Παρουσιάστηκε σφάλμα",response)})};n.minDate="01/01/1900";n.formats=["dd/MM/yyyy"];n.format=n.formats[0];n.today=function(){};n.today();n.clear=function(){n.dt=null};n.disabled=function(n,t){return t==="day"&&(n.getDay()===0||n.getDay()===6)};n.toggleMin=function(){n.minDate=n.minDate?null:new Date};n.toggleMin();n.open=function(t,i){t.preventDefault();t.stopPropagation();n[i]=!0};n.dateOptions={formatYear:"yy",startingDay:1}};PersonComments.$inject=["$scope","PassParameters","$state","toaster","GeneralFactory","$filter","DTOptionsBuilder","DTColumnBuilder","$q","LandingPageFactory"];PrefectureController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v){function y(){a.getByAll("/api/Prefecture/positiveNegativeAnswers").then(function(t){n.positiveNegative=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function g(){a.getByAll("/api/Prefecture/languageLevels").then(function(t){n.languageLevel=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function nt(){a.getByAll("/api/Dbo/getLanguages").then(function(t){n.languages=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function tt(){a.getByAll("/api/Prefecture/getAdministrationStaff").then(function(t){n.administrationStaff=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function it(){a.getByParams({level:n.prefecture.LevelId},"/api/RegionAndUnit/getPyspdeByLevel").then(function(t){n.consts.pyspdeRegionJoin=t;n.consts.pyspdeRegionAndUnit=i("filter")(t,function(n){return n.Description!="Υπό Μετακίνηση"})},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function rt(){c.getPyspdeWithoutJointExaminationByLevel(n.applicationType,n.prefecture.LevelId).then(function(t){n.consts.pyspde=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function b(){var t=f.all([a.getByParams({applicationId:n.prefecture.Id},"/api/Prefecture/getServicesWithDetailsById"),a.getByParams({applicationId:n.prefecture.Id},"/api/Prefecture/getHoursServicesWithDetailsById")]);t.then(function(t){n.personServices=t[0];n.personHoursServices=t[1];n.DisabledFek=n.personServices.length>0?!0:!1;n.ShowselectionCriteriaTable.BeforeNomination=i("filter")(n.personServices,{BeforeNomination:1},!0).length>0?!0:!1;n.ShowselectionCriteriaTable.AfterNomination=i("filter")(n.personServices,{BeforeNomination:2},!0).length>0?!0:!1},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των Υπηρετήσεων")})}function ut(){a.getByParams({applicationId:n.prefecture.Id},"/api/Prefecture/getAdminExperienceById").then(function(t){n.personExperiences=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function k(){n.IsDisabled||n.IsDisabledForDE?($("#CertificateMineduTrainingPrograms :input").prop("disabled",!0),$("#SelfTaughtTeaching :input").prop("disabled",!0),$("#MineduTrainer :input").prop("disabled",!0),$("#ResearchPrograms :input").prop("disabled",!0),$("#PersonalWritingBooksISBN :input").prop("disabled",!0),$("#GroupWritingBooksISBN :input").prop("disabled",!0),$("#PersonalScientificPublication :input").prop("disabled",!0),$("#GroupScientificPublication :input").prop("disabled",!0),$("#PersonalMineduContributions :input").prop("disabled",!0),$("#GroupMineduContributions :input").prop("disabled",!0),$("#StudyProgramsParticipation :input").prop("disabled",!0),$("#InterviewPoints :input").prop("disabled",!0),$("#CertificateMineduTrainingPrograms").parent().find(".input-group-btn button").prop("disabled",!0),$("#SelfTaughtTeaching").parent().find(".input-group-btn button").prop("disabled",!0),$("#MineduTrainer").parent().find(".input-group-btn button").prop("disabled",!0),$("#ResearchPrograms").parent().find(".input-group-btn button").prop("disabled",!0),$("#PersonalWritingBooksISBN").parent().find(".input-group-btn button").prop("disabled",!0),$("#GroupWritingBooksISBN").parent().find(".input-group-btn button").prop("disabled",!0),$("#PersonalScientificPublication").parent().find(".input-group-btn button").prop("disabled",!0),$("#GroupScientificPublication").parent().find(".input-group-btn button").prop("disabled",!0),$("#PersonalMineduContributions").parent().find(".input-group-btn button").prop("disabled",!0),$("#GroupMineduContributions").parent().find(".input-group-btn button").prop("disabled",!0),$("#StudyProgramsParticipation").parent().find(".input-group-btn button").prop("disabled",!0),$("#InterviewPoints").parent().find(".input-group-btn button").prop("disabled",!0)):($("#CertificateMineduTrainingPrograms :input").prop("disabled",!1),$("#SelfTaughtTeaching :input").prop("disabled",!1),$("#MineduTrainer :input").prop("disabled",!1),$("#ResearchPrograms :input").prop("disabled",!1),$("#PersonalWritingBooksISBN :input").prop("disabled",!1),$("#GroupWritingBooksISBN :input").prop("disabled",!1),$("#PersonalScientificPublication :input").prop("disabled",!1),$("#GroupScientificPublication :input").prop("disabled",!1),$("#PersonalMineduContributions :input").prop("disabled",!1),$("#GroupMineduContributions :input").prop("disabled",!1),$("#StudyProgramsParticipation :input").prop("disabled",!1),$("#InterviewPoints :input").prop("disabled",!1),$("#CertificateMineduTrainingPrograms").parent().find(".input-group-btn button").prop("disabled",!1),$("#SelfTaughtTeaching").parent().find(".input-group-btn button").prop("disabled",!1),$("#MineduTrainer").parent().find(".input-group-btn button").prop("disabled",!1),$("#ResearchPrograms").parent().find(".input-group-btn button").prop("disabled",!1),$("#PersonalWritingBooksISBN").parent().find(".input-group-btn button").prop("disabled",!1),$("#GroupWritingBooksISBN").parent().find(".input-group-btn button").prop("disabled",!1),$("#PersonalScientificPublication").parent().find(".input-group-btn button").prop("disabled",!1),$("#GroupScientificPublication").parent().find(".input-group-btn button").prop("disabled",!1),$("#PersonalMineduContributions").parent().find(".input-group-btn button").prop("disabled",!1),$("#GroupMineduContributions").parent().find(".input-group-btn button").prop("disabled",!1),$("#StudyProgramsParticipation").parent().find(".input-group-btn button").prop("disabled",!1),$("#InterviewPoints").parent().find(".input-group-btn button").prop("disabled",!1))}function p(){n.prefecture.SpecialityId==364?(n.prefecture.CertificateTCCLevelA=1,n.disabledCertificateTCCLevelA=!0):n.disabledCertificateTCCLevelA=!1}function d(){a.getByParams({applicationTypeId:n.applicationType},"/api/ApplicationTypeRegionAndUnit/getApplicationRegionByAppType").then(function(t){n.municipalities=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}if(n.prefecture={IsTemporaryStored:!0},n.consts={},n.applicationType=19,n.alerts=[{type:"danger",msg:"Δεν μπορείτε να υποβάλετε αίτηση. Για ήδη υποβληθείσα αίτηση μεταβείτε στο Ιστορικό Αιτήσεων."}],n.pyspe="ΠΥΣΠΕ",n.pysde="ΠΥΣΔΕ",n.protocol="",n.showProtocol=!1,n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.showLevel=!1,n.myfilter={},n.personalStep=!0,n.selectionCriteriaStep=!1,n.regionStep=!1,n.fek={},n.dateForProposal="",n.PyspdeListItems=[],n.prefectureSrv={},n.prefectureHoursSrv={},n.prefectureExp={},n.IsFromInsert=!1,n.SaveEduTechSrvDisabled=!1,n.SaveEduTechHoursSrvDisabled=!1,n.SaveExperienceDisabled=!1,n.IsDisabledForDE=!1,n.disabledCertificateTCCLevelA=!1,n.showAlertLanguages=!1,n.showAlertLanguagesLevel=!1,n.alertLanguages="",n.alertLanguagesLevel="",n.showAlertPostgraduate=!1,n.alertPostgraduate="",n.showAlertLanguagesLevelSelection=!1,n.alertLanguagesLevelSelection="",n.showAlertBeforeNomination=!0,n.alertBeforeNomination="",n.showAlertCanInsertDates=!1,n.alertCanInsertDates="",n.DisabledFek=!1,n.showAlertServices=!1,n.alertServices="",n.showAlertHoursServices=!1,n.alertHoursServices="",n.showAlertHours=!1,n.alertHours="",n.AvailableDiseaseListItems=[],n.SelectedAvailDiseaseItems=[],n.AvailablePyspdeListItems=[],n.SelectedAvailPyspdeItems=[],n.SelectedSelectedPyspdeListItems=[],n.SelectedPyspdeListItems=[],n.ShowselectionCriteriaTable={BeforeNomination:!1,AfterNomination:!1},n.Educational={Years:0,Months:0,Days:0},n.TeachingSchool={Years:0,Months:0,Days:0},n.TeachingOther={Years:0,Months:0,Days:0},n.TeachingSchoolForPoints={Years:0,Months:0,Days:0},n.personServices=[],n.personHoursServices=[],n.personExperiences=[],n.showAlertRegions=!1,n.cannotUpdate=!1,n.notActive=!1,n.noUpdAccess=!1,n.PyspdeFormOfficial=0,n.showAlertPyspdeFormOfficial=!1,n.concatPyspde="",n.messagePyspde="",n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.authentication.isAuth){var w="prefecture";a.getByParams({role:n.authentication.role,codes:w},"/api/Subsystem/NewCheckPermission").then(function(t){var r=w.split(","),u,o;for(u in r)n.pageRules[r[u]]=i("filter")(t,{Code:r[u]},!0)[0].Rules;n.prefecture.DidacticYearId=n.applicationDidacticYear.Id;n.prefecture.Id=e.getApplicationId();a.isEmptyValue(n.prefecture.Id)&&(n.IsFromInsert=!0);e.resetApplication();n.prefecture.PersonId=e.getPersonId();a.isValueInArray(n.pageRules.prefecture.CanAccess,"u1, u2")&&(n.prefecture.PersonId=n.authentication.personId);o=f.all([l.isFekValidForApplicationTypeId(n.applicationType),a.getByParams({personId:n.prefecture.PersonId},"/api/Prefecture/canInsertApplication")]);o.then(function(t){n.hasValidFek=t[0];n.fek=t[1];n.fek.Id>0?(n.canInsertAppl=!0,n.prefecture.FekId=n.fek.Id):n.canInsertAppl=!1;n.prefecture.Id!=null&&n.prefecture.Id!=""&&n.prefecture.Id!="undefined"?(n.canUpdateAppl=!0,n.showAddEditForm=1):n.canInsertAppl&&n.hasValidFek?(n.canInsertAppl=!0,n.showAddEditForm=1):n.showAddEditForm=2;n.fek.DisplayModal&&a.isEmptyValue(n.prefecture.Id)?$("#alertModal").modal("show"):n.doAll();a.isEmptyValue(n.prefecture.Id)&&(n.IsDisabled=!n.pageRules.prefecture.CanInsert)})},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else o.go("/");n.getPostingTranferAreas=function(){a.getByAll("/api/RegionAndUnit/getPostingTransferAreas").then(function(t){n.PostingTranferAreas=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.changedRegionAndUnit=function(){n.checkForPostingTransferArea();n.getPostingTranferAreas()};n.checkForPostingTransferArea=function(){n.myfilter=i("filter")(n.OfficialPlacementUnits,{Id:n.prefecture.OfficialRegionAndUnitId},!0)[0];n.myfilter.RegionAndUnitTypeId==8?(n.showPostingTransferArea=!0,n.showLevel=!1,n.prefecture.LevelId=n.myfilter.LevelId):(a.getByAll("/api/Dbo/getLevelsAsync").then(function(t){n.levels=t;n.showLevel=!0},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία φόρτωσης βαθμίδων επιλογής")}),n.showPostingTransferArea=!1,n.prefecture.PostingTransferAreaId=null)};n.changeLevel=function(){it();rt()};n.changePostgraduate=function(){n.prefecture.PostgraduateEducation!=1&&n.prefecture.SecondPostgraduateEducation==1?(n.showAlertPostgraduate=!0,n.alertPostgraduate=[{type:"danger",msg:"Δεν μπορείτε να δηλώσετε δεύτερο μεταπτυχιακό τίτλο εφόσον δεν έχει δηλωθεί ο πρώτος."}]):(n.showAlertPostgraduate=!1,n.alertPostgraduate="")};n.changeService=function(){n.prefectureSrv.TeachingSchoolService==1&&n.prefectureSrv.TeachingOtherService==1?(n.showAlertServices=!0,n.alertServices=[{type:"danger",msg:"Πρέπει να δηλώσετε την Υπηρέτηση είτε ως Διδακτική είτε ως Λοιπή Διδακτική Υπηρεσία."}]):(n.showAlertServices=!1,n.alertServices="")};n.changeBeforeNomination=function(){n.showAlertCanInsertDates=!1;n.alertCanInsertDates="";n.prefectureSrv.BeforeNomination==2?n.prefectureSrv.DateFrom<n.prefecture.NominationDate?(n.showAlertBeforeNomination=!0,n.alertBeforeNomination=[{type:"danger",msg:"Δεν μπορείτε να δηλώσετε για τη συγκεκριμένη υπηρέτηση Ημ/νία Έναρξης μικρότερη απή την Ημ/νία ΦΕΚ Διορισμού."}]):(n.showAlertBeforeNomination=!0,n.alertBeforeNomination=""):n.prefectureSrv.BeforeNomination==1&&(n.prefectureSrv.DateTo>=n.prefecture.NominationDate?(n.showAlertBeforeNomination=!0,n.alertBeforeNomination=[{type:"danger",msg:"Δεν μπορείτε να δηλώσετε για τη συγκεκριμένη υπηρέτηση Ημ/νία Λήξης μεγαλύτερη απή την Ημ/νία ΦΕΚ Διορισμού."}]):(n.showAlertBeforeNomination=!0,n.alertBeforeNomination=""))};n.changeLanguage=function(){!n.prefecture.FirstLanguageId&&n.prefecture.FirstLanguageLevel||!n.prefecture.SecondLanguageId&&n.prefecture.SecondLanguageLevel?(n.showAlertLanguagesLevel=!0,n.alertLanguagesLevel=[{type:"danger",msg:"Θα πρέπει να συμπληρώσετε ξένη γλώσσα"}]):n.prefecture.SecondLanguageId&&!n.prefecture.FirstLanguageId?(n.showAlertLanguagesLevel=!0,n.alertLanguagesLevel=[{type:"danger",msg:"Δεν έχετε συμπληρώσει την 1η ξένη γλώσσα για να μπορέσετε να συμπληρώσετε και τη 2η ξένη γλώσσα"}]):(n.showAlertLanguagesLevel=!1,n.alertLanguagesLevel="");n.prefecture.FirstLanguageLevel==1&&n.prefecture.SecondLanguageLevel==2?(n.showAlertLanguagesLevelSelection=!0,n.alertLanguagesLevelSelection=[{type:"danger",msg:"Η γνώση ξένης γλώσσας επιπέδου Aνώτερου του Β2 εισάγεται ως 1η ξένη γλώσσα."}]):(n.showAlertLanguagesLevelSelection=!1,n.alertLanguagesLevelSelection="");n.prefecture.FirstLanguageId==n.prefecture.SecondLanguageId&&n.prefecture.FirstLanguageId&&n.prefecture.SecondLanguageId?(n.showAlertLanguages=!0,n.alertLanguages=[{type:"danger",msg:"Δεν μπορείτε να εισάγετε την ίδια ξένη γλώσσα ως 1η και 2η επιλογή."}]):(n.showAlertLanguages=!1,n.alertLanguages="")};n.getOfficialPlacementUnits=function(){var t,i;t=n.prefecture.Id!=null&&n.prefecture.Id!=""&&n.prefecture.Id!="undefined"?n.prefecture.OfficialRegionAndUnitId:n.person.OfficialRegionAndUnit.Id;params={OfficialUnitAndRegionId:t,userLevel:n.authentication.levelId};i=f.all([a.getByAll("/api/RegionAndUnit/getRegionAndUnitForPlacement")]);i.then(function(t){n.OfficialPlacementUnits=t[0];for(var i=n.OfficialPlacementUnits.length-1;i>=0;i--)n.OfficialPlacementUnits[i].RegionAndUnitTypeId==7&&(n.OfficialPlacementUnits[i].Description="Π.Δ.Ε. "+n.OfficialPlacementUnits[i].Description);n.changedRegionAndUnit()})};n.doAll=function(){if(n.prefecture.Id!=null&&n.prefecture.Id!=""&&n.prefecture.Id!="undefined"){if(n.canUpdateAppl){n.AvailablePyspdeListItems=[];var t=f.all([a.getByParams({id:n.prefecture.PersonId},"/api/Person/GetEducationalStaffPersonDto"),a.getByParams({id:n.prefecture.Id},"/api/Prefecture/GetPrefectureById")]);t.then(function(t){n.person=t[0];n.prefecture.SpecialityId=t[0].Speciality.Id;n.prefecture=t[1];n.paramsForCheckUpd.personId=n.prefecture.PersonId;n.paramsForCheckUpd.levelUser=n.authentication.levelId;n.paramsForCheckUpd.regionAndUnitId=n.authentication.regionAndUnitId;n.paramsForCheckUpd.userRole=n.authentication.role;n.paramsForCheckUpd.specialityId=n.prefecture.SpecialityId;n.paramsForCheckUpd.applicationLevelId=n.prefecture.LevelId;n.paramsForCheckUpd.applicationTypeId=n.applicationType;n.paramsForCheckUpd.IsActive=n.prefecture.IsActive;n.paramsForCheckUpd.FekId=n.prefecture.FekId;a.postByParams(n.paramsForCheckUpd,"/api/General/checkUpdateSecFromFEKAndUser").then(function(t){n.IsDisabled=!t;n.IsDisabled&&(n.noUpdAccess=!0);a.isValueInArray(n.pageRules.prefecture.CanAccess,"u1, u2")&&n.prefecture.IsActive&&!n.prefecture.IsTemporaryStored&&(n.IsDisabled=!0,n.cannotUpdate=!0);n.prefecture.IsActive||(n.IsDisabled=!0,n.notActive=!0);a.isValueInArray(n.pageRules.prefecture.CanAccess,"d1, d2, p")&&n.prefecture.OfficialRegionAndUnitId!=n.authentication.regionAndUnitId&&(n.IsDisabled=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.prefecture.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0);a.isValueInArray(n.pageRules.prefecture.CanAccess,"d1, d2")&&(n.IsDisabledForDE=!0);n.getOfficialPlacementUnits();y();k();d();b()})})}}else n.canInsertAppl&&n.prefecture.PersonId!=null&&n.prefecture.PersonId!=""&&n.prefecture.PersonId!="undefined"&&(n.AvailablePyspdeListItems=[],a.getByParams({id:n.prefecture.PersonId},"/api/Person/GetEducationalStaffPersonDto").then(function(t){n.person=t;n.prefecture.SpecialityId=t.Speciality.Id;n.prefecture.OfficialRegionAndUnitId=t.OfficialRegionAndUnit.Id;n.prefecture.OfficialPlacementUnitDescription=t.OfficialPlacementUnitDescription;n.prefecture.NominationDate=t.NominationDate;n.prefecture.LevelId=t.OfficialRegionAndUnit.LevelId;n.prefecture.NominationNo=t.NominationNo;n.getOfficialPlacementUnits();y();k();d()},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}))};n.insertSrvAction=function(t){n.prefectureSrv.TeachingSchoolService==1&&n.prefectureSrv.TeachingOtherService==1?(n.showAlertServices=!0,n.alertServices=[{type:"danger",msg:"Πρέπει να δηλώσετε την Υπηρέτηση είτε ως Διδακτική είτε ως Λοιπή Διδακτική Υπηρεσία."}]):(n.showAlertServices=!1,n.alertServices="");!$("#editServiceForm").valid()||n.showAlertServices||n.showAlertCanInsertDates||(n.SaveEduTechSrvDisabled=!0,t.PrefectureApplicationId=n.prefecture.Id,a.isEmptyValue(t.Id)?(t.CreatedBy=n.authentication.userName,t.CreatedUserRole=n.authentication.role,t.CreatedRegionAndUnitDescription=n.authentication.unitName,t.IsFromInsert=n.IsFromInsert,a.postByParams(t,"/api/Prefecture/InsertPrefectureSrv").then(function(t){n.personServices=t.PrefectureEduTeachList;n.DisabledFek=n.personServices.length>0?!0:!1;n.prefecture.EducationalYears=t.Educational.Years;n.prefecture.EducationalMonths=t.Educational.Months;n.prefecture.EducationalDays=t.Educational.Days;n.prefecture.DidacticSchoolYears=t.TeachingSchool.Years;n.prefecture.DidacticSchoolMonths=t.TeachingSchool.Months;n.prefecture.DidacticSchoolDays=t.TeachingSchool.Days;n.prefecture.DidacticOtherYears=t.TeachingOther.Years;n.prefecture.DidacticOtherMonths=t.TeachingOther.Months;n.prefecture.DidacticOtherDays=t.TeachingOther.Days;n.prefecture.DidacticSchoolYearsForPoints=t.TeachingSchoolForPoints.Years;n.prefecture.DidacticSchoolMonthsForPoints=t.TeachingSchoolForPoints.Months;n.prefecture.DidacticSchoolDaysForPoints=t.TeachingSchoolForPoints.Days;n.prefecture.DidacticOtherYearsForPoints=t.TeachingOtherForPoints.Years;n.prefecture.DidacticOtherMonthsForPoints=t.TeachingOtherForPoints.Months;n.prefecture.DidacticOtherDaysForPoints=t.TeachingOtherForPoints.Days;t.canInsertDates?(n.showAlertCanInsertDates=!1,n.alertCanInsertDates="",$("#AddServiceModal").modal("hide"),n.cancelSrv()):(n.showAlertCanInsertDates=!0,n.alertCanInsertDates=[{type:"danger",msg:"Το χρονικό διάστημα της υπηρέτησης που έχετε συμπληρώσει αλληλοεπικαλύπτεται με χρονικά διαστήματα υπηρετήσεων που έχετε ήδη εισάγει."}],n.SaveEduTechSrvDisabled=!1)},function(n){s.pop("error","ΠΡΟΣΟΧΗ",n.data)})):(t.ModifiedBy=n.authentication.userName,t.ModifiedUserRole=n.authentication.role,t.ModifiedRegionAndUnitDescription=n.authentication.unitName,t.IsFromInsert=n.IsFromInsert,a.postByParams(t,"/api/Prefecture/UpdatePrefectureSrv").then(function(t){n.personServices=t.PrefectureEduTeachList;n.DisabledFek=n.personServices.length>0?!0:!1;n.prefecture.EducationalYears=t.Educational.Years;n.prefecture.EducationalMonths=t.Educational.Months;n.prefecture.EducationalDays=t.Educational.Days;n.prefecture.DidacticSchoolYears=t.TeachingSchool.Years;n.prefecture.DidacticSchoolMonths=t.TeachingSchool.Months;n.prefecture.DidacticSchoolDays=t.TeachingSchool.Days;n.prefecture.DidacticOtherYears=t.TeachingOther.Years;n.prefecture.DidacticOtherMonths=t.TeachingOther.Months;n.prefecture.DidacticOtherDays=t.TeachingOther.Days;n.prefecture.DidacticSchoolYearsForPoints=t.TeachingSchoolForPoints.Years;n.prefecture.DidacticSchoolMonthsForPoints=t.TeachingSchoolForPoints.Months;n.prefecture.DidacticSchoolDaysForPoints=t.TeachingSchoolForPoints.Days;n.prefecture.DidacticOtherYearsForPoints=t.TeachingOtherForPoints.Years;n.prefecture.DidacticOtherMonthsForPoints=t.TeachingOtherForPoints.Months;n.prefecture.DidacticOtherDaysForPoints=t.TeachingOtherForPoints.Days;t.canInsertDates?(n.showAlertCanInsertDates=!1,n.alertCanInsertDates="",$("#AddServiceModal").modal("hide"),n.cancelSrv()):(n.showAlertCanInsertDates=!0,n.alertCanInsertDates=[{type:"danger",msg:"Τα χρονικά διαστήματα των υπηρετήσεων δεν πρέπει να αλληλοεπικαλύπτονται."}],n.SaveEduTechSrvDisabled=!1)},function(n){s.pop("error","ΠΡΟΣΟΧΗ",n.data)})))};n.cancelSrv=function(){n.prefectureSrv={};n.SaveEduTechSrvDisabled=!1;n.ShowselectionCriteriaTable.BeforeNomination=i("filter")(n.personServices,{BeforeNomination:1},!0).length>0?!0:!1;n.ShowselectionCriteriaTable.AfterNomination=i("filter")(n.personServices,{BeforeNomination:2},!0).length>0?!0:!1};n.insertHoursSrvAction=function(t){n.prefectureHoursSrv.TeachingSchoolService==1&&n.prefectureHoursSrv.TeachingOtherService==1?(n.showAlertHoursServices=!0,n.alertHoursServices=[{type:"danger",msg:"Πρέπει να δηλώσετε την Υπηρέτηση είτε ως Διδακτική είτε ως Λοιπή Διδακτική Υπηρεσία."}]):(n.showAlertHoursServices=!1,n.alertHoursServices="");a.isEmptyValue(n.prefectureHoursSrv.Years)&&a.isEmptyValue(n.prefectureHoursSrv.Months)&&a.isEmptyValue(n.prefectureHoursSrv.Days)?(n.showAlertHours=!0,n.alertHours=[{type:"danger",msg:"Πρέπει να δηλώσετε στην Υπηρέτηση Ωρομισθίου  Έτη ή Μήνες ή Ημέρες."}]):(n.showAlertHours=!1,n.alertHours="");!$("#editHoursServiceForm").valid()||n.showAlertHoursServices||n.showAlertHours||(n.SaveEduTechHoursSrvDisabled=!0,t.PrefectureApplicationId=n.prefecture.Id,a.isEmptyValue(t.Id)?(t.CreatedBy=n.authentication.userName,t.CreatedUserRole=n.authentication.role,t.CreatedRegionAndUnitDescription=n.authentication.unitName,t.IsFromInsert=n.IsFromInsert,a.postByParams(t,"/api/Prefecture/InsertPrefectureHoursSrv").then(function(t){n.personHoursServices=t.PrefectureHoursEduTeachList;n.prefecture.EducationalYears=t.Educational.Years;n.prefecture.EducationalMonths=t.Educational.Months;n.prefecture.EducationalDays=t.Educational.Days;n.prefecture.DidacticSchoolYears=t.TeachingSchool.Years;n.prefecture.DidacticSchoolMonths=t.TeachingSchool.Months;n.prefecture.DidacticSchoolDays=t.TeachingSchool.Days;n.prefecture.DidacticOtherYears=t.TeachingOther.Years;n.prefecture.DidacticOtherMonths=t.TeachingOther.Months;n.prefecture.DidacticOtherDays=t.TeachingOther.Days;n.prefecture.DidacticSchoolYearsForPoints=t.TeachingSchoolForPoints.Years;n.prefecture.DidacticSchoolMonthsForPoints=t.TeachingSchoolForPoints.Months;n.prefecture.DidacticSchoolDaysForPoints=t.TeachingSchoolForPoints.Days;n.prefecture.DidacticOtherYearsForPoints=t.TeachingOtherForPoints.Years;n.prefecture.DidacticOtherMonthsForPoints=t.TeachingOtherForPoints.Months;n.prefecture.DidacticOtherDaysForPoints=t.TeachingOtherForPoints.Days;$("#AddHoursServiceModal").modal("hide");n.cancelHoursSrv()},function(n){s.pop("error","ΠΡΟΣΟΧΗ",n.data)})):(t.ModifiedBy=n.authentication.userName,t.ModifiedUserRole=n.authentication.role,t.ModifiedRegionAndUnitDescription=n.authentication.unitName,t.IsFromInsert=n.IsFromInsert,a.postByParams(t,"/api/Prefecture/updatePrefectureHoursSrv").then(function(t){n.personHoursServices=t.PrefectureHoursEduTeachList;n.prefecture.EducationalYears=t.Educational.Years;n.prefecture.EducationalMonths=t.Educational.Months;n.prefecture.EducationalDays=t.Educational.Days;n.prefecture.DidacticSchoolYears=t.TeachingSchool.Years;n.prefecture.DidacticSchoolMonths=t.TeachingSchool.Months;n.prefecture.DidacticSchoolDays=t.TeachingSchool.Days;n.prefecture.DidacticOtherYears=t.TeachingOther.Years;n.prefecture.DidacticOtherMonths=t.TeachingOther.Months;n.prefecture.DidacticOtherDays=t.TeachingOther.Days;n.prefecture.DidacticSchoolYearsForPoints=t.TeachingSchoolForPoints.Years;n.prefecture.DidacticSchoolMonthsForPoints=t.TeachingSchoolForPoints.Months;n.prefecture.DidacticSchoolDaysForPoints=t.TeachingSchoolForPoints.Days;n.prefecture.DidacticOtherYearsForPoints=t.TeachingOtherForPoints.Years;n.prefecture.DidacticOtherMonthsForPoints=t.TeachingOtherForPoints.Months;n.prefecture.DidacticOtherDaysForPoints=t.TeachingOtherForPoints.Days;$("#AddHoursServiceModal").modal("hide");n.cancelHoursSrv()},function(n){s.pop("error","ΠΡΟΣΟΧΗ",n.data)})))};n.cancelHoursSrv=function(){n.prefectureHoursSrv={};n.SaveEduTechHoursSrvDisabled=!1};n.insertExpAction=function(t){$("#editExperienceForm ").valid()&&(n.SaveExperienceDisabled=!0,t.PrefectureApplicationId=n.prefecture.Id,a.isEmptyValue(t.Id)?(t.CreatedBy=n.authentication.userName,t.CreatedUserRole=n.authentication.role,t.CreatedRegionAndUnitDescription=n.authentication.unitName,t.IsFromInsert=n.IsFromInsert,a.postByParams(t,"/api/Prefecture/InsertAdministrationExperience").then(function(t){n.personExperiences=t.AdministrationExperiences;t.canInsertDates?(n.showAlertCanInsertDates=!1,n.alertCanInsertDates="",$("#AddExperienceModal").modal("hide"),n.cancelExp()):(n.showAlertCanInsertDates=!0,n.alertCanInsertDates=[{type:"danger",msg:"Τα χρονικά διαστήματα των υπηρετήσεων δεν πρέπει να αλληλοεπικαλύπτονται."}],n.SaveExperienceDisabled=!1)},function(n){s.pop("error","ΠΡΟΣΟΧΗ",n.data)})):(t.ModifiedBy=n.authentication.userName,t.ModifiedUserRole=n.authentication.role,t.ModifiedRegionAndUnitDescription=n.authentication.unitName,t.IsFromInsert=n.IsFromInsert,a.postByParams(t,"/api/Prefecture/UpdateAdministrationExperience").then(function(t){n.personExperiences=t.AdministrationExperiences;t.canInsertDates?(n.showAlertCanInsertDates=!1,n.alertCanInsertDates="",$("#AddExperienceModal").modal("hide"),n.cancelExp()):(n.showAlertCanInsertDates=!0,n.alertCanInsertDates=[{type:"danger",msg:"Το χρονικό διάστημα της διοικητικής εμπειρίας που έχετε συμπληρώσει αλληλοεπικαλύπτεται με χρονικά διαστήματα διοικητικών εμπειριών που έχετε ήδη εισάγει."}],n.SaveExperienceDisabled=!1)},function(n){s.pop("error","ΠΡΟΣΟΧΗ",n.data)})))};n.cancelExp=function(){n.prefectureExp={};n.SaveExperienceDisabled=!1};n.goToSelectionCriteria=function(){u.scrollTo(0,0);var t={Prefecture:n.prefecture,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,IsFromInsert:n.IsFromInsert};$("#PrefectureStep1").valid()&&(y(),n.prefecture.Id!=null&&n.prefecture.Id!=""&&n.prefecture.Id!="undefined"?(n.prefecture.ModifiedBy=n.authentication.userName,a.postByParams(t,"/api/Prefecture/updatePrefecture").then(function(){p();n.personalStep=!1;n.selectionCriteriaStep=!0;n.scientificQualificationsStep=!1;n.administrationExperienceStep=!1;b()}).catch(function(n){s.pop("error","Παρουσιάστηκε σφάλμα",n.data)})):(n.prefecture.DidacticYearId=n.applicationDidacticYear.Id,n.prefecture.CreatedBy=n.authentication.userName,n.prefecture.CreatedUserRole=n.authentication.role,n.prefecture.CreatedRegionAndUnitDescription=n.authentication.unitName,a.postByParams(t,"/api/Prefecture/insertApplPrefecture").then(function(t){n.prefecture.Id=t.Id;n.prefecture.CreationDate=t.CreationDate;n.prefecture.IsActive=t.IsActive;p();n.personalStep=!1;n.selectionCriteriaStep=!0;n.scientificQualificationsStep=!1;n.administrationExperienceStep=!1;n.ShowselectionCriteriaTable.BeforeNomination=i("filter")(n.personServices,{BeforeNomination:1},!0).length>0?!0:!1;n.ShowselectionCriteriaTable.AfterNomination=i("filter")(n.personServices,{BeforeNomination:2},!0).length>0?!0:!1}).catch(function(n){s.pop("error","Παρουσιάστηκε σφάλμα",n.data)})))};n.goToPersonal=function(){n.personalStep=!0;n.selectionCriteriaStep=!1;n.scientificQualificationsStep=!1;n.administrationExperienceStep=!1;u.scrollTo(0,0)};n.goToSelectionSrvs=function(){p();n.personalStep=!1;n.selectionCriteriaStep=!0;n.scientificQualificationsStep=!1;n.administrationExperienceStep=!1;u.scrollTo(0,0)};n.goToScientific=function(){n.personalStep=!1;n.selectionCriteriaStep=!1;n.scientificQualificationsStep=!0;n.administrationExperienceStep=!1;u.scrollTo(0,0)};n.goToExperiences=function(){n.personalStep=!1;n.selectionCriteriaStep=!1;n.scientificQualificationsStep=!1;n.administrationExperienceStep=!0;u.scrollTo(0,0)};n.goToScientificQualifications=function(){u.scrollTo(0,0);var t={Prefecture:n.prefecture,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,IsFromInsert:n.IsFromInsert};$("#PrefectureStep2").valid()&&(n.prefecture.ModifiedBy=n.authentication.userName,a.postByParams(t,"/api/Prefecture/updatePrefecture").then(function(){n.personalStep=!1;n.selectionCriteriaStep=!1;n.scientificQualificationsStep=!0;n.administrationExperienceStep=!1;g();nt()}).catch(function(n){s.pop("error","Παρουσιάστηκε σφάλμα",n.data)}))};n.goToAdministrationExperience=function(){n.prefecture.FirstLanguageId&&!n.prefecture.FirstLanguageLevel||n.prefecture.SecondLanguageId&&!n.prefecture.SecondLanguageLevel?(n.showAlertLanguagesLevel=!0,n.alertLanguagesLevel=[{type:"danger",msg:"Θα πρέπει να συμπληρώσετε και το επίπεδο γνώσης ξένης γλώσσας"}]):n.prefecture.SecondLanguageId&&!n.prefecture.FirstLanguageId?(n.showAlertLanguagesLevel=!0,n.alertLanguagesLevel=[{type:"danger",msg:"Δεν έχετε συμπληρώσει την 1η ξένη γλώσσα για να μπορέσετε να συμπληρώσετε και τη 2η ξένη γλώσσα"}]):(n.showAlertLanguagesLevel=!1,n.alertLanguagesLevel="");u.scrollTo(0,0);var t={Prefecture:n.prefecture,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,IsFromInsert:n.IsFromInsert};!$("#PrefectureStep3").valid()||n.showAlertLanguagesLevel||n.showAlertLanguages||n.showAlertLanguagesLevelSelection||n.showAlertPostgraduate||(n.prefecture.ModifiedBy=n.authentication.userName,a.postByParams(t,"/api/Prefecture/updatePrefecture").then(function(){n.personalStep=!1;n.selectionCriteriaStep=!1;n.scientificQualificationsStep=!1;n.administrationExperienceStep=!0;tt();ut()}).catch(function(n){s.pop("error","Παρουσιάστηκε σφάλμα",n.data)}))};n.saveAction=function(i){var f,h;u.scrollTo(0,0);f={Prefecture:n.prefecture,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,IsFromInsert:n.IsFromInsert,Status:i};$("#PrefectureStep4").valid()&&(i=="final"?(h=t.open({templateUrl:"ModalContent.html",controller:OpenModalController}),h.result.then(function(t){t&&a.postByParams(f,"/api/Prefecture/updatePrefecture").then(function(){e.setPersonId(n.prefecture.PersonId);a.isValueInArray(n.pageRules.prefecture.CanAccess,"u1, u2, c")?o.go("history"):o.go("showapplicationperintendancy")}).catch(function(n){s.pop("error","Παρουσιάστηκε σφάλμα",n.data)})},function(){r.info("Modal dismissed at: "+new Date)})):a.postByParams(f,"/api/Prefecture/updatePrefecture").then(function(){e.setPersonId(n.prefecture.PersonId);a.isValueInArray(n.pageRules.prefecture.CanAccess,"u1, u2, c")?o.go("history"):o.go("showapplicationperintendancy")}).catch(function(n){s.pop("error","Παρουσιάστηκε σφάλμα",n.data)}),n.personalStep=!1,n.selectionCriteriaStep=!1,n.scientificQualificationsStep=!1,n.administrationExperienceStep=!1)};n.fillFormControls=function(t){t=="Srv"?(n.ModalTitle="Προσθήκη Υπηρέτησης",n.prefectureSrv={},n.SaveEduTechSrvDisabled=!1,n.showAlertCanInsertDates=!1,n.alertCanInsertDates="",n.showAlertServices=!1,n.alertServices="",n.showAlertBeforeNomination=!1,n.alertBeforeNomination=""):t=="Exp"?(n.ModalTitle="Προσθήκη Διοικητικής Εμπειρίας",n.prefectureExp={},n.SaveExperienceDisabled=!1,n.showAlertCanInsertDates=!1,n.alertCanInsertDates=""):t=="HoursSrv"&&(n.ModalTitle="Προσθήκη Υπηρέτησης Ωρομισθίου",n.prefectureHoursSrv={},n.SaveEduTechHoursSrvDisabled=!1,n.showAlertHoursServices=!1,n.alertHoursServices="",n.showAlertHours=!1,n.alertHours="")};n.openServiceModal=function(t){blockUI({target:"#tblService",animate:!0});angular.copy(t,n.prefectureSrv);n.ModalTitle="Επεξεργασία Υπηρέτησης";n.SaveEduTechSrvDisabled=!1;n.showAlertCanInsertDates=!1;n.alertCanInsertDates="";n.showAlertServices=!1;n.alertServices="";n.showAlertBeforeNomination=!1;n.alertBeforeNomination="";v(function(){unblockUI("#tblService");$("#AddServiceModal").modal("show")},300)};n.openHoursServiceModal=function(t){blockUI({target:"#tblhoursService",animate:!0});angular.copy(t,n.prefectureHoursSrv);n.ModalTitle="Επεξεργασία Υπηρέτησης Ωρομισθίου";n.SaveEduTechHoursSrvDisabled=!1;n.showAlertHoursServices=!1;n.alertHoursServices="";n.showAlertHours=!1;n.alertHours="";v(function(){unblockUI("#tblhoursService");$("#AddHoursServiceModal").modal("show")},300)};n.openExperienceModal=function(t){blockUI({target:"#tblExperience",animate:!0});angular.copy(t,n.prefectureExp);n.ModalTitle="Επεξεργασία Διοικητικής Εμπειρίας";n.SaveExperienceDisabled=!1;n.showAlertCanInsertDates=!1;n.alertCanInsertDates="";v(function(){unblockUI("#tblExperience");$("#AddExperienceModal").modal("show")},300)};n.DeleteActionSrv=function(t){var i=t;i.ModifiedBy=n.authentication.userName;i.ModifiedUserRole=n.authentication.role;i.ModifiedRegionAndUnitDescription=n.authentication.unitName;a.postByParams(i,"/api/Prefecture/DeletePrefectureEduTeachSrv").then(function(t){n.personServices=t.PrefectureEduTeachList;n.DisabledFek=n.personServices.length>0?!0:!1;n.prefecture.EducationalYears=t.Educational.Years;n.prefecture.EducationalMonths=t.Educational.Months;n.prefecture.EducationalDays=t.Educational.Days;n.prefecture.DidacticSchoolYears=t.TeachingSchool.Years;n.prefecture.DidacticSchoolMonths=t.TeachingSchool.Months;n.prefecture.DidacticSchoolDays=t.TeachingSchool.Days;n.prefecture.DidacticOtherYears=t.TeachingOther.Years;n.prefecture.DidacticOtherMonths=t.TeachingOther.Months;n.prefecture.DidacticOtherDays=t.TeachingOther.Days;n.prefecture.DidacticSchoolYearsForPoints=t.TeachingSchoolForPoints.Years;n.prefecture.DidacticSchoolMonthsForPoints=t.TeachingSchoolForPoints.Months;n.prefecture.DidacticSchoolDaysForPoints=t.TeachingSchoolForPoints.Days;n.prefecture.DidacticOtherYearsForPoints=t.TeachingOtherForPoints.Years;n.prefecture.DidacticOtherMonthsForPoints=t.TeachingOtherForPoints.Months;n.prefecture.DidacticOtherDaysForPoints=t.TeachingOtherForPoints.Days},function(n){s.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.DeleteActionHoursSrv=function(t){var i=t;i.ModifiedBy=n.authentication.userName;i.ModifiedUserRole=n.authentication.role;i.ModifiedRegionAndUnitDescription=n.authentication.unitName;a.postByParams(i,"/api/Prefecture/DeletePrefectureHoursEduTeachSrv").then(function(t){n.personHoursServices=t.PrefectureHoursEduTeachList;n.prefecture.EducationalYears=t.Educational.Years;n.prefecture.EducationalMonths=t.Educational.Months;n.prefecture.EducationalDays=t.Educational.Days;n.prefecture.DidacticSchoolYears=t.TeachingSchool.Years;n.prefecture.DidacticSchoolMonths=t.TeachingSchool.Months;n.prefecture.DidacticSchoolDays=t.TeachingSchool.Days;n.prefecture.DidacticOtherYears=t.TeachingOther.Years;n.prefecture.DidacticOtherMonths=t.TeachingOther.Months;n.prefecture.DidacticOtherDays=t.TeachingOther.Days;n.prefecture.DidacticSchoolYearsForPoints=t.TeachingSchoolForPoints.Years;n.prefecture.DidacticSchoolMonthsForPoints=t.TeachingSchoolForPoints.Months;n.prefecture.DidacticSchoolDaysForPoints=t.TeachingSchoolForPoints.Days;n.prefecture.DidacticOtherYearsForPoints=t.TeachingOtherForPoints.Years;n.prefecture.DidacticOtherMonthsForPoints=t.TeachingOtherForPoints.Months;n.prefecture.DidacticOtherDaysForPoints=t.TeachingOtherForPoints.Days},function(n){s.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.openModalSrv=function(t){n.delPerService=t};n.DeleteActionExp=function(t){var i=t;i.ModifiedBy=n.authentication.userName;i.ModifiedUserRole=n.authentication.role;i.ModifiedRegionAndUnitDescription=n.authentication.unitName;a.postByParams(i,"/api/Prefecture/DeleteAdministrationExperience").then(function(){n.personExperiences.splice(n.personExperiences.indexOf(t),1)},function(n){s.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.openModalExp=function(t){n.delPerExperience=t};n.minDate="01/01/1900";n.maxDate=new Date;n.formats=["dd/MM/yyyy"];n.format=n.formats[0];n.clear=function(){n.dt=null};n.toggleMin=function(){n.minDate=n.minDate?null:new Date};n.toggleMin();n.open=function(t,i){t.preventDefault();t.stopPropagation();n[i]=!0};n.status={opened:!1};n.openDatetimePicker=function(){n.status.opened=!0;n.status.opened1=!0};n.dateOptions={formatYear:"yy",startingDay:1,format:"dd/mm/yyyy"}};PrefectureController.$inject=["$scope","$uibModal","$filter","$log","$window","$q","PassParameters","$state","toaster","PersonFactory","ApplicationTypeRegionAndUnitFactory","ApplicationTypeFekFactory","GeneralFactory","$timeout"];Globalize.culture("el");PrefectureInterviewPointsController=function(n,t,i,r,u){if(n.authentication.isAuth)if(i.isValueInArray(i.getRoleCode(n.authentication.role),"c")){var f="prefecture";i.getByParams({role:n.authentication.role,codes:f},"/api/Subsystem/NewCheckPermission").then(function(t){var i=f.split(",");for(var r in i)n.pageRules[i[r]]=u("filter")(t,{Code:i[r]},!0)[0].Rules},function(){unblockUI("#divBlockUI");t.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else r.go("forbidden");else r.go("/");n.pageRules={};n.filteredNews=[];n.viewby=15;n.currentPage=4;n.itemsPerPage=n.viewby;n.maxSize=5;n.disableButton=!1;n.READ=function(){var r,t,i;n.data=[];n.item={RegistryNo:"",InterviewPoints:""};r=/^([a-zA-Z0-9\s_\\.\-:])+(.xlsx|.xls)$/;t=!1;$("#ngexcelfile").val().toLowerCase().indexOf(".xlsx")>0&&(t=!0);i=new FileReader;i.onload=function(i){var f="",e,o,r,u,s,h;for(i.target.result,e=new Uint8Array(i.target.result),o=e.byteLength,r=0;r<o;r++)f+=String.fromCharCode(e[r]);u=t?XLSX.read(f,{type:"binary"}):XLS.read(f,{type:"binary"});s=u.SheetNames;h=0;s.forEach(function(i){var r,e,o,f;if(r=t?XLSX.utils.sheet_to_json(u.Sheets[i]):XLS.utils.sheet_to_row_object_array(u.Sheets[i]),n.IsNumber=!0,e=angular.isNumber(9,9),o=angular.isNumber(9.9),r.length>0)for(f=0;f<r.length;f++){if(!angular.isNumber(parseFloat(r[f].InterviewPoints))){n.IsNumber=!1;break}n.item={RegistryNo:r[f].RegistryNo,InterviewPoints:parseFloat(r[f].InterviewPoints.toString().replace(",","."))};n.data.push(n.item);n.$apply()}})};t?i.readAsArrayBuffer($("#ngexcelfile")[0].files[0]):i.readAsBinaryString($("#ngexcelfile")[0].files[0])};n.save=function(){var r={ExcelParamsList:n.data,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName},u=r;n.disableButton=!0;n.IsNumber?i.postByParams(u,"/api/Prefecture/UpdateInterviewPoints").then(function(){n.data=[];t.pop("success","Επιτυχής αποθήκευση","Η ενημέρωση των μονάδων προσωπικότητας - γενικής συγκρότησης πραγματοποιήθηκε με επιτυχία",3e3,"trustedHtml");n.disableButton=!1},function(i){t.pop("error"," Παρουσιάστηκε σφάλμα",i.data,5e3,"trustedHtml");n.disableButton=!1}):(t.pop("error"," Παρουσιάστηκε σφάλμα","Παρακαλώ να κάνετε έλεγχο στη στήλη με τα μόρια καθώς δεν αναγνωρίζονται ως αριθμοί",5e3,"trustedHtml"),n.disableButton=!1)};n.setPage=function(t){n.currentPage=t};n.setItemsPerPage=function(t){n.itemsPerPage=t;n.currentPage=1}};PrefectureInterviewPointsController.$inject=["$scope","toaster","GeneralFactory","$state","$filter"];PresenceDatesManagmentController=function(n,t,i,r,u){n.authentication.isAuth?n.authentication.isAuth&&!r.isValueInArray(r.getRoleCode(n.authentication.role),"d1,d2")&&t.go("forbidden"):t.go("/");n.Regions=[];n.RecruitmentProtocolsAll=[];n.SpecialitiesAll=[];n.RecruitmentProtocols=[];n.Specialities=[];n.PresenceDatesInformations=[];n.search={RegionAndUnitId:"",SpecialityId:"",RecruitmentProtocol:""};n.PresenceDatesDetails={};n.showFields={FieldsForCompletion:!1,FieldsForDetails:!1};n.substitute={DueWorkingDays:"",PresenceDateFromPrevious:"",PresenceDateTo:"",PresenceDateFrom:""};n.disableButton=!1;n.minDate=new Date(n.didacticYear.YearFrom+"-09-01");n.maxDate=new Date(n.didacticYear.YearTo,06,30,0,0,0,0);n.formats=["dd/MM/yyyy"];n.format=n.formats[0];n.today=function(){};n.today();n.clear=function(){n.dt=null};n.open=function(t,i){t.preventDefault();t.stopPropagation();n[i]=!0};n.dateOptions={formatYear:"yy",startingDay:1,format:"dd/mm/yyyy"};r.getByParams({regionAndUnitId:n.authentication.regionAndUnitId},"/api/Management/getDetailsForPresenceDates").then(function(t){n.Regions=t.Regions;n.Regions.length==0&&i.pop("error","ΠΡΟΣΟΧΗ","Έχετε ήδη ορίσει προθεσμία ανάληψης υπηρεσίας για τη Διευθυνσή σας.",3e3);n.PresenceDatesInformations=t.PresenceDatesInformations},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");i.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});n.changeRegion=function(){r.isEmptyValue(n.search.RegionAndUnitId)||(n.Specialities=[],n.RecruitmentProtocols=[],n.Specialities=u("filter")(n.PresenceDatesInformations,{RegionAndUnitId:n.search.RegionAndUnitId},!0))};n.changeSpeciality=function(){r.isEmptyValue(n.search.SpecialityId)||(n.RecruitmentProtocols=[],n.RecruitmentProtocols=u("filter")(n.PresenceDatesInformations,{RegionAndUnitId:n.search.RegionAndUnitId,SpecialityId:n.search.SpecialityId},!0))};n.searchAction=function(){n.DueWorkingDays=0;n.showFields.FieldsForCompletion=!1;n.showFields.FieldsForDetails=!1;r.isEmptyValue(n.search.RegionAndUnitId)||r.isEmptyValue(n.search.SpecialityId)||r.isEmptyValue(n.search.RecruitmentProtocol.RecruitmentProtocol)?i.pop("error","ΠΡΟΣΟΧΗ","Πρέπει να συμπληρώσετε όλα τα υποχρεωτικά πεδία"):(n.PresenceDatesDetails=u("filter")(n.PresenceDatesInformations,{SpecialityId:n.search.SpecialityId,RegionAndUnitId:n.search.RegionAndUnitId,RecruitmentProtocol:n.search.RecruitmentProtocol.RecruitmentProtocol},!0)[0],r.isEmptyValue(n.PresenceDatesDetails)?i.pop("error","ΠΡΟΣΟΧΗ","Ο συνδυασμός που επιλέξατε δεν επιστρέφει αποτελέσματα"):(n.DueWorkingDays=n.PresenceDatesDetails.DueWorkingDays,n.showFields.FieldsForCompletion=!0))};n.changePresenceDateFrom=function(){n.showFields.FieldsForDetails=!1;var t={DidacticYear:n.didacticYear,PresenceDateFromPrevious:n.substitute.PresenceDateFromPrevious,DueWorkingDays:n.DueWorkingDays};r.postByParams(t,"/api/RecruitmentServiceAssumed/CalculatePresenceDateTo").then(function(t){n.substitute.PresenceDateTo=t.PresenceDateTo;n.substitute.PresenceDateFrom=t.PresenceDateFrom;n.showFields.FieldsForDetails=!0},function(){i.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα κατά τον υπολογισμό του διαστήματος για την προθεσμία ανάληψης")})};n.saveAction=function(){if(r.isEmptyValue(n.substitute.PresenceDateFrom)||r.isEmptyValue(n.substitute.PresenceDateTo))n.disableButton=!1,i.pop("error","ΠΡΟΣΟΧΗ","Δεν έχετε συμπληρώσει όλα τα απαραίτητα πεδία");else{n.disableButton=!0;var t={PresenceDateFrom:n.substitute.PresenceDateFrom,PresenceDateTo:n.substitute.PresenceDateTo,PresenceDatesInformation:n.PresenceDatesDetails,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName};r.postByParams(t,"/api/RecruitmentServiceAssumed/UpdatePresenceDatesForSubstitute").then(function(){i.pop("success","Ενημέρωση","Η καταχώριση της προθεσμίας πραγματοποιήθηκε με επιτυχία");r.getByParams({regionAndUnitId:n.authentication.regionAndUnitId},"/api/Management/getDetailsForPresenceDates").then(function(t){n.Regions=t.Regions;n.Regions.length==0&&i.pop("error","ΠΡΟΣΟΧΗ","Έχετε ήδη ορίσει προθεσμία ανάληψης υπηρεσίας για τη Διευθυνσή σας.",3e3);n.PresenceDatesInformations=t.PresenceDatesInformations;n.changeRegion();n.changeSpeciality()},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");i.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});n.disableButton=!1;n.showFields.FieldsForDetails=!1;n.showFields.FieldsForCompletion=!1;n.substitute={DueWorkingDays:"",PresenceDateTo:"",PresenceDateFrom:""}},function(t){n.disableButton=!1;i.pop("error","ΠΡΟΣΟΧΗ",t.data)})}};n.cancel=function(){n.showFields={FieldsForCompletion:!1,FieldsForDetails:!1};n.substitute={DueWorkingDays:"",PresenceDateTo:"",PresenceDateFrom:""};n.DueWorkingDays="";n.disableButton=!1}};PresenceDatesManagmentController.$inject=["$scope","$state","toaster","GeneralFactory","$filter","$q"];PrintSecondmentRequestController=function(n,t,i,r){n.RegionAndUnits=[];n.AvailableRegionsListItems=[];n.SelectedRegionsListItems=[];n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[];n.RegionAndUnitSelected={selected:""};n.GeneralMusic="general";i.getByAll("api/RegionAndUnit/getMusicRegionAndUnitsForPrint").then(function(t){n.RegionAndUnits=t;n.AvailableRegionsListItems=n.RegionAndUnits;n.SelectedRegionsListItems=[]},function(n){r.pop("error","Μήνυμα λάθους",n.data)});n.btnRegionsRight=function(){angular.forEach(n.SelectedAvailRegionsItems,function(n){this.push(n)},n.SelectedRegionsListItems);angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.btnRegionsLeft=function(){angular.forEach(n.SelectedSelectedRegionsListItems,function(n){this.push(n)},n.AvailableRegionsListItems);angular.forEach(n.SelectedSelectedRegionsListItems,function(t){for(var i=n.SelectedRegionsListItems.length-1;i>=0;i--)n.SelectedRegionsListItems[i].Id==t.Id&&n.SelectedRegionsListItems.splice(i,1)});n.SelectedSelectedRegionsListItems=[];n.SelectedAvailRegionsItems=[]};n.btnRegionsUp=function(){for(var t,r,u,f=n.SelectedSelectedRegionsListItems,i=0;i<n.SelectedSelectedRegionsListItems.length;i++){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<=0||t>=n.SelectedRegionsListItems.length)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t-1];n.SelectedRegionsListItems[t-1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsDown=function(){for(var t,r,u,i=n.SelectedSelectedRegionsListItems.length-1;i>=0;i--){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<0||t>=n.SelectedRegionsListItems.length-1)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t+1];n.SelectedRegionsListItems[t+1]=r;n.SelectedRegionsListItems[t]=u}};n.generatePDFs=function(){var u=n.RegionAndUnitSelected.selected.Id,t=n.GeneralMusic;params={regionAndUnitIds:Object.values(n.SelectedRegionsListItems).map(function(n){return n.Id}),generalMusic:t};i.postByParams(params,"/api/SecondmentMusic/getMassSecondmentMusicsApplications").then(function(n){var t=new Date;pdfMake.createPdf(n).download("export_"+Date.parse(t)+".pdf");unblockUI("#blockui_loading");r.pop("success","Εξαγωγή σε PDF","Το αρχείο export_"+Date.parse(t)+".pdf δημιουργήθηκε με επιτυχία.")},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}};PrintSecondmentRequestController.$inject=["$scope","$state","GeneralFactory","toaster"];ProfileMenuController=function(n,t,i,r,u,f,e){var o,s,h;n.authentication.isAuth||t.go("/");n.person={};n.ActiveMenu={helpIsActive:"",settingsIsActive:"",profileIsActive:""};n.savedPasswordSuccessfully=!1;n.messagePassword="";n.changePasswordData={userId:n.authentication.userId,oldPassword:"",newPassword:"",confirmPassword:""};n.savedEmailSuccessfully=!1;n.messageEmail="";n.changeEmailData={userId:n.authentication.userId,personId:n.authentication.personId,newEmail:"",confirmEmail:""};n.SelectedMenu=function(t){t=="Help"?(n.ActiveMenu.helpIsActive="active",n.ActiveMenu.settingsIsActive="",n.ActiveMenu.profileIsActive=""):t=="Settings"?(n.ActiveMenu.helpIsActive="",n.ActiveMenu.settingsIsActive="active",n.ActiveMenu.profileIsActive=""):(n.ActiveMenu.helpIsActive="",n.ActiveMenu.settingsIsActive="",n.ActiveMenu.profileIsActive="active")};o=n.authentication.personId;r.isValueInArray(r.getRoleCode(n.authentication.role),"u1, u2")?n.ActiveMenu.settingsIsActive="active":n.ActiveMenu.profileIsActive="active";r.getByParams({Id:o},"/api/Person/GetInsUpdPersonDto").then(function(t){n.person=t},function(){i.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των προσωικών στοιχείων")});n.saveAction=function(t){$("#editPerson").valid()&&(t.RegionAndUnitDescription=n.authentication.unitName,t.UserRole=n.authentication.role,r.postByParams(t,"/api/Person/save").then(function(){i.pop("success","Αλλαγή προφίλ","Το προφιλ σας ενημερώθηκε με επιτυχία",3e3,"trustedHtml")}).catch(function(n){i.pop("error","Παρουσιάστηκε σφάλμα",n.data)}))};n.minDate="01/01/1900";n.maxNationalityDate=new Date;n.formats=["dd/MM/yyyy"];n.format=n.formats[0];n.clear=function(){n.dt=null};n.toggleMin=function(){n.minDate=n.minDate?null:new Date};n.toggleMin();n.open=function(t,i){t.preventDefault();t.stopPropagation();n[i]=!0};n.dateOptions={formatYear:"yy",startingDay:1,format:"dd/mm/yyyy"};n.changePassword=function(){e.changePassword(n.changePasswordData).then(function(){n.messagePassword="";n.changePasswordData={userId:n.authentication.userId,oldPassword:"",newPassword:"",confirmPassword:""};i.pop("success","Αλλαγή κωδικού","Η αλλαγή του κωδικού σας έγινε με επιτυχία!",3e3,"trustedHtml");s()},function(t){var u=[],r,i;for(r in t.data.ModelState)for(i=0;i<t.data.ModelState[r].length;i++)u.push(t.data.ModelState[r][i]);n.messagePassword=u.join("<br />")})};s=function(){var n=f(function(){f.cancel(n);t.go("/")},2e3)};h=function(){var t=f(function(){f.cancel(t);n.logOut()},2e3)};n.changeEmail=function(){e.changeEmail(n.changeEmailData).then(function(){n.changeEmailData={userId:n.authentication.userId,personId:n.authentication.personId,newEmail:"",confirmEmail:""};i.pop("success","Αλλαγή email","Η αλλαγή στο email σας έγινε με επιτυχία!",3e3,"trustedHtml");h()},function(t){var u=[],r,i;for(r in t.data.ModelState)for(i=0;i<t.data.ModelState[r].length;i++)u.push(t.data.ModelState[r][i]);n.messageEmail=u.join("<br />")})}};ProfileMenuController.$inject=["$scope","$state","toaster","GeneralFactory","$q","$timeout","AuthService"];QualificationsController=function(n,t,i,r,u,f,e,o,s){function h(){!n.pageRules.folder.CanUpdate||u.isValueInArray(u.getRoleCode(n.authentication.role),"u1, u2")?($("#Hours :input").prop("disabled",!0),$("#Hours").parent().find(".input-group-btn button").prop("disabled",!0)):n.IsDisable||n.DisableAllSeminarForm?($("#Hours :input").prop("disabled",!0),$("#Hours").parent().find(".input-group-btn button").prop("disabled",!0)):($("#Hours :input").prop("disabled",!1),$("#Hours").parent().find(".input-group-btn button").prop("disabled",!1))}function l(){return dto={PersonId:n.person.Id,GreekLanguage:n.person.GreekLanguage,CertificateGreekLanguage:n.person.CertificateGreekLanguage,PedagogicalEducation:n.person.PedagogicalEducation,PedagogicalCompetencyId:n.person.PedagogicalCompetencyId,BraileKnowledge:n.person.BraileKnowledge,SignKnowledge:n.person.SignKnowledge,PersonCertificate:{Id:u.isEmptyValue(n.personCertificate)?"":n.personCertificate.Id,HasCertificate:n.HasCertificate==1?!0:!1,ComputerCertificate:u.isEmptyValue(n.computerCertificate.selected.Id)?"":n.computerCertificate.selected.Id,IsComputerCertificateConfirmed:u.isEmptyValue(n.personCertificate)?"":n.personCertificate.IsComputerCertificateConfirmed},IsPedagogicalEducationConfirmed:n.person.IsPedagogicalEducationConfirmed,IsCertificateGreekLanguageConfirmed:n.person.IsCertificateGreekLanguageConfirmed,IsGreekLanguageConfirmed:n.person.IsGreekLanguageConfirmed,IsBraileKnowledgeConfirmed:n.person.IsBraileKnowledgeConfirmed,IsSignKnowledgeConfirmed:n.person.IsSignKnowledgeConfirmed,UserRole:"",RegionAndUnitDescription:"",Nationality:n.person.Nationality,NationalityCountryId:u.isEmptyValue(n.person.NationalityCountryId)?null:n.person.NationalityCountryId,GreekNationalityDate:u.isEmptyValue(n.person.GreekNationalityDate)?null:n.person.GreekNationalityDate}}function a(){if(dto={Id:u.isEmptyValue(n.perlanguage.Id)?"":n.perlanguage.Id,PersonId:n.person.Id,LanguageId:u.isEmptyValue(n.perlanguage.Language.selected.Id)?"":n.perlanguage.Language.selected.Id,CertificateId:u.isEmptyValue(n.perlanguage.certificateLanguage.selected.Id)?"":n.perlanguage.certificateLanguage.selected.Id,CertificateLevelId:n.perlanguage.CertificateLevelId,LanguageDescription:u.isEmptyValue(n.perlanguage.Language.selected.Id)?"":n.perlanguage.Language.selected.Description,CertificateLevelDescription:u.isEmptyValue(n.perlanguage.certificateLanguage.selected.Id)?"":n.perlanguage.certificateLanguage.selected.Description,OtherCertificateLanguage:n.perlanguage.OtherCertificateLanguage,CertificateText:{Id:"",LanguageId:"",CertificateLevelId:"",Description:""},CreatedBy:n.perlanguage.CreatedBy,CreationDate:n.perlanguage.CreationDate,CreatedUserRole:n.perlanguage.CreatedUserRole,CreatedRegionAndUnitDescription:n.perlanguage.CreatedRegionAndUnitDescription,ModifiedBy:n.perlanguage.ModifiedBy,LastEditDate:n.perlanguage.LastEditDate,ModifiedUserRole:n.perlanguage.ModifiedUserRole,ModifiedRegionAndUnitDescription:n.perlanguage.ModifiedRegionAndUnitDescription,Description:n.perlanguage.Description,IsLanguageConfirmed:u.isEmptyValue(n.perlanguage.IsLanguageConfirmed)?!1:n.perlanguage.IsLanguageConfirmed,IsLocked:u.isEmptyValue(n.perlanguage.IsLocked)?!1:n.perlanguage.IsLocked},n.perlanguage.OtherCertificateLanguage)if(u.isEmptyValue(n.CertificateText.Description))if(u.isEmpty(n.certTextList))dto.CertificateId="",dto.CertificateText={Id:"",Description:u.isEmptyValue(n.CertificateText)?"":n.CertificateText,LanguageId:dto.LanguageId,CertificateLevelId:dto.CertificateLevelId};else{var t=f("filter")(n.certTextList,{Description:n.CertificateText},!0)[0];dto.CertificateId=u.isEmptyValue(t)?"":t.Id;dto.CertificateText={Id:dto.CertificateId,Description:u.isEmptyValue(n.CertificateText)?"":n.CertificateText,LanguageId:dto.LanguageId,CertificateLevelId:dto.CertificateLevelId}}else dto.CertificateId=n.CertificateText.Id,dto.CertificateText={Id:n.CertificateText.Id,Description:n.CertificateText.Description,LanguageId:dto.LanguageId,CertificateLevelId:dto.CertificateLevelId};else dto.CertificateText={Id:dto.CertificateId,LanguageId:dto.LanguageId,CertificateLevelId:dto.CertificateLevelId,Description:u.isEmptyValue(n.perlanguage.certificateLanguage.selected.Id)?"":n.perlanguage.certificateLanguage.selected.Description};return dto}if(n.person={},n.person.Id="",n.updateAfter="",n.disableDideForViewForPermanent=!1,n.personCertificate={Id:"",ComputerCertificateId:"",IsComputerCertificateConfirmed:!1},n.HasCertificate=0,n.pageRules={},n.consts={},n.languages=[],n.perlanguage={},n.perlanguage.Language={},n.perlanguage.Language={selected:""},n.computerCertificate={},n.computerCertificate={selected:""},n.languagesList=[],n.levelList=[],n.computerCertificateList=[],n.perlanguage.certificateLanguage={},n.perlanguage.certificateLanguage={selected:""},n.languageCertificateFilter=[],n.languageCertificateList=[],n.showUpload={PedagogicalEducationUpload:!1},n.messages=[{completed:"",percentage:"0",error:""},{completed:"",percentage:"0",error:""},{completed:"",percentage:"0",error:""},{completed:"",percentage:"0",error:""},{completed:"",percentage:"0",error:""}],n.DisableOrVisibleUploadFields=[{ShowUploadField:!1,ShowDownloadField:!0,ShowDeleteField:!0},{ShowUploadField:!1,ShowDownloadField:!0,ShowDeleteField:!0},{ShowUploadField:!1,ShowDownloadField:!0,ShowDeleteField:!0},{ShowUploadField:!1,ShowDownloadField:!0,ShowDeleteField:!0},{ShowUploadField:!1,ShowDownloadField:!0,ShowDeleteField:!0}],n.popoverMsg={SignKnowledge:"",PedagogicalEducation:"",BraileKnowledge:"",SignKnowledge:"",CertificateGreekLanguage:"",ComputerCertificate:""},n.DisableAllLanguageForm=!1,n.DisableAllSeminarForm=!1,n.ValidationMessage="",n.NationalityConfirm=!1,n.Level={Id:"",IsChanged:!1},n.Language={Id:"",IsChanged:!1},n.DisableOrVisibleFields={SaveLanguage:!1,ShowCertificates:!1,DisableCertificateOther:!1,DisableCertificateText:!1,ShowLanguageCertificateText:!1,DisableCertificateList:!1,ShowDaysMonths:!1},n.ComputerCertificateMessage=!1,n.EnableSeminarNotInList=!1,n.SeminarNotInListMessage="Το σεμινάριο έχει καταχωριστεί και ελεγχθεί πριν το 2022.",n.ComputerMessage='Το πεδίο "Πιστοποιητικό γνώσης Η/Υ" είναι υποχρεωτικό',n.seminars=[],n.seminar={},n.countries={},n.seminar.SeminarImplementationBody={},n.seminar.Seminar={},n.seminar.SeminarImplementationBody={selected:""},n.SeminarImplementationBody={Id:"",IsChanged:!1},n.seminar.Seminar={selected:""},n.SaveDisabledSeminar=!1,n.ShowMessageHours=!1,n.HoursMessage="Πρέπει να συμπληρώσετε την διάρκεια του σεμιναρίου σε ώρες",n.IsDisabled=!1,n.canDisableComputerFromUserAndCreationDate=!1,n.checkForPedagogicalEducation=!1,n.PedagogicalEducationMessage="Δεν έχετε συμπληρώσει τα στοιχεία της παιδαγωγικής κατάρτισης",n.compareDateAndUserForDisable=function(t,i){var r=moment(t).format("YYYY-MM-DD"),u=moment(n.updateAfter).format("YYYY-MM-DD");return r>=u&&i==n.authentication.unitName?!0:!1},n.authentication.isAuth){var c="folder,specSmea,specSmeaEEPEBP,spec,specEEPEBP,changeDataRequest";u.getByParams({role:n.authentication.role,codes:c},"/api/Subsystem/NewCheckPermission").then(function(i){var r=c.split(","),o,s;for(o in r)n.pageRules[r[o]]=f("filter")(i,{Code:r[o]},!0)[0].Rules;h();(!n.pageRules.folder.CanUpdate||u.isValueInArray(u.getRoleCode(n.authentication.role),"u1, u2"))&&(n.IsDisabled=!0);n.person.Id=t.getPersonId();u.isValueInArray(u.getRoleCode(n.authentication.role),"u1, u2")&&(n.person.Id=n.authentication.personId);s=e.all([u.getByParams({personId:n.person.Id},"/api/Person/getPersonSpecialitiesDetails"),u.getByAll("/api/Person/greekLanguageTypes"),u.getByAll("/api/Person/greekNationalityTypes"),u.getByAll("/api/Person/certificateGreekLanguageTypes"),u.getByAll("/api/Person/braileSignKnowledgeTypes"),u.getByAll("/api/Person/pedagogicalEducationTypes"),u.getByParams({personId:n.person.Id},"/api/PersonQualifications/getPersonCertificates"),u.getByParams({personId:n.person.Id},"/api/PersonQualifications/getPersonLanguages"),u.getByAll("/api/Dbo/getComputerCertificates"),u.getByAll("/api/Person/getPedagogicalCompetency"),u.getByParams({personId:n.person.Id},"/api/PersonQualifications/getPersonSeminars"),u.getByAll("/api/Person/yesNoEnumTypes"),u.getByAll("/api/PersonQualifications/getSeminarImplementationBody"),u.getByAll("/api/PersonQualifications/getSeminar"),u.getByAll("/api/General/getGeneralVariable"),u.getByAll("/api/Country/getCountriesWithoutGreece"),u.getByParams({personId:n.person.Id,role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId},"/api/Person/checkPermanentViewFromOfficialDide")]);s.then(function(t){n.personMessage=t[0];n.showMessages=!0;n.consts.greekLanguageType=t[1];n.consts.nationalityType=t[2];n.consts.certificateGreekLanguageType=t[3];n.consts.braileSignKnowledgeType=t[4];n.consts.signKnowledgeType=t[4];n.consts.pedagogicalEducationType=t[5];n.person=t[6].PersonDetails;n.personCertificate=t[6].PersonCertificates;n.languages=t[7];n.computerCertificateList=t[8];n.consts.PedagogicalCompetency=t[9];n.seminars=t[10];n.consts.yesNoEnumTypes=t[11];n.changePedagogicalEducationField();n.changeGreekLanguageField();n.changeBraileKnowledgeField();n.changeSignKnowledgeField();n.changeCertificateGreekLanguageField();n.implementationBodyList=t[12];n.seminarList=t[13];n.updateAfter=t[14];n.HasCertificate=u.isEmptyValue(n.personCertificate)?0:1;n.HasCertificate==1&&(n.computerCertificate.selected=f("filter")(n.computerCertificateList,{Id:n.personCertificate.ComputerCertificateId},!0)[0]);n.canDisableComputerFromUserAndCreationDate=n.HasCertificate?n.compareDateAndUserForDisable(t[6].PersonCertificates.CreationDate,t[6].PersonCertificates.CreatedRegionAndUnitDescription):!0;n.countries=t[15];n.disableDideForViewForPermanent=t[16];n.NationalityConfirm=n.person.Nationality>0&&n.person.NationalityCountryId>0?!0:!1;n.changeComputerCertificateField();n.hasnationality()})},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else i.go("/");n.changeGreekLanguageField=function(){n.person.GreekLanguage!=1&&(n.person.CertificateGreekLanguage=0)};n.changePedagogicalEducationField=function(){s(function(){n.showPedagogicalCompetencyId=!1;n.showUpload.PedagogicalEducationUpload=!1;n.DisableOrVisibleUploadFields[0].ShowUploadField=!1;n.person.PedagogicalEducation==2?(n.showPedagogicalCompetencyId=!0,n.PedagogicalCompetencyList=f("filter")(n.consts.PedagogicalCompetency,{IsTwelveMonths:!0},!0)):n.person.PedagogicalEducation==1?(n.showPedagogicalCompetencyId=!0,n.PedagogicalCompetencyList=f("filter")(n.consts.PedagogicalCompetency,{IsTwelveMonths:!1},!0)):(n.showPedagogicalCompetencyId=!1,n.person.PedagogicalCompetencyId=null);n.popoverMsg.PedagogicalEducation=(n.person.PedagogicalEducation==1||n.person.PedagogicalEducation==2)&&n.person.IsPedagogicalEducationConfirmed?"Έχει επικυρωθεί":n.person.PedagogicalEducation!=1&&n.person.PedagogicalEducation!=2||n.person.IsPedagogicalEducationConfirmed?"":"Εκκρεμεί έλεγχος δικαιολογητικών";u.isValueInArray(u.getRoleCode(n.authentication.role),"m1, m2, a, d1, d2")&&n.showPedagogicalCompetencyId&&!n.person.IsPedagogicalEducationConfirmed&&(n.DisableOrVisibleUploadFields[0].ShowUploadField=!0)},300)};n.changeBraileKnowledgeField=function(){n.popoverMsg.BraileKnowledge=n.person.BraileKnowledge==1&&n.person.IsBraileKnowledgeConfirmed?"Έχει επικυρωθεί":n.person.BraileKnowledge!=1||n.person.IsBraileKnowledgeConfirmed?"":"Εκκρεμεί έλεγχος δικαιολογητικών"};n.changeCertificateGreekLanguageField=function(){n.popoverMsg.CertificateGreekLanguage=n.person.CertificateGreekLanguage>0&&n.person.IsCertificateGreekLanguageConfirmed?"Έχει επικυρωθεί":n.person.CertificateGreekLanguage>0&&!n.person.IsCertificateGreekLanguageConfirmed?"Εκκρεμεί έλεγχος δικαιολογητικών":""};n.changeSignKnowledgeField=function(){n.popoverMsg.SignKnowledge=n.person.SignKnowledge==1&&n.person.IsSignKnowledgeConfirmed?"Έχει επικυρωθεί":n.person.SignKnowledge!=1||n.person.IsSignKnowledgeConfirmed?"":"Εκκρεμεί έλεγχος δικαιολογητικών"};n.fillFormControls=function(){n.ModalTitle="Προσθήκη Γλώσσας";n.perlanguage.PersonId=n.person.Id;n.perlanguage.Language={};n.perlanguage.Language={selected:""};n.perlanguage.certificateLanguage={};n.perlanguage.certificateLanguage={selected:""};var t=e.all([u.getByAll("/api/Dbo/getCertificateLevel"),u.getByAll("/api/Dbo/getLanguages"),u.getByAll("/api/Dbo/getCertificates"),]);t.then(function(t){n.levelList=t[0];n.languagesList=t[1];n.languageCertificateList=t[2]});n.DisableOrVisibleFields={SaveLanguage:!1,ShowCertificates:!1,DisableCertificateOther:!1,DisableCertificateText:!1,ShowLanguageCertificateText:!1,DisableCertificateList:!1}};n.changeRange=function(){if(u.isEmptyValue(n.seminar.StartDate)||u.isEmptyValue(n.seminar.EndDate))n.DisableOrVisibleFields.ShowDaysMonths=!1;else{var t={DateFrom:n.seminar.StartDate,DateTo:n.seminar.EndDate},i=t;n.SaveDisabledSeminar=!0;u.postByParams(i,"/api/PersonQualifications/getMonthDays").then(function(t){n.DisableOrVisibleFields.ShowDaysMonths=!0;n.seminar.MonthsDuration=t.Months;n.seminar.DaysDuration=t.Days;n.SaveDisabledSeminar=!1},function(t){n.DisableOrVisibleFields.ShowDaysMonths=!1;n.seminar.MonthsDuration=0;n.seminar.DaysDuration=0;r.pop("error","ΠΡΟΣΟΧΗ",t.data);n.SaveDisabled=!1})}};n.openLanguageModal=function(t){blockUI({target:"#tblLanguage",animate:!0});n.perlanguage={};angular.copy(t,n.perlanguage);n.perlanguage.Language={};n.perlanguage.Language={selected:""};n.perlanguage.certificateLanguage={};n.perlanguage.certificateLanguage={selected:""};n.Language={Id:"",IsChanged:!1};n.Level={Id:"",IsChanged:!1};n.canDisableFromUserAndCreationDate=!1;var i=e.all([n.fillFormControls()]);i.then(function(){s(function(){n.languageCertificateFilter=f("filter")(n.languageCertificateList,{LanguageId:n.perlanguage.LanguageId,CertificateLevelId:n.perlanguage.CertificateLevelId,IsCertified:!0},!0);n.perlanguage.Language.selected=f("filter")(n.languagesList,{Id:n.perlanguage.LanguageId},!0)[0];n.perlanguage.certificateLanguage.selected=f("filter")(n.languageCertificateFilter,{Id:n.perlanguage.CertificateId},!0)[0];n.perlanguage.OtherCertificateLanguage&&(n.CertificateText=f("filter")(n.languageCertificateList,{Id:n.perlanguage.CertificateId},!0)[0])},300);n.canDisableFromUserAndCreationDate=n.compareDateAndUserForDisable(n.perlanguage.CreationDate,n.perlanguage.CreatedRegionAndUnitDescription);s(function(){n.formFields();unblockUI("#tblLanguage");$("#AddLanguageModal").modal("show")},300)});n.ModalTitle="Επεξεργασία Γλώσσας"};n.clear=function(t){t.stopPropagation();n.perlanguage.Language={};n.perlanguage.Language={selected:""}};n.saveAction=function(t){if(n.ComputerCertificateMessage=n.HasCertificate==1&&u.isEmptyValue(n.computerCertificate.selected)?!0:!1,n.checkForPedagogicalEducation=!1,(n.person.PedagogicalEducation==1||n.person.PedagogicalEducation==2)&&u.isEmptyValue(n.person.PedagogicalCompetencyId)&&!n.person.IsPedagogicalEducationConfirmed&&(n.checkForPedagogicalEducation=!0),$("#qualifications").valid()&&!n.ComputerCertificateMessage&&!n.checkForPedagogicalEducation){n.SaveDisabled=!0;u.isEmpty(n.personCertificate)&&(n.personCertificate={Id:"",ComputerCertificateId:"",IsComputerCertificateConfirmed:u.isEmptyValue(n.personCertificate)?"":n.personCertificate.IsComputerCertificateConfirmed});t=="Confirm"?(n.personCertificate.IsComputerCertificateConfirmed=n.HasCertificate==1?!0:!1,n.person.IsPedagogicalEducationConfirmed=n.person.PedagogicalEducation==1||n.person.PedagogicalEducation==2?!0:!1,n.person.IsCertificateGreekLanguageConfirmed=n.person.CertificateGreekLanguage>0?!0:!1,n.person.IsGreekLanguageConfirmed=n.person.GreekLanguage==1?!0:!1,n.person.IsBraileKnowledgeConfirmed=n.person.BraileKnowledge==1?!0:!1,n.person.IsSignKnowledgeConfirmed=n.person.SignKnowledge==1?!0:!1,n.person.IsNew=!1):t=="UnConfirm"&&(n.personCertificate.IsComputerCertificateConfirmed=!1,n.person.IsPedagogicalEducationConfirmed=!1,n.person.IsGreekLanguageConfirmed=!1,n.person.IsCertificateGreekLanguageConfirmed=!1,n.person.IsBraileKnowledgeConfirmed=!1,n.person.IsSignKnowledgeConfirmed=!1);var i=l();u.isEmptyValue(n.person.Id)||(i.UserRole=n.authentication.role,i.RegionAndUnitDescription=n.authentication.unitName,u.postByParams(i,"/api/PersonQualifications/UpdatePersonQualification").then(function(){u.getByParams({personId:n.person.Id},"/api/PersonQualifications/getPersonCertificates").then(function(t){n.person=t.PersonDetails;n.changePedagogicalEducationField();n.changeBraileKnowledgeField();n.changeCertificateGreekLanguageField();n.NationalityConfirm=n.person.Nationality>0&&n.person.NationalityCountryId>0?!0:!1;r.pop("success","Επιτυχής ενημέρωση","Ο φάκελός σας ενημερώθηκε με επιτυχία.")});n.SaveDisabled=!1},function(t){r.pop("error","ΠΡΟΣΟΧΗ",t.data);n.SaveDisabled=!1}))}};n.formFieldsSeminar=function(){u.isEmptyValue(n.seminar.SeminarImplementationBody.selected)&&(n.seminar.SeminarImplementationBody={selected:""});u.isEmptyValue(n.seminar.SeminarImplementationBody.selected)||(u.isEmptyValue(n.SeminarImplementationBody.Id)?(n.SeminarImplementationBody.Id=n.seminar.SeminarImplementationBody.selected.Id,n.SeminarImplementationBody.IsChanged=!0):n.SeminarImplementationBody.Id!=n.seminar.SeminarImplementationBody.selected.Id?(n.SeminarImplementationBody.Id=n.seminar.SeminarImplementationBody.selected.Id,n.SeminarImplementationBody.IsChanged=!0):n.SeminarImplementationBody.IsChanged=!1);n.SeminarImplementationBody.IsChanged&&(n.seminarFilter=[],n.seminar.Seminar={selected:""},n.seminar.IsEAE=!1,n.seminarFilter=f("filter")(n.seminarList,{SeminarImplementationBodyId:n.seminar.SeminarImplementationBody.selected.Id},!0));n.seminar.IsEAE=u.isEmptyValue(n.seminar.Seminar.selected)?!1:n.seminar.Seminar.selected.IsEAE};n.formFields=function(){n.languageCertificateFilter=[];u.isEmptyValue(n.perlanguage.Language.selected)&&(n.perlanguage.Language={selected:""});u.isEmptyValue(n.perlanguage.certificateLanguage.selected)&&(n.perlanguage.certificateLanguage={selected:""});u.isEmptyValue(n.perlanguage.Language.selected)?(n.DisableOrVisibleFields.ShowCertificates=!1,n.DisableOrVisibleFields.ShowLanguageCertificateText=!1):(u.isEmptyValue(n.Language.Id)?(n.Language.Id=n.perlanguage.Language.selected.Id,n.Language.IsChanged=!1):n.Language.Id!=n.perlanguage.Language.selected.Id?(n.Language.Id=n.perlanguage.Language.selected.Id,n.Language.IsChanged=!0):n.Language.IsChanged=!1,u.isEmptyValue(n.Level.Id)?(n.Level.Id=n.perlanguage.CertificateLevelId,n.Level.IsChanged=!1):n.Level.Id!=n.perlanguage.CertificateLevelId?(n.Level.Id=n.perlanguage.CertificateLevelId,n.Level.IsChanged=!0):n.Level.IsChanged=!1,(!u.isEmptyValue(n.perlanguage.CertificateLevelId)||n.Level.IsChanged||n.Language.IsChanged)&&((n.Level.IsChanged||n.Language.IsChanged)&&(n.perlanguage.certificateLanguage.selected="",n.perlanguage.OtherCertificateLanguage=!1,n.CertificateText=""),n.DisableOrVisibleFields.ShowCertificates=!0,n.languageCertificateFilter=f("filter")(n.languageCertificateList,{LanguageId:n.perlanguage.Language.selected.Id,CertificateLevelId:n.perlanguage.CertificateLevelId,IsCertified:!0},!0),n.certTextList=f("filter")(n.languageCertificateList,{LanguageId:n.perlanguage.Language.selected.Id,CertificateLevelId:n.perlanguage.CertificateLevelId,IsCertified:!1},!0),u.isEmptyValue(n.perlanguage.certificateLanguage.selected)||(n.DisableOrVisibleFields.ShowLanguageCertificateText=!1,n.DisableOrVisibleFields.DisableCertificateOther=!0,n.perlanguage.OtherCertificateLanguage=!1,n.CertificateText="",n.perlanguage.certificateLanguage.selected.DetailsRequired?n.DisableOrVisibleFields.ShowLanguageCertificateText=!0:n.perlanguage.Description=null)));n.DisableAllLanguageForm=!n.perlanguage.IsLanguageConfirmed||n.canDisableFromUserAndCreationDate||u.isValueInArray(u.getRoleCode(n.authentication.role),"m1, m2, a")?n.perlanguage.IsLocked&&!u.isValueInArray(u.getRoleCode(n.authentication.role),"m1, m2, a")?!0:!1:!0};n.hasnationality=function(){n.person.Nationality=="1"||n.person.Nationality=="2"?(n.countriesFilter=[{Id:3,Description:"ΕΛΛΑΔΑ",IsEU:!0}],n.person.NationalityCountryId=3):n.person.Nationality=="3"?n.countriesFilter=f("filter")(n.countries,{IsEU:!0},!0):n.person.Nationality=="4"?(n.countriesFilter=[{Id:50,Description:"ΑΛΒΑΝΙΑ",IsEU:!1}],n.person.NationalityCountryId=50):n.person.Nationality=="6"?(n.countriesFilter=[{Id:46,Description:"ΑΙΓΥΠΤΟΣ",IsEU:!1}],n.person.NationalityCountryId=46):n.person.Nationality=="7"?(n.countriesFilter=[{Id:162,Description:"ΤΟΥΡΚΙΑ",IsEU:!1}],n.person.NationalityCountryId=162):n.countriesFilter=f("filter")(n.countries,{IsEU:!1},!0);n.person.Nationality!="2"&&(n.person.GreekNationalityDate="")};n.checkFields=function(){return n.ValidationMessage="",u.isEmptyValue(n.perlanguage.Language.selected)||u.isEmptyValue(n.perlanguage.CertificateLevelId)||u.isEmptyValue(n.perlanguage.certificateLanguage.selected)?u.isEmptyValue(n.perlanguage.Language.selected)||u.isEmptyValue(n.perlanguage.CertificateLevelId)||!n.perlanguage.OtherCertificateLanguage||u.isEmptyValue(n.CertificateText)?(n.ValidationMessage="Απαιτείται η συμπλήρωση των παρακάτω πεδίων: ",u.isEmptyValue(n.perlanguage.Language.selected)&&(n.ValidationMessage=n.ValidationMessage+"Γλώσσα,"),u.isEmptyValue(n.perlanguage.CertificateLevelId)&&(n.ValidationMessage=n.ValidationMessage+"Επίπεδο,"),u.isEmptyValue(n.perlanguage.certificateLanguage.selected)&&!n.perlanguage.OtherCertificateLanguage&&(n.ValidationMessage=n.ValidationMessage+"Πιστοποιητικό γνώσης της γλώσσας ή Άλλο πιστοποιητικό,"),n.perlanguage.OtherCertificateLanguage&&u.isEmptyValue(n.CertificateText)&&(n.ValidationMessage=n.ValidationMessage+"Πιστοποιητικό εκτός λίστας,"),n.ValidationMessage=n.ValidationMessage.slice(0,n.ValidationMessage.length-1),!1):!0:!0};n.saveLanguage=function(t){if(n.checkFields()){var i=a();n.DisableOrVisibleFields.SaveLanguage=!0;t=="Confirm"?i.IsLanguageConfirmed=!0:t=="UnConfirm"&&(i.IsLanguageConfirmed=!1);u.isEmptyValue(i.Id)?(i.CreatedBy=n.authentication.userName,i.CreatedUserRole=n.authentication.role,i.CreatedRegionAndUnitDescription=n.authentication.unitName,u.postByParams(i,"/api/PersonQualifications/InsertLanguage").then(function(){u.getByParams({personId:n.person.Id},"/api/PersonQualifications/getPersonLanguages").then(function(t){n.languages=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης ξένων γλωσσών",3e3,"trustedHtml")});$("#AddLanguageModal").modal("hide");n.DisableOrVisibleFields.SaveLanguage=!1;n.cancelLanguage()},function(t){n.DisableOrVisibleFields.SaveLanguage=!1;r.pop("error","ΠΡΟΣΟΧΗ",t.data)})):(i.ModifiedBy=n.authentication.userName,i.ModifiedUserRole=n.authentication.role,i.ModifiedRegionAndUnitDescription=n.authentication.unitName,u.postByParams(i,"/api/PersonQualifications/UpdateLanguage").then(function(){u.getByParams({personId:n.person.Id},"/api/PersonQualifications/getPersonLanguages").then(function(t){n.languages=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης ξένων γλωσσών",3e3,"trustedHtml")});$("#AddLanguageModal").modal("hide");n.cancelLanguage();n.DisableOrVisibleFields.SaveLanguage=!1},function(t){n.DisableOrVisibleFields.SaveLanguage=!1;r.pop("error","ΠΡΟΣΟΧΗ",t.data)}))}else r.pop("warning"," Αδύνατη καταχώριση",n.ValidationMessage)};n.cancelLanguage=function(){n.perlanguage={};n.perlanguage.Language={};n.perlanguage.Language={selected:""};n.perlanguage.certificateLanguage={};n.perlanguage.certificateLanguage={selected:""};n.perlanguage.CertificateLevelId="";n.perlanguage.OtherCertificateLanguage=!1;n.CertificateText="";n.DisableOrVisibleFields={SaveLanguage:!1,ShowCertificates:!1,DisableCertificateOther:!1,DisableCertificateText:!1,ShowLanguageCertificateText:!1,DisableCertificateList:!1};n.DisableAllLanguageForm=!1;$("#editLanguageForm").validate().resetForm()};n.openDeleteLanguage=function(t){n.delLanguage=t};n.DeleteLanguage=function(t){var i=t;i.ModifiedBy=n.authentication.userName;i.ModifiedUserRole=n.authentication.role;i.ModifiedRegionAndUnitDescription=n.authentication.unitName;u.postByParams(i,"/api/PersonQualifications/DeleteLanguage").then(function(){u.getByParams({personId:n.person.Id},"/api/PersonQualifications/getPersonLanguages").then(function(t){n.languages=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης ξένων γλωσσών",3e3,"trustedHtml")})},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.changeComputerCertificateField=function(){n.HasCertificate==0&&(n.computerCertificate.selected="");n.popoverMsg.ComputerCertificate=!u.isEmptyValue(n.computerCertificate.selected)&&n.personCertificate.IsComputerCertificateConfirmed?"Έχει επικυρωθεί":u.isEmptyValue(n.computerCertificate.selected)||n.personCertificate.IsComputerCertificateConfirmed?"":"Εκκρεμεί έλεγχος δικαιολογητικών"};n.minDate="01/01/1900";n.openDeleteSeminar=function(t){n.delSeminar=t};n.fillFormControlsSeminar=function(){n.ModalTitle="Προσθήκη Σεμιναρίου / Επιμόρφωσης";n.seminar={};n.seminar.PersonId=n.person.Id;n.seminar.SeminarImplementationBody={};n.seminar.Seminar={};n.seminar.SeminarImplementationBody={selected:""};n.seminar.Seminar={selected:""};n.seminar.Hours=0;n.SaveDisabledSeminar=!1;n.DisableOrVisibleFields.ShowDaysMonths=!1;n.EnableSeminarNotInList=!1};n.openSeminarModal=function(t){blockUI({target:"#tblSeminar",animate:!0});angular.copy(t,n.seminar);n.changeRange();n.ModalTitle="Επεξεργασία Σεμιναρίου";n.SaveDisabledSeminar=!1;n.seminar.SeminarImplementationBody={};n.seminar.Seminar={};n.seminar.SeminarImplementationBody={selected:""};n.seminar.Seminar={selected:""};n.canDisableFromUserAndCreationDate=!1;n.seminar.Seminar.selected=f("filter")(n.seminarList,{Id:t.SeminarId},!0)[0];u.isEmptyValue(n.seminar.Seminar.selected)?n.EnableSeminarNotInList=!0:(n.seminar.SeminarImplementationBody.selected=f("filter")(n.implementationBodyList,{Id:n.seminar.Seminar.selected.SeminarImplementationBodyId},!0)[0],n.seminarFilter=f("filter")(n.seminarList,{SeminarImplementationBodyId:n.seminar.SeminarImplementationBody.selected.Id},!0),n.seminar.IsEAE=n.seminar.Seminar.selected.IsEAE,n.SeminarImplementationBody.Id=n.seminar.Seminar.selected.SeminarImplementationBodyId,n.EnableSeminarNotInList=!1);n.canDisableFromUserAndCreationDate=n.compareDateAndUserForDisable(n.seminar.CreationDate,n.seminar.CreatedRegionAndUnitDescription);n.DisableAllSeminarForm=!n.seminar.IsSeminarConfirmed||n.canDisableFromUserAndCreationDate||u.isValueInArray(u.getRoleCode(n.authentication.role),"m1, m2, a")?n.seminar.IsLocked&&!u.isValueInArray(u.getRoleCode(n.authentication.role),"m1, m2, a")?!0:!1:!0;h();s(function(){unblockUI("#tblSeminar");$("#AddSeminarModal").modal("show")},300)};n.cancelSeminar=function(){n.seminar={};n.DisableAllSeminarForm=!1;h();$("#editSeminarForm").validate().resetForm()};n.saveSeminar=function(t,i){n.ShowMessageHours=t.Hours>0?!1:!0;$("#editSeminarForm").valid()&&!n.ShowMessageHours&&(n.SaveDisabledSeminar=!0,i=="Confirm"?t.IsSeminarConfirmed=!0:i=="UnConfirm"&&(t.IsSeminarConfirmed=!1),n.EnableSeminarNotInList||(t.SeminarId=n.seminar.Seminar.selected.Id,t.ImplementationBody=n.seminar.SeminarImplementationBody.selected.Description,t.Description=n.seminar.Seminar.selected.Description),u.isEmptyValue(n.seminar.Id)?(t.CreatedBy=n.authentication.userName,t.CreatedUserRole=n.authentication.role,t.CreatedRegionAndUnitDescription=n.authentication.unitName,u.postByParams(t,"/api/PersonQualifications/InsertSeminar").then(function(){u.getByParams({personId:n.person.Id},"/api/PersonQualifications/getPersonSeminars").then(function(t){n.seminars=t},function(){n.SaveDisabledSeminar=!1;r.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης σεμιναρίων",3e3,"trustedHtml")});$("#AddSeminarModal").modal("hide");n.cancelSeminar()},function(t){n.SaveDisabledSeminar=!1;r.pop("error","ΠΡΟΣΟΧΗ",t.data)})):(t.ModifiedBy=n.authentication.userName,t.ModifiedUserRole=n.authentication.role,t.ModifiedRegionAndUnitDescription=n.authentication.unitName,u.postByParams(t,"/api/PersonQualifications/UpdateSeminar").then(function(){u.getByParams({personId:n.person.Id},"/api/PersonQualifications/getPersonSeminars").then(function(t){n.seminars=t},function(){n.SaveDisabledSeminar=!1;r.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης σεμιναρίων",3e3,"trustedHtml")});$("#AddSeminarModal").modal("hide");n.cancelSeminar()},function(t){n.SaveDisabledSeminar=!1;r.pop("error","ΠΡΟΣΟΧΗ",t.data)})))};n.DeleteSeminar=function(t){var i=t;i.ModifiedBy=n.authentication.userName;i.ModifiedUserRole=n.authentication.role;i.ModifiedRegionAndUnitDescription=n.authentication.unitName;u.postByParams(i,"/api/PersonQualifications/DeleteSeminar").then(function(){u.getByParams({personId:n.person.Id},"/api/PersonQualifications/getPersonSeminars").then(function(t){n.seminars=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης τέκνων",3e3,"trustedHtml")})},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.formats=["dd/MM/yyyy"];n.format=n.formats[0];n.today=function(){};n.today();n.toggleMin=function(){n.minDate=n.minDate?null:new Date};n.toggleMin();n.open=function(t,i){t.preventDefault();t.stopPropagation();n[i]=!0};n.dateOptions={formatYear:"yy",startingDay:1,format:"dd/mm/yyyy"}};QualificationsController.$inject=["$scope","PassParameters","$state","toaster","GeneralFactory","$filter","$q","PersonFactory","$timeout"];RecruitmentServiceAssumed=function(n,i,r,u,f,e,o,s,h){function a(){n.noServiceAssumed=[];f.isEmptyValue(n.recruits.ApplicationTypeId)&&(n.recruits.ApplicationTypeId=16);var t=o.all([!f.isEmptyValue(n.recruitments)&&f.isEmptyValue(n.recruits.Id)?f.getByParams({Id:c},"/api/PersonSpeciality/getAllDetailsForInsertRecruitment"):f.getByParams({Id:c},"/api/PersonSpeciality/getAllPersonSpecialities"),f.getByAll("/api/RecruitmentServiceAssumed/getSubstitutesTypeAsync"),f.getByAll("/api/ApplicationTypeRegionAndUnit/getRegionAndUnitByRegionType"),f.getByParams({PersonId:c},"/api/PersonMusicSpeciality/getPersonMusicSpecialitiesDtoByPersonId"),f.getByParams({applicationTypeId:n.recruits.ApplicationTypeId,role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId},"/api/ApplicationTypeRegionAndUnit/getRegionAndUnitForServiceAssumedNotRecruit"),]);t.then(function(t){!f.isEmptyValue(n.recruitments)&&f.isEmptyValue(n.recruits.Id)?(n.DetailsForRecruit=t[0],n.allSpecialities=n.DetailsForRecruit.Specialities):n.allSpecialities=e("filter")(t[0],function(n){return n.IsActive==!0});for(var i=n.allSpecialities.length-1;i>=0;i--)n.allSpecialities[i].Id==11&&n.allSpecialities.splice(i,1);n.substituteTypes=t[1];n.regionsForRecruitments=t[2];n.personMusicSpecialists=t[3];n.regionsNoRecruit=t[4];n.substituteTypesFilter=n.substituteTypes;n.regionsForRecruitmentsFilter=n.noRec?n.regionsNoRecruit:n.regionsForRecruitments;n.personMusicSpecialistsFilter=n.personMusicSpecialists})}function v(){return dto={RecruitmentsSubstituteId:n.recruits.Id,PersonId:n.recruits.PersonId,SpecialityId:n.recruits.SpecialityId,SpecialityGroupId:n.recruits.SpecialityGroupId,ApplicationTypeRegionAndUnitId:n.recruits.ApplicationTypeRegionAndUnitId,LevelId:n.recruits.LevelId,IsFull:n.recruits.IsFull,SubstitutesTypeId:n.recruits.SubstitutesTypeId,RecruitmentsStatusId:n.recruits.RecruitmentsStatusId,RecruitmentDate:n.recruits.RecruitmentDate,RecruitmentProtocol:n.recruits.RecruitmentProtocol,ResignationProtocol:n.recruits.ResignationProtocol,ResignationDate:n.recruits.ResignationDate,YARecallRecruitmen:n.recruits.YARecallRecruitmen,Ada:n.recruits.Ada,ServiceAssumed:n.recruits.ServiceAssumed,ExceptionSanctionType:n.recruits.ExceptionSanctionType,PresenceDateFrom:n.recruits.PresenceDateFrom,PresenceDateTo:n.recruits.PresenceDateTo,RecallProtocol:n.recruits.RecallProtocol,RecallADA:n.recruits.RecallADA,RecallDate:n.recruits.RecallDate,ServiceAssumedId:f.isEmptyValue(n.recruits.ServiceAssumedId)?null:n.recruits.ServiceAssumedId,FirstServiceAssumed:n.recruits.FirstServiceAssumed,DidacticYearId:f.isEmptyValue(n.serviceAssumeds.DidacticYearId)?n.didacticYear.Id:n.recruits.DidacticYearId,ServiceAssumedDate:n.recruits.ServiceAssumedDate,ServiceAssumedTypeId:f.isEmptyValue(n.recruits.ServiceAssumedTypeId)?null:n.recruits.ServiceAssumedTypeId,UserRole:n.authentication.role,MusicSpecialistId:n.recruits.MusicSpecialistId,RegionAndUnitDescription:n.authentication.unitName,CreationDate:n.recruits.CreationDate,CreatedBy:n.recruits.CreatedBy,CreatedUserRole:n.recruits.CreatedUserRole,CreatedRegionAndUnitDescription:n.recruits.CreatedRegionAndUnitDescription,CreationDateServiceAssumed:f.isEmptyValue(n.recruits.CreationDateServiceAssumed)?null:n.recruits.CreationDateServiceAssumed,CreatedByServiceAssumed:f.isEmptyValue(n.recruits.CreatedByServiceAssumed)?null:n.recruits.CreatedByServiceAssumed,CreatedUserRoleServiceAssumed:f.isEmptyValue(n.recruits.CreatedUserRoleServiceAssumed)?null:n.recruits.CreatedUserRoleServiceAssumed,CreatedRegionAndUnitDescriptionServiceAssumed:f.isEmptyValue(n.recruits.CreatedRegionAndUnitDescriptionServiceAssumed)?null:n.recruits.CreatedRegionAndUnitDescriptionServiceAssumed,PaymentTypeId:n.recruits.PaymentTypeId,OpsEspaCode:n.recruits.OpsEspaCode,RecruitmentInfoId:n.recruits.RecruitmentInfoId,DueWorkingDays:n.recruits.DueWorkingDays}}function y(){return dto={Id:f.isEmptyValue(n.ServiceAssumed.Id)?null:n.ServiceAssumed.Id,RecruitmentsSubstituteId:n.ServiceAssumed.RecruitmentsSubstituteId,PersonId:n.ServiceAssumed.PersonId,SpecialityId:n.ServiceAssumed.SpecialityId,ApplicationTypeRegionAndUnitId:n.ServiceAssumed.ApplicationTypeRegionAndUnitId,FirstServiceAssumed:!1,DidacticYearId:n.ServiceAssumed.DidacticYearId,ServiceAssumedDate:n.ServiceAssumed.ServiceAssumedDate,ServiceAssumedAction:n.ServiceAssumed.ServiceAssumedAction,ServiceAssumedTypeId:n.ServiceAssumed.ServiceAssumedTypeId,InaccessibleUnit:f.isEmptyValue(n.ServiceAssumed.InaccessibleUnit)?null:n.ServiceAssumed.InaccessibleUnit,InaccessibleUnitHours:f.isEmptyValue(n.ServiceAssumed.InaccessibleUnitHours)?null:n.ServiceAssumed.InaccessibleUnitHours,RemoteUnit:f.isEmptyValue(n.ServiceAssumed.RemoteUnit)?null:n.ServiceAssumed.RemoteUnit,RemoteUnitHours:f.isEmptyValue(n.ServiceAssumed.RemoteUnitHours)?null:n.ServiceAssumed.RemoteUnitHours,IntendancyPlacementAction:n.ServiceAssumed.IntendancyPlacementAction,IntendancyPlacementDate:n.ServiceAssumed.IntendancyPlacementDate,ExperienceEndDate:f.isEmptyValue(n.ServiceAssumed.ExperienceEndDate)?null:n.ServiceAssumed.ExperienceEndDate,ExperienceEndAction:f.isEmptyValue(n.ServiceAssumed.ExperienceEndAction)?null:n.ServiceAssumed.ExperienceEndAction,HoursPerWeek:f.isEmptyValue(n.ServiceAssumed.HoursPerWeek)?null:n.ServiceAssumed.HoursPerWeek,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,FirstServiceAssumed:n.ServiceAssumed.FirstServiceAssumed,PresenceDateFrom:n.recruitmentsForServiceAssumed.PresenceDateFrom,PresenceDateTo:n.recruitmentsForServiceAssumed.PresenceDateTo,RecruitmentDate:f.isEmptyValue(n.recruitmentsForServiceAssumed.RecruitmentDate)?null:n.recruitmentsForServiceAssumed.RecruitmentDate,Comments:n.ServiceAssumed.Comments}}function p(){return n.schoolForServiceAssumed=e("filter")(n.schoolsFilter,{Id:n.SchoolId.selected.Id},!0)[0],dto={Id:f.isEmptyValue(n.saSchools.Id)?null:n.saSchools.Id,ServiceAssumedId:n.ServiceAssumed.Id,SchoolId:n.SchoolId.selected.Id,RegistryNo:n.schoolForServiceAssumed.RegistryNo,HoursPerWeek:n.saSchools.HoursPerWeek,ValidFrom:n.saSchools.ValidFrom,ValidTo:n.saSchools.ValidTo,PlacementAction:n.saSchools.PlacementAction,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,PersonId:c}}function w(){return dto={Id:f.isEmptyValue(n.noRecruitServiceAssumed.Id)?null:n.noRecruitServiceAssumed.Id,PersonId:n.noRecruitServiceAssumed.PersonId,SpecialityId:n.noRecruitServiceAssumed.SpecialityId,ApplicationTypeRegionAndUnitId:n.noRecruitServiceAssumed.ApplicationTypeRegionAndUnitId,DidacticYearId:f.isEmptyValue(n.noRecruitServiceAssumed.DidacticYearId)?n.didacticYearSA.Id:n.noRecruitServiceAssumed.DidacticYearId,ServiceAssumedDate:n.noRecruitServiceAssumed.ServiceAssumedDate,ServiceAssumedAction:n.noRecruitServiceAssumed.ServiceAssumedAction,ServiceAssumedTypeId:n.noRecruitServiceAssumed.ServiceAssumedTypeId,InaccessibleUnit:f.isEmptyValue(n.noRecruitServiceAssumed.InaccessibleUnit)?null:n.noRecruitServiceAssumed.InaccessibleUnit,InaccessibleUnitHours:f.isEmptyValue(n.noRecruitServiceAssumed.InaccessibleUnitHours)?null:n.noRecruitServiceAssumed.InaccessibleUnitHours,RemoteUnit:f.isEmptyValue(n.noRecruitServiceAssumed.RemoteUnit)?null:n.noRecruitServiceAssumed.RemoteUnit,RemoteUnitHours:f.isEmptyValue(n.noRecruitServiceAssumed.RemoteUnitHours)?null:n.noRecruitServiceAssumed.RemoteUnitHours,IntendancyPlacementAction:n.noRecruitServiceAssumed.IntendancyPlacementAction,IntendancyPlacementDate:n.noRecruitServiceAssumed.IntendancyPlacementDate,ExperienceEndDate:f.isEmptyValue(n.noRecruitServiceAssumed.ExperienceEndDate)?null:n.noRecruitServiceAssumed.ExperienceEndDate,ExperienceEndAction:f.isEmptyValue(n.noRecruitServiceAssumed.ExperienceEndAction)?null:n.noRecruitServiceAssumed.ExperienceEndAction,HoursPerWeek:f.isEmptyValue(n.noRecruitServiceAssumed.HoursPerWeek)?null:n.noRecruitServiceAssumed.HoursPerWeek,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,CountryId:n.noRecruitServiceAssumed.CountryId,FirstServiceAssumed:n.noRecruitServiceAssumed.FirstServiceAssumed,September:n.noRecruitServiceAssumed.September,October:n.noRecruitServiceAssumed.October,November:n.noRecruitServiceAssumed.November,December:n.noRecruitServiceAssumed.December,January:n.noRecruitServiceAssumed.January,February:n.noRecruitServiceAssumed.February,March:n.noRecruitServiceAssumed.March,April:n.noRecruitServiceAssumed.April,May:n.noRecruitServiceAssumed.May,June:n.noRecruitServiceAssumed.June,July:n.noRecruitServiceAssumed.July,Comments:n.noRecruitServiceAssumed.Comments,EEMonths:n.noRecruitServiceAssumed.EEMonths,EEDays:n.noRecruitServiceAssumed.EEDays,FekDate:f.isEmptyValue(n.noRecruitServiceAssumed.FekDate)?null:n.noRecruitServiceAssumed.FekDate,FekData:f.isEmptyValue(n.noRecruitServiceAssumed.FekData)?null:n.noRecruitServiceAssumed.FekData,MinistryPlacementDate:f.isEmptyValue(n.noRecruitServiceAssumed.MinistryPlacementDate)?null:n.noRecruitServiceAssumed.MinistryPlacementDate,MinistryPlacementAction:f.isEmptyValue(n.noRecruitServiceAssumed.MinistryPlacementAction)?null:n.noRecruitServiceAssumed.MinistryPlacementAction}}function b(){return n.schoolForServiceAssumed=e("filter")(n.schoolsNoRecruitFilter,{Id:n.NoRecruitSchoolId.selected.Id},!0)[0],dto={Id:f.isEmptyValue(n.noRecruitsaSchools.Id)?null:n.noRecruitsaSchools.Id,ServiceAssumedId:n.noRecruitServiceAssumed.Id,SchoolId:n.NoRecruitSchoolId.selected.Id,RegistryNo:n.schoolForServiceAssumed.RegistryNo,HoursPerWeek:n.noRecruitsaSchools.HoursPerWeek,ValidFrom:n.noRecruitsaSchools.ValidFrom,ValidTo:n.noRecruitsaSchools.ValidTo,PlacementAction:n.noRecruitsaSchools.PlacementAction,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,PersonId:c}}var c,l;blockUI({target:"#divBlockUI",animate:!0});n.showMessages=!1;n.showServiceAssumedDate=!1;n.showRecruitmentsStatusDescription=!1;n.showExceptionSanctionType=!1;n.showResignation=!1;n.showReCall=!1;n.addRecruit=!1;n.addRecruitUpgrade=!1;n.CanInsertRecruitment=!1;n.pageRules={};n.maxDate=new Date;n.minDate=new Date;n.ExperienceEndDateValid=new Date;n.PresenceDateFromValid=new Date;n.disabledServiceAssumedDate=!1;n.disableDideForViewForPermanent=!1;n.CurrentDidacticYear={};n.SchoolId={};n.SchoolId.selected={};n.NoRecruitSchoolId={};n.NoRecruitSchoolId.selected={};n.noRecruitServiceAssumed={};n.recruitmentStatusStop={};n.noRecruitServiceAssumed.Schools={};n.AllDidacticYear={};n.didacticYearExpirations={};n.AddOrEditSchool=!1;n.VisibleSave=!1;n.SaveRecDisabled=!1;n.DisableOrVisibleSave=!1;n.IsDisabledRecruitment=!1;n.IsDisabledServiceAssumed=!1;n.showRemoteUnit=!1;n.showInaccessibleUnit=!1;n.showRemoteUnitHours=!1;n.showInaccessibleUnitHours=!1;n.showIntendancyDateAction=!1;n.showFEKDateAction=!1;n.VisibleNoRecruitSADataTable=!1;n.VisibleNoCurrentYearSADataTable=!1;n.showAddSchool=!1;n.CurrentYearSA=!1;n.showForNoRecruit={showSchools:!1,showHoursPerWeek:!1,showHoursPerMonths:!1,CountryEE:!1,Comments:!1};n.Countries=[];n.myLabel="";n.maxHoursPerWeek=0;n.maxHoursPerWeekNoRecruit=0;n.oldRegion=!1;n.recruitments={};n.serviceAssumeds={};n.onlines={};n.personMessage={};n.showSeptember=!1;n.showOctobe=!1;n.showNovember=!1;n.showDecember=!1;n.showJanuary=!1;n.showFebruary=!1;n.showMarch=!1;n.showApril=!1;n.showMay=!1;n.showJune=!1;n.showJuly=!1;n.isUpdate=!1;n.serviceAssumedTypeVisible=!0;n.regionVisible=!0;n.specialityVisible=!0;n.messInfo="";n.messRecInfo="";n.applRemediations={};n.visibleRemediationType={};n.CanAddNoRecruitSA=!1;n.DisableFieldSet=!1;n.NoRecruitServiceAssumedCount={};n.SelectedRegionLevel=0;n.DisableForInsertSchool=!1;n.noRec=!1;n.authentication.isAuth?n.authentication.isAuth&&f.isValueInArray(f.getRoleCode(n.authentication.role),"u1")?r.go("forbidden"):(l="serviceAssumed,recruitment,serviceAssumedOld,folder,specSmea,specSmeaEEPEBP,spec,specEEPEBP,changeDataRequest",f.getByParams({role:n.authentication.role,codes:l},"/api/Subsystem/NewCheckPermission").then(function(t){var r=l.split(","),h,a;for(h in r)n.pageRules[r[h]]=e("filter")(t,{Code:r[h]},!0)[0].Rules;c=i.getPersonId();f.isValueInArray(f.getRoleCode(n.authentication.role),"u2")&&(c=n.authentication.personId);n.recruits={};s.getPersonAttributesForMenu(c).then(function(t){n.personAttributesForMenu=t},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Υπήρξε πρόβλημα κατά την φόρτωση του μενού")});f.getByParams({personId:c},"/api/Person/getPersonSpecialitiesDetails").then(function(t){n.personMessage=t;n.showMessages=!0},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Υπήρξε πρόβλημα κατά την φόρτωση του μενού")});a=o.all([f.getByAll("/api/RecruitmentServiceAssumed/serviceAssumed"),f.getByAll("/api/RecruitmentServiceAssumed/getRecruitmentStatusAsync"),f.getByAll("/api/RecruitmentServiceAssumed/exceptionSanctionTypes"),f.getByParams({personId:c},"/api/RecruitmentServiceAssumed/getSubstitutesServiceAssumed"),f.getByAll("/api/LandingPage/getAllDidacticYear"),f.getByAll("/api/RecruitmentServiceAssumed/getPaymentTypeAsync"),f.getByParams({personId:c},"/api/RecruitmentServiceAssumed/checkOnline"),f.getByAll("/api/LandingPage/getDidacticYearExpirations"),f.getByAll("/api/RecruitmentServiceAssumed/getRecruitmentInfoTypeAsync"),f.getByParams({personId:c,role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId},"/api/Person/checkPermanentViewFromOfficialDide")]);a.then(function(t){n.serviceAssumedTypes=t[0];n.recruitmentStatus=t[1];n.exceptionSanctionTypes=t[2];n.recruitments=t[3].substitutes;n.CanInsertRecruitment=t[3].CanInsertRecruitment;n.serviceAssumeds=t[3].serviceAssumeds;n.noRecruitments=t[3].noSubstitutes;n.AllDidacticYear=t[4];n.paymentTypes=t[5];n.onlines=t[6];n.didacticYearExpirations=t[7];n.recruitmentInfoTypes=t[8];n.disableDideForViewForPermanent=t[9];n.minDate=new Date(n.didacticYear.YearFrom+"-09-01");f.isValueInArray(f.getRoleCode(n.authentication.role),"u2, s")||f.getByParams({role:n.authentication.role,levelId:n.authentication.levelId,personId:c},"/api/RecruitmentServiceAssumed/canAddServiceAssumedNoRecruit").then(function(t){n.CanAddNoRecruitSA=t},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Υπήρξε πρόβλημα κατά την φόρτωση του μενού")});f.isEmptyValue(n.AllDidacticYear)||(n.CurrentDidacticYear=e("filter")(n.AllDidacticYear,{IsCurrent:!0},!0)[0]);f.isEmptyValue(n.serviceAssumeds)||(n.NoRecruitServiceAssumedCount=e("filter")(n.serviceAssumeds,{RecruitmentsSubstituteId:null,IsCurrent:!0},!0)[0],n.VisibleNoRecruitSADataTable=f.isEmptyValue(n.NoRecruitServiceAssumedCount)?!1:!0,n.NoCurrnetYearServiceAssumedCount=e("filter")(n.serviceAssumeds,{IsCurrent:!1},!0)[0],n.VisibleNoCurrentYearSADataTable=f.isEmptyValue(n.NoCurrnetYearServiceAssumedCount)?!1:!0)})},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})):r.go("/");n.disableFields=function(t,i,r){t=="recruitment"?n.IsDisabledRecruitment=i=="insert"&&n.pageRules.recruitment.CanInsert?!1:i=="update"&&n.pageRules.recruitment.CanUpdate?!1:!0:t=="serviceAssumed"?i=="insert"&&n.pageRules.serviceAssumed.CanInsert?(n.IsDisabledServiceAssumed=!1,n.DisableFieldSet=!1):i=="update"&&n.pageRules.serviceAssumed.CanUpdate&&(f.isValueInArray(f.getRoleCode(n.authentication.role),"m1, m2, a")||n.authentication.regionAndUnitId==r&&f.isValueInArray(f.getRoleCode(n.authentication.role),"d1, d2, p"))?(n.DisableFieldSet=!1,n.IsDisabledServiceAssumed=!1):(n.IsDisabledServiceAssumed=!0,n.DisableFieldSet=!0):t=="serviceAssumedOld"&&(i=="insert"&&n.pageRules.serviceAssumedOld.CanInsert?(n.DisableFieldSet=!1,n.IsDisabledServiceAssumed=!1):i=="update"&&n.pageRules.serviceAssumedOld.CanUpdate&&(f.isValueInArray(f.getRoleCode(n.authentication.role),"m1, m2, a")||n.authentication.regionAndUnitId==r&&f.isValueInArray(f.getRoleCode(n.authentication.role),"d1, d2"))?(n.DisableFieldSet=!1,n.IsDisabledServiceAssumed=!1):(n.DisableFieldSet=!0,n.IsDisabledServiceAssumed=!0))};n.openRecModal=function(t,i){n.noServiceAssumed=[];n.SaveRecDisabled=!1;n.recruits={};n.original={};angular.copy(t,n.original);n.noRec=i;n.disableFields("recruitment","update","");n.recruitments.length>=2&&t.IsFull==!0&&(n.noServiceAssumed=e("filter")(n.recruitments,function(n){return n.IsFull==!1&&!n.ServiceAssumed}));n.noServiceAssumed.length>0?u.pop("error","Συμπληρώστε τα στοιχεία ανάληψης για την πρόσληψη μειωμένου ωραρίου"):(blockUI({target:"#tblRecruitment",animate:!0}),n.ModalTitle="Προβολή / Επεξεργασία Πρόσληψης",n.recruits.recruitmentServiceAssumed={},n.DetailsForRecruit=[],n.addRecruit=!1,n.recruits=t,n.disabledServiceAssumedDate=n.recruits.ServiceAssumed==1?!0:!1,n.recruitmentStatusFilter=f.isValueInArray(f.getRoleCode(n.authentication.role),"m1, m2, a")?e("filter")(n.recruitmentStatus,function(n){return n.CanPublish==!0||n.Id==5||n.Id==6}):n.recruits.RecruitmentsStatusId==5?e("filter")(n.recruitmentStatus,function(n){return n.CanPublish==!0||n.Id==5}):n.recruits.RecruitmentsStatusId==6?e("filter")(n.recruitmentStatus,function(n){return n.CanPublish==!0||n.Id==6}):e("filter")(n.recruitmentStatus,function(n){return n.CanPublish==!0}),(n.recruits.SubstitutesTypeId==9||n.recruits.SubstitutesTypeId==10||n.recruits.SubstitutesTypeId==11||n.recruits.SubstitutesTypeId==12)&&(n.recruitmentStatusStop=e("filter")(n.recruitmentStatus,{Id:9},!0)[0],n.recruitmentStatusStop.Description="Λήξη Σύμβασης Covid-19",n.recruitmentStatusFilter.push(n.recruitmentStatusStop)),a(),n.CurrentDidacticYear=e("filter")(n.AllDidacticYear,{IsCurrent:!0},!0)[0],n.DidacticYearExpirationSA=e("filter")(n.didacticYearExpirations,{DidacticYearId:n.CurrentDidacticYear.Id,LevelId:n.recruits.LevelId},!0)[0],n.maxDate=f.isEmptyValue(n.DidacticYearExpirationSA)?f.isEmptyValue(n.authentication.levelId==1)?new Date(n.CurrentDidacticYear.YearTo+"-06-30"):new Date(n.CurrentDidacticYear.YearTo+"-06-21"):new Date(n.DidacticYearExpirationSA.ExpirationDate),n.recruits.recruitmentServiceAssumed=e("filter")(n.serviceAssumeds,{RecruitmentsSubstituteId:n.recruits.Id,FirstServiceAssumed:!0},!0)[0],f.isEmptyValue(n.recruits.recruitmentServiceAssumed)||(n.recruits.DidacticYearId=n.recruits.recruitmentServiceAssumed.DidacticYearId,n.recruits.ServiceAssumedDate=n.recruits.recruitmentServiceAssumed.ServiceAssumedDate,n.recruits.ServiceAssumedTypeId=n.recruits.recruitmentServiceAssumed.ServiceAssumedTypeId,n.recruits.ServiceAssumedId=n.recruits.recruitmentServiceAssumed.Id,n.recruits.CreationDateServiceAssumed=n.recruits.recruitmentServiceAssumed.CreationDate,n.recruits.CreatedByServiceAssumed=n.recruits.recruitmentServiceAssumed.CreatedBy,n.recruits.CreatedUserRoleServiceAssumed=n.recruits.recruitmentServiceAssumed.CreatedUserRole,n.recruits.CreatedRegionAndUnitDescriptionServiceAssumed=n.recruits.recruitmentServiceAssumed.CreatedRegionAndUnitDescription),n.disableEnableFields(),n.substituteTypesFilter=n.substituteTypes,n.regionsForRecruitmentsFilter=n.regionsForRecruitments,n.personMusicSpecialistsFilter=n.personMusicSpecialists,h(function(){unblockUI("#tblRecruitment");$("#AddRecModal").modal("show")},300))};n.openModal=function(){n.noServiceAssumed=[];n.SaveRecDisabled=!1;n.disableFields("recruitment","insert","");n.noServiceAssumed=e("filter")(n.recruitments,function(n){return n.IsFull==!1&&!n.ServiceAssumed});n.noServiceAssumed.length>0?u.pop("error","Συμπληρώστε τα στοιχεία ανάληψης για την πρόσληψη μειωμένου ωραρίου"):(blockUI({target:"#tblRecruitment",animate:!0}),n.ModalTitle="Εισαγωγή Πρόσληψης",n.recruits={},n.recruits.PersonId=c,n.showServiceAssumedDate=!1,n.showRecruitmentsStatusDescription=!1,n.showExceptionSanctionType=!1,n.showResignation=!1,n.showReCall=!1,n.addRecruit=!0,n.addRecruitUpgrade=!1,n.substituteTypesFilter=[],n.regionsForRecruitmentsFilter=[],n.personMusicSpecialistsFilter=[],n.recruitmentStatusFilter=e("filter")(n.recruitmentStatus,function(n){return n.CanPublish==!0}),f.isEmptyValue(n.recruitments)&&(n.DetailsForRecruit=[]),a(),h(function(){unblockUI("#tblRecruitment");$("#AddRecModal").modal("show")},300))};n.getSubstituteType=function(){n.addRecruitUpgrade=!1;n.addRecruit=!0;n.recruits.SubstitutesTypeId="";n.recruits.ApplicationTypeRegionAndUnitId="";n.myfilterSpec=e("filter")(n.allSpecialities,{Id:n.recruits.SpecialityId},!0)[0];n.recruits.SpecialityGroupId=n.myfilterSpec.SpecialityGroupId;n.personMusicSpecialistsFilter=[];n.myfilterSpec.IsSpecialEducation==!0||n.myfilterSpec.IsEEPEBP==!0?n.substituteTypesFilter=e("filter")(n.substituteTypes,function(n){return n.IsSpecialEducation==!0}):n.myfilterSpec.IsMusic==!0?(n.substituteTypesFilter=e("filter")(n.substituteTypes,function(n){return n.IsSpecialEducation==!1}),n.personMusicSpecialistsFilter=e("filter")(n.personMusicSpecialists,function(t){return t.SpecialityId==n.recruits.SpecialityId})):n.substituteTypesFilter=e("filter")(n.substituteTypes,function(n){return n.IsMusic==!1&&n.IsSpecialEducation==!1});f.isEmptyValue(n.DetailsForRecruit.Upgrade)||n.recruits.SpecialityId!=n.DetailsForRecruit.Upgrade.SpecialityId||(n.addRecruitUpgrade=!0,n.recruits.SubstitutesTypeId=n.DetailsForRecruit.Upgrade.SubstituteTypeId==8?1:n.DetailsForRecruit.Upgrade.SubstituteTypeId,n.getRegion(),n.recruits.ApplicationTypeRegionAndUnitId=n.DetailsForRecruit.Upgrade.AppilcationTypeRegionAndUnitId,n.regionsForRecruitmentsFilter.LevelId=e("filter")(n.regionsForRecruitmentsFilter,function(t){return t.Id==n.recruits.ApplicationTypeRegionAndUnitId}),n.recruits.LevelId=n.regionsForRecruitmentsFilter.LevelId.Level,n.DidacticYearExpirationSA=e("filter")(n.didacticYearExpirations,{DidacticYearId:n.CurrentDidacticYear.Id,LevelId:n.recruits.LevelId},!0)[0],n.maxDate=f.isEmptyValue(n.DidacticYearExpirationSA)?f.isEmptyValue(n.authentication.levelId==1)?new Date(n.YearTo+"-06-30"):new Date(n.YearTo+"-06-21"):new Date(n.DidacticYearExpirationSA.ExpirationDate),n.recruits.MusicSpecialistId=n.DetailsForRecruit.Upgrade.MusicSpecialistId)};n.getRegion=function(){n.regionsForRecruitmentsFilter=n.recruits.SubstitutesTypeId==4?e("filter")(n.regionsForRecruitments,function(n){return n.Id==271||n.Id==4293}):e("filter")(n.regionsForRecruitments,function(t){return t.SubstitutesTypeList.indexOf(n.recruits.SubstitutesTypeId)!==-1});n.recruits.SubstitutesTypeId==5&&(n.personMusicSpecialistsFilter=e("filter")(n.personMusicSpecialists,function(t){return t.SpecialityId==n.recruits.SpecialityId}))};n.changeRemoteUnit=function(){n.ServiceAssumed.RemoteUnit||(n.ServiceAssumed.RemoteUnitHours=0)};n.changeRemoteUnitNoRecruit=function(){n.noRecruitServiceAssumed.RemoteUnit||(n.noRecruitServiceAssumed.RemoteUnitHours=0)};n.changeRegion=function(){n.recruits.LevelId=e("filter")(n.regionsForRecruitments,function(t){return t.Id==n.recruits.ApplicationTypeRegionAndUnitId})[0].Level;n.DidacticYearExpirationSA=e("filter")(n.didacticYearExpirations,{DidacticYearId:n.CurrentDidacticYear.Id,LevelId:n.recruits.LevelId},!0)[0];n.maxDate=f.isEmptyValue(n.DidacticYearExpirationSA)?f.isEmptyValue(n.authentication.levelId==1)?new Date(n.YearTo+"-06-30"):new Date(n.YearTo+"-06-21"):new Date(n.DidacticYearExpirationSA.ExpirationDate)};n.cancel=function(t){if(!f.isEmptyValue(t)&&!n.noRec){n.temp=e("filter")(n.recruitments,function(n){return n.Id==t})[0];var i=n.recruitments.indexOf(n.temp);n.recruitments.splice(i,1);n.recruitments.push(n.original)}};n.saveAction=function(){var t=v();$("#recruitmentForm").valid()&&(n.SaveRecDisabled=!0,f.postByParams(t,"/api/RecruitmentServiceAssumed/save").then(function(){f.getByParams({personId:c},"/api/RecruitmentServiceAssumed/getSubstitutesServiceAssumed").then(function(t){n.recruitments=t.substitutes;n.serviceAssumeds=t.serviceAssumeds;n.CanInsertRecruitment=t.CanInsertRecruitment},function(n){u.pop("error","ΠΡΟΣΟΧΗ",n.data)});$("#AddRecModal").modal("hide")},function(n){u.pop("error","ΠΡΟΣΟΧΗ",n.data)}))};n.disableEnableFields=function(){f.isEmptyValue(n.recruits.PresenceDateFrom)&&f.isEmptyValue(n.recruits.PresenceDateTo)&&f.isValueInArray(f.getRoleCode(n.authentication.role),"d1, d2, p")?(n.messRecInfo="Δεν έχει οριστεί η Ημερομηνία Ανακοίνωσης Τοποθέτησης",n.SaveRecDisabled=!0,n.IsDisabledRecruitment=!0):(n.SaveRecDisabled=!1,n.IsDisabledRecruitment=!1,n.recruits.ServiceAssumed==1?(n.showServiceAssumedDate=!0,n.showRecruitmentsStatusDescription=!0,n.showExceptionSanctionType=!1,n.recruits.RecruitmentsStatusId==9?(n.showResignation=!0,n.showReCall=!1,n.showExceptionSanctionType=!1):n.recruits.RecruitmentsStatusId==5||n.recruits.RecruitmentsStatusId==6?n.showReCall=!0:n.recruits.RecruitmentsStatusId==4||n.recruits.RecruitmentsStatusId==3?(n.showResignation=!0,n.showReCall=!0,n.showExceptionSanctionType=n.recruits.RecruitmentsStatusId==3?!0:!1):(n.showResignation=!1,n.showReCall=!1)):n.recruits.ServiceAssumed==2?(n.showServiceAssumedDate=!1,n.showRecruitmentsStatusDescription=!1,n.showExceptionSanctionType=!0,n.showResignation=!1,n.showReCall=!0):(n.showServiceAssumedDate=!1,n.showRecruitmentsStatusDescription=!1,n.showExceptionSanctionType=!1,n.showResignation=!1,n.showReCall=!1),n.messRecInfo="")};n.changeServiceAssumed=function(){n.recruits.RecruitmentsStatusId=null;n.recruits.ResignationProtocol=null;n.recruits.ResignationDate=null;n.recruits.RecallProtocol=null;n.recruits.RecallDate=null;n.recruits.RecallADA=null;n.recruits.ServiceAssumedDate=null;n.recruits.ExceptionSanctionType=null;n.recruits.ServiceAssumed==1?(n.showServiceAssumedDate=!0,n.showRecruitmentsStatusDescription=!0,n.showExceptionSanctionType=!1):n.recruits.ServiceAssumed==2?(n.showServiceAssumedDate=!1,n.showRecruitmentsStatusDescription=!1,n.showExceptionSanctionType=!0,n.showResignation=!1,n.showReCall=!1):(n.showServiceAssumedDate=!1,n.showRecruitmentsStatusDescription=!1,n.showExceptionSanctionType=!1,n.showResignation=!1,n.showReCall=!1)};n.changRecruitmentsStatusDescription=function(){n.recruits.ResignationProtocol=null;n.recruits.ResignationDate=null;n.recruits.RecallProtocol=null;n.recruits.RecallDate=null;n.recruits.RecallADA=null;n.recruits.ExceptionSanctionType=null;n.recruits.RecruitmentsStatusId==9?(n.showResignation=!0,n.showReCall=!1,n.showExceptionSanctionType=!1):n.recruits.RecruitmentsStatusId==4||n.recruits.RecruitmentsStatusId==3?(n.showResignation=!0,n.showReCall=!0,n.showExceptionSanctionType=n.recruits.RecruitmentsStatusId==3?!0:!1):(n.showResignation=!1,n.showReCall=!1,n.showExceptionSanctionType=!1)};n.openRecallModal=function(){var t={ModifiedUserRole:n.authentication.role,ModifiedRegionAndUnitDescription:n.authentication.unitName,ModifiedUserName:n.authentication.userName,RecruitmentsSubstituteId:n.record.Id},i=t;f.postByParams(i,"/api/RecruitmentServiceAssumed/RecallSubstitute").then(function(){f.getByParams({personId:c},"/api/RecruitmentServiceAssumed/getSubstitutesServiceAssumed").then(function(t){n.recruitments=t.substitutes;n.serviceAssumeds=t.serviceAssumeds;n.CanInsertRecruitment=t.CanInsertRecruitment},function(n){u.pop("error","ΠΡΟΣΟΧΗ",n.data)});$("#AddRecallModal").modal("hide")},function(n){u.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.record={};n.openModalDel=function(t){n.record=t};n.showTrackChanges=function(n,t){i.setTrackId(n);i.setTrackTypeId(t);r.go("showTrackChanges")};n.openServiceAsuumedModal=function(t){n.originalSA={};angular.copy(t,n.originalSA);n.disableFields("serviceAssumed","update",t.RegionAndUnitIdForAccess);blockUI({target:"#tblServiceAssumed",animate:!0});n.ModalTitle="Ενημέρωση Ανάληψης";n.ServiceAssumed=[];n.recruitmentsForServiceAssumed=[];n.saSchools=[];n.SchoolId.selected.NameConc="";n.ServiceAssumed=t;n.recruitmentsForServiceAssumed=e("filter")(n.recruitments,{Id:t.RecruitmentsSubstituteId},!0)[0];n.minDate=n.recruitmentsForServiceAssumed.PresenceDateFrom;n.ServiceAssumed.IsFull==!0?n.maxHoursPerWeek=30:f.isEmptyValue(n.ServiceAssumed.HoursPerWeek)||(n.maxHoursPerWeek=n.ServiceAssumed.HoursPerWeek);n.ServiceAssumed.HoursPerWeek==0&&(n.ServiceAssumed.HoursPerWeek="");n.ServiceAssumed.RemoteUnitHours==0&&(n.ServiceAssumed.RemoteUnitHours="");n.ServiceAssumed.InaccessibleUnitHours==0&&(n.ServiceAssumed.InaccessibleUnitHours="");n.ServiceAssumed.ApplicationTypeRegionAndUnit=t.RegionAndUnitDescriptionWithoutConcat;n.ServiceAssumed.ServiceAssumedTypeId==5||n.ServiceAssumed.ServiceAssumedTypeId==8||n.ServiceAssumed.ServiceAssumedTypeId==10||n.ServiceAssumed.ServiceAssumedTypeId==13||n.ServiceAssumed.ServiceAssumedTypeId==15||n.ServiceAssumed.RegionAndUnitTypeId==3||n.ServiceAssumed.RegionAndUnitTypeId==33||n.ServiceAssumed.ServiceAssumedTypeId==57?(n.AddOrEditSchool=!0,n.VisibleSave=!0,n.NoSchoolValid=!0):n.ServiceAssumed.Schools.length>=1||f.isEmptyValue(n.ServiceAssumed.Id)?(n.AddOrEditSchool=!1,n.VisibleSave=!1,n.NoSchoolValid=!1):(n.AddOrEditSchool=!0,n.VisibleSave=!1,n.NoSchoolValid=!1);n.formFields();f.getByParams({regionAndUnitId:n.ServiceAssumed.ApplicationTypeRegionAndUnitId,levelId:n.recruitmentsForServiceAssumed.LevelId,serviceAssumedDate:n.ServiceAssumed.CreationDate},"/api/RecruitmentServiceAssumed/getSchoolsForServiceAssumed").then(function(t){n.schools=t;n.schoolsFilter=n.ServiceAssumed.SpecialityId==1||n.ServiceAssumed.SpecialityId==329||n.ServiceAssumed.SpecialityId==5?e("filter")(n.schools,function(n){return n.ParentUnitTypeId==8}):n.ServiceAssumed.SpecialityId==164||n.ServiceAssumed.SpecialityId==293||n.ServiceAssumed.SpecialityId==330?e("filter")(n.schools,function(n){return n.ParentUnitTypeId==9}):n.schools;n.schoolsFilter.unshift({Id:"83041",Name:"Άλλη Τοποθέτηση",RegistryNo:"9999999",NameConc:"9999999 - Άλλη Τοποθέτηση",ParentUnitTypeId:0})},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")});n.DidacticYearExpirationSA=e("filter")(n.didacticYearExpirations,{DidacticYearId:n.ServiceAssumed.DidacticYearId,LevelId:n.recruitmentsForServiceAssumed.LevelId},!0)[0];n.maxDate=f.isEmptyValue(n.DidacticYearExpirationSA)?f.isEmptyValue(n.authentication.levelId==1)?new Date(n.YearTo+"-06-30"):new Date(n.YearTo+"-06-21"):new Date(n.DidacticYearExpirationSA.ExpirationDate);h(function(){unblockUI("#tblServiceAssumed");$("#AddServiceAssumedModal").modal("show")},300)};n.openServiceAsuumedInsertModal=function(t){var i,r;if(n.AddOrEditSchool=!0,n.VisibleSave=!1,n.SchoolId.selected={},n.SchoolId.selected.NameConc="",n.recruitmentsForServiceAssumed=[],n.disableFields("serviceAssumed","insert",""),n.recruitmentsForServiceAssumed=e("filter")(n.recruitments,{Id:t.Id},!0)[0],n.firstServiceAssumed=e("filter")(n.serviceAssumeds,{RecruitmentsSubstituteId:t.Id},!0)[0],n.currentServiceAssumed=e("filter")(n.serviceAssumeds,function(n){return n.RecruitmentsSubstituteId==t.Id&&f.isEmptyValue(n.ExperienceEndDate)}),n.ServiceAssumedWithEndDate=e("filter")(n.serviceAssumeds,function(n){return n.RecruitmentsSubstituteId==t.Id}),!f.isEmptyValue(n.ServiceAssumedWithEndDate))for(i="",r=n.ServiceAssumedWithEndDate.length-1;r>=0;r--)n.ServiceAssumedWithEndDate[r].ExperienceEndDate>i&&(i=n.ServiceAssumedWithEndDate[r].ExperienceEndDate);n.minDate=i>t.PresenceDateFrom?moment(i,"YYYY-MM-DD").add("days",1):t.PresenceDateFrom;f.isEmptyValue(n.firstServiceAssumed)?u.pop("error","Συμπληρώστε τα στοιχεία ανάληψης στην πρόσληψη "):f.isEmptyValue(n.currentServiceAssumed)?(blockUI({target:"#tblServiceAssumed",animate:!0}),n.ModalTitle="Εισαγωγή Ανάληψης",n.ServiceAssumed=[],n.ServiceAssumed.Schools=[],n.saSchools=[],n.ServiceAssumed.PersonId=c,n.ServiceAssumed.RecruitmentsSubstituteId=n.firstServiceAssumed.RecruitmentsSubstituteId,n.ServiceAssumed.SpecialityId=n.firstServiceAssumed.SpecialityId,n.ServiceAssumed.SpecialityDescription=n.firstServiceAssumed.SpecialityDescription,n.ServiceAssumed.ApplicationTypeRegionAndUnitId=n.firstServiceAssumed.ApplicationTypeRegionAndUnitId,n.ServiceAssumed.ApplicationTypeRegionAndUnit=n.firstServiceAssumed.RegionAndUnitDescriptionWithoutConcat,n.ServiceAssumed.ServiceAssumedTypeId=n.firstServiceAssumed.ServiceAssumedTypeId,n.ServiceAssumed.ServiceAssumedTypeDescription=n.firstServiceAssumed.ServiceAssumedTypeDescription,n.ServiceAssumed.DidacticYearId=n.firstServiceAssumed.DidacticYearId,n.ServiceAssumed.IsFull=n.recruitmentsForServiceAssumed.IsFull,n.ServiceAssumed.ServiceAssumedTypeId==5||n.ServiceAssumed.ServiceAssumedTypeId==8||n.ServiceAssumed.ServiceAssumedTypeId==10||n.ServiceAssumed.ServiceAssumedTypeId==13||n.ServiceAssumed.ServiceAssumedTypeId==15||n.ServiceAssumed.RegionAndUnitTypeId==3?(n.AddOrEditSchool=!0,n.VisibleSave=!0,n.NoSchoolValid=!0):(n.AddOrEditSchool=!0,n.VisibleSave=!1,n.NoSchoolValid=!1),n.DidacticYearExpirationSA=e("filter")(n.didacticYearExpirations,{DidacticYearId:n.ServiceAssumed.DidacticYearId,LevelId:n.recruitmentsForServiceAssumed.LevelId},!0)[0],n.maxDate=f.isEmptyValue(n.DidacticYearExpirationSA)?f.isEmptyValue(n.authentication.levelId==1)?new Date(n.YearTo+"-06-30"):new Date(n.YearTo+"-06-21"):new Date(n.DidacticYearExpirationSA.ExpirationDate),n.formFields(),f.getByParams({regionAndUnitId:n.ServiceAssumed.ApplicationTypeRegionAndUnitId,levelId:n.recruitmentsForServiceAssumed.LevelId,serviceAssumedDate:n.recruitmentsForServiceAssumed.CreationDate},"/api/RecruitmentServiceAssumed/getSchoolsForServiceAssumed").then(function(t){n.schools=t;n.schoolsFilter=n.ServiceAssumed.SpecialityId==1||n.ServiceAssumed.SpecialityId==329||n.ServiceAssumed.SpecialityId==5?e("filter")(n.schools,function(n){return n.ParentUnitTypeId==8}):n.ServiceAssumed.SpecialityId==164||n.ServiceAssumed.SpecialityId==293||n.ServiceAssumed.SpecialityId==330?e("filter")(n.schools,function(n){return n.ParentUnitTypeId==9}):n.schools;n.schoolsFilter.unshift({Id:"83041",Name:"Άλλη Τοποθέτηση",RegistryNo:"9999999",NameConc:"9999999 - Άλλη Τοποθέτηση",ParentUnitTypeId:0})},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")}),h(function(){unblockUI("#tblServiceAssumed");$("#AddServiceAssumedModal").modal("show")},300)):u.pop("error","Συμπληρώστε τα στοιχεία της ήδη υπάρχουσας ανάληψης πριν εισάγετε νέα ")};n.formFields=function(){!f.isEmptyValue(n.ServiceAssumed.IsFull)==!0?n.maxHoursPerWeek=30:f.isEmptyValue(n.ServiceAssumed.HoursPerWeek)||(n.maxHoursPerWeek=n.ServiceAssumed.HoursPerWeek);f.isEmptyValue(n.ServiceAssumed.IntendancyPlacementDate)||f.isEmptyValue(n.ServiceAssumed.ServiceAssumedDate)||!(!f.isEmptyValue(n.SchoolId.selected.Id)||n.ServiceAssumed.Schools.length>0||n.NoSchoolValid)?(n.DisableOrVisibleFields=!1,n.VisibleSave=!1):(n.DisableOrVisibleFields=!0,n.VisibleSave=n.ServiceAssumed.Schools.length==0&&!n.NoSchoolValid||f.isEmptyValue(n.ServiceAssumed.Id)?!1:!0);n.ExperienceEndDateValid=e("date")(n.ServiceAssumed.ExperienceEndDate,"yyyy-MM-ddΤHH:mm:ss");f.isEmptyValue(n.ServiceAssumed.ExperienceEndDate)||f.isEmptyValue(n.ServiceAssumed.ServiceAssumedDate)||f.isEmptyValue(n.recruitmentsForServiceAssumed.PresenceDateFrom)||f.isEmptyValue(n.ServiceAssumed.FirstServiceAssumed)||!(n.ExperienceEndDateValid<n.recruitmentsForServiceAssumed.PresenceDateFrom)?!f.isEmptyValue(n.ServiceAssumed.ExperienceEndDate)&&!f.isEmptyValue(n.ServiceAssumed.ServiceAssumedDate)&&f.isEmptyValue(n.ServiceAssumed.FirstServiceAssumed)&&n.ServiceAssumed.ExperienceEndDate<n.ServiceAssumed.ServiceAssumedDate?(n.messInfo="Η Ημ/νία Λήξης δεν μπορεί να προηγείται της Ημ/νίας Ανάληψης Υπηρεσίας ",n.DisableOrVisibleSave=!0):(n.messInfo="",n.DisableOrVisibleSave=!1):(n.messInfo="Η Ημ/νία Λήξης δεν μπορεί να προηγείται της προθεσμίας Ανάληψης Υπηρεσίας ",n.DisableOrVisibleSave=!0)};n.saveActionServiceAssumed=function(){var t=y();!n.NoSchoolValid&&(f.isEmptyValue(n.ServiceAssumed.Schools)||f.isEmptyValue(n.ServiceAssumed.Id))&&(n.schoolForServiceAssumed=e("filter")(n.schoolsFilter,{Id:n.SchoolId.selected.Id},!0)[0],t.RegistryNo=n.schoolForServiceAssumed.RegistryNo,t.SchoolId=n.SchoolId.selected.Id,t.ValidFrom=n.saSchools.ValidFrom,t.ValidTo=n.saSchools.ValidTo,t.PlacementAction=n.saSchools.PlacementAction,t.HoursPerWeekSchool=n.saSchools.HoursPerWeek);$("#serviceAssumedForm").valid()&&(n.IsDisabledServiceAssumed=!0,f.postByParams(t,"/api/RecruitmentServiceAssumed/SaveServiceAssumed").then(function(){f.getByParams({personId:c},"/api/RecruitmentServiceAssumed/getSubstitutesServiceAssumed").then(function(t){n.recruitments=t.substitutes;n.serviceAssumeds=t.serviceAssumeds;n.CanInsertRecruitment=t.CanInsertRecruitment},function(n){u.pop("error","ΠΡΟΣΟΧΗ",n.data)});$("#AddServiceAssumedModal").modal("hide")},function(n){u.pop("error","ΠΡΟΣΟΧΗ",n.data)}))};n.AddEditSchool=function(t){if(t=="Add")n.AddOrEditSchool=!0,n.VisibleSave=!1,n.saSchools={},n.SchoolId.selected={},n.DisableForInsertSchool=!0;else if(t=="Save"){n.AddOrEditSchool=!0;var i=p();$("#serviceAssumedForm").valid()&&(n.IsDisabledServiceAssumed=!0,f.postByParams(i,"/api/RecruitmentServiceAssumed/saveServiceAssumedSchool").then(function(){f.getByParams({personId:c},"/api/RecruitmentServiceAssumed/getSubstitutesServiceAssumed").then(function(t){n.recruitments=t.substitutes;n.serviceAssumeds=t.serviceAssumeds;n.ServiceAssumed=e("filter")(n.serviceAssumeds,{Id:n.ServiceAssumed.Id},!0)[0];n.CanInsertRecruitment=t.CanInsertRecruitment},function(n){u.pop("error","ΠΡΟΣΟΧΗ",n.data)});n.AddOrEditSchool=!1;n.IsDisabledServiceAssumed=!1;n.DisableForInsertSchool=!1},function(n){u.pop("error","ΠΡΟΣΟΧΗ",n.data)}))}};n.EditSchool=function(t){n.SchoolId.selected={};n.SchoolId.selected.NameConc="";n.saSchools=t;n.SchoolId.selected.NameConc=t.RegistryNo+"-"+t.Name;n.AddOrEditSchool=!0;n.DisableForInsertSchool=!0;n.VisibleSave=!0};n.SchoolCancel=function(){f.getByParams({personId:c},"/api/RecruitmentServiceAssumed/getSubstitutesServiceAssumed").then(function(t){n.recruitments=t.substitutes;n.serviceAssumeds=t.serviceAssumeds;n.ServiceAssumed=e("filter")(n.serviceAssumeds,{Id:n.ServiceAssumed.Id},!0)[0];n.CanInsertRecruitment=t.CanInsertRecruitment},function(n){u.pop("error","ΠΡΟΣΟΧΗ",n.data)});n.AddOrEditSchool=!1;n.DisableForInsertSchool=!1};n.DelServiceAssumed=function(t){var i={};i.Id=t.Id;i.PersonId=c;i.UserRole=n.authentication.role;i.RegionAndUnitDescription=n.authentication.unitName;f.postByParams(i,"/api/RecruitmentServiceAssumed/deleteServiceAssumed").then(function(){f.getByParams({personId:c},"/api/RecruitmentServiceAssumed/getSubstitutesServiceAssumed").then(function(t){n.recruitments=t.substitutes;n.serviceAssumeds=t.serviceAssumeds;n.ServiceAssumed=e("filter")(!f.isEmptyValue(n.serviceAssumeds),{Id:n.ServiceAssumed.Id},!0)[0];n.CanInsertRecruitment=t.CanInsertRecruitment},function(n){u.pop("error","ΠΡΟΣΟΧΗ",n.data)})},function(n){u.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.DelSchool=function(t){var i={};i.Id=t.Id;i.PersonId=c;i.UserRole=n.authentication.role;i.RegionAndUnitDescription=n.authentication.unitName;f.postByParams(i,"/api/RecruitmentServiceAssumed/deleteServiceAssumedSchool").then(function(){f.getByParams({personId:c},"/api/RecruitmentServiceAssumed/getSubstitutesServiceAssumed").then(function(t){n.recruitments=t.substitutes;n.serviceAssumeds=t.serviceAssumeds;n.ServiceAssumed=e("filter")(n.serviceAssumeds,{Id:n.ServiceAssumed.Id},!0)[0];n.CanInsertRecruitment=t.CanInsertRecruitment},function(n){u.pop("error","ΠΡΟΣΟΧΗ",n.data)})},function(n){u.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.cancelSA=function(t){if(!f.isEmptyValue(t)){n.temp=e("filter")(n.serviceAssumeds,function(n){return n.Id==t})[0];var i=n.serviceAssumeds.indexOf(n.temp);n.serviceAssumeds.splice(i,1);n.serviceAssumeds.push(n.originalSA)}n.AddOrEditSchool=!1;n.DisableForInsertSchool=!1;f.getByParams({personId:c},"/api/RecruitmentServiceAssumed/getSubstitutesServiceAssumed").then(function(t){n.recruitments=t.substitutes;n.serviceAssumeds=t.serviceAssumeds;n.ServiceAssumed=e("filter")(n.serviceAssumeds,{Id:n.ServiceAssumed.Id},!0)[0];n.CanInsertRecruitment=t.CanInsertRecruitment},function(n){u.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.formFieldsNoRecruit=function(){var h,l,t;if(/^[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}/.test(n.noRecruitServiceAssumed.ServiceAssumedDate)||(n.noRecruitServiceAssumed.ServiceAssumedDate=function(){return}()),f.isEmptyValue(n.noRecruitServiceAssumed.IsFull)||n.noRecruitServiceAssumed.IsFull!=!0?f.isEmptyValue(n.noRecruitServiceAssumed.HoursPerWeek)||(n.maxHoursPerWeekNoRecruit=n.noRecruitServiceAssumed.HoursPerWeek):n.maxHoursPerWeekNoRecruit=30,!f.isEmptyValue(n.noRecruitServiceAssumed.ServiceAssumedDate)&&(!f.isEmptyValue(n.NoRecruitSchoolId.selected.Id)||!f.isEmptyValue(n.schoolsNoRecruit).length>0||n.NoSchoolValid)?(n.DisableOrVisibleFields=!0,n.VisibleSave=!f.isEmptyValue(n.schoolsNoRecruit).length==0&&!n.NoSchoolValid||f.isEmptyValue(n.noRecruitServiceAssumed.Id)?!1:!0):(n.DisableOrVisibleFields=!1,n.VisibleSave=!1),f.isEmptyValue(n.noRecruitServiceAssumed.ServiceAssumedDate))n.YearTo=n.CurrentYearSA==!0?n.didacticYear.YearTo:n.didacticYear.YearTo;else{var r=new Date(n.noRecruitServiceAssumed.ServiceAssumedDate),i=r.getMonth()+1,s=r.getFullYear();n.YearTo=i>=1&&i<9?s:s+1}f.isEmptyValue(n.noRecruitServiceAssumed.ServiceAssumedDate)||(n.minDate=n.didacticYear.YearFrom+"-09-01",n.maxDate=n.didacticYear.YearTo+"-07-31",n.CurrentYearSA=n.noRecruitServiceAssumed.ServiceAssumedDate>=n.minDate&&n.noRecruitServiceAssumed.ServiceAssumedDate<=n.maxDate?!0:!1);n.getDatesToFrom();n.oldRegion=!f.isEmptyValue(n.noRecruitServiceAssumed.ServiceAssumedDate)&&n.noRecruitServiceAssumed.ServiceAssumedDate<"2013-09-01"?!0:!1;f.isEmptyValue(n.noRecruitServiceAssumed.ApplicationTypeId)&&(n.noRecruitServiceAssumed.ApplicationTypeId=16);f.isValueInArray(f.getRoleCode(n.authentication.role),"u2,s")||(h=o.all([f.getByParams({role:n.authentication.role,IsCurrent:n.DidacticYearSA.IsCurrent,regionAndUnitId:n.authentication.regionAndUnitId},"/api/RecruitmentServiceAssumed/getServiceAssumedTypeByRole"),f.getByParams({Id:c},"/api/PersonSpeciality/getAllPersonSpecialities"),f.getByParams({applicationTypeId:n.noRecruitServiceAssumed.ApplicationTypeId,role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId},"/api/ApplicationTypeRegionAndUnit/getRegionAndUnitForServiceAssumedNotRecruit"),f.getByAll("/api/RecruitmentServiceAssumed/getServiceAssumedTypeAll")]),h.then(function(t){var v,p,i;for(n.serviceAssumedTypesPerRole=t[0],n.allSpecialities=t[1],n.regionsNoRecruit=t[2],n.serviceAssumedTypesAll=t[3],n.minDate=new Date(n.didacticYear.YearFrom+"-09-01"),i=n.allSpecialities.length-1;i>=0;i--){if(f.isEmptyValue(n.allSpecialities[i].ValidTo))n.ValidToDate=null;else{var r=new Date(n.allSpecialities[i].ValidTo),o=r.getMonth()+1,s=r.getFullYear();n.ValidToDate=o>=1&&o<9?new Date(s+"-08-31"):new Date(s+1+"-08-31")}if(f.isEmptyValue(n.allSpecialities[i].ValidFrom))n.ValidFromDate=null;else{var h=new Date(n.allSpecialities[i].ValidFrom),l=h.getMonth()+1,a=h.getFullYear();n.ValidFromDate=l>=1&&l<9?new Date(a+"-09-01"):new Date(a+1+"-09-01")}(!f.isEmptyValue(n.ValidToDate)&&new Date(n.noRecruitServiceAssumed.ServiceAssumedDate)>n.ValidToDate||!f.isEmptyValue(n.ValidFromDate)&&new Date(n.noRecruitServiceAssumed.ServiceAssumedDate)<n.ValidFromDate)&&n.allSpecialities.splice(i,1)}for(f.isEmptyValue(n.authentication.levelId==1)||f.isValueInArray(f.getRoleCode(n.authentication.role),"m1, m2")?f.isEmptyValue(n.authentication.levelId==2)||f.isValueInArray(f.getRoleCode(n.authentication.role),"m1, m2")||(n.allSpecialities=e("filter")(n.allSpecialities,function(t){return t.LevelId==n.authentication.levelId||t.IsEEPEBP==!0})):n.allSpecialities=e("filter")(n.allSpecialities,function(t){return t.LevelId==n.authentication.levelId||t.IsBoth==!0||t.IsEEPEBP==!0}),n.SpecialitiesFilter=n.allSpecialities,i=n.regionsNoRecruit.length-1;i>=0;i--)if(!f.isEmptyValue(n.regionsNoRecruit[i].ValidFrom)){var h=new Date(n.regionsNoRecruit[i].ValidFrom),l=h.getMonth()+1,a=h.getFullYear();n.ValidFromDate=l>=1&&l<9?new Date(a+"-08-31"):new Date(a+1+"-08-31");var r=new Date(n.regionsNoRecruit[i].ValidTo),o=r.getMonth()+1,s=r.getFullYear();n.ValidToDate=o>=1&&o<9?new Date(s+"-08-31"):new Date(s+1+"-08-31");var y=moment(n.noRecruitServiceAssumed.ServiceAssumedDate).format("YYYY-MM-DD"),w=moment(n.ValidToDate).format("YYYY-MM-DD"),b=moment(n.ValidFromDate).format("YYYY-MM-DD");(y>w||y<b)&&n.regionsNoRecruit.splice(i,1)}if(n.isUpdate&&!n.AddOrEditSchool&&(v=f.isEmptyValue(n.noRecruitServiceAssumed.ApplicationTypeRegionAndUnitId)?0:n.noRecruitServiceAssumed.LevelId,f.isEmptyValue(v>0)?n.showForNoRecruit.showSchools=!1:f.getByParams({regionAndUnitId:n.noRecruitServiceAssumed.ApplicationTypeRegionAndUnitId,levelId:v,serviceAssumedDate:n.noRecruitServiceAssumed.ServiceAssumedDate},"/api/RecruitmentServiceAssumed/getSchoolsForServiceAssumed").then(function(t){n.schoolsNoRecruit=t;n.schoolsNoRecruit.length>1?(n.schoolsNoRecruitFilter=n.noRecruitServiceAssumed.SpecialityId==1||n.noRecruitServiceAssumed.SpecialityId==329||n.noRecruitServiceAssumed.SpecialityId==5?e("filter")(n.schoolsNoRecruit,function(n){return n.ParentUnitTypeId==8}):n.noRecruitServiceAssumed.SpecialityId==164||n.noRecruitServiceAssumed.SpecialityId==293||n.noRecruitServiceAssumed.SpecialityId==330?e("filter")(n.schoolsNoRecruit,function(n){return n.ParentUnitTypeId==9}):n.schoolsNoRecruit,n.schoolsNoRecruitFilter.unshift({Id:"83041",Name:"Άλλη Τοποθέτηση",RegistryNo:"9999999",NameConc:"9999999 - Άλλη Τοποθέτηση",ParentUnitTypeId:0}),n.showAddSchool=!0,n.showForNoRecruit.showSchools=n.noRecruitServiceAssumed.Schools.length>=1||n.noRecruitServiceAssumed.IsCurrent?!0:!1):n.showAddSchool=!1},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})),n.regionsNoRecruitByUser=f.isEmptyValue(n.authentication.levelId!=3)||f.isValueInArray(f.getRoleCode(n.authentication.role),"m1, m2")?n.regionsNoRecruit:e("filter")(n.regionsNoRecruit,function(t){return t.Level==n.authentication.levelId}),n.regionsNoRecruitFilter=n.regionsNoRecruitByUser,n.authentication.regionAndUnitId==236||f.isValueInArray(f.getRoleCode(n.authentication.role),"m1, m2, a")||(p=[29,30],angular.forEach(p,function(t){for(var i=n.serviceAssumedTypesPerRole.length-1;i>=0;i--)n.serviceAssumedTypesPerRole[i].Id==t&&n.serviceAssumedTypesPerRole.splice(i,1)})),f.isEmptyValue(n.noRecruitServiceAssumed.Id)||(n.serviceAssumedTypeOnlyRead=e("filter")(n.serviceAssumedTypesPerRole,{Id:n.noRecruitServiceAssumed.ServiceAssumedTypeId},!0)[0],n.serviceAssumedTypeVisible=f.isEmptyValue(n.serviceAssumedTypeOnlyRead)?!1:!0,n.specialityOnlyRead=e("filter")(n.allSpecialities,{Id:n.noRecruitServiceAssumed.SpecialityId},!0)[0],n.specialityVisible=f.isEmptyValue(n.specialityOnlyRead)?!1:!0,n.regionOnlyRead=e("filter")(n.regionsNoRecruit,{Id:n.noRecruitServiceAssumed.ApplicationTypeRegionAndUnitId},!0)[0],n.regionVisible=f.isEmptyValue(n.regionOnlyRead)?!1:!0),f.isValueInArray(f.getRoleCode(n.authentication.role),"d1, d2")&&!f.isEmptyValue(n.CurrentYearSA)){if(n.onlineMusicHours=e("filter")(n.onlines,function(t){return t.RegionAndUnitId==n.authentication.regionAndUnitId&&t.ServiceAssumedTypeId==18}),f.isEmptyValue(n.onlineMusicHours))for(i=n.serviceAssumedTypesPerRole.length-1;i>=0;i--)n.serviceAssumedTypesPerRole[i].Id==18&&n.serviceAssumedTypesPerRole.splice(i,1);if(!f.isEmptyValue(n.CurrentYearSA)&&(n.onlineHours=e("filter")(n.onlines,function(t){return t.RegionAndUnitId==n.authentication.regionAndUnitId&&t.ServiceAssumedTypeId==4}),f.isEmptyValue(n.onlineHours)))for(i=n.serviceAssumedTypesPerRole.length-1;i>=0;i--)n.serviceAssumedTypesPerRole[i].Id==4&&n.serviceAssumedTypesPerRole.splice(i,1)}f.getByParams({personId:c},"/api/ApplRemediation/getApplForServiceAssumed").then(function(t){if(n.applRemediations=t,!f.isEmptyValue(n.applRemediations)||f.isEmptyValue(n.CurrentYearSA))n.visibleRemediationType=e("filter")(n.applRemediations,function(t){return t.RegionAndUnitId==n.authentication.regionAndUnitId});else for(var i=n.serviceAssumedTypesPerRole.length-1;i>=0;i--)n.serviceAssumedTypesPerRole[i].Id==47&&n.serviceAssumedTypesPerRole.splice(i,1)},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Υπήρξε πρόβλημα κατά την φόρτωση του μενού")});n.serviceAssumedTypesPerRoleFilter=n.serviceAssumedTypesPerRole;n.getSpecialityPerAssumeType()}));n.months=[{name:"showSeptember",code:"09",order:"0",month:"September"},{name:"showOctober",code:"10",order:"1",month:"October"},{name:"showNovember",code:"11",order:"2",month:"November"},{name:"showDecember",code:"12",order:"3",month:"December"},{name:"showJanuary",code:"1",order:"4",month:"January"},{name:"showFebruary",code:"2",order:"5",month:"February"},{name:"showMarch",code:"3",order:"6",month:"March"},{name:"showApril",code:"4",order:"7",month:"April"},{name:"showMay",code:"5",order:"8",month:"May"},{name:"showJune",code:"6",order:"9",month:"June"},{name:"showJuly",code:"7",order:"10",month:"July"}];f.isEmptyValue(n.noRecruitServiceAssumed.ServiceAssumedDate)||(n.showSeptember=!1,n.showOctober=!1,n.showNovember=!1,n.showDecember=!1,n.showJanuary=!1,n.showFebruary=!1,n.showMarch=!1,n.showApril=!1,n.showMay=!1,n.showJune=!1,n.showJuly=!1,angular.forEach(n.months,function(t){var r,u,f;if(t.code==i)for(r=t.order-1;r>=0;r--)u=n.months[r].name,f=n.months[r].month,n[u]=!0,n.noRecruitServiceAssumed[f]=""}));n.months1=[{name:"showSeptember",code:"09",order:"0",month:"September"},{name:"showOctober",code:"10",order:"1",month:"October"},{name:"showNovember",code:"11",order:"2",month:"November"},{name:"showDecember",code:"12",order:"3",month:"December"},{name:"showJanuary",code:"1",order:"4",month:"January"},{name:"showFebruary",code:"2",order:"5",month:"February"},{name:"showMarch",code:"3",order:"6",month:"March"},{name:"showApril",code:"4",order:"7",month:"April"},{name:"showMay",code:"5",order:"8",month:"May"},{name:"showJune",code:"6",order:"9",month:"June"},{name:"showJuly",code:"7",order:"10",month:"July"}];f.isEmptyValue(n.noRecruitServiceAssumed.ExperienceEndDate)||(l=new Date(n.noRecruitServiceAssumed.ExperienceEndDate),t=l.getMonth()+2,t==13&&(t=1),angular.forEach(n.months1,function(i){var r,u,f;if(i.code==t)for(r=i.order;r<11;r++)u=n.months1[r].name,f=n.months[r].month,n[u]=!0,n.noRecruitServiceAssumed[f]=""}))};n.getDatesToFrom=function(){var i,r,u;f.isEmptyValue(n.YearTo)||(n.DidacticYearSA=e("filter")(n.AllDidacticYear,{YearTo:n.YearTo},!0)[0],f.isEmptyValue(n.DidacticYearSA)?n.DidacticYearId=null:(n.DidacticYearId=n.DidacticYearSA.Id,n.DidacticYearExpirationSA=!f.isEmptyValue(n.SelectedRegionLevel)>0&&!f.isEmptyValue(n.SelectedRegionLevel)<3?e("filter")(n.didacticYearExpirations,{DidacticYearId:n.DidacticYearId,LevelId:n.SelectedRegionLevel},!0)[0]:f.isEmptyValue(n.authentication.levelId==1)?e("filter")(n.didacticYearExpirations,{DidacticYearId:n.DidacticYearId,LevelId:2},!0)[0]:e("filter")(n.didacticYearExpirations,{DidacticYearId:n.DidacticYearId,LevelId:1},!0)[0]),(f.isEmptyValue(n.noRecruitServiceAssumed.ServiceAssumedTypeId)||n.noRecruitServiceAssumed.ServiceAssumedTypeId!=20)&&n.noRecruitServiceAssumed.ServiceAssumedTypeId!=21&&n.noRecruitServiceAssumed.ServiceAssumedTypeId!=22&&n.noRecruitServiceAssumed.ServiceAssumedTypeId!=36?f.isEmptyValue(n.noRecruitServiceAssumed.ServiceAssumedTypeId)||n.noRecruitServiceAssumed.ServiceAssumedTypeId!=22?f.isEmptyValue(n.noRecruitServiceAssumed.ServiceAssumedTypeId)||n.noRecruitServiceAssumed.ServiceAssumedTypeId!=41||n.DidacticYearSA.YearFrom!="2016"?f.isEmptyValue(n.noRecruitServiceAssumed.ServiceAssumedTypeId)?(n.minDate=n.CurrentYearSA==!0?new Date(n.YearTo-1+"-09-01"):new Date("1900-09-01"),n.maxDate=f.isEmptyValue(n.DidacticYearExpirationSA)?f.isEmptyValue(n.authentication.levelId==1)?new Date(n.YearTo+"-06-30"):new Date(n.YearTo+"-06-21"):new Date(n.DidacticYearExpirationSA.ExpirationDate)):(n.minDate=new Date(n.YearTo-1+"-09-01"),n.maxDate=f.isEmptyValue(n.DidacticYearExpirationSA)?f.isEmptyValue(n.authentication.levelId==1)?new Date(n.YearTo+"-06-30"):new Date(n.YearTo+"-06-21"):new Date(n.DidacticYearExpirationSA.ExpirationDate)):n.maxDate=new Date(n.YearTo+"-07-31"):(n.minDate=new Date("01/01/1950"),f.isEmptyValue(n.originalSA)||(i=new Date(n.originalSA.ExperienceEndDate),t=i.getFullYear(),t>n.YearTo&&(n.YearTo=t)),n.maxDate=f.isEmptyValue(n.DidacticYearExpirationSA)?f.isEmptyValue(n.authentication.levelId==1)?new Date(n.YearTo+"-06-30"):new Date(n.YearTo+"-06-21"):new Date(n.DidacticYearExpirationSA.ExpirationDate)):(n.minDate=new Date("01/01/1900"),n.maxDate=new Date(n.didacticYear.YearTo+"-07-31")),f.isEmptyValue(n.noRecruitServiceAssumed.ExperienceEndDate)||(new Date(n.noRecruitServiceAssumed.ExperienceEndDate,"YYYY-MM-DD")<new Date(n.minDate,"YYYY-MM-DD")||new Date(n.noRecruitServiceAssumed.ExperienceEndDate,"YYYY-MM-DD")>new Date(n.maxDate+1,"YYYY-MM-DD"))&&(n.noRecruitServiceAssumed.ExperienceEndDate=""),f.isEmptyValue(n.noRecruitServiceAssumed.ExperienceEndDate)||f.isEmptyValue(n.noRecruitServiceAssumed.ServiceAssumedDate)||(r=moment(n.noRecruitServiceAssumed.ExperienceEndDate).format("YYYY-MM-DD"),u=moment(n.noRecruitServiceAssumed.ServiceAssumedDate).format("YYYY-MM-DD"),r<u?(n.messInfo="Η Ημ/νία Λήξης δεν μπορεί να προηγείται της Ημ/νίας Ανάληψης Υπηρεσίας ",n.DisableOrVisibleSave=!0):(n.messInfo="",n.DisableOrVisibleSave=!1)))};n.openModalNoRecruitServiceAssumed=function(t){n.SpecialitiesFilter=[];n.serviceAssumedTypesPerRoleFilter=[];n.noRecruitServiceAssumed=[];n.SelectedRegionLevel=0;t==!0?n.disableFields("serviceAssumed","insert",""):n.disableFields("serviceAssumedOld","insert","");n.showForNoRecruit.showHoursPerMonths=!1;n.NoRecruitSchoolId.selected={};n.NoRecruitSchoolId.selected.NameConc="";n.showRemoteUnit=!1;n.showInaccessibleUnit=!1;n.showRemoteUnitHours=!1;n.showInaccessibleUnitHours=!1;n.showMinistryDateAction=!1;n.showIntendancyDateAction=!1;n.showForNoRecruit.showHoursPerWeek=!1;n.noRecruitsaSchools={};n.CurrentYearSA=t;blockUI({target:"#tblNoRecruitServiceAssumed",animate:!0});n.ModalTitle="Εισαγωγή Ανάληψης χωρίς πρόσληψη";n.noRecruitServiceAssumed.PersonId=c;n.showSeptember=!1;n.showOctober=!1;n.showNovember=!1;n.showDecember=!1;n.showJanuary=!1;n.showFebruary=!1;n.showMarch=!1;n.showApril=!1;n.showMay=!1;n.showJune=!1;n.showJuly=!1;n.isUpdate=!1;n.messInfo="";n.formFieldsNoRecruit();h(function(){unblockUI("#tblNoRecruitServiceAssumed");$("#AddNoRecruitServiceAssumedModal").modal("show")},300)};n.editModalNoRecruitServiceAssumed=function(t,i){n.originalSA={};n.CurrentYearSA=i;n.SelectedRegionLevel=0;angular.copy(t,n.originalSA);i==!0?n.disableFields("serviceAssumed","update",t.RegionAndUnitIdForAccess):n.disableFields("serviceAssumedOld","update",t.RegionAndUnitIdForAccess);blockUI({target:"#tblNoRecruitServiceAssumed",animate:!0});n.ModalTitle="Ενημέρωση Ανάληψης";n.noRecruitServiceAssumed=[];n.AddOrEditSchool=!1;n.VisibleSave=!1;n.showAddSchool=!1;n.showForNoRecruit.showHoursPerMonths=!1;n.showForNoRecruit.showSchools=!1;n.showRemoteUnit=!1;n.showInaccessibleUnit=!1;n.showRemoteUnitHours=!1;n.showInaccessibleUnitHours=!1;n.showIntendancyDateAction=!1;n.showMinistryDateAction=!1;n.showSeptember=!1;n.showOctober=!1;n.showNovember=!1;n.showDecember=!1;n.showJanuary=!1;n.showFebruary=!1;n.showMarch=!1;n.showApril=!1;n.showMay=!1;n.showJune=!1;n.showJuly=!1;n.noRecruitsaSchools={};n.NoRecruitSchoolId.selected.NameConc="";n.messInfo="";n.noRecruitServiceAssumed=t;n.isUpdate=!0;n.DisableFieldSet&&n.disableFieldsSA(n.noRecruitServiceAssumed);n.maxHoursPerWeekNoRecruit=n.noRecruitServiceAssumed.IsFull==!0?30:n.HoursPerWeek;n.noRecruitServiceAssumed.HoursPerWeek==0&&(n.noRecruitServiceAssumed.HoursPerWeek="");n.noRecruitServiceAssumed.RemoteUnitHours==0&&(n.noRecruitServiceAssumed.RemoteUnitHours="");n.noRecruitServiceAssumed.InaccessibleUnitHours==0&&(n.noRecruitServiceAssumed.InaccessibleUnitHours="");n.noRecruitServiceAssumed.ApplicationTypeRegionAndUnit=t.RegionAndUnitDescriptionWithoutConcat;n.noRecruitServiceAssumed.ServiceAssumedTypeDescription=t.ServiceAssumedTypeDescription;n.ServiceAssumedTypes=[{name:t.ServiceAssumedTypeDescription,value:t.ServiceAssumedTypeId}];n.noRecruitServiceAssumed.ServiceAssumedTypeId=n.ServiceAssumedTypes[0].value;n.Specialities=[{name:t.SpecialityDescription,value:t.SpecialityId}];n.noRecruitServiceAssumed.SpecialityId=n.Specialities[0].value;n.ApplicationTypeRegionAndUnits=[{name:t.ApplicationTypeRegionAndUnit,value:t.ApplicationTypeRegionAndUnitId}];n.noRecruitServiceAssumed.ApplicationTypeRegionAndUnitId=n.ApplicationTypeRegionAndUnits[0].value;n.noRecruitServiceAssumed.PersonId=c;n.formFieldsNoRecruit();n.maxDate=f.isEmptyValue(n.authentication.levelId==1)?new Date(n.didacticYear.YearTo+"-06-30"):new Date(n.didacticYear.YearTo+"-06-21");h(function(){unblockUI("#tblNoRecruitServiceAssumed");$("#AddNoRecruitServiceAssumedModal").modal("show")},300)};n.disableFieldsSA=function(t){t.IsHourlyTeacher?n.showForNoRecruit.showHoursPerMonths=!0:(n.showForNoRecruit.showHoursPerMonths=!1,n.noRecruitServiceAssumed.September=null,n.noRecruitServiceAssumed.October=null,n.noRecruitServiceAssumed.November=null,n.noRecruitServiceAssumed.December=null,n.noRecruitServiceAssumed.January=null,n.noRecruitServiceAssumed.February=null,n.noRecruitServiceAssumed.March=null,n.noRecruitServiceAssumed.April=null,n.noRecruitServiceAssumed.May=null,n.noRecruitServiceAssumed.June=null,n.noRecruitServiceAssumed.July=null);t.IsSubstitute||t.IsHourlyTeacher?(n.showRemoteUnit=!0,n.showInaccessibleUnit=!0):(n.showRemoteUnit=!1,n.showInaccessibleUnit=!1,n.noRecruitServiceAssumed.RemoteUnit=!1,n.noRecruitServiceAssumed.InaccessibleUnit=!1);t.IsSubstitute?(n.showRemoteUnitHours=!0,n.showInaccessibleUnitHours=!0,n.showIntendancyDateAction=!0):(n.showRemoteUnitHours=!1,n.showInaccessibleUnitHours=!1,n.showIntendancyDateAction=!1,n.noRecruitServiceAssumed.IntendancyPlacementAction=null,n.noRecruitServiceAssumed.IntendancyPlacementDate=null,n.noRecruitServiceAssumed.RemoteUnitHours=null,n.noRecruitServiceAssumed.InaccessibleUnitHours=null);t.ServiceAssumedTypeId==36?n.showFEKDateAction=!0:(n.showFEKDateAction=!1,n.noRecruitServiceAssumed.fekData="",n.noRecruitServiceAssumed.fekDate="");t.IsSubstitute==!0?n.showMinistryDateAction=!0:(n.showMinistryDateAction=!1,n.noRecruitServiceAssumed.MinistryPlacementAction="",n.noRecruitServiceAssumed.MinistryPlacementDate="");t.ServiceAssumedTypeId==20||t.ServiceAssumedTypeId==21?f.getByAll("/api/Country/getEECountriesWithoutGreece").then(function(t){n.Countries=t;n.showForNoRecruit.CountryEE=!0;n.showForNoRecruit.Comments=!0;n.noRecruitServiceAssumed.ServiceAssumedAction=null;n.noRecruitServiceAssumed.ExperienceEndAction=null;n.showForNoRecruit.showHoursPerWeek=!1;n.myLabel="Σχολείο"},function(n){u.pop("error","ΠΡΟΣΟΧΗ",n.data)}):t.ServiceAssumedTypeId==22?(n.showForNoRecruit.Comments=!0,n.showForNoRecruit.showHoursPerWeek=!0,n.myLabel="Σχολείο",n.noRecruitServiceAssumed.EEDays=null,n.noRecruitServiceAssumed.EEMonths=null,n.noRecruitServiceAssumed.CountryId=null,n.showForNoRecruit.CountryEE=!1):t.ServiceAssumedTypeId==41?(n.showForNoRecruit.Comments=!0,n.showForNoRecruit.showHoursPerWeek=!1,n.myLabel="Σχολείο",n.noRecruitServiceAssumed.EEDays=null,n.noRecruitServiceAssumed.EEMonths=null,n.noRecruitServiceAssumed.CountryId=null,n.showForNoRecruit.CountryEE=!1):t.IsFull?(n.showForNoRecruit.CountryEE=!1,n.showForNoRecruit.Comments=!0,n.myLabel="Παρατηρήσεις",n.noRecruitServiceAssumed.EEDays=null,n.noRecruitServiceAssumed.EEMonths=null,n.noRecruitServiceAssumed.CountryId=null,n.showForNoRecruit.showHoursPerWeek=!1,n.noRecruitServiceAssumed.HoursPerWeek=null):(n.showForNoRecruit.showHoursPerWeek=!0,n.myLabel="Παρατηρήσεις",n.showForNoRecruit.Comments=!0,n.noRecruitServiceAssumed.EEDays=null,n.noRecruitServiceAssumed.EEMonths=null,n.noRecruitServiceAssumed.CountryId=null,n.showForNoRecruit.CountryEE=!1)};n.getSpecialityPerAssumeType=function(){var r,i,t;if(n.SpecialitiesFilter=[],n.serviceAssumedTypesPerRoleFilterSelected=[],f.isEmptyValue(n.noRecruitServiceAssumed.ServiceAssumedTypeId))n.SpecialitiesFilter=n.allSpecialities;else{if(r=[5,8,10,13,15,22,20,21,23,24,25,26,27,28,46,18,41],n.NoSchoolValid=r.indexOf(n.noRecruitServiceAssumed.ServiceAssumedTypeId)!=-1?!0:!1,n.noRecruitServiceAssumed.ServiceAssumedTypeId!=34||f.isEmptyValue(n.regionsNoRecruitFilter)||f.isEmptyValue(n.noRecruitServiceAssumed.ApplicationTypeRegionAndUnitId)||(i=f.isEmptyValue(n.noRecruitServiceAssumed.ApplicationTypeRegionAndUnitId)?0:e("filter")(n.regionsNoRecruitFilter,{Id:n.noRecruitServiceAssumed.ApplicationTypeRegionAndUnitId},!0)[0].RegionAndUnitTypeId,n.NoSchoolValid=f.isEmptyValue(i)||i!=2&&i!=3&&i!=4?!1:!0),n.NoSchoolValid==!0?(n.AddOrEditSchool=!1,n.VisibleSave=!1,n.showAddSchool=!1,n.showForNoRecruit.showSchools=!1):n.isUpdate==!1?(n.AddOrEditSchool=!0,n.showAddSchool=!1,n.VisibleSave=!1):f.isEmptyValue(n.noRecruitServiceAssumed.Schools)&&f.isEmptyValue(n.schoolsNoRecruit)?(n.CurrentYearSA?(n.showForNoRecruit.showSchools=!0,n.AddOrEditSchool=!0):(n.showForNoRecruit.showSchools=!1,n.AddOrEditSchool=!1),n.VisibleSave=!1,n.showAddSchool=!1):n.AddOrEditSchool==!0?(n.VisibleSave=f.isEmptyValue(n.NoRecruitSchoolId.selected)?!1:!0,n.showAddSchool=!1,n.showForNoRecruit.showSchools=!0):(n.VisibleSave=!1,n.showAddSchool=!0,n.showForNoRecruit.showSchools=!0),n.serviceAssumedTypesPerRoleFilterSelected=e("filter")(n.serviceAssumedTypesPerRole,{Id:n.noRecruitServiceAssumed.ServiceAssumedTypeId},!0)[0],!n.serviceAssumedTypeVisible&&f.isEmptyValue(n.serviceAssumedTypesPerRoleFilterSelected)&&(n.serviceAssumedTypesPerRoleFilterSelected=e("filter")(n.serviceAssumedTypesAll,{Id:n.noRecruitServiceAssumed.ServiceAssumedTypeId},!0)[0]),!f.isEmptyValue(n.serviceAssumedTypesPerRoleFilterSelected)&&f.isValueInArray(f.getRoleCode(n.authentication.role),"d2")&&n.noRecruitServiceAssumed.ServiceAssumedTypeId==18&&n.CurrentYearSA)for(n.OnlineFilter=e("filter")(n.onlines,function(n){return n.ServiceAssumedTypeId==18}),n.SpecialitiesFilter=e("filter")(n.allSpecialities,function(n){return n.IsMusic==!0}),t=n.SpecialitiesFilter.length-1;t>=0;t--)n.OnlineFilterPerSpec=e("filter")(n.onlineMusicHours,function(i){return i.SpecialityId==n.SpecialitiesFilter[t].Id}),f.isEmptyValue(n.OnlineFilterPerSpec)&&n.SpecialitiesFilter.splice(t,1);else if(!f.isEmptyValue(n.serviceAssumedTypesPerRoleFilterSelected)&&f.isValueInArray(f.getRoleCode(n.authentication.role),"d1, d2")&&n.serviceAssumedTypesPerRoleFilterSelected.ServiceAssumedTypeId==4&&n.CurrentYearSA)for(n.OnlineFilter=e("filter")(n.onlines,function(n){return n.ServiceAssumedTypeId==4}),n.SpecialitiesFilter=e("filter")(n.allSpecialities,function(n){return n.IsMusic==!1&&n.IsSpecialEducation==!1&&n.IsEEPEBP==!1}),t=n.SpecialitiesFilter.length-1;t>=0;t--)n.OnlineFilterPerSpec=e("filter")(n.onlineHours,function(i){return i.SpecialityId==n.SpecialitiesFilter[t].Id}),f.isEmptyValue(n.OnlineFilterPerSpec)&&n.SpecialitiesFilter.splice(t,1);else if(f.isEmptyValue(n.serviceAssumedTypesPerRoleFilterSelected)||n.serviceAssumedTypesPerRoleFilterSelected.IsMusic!=!0)if(f.isEmptyValue(n.serviceAssumedTypesPerRoleFilterSelected)||n.serviceAssumedTypesPerRoleFilterSelected.Id!=41)if(f.isEmptyValue(n.serviceAssumedTypesPerRoleFilterSelected)||n.serviceAssumedTypesPerRoleFilterSelected.IsSpecialEducation!=!0&&n.serviceAssumedTypesPerRoleFilterSelected.IsEEPEBP!=!0){for(n.SpecialitiesFilter=e("filter")(n.allSpecialities,function(n){return n.IsSpecialEducation==!1&&n.IsEEPEBP==!1}),t=n.SpecialitiesFilter.length-1;t>=0;t--)(n.SpecialitiesFilter[t].Id==11||n.SpecialitiesFilter[t].Id==104||n.SpecialitiesFilter[t].Id==117||n.SpecialitiesFilter[t].Id==118)&&n.SpecialitiesFilter.splice(t,1);n.messInfo=f.isEmptyValue(n.SpecialitiesFilter)&&!n.DisableFieldSet?"Δεν υπάρχουν διαθέσιμοι κλάδοι για την επιλεγμένη ιδιότητα ":""}else n.SpecialitiesFilter=e("filter")(n.allSpecialities,function(n){return n.IsSpecialEducation==!0||n.IsEEPEBP==!0}),f.isEmptyValue(n.SpecialitiesFilter)&&!n.DisableFieldSet?n.messInfo="Δεν υπάρχουν διαθέσιμοι κλάδοι για την επιλεγμένη ιδιότητα ":n.specialityVisible==!1?(n.specialitiesVisible=e("filter")(n.SpecialitiesFilter,function(t){return t.Id==n.noRecruitServiceAssumed.SpecialityId}),n.messInfo=f.isEmptyValue(n.specialitiesVisible)&&!n.DisableFieldSet?"Δεν υπάρχουν διαθέσιμοι κλάδοι για την επιλεγμένη ιδιότητα ":""):n.messInfo="";else n.SpecialitiesFilter=e("filter")(n.allSpecialities,function(n){return n.IsSpecialEducation==!1}),f.isEmptyValue(n.SpecialitiesFilter)&&!n.DisableFieldSet?n.messInfo="Δεν υπάρχουν διαθέσιμοι κλάδοι για την επιλεγμένη ιδιότητα ":n.specialityVisible==!1?(n.specialitiesVisible=e("filter")(n.SpecialitiesFilter,function(t){return t.Id==n.noRecruitServiceAssumed.SpecialityId}),n.messInfo=f.isEmptyValue(n.specialitiesVisible)&&!n.DisableFieldSet?"Δεν υπάρχουν διαθέσιμοι κλάδοι για την επιλεγμένη ιδιότητα ":""):n.messInfo="";else{if(n.SpecialitiesFilter=e("filter")(n.allSpecialities,function(n){return n.IsMusic==!0}),n.serviceAssumedTypesPerRoleFilterSelected.IsSubstitute==!0)for(t=n.SpecialitiesFilter.length-1;t>=0;t--)n.SpecialitiesFilter[t].Id==11&&n.SpecialitiesFilter.splice(t,1);f.isEmptyValue(n.SpecialitiesFilter)&&!n.DisableFieldSet?n.messInfo="Δεν υπάρχουν διαθέσιμοι κλάδοι για την επιλεγμένη ιδιότητα ":n.specialityVisible==!1?(n.specialitiesVisible=e("filter")(n.SpecialitiesFilter,function(t){return t.Id==n.noRecruitServiceAssumed.SpecialityId}),n.messInfo=f.isEmptyValue(n.specialitiesVisible)&&!n.DisableFieldSet?"Δεν υπάρχουν διαθέσιμοι κλάδοι για την επιλεγμένη ιδιότητα ":""):n.messInfo=""}f.isEmptyValue(n.serviceAssumedTypesPerRoleFilterSelected)||n.serviceAssumedTypesPerRoleFilterSelected.IsMusic!=!0?f.isEmptyValue(n.serviceAssumedTypesPerRoleFilterSelected)||n.serviceAssumedTypesPerRoleFilterSelected.Id!=5&&n.serviceAssumedTypesPerRoleFilterSelected.Id!=46&&n.serviceAssumedTypesPerRoleFilterSelected.Id!=13?f.isEmptyValue(n.serviceAssumedTypesPerRoleFilterSelected)||n.serviceAssumedTypesPerRoleFilterSelected.Id!=34?f.isEmptyValue(n.serviceAssumedTypesPerRoleFilterSelected)||n.serviceAssumedTypesPerRoleFilterSelected.Id!=41?f.isEmptyValue(n.serviceAssumedTypesPerRoleFilterSelected)||n.serviceAssumedTypesPerRoleFilterSelected.Id!=17&&n.serviceAssumedTypesPerRoleFilterSelected.Id!=12&&n.serviceAssumedTypesPerRoleFilterSelected.Id!=6?f.isEmptyValue(n.serviceAssumedTypesPerRoleFilterSelected)||n.serviceAssumedTypesPerRoleFilterSelected.Id!=7&&n.serviceAssumedTypesPerRoleFilterSelected.Id!=19&&n.serviceAssumedTypesPerRoleFilterSelected.Id!=11?f.isEmptyValue(n.serviceAssumedTypesPerRoleFilterSelected)||n.serviceAssumedTypesPerRoleFilterSelected.Id!=8&&n.serviceAssumedTypesPerRoleFilterSelected.Id!=57?f.isEmptyValue(n.serviceAssumedTypesPerRoleFilterSelected)||n.serviceAssumedTypesPerRoleFilterSelected.Id!=23&&n.serviceAssumedTypesPerRoleFilterSelected.Id!=24&&n.serviceAssumedTypesPerRoleFilterSelected.Id!=25?f.isEmptyValue(n.serviceAssumedTypesPerRoleFilterSelected)||n.serviceAssumedTypesPerRoleFilterSelected.Id!=26&&n.serviceAssumedTypesPerRoleFilterSelected.Id!=27&&n.serviceAssumedTypesPerRoleFilterSelected.Id!=28?f.isEmptyValue(n.serviceAssumedTypesPerRoleFilterSelected)||n.serviceAssumedTypesPerRoleFilterSelected.Id!=20&&n.serviceAssumedTypesPerRoleFilterSelected.Id!=21?f.isEmptyValue(n.serviceAssumedTypesPerRoleFilterSelected)||n.serviceAssumedTypesPerRoleFilterSelected.IsFull?f.isEmptyValue(n.noRecruitServiceAssumed.SpecialityId)?n.regionsNoRecruitFilter=e("filter")(n.regionsNoRecruitByUser,function(n){return n.RegionAndUnitTypeId!=38&&n.RegionAndUnitTypeId!=5&&n.RegionAndUnitTypeId!=4&&n.RegionAndUnitTypeId!=2&&n.RegionAndUnitTypeId!=9&&n.RegionAndUnitTypeId!=32&&n.RegionAndUnitTypeId!=34&&n.RegionAndUnitTypeId!=39&&n.RegionAndUnitTypeId!=40&&n.IsFull}):(n.SpecialitiesFilterSelected=e("filter")(n.allSpecialities,{Id:n.noRecruitServiceAssumed.SpecialityId},!0)[0],n.regionsNoRecruitFilter=f.isEmptyValue(n.SpecialitiesFilterSelected)||n.SpecialitiesFilterSelected.IsBoth!=!0&&n.SpecialitiesFilterSelected.IsEEPEBP!=!0?e("filter")(n.regionsNoRecruitByUser,function(n){return n.RegionAndUnitTypeId!=38&&n.RegionAndUnitTypeId!=5&&n.RegionAndUnitTypeId!=4&&n.RegionAndUnitTypeId!=2&&n.RegionAndUnitTypeId!=9&&n.RegionAndUnitTypeId!=32&&n.RegionAndUnitTypeId!=34&&n.RegionAndUnitTypeId!=39&&n.RegionAndUnitTypeId!=40}):e("filter")(n.regionsNoRecruitByUser,function(n){return n.RegionAndUnitTypeId!=38&&n.RegionAndUnitTypeId!=5&&n.RegionAndUnitTypeId!=4&&n.RegionAndUnitTypeId!=2&&n.RegionAndUnitTypeId!=9&&n.RegionAndUnitTypeId!=32&&n.RegionAndUnitTypeId!=34&&n.RegionAndUnitTypeId!=39&&n.RegionAndUnitTypeId!=40&&n.IsFull})):n.regionsNoRecruitFilter=e("filter")(n.regionsNoRecruitByUser,function(n){return n.RegionAndUnitTypeId!=40&&n.RegionAndUnitTypeId!=39&&n.RegionAndUnitTypeId!=5&&n.RegionAndUnitTypeId!=2&&n.RegionAndUnitTypeId!=4&&!n.IsFull}):n.regionsNoRecruitFilter=e("filter")(n.regionsNoRecruitByUser,function(n){return n.Code==11111&&n.IsFull}):n.regionsNoRecruitFilter=n.serviceAssumedTypesPerRoleFilterSelected.IsFull?e("filter")(n.regionsNoRecruitByUser,function(n){return n.RegionAndUnitTypeId==40&&n.IsFull}):e("filter")(n.regionsNoRecruitByUser,function(n){return n.RegionAndUnitTypeId==40&&!n.IsFull}):n.regionsNoRecruitFilter=n.serviceAssumedTypesPerRoleFilterSelected.IsFull?e("filter")(n.regionsNoRecruitByUser,function(n){return n.RegionAndUnitTypeId==39&&n.IsFull}):e("filter")(n.regionsNoRecruitByUser,function(n){return n.RegionAndUnitTypeId==39&&!n.IsFull}):n.regionsNoRecruitFilter=e("filter")(n.regionsNoRecruitByUser,function(n){return n.RegionAndUnitTypeId==9||n.RegionAndUnitTypeId==32||n.RegionAndUnitTypeId==34}):n.regionsNoRecruitFilter=n.serviceAssumedTypesPerRoleFilterSelected.IsFull?e("filter")(n.regionsNoRecruitByUser,function(n){return(n.RegionAndUnitId==134||n.RegionAndUnitId==5748||n.RegionAndUnitId==3119)&&n.IsFull}):e("filter")(n.regionsNoRecruitByUser,function(n){return(n.RegionAndUnitId==134||n.RegionAndUnitId==5748||n.RegionAndUnitId==3119)&&!n.IsFull}):n.regionsNoRecruitFilter=n.serviceAssumedTypesPerRoleFilterSelected.IsFull?e("filter")(n.regionsNoRecruitByUser,function(n){return n.RegionAndUnitTypeId==4&&n.IsFull}):e("filter")(n.regionsNoRecruitByUser,function(n){return n.RegionAndUnitTypeId==4&&!n.IsFull}):n.regionsNoRecruitFilter=e("filter")(n.regionsNoRecruitByUser,function(n){return n.RegionAndUnitTypeId==38}):n.regionsNoRecruitFilter=e("filter")(n.regionsNoRecruitByUser,function(n){return n.RegionAndUnitTypeId!=38&&n.RegionAndUnitTypeId!=5&&n.RegionAndUnitTypeId!=9&&n.RegionAndUnitTypeId!=32&&n.RegionAndUnitTypeId!=34&&n.RegionAndUnitTypeId!=39&&n.RegionAndUnitTypeId!=40&&n.IsFull}):n.regionsNoRecruitFilter=n.serviceAssumedTypesPerRoleFilterSelected.IsFull?e("filter")(n.regionsNoRecruitByUser,function(n){return n.RegionAndUnitTypeId==2&&n.IsFull}):e("filter")(n.regionsNoRecruitByUser,function(n){return n.RegionAndUnitTypeId==2&&!n.IsFull}):n.regionsNoRecruitFilter=f.isEmptyValue(n.noRecruitServiceAssumed)||n.originalSA.RegionAndUnitTypeId!=1?n.serviceAssumedTypesPerRoleFilterSelected.IsFull?e("filter")(n.regionsNoRecruitByUser,function(n){return n.RegionAndUnitTypeId==5&&n.IsFull}):e("filter")(n.regionsNoRecruitByUser,function(n){return n.RegionAndUnitTypeId==5&&!n.IsFull}):e("filter")(n.regionsNoRecruitByUser,function(n){return n.RegionAndUnitTypeId==1});!f.isEmptyValue(n.serviceAssumedTypesPerRoleFilterSelected)&&n.serviceAssumedTypesPerRoleFilterSelected.IsHourlyTeacher?n.showForNoRecruit.showHoursPerMonths=!0:(n.showForNoRecruit.showHoursPerMonths=!1,n.noRecruitServiceAssumed.September=null,n.noRecruitServiceAssumed.October=null,n.noRecruitServiceAssumed.November=null,n.noRecruitServiceAssumed.December=null,n.noRecruitServiceAssumed.January=null,n.noRecruitServiceAssumed.February=null,n.noRecruitServiceAssumed.March=null,n.noRecruitServiceAssumed.April=null,n.noRecruitServiceAssumed.May=null,n.noRecruitServiceAssumed.June=null,n.noRecruitServiceAssumed.July=null);n.serviceAssumedTypesPerRoleFilterSelected.IsSubstitute||n.serviceAssumedTypesPerRoleFilterSelected.IsHourlyTeacher?(n.showRemoteUnit=!0,n.showInaccessibleUnit=!0):(n.showRemoteUnit=!1,n.showInaccessibleUnit=!1,n.noRecruitServiceAssumed.RemoteUnit=!1,n.noRecruitServiceAssumed.InaccessibleUnit=!1);n.serviceAssumedTypesPerRoleFilterSelected.IsSubstitute||n.DisableFieldSet==!0&&n.noRecruitServiceAssumed.IsSubstitute?(n.showRemoteUnitHours=!0,n.showInaccessibleUnitHours=!0,n.showIntendancyDateAction=!0):(n.showRemoteUnitHours=!1,n.showInaccessibleUnitHours=!1,n.showIntendancyDateAction=!1,n.noRecruitServiceAssumed.IntendancyPlacementAction=null,n.noRecruitServiceAssumed.IntendancyPlacementDate=null,n.noRecruitServiceAssumed.RemoteUnitHours=null,n.noRecruitServiceAssumed.InaccessibleUnitHours=null);n.serviceAssumedTypesPerRoleFilterSelected.Id==36?n.showFEKDateAction=!0:(n.showFEKDateAction=!1,n.noRecruitServiceAssumed.fekData="",n.noRecruitServiceAssumed.fekDate="");n.serviceAssumedTypesPerRoleFilterSelected.IsSubstitute==!0?n.showMinistryDateAction=!0:(n.showMinistryDateAction=!1,n.noRecruitServiceAssumed.MinistryPlacementAction="",n.noRecruitServiceAssumed.MinistryPlacementDate="");n.serviceAssumedTypesPerRoleFilterSelected.Id==20||n.serviceAssumedTypesPerRoleFilterSelected.Id==21?f.getByAll("/api/Country/getEECountriesWithoutGreece").then(function(t){n.Countries=t;n.showForNoRecruit.CountryEE=!0;n.showForNoRecruit.Comments=!0;n.noRecruitServiceAssumed.ServiceAssumedAction=null;n.noRecruitServiceAssumed.ExperienceEndAction=null;n.showForNoRecruit.showHoursPerWeek=!1;n.myLabel="Σχολείο"},function(n){u.pop("error","ΠΡΟΣΟΧΗ",n.data)}):n.serviceAssumedTypesPerRoleFilterSelected.Id==22?(n.showForNoRecruit.Comments=!0,n.showForNoRecruit.showHoursPerWeek=!0,n.myLabel="Σχολείο",n.noRecruitServiceAssumed.EEDays=null,n.noRecruitServiceAssumed.EEMonths=null,n.noRecruitServiceAssumed.CountryId=null,n.showForNoRecruit.CountryEE=!1):n.serviceAssumedTypesPerRoleFilterSelected.Id==41?(n.showForNoRecruit.Comments=!0,n.showForNoRecruit.showHoursPerWeek=!1,n.myLabel="Σχολείο",n.noRecruitServiceAssumed.EEDays=null,n.noRecruitServiceAssumed.EEMonths=null,n.noRecruitServiceAssumed.CountryId=null,n.showForNoRecruit.CountryEE=!1):n.serviceAssumedTypesPerRoleFilterSelected.IsFull?(n.showForNoRecruit.CountryEE=!1,n.showForNoRecruit.Comments=!0,n.myLabel="Παρατηρήσεις",n.noRecruitServiceAssumed.EEDays=null,n.noRecruitServiceAssumed.EEMonths=null,n.noRecruitServiceAssumed.CountryId=null,n.showForNoRecruit.showHoursPerWeek=!1,n.noRecruitServiceAssumed.HoursPerWeek=null):(n.showForNoRecruit.showHoursPerWeek=!0,n.myLabel="Παρατηρήσεις",n.showForNoRecruit.Comments=!0,n.noRecruitServiceAssumed.EEDays=null,n.noRecruitServiceAssumed.EEMonths=null,n.noRecruitServiceAssumed.CountryId=null,n.showForNoRecruit.CountryEE=!1)}n.IsDisabledServiceAssumed=n.messInfo!=""||n.DisableFieldSet?!0:!1;f.isEmptyValue(n.serviceAssumedTypesPerRoleFilterSelected.IsFull)||n.serviceAssumedTypesPerRoleFilterSelected.IsFull!=!0?f.isEmptyValue(n.noRecruitServiceAssumed.HoursPerWeek)||(n.maxHoursPerWeekNoRecruit=n.noRecruitServiceAssumed.HoursPerWeek):n.maxHoursPerWeekNoRecruit=30;n.getDatesToFrom()};n.getServiceAssumedPerRole=function(){if(n.SpecialitiesFilterSelected=[],n.serviceAssumedTypesPerRoleFilter=[],f.isEmptyValue(n.noRecruitServiceAssumed.SpecialityId))n.serviceAssumedTypesPerRoleFilter=n.serviceAssumedTypesPerRole,n.messInfo="";else{if(n.SpecialitiesFilterSelected=e("filter")(n.allSpecialities,{Id:n.noRecruitServiceAssumed.SpecialityId},!0)[0],!f.isEmptyValue(n.noRecruitServiceAssumed.ServiceAssumedTypeId))(n.SpecialitiesFilterSelected.IsBoth==!0||n.SpecialitiesFilterSelected.IsEEPEBP==!0)&&[10,18,5,46,17,12,7,19].indexOf(n.noRecruitServiceAssumed.ServiceAssumedTypeId)==-1&&(n.regionsNoRecruitFilter=e("filter")(n.regionsNoRecruitFilter,function(n){return n.RegionAndUnitTypeId!=5&&n.RegionAndUnitTypeId!=4&&n.RegionAndUnitTypeId!=2}));n.SpecialitiesFilterSelected.IsMusic==!0&&(n.SpecialitiesFilterSelected.Code=="ΕΜ16.00"||n.SpecialitiesFilterSelected.Code=="ΠΕ17.14"||n.SpecialitiesFilterSelected.Code=="ΠΕ17.13"||n.SpecialitiesFilterSelected.Code=="ΠΕ16.02")?(n.serviceAssumedTypesPerRoleFilter=e("filter")(n.serviceAssumedTypesPerRole,function(n){return n.IsMusic==!0}),n.serviceAssumedTypeVisible==!1?(n.serviceAssumedTypesPerRoleVisible=e("filter")(n.serviceAssumedTypesPerRoleFilter,function(t){return t.Id==n.noRecruitServiceAssumed.ServiceAssumedTypeId}),n.messInfo=f.isEmptyValue(n.serviceAssumedTypesPerRoleVisible)?"Δεν υπάρχει διαθέσιμη ιδιότητα για τον επιλεγμένο κλάδο ":""):n.messInfo=""):n.SpecialitiesFilterSelected.IsSpecialEducation==!0?(n.serviceAssumedTypesPerRoleFilter=e("filter")(n.serviceAssumedTypesPerRole,function(n){return n.IsSpecialEducation==!0}),n.serviceAssumedTypeVisible==!1?(n.serviceAssumedTypesPerRoleVisible=e("filter")(n.serviceAssumedTypesPerRoleFilter,function(t){return t.Id==n.noRecruitServiceAssumed.ServiceAssumedTypeId}),n.messInfo=f.isEmptyValue(n.serviceAssumedTypesPerRoleVisible)?"Δεν υπάρχει διαθέσιμη ιδιότητα για τον επιλεγμένο κλάδο ":""):n.messInfo=""):n.SpecialitiesFilterSelected.IsEEPEBP==!0?(n.serviceAssumedTypesPerRoleFilter=e("filter")(n.serviceAssumedTypesPerRole,function(n){return n.IsSpecialEducation==!0||n.Id==41}),n.serviceAssumedTypeVisible==!1?(n.serviceAssumedTypesPerRoleVisible=e("filter")(n.serviceAssumedTypesPerRoleFilter,function(t){return t.Id==n.noRecruitServiceAssumed.ServiceAssumedTypeId}),n.messInfo=f.isEmptyValue(n.serviceAssumedTypesPerRoleVisible)?"Δεν υπάρχει διαθέσιμη ιδιότητα για τον επιλεγμένο κλάδο ":""):n.messInfo=""):(n.serviceAssumedTypesPerRoleFilter=n.serviceAssumedTypesPerRole,n.messInfo="")}n.messInfo==""?n.IsDisabledServiceAssumed=!1:scope.IsDisabledServiceAssumed=!0};n.getSchoolsNoRecruit=function(){n.showForNoRecruit.showSchools=!1;var i=f.isEmptyValue(n.noRecruitServiceAssumed.ApplicationTypeRegionAndUnitId)?0:e("filter")(n.regionsNoRecruitFilter,{Id:n.noRecruitServiceAssumed.ApplicationTypeRegionAndUnitId},!0)[0].Level,t=f.isEmptyValue(n.noRecruitServiceAssumed.ApplicationTypeRegionAndUnitId)?0:e("filter")(n.regionsNoRecruitFilter,{Id:n.noRecruitServiceAssumed.ApplicationTypeRegionAndUnitId},!0)[0].RegionAndUnitTypeId;f.isEmptyValue(n.noRecruitServiceAssumed.ServiceAssumedTypeId)||n.noRecruitServiceAssumed.ServiceAssumedTypeId!=34||(n.AddOrEditSchool=f.isEmptyValue(t)||t!=2&&t!=3&&t!=4?!0:!1);n.SelectedRegionLevel=i;n.getDatesToFrom();i>0?f.getByParams({regionAndUnitId:n.noRecruitServiceAssumed.ApplicationTypeRegionAndUnitId,levelId:i,serviceAssumedDate:n.noRecruitServiceAssumed.ServiceAssumedDate},"/api/RecruitmentServiceAssumed/getSchoolsForServiceAssumed").then(function(t){n.schoolsNoRecruit=t;n.schoolsNoRecruitFilter=n.noRecruitServiceAssumed.SpecialityId==1||n.noRecruitServiceAssumed.SpecialityId==329||n.noRecruitServiceAssumed.SpecialityId==5?e("filter")(n.schoolsNoRecruit,function(n){return n.ParentUnitTypeId==8}):n.noRecruitServiceAssumed.SpecialityId==164||n.noRecruitServiceAssumed.SpecialityId==293||n.noRecruitServiceAssumed.SpecialityId==330?e("filter")(n.schoolsNoRecruit,function(n){return n.ParentUnitTypeId==9}):n.schoolsNoRecruit;n.schoolsNoRecruitFilter.unshift({Id:"83041",Name:"Άλλη Τοποθέτηση",RegistryNo:"9999999",NameConc:"9999999 - Άλλη Τοποθέτηση",ParentUnitTypeId:0});n.showForNoRecruit.showSchools=!0},function(){u.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")}):(n.schoolsNoRecruitFilter=[],n.NoRecruitSchoolId.selected="",n.showForNoRecruit.showSchools=!1,n.saSchools=[])};n.saveNoRecruitServiceAssumed=function(){var r=new Date(n.noRecruitServiceAssumed.ServiceAssumedDate),i=r.getFullYear(),o=r.getMonth()+1,t;i=o>=1&&o<9?i-1:i;n.didacticYearSA=e("filter")(n.AllDidacticYear,{YearFrom:i},!0)[0];t=w();n.NoSchoolValid||!(f.isEmptyValue(n.schoolsNoRecruitFilter)||f.isEmptyValue(n.noRecruitServiceAssumed.Id)||n.AddOrEditSchool)||f.isEmptyValue(n.NoRecruitSchoolId.selected.Id)||(n.schoolNoRecruit=e("filter")(n.schoolsNoRecruitFilter,{Id:n.NoRecruitSchoolId.selected.Id},!0)[0],t.RegistryNo=n.schoolNoRecruit.RegistryNo,t.SchoolId=n.NoRecruitSchoolId.selected.Id,t.ValidFrom=n.noRecruitsaSchools.ValidFrom,t.ValidTo=n.noRecruitsaSchools.ValidTo,t.PlacementAction=n.noRecruitsaSchools.PlacementAction,t.HoursPerWeekSchool=n.noRecruitsaSchools.HoursPerWeek);$("#NoRecruitserviceAssumedForm").valid()&&(n.IsDisabledServiceAssumed=!0,f.postByParams(t,"/api/RecruitmentServiceAssumed/saveServiceAssumedNotRecruit").then(function(){f.getByParams({personId:c},"/api/RecruitmentServiceAssumed/getSubstitutesServiceAssumed").then(function(t){n.recruitments=t.substitutes;n.serviceAssumeds=t.serviceAssumeds;n.NoRecruitServiceAssumedCount=e("filter")(n.serviceAssumeds,{RecruitmentsSubstituteId:null,IsCurrent:!0},!0)[0];n.VisibleNoRecruitSADataTable=f.isEmptyValue(n.NoRecruitServiceAssumedCount)?!1:!0;n.NoCurrnetYearServiceAssumedCount=e("filter")(n.serviceAssumeds,{IsCurrent:!1},!0)[0];n.VisibleNoCurrentYearSADataTable=f.isEmptyValue(n.NoCurrnetYearServiceAssumedCount)?!1:!0},function(n){u.pop("error","ΠΡΟΣΟΧΗ",n.data)});n.NoSchoolValid=!1;n.showAddSchool=!1;n.AddOrEditSchool=!1;n.VisibleSave=!1;n.showForNoRecruit.showSchools=!1;$("#AddNoRecruitServiceAssumedModal").modal("hide")},function(n){u.pop("error","ΠΡΟΣΟΧΗ",n.data)}))};n.cancelNoRecruitSA=function(t){if(!f.isEmptyValue(t)){n.temp=e("filter")(n.serviceAssumeds,function(n){return n.Id==t})[0];var i=n.serviceAssumeds.indexOf(n.temp);n.serviceAssumeds.splice(i,1);n.serviceAssumeds.push(n.originalSA)}n.AddOrEditSchool=!1;n.VisibleSave=!1;n.showAddSchool=!1;n.showForNoRecruit.showSchools=!1;n.serviceAssumedTypeVisible=!0;n.regionVisible=!0;n.specialityVisible=!0;n.DisableForInsertSchool=!1;f.getByParams({personId:c},"/api/RecruitmentServiceAssumed/getSubstitutesServiceAssumed").then(function(t){n.recruitments=t.substitutes;n.serviceAssumeds=t.serviceAssumeds;n.NoRecruitServiceAssumedCount=e("filter")(n.serviceAssumeds,{RecruitmentsSubstituteId:null,IsCurrent:!0},!0)[0];n.VisibleNoRecruitSADataTable=f.isEmptyValue(n.NoRecruitServiceAssumedCount)?!1:!0;n.NoCurrnetYearServiceAssumedCount=e("filter")(n.serviceAssumeds,{IsCurrent:!1},!0)[0];n.VisibleNoCurrentYearSADataTable=f.isEmptyValue(n.NoCurrnetYearServiceAssumedCount)?!1:!0},function(n){u.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.EditNoRecruitSchool=function(t){n.NoRecruitSchoolId.selected={};n.NoRecruitSchoolId.selected.NameConc="";n.noRecruitsaSchools=t;n.NoRecruitSchoolId.selected.NameConc=t.RegistryNo+"-"+t.Name;n.AddOrEditSchool=!0;n.VisibleSave=!0;n.NoSchoolValid=!1;n.showAddSchool=!1;n.DisableForInsertSchool=!0};n.AddEditNoRecruitSchool=function(t){if(t=="Add")n.AddOrEditSchool=!0,n.VisibleSave=!1,n.NoSchoolValid=!1,n.showAddSchool=!1,n.noRecruitsaSchools={},n.NoRecruitSchoolId.selected={},n.DisableForInsertSchool=!0;else if(t=="Save"){n.AddOrEditSchool=!0;var i=b();$("#NoRecruitserviceAssumedForm").valid()&&(n.IsDisabledServiceAssumed=!0,f.postByParams(i,"/api/RecruitmentServiceAssumed/saveServiceAssumedSchool").then(function(){f.getByParams({personId:c},"/api/RecruitmentServiceAssumed/getSubstitutesServiceAssumed").then(function(t){n.recruitments=t.substitutes;n.serviceAssumeds=t.serviceAssumeds;n.noRecruitServiceAssumed=e("filter")(n.serviceAssumeds,{Id:n.noRecruitServiceAssumed.Id},!0)[0]},function(n){u.pop("error","ΠΡΟΣΟΧΗ",n.data)});n.AddOrEditSchool=!1;n.VisibleSave=!1;n.showAddSchool=!0;n.IsDisabledServiceAssumed=!1;n.DisableForInsertSchool=!1},function(n){u.pop("error","ΠΡΟΣΟΧΗ",n.data)}))}};n.DelNoRecruitSchool=function(t){var i={};i.Id=t.Id;i.PersonId=c;i.UserRole=n.authentication.role;i.RegionAndUnitDescription=n.authentication.unitName;f.postByParams(i,"/api/RecruitmentServiceAssumed/deleteServiceAssumedSchool").then(function(){f.getByParams({personId:c},"/api/RecruitmentServiceAssumed/getSubstitutesServiceAssumed").then(function(t){n.recruitments=t.substitutes;n.serviceAssumeds=t.serviceAssumeds;n.noRecruitServiceAssumed=e("filter")(n.serviceAssumeds,{Id:n.noRecruitServiceAssumed.Id},!0)[0]},function(n){u.pop("error","ΠΡΟΣΟΧΗ",n.data)})},function(n){u.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.NoRecruitSchoolCancel=function(){f.getByParams({personId:c},"/api/RecruitmentServiceAssumed/getSubstitutesServiceAssumed").then(function(t){n.recruitments=t.substitutes;n.serviceAssumeds=t.serviceAssumeds;n.noRecruitServiceAssumed=e("filter")(n.serviceAssumeds,{Id:n.noRecruitServiceAssumed.Id},!0)[0]},function(n){u.pop("error","ΠΡΟΣΟΧΗ",n.data)});n.AddOrEditSchool=!1;n.VisibleSave=!1;n.showAddSchool=!0;n.DisableForInsertSchool=!1};n.formats=["dd/MM/yyyy"];n.format=n.formats[0];n.today=function(){};n.today();n.clear=function(){n.dt=null};n.toggleMin=function(){n.minDate=n.minDate?null:new Date};n.toggleMin();n.open=function(t,i){t.preventDefault();t.stopPropagation();n[i]=!0};n.dateOptions={formatYear:"yy",startingDay:1,format:"dd/mm/yyyy"}};RecruitmentServiceAssumed.$inject=["$scope","PassParameters","$state","toaster","GeneralFactory","$filter","$q","LandingPageFactory","$timeout","$parse"];RefreshController=function(n,t,i){n.authentication=i.authentication;n.tokenRefreshed=!1;n.tokenResponse=null;n.refreshToken=function(){i.refreshToken().then(function(t){n.tokenRefreshed=!0;n.tokenResponse=t},function(){t.path("/login")})}};RefreshController.$inject=["$scope","$state","AuthService"];RegionAndUnitModifications=function(n,t,i,r,u,f,e,o){var s,h;n.authentication.isAuth?n.authentication.isAuth&&!t.isValueInArray(t.getRoleCode(n.authentication.role),"a")&&$state.go("forbidden"):$state.go("/");n.selectRegionAndUnitAction="";n.RegionAndUnitTypes={};n.RegionAndUnit={};n.RegionAndUnitLevel=[];n.RegionAndUnitLevel.LevelBodies=[];n.RegionAndUnitLevel.FirstLevelBodies=[];n.RegionAndUnitLevel.SecondLevelBodies=[];n.RegionAndUnitLevel.ThirdLevelBodies=[];n.RegionAndUnitLevel.DistinctApplicationIds=[];n.RegionAndUnitLevel.FilterApplicationParrentId="0";n.AllApplicationTypes=[];n.ApplicationTypes=[];n.Flags=[];n.InitialDefaultOptions=function(){n.RegionAndUnit.Id="";n.RegionAndUnit.Code="";n.RegionAndUnit.Description="";n.RegionAndUnit.RegionAndUnitParrentTypeId="0";n.RegionAndUnit.LevelId="3";n.RegionAndUnit.ValidFrom="";n.RegionAndUnit.ValidTo="";n.RegionAndUnit.Email="";n.RegionAndUnit.RegionAndUnitTypeId="0";n.RegionAndUnit.RegionParentId="0";n.validSubmit=!1;n.searchRegionAndUnit="";n.addRegionAndUnitTableDisable=!1;n.currentRegionAndUnitApplicationType={};n.currentRegionAndUnitLevel={};n.currentRegionAndUnitTable={};n.regionAndUnitLevelSearchResults=[];n.regionAndUnitLevelSearchResultsForView=[];n.currentEditRegionAndUnitApplicationType=[];n.addRegionAndUnitApplicationTypeDisable=!1;n.addRegionAndUnitLevelDisable=!1;n.RegionAndUnitApplicationTypeForSelect=[];n.RegionAndUnitLevel.FilterApplicationLevelId="0";n.RegionAndUnitLevel.FilterApplicationTypeId="8";n.currentRegionAndUnitLevel.ActiveEdit=!1;n.searchRegionAndUnitAssigment="";n.RegionAndUnitApplicationTypeForSelectShow=!1;n.count=0;n.RegionsSearchResults=[];n.RegionsSearchResultsAssigment=[];n.RegionAndUnitLevel.SelectApplicationType="0";n.Flags.RegionAndUnitLevelLevel1Button=!0;n.Flags.RegionAndUnitLevelLevel2Button=!0;n.Flags.RegionAndUnitLevelLevel3Button=!0;n.regionAndUnitLevel1Filter="";n.regionAndUnitLevel2Filter="";n.regionAndUnitLevel3Filter="";n.FilterLevel2Open=!1;n.currentRegionAndUnitLevel.Level1Id=0;n.currentRegionAndUnitLevel.Level2Id=0;n.currentRegionAndUnitLevel.Level3Id=0;n.currentRegionAndUnitLevel.Level1Desc="";n.currentRegionAndUnitLevel.Level2Desc="";n.currentRegionAndUnitLevel.Level3Desc="";n.currentPageRegionAndUnitLevel=1;n.currentPageRegionAndUnitTable=1;n.currentPageRegionsSearch=1};n.InitialDefaultOptions();n.showPaging=!0;n.totalItemsRegionAndUnitLevel=0;n.totalItemsRegionAndUnitTable=0;n.totalItemsRegionsSearch=0;n.viewby=20;n.itemsPerPage=n.viewby;n.filteredNews=[];n.maxSize=5;n.formats=["dd/MM/yyyy"];n.format=n.formats[0];n.open=function(t,i){t.preventDefault();t.stopPropagation();n[i]=!0};n.clearButtons=function(){n.InitialDefaultOptions()};n.getBodyApplicationTypes=function(i=0){t.getByAll("/api/ApplicationType/getBodyApplicationType").then(function(t){i!=0&&(n.ApplicationTypesForShow=t);n.BodyApplicationTypes=t},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.getBodyApplicationTypes(1);t.getByAll("/api/ApplicationType/getAllApplicationType").then(function(t){var i=t.map(function(n){return n.Id}).indexOf(43);n.AllApplicationTypes=t;i!=-1&&n.AllApplicationTypes.splice(i,1)},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});n.getApplicationTypesForAssigment=function(){t.getByAll("/api/ApplicationTypeRegionAndUnit/getApplicationTypesForAssigment").then(function(t){var i=t.map(function(n){return n.Id}).indexOf(43);n.ApplicationTypesForAssigment=t;i!=-1&&n.ApplicationTypesForAssigment.splice(i,1)},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.getApplicationTypesForAssigment();n.getFirstLevelBodies=function(){t.getByParams({applicationType:n.RegionAndUnitLevel.FilterApplicationTypeId},"/api/ApplicationTypeRegionAndUnit/getFirstLevelBodyModification").then(function(t){n.RegionAndUnitLevel.FirstLevelBodies=t.filter(function(n,i){return t.findIndex(function(t){return t.RegionAndUnitId1==n.RegionAndUnitId1})==i});n.RegionAndUnitLevel.FilterApplicationParrentId="0"},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.getFirstLevelBodies();n.showRegionAndUnitApplicationType=function(i){n.RegionAndUnitApplicationTypeForSelectShow=!0;n.SelectedRegionAndUnitApplicationType=i.Id;Id=i.Id;n.RegionAndUnit.Id=Id;n.currentRegionAndUnitApplicationType.RegionAndUnitId=Id;n.currentRegionAndUnitApplicationType.Code=i.Code;n.currentRegionAndUnitApplicationType.Description=i.Description;t.getByParams({Id:Id},"/api/Management/getApplicationTypeRegionAndUnitById").then(function(t){n.RegionAndUnitApplicationTypeForSelect=t;n.RegionAndUnitApplicationTypeForSelect.length>0&&(n.RegionAndUnitApplicationTypeForSelect.forEach(function(n){n.Mode="edit"}),n.currentRegionAndUnitApplicationType.Code=n.RegionAndUnitApplicationTypeForSelect[0].Code,n.currentRegionAndUnitApplicationType.Description=n.RegionAndUnitApplicationTypeForSelect[0].Description,n.currentRegionAndUnitApplicationType.ApplicationTypeRegionAndUnitId=n.RegionAndUnitApplicationTypeForSelect[0].ApplicationTypeRegionAndUnitId);n.currentRegionAndUnitApplicationType.ActiveEdit=!1;n.addRegionAndUnitApplicationTypeDisable=!1;var i=f.hash();f.hash("panel-go-to-regionandunitapplicationtype");e();f.hash(i)},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε μη αναμενομενο σφάλμα!",3e3,"trustedHtml")})};n.saveRegionAndUnitApplicationType=function(){var i={};i.IsFull=n.currentRegionAndUnitApplicationType.IsFull;i.OnlyPE70=n.currentRegionAndUnitApplicationType.OnlyPE70;i.OnlyPE73=n.currentRegionAndUnitApplicationType.OnlyPE73;i.IsBraille=n.currentRegionAndUnitApplicationType.IsBraille;i.IsSignKnowledge=n.currentRegionAndUnitApplicationType.IsSignKnowledge;i.ApplicationTypeId=n.currentRegionAndUnitApplicationType.ApplicationTypeId;i.ApplicationTypeRegionAndUnitId=n.currentRegionAndUnitApplicationType.ApplicationTypeRegionAndUnitId;t.postByParams(i,"/api/Management/UpdateRegionAndUnitApplicationType").then(function(){n.showRegionAndUnitApplicationType(n.RegionAndUnit);o.pop("success","Επιτυχής αποθήκευση","Η καταχώρισης της περιοχής ολοκληρώθηκε με επιτυχία")},function(n){o.pop("error","Δεν έγινε η εισαγωγή",n.data)})};n.cancelRegionAndUnitApplicationType=function(){n.RegionAndUnitApplicationTypeForSelect.shift();n.addRegionAndUnitApplicationTypeDisable=!1};n.saveRegionAndUnitLevel=function(){if(n.ValidateRegionAndUnitLevel(),!n.validSubmit){o.pop("warning","Δεν έχουν συμπληρωθεί τα απαραίτητα πεδία","Η προσθήκη της περιοχής δεν ήταν επιτυχής");return}var i={};i.Id=n.currentRegionAndUnitLevel.Id;i.IsActive=n.currentRegionAndUnitLevel.IsActive;i.RegionAndUnitId1=n.currentRegionAndUnitLevel.Level1Id;i.RegionAndUnitId2=n.currentRegionAndUnitLevel.Level2Id;i.RegionAndUnitId3=n.currentRegionAndUnitLevel.Level3Id;t.postByParams(i,"/api/Management/UpdateRegionAndUnitLevelById").then(function(){n.regionAndUnitLevelSearch();n.getFirstLevelBodies(n.RegionAndUnitLevel.FilterApplicationParrentId);o.pop("success","Επιτυχής αποθήκευση","Η καταχώρισης της περιοχής ολοκληρώθηκε με επιτυχία")},function(n){o.pop("error","Δεν έγινε η εισαγωγή",n.data)})};n.editRegionAndUnitLevel=function(t){n.currentRegionAndUnitLevel.ActiveEdit=!0;n.currentRegionAndUnitLevel.Id=t.Id;n.currentRegionAndUnitLevel.Level1Desc=t.Description1?t.Description1:"";n.currentRegionAndUnitLevel.Level2Desc=t.Description2?t.Description2:"";n.currentRegionAndUnitLevel.Level3Desc=t.Description3?t.Description3:"";n.currentRegionAndUnitLevel.Level1Id=t.RegionAndUnitId1?t.RegionAndUnitId1:"";n.currentRegionAndUnitLevel.Level2Id=t.RegionAndUnitId2?t.RegionAndUnitId2:"";n.currentRegionAndUnitLevel.Level3Id=t.RegionAndUnitId3?t.RegionAndUnitId3:"";n.currentRegionAndUnitLevel.IsActive=t.IsActive?"true":"false"};n.deleteRegionAndUnitApplicationType=function(){var i={};i.ApplicationTypeRegionAndUnitId=n.currentRegionAndUnitApplicationType.ApplicationTypeRegionAndUnitId;i.ApplicationTypeId=n.currentRegionAndUnitApplicationType.ApplicationTypeId;t.postByParams(i,"/api/Management/DeleteRegionAndUnitApplicationTypeById").then(function(t){var i=t;if(i=="error"){o.pop("error","Δεν έγινε η διαγραφή","Δεν έγινε η διαγραφή");return}if(i=="regionandunits"){o.pop("error","Δεν έγινε η διαγραφή","Η περιοχή αυτή έχει καταχωριθεί σε αίτηση");return}if(i=="substitutes"){o.pop("error","Δεν έγινε η διαγραφή","Υπάρχει καταγεγραμένη προυπηρεσία γι' αυτή");return}if(i=="secondmentbody"){o.pop("error","Δεν έγινε η διαγραφή","Δεν έγινε η διαγραφή");return}if(i=="remediation"){o.pop("error","Δεν έγινε η διαγραφή","Η περιοχή βρίσκεται σε Αίτηση Ενισχυτικής");return}if(i=="permanent"){o.pop("error","Δεν έγινε η διαγραφή","Η περιοχή βρίσκεται σε Αίτηση Μονίμου");return}if(i=="serviceassumed"){o.pop("error","Δεν έγινε η διαγραφή","Η περιοχή βρίσκεται σε Αίτηση Μονίμου");return}i=="ok"&&o.pop("success","Επιτυχής διαγραφή","Η διαγραφή της περιοχής ολοκληρώθηκε");n.showRegionAndUnitApplicationType(n.RegionAndUnit)},function(n){o.pop("error","Δεν έγινε η διαγραφή",n.data)})};n.regionAndUnitLevelSearch=function(){var i={};i.Level=n.RegionAndUnitLevel.FilterApplicationLevelId;i.applicationType=n.RegionAndUnitLevel.FilterApplicationTypeId;i.parentId=n.RegionAndUnitLevel.FilterApplicationParrentId;t.getByParams(i,"/api/ApplicationTypeRegionAndUnit/getRegionAndUnitLevelsForEdit").then(function(t){n.regionAndUnitLevelSearchResults=t;n.regionAndUnitLevelSearchResultsForView=n.regionAndUnitLevelSearchResults;n.regionAndUnitLevelSearchResultsForView.forEach(function(n){n.Mode="edit"});n.totalItemsRegionAndUnitLevel=n.regionAndUnitLevelSearchResultsForView.length;n.currentRegionAndUnitLevel.ActiveEdit=!1;n.addRegionAndUnitLevelDisable=!1;t.length==0&&o.pop("warning","Χωρίς αποτελέσματα","Δεν βρέθηκαν αποτελέσματα");n.currentPageRegionAndUnitLevel=1;n.regionAndUnitLevel1Filter="";n.regionAndUnitLevel2Filter="";n.regionAndUnitLevel3Filter="";n.Flags.RegionAndUnitLevelLevel1Button=!0;n.Flags.RegionAndUnitLevelLevel2Button=!0;n.Flags.RegionAndUnitLevelLevel3Button=!0},function(n){o.pop("error","Δεν έγινε η ανάκτηση",n.data)})};n.saveNewRegionAndUnitApplicationType=function(i){var r={};r.ApplicationTypeRegionAndUnitId=i.ApplicationTypeRegionAndUnitId;r.IsFull=n.currentRegionAndUnitApplicationType.IsFull;r.OnlyPE70=n.currentRegionAndUnitApplicationType.OnlyPE70;r.OnlyPE73=n.currentRegionAndUnitApplicationType.OnlyPE73;r.IsBraille=n.currentRegionAndUnitApplicationType.IsBraille;r.IsSignKnowledge=n.currentRegionAndUnitApplicationType.IsSignKnowledge;r.ApplicationTypeId=n.currentRegionAndUnitApplicationType.ApplicationTypeId;r.RegionAndUnitId=n.RegionAndUnit.Id;t.postByParams(r,"/api/Management/InsertRegionAndUnitApplicationType").then(function(){n.showRegionAndUnitApplicationType(n.RegionAndUnit);$("#SuccessRegionAndUnitTypeEdit").modal()},function(n){o.pop("error","Δεν έγινε η εισαγωγή",n.data)})};n.ValidateRegionAndUnitLevel=function(){n.validSubmit=!0;n.currentRegionAndUnitLevel.Level1Id==0&&(n.validSubmit=!1)};n.regionAndUnitLevelLevel1HeadClick=function(){n.Flags.RegionAndUnitLevelLevel1Button;n.regionAndUnitLevel1Filter="";n.Flags.RegionAndUnitLevelLevel1Button=!n.Flags.RegionAndUnitLevelLevel1Button;n.regionAndUnitLevelLevelResultsFilter()};n.regionAndUnitLevelLevel2HeadClick=function(){n.Flags.RegionAndUnitLevelLevel2Button;n.regionAndUnitLevel2Filter="";n.Flags.RegionAndUnitLevelLevel2Button=!n.Flags.RegionAndUnitLevelLevel2Button;n.regionAndUnitLevelLevelResultsFilter()};n.regionAndUnitLevelLevel3HeadClick=function(){n.Flags.RegionAndUnitLevelLevel3Button;n.regionAndUnitLevel3Filter="";n.Flags.RegionAndUnitLevelLevel3Button=!n.Flags.RegionAndUnitLevelLevel3Button;n.regionAndUnitLevelLevelResultsFilter()};n.regionAndUnitLevelLevelResultsFilter=function(){n.regionAndUnitLevelSearchResultsForView=n.regionAndUnitLevelSearchResultsForView.filter(n=>n.Mode==="add").concat(n.regionAndUnitLevelSearchResults);n.RecalculateRegionAndUnitLevelLevelTable()};n.saveNewRegionAndUnitLevel=function(){if(n.ValidateRegionAndUnitLevel(),!n.validSubmit){o.pop("warning","Δεν έχουν συμπληρωθεί τα απαραίτητα πεδία","Η προσθήκη της περιοχής δεν ήταν επιτυχής");return}var i={};i.ApplicationTypeId=n.RegionAndUnitLevel.FilterApplicationTypeId;i.RegionAndUnitId1=n.currentRegionAndUnitLevel.Level1Id;i.RegionAndUnitId2=n.currentRegionAndUnitLevel.Level2Id;i.RegionAndUnitId3=n.currentRegionAndUnitLevel.Level3Id;i.IsActive=n.currentRegionAndUnitLevel.IsActive;t.postByParams(i,"/api/Management/InsertRegionAndUnitLevel").then(function(){n.regionAndUnitLevelSearch();o.pop("success","Επιτυχής αποθήκευση","Η προσθήκη της περιοχής ήταν επιτυχής");n.getFirstLevelBodies(n.RegionAndUnitLevel.FilterApplicationParrentId);n.RegionAndUnitLevel.SelectApplicationType=="1"&&n.getBodyApplicationTypes()},function(n){o.pop("error","Δεν έγινε η εισαγωγή",n.data)})};n.cancelRegionAndUnitLevel=function(){n.regionAndUnitLevelSearchResultsForView.shift();n.addRegionAndUnitLevelDisable=!1};n.editRegionAndUnitApplicationType=function(t){n.currentRegionAndUnitApplicationType.ActiveEdit=!0;n.currentRegionAndUnitApplicationType.ApplicationTypeRegionAndUnitId=t.ApplicationTypeRegionAndUnitId;n.currentRegionAndUnitApplicationType.ApplicationTypeId=""+t.ApplicationTypeId;n.currentRegionAndUnitApplicationType.IsFull=t.IsFull?"true":"false";n.currentRegionAndUnitApplicationType.OnlyPE70=t.OnlyPE70?"true":"false";n.currentRegionAndUnitApplicationType.OnlyPE73=t.OnlyPE73?"true":"false";n.currentRegionAndUnitApplicationType.IsBraille=t.IsBraille?"true":"false";n.currentRegionAndUnitApplicationType.IsSignKnowledge=t.IsSignKnowledge?"true":"false"};n.addRegionAndUnitApplicationType=function(){var t={};n.addRegionAndUnitApplicationTypeDisable=!0;n.currentRegionAndUnitApplicationType.ActiveEdit=!1;t.Code=n.currentRegionAndUnitApplicationType.Code;t.Description=n.currentRegionAndUnitApplicationType.Description;t.ApplicationTypeRegionAndUnitId=n.currentRegionAndUnitApplicationType.ApplicationTypeRegionAndUnitId;t.IsFull="true";t.OnlyPE70="false";t.OnlyPE73="false";t.IsBraille="false";t.IsSignKnowledge="false";t.Mode="add";n.currentRegionAndUnitApplicationType.IsFull=t.IsFull;n.currentRegionAndUnitApplicationType.OnlyPE70=t.OnlyPE70;n.currentRegionAndUnitApplicationType.OnlyPE73=t.OnlyPE73;n.currentRegionAndUnitApplicationType.IsBraille=t.IsBraille;n.currentRegionAndUnitApplicationType.IsSignKnowledge=t.IsSignKnowledge;n.RegionAndUnitApplicationTypeForSelect=[t].concat(n.RegionAndUnitApplicationTypeForSelect)};n.addRegionAndUnitLevel=function(){var t={};n.addRegionAndUnitLevelDisable=!0;n.currentRegionAndUnitLevel.ActiveEdit=!1;t.Mode="add";t.Description1="";t.Description2="";t.Description2="";t.IsActive="true";n.currentRegionAndUnitLevel.Mode=t.Mode;n.currentRegionAndUnitLevel.Description1=t.Description1;n.currentRegionAndUnitLevel.Description2=t.Description2;n.currentRegionAndUnitLevel.Description3=t.Description3;n.currentRegionAndUnitLevel.IsActive=t.IsActive;n.currentRegionAndUnitLevel.Level1Id=0;n.currentRegionAndUnitLevel.Level1Desc="";n.currentRegionAndUnitLevel.Level2Id=0;n.currentRegionAndUnitLevel.Level2Desc="";n.currentRegionAndUnitLevel.Level3Id=0;n.currentRegionAndUnitLevel.Level3Desc="";n.regionAndUnitLevelSearchResultsForView=[t].concat(n.regionAndUnitLevelSearchResultsForView)};n.addRegionAndUnitTable=function(){var t={};n.addRegionAndUnitTableDisable=!0;n.currentRegionAndUnitTable.ActiveEdit=!1;t.Mode="add";t.Code="";t.LevelId="3";t.RegionAndUnitTypeId=n.RegionAndUnitTypes[0].Id;t.Description="";t.RegionParentId="";t.Email="";t.ValidFrom=new Date;t.ValidTo="3000-01-01";t.RegionAndUnitParrentTypeId="0";n.currentRegionAndUnitTable.Mode=t.Mode;n.currentRegionAndUnitTable.Code=t.Code;n.currentRegionAndUnitTable.LevelId=t.LevelId;n.currentRegionAndUnitTable.RegionAndUnitTypeId=t.RegionAndUnitTypeId;n.currentRegionAndUnitTable.Description=t.Description;n.currentRegionAndUnitTable.RegionParentId=t.RegionParentId;n.currentRegionAndUnitTable.Email=t.Email;n.currentRegionAndUnitTable.RegionAndUnitParrentTypeId=t.RegionAndUnitParrentTypeId;n.currentRegionAndUnitTable.ValidFrom=t.ValidFrom;n.currentRegionAndUnitTable.ValidTo=t.ValidTo;n.RegionsSearchResults=[t].concat(n.RegionsSearchResults);n.RegionsSearchResults};n.cancelRegionAndUnitTable=function(){n.RegionsSearchResults.shift();n.RegionsSearchResults;n.addRegionAndUnitTableDisable=!1};n.editRegionAndUnitTable=function(i){if(n.currentRegionAndUnitTable.Id=i.Id,n.currentRegionAndUnitTable.ActiveEdit=!0,n.currentRegionAndUnitTable.Mode=i.Mode,n.currentRegionAndUnitTable.Code=i.Code,n.currentRegionAndUnitTable.LevelId=""+i.LevelId,n.currentRegionAndUnitTable.RegionAndUnitTypeId=i.RegionAndUnitTypeId,n.currentRegionAndUnitTable.Description=i.Description,n.currentRegionAndUnitTable.RegionParentId=i.RegionParentId,n.currentRegionAndUnitTable.RegionAndUnitParrentTypeId=""+i.RegionAndUnitParrentTypeId,n.currentRegionAndUnitTable.Email=i.Email==null?"":i.Email,n.currentRegionAndUnitTable.ValidTo=i.ValidTo,n.currentRegionAndUnitTable.ValidFrom=i.ValidFrom,n.currentRegionAndUnitTable.RegionAndUnitParrentTypeId=="null"||n.currentRegionAndUnitTable.RegionAndUnitParrentTypeId=="0"){n.currentRegionAndUnitTable.RegionAndUnitParrentTypeId="0";return}t.getByParams({TypeId:n.currentRegionAndUnitTable.RegionAndUnitParrentTypeId},"/api/Management/getRegionAndUnitsByTypeId").then(function(t){n.RegionAndUnitsForSelect=t},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε μη αναμενομενο σφάλμα!",3e3,"trustedHtml")})};n.ChangeRegionAndUnitType=function(){if(!n.currentRegionAndUnitTable.RegionAndUnitParrentTypeId){n.currentRegionAndUnitTable.RegionParentId="0";return}t.getByParams({TypeId:n.currentRegionAndUnitTable.RegionAndUnitParrentTypeId},"/api/Management/getRegionAndUnitsByTypeId").then(function(t){n.RegionAndUnitsForSelect=t;n.RegionAndUnitsForSelect.length>0&&(n.currentRegionAndUnitTable.RegionParentId=n.RegionAndUnitsForSelect[0].Id)},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε μη αναμενομενο σφάλμα!",3e3,"trustedHtml")})};n.ChangeSelectApplicationType=function(){if(n.RegionAndUnitLevel.SelectApplicationType=="1")n.ApplicationTypesForShow=n.AllApplicationTypes;else{n.ApplicationTypesForShow=n.BodyApplicationTypes;var t=n.ApplicationTypesForShow.find(t=>t.Id==n.RegionAndUnitLevel.FilterApplicationTypeId);t==undefined&&(n.RegionAndUnitLevel.FilterApplicationTypeId="8")}};n.authentication.isAuth?n.authentication.isAuth||(s="folder,recruitment",t.getByParams({role:n.authentication.role,codes:s},"/api/Subsystem/NewCheckPermission").then(function(t){var i=s.split(",");for(var u in i)n.pageRules[i[u]]=r("filter")(t,{Code:i[u]},!0)[0].Rules},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})):$state.go("/");h=i.all([t.getByAll("/api/Management/getAllRegionAndUnitTypes"),t.getByParams({TypeId:n.RegionAndUnit.RegionAndUnitParrentTypeId},"/api/Management/getRegionAndUnitsByTypeId"),t.getByAll("/api/RegionAndUnit/getActiveRegionAndUnits")]);h.then(function(t){n.RegionAndUnitTypes=t[0];n.RegionAndUnitsForSelect=t[1];n.RegionAndUnit.RegionAndUnitTypeId=n.RegionAndUnitTypes[0].Id;n.RegionAndUnitLevel.LevelBodies=t[2]});n.getLevelBodies=function(){t.getByAll("/api/RegionAndUnit/getActiveRegionAndUnits").then(function(t){n.RegionAndUnitLevel.LevelBodies=t},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.onSelectLevel1=function(t){n.currentRegionAndUnitLevel.Level1Id=t.Id;n.currentRegionAndUnitLevel.Level1Desc=t.Description};n.onBlurLevel1=function(){var i=n.currentRegionAndUnitLevel.Level1Desc,t=r("filter")(n.RegionAndUnitLevel.LevelBodies,{Description:n.currentRegionAndUnitLevel.Level1Desc},!0);t.length===0||t.length===n.RegionAndUnitLevel.LevelBodies.length?(n.currentRegionAndUnitLevel.Level1Id=0,n.currentRegionAndUnitLevel.Level1Desc="",n.currentRegionAndUnitLevel.Level2Id=0,n.currentRegionAndUnitLevel.Level2Desc="",n.currentRegionAndUnitLevel.Level3Id=0,n.currentRegionAndUnitLevel.Level3Desc="",t.length===0&&i.length>0&&o.pop("warning"," Παρουσιάστηκε σφάλμα","Η περιοχή που συμπληρώσατε δεν υπάρχει!",3e3,"trustedHtml")):(n.currentRegionAndUnitLevel.Level1Id=t[0].Id,n.currentRegionAndUnitLevel.Level1Desc=t[0].Description)};n.onSelectLevel2=function(t){n.currentRegionAndUnitLevel.Level2Id=t.Id;n.currentRegionAndUnitLevel.Level2Desc=t.Description};n.onBlurLevel2=function(){var i=n.currentRegionAndUnitLevel.Level2Desc,t=r("filter")(n.RegionAndUnitLevel.LevelBodies,{Description:n.currentRegionAndUnitLevel.Level2Desc},!0);t.length===0||t.length===n.RegionAndUnitLevel.LevelBodies.length?(n.currentRegionAndUnitLevel.Level2Id=0,n.currentRegionAndUnitLevel.Level2Desc="",n.currentRegionAndUnitLevel.Level3Id=0,n.currentRegionAndUnitLevel.Level3Desc="",t.length===0&&i.length>0&&o.pop("warning"," Παρουσιάστηκε σφάλμα","Η περιοχή που συμπληρώσατε δεν υπάρχει!",3e3,"trustedHtml")):(n.currentRegionAndUnitLevel.Level2Id=t[0].Id,n.currentRegionAndUnitLevel.Level2Desc=t[0].Description)};n.onSelectLevel3=function(t){n.currentRegionAndUnitLevel.Level3Id=t.Id;n.currentRegionAndUnitLevel.Level3Desc=t.Description};n.onBlurLevel3=function(){var i=n.currentRegionAndUnitLevel.Level3Desc,t=r("filter")(n.RegionAndUnitLevel.LevelBodies,{Description:n.currentRegionAndUnitLevel.Level3Desc},!0);t.length===0||t.length===n.RegionAndUnitLevel.LevelBodies.length?(n.currentRegionAndUnitLevel.Level3Id=0,n.currentRegionAndUnitLevel.Level3Desc="",t.length===0&&i.length>0&&o.pop("warning"," Παρουσιάστηκε σφάλμα","Η περιοχή που συμπληρώσατε δεν υπάρχει!",3e3,"trustedHtml")):(n.currentRegionAndUnitLevel.Level3Id=t[0].Id,n.currentRegionAndUnitLevel.Level3Desc=t[0].Description)};n.RecalculateRegionAndUnitLevelLevelTable=function(){n.totalItemsRegionAndUnitLevel=r("filter")(n.regionAndUnitLevelSearchResultsForView,{Mode:"edit",Description1:n.Flags.RegionAndUnitLevelLevel1Button?"":n.regionAndUnitLevel1Filter,Description2:n.Flags.RegionAndUnitLevelLevel2Button?"":n.regionAndUnitLevel2Filter,Description3:n.Flags.RegionAndUnitLevelLevel3Button?"":n.regionAndUnitLevel3Filter}).length;n.currentPageRegionAndUnitLevel=1;n.regionAndUnitLevelSearchResultsForView};n.RegionAndUnitLevelLevel3ButtonOnKeyup=function(){n.RecalculateRegionAndUnitLevelLevelTable()};n.RegionAndUnitLevelLevel1ButtonOnKeyup=function(){n.RecalculateRegionAndUnitLevelLevelTable()};n.RegionAndUnitLevelLevel2ButtonOnKeyup=function(){n.RecalculateRegionAndUnitLevelLevelTable()};n.regionAndUnitSearch=function(i=""){return n.searchRegionAndUnit.length>0&&(i=n.searchRegionAndUnit),t.getByParams({Keyword:i},"/api/Management/getRegionByKeyword").then(function(t){n.RegionsSearchResults=t;n.RegionsSearchResults.forEach(function(n){n.Mode="edit"});n.totalItemsRegionAndUnitTable=n.RegionsSearchResults.length;n.currentRegionAndUnitTable.ActiveEdit=!1;n.addRegionAndUnitTableDisable=!1;n.currentPageRegionAndUnitTable=1;n.RegionsSearchResults.length==0&&o.pop("warning"," Χωρίς περιοχές","Δεν βρέθηκαν περιοχές με το ερώτημα '"+i+"'!",3e3,"trustedHtml")},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε μη αναμενομενο σφάλμα!",3e3,"trustedHtml")}),!1};n.regionAndUnitSearchAssigment=function(){n.SelectedRegionAndUnitApplicationType="-1";n.RegionAndUnitApplicationTypeForSelectShow=!1;t.getByParams({Keyword:n.searchRegionAndUnitAssigment},"/api/Management/getRegionByKeyword").then(function(t){n.RegionsSearchResultsAssigment=t;n.totalItemsRegionsSearch=n.RegionsSearchResultsAssigment.length;n.currentPageRegionsSearch=1;n.RegionsSearchResultsAssigment.length==0&&o.pop("warning","Χωρίς αποτέλεσματα","Δεν βρέθηκαν αποτελέσματα",3e3)},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε μη αναμενομενο σφάλμα!",3e3,"trustedHtml")});n.RegionAndUnitApplicationTypeForSelect=[]};n.changeSelectRegionAndUnitAction=function(){n.InitialDefaultOptions()};n.searchViaEnterKey=function(t){t.which===13&&(t.preventDefault(),n.regionAndUnitSearch())};n.searchViaEnterKeyRegionAndUnitAssigment=function(t){t.which===13&&(t.preventDefault(),n.regionAndUnitSearchAssigment())};n.ValidateEmail=function(n){return/^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/.test(n)?!0:!1};n.Validate=function(){n.validSubmit=!0;n.validateMessages=[];n.currentRegionAndUnitTable.Code.length>10&&(n.validSubmit=!1);n.currentRegionAndUnitTable.Description<1&&(n.validSubmit=!1,n.validateMessages[1]={title:"Μη συμπληρωμένα απαραίτητα πεδία",desc:"Δεν έχουν συμπληρωθεί τα απαραίτητα πεδία"});n.currentRegionAndUnitTable.RegionAndUnitTypeId=="0"&&(n.validSubmit=!1);n.currentRegionAndUnitTable.ValidFrom.length<1&&(n.validSubmit=!1);n.currentRegionAndUnitTable.Email.length>0&&!n.ValidateEmail(n.currentRegionAndUnitTable.Email)&&(n.validSubmit=!1,n.validateMessages[2]={title:"Λανθασμένο Format Email",desc:"Έχετε συμπληρώσει λανθασμένο Email"})};n.checkUpdateOrInsertRegionAndUnitTable=function(){if(n.Validate(),!n.validSubmit){n.validateMessages.forEach(function(n){o.pop("warning",n.title,n.desc,5e3)});return}$("#RegionAndUnitAddOrEdit").modal("show")};n.checkSaveRegionAndUnitLevel=function(){if(n.ValidateRegionAndUnitLevel(),!n.validSubmit){o.pop("warning","Δεν έχουν συμπληρωθεί τα απαραίτητα πεδία","Η προσθήκη της περιοχής δεν ήταν επιτυχής");return}$("#saveRegionAndUnitLevel").modal("show")};n.checkSaveNewRegionAndUnitLevel=function(){if(n.ValidateRegionAndUnitLevel(),!n.validSubmit){o.pop("warning","Δεν έχουν συμπληρωθεί τα απαραίτητα πεδία","Η προσθήκη της περιοχής δεν ήταν επιτυχής");return}$("#saveNewRegionAndUnitLevel").modal("show")};n.UpdateOrInsertRegionAndUnitTable=function(){if(n.Validate(),n.validSubmit){var i={};i.RegionParentId=n.currentRegionAndUnitTable.RegionParentId;i.Code=n.currentRegionAndUnitTable.Code;i.Description=n.currentRegionAndUnitTable.Description;i.RegionAndUnitTypeId=n.currentRegionAndUnitTable.RegionAndUnitTypeId;i.LevelId=n.currentRegionAndUnitTable.LevelId;i.Email=n.currentRegionAndUnitTable.Email;i.ValidFrom=n.currentRegionAndUnitTable.ValidFrom;i.ValidTo=n.currentRegionAndUnitTable.ValidTo;n.currentRegionAndUnitTable.Mode=="add"&&t.postByParams(i,"/api/Management/InsertRegionAndUnit").then(function(){n.getLevelBodies();o.pop("success","Επιτυχής αποθήκευση","Η προσθήκη της περιοχής ήταν επιτυχής");n.InitialDefaultOptions();n.currentRegionAndUnitTable.Mode="add";n.regionAndUnitSearch(i.Description)},function(n){o.pop("error","Δεν έγινε η εισαγωγή",n.data)});n.currentRegionAndUnitTable.Mode=="edit"&&(i.Id=n.currentRegionAndUnitTable.Id,t.postByParams(i,"/api/Management/UpdateRegionAndUnit").then(function(){n.regionAndUnitSearch();o.pop("success","Επιτυχής αποθήκευση","Η επεξεργασία της περιοχής ήταν επιτυχής")},function(n){o.pop("error","Δεν έγινε η εισαγωγή",n.data)}))}};n.clickTab1=function(){n.InitialDefaultOptions()};n.clickTab2=function(){n.InitialDefaultOptions()};n.clickTab3=function(){n.InitialDefaultOptions()}};RegionAndUnitModifications.$inject=["$scope","GeneralFactory","$q","$filter","$uibModal","$location","$anchorScroll","toaster"];RemediationController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p){if(n.mess="",n.messInfo="",n.subRemediation={IsTemporaryStored:!0},n.applicationType=14,n.step1=!0,n.step2=!1,n.continueDisabled=!0,n.intendancies=[],n.perspec={},n.SelectedSpecs=[],n.person={},n.showAlertSpec=!1,n.showAlertMusicTE16=!1,n.showAlertMusicPE16=!1,n.showAlertRegion=!1,n.hasValidFekNoConfirmSpeciality=!1,n.alerts="",n.showToConfirmSpeciality=!1,n.regions=[],n.SelectedAvailRegionsItems=[],n.SelectedSelectedRegionsListItems=[],n.SelectedRegionsListItems=[],n.personmusicspecialists=[],n.DisableDLevel=!1,n.AvailableSpecListItems=[],n.AvailableRegionsListItems=[],n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.userLevel=0,n.canSave=!0,n.fek={},n.IsCivilServant=!1,n.applicationLevelId=0,n.goToStep=function(i,r){i==2?p.getByParams({applicationTypeId:n.applicationType,specialityId:r},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(i){n.SelectedSpecListItems=t("filter")(n.AvailableSpecListItems,{Id:r},!0)[0];n.fek=i;p.isEmptyValue(i)?(n.mess="<li>Δεν υπαρχει ενεργό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2):(n.step1=!1,n.step2=!0,n.subRemediation.SpecialityId=r,n.subRemediation.LevelId=n.SelectedSpecListItems.LevelId,blockUI({target:"#divBlockUIForm",animate:!0}),n.doAll())},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.step1=!0,n.step2=!1,n.DisableDLevel=p.isEmpty(n.SelectedSpecListItems)&&p.isEmptyValue(n.subRemediation.Id)?!1:!0,n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[])},blockUI({target:"#divBlockUI",animate:!0}),p.isValueInArray(p.getRoleCode(n.authentication.role),"d1, d2")&&(n.userLevel=n.authentication.levelId,n.subRemediation.LevelId=n.authentication.levelId,n.subRemediation.IntendancyId=n.authentication.regionAndUnitId),n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.authentication.isAuth){var w="subRemediation";p.getByParams({role:n.authentication.role,codes:w},"/api/Subsystem/NewCheckPermission").then(function(r){var u=w.split(","),e,s;for(e in u)n.pageRules[u[e]]=t("filter")(r,{Code:u[e]},!0)[0].Rules;n.subRemediation.Id=f.getApplicationId();n.applicationLevelId=f.getApplicationLevelId();p.isEmptyValue(n.applicationLevelId)&&(n.applicationLevelId=0);f.resetApplication();n.subRemediation.PersonId=f.getPersonId();p.isEmptyValue(n.subRemediation.Id)?(n.step1=!0,n.step2=!1):(n.step1=!1,n.step2=!0);p.isValueInArray(n.pageRules.subRemediation.CanAccess,"u1, u2")&&(n.subRemediation.PersonId=n.authentication.personId);s=i.all([p.getByParams({personId:n.subRemediation.PersonId},"/api/ApplRemediation/getSpecialityForRemediation"),p.getByParams({Id:n.subRemediation.PersonId},"/api/ApplRemediation/GetApplRemediation"),p.getByParams({personId:n.subRemediation.PersonId},"/api/RecruitmentServiceAssumed/getSubstitutesServiceAssumed")]);s.then(function(i){var e,u,r;for(angular.copy(i[0],n.AvailableSpecListItems),n.applSub=i[1],e=i[2].substitutes,n.subs=t("filter")(e,function(n){return n.SubstitutesTypeId!=9&&n.SubstitutesTypeId!=10&&n.SubstitutesTypeId!=11&&n.SubstitutesTypeId!=12}),r=n.AvailableSpecListItems.length-1;r>=0;r--)n.AvailableSpecListItems[r].hasApplPerm=0;for(u=n.applSub.length-1;u>=0;u--)for(r=n.AvailableSpecListItems.length-1;r>=0;r--)n.applSub[u].SpecialityId==n.AvailableSpecListItems[r].Id&&(n.AvailableSpecListItems[r].hasApplSub=1);n.subRemediation.Id!=null&&n.subRemediation.Id!=""&&n.subRemediation.Id!="undefined"?(p.isEmptyValue(n.subRemediation.SpecialityId)&&(n.subRemediation.SpecialityId=f.getSpecialityId()),p.getByParams({applicationTypeId:n.applicationType,specialityId:n.subRemediation.SpecialityId},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(i){n.SelectedSpecListItems=t("filter")(n.AvailableSpecListItems,{Id:n.subRemediation.SpecialityId},!0)[0];!p.isEmptyValue(i)||p.isValueInArray(p.getRoleCode(n.authentication.role),"a")?(n.canUpdateAppl=!0,n.showAddEditForm=1,n.getApplication()):(n.mess+="<li>Δεν μπορείτε να τροποποιήσετε την αίτηση γιατί δεν υπάρχει ανοιχτό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2)},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):p.isEmpty(n.AvailableSpecListItems)?(n.mess+=p.isEmpty(n.subs)?"<li>Δεν μπορείτε να υποβάλετε αίτηση. Δεν βρίσκεστε στον ενιαίο πίνακα για κάποιον κλάδο<\/li>":"<li>Δεν μπορείτε να υποβάλετε αίτηση. Έχετε ήδη προσληφθεί το τρέχον σχολικό έτος<\/li>",n.showAddEditForm=2):(n.canInsertAppl=!0,n.showAddEditForm=1)})},function(){unblockUI("#divBlockUI");o.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else e.go("/");n.checkCivilServant=function(){n.IsCivilServant==1?n.showCivilServantFull=!1:(n.subRemediation.PublicServantFull=0,n.showCivilServantFull=!0)};n.showCivilServantBlock=function(){return n.IsCivilServant==!0?!0:!1};n.showDetails=function(){return n.SelectedSpecs.length>0?!0:!1};n.changeLevel=function(){p.isEmptyValue(n.subRemediation.LevelId)?(n.subRemediation.LevelId=null,n.intendancies=[],n.subRemediation.IntendancyId=null,n.continueDisabled=!0):(y.getIntendancies(n.subRemediation.LevelId).then(function(t){n.intendancies=t}).catch(function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα στην εύρεση διευθύνσεων")}),p.isEmptyValue(n.subRemediation.Id)&&(n.subRemediation.IntendancyId=null),n.continueDisabled=!1)};n.changeIntendancies=function(){p.isEmptyValue(n.subRemediation.LevelId)||p.isEmptyValue(n.subRemediation.IntendancyId)?(n.continueDisabled=!0,n.subRemediation.IntendancyId=null):n.continueDisabled=!1};n.findSpecsForDetails=function(){n.SelectedSpecs=[];angular.forEach(n.SelectedSpecListItems,function(t){for(var i=n.perspec.length-1;i>=0;i--)n.perspec[i].Speciality1.Id==t.Id&&n.SelectedSpecs.push(n.perspec[i])})};n.getApplRegions=function(){n.SelectedSpecListItems.length>0&&n.hourlyTeacher.RegionAndUnitId>0?a.getTypeRegionAndUnitByMunicipality(n.hourlyTeacherMusic.RegionAndUnitId,n.applicationType,n.subRemediation.LevelId).then(function(t){angular.copy(t,n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList()},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.AvailableRegionsListItems=[],n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[])};n.doAll=function(){if(n.subRemediation.Id!=null&&n.subRemediation.Id!=""&&n.subRemediation.Id!="undefined")n.canUpdateAppl&&n.subRemediation.PersonId!=null&&n.subRemediation.PersonId!=""&&n.subRemediation.PersonId!="undefined"&&h.getPersonForApplication(n.subRemediation.PersonId).then(function(t){n.person=t;n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1;n.showCivilServantBlock();n.checkCivilServant();p.isValueInArray(n.pageRules.subRemediation.CanAccess,"d1, d2, m1, m2")&&n.subRemediation.LevelId!=n.authentication.levelId&&(n.canUpdateAppl=!1);n.IsDisabled=!n.canUpdateAppl;n.IsDisabled&&(n.noUpdAccess=!0);n.subRemediation.IsActive||(n.IsDisabled=!0,n.notActive=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.subRemediation.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0);p.isEmpty(n.subRemediation.ApplicationSubstituteMusicProtocols)||(n.protocol=n.subRemediation.ApplicationSubstituteMusicProtocols[0].ProtocolString,n.showProtocol=!0);var r=i.all([p.getByParams({level:n.subRemediation.LevelId,applicationTypeId:n.applicationType,sex:"Θ"},"api/ApplicationTypeRegionAndUnit/getApplicationRegionByAppTypeAndLevel")]);r.then(function(t){n.regions=t[0]},function(){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm");else{if(n.canInsertAppl&&n.subRemediation.PersonId!=null&&n.subRemediation.PersonId!=""&&n.subRemediation.PersonId!="undefined"){h.getPersonForApplication(n.subRemediation.PersonId).then(function(t){n.person=t;n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1;n.showCivilServantBlock();n.checkCivilServant()},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});var t=i.all([p.getByParams({level:n.subRemediation.LevelId,applicationTypeId:n.applicationType,sex:"Θ"},"api/ApplicationTypeRegionAndUnit/getApplicationRegionByAppTypeAndLevel")]);t.then(function(t){n.regions=t[0]},function(){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})}unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")}};n.getApplication=function(){if(n.subRemediation.Id!=null&&n.subRemediation.Id!=""&&n.subRemediation.Id!="undefined"&&(n.DisableDLevel=!0,n.canUpdateAppl&&n.subRemediation.PersonId!=null&&n.subRemediation.PersonId!=""&&n.subRemediation.PersonId!="undefined")){var t=i.all([p.getByParams({id:n.subRemediation.Id},"api/ApplRemediation/GetApplRemediationById")]);t.then(function(t){n.subRemediation=t[0];n.doAll();var r=i.all([p.getByParams({personId:n.subRemediation.PersonId,applicationTypeId:n.applicationType,didacticYearId:n.subRemediation.DidacticYearId,applicationId:n.subRemediation.Id},"api/HistoryAppl/getLevelByApplTypeIdAndPersonIdAndYear")]);r.then(function(t){n.levels=t[0];n.changeLevel();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})})}};n.SelectedSpecAvailItems=[];n.SelectedSelectedSpecListItems=[];n.SelectedSpecListItems=[];n.btnSpecUp=function(){for(var t,r,u,f=n.SelectedSelectedSpecListItems,i=0;i<n.SelectedSelectedSpecListItems.length;i++){if(t=n.SelectedSpecListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedSpecListItems[i].Id),t<=0||t>=n.SelectedSpecListItems.length)return;r=n.SelectedSpecListItems[t];u=n.SelectedSpecListItems[t-1];n.SelectedSpecListItems[t-1]=r;n.SelectedSpecListItems[t]=u}};n.btnSpecDown=function(){for(var t,r,u,i=n.SelectedSelectedSpecListItems.length-1;i>=0;i--){if(t=n.SelectedSpecListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedSpecListItems[i].Id),t<0||t>=n.SelectedSpecListItems.length-1)return;r=n.SelectedSpecListItems[t];u=n.SelectedSpecListItems[t+1];n.SelectedSpecListItems[t+1]=r;n.SelectedSpecListItems[t]=u}};n.btnSpecRight=function(){angular.forEach(n.SelectedAvailSpecItems,function(n){this.push(n)},n.SelectedSpecListItems);angular.forEach(n.SelectedAvailSpecItems,function(t){for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].Id==t.Id&&n.AvailableSpecListItems.splice(i,1)});n.findSpecsForDetails();n.SelectedAvailSpecItems=[];n.SelectedSelectedSpecListItems=[]};n.btnSpecLeft=function(){angular.forEach(n.SelectedSelectedSpecListItems,function(n){this.push(n)},n.AvailableSpecListItems);angular.forEach(n.SelectedSelectedSpecListItems,function(t){for(var i=n.SelectedSpecListItems.length-1;i>=0;i--)n.SelectedSpecListItems[i].Id==t.Id&&n.SelectedSpecListItems.splice(i,1)});n.findSpecsForDetails();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.btnAllSpecRight=function(){angular.forEach(n.AvailableSpecListItems,function(n){this.push(n)},n.SelectedSpecListItems);for(var t=n.AvailableSpecListItems.length-1;t>=0;t--)n.AvailableSpecListItems.splice(t,1);n.findSpecsForDetails();n.AvailableRegionsListItems=[];n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.btnAllSpecLeft=function(){angular.forEach(n.SelectedSpecListItems,function(n){this.push(n)},n.AvailableSpecListItems);for(var t=n.SelectedSpecListItems.length-1;t>=0;t--)n.SelectedSpecListItems.splice(t,1);n.findSpecsForDetails();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.removeDuplicatesSpecsForDualList=function(){angular.forEach(n.SelectedAvailSpecItems,function(t){for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].Id==t.Id&&n.AvailableSpecListItems.splice(i,1)});n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.editPerson=function(){f.setPersonId(n.subRemediation.PersonId);e.go("stateEditPerson")};n.saveAction=function(t){n.showAlertSpec=p.isEmptyValue(n.SelectedSpecListItems)?!0:!1;n.showAlertRegion=p.isEmptyValue(n.subRemediation.ApplicationTypeRegionAndUnitId)?!0:!1;n.canSave=!0;(p.isEmptyValue(n.subRemediation.TutoringOwner)||n.showCivilServantBlock()&&p.isEmptyValue(n.subRemediation.PublicServantFull)||p.isEmptyValue(n.subRemediation.ReadFek))&&(n.canSave=!1);n.showAlertSpec||n.showAlertRegion||!n.canSave||n.InsOrUpd(t)};n.InsOrUpd=function(t){var r={Specialities:n.SelectedSpecListItems,Remediation:n.subRemediation,RegionAndUnit:n.SelectedRegionsListItems,MusicSpecialistPE16:n.SelectedMusicPE16ListItems,MusicSpecialistTE16:n.SelectedMusicTE16ListItems,MusicSpecialistOthers:n.specialistother,ApplTemplate:"",UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Status:t},i=r;n.subRemediation.Id!=null&&n.subRemediation.Id!=""&&n.subRemediation.Id!="undefined"?(n.subRemediation.ModifiedBy=n.authentication.userName,p.postByParams(i,"/api/ApplRemediation/updateApplRemediation").then(function(){f.setPersonId(n.person.Id);e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)})):(n.subRemediation.CreatedBy=n.authentication.userName,n.subRemediation.DidacticYearId=n.applicationDidacticYear.Id,p.postByParams(i,"/api/ApplRemediation/insertApplRemediation").then(function(){f.setPersonId(n.subRemediation.PersonId);e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)}))}};RemediationController.$inject=["$scope","$filter","$q","$uibModal","$log","PassParameters","$state","toaster","SubstituteMusicFactory","PersonFactory","PersonSpecialityFactory","PersonMusicSpecialityFactory","ApplicationTypeRegionAndUnitFactory","ApplicationTypeFekFactory","RegionAndFactory","GeneralFactory"];RemediationMusicController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p){if(n.mess="",n.messInfo="",n.subRemediationMusic={IsTemporaryStored:!0},n.applicationType=36,n.step1=!0,n.step2=!1,n.continueDisabled=!0,n.intendancies=[],n.perspec={},n.SelectedSpecs=[],n.person={},n.showAlertSpec=!1,n.showAlertMusicTE16=!1,n.showAlertMusicPE16=!1,n.showAlertRegion=!1,n.hasValidFekNoConfirmSpeciality=!1,n.alerts="",n.showToConfirmSpeciality=!1,n.regions=[],n.SelectedAvailRegionsItems=[],n.SelectedSelectedRegionsListItems=[],n.SelectedRegionsListItems=[],n.personmusicspecialists=[],n.DisableDLevel=!1,n.AvailableSpecListItems=[],n.AvailableRegionsListItems=[],n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.userLevel=0,n.canSave=!0,n.fek={},n.IsCivilServant=!1,n.applicationLevelId=0,n.goToStep=function(i,r){i==2?p.getByParams({applicationTypeId:n.applicationType,specialityId:r},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(i){n.SelectedSpecListItems=t("filter")(n.AvailableSpecListItems,{Id:r},!0)[0];n.fek=i;p.isEmptyValue(i)?(n.mess="<li>Δεν υπαρχει ενεργό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2):(n.step1=!1,n.step2=!0,n.subRemediationMusic.SpecialityId=r,n.subRemediationMusic.LevelId=n.SelectedSpecListItems.LevelId,blockUI({target:"#divBlockUIForm",animate:!0}),n.doAll())},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.step1=!0,n.step2=!1,n.DisableDLevel=p.isEmpty(n.SelectedSpecListItems)&&p.isEmptyValue(n.subRemediationMusic.Id)?!1:!0,n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[])},blockUI({target:"#divBlockUI",animate:!0}),p.isValueInArray(p.getRoleCode(n.authentication.role),"d1, d2")&&(n.userLevel=n.authentication.levelId,n.subRemediationMusic.LevelId=n.authentication.levelId,n.subRemediationMusic.IntendancyId=n.authentication.regionAndUnitId),n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.authentication.isAuth){var w="subRemediationMusic";p.getByParams({role:n.authentication.role,codes:w},"/api/Subsystem/NewCheckPermission").then(function(r){var u=w.split(","),e,s;for(e in u)n.pageRules[u[e]]=t("filter")(r,{Code:u[e]},!0)[0].Rules;n.subRemediationMusic.Id=f.getApplicationId();n.applicationLevelId=f.getApplicationLevelId();p.isEmptyValue(n.applicationLevelId)&&(n.applicationLevelId=0);f.resetApplication();n.subRemediationMusic.PersonId=f.getPersonId();p.isEmptyValue(n.subRemediationMusic.Id)?(n.step1=!0,n.step2=!1):(n.step1=!1,n.step2=!0);p.isValueInArray(n.pageRules.subRemediationMusic.CanAccess,"u1, u2")&&(n.subRemediationMusic.PersonId=n.authentication.personId);s=i.all([p.getByParams({personId:n.subRemediationMusic.PersonId},"/api/ApplRemediationMusic/getSpecialityForRemediationMusic"),p.getByParams({Id:n.subRemediationMusic.PersonId},"/api/ApplRemediationMusic/GetApplRemediationMusic"),p.getByParams({personId:n.subRemediationMusic.PersonId},"/api/RecruitmentServiceAssumed/getSubstitutesServiceAssumed")]);s.then(function(i){var e,u,r;for(angular.copy(i[0],n.AvailableSpecListItems),n.applSub=i[1],e=i[2].substitutes,n.subs=t("filter")(e,function(n){return n.SubstitutesTypeId!=9&&n.SubstitutesTypeId!=10&&n.SubstitutesTypeId!=11&&n.SubstitutesTypeId!=12}),r=n.AvailableSpecListItems.length-1;r>=0;r--)n.AvailableSpecListItems[r].hasApplPerm=0;for(u=n.applSub.length-1;u>=0;u--)for(r=n.AvailableSpecListItems.length-1;r>=0;r--)n.applSub[u].SpecialityId==n.AvailableSpecListItems[r].Id&&(n.AvailableSpecListItems[r].hasApplSub=1);n.subRemediationMusic.Id!=null&&n.subRemediationMusic.Id!=""&&n.subRemediationMusic.Id!="undefined"?(p.isEmptyValue(n.subRemediationMusic.SpecialityId)&&(n.subRemediationMusic.SpecialityId=f.getSpecialityId()),p.getByParams({applicationTypeId:n.applicationType,specialityId:n.subRemediationMusic.SpecialityId},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(i){n.SelectedSpecListItems=t("filter")(n.AvailableSpecListItems,{Id:n.subRemediationMusic.SpecialityId},!0)[0];!p.isEmptyValue(i)||p.isValueInArray(p.getRoleCode(n.authentication.role),"a")?(n.canUpdateAppl=!0,n.showAddEditForm=1,n.getApplication()):(n.mess+="<li>Δεν μπορείτε να τροποποιήσετε την αίτηση γιατί δεν υπάρχει ανοιχτό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2)},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):p.isEmpty(n.AvailableSpecListItems)?(n.mess+=p.isEmpty(n.subs)?"<li>Δεν μπορείτε να υποβάλετε αίτηση. Δεν βρίσκεστε στον ενιαίο πίνακα για κάποιον κλάδο ή δεν έχετε τη μουσική ειδίκευση Θεωρητικά Ευρωπαϊκής Μουσικής<\/li>":"<li>Δεν μπορείτε να υποβάλετε αίτηση. Έχετε ήδη προσληφθεί το τρέχον σχολικό έτος<\/li>",n.showAddEditForm=2):(n.canInsertAppl=!0,n.showAddEditForm=1)})},function(){unblockUI("#divBlockUI");o.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else e.go("/");n.checkCivilServant=function(){n.IsCivilServant==1?n.showCivilServantFull=!1:(n.subRemediationMusic.PublicServantFull=0,n.showCivilServantFull=!0)};n.showCivilServantBlock=function(){return n.IsCivilServant==!0?!0:!1};n.showDetails=function(){return n.SelectedSpecs.length>0?!0:!1};n.changeLevel=function(){p.isEmptyValue(n.subRemediationMusic.LevelId)?(n.subRemediationMusic.LevelId=null,n.intendancies=[],n.subRemediationMusic.IntendancyId=null,n.continueDisabled=!0):(y.getIntendancies(n.subRemediationMusic.LevelId).then(function(t){n.intendancies=t}).catch(function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα στην εύρεση διευθύνσεων")}),p.isEmptyValue(n.subRemediationMusic.Id)&&(n.subRemediationMusic.IntendancyId=null),n.continueDisabled=!1)};n.changeIntendancies=function(){p.isEmptyValue(n.subRemediationMusic.LevelId)||p.isEmptyValue(n.subRemediationMusic.IntendancyId)?(n.continueDisabled=!0,n.subRemediationMusic.IntendancyId=null):n.continueDisabled=!1};n.findSpecsForDetails=function(){n.SelectedSpecs=[];angular.forEach(n.SelectedSpecListItems,function(t){for(var i=n.perspec.length-1;i>=0;i--)n.perspec[i].Speciality1.Id==t.Id&&n.SelectedSpecs.push(n.perspec[i])})};n.getApplRegions=function(){n.SelectedSpecListItems.length>0&&n.hourlyTeacher.RegionAndUnitId>0?a.getTypeRegionAndUnitByMunicipality(n.hourlyTeacherMusic.RegionAndUnitId,n.applicationType,n.subRemediationMusic.LevelId).then(function(t){angular.copy(t,n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList()},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.AvailableRegionsListItems=[],n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[])};n.doAll=function(){if(n.subRemediationMusic.Id!=null&&n.subRemediationMusic.Id!=""&&n.subRemediationMusic.Id!="undefined")n.canUpdateAppl&&n.subRemediationMusic.PersonId!=null&&n.subRemediationMusic.PersonId!=""&&n.subRemediationMusic.PersonId!="undefined"&&h.getPersonForApplication(n.subRemediationMusic.PersonId).then(function(t){n.person=t;n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1;n.showCivilServantBlock();n.checkCivilServant();p.isValueInArray(n.pageRules.subRemediationMusic.CanAccess,"d1, d2, m1, m2")&&n.subRemediationMusic.LevelId!=n.authentication.levelId&&(n.canUpdateAppl=!1);n.IsDisabled=!n.canUpdateAppl;n.IsDisabled&&(n.noUpdAccess=!0);n.subRemediationMusic.IsActive||(n.IsDisabled=!0,n.notActive=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.subRemediationMusic.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0);p.isEmpty(n.subRemediationMusic.ApplicationSubstituteMusicProtocols)||(n.protocol=n.subRemediationMusic.ApplicationSubstituteMusicProtocols[0].ProtocolString,n.showProtocol=!0);var r=i.all([p.getByParams({level:n.subRemediationMusic.LevelId,applicationTypeId:n.applicationType,sex:"Θ"},"api/ApplicationTypeRegionAndUnit/getApplicationRegionByAppTypeAndLevel")]);r.then(function(t){n.regions=t[0]},function(){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm");else{if(n.canInsertAppl&&n.subRemediationMusic.PersonId!=null&&n.subRemediationMusic.PersonId!=""&&n.subRemediationMusic.PersonId!="undefined"){h.getPersonForApplication(n.subRemediationMusic.PersonId).then(function(t){n.person=t;n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1;n.showCivilServantBlock();n.checkCivilServant()},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});var t=i.all([p.getByParams({level:n.subRemediationMusic.LevelId,applicationTypeId:n.applicationType,sex:"Θ"},"api/ApplicationTypeRegionAndUnit/getApplicationRegionByAppTypeAndLevel")]);t.then(function(t){n.regions=t[0]},function(){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})}unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")}};n.getApplication=function(){if(n.subRemediationMusic.Id!=null&&n.subRemediationMusic.Id!=""&&n.subRemediationMusic.Id!="undefined"&&(n.DisableDLevel=!0,n.canUpdateAppl&&n.subRemediationMusic.PersonId!=null&&n.subRemediationMusic.PersonId!=""&&n.subRemediationMusic.PersonId!="undefined")){var t=i.all([p.getByParams({id:n.subRemediationMusic.Id},"api/ApplRemediationMusic/GetApplRemediationMusicById")]);t.then(function(t){n.subRemediationMusic=t[0];n.doAll();var r=i.all([p.getByParams({personId:n.subRemediationMusic.PersonId,applicationTypeId:n.applicationType,didacticYearId:n.subRemediationMusic.DidacticYearId,applicationId:n.subRemediationMusic.Id},"api/HistoryAppl/getLevelByApplTypeIdAndPersonIdAndYear")]);r.then(function(t){n.levels=t[0];n.changeLevel();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})})}};n.SelectedSpecAvailItems=[];n.SelectedSelectedSpecListItems=[];n.SelectedSpecListItems=[];n.btnSpecUp=function(){for(var t,r,u,f=n.SelectedSelectedSpecListItems,i=0;i<n.SelectedSelectedSpecListItems.length;i++){if(t=n.SelectedSpecListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedSpecListItems[i].Id),t<=0||t>=n.SelectedSpecListItems.length)return;r=n.SelectedSpecListItems[t];u=n.SelectedSpecListItems[t-1];n.SelectedSpecListItems[t-1]=r;n.SelectedSpecListItems[t]=u}};n.btnSpecDown=function(){for(var t,r,u,i=n.SelectedSelectedSpecListItems.length-1;i>=0;i--){if(t=n.SelectedSpecListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedSpecListItems[i].Id),t<0||t>=n.SelectedSpecListItems.length-1)return;r=n.SelectedSpecListItems[t];u=n.SelectedSpecListItems[t+1];n.SelectedSpecListItems[t+1]=r;n.SelectedSpecListItems[t]=u}};n.btnSpecRight=function(){angular.forEach(n.SelectedAvailSpecItems,function(n){this.push(n)},n.SelectedSpecListItems);angular.forEach(n.SelectedAvailSpecItems,function(t){for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].Id==t.Id&&n.AvailableSpecListItems.splice(i,1)});n.findSpecsForDetails();n.SelectedAvailSpecItems=[];n.SelectedSelectedSpecListItems=[]};n.btnSpecLeft=function(){angular.forEach(n.SelectedSelectedSpecListItems,function(n){this.push(n)},n.AvailableSpecListItems);angular.forEach(n.SelectedSelectedSpecListItems,function(t){for(var i=n.SelectedSpecListItems.length-1;i>=0;i--)n.SelectedSpecListItems[i].Id==t.Id&&n.SelectedSpecListItems.splice(i,1)});n.findSpecsForDetails();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.btnAllSpecRight=function(){angular.forEach(n.AvailableSpecListItems,function(n){this.push(n)},n.SelectedSpecListItems);for(var t=n.AvailableSpecListItems.length-1;t>=0;t--)n.AvailableSpecListItems.splice(t,1);n.findSpecsForDetails();n.AvailableRegionsListItems=[];n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.btnAllSpecLeft=function(){angular.forEach(n.SelectedSpecListItems,function(n){this.push(n)},n.AvailableSpecListItems);for(var t=n.SelectedSpecListItems.length-1;t>=0;t--)n.SelectedSpecListItems.splice(t,1);n.findSpecsForDetails();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.removeDuplicatesSpecsForDualList=function(){angular.forEach(n.SelectedAvailSpecItems,function(t){for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].Id==t.Id&&n.AvailableSpecListItems.splice(i,1)});n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.editPerson=function(){f.setPersonId(n.subRemediationMusic.PersonId);e.go("stateEditPerson")};n.saveAction=function(t){n.showAlertSpec=p.isEmptyValue(n.SelectedSpecListItems)?!0:!1;n.showAlertRegion=p.isEmptyValue(n.subRemediationMusic.ApplicationTypeRegionAndUnitId)?!0:!1;n.canSave=!0;(p.isEmptyValue(n.subRemediationMusic.TutoringOwner)||n.showCivilServantBlock()&&p.isEmptyValue(n.subRemediationMusic.PublicServantFull)||p.isEmptyValue(n.subRemediationMusic.ReadFek))&&(n.canSave=!1);n.showAlertSpec||n.showAlertRegion||!n.canSave||n.InsOrUpd(t)};n.InsOrUpd=function(t){var r={Specialities:n.SelectedSpecListItems,RemediationMusic:n.subRemediationMusic,RegionAndUnit:n.SelectedRegionsListItems,MusicSpecialistPE16:n.SelectedMusicPE16ListItems,MusicSpecialistTE16:n.SelectedMusicTE16ListItems,MusicSpecialistOthers:n.specialistother,ApplTemplate:"",UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Status:t},i=r;n.subRemediationMusic.Id!=null&&n.subRemediationMusic.Id!=""&&n.subRemediationMusic.Id!="undefined"?(n.subRemediationMusic.ModifiedBy=n.authentication.userName,p.postByParams(i,"/api/ApplRemediationMusic/updateApplRemediationMusic").then(function(){f.setPersonId(n.person.Id);e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)})):(n.subRemediationMusic.CreatedBy=n.authentication.userName,n.subRemediationMusic.DidacticYearId=n.applicationDidacticYear.Id,p.postByParams(i,"/api/ApplRemediationMusic/insertApplRemediationMusic").then(function(){f.setPersonId(n.subRemediationMusic.PersonId);e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)}))}};RemediationMusicController.$inject=["$scope","$filter","$q","$uibModal","$log","PassParameters","$state","toaster","SubstituteMusicFactory","PersonFactory","PersonSpecialityFactory","PersonMusicSpecialityFactory","ApplicationTypeRegionAndUnitFactory","ApplicationTypeFekFactory","RegionAndFactory","GeneralFactory"];RemediationSMEAController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p){if(n.mess="",n.messInfo="",n.subRemediationSMEA={IsTemporaryStored:!0},n.applicationType=37,n.step1=!0,n.step2=!1,n.continueDisabled=!0,n.intendancies=[],n.perspec={},n.SelectedSpecs=[],n.person={},n.showAlertSpec=!1,n.showAlertMusicTE16=!1,n.showAlertMusicPE16=!1,n.showAlertRegion=!1,n.hasValidFekNoConfirmSpeciality=!1,n.alerts="",n.showToConfirmSpeciality=!1,n.regions=[],n.SelectedAvailRegionsItems=[],n.SelectedSelectedRegionsListItems=[],n.SelectedRegionsListItems=[],n.personmusicspecialists=[],n.DisableDLevel=!1,n.AvailableSpecListItems=[],n.AvailableRegionsListItems=[],n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.userLevel=0,n.canSave=!0,n.fek={},n.IsCivilServant=!1,n.applicationLevelId=0,n.goToStep=function(i,r){i==2?p.getByParams({applicationTypeId:n.applicationType,specialityId:r},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(i){n.SelectedSpecListItems=t("filter")(n.AvailableSpecListItems,{Id:r},!0)[0];n.fek=i;p.isEmptyValue(i)?(n.mess="<li>Δεν υπαρχει ενεργό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2):(n.step1=!1,n.step2=!0,n.subRemediationSMEA.SpecialityId=r,n.subRemediationSMEA.LevelId=n.SelectedSpecListItems.LevelId,blockUI({target:"#divBlockUIForm",animate:!0}),n.doAll())},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.step1=!0,n.step2=!1,n.DisableDLevel=p.isEmpty(n.SelectedSpecListItems)&&p.isEmptyValue(n.subRemediationSMEA.Id)?!1:!0,n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[])},blockUI({target:"#divBlockUI",animate:!0}),p.isValueInArray(p.getRoleCode(n.authentication.role),"d1, d2")&&(n.userLevel=n.authentication.levelId,n.subRemediationSMEA.LevelId=n.authentication.levelId,n.subRemediationSMEA.IntendancyId=n.authentication.regionAndUnitId),n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.authentication.isAuth){var w="subRemediationSMEA";p.getByParams({role:n.authentication.role,codes:w},"/api/Subsystem/NewCheckPermission").then(function(r){var u=w.split(","),e,s;for(e in u)n.pageRules[u[e]]=t("filter")(r,{Code:u[e]},!0)[0].Rules;n.subRemediationSMEA.Id=f.getApplicationId();n.applicationLevelId=f.getApplicationLevelId();p.isEmptyValue(n.applicationLevelId)&&(n.applicationLevelId=0);f.resetApplication();n.subRemediationSMEA.PersonId=f.getPersonId();p.isEmptyValue(n.subRemediationSMEA.Id)?(n.step1=!0,n.step2=!1):(n.step1=!1,n.step2=!0);p.isValueInArray(n.pageRules.subRemediationSMEA.CanAccess,"u1, u2")&&(n.subRemediationSMEA.PersonId=n.authentication.personId);s=i.all([p.getByParams({personId:n.subRemediationSMEA.PersonId},"/api/ApplRemediationSMEA/getSpecialityForRemediationSMEA"),p.getByParams({Id:n.subRemediationSMEA.PersonId},"/api/ApplRemediationSMEA/GetApplRemediationSMEA"),p.getByParams({personId:n.subRemediationSMEA.PersonId},"/api/RecruitmentServiceAssumed/getSubstitutesServiceAssumed")]);s.then(function(i){var e,u,r;for(angular.copy(i[0],n.AvailableSpecListItems),n.applSub=i[1],e=i[2].substitutes,n.subs=t("filter")(e,function(n){return n.SubstitutesTypeId!=9&&n.SubstitutesTypeId!=10&&n.SubstitutesTypeId!=11&&n.SubstitutesTypeId!=12}),r=n.AvailableSpecListItems.length-1;r>=0;r--)n.AvailableSpecListItems[r].hasApplPerm=0;for(u=n.applSub.length-1;u>=0;u--)for(r=n.AvailableSpecListItems.length-1;r>=0;r--)n.applSub[u].SpecialityId==n.AvailableSpecListItems[r].Id&&(n.AvailableSpecListItems[r].hasApplSub=1);n.subRemediationSMEA.Id!=null&&n.subRemediationSMEA.Id!=""&&n.subRemediationSMEA.Id!="undefined"?(p.isEmptyValue(n.subRemediationSMEA.SpecialityId)&&(n.subRemediationSMEA.SpecialityId=f.getSpecialityId()),p.getByParams({applicationTypeId:n.applicationType,specialityId:n.subRemediationSMEA.SpecialityId},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(i){n.SelectedSpecListItems=t("filter")(n.AvailableSpecListItems,{Id:n.subRemediationSMEA.SpecialityId},!0)[0];!p.isEmptyValue(i)||p.isValueInArray(p.getRoleCode(n.authentication.role),"a")?(n.canUpdateAppl=!0,n.showAddEditForm=1,n.getApplication()):(n.mess+="<li>Δεν μπορείτε να τροποποιήσετε την αίτηση γιατί δεν υπάρχει ανοιχτό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2)},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):p.isEmpty(n.AvailableSpecListItems)?(n.mess+=p.isEmpty(n.subs)?"<li>Δεν μπορείτε να υποβάλετε αίτηση. Δεν βρίσκεστε στον ενιαίο πίνακα για κάποιον κλάδο<\/li>":"<li>Δεν μπορείτε να υποβάλετε αίτηση. Έχετε ήδη προσληφθεί το τρέχον σχολικό έτος<\/li>",n.showAddEditForm=2):(n.canInsertAppl=!0,n.showAddEditForm=1)})},function(){unblockUI("#divBlockUI");o.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else e.go("/");n.checkCivilServant=function(){n.IsCivilServant==1?n.showCivilServantFull=!1:(n.subRemediationSMEA.PublicServantFull=0,n.showCivilServantFull=!0)};n.showCivilServantBlock=function(){return n.IsCivilServant==!0?!0:!1};n.showDetails=function(){return n.SelectedSpecs.length>0?!0:!1};n.changeLevel=function(){p.isEmptyValue(n.subRemediationSMEA.LevelId)?(n.subRemediationSMEA.LevelId=null,n.intendancies=[],n.subRemediationSMEA.IntendancyId=null,n.continueDisabled=!0):(y.getIntendancies(n.subRemediationSMEA.LevelId).then(function(t){n.intendancies=t}).catch(function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα στην εύρεση διευθύνσεων")}),p.isEmptyValue(n.subRemediationSMEA.Id)&&(n.subRemediationSMEA.IntendancyId=null),n.continueDisabled=!1)};n.changeIntendancies=function(){p.isEmptyValue(n.subRemediationSMEA.LevelId)||p.isEmptyValue(n.subRemediationSMEA.IntendancyId)?(n.continueDisabled=!0,n.subRemediationSMEA.IntendancyId=null):n.continueDisabled=!1};n.findSpecsForDetails=function(){n.SelectedSpecs=[];angular.forEach(n.SelectedSpecListItems,function(t){for(var i=n.perspec.length-1;i>=0;i--)n.perspec[i].Speciality1.Id==t.Id&&n.SelectedSpecs.push(n.perspec[i])})};n.getApplRegions=function(){n.SelectedSpecListItems.length>0&&n.hourlyTeacher.RegionAndUnitId>0?a.getTypeRegionAndUnitByMunicipality(n.hourlyTeacherMusic.RegionAndUnitId,n.applicationType,n.subRemediationSMEA.LevelId).then(function(t){angular.copy(t,n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList()},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.AvailableRegionsListItems=[],n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[])};n.doAll=function(){if(n.subRemediationSMEA.Id!=null&&n.subRemediationSMEA.Id!=""&&n.subRemediationSMEA.Id!="undefined")n.canUpdateAppl&&n.subRemediationSMEA.PersonId!=null&&n.subRemediationSMEA.PersonId!=""&&n.subRemediationSMEA.PersonId!="undefined"&&h.getPersonForApplication(n.subRemediationSMEA.PersonId).then(function(t){n.person=t;n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1;n.showCivilServantBlock();n.checkCivilServant();p.isValueInArray(n.pageRules.subRemediationSMEA.CanAccess,"d1, d2, m1, m2")&&n.subRemediationSMEA.LevelId!=n.authentication.levelId&&(n.canUpdateAppl=!1);n.IsDisabled=!n.canUpdateAppl;n.IsDisabled&&(n.noUpdAccess=!0);n.subRemediationSMEA.IsActive||(n.IsDisabled=!0,n.notActive=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.subRemediationSMEA.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0);p.isEmpty(n.subRemediationSMEA.ApplicationSubstituteMusicProtocols)||(n.protocol=n.subRemediationSMEA.ApplicationSubstituteMusicProtocols[0].ProtocolString,n.showProtocol=!0);var r=i.all([p.getByParams({level:n.subRemediationSMEA.LevelId,applicationTypeId:n.applicationType,sex:"Θ"},"api/ApplicationTypeRegionAndUnit/getApplicationRegionByAppTypeAndLevel")]);r.then(function(t){n.regions=t[0]},function(){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm");else{if(n.canInsertAppl&&n.subRemediationSMEA.PersonId!=null&&n.subRemediationSMEA.PersonId!=""&&n.subRemediationSMEA.PersonId!="undefined"){h.getPersonForApplication(n.subRemediationSMEA.PersonId).then(function(t){n.person=t;n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1;n.showCivilServantBlock();n.checkCivilServant()},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});var t=i.all([p.getByParams({level:n.subRemediationSMEA.LevelId,applicationTypeId:n.applicationType,sex:"Θ"},"api/ApplicationTypeRegionAndUnit/getApplicationRegionByAppTypeAndLevel")]);t.then(function(t){n.regions=t[0]},function(){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})}unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")}};n.getApplication=function(){if(n.subRemediationSMEA.Id!=null&&n.subRemediationSMEA.Id!=""&&n.subRemediationSMEA.Id!="undefined"&&(n.DisableDLevel=!0,n.canUpdateAppl&&n.subRemediationSMEA.PersonId!=null&&n.subRemediationSMEA.PersonId!=""&&n.subRemediationSMEA.PersonId!="undefined")){var t=i.all([p.getByParams({id:n.subRemediationSMEA.Id},"api/ApplRemediationSMEA/GetApplRemediationSMEAById")]);t.then(function(t){n.subRemediationSMEA=t[0];n.doAll();var r=i.all([p.getByParams({personId:n.subRemediationSMEA.PersonId,applicationTypeId:n.applicationType,didacticYearId:n.subRemediationSMEA.DidacticYearId,applicationId:n.subRemediationSMEA.Id},"api/HistoryAppl/getLevelByApplTypeIdAndPersonIdAndYear")]);r.then(function(t){n.levels=t[0];n.changeLevel();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})})}};n.SelectedSpecAvailItems=[];n.SelectedSelectedSpecListItems=[];n.SelectedSpecListItems=[];n.btnSpecUp=function(){for(var t,r,u,f=n.SelectedSelectedSpecListItems,i=0;i<n.SelectedSelectedSpecListItems.length;i++){if(t=n.SelectedSpecListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedSpecListItems[i].Id),t<=0||t>=n.SelectedSpecListItems.length)return;r=n.SelectedSpecListItems[t];u=n.SelectedSpecListItems[t-1];n.SelectedSpecListItems[t-1]=r;n.SelectedSpecListItems[t]=u}};n.btnSpecDown=function(){for(var t,r,u,i=n.SelectedSelectedSpecListItems.length-1;i>=0;i--){if(t=n.SelectedSpecListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedSpecListItems[i].Id),t<0||t>=n.SelectedSpecListItems.length-1)return;r=n.SelectedSpecListItems[t];u=n.SelectedSpecListItems[t+1];n.SelectedSpecListItems[t+1]=r;n.SelectedSpecListItems[t]=u}};n.btnSpecRight=function(){angular.forEach(n.SelectedAvailSpecItems,function(n){this.push(n)},n.SelectedSpecListItems);angular.forEach(n.SelectedAvailSpecItems,function(t){for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].Id==t.Id&&n.AvailableSpecListItems.splice(i,1)});n.findSpecsForDetails();n.SelectedAvailSpecItems=[];n.SelectedSelectedSpecListItems=[]};n.btnSpecLeft=function(){angular.forEach(n.SelectedSelectedSpecListItems,function(n){this.push(n)},n.AvailableSpecListItems);angular.forEach(n.SelectedSelectedSpecListItems,function(t){for(var i=n.SelectedSpecListItems.length-1;i>=0;i--)n.SelectedSpecListItems[i].Id==t.Id&&n.SelectedSpecListItems.splice(i,1)});n.findSpecsForDetails();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.btnAllSpecRight=function(){angular.forEach(n.AvailableSpecListItems,function(n){this.push(n)},n.SelectedSpecListItems);for(var t=n.AvailableSpecListItems.length-1;t>=0;t--)n.AvailableSpecListItems.splice(t,1);n.findSpecsForDetails();n.AvailableRegionsListItems=[];n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.btnAllSpecLeft=function(){angular.forEach(n.SelectedSpecListItems,function(n){this.push(n)},n.AvailableSpecListItems);for(var t=n.SelectedSpecListItems.length-1;t>=0;t--)n.SelectedSpecListItems.splice(t,1);n.findSpecsForDetails();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.removeDuplicatesSpecsForDualList=function(){angular.forEach(n.SelectedAvailSpecItems,function(t){for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].Id==t.Id&&n.AvailableSpecListItems.splice(i,1)});n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.editPerson=function(){f.setPersonId(n.subRemediationSMEA.PersonId);e.go("stateEditPerson")};n.saveAction=function(t){n.showAlertSpec=p.isEmptyValue(n.SelectedSpecListItems)?!0:!1;n.showAlertRegion=p.isEmptyValue(n.subRemediationSMEA.ApplicationTypeRegionAndUnitId)?!0:!1;n.canSave=!0;(p.isEmptyValue(n.subRemediationSMEA.TutoringOwner)||n.showCivilServantBlock()&&p.isEmptyValue(n.subRemediationSMEA.PublicServantFull)||p.isEmptyValue(n.subRemediationSMEA.ReadFek))&&(n.canSave=!1);n.showAlertSpec||n.showAlertRegion||!n.canSave||n.InsOrUpd(t)};n.InsOrUpd=function(t){var r={Specialities:n.SelectedSpecListItems,RemediationSMEA:n.subRemediationSMEA,RegionAndUnit:n.SelectedRegionsListItems,MusicSpecialistPE16:n.SelectedMusicPE16ListItems,MusicSpecialistTE16:n.SelectedMusicTE16ListItems,MusicSpecialistOthers:n.specialistother,ApplTemplate:"",UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Status:t},i=r;n.subRemediationSMEA.Id!=null&&n.subRemediationSMEA.Id!=""&&n.subRemediationSMEA.Id!="undefined"?(n.subRemediationSMEA.ModifiedBy=n.authentication.userName,p.postByParams(i,"/api/ApplRemediationSMEA/updateApplRemediationSMEA").then(function(){f.setPersonId(n.person.Id);e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)})):(n.subRemediationSMEA.CreatedBy=n.authentication.userName,n.subRemediationSMEA.DidacticYearId=n.applicationDidacticYear.Id,p.postByParams(i,"/api/ApplRemediationSMEA/insertApplRemediationSMEA").then(function(){f.setPersonId(n.subRemediationSMEA.PersonId);e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)}))}};RemediationSMEAController.$inject=["$scope","$filter","$q","$uibModal","$log","PassParameters","$state","toaster","SubstituteMusicFactory","PersonFactory","PersonSpecialityFactory","PersonMusicSpecialityFactory","ApplicationTypeRegionAndUnitFactory","ApplicationTypeFekFactory","RegionAndFactory","GeneralFactory"];ReportsBabisController=function(n,t,i){n.reportType=[{Name:"Εκπαιδευτικοί εκτός ΣΜΕΑΕ, ΣΜΕΑΕ-ΚΕΔΔΥ",Id:1},{Name:"Εκπαιδευτικοί ΣΜΕΑΕ",Id:2},{Name:"Εκπαιδευτικοί ΣΜΕΑΕ-ΚΕΔΔΥ",Id:3},{Name:"Εκπαιδευτικοί που δεν ανέλαβαν υπηρεσία",Id:4},{Name:"Κενά/ Πλεονάσματα Αποσπάσεων",Id:5},{Name:"Κενά/ Πλεονάσματα Αποσπάσεων ΣΜΕΑΕ",Id:6},{Name:"Κενά/ Πλεονάσματα Αναπληρωτών",Id:7},{Name:"Κενά/ Πλεονάσματα Αναπληρωτών ΣΜΕΑΕ",Id:8},{Name:"Κενά/ Πλεονάσματα Αναπληρωτών σε Μουσικά Σχολεία",Id:9},{Name:"Κενά σε Ώρες Αναπληρωτών",Id:10},{Name:"Κενά σε Ώρες Αναπληρωτών ΣΜΕΑΕ",Id:11},{Name:"Αναπληρωτές - Ωρομίσθιοι Ενισχυτικής Διδασκαλίας",Id:12},{Name:"Κενά/ Πλεονάσματα Αναπληρωτών ΕΕΠ - ΕΒΠ",Id:13},{Name:"Κενά σε Ώρες Αναπληρωτών ΕΕΠ-ΕΒΠ",Id:14},];n.reportType.selected={};n.StartDate="";n.EndDate="";n.showSearchButton=!1;n.showColumnLines=!0;n.showRowLines=!0;n.showBorders=!0;n.rowAlternationEnabled=!0;n.minDate=new Date;var r=new Date,u=r.getDate(),f=r.getMonth(),e=r.getFullYear()+1;n.maxDate=u+"/"+f+"/"+e;n.formats=["dd/MM/yyyy"];n.format=n.formats[0];n.today=function(){};n.today();n.clear=function(){n.dt=null};n.disabled=function(n,t){return t==="day"&&(n.getDay()===0||n.getDay()===6)};n.toggleMin=function(){n.minDate=n.minDate?null:new Date};n.toggleMin();n.open=function(t,i){t.preventDefault();t.stopPropagation();n[i]=!0;i.opened=!0};n.dateOptions={formatYear:"yy",startingDay:1};n.gridOptions={bindingOptions:{dataSource:"results",filterRow:"filterRow",headerFilter:"headerFilter",showColumnLines:"showColumnLines",showRowLines:"showRowLines",showBorders:"showBorders",rowAlternationEnabled:"rowAlternationEnabled",columns:"columns"},allowColumnReordering:!0,allowColumnResizing:!0,columnAutoWidth:!0,columnFixing:{enabled:!0},searchPanel:{visible:!0,width:240,placeholder:"Αναζήτηση..."},selection:{mode:"multiple"},columnChooser:{enabled:!0},"export":{enabled:!0,fileName:"Results",allowExportSelectedData:!0},groupPanel:{visible:!0},paging:{pageSize:10},pager:{showPageSizeSelector:!0,allowedPageSizes:[10,20,50,100],showInfo:!0}};n.changeReport=function(){n.showEndDate=!1;n.showSearchButton=i.isEmptyValue(n.reportType.selected)?!1:!0};n.searchAction=function(){n.results=[];switch(n.reportType.selected.Id){case 1:i.getByParams({startDate:n.StartDate,endDate:n.EndDate},"/api/Export/GetReportsBabisNoSmeaKeddy").then(function(t){n.columns=[{dataField:"TaxNumber",caption:"TaxNumber"},{dataField:"Firstname",caption:"Firstname"},{dataField:"Lastname",caption:"Lastname"},{dataField:"FatherFirstname",caption:"FatherFirstname"},{dataField:"MotherFirstname",caption:"MotherFirstname"},{dataField:"Omada",caption:"Omada"},{dataField:"Klados",caption:"Klados"},{dataField:"Perioxi",caption:"Perioxi",width:150},{dataField:"Wrario",caption:"Wrario"},{dataField:"Email",caption:"Email"},{dataField:"Sex",caption:"Sex"},{dataField:"BirthDate",caption:"BirthDate",dataType:"date",format:"dd/MM/yyyy"},{dataField:"ptype",caption:"ptype"},{dataField:"prosilthe",caption:"prosilthe"},{dataField:"RecruitmentDate",caption:"RecruitmentDate",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RecruitmentProtocol",caption:"RecruitmentProtocol"},{dataField:"ResignationDate",caption:"ResignationDate"},{dataField:"ResignationProtocol",caption:"ResignationProtocol"},{dataField:"YARecallRecruitment",caption:"YARecallRecruitment"},{dataField:"Ada",caption:"Ada"},{dataField:"ServiceAssumed",caption:"ServiceAssumed"},{dataField:"PresenceDateFrom",caption:"PresenceDateFrom",dataType:"date",format:"dd/MM/yyyy"},{dataField:"PresenceDateTo",caption:"PresenceDateTo",dataType:"date",format:"dd/MM/yyyy"},{dataField:"PaymentType",caption:"PaymentType"},{dataField:"ExceptionSanctionType",caption:"ExceptionSanctionType"},{dataField:"moria",caption:"moria"},{dataField:"moriaIdiotMono",caption:"moriaIdiotMono"},{dataField:"moriaEE",caption:"moriaEE"},{dataField:"moriaMon",caption:"moriaMon"},{dataField:"recruitmentInfo",caption:"recruitmentInfo"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 2:i.getByParams({startDate:n.StartDate,endDate:n.EndDate},"/api/Export/GetReportsBabisSmea").then(function(t){n.columns=[{dataField:"TaxNumber",caption:"TaxNumber"},{dataField:"Firstname",caption:"Firstname"},{dataField:"Lastname",caption:"Lastname"},{dataField:"FatherFirstname",caption:"FatherFirstname"},{dataField:"MotherFirstname",caption:"MotherFirstname"},{dataField:"Omada",caption:"Omada"},{dataField:"Klados",caption:"Klados"},{dataField:"Perioxi",caption:"Perioxi",width:150},{dataField:"Wrario",caption:"Wrario"},{dataField:"Email",caption:"Email"},{dataField:"Sex",caption:"Sex"},{dataField:"BirthDate",caption:"BirthDate",dataType:"date",format:"dd/MM/yyyy"},{dataField:"ptype",caption:"ptype"},{dataField:"prosilthe",caption:"prosilthe"},{dataField:"RecruitmentDate",caption:"RecruitmentDate",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RecruitmentProtocol",caption:"RecruitmentProtocol"},{dataField:"ResignationDate",caption:"ResignationDate"},{dataField:"ResignationProtocol",caption:"ResignationProtocol"},{dataField:"YARecallRecruitment",caption:"YARecallRecruitment"},{dataField:"Ada",caption:"Ada"},{dataField:"ServiceAssumed",caption:"ServiceAssumed"},{dataField:"PresenceDateFrom",caption:"PresenceDateFrom",dataType:"date",format:"dd/MM/yyyy"},{dataField:"PresenceDateTo",caption:"PresenceDateTo",dataType:"date",format:"dd/MM/yyyy"},{dataField:"PaymentType",caption:"PaymentType"},{dataField:"ExceptionSanctionType",caption:"ExceptionSanctionType"},{dataField:"moria",caption:"moria"},{dataField:"moriaGeni",caption:"moriaGeni"},{dataField:"moriaIdiotMono",caption:"moriaIdiotMono"},{dataField:"moriaEE",caption:"moriaEE"},{dataField:"moriaMon",caption:"moriaMon"},{dataField:"recruitmentInfo",caption:"recruitmentInfo"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 3:i.getByParams({startDate:n.StartDate,endDate:n.EndDate},"/api/Export/GetReportsBabisKeddy").then(function(t){n.columns=[{dataField:"TaxNumber",caption:"TaxNumber"},{dataField:"Firstname",caption:"Firstname"},{dataField:"Lastname",caption:"Lastname"},{dataField:"FatherFirstname",caption:"FatherFirstname"},{dataField:"MotherFirstname",caption:"MotherFirstname"},{dataField:"Omada",caption:"Omada"},{dataField:"Klados",caption:"Klados"},{dataField:"Perioxi",caption:"Perioxi",width:150},{dataField:"Wrario",caption:"Wrario"},{dataField:"Email",caption:"Email"},{dataField:"Sex",caption:"Sex"},{dataField:"BirthDate",caption:"BirthDate",dataType:"date",format:"dd/MM/yyyy"},{dataField:"ptype",caption:"ptype"},{dataField:"prosilthe",caption:"prosilthe"},{dataField:"RecruitmentDate",caption:"RecruitmentDate",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RecruitmentProtocol",caption:"RecruitmentProtocol"},{dataField:"ResignationDate",caption:"ResignationDate"},{dataField:"ResignationProtocol",caption:"ResignationProtocol"},{dataField:"YARecallRecruitment",caption:"YARecallRecruitment"},{dataField:"Ada",caption:"Ada"},{dataField:"ServiceAssumed",caption:"ServiceAssumed"},{dataField:"PresenceDateFrom",caption:"PresenceDateFrom",dataType:"date",format:"dd/MM/yyyy"},{dataField:"PresenceDateTo",caption:"PresenceDateTo",dataType:"date",format:"dd/MM/yyyy"},{dataField:"PaymentType",caption:"PaymentType"},{dataField:"ExceptionSanctionType",caption:"ExceptionSanctionType"},{dataField:"moria",caption:"moria"},{dataField:"moriaGeni",caption:"moriaGeni"},{dataField:"moriaIdiotMono",caption:"moriaIdiotMono"},{dataField:"moriaEE",caption:"moriaEE"},{dataField:"moriaMon",caption:"moriaMon"},{dataField:"recruitmentInfo",caption:"recruitmentInfo"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 4:i.getByParams({startDate:n.StartDate,endDate:n.EndDate},"/api/Export/GetReportsBabisNoResignation").then(function(t){n.columns=[{dataField:"TaxNumber",caption:"TaxNumber"},{dataField:"Firstname",caption:"Firstname"},{dataField:"Lastname",caption:"Lastname"},{dataField:"FatherFirstname",caption:"FatherFirstname"},{dataField:"MotherFirstname",caption:"MotherFirstname"},{dataField:"Omada",caption:"Omada"},{dataField:"Klados",caption:"Klados"},{dataField:"Perioxi",caption:"Perioxi",width:150},{dataField:"Wrario",caption:"Wrario"},{dataField:"Email",caption:"Email"},{dataField:"Sex",caption:"Sex"},{dataField:"BirthDate",caption:"BirthDate",dataType:"date",format:"dd/MM/yyyy"},{dataField:"ptype",caption:"ptype"},{dataField:"prosilthe",caption:"prosilthe"},{dataField:"RecruitmentDate",caption:"RecruitmentDate",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RecruitmentProtocol",caption:"RecruitmentProtocol"},{dataField:"ResignationDate",caption:"ResignationDate",dataType:"date",format:"dd/MM/yyyy"},{dataField:"LastWorkingDate",caption:"LastWorkingDate",dataType:"date",format:"dd/MM/yyyy"},{dataField:"ResignationProtocol",caption:"ResignationProtocol"},{dataField:"YARecallRecruitment",caption:"YARecallRecruitment"},{dataField:"Ada",caption:"Ada"},{dataField:"ServiceAssumed",caption:"ServiceAssumed"},{dataField:"PresenceDateFrom",caption:"PresenceDateFrom",dataType:"date",format:"dd/MM/yyyy"},{dataField:"PresenceDateTo",caption:"PresenceDateTo",dataType:"date",format:"dd/MM/yyyy"},{dataField:"PaymentType",caption:"PaymentType"},{dataField:"ExceptionSanctionType",caption:"ExceptionSanctionType"},{dataField:"moria",caption:"moria"},{dataField:"moriaIdiotMono",caption:"moriaIdiotMono"},{dataField:"moriaEE",caption:"moriaEE"},{dataField:"moriaMon",caption:"moriaMon"},{dataField:"recruitmentInfo",caption:"recruitmentInfo"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 5:i.getByParams({role:"Διαχειριστής",regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSecondmentGapExcess").then(function(t){n.columns=[{dataField:"SecondmentSpecialityCode",caption:"ΚΛΑΔΟΣ"},{dataField:"Description",caption:"ΠΥΣΔΕ/ ΠΥΣΠΕ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"MinistryGap",caption:"ΚΕΝΑ ΥΠΟΥΡΓΕΙΟΥ"},{dataField:"MinistryExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΥΠΟΥΡΓΕΙΟΥ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case 6:i.getByParams({role:"Διαχειριστής",regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSecondmentSmeaGapExcess").then(function(t){n.columns=[{dataField:"SecondmentSpecialityCode",caption:"ΚΛΑΔΟΣ"},{dataField:"Description",caption:"ΠΥΣΔΕ/ ΠΥΣΠΕ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"MinistryGap",caption:"ΚΕΝΑ ΥΠΟΥΡΓΕΙΟΥ"},{dataField:"MinistryExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΥΠΟΥΡΓΕΙΟΥ"},{dataField:"SmeaType",caption:"ΤΥΠΟΣ ΣΜΕΑΕ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case 7:i.getByParams({role:"Διαχειριστής",regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSubstituteGapExcess").then(function(t){n.columns=[{dataField:"SpecialityOrGroupCode",caption:"ΚΛΑΔΟΣ"},{dataField:"PrefectureDescription",caption:"ΠΕΡΙΦΕΡΕΙΑ"},{dataField:"RegionAndUnitDescription",caption:"ΠΕΡΙΟΧΗ"},{dataField:"IsFullDescription",caption:"ΤΥΠΟΣ ΩΡΑΡΙΟΥ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"GapType",caption:"ΤΥΠΟΣ ΚΕΝΟΥ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"MinistryGap",caption:"ΚΕΝΑ ΥΠΟΥΡΓΕΙΟΥ"},{dataField:"MinistryExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΥΠΟΥΡΓΕΙΟΥ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case 8:i.getByParams({role:"Διαχειριστής",regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSubstituteSMEAEGapExcess").then(function(t){n.columns=[{dataField:"SpecialityOrGroupCode",caption:"ΚΛΑΔΟΣ"},{dataField:"PrefectureDescription",caption:"ΠΕΡΙΦΕΡΕΙΑ"},{dataField:"RegionAndUnitDescription",caption:"ΠΕΡΙΟΧΗ"},{dataField:"IsFullDescription",caption:"ΤΥΠΟΣ ΩΡΑΡΙΟΥ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"SMEAType",caption:"ΤΥΠΟΣ ΣΜΕΑΕ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"MinistryGap",caption:"ΚΕΝΑ ΥΠΟΥΡΓΕΙΟΥ"},{dataField:"MinistryExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΥΠΟΥΡΓΕΙΟΥ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case 9:i.getByParams({role:"Διαχειριστής",regionAndUnitId:n.authentication.regionAndUnitId},"/api/Export/GetSubstituteMusicGapExcess").then(function(t){n.columns=[{dataField:"MusicSpecialistDescription",caption:"ΜΟΥΣΙΚΗ ΕΙΔΙΚΕΥΣΗ"},{dataField:"PrefectureDescription",caption:"ΠΕΡΙΦΕΡΕΙΑ"},{dataField:"RegionAndUnitDescription",caption:"ΜΟΥΣΙΚΟ ΣΧΟΛΕΙΟ"},{dataField:"IsFullDescription",caption:"ΤΥΠΟΣ ΩΡΑΡΙΟΥ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"MinistryGap",caption:"ΚΕΝΑ ΥΠΟΥΡΓΕΙΟΥ"},{dataField:"MinistryExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΥΠΟΥΡΓΕΙΟΥ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case 10:i.getByParams({role:"Διαχειριστής",regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSubstituteGapsHoursPerSchoolExport").then(function(t){n.columns=[{dataField:"GapType",caption:"ΤΥΠΟΣ ΚΕΝΟΥ"},{dataField:"peri",caption:"ΠΕΡΙΦΕΡΕΙΑ"},{dataField:"dief",caption:"ΔΙΕΥΘΥΝΣΗ"},{dataField:"perioxi",caption:"ΠΕΡΙΟΧΗ"},{dataField:"orario",caption:"ΩΡΑΡΙΟ"},{dataField:"synores",caption:"ΩΡΕΣ"},{dataField:"eidikotita",caption:"ΕΙΔΙΚΟΤΗΤΑ"},{dataField:"oresSxoleia",caption:"ΚΑΤΑΧΩΡΙΣΗ",width:300},{dataField:"schTypes",caption:"ΤΥΠΟΙ ΣΧΟΛΕΙΩΝ",width:300},];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case 11:i.getByParams({role:"Διαχειριστής",regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSubstituteSmeaeGapsHoursPerSchoolExport").then(function(t){n.columns=[{dataField:"peri",caption:"ΠΕΡΙΦΕΡΕΙΑ"},{dataField:"dief",caption:"ΔΙΕΥΘΥΝΣΗ"},{dataField:"SMEAType",caption:"ΤΥΠΟΣ ΣΜΕΑΕ"},{dataField:"perioxi",caption:"ΠΕΡΙΟΧΗ"},{dataField:"orario",caption:"ΩΡΑΡΙΟ"},{dataField:"synores",caption:"ΩΡΕΣ"},{dataField:"eidikotita",caption:"ΕΙΔΙΚΟΤΗΤΑ"},{dataField:"oresSxoleia",caption:"ΚΑΤΑΧΩΡΙΣΗ",width:300},{dataField:"schTypes",caption:"ΤΥΠΟΙ ΣΧΟΛΕΙΩΝ",width:300},];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case 12:n.results=[];i.getByParams({regionAndUnitId:n.authentication.regionAndUnitId,role:n.authentication.role},"/api/Export/getCurrentRecruitmentExperientBabis").then(function(t){n.columns=[{dataField:"Description",caption:"Υπηρεσία Καταχώρισης"},{dataField:"TaxNumber",caption:"ΑΦΜ"},{dataField:"LastName",caption:"Επώνυμο"},{dataField:"FirstName",caption:"Όνομα"},{dataField:"FatherFirstName",caption:"Πατρώνυμο"},{dataField:"MotherFirstname",caption:"Μητρώνυμο"},{dataField:"Email",caption:"Email"},{dataField:"Sex",caption:"Φύλο"},{dataField:"BirthDate",caption:"Ημ. Γέννησης",dataType:"date",format:"dd/MM/yyyy"},{dataField:"Speciality",caption:"Κλάδος"},{dataField:"ServiceAssumedType",caption:"Ιδιότητα"},{dataField:"HoursPerWeek",caption:"Ώρες Μειωμένου"},{dataField:"LocationRegionAndUnitDescription",caption:"Περιοχή Πρόσληψης"},{dataField:"ServiceAssumedDate",caption:"Ημ/νία Ανάληψης Υπηρεσίας",dataType:"date",format:"dd/MM/yyyy"},{dataField:"ExperienceStartDate",caption:"Πρόσμετρηση Υπηρεσίας Από",dataType:"date",format:"dd/MM/yyyy"},{dataField:"ExperienceEndDate",caption:"Ημ/νία Λήξης Υπηρεσίας",dataType:"date",format:"dd/MM/yyyy"},{dataField:"LastWorkingDate",caption:"LastWorkingDate",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RecruitmentProtocol",caption:"Υ.Α. Πρόσληψης"},{dataField:"RemoteUnit",caption:"Δυσπρόσιτα"},{dataField:"RemoteUnitHours",caption:"Ώρες σε Δυσπρόσιτα"},{dataField:"Schools",caption:"Σχολεία"},{dataField:"Comments",caption:"Παρατηρήσεις"},{dataField:"September",caption:"Ώρες Σεπτεμβρίου"},{dataField:"October",caption:"Ώρες Οκτωβρίου"},{dataField:"November",caption:"Ώρες Νοεμβρίου"},{dataField:"December",caption:"Ώρες Δεκεμβρίου"},{dataField:"January",caption:"Ώρες Ιανουαρίου"},{dataField:"February",caption:"Ώρες Φεβρουαρίου"},{dataField:"March",caption:"Ώρες Μαρτίου"},{dataField:"April",caption:"Ώρες Απριλίου"},{dataField:"May",caption:"Ώρες Μαϊου"},{dataField:"June",caption:"Ώρες Ιουνίου"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case 13:i.getByParams({role:"Διαχειριστής",regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSubstituteEEPEBPGapExcess").then(function(t){n.columns=[{dataField:"SpecialityOrGroupCode",caption:"ΚΛΑΔΟΣ"},{dataField:"PrefectureDescription",caption:"ΠΕΡΙΦΕΡΕΙΑ"},{dataField:"RegionAndUnitDescription",caption:"ΠΕΡΙΟΧΗ"},{dataField:"IsFullDescription",caption:"ΤΥΠΟΣ ΩΡΑΡΙΟΥ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"GapType",caption:"ΤΥΠΟΣ ΚΕΝΟΥ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"MinistryGap",caption:"ΚΕΝΑ ΥΠΟΥΡΓΕΙΟΥ"},{dataField:"MinistryExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΥΠΟΥΡΓΕΙΟΥ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case 14:i.getByParams({role:"Διαχειριστής",regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSubstituteEEPEBPGapsHoursPerSchoolExport").then(function(t){n.columns=[{dataField:"peri",caption:"ΠΕΡΙΦΕΡΕΙΑ"},{dataField:"dief",caption:"ΔΙΕΥΘΥΝΣΗ"},{dataField:"SMEAType",caption:"ΤΥΠΟΣ ΣΜΕΑΕ"},{dataField:"perioxi",caption:"ΠΕΡΙΟΧΗ"},{dataField:"orario",caption:"ΩΡΑΡΙΟ"},{dataField:"synores",caption:"ΩΡΕΣ"},{dataField:"eidikotita",caption:"ΕΙΔΙΚΟΤΗΤΑ"},{dataField:"oresSxoleia",caption:"ΚΑΤΑΧΩΡΙΣΗ",width:300},];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;default:t.pop("warning","Αδύνατη αναζήτηση","Πρέπει να συμπληρώσετε τον τύπο της αναφοράς")}}};ReportsBabisController.$inject=["$scope","toaster","GeneralFactory","$state","$filter"];Globalize.culture("el");ReportsController=function(n,t,i,r,u,f){n.authentication.isAuth||r.go("/");i.isValueInArray(i.getRoleCode(n.authentication.role),"u1, u2")&&r.go("forbidden");n.codeTypeFilter=!1;n.codeType=i.isValueInArray(i.getRoleCode(n.authentication.role),"s")?[{Name:"Μη Μόνιμος Εκπαιδευτικός",Id:2}]:[{Name:"Μόνιμος Εκπαιδευτικός",Id:1},{Name:"Μη Μόνιμος Εκπαιδευτικός",Id:2},{Name:"Άλλο",Id:3}];n.Levels=[{Id:1,Description:"Α/βθμια"},{Id:2,Description:"Β/βθμια"}];n.prefectureClassification=[{Id:1,Description:"Εμφάνιση αποτελεσμάτων"},{Id:2,Description:"Εκτέλεση αλγορίθμου και εμφάνιση αποτελεσμάτων"}];n.intendancyClassification=[{Id:1,Description:"Εμφάνιση αποτελεσμάτων"},{Id:2,Description:"Εκτέλεση αλγορίθμου και εμφάνιση αποτελεσμάτων"}];n.codeType.selected={};n.exportFilteredList=[];n.exportList=[];n.exportType={};n.exportType.selected={};n.showButtonWithoutFilter=!1;n.ApplicationType={};n.RegionAndUnitList=[];n.showRegionAndUnitList=!1;n.results=[];n.regionAndUnitId={};n.regionAndUnitId.selected={};n.search={applicationTypeId:"",regionAndUnitId:"",IsNotTemporaryStored:!0};n.searchSecondmentForIntendancy={applicationTypeId:"",regionAndUnitId:""};n.showMessageForResults=!1;n.showMusicSchool=!1;n.useMK_AllowBodies=[631,632,633,3356];i.getByParams({role:n.authentication.role},"/api/General/getExportByRole").then(function(i){i.length>0?n.exportList=i:t.pop("warning","Αδυναμία εμφάνισης λίστας","Δεν βρέθηκαν δυνατές αναφορές προς εμφάνιση")},function(){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση της λίστας των δυνατών αναφορών")});n.filterRow={visible:!0,applyFilter:"auto"};n.headerFilter={visible:!0};n.showColumnLines=!0;n.showRowLines=!0;n.showBorders=!0;n.rowAlternationEnabled=!0;n.disableClassificationButton=!1;n.keepOnlyValidChars=function(n){return n.forEach(n=>{for(let t in n)typeof n[t]=="string"&&(n[t]=n[t].replace(/ +/g," "),n[t]=n[t].replace(/[^\n\d\s\w\u0370-\u03FF~!@#$%^&*()_\-+={[}\]\\|;:'",.\/?]/g,""))}),n};n.gridOptions={bindingOptions:{dataSource:"results",filterRow:"filterRow",headerFilter:"headerFilter",showColumnLines:"showColumnLines",showRowLines:"showRowLines",showBorders:"showBorders",rowAlternationEnabled:"rowAlternationEnabled",columns:"columns"},allowColumnReordering:!0,allowColumnResizing:!0,columnAutoWidth:!0,columnFixing:{enabled:!0},searchPanel:{visible:!0,width:240,placeholder:"Αναζήτηση..."},selection:{mode:"multiple"},columnChooser:{enabled:!0},"export":{enabled:!0,fileName:"Results",allowExportSelectedData:!0},groupPanel:{visible:!0},paging:{pageSize:10},pager:{showPageSizeSelector:!0,allowedPageSizes:[10,20,50,100],showInfo:!0}};i.getByParams({type:"secondment"},"/api/ApplicationType/getApplicationByType").then(function(t){if(n.ApplicationType=t,i.isValueInArray(i.getRoleCode(n.authentication.role)," d1, m1"))for(var r=n.ApplicationType.length-1;r>=0;r--)(n.ApplicationType[r].Id==17||n.ApplicationType[r].Id==10||n.ApplicationType[r].Id==11)&&n.ApplicationType.splice(r,1)},function(){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των τύπων αίτησης")});i.isValueInArray(i.getRoleCode(n.authentication.role),"a, m1, m2, mk")?i.getByParams({userRole:n.authentication.role,levelId:n.authentication.levelId,regionAndUnitId:n.authentication.regionAndUnitId},"/api/RegionAndUnit/getMunicipalitiesAndIntendanciesByParams").then(function(t){n.RegionAndUnitList=t;n.showRegionAndUnitList=!0},function(){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των διευθύνσεων")}):(n.showRegionAndUnitList=!1,n.search.regionAndUnitId=n.authentication.regionAndUnitId);n.checkFields=function(){return i.isValueInArray(i.getRoleCode(n.authentication.role)," d1, d2, p")&&!i.isEmptyValue(n.search.applicationTypeId)?!0:(i.getRoleCode(n.authentication.role),!1)||i.isEmptyValue(n.search.applicationTypeId)||i.isEmptyValue(n.regionAndUnitId.selected)?!1:!0};n.checkFieldsSecondmentForIntendancy=function(){return i.isValueInArray(i.getRoleCode(n.authentication.role)," d1, d2, p")?!0:(i.getRoleCode(n.authentication.role)," m1, m2, a")&&!i.isEmptyValue(n.regionAndUnitId.selected)?!0:!1};n.checkFieldsForRecall=function(){if(!i.isEmptyValue(n.search.applicationTypeId))return!0};n.checkFieldsFoRevaluation=function(){if(!i.isEmptyValue(n.search.applicationTypeId))return!0};n.checkFieldsObjection=function(){if(!i.isEmptyValue(n.search.applicationTypeId))return!0};n.searchAction=function(){if(n.checkFields()){n.results=[];n.search.regionAndUnitId=i.isValueInArray(i.getRoleCode(n.authentication.role)," d1, d2, p")?n.authentication.regionAndUnitId:n.regionAndUnitId.selected.Id;switch(n.search.applicationTypeId){case 7:i.getByParams({regionAndUnitId:n.search.regionAndUnitId,IsNotTemporaryStored:n.search.IsNotTemporaryStored},"/api/Export/getBasicPyspdeChurchExport").then(function(t){n.columns=[{dataField:"ProtocolNumber",caption:"Αρ. πρωτοκόλλου"},{dataField:"RegistryNo",caption:"Αρ. μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"Speciality",caption:"Κλάδος"},{dataField:"OfficialPlacementUnitDescription",caption:"Οργανική θέση"},{dataField:"IsActive",caption:"Κατάσταση Αίτησης"},{dataField:"IsConfirmed",caption:"Επικυρωμένη"},{dataField:"IsBlocked",caption:"Ελεγμένη"},{dataField:"BlockDetails",caption:"Κώλυμα απόσπασης",width:150},{dataField:"IsChecked",caption:"Εγκεκριμένη"},{dataField:"IsSpecialCategory",caption:"Ειδική κατηγορία"},{dataField:"InPriority",caption:"Κατά Προτεραιότητα"},];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 8:i.getByParams({regionAndUnitId:n.search.regionAndUnitId,IsNotTemporaryStored:n.search.IsNotTemporaryStored},"/api/Export/getBasicBodyExport").then(function(t){var r=n.useMK_AllowBodies;if(n.columns=[{dataField:"ProtocolNumber",caption:"Αρ. πρωτοκόλλου"},{dataField:"RegistryNo",caption:"Αρ. μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"Speciality",caption:"Κλάδος"},{dataField:"OfficialPlacementUnitDescription",caption:"Οργανική θέση",width:200},{dataField:"IsActive",caption:"Κατάσταση Αίτησης"},{dataField:"IsConfirmed",caption:"Επικυρωμένη"},{dataField:"IsBlocked",caption:"Ελεγμένη"},{dataField:"BlockDetails",caption:"Κώλυμα απόσπασης",width:200},{dataField:"IsChecked",caption:"Εγκεκριμένη"},{dataField:"Body1",caption:"Φορέας",width:200},{dataField:"Body2",caption:"Επιλογή 1",width:200},{dataField:"Body3",caption:"Επιλογή 2",width:200},{dataField:"Details",caption:"Άλλος Φορέας",width:200}],i.isValueInArray(i.getRoleCode(n.authentication.role),"m1, m2, mk"))for(n.results=[],j=0;j<t.length;j++)i.isValueInArray(t[j].Body1Id,r)?i.isValueInArray(i.getRoleCode(n.authentication.role),"mk")&&n.results.push(t[j]):i.isValueInArray(i.getRoleCode(n.authentication.role),"m1, m2")&&n.results.push(t[j]);else n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 9:i.getByParams({regionAndUnitId:n.search.regionAndUnitId,IsNotTemporaryStored:n.search.IsNotTemporaryStored},"/api/Export/getBasicPyspdeSmeaExport").then(function(t){n.columns=[{dataField:"ProtocolNumber",caption:"Αρ. πρωτοκόλλου"},{dataField:"RegistryNo",caption:"Αρ. μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"Speciality",caption:"Κλάδος"},{dataField:"OfficialPlacementUnitDescription",caption:"Οργανική θέση"},{dataField:"IsActive",caption:"Κατάσταση Αίτησης"},{dataField:"IsConfirmed",caption:"Επικυρωμένη"},{dataField:"IsBlocked",caption:"Ελεγμένη"},{dataField:"BlockDetails",caption:"Κώλυμα απόσπασης"},{dataField:"IsChecked",caption:"Εγκεκριμένη"},{dataField:"IsSpecialCategory",caption:"Ειδική κατηγορία"},{dataField:"InPriority",caption:"Κατά Προτεραιότητα"},{dataField:"IsPyspde",caption:"ΠΥΣΠΕ / ΠΥΣΔΕ"},{dataField:"IsKeddy",caption:"ΚΕ.Δ.Α.Σ.Υ."},{dataField:"IsEEEEK",caption:"ΕΕΕΕΚ"},{dataField:"IsDeafBlind",caption:"Σχολεία Τυφλών/Κωφών"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 10:i.getByParams({regionAndUnitId:n.search.regionAndUnitId,IsNotTemporaryStored:n.search.IsNotTemporaryStored},"/api/Export/getBasicArtisticExport").then(function(t){n.columns=[{dataField:"ProtocolNumber",caption:"Αρ. πρωτοκόλλου"},{dataField:"RegistryNo",caption:"Αρ. μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"Speciality",caption:"Κλάδος"},{dataField:"OfficialPlacementUnitDescription",caption:"Οργανική θέση"},{dataField:"IsActive",caption:"Κατάσταση Αίτησης"},{dataField:"IsConfirmed",caption:"Επικυρωμένη"},{dataField:"IsBlocked",caption:"Ελεγμένη"},{dataField:"BlockDetails",caption:"Κώλυμα απόσπασης"},{dataField:"IsChecked",caption:"Εγκεκριμένη"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 11:i.getByParams({regionAndUnitId:n.search.regionAndUnitId,IsNotTemporaryStored:n.search.IsNotTemporaryStored},"/api/Export/getBasicMusicExport").then(function(t){n.columns=[{dataField:"ProtocolNumber",caption:"Αρ. πρωτοκόλλου"},{dataField:"RegistryNo",caption:"Αρ. μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"Speciality",caption:"Κλάδος"},{dataField:"OfficialPlacementUnitDescription",caption:"Οργανική θέση"},{dataField:"IsActive",caption:"Κατάσταση Αίτησης"},{dataField:"IsConfirmed",caption:"Επικυρωμένη"},{dataField:"IsBlocked",caption:"Ελεγμένη"},{dataField:"BlockDetails",caption:"Κώλυμα απόσπασης"},{dataField:"IsChecked",caption:"Εγκεκριμένη"},{dataField:"DideComments",caption:"Παρατηρήσεις ΔΔΕ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 12:i.getByParams({regionAndUnitId:n.search.regionAndUnitId,IsNotTemporaryStored:n.search.IsNotTemporaryStored},"/api/Export/getBasicBody1920Export").then(function(t){n.columns=[{dataField:"ProtocolNumber",caption:"Αρ. πρωτοκόλλου"},{dataField:"RegistryNo",caption:"Αρ. μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"Speciality",caption:"Κλάδος"},{dataField:"OfficialPlacementUnitDescription",caption:"Οργανική θέση",width:200},{dataField:"IsActive",caption:"Κατάσταση Αίτησης"},{dataField:"IsConfirmed",caption:"Επικυρωμένη"},{dataField:"IsBlocked",caption:"Ελεγμένη"},{dataField:"BlockDetails",caption:"Κώλυμα απόσπασης",width:200},{dataField:"IsChecked",caption:"Εγκεκριμένη"},{dataField:"Body1",caption:"Φορέας",width:200},{dataField:"Body2",caption:"Επιλογή 1",width:200}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 13:i.getByParams({regionAndUnitId:n.search.regionAndUnitId,IsNotTemporaryStored:n.search.IsNotTemporaryStored},"/api/Export/getBasicBodyRefExport").then(function(t){n.columns=[{dataField:"ProtocolNumber",caption:"Αρ. πρωτοκόλλου"},{dataField:"RegistryNo",caption:"Αρ. μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"Speciality",caption:"Κλάδος"},{dataField:"OfficialPlacementUnitDescription",caption:"Οργανική θέση",width:200},{dataField:"IsActive",caption:"Κατάσταση Αίτησης"},{dataField:"IsConfirmed",caption:"Επικυρωμένη"},{dataField:"IsBlocked",caption:"Ελεγμένη"},{dataField:"BlockDetails",caption:"Κώλυμα απόσπασης",width:200},{dataField:"IsChecked",caption:"Εγκεκριμένη"},{dataField:"Body1",caption:"Φορέας",width:200},{dataField:"Body2",caption:"Επιλογή 1",width:200},{dataField:"Body3",caption:"Επιλογή 2",width:200}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 17:i.getByParams({regionAndUnitId:n.search.regionAndUnitId,IsNotTemporaryStored:n.search.IsNotTemporaryStored},"/api/Export/getBasicChurchExport").then(function(t){n.columns=[{dataField:"ProtocolNumber",caption:"Αρ. πρωτοκόλλου"},{dataField:"RegistryNo",caption:"Αρ. μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"Speciality",caption:"Κλάδος"},{dataField:"OfficialPlacementUnitDescription",caption:"Οργανική θέση"},{dataField:"IsActive",caption:"Κατάσταση Αίτησης"},{dataField:"IsConfirmed",caption:"Επικυρωμένη"},{dataField:"IsBlocked",caption:"Ελεγμένη"},{dataField:"BlockDetails",caption:"Κώλυμα απόσπασης",width:150},{dataField:"IsChecked",caption:"Εγκεκριμένη"},{dataField:"IsSpecialCategory",caption:"Ειδική κατηγορία"},{dataField:"InPriority",caption:"Κατά Προτεραιότητα"},];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 18:i.getByParams({regionAndUnitId:n.search.regionAndUnitId,IsNotTemporaryStored:n.search.IsNotTemporaryStored},"/api/Export/getBasicBodySepExport").then(function(t){n.columns=[{dataField:"ProtocolNumber",caption:"Αρ. πρωτοκόλλου"},{dataField:"RegistryNo",caption:"Αρ. μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"Speciality",caption:"Κλάδος"},{dataField:"OfficialPlacementUnitDescription",caption:"Οργανική θέση",width:200},{dataField:"IsActive",caption:"Κατάσταση Αίτησης"},{dataField:"IsConfirmed",caption:"Επικυρωμένη"},{dataField:"IsBlocked",caption:"Ελεγμένη"},{dataField:"BlockDetails",caption:"Κώλυμα απόσπασης",width:200},{dataField:"IsChecked",caption:"Εγκεκριμένη"},{dataField:"Body1",caption:"Φορέας",width:200},{dataField:"Body2",caption:"Επιλογή 1",width:200}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 20:i.getByParams({regionAndUnitId:n.search.regionAndUnitId,IsNotTemporaryStored:n.search.IsNotTemporaryStored},"/api/Export/getBasicKesyExport").then(function(t){n.columns=[{dataField:"ProtocolNumber",caption:"Αρ. πρωτοκόλλου"},{dataField:"RegistryNo",caption:"Αρ. μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"Speciality",caption:"Κλάδος"},{dataField:"OfficialPlacementUnitDescription",caption:"Οργανική θέση"},{dataField:"IsActive",caption:"Κατάσταση Αίτησης"},{dataField:"IsConfirmed",caption:"Επικυρωμένη"},{dataField:"IsBlocked",caption:"Ελεγμένη"},{dataField:"BlockDetails",caption:"Κώλυμα απόσπασης"},{dataField:"IsChecked",caption:"Εγκεκριμένη"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 22:i.getByParams({regionAndUnitId:n.search.regionAndUnitId,IsNotTemporaryStored:n.search.IsNotTemporaryStored},"/api/Export/getBasicBodyTechnicalExport").then(function(t){n.columns=[{dataField:"ProtocolNumber",caption:"Αρ. πρωτοκόλλου"},{dataField:"RegistryNo",caption:"Αρ. μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"Speciality",caption:"Κλάδος"},{dataField:"OfficialPlacementUnitDescription",caption:"Οργανική θέση",width:200},{dataField:"IsActive",caption:"Κατάσταση Αίτησης"},{dataField:"IsConfirmed",caption:"Επικυρωμένη"},{dataField:"IsBlocked",caption:"Ελεγμένη"},{dataField:"BlockDetails",caption:"Κώλυμα απόσπασης",width:200},{dataField:"IsChecked",caption:"Εγκεκριμένη"},{dataField:"Body1",caption:"Φορέας",width:200},{dataField:"Body2",caption:"Επιλογή 1",width:200}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 42:i.getByParams({regionAndUnitId:n.search.regionAndUnitId,IsNotTemporaryStored:n.search.IsNotTemporaryStored},"/api/Export/getBasicEEPEBPExport").then(function(t){n.columns=[{dataField:"ProtocolNumber",caption:"Αρ. πρωτοκόλλου"},{dataField:"RegistryNo",caption:"Αρ. μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"Speciality",caption:"Κλάδος"},{dataField:"OfficialPlacementUnitDescription",caption:"Οργανική θέση"},{dataField:"IsActive",caption:"Κατάσταση Αίτησης"},{dataField:"IsConfirmed",caption:"Επικυρωμένη"},{dataField:"IsBlocked",caption:"Ελεγμένη"},{dataField:"BlockDetails",caption:"Κώλυμα απόσπασης"},{dataField:"IsChecked",caption:"Εγκεκριμένη"},{dataField:"IsSpecialCategory",caption:"Ειδική κατηγορία"},{dataField:"InPriority",caption:"Κατά Προτεραιότητα"},{dataField:"IsPyspde",caption:"ΠΥΣΠΕ / ΠΥΣΔΕ"},{dataField:"IsKeddy",caption:"ΚΕ.Δ.Α.Σ.Υ."},{dataField:"IsEEEEK",caption:"Σ.Δ.Ε.Υ."},{dataField:"IsDeafBlind",caption:"Σχολεία Τυφλών/Κωφών"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;default:t.pop("warning"," Αδύνατη αναζήτηση","Πρέπει να συμπληρώσετε όλα τα υποχρεωτικά πεδία για την αναζήτηση")}}else t.pop("warning"," Αδύνατη αναζήτηση","Πρέπει να συμπληρώσετε όλα τα υποχρεωτικά πεδία για την αναζήτηση")};n.clearFields=function(){n.search={applicationTypeId:"",regionAndUnitId:"",IsNotTemporaryStored:!0};n.searchSecondmentForIntendancy={applicationTypeId:"",regionAndUnitId:""};n.regionAndUnitId.selected={};n.results=[]};n.changeCodeType=function(){n.exportType.selected={};n.codeTypeFilter=!0;n.exportFilteredList=u("filter")(n.exportList,{CodeType:n.codeType.selected},!0);n.exportFilteredList=n.codeType.selected.Id==1?u("filter")(n.exportList,function(n){return n.CodeType=="isPermament"}):n.codeType.selected.Id==2?u("filter")(n.exportList,function(n){return n.CodeType=="isNonPermament"}):u("filter")(n.exportList,function(n){return n.CodeType=="other"})};n.changeExportType=function(){n.showButtonWithoutFilter=n.exportType.selected.HasFilter==!1?!0:!1;n.clearFields();n.checkApplicationTypeId=function(n){return n.Id&&[7,9,17,42].indexOf(n.Id)!==-1}};n.getPrefectureClassification=function(){i.isEmptyValue(n.prefecture)?(t.pop("warning"," Αδύνατη αναζήτηση","Πρέπει να συμπληρώσετε όλα τα υποχρεωτικά πεδία για την αναζήτηση"),n.disableClassificationButton=!1):(n.results=[],n.disableClassificationButton=!0,i.getByParams({type:n.prefecture},"/api/Export/getPrefectureClassification").then(function(t){n.columns=[{dataField:"TaxNumber",caption:"Α.Φ.Μ."},{dataField:"RegistryNo",caption:"Αρ. μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"RegionAndUnitDescription",caption:"Περιφέρεια",width:200},{dataField:"ScientificPoints",caption:"Σύνολο μονάδων Επιστημονικής Συγκρότησης"},{dataField:"DidacticPoints",caption:"Σύνολο μονάδων Διδακτικής Εμπειρίας"},{dataField:"AdministrationPoints",caption:"Σύνολο μονάδων Διοικητικής Εμπειρίας"},{dataField:"InterviewPoints",caption:"Σύνολο μονάδων προσωπικότητας - γενικής συγκρότησης"},{dataField:"TotalPoints",caption:"Σύνολο μονάδων"},{dataField:"GeneralOrder",caption:"Σειρά κατάταξης ανά περιφέρεια"},{dataField:"DidacticSchoolYearsForPoints",caption:"Έτη Διδακτικής Υπηρεσίας σε Σχολικές Μονάδες, Ε.Κ., Σ.Δ.Ε. και Δ.Ι.Ε.Κ. ή ως υπεύθυνοι σε ΓΡΑ.ΣΕ.Π. και ΓΡΑ.Σ.Υ. (πέρα των 10)",width:120},{dataField:"DidacticSchoolMonthsForPoints",caption:"Μήνες Διδακτικής Υπηρεσίας σε Σχολικές Μονάδες, Ε.Κ., Σ.Δ.Ε. και Δ.Ι.Ε.Κ. ή ως υπεύθυνοι σε ΓΡΑ.ΣΕ.Π. και ΓΡΑ.Σ.Υ. (πέρα των 10)",width:120},{dataField:"DidacticSchoolPoints",caption:"Σύνολο μονάδων Διδακτικής Υπηρεσίας σε Σχολικές Μονάδες, Ε.Κ., Σ.Δ.Ε. και Δ.Ι.Ε.Κ. ή ως υπεύθυνοι σε ΓΡΑ.ΣΕ.Π. και ΓΡΑ.Σ.Υ. (πέρα των 10)",width:120},{dataField:"DidacticOtherYearsForPoints",caption:"Έτη Λοιπής Διδακτικής Υπηρεσίας (πέρα των 10)",width:120},{dataField:"DidacticOtherMonthsForPoints",caption:"Μήνες Λοιπής Διδακτικής Υπηρεσίας (πέρα των 10)",width:120},{dataField:"DidacticOtherPoints",caption:"Σύνολο μονάδων Λοιπής Διδακτικής Υπηρεσίας (πέρα των 10)",width:120},{dataField:"DoctoralEducation",caption:"Διδακτορικό Δίπλωμα"},{dataField:"DoctoralEducationPoints",caption:"Σύνολο μονάδων Διδακτορικού Διπλώματος"},{dataField:"PostgraduateEducation",caption:"Μεταπτυχιακός Τίτλος Σπουδών"},{dataField:"PostgraduateEducationPoints",caption:"Σύνολο μονάδων Μεταπτυχιακού Τίτλου Σπουδών"},{dataField:"SecondPostgraduateEducation",caption:"Δεύτερος Μεταπτυχιακός Τίτλος Σπουδών"},{dataField:"SecondPostgraduateEducationPoints",caption:"Σύνολο μονάδων Δεύτερου Μεταπτυχιακού Τίτλου Σπουδών"},{dataField:"TeachingEducationCourse",caption:"Τίτλος Διδασκαλείου Εκπαίδευσης"},{dataField:"TeachingEducationCoursePoints",caption:"Σύνολο μονάδων Τίτλου Διδασκαλείου Εκπαίδευσης"},{dataField:"SecondSpeciality",caption:"Δεύτερο Πτυχίο Α.Ε.Ι"},{dataField:"SecondSpecialityPoints",caption:"Σύνολο μονάδων Δεύτερου Πτυχίου Α.Ε.Ι"},{dataField:"SecondScientificPoints",caption:"Σύνολο μονάδων σωρευτικής κατοχής τίτλων σπουδών των υποπεριπτώσεων ββ' έως εε'"},{dataField:"StudiesPoints",caption:"Σύνολο μονάδων Τίτλων σπουδών"},{dataField:"CertificateTCCLevelB",caption:"Γνώση Τ.Π.Ε. Β΄ Επιπέδου"},{dataField:"CertificateTCCLevelBPoints",caption:"Σύνολο μονάδων Γνώσης Τ.Π.Ε. Β΄ Επιπέδου"},{dataField:"FirstLanguageLevel",caption:"Επίπεδο 1ης Ξένης Γλώσσας"},{dataField:"FirstLanguagePoints",caption:"Σύνολο μονάδων 1ης Ξένης Γλώσσας"},{dataField:"SecondLanguageLevel",caption:"Επίπεδο 2ης Ξένης Γλώσσας"},{dataField:"SecondLanguagePoints",caption:"Σύνολο μονάδων 2ης Ξένης Γλώσσας"},{dataField:"CertificateOtherYearlyTraining",caption:"Βεβαίωση ή Πιστοποιητικό Ετήσιας Επιμόρφωσης Σ.Ε.Λ.Μ.Ε., Σ.Ε.Λ.Δ.Ε, Α.Σ.ΠΑΙ.Τ.Ε., Σ.Ε.Λ.Ε.Τ.Ε",width:120},{dataField:"CertificateOtherYearlyTrainingPoints",caption:"Σύνολο μονάδων Βεβαίωσης ή Πιστοποιητικού Ετήσιας Επιμόρφωσης Σ.Ε.Λ.Μ.Ε., Σ.Ε.Λ.Δ.Ε, Α.Σ.ΠΑΙ.Τ.Ε., Σ.Ε.Λ.Ε.Τ.Ε",width:120},{dataField:"CertificateUniversityYearlyTraining",caption:"Βεβαίωση ή Πιστοποιητικό Ετήσιας Επιμόρφωσης Α.Ε.Ι.",width:120},{dataField:"CertificateUniversityYearlyTrainingPoints",caption:"Σύνολο μονάδων Βεβαίωσης ή Πιστοποιητικού Ετήσιας Επιμόρφωσης Α.Ε.Ι.",width:120},{dataField:"CertificateMineduTrainingPrograms",caption:"Βεβαίωση παρακολούθησης Πιστοποιημένων επιμορφωτικών προγραμμάτων του Υπ.Π.Ε.Θ., του Ι.Ε.Π., του Π.Ι. ή του Ε.Κ.Δ.Δ.Α. (Ώρες)",width:120},{dataField:"CertificateMineduTrainingProgramsPoints",caption:"Σύνολο μονάδων Βεβαίωσης παρακολούθησης Πιστοποιημένων επιμορφωτικών προγραμμάτων του Υπ.Π.Ε.Θ., του Ι.Ε.Π., του Π.Ι. ή του Ε.Κ.Δ.Δ.Α. (Ώρες)",width:120},{dataField:"CertificatePoints",caption:"Σύνολο μονάδων Επιμόρφωσης"},{dataField:"SelfTaughtTeaching",caption:"Αυτοδύναμο Διδακτικό έργο σε Α.Ε.Ι. ή ΣΕ.Λ.Ε.Τ.Ε. (Εξάμηνα)",width:120},{dataField:"SelfTaughtTeachingPoints",caption:"Σύνολο μονάδων Αυτοδύναμου Διδακτικού έργου σε Α.Ε.Ι. ή ΣΕ.Λ.Ε.Τ.Ε. (Εξάμηνα)",width:120},{dataField:"MineduTrainer",caption:"Συμμετοχή ως επιμορφωτης σε επιμορφωτικά προγράμματα του Υπ.Π.Ε.Θ., του Ι.Ε.Π. ή του Π.Ι. (Ώρες)",width:120},{dataField:"MineduTrainerPoints",caption:"Σύνολο μονάδων Συμμετοχής ως επιμορφωτής σε επιμορφωτικά προγράμματα του Υπ.Π.Ε.Θ., του Ι.Ε.Π. ή του Π.Ι. (Ώρες)",width:120},{dataField:"TeachingTrainingPoints",caption:"Σύνολο μονάδων Διδακτικού - Επιμορφωτικού Έργου",width:120},{dataField:"ResearchPrograms",caption:"Συμμετοχή σε ερευνητικά προγράμματα την ευθύνη υλοποίησης των οποίων έχουν Ν.Π.Δ.Δ. (Εξάμηνα)",width:120},{dataField:"ResearchProgramsPoints",caption:"Σύνολο μονάδων Συμμετοχής σε ερευνητικά προγράμματα την ευθύνη υλοποίησης των οποίων έχουν Ν.Π.Δ.Δ. (Εξάμηνα)",width:120},{dataField:"PersonalWritingBooksISBN",caption:"Συγγραφή σχολικών εγχειριδίων ή βιβλίων που έχουν εκδοθεί με ΙSBΝ (Αριθμός ατομικών συγγραφών)",width:120},{dataField:"PersonalWritingBooksISBNPoints",caption:"Σύνολο μονάδων Συγγραφής σχολικών εγχειριδίων ή βιβλίων που έχουν εκδοθεί με ΙSBΝ (Αριθμός ατομικών συγγραφών)",width:120},{dataField:"GroupWritingBooksISBN",caption:"Συγγραφή σχολικών εγχειριδίων ή βιβλίων που έχουν εκδοθεί με ΙSBΝ  (Αριθμός ομαδικών συγγραφών)",width:120},{dataField:"GroupWritingBooksISBNPoints",caption:"Σύνολο μονάδων Συγγραφής σχολικών εγχειριδίων ή βιβλίων που έχουν εκδοθεί με ΙSBΝ  (Αριθμός ομαδικών συγγραφών)",width:120},{dataField:"WritingBooksPoints",caption:"Σύνολο μονάδων Συγγραφής σχολικών εγχειριδίων ή βιβλίων που έχουν εκδοθεί με ΙSBΝ ",width:120},{dataField:"PersonalScientificPublication",caption:"Δημοσίευση άρθρων σε επιστημονικά περιοδικά (Αριθμός ατομικών συγγραφών)",width:120},{dataField:"PersonalScientificPublicationPoints",caption:"Σύνολο μονάδων Δημοσίευσης άρθρων σε επιστημονικά περιοδικά (Αριθμός ατομικών συγγραφών)",width:120},{dataField:"GroupScientificPublication",caption:"Δημοσίευση άρθρων σε επιστημονικά περιοδικά (Αριθμός ομαδικών συγγραφών)",width:120},{dataField:"GroupScientificPublicationPoints",caption:"Σύνολο μονάδων Δημοσίευσης άρθρων σε επιστημονικά περιοδικά (Αριθμός ομαδικών συγγραφών)",width:120},{dataField:"ScientificPublicationPoints",caption:"Σύνολο μονάδων Δημοσίευσης άρθρων σε επιστημονικά περιοδικά",width:120},{dataField:"PersonalMineduContributions",caption:"Εισηγήσεις σε πρακτικά συνεδρίων που οργανώνονται από το Υπ.Π.Ε.Θ., Α.Ε.Ι. ή άλλους εποπτευόμενους από το Υπ.Π.Ε.Θ. φορείς ή επιστημονικούς φορείς ή επιστημονικά περιοδικά με κριτές (Αριθμός ατομικών συγγραφών)",width:120},{dataField:"PersonalMineduContributionsPoints",caption:"Σύνολο μονάδων Εισηγήσεων σε πρακτικά συνεδρίων που οργανώνονται από το Υπ.Π.Ε.Θ., Α.Ε.Ι. ή άλλους εποπτευόμενους από το Υπ.Π.Ε.Θ. φορείς ή επιστημονικούς φορείς ή επιστημονικά περιοδικά με κριτές (Αριθμός ατομικών συγγραφών)",width:120},{dataField:"GroupMineduContributions",caption:"Εισηγήσεις σε πρακτικά συνεδρίων που οργανώνονται από το Υπ.Π.Ε.Θ., Α.Ε.Ι. ή άλλους εποπτευόμενους από το Υπ.Π.Ε.Θ. φορείς ή επιστημονικούς φορείς ή επιστημονικά περιοδικά με κριτές (Αριθμός ομαδικών συγγραφών)",width:120},{dataField:"GroupMineduContributionsPoints",caption:"Σύνολο μονάδων Εισηγήσεις σε πρακτικά συνεδρίων που οργανώνονται από το Υπ.Π.Ε.Θ., Α.Ε.Ι. ή άλλους εποπτευόμενους από το Υπ.Π.Ε.Θ. φορείς ή επιστημονικούς φορείς ή επιστημονικά περιοδικά με κριτές (Αριθμός ομαδικών συγγραφών)",width:120},{dataField:"MineduContributionsPoints",caption:"Σύνολο μονάδων Εισηγήσεις σε πρακτικά συνεδρίων που οργανώνονται από το Υπ.Π.Ε.Θ., Α.Ε.Ι. ή άλλους εποπτευόμενους από το Υπ.Π.Ε.Θ. φορείς ή επιστημονικούς φορείς ή επιστημονικά περιοδικά με κριτές",width:120},{dataField:"StudyProgramsParticipation",caption:"Συμμετοχή σε ομάδα σύνταξης Αναλυτικού Προγράμματος Σπουδών - Διαθεματικού Ενιαίου Πλαισίου Προγραμμάτων Σπουδών ή αναμόρφωσης - εξορθολογισμού Προγραμμάτων Σπουδών και διδακτικής ύλης του Ι.Ε.Π. ή του Π.Ι.",width:120},{dataField:"StudyProgramsParticipationPoints",caption:"Σύνολο μονάδων Συμμετοχής σε ομάδα σύνταξης Αναλυτικού Προγράμματος Σπουδών - Διαθεματικού Ενιαίου Πλαισίου Προγραμμάτων Σπουδών ή αναμόρφωσης - εξορθολογισμού Προγραμμάτων Σπουδών και διδακτικής ύλης του Ι.Ε.Π. ή του Π.Ι.",width:120},{dataField:"WritingPoints",caption:"Σύνολο μονάδων συγγραφικού έργου και εισηγήσεων σε συνέδρια",width:120},{dataField:"CategoryPoints1",caption:"Σύνολο μονάδων Διοικητικής εμπειρίας (Κατηγορία 1)",width:120},{dataField:"CategoryPoints2",caption:"Σύνολο μονάδων Διοικητικής εμπειρίας (Κατηγορία 2)",width:120},{dataField:"CategoryPoints3",caption:"Σύνολο μονάδων Διοικητικής εμπειρίας (Κατηγορία 3)",width:120},{dataField:"CategoryPoints4",caption:"Σύνολο μονάδων Διοικητικής εμπειρίας (Κατηγορία 4)",width:120},{dataField:"CreationDate",caption:"Ημ/νια εκτέλεσης αλγορίθμου",dataType:"date",format:"dd/MM/yyyy hh:mm:ss"}];n.results=t;n.disableClassificationButton=!1},function(i){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+i.error_description);n.disableClassificationButton=!1}))};n.getIntendancyClassification=function(){i.isEmptyValue(n.intendancy)?(t.pop("warning"," Αδύνατη αναζήτηση","Πρέπει να συμπληρώσετε όλα τα υποχρεωτικά πεδία για την αναζήτηση"),n.disableClassificationButton=!1):(n.results=[],n.disableClassificationButton=!0,i.getByParams({type:n.intendancy,level:n.authentication.levelId},"/api/Export/getIntendancyClassification").then(function(t){n.columns=[{dataField:"TaxNumber",caption:"Α.Φ.Μ."},{dataField:"RegistryNo",caption:"Αρ. μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"RegionAndUnitDescription",caption:"Περιφέρεια",width:200},{dataField:"Region1",caption:"1η Επιλογή",width:200},{dataField:"Region2",caption:"2η Επιλογή",width:200},{dataField:"ScientificPoints",caption:"Σύνολο μονάδων Επιστημονικής Συγκρότησης"},{dataField:"DidacticPoints",caption:"Σύνολο μονάδων Διδακτικής Εμπειρίας"},{dataField:"AdministrationPoints",caption:"Σύνολο μονάδων Διοικητικής Εμπειρίας"},{dataField:"InterviewPoints",caption:"Σύνολο μονάδων προσωπικότητας - γενικής συγκρότησης"},{dataField:"TotalPoints",caption:"Σύνολο μονάδων"},{dataField:"GeneralOrder",caption:"Σειρά κατάταξης ανά περιφέρεια"},{dataField:"DidacticSchoolYearsForPoints",caption:"Έτη Διδακτικής Υπηρεσίας σε Σχολικές Μονάδες, Ε.Κ., Σ.Δ.Ε. και Δ.Ι.Ε.Κ. ή ως υπεύθυνοι σε ΓΡΑ.ΣΕ.Π. και ΓΡΑ.Σ.Υ. (πέρα των 10)",width:120},{dataField:"DidacticSchoolMonthsForPoints",caption:"Μήνες Διδακτικής Υπηρεσίας σε Σχολικές Μονάδες, Ε.Κ., Σ.Δ.Ε. και Δ.Ι.Ε.Κ. ή ως υπεύθυνοι σε ΓΡΑ.ΣΕ.Π. και ΓΡΑ.Σ.Υ. (πέρα των 10)",width:120},{dataField:"DidacticSchoolPoints",caption:"Σύνολο μονάδων Διδακτικής Υπηρεσίας σε Σχολικές Μονάδες, Ε.Κ., Σ.Δ.Ε. και Δ.Ι.Ε.Κ. ή ως υπεύθυνοι σε ΓΡΑ.ΣΕ.Π. και ΓΡΑ.Σ.Υ. (πέρα των 10)",width:120},{dataField:"DidacticOtherYearsForPoints",caption:"Έτη Λοιπής Διδακτικής Υπηρεσίας (πέρα των 10)",width:120},{dataField:"DidacticOtherMonthsForPoints",caption:"Μήνες Λοιπής Διδακτικής Υπηρεσίας (πέρα των 10)",width:120},{dataField:"DidacticOtherPoints",caption:"Σύνολο μονάδων Λοιπής Διδακτικής Υπηρεσίας (πέρα των 10)",width:120},{dataField:"DoctoralEducation",caption:"Διδακτορικό Δίπλωμα"},{dataField:"DoctoralEducationPoints",caption:"Σύνολο μονάδων Διδακτορικού Διπλώματος"},{dataField:"PostgraduateEducation",caption:"Μεταπτυχιακός Τίτλος Σπουδών"},{dataField:"PostgraduateEducationPoints",caption:"Σύνολο μονάδων Μεταπτυχιακού Τίτλου Σπουδών"},{dataField:"SecondPostgraduateEducation",caption:"Δεύτερος Μεταπτυχιακός Τίτλος Σπουδών"},{dataField:"SecondPostgraduateEducationPoints",caption:"Σύνολο μονάδων Δεύτερου Μεταπτυχιακού Τίτλου Σπουδών"},{dataField:"TeachingEducationCourse",caption:"Τίτλος Διδασκαλείου Εκπαίδευσης"},{dataField:"TeachingEducationCoursePoints",caption:"Σύνολο μονάδων Τίτλου Διδασκαλείου Εκπαίδευσης"},{dataField:"SecondSpeciality",caption:"Δεύτερο Πτυχίο Α.Ε.Ι"},{dataField:"SecondSpecialityPoints",caption:"Σύνολο μονάδων Δεύτερου Πτυχίου Α.Ε.Ι"},{dataField:"SecondScientificPoints",caption:"Σύνολο μονάδων σωρευτικής κατοχής τίτλων σπουδών των υποπεριπτώσεων ββ' έως εε'"},{dataField:"StudiesPoints",caption:"Σύνολο μονάδων Τίτλων σπουδών"},{dataField:"CertificateTCCLevelB",caption:"Γνώση Τ.Π.Ε. Β΄ Επιπέδου"},{dataField:"CertificateTCCLevelBPoints",caption:"Σύνολο μονάδων Γνώσης Τ.Π.Ε. Β΄ Επιπέδου"},{dataField:"FirstLanguageLevel",caption:"Επίπεδο 1ης Ξένης Γλώσσας"},{dataField:"FirstLanguagePoints",caption:"Σύνολο μονάδων 1ης Ξένης Γλώσσας"},{dataField:"SecondLanguageLevel",caption:"Επίπεδο 2ης Ξένης Γλώσσας"},{dataField:"SecondLanguagePoints",caption:"Σύνολο μονάδων 2ης Ξένης Γλώσσας"},{dataField:"CertificateOtherYearlyTraining",caption:"Βεβαίωση ή Πιστοποιητικό Ετήσιας Επιμόρφωσης Σ.Ε.Λ.Μ.Ε., Σ.Ε.Λ.Δ.Ε, Α.Σ.ΠΑΙ.Τ.Ε., Σ.Ε.Λ.Ε.Τ.Ε",width:120},{dataField:"CertificateOtherYearlyTrainingPoints",caption:"Σύνολο μονάδων Βεβαίωσης ή Πιστοποιητικού Ετήσιας Επιμόρφωσης Σ.Ε.Λ.Μ.Ε., Σ.Ε.Λ.Δ.Ε, Α.Σ.ΠΑΙ.Τ.Ε., Σ.Ε.Λ.Ε.Τ.Ε",width:120},{dataField:"CertificateUniversityYearlyTraining",caption:"Βεβαίωση ή Πιστοποιητικό Ετήσιας Επιμόρφωσης Α.Ε.Ι.",width:120},{dataField:"CertificateUniversityYearlyTrainingPoints",caption:"Σύνολο μονάδων Βεβαίωσης ή Πιστοποιητικού Ετήσιας Επιμόρφωσης Α.Ε.Ι.",width:120},{dataField:"CertificateMineduTrainingPrograms",caption:"Βεβαίωση παρακολούθησης Πιστοποιημένων επιμορφωτικών προγραμμάτων του Υπ.Π.Ε.Θ., του Ι.Ε.Π., του Π.Ι. ή του Ε.Κ.Δ.Δ.Α. (Ώρες)",width:120},{dataField:"CertificateMineduTrainingProgramsPoints",caption:"Σύνολο μονάδων Βεβαίωσης παρακολούθησης Πιστοποιημένων επιμορφωτικών προγραμμάτων του Υπ.Π.Ε.Θ., του Ι.Ε.Π., του Π.Ι. ή του Ε.Κ.Δ.Δ.Α. (Ώρες)",width:120},{dataField:"CertificatePoints",caption:"Σύνολο μονάδων Επιμόρφωσης"},{dataField:"SelfTaughtTeaching",caption:"Αυτοδύναμο Διδακτικό έργο σε Α.Ε.Ι. ή ΣΕ.Λ.Ε.Τ.Ε. (Εξάμηνα)",width:120},{dataField:"SelfTaughtTeachingPoints",caption:"Σύνολο μονάδων Αυτοδύναμου Διδακτικού έργου σε Α.Ε.Ι. ή ΣΕ.Λ.Ε.Τ.Ε. (Εξάμηνα)",width:120},{dataField:"MineduTrainer",caption:"Συμμετοχή ως επιμορφωτης σε επιμορφωτικά προγράμματα του Υπ.Π.Ε.Θ., του Ι.Ε.Π. ή του Π.Ι. (Ώρες)",width:120},{dataField:"MineduTrainerPoints",caption:"Σύνολο μονάδων Συμμετοχής ως επιμορφωτής σε επιμορφωτικά προγράμματα του Υπ.Π.Ε.Θ., του Ι.Ε.Π. ή του Π.Ι. (Ώρες)",width:120},{dataField:"TeachingTrainingPoints",caption:"Σύνολο μονάδων Διδακτικού - Επιμορφωτικού Έργου",width:120},{dataField:"ResearchPrograms",caption:"Συμμετοχή σε ερευνητικά προγράμματα την ευθύνη υλοποίησης των οποίων έχουν Ν.Π.Δ.Δ. (Εξάμηνα)",width:120},{dataField:"ResearchProgramsPoints",caption:"Σύνολο μονάδων Συμμετοχής σε ερευνητικά προγράμματα την ευθύνη υλοποίησης των οποίων έχουν Ν.Π.Δ.Δ. (Εξάμηνα)",width:120},{dataField:"PersonalWritingBooksISBN",caption:"Συγγραφή σχολικών εγχειριδίων ή βιβλίων που έχουν εκδοθεί με ΙSBΝ (Αριθμός ατομικών συγγραφών)",width:120},{dataField:"PersonalWritingBooksISBNPoints",caption:"Σύνολο μονάδων Συγγραφής σχολικών εγχειριδίων ή βιβλίων που έχουν εκδοθεί με ΙSBΝ (Αριθμός ατομικών συγγραφών)",width:120},{dataField:"GroupWritingBooksISBN",caption:"Συγγραφή σχολικών εγχειριδίων ή βιβλίων που έχουν εκδοθεί με ΙSBΝ  (Αριθμός ομαδικών συγγραφών)",width:120},{dataField:"GroupWritingBooksISBNPoints",caption:"Σύνολο μονάδων Συγγραφής σχολικών εγχειριδίων ή βιβλίων που έχουν εκδοθεί με ΙSBΝ  (Αριθμός ομαδικών συγγραφών)",width:120},{dataField:"WritingBooksPoints",caption:"Σύνολο μονάδων Συγγραφής σχολικών εγχειριδίων ή βιβλίων που έχουν εκδοθεί με ΙSBΝ ",width:120},{dataField:"PersonalScientificPublication",caption:"Δημοσίευση άρθρων σε επιστημονικά περιοδικά (Αριθμός ατομικών συγγραφών)",width:120},{dataField:"PersonalScientificPublicationPoints",caption:"Σύνολο μονάδων Δημοσίευσης άρθρων σε επιστημονικά περιοδικά (Αριθμός ατομικών συγγραφών)",width:120},{dataField:"GroupScientificPublication",caption:"Δημοσίευση άρθρων σε επιστημονικά περιοδικά (Αριθμός ομαδικών συγγραφών)",width:120},{dataField:"GroupScientificPublicationPoints",caption:"Σύνολο μονάδων Δημοσίευσης άρθρων σε επιστημονικά περιοδικά (Αριθμός ομαδικών συγγραφών)",width:120},{dataField:"ScientificPublicationPoints",caption:"Σύνολο μονάδων Δημοσίευσης άρθρων σε επιστημονικά περιοδικά",width:120},{dataField:"PersonalMineduContributions",caption:"Εισηγήσεις σε πρακτικά συνεδρίων που οργανώνονται από το Υπ.Π.Ε.Θ., Α.Ε.Ι. ή άλλους εποπτευόμενους από το Υπ.Π.Ε.Θ. φορείς ή επιστημονικούς φορείς ή επιστημονικά περιοδικά με κριτές (Αριθμός ατομικών συγγραφών)",width:120},{dataField:"PersonalMineduContributionsPoints",caption:"Σύνολο μονάδων Εισηγήσεων σε πρακτικά συνεδρίων που οργανώνονται από το Υπ.Π.Ε.Θ., Α.Ε.Ι. ή άλλους εποπτευόμενους από το Υπ.Π.Ε.Θ. φορείς ή επιστημονικούς φορείς ή επιστημονικά περιοδικά με κριτές (Αριθμός ατομικών συγγραφών)",width:120},{dataField:"GroupMineduContributions",caption:"Εισηγήσεις σε πρακτικά συνεδρίων που οργανώνονται από το Υπ.Π.Ε.Θ., Α.Ε.Ι. ή άλλους εποπτευόμενους από το Υπ.Π.Ε.Θ. φορείς ή επιστημονικούς φορείς ή επιστημονικά περιοδικά με κριτές (Αριθμός ομαδικών συγγραφών)",width:120},{dataField:"GroupMineduContributionsPoints",caption:"Σύνολο μονάδων Εισηγήσεις σε πρακτικά συνεδρίων που οργανώνονται από το Υπ.Π.Ε.Θ., Α.Ε.Ι. ή άλλους εποπτευόμενους από το Υπ.Π.Ε.Θ. φορείς ή επιστημονικούς φορείς ή επιστημονικά περιοδικά με κριτές (Αριθμός ομαδικών συγγραφών)",width:120},{dataField:"MineduContributionsPoints",caption:"Σύνολο μονάδων Εισηγήσεις σε πρακτικά συνεδρίων που οργανώνονται από το Υπ.Π.Ε.Θ., Α.Ε.Ι. ή άλλους εποπτευόμενους από το Υπ.Π.Ε.Θ. φορείς ή επιστημονικούς φορείς ή επιστημονικά περιοδικά με κριτές",width:120},{dataField:"StudyProgramsParticipation",caption:"Συμμετοχή σε ομάδα σύνταξης Αναλυτικού Προγράμματος Σπουδών - Διαθεματικού Ενιαίου Πλαισίου Προγραμμάτων Σπουδών ή αναμόρφωσης - εξορθολογισμού Προγραμμάτων Σπουδών και διδακτικής ύλης του Ι.Ε.Π. ή του Π.Ι.",width:120},{dataField:"StudyProgramsParticipationPoints",caption:"Σύνολο μονάδων Συμμετοχής σε ομάδα σύνταξης Αναλυτικού Προγράμματος Σπουδών - Διαθεματικού Ενιαίου Πλαισίου Προγραμμάτων Σπουδών ή αναμόρφωσης - εξορθολογισμού Προγραμμάτων Σπουδών και διδακτικής ύλης του Ι.Ε.Π. ή του Π.Ι.",width:120},{dataField:"WritingPoints",caption:"Σύνολο μονάδων συγγραφικού έργου και εισηγήσεων σε συνέδρια",width:120},{dataField:"CategoryPoints1",caption:"Σύνολο μονάδων Διοικητικής εμπειρίας (Κατηγορία 1)",width:120},{dataField:"CategoryPoints2",caption:"Σύνολο μονάδων Διοικητικής εμπειρίας (Κατηγορία 2)",width:120},{dataField:"CategoryPoints3",caption:"Σύνολο μονάδων Διοικητικής εμπειρίας (Κατηγορία 3)",width:120},{dataField:"CategoryPoints4",caption:"Σύνολο μονάδων Διοικητικής εμπειρίας (Κατηγορία 4)",width:120},{dataField:"CreationDate",caption:"Ημ/νια εκτέλεσης αλγορίθμου",dataType:"date",format:"dd/MM/yyyy hh:mm:ss"}];n.results=t;n.disableClassificationButton=!1},function(i){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+i.error_description);n.disableClassificationButton=!1}))};n.searchActionSecondmentForIntendancy=function(){n.checkFieldsSecondmentForIntendancy()?(n.results=[],n.searchSecondmentForIntendancy.regionAndUnitId=i.isValueInArray(i.getRoleCode(n.authentication.role)," d1, d2, p")?n.authentication.regionAndUnitId:n.regionAndUnitId.selected.Id,i.getByParams({regionAndUnitId:n.searchSecondmentForIntendancy.regionAndUnitId},"/api/Export/getBodyExportForIntendancy").then(function(t){n.columns=[{dataField:"ProtocolNumber",caption:"Αρ. πρωτοκόλλου"},{dataField:"RegistryNo",caption:"Αρ. μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"Speciality",caption:"Κλάδος"},{dataField:"OfficialPlacementUnitDescription",caption:"Οργανική θέση",width:200},{dataField:"IsActive",caption:"Κατάσταση Αίτησης"},{dataField:"IsConfirmed",caption:"Επικυρωμένη"},{dataField:"IsBlocked",caption:"Ελεγμένη"},{dataField:"BlockDetails",caption:"Κώλυμα απόσπασης",width:200},{dataField:"IsChecked",caption:"Εγκεκριμένη"},{dataField:"Body1",caption:"Φορέας",width:200},{dataField:"Body2",caption:"Επιλογή 1",width:200},{dataField:"Body3",caption:"Επιλογή 2",width:200},{dataField:"DirectPdfLink",caption:"Βιογραφικό",width:200},{dataField:"EnglishLanguage",caption:"Αγγλικά"},{dataField:"GermanLanguage",caption:"Γερμανικά"},{dataField:"FrenchLanguage",caption:"Γαλλικά"},{dataField:"OtherLanguage",caption:"Άλλη Ξένη Γλώσσα"},{dataField:"DoctoralEducation",caption:"Διδακτορικό"},{dataField:"PostgraduateEducation",caption:"Μεταπτυχιακό"},{dataField:"SubjectKnowledge",caption:"Γνώση Αντικειμένου"},{dataField:"NewTechologies",caption:"Γνώση Νέων Τεχνολογιών"},{dataField:"YearOfSecondmentBody",caption:"Χρόνια απόσπασης στον φορέα επιλογής"},{dataField:"AdministrativeKnowledge",caption:"Διοικητική Εμπειρία (μόνο για αποσπάσεις σε θέσεις με διοικητικά καθήκοντα)"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):t.pop("warning"," Αδύνατη αναζήτηση","Πρέπει να συμπληρώσετε όλα τα υποχρεωτικά πεδία για την αναζήτηση")};n.searchRecall=function(){if(n.checkFieldsForRecall()){n.results=[];switch(n.search.applicationTypeId){case 7:i.getByAll("/api/Export/getAllPyspdeChurchRecall").then(function(t){n.columns=[{dataField:"Level",caption:"Βαθμίδα εκπαίδευσης"},{dataField:"ProtocolNumber",caption:"Αρ. πρωτοκόλλου"},{dataField:"ActivatedDate",caption:"Ημ/νία ανάκλησης",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RegistryNo",caption:"Αρ. μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"FatherFirstname",caption:"Πατρώνυμο"},{dataField:"Code",caption:"Κλάδος"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 8:i.getByAll("/api/Export/getAllBodyRecall").then(function(t){var r=n.useMK_AllowBodies;if(n.columns=[{dataField:"Level",caption:"Βαθμίδα εκπαίδευσης"},{dataField:"MainBody",caption:"Φορέας απόσπασης"},{dataField:"ProtocolNumber",caption:"Αρ. πρωτοκόλλου"},{dataField:"ActivatedDate",caption:"Ημ/νία ανάκλησης",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RegistryNo",caption:"Αρ. μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"FatherFirstname",caption:"Πατρώνυμο"},{dataField:"Code",caption:"Κλάδος"},{dataField:"OtherBodySelection",caption:"Άλλος Φορέας / Τμήμα"},{dataField:"SubBody1",caption:"Επιλογή 1"},{dataField:"SubBody2",caption:"Επιλογή 2"}],i.isValueInArray(i.getRoleCode(n.authentication.role),"m1, m2, mk"))for(n.results=[],j=0;j<t.length;j++)i.isValueInArray(t[j].MainBodyId,r)?i.isValueInArray(i.getRoleCode(n.authentication.role),"mk")&&n.results.push(t[j]):i.isValueInArray(i.getRoleCode(n.authentication.role),"m1, m2")&&n.results.push(t[j]);else n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 9:i.getByAll("/api/Export/getAllPyspdeSMEARecall").then(function(t){n.columns=[{dataField:"Level",caption:"Βαθμίδα εκπαίδευσης"},{dataField:"ProtocolNumber",caption:"Αρ. πρωτοκόλλου"},{dataField:"ActivatedDate",caption:"Ημ/νία ανάκλησης",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RegistryNo",caption:"Αρ. μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"FatherFirstname",caption:"Πατρώνυμο"},{dataField:"Code",caption:"Κλάδος"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 10:i.getByAll("/api/Export/getAllArtisticRecall").then(function(t){n.columns=[{dataField:"Level",caption:"Βαθμίδα εκπαίδευσης"},{dataField:"ProtocolNumber",caption:"Αρ. πρωτοκόλλου"},{dataField:"ActivatedDate",caption:"Ημ/νία ανάκλησης",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RegistryNo",caption:"Αρ. μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"FatherFirstname",caption:"Πατρώνυμο"},{dataField:"Code",caption:"Κλάδος"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 11:i.getByAll("/api/Export/getAllMusicRecall").then(function(t){n.columns=[{dataField:"Level",caption:"Βαθμίδα εκπαίδευσης"},{dataField:"ProtocolNumber",caption:"Αρ. πρωτοκόλλου"},{dataField:"ActivatedDate",caption:"Ημ/νία ανάκλησης",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RegistryNo",caption:"Αρ. μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"FatherFirstname",caption:"Πατρώνυμο"},{dataField:"Code",caption:"Κλάδος"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 12:i.getByAll("/api/Export/getAllBody1920Recall").then(function(t){n.columns=[{dataField:"Level",caption:"Βαθμίδα εκπαίδευσης"},{dataField:"MainBody",caption:"Φορέας απόσπασης"},{dataField:"ProtocolNumber",caption:"Αρ. πρωτοκόλλου"},{dataField:"ActivatedDate",caption:"Ημ/νία ανάκλησης",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RegistryNo",caption:"Αρ. μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"FatherFirstname",caption:"Πατρώνυμο"},{dataField:"Code",caption:"Κλάδος"},{dataField:"OtherBodySelection",caption:"Άλλος Φορέας / Τμήμα"},{dataField:"SubBody1",caption:"Επιλογή 1"},{dataField:"SubBody2",caption:"Επιλογή 2"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case 13:i.getByAll("/api/Export/getAllBodyRefRecall").then(function(t){n.columns=[{dataField:"Level",caption:"Βαθμίδα εκπαίδευσης"},{dataField:"ProtocolNumber",caption:"Αρ. πρωτοκόλλου"},{dataField:"ActivatedDate",caption:"Ημ/νία ανάκλησης",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RegistryNo",caption:"Αρ. μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"FatherFirstname",caption:"Πατρώνυμο"},{dataField:"Code",caption:"Κλάδος"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 17:i.getByAll("/api/Export/getAllChurchRecall").then(function(t){n.columns=[{dataField:"Level",caption:"Βαθμίδα εκπαίδευσης"},{dataField:"ProtocolNumber",caption:"Αρ. πρωτοκόλλου"},{dataField:"ActivatedDate",caption:"Ημ/νία ανάκλησης",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RegistryNo",caption:"Αρ. μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"FatherFirstname",caption:"Πατρώνυμο"},{dataField:"Code",caption:"Κλάδος"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 18:i.getByAll("/api/Export/getAllBodySepRecall").then(function(t){n.columns=[{dataField:"Level",caption:"Βαθμίδα εκπαίδευσης"},{dataField:"MainBody",caption:"Φορέας απόσπασης"},{dataField:"ProtocolNumber",caption:"Αρ. πρωτοκόλλου"},{dataField:"ActivatedDate",caption:"Ημ/νία ανάκλησης",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RegistryNo",caption:"Αρ. μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"FatherFirstname",caption:"Πατρώνυμο"},{dataField:"Code",caption:"Κλάδος"},{dataField:"SubBody1",caption:"Επιλογή 1"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;default:t.pop("warning"," Αδύνατη αναζήτηση","Πρέπει να συμπληρώσετε τον τύπο της αίτησης")}}else t.pop("warning"," Αδύνατη αναζήτηση","Πρέπει να συμπληρώσετε τον τύπο της αίτησης")};n.searchActionObjection=function(){if(n.checkFieldsObjection()){n.results=[];switch(n.search.applicationTypeId){case 7:i.getByAll("/api/Export/getAllPyspdeChurchActionObjection").then(function(t){n.columns=[{dataField:"IsActive",caption:"Κατάσταση Αίτησης"},{dataField:"Level",caption:"Βαθμίδα Εκπαίδευσης"},{dataField:"RegistryNo",caption:"Αρ. Μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"FatherFirstname",caption:"Πατρώνυμο"},{dataField:"Code",caption:"Κλάδος"},{dataField:"PostingTransferAreaUnit",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ Οργανικής"},{dataField:"OfficialRegionAndUnit",caption:"Διεύθυνση Οργανικής"},{dataField:"FirstPreferedUnit",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ 1ης Προτίμησης"},{dataField:"CreationDate",caption:"Ημ/νία Υποβολής Ενέργειας",dataType:"date",format:"dd/MM/yyyy"},{dataField:"Objection",caption:"Λόγος Ένστασης"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 9:i.getByAll("/api/Export/getAllPyspdeSmeaActionObjection").then(function(t){n.columns=[{dataField:"IsActive",caption:"Κατάσταση Αίτησης"},{dataField:"Level",caption:"Βαθμίδα Εκπαίδευσης"},{dataField:"RegistryNo",caption:"Αρ. Μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"FatherFirstname",caption:"Πατρώνυμο"},{dataField:"Code",caption:"Κλάδος"},{dataField:"PostingTransferAreaUnit",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ Οργανικής"},{dataField:"OfficialRegionAndUnit",caption:"Διεύθυνση Οργανικής"},{dataField:"FirstPreferedUnit",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ 1ης Προτίμησης"},{dataField:"CreationDate",caption:"Ημ/νία Υποβολής Ενέργειας",dataType:"date",format:"dd/MM/yyyy"},{dataField:"Objection",caption:"Λόγος Ένστασης"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 17:i.getByAll("/api/Export/getAllChurchActionObjection").then(function(t){n.columns=[{dataField:"ActionType",caption:"Τύπος Αιτήματος"},{dataField:"IsActive",caption:"Κατάσταση Αίτησης"},{dataField:"ProtocolNumber",caption:"Αρ. πρωτοκόλλου"},{dataField:"CreationDate",caption:"Ημ/νία Υποβολής Ενέργειας",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RegistryNo",caption:"Αρ. Μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"Code",caption:"Κλάδος"},{dataField:"Objection",caption:"Περιγραφή Αιτήματος"},{dataField:"Pref1",caption:"1η Προτίμηση"},{dataField:"Pref2",caption:"2η Προτίμηση"},{dataField:"Pref3",caption:"3η Προτίμηση"},{dataField:"Pref4",caption:"4η Προτίμηση"},{dataField:"PostingTransferAreaUnitType",caption:"Τύπος Οργανικής"},{dataField:"PostingTransferAreaUnit",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ Οργανικής"},{dataField:"OfficialRegionAndUnit",caption:"Διεύθυνση Οργανικής"},];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 42:i.getByAll("/api/Export/getAllEEPEBPActionObjection").then(function(t){n.columns=[{dataField:"IsActive",caption:"Κατάσταση Αίτησης"},{dataField:"Level",caption:"Βαθμίδα Εκπαίδευσης"},{dataField:"RegistryNo",caption:"Αρ. Μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"FatherFirstname",caption:"Πατρώνυμο"},{dataField:"Code",caption:"Κλάδος"},{dataField:"PostingTransferAreaUnit",caption:"Περιοχή Οργανικής"},{dataField:"OfficialRegionAndUnit",caption:"Διεύθυνση Οργανικής"},{dataField:"CreationDate",caption:"Ημ/νία Υποβολής Ενέργειας",dataType:"date",format:"dd/MM/yyyy"},{dataField:"Objection",caption:"Λόγος Ένστασης"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;default:t.pop("warning"," Αδύνατη αναζήτηση","Πρέπει να συμπληρώσετε τον τύπο της αίτησης")}}else t.pop("warning"," Αδύνατη αναζήτηση","Πρέπει να συμπληρώσετε τον τύπο της αίτησης")};n.searchActionReCall=function(){if(n.checkFieldsForRecall()){n.results=[];switch(n.search.applicationTypeId){case 7:i.getByAll("/api/Export/getAllPyspdeChurchActionReCall").then(function(t){n.columns=[{dataField:"IsActive",caption:"Κατάσταση Αίτησης"},{dataField:"Level",caption:"Βαθμίδα Εκπαίδευσης"},{dataField:"RegistryNo",caption:"Αρ. Μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"FatherFirstname",caption:"Πατρώνυμο"},{dataField:"Code",caption:"Κλάδος"},{dataField:"PostingTransferAreaUnit",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ Οργανικής"},{dataField:"OfficialRegionAndUnit",caption:"Διεύθυνση Οργανικής"},{dataField:"SecondmentUnit",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ Απόσπασης"},{dataField:"CreationDate",caption:"Ημ/νία Υποβολής Ενέργειας",dataType:"date",format:"dd/MM/yyyy"},{dataField:"ReCall",caption:"Λόγος Ανάκλησης"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 9:i.getByAll("/api/Export/getAllPyspdeSmeaActionReCall").then(function(t){n.columns=[{dataField:"IsActive",caption:"Κατάσταση Αίτησης"},{dataField:"Level",caption:"Βαθμίδα Εκπαίδευσης"},{dataField:"RegistryNo",caption:"Αρ. Μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"FatherFirstname",caption:"Πατρώνυμο"},{dataField:"Code",caption:"Κλάδος"},{dataField:"PostingTransferAreaUnit",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ Οργανικής"},{dataField:"OfficialRegionAndUnit",caption:"Διεύθυνση Οργανικής"},{dataField:"SecondmentUnit",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ Απόσπασης"},{dataField:"CreationDate",caption:"Ημ/νία Υποβολής Ενέργειας",dataType:"date",format:"dd/MM/yyyy"},{dataField:"ReCall",caption:"Λόγος Ανάκλησης"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 17:i.getByAll("/api/Export/getAllChurchActionReCall").then(function(t){n.columns=[{dataField:"ApplStatus",caption:"Τύπος Αιτήματος"},{dataField:"IsActive",caption:"Κατάσταση Αίτησης"},{dataField:"RegistryNo",caption:"Αρ. Μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"Code",caption:"Κλάδος"},{dataField:"ProtocolNumber",caption:"Αρ. πρωτοκόλλου"},{dataField:"CreationDate",caption:"Ημ/νία Υποβολής Αιτήματος",dataType:"date",format:"dd/MM/yyyy"},{dataField:"SecondmentUnit",caption:"Εκκλ. Σχολείο Απόσπασης"},{dataField:"ReCall",caption:"Περιγραφή Αιτήματος"},{dataField:"PostingTransferAreaUnitType",caption:"Τύπος Οργανικής"},{dataField:"OfficialRegionAndUnit",caption:"Διεύθυνση Οργανικής"},{dataField:"PostingTransferAreaUnit",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ Οργανικής"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 42:i.getByAll("/api/Export/getAllEEPEBPActionReCall").then(function(t){n.columns=[{dataField:"IsActive",caption:"Κατάσταση Αίτησης"},{dataField:"Level",caption:"Βαθμίδα Εκπαίδευσης"},{dataField:"RegistryNo",caption:"Αρ. Μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"FatherFirstname",caption:"Πατρώνυμο"},{dataField:"Code",caption:"Κλάδος"},{dataField:"PostingTransferAreaUnit",caption:"Περιοχή Οργανικής"},{dataField:"OfficialRegionAndUnit",caption:"Διεύθυνση Οργανικής"},{dataField:"SecondmentUnit",caption:"Περιοχή Απόσπασης"},{dataField:"CreationDate",caption:"Ημ/νία Υποβολής Ενέργειας",dataType:"date",format:"dd/MM/yyyy"},{dataField:"ReCall",caption:"Λόγος Ανάκλησης"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;default:t.pop("warning"," Αδύνατη αναζήτηση","Πρέπει να συμπληρώσετε τον τύπο της αίτησης")}}else t.pop("warning"," Αδύνατη αναζήτηση","Πρέπει να συμπληρώσετε τον τύπο της αίτησης")};n.searchActionRevaluation=function(){if(n.checkFieldsFoRevaluation()){n.results=[];switch(n.search.applicationTypeId){case 9:i.getByAll("/api/Export/getAllPyspdeSmeaActionRevaluation").then(function(t){n.columns=[{dataField:"IsActive",caption:"Κατάσταση Αίτησης"},{dataField:"Level",caption:"Βαθμίδα Εκπαίδευσης"},{dataField:"ProtocolNumber",caption:"Αρ. πρωτοκόλλου"},{dataField:"CreationDate",caption:"Ημ/νία Υποβολής",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RegistryNo",caption:"Αρ. Μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"Code",caption:"Κλάδος"},{dataField:"Revaluation",caption:"Λόγος Επανεξέτασης"},{dataField:"SecondmentSmea",caption:"Απόσπαση σε ΣΜΕΑΕ/ΚΕ.Δ.Α.Σ.Υ."},{dataField:"SecondmentUnit",caption:"ΠΥΠΔΕ/ΠΥΣΠΕ/ΚΕ.Δ.Α.Σ.Υ. Απόσπασης"},{dataField:"PostingTransferAreaUnit",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ Οργανικής"},{dataField:"PostingTransferAreaUnitType",caption:"Τύπος Οργανικής"},{dataField:"OfficialRegionAndUnit",caption:"Διεύθυνση Οργανικής Θέσης"},{dataField:"pyspdePref1",caption:"1η ΠΡΟΤΙΜΗΣΗ"},{dataField:"pyspdePref2",caption:"2η ΠΡΟΤΙΜΗΣΗ"},{dataField:"pyspdePref3",caption:"3η ΠΡΟΤΙΜΗΣΗ"},{dataField:"pyspdePref4",caption:"4η ΠΡΟΤΙΜΗΣΗ"},{dataField:"pyspdePref5",caption:"5η ΠΡΟΤΙΜΗΣΗ"},{dataField:"keddyPref1",caption:"1ο ΚΕ.Δ.Α.Σ.Υ."},{dataField:"keddyPref2",caption:"2ο ΚΕ.Δ.Α.Σ.Υ."},{dataField:"keddyPref3",caption:"3ο ΚΕ.Δ.Α.Σ.Υ."},{dataField:"keddyPref4",caption:"4ο ΚΕ.Δ.Α.Σ.Υ."},{dataField:"keddyPref5",caption:"5ο ΚΕ.Δ.Α.Σ.Υ."},{dataField:"urlFile",caption:"url ΒΙΟΓΡΑΦΙΚΟΥ",cellTemplate:function(n,t){i.isEmptyValue(t.data.urlFile)||$("<a/>").addClass("dx-link").text("Βιογραφικό").on("dxclick",function(){f.open(t.data.urlFile,"_blank")}).appendTo(n)}}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 7:i.getByAll("/api/Export/getPyspdeChurchActionevaluation").then(function(t){n.columns=[{dataField:"IsActive",caption:"Κατάσταση Αίτησης"},{dataField:"Level",caption:"Βαθμίδα Εκπαίδευσης"},{dataField:"ProtocolNumber",caption:"Αρ. πρωτοκόλλου"},{dataField:"CreationDate",caption:"Ημ/νία Υποβολής",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RegistryNo",caption:"Αρ. Μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"Code",caption:"Κλάδος"},{dataField:"Revaluation",caption:"Λόγος Επανεξέτασης"},{dataField:"SecondmentPyspde",caption:"Απόσπαση σε ΠΥΣΠΕ/ΠΥΣΔΕ"},{dataField:"SecondmentUnit",caption:"ΠΥΠΔΕ/ΠΥΣΠΕ Απόσπασης"},{dataField:"PostingTransferAreaUnit",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ Οργανικής"},{dataField:"PostingTransferAreaUnitType",caption:"Τύπος Οργανικής"},{dataField:"OfficialRegionAndUnit",caption:"Διεύθυνση Οργανικής Θέσης"},{dataField:"pyspdePref1",caption:"1η ΠΡΟΤΙΜΗΣΗ"},{dataField:"pyspdePref2",caption:"2η ΠΡΟΤΙΜΗΣΗ"},{dataField:"pyspdePref3",caption:"3η ΠΡΟΤΙΜΗΣΗ"},{dataField:"pyspdePref4",caption:"4η ΠΡΟΤΙΜΗΣΗ"},{dataField:"pyspdePref5",caption:"5η ΠΡΟΤΙΜΗΣΗ"},{dataField:"pyspdePref6",caption:"6η ΠΡΟΤΙΜΗΣΗ"},{dataField:"pyspdePref7",caption:"7η ΠΡΟΤΙΜΗΣΗ"},{dataField:"pyspdePref8",caption:"8η ΠΡΟΤΙΜΗΣΗ"},{dataField:"pyspdePref9",caption:"9η ΠΡΟΤΙΜΗΣΗ"},{dataField:"pyspdePref10",caption:"10η ΠΡΟΤΙΜΗΣΗ"},{dataField:"urlFile",caption:"url ΒΙΟΓΡΑΦΙΚΟΥ",cellTemplate:function(n,t){i.isEmptyValue(t.data.urlFile)||$("<a/>").addClass("dx-link").text("Βιογραφικό").on("dxclick",function(){f.open(t.data.urlFile,"_blank")}).appendTo(n)}}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 17:i.getByAll("/api/Export/getAllChurchActionRevaluation").then(function(t){n.columns=[{dataField:"ApplStatus",caption:"Κατάσταση Αίτησης"},{dataField:"CreationDate",caption:"Ημ/νία Υποβολής",dataType:"date",format:"dd/MM/yyyy"},{dataField:"ProtocolString",caption:"Αρ. πρωτοκόλλου"},{dataField:"RegistryNo",caption:"Αρ. Μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"Code",caption:"Κλάδος"},{dataField:"Revaluation",caption:"Λόγος Επανεξέτασης"},{dataField:"HasSecondment",caption:"Έχει πάρει απόσπαση"},{dataField:"SecondmentUnit",caption:"ΠΥΠΔΕ/ΠΥΣΠΕ/ΚΕ.Δ.Α.Σ.Υ. Απόσπασης"},{dataField:"PostingTransferAreaUnit",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ Οργανικής"},{dataField:"PostingTransferAreaUnitType",caption:"Τύπος Οργανικής"},{dataField:"OfficialRegionAndUnit",caption:"Διεύθυνση Οργανικής Θέσης"},{dataField:"Pref1",caption:"1η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref2",caption:"2η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref3",caption:"3η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref4",caption:"4η ΠΡΟΤΙΜΗΣΗ"},{dataField:"urlFile",caption:"url ΒΙΟΓΡΑΦΙΚΟΥ",cellTemplate:function(n,t){i.isEmptyValue(t.data.urlFile)||$("<a/>").addClass("dx-link").text("Βιογραφικό").on("dxclick",function(){f.open(t.data.urlFile,"_blank")}).appendTo(n)}}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 42:i.getByAll("/api/Export/getAllEEPEBPActionRevaluation").then(function(t){n.columns=[{dataField:"IsActive",caption:"Κατάσταση Αίτησης"},{dataField:"Level",caption:"Βαθμίδα Εκπαίδευσης"},{dataField:"ProtocolNumber",caption:"Αρ. πρωτοκόλλου"},{dataField:"CreationDate",caption:"Ημ/νία Υποβολής",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RegistryNo",caption:"Αρ. Μητρώου"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"Code",caption:"Κλάδος"},{dataField:"Revaluation",caption:"Λόγος Επανεξέτασης"},{dataField:"SecondmentSmea",caption:"Απόσπαση σε ΣΜΕΑΕ/ΚΕ.Δ.Α.Σ.Υ./Σ.Δ.Ε.Υ."},{dataField:"SecondmentUnit",caption:"ΠΥΠΔΕ/ΠΥΣΠΕ/ΚΕ.Δ.Α.Σ.Υ./Σ.Δ.Ε.Υ. Απόσπασης"},{dataField:"PostingTransferAreaUnit",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ Οργανικής"},{dataField:"PostingTransferAreaUnitType",caption:"Τύπος Οργανικής"},{dataField:"OfficialRegionAndUnit",caption:"Διεύθυνση Οργανικής Θέσης"},{dataField:"Pref1",caption:"1η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref2",caption:"2η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref3",caption:"3η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref4",caption:"4η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref5",caption:"5η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref6",caption:"6η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref7",caption:"7η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref8",caption:"8η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref9",caption:"9η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref10",caption:"10η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref11",caption:"11η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref12",caption:"12η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref13",caption:"13η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref14",caption:"14η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref15",caption:"15η ΠΡΟΤΙΜΗΣΗ"},{dataField:"urlFile",caption:"url ΒΙΟΓΡΑΦΙΚΟΥ",cellTemplate:function(n,t){i.isEmptyValue(t.data.urlFile)||$("<a/>").addClass("dx-link").text("Βιογραφικό").on("dxclick",function(){f.open(t.data.urlFile,"_blank")}).appendTo(n)}}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;default:t.pop("warning"," Αδύνατη αναζήτηση","Πρέπει να συμπληρώσετε τον τύπο της αίτησης")}}else t.pop("warning"," Αδύνατη αναζήτηση","Πρέπει να συμπληρώσετε τον τύπο της αίτησης")};n.getAllPyspdeSmea=function(){n.results=[];i.getByAll("/api/Export/getAllPyspdeSmea").then(function(t){n.columns=[{dataField:"ApplStatus",caption:"ΚΑΤΑΣΤΑΣΗ ΑΙΤΗΣΗΣ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"IsPyspde",caption:"ΑΠΟΣΠΑΣΗ ΣΕ ΠΥΣΔΕ/ΠΥΣΠΕ"},{dataField:"IsKeddy",caption:"ΑΠΟΣΠΑΣΗ ΣΕ ΚΕ.Δ.Α.Σ.Υ."},{dataField:"IsEEEEK",caption:"ΑΠΟΣΠΑΣΗ ΣΕ Ε.Ε.Ε.Ε.Κ."},{dataField:"fekDetails",caption:"ΕΓΚΥΚΛΙΟΣ ΑΠΟΣΠΑΣΕΩΝ"},{dataField:"ProtocolString",caption:"ΠΡΩΤΟΚΟΛΛΟ"},{dataField:"SubmissionDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΥΠΟΒΟΛΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RegistryNo",caption:"ΑΡΙΘΜΟΣ ΜΗΤΡΩΟΥ"},{dataField:"TaxNumber",caption:"ΑΦΜ"},{dataField:"Lastname",caption:"ΕΠΩΝΥΜΟ"},{dataField:"Firstname",caption:"ΟΝΟΜΑ"},{dataField:"FatherFirstname",caption:"ΟΝΟΜΑ ΠΑΤΕΡΑ"},{dataField:"Code",caption:"ΚΛΑΔΟΣ"},{dataField:"spgCode",caption:"ΕΙΔΙΚΟΤΗΤΑ"},{dataField:"officialRegionCode",caption:"ΚΩΔΙΚΟΣ ΠΕΡΙΟΧΗΣ ΟΡΓΑΝΙΚΗΣ"},{dataField:"pyspde",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ ΟΡΓΑΝΙΚΗΣ"},{dataField:"officialRegionDescription",caption:"ΠΕΡΙΟΧΗ ΟΡΓΑΝΙΚΗΣ"},{dataField:"OfficialUnitType",caption:"ΤΥΠΟΣ ΟΡΓΑΝΙΚΗΣ"},{dataField:"OfficialPlacementUnitDescription",caption:"ΟΡΓΑΝΙΚΗ ΘΕΣΗ"},{dataField:"belongsToPeriphery",caption:"ΠΕΡΙΦΕΡΕΙΑ ΟΡΓΑΝΙΚΗΣ ΘΕΣΗΣ"},{dataField:"belongsToOffice",caption:"ΔΙΕΥΘΥΝΣΗ ΟΡΓΑΝΙΚΗΣ ΘΕΣΗΣ"},{dataField:"FEKNo",caption:"ΦΕΚ ΔΙΟΡΙΣΜΟΥ"},{dataField:"NominationYear",caption:"ΕΤΟΣ ΔΙΟΡΙΣΜΟΥ"},{dataField:"ExperienceYears",caption:"ΕΤΗ ΥΠΗΡΕΣΙΑΣ"},{dataField:"ExperienceMonths",caption:"ΜΗΝΕΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"ExperienceDays",caption:"ΜΕΡΕΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"Locality",caption:"ΕΝΤΟΠΙΟΤΗΤΑ"},{dataField:"localityPyspdeDescription",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ ΕΝΤΟΠΙΟΤΗΤΑΣ"},{dataField:"MaritalStatus",caption:"ΟΙΚΟΓΕΝΕΙΑΚΗ ΚΑΤΑΣΤΑΣΗ"},{dataField:"UnderAgedOrStudingChildren",caption:"ΑΡΙΘΜΟΣ ΑΝΗΛΙΚΩΝ ΤΕΚΝΩΝ"},{dataField:"StudingChildren",caption:"ΑΡΙΘΜΟΣ ΤΕΚΝΩΝ ΠΟΥ ΣΠΟΥΔΑΖΟΥΝ"},{dataField:"TotalChildren",caption:"ΣΥΝΟΛΙΚΟΣ ΑΡΙΘΜΟΣ ΤΕΚΝΩΝ"},{dataField:"ChildCustody",caption:"ΕΠΙΜΕΛΕΙΑ ΤΕΚΝΩΝ"},{dataField:"MateProfession",caption:"ΕΠΑΓΓΕΛΜΑ ΣΥΖΥΓΟΥ"},{dataField:"HasJoint",caption:"ΣΥΝΥΠΗΡΕΤΗΣΗ"},{dataField:"JointDescription",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ ΣΥΝΥΠΗΡΕΤΗΣΗΣ"},{dataField:"HealthProblems",caption:"ΛΟΓΟΙ ΥΓΕΙΑΣ ΙΔΙΟΥ"},{dataField:"MateHealthProblems",caption:"ΛΟΓΟΙ ΥΓΕΙΑΣ ΣΥΖΥΓΟΥ"},{dataField:"ChildrenHealthProblems",caption:"ΛΟΓΟΙ ΥΓΕΙΑΣ ΤΕΚΝΩΝ"},{dataField:"ParentsHealthProblems",caption:"ΛΟΓΟΙ ΥΓΕΙΑΣ ΓΟΝΕΩΝ"},{dataField:"parentsPyspdeDescription",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ ΓΟΝΕΩΝ"},{dataField:"BrothersHealthProblems",caption:"ΛΟΓΟΙ ΥΓΕΙΑΣ ΑΔΕΡΦΩΝ"},{dataField:"brothersPyspdeDescription",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ ΑΔΕΡΦΩΝ"},{dataField:"InVitroFertilization",caption:"ΕΞΩΣΩΜΑΤΙΚΗ ΓΟΝΙΜΟΠΟΙΗΣΗ"},{dataField:"PostGraduateStudies",caption:"ΜΕΤΑΠΤΥΧΙΑΚΕΣ ΣΠΟΥΔΕΣ"},{dataField:"studiesPyspdeDescription",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ ΣΠΟΥΔΩΝ"},{dataField:"HavingManyChildren",caption:"ΠΟΛΥΤΕΚΝΟΣ"},{dataField:"NewPermanentInfirmity",caption:"ΝΕΟΔΙΟΡΙΣΤΟΣ ΜΕ ΠΑ 75 % ΚΑΙ ΑΝΩ ΙΔΙΟΥ Ή ΣΥΖΥΓΟΥ"},{dataField:"HasDisease",caption:"ΕΙΔΙΚΗ ΚΑΤΗΓΟΡΙΑ ΑΣΘΕΝΕΙΑ"},{dataField:"diseases",caption:"ΑΣΘΕΝΕΙΑ"},{dataField:"DiseaseDetails",caption:"ΑΛΛΗ ΑΣΘΕΝΕΙΑ ΙΔΙΟΥ"},{dataField:"MateDiseaseDetails",caption:"ΑΛΛΗ ΑΣΘΕΝΕΙΑ ΣΥΖΥΓΟΥ"},{dataField:"ChildrenDiseaseDetails",caption:"ΑΛΛΗ ΑΣΘΕΝΕΙΑ ΤΕΚΝΩΝ"},{dataField:"ParentDiseaseDetails",caption:"ΑΛΛΗ ΑΣΘΕΝΕΙΑ ΓΟΝΕΩΝ"},{dataField:"BrothersDiseaseDetails",caption:"ΑΛΛΗ ΑΣΘΕΝΕΙΑ ΑΔΕΡΦΩΝ"},{dataField:"MilitaryMate",caption:"ΣΥΖΥΓΟΣ ΣΤΡΑΤΙΩΤΙΚΟΥ"},{dataField:"ElectiveOTA",caption:"ΑΙΡΕΤΟΣ ΟΤΑ"},{dataField:"JudicialMate",caption:"ΣΥΖΥΓΟΣ ΔΙΚΑΣΤΙΚΟΥ"},{dataField:"DEPMate",caption:"ΣΥΖΥΓΟΣ ΜΕΛΟΥΣ ΔΕΠ"},{dataField:"DoctoralSpecialEducation",caption:"ΔΙΔΑΚΤΟΡΙΚΟΣ ΤΙΤΛΟΣ ΕΑΕ"},{dataField:"PostgraduateSpecialEducation",caption:"ΜΕΤΑΠΤΥΧΙΑΚΟΣ ΤΙΤΛΟΣ ΕΑΕ"},{dataField:"PostgraduateStudiesSpecialEducation",caption:"2ετής ΜΕΤΕΚΠΑΙΔΕΥΣΗ ΣΤΗΝ ΕΑΕ"},{dataField:"MainSpecialPhysicalEducation",caption:"ΠΤΥΧΙΟ ή ΚΥΡΙΑ ΕΙΔΙΚΟΤΗΤΑ ΕΑΕ"},{dataField:"Infirmity",caption:"ΑΝΑΠΗΡΙΑ 67% ΕΚΠ/ΚΟΥ"},{dataField:"DisabledChildren",caption:"ΑΝΑΠΗΡΙΑ 67% ΤΕΚΝΟΥ"},{dataField:"SeminarSpecialEducation",caption:"ΕΤΗΣΙΟ ΣΕΜΙΝΑΡΙΟ ΕΑΕ"},{dataField:"DidacticYears",caption:"ΕΤΗ ΔΙΔΑΚΤΙΚΗΣ ΕΜΠΕΙΡΙΑΣ ΕΑΕ"},{dataField:"DidacticMonths",caption:"ΜΗΝΕΣ ΔΙΔΑΚΤΙΚΗΣ ΕΜΠΕΙΡΙΑΣ ΕΑΕ"},{dataField:"DidacticDays",caption:"ΜΕΡΕΣ ΔΙΔΑΚΤΙΚΗΣ ΕΜΠΕΙΡΙΑΣ ΕΑΕ"},{dataField:"BraileKnowledge",caption:"ΓΝΩΣΗ ΓΡΑΦΗΣ BRAILLE"},{dataField:"SignKnowledge",caption:"ΓΝΩΣΗ ΕΝΓ"},{dataField:"NoEducationalExecutive",caption:"Είμαι στέλεχος εκπαίδευσης με θητεία"},{dataField:"NoTenure",caption:"Έχω αποσπαστεί με θητεία"},{dataField:"NoExpiredSecondment",caption:"Είμαι αποσπασμένος σε ΠΥΣΠΕ/ΠΥΣΔΕ ή φορέα"},{dataField:"AllPoints",caption:"ΣΥΝΟΛΙΚΑ ΜΟΡΙΑ",format:"fixedPoint",precision:"3"},{dataField:"MaritalHealthProblemsPoints",caption:"ΜΟΡΙΑ ΥΓΕΙΑΣ ΟΙΚΟΓΕΝΕΙΑΣ",format:"fixedPoint",precision:"3"},{dataField:"ParentsHealthProblemsPoints",caption:"ΜΟΡΙΑ ΥΓΕΙΑΣ ΓΟΝΕΩΝ",format:"fixedPoint",precision:"3"},{dataField:"BrothersHealthProblemsPoints",caption:"ΜΟΡΙΑ ΥΓΕΙΑΣ ΑΔΕΡΦΩΝ",format:"fixedPoint",precision:"3"},{dataField:"MaritalStatusPoints",caption:"ΜΟΡΙΑ ΟΙΚΟΓΕΝΕΙΑΚΗΣ ΚΑΤΑΣΤΑΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"ExperiencePoints",caption:"ΜΟΡΙΑ ΠΡΟΫΠΗΡΕΣΙΑΣ",format:"fixedPoint",precision:"3"},{dataField:"StudiesPyspdePoints",caption:"ΜΟΡΙΑ ΣΠΟΥΔΩΝ",format:"fixedPoint",precision:"3"},{dataField:"DirectPdfLink",caption:"url ΔΙΚΑΙΟΛΟΓΗΤΙΚΩΝ",cellTemplate:function(n,t){i.isEmptyValue(t.data.DirectPdfLink)||$("<a/> ").addClass("dx-link").text("Δικαιολογητικό").on("dxclick",function(){f.open(t.data.DirectPdfLink,"_blank")}).appendTo(n)}},{dataField:"Comments",caption:"ΠΑΡΑΤΗΡΗΣΕΙΣ"},{dataField:"CommentsService",caption:"ΠΑΡΑΤΗΡΗΣΕΙΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"pyspdePref1",caption:"1η ΠΡΟΤΙΜΗΣΗ"},{dataField:"pyspdePref1Points",caption:"ΜΟΡΙΑ 1ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"pyspdePref2",caption:"2η ΠΡΟΤΙΜΗΣΗ"},{dataField:"pyspdePref2Points",caption:"ΜΟΡΙΑ 2ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"pyspdePref3",caption:"3η ΠΡΟΤΙΜΗΣΗ"},{dataField:"pyspdePref3Points",caption:"ΜΟΡΙΑ 3ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"pyspdePref4",caption:"4η ΠΡΟΤΙΜΗΣΗ"},{dataField:"pyspdePref4Points",caption:"ΜΟΡΙΑ 4ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"pyspdePref5",caption:"5η ΠΡΟΤΙΜΗΣΗ"},{dataField:"pyspdePref5Points",caption:"ΜΟΡΙΑ 5ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"keddyPref1",caption:"1ο ΚΕ.Δ.Α.Σ.Υ."},{dataField:"keddyPref1Points",caption:"ΜΟΡΙΑ 1ης ΠΡΟΤΙΜΗΣΗΣ ΚΕ.Δ.Α.Σ.Υ.",format:"fixedPoint",precision:"3"},{dataField:"keddyPref2",caption:"2ο ΚΕ.Δ.Α.Σ.Υ."},{dataField:"keddyPref2Points",caption:"ΜΟΡΙΑ 2ης ΠΡΟΤΙΜΗΣΗΣ ΚΕ.Δ.Α.Σ.Υ.",format:"fixedPoint",precision:"3"},{dataField:"keddyPref3",caption:"3ο ΚΕ.Δ.Α.Σ.Υ."},{dataField:"keddyPref3Points",caption:"ΜΟΡΙΑ 3ης ΠΡΟΤΙΜΗΣΗΣ ΚΕ.Δ.Α.Σ.Υ.",format:"fixedPoint",precision:"3"},{dataField:"keddyPref4",caption:"4ο ΚΕ.Δ.Α.Σ.Υ."},{dataField:"keddyPref4Points",caption:"ΜΟΡΙΑ 4ης ΠΡΟΤΙΜΗΣΗΣ ΚΕ.Δ.Α.Σ.Υ.",format:"fixedPoint",precision:"3"},{dataField:"keddyPref5",caption:"5ο ΚΕ.Δ.Α.Σ.Υ."},{dataField:"keddyPref5Points",caption:"ΜΟΡΙΑ 5ης ΠΡΟΤΙΜΗΣΗΣ ΚΕ.Δ.Α.Σ.Υ.",format:"fixedPoint",precision:"3"},{dataField:"eeeekPref1",caption:"1ο Ε.Ε.Ε.Ε.Κ."},{dataField:"eeeekPref2",caption:"2ο Ε.Ε.Ε.Ε.Κ."},{dataField:"eeeekPref3",caption:"3ο Ε.Ε.Ε.Ε.Κ."},{dataField:"eeeekPref4",caption:"4ο Ε.Ε.Ε.Ε.Κ."},{dataField:"eeeekPref5",caption:"5ο Ε.Ε.Ε.Ε.Κ."},{dataField:"blinddeafPref1",caption:"1ο Σχολείο Κωφών και Τυφλών"},{dataField:"blinddeafPref2",caption:"2ο Σχολείο Κωφών και Τυφλών"},{dataField:"blinddeafPref3",caption:"3ο Σχολείο Κωφών και Τυφλών"},{dataField:"blinddeafPref4",caption:"4ο Σχολείο Κωφών και Τυφλών"},{dataField:"blinddeafPref5",caption:"5ο Σχολείο Κωφών και Τυφλών"},{dataField:"IsBlocked",caption:"ΚΩΛΥΜΑ ΑΠΟΣΠΑΣΗΣ"},{dataField:"PlacementRegionPoints",caption:"ΜΟΡΙΑ ΑΠΟΣΠΑΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"PlacementDescription",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ ΑΠΟΣΠΑΣΗΣ"},{dataField:"PlacementTypeDescription",caption:"ΤΥΠΟΣ ΑΠΟΣΠΑΣΗΣ"},{dataField:"PlacementAlgorithmType",caption:"ΤΥΠΟΣ ΑΛΓΟΡΙΘΜΟΥ"},];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.getAllEEPEBP=function(){n.results=[];i.getByAll("/api/Export/getAllEEPEBP").then(function(t){n.columns=[{dataField:"ApplStatus",caption:"ΚΑΤΑΣΤΑΣΗ ΑΙΤΗΣΗΣ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"fekDetails",caption:"ΕΓΚΥΚΛΙΟΣ ΑΠΟΣΠΑΣΕΩΝ"},{dataField:"ProtocolString",caption:"ΠΡΩΤΟΚΟΛΛΟ"},{dataField:"SubmissionDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΥΠΟΒΟΛΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"CreationDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΔΗΜΙΟΥΡΓΙΑΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RegistryNo",caption:"ΑΡΙΘΜΟΣ ΜΗΤΡΩΟΥ"},{dataField:"TaxNumber",caption:"ΑΦΜ"},{dataField:"Lastname",caption:"ΕΠΩΝΥΜΟ"},{dataField:"Firstname",caption:"ΟΝΟΜΑ"},{dataField:"FatherFirstname",caption:"ΟΝΟΜΑ ΠΑΤΕΡΑ"},{dataField:"AddressArea",caption:"ΠΟΛΗ"},{dataField:"AddressStreet",caption:"ΟΔΟΣ"},{dataField:"AddressPostCode",caption:"ΤΚ"},{dataField:"Telephone",caption:"ΤΗΛΕΦΩΝΟ"},{dataField:"TelephoneMobile",caption:"ΚΙΝΗΤΟ"},{dataField:"Email",caption:"EMAIL_PERSONAL"},{dataField:"Code",caption:"ΚΛΑΔΟΣ"},{dataField:"spDescription",caption:"ΛΕΚΤΙΚΟ ΚΛΑΔΟΥ"},{dataField:"spgCode",caption:"ΕΙΔΙΚΟΤΗΤΑ"},{dataField:"officialRegionCode",caption:"ΚΩΔΙΚΟΣ ΠΕΡΙΟΧΗΣ ΟΡΓΑΝΙΚΗΣ"},{dataField:"officialRegionDescription",caption:"ΠΕΡΙΟΧΗ ΟΡΓΑΝΙΚΗΣ"},{dataField:"OfficialUnitType",caption:"ΤΥΠΟΣ ΟΡΓΑΝΙΚΗΣ"},{dataField:"OfficialPlacementUnitDescription",caption:"ΟΡΓΑΝΙΚΗ ΘΕΣΗ"},{dataField:"belongsToPeriphery",caption:"ΠΕΡΙΦΕΡΕΙΑ ΟΡΓΑΝΙΚΗΣ ΘΕΣΗΣ"},{dataField:"belongsToOffice",caption:"ΔΙΕΥΘΥΝΣΗ ΟΡΓΑΝΙΚΗΣ ΘΕΣΗΣ"},{dataField:"FEKNo",caption:"ΦΕΚ ΔΙΟΡΙΣΜΟΥ"},{dataField:"NominationYear",caption:"ΕΤΟΣ ΔΙΟΡΙΣΜΟΥ"},{dataField:"NoEducationalExecutive",caption:"ΣΤΕΛΕΧΟΣ ΕΚΠΑΙΔΕΥΣΗΣ (ΕΩΣ 31/8/"+n.applicationDidacticYear.YearFrom+")"},{dataField:"NoTenure",caption:"ΑΠΟΣΠΑΣΗ ΜΕ ΘΗΤΕΙΑ (ΕΩΣ 31/8/"+n.applicationDidacticYear.YearFrom+")"},{dataField:"NoExpiredSecondment",caption:"ΕΧΩ ΑΠΟΣΠΑΣΤΕΙ Η ΘΗΤΕΙΑ ΔΕΝ ΛΗΓΕΙ (ΕΩΣ 31/8/"+n.applicationDidacticYear.YearFrom+")"},{dataField:"ExperienceYears",caption:"ΕΤΗ ΥΠΗΡΕΣΙΑΣ"},{dataField:"ExperienceMonths",caption:"ΜΗΝΕΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"ExperienceDays",caption:"ΜΕΡΕΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"DirectPdfLink",caption:"url ΔΙΚΑΙΟΛΟΓΗΤΙΚΩΝ",cellTemplate:function(n,t){i.isEmptyValue(t.data.DirectPdfLink)||$("<a/>").addClass("dx-link").text("Δικαιολογητικό").on("dxclick",function(){f.open(t.data.DirectPdfLink,"_blank")}).appendTo(n)}},{dataField:"Locality",caption:"ΕΝΤΟΠΙΟΤΗΤΑ"},{dataField:"localityPyspdeDescription",caption:"ΠΕΡΙΟΧΗ ΕΝΤΟΠΙΟΤΗΤΑΣ"},{dataField:"MaritalStatus",caption:"ΟΙΚΟΓΕΝΕΙΑΚΗ ΚΑΤΑΣΤΑΣΗ"},{dataField:"UnderAgedOrStudingChildren",caption:"ΑΡΙΘΜΟΣ ΤΕΚΝΩΝ"},{dataField:"ChildCustody",caption:"ΕΠΙΜΕΛΕΙΑ ΤΕΚΝΩΝ"},{dataField:"MateProfession",caption:"ΕΠΑΓΓΕΛΜΑ ΣΥΖΥΓΟΥ"},{dataField:"HasJoint",caption:"ΣΥΝΥΠΗΡΕΤΗΣΗ"},{dataField:"JointDescription",caption:"ΠΕΡΙΟΧΗ ΣΥΝΥΠΗΡΕΤΗΣΗΣ"},{dataField:"HealthProblems",caption:"ΛΟΓΟΙ ΥΓΕΙΑΣ ΙΔΙΟΥ"},{dataField:"HealthProblemsKEPANumber",caption:"ΑΜ ΚΕΠΑ ΛΟΓΟΙ ΥΓΕΙΑΣ ΙΔΙΟΥ"},{dataField:"HealthProblemsKEPASanitaryNumber",caption:"ΑΡΙΘΜΟΣ ΕΠΙΤΡΟΠΗΣ ΙΔΙΩΝ"},{dataField:"MateHealthProblems",caption:"ΛΟΓΟΙ ΥΓΕΙΑΣ ΣΥΖΥΓΟΥ"},{dataField:"MateHealthProblemsKEPANumber",caption:"ΑΜ ΚΕΠΑ ΛΟΓΟΙ ΥΓΕΙΑΣ ΣΥΖΥΓΟΥ"},{dataField:"MateHealthProblemsKEPASanitaryNumber",caption:"ΑΡΙΘΜΟΣ ΕΠΙΤΡΟΠΗΣ ΣΥΖΥΓΟΥ"},{dataField:"ChildrenHealthProblems",caption:"ΛΟΓΟΙ ΥΓΕΙΑΣ ΤΕΚΝΩΝ"},{dataField:"ChildrenHealthProblemsKEPANumber",caption:"ΑΜ ΚΕΠΑ ΛΟΓΟΙ ΥΓΕΙΑΣ ΤΕΚΝΩΝ"},{dataField:"ChildrenHealthProblemsKEPASanitaryNumber",caption:"ΑΡΙΘΜΟΣ ΕΠΙΤΡΟΠΗΣ ΤΕΚΝΩΝ"},{dataField:"ParentsHealthProblems",caption:"ΛΟΓΟΙ ΥΓΕΙΑΣ ΓΟΝΕΩΝ"},{dataField:"ParentsHealthProblemsKEPANumber",caption:"ΑΜ ΚΕΠΑ ΛΟΓΟΙ ΥΓΕΙΑΣ ΓΟΝΕΩΝ"},{dataField:"ParentsHealthProblemsKEPASanitaryNumber",caption:"ΑΡΙΘΜΟΣ ΕΠΙΤΡΟΠΗ ΓΟΝΕΩΝ"},{dataField:"BrothersHealthProblems",caption:"ΛΟΓΟΙ ΥΓΕΙΑΣ ΑΔΕΡΦΩΝ"},{dataField:"BrothersHealthProblemsKEPANumber",caption:"ΑΜ ΚΕΠΑ ΛΟΓΟΙ ΥΓΕΙΑΣ ΑΔΕΡΦΩΝ"},{dataField:"BrothersHealthProblemsKEPASanitaryNumber",caption:"ΑΡΙΘΜΟΣ ΕΠΙΤΡΟΠΗΣ ΑΔΕΡΦΩΝ"},{dataField:"parentsPyspdeDescription",caption:"ΠΕΡΙΟΧΗ ΓΟΝΕΩΝ"},{dataField:"brothersPyspdeDescription",caption:"ΠΕΡΙΟΧΗ ΑΔΕΡΦΩΝ"},{dataField:"InVitroFertilization",caption:"ΕΞΩΣΩΜΑΤΙΚΗ ΓΟΝΙΜΟΠΟΙΗΣΗ"},{dataField:"PostGraduateStudies",caption:"ΜΕΤΑΠΤΥΧΙΑΚΕΣ ΣΠΟΥΔΕΣ"},{dataField:"studiesPyspdeDescription",caption:"ΠΕΡΙΟΧΗ ΣΠΟΥΔΩΝ"},{dataField:"HavingManyChildren",caption:"ΠΟΛΥΤΕΚΝΟΣ"},{dataField:"DisabledChildren",caption:"ΑΝΑΠΗΡΙΑ 67% ΤΕΚΝΟΥ"},{dataField:"HasDisease",caption:"ΕΙΔΙΚΗ ΚΑΤΗΓΟΡΙΑ ΑΣΘΕΝΕΙΑ"},{dataField:"diseases",caption:"ΑΣΘΕΝΕΙΑ"},{dataField:"KEPANums",caption:"ΑΡΙΘΜΟΣ ΜΗΤΡΩΟΥ ΚΕΠΑ"},{dataField:"KEPASanitaryNums",caption:"ΑΡΙΘΜΟΣ ΕΠΙΤΡΟΠΗΣ"},{dataField:"MilitaryMate",caption:"ΣΥΖΥΓΟΣ ΣΤΡΑΤΙΩΤΙΚΟΥ"},{dataField:"ElectiveOTA",caption:"ΑΙΡΕΤΟΣ ΟΤΑ"},{dataField:"JudicialMate",caption:"ΣΥΖΥΓΟΣ ΔΙΚΑΣΤΙΚΟΥ"},{dataField:"DEPMate",caption:"ΣΥΖΥΓΟΣ ΜΕΛΟΥΣ ΔΕΠ"},{dataField:"DoctorMate",caption:"ΣΥΖΥΓΟΣ ΙΑΤΡΙΚΟΥ ΠΡΟΣΩΠΙΚΟΥ"},{dataField:"DiseaseDetails",caption:"ΑΛΛΗ ΑΣΘΕΝΕΙΑ ΙΔΙΟΥ"},{dataField:"MateDiseaseDetails",caption:"ΑΛΛΗ ΑΣΘΕΝΕΙΑ ΣΥΖΥΓΟΥ"},{dataField:"ChildrenDiseaseDetails",caption:"ΑΛΛΗ ΑΣΘΕΝΕΙΑ ΤΕΚΝΩΝ"},{dataField:"ParentDiseaseDetails",caption:"ΑΛΛΗ ΑΣΘΕΝΕΙΑ ΓΟΝΕΩΝ"},{dataField:"BrothersDiseaseDetails",caption:"ΑΛΛΗ ΑΣΘΕΝΕΙΑ ΑΔΕΡΦΩΝ"},{dataField:"IsPriority",caption:"ΚΑΤΑ ΠΡΟΤΕΡΑΙΟΤΗΤΑ"},,{dataField:"BraileKnowledge",caption:"ΓΝΩΣΗ ΓΡΑΦΗΣ BRAILLE"},{dataField:"SignKnowledge",caption:"ΓΝΩΣΗ ΕΝΓ"},{dataField:"AllPoints",caption:"ΣΥΝΟΛΙΚΑ ΜΟΡΙΑ",format:"fixedPoint",precision:"3"},{dataField:"MaritalHealthProblemsPoints",caption:"ΜΟΡΙΑ ΥΓΕΙΑΣ ΟΙΚΟΓΕΝΕΙΑΣ",format:"fixedPoint",precision:"3"},{dataField:"ParentsHealthProblemsPoints",caption:"ΜΟΡΙΑ ΥΓΕΙΑΣ ΓΟΝΕΩΝ",format:"fixedPoint",precision:"3"},{dataField:"BrothersHealthProblemsPoints",caption:"ΜΟΡΙΑ ΥΓΕΙΑΣ ΑΔΕΡΦΩΝ",format:"fixedPoint",precision:"3"},{dataField:"MaritalStatusPoints",caption:"ΜΟΡΙΑ ΟΙΚΟΓΕΝΕΙΑΚΗΣ ΚΑΤΑΣΤΑΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"ExperiencePoints",caption:"ΜΟΡΙΑ ΠΡΟΫΠΗΡΕΣΙΑΣ",format:"fixedPoint",precision:"3"},{dataField:"StudiesPyspdePoints",caption:"ΜΟΡΙΑ ΣΠΟΥΔΩΝ",format:"fixedPoint",precision:"3"},{dataField:"DirectPdfLink",caption:"url ΔΙΚΑΙΟΛΟΓΗΤΙΚΩΝ",cellTemplate:function(n,t){i.isEmptyValue(t.data.DirectPdfLink)||$("<a/> ").addClass("dx-link").text("Δικαιολογητικό").on("dxclick",function(){f.open(t.data.DirectPdfLink,"_blank")}).appendTo(n)}},{dataField:"Pref1",caption:"1η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref1Points",caption:"ΜΟΡΙΑ 1ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"Pref2",caption:"2η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref2Points",caption:"ΜΟΡΙΑ 2ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"Pref3",caption:"3η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref3Points",caption:"ΜΟΡΙΑ 3ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"Pref4",caption:"4η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref4Points",caption:"ΜΟΡΙΑ 4ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"Pref5",caption:"5η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref5Points",caption:"ΜΟΡΙΑ 5ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"Pref6",caption:"6η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref6Points",caption:"ΜΟΡΙΑ 6ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"Pref7",caption:"7η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref7Points",caption:"ΜΟΡΙΑ 7ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"Pref8",caption:"8η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref8Points",caption:"ΜΟΡΙΑ 8ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"Pref9",caption:"9η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref9Points",caption:"ΜΟΡΙΑ 9ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"Pref10",caption:"10η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref10Points",caption:"ΜΟΡΙΑ 10ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"Pref11",caption:"11η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref11Points",caption:"ΜΟΡΙΑ 11ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"Pref12",caption:"12η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref12Points",caption:"ΜΟΡΙΑ 12ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"Pref13",caption:"13η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref13Points",caption:"ΜΟΡΙΑ 13ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"Pref14",caption:"14η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref14Points",caption:"ΜΟΡΙΑ 14ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"Pref15",caption:"15η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref15Points",caption:"ΜΟΡΙΑ 15ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"IsBlocked",caption:"ΚΩΛΥΜΑ ΑΠΟΣΠΑΣΗΣ"},{dataField:"RegionPoints",caption:"ΜΟΡΙΑ ΑΠΟΣΠΑΣΗΣ"},{dataField:"AsPriority",caption:"ΑΠΟΣΠΑΣΗ ΚΑΤΑ ΠΡΟΤΕΡΑΙΟΤΗΤΑ"},{dataField:"PlacementType",caption:"ΤΥΠΟΣ ΤΟΠΟΘΕΤΗΣΗΣ"},{dataField:"placementDescription",caption:"ΠΕΡΙΟΧΗ ΑΠΟΣΠΑΣΗΣ"},];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.getAllPyspdeChurch=function(){n.results=[];var r=i.isValueInArray(i.getRoleCode(n.authentication.role),"a")?n.level:n.authentication.levelId;i.getByParams({level:r},"/api/Export/getAllPyspdeChurch").then(function(t){n.columns=[{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"ApplStatus",caption:"ΚΑΤΑΣΤΑΣΗ ΑΙΤΗΣΗΣ"},{dataField:"fekDetails",caption:"ΕΓΚΥΚΛΙΟΣ ΑΠΟΣΠΑΣΕΩΝ"},{dataField:"ProtocolString",caption:"ΠΡΩΤΟΚΟΛΛΟ"},{dataField:"SubmissionDateString",caption:"ΗΜΕΡΟΜΗΝΙΑ ΥΠΟΒΟΛΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"CreationDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΔΗΜΙΟΥΡΓΙΑΣ ΑΙΤΗΣΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RevaluationDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΕΠΑΝΕΞΕΤΑΣΗΣ ΑΙΤΗΣΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RegistryNo",caption:"ΑΡΙΘΜΟΣ ΜΗΤΡΩΟΥ"},{dataField:"TaxNumber",caption:"ΑΦΜ"},{dataField:"Lastname",caption:"ΕΠΩΝΥΜΟ"},{dataField:"Firstname",caption:"ΟΝΟΜΑ"},{dataField:"FatherFirstname",caption:"ΟΝΟΜΑ ΠΑΤΕΡΑ"},{dataField:"AddressArea",caption:"ΠΟΛΗ"},{dataField:"AddressStreet",caption:"ΟΔΟΣ"},{dataField:"AddressPostCode",caption:"ΤΚ"},{dataField:"Telephone",caption:"ΤΗΛΕΦΩΝΟ"},{dataField:"TelephoneMobile",caption:"ΚΙΝΗΤΟ"},{dataField:"Email",caption:"EMAIL_PERSONAL"},{dataField:"Code",caption:"ΚΛΑΔΟΣ"},{dataField:"spDescription",caption:"ΛΕΚΤΙΚΟ ΚΛΑΔΟΥ"},{dataField:"spgCode",caption:"ΕΙΔΙΚΟΤΗΤΑ"},{dataField:"officialRegionCode",caption:"ΚΩΔΙΚΟΣ ΠΕΡΙΟΧΗΣ ΟΡΓΑΝΙΚΗΣ"},{dataField:"pyspde",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ ΟΡΓΑΝΙΚΗΣ"},{dataField:"officialRegionDescription",caption:"ΠΕΡΙΟΧΗ ΟΡΓΑΝΙΚΗΣ"},{dataField:"OfficialUnitType",caption:"ΤΥΠΟΣ ΟΡΓΑΝΙΚΗΣ"},{dataField:"OfficialPlacementUnitDescription",caption:"ΟΡΓΑΝΙΚΗ ΘΕΣΗ"},{dataField:"belongsToPeriphery",caption:"ΠΕΡΙΦΕΡΕΙΑ ΟΡΓΑΝΙΚΗΣ ΘΕΣΗΣ"},{dataField:"belongsToOffice",caption:"ΔΙΕΥΘΥΝΣΗ ΟΡΓΑΝΙΚΗΣ ΘΕΣΗΣ"},{dataField:"SchoolTelephone",caption:"ΤΗΛΕΦΩΝΟ ΣΧΟΛΕΙΟΥ"},{dataField:"FEKNo",caption:"ΦΕΚ ΔΙΟΡΙΣΜΟΥ"},{dataField:"NominationYear",caption:"ΕΤΟΣ ΔΙΟΡΙΣΜΟΥ"},{dataField:"ExperienceYears",caption:"ΕΤΗ ΥΠΗΡΕΣΙΑΣ"},{dataField:"ExperienceMonths",caption:"ΜΗΝΕΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"ExperienceDays",caption:"ΜΕΡΕΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"Locality",caption:"ΕΝΤΟΠΙΟΤΗΤΑ"},{dataField:"localityPyspdeDescription",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ ΕΝΤΟΠΙΟΤΗΤΑΣ"},{dataField:"MaritalStatus",caption:"ΟΙΚΟΓΕΝΕΙΑΚΗ ΚΑΤΑΣΤΑΣΗ"},{dataField:"UnderAgedOrStudingChildren",caption:"ΑΡΙΘΜΟΣ ΑΝΗΛΙΚΩΝ ΤΕΚΝΩΝ"},{dataField:"StudingChildren",caption:"ΑΡΙΘΜΟΣ ΤΕΚΝΩΝ ΠΟΥ ΣΠΟΥΔΑΖΟΥΝ"},{dataField:"TotalChildren",caption:"ΣΥΝΟΛΙΚΟΣ ΑΡΙΘΜΟΣ ΤΕΚΝΩΝ"},{dataField:"ChildCustody",caption:"ΕΠΙΜΕΛΕΙΑ ΤΕΚΝΩΝ"},{dataField:"MateProfession",caption:"ΕΠΑΓΓΕΛΜΑ ΣΥΖΥΓΟΥ"},{dataField:"HasJoint",caption:"ΣΥΝΥΠΗΡΕΤΗΣΗ"},{dataField:"JointDescription",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ ΣΥΝΥΠΗΡΕΤΗΣΗΣ"},{dataField:"JointExamination",caption:"ΣΥΝΕΞΕΤΑΣΗ ΑΙΤΗΣΗΣ"},{dataField:"MateProtocolNumber",caption:"ΠΡΩΤ ΑΙΤΗΣΗΣ ΣΥΖΥΓΟΥ"},{dataField:"MateRegistryNo",caption:"ΑΡΙΘΜΟΣ ΜΗΤΡΩΟΥ ΣΥΖΥΓΟΥ"},{dataField:"HealthProblems",caption:"ΛΟΓΟΙ ΥΓΕΙΑΣ ΙΔΙΟΥ"},{dataField:"MateHealthProblems",caption:"ΛΟΓΟΙ ΥΓΕΙΑΣ ΣΥΖΥΓΟΥ"},{dataField:"ChildrenHealthProblems",caption:"ΛΟΓΟΙ ΥΓΕΙΑΣ ΤΕΚΝΩΝ"},{dataField:"ParentsHealthProblems",caption:"ΛΟΓΟΙ ΥΓΕΙΑΣ ΓΟΝΕΩΝ"},{dataField:"parentsPyspdeDescription",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ ΓΟΝΕΩΝ"},{dataField:"BrothersHealthProblems",caption:"ΛΟΓΟΙ ΥΓΕΙΑΣ ΑΔΕΡΦΩΝ"},{dataField:"brothersPyspdeDescription",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ ΑΔΕΡΦΩΝ"},{dataField:"InVitroFertilization",caption:"ΕΞΩΣΩΜΑΤΙΚΗ ΓΟΝΙΜΟΠΟΙΗΣΗ"},{dataField:"PostGraduateStudies",caption:"ΜΕΤΑΠΤΥΧΙΑΚΕΣ ΣΠΟΥΔΕΣ"},{dataField:"studiesPyspdeDescription",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ ΣΠΟΥΔΩΝ"},{dataField:"HavingManyChildren",caption:"ΠΟΛΥΤΕΚΝΟΣ"},{dataField:"ASPENumber",caption:"ΑΜ ΑΣΠΕ"},{dataField:"ChildrenInfirmity",caption:"ΓΟΝΕΑΣ ΑΝΑΠΗΡΟΥ ΤΕΚΝΟΥ"},{dataField:"NewPermanentInfirmity",caption:"ΝΕΟΔΙΟΡΙΣΤΟΣ ΜΕ ΠΑ 75 % ΚΑΙ ΑΝΩ ΙΔΙΟΥ Ή ΣΥΖΥΓΟΥ"},{dataField:"HasDisease",caption:"ΕΙΔΙΚΗ ΚΑΤΗΓΟΡΙΑ ΑΣΘΕΝΕΙΑ"},{dataField:"diseases",caption:"ΑΣΘΕΝΕΙΑ"},{dataField:"KEPANums",caption:"ΑΡΙΘΜΟΣ ΜΗΤΡΩΟΥ ΚΕΠΑ"},{dataField:"KEPASanitaryNums",caption:"ΑΡΙΘΜΟΣ ΕΠΙΤΡΟΠΗΣ"},{dataField:"DiseaseDetails",caption:"ΑΛΛΗ ΑΣΘΕΝΕΙΑ ΙΔΙΟΥ"},{dataField:"MateDiseaseDetails",caption:"ΑΛΛΗ ΑΣΘΕΝΕΙΑ ΣΥΖΥΓΟΥ"},{dataField:"ChildrenDiseaseDetails",caption:"ΑΛΛΗ ΑΣΘΕΝΕΙΑ ΤΕΚΝΩΝ"},{dataField:"ParentDiseaseDetails",caption:"ΑΛΛΗ ΑΣΘΕΝΕΙΑ ΓΟΝΕΩΝ"},{dataField:"BrothersDiseaseDetails",caption:"ΑΛΛΗ ΑΣΘΕΝΕΙΑ ΑΔΕΡΦΩΝ"},{dataField:"HealthProblemsKEPANumber",caption:"ΑΜ ΚΕΠΑ ΙΔΙΟΥ"},{dataField:"HealthProblemsKEPASanitaryNumber",caption:"ΑΡΙΘΜΟΣ ΕΠΙΤΡΟΠΗΣ ΚΕΠΑ ΙΔΙΟΥ"},{dataField:"MateHealthProblemsKEPANumber",caption:"ΑΜ ΚΕΠΑ ΣΥΖΥΓΟΥ"},{dataField:"MateHealthProblemsKEPASanitaryNumber",caption:"ΑΡΙΘΜΟΣ ΕΠΙΤΡΟΠΗΣ ΚΕΠΑ ΣΥΖΥΓΟΥ"},{dataField:"ChildrenHealthProblemsKEPANumber",caption:"ΑΜ ΚΕΠΑ ΤΕΚΝΩΝ"},{dataField:"ChildrenHealthProblemsKEPASanitaryNumber",caption:"ΑΡΙΘΜΟΣ ΕΠΙΤΡΟΠΗΣ ΚΕΠΑ ΤΕΚΝΩΝ"},{dataField:"BrothersHealthProblemsKEPANumber",caption:"ΑΜ ΚΕΠΑ ΑΔΕΡΦΩΝ"},{dataField:"BrothersHealthProblemsKEPASanitaryNumber",caption:"ΑΡΙΘΜΟΣ ΕΠΙΤΡΟΠΗΣ ΚΕΠΑ ΑΔΕΡΦΩΝ"},{dataField:"MilitaryMate",caption:"ΣΥΖΥΓΟΣ ΣΤΡΑΤΙΩΤΙΚΟΥ"},{dataField:"ElectiveOTA",caption:"ΑΙΡΕΤΟΣ ΟΤΑ"},{dataField:"JudicialMate",caption:"ΣΥΖΥΓΟΣ ΔΙΚΑΣΤΙΚΟΥ"},{dataField:"DEPMate",caption:"ΣΥΖΥΓΟΣ ΜΕΛΟΥΣ ΔΕΠ"},{dataField:"DoctorMate",caption:"ΣΥΖΥΓΟΣ ΕΠΙΚΟΥΡΙΚΟΥ ΙΑΤΡΟΥ"},{dataField:"NoEducationalExecutive",caption:"Είμαι στέλεχος εκπαίδευσης με θητεία"},{dataField:"NoTenure",caption:"Έχω αποσπαστεί με θητεία"},{dataField:"NoExpiredSecondment",caption:"Είμαι αποσπασμένος σε ΠΥΣΠΕ/ΠΥΣΔΕ ή φορέα"},{dataField:"DirectPdfLink",caption:"url ΔΙΚΑΙΟΛΟΓΗΤΙΚΩΝ",cellTemplate:function(n,t){i.isEmptyValue(t.data.DirectPdfLink)||$("<a/>").addClass("dx-link").text("Δικαιολογητικό").on("dxclick",function(){f.open(t.data.DirectPdfLink,"_blank")}).appendTo(n)}},{dataField:"AllPoints",caption:"ΣΥΝΟΛΙΚΑ ΜΟΡΙΑ",format:"fixedPoint",precision:"3"},{dataField:"MaritalHealthProblemsPoints",caption:"ΜΟΡΙΑ ΥΓΕΙΑΣ ΟΙΚΟΓΕΝΕΙΑΣ",format:"fixedPoint",precision:"3"},{dataField:"ParentsHealthProblemsPoints",caption:"ΜΟΡΙΑ ΥΓΕΙΑΣ ΓΟΝΕΩΝ",format:"fixedPoint",precision:"3"},{dataField:"BrothersHealthProblemsPoints",caption:"ΜΟΡΙΑ ΥΓΕΙΑΣ ΑΔΕΡΦΩΝ",format:"fixedPoint",precision:"3"},{dataField:"MaritalStatusPoints",caption:"ΜΟΡΙΑ ΟΙΚΟΓΕΝΕΙΑΚΗΣ ΚΑΤΑΣΤΑΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"ExperiencePoints",caption:"ΜΟΡΙΑ ΠΡΟΫΠΗΡΕΣΙΑΣ",format:"fixedPoint",precision:"3"},{dataField:"StudiesPyspdePoints",caption:"ΜΟΡΙΑ ΣΠΟΥΔΩΝ",format:"fixedPoint",precision:"3"},{dataField:"Pref1",caption:"1η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref1Points",caption:"ΜΟΡΙΑ 1ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"Pref2",caption:"2η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref2Points",caption:"ΜΟΡΙΑ 2ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"Pref3",caption:"3η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref3Points",caption:"ΜΟΡΙΑ 3ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"Pref4",caption:"4η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref4Points",caption:"ΜΟΡΙΑ 4ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"Pref5",caption:"5η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref5Points",caption:"ΜΟΡΙΑ 5ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"Pref6",caption:"6η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref6Points",caption:"ΜΟΡΙΑ 6ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"Pref7",caption:"7η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref7Points",caption:"ΜΟΡΙΑ 7ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"Pref8",caption:"8η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref8Points",caption:"ΜΟΡΙΑ 8ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"Pref9",caption:"9η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref9Points",caption:"ΜΟΡΙΑ 9ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"Pref10",caption:"10η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref10Points",caption:"ΜΟΡΙΑ 10ης ΠΡΟΤΙΜΗΣΗΣ",format:"fixedPoint",precision:"3"},r==2?{dataField:"AcceptSecondmentToPrimaryAreas",caption:"ΑΠΟΣΠΑΣΗ ΚΑΙ ΣΕ ΑΘΜΙΑ"}:"",{dataField:"CommentsProper",caption:"ΠΑΡΑΤΗΡΗΣΕΙΣ"},{dataField:"CommentsServiceProper",caption:"ΠΑΡΑΤΗΡΗΣΕΙΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"IsConfirmed",caption:"ΕΧΕΙ ΠΑΡΑΛΗΦΘΕΙ"},{dataField:"IsBlocked",caption:"ΚΩΛΥΜΑ ΑΠΟΣΠΑΣΗΣ"},{dataField:"blockDetailsProper",caption:"ΠΕΡΙΓΡΑΦΗ ΚΩΛΥΜΑΤΟΣ"},{dataField:"IsChecked",caption:"ΕΧΕΙ ΕΓΚΡΙΘΕΙ"},{dataField:"logos_epaneksetasis",caption:"Λόγος Επανεξέτασης"},{dataField:"PlacementRegionPoints",caption:"ΜΟΡΙΑ ΑΠΟΣΠΑΣΗΣ",format:"fixedPoint",precision:"3"},{dataField:"PlacementDescription",caption:"ΑΠΟΣΠΑΣΗ"},{dataField:"PlacementTypeDescription",caption:"ΤΥΠΟΣ ΑΠΟΣΠΑΣΗΣ"},];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)})};n.getFolderFamilyStatus=function(){n.results=[];i.getByParams({regionAndUnitId:n.authentication.regionAndUnitId,role:i.getRoleCode(n.authentication.role)},"/api/Export/GetFolderFamilyStatus").then(function(t){n.columns=[{dataField:"Intendancy",caption:"ΔΙΕΥΘΥΝΣΗ"},{dataField:"TaxNumber",caption:"ΑΦΜ"},{dataField:"Lastname",caption:"ΕΠΩΝΥΜΟ"},{dataField:"Firstname",caption:"ΟΝΟΜΑ"},{dataField:"FatherFirstname",caption:"ΟΝΟΜΑ ΠΑΤΕΡΑ"},{dataField:"MotherFirstname",caption:"ΟΝΟΜΑ ΜΗΤΕΡΑΣ"},{dataField:"BirthDate",caption:"ΗΜ. ΓΕΝΝΗΣΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"IdDataType",caption:"ΤΥΠΟΣ ΤΑΥΤΟΤΗΤΑΣ"},{dataField:"IdCardNumber",caption:"Α.Δ.Τ."},{dataField:"Code",caption:"ΚΛΑΔΟΣ"},{dataField:"HavingManyChildren",caption:"ΠΟΛΥΤΕΚΝΟΣ/ΤΡΙΤΕΚΝΟΣ"},{dataField:"IsManyChildrenConfirmed",caption:"ΕΠΙΚΥΡΩΜΕΝΟ"},{dataField:"MunicipalityNumber",caption:"ΑΡ. ΔΗΜΟΤΟΛΟΓΙΟΥ"},{dataField:"KalMunicipality",caption:"ΔΗΜΟΤΙΚΗ ΕΝΟΤΗΤΑ (ΟΙΚΟΓΕΝΕΙΑΚΗΣ ΜΕΡΙΔΑΣ)"},{dataField:"GeographicCompartment",caption:"ΠΕΡΙΦΕΡΕΙΑΚΗ ΕΝΟΤΗΤΑ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)})};n.getFolderAcademicQualification=function(){n.results=[];i.getByParams({regionAndUnitId:n.authentication.regionAndUnitId,role:i.getRoleCode(n.authentication.role)},"/api/Export/GetFolderAcademicQualification").then(function(t){n.columns=[{dataField:"Intendancy",caption:"ΔΙΕΥΘΥΝΣΗ"},{dataField:"TaxNumber",caption:"ΑΦΜ"},{dataField:"Lastname",caption:"ΕΠΩΝΥΜΟ"},{dataField:"Firstname",caption:"ΟΝΟΜΑ"},{dataField:"FatherFirstname",caption:"ΟΝΟΜΑ ΠΑΤΕΡΑ"},{dataField:"Code",caption:"ΚΛΑΔΟI ΕΑΕ"},{dataField:"AcademicQualificationType",caption:"ΑΚΑΔΗΜΑΙΚΟ ΠΡΟΣΟΝ"},{dataField:"DiplomaDate",caption:"ΗΜ/ΝΙΑ ΚΤΗΣΗΣ ΠΤΥΧΙΟΥ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"DiplomaDegree",caption:"ΒΑΘΜΟΣ ΠΤΥΧΙΟΥ"},{dataField:"DiplomaSource",caption:"ΠΡΟΕΛΕΥΣΗ ΠΤΥΧΙΟΥ"},{dataField:"Diploma",caption:"ΤΙΤΛΟΣ ΠΤΥΧΙΟΥ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)})};n.getSecondmentGapExcess=function(){n.results=[];switch(i.getRoleCode(n.authentication.role)){case"a":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSecondmentGapExcess").then(function(t){n.columns=[{dataField:"SecondmentSpecialityCode",caption:"ΚΛΑΔΟΣ"},{dataField:"Description",caption:"ΠΥΣΔΕ/ ΠΥΣΠΕ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"MinistryGap",caption:"ΚΕΝΑ ΥΠΟΥΡΓΕΙΟΥ"},{dataField:"MinistryExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΥΠΟΥΡΓΕΙΟΥ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"p":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSecondmentGapExcess").then(function(t){n.columns=[{dataField:"SecondmentSpecialityCode",caption:"ΚΛΑΔΟΣ"},{dataField:"Description",caption:"ΠΥΣΔΕ/ ΠΥΣΠΕ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"d1":case"d2":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSecondmentGapExcess").then(function(t){n.columns=[{dataField:"SecondmentSpecialityCode",caption:"ΚΛΑΔΟΣ"},{dataField:"Description",caption:"ΠΥΣΔΕ/ ΠΥΣΠΕ"},{dataField:"Gap",caption:"ΚΕΝΑ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"m1":case"m2":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSecondmentGapExcess").then(function(t){n.columns=[{dataField:"SecondmentSpecialityCode",caption:"ΚΛΑΔΟΣ"},{dataField:"Description",caption:"ΠΥΣΔΕ/ ΠΥΣΠΕ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"MinistryGap",caption:"ΚΕΝΑ ΥΠΟΥΡΓΕΙΟΥ"},{dataField:"MinistryExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΥΠΟΥΡΓΕΙΟΥ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;default:t.pop("warning"," Αδύνατη αναζήτηση","Πρέπει να συμπληρώσετε όλα τα υποχρεωτικά πεδία για την αναζήτηση")}};n.getSecondmentSmeaGapExcess=function(){n.results=[];switch(i.getRoleCode(n.authentication.role)){case"a":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSecondmentSmeaGapExcess").then(function(t){n.columns=[{dataField:"SecondmentSpecialityCode",caption:"ΚΛΑΔΟΣ"},{dataField:"Description",caption:"ΠΥΣΔΕ/ ΠΥΣΠΕ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"MinistryGap",caption:"ΚΕΝΑ ΥΠΟΥΡΓΕΙΟΥ"},{dataField:"MinistryExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΥΠΟΥΡΓΕΙΟΥ"},{dataField:"SmeaType",caption:"ΤΥΠΟΣ ΣΜΕΑΕ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"p":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSecondmentSmeaGapExcess").then(function(t){n.columns=[{dataField:"SecondmentSpecialityCode",caption:"ΚΛΑΔΟΣ"},{dataField:"Description",caption:"ΠΥΣΔΕ/ ΠΥΣΠΕ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"SmeaType",caption:"ΤΥΠΟΣ ΣΜΕΑΕ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"d1":case"d2":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSecondmentSmeaGapExcess").then(function(t){n.columns=[{dataField:"SecondmentSpecialityCode",caption:"ΚΛΑΔΟΣ"},{dataField:"Description",caption:"ΠΥΣΔΕ/ ΠΥΣΠΕ"},{dataField:"Gap",caption:"ΚΕΝΑ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ"},{dataField:"SmeaType",caption:"ΤΥΠΟΣ ΣΜΕΑΕ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"m1":case"m2":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSecondmentSmeaGapExcess").then(function(t){n.columns=[{dataField:"SecondmentSpecialityCode",caption:"ΚΛΑΔΟΣ"},{dataField:"Description",caption:"ΠΥΣΔΕ/ ΠΥΣΠΕ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"MinistryGap",caption:"ΚΕΝΑ ΥΠΟΥΡΓΕΙΟΥ"},{dataField:"MinistryExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΥΠΟΥΡΓΕΙΟΥ"},{dataField:"SmeaType",caption:"ΤΥΠΟΣ ΣΜΕΑΕ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;default:t.pop("warning"," Αδύνατη αναζήτηση","Πρέπει να συμπληρώσετε όλα τα υποχρεωτικά πεδία για την αναζήτηση")}};n.getSecondmentKEDASYGapExcess=function(){n.results=[];switch(i.getRoleCode(n.authentication.role)){case"a":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSecondmentKEDASYGapExcess").then(function(t){n.columns=[{dataField:"SecondmentSpecialityCode",caption:"ΚΛΑΔΟΣ"},{dataField:"Description",caption:"ΠΥΣΔΕ/ ΠΥΣΠΕ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"MinistryGap",caption:"ΚΕΝΑ ΥΠΟΥΡΓΕΙΟΥ"},{dataField:"MinistryExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΥΠΟΥΡΓΕΙΟΥ"},{dataField:"SmeaType",caption:"ΤΥΠΟΣ ΣΜΕΑΕ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"p":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSecondmentKEDASYGapExcess").then(function(t){n.columns=[{dataField:"SecondmentSpecialityCode",caption:"ΚΛΑΔΟΣ"},{dataField:"Description",caption:"ΠΥΣΔΕ/ ΠΥΣΠΕ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"SmeaType",caption:"ΤΥΠΟΣ ΣΜΕΑΕ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"d1":case"d2":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSecondmentKEDASYGapExcess").then(function(t){n.columns=[{dataField:"SecondmentSpecialityCode",caption:"ΚΛΑΔΟΣ"},{dataField:"Description",caption:"ΠΥΣΔΕ/ ΠΥΣΠΕ"},{dataField:"Gap",caption:"ΚΕΝΑ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ"},{dataField:"SmeaType",caption:"ΤΥΠΟΣ ΣΜΕΑΕ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"m1":case"m2":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSecondmentKEDASYGapExcess").then(function(t){n.columns=[{dataField:"SecondmentSpecialityCode",caption:"ΚΛΑΔΟΣ"},{dataField:"Description",caption:"ΠΥΣΔΕ/ ΠΥΣΠΕ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"MinistryGap",caption:"ΚΕΝΑ ΥΠΟΥΡΓΕΙΟΥ"},{dataField:"MinistryExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΥΠΟΥΡΓΕΙΟΥ"},{dataField:"SmeaType",caption:"ΤΥΠΟΣ ΣΜΕΑΕ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;default:t.pop("warning"," Αδύνατη αναζήτηση","Πρέπει να συμπληρώσετε όλα τα υποχρεωτικά πεδία για την αναζήτηση")}};n.getSecondmentEEPEBPGapExcess=function(){n.results=[];switch(i.getRoleCode(n.authentication.role)){case"a":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSecondmentEEPEBPGapExcess").then(function(t){n.columns=[{dataField:"SecondmentSpecialityCode",caption:"ΚΛΑΔΟΣ"},{dataField:"Description",caption:"ΠΕΡΙΟΧΗ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"MinistryGap",caption:"ΚΕΝΑ ΥΠΟΥΡΓΕΙΟΥ"},{dataField:"MinistryExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΥΠΟΥΡΓΕΙΟΥ"},{dataField:"SmeaType",caption:"ΤΥΠΟΣ ΕΕΠ-ΕΒΠ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"p":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSecondmentEEPEBPGapExcess").then(function(t){n.columns=[{dataField:"SecondmentSpecialityCode",caption:"ΚΛΑΔΟΣ"},{dataField:"Description",caption:"ΠΕΡΙΟΧΗ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"SmeaType",caption:"ΤΥΠΟΣ ΕΕΠ-ΕΒΠ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"d1":case"d2":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSecondmentEEPEBPGapExcess").then(function(t){n.columns=[{dataField:"SecondmentSpecialityCode",caption:"ΚΛΑΔΟΣ"},{dataField:"Description",caption:"ΠΥΣΔΕ/ ΠΥΣΠΕ"},{dataField:"Gap",caption:"ΚΕΝΑ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ"},{dataField:"SmeaType",caption:"ΤΥΠΟΣ ΕΕΠ-ΕΒΠ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"m1":case"m2":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSecondmentEEPEBPGapExcess").then(function(t){n.columns=[{dataField:"SecondmentSpecialityCode",caption:"ΚΛΑΔΟΣ"},{dataField:"Description",caption:"ΠΥΣΔΕ/ ΠΥΣΠΕ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"MinistryGap",caption:"ΚΕΝΑ ΥΠΟΥΡΓΕΙΟΥ"},{dataField:"MinistryExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΥΠΟΥΡΓΕΙΟΥ"},{dataField:"SmeaType",caption:"ΤΥΠΟΣ ΕΕΠ-ΕΒΠ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;default:t.pop("warning"," Αδύνατη αναζήτηση","Πρέπει να συμπληρώσετε όλα τα υποχρεωτικά πεδία για την αναζήτηση")}};n.getSecondmentBodyRecallReviewObjection=function(){n.results=[];i.getByAll("/api/Export/GetSecondmentBodyRecallReviewObjection").then(function(t){n.columns=[{dataField:"TypeActionDescription",caption:"ΤΥΠΟΣ ΑΙΤΗΜΑΤΟΣ"},{dataField:"IsActive",caption:"ΚΑΤΑΣΤΑΣΗ ΑΙΤΗΣΗΣ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ ΕΚΠΑΙΔΕΥΣΗΣ"},{dataField:"ProtocolString",caption:"ΑΡ. ΠΡΩΤ."},{dataField:"CreationDate",caption:"ΗΜ/ΝΙΑ ΥΠΟΒΟΛΗΣ"},{dataField:"RegistryNo",caption:"ΑΡΙΘΜΟΣ ΜΗΤΡΩΟΥ"},{dataField:"Lastname",caption:"ΕΠΩΝΥΜΟ"},{dataField:"Firstname",caption:"ΟΝΟΜΑ"},{dataField:"SpecialityCode",caption:"ΚΛΑΔΟΣ"},{dataField:"SpecialityDescription",caption:"ΛΕΚΤΙΚΟ ΚΛΑΔΟΥ"},{dataField:"SpecialityGroupCode",caption:"ΟΜΑΔ. ΕΙΔΙΚΟΤΗΤΑ"},{dataField:"ActionDescription",caption:"ΠΕΡΙΓΡΑΦΗ ΑΙΤΗΜΑΤΟΣ"},{dataField:"MainBody",caption:"ΦΟΡΕΑΣ ΑΠΟΣΠΑΣΗΣ"},{dataField:"OtherBodySelection",caption:"ΑΛΛΟΣ ΦΟΡΕΑΣ / ΤΜΗΜΑ"},{dataField:"SubBody1",caption:"ΕΠΙΛΟΓΗ 1 ΦΟΡΕΑ"},{dataField:"Selection1",caption:"ΠΡΟΤΙΜΗΣΗ 1 ΦΟΡΕΑ"},{dataField:"Selection2",caption:"ΠΡΟΤΙΜΗΣΗ 2 ΦΟΡΕΑ"},{dataField:"Selection3",caption:"ΠΡΟΤΙΜΗΣΗ 3 ΦΟΡΕΑ"},{dataField:"OfficialUnitType",caption:"ΤΥΠΟΣ ΟΡΓΑΝΙΚΗΣ"},{dataField:"OfficialPlacementUnitDescription",caption:"ΔΙΕΥΘΥΝΣΗ ΟΡΓΑΝΙΚΗΣ ΘΕΣΗΣ"},{dataField:"OfficialUnitPyspde",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ ΟΡΓΑΝΙΚΗΣ"},{dataField:"OfficialRegionDescription",caption:"ΠΕΡΙΟΧΗ ΜΕΤΑΘΕΣΗΣ ΟΡΓΑΝΙΚΗΣ"}];n.results=t;var r=n.useMK_AllowBodies;switch(i.getRoleCode(n.authentication.role)){case"mk":n.results=n.results.filter(function(n){return r.includes(n.MainBodyId)});break;case"m1":case"m2":n.results=n.results.filter(function(n){return!r.includes(n.MainBodyId)})}},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)})};n.getSecondmentBodyRefRecallReviewObjection=function(){n.results=[];n.showMessageForResults=!1;i.getByAll("/api/Export/GetSecondmentBodyRefRecallReviewObjection").then(function(t){n.columns=[{dataField:"TypeActionDescription",caption:"ΤΥΠΟΣ ΑΙΤΗΜΑΤΟΣ"},{dataField:"IsActive",caption:"ΚΑΤΑΣΤΑΣΗ ΑΙΤΗΣΗΣ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ ΕΚΠΑΙΔΕΥΣΗΣ"},{dataField:"ProtocolString",caption:"ΑΡ. ΠΡΩΤ."},{dataField:"CreationDate",caption:"ΗΜ/ΝΙΑ ΥΠΟΒΟΛΗΣ"},{dataField:"RegistryNo",caption:"ΑΡΙΘΜΟΣ ΜΗΤΡΩΟΥ"},{dataField:"Lastname",caption:"ΕΠΩΝΥΜΟ"},{dataField:"Firstname",caption:"ΟΝΟΜΑ"},{dataField:"SpecialityCode",caption:"ΚΛΑΔΟΣ"},{dataField:"SpecialityDescription",caption:"ΛΕΚΤΙΚΟ ΚΛΑΔΟΥ"},{dataField:"SpecialityGroupCode",caption:"ΟΜΑΔ. ΕΙΔΙΚΟΤΗΤΑ"},{dataField:"ActionDescription",caption:"ΠΕΡΙΓΡΑΦΗ ΑΙΤΗΜΑΤΟΣ"},{dataField:"MainBody",caption:"ΦΟΡΕΑΣ ΑΠΟΣΠΑΣΗΣ"},{dataField:"Prefecture",caption:"ΠΕΡΙΦΕΡΕΙΑ"},{dataField:"OfficialUnitType",caption:"ΤΥΠΟΣ ΟΡΓΑΝΙΚΗΣ"},{dataField:"OfficialPlacementUnitDescription",caption:"ΔΙΕΥΘΥΝΣΗ ΟΡΓΑΝΙΚΗΣ ΘΕΣΗΣ"},{dataField:"OfficialUnitPyspde",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ ΟΡΓΑΝΙΚΗΣ"},{dataField:"OfficialRegionDescription",caption:"ΠΕΡΙΟΧΗ ΜΕΤΑΘΕΣΗΣ ΟΡΓΑΝΙΚΗΣ"},{dataField:"PerApospasis",caption:"ΚΕΝΤΡΟ ΑΠΟΣΠΑΣΗΣ"}];n.results=t;n.showMessageForResults=n.results.length>0?!1:!0},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)})};n.getSecondmentMusicRecallReviewObjection=function(){n.results=[];n.showMessageForResults=!1;i.getByAll("/api/Export/GetSecondmentMusicRecallReviewObjection").then(function(t){n.columns=[{dataField:"TypeActionDescription",caption:"ΤΥΠΟΣ ΑΙΤΗΜΑΤΟΣ"},{dataField:"IsActive",caption:"ΚΑΤΑΣΤΑΣΗ ΑΙΤΗΣΗΣ"},{dataField:"ProtocolString",caption:"ΑΡ. ΠΡΩΤ."},{dataField:"CreationDate",caption:"ΗΜ/ΝΙΑ ΥΠΟΒΟΛΗΣ"},{dataField:"RegistryNo",caption:"ΑΡΙΘΜΟΣ ΜΗΤΡΩΟΥ"},{dataField:"Lastname",caption:"ΕΠΩΝΥΜΟ"},{dataField:"Firstname",caption:"ΟΝΟΜΑ"},{dataField:"Email",caption:"Email"},{dataField:"SpecialityCode",caption:"ΕΙΔΙΚΟΤΗΤΑ"},{dataField:"SpecialityDescription",caption:"ΛΕΚΤΙΚΟ ΕΙΔΙΚΟΤΗΤΑΣ"},{dataField:"ActionDescription",caption:"ΠΕΡΙΓΡΑΦΗ ΑΙΤΗΜΑΤΟΣ"},{dataField:"OfficialUnitType",caption:"ΤΥΠΟΣ ΟΡΓΑΝΙΚΗΣ"},{dataField:"OfficialPlacementUnitDescription",caption:"ΔΙΕΥΘΥΝΣΗ ΟΡΓΑΝΙΚΗΣ ΘΕΣΗΣ"},{dataField:"OfficialUnitPyspde",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ ΟΡΓΑΝΙΚΗΣ"},{dataField:"OfficialRegionDescription",caption:"ΠΕΡΙΟΧΗ ΜΕΤΑΘΕΣΗΣ ΟΡΓΑΝΙΚΗΣ"},{dataField:"Pref1",caption:"ΠΡΟΤΙΜΗΣΗ 1"},{dataField:"Pref2",caption:"ΠΡΟΤΙΜΗΣΗ 2"},{dataField:"Pref3",caption:"ΠΡΟΤΙΜΗΣΗ 3"},{dataField:"Pref4",caption:"ΠΡΟΤΙΜΗΣΗ 4"},{dataField:"Pref5",caption:"ΠΡΟΤΙΜΗΣΗ 5"},{dataField:"Secondment",caption:"ΑΠΟΣΠΑΣΗ"},{dataField:"SecondmentRegion",caption:"ΠΕΡΙΟΧΗ ΑΠΟΣΠΑΣΗΣ"},{dataField:"SecondmentType",caption:"ΤΥΠΟΣ ΑΠΟΣΠΑΣΗΣ"}];n.results=t;n.showMessageForResults=n.results.length>0?!1:!0},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)})};n.getSecondmentArtisticRecallReviewObjection=function(){n.results=[];n.showMessageForResults=!1;i.getByAll("/api/Export/GetSecondmentArtisticRecallReviewObjection").then(function(t){n.columns=[{dataField:"TypeActionDescription",caption:"ΤΥΠΟΣ ΑΙΤΗΜΑΤΟΣ"},{dataField:"IsActive",caption:"ΚΑΤΑΣΤΑΣΗ ΑΙΤΗΣΗΣ"},{dataField:"ProtocolString",caption:"ΑΡ. ΠΡΩΤ."},{dataField:"CreationDate",caption:"ΗΜ/ΝΙΑ ΥΠΟΒΟΛΗΣ"},{dataField:"RegistryNo",caption:"ΑΡΙΘΜΟΣ ΜΗΤΡΩΟΥ"},{dataField:"Lastname",caption:"ΕΠΩΝΥΜΟ"},{dataField:"Firstname",caption:"ΟΝΟΜΑ"},{dataField:"Email",caption:"Email"},{dataField:"SpecialityCode",caption:"ΕΙΔΙΚΟΤΗΤΑ"},{dataField:"SpecialityDescription",caption:"ΛΕΚΤΙΚΟ ΕΙΔΙΚΟΤΗΤΑΣ"},{dataField:"ActionDescription",caption:"ΠΕΡΙΓΡΑΦΗ ΑΙΤΗΜΑΤΟΣ"},{dataField:"OfficialUnitType",caption:"ΤΥΠΟΣ ΟΡΓΑΝΙΚΗΣ"},{dataField:"OfficialPlacementUnitDescription",caption:"ΔΙΕΥΘΥΝΣΗ ΟΡΓΑΝΙΚΗΣ ΘΕΣΗΣ"},{dataField:"OfficialUnitPyspde",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ ΟΡΓΑΝΙΚΗΣ"},{dataField:"OfficialRegionDescription",caption:"ΠΕΡΙΟΧΗ ΜΕΤΑΘΕΣΗΣ ΟΡΓΑΝΙΚΗΣ"},{dataField:"Pref1",caption:"ΠΡΟΤΙΜΗΣΗ 1"},{dataField:"Pref2",caption:"ΠΡΟΤΙΜΗΣΗ 2"},{dataField:"Pref3",caption:"ΠΡΟΤΙΜΗΣΗ 3"},{dataField:"Secondment",caption:"ΑΠΟΣΠΑΣΗ"},{dataField:"SecondmentRegion",caption:"ΠΕΡΙΟΧΗ ΑΠΟΣΠΑΣΗΣ"},{dataField:"SecondmentType",caption:"ΤΥΠΟΣ ΑΠΟΣΠΑΣΗΣ"}];n.results=t;n.showMessageForResults=n.results.length>0?!1:!0},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)})};n.getSubstituteGapExcess=function(){n.results=[];switch(i.getRoleCode(n.authentication.role)){case"a":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSubstituteGapExcess").then(function(t){n.columns=[{dataField:"SpecialityOrGroupCode",caption:"ΚΛΑΔΟΣ"},{dataField:"PrefectureDescription",caption:"ΠΕΡΙΦΕΡΕΙΑ"},{dataField:"RegionAndUnitDescription",caption:"ΠΕΡΙΟΧΗ"},{dataField:"IsFullDescription",caption:"ΤΥΠΟΣ ΩΡΑΡΙΟΥ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"GapType",caption:"ΤΥΠΟΣ ΚΕΝΟΥ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"MinistryGap",caption:"ΚΕΝΑ ΥΠΟΥΡΓΕΙΟΥ"},{dataField:"MinistryExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΥΠΟΥΡΓΕΙΟΥ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"p":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSubstituteGapExcess").then(function(t){n.columns=[{dataField:"SpecialityOrGroupCode",caption:"ΚΛΑΔΟΣ"},{dataField:"RegionAndUnitDescription",caption:"ΠΕΡΙΟΧΗ"},{dataField:"IsFullDescription",caption:"ΤΥΠΟΣ ΩΡΑΡΙΟΥ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"GapType",caption:"ΤΥΠΟΣ ΚΕΝΟΥ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"d1":case"d2":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSubstituteGapExcess").then(function(t){n.columns=[{dataField:"SpecialityOrGroupCode",caption:"ΚΛΑΔΟΣ"},{dataField:"RegionAndUnitDescription",caption:"ΠΕΡΙΟΧΗ"},{dataField:"IsFullDescription",caption:"ΤΥΠΟΣ ΩΡΑΡΙΟΥ"},{dataField:"GapType",caption:"ΤΥΠΟΣ ΚΕΝΟΥ"},{dataField:"Gap",caption:"ΚΕΝΑ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"m1":case"m2":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSubstituteGapExcess").then(function(t){n.columns=[{dataField:"SpecialityOrGroupCode",caption:"ΚΛΑΔΟΣ"},{dataField:"PrefectureDescription",caption:"ΠΕΡΙΦΕΡΕΙΑ"},{dataField:"RegionAndUnitDescription",caption:"ΠΕΡΙΟΧΗ"},{dataField:"IsFullDescription",caption:"ΤΥΠΟΣ ΩΡΑΡΙΟΥ"},{dataField:"GapType",caption:"ΤΥΠΟΣ ΚΕΝΟΥ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"MinistryGap",caption:"ΚΕΝΑ ΥΠΟΥΡΓΕΙΟΥ"},{dataField:"MinistryExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΥΠΟΥΡΓΕΙΟΥ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;default:t.pop("warning"," Αδύνατη αναζήτηση","Πρέπει να συμπληρώσετε όλα τα υποχρεωτικά πεδία για την αναζήτηση")}};n.getSubstituteSMEAEGapExcess=function(){n.results=[];switch(i.getRoleCode(n.authentication.role)){case"a":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSubstituteSMEAEGapExcess").then(function(t){n.columns=[{dataField:"SpecialityOrGroupCode",caption:"ΚΛΑΔΟΣ"},{dataField:"PrefectureDescription",caption:"ΠΕΡΙΦΕΡΕΙΑ"},{dataField:"RegionAndUnitDescription",caption:"ΠΕΡΙΟΧΗ"},{dataField:"IsFullDescription",caption:"ΤΥΠΟΣ ΩΡΑΡΙΟΥ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"SMEAType",caption:"ΤΥΠΟΣ ΣΜΕΑΕ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"MinistryGap",caption:"ΚΕΝΑ ΥΠΟΥΡΓΕΙΟΥ"},{dataField:"MinistryExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΥΠΟΥΡΓΕΙΟΥ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"p":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSubstituteSMEAEGapExcess").then(function(t){n.columns=[{dataField:"SpecialityOrGroupCode",caption:"ΚΛΑΔΟΣ"},{dataField:"RegionAndUnitDescription",caption:"ΠΕΡΙΟΧΗ"},{dataField:"IsFullDescription",caption:"ΤΥΠΟΣ ΩΡΑΡΙΟΥ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"SMEAType",caption:"ΤΥΠΟΣ ΣΜΕΑΕ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"d1":case"d2":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSubstituteSMEAEGapExcess").then(function(t){n.columns=[{dataField:"SpecialityOrGroupCode",caption:"ΚΛΑΔΟΣ"},{dataField:"RegionAndUnitDescription",caption:"ΠΕΡΙΟΧΗ"},{dataField:"IsFullDescription",caption:"ΤΥΠΟΣ ΩΡΑΡΙΟΥ"},{dataField:"SMEAType",caption:"ΤΥΠΟΣ ΣΜΕΑΕ"},{dataField:"Gap",caption:"ΚΕΝΑ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"m1":case"m2":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSubstituteSMEAEGapExcess").then(function(t){n.columns=[{dataField:"SpecialityOrGroupCode",caption:"ΚΛΑΔΟΣ"},{dataField:"PrefectureDescription",caption:"ΠΕΡΙΦΕΡΕΙΑ"},{dataField:"RegionAndUnitDescription",caption:"ΠΕΡΙΟΧΗ"},{dataField:"IsFullDescription",caption:"ΤΥΠΟΣ ΩΡΑΡΙΟΥ"},{dataField:"SMEAType",caption:"ΤΥΠΟΣ ΣΜΕΑΕ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"MinistryGap",caption:"ΚΕΝΑ ΥΠΟΥΡΓΕΙΟΥ"},{dataField:"MinistryExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΥΠΟΥΡΓΕΙΟΥ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;default:t.pop("warning"," Αδύνατη αναζήτηση","Πρέπει να συμπληρώσετε όλα τα υποχρεωτικά πεδία για την αναζήτηση")}};n.getSubstituteEEPEBPGapExcess=function(){n.results=[];switch(i.getRoleCode(n.authentication.role)){case"a":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSubstituteEEPEBPGapExcess").then(function(t){n.columns=[{dataField:"SpecialityOrGroupCode",caption:"ΚΛΑΔΟΣ"},{dataField:"PrefectureDescription",caption:"ΠΕΡΙΦΕΡΕΙΑ"},{dataField:"RegionAndUnitDescription",caption:"ΠΕΡΙΟΧΗ"},{dataField:"IsFullDescription",caption:"ΤΥΠΟΣ ΩΡΑΡΙΟΥ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"GapType",caption:"ΤΥΠΟΣ ΚΕΝΟΥ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"MinistryGap",caption:"ΚΕΝΑ ΥΠΟΥΡΓΕΙΟΥ"},{dataField:"MinistryExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΥΠΟΥΡΓΕΙΟΥ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"p":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSubstituteEEPEBPGapExcess").then(function(t){n.columns=[{dataField:"SpecialityOrGroupCode",caption:"ΚΛΑΔΟΣ"},{dataField:"RegionAndUnitDescription",caption:"ΠΕΡΙΟΧΗ"},{dataField:"IsFullDescription",caption:"ΤΥΠΟΣ ΩΡΑΡΙΟΥ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"GapType",caption:"ΤΥΠΟΣ ΚΕΝΟΥ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"d1":case"d2":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSubstituteEEPEBPGapExcess").then(function(t){n.columns=[{dataField:"SpecialityOrGroupCode",caption:"ΚΛΑΔΟΣ"},{dataField:"RegionAndUnitDescription",caption:"ΠΕΡΙΟΧΗ"},{dataField:"IsFullDescription",caption:"ΤΥΠΟΣ ΩΡΑΡΙΟΥ"},{dataField:"GapType",caption:"ΤΥΠΟΣ ΚΕΝΟΥ"},{dataField:"Gap",caption:"ΚΕΝΑ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"m1":case"m2":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSubstituteEEPEBPGapExcess").then(function(t){n.columns=[{dataField:"SpecialityOrGroupCode",caption:"ΚΛΑΔΟΣ"},{dataField:"PrefectureDescription",caption:"ΠΕΡΙΦΕΡΕΙΑ"},{dataField:"RegionAndUnitDescription",caption:"ΠΕΡΙΟΧΗ"},{dataField:"IsFullDescription",caption:"ΤΥΠΟΣ ΩΡΑΡΙΟΥ"},{dataField:"GapType",caption:"ΤΥΠΟΣ ΚΕΝΟΥ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"MinistryGap",caption:"ΚΕΝΑ ΥΠΟΥΡΓΕΙΟΥ"},{dataField:"MinistryExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΥΠΟΥΡΓΕΙΟΥ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;default:t.pop("warning"," Αδύνατη αναζήτηση","Πρέπει να συμπληρώσετε όλα τα υποχρεωτικά πεδία για την αναζήτηση")}};n.getSubstituteMusicGapExcess=function(){n.results=[];switch(i.getRoleCode(n.authentication.role)){case"a":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId},"/api/Export/GetSubstituteMusicGapExcess").then(function(t){n.columns=[{dataField:"MusicSpecialistDescription",caption:"ΜΟΥΣΙΚΗ ΕΙΔΙΚΕΥΣΗ"},{dataField:"PrefectureDescription",caption:"ΠΕΡΙΦΕΡΕΙΑ"},{dataField:"RegionAndUnitDescription",caption:"ΜΟΥΣΙΚΟ ΣΧΟΛΕΙΟ"},{dataField:"IsFullDescription",caption:"ΤΥΠΟΣ ΩΡΑΡΙΟΥ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"MinistryGap",caption:"ΚΕΝΑ ΥΠΟΥΡΓΕΙΟΥ"},{dataField:"MinistryExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΥΠΟΥΡΓΕΙΟΥ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"p":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId},"/api/Export/GetSubstituteMusicGapExcess").then(function(t){n.columns=[{dataField:"MusicSpecialistDescription",caption:"ΜΟΥΣΙΚΗ ΕΙΔΙΚΕΥΣΗ"},{dataField:"RegionAndUnitDescription",caption:"ΜΟΥΣΙΚΟ ΣΧΟΛΕΙΟ"},{dataField:"IsFullDescription",caption:"ΤΥΠΟΣ ΩΡΑΡΙΟΥ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"d2":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId},"/api/Export/GetSubstituteMusicGapExcess").then(function(t){n.columns=[{dataField:"MusicSpecialistDescription",caption:"ΜΟΥΣΙΚΗ ΕΙΔΙΚΕΥΣΗ"},{dataField:"RegionAndUnitDescription",caption:"ΜΟΥΣΙΚΟ ΣΧΟΛΕΙΟ"},{dataField:"IsFullDescription",caption:"ΤΥΠΟΣ ΩΡΑΡΙΟΥ"},{dataField:"Gap",caption:"ΚΕΝΑ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"m2":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId},"/api/Export/GetSubstituteMusicGapExcess").then(function(t){n.columns=[{dataField:"MusicSpecialistDescription",caption:"ΜΟΥΣΙΚΗ ΕΙΔΙΚΕΥΣΗ"},{dataField:"PrefectureDescription",caption:"ΠΕΡΙΦΕΡΕΙΑ"},{dataField:"RegionAndUnitDescription",caption:"ΜΟΥΣΙΚΟ ΣΧΟΛΕΙΟ"},{dataField:"IsFullDescription",caption:"ΤΥΠΟΣ ΩΡΑΡΙΟΥ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"Excess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"PrefectureExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"MinistryGap",caption:"ΚΕΝΑ ΥΠΟΥΡΓΕΙΟΥ"},{dataField:"MinistryExcess",caption:"ΠΛΕΟΝΑΣΜΑΤΑ ΥΠΟΥΡΓΕΙΟΥ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;default:t.pop("warning"," Αδύνατη αναζήτηση","Πρέπει να συμπληρώσετε όλα τα υποχρεωτικά πεδία για την αναζήτηση")}};n.getSubstituteMusicGapHours=function(){n.results=[];i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId},"/api/Export/GetSubstituteMusicGapHours").then(function(t){n.columns=[{dataField:"MusicSpecialistDescription",caption:"ΜΟΥΣΙΚΗ ΕΙΔΙΚΕΥΣΗ"},{dataField:"PrefectureDescription",caption:"ΠΕΡΙΦΕΡΕΙΑ"},{dataField:"IntendancyDescription",caption:"ΔΙΕΥΘΥΝΣΗ"},{dataField:"RegionAndUnitDescription",caption:"ΜΟΥΣΙΚΟ ΣΧΟΛΕΙΟ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)})};n.getSubstituteGapsHoursPerSchoolExport=function(){n.results=[];i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSubstituteGapsHoursPerSchoolExport").then(function(t){n.columns=[{dataField:"GapType",caption:"ΤΥΠΟΣ ΚΕΝΟΥ"},{dataField:"peri",caption:"ΠΕΡΙΦΕΡΕΙΑ"},{dataField:"dief",caption:"ΔΙΕΥΘΥΝΣΗ"},{dataField:"perioxi",caption:"ΠΕΡΙΟΧΗ"},{dataField:"orario",caption:"ΩΡΑΡΙΟ"},{dataField:"synores",caption:"ΩΡΕΣ"},{dataField:"eidikotita",caption:"ΕΙΔΙΚΟΤΗΤΑ"},{dataField:"oresSxoleia",caption:"ΚΑΤΑΧΩΡΙΣΗ",width:300},{dataField:"schTypes",caption:"ΤΥΠΟΙ ΣΧΟΛΕΙΩΝ",width:300},];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)})};n.getSubstituteSmeaeGapsHoursPerSchoolExport=function(){n.results=[];i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSubstituteSmeaeGapsHoursPerSchoolExport").then(function(t){n.columns=[{dataField:"SMEAType",caption:"ΤΥΠΟΣ ΣΜΕΑΕ"},{dataField:"peri",caption:"ΠΕΡΙΦΕΡΕΙΑ"},{dataField:"dief",caption:"ΔΙΕΥΘΥΝΣΗ"},{dataField:"perioxi",caption:"ΠΕΡΙΟΧΗ"},{dataField:"orario",caption:"ΩΡΑΡΙΟ"},{dataField:"synores",caption:"ΩΡΕΣ"},{dataField:"eidikotita",caption:"ΕΙΔΙΚΟΤΗΤΑ"},{dataField:"oresSxoleia",caption:"ΚΑΤΑΧΩΡΙΣΗ",width:300},{dataField:"schTypes",caption:"ΤΥΠΟΙ ΣΧΟΛΕΙΩΝ",width:300},];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)})};n.getSubstituteEEPEBPGapsHoursPerSchoolExport=function(){n.results=[];i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/GetSubstituteEEPEBPGapsHoursPerSchoolExport").then(function(t){n.columns=[{dataField:"peri",caption:"ΠΕΡΙΦΕΡΕΙΑ"},{dataField:"dief",caption:"ΔΙΕΥΘΥΝΣΗ"},{dataField:"SMEAType",caption:"ΤΥΠΟΣ ΣΜΕΑΕ"},{dataField:"perioxi",caption:"ΠΕΡΙΟΧΗ"},{dataField:"orario",caption:"ΩΡΑΡΙΟ"},{dataField:"synores",caption:"ΩΡΕΣ"},{dataField:"eidikotita",caption:"ΕΙΔΙΚΟΤΗΤΑ"},{dataField:"oresSxoleia",caption:"ΚΑΤΑΧΩΡΙΣΗ",width:300},];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)})};n.getSubstituteRecruitmentExport=function(){n.results=[];i.getByParams({regionAndUnitId:n.authentication.regionAndUnitId,role:n.authentication.role,levelId:n.authentication.levelId},"/api/Export/getSubstituteRecruitmentExport").then(function(t){n.columns=[{dataField:"levelDescr",caption:"ΒΑΘΜΙΔΑ ΕΚΠ/ΣΗΣ"},{dataField:"TaxNumber",caption:"ΑΦΜ"},{dataField:"LastName",caption:"ΕΠΩΝΥΜΟ"},{dataField:"FirstName",caption:"ΟΝΟΜΑ"},{dataField:"FatherFirstName",caption:"ΠΑΤΡΩΝΥΜΟ"},{dataField:"speciality",caption:"ΚΛΑΔΟΣ"},{dataField:"specialityGroup",caption:"ΟΜΑΔΑ"},{dataField:"musicSpec",caption:"ΜΟΥΣΙΚΗ ΕΙΔΙΚΕΥΣΗ"},{dataField:"regUnitRecr",caption:"ΠΕΡΙΟΧΗ ΠΡΟΣΛΗΨΗΣ"},{dataField:"ada",caption:"ΑΔΑ ΑΠΟΦΑΣΗΣ ΠΡΟΣΛΗΨΗΣ"},{dataField:"substituteType",caption:"ΤΥΠΟΣ ΠΡΟΣΛΗΨΗΣ"},{dataField:"RecruitmentInfoDescription",caption:"ΠΛΗΡΟΦΟΡΙΕΣ ΠΡΟΣΛΗΨΗΣ"},{dataField:"RecruitmentProtocol",caption:"Υ.Α. ΠΡΟΣΛΗΨΗΣ"},{dataField:"RecruitmentDate",caption:"ΗΜ/ΝΙΑ ΠΡΟΣΛΗΨΗΣ"},{dataField:"payTypeDescr",caption:"ΠΙΣΤΩΣΗ"},{dataField:"OpsEspaCode",caption:"ΚΩΔΙΚΟΣ ΟΠΣ"},{dataField:"anapStatusDescr",caption:"ΚΑΤΑΣΤΑΣΗ"},{dataField:"ResignationDate",caption:"ΗΜ/ΝΙΑ ΠΑΡΑΙΤΗΣΗΣ / ΑΝΑΒΑΘΜΙΣΗΣ / ΛΗΞΗΣ ΣΥΜΒΑΣΗΣ"},{dataField:"ResignationProtocol",caption:"ΑΡ. ΠΡΩΤ. ΠΑΡΑΙΤΗΣΗΣ"},{dataField:"RecallDersc",caption:"Υ.Α. ΑΝΑΚΛΗΣΗΣ"},{dataField:"dief",caption:"Δ/ΝΣΗ ΕΚΠΑΙΔΕΥΣΗΣ"},{dataField:"peri",caption:"ΠΕΡΙΦΕΡΕΙΑ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)})};n.getAllApplSubstituteRemediationExport=function(){n.results=[];switch(i.getRoleCode(n.authentication.role)){case"a":case"m2":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId},"/api/Export/getAllApplSubstituteRemediationExport").then(function(t){n.columns=[{dataField:"rownumber",caption:"Α/Α"},{dataField:"dieuthunsh",caption:"ΔΙΕΥΘΥΝΣΗ ΕΚΠΑΙΔΕΥΣΗΣ"},{dataField:"Code",caption:"ΚΛΑΔΟΣ"},{dataField:"TaxNumber",caption:"ΑΦΜ"},{dataField:"Lastname",caption:"ΕΠΩΝΥΜΟ"},{dataField:"FirstName",caption:"ΟΝΟΜΑ"},{dataField:"FatherFirstName",caption:"ΠΑΤΡΩΝΥΜΟ"},{dataField:"MilitaryService",caption:"ΕΚΠΛΗΡΩΜΕΝΕΣ ΣΤΡΑΤΙΩΤΙΚΕΣ ΥΠΟΧΡΕΩΣΕΙΣ"},{dataField:"seira",caption:"ΣΕΙΡΑ ΠΙΝΑΚΑ"},{dataField:"TotalPoints",caption:"ΜΟΡΙΑ ΠΙΝΑΚΑ"},{dataField:"Telephone",caption:"ΤΗΛΕΦΩΝΟ"},{dataField:"TelephoneMobile",caption:"ΚΙΝΗΤΟ"},{dataField:"Email",caption:"Email"},{dataField:"ProtocolString",caption:"ΑΡ. ΠΡΩΤ. ΑΙΤΗΣΗΣ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"d2":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId},"/api/Export/getAllApplSubstituteRemediationExport").then(function(t){n.columns=[{dataField:"rownumber",caption:"Α/Α"},{dataField:"Code",caption:"ΚΛΑΔΟΣ"},{dataField:"TaxNumber",caption:"ΑΦΜ"},{dataField:"Lastname",caption:"ΕΠΩΝΥΜΟ"},{dataField:"FirstName",caption:"ΟΝΟΜΑ"},{dataField:"FatherFirstName",caption:"ΠΑΤΡΩΝΥΜΟ"},{dataField:"MilitaryService",caption:"ΕΚΠΛΗΡΩΜΕΝΕΣ ΣΤΡΑΤΙΩΤΙΚΕΣ ΥΠΟΧΡΕΩΣΕΙΣ"},{dataField:"seira",caption:"ΣΕΙΡΑ ΠΙΝΑΚΑ"},{dataField:"TotalPoints",caption:"ΜΟΡΙΑ ΠΙΝΑΚΑ"},{dataField:"Telephone",caption:"ΤΗΛΕΦΩΝΟ"},{dataField:"TelephoneMobile",caption:"ΚΙΝΗΤΟ"},{dataField:"Email",caption:"Email"},{dataField:"ProtocolString",caption:"ΑΡ. ΠΡΩΤ. ΑΙΤΗΣΗΣ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;default:t.pop("warning"," Αδύνατη αναζήτηση","Πρέπει να συμπληρώσετε όλα τα υποχρεωτικά πεδία για την αναζήτηση")}};n.getAllApplSubstituteRemediationFromSMEAExport=function(){n.results=[];switch(i.getRoleCode(n.authentication.role)){case"a":case"m2":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId},"/api/Export/getAllApplSubstituteRemediationFromSMEAExport").then(function(t){n.columns=[{dataField:"rownumber",caption:"Α/Α"},{dataField:"dieuthunsh",caption:"ΔΙΕΥΘΥΝΣΗ ΕΚΠΑΙΔΕΥΣΗΣ"},{dataField:"Code",caption:"ΚΛΑΔΟΣ"},{dataField:"TaxNumber",caption:"ΑΦΜ"},{dataField:"Lastname",caption:"ΕΠΩΝΥΜΟ"},{dataField:"FirstName",caption:"ΟΝΟΜΑ"},{dataField:"FatherFirstName",caption:"ΠΑΤΡΩΝΥΜΟ"},{dataField:"MilitaryService",caption:"ΕΚΠΛΗΡΩΜΕΝΕΣ ΣΤΡΑΤΙΩΤΙΚΕΣ ΥΠΟΧΡΕΩΣΕΙΣ"},{dataField:"TableType",caption:"ΠΙΝΑΚΑΣ"},{dataField:"seira",caption:"ΣΕΙΡΑ ΠΙΝΑΚΑ"},{dataField:"TotalPoints",caption:"ΜΟΡΙΑ ΠΙΝΑΚΑ"},{dataField:"Telephone",caption:"ΤΗΛΕΦΩΝΟ"},{dataField:"TelephoneMobile",caption:"ΚΙΝΗΤΟ"},{dataField:"Email",caption:"Email"},{dataField:"ProtocolString",caption:"ΑΡ. ΠΡΩΤ. ΑΙΤΗΣΗΣ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"d2":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId},"/api/Export/getAllApplSubstituteRemediationFromSMEAExport").then(function(t){n.columns=[{dataField:"rownumber",caption:"Α/Α"},{dataField:"Code",caption:"ΚΛΑΔΟΣ"},{dataField:"TaxNumber",caption:"ΑΦΜ"},{dataField:"Lastname",caption:"ΕΠΩΝΥΜΟ"},{dataField:"FirstName",caption:"ΟΝΟΜΑ"},{dataField:"FatherFirstName",caption:"ΠΑΤΡΩΝΥΜΟ"},{dataField:"MilitaryService",caption:"ΕΚΠΛΗΡΩΜΕΝΕΣ ΣΤΡΑΤΙΩΤΙΚΕΣ ΥΠΟΧΡΕΩΣΕΙΣ"},{dataField:"TableType",caption:"ΠΙΝΑΚΑΣ"},{dataField:"seira",caption:"ΣΕΙΡΑ ΠΙΝΑΚΑ"},{dataField:"TotalPoints",caption:"ΜΟΡΙΑ ΠΙΝΑΚΑ"},{dataField:"Telephone",caption:"ΤΗΛΕΦΩΝΟ"},{dataField:"TelephoneMobile",caption:"ΚΙΝΗΤΟ"},{dataField:"Email",caption:"Email"},{dataField:"ProtocolString",caption:"ΑΡ. ΠΡΩΤ. ΑΙΤΗΣΗΣ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;default:t.pop("warning"," Αδύνατη αναζήτηση","Πρέπει να συμπληρώσετε όλα τα υποχρεωτικά πεδία για την αναζήτηση")}};n.getAllApplSubstituteRemediationFromMusicExport=function(){n.results=[];switch(i.getRoleCode(n.authentication.role)){case"a":case"m2":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId},"/api/Export/getAllApplSubstituteRemediationFromMusicExport").then(function(t){n.columns=[{dataField:"rownumber",caption:"Α/Α"},{dataField:"dieuthunsh",caption:"ΔΙΕΥΘΥΝΣΗ ΕΚΠΑΙΔΕΥΣΗΣ"},{dataField:"Code",caption:"ΚΛΑΔΟΣ"},{dataField:"TaxNumber",caption:"ΑΦΜ"},{dataField:"Lastname",caption:"ΕΠΩΝΥΜΟ"},{dataField:"FirstName",caption:"ΟΝΟΜΑ"},{dataField:"FatherFirstName",caption:"ΠΑΤΡΩΝΥΜΟ"},{dataField:"MilitaryService",caption:"ΕΚΠΛΗΡΩΜΕΝΕΣ ΣΤΡΑΤΙΩΤΙΚΕΣ ΥΠΟΧΡΕΩΣΕΙΣ"},{dataField:"seira",caption:"ΣΕΙΡΑ ΠΙΝΑΚΑ"},{dataField:"TotalPoints",caption:"ΜΟΡΙΑ ΠΙΝΑΚΑ"},{dataField:"Telephone",caption:"ΤΗΛΕΦΩΝΟ"},{dataField:"TelephoneMobile",caption:"ΚΙΝΗΤΟ"},{dataField:"Email",caption:"Email"},{dataField:"ProtocolString",caption:"ΑΡ. ΠΡΩΤ. ΑΙΤΗΣΗΣ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"d2":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId},"/api/Export/getAllApplSubstituteRemediationFromMusicExport").then(function(t){n.columns=[{dataField:"rownumber",caption:"Α/Α"},{dataField:"Code",caption:"ΚΛΑΔΟΣ"},{dataField:"TaxNumber",caption:"ΑΦΜ"},{dataField:"Lastname",caption:"ΕΠΩΝΥΜΟ"},{dataField:"FirstName",caption:"ΟΝΟΜΑ"},{dataField:"FatherFirstName",caption:"ΠΑΤΡΩΝΥΜΟ"},{dataField:"MilitaryService",caption:"ΕΚΠΛΗΡΩΜΕΝΕΣ ΣΤΡΑΤΙΩΤΙΚΕΣ ΥΠΟΧΡΕΩΣΕΙΣ"},{dataField:"seira",caption:"ΣΕΙΡΑ ΠΙΝΑΚΑ"},{dataField:"TotalPoints",caption:"ΜΟΡΙΑ ΠΙΝΑΚΑ"},{dataField:"Telephone",caption:"ΤΗΛΕΦΩΝΟ"},{dataField:"TelephoneMobile",caption:"ΚΙΝΗΤΟ"},{dataField:"Email",caption:"Email"},{dataField:"ProtocolString",caption:"ΑΡ. ΠΡΩΤ. ΑΙΤΗΣΗΣ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;default:t.pop("warning"," Αδύνατη αναζήτηση","Πρέπει να συμπληρώσετε όλα τα υποχρεωτικά πεδία για την αναζήτηση")}};n.getSubstituteRefGapExport=function(){n.results=[];switch(i.getRoleCode(n.authentication.role)){case"a":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/getSubstituteRefGaps").then(function(t){n.columns=[{dataField:"Periferia",caption:"ΠΕΡΙΦΕΡΕΙΑ"},{dataField:"Diefthinsi",caption:"ΔΙΕΥΘΥΝΣΗ ΕΚΠΑΙΔΕΥΣΗΣ"},{dataField:"Code",caption:"ΚΛΑΔΟΣ"},{dataField:"Perioxh",caption:"ΠΕΡΙΟΧΗ"},{dataField:"IsFull",caption:"ΤΥΠΟΣ ΩΡΑΡΙΟΥ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"MinistryGap",caption:"ΚΕΝΑ ΥΠΟΥΡΓΕΙΟΥ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"p":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/getSubstituteRefGaps").then(function(t){n.columns=[{dataField:"Periferia",caption:"ΠΕΡΙΦΕΡΕΙΑ"},{dataField:"Diefthinsi",caption:"ΔΙΕΥΘΥΝΣΗ ΕΚΠΑΙΔΕΥΣΗΣ"},{dataField:"Code",caption:"ΚΛΑΔΟΣ"},{dataField:"Perioxh",caption:"ΠΕΡΙΟΧΗ"},{dataField:"IsFull",caption:"ΤΥΠΟΣ ΩΡΑΡΙΟΥ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"d1":case"d2":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/getSubstituteRefGaps").then(function(t){n.columns=[{dataField:"Periferia",caption:"ΠΕΡΙΦΕΡΕΙΑ"},{dataField:"Diefthinsi",caption:"ΔΙΕΥΘΥΝΣΗ ΕΚΠΑΙΔΕΥΣΗΣ"},{dataField:"Code",caption:"ΚΛΑΔΟΣ"},{dataField:"Perioxh",caption:"ΠΕΡΙΟΧΗ"},{dataField:"IsFull",caption:"ΤΥΠΟΣ ΩΡΑΡΙΟΥ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;case"m1":case"m2":i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/Export/getSubstituteRefGaps").then(function(t){n.columns=[{dataField:"Periferia",caption:"ΠΕΡΙΦΕΡΕΙΑ"},{dataField:"Diefthinsi",caption:"ΔΙΕΥΘΥΝΣΗ ΕΚΠΑΙΔΕΥΣΗΣ"},{dataField:"Code",caption:"ΚΛΑΔΟΣ"},{dataField:"Perioxh",caption:"ΠΕΡΙΟΧΗ"},{dataField:"IsFull",caption:"ΤΥΠΟΣ ΩΡΑΡΙΟΥ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"Gap",caption:"ΚΕΝΑ ΔΙΕΥΘΥΝΣΗΣ"},{dataField:"PrefectureGap",caption:"ΚΕΝΑ ΠΕΡΙΦΕΡΕΙΑΣ"},{dataField:"MinistryGap",caption:"ΚΕΝΑ ΥΠΟΥΡΓΕΙΟΥ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)});break;default:t.pop("warning"," Αδύνατη αναζήτηση","Πρέπει να συμπληρώσετε όλα τα υποχρεωτικά πεδία για την αναζήτηση")}};n.getAllSecondmentGeneralSubApplicationTypeId1=function(){n.results=[];i.getByParams({role:n.authentication.role,levelId:n.authentication.levelId},"/api/Export/getAllSecondmentGeneralSubApplicationTypeId1").then(function(r){if(r.length>0){n.results=r;n.showMusicSchool=!1;for(var u=n.results.length-1;u>=0;u--)if(n.results[u].Code.lastIndexOf("ΠΕ79",0)===0||n.results[u].Code.lastIndexOf("ΤΕ16",0)===0){n.showMusicSchool=!0;break}}else t.pop("warning","Αδυναμία εμφάνισης λίστας","Δεν βρέθηκαν Αιτήσεις με τα κριτήρια που συμπληρώσατε");n.columns=[{dataField:"ApplicationSubType",caption:"ΤΥΠΟΣ ΑΙΤΗΣΗΣ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"ApplStatus",caption:"ΚΑΤΑΣΤΑΣΗ ΑΙΤΗΣΗΣ"},{dataField:"ProtocolNumber",caption:"ΠΡΩΤΟΚΟΛΛΟ"},{dataField:"SubmissionDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΥΠΟΒΟΛΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"CreationDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΔΗΜΙΟΥΡΓΙΑΣ ΑΙΤΗΣΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RegistryNo",caption:"ΑΡΙΘΜΟΣ ΜΗΤΡΩΟΥ"},{dataField:"TaxNumber",caption:"ΑΦΜ"},{dataField:"FEKNo",caption:"ΦΕΚ ΔΙΟΡΙΣΜΟΥ"},{dataField:"FEKDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΔΙΟΡΙΣΜΟΥ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"Lastname",caption:"ΕΠΩΝΥΜΟ"},{dataField:"Firstname",caption:"ΟΝΟΜΑ"},{dataField:"FatherFirstname",caption:"ΟΝΟΜΑ ΠΑΤΕΡΑ"},{dataField:"AddressArea",caption:"ΠΟΛΗ"},{dataField:"AddressStreet",caption:"ΟΔΟΣ"},{dataField:"AddressPostCode",caption:"ΤΚ"},{dataField:"Telephone",caption:"ΤΗΛΕΦΩΝΟ"},{dataField:"TelephoneMobile",caption:"ΚΙΝΗΤΟ"},{dataField:"Email",caption:"EMAIL_PERSONAL"},{dataField:"Code",caption:"ΚΛΑΔΟΣ"},{dataField:"spDescription",caption:"ΛΕΚΤΙΚΟ ΚΛΑΔΟΥ"},{dataField:"didcacticYear",caption:"ΕΤΟΣ ΑΠΟΣΠΑΣΗΣ"},{dataField:"DecisionNumber",caption:"ΑΡΙΘΜΟΣ ΠΡΩΤΟΚΟΛΛΟΥ ΑΠΟΦΑΣΗΣ ΑΠΟΣΠΑΣΗΣ"},{dataField:"PostingTransferAreaUnit",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ Οργανικής"},{dataField:"PostingTransferAreaUnitType",caption:"Τύπος Οργανικής"},{dataField:"NoEducationalExecutive",caption:"Είμαι στέλεχος εκπαίδευσης με θητεία"},{dataField:"NoTenure",caption:"Έχω αποσπαστεί με θητεία"},{dataField:"NoExpiredSecondment",caption:"Είμαι αποσπασμένος σε ΠΥΣΠΕ/ΠΥΣΔΕ ή φορέα"},{dataField:"NoMusicSchool",caption:"Είμαι διορισμένος με αποκλειστική τοποθέτηση σε Μουσικό Σχολείο από το 2006 και μετέπειτα",visible:n.showMusicSchool},{dataField:"urlCV",caption:"url ΒΙΟΓΡΑΦΙΚΟΥ",cellTemplate:function(n,t){i.isEmptyValue(t.data.urlCV)||$("<a/>").addClass("dx-link").text("Βιογραφικό").on("dxclick",function(){f.open(t.data.urlCV,"_blank")}).appendTo(n)}},{dataField:"Comments",caption:"ΛΟΓΟΙ"},{dataField:"CommentsService",caption:"ΠΑΡΑΤΗΡΗΣΕΙΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"AttachmentDetails",caption:"ΠΕΡΙΓΡΑΦΗ ΣΥΝΗΜΜΕΝΩΝ"},]},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.getAllSecondmentGeneralSubApplicationTypeId2=function(){n.results=[];i.getByParams({role:n.authentication.role,levelId:n.authentication.levelId},"/api/Export/getAllSecondmentGeneralSubApplicationTypeId2").then(function(r){if(r.length>0){n.results=r;n.showMusicSchool=!1;for(var u=n.results.length-1;u>=0;u--)if(n.results[u].Code.lastIndexOf("ΠΕ79",0)===0||n.results[u].Code.lastIndexOf("ΤΕ16",0)===0){n.showMusicSchool=!0;break}}else t.pop("warning","Αδυναμία εμφάνισης λίστας","Δεν βρέθηκαν Αιτήσεις με τα κριτήρια που συμπληρώσατε");n.columns=[{dataField:"ApplicationSubType",caption:"ΤΥΠΟΣ ΑΙΤΗΣΗΣ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"ApplStatus",caption:"ΚΑΤΑΣΤΑΣΗ ΑΙΤΗΣΗΣ"},{dataField:"ProtocolNumber",caption:"ΠΡΩΤΟΚΟΛΛΟ"},{dataField:"SubmissionDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΥΠΟΒΟΛΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"CreationDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΔΗΜΙΟΥΡΓΙΑΣ ΑΙΤΗΣΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RegistryNo",caption:"ΑΡΙΘΜΟΣ ΜΗΤΡΩΟΥ"},{dataField:"TaxNumber",caption:"ΑΦΜ"},{dataField:"FEKNo",caption:"ΦΕΚ ΔΙΟΡΙΣΜΟΥ"},{dataField:"FEKDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΔΙΟΡΙΣΜΟΥ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"Lastname",caption:"ΕΠΩΝΥΜΟ"},{dataField:"Firstname",caption:"ΟΝΟΜΑ"},{dataField:"FatherFirstname",caption:"ΟΝΟΜΑ ΠΑΤΕΡΑ"},{dataField:"AddressArea",caption:"ΠΟΛΗ"},{dataField:"AddressStreet",caption:"ΟΔΟΣ"},{dataField:"AddressPostCode",caption:"ΤΚ"},{dataField:"Telephone",caption:"ΤΗΛΕΦΩΝΟ"},{dataField:"TelephoneMobile",caption:"ΚΙΝΗΤΟ"},{dataField:"Email",caption:"EMAIL_PERSONAL"},{dataField:"Code",caption:"ΚΛΑΔΟΣ"},{dataField:"spDescription",caption:"ΛΕΚΤΙΚΟ ΚΛΑΔΟΥ"},{dataField:"didcacticYear",caption:"ΕΤΟΣ ΑΠΟΣΠΑΣΗΣ"},{dataField:"DecisionNumber",caption:"ΑΡΙΘΜΟΣ ΠΡΩΤΟΚΟΛΛΟΥ ΑΠΟΦΑΣΗΣ ΑΠΟΣΠΑΣΗΣ"},{dataField:"PostingTransferAreaUnit",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ Οργανικής"},{dataField:"PostingTransferAreaUnitType",caption:"Τύπος Οργανικής"},{dataField:"NoEducationalExecutive",caption:"Είμαι στέλεχος εκπαίδευσης με θητεία"},{dataField:"NoTenure",caption:"Έχω αποσπαστεί με θητεία"},{dataField:"NoExpiredSecondment",caption:"Είμαι αποσπασμένος σε ΠΥΣΠΕ/ΠΥΣΔΕ ή φορέα"},{dataField:"NoMusicSchool",caption:"Είμαι διορισμένος με αποκλειστική τοποθέτηση σε Μουσικό Σχολείο από το 2006 και μετέπειτα",visible:n.showMusicSchool},{dataField:"Pref1",caption:"1η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref2",caption:"2η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref3",caption:"3η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref4",caption:"4η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref5",caption:"5η ΠΡΟΤΙΜΗΣΗ"},{dataField:"urlCV",caption:"url ΒΙΟΓΡΑΦΙΚΟΥ",cellTemplate:function(n,t){i.isEmptyValue(t.data.urlCV)||$("<a/>").addClass("dx-link").text("Βιογραφικό").on("dxclick",function(){f.open(t.data.urlCV,"_blank")}).appendTo(n)}},{dataField:"Comments",caption:"ΛΟΓΟΙ"},{dataField:"CommentsService",caption:"ΠΑΡΑΤΗΡΗΣΕΙΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"AttachmentDetails",caption:"ΠΕΡΙΓΡΑΦΗ ΣΥΝΗΜΜΕΝΩΝ"},]},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.getAllSecondmentGeneralSubApplicationTypeId3=function(){n.results=[];i.getByParams({role:n.authentication.role,levelId:n.authentication.levelId},"/api/Export/getAllSecondmentGeneralSubApplicationTypeId3").then(function(r){if(r.length>0){n.results=r;n.showMusicSchool=!1;for(var u=n.results.length-1;u>=0;u--)if(n.results[u].Code.lastIndexOf("ΠΕ79",0)===0||n.results[u].Code.lastIndexOf("ΤΕ16",0)===0){n.showMusicSchool=!0;break}}else t.pop("warning","Αδυναμία εμφάνισης λίστας","Δεν βρέθηκαν Αιτήσεις με τα κριτήρια που συμπληρώσατε");n.columns=[{dataField:"ApplicationSubType",caption:"ΤΥΠΟΣ ΑΙΤΗΣΗΣ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"ApplStatus",caption:"ΚΑΤΑΣΤΑΣΗ ΑΙΤΗΣΗΣ"},{dataField:"ProtocolNumber",caption:"ΠΡΩΤΟΚΟΛΛΟ"},{dataField:"SubmissionDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΥΠΟΒΟΛΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"CreationDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΔΗΜΙΟΥΡΓΙΑΣ ΑΙΤΗΣΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RegistryNo",caption:"ΑΡΙΘΜΟΣ ΜΗΤΡΩΟΥ"},{dataField:"TaxNumber",caption:"ΑΦΜ"},{dataField:"FEKNo",caption:"ΦΕΚ ΔΙΟΡΙΣΜΟΥ"},{dataField:"FEKDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΔΙΟΡΙΣΜΟΥ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"Lastname",caption:"ΕΠΩΝΥΜΟ"},{dataField:"Firstname",caption:"ΟΝΟΜΑ"},{dataField:"FatherFirstname",caption:"ΟΝΟΜΑ ΠΑΤΕΡΑ"},{dataField:"AddressArea",caption:"ΠΟΛΗ"},{dataField:"AddressStreet",caption:"ΟΔΟΣ"},{dataField:"AddressPostCode",caption:"ΤΚ"},{dataField:"Telephone",caption:"ΤΗΛΕΦΩΝΟ"},{dataField:"TelephoneMobile",caption:"ΚΙΝΗΤΟ"},{dataField:"Email",caption:"EMAIL_PERSONAL"},{dataField:"Code",caption:"ΚΛΑΔΟΣ"},{dataField:"spDescription",caption:"ΛΕΚΤΙΚΟ ΚΛΑΔΟΥ"},{dataField:"didcacticYear",caption:"ΕΤΟΣ ΑΠΟΣΠΑΣΗΣ"},{dataField:"PostingTransferAreaUnit",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ Οργανικής"},{dataField:"PostingTransferAreaUnitType",caption:"Τύπος Οργανικής"},{dataField:"priorityType",caption:"Κατά Προτεραιότητα/Ειδική Κατηγορία"},{dataField:"PriorityTypeDetails",caption:"Περιγραφή Κατά Προτεραιότητα/Ειδική Κατηγορία"},{dataField:"NoEducationalExecutive",caption:"Είμαι στέλεχος εκπαίδευσης με θητεία"},{dataField:"NoTenure",caption:"Έχω αποσπαστεί με θητεία"},{dataField:"NoExpiredSecondment",caption:"Είμαι αποσπασμένος σε ΠΥΣΠΕ/ΠΥΣΔΕ ή φορέα"},{dataField:"NoMusicSchool",caption:"Είμαι διορισμένος με αποκλειστική τοποθέτηση σε Μουσικό Σχολείο από το 2006 και μετέπειτα",visible:n.showMusicSchool},{dataField:"HasJoint",caption:"ΣΥΝΥΠΗΡΕΤΗΣΗ"},{dataField:"JointDescription",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ ΣΥΝΥΠΗΡΕΤΗΣΗΣ"},{dataField:"ChildrenInfirmity",caption:"ΓΟΝΕΑΣ ΑΝΑΠΗΡΟΥ ΤΕΚΝΟΥ"},{dataField:"NewPermanentInfirmity",caption:"ΝΕΟΔΙΟΡΙΣΤΟΣ ΜΕ ΚΕΠΑ 75 % ΚΑΙ ΑΝΩ ΙΔΙΟΥ Ή ΣΥΖΥΓΟΥ"},{dataField:"diseases",caption:"ΑΣΘΕΝΕΙΑ"},{dataField:"HealthProblemsKEPANumber",caption:"ΑΜ ΚΕΠΑ ΙΔΙΟΥ"},{dataField:"HealthProblemsKEPASanitaryNumber",caption:"ΑΡΙΘΜΟΣ ΕΠΙΤΡΟΠΗΣ ΚΕΠΑ ΙΔΙΟΥ"},{dataField:"MateHealthProblemsKEPANumber",caption:"ΑΜ ΚΕΠΑ ΣΥΖΥΓΟΥ"},{dataField:"MateHealthProblemsKEPASanitaryNumber",caption:"ΑΡΙΘΜΟΣ ΕΠΙΤΡΟΠΗΣ ΚΕΠΑ ΣΥΖΥΓΟΥ"},{dataField:"ChildrenHealthProblemsKEPANumber",caption:"ΑΜ ΚΕΠΑ ΤΕΚΝΩΝ"},{dataField:"ChildrenHealthProblemsKEPASanitaryNumber",caption:"ΑΡΙΘΜΟΣ ΕΠΙΤΡΟΠΗΣ ΚΕΠΑ ΤΕΚΝΩΝ"},{dataField:"Pref1",caption:"1η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref2",caption:"2η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref3",caption:"3η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref4",caption:"4η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref5",caption:"5η ΠΡΟΤΙΜΗΣΗ"},{dataField:"urlCV",caption:"url ΒΙΟΓΡΑΦΙΚΟΥ",cellTemplate:function(n,t){i.isEmptyValue(t.data.urlCV)||$("<a/>").addClass("dx-link").text("Βιογραφικό").on("dxclick",function(){f.open(t.data.urlCV,"_blank")}).appendTo(n)}},{dataField:"Comments",caption:"ΛΟΓΟΙ"},{dataField:"CommentsService",caption:"ΠΑΡΑΤΗΡΗΣΕΙΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"AttachmentDetails",caption:"ΠΕΡΙΓΡΑΦΗ ΣΥΝΗΜΜΕΝΩΝ"},]},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.getAllSecondmentGeneralSubApplicationTypeId4=function(){n.results=[];i.getByParams({role:n.authentication.role,levelId:n.authentication.levelId},"/api/Export/getAllSecondmentGeneralSubApplicationTypeId4").then(function(r){if(r.length>0){n.results=r;n.showMusicSchool=!1;for(var u=n.results.length-1;u>=0;u--)if(n.results[u].Code.lastIndexOf("ΠΕ79",0)===0||n.results[u].Code.lastIndexOf("ΤΕ16",0)===0){n.showMusicSchool=!0;break}}else t.pop("warning","Αδυναμία εμφάνισης λίστας","Δεν βρέθηκαν Αιτήσεις με τα κριτήρια που συμπληρώσατε");n.columns=[{dataField:"ApplicationSubType",caption:"ΤΥΠΟΣ ΑΙΤΗΣΗΣ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"ApplStatus",caption:"ΚΑΤΑΣΤΑΣΗ ΑΙΤΗΣΗΣ"},{dataField:"ProtocolNumber",caption:"ΠΡΩΤΟΚΟΛΛΟ"},{dataField:"SubmissionDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΥΠΟΒΟΛΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"CreationDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΔΗΜΙΟΥΡΓΙΑΣ ΑΙΤΗΣΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RegistryNo",caption:"ΑΡΙΘΜΟΣ ΜΗΤΡΩΟΥ"},{dataField:"TaxNumber",caption:"ΑΦΜ"},{dataField:"FEKNo",caption:"ΦΕΚ ΔΙΟΡΙΣΜΟΥ"},{dataField:"FEKDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΔΙΟΡΙΣΜΟΥ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"Lastname",caption:"ΕΠΩΝΥΜΟ"},{dataField:"Firstname",caption:"ΟΝΟΜΑ"},{dataField:"FatherFirstname",caption:"ΟΝΟΜΑ ΠΑΤΕΡΑ"},{dataField:"AddressArea",caption:"ΠΟΛΗ"},{dataField:"AddressStreet",caption:"ΟΔΟΣ"},{dataField:"AddressPostCode",caption:"ΤΚ"},{dataField:"Telephone",caption:"ΤΗΛΕΦΩΝΟ"},{dataField:"TelephoneMobile",caption:"ΚΙΝΗΤΟ"},{dataField:"Email",caption:"EMAIL_PERSONAL"},{dataField:"Code",caption:"ΚΛΑΔΟΣ"},{dataField:"spDescription",caption:"ΛΕΚΤΙΚΟ ΚΛΑΔΟΥ"},{dataField:"didcacticYear",caption:"ΕΤΟΣ ΑΠΟΣΠΑΣΗΣ"},{dataField:"PostingTransferAreaUnit",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ Οργανικής"},{dataField:"PostingTransferAreaUnitType",caption:"Τύπος Οργανικής"},{dataField:"priorityType",caption:"Κατά Προτεραιότητα/Ειδική Κατηγορία"},{dataField:"PriorityTypeDetails",caption:"Περιγραφή Κατά Προτεραιότητα/Ειδική Κατηγορία"},{dataField:"HealthProblemsKEPANumber",caption:"ΑΜ ΚΕΠΑ ΛΟΓΟΙ ΥΓΕΙΑΣ ΙΔΙΟΥ"},{dataField:"HealthProblemsKEPASanitaryNumber",caption:"ΑΡΙΘΜΟΣ ΕΠΙΤΡΟΠΗΣ ΙΔΙΩΝ"},{dataField:"MateHealthProblemsKEPANumber",caption:"ΑΜ ΚΕΠΑ ΛΟΓΟΙ ΥΓΕΙΑΣ ΣΥΖΥΓΟΥ"},{dataField:"MateHealthProblemsKEPASanitaryNumber",caption:"ΑΡΙΘΜΟΣ ΕΠΙΤΡΟΠΗΣ ΣΥΖΥΓΟΥ"},{dataField:"ChildrenHealthProblemsKEPANumber",caption:"ΑΜ ΚΕΠΑ ΛΟΓΟΙ ΥΓΕΙΑΣ ΤΕΚΝΩΝ"},{dataField:"ChildrenHealthProblemsKEPASanitaryNumber",caption:"ΑΡΙΘΜΟΣ ΕΠΙΤΡΟΠΗΣ ΤΕΚΝΩΝ"},{dataField:"HasBraille",caption:"Πιστοποιημένη Γνώση Ανάγνωσης και Γραφής Braille"},{dataField:"HasSignKnowledge",caption:"Πιστοποιημένη Γνώση την Ελληνικής Νοηματικής Γλώσσας"},{dataField:"HasDidacticExperience",caption:"Διδακτική υπηρεσία οκτώ (8) τουλάχιστον ετών, εκ των οποίων τα τρία (3) έτη σε ΣΜΕΑΕ ή ΚΕΔΑΣΥ"},{dataField:"HasEAEQualification",caption:"Έχω τα Προσόντα Ειδικής Αγωγής και Εκπαίδευσης λόγω διορισμού στην ΕΑΕ ή βάσει του άρθρου 48 του ν.4415/2016"},{dataField:"NoEducationalExecutive",caption:"Είμαι στέλεχος εκπαίδευσης με θητεία"},{dataField:"NoTenure",caption:"Έχω αποσπαστεί με θητεία"},{dataField:"NoExpiredSecondment",caption:"Είμαι αποσπασμένος σε ΠΥΣΠΕ/ΠΥΣΔΕ ή φορέα"},{dataField:"NoMusicSchool",caption:"Είμαι διορισμένος με αποκλειστική τοποθέτηση σε Μουσικό Σχολείο από το 2006 και μετέπειτα",visible:n.showMusicSchool},{dataField:"Pref1",caption:"1η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref2",caption:"2η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref3",caption:"3η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref4",caption:"4η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref5",caption:"5η ΠΡΟΤΙΜΗΣΗ"},{dataField:"keddyPref1",caption:"1ο ΚΕ.Δ.Α.Σ.Υ."},{dataField:"keddyPref2",caption:"2ο ΚΕ.Δ.Α.Σ.Υ."},{dataField:"keddyPref3",caption:"3ο ΚΕ.Δ.Α.Σ.Υ."},{dataField:"keddyPref4",caption:"4ο ΚΕ.Δ.Α.Σ.Υ."},{dataField:"keddyPref5",caption:"5ο ΚΕ.Δ.Α.Σ.Υ."},{dataField:"urlCV",caption:"url ΒΙΟΓΡΑΦΙΚΟΥ",cellTemplate:function(n,t){i.isEmptyValue(t.data.urlCV)||$("<a/>").addClass("dx-link").text("Βιογραφικό").on("dxclick",function(){f.open(t.data.urlCV,"_blank")}).appendTo(n)}},{dataField:"Comments",caption:"ΛΟΓΟΙ"},{dataField:"CommentsService",caption:"ΠΑΡΑΤΗΡΗΣΕΙΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"AttachmentDetails",caption:"ΠΕΡΙΓΡΑΦΗ ΣΥΝΗΜΜΕΝΩΝ"},]},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.getAllSecondmentGeneralSubApplicationTypeId5=function(){n.results=[];i.getByParams({role:n.authentication.role,levelId:n.authentication.levelId},"/api/Export/getAllSecondmentGeneralSubApplicationTypeId5").then(function(r){if(r.length>0){n.results=r;n.showMusicSchool=!1;for(var u=n.results.length-1;u>=0;u--)if(n.results[u].Code.lastIndexOf("ΠΕ79",0)===0||n.results[u].Code.lastIndexOf("ΤΕ16",0)===0){n.showMusicSchool=!0;break}}else t.pop("warning","Αδυναμία εμφάνισης λίστας","Δεν βρέθηκαν Αιτήσεις με τα κριτήρια που συμπληρώσατε");n.columns=[{dataField:"ApplicationSubType",caption:"ΤΥΠΟΣ ΑΙΤΗΣΗΣ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"ApplStatus",caption:"ΚΑΤΑΣΤΑΣΗ ΑΙΤΗΣΗΣ"},{dataField:"ProtocolNumber",caption:"ΠΡΩΤΟΚΟΛΛΟ"},{dataField:"SubmissionDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΥΠΟΒΟΛΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"CreationDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΔΗΜΙΟΥΡΓΙΑΣ ΑΙΤΗΣΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RegistryNo",caption:"ΑΡΙΘΜΟΣ ΜΗΤΡΩΟΥ"},{dataField:"TaxNumber",caption:"ΑΦΜ"},{dataField:"FEKNo",caption:"ΦΕΚ ΔΙΟΡΙΣΜΟΥ"},{dataField:"FEKDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΔΙΟΡΙΣΜΟΥ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"Lastname",caption:"ΕΠΩΝΥΜΟ"},{dataField:"Firstname",caption:"ΟΝΟΜΑ"},{dataField:"FatherFirstname",caption:"ΟΝΟΜΑ ΠΑΤΕΡΑ"},{dataField:"AddressArea",caption:"ΠΟΛΗ"},{dataField:"AddressStreet",caption:"ΟΔΟΣ"},{dataField:"AddressPostCode",caption:"ΤΚ"},{dataField:"Telephone",caption:"ΤΗΛΕΦΩΝΟ"},{dataField:"TelephoneMobile",caption:"ΚΙΝΗΤΟ"},{dataField:"Email",caption:"EMAIL_PERSONAL"},{dataField:"Code",caption:"ΚΛΑΔΟΣ"},{dataField:"spDescription",caption:"ΛΕΚΤΙΚΟ ΚΛΑΔΟΥ"},{dataField:"didcacticYear",caption:"ΕΤΟΣ ΑΠΟΣΠΑΣΗΣ"},{dataField:"NoEducationalExecutive",caption:"Είμαι στέλεχος εκπαίδευσης με θητεία"},{dataField:"NoTenure",caption:"Έχω αποσπαστεί με θητεία"},{dataField:"NoExpiredSecondment",caption:"Είμαι αποσπασμένος σε ΠΥΣΠΕ/ΠΥΣΔΕ ή φορέα"},{dataField:"NoMusicSchool",caption:"Είμαι διορισμένος με αποκλειστική τοποθέτηση σε Μουσικό Σχολείο από το 2006 και μετέπειτα",visible:n.showMusicSchool},{dataField:"PostingTransferAreaUnit",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ Οργανικής"},{dataField:"PostingTransferAreaUnitType",caption:"Τύπος Οργανικής"},{dataField:"mainBody",caption:"ΦΟΡΕΑΣ ΑΠΟΣΠΑΣΗΣ"},{dataField:"otherBodySelection",caption:"ΑΛΛΟΣ ΦΟΡΕΑΣ / ΤΜΗΜΑΣ"},{dataField:"subBody1",caption:"ΕΠΙΛΟΓΗ 1 ΦΟΡΕΑ"},{dataField:"selection1",caption:"ΠΡΟΤΙΜΗΣΗ 1 ΦΟΡΕΑ"},{dataField:"selection2",caption:"ΠΡΟΤΙΜΗΣΗ 2 ΦΟΡΕΑ"},{dataField:"selection3",caption:"ΠΡΟΤΙΜΗΣΗ 3 ΦΟΡΕΑ"},{dataField:"urlCV",caption:"url ΒΙΟΓΡΑΦΙΚΟΥ",cellTemplate:function(n,t){i.isEmptyValue(t.data.urlCV)||$("<a/>").addClass("dx-link").text("Βιογραφικό").on("dxclick",function(){f.open(t.data.urlCV,"_blank")}).appendTo(n)}},{dataField:"Comments",caption:"ΛΟΓΟΙ"},{dataField:"CommentsService",caption:"ΠΑΡΑΤΗΡΗΣΕΙΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"AttachmentDetails",caption:"ΠΕΡΙΓΡΑΦΗ ΣΥΝΗΜΜΕΝΩΝ"},]},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.getAllSecondmentGeneralSubApplicationTypeId6=function(){n.results=[];i.getByParams({role:n.authentication.role,levelId:n.authentication.levelId},"/api/Export/getAllSecondmentGeneralSubApplicationTypeId6").then(function(r){if(r.length>0){n.results=r;n.showMusicSchool=!1;for(var u=n.results.length-1;u>=0;u--)if(n.results[u].Code.lastIndexOf("ΠΕ79",0)===0||n.results[u].Code.lastIndexOf("ΤΕ16",0)===0){n.showMusicSchool=!0;break}}else t.pop("warning","Αδυναμία εμφάνισης λίστας","Δεν βρέθηκαν Αιτήσεις με τα κριτήρια που συμπληρώσατε");n.columns=[{dataField:"ApplicationSubType",caption:"ΤΥΠΟΣ ΑΙΤΗΣΗΣ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"ApplStatus",caption:"ΚΑΤΑΣΤΑΣΗ ΑΙΤΗΣΗΣ"},{dataField:"ProtocolNumber",caption:"ΠΡΩΤΟΚΟΛΛΟ"},{dataField:"SubmissionDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΥΠΟΒΟΛΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"CreationDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΔΗΜΙΟΥΡΓΙΑΣ ΑΙΤΗΣΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RegistryNo",caption:"ΑΡΙΘΜΟΣ ΜΗΤΡΩΟΥ"},{dataField:"TaxNumber",caption:"ΑΦΜ"},{dataField:"FEKNo",caption:"ΦΕΚ ΔΙΟΡΙΣΜΟΥ"},{dataField:"FEKDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΔΙΟΡΙΣΜΟΥ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"Lastname",caption:"ΕΠΩΝΥΜΟ"},{dataField:"Firstname",caption:"ΟΝΟΜΑ"},{dataField:"FatherFirstname",caption:"ΟΝΟΜΑ ΠΑΤΕΡΑ"},{dataField:"AddressArea",caption:"ΠΟΛΗ"},{dataField:"AddressStreet",caption:"ΟΔΟΣ"},{dataField:"AddressPostCode",caption:"ΤΚ"},{dataField:"Telephone",caption:"ΤΗΛΕΦΩΝΟ"},{dataField:"TelephoneMobile",caption:"ΚΙΝΗΤΟ"},{dataField:"Email",caption:"EMAIL_PERSONAL"},{dataField:"Code",caption:"ΚΛΑΔΟΣ"},{dataField:"spDescription",caption:"ΛΕΚΤΙΚΟ ΚΛΑΔΟΥ"},{dataField:"didcacticYear",caption:"ΕΤΟΣ ΑΠΟΣΠΑΣΗΣ"},{dataField:"PostingTransferAreaUnit",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ Οργανικής"},{dataField:"PostingTransferAreaUnitType",caption:"Τύπος Οργανικής"},{dataField:"NoEducationalExecutive",caption:"Είμαι στέλεχος εκπαίδευσης με θητεία"},{dataField:"NoTenure",caption:"Έχω αποσπαστεί με θητεία"},{dataField:"NoExpiredSecondment",caption:"Είμαι αποσπασμένος σε ΠΥΣΠΕ/ΠΥΣΔΕ ή φορέα"},{dataField:"NoMusicSchool",caption:"Είμαι διορισμένος με αποκλειστική τοποθέτηση σε Μουσικό Σχολείο από το 2006 και μετέπειτα",visible:n.showMusicSchool},{dataField:"urlCV",caption:"url ΒΙΟΓΡΑΦΙΚΟΥ",cellTemplate:function(n,t){i.isEmptyValue(t.data.urlCV)||$("<a/>").addClass("dx-link").text("Βιογραφικό").on("dxclick",function(){f.open(t.data.urlCV,"_blank")}).appendTo(n)}},{dataField:"Comments",caption:"ΛΟΓΟΙ"},{dataField:"CommentsService",caption:"ΠΑΡΑΤΗΡΗΣΕΙΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"AttachmentDetails",caption:"ΠΕΡΙΓΡΑΦΗ ΣΥΝΗΜΜΕΝΩΝ"},]},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.searchWithoutFilterAction=function(){switch(n.exportType.selected.Code){case"secondmentForIntendancy":n.searchActionSecondmentForIntendancy();break;case"secondmentAllPyspdeSmea":n.getAllPyspdeSmea();break;case"secondmentAllEEPEBP":n.getAllEEPEBP();break;case"secondmentAllPyspdeChurch":n.getAllPyspdeChurch();break;case"folderFamilyStatus":n.getFolderFamilyStatus();break;case"folderAcademicQualification":n.getFolderAcademicQualification();break;case"secondmentGapExcess":n.getSecondmentGapExcess();break;case"secondmentKEDASYGapExcess":n.getSecondmentKEDASYGapExcess();break;case"secondmentSmeaGapExcess":n.getSecondmentSmeaGapExcess();break;case"secondmentEEPEBPGapExcess":n.getSecondmentEEPEBPGapExcess();break;case"secondBodyRecRevObject":n.getSecondmentBodyRecallReviewObjection();break;case"secondBodyRefRecRevObject":n.getSecondmentBodyRefRecallReviewObjection();break;case"secondMusicRecRevObject":n.getSecondmentMusicRecallReviewObjection();break;case"secondArtisticRecRevObject":n.getSecondmentArtisticRecallReviewObjection();break;case"substituteGapExcess":n.getSubstituteGapExcess();break;case"substituteSmeaeGapExcess":n.getSubstituteSMEAEGapExcess();break;case"substituteEEPEBPGapExcess":n.getSubstituteEEPEBPGapExcess();break;case"substituteMusicGapExcess":n.getSubstituteMusicGapExcess();break;case"secondmentSep":n.getSecondmentAllBodyRef();break;case"substituteGapsHoursPerSchool":n.getSubstituteGapsHoursPerSchoolExport();break;case"substituteSmeaeGapsHoursPerSch":n.getSubstituteSmeaeGapsHoursPerSchoolExport();break;case"substituteEEPEBPGapsHoursPerSch":n.getSubstituteEEPEBPGapsHoursPerSchoolExport();break;case"substituteRecruitment":n.getSubstituteRecruitmentExport();break;case"substituteRemediation":n.getAllApplSubstituteRemediationExport();break;case"substituteRemediationFromSMEA":n.getAllApplSubstituteRemediationFromSMEAExport();break;case"substituteRemediationFromMusic":n.getAllApplSubstituteRemediationFromMusicExport();break;case"substituteRefGap":n.getSubstituteRefGapExport();break;case"CurrentRecruitmentExperient":n.getCurrentRecruitmentExperient();break;case"PermanentIdentification":n.getPermanentIdentification();break;case"secondmentAllArtistic":n.getAllArtistic();break;case"secondmentAllΜusic":n.getAllMusic();break;case"secondmentAllBody":n.getAllBody();break;case"KesyClassification":n.getKesyClassification();break;case"secondKESYRecRevObject":n.getSecondmentKESYRecallReviewObjection();break;case"secondmentAllTechnical":n.getAllBodyTechnical();break;case"secondmentAllBody1920":n.getAllBody1920();break;case"secondmentGeneralSubApplicationTypeId1":n.getAllSecondmentGeneralSubApplicationTypeId1();break;case"secondmentGeneralSubApplicationTypeId2":n.getAllSecondmentGeneralSubApplicationTypeId2();break;case"secondmentGeneralSubApplicationTypeId3":n.getAllSecondmentGeneralSubApplicationTypeId3();break;case"secondmentGeneralSubApplicationTypeId4":n.getAllSecondmentGeneralSubApplicationTypeId4();break;case"secondmentGeneralSubApplicationTypeId5":n.getAllSecondmentGeneralSubApplicationTypeId5();break;case"secondmentGeneralSubApplicationTypeId6":n.getAllSecondmentGeneralSubApplicationTypeId6();break;case"substituteMusicGapsHours":n.getSubstituteMusicGapHours()}};n.getSecondmentAllBodyRef=function(){n.results=[];i.getByParams({role:"a",regionAndUnitId:n.authentication.regionAndUnitId},"/api/Export/GetSecondmentAllBodyRef").then(function(t){n.columns=[{dataField:"mainBodyRef",caption:"ΦΟΡΕΑΣ ΑΠΟΣΠΑΣΗΣ"},{dataField:"subBodyRef1",caption:"ΠΕΡΙΦΕΡΕΙΑ ΑΠΟΣΠΑΣΗΣ"},{dataField:"Active",caption:"ΚΑΤΑΣΤΑΣΗ ΑΙΤΗΣΗΣ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"fekDetails",caption:"ΕΓΚΥΚΛΙΟΣ ΑΠΟΣΠΑΣΕΩΝ"},{dataField:"ProtocolString",caption:"ΠΡΩΤΟΚΟΛΛΟ"},{dataField:"SubmissionDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΥΠΟΒΟΛΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"CreationDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΔΗΜΙΟΥΡΓΙΑΣ ΑΙΤΗΣΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"DateEpaneksetasis",caption:"ΗΜΕΡΟΜΗΝΙΑ ΕΠΑΝΕΞΕΤΑΣΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"Blocked",caption:"ΚΩΛΥΜΑ ΑΠΟΣΠΑΣΗΣ"},{dataField:"blockDetailsProper",caption:"ΠΕΡΙΓΡΑΦΗ ΚΩΛΥΜΑΤΟΣ"},{dataField:"RegistryNo",caption:"ΑΡΙΘΜΟΣ ΜΗΤΡΩΟΥ"},{dataField:"TaxNumber",caption:"ΑΦΜ"},{dataField:"Lastname",caption:"ΕΠΩΝΥΜΟ"},{dataField:"Firstname",caption:"ΟΝΟΜΑ"},{dataField:"FatherFirstname",caption:"ΟΝΟΜΑ ΠΑΤΕΡΑ"},{dataField:"AddressArea",caption:"ΠΟΛΗ"},{dataField:"AddressStreet",caption:"ΟΔΟΣ"},{dataField:"AddressPostCode",caption:"ΤΚ"},{dataField:"Telephone",caption:"ΤΗΛΕΦΩΝΟ"},{dataField:"TelephoneMobile",caption:"ΚΙΝΗΤΟ"},{dataField:"Email",caption:"EMAIL_PERSONAL"},{dataField:"Code",caption:"ΚΛΑΔΟΣ"},{dataField:"spDescription",caption:"ΛΕΚΤΙΚΟ ΚΛΑΔΟΥ"},{dataField:"spgCode",caption:"ΕΙΔΙΚΟΤΗΤΑ"},{dataField:"officialRegionCode",caption:"ΚΩΔΙΚΟΣ ΠΕΡΙΟΧΗΣ ΟΡΓΑΝΙΚΗΣ"},{dataField:"pyspde",caption:"ΠΥΣΔΕ ΟΡΓΑΝΙΚΗΣ"},{dataField:"officialRegionDescription",caption:"ΠΕΡΙΟΧΗ ΟΡΓΑΝΙΚΗΣ"},{dataField:"OfficialUnitType",caption:"ΤΥΠΟΣ ΟΡΓΑΝΙΚΗΣ"},{dataField:"OfficialPlacementUnitDescription",caption:"ΟΡΓΑΝΙΚΗ ΘΕΣΗ"},{dataField:"belongsToPeriphery",caption:"ΠΕΡΙΦΕΡΕΙΑ ΟΡΓΑΝΙΚΗΣ ΘΕΣΗΣ"},{dataField:"belongsToOffice",caption:"ΔΙΕΥΘΥΝΣΗ ΟΡΓΑΝΙΚΗΣ ΘΕΣΗΣ"},{dataField:"SchoolTelephone",caption:"ΤΗΛΕΦΩΝΟ ΣΧΟΛΕΙΟΥ"},{dataField:"FEKNo",caption:"ΦΕΚ ΔΙΟΡΙΣΜΟΥ"},{dataField:"NominationYear",caption:"ΕΤΟΣ ΔΙΟΡΙΣΜΟΥ"},{dataField:"TotalEmploymentYears",caption:"ΕΤΗ ΥΠΗΡΕΣΙΑΣ"},{dataField:"TotalEmploymentMonths",caption:"ΜΗΝΕΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"TotalEmploymentDays",caption:"ΜΕΡΕΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"InterculturalPostGraduate",caption:"ΜΕΤΑΠΤΥΧΙΑΚΟ ΣΕ ΔΙΑΠΟΛΙΤΙΣΜΙΚΗ ΕΚΠ/ΣΗ"},{dataField:"InterculturalDoctoral",caption:"ΔΙΔΑΚΤΟΡΙΚΟ ΣΕ ΔΙΑΠΟΛΙΤΙΣΜΙΚΗ ΕΚΠ/ΣΗ"},{dataField:"InterculturalExpYears",caption:"ΕΤΗ ΣΕ ΔΙΑΠΟΛΙΤΙΣΜΙΚΑ ΣΧΟΛΕΙΑ"},{dataField:"InterculturalExpMonths",caption:"ΜΗΝΕΣ ΣΕ ΔΙΑΠΟΛΙΤΙΣΜΙΚΑ ΣΧΟΛΕΙΑ"},{dataField:"InterculturalExpDays",caption:"ΜΕΡΕΣ ΣΕ ΔΙΑΠΟΛΙΤΙΣΜΙΚΑ ΣΧΟΛΕΙΑ"},{dataField:"WelcomeClassExpYears",caption:"ΕΤΗ ΣΕ ΤΑΞΕΙΣ ΥΠΟΔΟΧΗΣ"},{dataField:"WelcomeClassExpMonths",caption:"ΜΗΝΕΣ ΣΕ ΤΑΞΕΙΣ ΥΠΟΔΟΧΗΣ"},{dataField:"WelcomeClassExpDays",caption:"ΜΕΡΕΣ ΣΕ ΤΑΞΕΙΣ ΥΠΟΔΟΧΗΣ"},{dataField:"SupportClassExpYears",caption:"ΕΤΗ ΣΕ ΦΡΟΝΤΙΣΤΗΡΙΑΚΑ ΤΜΗΜΑΤΑ"},{dataField:"SupportClassExpMonths",caption:"ΜΗΝΕΣ ΣΕ ΦΡΟΝΤΙΣΤΗΡΙΑΚΑ ΤΜΗΜΑΤΑ"},{dataField:"SupportClassExpDays",caption:"ΜΕΡΕΣ ΣΕ ΦΡΟΝΤΙΣΤΗΡΙΑΚΑ ΤΜΗΜΑΤΑ"},{dataField:"AbroadGreekClassExpYears",caption:"ΕΤΗ ΣΕ ΤΜΗΜΑΤΑ ΕΛΛΗΝΙΚΗΣ ΓΛΩΣΣΑΣ ΕΞΩΤΕΡΙΚΟΥ"},{dataField:"AbroadGreekClassExpMonths",caption:"ΜΗΝΕΣ ΣΕ ΤΜΗΜΑΤΑ ΕΛΛΗΝΙΚΗΣ ΓΛΩΣΣΑΣ ΕΞΩΤΕΡΙΚΟΥ"},{dataField:"AbroadGreekClassExpDays",caption:"ΜΕΡΕΣ ΣΕ ΤΜΗΜΑΤΑ ΕΛΛΗΝΙΚΗΣ ΓΛΩΣΣΑΣ ΕΞΩΤΕΡΙΚΟΥ"},{dataField:"OtherStructureYears",caption:"ΕΤΗ ΣΕ ΑΛΛΕΣ ΔΟΜΕΣ"},{dataField:"OtherStructureMonths",caption:"ΜΗΝΕΣ ΣΕ ΑΛΛΕΣ ΔΟΜΕΣ"},{dataField:"OtherStructureDays",caption:"ΜΕΡΕΣ ΣΕ ΑΛΛΕΣ ΔΟΜΕΣ"},{dataField:"RefCoordinatorExpYears",caption:"ΕΤΗ ΣΕ ΘΕΣΗ ΣΥΝΤΟΝΙΣΤΗ ΕΚΠΑΙΔΕΥΣΗΣ ΠΡΟΣΦΥΓΩΝ ΣΕ ΚΕΝΤΡΑ ΦΙΛΟΞΕΝΙΑΣ"},{dataField:"RefCoordinatorExpMonths",caption:"ΜΗΝΕΣ ΣΕ ΘΕΣΗ ΣΥΝΤΟΝΙΣΤΗ ΕΚΠΑΙΔΕΥΣΗΣ ΠΡΟΣΦΥΓΩΝ ΣΕ ΚΕΝΤΡΑ ΦΙΛΟΞΕΝΙΑΣ"},{dataField:"RefCoordinatorExpDays",caption:"ΜΕΡΕΣ ΣΕ ΘΕΣΗ ΣΥΝΤΟΝΙΣΤΗ ΕΚΠΑΙΔΕΥΣΗΣ ΠΡΟΣΦΥΓΩΝ ΣΕ ΚΕΝΤΡΑ ΦΙΛΟΞΕΝΙΑΣ"},{dataField:"VoluntaryYears",caption:"ΕΤΗ ΕΘΕΛΟΝΤΙΚΗΣ ΣΥΜΜΕΤΟΧΗΣ ΣΕ ΕΚΠΑΙΔΕΥΣΗ ΠΡΟΣΦΥΓΩΝ"},{dataField:"VoluntaryMonths",caption:"ΜΗΝΕΣ ΕΘΕΛΟΝΤΙΚΗΣ ΣΥΜΜΕΤΟΧΗΣ ΣΕ ΕΚΠΑΙΔΕΥΣΗ ΠΡΟΣΦΥΓΩΝ"},{dataField:"VoluntaryDays",caption:"ΜΕΡΕΣ ΕΘΕΛΟΝΤΙΚΗΣ ΣΥΜΜΕΤΟΧΗΣ ΣΕ ΕΚΠΑΙΔΕΥΣΗ ΠΡΟΣΦΥΓΩΝ"},{dataField:"VoluntaryDetails",caption:"ΠΑΡΑΤΗΡΗΣΕΙΣ ΕΘΕΛΟΝΤΙΚΗΣ ΣΥΜΜΕΤΟΧΗΣ"},{dataField:"CommentsProper",caption:"ΑΛΛΕΣ ΠΑΡΑΤΗΡΗΣΕΙΣ"},{dataField:"urlCV",caption:"url ΒΙΟΓΡΑΦΙΚΟΥ",cellTemplate:function(n,t){i.isEmptyValue(t.data.urlCV)||$("<a/>").addClass("dx-link").text("Βιογραφικό").on("dxclick",function(){f.open(t.data.urlCV,"_blank")}).appendTo(n)}},{dataField:"selection1",caption:"1η ΕΠΙΛΟΓΗ"},{dataField:"selection2",caption:"2η ΕΠΙΛΟΓΗ"},{dataField:"selection3",caption:"3η ΕΠΙΛΟΓΗ"},{dataField:"selection4",caption:"4η ΕΠΙΛΟΓΗ"},{dataField:"selection5",caption:"5η ΕΠΙΛΟΓΗ"},{dataField:"selection6",caption:"6η ΕΠΙΛΟΓΗ"},{dataField:"selection7",caption:"7η ΕΠΙΛΟΓΗ"},{dataField:"selection8",caption:"8η ΕΠΙΛΟΓΗ"},{dataField:"selection9",caption:"9η ΕΠΙΛΟΓΗ"},{dataField:"selection10",caption:"10η ΕΠΙΛΟΓΗ"},{dataField:"selection11",caption:"11η ΕΠΙΛΟΓΗ"},{dataField:"selection12",caption:"12η ΕΠΙΛΟΓΗ"},{dataField:"selection13",caption:"13η ΕΠΙΛΟΓΗ"},{dataField:"selection14",caption:"14η ΕΠΙΛΟΓΗ"},{dataField:"selection15",caption:"15η ΕΠΙΛΟΓΗ"},{dataField:"selection16",caption:"16η ΕΠΙΛΟΓΗ"},{dataField:"selection17",caption:"17η ΕΠΙΛΟΓΗ"},{dataField:"selection18",caption:"18η ΕΠΙΛΟΓΗ"},{dataField:"selection19",caption:"19η ΕΠΙΛΟΓΗ"},{dataField:"selection20",caption:"20η ΕΠΙΛΟΓΗ"},{dataField:"logos_epaneksetasis",caption:"ΛΟΓΟΣ ΕΠΑΝΕΞΕΤΑΣΗΣ"},];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.getCurrentRecruitmentExperient=function(){n.results=[];i.getByParams({regionAndUnitId:n.authentication.regionAndUnitId,role:n.authentication.role},"/api/Export/getCurrentRecruitmentExperient").then(function(t){n.columns=[{dataField:"Description",caption:"Υπηρεσία Καταχώρισης"},{dataField:"TaxNumber",caption:"ΑΦΜ"},{dataField:"LastName",caption:"Επώνυμο"},{dataField:"FirstName",caption:"Όνομα"},{dataField:"FatherFirstName",caption:"Πατρώνυμο"},{dataField:"Speciality",caption:"Κλάδος"},{dataField:"ServiceAssumedType",caption:"Ιδιότητα"},{dataField:"HoursPerWeek",caption:"Ώρες Μειωμένου"},{dataField:"LocationRegionAndUnitDescription",caption:"Περιοχή Πρόσληψης"},{dataField:"ServiceAssumedDate",caption:"Ημ/νία Ανάληψης Υπηρεσίας"},{dataField:"ExperienceStartDate",caption:"Πρόσμετρηση Υπηρεσίας Από"},{dataField:"ExperienceEndDate",caption:"Ημ/νία Λήξης Υπηρεσίας"},{dataField:"RecruitmentProtocol",caption:"Υ.Α. Πρόσληψης"},{dataField:"RemoteUnit",caption:"Δυσπρόσιτα"},{dataField:"RemoteUnitHours",caption:"Ώρες σε Δυσπρόσιτα"},{dataField:"Schools",caption:"Σχολεία"},{dataField:"Comments",caption:"Παρατηρήσεις"},{dataField:"September",caption:"Ώρες Σεπτεμβρίου"},{dataField:"October",caption:"Ώρες Οκτωβρίου"},{dataField:"November",caption:"Ώρες Νοεμβρίου"},{dataField:"December",caption:"Ώρες Δεκεμβρίου"},{dataField:"January",caption:"Ώρες Ιανουαρίου"},{dataField:"February",caption:"Ώρες Φεβρουαρίου"},{dataField:"March",caption:"Ώρες Μαρτίου"},{dataField:"April",caption:"Ώρες Απριλίου"},{dataField:"May",caption:"Ώρες Μαϊου"},{dataField:"June",caption:"Ώρες Ιουνίου"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)})};n.getKesyClassification=function(){n.results=[];i.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId},"/api/Export/getKesyClassification").then(function(t){n.columns=[{dataField:"prefecture",caption:"ΠΕΡΙΦΕΡΕΙΑ"},{dataField:"kesyOrder",caption:"ΣΕΙΡΑ ΣΤΟ ΚΕΣΥ"},{dataField:"kesy",caption:"ΚΕΣΥ ΠΡΟΤΙΜΗΣΗΣ"},{dataField:"PreferedOrder",caption:"ΣΕΙΡΑ ΠΡΟΤΙΜΗΣΗΣ"},{dataField:"speciality",caption:"ΕΙΔΙΚΟΤΗΤΑ"},{dataField:"RegistryNo",caption:"ΑΜ"},{dataField:"LastName",caption:"ΕΠΩΝΥΜΟ"},{dataField:"FirstName",caption:"ΟΝΟΜΑ"},{dataField:"TotalPoints",caption:"ΣΥΝΟΛΙΚΑ ΜΟΡΙΑ"},{dataField:"ExperiencePoints",caption:"ΜΟΡΙΑ ΠΡΟΫΠΗΡΕΣΙΑΣ"},{dataField:"ExperienceYears",caption:"ΕΤΗ ΥΠΗΡΕΣΙΑΣ"},{dataField:"ExperienceMonths",caption:"ΜΗΝΕΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"ExperienceDays",caption:"ΜΕΡΕΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"FamilyPoints",caption:"ΜΟΡΙΑ ΟΙΚΟΓΕΝΕΙΑΚΗΣ ΚΑΤΑΣΤΑΣΗΣ"},{dataField:"MaritalStatus",caption:"ΟΙΚΟΓΕΝΕΙΑΚΗ ΚΑΤΑΣΤΑΣΗ"},{dataField:"UnderAgedOrStudingChildren",caption:"ΑΡΙΘΜΟΣ ΑΝΗΛΙΚΩΝ ΤΕΚΝΩΝ"},{dataField:"StudingChildren",caption:"ΑΡΙΘΜΟΣ ΤΕΚΝΩΝ ΠΟΥ ΣΠΟΥΔΑΖΟΥΝ"},{dataField:"ChildCustody",caption:"ΕΠΙΜΕΛΕΙΑ ΤΕΚΝΩΝ"},{dataField:"LocalityPoints",caption:"ΜΟΡΙΑ ΕΝΤΟΠΙΟΤΗΤΑΣ"},{dataField:"localityPysde",caption:"ΠΥΣΔΕ ΕΝΤΟΠΙΟΤΗΤΑΣ"},{dataField:"JointServicePoints",caption:"ΜΟΡΙΑ ΣΥΝΥΠΗΡΕΤΗΣΗΣ"},{dataField:"JointServiceId",caption:"ΣΥΝΥΠΗΡΕΤΗΣΗ"},{dataField:"jServicePysde",caption:"ΠΥΣΔΕ ΣΥΝΥΠΗΡΕΤΗΣΗΣ"},{dataField:"DoctoralCounsellingGuidance",caption:"ΔΙΔΑΚΤΟΡΙΚΟ ΣΤΗ ΣΥΜΒΟΥΛΕΥΤΙΚΗ"},{dataField:"PostgraduateCounsellingGuidance",caption:"ΜΕΤΑΠΤΥΧΙΑΚΟ ΣΤΗ ΣΥΜΒΟΥΛΕΥΤΙΚΗ"},{dataField:"QualificationCertificateCounsellingGuidance",caption:"ΠΙΣΤΟΠΟΙΗΤΙΚΟ ΕΙΔΙΚΕΥΣΗΣ ΣΤΗ ΣΥΜΒΟΥΛΕΥΤΙΚΗ"},{dataField:"ThreeYearsCounsellingGuidanceService",caption:"3ΤΗΣ ΠΡΟΫΠΗΡΕΣΙΑ ΣΕ ΔΟΜΕΣ ΕΠΑΓΓΕΛΜΑΤΙΚΟΥ ΠΡΟΣΑΝΑΤΟΛΙΣΜΟΥ"},{dataField:"DidacticYears",caption:"ΕΤΗ ΔΙΔΑΚΤΙΚΗΣ ΕΜΠΕΙΡΙΑΣ"},{dataField:"DidacticMonths",caption:"ΜΗΝΕΣ ΔΙΔΑΚΤΙΚΗΣ ΕΜΠΕΙΡΙΑΣ"},{dataField:"DidacticDays",caption:"ΜΕΡΕΣ ΔΙΔΑΚΤΙΚΗΣ ΕΜΠΕΙΡΙΑΣ"},{dataField:"tiposOrganikis",caption:"ΤΥΠΟΣ ΟΡΓΑΝΙΚΗΣ"},{dataField:"perioxiOrganikis",caption:"ΠΕΡΙΟΧΗ ΟΡΓΑΝΙΚΗΣ"},{dataField:"diefOrganikis",caption:"Δ/ΝΣΗ ΟΡΓΑΝΙΚΗΣ"},{dataField:"OfficialPlacementUnitDescription",caption:"ΟΡΓΑΝΙΚΗ ΘΕΣΗ"},{dataField:"NominationYear",caption:"ΕΤΟΣ ΔΙΟΡΙΣΜΟΥ"},{dataField:"urlCV",caption:"url ΒΙΟΓΡΑΦΙΚΟΥ",cellTemplate:function(n,t){i.isEmptyValue(t.data.urlCV)||$("<a/>").addClass("dx-link").text("Βιογραφικό").on("dxclick",function(){f.open(t.data.urlCV,"_blank")}).appendTo(n)}}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)})};n.getPermanentIdentification=function(){n.results=[];i.getByParams({regionAndUnitId:n.authentication.regionAndUnitId,role:n.authentication.role},"/api/Export/getPermanentIdentification").then(function(i){n.columns=[{dataField:"TaxNumber",caption:"ΑΦΜ"},{dataField:"RegistryNo",caption:"ΑΜ"},{dataField:"LastName",caption:"Επώνυμο"},{dataField:"FirstName",caption:"Όνομα"},{dataField:"FatherFirstName",caption:"Πατρώνυμο"},{dataField:"Telephone",caption:"Τηλέφωνο"},{dataField:"TelephoneMobile",caption:"Κινητό"},{dataField:"PersonalEmail",caption:"Email"},{dataField:"HasInformed",caption:"Ενημερώθηκε"},{dataField:"Locality",caption:"Εντοπιότητα"},{dataField:"LocalityPyspdeCode",caption:"Κωδικός ΠΥΣΠΕ/ΠΥΣΠΔΕ Εντοπιότητας"},{dataField:"LocalityPyspdeDescription",caption:"ΠΥΣΠΕ/ΠΥΣΠΔΕ Εντοπιότητας"},{dataField:"MaritalStatus",caption:"Οικογενειακή Κατάσταση"},{dataField:"UnderAgedOrStudingChildren",caption:"Παιδιά <18 (από 1/1/1999)"},{dataField:"StudingChildren",caption:"Παιδιά 18-25 (από 1/1/1992)"},{dataField:"ChildCustody",caption:"Επιμέλεια Τέκνων"},{dataField:"MaritalStatusOpsed",caption:"Οικογενειακή Κατάσταση ΟΠΣΕΔ"},{dataField:"UnderAgedOrStudingChildrenOpsed",caption:"Παιδιά <18 (από 1/1/1999) ΟΠΣΕΔ"},{dataField:"StudingChildrenOpsed",caption:"Παιδιά 18-25 (από 1/1/1992) ΟΠΣΕΔ"},{dataField:"KalMunicipalityUnityDescription",caption:"Δημοτική Ενότητα ΟΠΣΕΔ"},{dataField:"DateMunicipality",caption:"Ημ. Κτήσης Δημοτικότητας ΟΠΣΕΔ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"KalMunicipalityDescription",caption:"Δήμος ΟΠΣΕΔ"}];i.length>0?n.results=i:t.pop("warning","Αδυναμία εμφάνισης λίστας","Δεν βρέθηκαν μη ταυτοποιημένοι εκπαιδευτικοί με το ΟΠΣΕΔ-ΥΠΕΣ")},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)})};n.getAllArtistic=function(){n.results=[];var r=i.isValueInArray(i.getRoleCode(n.authentication.role),"a")?n.level:n.authentication.levelId;i.getByAll("/api/Export/getAllArtistic").then(function(t){n.columns=[{dataField:"ApplStatus",caption:"ΚΑΤΑΣΤΑΣΗ ΑΙΤΗΣΗΣ"},{dataField:"ProtocolString",caption:"ΠΡΩΤΟΚΟΛΛΟ"},{dataField:"CreationDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΥΠΟΒΟΛΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RegistryNo",caption:"ΑΡΙΘΜΟΣ ΜΗΤΡΩΟΥ"},{dataField:"Lastname",caption:"ΕΠΩΝΥΜΟ"},{dataField:"Firstname",caption:"ΟΝΟΜΑ"},{dataField:"FatherFirstname",caption:"ΟΝΟΜΑ ΠΑΤΕΡΑ"},{dataField:"Code",caption:"ΚΛΑΔΟΣ"},{dataField:"spgCode",caption:"ΕΙΔΙΚΟΤΗΤΑ"},{dataField:"spgDescription",caption:"ΛΕΚΤΙΚΟ ΕΙΔΙΚΟΤΗΤΑΣ"},{dataField:"pyspde",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ ΟΡΓΑΝΙΚΗΣ"},{dataField:"officialRegionDescription",caption:"ΠΕΡΙΟΧΗ ΟΡΓΑΝΙΚΗΣ"},{dataField:"OfficialUnitType",caption:"ΤΥΠΟΣ ΟΡΓΑΝΙΚΗΣ"},{dataField:"OfficialPlacementUnitDescription",caption:"ΟΡΓΑΝΙΚΗ ΘΕΣΗ"},{dataField:"FEKNo",caption:"ΦΕΚ ΔΙΟΡΙΣΜΟΥ"},{dataField:"NominationYear",caption:"ΕΤΟΣ ΔΙΟΡΙΣΜΟΥ"},{dataField:"NominationQualification",caption:"ΤΥΠΙΚΑ ΠΡΟΣΟΝΤΑ ΔΙΟΡΙΣΜΟΥ"},{dataField:"OtherSpeciality",caption:"ΑΛΛΟ ΠΤΥΧΙΟ ΕΚΤΟΣ ΕΚΕΙΝΟ ΤΟΥ ΔΙΟΡΙΣΜΟΥ"},{dataField:"PostGraduateOrDoctoral",caption:"ΜΕΤΑΠΤΥΧΙΑΚΟ ή ΔΙΔΑΚΤΟΡΙΚΟ ΔΙΠΛΩΜΑ"},{dataField:"ArtisticQualification",caption:"ΚΑΛΛΙΤΕΧΝΙΚΗ ΠΑΙΔΕΙΑ"},{dataField:"ArtisticExperience",caption:"ΚΑΛΛΙΤΕΧΝΙΚΗ ΕΜΠΕΙΡΙΑ"},{dataField:"DidacticExpeFromArtistic",caption:"ΔΙΔΑΚΤΙΚΗ ΕΜΠΕΙΡΙΑ ΣΕ ΚΑΛΛΙΤΕΧΝΙΚΑ ΣΧΟΛΕΙΑ"},{dataField:"Seminars",caption:"ΣΕΜΙΝΑΡΙΑ - ΣΥΝΕΔΡΙΑ"},{dataField:"Languages",caption:"ΞΕΝΕΣ ΓΛΩΣΣΕΣ"},{dataField:"ComputerKnowlegde",caption:"ΓΝΩΣΕΙΣ Η/Υ"},{dataField:"OtherQualifications",caption:"ΑΛΛΑ ΠΡΟΣΟΝΤΑ"},{dataField:"HasArtisticPermutation",caption:"ΕΧΕΙ ΚΑΤΑΘΕΣΕΙ ΑΙΤΗΣΗ ΜΕΤΑΘΕΣΗΣ ΚΑΙ ΦΑΚΕΛΟ ΔΙΚΑΙΟΛΟΓΗΤΙΚΩΝ"},{dataField:"DirectPdfLink",caption:"LINK ΔΙΚΑΙΟΛΟΓΗΤΙΚΩΝ"},{dataField:"Pref1",caption:"1η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref2",caption:"2η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref3",caption:"3η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref4",caption:"4η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref5",caption:"5η ΠΡΟΤΙΜΗΣΗ"},{dataField:"NoGap",caption:"ΧΩΡΙΣ ΚΕΝΑ"},{dataField:"EducationExpYears",caption:"ΕΤΗ ΣΥΝΟΛΙΚΗΣ ΕΚΠ/ΚΗΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"EducationExpMonths",caption:"ΜΗΝΕΣ ΣΥΝΟΛΙΚΗΣ ΕΚΠ/ΚΗΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"EducationExpDays",caption:"ΜΕΡΕΣ ΣΥΝΟΛΙΚΗΣ ΕΚΠ/ΚΗΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"SecondaryServiceYears",caption:"ΕΤΗ ΥΠΗΡΕΣΙΑΣ ΜΟΝΟ ΣΤΗΝ Β/ΘΜΙΑ ΕΚΠ/ΣΗ"},{dataField:"SecondaryServiceMonths",caption:"ΜΗΝΕΣ ΥΠΗΡΕΣΙΑΣ ΜΟΝΟ ΣΤΗΝ Β/ΘΜΙΑ ΕΚΠ/ΣΗ"},{dataField:"SecondaryServiceDays",caption:"ΜΕΡΕΣ ΥΠΗΡΕΣΙΑΣ ΜΟΝΟ ΣΤΗΝ Β/ΘΜΙΑ ΕΚΠ/ΣΗ"},{dataField:"LeavesYears",caption:"ΕΤΗ ΑΔΕΙΩΝ"},{dataField:"LeavesMonths",caption:"ΜΗΝΕΣ ΑΔΕΙΩΝ"},{dataField:"LeavesDays",caption:"ΜΕΡΕΣ ΑΔΕΙΩΝ"},{dataField:"SecondmentBodyYears",caption:"ΕΤΗ ΑΠΟΣΠΑΣΗΣ ΣΕ ΦΟΡΕΙΣ ΕΚΤΟΣ ΣΧΟΛΕΙΩΝ Β/ΘΜΙΑΣ ΕΚΠ/ΣΗΣ"},{dataField:"SecondmentBodyMonths",caption:"ΜΗΝΕΣ ΑΠΟΣΠΑΣΗΣ ΣΕ ΦΟΡΕΙΣ ΕΚΤΟΣ ΣΧΟΛΕΙΩΝ Β/ΘΜΙΑΣ ΕΚΠ/ΣΗΣ"},{dataField:"SecondmentBodyDays",caption:"ΜΕΡΕΣ ΑΠΟΣΠΑΣΗΣ ΣΕ ΦΟΡΕΙΣ ΕΚΤΟΣ ΣΧΟΛΕΙΩΝ Β/ΘΜΙΑΣ ΕΚΠ/ΣΗΣ"},{dataField:"SecondaryDidacticExpYears",caption:"ΕΤΗ ΔΙΔΑΚΤΙΚΗΣ ΕΜΠΕΙΡΙΑΣ ΣΤΗ Β/ΘΜΙΑ ΕΚΠ/ΣΗ"},{dataField:"SecondaryDidacticExpMonths",caption:"ΜΗΝΕΣ ΔΙΔΑΚΤΙΚΗΣ ΕΜΠΕΙΡΙΑΣ ΣΤΗ Β/ΘΜΙΑ ΕΚΠ/ΣΗ"},{dataField:"SecondaryDidacticExpDays",caption:"ΜΕΡΕΣ ΔΙΔΑΚΤΙΚΗΣ ΕΜΠΕΙΡΙΑΣ ΣΤΗ Β/ΘΜΙΑ ΕΚΠ/ΣΗ"},{dataField:"LastPositionYears",caption:"ΕΤΗ ΣΤΗΝ ΤΕΛΕΥΤΑΙΑ ΟΡΓΑΝΙΚΗ ΘΕΣΗ"},{dataField:"LastPositionMonths",caption:"ΜΗΝΕΣ ΣΤΗΝ ΤΕΛΕΥΤΑΙΑ ΟΡΓΑΝΙΚΗ ΘΕΣΗ"},{dataField:"LastPositionDays",caption:"ΜΕΡΕΣ ΣΤΗΝ ΤΕΛΕΥΤΑΙΑ ΟΡΓΑΝΙΚΗ ΘΕΣΗ"},{dataField:"ArtisticExperienceYears",caption:"ΕΤΗ ΠΡΟΫΠΗΡΕΣΙΑΣ ΣΕ ΚΑΛΛΙΤΕΧΝΙΚΟ ΣΧΟΛΕΙΟ"},{dataField:"ArtisticExperienceMonths",caption:"ΜΗΝΕΣ ΠΡΟΫΠΗΡΕΣΙΑΣ ΣΕ ΚΑΛΛΙΤΕΧΝΙΚΟ ΣΧΟΛΕΙΟ"},{dataField:"ArtisticExperienceDays",caption:"ΜΕΡΕΣ ΠΡΟΫΠΗΡΕΣΙΑΣ ΣΕ ΚΑΛΛΙΤΕΧΝΙΚΟ ΣΧΟΛΕΙΟ"},{dataField:"FiveYearDidacticExp",caption:"5ετής ΔΙΔΑΚΤΙΚΗ ΕΜΠΕΙΡΙΑ ΣΤΗ Β/ΘΜΙΑ ΕΚΠ/ΣΗ"},{dataField:"CommentsProper",caption:"ΠΑΡΑΤΗΡΗΣΕΙΣ"},{dataField:"CommentsServiceProper",caption:"ΠΑΡΑΤΗΡΗΣΕΙΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"IsConfirmed",caption:"ΕΧΕΙ ΠΑΡΑΛΗΦΘΕΙ"},{dataField:"IsBlocked",caption:"ΚΩΛΥΜΑ ΑΠΟΣΠΑΣΗΣ"},{dataField:"blockDetailsProper",caption:"ΠΕΡΙΓΡΑΦΗ ΚΩΛΥΜΑΤΟΣ"},{dataField:"IsChecked",caption:"ΕΧΕΙ ΕΓΚΡΙΘΕΙ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)})};n.getAllMusic=function(){n.results=[];i.getByAll("/api/Export/getAllMusic").then(function(t){n.columns=[{dataField:"ApplStatus",caption:"ΚΑΤΑΣΤΑΣΗ ΑΙΤΗΣΗΣ"},{dataField:"ProtocolString",caption:"ΠΡΩΤΟΚΟΛΛΟ"},{dataField:"CreationDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΥΠΟΒΟΛΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RegistryNo",caption:"ΑΡΙΘΜΟΣ ΜΗΤΡΩΟΥ"},{dataField:"Lastname",caption:"ΕΠΩΝΥΜΟ"},{dataField:"Firstname",caption:"ΟΝΟΜΑ"},{dataField:"FatherFirstname",caption:"ΟΝΟΜΑ ΠΑΤΕΡΑ"},{dataField:"Code",caption:"ΚΛΑΔΟΣ"},{dataField:"spDescription",caption:"ΛΕΚΤΙΚΟ ΚΛΑΔΟΥ"},{dataField:"MusicSpeciality",caption:"ΜΟΥΣΙΚΗ ΕΙΔΙΚΕΥΣΗ"},{dataField:"spgCode",caption:"ΕΙΔΙΚΟΤΗΤΑ"},{dataField:"spgDescription",caption:"ΛΕΚΤΙΚΟ ΕΙΔΙΚΟΤΗΤΑΣ"},{dataField:"officialRegionCode",caption:"ΚΩΔΙΚΟΣ ΠΕΡΙΟΧΗΣ ΟΡΓΑΝΙΚΗΣ"},{dataField:"pyspde",caption:"ΠΥΣΔΕ ΟΡΓΑΝΙΚΗΣ"},{dataField:"officialRegionDescription",caption:"ΠΕΡΙΟΧΗ ΟΡΓΑΝΙΚΗΣ"},{dataField:"OfficialUnitType",caption:"ΤΥΠΟΣ ΟΡΓΑΝΙΚΗΣ"},{dataField:"OfficialPlacementUnitDescription",caption:"ΟΡΓΑΝΙΚΗ ΘΕΣΗ"},{dataField:"belongsToPeriphery",caption:"ΠΕΡΙΦΕΡΕΙΑ ΟΡΓΑΝΙΚΗΣ ΘΕΣΗΣ"},{dataField:"belongsToOffice",caption:"ΔΙΕΥΘΥΝΣΗ ΟΡΓΑΝΙΚΗΣ ΘΕΣΗΣ"},{dataField:"FEKNo",caption:"ΦΕΚ ΔΙΟΡΙΣΜΟΥ"},{dataField:"NominationYear",caption:"ΕΤΟΣ ΔΙΟΡΙΣΜΟΥ"},{dataField:"musicLessons",caption:"ΜΟΥΣΙΚΑ ΜΑΘΗΜΑΤΑ"},{dataField:"NewPermanentSpecialCategory",caption:"ΝΕΟΔΙΟΡΙΣΤΟΣ ΕΚΑΠΙΔΕΥΤΙΚΟΣ ΚΛΑΔΟΥ ΠΕ79.01 (πρώην 16.02) ή ΤΕ16 "},{dataField:"HavingManyChildren",caption:"ΠΟΛΥΤΕΚΝΟΣ"},{dataField:"ASPENumber",caption:"ΑΜ ΑΣΠΕ"},{dataField:"ChildrenInfirmity",caption:"ΓΟΝΕΑΣ ΤΕΚΝΟΥ ΜΕ ΠΟΣΟΣΤΟ ΑΝΑΠΗΡΙΑΣ 67%"},{dataField:"ChildrenInfirmityHealthProblemsKEPANumber",caption:"ΑΜ ΚΕΠΑ(ΓΟΝΕΑΣ ΤΕΚΝΟΥ ΜΕ ΠΟΣΟΣΤΟ ΑΝΑΠΗΡΙΑΣ 67%)"},{dataField:"ChildrenInfirmityKEPASanitaryNumber",caption:"ΑΡΙΘΜΟΣ ΕΠΙΤΡΟΠΗΣ(ΓΟΝΕΑΣ ΤΕΚΝΟΥ ΜΕ ΠΟΣΟΣΤΟ ΑΝΑΠΗΡΙΑΣ 67%)"},{dataField:"NewPermanentInfirmity",caption:"75% ΚΑΙ ΑΝΩ ΠΟΣΟΣΤΟ ΑΝΑΠΗΡΙΑΣ ΙΔΙΟΥ Ή ΣΥΖΥΓΟΥ"},{dataField:"NewPermanentInfirmityHealthProblemsKEPANumber",caption:"ΑΜ ΚΕΠΑ(75% ΚΑΙ ΑΝΩ ΠΟΣΟΣΤΟ ΑΝΑΠΗΡΙΑΣ ΙΔΙΟΥ Ή ΣΥΖΥΓΟΥ)"},{dataField:"NewPermanentInfirmityKEPASanitaryNumber",caption:"ΑΡΙΘΜΟΣ ΕΠΙΤΡΟΠΗΣ(75% ΚΑΙ ΑΝΩ ΠΟΣΟΣΤΟ ΑΝΑΠΗΡΙΑΣ ΙΔΙΟΥ Ή ΣΥΖΥΓΟΥ)"},{dataField:"HasDisease",caption:"ΕΙΔΙΚΗ ΚΑΤΗΓΟΡΙΑ ΑΣΘΕΝΕΙΑ"},{dataField:"diseases",caption:"ΑΣΘΕΝΕΙΑ"},{dataField:"KEPANums",caption:"ΑΡΙΘΜΟΣ ΜΗΤΡΩΟΥ ΚΕΠΑ"},{dataField:"KEPASanitaryNums",caption:"ΑΡΙΘΜΟΣ ΕΠΙΤΡΟΠΗΣ"},{dataField:"NominationQualification",caption:"ΤΥΠΙΚΑ ΠΡΟΣΟΝΤΑ ΔΙΟΡΙΣΜΟΥ"},{dataField:"OtherSpeciality",caption:"ΑΛΛΟ ΠΤΥΧΙΟ ΕΚΤΟΣ ΕΚΕΙΝΟ ΤΟΥ ΔΙΟΡΙΣΜΟΥ"},{dataField:"PostGraduateOrDoctoral",caption:"ΜΕΤΑΠΤΥΧΙΑΚΟ ή ΔΙΔΑΚΤΟΡΙΚΟ ΔΙΠΛΩΜΑ"},{dataField:"MusicQualification",caption:"ΜΟΥΣΙΚΗ ΠΑΙΔΕΙΑ"},{dataField:"ArtisticExperience",caption:"ΚΑΛΛΙΤΕΧΝΙΚΗ ΕΜΠΕΙΡΙΑ"},{dataField:"DidacticExpeFromMusic",caption:"ΔΙΔΑΚΤΙΚΗ ΕΜΠΕΙΡΙΑ ΣΕ ΜΟΥΣΙΚΑ ΣΧΟΛΕΙΑ"},{dataField:"Seminars",caption:"ΣΕΜΙΝΑΡΙΑ - ΣΥΝΕΔΡΙΑ"},{dataField:"Languages",caption:"ΞΕΝΕΣ ΓΛΩΣΣΕΣ"},{dataField:"ComputerKnowlegde",caption:"ΓΝΩΣΕΙΣ Η/Υ"},{dataField:"OtherQualifications",caption:"ΑΛΛΑ ΠΡΟΣΟΝΤΑ"},{dataField:"HasMusicPermutation",caption:"ΕΧΕΙ ΚΑΤΑΘΕΣΕΙ ΑΙΤΗΣΗ ΜΕΤΑΘΕΣΗΣ ΚΑΙ ΦΑΚΕΛΟ ΔΙΚΑΙΟΛΟΓΗΤΙΚΩΝ"},{dataField:"DirectPdfLink",caption:"LINK ΔΙΚΑΙΟΛΟΓΗΤΙΚΩΝ"},{dataField:"Pref1",caption:"1η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref2",caption:"2η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref3",caption:"3η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref4",caption:"4η ΠΡΟΤΙΜΗΣΗ"},{dataField:"Pref5",caption:"5η ΠΡΟΤΙΜΗΣΗ"},{dataField:"NoGap",caption:"ΧΩΡΙΣ ΚΕΝΑ"},{dataField:"EducationExpYears",caption:"ΕΤΗ ΣΥΝΟΛΙΚΗΣ ΕΚΠ/ΚΗΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"EducationExpMonths",caption:"ΜΗΝΕΣ ΣΥΝΟΛΙΚΗΣ ΕΚΠ/ΚΗΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"EducationExpDays",caption:"ΜΕΡΕΣ ΣΥΝΟΛΙΚΗΣ ΕΚΠ/ΚΗΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"SecondaryServiceYears",caption:"ΕΤΗ ΥΠΗΡΕΣΙΑΣ ΜΟΝΟ ΣΤΗΝ Β/ΘΜΙΑ ΕΚΠ/ΣΗ"},{dataField:"SecondaryServiceMonths",caption:"ΜΗΝΕΣ ΥΠΗΡΕΣΙΑΣ ΜΟΝΟ ΣΤΗΝ Β/ΘΜΙΑ ΕΚΠ/ΣΗ"},{dataField:"SecondaryServiceDays",caption:"ΜΕΡΕΣ ΥΠΗΡΕΣΙΑΣ ΜΟΝΟ ΣΤΗΝ Β/ΘΜΙΑ ΕΚΠ/ΣΗ"},{dataField:"LeavesYears",caption:"ΕΤΗ ΑΔΕΙΩΝ"},{dataField:"LeavesMonths",caption:"ΜΗΝΕΣ ΑΔΕΙΩΝ"},{dataField:"LeavesDays",caption:"ΜΕΡΕΣ ΑΔΕΙΩΝ"},{dataField:"SecondmentBodyYears",caption:"ΕΤΗ ΑΠΟΣΠΑΣΗΣ ΣΕ ΦΟΡΕΙΣ ΕΚΤΟΣ ΣΧΟΛΕΙΩΝ Β/ΘΜΙΑΣ ΕΚΠ/ΣΗΣ"},{dataField:"SecondmentBodyMonths",caption:"ΜΗΝΕΣ ΑΠΟΣΠΑΣΗΣ ΣΕ ΦΟΡΕΙΣ ΕΚΤΟΣ ΣΧΟΛΕΙΩΝ Β/ΘΜΙΑΣ ΕΚΠ/ΣΗΣ"},{dataField:"SecondmentBodyDays",caption:"ΜΕΡΕΣ ΑΠΟΣΠΑΣΗΣ ΣΕ ΦΟΡΕΙΣ ΕΚΤΟΣ ΣΧΟΛΕΙΩΝ Β/ΘΜΙΑΣ ΕΚΠ/ΣΗΣ"},{dataField:"SecondaryDidacticExpYears",caption:"ΕΤΗ ΔΙΔΑΚΤΙΚΗΣ ΕΜΠΕΙΡΙΑΣ ΣΤΗ Β/ΘΜΙΑ ΕΚΠ/ΣΗ"},{dataField:"SecondaryDidacticExpMonths",caption:"ΜΗΝΕΣ ΔΙΔΑΚΤΙΚΗΣ ΕΜΠΕΙΡΙΑΣ ΣΤΗ Β/ΘΜΙΑ ΕΚΠ/ΣΗ"},{dataField:"SecondaryDidacticExpDays",caption:"ΜΕΡΕΣ ΔΙΔΑΚΤΙΚΗΣ ΕΜΠΕΙΡΙΑΣ ΣΤΗ Β/ΘΜΙΑ ΕΚΠ/ΣΗ"},{dataField:"LastPositionYears",caption:"ΕΤΗ ΣΤΗΝ ΤΕΛΕΥΤΑΙΑ ΟΡΓΑΝΙΚΗ ΘΕΣΗ"},{dataField:"LastPositionMonths",caption:"ΜΗΝΕΣ ΣΤΗΝ ΤΕΛΕΥΤΑΙΑ ΟΡΓΑΝΙΚΗ ΘΕΣΗ"},{dataField:"LastPositionDays",caption:"ΜΕΡΕΣ ΣΤΗΝ ΤΕΛΕΥΤΑΙΑ ΟΡΓΑΝΙΚΗ ΘΕΣΗ"},{dataField:"MusicExperienceYears",caption:"ΕΤΗ ΠΡΟΫΠΗΡΕΣΙΑΣ ΣΕ ΜΟΥΣΙΚΟ ΣΧΟΛΕΙΟ"},{dataField:"MusicExperienceMonths",caption:"ΜΗΝΕΣ ΠΡΟΫΠΗΡΕΣΙΑΣ ΣΕ ΜΟΥΣΙΚΟ ΣΧΟΛΕΙΟ"},{dataField:"MusicExperienceDays",caption:"ΜΕΡΕΣ ΠΡΟΫΠΗΡΕΣΙΑΣ ΣΕ ΜΟΥΣΙΚΟ ΣΧΟΛΕΙΟ"},{dataField:"FiveYearDidacticExp",caption:"5ετής ΔΙΔΑΚΤΙΚΗ ΕΜΠΕΙΡΙΑ ΣΤΗ Β/ΘΜΙΑ ΕΚΠ/ΣΗ"},{dataField:"Comments",caption:"ΠΑΡΑΤΗΡΗΣΕΙΣ"},{dataField:"CommentsProper",caption:"ΠΑΡΑΤΗΡΗΣΕΙΣ ΔΔΕ"},{dataField:"CommentsServiceProper",caption:"ΠΑΡΑΤΗΡΗΣΕΙΣ Υ.ΠΑΙ.Θ.Α."},{dataField:"IsConfirmed",caption:"ΕΧΕΙ ΠΑΡΑΛΗΦΘΕΙ"},{dataField:"IsBlocked",caption:"ΚΩΛΥΜΑ ΑΠΟΣΠΑΣΗΣ"},{dataField:"blockDetailsProper",caption:"ΠΕΡΙΓΡΑΦΗ ΚΩΛΥΜΑΤΟΣ"},{dataField:"IsChecked",caption:"ΕΧΕΙ ΕΓΚΡΙΘΕΙ"}];n.results=n.keepOnlyValidChars(t)},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)})};n.getAllBody=function(){n.results=[];i.getByAll("/api/Export/getAllBody").then(function(t){n.columns=[{dataField:"ApplStatus",caption:"ΚΑΤΑΣΤΑΣΗ ΑΙΤΗΣΗΣ"},{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"fekDetails",caption:"ΕΓΚΥΚΛΙΟΣ ΑΠΟΣΠΑΣΕΩΝ"},{dataField:"ProtocolString",caption:"ΠΡΩΤΟΚΟΛΛΟ"},{dataField:"CreationDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΥΠΟΒΟΛΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RegistryNo",caption:"ΑΡΙΘΜΟΣ ΜΗΤΡΩΟΥ"},{dataField:"TaxNumber",caption:"Α.Φ.Μ."},{dataField:"Lastname",caption:"ΕΠΩΝΥΜΟ"},{dataField:"Firstname",caption:"ΟΝΟΜΑ"},{dataField:"FatherFirstname",caption:"ΟΝΟΜΑ ΠΑΤΕΡΑ"},{dataField:"Telephone",caption:"ΤΗΛΕΦΩΝΟ"},{dataField:"TelephoneMobile",caption:"ΚΙΝΗΤΟ"},{dataField:"Email",caption:"EMAIL_PERSONAL"},{dataField:"AddressArea",caption:"ΠΟΛΗ"},{dataField:"AddressStreet",caption:"ΟΔΟΣ ΚΑΙ ΑΡΙΘΜΟΣ"},{dataField:"AddressPostCode",caption:"Τ.Κ."},{dataField:"Code",caption:"ΚΛΑΔΟΣ"},{dataField:"spDescription",caption:"ΛΕΚΤΙΚΟ ΚΛΑΔΟΥ"},{dataField:"spgCode",caption:"ΕΙΔΙΚΟΤΗΤΑ"},{dataField:"spgDescription",caption:"ΛΕΚΤΙΚΟ ΕΙΔΙΚΟΤΗΤΑΣ"},{dataField:"pyspde",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ ΟΡΓΑΝΙΚΗΣ"},{dataField:"officialRegionDescription",caption:"ΠΕΡΙΟΧΗ ΟΡΓΑΝΙΚΗΣ"},{dataField:"OfficialUnitType",caption:"ΤΥΠΟΣ ΟΡΓΑΝΙΚΗΣ"},{dataField:"OfficialPlacementUnitDescription",caption:"ΟΡΓΑΝΙΚΗ ΘΕΣΗ"},{dataField:"belongsToPeriphery",caption:"ΠΕΡΙΦΕΡΕΙΑ ΟΡΓΑΝΙΚΗΣ ΘΕΣΗΣ"},{dataField:"belongsToOffice",caption:"ΔΙΕΥΘΥΝΣΗ ΟΡΓΑΝΙΚΗΣ ΘΕΣΗΣ"},{dataField:"FEKNo",caption:"ΦΕΚ ΔΙΟΡΙΣΜΟΥ"},{dataField:"NominationYear",caption:"ΕΤΟΣ ΔΙΟΡΙΣΜΟΥ"},{dataField:"TotalEmploymentYears",caption:"ΕΤΗ ΥΠΗΡΕΣΙΑΣ"},{dataField:"TotalEmploymentMonths",caption:"ΜΗΝΕΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"TotalEmploymentDays",caption:"ΜΕΡΕΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"mainBody",caption:"ΦΟΡΕΑΣ ΑΠΟΣΠΑΣΗΣ"},{dataField:"otherBodySelection",caption:"ΑΛΛΟΣ ΦΟΡΕΑΣ / ΤΜΗΜΑΣ"},{dataField:"subBody1",caption:"ΕΠΙΛΟΓΗ 1 ΦΟΡΕΑ"},{dataField:"selection1",caption:"ΠΡΟΤΙΜΗΣΗ 1 ΦΟΡΕΑ"},{dataField:"selection2",caption:"ΠΡΟΤΙΜΗΣΗ 2 ΦΟΡΕΑ"},{dataField:"selection3",caption:"ΠΡΟΤΙΜΗΣΗ 3 ΦΟΡΕΑ"},{dataField:"YearOfSecondmentBody",caption:"ΧΡΟΝΙΑ ΑΠΟΣΠΑΣΗΣ ΣΤΟΝ ΦΟΡΕΑ"},{dataField:"urlCV",caption:"url ΒΙΟΓΡΑΦΙΚΟΥ",cellTemplate:function(n,t){i.isEmptyValue(t.data.urlCV)||$("<a/>").addClass("dx-link").text("Βιογραφικό").on("dxclick",function(){f.open(t.data.urlCV,"_blank")}).appendTo(n)}},{dataField:"DoctoralEducation",caption:"ΔΙΔΑΚΤΟΡΙΚΟ"},{dataField:"PostgraduateEducation",caption:"ΜΕΤΑΠΤΥΧΙΑΚΟ"},{dataField:"SecondSpeciality",caption:"2ο ΠΤΥΧΙΟ"},{dataField:"SubjectKnowledge",caption:"ΓΝΩΣΗ ΑΝΤΙΚΕΙΜΕΝΟΥ"},{dataField:"AdministrativeKnowledge",caption:"ΔΙΟΙΚΗΤΙΚΗ ΕΜΠΕΙΡΙΑ"},{dataField:"NewTechologies",caption:"ΓΝΩΣΗ ΝΕΩΝ ΤΕΧΝΟΛΟΓΙΩΝ"},{dataField:"EnglishLanguage",caption:"ΓΝΩΣΗ ΑΓΓΛΙΚΗΣ ΓΛΩΣΣΑΣ"},{dataField:"FrenchLanguage",caption:"ΓΝΩΣΗ ΓΑΛΛΙΚΗΣ ΓΛΩΣΣΑΣ"},{dataField:"GermanLanguage",caption:"ΓΝΩΣΗ ΓΕΡΜΑΝΙΚΗΣ ΓΛΩΣΣΑΣ"},{dataField:"OtherLanguage",caption:"ΓΝΩΣΗ ΑΛΛΗΣ ΞΕΝΗΣ ΓΛΩΣΣΑΣ"},{dataField:"CommentsProper",caption:"ΠΑΡΑΤΗΡΗΣΕΙΣ"},{dataField:"CommentsServiceProper",caption:"ΠΑΡΑΤΗΡΗΣΕΙΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"IsConfirmed",caption:"ΕΧΕΙ ΠΑΡΑΛΗΦΘΕΙ"},{dataField:"IsBlocked",caption:"ΚΩΛΥΜΑ ΑΠΟΣΠΑΣΗΣ"},{dataField:"blockDetailsProper",caption:"ΠΕΡΙΓΡΑΦΗ ΚΩΛΥΜΑΤΟΣ"},{dataField:"IsChecked",caption:"ΕΧΕΙ ΕΓΚΡΙΘΕΙ"}];var r=n.useMK_AllowBodies;if(i.isValueInArray(i.getRoleCode(n.authentication.role),"m1, m2, mk"))for(n.results=[],j=0;j<t.length;j++)i.isValueInArray(t[j].mainBodyId,r)?i.isValueInArray(i.getRoleCode(n.authentication.role),"mk")&&n.results.push(t[j]):i.isValueInArray(i.getRoleCode(n.authentication.role),"m1, m2")&&n.results.push(t[j]);else n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)})};n.getAllBody1920=function(){n.results=[];i.getByAll("/api/Export/getAllBody1920").then(function(t){n.columns=[{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"urlCV",caption:"url ΒΙΟΓΡΑΦΙΚΟΥ",cellTemplate:function(n,t){i.isEmptyValue(t.data.urlCV)||$("<a/>").addClass("dx-link").text("Βιογραφικό").on("dxclick",function(){f.open(t.data.urlCV,"_blank")}).appendTo(n)}},{dataField:"RegistryNo",caption:"ΑΡΙΘΜΟΣ ΜΗΤΡΩΟΥ"},{dataField:"Lastname",caption:"ΕΠΩΝΥΜΟ"},{dataField:"Firstname",caption:"ΟΝΟΜΑ"},{dataField:"FatherFirstname",caption:"ΠΑΤΡΩΝΥΜΟ"},{dataField:"Code",caption:"ΚΛΑΔΟΣ"},{dataField:"spDescription",caption:"ΛΕΚΤΙΚΟ ΚΛΑΔΟΥ"},{dataField:"belongsToOffice",caption:"ΔΙΕΥΘΥΝΣΗ ΟΡΓΑΝΙΚΗΣ ΘΕΣΗΣ"},{dataField:"officialRegionDescription",caption:"ΠΕΡΙΟΧΗ ΜΕΤΑΘΕΣΗΣ"},{dataField:"pyspde",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ ΟΡΓΑΝΙΚΗΣ"},{dataField:"OfficialUnitType",caption:"ΤΥΠΟΣ ΟΡΓΑΝΙΚΗΣ"},{dataField:"OfficialPlacementUnitDescription",caption:"ΟΡΓΑΝΙΚΗ ΘΕΣΗ"},{dataField:"FEKNo",caption:"ΦΕΚ ΔΙΟΡΙΣΜΟΥ"},{dataField:"NominationYear",caption:"ΕΤΟΣ ΔΙΟΡΙΣΜΟΥ"},{dataField:"TotalEmploymentYears",caption:"ΕΤΗ ΥΠΗΡΕΣΙΑΣ"},{dataField:"TotalEmploymentMonths",caption:"ΜΗΝΕΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"TotalEmploymentDays",caption:"ΜΕΡΕΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"ProtocolString",caption:"ΠΡΩΤΟΚΟΛΛΟ"},{dataField:"CreationDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΥΠΟΒΟΛΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"mainBody",caption:"ΦΟΡΕΑΣ ΑΠΟΣΠΑΣΗΣ"},{dataField:"otherBodySelection",caption:"ΑΛΛΟΣ ΦΟΡΕΑΣ / ΤΜΗΜΑΣ"},{dataField:"selection1",caption:"ΠΡΟΤΙΜΗΣΗ 1 ΦΟΡΕΑ"},{dataField:"selection2",caption:"ΠΡΟΤΙΜΗΣΗ 2 ΦΟΡΕΑ"},{dataField:"IsBlocked",caption:"ΚΩΛΥΜΑ ΑΠΟΣΠΑΣΗΣ"},{dataField:"blockDetailsProper",caption:"ΠΕΡΙΓΡΑΦΗ ΚΩΛΥΜΑΤΟΣ"},{dataField:"CommentsProper",caption:"ΠΑΡΑΤΗΡΗΣΕΙΣ"},{dataField:"IsConfirmed",caption:"ΕΧΕΙ ΠΑΡΑΛΗΦΘΕΙ"},{dataField:"IsChecked",caption:"ΕΧΕΙ ΕΓΚΡΙΘΕΙ"},{dataField:"IsActive",caption:"ΚΑΤΑΣΤΑΣΗ ΑΙΤΗΣΗΣ"}];n.results=t;i.isValueInArray(i.getRoleCode(n.authentication.role),"mk")&&(n.results=n.results.filter(function(n){return n.mainBodyId!=635}))},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)})};n.getAllBodyTechnical=function(){n.results=[];i.getByAll("/api/Export/getAllBodyTechnical").then(function(t){n.columns=[{dataField:"Level",caption:"ΒΑΘΜΙΔΑ"},{dataField:"urlCV",caption:"url ΒΙΟΓΡΑΦΙΚΟΥ",cellTemplate:function(n,t){i.isEmptyValue(t.data.urlCV)||$("<a/>").addClass("dx-link").text("Βιογραφικό").on("dxclick",function(){f.open(t.data.urlCV,"_blank")}).appendTo(n)}},{dataField:"RegistryNo",caption:"ΑΡΙΘΜΟΣ ΜΗΤΡΩΟΥ"},{dataField:"Lastname",caption:"ΕΠΩΝΥΜΟ"},{dataField:"Firstname",caption:"ΟΝΟΜΑ"},{dataField:"FatherFirstname",caption:"ΠΑΤΡΩΝΥΜΟ"},{dataField:"Code",caption:"ΚΛΑΔΟΣ"},{dataField:"spDescription",caption:"ΛΕΚΤΙΚΟ ΚΛΑΔΟΥ"},{dataField:"belongsToOffice",caption:"ΔΙΕΥΘΥΝΣΗ ΟΡΓΑΝΙΚΗΣ ΘΕΣΗΣ"},{dataField:"officialRegionDescription",caption:"ΠΕΡΙΟΧΗ ΜΕΤΑΘΕΣΗΣ"},{dataField:"pyspde",caption:"ΠΥΣΠΕ/ΠΥΣΔΕ ΟΡΓΑΝΙΚΗΣ"},{dataField:"OfficialUnitType",caption:"ΤΥΠΟΣ ΟΡΓΑΝΙΚΗΣ"},{dataField:"OfficialPlacementUnitDescription",caption:"ΟΡΓΑΝΙΚΗ ΘΕΣΗ"},{dataField:"FEKNo",caption:"ΦΕΚ ΔΙΟΡΙΣΜΟΥ"},{dataField:"NominationYear",caption:"ΕΤΟΣ ΔΙΟΡΙΣΜΟΥ"},{dataField:"TotalEmploymentYears",caption:"ΕΤΗ ΥΠΗΡΕΣΙΑΣ"},{dataField:"TotalEmploymentMonths",caption:"ΜΗΝΕΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"TotalEmploymentDays",caption:"ΜΕΡΕΣ ΥΠΗΡΕΣΙΑΣ"},{dataField:"ProtocolString",caption:"ΠΡΩΤΟΚΟΛΛΟ"},{dataField:"CreationDate",caption:"ΗΜΕΡΟΜΗΝΙΑ ΥΠΟΒΟΛΗΣ",dataType:"date",format:"dd/MM/yyyy"},{dataField:"mainBody",caption:"ΦΟΡΕΑΣ ΑΠΟΣΠΑΣΗΣ"},{dataField:"otherBodySelection",caption:"ΑΛΛΟΣ ΦΟΡΕΑΣ / ΤΜΗΜΑΣ"},{dataField:"selection1",caption:"ΠΡΟΤΙΜΗΣΗ 1 ΦΟΡΕΑ"},{dataField:"selection2",caption:"ΠΡΟΤΙΜΗΣΗ 2 ΦΟΡΕΑ"},{dataField:"IsBlocked",caption:"ΚΩΛΥΜΑ ΑΠΟΣΠΑΣΗΣ"},{dataField:"blockDetailsProper",caption:"ΠΕΡΙΓΡΑΦΗ ΚΩΛΥΜΑΤΟΣ"},{dataField:"CommentsProper",caption:"ΠΑΡΑΤΗΡΗΣΕΙΣ"},{dataField:"IsConfirmed",caption:"ΕΧΕΙ ΠΑΡΑΛΗΦΘΕΙ"},{dataField:"IsChecked",caption:"ΕΧΕΙ ΕΓΚΡΙΘΕΙ"},{dataField:"IsActive",caption:"ΚΑΤΑΣΤΑΣΗ ΑΙΤΗΣΗΣ"}];n.results=t},function(n){t.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα "+n.error_description)})}};ReportsController.$inject=["$scope","toaster","GeneralFactory","$state","$filter","$window"];ResetPasswordController=function(n,t,i,r,u,f){n.authentication.isAuth&&$location.path("forbidden");n.savedSuccessfully=!1;n.message="";n.changeData={email:i.load,code:i.code,password:"",confirmPassword:""};n.change=function(){r.resetPassword(n.changeData).then(function(){n.savedSuccessfully=!0;n.message="Η αλλαγή του κωδικού σας έγινε με επιτυχία, θα μεταφερθείτε αυτόματα στη σελίδα σύνδεσης σε 5 δευτερόλεπτα.";e()},function(t){var u=[],r,i;for(r in t.data.ModelState)for(i=0;i<t.data.ModelState[r].length;i++)u.push(t.data.ModelState[r][i]);n.message=u.join("<br/>")})};var e=function(){var n=f(function(){f.cancel(n);t.go("/")},5e3)}};ResetPasswordController.$inject=["$scope","$state","$stateParams","AuthService","ngAuthSettings","$timeout"];search=function(n,t,i,r,u,f,e,o,s,h,c,l,a){if(n.pageRules={},n.filteredNews=[],n.viewby=15,n.currentPage=4,n.itemsPerPage=n.viewby,n.maxSize=5,n.authentication.isAuth)if(n.authentication.isAuth&&h.isValueInArray(h.getRoleCode(n.authentication.role),"u1, u2"))i.go("forbidden");else{var v="folder,recruitment";h.getByParams({role:n.authentication.role,codes:v},"/api/Subsystem/NewCheckPermission").then(function(t){var i=v.split(",");for(var r in i)n.pageRules[i[r]]=l("filter")(t,{Code:i[r]},!0)[0].Rules},function(){e.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else i.go("/");n.searchpersons={TaxNumber:"",Lastname:"",Firstname:"",FatherFirstname:"",MotherFirstname:"",RegistryNo:"",IsActive:!0,IsPermanent:!0,regionAndUnitId:0,userRole:"",Email:"",Username:""};n.searchBYYA={Ada:"",RecruitmentProtocol:"",RecruitmentsStatusId:"",ApplicationTypeRegionAndUnitId:"",ServiceAssumed:"",UserRole:"",UserRegionAndUnitId:0,UserLevelId:0};n.showTabDetails={Tab1:!0,Tab2:!1};n.recruitmentDetails=[];n.persons=[];t.resetPerson();t.resetApplication();n.applicationType={};n.showOption2=!1;n.showYesButton="disabled";n.TaxNumberValidation=!1;n.searchpersons.regionAndUnitId=n.authentication.regionAndUnitId;n.searchpersons.userRole=n.authentication.role;o.getApplicationTypeByActiveFek().then(function(t){n.applicationType=t},function(n){e.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});n.options1=[{Name:"Αιτήσεις"},{Name:"Πρόσληψη"},{Name:"Έλεγχος Γνησιότητας"}];n.options2=[{Name:"",SpecialityId:"",Description:"",Code:"",DisplayName:""}];n.changedOption1=function(){n.option1Selected=="Αιτήσεις"?n.showOption2=!0:(n.option1Selected=="Έλεγχος Γνησιότητας"||n.option1Selected=="Πρόσληψη")&&(n.showOption2=!1);n.showYesButtonForModal()};n.showYesButtonForModal=function(){n.showYesButton=n.option1Selected=="Αιτήσεις"&&n.option2Selected!=null&&n.option2Selected!="undefined"&&n.option2Selected!=""?"":n.option1Selected=="Έλεγχος Γνησιότητας"||n.option1Selected=="Πρόσληψη"?"":"disabled"};n.changedOption2=function(){n.showYesButtonForModal()};n.actionsForPerson=function(n,r,u){if(t.setPersonId(n.Id),r=="Αιτήσεις")switch(u.Name){case"Αναπληρωτή":i.go("substitute");break;case"Ωρομισθίου":i.go("hourlyteacher");break;case"Αναπληρωτή ΣΜΕΑΕ":i.go("substitutesmea");break;case"Ωρομισθίου ΣΜΕΑΕ":i.go("hourlyteachersmea");break;case"Αναπληρωτή σε Μουσικά Σχολεία":i.go("substitutemusic");break;case"Ωρομισθίου σε Μουσικά Σχολεία":i.go("hourlyteachermusic");break;case"Απόσπασης ΠΥΣΠΕ/ΠΥΣΔΕ":i.go("secondmentapplicationpyspdechurch");break;case"Απόσπασης ΣΜΕΑΕ - ΚΕ.Δ.Α.Σ.Υ.":i.go("secondmentapplicationpyspdesmea");break;case"Απόσπασης σε Φορέα":i.go("secondmentapplicationbody");break;case"Απόσπασης σε Καλλιτεχνικά Σχολεία":i.go("secondmentapplicationartistic");break;case"Απόσπασης σε Μουσικά Σχολεία":i.go("secondmentapplicationmusic");break;case"Απόσπασης κλάδου Πληροφορικής σε Φορέα":i.go("secondmentapplicationbody1920");break;case"Απόσπασης για Θέση Συντονιστή Εκπαίδευσης Προσφύγων":i.go("secondmentapplicationbodyref");break;case"Απόσπασης ΕΕΠ - ΕΒΠ":i.go("secondmentapplicationeepebp");break;case"Ενισχυτικής Διδασκαλίας":i.go("remediation");break;case"Απόσπασης σε Εκκλησιαστικά Σχολεία":i.go("secondmentchurch");break;case"Απόσπασης σε Σχολείο Ευρωπαϊκής Παιδείας":i.go("secondmentapplicationbodysep");break;case"Περιφερειακοί Διευθυντές Εκπαίδευσης":i.go("prefecture");break;case"Απόσπασης σε Κ.Ε.Σ.Υ. με εξειδίκευση στη συμβουλευτική και στον επαγγελματικό προσανατολισμό":i.go("secondmentapplicationkesy");break;case"Διευθυντές Εκπαίδευσης":i.go("intendancy");break;case"Διευθυντές Α/θμιας & Β/θμιας Εκπαίδευσης":i.go("educationDirectors");break;case"Αίτηση Απόσπασης στη Γενική Διεύθυνση Στρατηγικού Σχεδιασμού, Προγραμματισμού και Ηλεκτρονικής Διακυβέρνησης του Υ.ΠΑΙ.Θ.Α.":i.go("secondmentapplicationbodytechnical");break;case"Αναπληρωτή ΕΕΠ - ΕΒΠ":i.go("substituteEEPEBP");break;case"Ωρομισθίου σε Μουσικά Σχολεία για κλάδο ΕΜ16.00":i.go("hourlyteachermusicforEM16");break;case"Αίτηση για Μόνιμο Διορισμό ΕΕΠ-ΕΒΠ":i.go("permanentEEPEBP");break;case"Αίτηση για Μόνιμο Διορισμό ΣΜΕΑΕ":i.go("permanentSMEA");break;case"Αίτηση για Μόνιμο Διορισμό":i.go("permanent");break;case"Αίτηση για Μόνιμο Διορισμό σε Μουσικό Σχολείο":i.go("permanentMusic");break;case"Αναπληρωτή για ειδική προκήρυξη":i.go("substituteForSchool");break;case"Αναπληρωτή ΣΜΕΑΕ για ειδική προκήρυξη":i.go("substituteSMEAForSchool");break;case"Αναπληρωτή ΕΕΠ-ΕΒΠ για ειδική προκήρυξη":i.go("substituteEEPEBPForSchool");break;case"Αναπληρωτή ΠΕ87.02 για κάλυψη θέσεων ΠΕ25 (ειδική προκήρυξη)":i.go("substitutePE8702School");break;case"Αναπληρωτή TE01.30 για κάλυψη θέσεων ΕΒΠ (ειδική προκήρυξη)":i.go("substituteTE0130School");break;case"Αναπληρωτή για δια ζώσης διδασκαλία με 3μηνη σύμβαση":i.go("substitute3months");break;case"Αναπληρωτή ΣΜΕΑΕ για δια ζώσης διδασκαλία με 3μηνη σύμβαση":i.go("substituteSMEA3months");break;case"Αναπληρωτή σε Μουσικά Σχολεία για δια ζώσης διδασκαλία με 3μηνη σύμβαση":i.go("substituteMusic3months");break;case"Αναπληρωτή ΕΕΠ-ΕΒΠ για δια ζώσης παροχή υποστηρικτικού έργου με 3μηνη σύμβαση":i.go("substituteEEPEBP3months");break;case"Ενισχυτικής Διδασκαλίας ΣΜΕΑΕ":i.go("remediationSMEA");break;case"Ενισχυτικής Διδασκαλίας Μουσικών Σχολείων":i.go("remediationMusic");break;case"Αίτηση - Δήλωση προτίμησης τοποθέτησης προσληφθέντων":i.go("substitutePlacementSchool");break;case"Γενική Αίτηση Απόσπασης":i.go("secondmentapplicationgeneral")}else r=="Έλεγχος Γνησιότητας"?i.go("confirmation"):r=="Πρόσληψη"&&i.go("recruitmentServiceAssumed")};n.goToHistory=function(n){t.setPersonId(n);i.go("history")};n.showTrackChanges=function(n){t.setTrackId(n);t.setPersonId(n);t.setTrackTypeId(1);i.go("showTrackChanges")};n.changeTaxNumber=function(){n.searchpersons.TaxNumber.length>0?(n.searchpersons.RegistryNo="",n.searchpersons.Firstname="",n.searchpersons.Lastname="",n.searchpersons.FatherFirstname="",n.searchpersons.MotherFirstname="",n.searchpersons.Email="",n.searchpersons.Username=""):(n.disableTaxNumber(),n.disableRegistryNo(),n.disableNames())};n.disableTaxNumber=function(){return n.searchpersons.RegistryNo.length>0||n.searchpersons.Firstname.length>0||n.searchpersons.Lastname.length>0||n.searchpersons.FatherFirstname.length>0||n.searchpersons.MotherFirstname.length>0||!h.isEmptyValue(n.searchpersons.Email)||!h.isEmptyValue(n.searchpersons.Username)?!0:!1};n.disableRegistryNo=function(){return n.searchpersons.TaxNumber.length>0||n.searchpersons.Firstname.length>0||n.searchpersons.Lastname.length>0||n.searchpersons.FatherFirstname.length>0||n.searchpersons.MotherFirstname.length>0||!h.isEmptyValue(n.searchpersons.Email)||!h.isEmptyValue(n.searchpersons.Username)?!0:!1};n.disableNames=function(){return n.searchpersons.TaxNumber.length>0||n.searchpersons.RegistryNo.length>0?!0:!1};n.changeRegistryNo=function(){n.searchpersons.RegistryNo.length>0?(n.searchpersons.TaxNumber="",n.searchpersons.Firstname="",n.searchpersons.Lastname="",n.searchpersons.FatherFirstname="",n.searchpersons.MotherFirstname="",n.searchpersons.Email="",n.searchpersons.Username=""):(n.disableTaxNumber(),n.disableRegistryNo(),n.disableNames())};n.changeNames=function(){n.searchpersons.Firstname.length>0||n.searchpersons.Lastname.length>0||n.searchpersons.FatherFirstname.length>0||n.searchpersons.MotherFirstname.length>0?(n.searchpersons.TaxNumber="",n.searchpersons.RegistryNo=""):(n.disableTaxNumber(),n.disableRegistryNo(),n.disableNames())};n.clearButtons=function(){n.searchpersons.TaxNumber="";n.searchpersons.Firstname="";n.searchpersons.Lastname="";n.searchpersons.FatherFirstname="";n.searchpersons.MotherFirstname="";n.searchpersons.RegistryNo="";n.searchpersons.Email="";n.searchpersons.Username="";$("#IsActive").bootstrapSwitch("state",!0,!0);n.searchpersons.IsActive=!0;$("#IsPermanent").bootstrapSwitch("state",!1,!0);n.searchpersons.IsPermanent=!1;n.TaxNumberValidation=!1;n.disableTaxNumber();n.disableRegistryNo();n.disableNames();c.SearchFilters.search={};n.checkPerson=!1;n.persons=[]};n.edit=function(n){t.setPersonId(n);i.go("stateEditPerson")};n.goAction=function(){i.go("statenewPerson")};n.checkShow=function(t){t.length>=1?(n.checkPerson=!0,n.showPaging=!0):(n.checkPerson=!1,n.showPaging=!1)};n.checkValidTaxNumber=function(){var u,i,r,t;if(n.TaxNumberValidation=!1,n.searchpersons.TaxNumber!=="000000000"&&n.searchpersons.TaxNumber.match(/^\d{9}$/)){for(i=1,r=0,t=7;t>=0;t--)i*=2,r+=n.searchpersons.TaxNumber.charAt(t)*i;u=r%11%10==n.searchpersons.TaxNumber.charAt(8);n.TaxNumberValidation=u?!1:!0}else n.TaxNumberValidation=!0};n.searchAction=function(){n.searchpersons.TaxNumber!=""&&n.searchpersons.TaxNumber!="undefined"&&n.searchpersons.TaxNumber.length>0&&n.checkValidTaxNumber();n.option1Selected="";n.checkEmptyFields()?(h.getByParams(n.searchpersons,"/api/Person/getPersonWithSpecialities").then(function(t){n.persons=t;n.totalItems=n.persons.length;n.persons.length<1&&e.pop("info","Αποτελέσματα αναζήτησης","Δεν βρέθηκαν αποτελέσματα με τα συγκεκριμένα φίλτρα αναζήτησης");n.checkShow(n.persons)},function(n){e.pop("error","ΠΡΟΣΟΧΗ",n.statusText)}),c.SearchFilters.search={TaxNumber:n.searchpersons.TaxNumber,Lastname:n.searchpersons.Lastname,Firstname:n.searchpersons.Firstname,FatherFirstname:n.searchpersons.FatherFirstname,MotherFirstname:n.searchpersons.MotherFirstname,RegistryNo:n.searchpersons.RegistryNo,IsActive:n.searchpersons.IsActive,Email:n.searchpersons.Email,Username:n.searchpersons.Username,IsPermanent:n.searchpersons.IsPermanent,regionAndUnitId:n.searchpersons.regionAndUnitId,userRole:n.searchpersons.userRole}):e.pop("erros","Αδυναμία αναζήτησης","Παρακαλώ συμπληρώστε ορθά τα φίλτρα αναζήτησης.")};n.checkEmptyFields=function(){return n.searchpersons.TaxNumber==""&&n.searchpersons.RegistryNo==""&&n.searchpersons.Firstname==""&&n.searchpersons.Lastname==""&&n.searchpersons.MotherFirstname==""&&n.searchpersons.FatherFirstname==""&&n.searchpersons.Email==""&&n.searchpersons.Username==""?!1:n.searchpersons.TaxNumber!=""||n.searchpersons.RegistryNo!=""?!0:n.searchpersons.Lastname!=""&&n.searchpersons.Lastname.length>=2||!h.isEmptyValue(n.searchpersons.Email)&&h.isValueInArray(h.getRoleCode(n.authentication.role),"a, m1, m2")||!h.isEmptyValue(n.searchpersons.Username)&&h.isValueInArray(h.getRoleCode(n.authentication.role),"a, m1, m2")?!0:(e.pop("erros","Αδυναμία αναζήτησης","Πρέπει να επιλέξετε υποχρεωτικά τουλάχιστον τους δύο αρχικούς χαρακτήρες από το Επώνυμο."),!1)};n.disablePerson=function(t){t.RegionAndUnitDescription=n.authentication.unitName;t.UserRole=n.authentication.role;var i=t;h.postByParams(i,"/api/Person/disOrEnablPerson").then(function(){e.pop("success","Η αλλαγή τροποποιήθηκε με επιτυχία","");n.searchAction(n.searchpersons)},function(n){e.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.disPerson;n.openModal=function(t){var i=f.all([s.getPersonAttributesForMenu(t.Id),]);i.then(function(i){n.personAttributesForMenu=i[0];n.options2=n.personAttributesForMenu.IsPermanent?[{Name:"Απόσπασης ΠΥΣΠΕ/ΠΥΣΔΕ",DisplayName:"Απόσπασης ΠΥΣΠΕ/ΠΥΣΔΕ"},{Name:"Απόσπασης ΕΕΠ - ΕΒΠ",DisplayName:"Απόσπασης ΕΕΠ - ΕΒΠ"},{Name:"Απόσπασης σε Εκκλησιαστικά Σχολεία",DisplayName:"Απόσπασης σε Εκκλησιαστικά Σχολεία"},{Name:"Απόσπασης ΣΜΕΑΕ - ΚΕ.Δ.Α.Σ.Υ.",DisplayName:"Απόσπασης ΣΜΕΑΕ - ΚΕ.Δ.Α.Σ.Υ."},{Name:"Απόσπασης σε Φορέα",DisplayName:"Απόσπασης σε Φορέα"},{Name:"Απόσπασης σε Καλλιτεχνικά Σχολεία",DisplayName:"Απόσπασης σε Καλλιτεχνικά Σχολεία"},{Name:"Απόσπασης σε Μουσικά Σχολεία",DisplayName:"Απόσπασης σε Μουσικά Σχολεία"},{Name:"Απόσπασης κλάδου Πληροφορικής σε Φορέα",DisplayName:"Απόσπασης κλάδου Πληροφορικής σε Φορέα"},{Name:"Απόσπασης για Θέση Συντονιστή Εκπαίδευσης Προσφύγων",DisplayName:"Απόσπασης για Θέση Συντονιστή Εκπαίδευσης Προσφύγων"},{Name:"Απόσπασης σε Σχολείο Ευρωπαϊκής Παιδείας",DisplayName:"Απόσπασης σε Σχολείο Ευρωπαϊκής Παιδείας"},{Name:"Αίτηση Απόσπασης στη Γενική Διεύθυνση Στρατηγικού Σχεδιασμού, Προγραμματισμού και Ηλεκτρονικής Διακυβέρνησης του Υ.ΠΑΙ.Θ.Α.",DisplayName:"Αίτηση Απόσπασης στη Γενική Διεύθυνση Στρατηγικού Σχεδιασμού, Προγραμματισμού και Ηλεκτρονικής Διακυβέρνησης του Υ.ΠΑΙ.Θ.Α."},{Name:"Περιφερειακοί Διευθυντές Εκπαίδευσης",DisplayName:"Περιφερειακοί Διευθυντές Εκπαίδευσης"},{Name:"Διευθυντές Εκπαίδευσης",DisplayName:"Διευθυντές Εκπαίδευσης"},{Name:"Αίτηση για Μόνιμο Διορισμό ΕΕΠ-ΕΒΠ",DisplayName:"Αίτηση για Μόνιμο Διορισμό ΕΕΠ-ΕΒΠ"},{Name:"Αίτηση για Μόνιμο Διορισμό ΣΜΕΑΕ",DisplayName:"Αίτηση για Μόνιμο Διορισμό ΣΜΕΑΕ"},{Name:"Αίτηση για Μόνιμο Διορισμό",DisplayName:"Αίτηση για Μόνιμο Διορισμό"},{Name:"Αίτηση για Μόνιμο Διορισμό σε Μουσικό Σχολείο",DisplayName:"Αίτηση για Μόνιμο Διορισμό σε Μουσικό Σχολείο"},{Name:"Γενική Αίτηση Απόσπασης",DisplayName:"Γενική Αίτηση Απόσπασης"}]:[{Name:"Αναπληρωτή",DisplayName:"Αναπληρωτή"},{Name:"Ωρομισθίου",DisplayName:"Ωρομισθίου"},{Name:"Αναπληρωτή ΣΜΕΑΕ",DisplayName:"Αναπληρωτή ΣΜΕΑΕ"},{Name:"Ωρομισθίου ΣΜΕΑΕ",DisplayName:"Ωρομισθίου ΣΜΕΑΕ"},{Name:"Αναπληρωτή σε Μουσικά Σχολεία",DisplayName:"Αναπληρωτή σε Μουσικά Σχολεία"},{Name:"Ωρομισθίου σε Μουσικά Σχολεία",DisplayName:"Ωρομισθίου σε Μουσικά Σχολεία"},{Name:"Ωρομισθίου σε Μουσικά Σχολεία για κλάδο ΕΜ16.00",DisplayName:"Ωρομισθίου σε Μουσικά Σχολεία για κλάδο ΕΜ16.00"},{Name:"Αναπληρωτή ΕΕΠ - ΕΒΠ",DisplayName:"Αναπληρωτή ΕΕΠ - ΕΒΠ"},{Name:"Αίτηση για Μόνιμο Διορισμό",DisplayName:"Αίτηση για Μόνιμο Διορισμό"},{Name:"Αίτηση για Μόνιμο Διορισμό ΣΜΕΑΕ",DisplayName:"Αίτηση για Μόνιμο Διορισμό ΣΜΕΑΕ"},{Name:"Αίτηση για Μόνιμο Διορισμό σε Μουσικό Σχολείο",DisplayName:"Αίτηση για Μόνιμο Διορισμό σε Μουσικό Σχολείο"},{Name:"Αίτηση για Μόνιμο Διορισμό ΕΕΠ-ΕΒΠ",DisplayName:"Αίτηση για Μόνιμο Διορισμό ΕΕΠ-ΕΒΠ"},{Name:"Αναπληρωτή για ειδική προκήρυξη",DisplayName:"Αναπληρωτή για ειδική προκήρυξη"},{Name:"Αναπληρωτή ΣΜΕΑΕ για ειδική προκήρυξη",DisplayName:"Αναπληρωτή ΣΜΕΑΕ για ειδική προκήρυξη"},{Name:"Αναπληρωτή ΕΕΠ-ΕΒΠ για ειδική προκήρυξη",DisplayName:"Αναπληρωτή ΕΕΠ-ΕΒΠ για ειδική προκήρυξη"},{Name:"Αναπληρωτή ΠΕ87.02 για κάλυψη θέσεων ΠΕ25 (ειδική προκήρυξη)",DisplayName:"Αναπληρωτή ΠΕ87.02 για κάλυψη θέσεων ΠΕ25 (ειδική προκήρυξη)"},{Name:"Αναπληρωτή TE01.30 για κάλυψη θέσεων ΕΒΠ (ειδική προκήρυξη)",DisplayName:"Αναπληρωτή TE01.30 για κάλυψη θέσεων ΕΒΠ (ειδική προκήρυξη)"},{Name:"Ενισχυτικής Διδασκαλίας",DisplayName:"Ενισχυτικής Διδασκαλίας"},{Name:"Ενισχυτικής Διδασκαλίας ΣΜΕΑΕ",DisplayName:"Ενισχυτικής Διδασκαλίας ΣΜΕΑΕ"},{Name:"Ενισχυτικής Διδασκαλίας Μουσικών Σχολείων",DisplayName:"Ενισχυτικής Διδασκαλίας Μουσικών Σχολείων"},{Name:"Αίτηση - Δήλωση προτίμησης τοποθέτησης προσληφθέντων",DisplayName:"Αίτηση - Δήλωση προτίμησης τοποθέτησης προσληφθέντων"}];n.disPerson=t},function(){e.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})};n.pressEnterFunction=function(t){t.which===13&&n.searchAction(n.searchpersons)};n.clickTab2=function(){n.persons=[];n.results=[];n.totalItems=n.persons.length;n.checkPerson=!1;n.showTabDetails={Tab1:!1,Tab2:!0};n.clearButtonsByYA();var t=f.all([h.getByAll("/api/RecruitmentServiceAssumed/serviceAssumed"),h.getByParams({role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId,levelId:n.authentication.levelId},"/api/RecruitmentServiceAssumed/getRecruitmentsDetailsForSearch")]);t.then(function(t){n.serviceAssumedTypes=t[0];n.serviceAssumedTypes.push({Id:4,Description:"Εκκρεμεί"});n.recruitmentDetails=t[1]})};n.clickTab1=function(){n.persons=[];n.results=[];n.totalItems=n.persons.length;n.checkPerson=!1;n.showTabDetails={Tab1:!0,Tab2:!1}};n.checkEmptyFieldsByYA=function(){return h.isValueInArray(h.getRoleCode(n.authentication.role),"a, m2,m1")?h.isEmptyValue(n.searchBYYA.Ada)&&h.isEmptyValue(n.searchBYYA.RecruitmentProtocol)&&h.isEmptyValue(n.searchBYYA.RecruitmentsStatusId)&&h.isEmptyValue(n.searchBYYA.ApplicationTypeRegionAndUnitId)&&h.isEmptyValue(n.searchBYYA.ServiceAssumed)?(e.pop("erros","Αδυναμία αναζήτησης","Πρέπει να επιλέξετε τουλάχιστον ένα από τα πεδία αναζήτησης."),!1):!h.isEmptyValue(n.searchBYYA.ServiceAssumed)&&h.isEmptyValue(n.searchBYYA.Ada)&&h.isEmptyValue(n.searchBYYA.ApplicationTypeRegionAndUnitId)?(e.pop("erros","Αδυναμία αναζήτησης","Παρακαλώ επιλέξτε περιοχή μετάθεσης ή Α.Δ.Α."),!1):!h.isEmptyValue(n.searchBYYA.RecruitmentsStatusId)&&h.isEmptyValue(n.searchBYYA.Ada)&&h.isEmptyValue(n.searchBYYA.ApplicationTypeRegionAndUnitId)?(e.pop("erros","Αδυναμία αναζήτησης","Παρακαλώ επιλέξτε περιοχή μετάθεσης ή Α.Δ.Α."),!1):!0:h.isEmptyValue(n.searchBYYA.Ada)&&h.isEmptyValue(n.searchBYYA.RecruitmentProtocol)&&h.isEmptyValue(n.searchBYYA.RecruitmentsStatusId)&&h.isEmptyValue(n.searchBYYA.ApplicationTypeRegionAndUnitId)&&h.isEmptyValue(n.searchBYYA.ServiceAssumed)?(e.pop("erros","Αδυναμία αναζήτησης","Πρέπει να επιλέξετε τουλάχιστον ένα από τα πεδία αναζήτησης."),!1):!0};n.clearButtonsByYA=function(){n.searchBYYA={Ada:"",RecruitmentProtocol:"",RecruitmentsStatusId:"",ApplicationTypeRegionAndUnitId:"",ServiceAssumed:"",UserRole:"",UserRegionAndUnitId:0,UserLevelId:0};n.checkPerson=!1;n.persons=[]};n.searchActionByYA=function(){n.results=[];n.searchBYYA.UserRole=n.authentication.role;n.searchBYYA.UserRegionAndUnitId=n.authentication.regionAndUnitId;n.searchBYYA.UserLevelId=n.authentication.levelId;n.checkEmptyFieldsByYA()?(blockUI({target:"#searhcForm2",animate:!0}),h.getByParams(n.searchBYYA,"/api/RecruitmentServiceAssumed/getPersonFromSubstitute").then(function(t){n.persons=t;n.totalItems=n.persons.length;n.showPaging=!0;n.persons.length<1&&e.pop("info","Αποτελέσματα αναζήτησης","Δεν βρέθηκαν αποτελέσματα με τα συγκεκριμένα φίλτρα αναζήτησης");n.checkShow(n.persons);a(function(){unblockUI("#searhcForm2")},300)},function(n){a(function(){unblockUI("#searhcForm2")},300);e.pop("error","ΠΡΟΣΟΧΗ",n.data)}),n.setPage=function(t){n.currentPage=t},n.setItemsPerPage=function(t){n.itemsPerPage=t;n.currentPage=1}):e.pop("erros","Αδυναμία αναζήτησης","Παρακαλώ συμπληρώστε ορθά τα φίλτρα αναζήτησης.")};n.filterRow={visible:!0,applyFilter:"auto"};n.headerFilter={visible:!0};n.showColumnLines=!0;n.showRowLines=!0;n.showBorders=!0;n.rowAlternationEnabled=!0;n.gridOptions={bindingOptions:{dataSource:"results",filterRow:"filterRow",headerFilter:"headerFilter",showColumnLines:"showColumnLines",showRowLines:"showRowLines",showBorders:"showBorders",rowAlternationEnabled:"rowAlternationEnabled",columns:"columns"},allowColumnReordering:!0,allowColumnResizing:!0,columnAutoWidth:!0,columnFixing:{enabled:!0},searchPanel:{visible:!0,width:240,placeholder:"Αναζήτηση..."},selection:{mode:"multiple"},columnChooser:{enabled:!0},"export":{enabled:!0,fileName:"Results",allowExportSelectedData:!0},groupPanel:{visible:!0},paging:{pageSize:10},pager:{showPageSizeSelector:!0,allowedPageSizes:[10,20,50,100],showInfo:!0}};n.results=[];n.searchActionByYAForExport=function(){n.checkPerson=!1;n.persons=[];n.columns=[{dataField:"TaxNumber",caption:"Α.Φ.Μ"},{dataField:"Lastname",caption:"Επώνυμο"},{dataField:"Firstname",caption:"Όνομα"},{dataField:"FatherFirstname",caption:"Πατρώνυμο"},{dataField:"MotherFirstname",caption:"Μητρώνυμο"},{dataField:"Speciality",caption:"Κλάδος"},{dataField:"Ada",caption:"Α.Δ.Α."},{dataField:"RecruitmentProtocol",caption:"Αρ. Πρωτοκόλλου"},{dataField:"RecruitmentDate",caption:"Ημ/νία Πρόσληψης",dataType:"date",format:"dd/MM/yyyy"},{dataField:"RecruitmentsStatusDescription",caption:"Κατάσταση"},{dataField:"RegionAndUnitDescription",caption:"Περιοχή",width:150},{dataField:"ServiceAssumedDescription",caption:"Ανάληψη Υπηρεσίας"},{dataField:"ServiceAssumedDate",caption:"Ημ/νια Ανάληψης Υπηρεσίας",dataType:"date",format:"dd/MM/yyyy"}];n.checkEmptyFieldsByYA()?h.getByParams(n.searchBYYA,"/api/RecruitmentServiceAssumed/getPersonFromSubstitute").then(function(t){n.results=t},function(n){e.pop("error","ΠΡΟΣΟΧΗ",n.data)}):e.pop("erros","Αδυναμία αναζήτησης","Παρακαλώ συμπληρώστε ορθά τα φίλτρα αναζήτησης.")};c.SearchFilters!=null&&c.SearchFilters!=""&&c.SearchFilters!="undefined"?c.SearchFilters.search!=null&&c.SearchFilters.search!=""&&c.SearchFilters.search!="undefined"?c.SearchFilters.search.TaxNumber!=null&&c.SearchFilters.search.TaxNumber!="undefined"&&(c.SearchFilters.search.TaxNumber!=""||c.SearchFilters.search.RegistryNo!=""||c.SearchFilters.search.Firstname!=""||c.SearchFilters.search.Lastname!=""||c.SearchFilters.search.MotherFirstname!=""||c.SearchFilters.search.FatherFirstname!=""||c.SearchFilters.search.Email!=""||c.SearchFilters.search.Username!="")&&(n.searchpersons={TaxNumber:c.SearchFilters.search.TaxNumber,Lastname:c.SearchFilters.search.Lastname,Firstname:c.SearchFilters.search.Firstname,FatherFirstname:c.SearchFilters.search.FatherFirstname,MotherFirstname:c.SearchFilters.search.MotherFirstname,RegistryNo:c.SearchFilters.search.RegistryNo,IsActive:c.SearchFilters.search.IsActive,IsPermanent:c.SearchFilters.search.IsPermanent,regionAndUnitId:c.SearchFilters.search.regionAndUnitId,userRole:c.SearchFilters.search.userRole,Email:c.SearchFilters.search.Email,Username:c.SearchFilters.search.Username},n.searchAction(n.searchpersons)):c.SearchFilters.search={}:c.SearchFilters={}};search.$inject=["$scope","PassParameters","$state","DTOptionsBuilder","DTColumnBuilder","$q","toaster","ApplicationTypeFactory","LandingPageFactory","GeneralFactory","$rootScope","$filter","$timeout"];SearchFekController=function(n,t,i,r,u,f,e){n.searchFek={};n.feks=[];n.applicationType={};t.setFek("");(!n.authentication.isAuth||f.isValueInArray(f.getRoleCode(n.authentication.role),"u1, u2"))&&i.go("/");r.getApplicationType().then(function(t){n.applicationType=t},function(n){e.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});n.checkShow=function(){n.checkFek=n.feks.length>=1?!0:!1};n.edit=function(n){t.setFek(n);i.go("newFek")};n.searchAction=function(t){u.getFekByApplicationType(t).then(function(t){n.feks=t;n.checkShow()},function(n){e.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.goAction=function(){i.go("newFek")};n.deleteFek=function(t){u.deleteFek(t.Id,n.authentication.role).then(function(){n.feks.splice(n.feks.indexOf(t),1)},function(n){e.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.delSpec;n.openModal=function(t){n.delSpec=t}};SearchFekController.$inject=["$scope","PassParameters","$state","ApplicationTypeFactory","ApplicationTypeFekFactory","GeneralFactory","toaster"];SecondmentArtisticController=function(n,t,i,r,u,f,e,o,s,h,c,l,a){if(n.secondmentArtistic={IsTemporaryStored:!0},n.secondmentDocument={},n.applicationType=10,n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.personalStep=!0,n.qualificationRegionStep=!1,n.dideStep=!1,n.AvailableArtisticListItems=[],n.dateForProposal="",n.showAddEditForm=0,n.fek={},n.levels={},n.showMusic=!1,n.consts={},n.protocol="",n.showProtocol=!1,n.IsFirstTimeArtistic=!1,n.cannotUpdate=!1,n.notActive=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.upload=[],n.messages={completed:"",percentage:"0",error:""},n.uploadedFileDetails="",n.showAlertForUploadCV=!1,n.SendDataForCVDto={Id:"",SecondmentApplicationId:"",PersonId:""},n.SendDataForCVFullDto={Id:"",SecondmentApplicationId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""},n.showAlertRegions=!1,n.alertRegions=[{type:"danger",msg:"Πρέπει να δηλώσετε τουλάχιστον ένα σχολείο προτίμησης."}],n.pageRules={},n.IsDisabled=!1,n.noUpdAccess=!1,n.authentication.isAuth){var v="secArtistic";h.getByParams({role:n.authentication.role,codes:v},"/api/Subsystem/NewCheckPermission").then(function(t){var i=v.split(","),r,o;for(r in i)n.pageRules[i[r]]=e("filter")(t,{Code:i[r]},!0)[0].Rules;n.secondmentArtistic.DidacticYearId=n.applicationDidacticYear.Id;n.secondmentArtistic.Id=f.getApplicationId();f.resetApplication();n.secondmentArtistic.PersonId=f.getPersonId();h.isValueInArray(n.pageRules.secArtistic.CanAccess,"u1, u2")&&(n.secondmentArtistic.PersonId=n.authentication.personId);n.SendDataForCVDto.SecondmentApplicationId=n.secondmentArtistic.Id;n.SendDataForCVDto.PersonId=n.secondmentArtistic.PersonId;h.getByParams({personId:n.secondmentArtistic.PersonId},"/api/SecondmentArtistic/GetDetailsForFile").then(function(t){t!=null&&(n.SendDataForCVFullDto=t,n.SendDataForCVDto.Id=t.Id,n.uploadedFileDetails="<h4>Έχετε μεταφορτώσει:<\/h4><ul><li>Αρχείο: "+n.SendDataForCVFullDto.FileName+" <\/li><li>Μέγεθος: "+n.SendDataForCVFullDto.FileSize+" <\/li><li>Ημερομηνία: "+e("date")(n.SendDataForCVFullDto.UploadDateTime,"dd/MM/yyyy - HH:mm:ss")+" <\/li><\/ul>")},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης επισυναπτόμενου Βιογραφικού")});o=u.all([c.isFekValidForApplicationTypeId(n.applicationType),h.getByParams({personId:n.secondmentArtistic.PersonId},"api/SecondmentArtistic/CanInsertApplication")]);o.then(function(t){n.hasValidFek=t[0];n.fek=t[1];n.fek.Id>0?(n.canInsertAppl=!0,n.secondmentArtistic.FekId=n.fek.Id):n.canInsertAppl=!1;n.secondmentArtistic.Id!=null&&n.secondmentArtistic.Id!=""&&n.secondmentArtistic.Id!="undefined"?(n.canUpdateAppl=!0,n.showAddEditForm=1):n.canInsertAppl&&n.hasValidFek?(n.canInsertAppl=!0,n.showAddEditForm=1):n.showAddEditForm=2;n.doAll();h.isEmptyValue(n.secondmentArtistic.Id)&&(n.IsDisabled=!n.pageRules.secArtistic.CanInsert)})},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else o.go("/");n.showAlertBlock=function(){return n.showMusic?n.secondmentArtistic.NoRemoteUnit&&n.secondmentArtistic.NoEducationalExecutive&&n.secondmentArtistic.NoTenure&&n.secondmentArtistic.NoTenureModelExpSchool&&n.secondmentArtistic.NoMusic?!1:!0:n.secondmentArtistic.NoRemoteUnit&&n.secondmentArtistic.NoEducationalExecutive&&n.secondmentArtistic.NoTenure&&n.secondmentArtistic.NoTenureModelExpSchool?!1:!0};n.alerts=[{type:"danger",msg:"Δεν μπορείτε να υποβάλετε αίτηση. Για ήδη υποβληθείσα αίτηση μεταβείτε στο Ιστορικό Αιτήσεων."}];n.editPerson=function(){f.setPersonId(n.secondmentArtistic.PersonId);o.go("stateEditPerson")};n.goToQualificationAreas=function(){$("#SecondmentArtisticStep1").valid()&&(n.personalStep=!1,n.qualificationRegionStep=!0,n.dideStep=!1,r.scrollTo(0,0),n.goToRegions())};n.goToPersonal=function(){n.personalStep=!0;n.qualificationRegionStep=!1;n.dideStep=!1;r.scrollTo(0,0)};n.goToDideStep=function(){n.showAlertRegions=h.isEmpty(n.SelectedArtisticListItems)?!0:!1;$("#SecondmentArtisticStep2").valid()&&!n.showAlertRegions&&(n.personalStep=!1,n.qualificationRegionStep=!1,n.dideStep=!0,r.scrollTo(0,0))};n.getOfficialPlacementUnits=function(){var t;t=n.secondmentArtistic.Id!=null&&n.secondmentArtistic.Id!=""&&n.secondmentArtistic.Id!="undefined"?n.secondmentArtistic.OfficialRegionAndUnitId:n.person.OfficialRegionAndUnit.Id;params={OfficialUnitAndRegionId:t,userLevel:n.authentication.levelId};h.getByAll("/api/RegionAndUnit/getRegionAndUnitForPlacement").then(function(t){n.OfficialPlacementUnits=t;n.changedRegionAndUnit()},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.getPostingTranferAreas=function(){h.getByParams({id:n.secondmentArtistic.OfficialRegionAndUnitId},"/api/RegionAndUnit/getPostingTransferAreaByRegionAndUnitId").then(function(t){n.PostingTranferAreas=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.changedRegionAndUnit=function(){n.checkForPostingTransferArea();n.getPostingTranferAreas()};n.getDateForProposal=function(){n.dateForProposal="31/8/"+n.applicationDidacticYear.YearFrom};n.checkForPostingTransferArea=function(){n.myfilter=e("filter")(n.OfficialPlacementUnits,{Id:n.secondmentArtistic.OfficialRegionAndUnitId},!0)[0];n.myfilter.RegionAndUnitTypeId==8?(n.showPostingTransferArea=!0,n.showPostingTransferArea=!0,n.showLevel=!1,n.secondmentArtistic.LevelId=n.myfilter.LevelId):(h.getByAll("/api/Dbo/getLevelsAsync").then(function(t){n.levels=e("filter")(t,{Id:2},!0);n.secondmentArtistic.LevelId=n.levels[0].Id;n.showLevel=!0},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία φόρτωσης βαθμίδων επιλογής")}),n.showPostingTransferArea=!1,n.secondmentArtistic.PostingTransferAreaId=null)};n.checkForMusic=function(t){t.lastIndexOf("ΠΕ79",0)===0||t.lastIndexOf("ΤΕ16",0)===0?n.showMusic=!0:(n.showMusic=!1,n.secondmentArtistic.NoMusic=!1)};n.doAll=function(){if(n.secondmentArtistic.Id!=null&&n.secondmentArtistic.Id!=""&&n.secondmentArtistic.Id!="undefined"){if(n.canUpdateAppl){n.AvailableArtisticListItems=[];var t=u.all([h.getByParams({id:n.secondmentArtistic.PersonId},"/api/Person/GetSecondmentPersonDto"),h.getByParams({id:n.secondmentArtistic.Id},"/api/SecondmentArtistic/getSecondmentArtisticById")]);t.then(function(t){n.person=t[0];n.secondmentArtistic=t[1];n.getDateForProposal();n.secondmentArtistic.SpecialityId=n.person.Speciality.Id;n.checkForMusic(n.person.Speciality.Code);h.isEmpty(n.secondmentArtistic.SecondmentArtisticProtocols)||(n.protocol=n.secondmentArtistic.SecondmentArtisticProtocols[0].ProtocolString,n.showProtocol=!0);n.paramsForCheckUpd.personId=n.secondmentArtistic.PersonId;n.paramsForCheckUpd.levelUser=n.authentication.levelId;n.paramsForCheckUpd.regionAndUnitId=n.authentication.regionAndUnitId;n.paramsForCheckUpd.userRole=n.authentication.role;n.paramsForCheckUpd.specialityId=n.secondmentArtistic.SpecialityId;n.paramsForCheckUpd.applicationLevelId=n.secondmentArtistic.LevelId;n.paramsForCheckUpd.applicationTypeId=n.applicationType;n.paramsForCheckUpd.IsActive=n.secondmentArtistic.IsActive;n.paramsForCheckUpd.FekId=n.secondmentArtistic.FekId;h.postByParams(n.paramsForCheckUpd,"/api/General/checkUpdateSecFromFEKAndUser").then(function(t){n.IsDisabled=!t;n.IsDisabled&&(n.noUpdAccess=!0);h.isValueInArray(n.pageRules.secArtistic.CanAccess,"u1, u2")&&n.secondmentArtistic.IsActive&&!n.secondmentArtistic.IsTemporaryStored&&(n.IsDisabled=!0,n.cannotUpdate=!0);n.secondmentArtistic.IsActive||(n.IsDisabled=!0,n.notActive=!0);h.isValueInArray(n.pageRules.secArtistic.CanAccess,"d1, d2, p")&&n.secondmentArtistic.OfficialRegionAndUnitId!=n.authentication.regionAndUnitId&&(n.IsDisabled=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.secArtistic.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0)}).catch(function(){s.pop("error","Παρουσιάστηκε σφάλμα","Δημιουργήθηκε πρόβλημα με τα δικαιώματα σας στη σελίδα.")});n.getOfficialPlacementUnits()})}}else n.canInsertAppl&&n.secondmentArtistic.PersonId!=null&&n.secondmentArtistic.PersonId!=""&&n.secondmentArtistic.PersonId!="undefined"&&(n.AvailableArtisticListItems=[],h.getByParams({id:n.secondmentArtistic.PersonId},"/api/Person/GetSecondmentPersonDto").then(function(t){n.person=t;n.getDateForProposal();n.secondmentArtistic.SpecialityId=t.Speciality.Id;n.checkForMusic(t.Speciality.Code);n.secondmentArtistic.OfficialRegionAndUnitId=t.OfficialRegionAndUnit.Id;n.secondmentArtistic.OfficialPlacementUnitDescription=t.OfficialPlacementUnitDescription;n.secondmentArtistic.PostingTransferAreaId=t.PostingTransferArea==null?0:t.PostingTransferArea.Id;n.secondmentArtistic.ExperienceYears=t.ExperienceYears;n.secondmentArtistic.ExperienceDays=t.ExperiencExperienceDays;n.secondmentArtistic.ExperienceMonths=t.ExperienceMonths;n.secondmentArtistic.NominationYear=t.NominationYear;n.getOfficialPlacementUnits()},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}))};n.goToRegions=function(){var t;n.secondmentArtistic.Id!=null&&n.secondmentArtistic.Id!=""&&n.secondmentArtistic.Id!="undefined"?h.isEmpty(n.SelectedArtisticListItems)&&(t=u.all([h.getByAll("/api/ApplicationTypeRegionAndUnit/getArtisticSchools"),h.getByParams({id:n.secondmentArtistic.Id},"/api/SecondmentArtistic/getApplRegionsById"),h.getByAll("/api/SecondmentArtistic/computerKnowlegdeTypes"),h.getByParams({id:n.secondmentArtistic.Id},"/api/SecondmentArtistic/getApplDocumentsById")]),t.then(function(t){n.SelectedArtisticListItems=t[1];n.SelectedAvailArtisticItems=t[1];angular.copy(t[0],n.AvailableArtisticListItems);n.removeDuplicatesArtisticForDualList();n.consts.computerKnowlegdeType=t[2];n.secondmentDocument=t[3]})):h.isEmpty(n.SelectedArtisticListItems)&&(t=u.all([h.getByAll("/api/ApplicationTypeRegionAndUnit/getArtisticSchools"),h.getByAll("/api/SecondmentMusic/computerKnowlegdeTypes")]),t.then(function(t){n.AvailableArtisticListItems=t[0];n.removeDuplicatesArtisticForDualList();n.consts.computerKnowlegdeType=t[1]}))};n.InsOrUpd=function(t){var r={SecondmentArtisticRegions:n.SelectedArtisticListItems,SecondmentArtistic:n.secondmentArtistic,SecondmentDocument:n.secondmentDocument,Status:t,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName},i=r;n.secondmentArtistic.Id!=null&&n.secondmentArtistic.Id!=""&&n.secondmentArtistic.Id!="undefined"?h.postByParams(i,"/api/SecondmentArtistic/updateSecondmentArtistic").then(function(){f.setPersonId(n.secondmentArtistic.PersonId);h.isValueInArray(n.pageRules.secArtistic.CanAccess,"u1, u2")?o.go("history"):o.go("history")},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα",response)}):h.postByParams(i,"/api/SecondmentArtistic/insertSecondmentArtistic").then(function(){f.setPersonId(n.secondmentArtistic.PersonId);h.isValueInArray(n.pageRules.secArtistic.CanAccess,"u1, u2")?o.go("history"):o.go("history")},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα",response)})};n.saveAction=function(r){var u;n.showAlertRegions=h.isEmpty(n.SelectedArtisticListItems)?!0:!1;n.showAlertForUploadCV=!1;h.isValueInArray(n.pageRules.secArtistic.CanAccess,"u1, u2")?$("#SecondmentArtisticStep2").valid()&&!n.showAlertRegions&&(r=="final"?(u=t.open({templateUrl:"ModalContent.html",controller:OpenModalController}),u.result.then(function(t){t&&n.InsOrUpd(r)},function(){i.info("Modal dismissed at: "+new Date)})):n.InsOrUpd(r)):$("#SecondmentArtisticStep3").valid()&&!n.showAlertRegions&&(r=="final"?(u=t.open({templateUrl:"ModalContent.html",controller:OpenModalController}),u.result.then(function(t){t&&n.InsOrUpd(r)},function(){i.info("Modal dismissed at: "+new Date)})):n.InsOrUpd(r))};n.removeDuplicatesArtisticForDualList=function(){angular.forEach(n.SelectedAvailArtisticItems,function(t){for(var i=n.AvailableArtisticListItems.length-1;i>=0;i--)n.AvailableArtisticListItems[i].Id==t.Id&&n.AvailableArtisticListItems.splice(i,1)});n.SelectedAvailArtisticItems=[];n.SelectedSelectedArtisticListItems=[]};n.SelectedAvailArtisticItems=[];n.SelectedSelectedArtisticListItems=[];n.SelectedArtisticListItems=[];n.btnArtisticUp=function(){for(var t,r,u,f=n.SelectedSelectedArtisticListItems,i=0;i<n.SelectedSelectedArtisticListItems.length;i++){if(t=n.SelectedArtisticListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedArtisticListItems[i].Id),t<=0||t>=n.SelectedArtisticListItems.length)return;r=n.SelectedArtisticListItems[t];u=n.SelectedArtisticListItems[t-1];n.SelectedArtisticListItems[t-1]=r;n.SelectedArtisticListItems[t]=u}};n.btnArtisticDown=function(){for(var t,r,u,i=n.SelectedSelectedArtisticListItems.length-1;i>=0;i--){if(t=n.SelectedArtisticListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedArtisticListItems[i].Id),t<0||t>=n.SelectedArtisticListItems.length-1)return;r=n.SelectedArtisticListItems[t];u=n.SelectedArtisticListItems[t+1];n.SelectedArtisticListItems[t+1]=r;n.SelectedArtisticListItems[t]=u}};n.btnArtisticRight=function(){angular.forEach(n.SelectedAvailArtisticItems,function(n){this.push(n)},n.SelectedArtisticListItems);angular.forEach(n.SelectedAvailArtisticItems,function(t){for(var i=n.AvailableArtisticListItems.length-1;i>=0;i--)n.AvailableArtisticListItems[i].Id==t.Id&&n.AvailableArtisticListItems.splice(i,1)});n.SelectedAvailArtisticItems=[];n.SelectedSelectedArtisticListItems=[]};n.btnArtisticLeft=function(){angular.forEach(n.SelectedSelectedArtisticListItems,function(n){this.push(n)},n.AvailableArtisticListItems);angular.forEach(n.SelectedSelectedArtisticListItems,function(t){for(var i=n.SelectedArtisticListItems.length-1;i>=0;i--)n.SelectedArtisticListItems[i].Id==t.Id&&n.SelectedArtisticListItems.splice(i,1)});n.SelectedSelectedArtisticListItems=[];n.SelectedAvailArtisticItems=[]};n.onFileSelect=function(t){var r,i;for(n.messages={completed:"",percentage:"0",error:""},n.showAlertForUploadCV=!1,r=0;r<t.length;r++){if(i=t[r],i.type!="application/x-zip-compressed"&&i.type!="application/x-compressed"&&i.type!="application/zip"&&i.type!="multipart/x-zip"&&i.type!="application/pdf"){n.messages.error='Μη έγκυρη επέκταση αρχείου "'+i.name+'". Οι επεκτάσεις που υποστηρίζονται είναι: "<b>zip και pdf<\/b>" .';return}if(i.size>=10485760){n.messages.error='Το αρχείο "'+i.name+'" (<b>'+Math.round(i.size/1024)+" KB<\/b>) υπερβαίνει το μέγιστο επιτρεπόμενο μέγεθος μεταφόρτωσης <b>10000 KB<\/b>.";return}(function(t){n.upload[t]=a.upload({url:"/api/files/uploadArtistic",method:"POST",data:{SendDataForCVDto:n.SendDataForCVDto},file:i}).progress(function(t){n.messages.percentage=parseInt(100*t.loaded/t.total)}).then(function(t){n.messages.completed="Το αρχείο <b>"+i.name+"<\/b> μεταφορτώθηκε με επιτυχία.";n.SendDataForCVDto.Id=t.data.secArtisticFile.Id;n.SendDataForCVFullDto=t.data.secArtisticFile;n.uploadedFileDetails=t.Message}).catch(function(t){n.messages.error=t.data.Message})})(r)}};n.abortUpload=function(t){n.upload[t].abort()};n.downloadFile=function(){h.getByParamsDownload({PersonId:n.secondmentArtistic.PersonId,Path:n.SendDataForCVFullDto.DirectPdfLink,ContentType:n.SendDataForCVFullDto.ContentType},"api/files/download").then(function(t){var p=t.status,s=t.headers,h=t.data,y="application/octet-stream",r=!1,f,c,l,e,u,v,i,o;s=s();f=n.SendDataForCVFullDto.FileName||"download.pdf";c=s["content-type"]||y;try{if(console.log("Trying saveBlob method ..."),i=new Blob([h],{type:c}),navigator.msSaveBlob)navigator.msSaveBlob(i,f);else{if(l=navigator.webkitSaveBlob||navigator.mozSaveBlob||navigator.saveBlob,l===undefined)throw"Not supported";l(i,f)}console.log("saveBlob succeeded");r=!0}catch(a){console.log("saveBlob method failed with the following exception:");console.log(a)}if(!r&&(e=window.URL||window.webkitURL||window.mozURL||window.msURL,e)){if(u=document.createElement("a"),"download"in u)try{console.log("Trying download link method with simulated click ...");i=new Blob([h],{type:c});o=e.createObjectURL(i);u.setAttribute("href",o);u.setAttribute("download",f);v=document.createEvent("MouseEvents");v.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null);u.dispatchEvent(v);console.log("Download link method with simulated click succeeded");r=!0}catch(a){console.log("Download link method with simulated click failed with the following exception:");console.log(a)}if(!r)try{console.log("Trying download link method with window.location ...");i=new Blob([h],{type:y});o=e.createObjectURL(i);window.location=o;console.log("Download link method with window.location succeeded");r=!0}catch(a){console.log("Download link method with window.location failed with the following exception:");console.log(a)}}r||(console.log("No methods worked for saving the arraybuffer, using last resort window.open"),window.open(httpPath,"_blank",""))},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση του αρχείου")})}};SecondmentArtisticController.$inject=["$scope","$uibModal","$log","$window","$q","PassParameters","$filter","$state","toaster","GeneralFactory","ApplicationTypeFekFactory","PersonFactory","$upload"];SecondmentBody1920Controller=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b){function d(){v.getByParams({level:n.secondment.LevelId},"/api/RegionAndUnit/getPyspdeByLevel").then(function(t){n.consts.pyspdeRegionAndUnit=t},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function g(){c.getPyspdeWithoutJointExaminationByLevel(n.applicationType,n.secondment.LevelId).then(function(t){n.consts.pyspde=t},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των πιθανών ασθενειών","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}if(n.secondment={IsTemporaryStored:!0},n.secondmentDocument={},n.applicationType=12,n.consts={},n.alerts=[{type:"danger",msg:"Δεν μπορείτε να υποβάλετε αίτηση. Για ήδη υποβληθείσα αίτηση μεταβείτε στο Ιστορικό Αιτήσεων."}],n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.fekDetails={ValidTo:"",ValidFrom:""},n.AvailableBodyListItems=[],n.SelectedAvailBodyItems=[],n.SelectedSelectedBodyListItems=[],n.SelectedBodyListItems=[],n.SelectedBodies=[],n.secondLevelBody=[],n.thirdLevelBody=[],n.secondment.bodyLayer1=null,n.secondment.bodyLayer2=null,n.secondment.bodyLayer3=null,n.OfficialPlacementUnits=[],n.myfilter=[],n.fek={},n.didacticYears={},n.dateForProposal="31/8/"+n.applicationDidacticYear.YearFrom,n.secondment.details="",n.protocol="",n.showProtocol=!1,n.showAlertRegions=!1,n.alertRegions=[{type:"danger",msg:"Πρέπει να δηλώσετε τουλάχιστον ένα ΙΕΚ προτίμησης."}],n.cannotUpdate=!1,n.noUpdAccess=!1,n.pageRules={},n.IsDisabled=!1,n.notActive=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.upload=[],n.messages={completed:"",percentage:"0",error:""},n.uploadedFileDetails="",n.showAlertForUploadCV=!1,n.SendDataForCVDto={Id:"",SecondmentApplicationId:"",PersonId:""},n.SendDataForCVFullDto={Id:"",SecondmentApplicationId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""},n.authentication.isAuth){var k="secBody1920";v.getByParams({role:n.authentication.role,codes:k},"/api/Subsystem/NewCheckPermission").then(function(t){var i=k.split(","),e,s;for(e in i)n.pageRules[i[e]]=u("filter")(t,{Code:i[e]},!0)[0].Rules;n.secondment.Id=f.getApplicationId();f.resetApplication();n.secondment.PersonId=f.getPersonId();v.isValueInArray(n.pageRules.secBody1920.CanAccess,"u1, u2")&&(n.secondment.PersonId=n.authentication.personId);n.SendDataForCVDto.SecondmentApplicationId=n.secondment.Id;n.SendDataForCVDto.PersonId=n.secondment.PersonId;v.getByParams({personId:n.secondment.PersonId},"/api/SecondmentBody1920Controller/GetDetailsForCV").then(function(t){t!=null&&(n.SendDataForCVFullDto=t,n.SendDataForCVDto.Id=t.Id,n.uploadedFileDetails="<h4>Έχετε μεταφορτώσει:<\/h4><ul><li>Αρχείο: "+n.SendDataForCVFullDto.FileName+" <\/li><li>Μέγεθος: "+n.SendDataForCVFullDto.FileSize+" <\/li><li>Ημερομηνία: "+u("date")(n.SendDataForCVFullDto.UploadDateTime,"dd/MM/yyyy - HH:mm:ss")+" <\/li><\/ul>")},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης επισυναπτόμενου Βιογραφικού")});s=r.all([a.isFekValidForApplicationTypeId(n.applicationType),l.canInsertApplication(n.secondment.PersonId)]);s.then(function(t){n.hasValidFek=t[0];n.fek=t[1];n.fek.Id>0?(n.canInsertAppl=!0,n.secondment.FekId=n.fek.Id):n.canInsertAppl=!1;n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"?(n.canUpdateAppl=!0,n.showAddEditForm=1):n.canInsertAppl&&n.hasValidFek?(n.canInsertAppl=!0,n.showAddEditForm=1):n.showAddEditForm=2;n.doAll();v.isEmptyValue(n.secondment.Id)&&(n.IsDisabled=!n.pageRules.secBody1920.CanInsert)})},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else e.go("/");n.showAlertBlock=function(){return n.secondment.NoRemoteUnit&&n.secondment.NoEducationalExecutive&&n.secondment.NoTenure&&n.secondment.NoTenureModelExpSchool?!1:!0};n.editPerson=function(){f.setPersonId(n.secondment.PersonId);e.go("stateEditPerson")};Date.prototype.withoutTime=function(){var n=new Date(this);return n.setHours(0,0,0,0,0),n};n.doAll=function(){if(n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"){var t=r.all([v.getByParams({id:n.secondment.PersonId},"/api/Person/GetSecondmentPersonDto"),l.getSecondmentBodyById(n.secondment.Id)]);t.then(function(t){n.person=t[0];n.secondment=t[1];n.secondment.SpecialityId=n.person.Speciality.Id;n.OfficialLevelId=n.person.OfficialRegionAndUnit.LevelId;v.isEmpty(n.secondment.SecondmentBody1920Protocol)||(n.protocol=n.secondment.SecondmentBody1920Protocol[0].ProtocolString,n.showProtocol=!0);n.paramsForCheckUpd.personId=n.secondment.PersonId;n.paramsForCheckUpd.levelUser=n.authentication.levelId;n.paramsForCheckUpd.regionAndUnitId=n.authentication.regionAndUnitId;n.paramsForCheckUpd.userRole=n.authentication.role;n.paramsForCheckUpd.specialityId=n.secondment.SpecialityId;n.paramsForCheckUpd.applicationLevelId=n.secondment.LevelId;n.paramsForCheckUpd.applicationTypeId=n.applicationType;n.paramsForCheckUpd.IsActive=n.secondment.IsActive;n.paramsForCheckUpd.FekId=n.secondment.FekId;v.getByParams({fekId:n.secondment.FekId,specialityId:n.secondment.SpecialityId},"/api/ApplicationTypeFek/getFekDetailsByFekIdAndSpecialityId").then(function(t){n.fekDetails=t;n.fekDetails.ValidTo=new Date(n.fekDetails.ValidTo);n.fekDetails.ValidFrom=new Date(n.fekDetails.ValidFrom);n.now=(new Date).withoutTime();n.showCV=new Date(n.fekDetails.ValidFrom).withoutTime()<=n.now&&new Date(n.fekDetails.ValidTo).withoutTime()>=n.now?!0:!1;n.FirstLevelBody()},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});v.postByParams(n.paramsForCheckUpd,"/api/General/checkUpdateSecFromFEKAndUser").then(function(t){n.IsDisabled=!t;n.IsDisabled&&(n.noUpdAccess=!0);v.isValueInArray(n.pageRules.secBody1920.CanAccess,"u1, u2")&&n.secondment.IsActive&&!n.secondment.IsTemporaryStored&&(n.IsDisabled=!0,n.cannotUpdate=!0);n.secondment.IsActive||(n.IsDisabled=!0,n.notActive=!0);v.isValueInArray(n.pageRules.secBody1920.CanAccess,"d1, d2, p")&&n.secondment.OfficialRegionAndUnitId!=n.authentication.regionAndUnitId&&(n.IsDisabled=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.secBody1920.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0)}).catch(function(){o.pop("error","Παρουσιάστηκε σφάλμα","Δημιουργήθηκε πρόβλημα με τα δικαιώματα σας στη σελίδα.")});n.ApplBodyById();n.getOfficialPlacementUnits();n.getComputerKnowlegdeTypes()})}else n.secondment.PersonId!=null&&n.secondment.PersonId!=""&&n.secondment.PersonId!="undefined"&&(v.getByParams({id:n.secondment.PersonId},"/api/Person/GetSecondmentPersonDto").then(function(t){n.person=t;n.secondment.SpecialityId=t.Speciality.Id;n.OfficialLevelId=t.OfficialRegionAndUnit.LevelId;n.secondment.OfficialRegionAndUnitId=t.OfficialRegionAndUnit.Id;n.secondment.OfficialPlacementUnitDescription=t.OfficialPlacementUnitDescription;n.secondment.PostingTransferAreaId=t.PostingTransferArea==null?null:t.PostingTransferArea.Id;n.secondment.NominationYear=t.NominationYear;n.getOfficialPlacementUnits();n.getComputerKnowlegdeTypes()},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),n.fekDetails.ValidTo=n.fek.ValidTo,n.fekDetails.ValidFrom=n.fek.ValidFrom,n.FirstLevelBody())};n.getComputerKnowlegdeTypes=function(){v.getByAll("/api/SecondmentMusic/computerKnowlegdeTypes").then(function(t){n.consts.computerKnowlegdeType=t},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.getApplDocuments=function(){v.getByParams({id:n.secondment.Id},"/api/SecondmentBody1920Controller/getApplDocumentsById").then(function(t){n.secondmentDocument=t},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.ApplBodyById=function(){l.getApplBodyById(n.secondment.Id).then(function(t){n.SelectedBodies=t;v.isEmptyValue(n.SelectedBodies)||n.SelectedBodies[0].Description1!="Γ.Γ.Δ.Β.Μ.Ν.Γ. - Δημόσια ΙΕΚ"?(n.SelectedBodyListItems[0]=n.SelectedBodies[0],n.secondment.bodyLayer1=n.SelectedBodies[0],v.isEmptyValue(n.bodyLayer1)||n.secondment.bodyLayer1.Description1!="Άλλος Φορέας"?n.details=!1:(n.secondment.details=n.SelectedBodies[0].Details,n.details=!0),n.SecondLevelBody(),n.secondment.bodyLayer2=n.SelectedBodies[0],v.isEmptyValue(n.secondment.bodyLayer2)||n.secondment.bodyLayer2.RegionAndUnitId2==null||n.secondment.bodyLayer2.RegionAndUnitId2==""||(n.ThirdLevelBody(),n.secondment.bodyLayer3=n.SelectedBodies[0],n.secondment.bodyLayer3.Description3=="Άλλο Τμήμα - Υπηρεσία"?(n.secondment.details=n.SelectedBodies[0].Details,n.details=!0):n.details=!1)):(n.secondment.bodyLayer1=n.SelectedBodies[0],n.secondment.bodyLayer2=n.SelectedBodies[0],n.SelectedAvailBodyItems=t,n.SelectedBodyListItems=t,n.SecondLevelBody(),n.IEKForPrefecture())},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.getOfficialPlacementUnits=function(){var t;t=n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"?n.secondment.OfficialRegionAndUnitId:n.person.OfficialRegionAndUnit.Id;params={OfficialUnitAndRegionId:t,userLevel:n.authentication.levelId};v.getByAll("/api/RegionAndUnit/getRegionAndUnitForPlacement").then(function(t){n.OfficialPlacementUnits=t;n.changedRegionAndUnit()},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.getPostingTranferAreas=function(){v.getByParams({id:n.secondment.OfficialRegionAndUnitId},"/api/RegionAndUnit/getPostingTransferAreaByRegionAndUnitId").then(function(t){n.PostingTranferAreas=t},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.changedRegionAndUnit=function(){n.checkForPostingTransferArea();n.getPostingTranferAreas()};n.changeLevel=function(){d();g();n.secondment.LevelId==1&&(n.secondment.IsPyspde=!0)};n.checkForPostingTransferArea=function(){n.myfilter=u("filter")(n.OfficialPlacementUnits,{Id:n.secondment.OfficialRegionAndUnitId},!0)[0];n.myfilter.RegionAndUnitTypeId==8?(n.showPostingTransferArea=!0,n.showLevel=!1,n.secondment.LevelId=n.myfilter.LevelId,n.secondment.LevelId==1&&(n.secondment.IsPyspde=!0),d(),g()):(v.getByAll("/api/Dbo/getLevelsAsync").then(function(t){n.levels=t;n.showLevel=!0},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία φόρτωσης βαθμίδων επιλογής")}),n.showPostingTransferArea=!1,n.secondment.PostingTransferAreaId=null)};n.FirstLevelBody=function(){v.getByParams({applicationType:n.applicationType},"/api/ApplicationTypeRegionAndUnit/getFirstLevelBodyWithoutActiveTime").then(function(t){n.firstLevelBody=t;n.firstRegionType1=n.firstLevelBody[0].RegionType1},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.SecondLevelBody=function(){n.secondment.bodyLayer1&&c.getSecondLevelBody(n.secondment.bodyLayer1.RegionAndUnitId1,n.applicationType).then(function(t){n.secondLevelBody=t;n.secondRegionType2=n.secondLevelBody[0].RegionType2},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.ThirdLevelBody=function(){c.getThirdLevelBody(n.secondment.bodyLayer1.RegionAndUnitId1,n.secondment.bodyLayer2.RegionAndUnitId2,n.applicationType).then(function(t){n.thirdLevelBody=t;v.isEmpty(n.thirdLevelBody)||(n.thirdRegionType3=n.thirdLevelBody[0].RegionType3)},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.IEKForPrefecture=function(){c.getIEKForPrefecture(n.secondment.bodyLayer2.RegionAndUnitId2).then(function(t){n.AvailableBodyListItems=t;n.removeDuplicatesBodyForDualList()},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα ","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.setRegion1=function(){n.secondLevelBody=[];n.thirdLevelBody=[];n.secondment.details="";n.SelectedBodyListItems=[];n.AvailableBodyListItems=[];n.SelectedSelectedBodyListItems=[];n.SelectedAvailBodyItems=[];n.secondment.bodyLayer2=null;n.secondment.bodyLayer3=null;n.SecondLevelBody();n.secondment.bodyLayer1!=null&&(n.secondment.bodyLayer1.Description1!="Γ.Γ.Δ.Β.Μ.Ν.Γ. - Δημόσια ΙΕΚ"&&(n.SelectedBodyListItems[0]=n.secondment.bodyLayer1),n.details=n.secondment.bodyLayer1.Description1=="Άλλος Φορέας"?!0:!1)};n.setRegion2=function(){n.secondment.details="";n.secondment.bodyLayer2!=null&&(n.secondment.bodyLayer2.Description1!="Γ.Γ.Δ.Β.Μ.Ν.Γ. - Δημόσια ΙΕΚ"&&(n.ThirdLevelBody(),n.SelectedBodyListItems[0]=n.secondment.bodyLayer2),n.secondment.bodyLayer2.Description1=="Γ.Γ.Δ.Β.Μ.Ν.Γ. - Δημόσια ΙΕΚ"&&(n.SelectedBodyListItems=[],n.SelectedSelectedBodyListItems=[],n.IEKForPrefecture()))};n.setRegion3=function(){n.secondment.bodyLayer3!=null&&(n.secondment.bodyLayer3.Description1!="Γ.Γ.Δ.Β.Μ.Ν.Γ. - Δημόσια ΙΕΚ"&&n.secondment.bodyLayer3.Description1!="Άλλο Τμήμα - Υπηρεσία"&&(n.SelectedBodyListItems[0]=n.secondment.bodyLayer3),n.secondment.bodyLayer3.Description3=="Άλλο Τμήμα - Υπηρεσία"?n.details=!0:(n.details=!1,n.secondment.details=""))};n.hasregions2=function(){return n.secondLevelBody[0]!=null&&n.secondLevelBody!="undefined"?n.secondLevelBody[0].RegionAndUnitId2!=null?!0:!1:!1};n.hasregions3=function(){return n.thirdLevelBody[0]!=null&&n.thirdLevelBody!="undefined"?n.thirdLevelBody[0].RegionAndUnitId3!=null?!0:!1:!1};n.hasIEK=function(){if(n.secondment.bodyLayer2!=null&&n.secondment.bodyLayer2!="undefined")return n.secondment.bodyLayer2.Description1=="Γ.Γ.Δ.Β.Μ.Ν.Γ. - Δημόσια ΙΕΚ"?!0:!1};n.InsOrUpd=function(t){var r={SecondmentBody1920:n.secondment,BodyRegionAndUnit:n.SelectedBodyListItems,secDetails:n.secondment.details,Status:t,Role:n.authentication.role,UnitName:n.authentication.unitName},i=r;n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"?l.updateSecondmentBody(i).then(function(){f.setPersonId(n.secondment.PersonId);v.isValueInArray(n.pageRules.secBody1920.CanAccess,"u1, u2")?e.go("history"):e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)}):l.insertSecondmentBody(i).then(function(){f.setPersonId(n.secondment.PersonId);v.isValueInArray(n.pageRules.secBody1920.CanAccess,"u1, u2")?e.go("history"):e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)})};n.saveAction=function(r){if(n.showAlertRegions=n.secondment.bodyLayer2&&n.secondment.bodyLayer2.Description1=="Γ.Γ.Δ.Β.Μ.Ν.Γ. - Δημόσια ΙΕΚ"&&v.isEmpty(n.SelectedBodyListItems)?!0:!1,v.isEmptyValue(n.SendDataForCVDto.Id)&&v.isValueInArray(n.pageRules.secBody1920.CanAccess,"u1, u2")?(n.showAlertForUploadCV=!0,w.hash("showAlertRequiredCV"),b()):n.showAlertForUploadCV=!1,v.isEmpty(n.secondment.bodyLayer1)||n.secondment.bodyLayer1.Description1=="Διεύθυνση Εκπαίδευσης"||n.secondment.bodyLayer1.Description1=="Σχολείο φορέα"||(n.secondment.levelId=3),$("#SecondmentBody").valid()&&!n.showAlertRegions&&!n.showAlertForUploadCV)if(r=="final"){var u=t.open({templateUrl:"ModalContent.html",controller:OpenModalController});u.result.then(function(t){t&&n.InsOrUpd(r)},function(){i.info("Modal dismissed at: "+new Date)})}else n.InsOrUpd(r)};n.removeDuplicatesBodyForDualList=function(){angular.forEach(n.SelectedAvailBodyItems,function(t){for(var i=n.AvailableBodyListItems.length-1;i>=0;i--)n.AvailableBodyListItems[i].Id==t.Id&&n.AvailableBodyListItems.splice(i,1)})};n.btnBodyUp=function(){for(var t,r,u,f=n.SelectedSelectedBodyListItems,i=0;i<n.SelectedSelectedBodyListItems.length;i++){if(t=n.SelectedBodyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedBodyListItems[i].Id),t<=0||t>=n.SelectedBodyListItems.length)return;r=n.SelectedBodyListItems[t];u=n.SelectedBodyListItems[t-1];n.SelectedBodyListItems[t-1]=r;n.SelectedBodyListItems[t]=u}};n.btnBodyDown=function(){for(var t,r,u,i=n.SelectedSelectedBodyListItems.length-1;i>=0;i--){if(t=n.SelectedBodyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedBodyListItems[i].Id),t<0||t>=n.SelectedBodyListItems.length-1)return;r=n.SelectedBodyListItems[t];u=n.SelectedBodyListItems[t+1];n.SelectedBodyListItems[t+1]=r;n.SelectedBodyListItems[t]=u}};n.btnBodyRight=function(){n.checkRegions();n.canInsertRegions&&(angular.forEach(n.SelectedAvailBodyItems,function(n){this.push(n)},n.SelectedBodyListItems),angular.forEach(n.SelectedAvailBodyItems,function(t){for(var i=n.AvailableBodyListItems.length-1;i>=0;i--)n.AvailableBodyListItems[i].Id==t.Id&&n.AvailableBodyListItems.splice(i,1)}),n.SelectedAvailBodyItems=[],n.SelectedSelectedBodyListItems=[])};n.checkRegions=function(){var t=3;n.canInsertRegions=!0;n.SelectedBodyListItems.length+n.SelectedAvailBodyItems.length>t&&(o.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών","Δεν μπορείτε να επιλέξετε περισσότερες από "+t+" περιοχές"),n.canInsertRegions=!1)};n.btnBodyLeft=function(){angular.forEach(n.SelectedSelectedBodyListItems,function(n){this.push(n)},n.AvailableBodyListItems);angular.forEach(n.SelectedSelectedBodyListItems,function(t){for(var i=n.SelectedBodyListItems.length-1;i>=0;i--)n.SelectedBodyListItems[i].Id==t.Id&&n.SelectedBodyListItems.splice(i,1)});n.SelectedSelectedBodyListItems=[];n.SelectedAvailBodyItems=[]};n.onFileSelect=function(t){var r,i;for(n.messages={completed:"",percentage:"0",error:""},n.showAlertForUploadCV=!1,r=0;r<t.length;r++){if(i=t[r],i.type!="application/pdf"){n.messages.error='Μη έγκυρη επέκταση αρχείου "'+i.name+'". Οι επεκτάσεις που υποστηρίζονται είναι: "<b>pdf<\/b>" .';return}if(i.size>=10485760){n.messages.error='Το αρχείο "'+i.name+'" (<b>'+Math.round(i.size/1024)+" KB<\/b>) υπερβαίνει το μέγιστο επιτρεπόμενο μέγεθος μεταφόρτωσης <b>10000 KB<\/b>.";return}(function(t){n.upload[t]=p.upload({url:"/api/files/upload1920",method:"POST",data:{SendDataForCVDto:n.SendDataForCVDto},file:i}).progress(function(t){n.messages.percentage=parseInt(100*t.loaded/t.total)}).then(function(t){n.messages.completed="Το αρχείο <b>"+i.name+"<\/b> μεταφορτώθηκε με επιτυχία.";n.SendDataForCVDto.Id=t.data.secBodyCV.Id;n.SendDataForCVFullDto=t.data.secBodyCV;n.uploadedFileDetails=t.data.Message}).catch(function(t){n.messages.error=t.data.Message})})(r)}};n.abortUpload=function(t){n.upload[t].abort()};n.downloadFile=function(){v.getByParamsDownload({PersonId:n.secondment.PersonId,Path:n.SendDataForCVFullDto.DirectPdfLink,ContentType:n.SendDataForCVFullDto.ContentType},"api/files/download").then(function(t){var p=t.status,s=t.headers,h=t.data,y="application/octet-stream",r=!1,f,c,l,e,u,v,i,o;s=s();f=n.SendDataForCVFullDto.FileName||"download.pdf";c=s["content-type"]||y;try{if(console.log("Trying saveBlob method ..."),i=new Blob([h],{type:c}),navigator.msSaveBlob)navigator.msSaveBlob(i,f);else{if(l=navigator.webkitSaveBlob||navigator.mozSaveBlob||navigator.saveBlob,l===undefined)throw"Not supported";l(i,f)}console.log("saveBlob succeeded");r=!0}catch(a){console.log("saveBlob method failed with the following exception:");console.log(a)}if(!r&&(e=window.URL||window.webkitURL||window.mozURL||window.msURL,e)){if(u=document.createElement("a"),"download"in u)try{console.log("Trying download link method with simulated click ...");i=new Blob([h],{type:c});o=e.createObjectURL(i);u.setAttribute("href",o);u.setAttribute("download",f);v=document.createEvent("MouseEvents");v.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null);u.dispatchEvent(v);console.log("Download link method with simulated click succeeded");r=!0}catch(a){console.log("Download link method with simulated click failed with the following exception:");console.log(a)}if(!r)try{console.log("Trying download link method with window.location ...");i=new Blob([h],{type:y});o=e.createObjectURL(i);window.location=o;console.log("Download link method with window.location succeeded");r=!0}catch(a){console.log("Download link method with window.location failed with the following exception:");console.log(a)}}r||(console.log("No methods worked for saving the arraybuffer, using last resort window.open"),window.open(httpPath,"_blank",""))},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση του αρχείου")})}};SecondmentBody1920Controller.$inject=["$scope","$uibModal","$log","$q","$filter","PassParameters","$state","toaster","PersonFactory","PersonSpecialityFactory","ApplicationTypeRegionAndUnitFactory","SecondmentBody1920Factory","ApplicationTypeFekFactory","GeneralFactory","$timeout","$upload","$location","$anchorScroll"];SecondmentBodyController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b){function d(){v.getByParams({level:n.secondment.LevelId},"/api/RegionAndUnit/getPyspdeByLevel").then(function(t){n.consts.pyspdeRegionAndUnit=t},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function g(){c.getPyspdeWithoutJointExaminationByLevel(n.applicationType,n.secondment.LevelId).then(function(t){n.consts.pyspde=t},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των πιθανών ασθενειών","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}if(n.secondment={IsTemporaryStored:!0},n.secondmentDocument={},n.applicationType=8,n.consts={},n.alerts=[{type:"danger",msg:"Δεν μπορείτε να υποβάλετε αίτηση. Για ήδη υποβληθείσα αίτηση μεταβείτε στο Ιστορικό Αιτήσεων."}],n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.fekDetails={ValidTo:"",ValidFrom:""},n.canInsUpdFromChurch=!1,n.AvailableBodyListItems=[],n.SelectedAvailBodyItems=[],n.SelectedSelectedBodyListItems=[],n.SelectedBodyListItems=[],n.SelectedBodies=[],n.secondLevelBody=[],n.thirdLevelBody=[],n.secondment.bodyLayer1=null,n.secondment.bodyLayer2=null,n.secondment.bodyLayer3=null,n.OfficialPlacementUnits=[],n.myfilter=[],n.fek={},n.didacticYears={},n.dateForProposal="31/8/"+n.applicationDidacticYear.YearFrom,n.secondment.details="",n.protocol="",n.showProtocol=!1,n.showAlertRegions=!1,n.alertRegions=[{type:"danger",msg:"Πρέπει να δηλώσετε τουλάχιστον ένα ΙΕΚ προτίμησης."}],n.cannotUpdate=!1,n.noUpdAccess=!1,n.pageRules={},n.IsDisabled=!1,n.notActive=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.upload=[],n.messages={completed:"",percentage:"0",error:""},n.uploadedFileDetails="",n.showAlertForUploadCV=!1,n.SendDataForCVDto={Id:"",SecondmentApplicationId:"",PersonId:""},n.SendDataForCVFullDto={Id:"",SecondmentApplicationId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""},n.showCV=!1,n.authentication.isAuth){var k="secBody";v.getByParams({role:n.authentication.role,codes:k},"/api/Subsystem/NewCheckPermission").then(function(t){var i=k.split(","),e,s;for(e in i)n.pageRules[i[e]]=u("filter")(t,{Code:i[e]},!0)[0].Rules;n.secondment.Id=f.getApplicationId();f.resetApplication();n.secondment.PersonId=f.getPersonId();v.isValueInArray(n.pageRules.secBody.CanAccess,"u1, u2")&&(n.secondment.PersonId=n.authentication.personId);n.SendDataForCVDto.SecondmentApplicationId=n.secondment.Id;n.SendDataForCVDto.PersonId=n.secondment.PersonId;v.isEmptyValue(n.secondment.Id)||v.getByParams({personId:n.secondment.PersonId,secondmentBodyId:n.secondment.Id},"/api/SecondmentBodyController/GetDetailsForCV").then(function(t){t!=null&&(n.SendDataForCVFullDto=t,n.SendDataForCVDto.Id=t.Id,n.uploadedFileDetails="<h4>Έχετε μεταφορτώσει:<\/h4><ul><li>Αρχείο: "+n.SendDataForCVFullDto.FileName+" <\/li><li>Μέγεθος: "+n.SendDataForCVFullDto.FileSize+" <\/li><li>Ημερομηνία: "+u("date")(n.SendDataForCVFullDto.UploadDateTime,"dd/MM/yyyy - HH:mm:ss")+" <\/li><\/ul>")},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης επισυναπτόμενου Βιογραφικού")});s=r.all([a.isFekValidForApplicationTypeId(n.applicationType),l.canInsertApplication(n.secondment.PersonId),v.getByParams({personId:n.secondment.PersonId},"/api/SecondmentManagment/canInsUpdFromChurch")]);s.then(function(t){n.hasValidFek=t[0];n.fek=t[1];n.canInsUpdFromChurch=t[2];n.fek.Id>0?(n.canInsertAppl=!0,n.secondment.FekId=n.fek.Id,n.showCV=!0):(n.canInsertAppl=!1,n.showCV=!1);n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"?(n.canUpdateAppl=!0,n.showAddEditForm=1):n.canInsertAppl&&n.hasValidFek?(n.canInsertAppl=!0,n.showAddEditForm=1):n.showAddEditForm=2;n.doAll();v.isEmptyValue(n.secondment.Id)&&(n.IsDisabled=!n.pageRules.secBody.CanInsert)})},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else e.go("/");n.showAlertBlock=function(){return n.secondment.NoRemoteUnit&&n.secondment.NoEducationalExecutive&&n.secondment.NoTenure&&n.secondment.NoTenureModelExpSchool?!1:!0};n.editPerson=function(){f.setPersonId(n.secondment.PersonId);e.go("stateEditPerson")};Date.prototype.withoutTime=function(){var n=new Date(this);return n.setHours(0,0,0,0,0),n};n.doAll=function(){if(n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"){var t=r.all([v.getByParams({id:n.secondment.PersonId},"/api/Person/GetSecondmentPersonDto"),l.getSecondmentBodyById(n.secondment.Id)]);t.then(function(t){n.person=t[0];n.secondment=t[1];n.secondment.SpecialityId=n.person.Speciality.Id;n.OfficialLevelId=n.person.OfficialRegionAndUnit.LevelId;v.isEmpty(n.secondment.SecondmentBodyProtocols)||(n.protocol=n.secondment.SecondmentBodyProtocols[0].ProtocolString,n.showProtocol=!0);n.secondment.SecondmentBodyCVs.length>0&&(n.SendDataForCVFullDto=n.secondment.SecondmentBodyCVs[0],n.SendDataForCVDto.Id=n.SendDataForCVFullDto.Id,n.uploadedFileDetails="<h4>Έχετε μεταφορτώσει:<\/h4><ul><li>Αρχείο: "+n.SendDataForCVFullDto.FileName+" <\/li><li>Μέγεθος: "+n.SendDataForCVFullDto.FileSize+" <\/li><li>Ημερομηνία: "+u("date")(n.SendDataForCVFullDto.UploadDateTime,"dd/MM/yyyy - HH:mm:ss")+" <\/li><\/ul>");n.paramsForCheckUpd.personId=n.secondment.PersonId;n.paramsForCheckUpd.levelUser=n.authentication.levelId;n.paramsForCheckUpd.regionAndUnitId=n.authentication.regionAndUnitId;n.paramsForCheckUpd.userRole=n.authentication.role;n.paramsForCheckUpd.specialityId=n.secondment.SpecialityId;n.paramsForCheckUpd.applicationLevelId=n.secondment.LevelId;n.paramsForCheckUpd.applicationTypeId=n.applicationType;n.paramsForCheckUpd.IsActive=n.secondment.IsActive;n.paramsForCheckUpd.FekId=n.secondment.FekId;v.getByParams({fekId:n.secondment.FekId,specialityId:n.secondment.SpecialityId},"/api/ApplicationTypeFek/getFekDetailsByFekIdAndSpecialityId").then(function(t){n.fekDetails=t;n.fekDetails.ValidTo=new Date(n.fekDetails.ValidTo);n.fekDetails.ValidFrom=new Date(n.fekDetails.ValidFrom);n.now=(new Date).withoutTime();n.showCV=new Date(n.fekDetails.ValidFrom).withoutTime()<=n.now&&new Date(n.fekDetails.ValidTo).withoutTime()>=n.now?!0:!1;n.FirstLevelBody()},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});v.postByParams(n.paramsForCheckUpd,"/api/General/checkUpdateSecFromFEKAndUser").then(function(t){n.IsDisabled=!t;n.IsDisabled&&(n.noUpdAccess=!0);v.isValueInArray(n.pageRules.secBody.CanAccess,"u1, u2")&&n.secondment.IsActive&&!n.secondment.IsTemporaryStored&&(n.IsDisabled=!0,n.cannotUpdate=!0);n.secondment.IsActive||(n.IsDisabled=!0,n.notActive=!0);v.isValueInArray(n.pageRules.secBody.CanAccess,"d1, d2, p")&&n.secondment.OfficialRegionAndUnitId!=n.authentication.regionAndUnitId&&(n.IsDisabled=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.secBody.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0)}).catch(function(){o.pop("error","Παρουσιάστηκε σφάλμα","Δημιουργήθηκε πρόβλημα με τα δικαιώματα σας στη σελίδα.")});n.ApplBodyById();n.getOfficialPlacementUnits();n.getComputerKnowlegdeTypes();n.getApplDocuments()})}else n.secondment.PersonId!=null&&n.secondment.PersonId!=""&&n.secondment.PersonId!="undefined"&&(v.getByParams({id:n.secondment.PersonId},"/api/Person/GetSecondmentPersonDto").then(function(t){n.person=t;n.secondment.SpecialityId=t.Speciality.Id;n.OfficialLevelId=t.OfficialRegionAndUnit.LevelId;n.secondment.OfficialRegionAndUnitId=t.OfficialRegionAndUnit.Id;n.secondment.OfficialPlacementUnitDescription=t.OfficialPlacementUnitDescription;n.secondment.PostingTransferAreaId=t.PostingTransferArea==null?null:t.PostingTransferArea.Id;n.secondment.NominationYear=t.NominationYear;n.getOfficialPlacementUnits();n.getComputerKnowlegdeTypes()},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),n.fekDetails.ValidTo=n.fek.ValidTo,n.fekDetails.ValidFrom=n.fek.ValidFrom,n.FirstLevelBody())};n.getComputerKnowlegdeTypes=function(){v.getByAll("/api/SecondmentMusic/computerKnowlegdeTypes").then(function(t){n.consts.computerKnowlegdeType=t},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.getApplDocuments=function(){v.getByParams({id:n.secondment.Id},"/api/SecondmentBodyController/getApplDocumentsById").then(function(t){n.secondmentDocument=t},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.ApplBodyById=function(){l.getApplBodyById(n.secondment.Id).then(function(t){n.SelectedBodies=t;n.SelectedBodies[0].Description1=="Γ.Γ.Δ.Β.Μ.Ν.Γ. - Δημόσια ΙΕΚ"?(n.secondment.bodyLayer1=n.SelectedBodies[0],n.secondment.bodyLayer2=n.SelectedBodies[0],n.SelectedAvailBodyItems=t,n.SelectedBodyListItems=t,n.SecondLevelBody(),n.IEKForPrefecture()):(v.isValueInArray(n.SelectedBodies[0].RegionAndUnitId1,[631,632,633,3356])?v.isValueInArray(v.getRoleCode(n.authentication.role),"m1, m2")&&(n.pageRules.secBody.CanView=!1):v.isValueInArray(v.getRoleCode(n.authentication.role),"mk")&&(n.pageRules.secBody.CanView=!1),n.SelectedBodyListItems[0]=n.SelectedBodies[0],n.secondment.bodyLayer1=n.SelectedBodies[0],v.isEmptyValue(n.bodyLayer1)||n.secondment.bodyLayer1.Description1!="Άλλος Φορέας"?n.details=!1:(n.secondment.details=n.SelectedBodies[0].Details,n.details=!0),n.SecondLevelBody(),n.secondment.bodyLayer2=n.SelectedBodies[0],v.isEmptyValue(n.secondment.bodyLayer2)||n.secondment.bodyLayer2.RegionAndUnitId2==null||n.secondment.bodyLayer2.RegionAndUnitId2==""||(n.ThirdLevelBody(),n.secondment.bodyLayer3=n.SelectedBodies[0],n.secondment.bodyLayer3.Description3=="Άλλο Τμήμα - Υπηρεσία"?(n.secondment.details=n.SelectedBodies[0].Details,n.details=!0):n.details=!1))},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.getOfficialPlacementUnits=function(){var t;t=n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"?n.secondment.OfficialRegionAndUnitId:n.person.OfficialRegionAndUnit.Id;params={OfficialUnitAndRegionId:t,userLevel:n.authentication.levelId};v.getByAll("/api/RegionAndUnit/getRegionAndUnitForPlacement").then(function(t){n.OfficialPlacementUnits=t;n.changedRegionAndUnit()},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.getPostingTranferAreas=function(){v.getByParams({id:n.secondment.OfficialRegionAndUnitId},"/api/RegionAndUnit/getPostingTransferAreaByRegionAndUnitId").then(function(t){n.PostingTranferAreas=t},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.changedRegionAndUnit=function(){n.checkForPostingTransferArea();n.getPostingTranferAreas()};n.changeNewTechologies=function(){n.secondmentDocument.NewTechologies!=3&&(n.secondmentDocument.NewTechologiesDetails="")};n.changeLevel=function(){d();g();n.secondment.LevelId==1&&(n.secondment.IsPyspde=!0)};n.checkForPostingTransferArea=function(){n.myfilter=u("filter")(n.OfficialPlacementUnits,{Id:n.secondment.OfficialRegionAndUnitId},!0)[0];n.myfilter.RegionAndUnitTypeId==8?(n.showPostingTransferArea=!0,n.showLevel=!1,n.secondment.LevelId=n.myfilter.LevelId,n.secondment.LevelId==1&&(n.secondment.IsPyspde=!0),d(),g()):(v.getByAll("/api/Dbo/getLevelsAsync").then(function(t){n.levels=t;n.showLevel=!0},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία φόρτωσης βαθμίδων επιλογής")}),n.showPostingTransferArea=!1,n.secondment.PostingTransferAreaId=null)};n.FirstLevelBody=function(){v.getByParams({applicationType:n.applicationType},"/api/ApplicationTypeRegionAndUnit/getFirstLevelBodyWithoutActiveTime").then(function(t){n.firstLevelBody=t;n.firstRegionType1=n.firstLevelBody[0].RegionType1},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.SecondLevelBody=function(){n.secondment.bodyLayer1&&c.getSecondLevelBody(n.secondment.bodyLayer1.RegionAndUnitId1,n.applicationType).then(function(t){n.secondLevelBody=t;v.isEmpty(n.secondLevelBody)||(n.secondRegionType2=n.secondLevelBody[0].RegionType2)},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.ThirdLevelBody=function(){c.getThirdLevelBody(n.secondment.bodyLayer1.RegionAndUnitId1,n.secondment.bodyLayer2.RegionAndUnitId2,n.applicationType).then(function(t){n.thirdLevelBody=t;v.isEmpty(n.thirdLevelBody)||(n.thirdRegionType3=n.thirdLevelBody[0].RegionType3)},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.IEKForPrefecture=function(){c.getIEKForPrefecture(n.secondment.bodyLayer2.RegionAndUnitId2).then(function(t){n.AvailableBodyListItems=t;n.removeDuplicatesBodyForDualList()},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα ","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.setRegion1=function(){n.secondLevelBody=[];n.thirdLevelBody=[];n.secondment.details="";n.SelectedBodyListItems=[];n.AvailableBodyListItems=[];n.SelectedSelectedBodyListItems=[];n.SelectedAvailBodyItems=[];n.secondment.bodyLayer2=null;n.secondment.bodyLayer3=null;n.SecondLevelBody();n.secondment.bodyLayer1!=null&&(n.secondment.bodyLayer1.Description1!="Γ.Γ. Ε.Ε.Κ.Δ.Β.Μ. & Ν. - Δημόσια ΙΕΚ - Δημόσιες ΕΣΚ"&&(n.SelectedBodyListItems[0]=n.secondment.bodyLayer1),n.details=n.secondment.bodyLayer1.Description1=="Άλλος Φορέας"?!0:!1)};n.setRegion2=function(){n.secondment.details="";n.secondment.bodyLayer2!=null&&(n.secondment.bodyLayer2.Description1!="Γ.Γ. Ε.Ε.Κ.Δ.Β.Μ. & Ν. - Δημόσια ΙΕΚ - Δημόσιες ΕΣΚ"&&(n.ThirdLevelBody(),n.SelectedBodyListItems[0]=n.secondment.bodyLayer2),n.secondment.bodyLayer2.Description1=="Γ.Γ. Ε.Ε.Κ.Δ.Β.Μ. & Ν. - Δημόσια ΙΕΚ - Δημόσιες ΕΣΚ"&&(n.SelectedBodyListItems=[],n.SelectedSelectedBodyListItems=[],n.IEKForPrefecture()))};n.setRegion3=function(){n.secondment.bodyLayer3!=null&&(n.secondment.bodyLayer3.Description1!="Γ.Γ. Ε.Ε.Κ.Δ.Β.Μ. & Ν. - Δημόσια ΙΕΚ - Δημόσιες ΕΣΚ"&&n.secondment.bodyLayer3.Description1!="Άλλο Τμήμα - Υπηρεσία"&&(n.SelectedBodyListItems[0]=n.secondment.bodyLayer3),n.secondment.bodyLayer3.Description3=="Άλλο Τμήμα - Υπηρεσία"?n.details=!0:(n.details=!1,n.secondment.details=""))};n.hasregions2=function(){return n.secondLevelBody[0]!=null&&n.secondLevelBody!="undefined"?n.secondLevelBody[0].RegionAndUnitId2!=null?!0:!1:!1};n.hasregions3=function(){return n.thirdLevelBody[0]!=null&&n.thirdLevelBody!="undefined"?n.thirdLevelBody[0].RegionAndUnitId3!=null?!0:!1:!1};n.hasIEK=function(){if(n.secondment.bodyLayer2!=null&&n.secondment.bodyLayer2!="undefined")return n.secondment.bodyLayer2.Description1=="Γ.Γ. Ε.Ε.Κ.Δ.Β.Μ. & Ν. - Δημόσια ΙΕΚ - Δημόσιες ΕΣΚ"?!0:!1};n.InsOrUpd=function(t){var r={SecondmentBody:n.secondment,BodyRegionAndUnit:n.SelectedBodyListItems,secDetails:n.secondment.details,Status:t,SecondmentDocument:n.secondmentDocument,Role:n.authentication.role,UnitName:n.authentication.unitName},i=r;n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"?l.updateSecondmentBody(i).then(function(){f.setPersonId(n.secondment.PersonId);v.isValueInArray(n.pageRules.secBody.CanAccess,"u1, u2")?e.go("history"):e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)}):l.insertSecondmentBody(i).then(function(){f.setPersonId(n.secondment.PersonId);v.isValueInArray(n.pageRules.secBody.CanAccess,"u1, u2")?e.go("history"):e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)})};n.saveAction=function(r){if(n.showAlertRegions=n.secondment.bodyLayer2&&n.secondment.bodyLayer2.Description1=="Γ.Γ. Ε.Ε.Κ.Δ.Β.Μ. & Ν. - Δημόσια ΙΕΚ - Δημόσιες ΕΣΚ"&&v.isEmpty(n.SelectedBodyListItems)?!0:!1,v.isEmptyValue(n.SendDataForCVDto.Id)&&v.isValueInArray(n.pageRules.secBody.CanAccess,"u1, u2")&&r=="final"?(n.showAlertForUploadCV=!0,w.hash("showAlertRequiredCV"),b()):n.showAlertForUploadCV=!1,v.isEmpty(n.secondment.bodyLayer1)||n.secondment.bodyLayer1.Description1=="Διεύθυνση Εκπαίδευσης"||n.secondment.bodyLayer1.Description1=="Σχολείο φορέα"||(n.secondment.levelId=3),$("#SecondmentBody").valid()&&!n.showAlertRegions&&!n.showAlertForUploadCV)if(r=="final"){var u=t.open({templateUrl:"ModalContent.html",controller:OpenModalController});u.result.then(function(t){t&&n.InsOrUpd(r)},function(){i.info("Modal dismissed at: "+new Date)})}else n.InsOrUpd(r)};n.removeDuplicatesBodyForDualList=function(){angular.forEach(n.SelectedAvailBodyItems,function(t){for(var i=n.AvailableBodyListItems.length-1;i>=0;i--)n.AvailableBodyListItems[i].Id==t.Id&&n.AvailableBodyListItems.splice(i,1)})};n.btnBodyUp=function(){for(var t,r,u,f=n.SelectedSelectedBodyListItems,i=0;i<n.SelectedSelectedBodyListItems.length;i++){if(t=n.SelectedBodyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedBodyListItems[i].Id),t<=0||t>=n.SelectedBodyListItems.length)return;r=n.SelectedBodyListItems[t];u=n.SelectedBodyListItems[t-1];n.SelectedBodyListItems[t-1]=r;n.SelectedBodyListItems[t]=u}};n.btnBodyDown=function(){for(var t,r,u,i=n.SelectedSelectedBodyListItems.length-1;i>=0;i--){if(t=n.SelectedBodyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedBodyListItems[i].Id),t<0||t>=n.SelectedBodyListItems.length-1)return;r=n.SelectedBodyListItems[t];u=n.SelectedBodyListItems[t+1];n.SelectedBodyListItems[t+1]=r;n.SelectedBodyListItems[t]=u}};n.btnBodyRight=function(){n.checkRegions();n.canInsertRegions&&(angular.forEach(n.SelectedAvailBodyItems,function(n){this.push(n)},n.SelectedBodyListItems),angular.forEach(n.SelectedAvailBodyItems,function(t){for(var i=n.AvailableBodyListItems.length-1;i>=0;i--)n.AvailableBodyListItems[i].Id==t.Id&&n.AvailableBodyListItems.splice(i,1)}),n.SelectedAvailBodyItems=[],n.SelectedSelectedBodyListItems=[])};n.checkRegions=function(){var t=3;n.canInsertRegions=!0;n.SelectedBodyListItems.length+n.SelectedAvailBodyItems.length>t&&(o.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών","Δεν μπορείτε να επιλέξετε περισσότερες από "+t+" περιοχές"),n.canInsertRegions=!1)};n.btnBodyLeft=function(){angular.forEach(n.SelectedSelectedBodyListItems,function(n){this.push(n)},n.AvailableBodyListItems);angular.forEach(n.SelectedSelectedBodyListItems,function(t){for(var i=n.SelectedBodyListItems.length-1;i>=0;i--)n.SelectedBodyListItems[i].Id==t.Id&&n.SelectedBodyListItems.splice(i,1)});n.SelectedSelectedBodyListItems=[];n.SelectedAvailBodyItems=[]};n.onFileSelect=function(t){var r,i;for(n.messages={completed:"",percentage:"0",error:""},n.showAlertForUploadCV=!1,r=0;r<t.length;r++){if(i=t[r],i.type!="application/x-zip-compressed"&&i.type!="application/x-compressed"&&i.type!="application/zip"&&i.type!="multipart/x-zip"&&i.type!="application/pdf"){n.messages.error='Μη έγκυρη επέκταση αρχείου "'+i.name+'". Οι επεκτάσεις που υποστηρίζονται είναι: "<b>pdf και zip<\/b>" .';return}if(i.size>=10485760){n.messages.error='Το αρχείο "'+i.name+'" (<b>'+Math.round(i.size/1024)+" KB<\/b>) υπερβαίνει το μέγιστο επιτρεπόμενο μέγεθος μεταφόρτωσης <b>10000 KB<\/b>.";return}(function(t){n.upload[t]=p.upload({url:"/api/files/upload",method:"POST",data:{SendDataForCVDto:n.SendDataForCVDto},file:i}).progress(function(t){n.messages.percentage=parseInt(100*t.loaded/t.total)}).then(function(t){n.messages.completed="Το αρχείο <b>"+i.name+"<\/b> μεταφορτώθηκε με επιτυχία.";n.SendDataForCVDto.Id=t.data.secBodyCV.Id;n.SendDataForCVFullDto=t.data.secBodyCV;n.uploadedFileDetails=t.data.Message}).catch(function(t){n.messages.error=t.data.Message})})(r)}};n.abortUpload=function(t){n.upload[t].abort()};n.downloadFile=function(){v.getByParamsDownload({PersonId:n.secondment.PersonId,Path:n.SendDataForCVFullDto.DirectPdfLink,ContentType:n.SendDataForCVFullDto.ContentType},"api/files/download").then(function(t){var p=t.status,s=t.headers,h=t.data,y="application/octet-stream",r=!1,f,c,l,e,u,v,i,o;s=s();f=n.SendDataForCVFullDto.FileName||"download.pdf";c=s["content-type"]||y;try{if(console.log("Trying saveBlob method ..."),i=new Blob([h],{type:c}),navigator.msSaveBlob)navigator.msSaveBlob(i,f);else{if(l=navigator.webkitSaveBlob||navigator.mozSaveBlob||navigator.saveBlob,l===undefined)throw"Not supported";l(i,f)}console.log("saveBlob succeeded");r=!0}catch(a){console.log("saveBlob method failed with the following exception:");console.log(a)}if(!r&&(e=window.URL||window.webkitURL||window.mozURL||window.msURL,e)){if(u=document.createElement("a"),"download"in u)try{console.log("Trying download link method with simulated click ...");i=new Blob([h],{type:c});o=e.createObjectURL(i);u.setAttribute("href",o);u.setAttribute("download",f);v=document.createEvent("MouseEvents");v.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null);u.dispatchEvent(v);console.log("Download link method with simulated click succeeded");r=!0}catch(a){console.log("Download link method with simulated click failed with the following exception:");console.log(a)}if(!r)try{console.log("Trying download link method with window.location ...");i=new Blob([h],{type:y});o=e.createObjectURL(i);window.location=o;console.log("Download link method with window.location succeeded");r=!0}catch(a){console.log("Download link method with window.location failed with the following exception:");console.log(a)}}r||(console.log("No methods worked for saving the arraybuffer, using last resort window.open"),window.open(httpPath,"_blank",""))},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση του βιογραφικού")})}};SecondmentBodyController.$inject=["$scope","$uibModal","$log","$q","$filter","PassParameters","$state","toaster","PersonFactory","PersonSpecialityFactory","ApplicationTypeRegionAndUnitFactory","SecondmentBodyFactory","ApplicationTypeFekFactory","GeneralFactory","$timeout","$upload","$location","$anchorScroll"];SecondmentBodyRefController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b){function d(){v.getByParams({level:n.secondment.LevelId},"/api/RegionAndUnit/getPyspdeByLevel").then(function(t){n.consts.pyspdeRegionAndUnit=t},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function g(){c.getPyspdeWithoutJointExaminationByLevel(n.applicationType,n.secondment.LevelId).then(function(t){n.consts.pyspde=t},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των πιθανών ασθενειών","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}if(n.secondment={IsTemporaryStored:!0},n.secondmentDocument={},n.applicationType=13,n.consts={},n.alerts=[{type:"danger",msg:"Δεν μπορείτε να υποβάλετε αίτηση. Για ήδη υποβληθείσα αίτηση μεταβείτε στο Ιστορικό Αιτήσεων."}],n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.AvailableBodyListItems=[],n.SelectedAvailBodyItems=[],n.SelectedSelectedBodyListItems=[],n.SelectedBodyListItems=[],n.SelectedBodies=[],n.secondLevelBody=[],n.thirdLevelBody=[],n.secondment.bodyLayer1=null,n.secondment.bodyLayer2=null,n.secondment.bodyLayer3=null,n.OfficialPlacementUnits=[],n.myfilter=[],n.fek={},n.didacticYears={},n.dateForProposal="31/8/"+n.applicationDidacticYear.YearFrom,n.secondment.details="",n.protocol="",n.showProtocol=!1,n.fekDetails={ValidTo:"",ValidFrom:""},n.showAlertRegions=!1,n.alertRegions=[{type:"danger",msg:"Πρέπει να δηλώσετε τουλάχιστον ένα ΙΕΚ προτίμησης."}],n.cannotUpdate=!1,n.noUpdAccess=!1,n.pageRules={},n.IsDisabled=!1,n.notActive=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.upload=[],n.messages={completed:"",percentage:"0",error:""},n.uploadedFileDetails="",n.showAlertForUploadCV=!1,n.SendDataForCVDto={Id:"",SecondmentApplicationId:"",PersonId:""},n.SendDataForCVFullDto={Id:"",SecondmentApplicationId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""},n.authentication.isAuth){var k="secBodyRef";v.getByParams({role:n.authentication.role,codes:k},"/api/Subsystem/NewCheckPermission").then(function(t){var i=k.split(",");for(var r in i)n.pageRules[i[r]]=u("filter")(t,{Code:i[r]},!0)[0].Rules;n.secondment.Id=f.getApplicationId();f.resetApplication();n.secondment.PersonId=f.getPersonId();v.isValueInArray(n.pageRules.secBodyRef.CanAccess,"u1, u2")&&(n.secondment.PersonId=n.authentication.personId);n.SendDataForCVDto.SecondmentApplicationId=n.secondment.Id;n.SendDataForCVDto.PersonId=n.secondment.PersonId;v.getByParams({personId:n.secondment.PersonId},"/api/SecondmentBodyRefController/canInsertOrUpdateApplication").then(function(t){n.fek=t.FekDetails;n.canInsertAppl=t.CanInsertFromFek;n.CanUpdateFromFek=t.CanUpdateFromFek;n.canInsertAppl&&(n.secondment.FekId=n.fek.Id);n.hasValidFek=n.canInsertAppl;n.fek.Id>0?n.secondment.FekId=n.fek.Id:n.canInsertAppl=!1;n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"?(n.canUpdateAppl=!0,n.showAddEditForm=1):n.canInsertAppl&&n.hasValidFek?(n.canInsertAppl=!0,n.showAddEditForm=1):n.showAddEditForm=2;n.doAll();v.isEmptyValue(n.secondment.Id)&&(n.IsDisabled=!n.pageRules.secBodyRef.CanInsert)},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης επισυναπτόμενου Βιογραφικού")})},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else e.go("/");n.showAlertBlock=function(){return n.secondment.NoRemoteUnit&&n.secondment.NoEducationalExecutive&&n.secondment.NoTenure&&n.secondment.NoTenureModelExpSchool?!1:!0};n.editPerson=function(){f.setPersonId(n.secondment.PersonId);e.go("stateEditPerson")};n.FirstLevelBody=function(){v.getByParams({applicationType:n.applicationType},"/api/ApplicationTypeRegionAndUnit/getFirstLevelBodyWithoutActiveTime").then(function(t){n.firstLevelBody=t;n.firstRegionType1=n.firstLevelBody[0].RegionType1},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};Date.prototype.withoutTime=function(){var n=new Date(this);return n.setHours(0,0,0,0,0),n};n.doAll=function(){if(n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"){var t=r.all([v.getByParams({id:n.secondment.PersonId},"/api/Person/GetSecondmentPersonDto"),l.getSecondmentBodyById(n.secondment.Id),v.getByParams({personId:n.secondment.PersonId,applicationId:n.secondment.Id},"/api/SecondmentBodyRefController/GetDetailsForCVFromPersonIdAndApplicationId"),]);t.then(function(t){n.person=t[0];n.secondment=t[1];v.isEmptyValue(t[2])||(n.SendDataForCVFullDto=t[2],n.SendDataForCVDto.Id=t[2].Id,n.uploadedFileDetails="<h4>Έχετε μεταφορτώσει:<\/h4><ul><li>Αρχείο: "+n.SendDataForCVFullDto.FileName+" <\/li><li>Μέγεθος: "+n.SendDataForCVFullDto.FileSize+" <\/li><li>Ημερομηνία: "+u("date")(n.SendDataForCVFullDto.UploadDateTime,"dd/MM/yyyy - HH:mm:ss")+" <\/li><\/ul>");n.secondment.SpecialityId=n.person.Speciality.Id;n.OfficialLevelId=n.person.OfficialRegionAndUnit.LevelId;v.isEmpty(n.secondment.SecondmentBodyRefProtocols)||(n.protocol=n.secondment.SecondmentBodyRefProtocols[0].ProtocolString,n.showProtocol=!0);n.paramsForCheckUpd.personId=n.secondment.PersonId;n.paramsForCheckUpd.levelUser=n.authentication.levelId;n.paramsForCheckUpd.regionAndUnitId=n.authentication.regionAndUnitId;n.paramsForCheckUpd.userRole=n.authentication.role;n.paramsForCheckUpd.specialityId=n.secondment.SpecialityId;n.paramsForCheckUpd.applicationLevelId=n.secondment.LevelId;n.paramsForCheckUpd.applicationTypeId=n.applicationType;n.paramsForCheckUpd.IsActive=n.secondment.IsActive;n.paramsForCheckUpd.FekId=n.secondment.FekId;v.getByParams({fekId:n.secondment.FekId,specialityId:n.secondment.SpecialityId},"/api/ApplicationTypeFek/getFekDetailsByFekIdAndSpecialityId").then(function(t){n.fekDetails=t;n.fekDetails.ValidTo=new Date(n.fekDetails.ValidTo);n.fekDetails.ValidFrom=new Date(n.fekDetails.ValidFrom);n.now=(new Date).withoutTime();n.showCV=new Date(n.fekDetails.ValidFrom).withoutTime()<=n.now&&new Date(n.fekDetails.ValidTo).withoutTime()>=n.now?!0:!1;n.FirstLevelBody()},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});v.postByParams(n.paramsForCheckUpd,"/api/General/checkUpdateSecFromFEKAndUserNotUpdateU1U2IfHasNotHaveFek").then(function(t){n.IsDisabled=!t;n.IsDisabled&&(n.noUpdAccess=!0);v.isValueInArray(n.pageRules.secBodyRef.CanAccess,"u1, u2")&&n.secondment.IsActive&&!n.secondment.IsTemporaryStored&&(n.IsDisabled=!0,n.cannotUpdate=!0);n.secondment.IsActive||(n.IsDisabled=!0,n.notActive=!0);v.isValueInArray(n.pageRules.secBodyRef.CanAccess,"d1, d2, p")&&n.secondment.OfficialRegionAndUnitId!=n.authentication.regionAndUnitId&&(n.IsDisabled=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.secBodyRef.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0)}).catch(function(){o.pop("error","Παρουσιάστηκε σφάλμα","Δημιουργήθηκε πρόβλημα με τα δικαιώματα σας στη σελίδα.")});n.ApplBodyById();n.getOfficialPlacementUnits()})}else n.secondment.PersonId!=null&&n.secondment.PersonId!=""&&n.secondment.PersonId!="undefined"&&(v.getByParams({id:n.secondment.PersonId},"/api/Person/GetSecondmentPersonDto").then(function(t){n.person=t;n.secondment.SpecialityId=t.Speciality.Id;n.OfficialLevelId=t.OfficialRegionAndUnit.LevelId;n.secondment.OfficialRegionAndUnitId=t.OfficialRegionAndUnit.Id;n.secondment.OfficialPlacementUnitDescription=t.OfficialPlacementUnitDescription;n.secondment.PostingTransferAreaId=t.PostingTransferArea==null?null:t.PostingTransferArea.Id;n.secondment.NominationYear=t.NominationYear;n.getOfficialPlacementUnits()},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),n.fekDetails.ValidTo=n.fek.ValidTo,n.fekDetails.ValidFrom=n.fek.ValidFrom,n.FirstLevelBody())};n.ApplBodyById=function(){l.getApplBodyById(n.secondment.Id).then(function(t){n.SelectedBodies=t;v.isEmptyValue(n.SelectedBodies)||n.SelectedBodies[0].Description1!="Δομές Υποδοχής για την Εκπαίδευση των Προσφύγων (ΔΥΕΠ)"?(n.SelectedBodyListItems[0]=n.SelectedBodies[0],n.secondment.bodyLayer1=n.SelectedBodies[0],v.isEmptyValue(n.bodyLayer1)||n.secondment.bodyLayer1.Description1!="Άλλος Φορέας"?n.details=!1:(n.secondment.details=n.SelectedBodies[0].Details,n.details=!0),n.SecondLevelBody(),n.secondment.bodyLayer2=n.SelectedBodies[0],v.isEmptyValue(n.secondment.bodyLayer2)||n.secondment.bodyLayer2.RegionAndUnitId2==null||n.secondment.bodyLayer2.RegionAndUnitId2==""||(n.ThirdLevelBody(),n.secondment.bodyLayer3=n.SelectedBodies[0],n.secondment.bodyLayer3.Description3=="Άλλο Τμήμα - Υπηρεσία"?(n.secondment.details=n.SelectedBodies[0].Details,n.details=!0):n.details=!1)):(n.secondment.bodyLayer1=n.SelectedBodies[0],n.secondment.bodyLayer2=n.SelectedBodies[0],n.SelectedAvailBodyItems=t,n.SelectedBodyListItems=t,n.SecondLevelBody(),n.IEKForPrefecture())},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.getOfficialPlacementUnits=function(){var t;t=n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"?n.secondment.OfficialRegionAndUnitId:n.person.OfficialRegionAndUnit.Id;params={OfficialUnitAndRegionId:t,userLevel:n.authentication.levelId};v.getByAll("/api/RegionAndUnit/getRegionAndUnitForPlacement").then(function(t){n.OfficialPlacementUnits=t;n.changedRegionAndUnit()},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.getPostingTranferAreas=function(){v.getByParams({id:n.secondment.OfficialRegionAndUnitId},"/api/RegionAndUnit/getPostingTransferAreaByRegionAndUnitId").then(function(t){n.PostingTranferAreas=t},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.changedRegionAndUnit=function(){n.checkForPostingTransferArea();n.getPostingTranferAreas()};n.changeLevel=function(){d();g()};n.checkForPostingTransferArea=function(){n.myfilter=u("filter")(n.OfficialPlacementUnits,{Id:n.secondment.OfficialRegionAndUnitId},!0)[0];n.myfilter.RegionAndUnitTypeId==8?(n.showPostingTransferArea=!0,n.showLevel=!1,n.secondment.LevelId=n.myfilter.LevelId,d(),g()):(v.getByAll("/api/Dbo/getLevelsAsync").then(function(t){n.levels=t;n.showLevel=!0},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία φόρτωσης βαθμίδων επιλογής")}),n.showPostingTransferArea=!1,n.secondment.PostingTransferAreaId=null)};n.SecondLevelBody=function(){n.secondment.bodyLayer1&&c.getSecondLevelBody(n.secondment.bodyLayer1.RegionAndUnitId1,n.applicationType).then(function(t){n.secondLevelBody=t;n.secondRegionType2=n.secondLevelBody[0].RegionType2},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.ThirdLevelBody=function(){c.getThirdLevelBody(n.secondment.bodyLayer1.RegionAndUnitId1,n.secondment.bodyLayer2.RegionAndUnitId2,n.applicationType).then(function(t){n.thirdLevelBody=t;v.isEmpty(n.thirdLevelBody)||(n.thirdRegionType3=n.thirdLevelBody[0].RegionType3)},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.IEKForPrefecture=function(){c.getPefugeeStructureForPrefecture(n.secondment.bodyLayer2.RegionAndUnitId2).then(function(t){n.AvailableBodyListItems=t;n.removeDuplicatesBodyForDualList()},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα ","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.setRegion1=function(){n.secondLevelBody=[];n.thirdLevelBody=[];n.secondment.details="";n.SelectedBodyListItems=[];n.AvailableBodyListItems=[];n.SelectedSelectedBodyListItems=[];n.SelectedAvailBodyItems=[];n.secondment.bodyLayer2=null;n.secondment.bodyLayer3=null;n.SecondLevelBody();n.secondment.bodyLayer1!=null&&(n.secondment.bodyLayer1.Description1!="Δομές Υποδοχής για την Εκπαίδευση των Προσφύγων (ΔΥΕΠ)"&&(n.SelectedBodyListItems[0]=n.secondment.bodyLayer1),n.details=n.secondment.bodyLayer1.Description1=="Άλλος Φορέας"?!0:!1)};n.setRegion2=function(){n.secondment.details="";n.secondment.bodyLayer2!=null&&(n.secondment.bodyLayer2.Description1!="Δομές Υποδοχής για την Εκπαίδευση των Προσφύγων (ΔΥΕΠ)"&&(n.ThirdLevelBody(),n.SelectedBodyListItems[0]=n.secondment.bodyLayer2),n.secondment.bodyLayer2.Description1=="Δομές Υποδοχής για την Εκπαίδευση των Προσφύγων (ΔΥΕΠ)"&&(n.SelectedBodyListItems=[],n.SelectedSelectedBodyListItems=[],n.IEKForPrefecture()))};n.setRegion3=function(){n.secondment.bodyLayer3!=null&&(n.secondment.bodyLayer3.Description1!="Δομές Υποδοχής για την Εκπαίδευση των Προσφύγων (ΔΥΕΠ)"&&n.secondment.bodyLayer3.Description1!="Άλλο Τμήμα - Υπηρεσία"&&(n.SelectedBodyListItems[0]=n.secondment.bodyLayer3),n.secondment.bodyLayer3.Description3=="Άλλο Τμήμα - Υπηρεσία"?n.details=!0:(n.details=!1,n.secondment.details=""))};n.hasregions2=function(){return n.secondLevelBody[0]!=null&&n.secondLevelBody!="undefined"?n.secondLevelBody[0].RegionAndUnitId2!=null?!0:!1:!1};n.hasregions3=function(){return n.thirdLevelBody[0]!=null&&n.thirdLevelBody!="undefined"?n.thirdLevelBody[0].RegionAndUnitId3!=null?!0:!1:!1};n.hasIEK=function(){if(n.secondment.bodyLayer2!=null&&n.secondment.bodyLayer2!="undefined")return n.secondment.bodyLayer2.Description1=="Δομές Υποδοχής για την Εκπαίδευση των Προσφύγων (ΔΥΕΠ)"?!0:!1};n.InsOrUpd=function(t){var r={SecondmentBodyRef:n.secondment,BodyRegionAndUnit:n.SelectedBodyListItems,secDetails:n.secondment.details,Status:t,Role:n.authentication.role,UnitName:n.authentication.unitName,SecondmentBodyRefCV:n.SendDataForCVFullDto},i=r;n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"?l.updateSecondmentBody(i).then(function(){f.setPersonId(n.secondment.PersonId);v.isValueInArray(n.pageRules.secBodyRef.CanAccess,"u1, u2")?e.go("history"):e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)}):l.insertSecondmentBody(i).then(function(){f.setPersonId(n.secondment.PersonId);v.isValueInArray(n.pageRules.secBodyRef.CanAccess,"u1, u2")?e.go("history"):e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)})};n.saveAction=function(r){if(n.showAlertRegions=n.secondment.bodyLayer2&&n.secondment.bodyLayer2.Description1=="Δομές Υποδοχής για την Εκπαίδευση των Προσφύγων (ΔΥΕΠ)"&&v.isEmpty(n.SelectedBodyListItems)?!0:!1,v.isEmptyValue(n.SendDataForCVDto.Id)&&v.isValueInArray(n.pageRules.secBodyRef.CanAccess,"u1, u2")?(n.showAlertForUploadCV=!0,w.hash("showAlertRequiredCV"),b()):n.showAlertForUploadCV=!1,v.isEmpty(n.secondment.bodyLayer1)||n.secondment.bodyLayer1.Description1=="Διεύθυνση Εκπαίδευσης"||n.secondment.bodyLayer1.Description1=="Σχολείο φορέα"||(n.secondment.levelId=3),$("#SecondmentBody").valid()&&!n.showAlertRegions&&!n.showAlertForUploadCV)if(r=="final"){var u=t.open({templateUrl:"ModalContent.html",controller:OpenModalController});u.result.then(function(t){t&&n.InsOrUpd(r)},function(){i.info("Modal dismissed at: "+new Date)})}else n.InsOrUpd(r)};n.removeDuplicatesBodyForDualList=function(){angular.forEach(n.SelectedAvailBodyItems,function(t){for(var i=n.AvailableBodyListItems.length-1;i>=0;i--)n.AvailableBodyListItems[i].Id==t.Id&&n.AvailableBodyListItems.splice(i,1)})};n.btnBodyUp=function(){for(var t,r,u,f=n.SelectedSelectedBodyListItems,i=0;i<n.SelectedSelectedBodyListItems.length;i++){if(t=n.SelectedBodyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedBodyListItems[i].Id),t<=0||t>=n.SelectedBodyListItems.length)return;r=n.SelectedBodyListItems[t];u=n.SelectedBodyListItems[t-1];n.SelectedBodyListItems[t-1]=r;n.SelectedBodyListItems[t]=u}};n.btnBodyDown=function(){for(var t,r,u,i=n.SelectedSelectedBodyListItems.length-1;i>=0;i--){if(t=n.SelectedBodyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedBodyListItems[i].Id),t<0||t>=n.SelectedBodyListItems.length-1)return;r=n.SelectedBodyListItems[t];u=n.SelectedBodyListItems[t+1];n.SelectedBodyListItems[t+1]=r;n.SelectedBodyListItems[t]=u}};n.btnBodyRight=function(){angular.forEach(n.SelectedAvailBodyItems,function(n){this.push(n)},n.SelectedBodyListItems);angular.forEach(n.SelectedAvailBodyItems,function(t){for(var i=n.AvailableBodyListItems.length-1;i>=0;i--)n.AvailableBodyListItems[i].Id==t.Id&&n.AvailableBodyListItems.splice(i,1)});n.SelectedAvailBodyItems=[];n.SelectedSelectedBodyListItems=[]};n.checkRegions=function(){var t=3;n.canInsertRegions=!0;n.SelectedBodyListItems.length+n.SelectedAvailBodyItems.length>t&&(o.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών","Δεν μπορείτε να επιλέξετε περισσότερες από "+t+" περιοχές"),n.canInsertRegions=!1)};n.btnBodyLeft=function(){angular.forEach(n.SelectedSelectedBodyListItems,function(n){this.push(n)},n.AvailableBodyListItems);angular.forEach(n.SelectedSelectedBodyListItems,function(t){for(var i=n.SelectedBodyListItems.length-1;i>=0;i--)n.SelectedBodyListItems[i].Id==t.Id&&n.SelectedBodyListItems.splice(i,1)});n.SelectedSelectedBodyListItems=[];n.SelectedAvailBodyItems=[]};n.onFileSelect=function(t){var r,i;for(n.messages={completed:"",percentage:"0",error:""},n.showAlertForUploadCV=!1,r=0;r<t.length;r++){if(i=t[r],i.type!="application/pdf"){n.messages.error='Μη έγκυρη επέκταση αρχείου "'+i.name+'". Οι επεκτάσεις που υποστηρίζονται είναι: "<b>pdf<\/b>" .';return}if(i.size>=10485760){n.messages.error='Το αρχείο "'+i.name+'" (<b>'+Math.round(i.size/1024)+" KB<\/b>) υπερβαίνει το μέγιστο επιτρεπόμενο μέγεθος μεταφόρτωσης <b>10000 KB<\/b>.";return}(function(t){n.upload[t]=p.upload({url:"/api/files/uploadRef",method:"POST",data:{SendDataForCVDto:n.SendDataForCVDto},file:i}).progress(function(t){n.messages.percentage=parseInt(100*t.loaded/t.total)}).then(function(t){n.messages.completed="Το αρχείο <b>"+i.name+"<\/b> μεταφορτώθηκε με επιτυχία.";n.SendDataForCVDto.Id=t.data.secBodyCV.Id;n.SendDataForCVFullDto=t.data.secBodyCV;n.uploadedFileDetails=t.data.Message}).catch(function(t){n.messages.error=t.data.Message})})(r)}};n.abortUpload=function(t){n.upload[t].abort()};n.downloadFile=function(){v.getByParamsDownload({PersonId:n.secondment.PersonId,Path:n.SendDataForCVFullDto.DirectPdfLink,ContentType:n.SendDataForCVFullDto.ContentType},"api/files/download").then(function(t){var p=t.status,s=t.headers,h=t.data,y="application/octet-stream",r=!1,f,c,l,e,u,v,i,o;s=s();f=n.SendDataForCVFullDto.FileName||"download.pdf";c=s["content-type"]||y;try{if(console.log("Trying saveBlob method ..."),i=new Blob([h],{type:c}),navigator.msSaveBlob)navigator.msSaveBlob(i,f);else{if(l=navigator.webkitSaveBlob||navigator.mozSaveBlob||navigator.saveBlob,l===undefined)throw"Not supported";l(i,f)}console.log("saveBlob succeeded");r=!0}catch(a){console.log("saveBlob method failed with the following exception:");console.log(a)}if(!r&&(e=window.URL||window.webkitURL||window.mozURL||window.msURL,e)){if(u=document.createElement("a"),"download"in u)try{console.log("Trying download link method with simulated click ...");i=new Blob([h],{type:c});o=e.createObjectURL(i);u.setAttribute("href",o);u.setAttribute("download",f);v=document.createEvent("MouseEvents");v.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null);u.dispatchEvent(v);console.log("Download link method with simulated click succeeded");r=!0}catch(a){console.log("Download link method with simulated click failed with the following exception:");console.log(a)}if(!r)try{console.log("Trying download link method with window.location ...");i=new Blob([h],{type:y});o=e.createObjectURL(i);window.location=o;console.log("Download link method with window.location succeeded");r=!0}catch(a){console.log("Download link method with window.location failed with the following exception:");console.log(a)}}r||(console.log("No methods worked for saving the arraybuffer, using last resort window.open"),window.open(httpPath,"_blank",""))},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση του αρχείου")})}};SecondmentBodyRefController.$inject=["$scope","$uibModal","$log","$q","$filter","PassParameters","$state","toaster","PersonFactory","PersonSpecialityFactory","ApplicationTypeRegionAndUnitFactory","SecondmentBodyRefFactory","ApplicationTypeFekFactory","GeneralFactory","$timeout","$upload","$location","$anchorScroll"];SecondmentBodySepController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b){function d(){v.getByParams({level:n.secondment.LevelId},"/api/RegionAndUnit/getPyspdeByLevel").then(function(t){n.consts.pyspdeRegionAndUnit=t},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function g(){c.getPyspdeWithoutJointExaminationByLevel(n.applicationType,n.secondment.LevelId).then(function(t){n.consts.pyspde=t},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των πιθανών ασθενειών","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}if(n.secondment={IsTemporaryStored:!0},n.secondmentDocument={},n.applicationType=18,n.consts={},n.alerts=[{type:"danger",msg:"Δεν μπορείτε να υποβάλετε αίτηση. Για ήδη υποβληθείσα αίτηση μεταβείτε στο Ιστορικό Αιτήσεων."}],n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.AvailableBodyListItems=[],n.SelectedAvailBodyItems=[],n.SelectedSelectedBodyListItems=[],n.SelectedBodyListItems=[],n.SelectedBodies=[],n.secondLevelBody=[],n.thirdLevelBody=[],n.secondment.bodyLayer1=null,n.secondment.bodyLayer2=null,n.secondment.bodyLayer3=null,n.OfficialPlacementUnits=[],n.myfilter=[],n.fek={},n.didacticYears={},n.dateForProposal="31/8/"+n.applicationDidacticYear.YearFrom,n.secondment.details="",n.protocol="",n.showProtocol=!1,n.fekDetails={ValidTo:"",ValidFrom:""},n.showAlertRegions=!1,n.alertRegions=[{type:"danger",msg:"Πρέπει να δηλώσετε τουλάχιστον ένα ΙΕΚ προτίμησης."}],n.cannotUpdate=!1,n.noUpdAccess=!1,n.pageRules={},n.IsDisabled=!1,n.notActive=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.upload=[],n.messages={completed:"",percentage:"0",error:""},n.uploadedFileDetails="",n.showAlertForUploadCV=!1,n.SendDataForCVDto={Id:"",SecondmentApplicationId:"",PersonId:""},n.SendDataForCVFullDto={Id:"",SecondmentApplicationId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""},n.authentication.isAuth){var k="secBodySep";v.getByParams({role:n.authentication.role,codes:k},"/api/Subsystem/NewCheckPermission").then(function(t){var i=k.split(","),e,s;for(e in i)n.pageRules[i[e]]=u("filter")(t,{Code:i[e]},!0)[0].Rules;n.secondment.Id=f.getApplicationId();f.resetApplication();n.secondment.PersonId=f.getPersonId();v.isValueInArray(n.pageRules.secBodySep.CanAccess,"u1, u2")&&(n.secondment.PersonId=n.authentication.personId);n.SendDataForCVDto.SecondmentApplicationId=n.secondment.Id;n.SendDataForCVDto.PersonId=n.secondment.PersonId;v.getByParams({personId:n.secondment.PersonId},"/api/SecondmentBodySepController/GetDetailsForCV").then(function(t){t!=null&&(n.SendDataForCVFullDto=t,n.SendDataForCVDto.Id=t.Id,n.uploadedFileDetails="<h4>Έχετε μεταφορτώσει:<\/h4><ul><li>Αρχείο: "+n.SendDataForCVFullDto.FileName+" <\/li><li>Μέγεθος: "+n.SendDataForCVFullDto.FileSize+" <\/li><li>Ημερομηνία: "+u("date")(n.SendDataForCVFullDto.UploadDateTime,"dd/MM/yyyy - HH:mm:ss")+" <\/li><\/ul>")},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης επισυναπτόμενου Βιογραφικού")});s=r.all([a.isFekValidForApplicationTypeId(n.applicationType),l.canInsertApplication(n.secondment.PersonId),v.getByAll("/api/SecondmentBodySepController/LanguageLevel"),v.getByAll("/api/SecondmentBodySepController/PostgraduateOrDoctoralLevel"),v.getByAll("/api/SecondmentBodySepController/ReEducationLevel")]);s.then(function(t){n.hasValidFek=t[0];n.fek=t[1];n.consts.languageLevel=t[2];n.consts.postgraduateOrDoctoralLevel=t[3];n.consts.reEducationLevel=t[4];n.fek.Id>0?(n.canInsertAppl=!0,n.secondment.FekId=n.fek.Id):n.canInsertAppl=!1;n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"?(n.canUpdateAppl=!0,n.showAddEditForm=1):n.canInsertAppl&&n.hasValidFek?(n.canInsertAppl=!0,n.showAddEditForm=1):n.showAddEditForm=2;n.doAll();v.isEmptyValue(n.secondment.Id)&&(n.IsDisabled=!n.pageRules.secBodySep.CanInsert)})},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else e.go("/");n.showAlertBlock=function(){return n.secondment.NoRemoteUnit&&n.secondment.NoEducationalExecutive&&n.secondment.NoTenure&&n.secondment.NoTenureModelExpSchool?!1:!0};n.editPerson=function(){f.setPersonId(n.secondment.PersonId);e.go("stateEditPerson")};n.getPostingTranferAreas=function(){v.getByParams({id:n.secondmentMusic.OfficialRegionAndUnitId},"/api/RegionAndUnit/getPostingTransferAreaByRegionAndUnitId").then(function(t){n.PostingTranferAreas=t},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.FirstLevelBody=function(){v.getByParams({applicationType:n.applicationType},"/api/ApplicationTypeRegionAndUnit/getFirstLevelBodyWithoutActiveTime").then(function(t){n.firstLevelBody=t;n.firstRegionType1=n.firstLevelBody[0].RegionType1},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};Date.prototype.withoutTime=function(){var n=new Date(this);return n.setHours(0,0,0,0,0),n};n.doAll=function(){if(n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"){var t=r.all([v.getByParams({id:n.secondment.PersonId},"/api/Person/GetSecondmentPersonDto"),l.getSecondmentBodyById(n.secondment.Id)]);t.then(function(t){n.person=t[0];n.secondment=t[1];n.secondment.SpecialityId=n.person.Speciality.Id;n.OfficialLevelId=n.person.OfficialRegionAndUnit.LevelId;v.isEmpty(n.secondment.SecondmentBodySepProtocols)||(n.protocol=n.secondment.SecondmentBodySepProtocols[0].ProtocolString,n.showProtocol=!0);n.paramsForCheckUpd.personId=n.secondment.PersonId;n.paramsForCheckUpd.levelUser=n.authentication.levelId;n.paramsForCheckUpd.regionAndUnitId=n.authentication.regionAndUnitId;n.paramsForCheckUpd.userRole=n.authentication.role;n.paramsForCheckUpd.specialityId=n.secondment.SpecialityId;n.paramsForCheckUpd.applicationLevelId=n.secondment.LevelId;n.paramsForCheckUpd.applicationTypeId=n.applicationType;n.paramsForCheckUpd.IsActive=n.secondment.IsActive;n.paramsForCheckUpd.FekId=n.secondment.FekId;v.getByParams({fekId:n.secondment.FekId,specialityId:n.secondment.SpecialityId},"/api/ApplicationTypeFek/getFekDetailsByFekIdAndSpecialityId").then(function(t){n.fekDetails=t;n.fekDetails.ValidTo=new Date(n.fekDetails.ValidTo);n.fekDetails.ValidFrom=new Date(n.fekDetails.ValidFrom);n.now=(new Date).withoutTime();n.showCV=new Date(n.fekDetails.ValidFrom).withoutTime()<=n.now&&new Date(n.fekDetails.ValidTo).withoutTime()>=n.now?!0:!1;n.FirstLevelBody()},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});v.postByParams(n.paramsForCheckUpd,"/api/General/checkUpdateSecFromFEKAndUser").then(function(t){n.IsDisabled=!t;n.IsDisabled&&(n.noUpdAccess=!0);v.isValueInArray(n.pageRules.secBodySep.CanAccess,"u1, u2")&&n.secondment.IsActive&&!n.secondment.IsTemporaryStored&&(n.IsDisabled=!0,n.cannotUpdate=!0);n.secondment.IsActive||(n.IsDisabled=!0,n.notActive=!0);v.isValueInArray(n.pageRules.secBodySep.CanAccess,"d1, d2, p")&&n.secondment.OfficialRegionAndUnitId!=n.authentication.regionAndUnitId&&(n.IsDisabled=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.secBodySep.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0)}).catch(function(){o.pop("error","Παρουσιάστηκε σφάλμα","Δημιουργήθηκε πρόβλημα με τα δικαιώματα σας στη σελίδα.")});n.ApplBodyById();n.getOfficialPlacementUnits();n.getApplDocuments()})}else n.secondment.PersonId!=null&&n.secondment.PersonId!=""&&n.secondment.PersonId!="undefined"&&(v.getByParams({id:n.secondment.PersonId},"/api/Person/GetSecondmentPersonDto").then(function(t){n.person=t;n.secondment.SpecialityId=t.Speciality.Id;n.OfficialLevelId=t.OfficialRegionAndUnit.LevelId;n.secondment.OfficialRegionAndUnitId=t.OfficialRegionAndUnit.Id;n.secondment.OfficialPlacementUnitDescription=t.OfficialPlacementUnitDescription;n.secondment.PostingTransferAreaId=t.PostingTransferArea==null?null:t.PostingTransferArea.Id;n.secondment.NominationYear=t.NominationYear;n.getOfficialPlacementUnits()},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),n.fekDetails.ValidTo=n.fek.ValidTo,n.fekDetails.ValidFrom=n.fek.ValidFrom,n.FirstLevelBody())};n.getApplDocuments=function(){v.getByParams({id:n.secondment.Id},"/api/SecondmentBodySepController/getApplDocumentsById").then(function(t){n.secondmentDocument=t},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.ApplBodyById=function(){l.getApplBodyById(n.secondment.Id).then(function(t){n.SelectedBodies=t;v.isEmptyValue(n.SelectedBodies)||n.SelectedBodies[0].Description1!="Δομές Υποδοχής για την Εκπαίδευση των Προσφύγων (ΔΥΕΠ)"?(n.SelectedBodyListItems[0]=n.SelectedBodies[0],n.secondment.bodyLayer1=n.SelectedBodies[0],v.isEmptyValue(n.bodyLayer1)||n.secondment.bodyLayer1.Description1!="Άλλος Φορέας"?n.details=!1:(n.secondment.details=n.SelectedBodies[0].Details,n.details=!0),n.SecondLevelBody(),n.secondment.bodyLayer2=n.SelectedBodies[0],v.isEmptyValue(n.secondment.bodyLayer2)||n.secondment.bodyLayer2.RegionAndUnitId2==null||n.secondment.bodyLayer2.RegionAndUnitId2==""||(n.ThirdLevelBody(),n.secondment.bodyLayer3=n.SelectedBodies[0],n.secondment.bodyLayer3.Description3=="Άλλο Τμήμα - Υπηρεσία"?(n.secondment.details=n.SelectedBodies[0].Details,n.details=!0):n.details=!1)):(n.secondment.bodyLayer1=n.SelectedBodies[0],n.secondment.bodyLayer2=n.SelectedBodies[0],n.SelectedAvailBodyItems=t,n.SelectedBodyListItems=t,n.SecondLevelBody(),n.IEKForPrefecture())},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.getOfficialPlacementUnits=function(){var t;t=n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"?n.secondment.OfficialRegionAndUnitId:n.person.OfficialRegionAndUnit.Id;params={OfficialUnitAndRegionId:t,userLevel:n.authentication.levelId};v.getByAll("/api/RegionAndUnit/getRegionAndUnitForPlacement").then(function(t){n.OfficialPlacementUnits=t;n.changedRegionAndUnit()},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.getPostingTranferAreas=function(){v.getByParams({id:n.secondment.OfficialRegionAndUnitId},"/api/RegionAndUnit/getPostingTransferAreaByRegionAndUnitId").then(function(t){n.PostingTranferAreas=t},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.changedRegionAndUnit=function(){n.checkForPostingTransferArea();n.getPostingTranferAreas()};n.changeLevel=function(){d();g()};n.checkForPostingTransferArea=function(){n.myfilter=u("filter")(n.OfficialPlacementUnits,{Id:n.secondment.OfficialRegionAndUnitId},!0)[0];n.myfilter.RegionAndUnitTypeId==8?(n.showPostingTransferArea=!0,n.showLevel=!1,n.secondment.LevelId=n.myfilter.LevelId,d(),g()):(v.getByAll("/api/Dbo/getLevelsAsync").then(function(t){n.levels=t;n.showLevel=!0},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία φόρτωσης βαθμίδων επιλογής")}),n.showPostingTransferArea=!1,n.secondment.PostingTransferAreaId=null)};n.SecondLevelBody=function(){n.secondment.bodyLayer1&&c.getSecondLevelBody(n.secondment.bodyLayer1.RegionAndUnitId1,n.applicationType).then(function(t){n.secondLevelBody=t;n.secondRegionType2=n.secondLevelBody[0].RegionType2},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.ThirdLevelBody=function(){c.getThirdLevelBody(n.secondment.bodyLayer1.RegionAndUnitId1,n.secondment.bodyLayer2.RegionAndUnitId2,n.applicationType).then(function(t){n.thirdLevelBody=t;v.isEmpty(n.thirdLevelBody)||(n.thirdRegionType3=n.thirdLevelBody[0].RegionType3)},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.IEKForPrefecture=function(){c.getPefugeeStructureForPrefecture(n.secondment.bodyLayer2.RegionAndUnitId2).then(function(t){n.AvailableBodyListItems=t;n.removeDuplicatesBodyForDualList()},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα ","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.setRegion1=function(){n.secondLevelBody=[];n.thirdLevelBody=[];n.secondment.details="";n.SelectedBodyListItems=[];n.AvailableBodyListItems=[];n.SelectedSelectedBodyListItems=[];n.SelectedAvailBodyItems=[];n.secondment.bodyLayer2=null;n.secondment.bodyLayer3=null;n.SecondLevelBody();n.secondment.bodyLayer1!=null&&(n.secondment.bodyLayer1.Description1!="Δομές Υποδοχής για την Εκπαίδευση των Προσφύγων (ΔΥΕΠ)"&&(n.SelectedBodyListItems[0]=n.secondment.bodyLayer1),n.details=n.secondment.bodyLayer1.Description1=="Άλλος Φορέας"?!0:!1)};n.setRegion2=function(){n.secondment.details="";n.secondment.bodyLayer2!=null&&(n.secondment.bodyLayer2.Description1!="Δομές Υποδοχής για την Εκπαίδευση των Προσφύγων (ΔΥΕΠ)"&&(n.ThirdLevelBody(),n.SelectedBodyListItems[0]=n.secondment.bodyLayer2),n.secondment.bodyLayer2.Description1=="Δομές Υποδοχής για την Εκπαίδευση των Προσφύγων (ΔΥΕΠ)"&&(n.SelectedBodyListItems=[],n.SelectedSelectedBodyListItems=[],n.IEKForPrefecture()))};n.setRegion3=function(){n.secondment.bodyLayer3!=null&&(n.secondment.bodyLayer3.Description1!="Δομές Υποδοχής για την Εκπαίδευση των Προσφύγων (ΔΥΕΠ)"&&n.secondment.bodyLayer3.Description1!="Άλλο Τμήμα - Υπηρεσία"&&(n.SelectedBodyListItems[0]=n.secondment.bodyLayer3),n.secondment.bodyLayer3.Description3=="Άλλο Τμήμα - Υπηρεσία"?n.details=!0:(n.details=!1,n.secondment.details=""))};n.hasregions2=function(){return n.secondLevelBody[0]!=null&&n.secondLevelBody!="undefined"?n.secondLevelBody[0].RegionAndUnitId2!=null?!0:!1:!1};n.hasregions3=function(){return n.thirdLevelBody[0]!=null&&n.thirdLevelBody!="undefined"?n.thirdLevelBody[0].RegionAndUnitId3!=null?!0:!1:!1};n.hasIEK=function(){if(n.secondment.bodyLayer2!=null&&n.secondment.bodyLayer2!="undefined")return n.secondment.bodyLayer2.Description1=="Δομές Υποδοχής για την Εκπαίδευση των Προσφύγων (ΔΥΕΠ)"?!0:!1};n.InsOrUpd=function(t){var r={SecondmentBodySep:n.secondment,BodyRegionAndUnit:n.SelectedBodyListItems,secDetails:n.secondment.details,Status:t,SecondmentSepDocument:n.secondmentDocument,Role:n.authentication.role,UnitName:n.authentication.unitName},i=r;n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"?l.updateSecondmentBody(i).then(function(){f.setPersonId(n.secondment.PersonId);v.isValueInArray(n.pageRules.secBodySep.CanAccess,"u1, u2")?e.go("history"):e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)}):l.insertSecondmentBody(i).then(function(){f.setPersonId(n.secondment.PersonId);v.isValueInArray(n.pageRules.secBodySep.CanAccess,"u1, u2")?e.go("history"):e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)})};n.saveAction=function(r){if(n.showAlertRegions=n.secondment.bodyLayer2&&n.secondment.bodyLayer2.Description1=="Σχολείο Ευρωπαϊκής Παιδείας"&&v.isEmpty(n.SelectedBodyListItems)?!0:!1,v.isEmptyValue(n.SendDataForCVDto.Id)&&v.isValueInArray(n.pageRules.secBodySep.CanAccess,"u1, u2")?(n.showAlertForUploadCV=!0,w.hash("showAlertRequiredCV"),b()):n.showAlertForUploadCV=!1,v.isEmpty(n.secondment.bodyLayer1)||n.secondment.bodyLayer1.Description1=="Διεύθυνση Εκπαίδευσης"||n.secondment.bodyLayer1.Description1=="Σχολείο φορέα"||(n.secondment.levelId=3),$("#SecondmentBody").valid()&&!n.showAlertRegions&&!n.showAlertForUploadCV)if(r=="final"){var u=t.open({templateUrl:"ModalContent.html",controller:OpenModalController});u.result.then(function(t){t&&n.InsOrUpd(r)},function(){i.info("Modal dismissed at: "+new Date)})}else n.InsOrUpd(r)};n.removeDuplicatesBodyForDualList=function(){angular.forEach(n.SelectedAvailBodyItems,function(t){for(var i=n.AvailableBodyListItems.length-1;i>=0;i--)n.AvailableBodyListItems[i].Id==t.Id&&n.AvailableBodyListItems.splice(i,1)})};n.btnBodyUp=function(){for(var t,r,u,f=n.SelectedSelectedBodyListItems,i=0;i<n.SelectedSelectedBodyListItems.length;i++){if(t=n.SelectedBodyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedBodyListItems[i].Id),t<=0||t>=n.SelectedBodyListItems.length)return;r=n.SelectedBodyListItems[t];u=n.SelectedBodyListItems[t-1];n.SelectedBodyListItems[t-1]=r;n.SelectedBodyListItems[t]=u}};n.btnBodyDown=function(){for(var t,r,u,i=n.SelectedSelectedBodyListItems.length-1;i>=0;i--){if(t=n.SelectedBodyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedBodyListItems[i].Id),t<0||t>=n.SelectedBodyListItems.length-1)return;r=n.SelectedBodyListItems[t];u=n.SelectedBodyListItems[t+1];n.SelectedBodyListItems[t+1]=r;n.SelectedBodyListItems[t]=u}};n.btnBodyRight=function(){angular.forEach(n.SelectedAvailBodyItems,function(n){this.push(n)},n.SelectedBodyListItems);angular.forEach(n.SelectedAvailBodyItems,function(t){for(var i=n.AvailableBodyListItems.length-1;i>=0;i--)n.AvailableBodyListItems[i].Id==t.Id&&n.AvailableBodyListItems.splice(i,1)});n.SelectedAvailBodyItems=[];n.SelectedSelectedBodyListItems=[]};n.checkRegions=function(){var t=3;n.canInsertRegions=!0;n.SelectedBodyListItems.length+n.SelectedAvailBodyItems.length>t&&(o.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών","Δεν μπορείτε να επιλέξετε περισσότερες από "+t+" περιοχές"),n.canInsertRegions=!1)};n.btnBodyLeft=function(){angular.forEach(n.SelectedSelectedBodyListItems,function(n){this.push(n)},n.AvailableBodyListItems);angular.forEach(n.SelectedSelectedBodyListItems,function(t){for(var i=n.SelectedBodyListItems.length-1;i>=0;i--)n.SelectedBodyListItems[i].Id==t.Id&&n.SelectedBodyListItems.splice(i,1)});n.SelectedSelectedBodyListItems=[];n.SelectedAvailBodyItems=[]};n.onFileSelect=function(t){var r,i;for(n.messages={completed:"",percentage:"0",error:""},n.showAlertForUploadCV=!1,r=0;r<t.length;r++){if(i=t[r],i.type!="application/pdf"){n.messages.error='Μη έγκυρη επέκταση αρχείου "'+i.name+'". Οι επεκτάσεις που υποστηρίζονται είναι: "<b>pdf<\/b>" .';return}if(i.size>=10485760){n.messages.error='Το αρχείο "'+i.name+'" (<b>'+Math.round(i.size/1024)+" KB<\/b>) υπερβαίνει το μέγιστο επιτρεπόμενο μέγεθος μεταφόρτωσης <b>10000 KB<\/b>.";return}(function(t){n.upload[t]=p.upload({url:"/api/files/uploadSep",method:"POST",data:{SendDataForCVDto:n.SendDataForCVDto},file:i}).progress(function(t){n.messages.percentage=parseInt(100*t.loaded/t.total)}).then(function(t){n.messages.completed="Το αρχείο <b>"+i.name+"<\/b> μεταφορτώθηκε με επιτυχία.";n.SendDataForCVDto.Id=t.data.secBodySepCV.Id;n.SendDataForCVFullDto=t.data.secBodySepCV;n.uploadedFileDetails=t.data.Message}).catch(function(t){n.messages.error=t.data.Message})})(r)}};n.abortUpload=function(t){n.upload[t].abort()};n.downloadFile=function(){v.getByParamsDownload({PersonId:n.secondment.PersonId,Path:n.SendDataForCVFullDto.DirectPdfLink,ContentType:n.SendDataForCVFullDto.ContentType},"api/files/download").then(function(t){var p=t.status,s=t.headers,h=t.data,y="application/octet-stream",r=!1,f,c,l,e,u,v,i,o;s=s();f=n.SendDataForCVFullDto.FileName||"download.pdf";c=s["content-type"]||y;try{if(console.log("Trying saveBlob method ..."),i=new Blob([h],{type:c}),navigator.msSaveBlob)navigator.msSaveBlob(i,f);else{if(l=navigator.webkitSaveBlob||navigator.mozSaveBlob||navigator.saveBlob,l===undefined)throw"Not supported";l(i,f)}console.log("saveBlob succeeded");r=!0}catch(a){console.log("saveBlob method failed with the following exception:");console.log(a)}if(!r&&(e=window.URL||window.webkitURL||window.mozURL||window.msURL,e)){if(u=document.createElement("a"),"download"in u)try{console.log("Trying download link method with simulated click ...");i=new Blob([h],{type:c});o=e.createObjectURL(i);u.setAttribute("href",o);u.setAttribute("download",f);v=document.createEvent("MouseEvents");v.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null);u.dispatchEvent(v);console.log("Download link method with simulated click succeeded");r=!0}catch(a){console.log("Download link method with simulated click failed with the following exception:");console.log(a)}if(!r)try{console.log("Trying download link method with window.location ...");i=new Blob([h],{type:y});o=e.createObjectURL(i);window.location=o;console.log("Download link method with window.location succeeded");r=!0}catch(a){console.log("Download link method with window.location failed with the following exception:");console.log(a)}}r||(console.log("No methods worked for saving the arraybuffer, using last resort window.open"),window.open(httpPath,"_blank",""))},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση του αρχείου")})}};SecondmentBodySepController.$inject=["$scope","$uibModal","$log","$q","$filter","PassParameters","$state","toaster","PersonFactory","PersonSpecialityFactory","ApplicationTypeRegionAndUnitFactory","SecondmentBodySepFactory","ApplicationTypeFekFactory","GeneralFactory","$timeout","$upload","$location","$anchorScroll"];SecondmentBodyTechnicalController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b){function d(){v.getByParams({level:n.secondment.LevelId},"/api/RegionAndUnit/getPyspdeByLevel").then(function(t){n.consts.pyspdeRegionAndUnit=t},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function g(){c.getPyspdeWithoutJointExaminationByLevel(n.applicationType,n.secondment.LevelId).then(function(t){n.consts.pyspde=t},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των πιθανών ασθενειών","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}if(n.secondment={IsTemporaryStored:!0},n.secondmentDocument={},n.applicationType=22,n.consts={},n.alerts=[{type:"danger",msg:"Δεν μπορείτε να υποβάλετε αίτηση. Για ήδη υποβληθείσα αίτηση μεταβείτε στο Ιστορικό Αιτήσεων."}],n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.fekDetails={ValidTo:"",ValidFrom:""},n.AvailableBodyListItems=[],n.SelectedAvailBodyItems=[],n.SelectedSelectedBodyListItems=[],n.SelectedBodyListItems=[],n.SelectedBodies=[],n.secondLevelBody=[],n.thirdLevelBody=[],n.secondment.bodyLayer1=null,n.secondment.bodyLayer2=null,n.secondment.bodyLayer3=null,n.OfficialPlacementUnits=[],n.myfilter=[],n.fek={},n.didacticYears={},n.dateForProposal="31/8/"+n.applicationDidacticYear.YearFrom,n.secondment.details="",n.protocol="",n.showProtocol=!1,n.showAlertRegions=!1,n.alertRegions=[{type:"danger",msg:"Πρέπει να δηλώσετε τουλάχιστον ένα ΙΕΚ προτίμησης."}],n.cannotUpdate=!1,n.noUpdAccess=!1,n.pageRules={},n.IsDisabled=!1,n.notActive=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.upload=[],n.messages={completed:"",percentage:"0",error:""},n.uploadedFileDetails="",n.showAlertForUploadCV=!1,n.SendDataForCVDto={Id:"",SecondmentApplicationId:"",PersonId:""},n.SendDataForCVFullDto={Id:"",SecondmentApplicationId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""},n.authentication.isAuth){var k="secBodyTechnical";v.getByParams({role:n.authentication.role,codes:k},"/api/Subsystem/NewCheckPermission").then(function(t){var i=k.split(","),e,s;for(e in i)n.pageRules[i[e]]=u("filter")(t,{Code:i[e]},!0)[0].Rules;n.secondment.Id=f.getApplicationId();f.resetApplication();n.secondment.PersonId=f.getPersonId();v.isValueInArray(n.pageRules.secBodyTechnical.CanAccess,"u1, u2")&&(n.secondment.PersonId=n.authentication.personId);n.SendDataForCVDto.SecondmentApplicationId=n.secondment.Id;n.SendDataForCVDto.PersonId=n.secondment.PersonId;v.getByParams({personId:n.secondment.PersonId},"/api/SecondmentBodyTechnicalController/GetDetailsForCV").then(function(t){t!=null&&(n.SendDataForCVFullDto=t,n.SendDataForCVDto.Id=t.Id,n.uploadedFileDetails="<h4>Έχετε μεταφορτώσει:<\/h4><ul><li>Αρχείο: "+n.SendDataForCVFullDto.FileName+" <\/li><li>Μέγεθος: "+n.SendDataForCVFullDto.FileSize+" <\/li><li>Ημερομηνία: "+u("date")(n.SendDataForCVFullDto.UploadDateTime,"dd/MM/yyyy - HH:mm:ss")+" <\/li><\/ul>")},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης επισυναπτόμενου Βιογραφικού")});s=r.all([a.isFekValidForApplicationTypeId(n.applicationType),l.canInsertApplication(n.secondment.PersonId)]);s.then(function(t){n.hasValidFek=t[0];n.fek=t[1];n.fek.Id>0?(n.canInsertAppl=!0,n.secondment.FekId=n.fek.Id):n.canInsertAppl=!1;n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"?(n.canUpdateAppl=!0,n.showAddEditForm=1):n.canInsertAppl&&n.hasValidFek?(n.canInsertAppl=!0,n.showAddEditForm=1):n.showAddEditForm=2;n.doAll();v.isEmptyValue(n.secondment.Id)&&(n.IsDisabled=!n.pageRules.secBodyTechnical.CanInsert)})},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else e.go("/");n.showAlertBlock=function(){return n.secondment.NoRemoteUnit&&n.secondment.NoEducationalExecutive&&n.secondment.NoTenure&&n.secondment.NoTenureModelExpSchool?!1:!0};n.editPerson=function(){f.setPersonId(n.secondment.PersonId);e.go("stateEditPerson")};Date.prototype.withoutTime=function(){var n=new Date(this);return n.setHours(0,0,0,0,0),n};n.doAll=function(){if(n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"){var t=r.all([v.getByParams({id:n.secondment.PersonId},"/api/Person/GetSecondmentPersonDto"),l.getSecondmentBodyById(n.secondment.Id)]);t.then(function(t){n.person=t[0];n.secondment=t[1];n.secondment.SpecialityId=n.person.Speciality.Id;n.OfficialLevelId=n.person.OfficialRegionAndUnit.LevelId;v.isEmpty(n.secondment.SecondmentBodyTechnicalProtocol)||(n.protocol=n.secondment.SecondmentBodyTechnicalProtocol[0].ProtocolString,n.showProtocol=!0);n.paramsForCheckUpd.personId=n.secondment.PersonId;n.paramsForCheckUpd.levelUser=n.authentication.levelId;n.paramsForCheckUpd.regionAndUnitId=n.authentication.regionAndUnitId;n.paramsForCheckUpd.userRole=n.authentication.role;n.paramsForCheckUpd.specialityId=n.secondment.SpecialityId;n.paramsForCheckUpd.applicationLevelId=n.secondment.LevelId;n.paramsForCheckUpd.applicationTypeId=n.applicationType;n.paramsForCheckUpd.IsActive=n.secondment.IsActive;n.paramsForCheckUpd.FekId=n.secondment.FekId;v.getByParams({fekId:n.secondment.FekId,specialityId:n.secondment.SpecialityId},"/api/ApplicationTypeFek/getFekDetailsByFekIdAndSpecialityId").then(function(t){n.fekDetails=t;n.fekDetails.ValidTo=new Date(n.fekDetails.ValidTo);n.fekDetails.ValidFrom=new Date(n.fekDetails.ValidFrom);n.now=(new Date).withoutTime();n.showCV=new Date(n.fekDetails.ValidFrom).withoutTime()<=n.now&&new Date(n.fekDetails.ValidTo).withoutTime()>=n.now?!0:!1;n.FirstLevelBody()},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});v.postByParams(n.paramsForCheckUpd,"/api/General/checkUpdateSecFromFEKAndUser").then(function(t){n.IsDisabled=!t;n.IsDisabled&&(n.noUpdAccess=!0);v.isValueInArray(n.pageRules.secBodyTechnical.CanAccess,"u1, u2")&&n.secondment.IsActive&&!n.secondment.IsTemporaryStored&&(n.IsDisabled=!0,n.cannotUpdate=!0);n.secondment.IsActive||(n.IsDisabled=!0,n.notActive=!0);v.isValueInArray(n.pageRules.secBodyTechnical.CanAccess,"d1, d2, p")&&n.secondment.OfficialRegionAndUnitId!=n.authentication.regionAndUnitId&&(n.IsDisabled=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.secBodyTechnical.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0)}).catch(function(){o.pop("error","Παρουσιάστηκε σφάλμα","Δημιουργήθηκε πρόβλημα με τα δικαιώματα σας στη σελίδα.")});n.ApplBodyById();n.getOfficialPlacementUnits();n.getComputerKnowlegdeTypes()})}else n.secondment.PersonId!=null&&n.secondment.PersonId!=""&&n.secondment.PersonId!="undefined"&&(v.getByParams({id:n.secondment.PersonId},"/api/Person/GetSecondmentPersonDto").then(function(t){n.person=t;n.secondment.SpecialityId=t.Speciality.Id;n.OfficialLevelId=t.OfficialRegionAndUnit.LevelId;n.secondment.OfficialRegionAndUnitId=t.OfficialRegionAndUnit.Id;n.secondment.OfficialPlacementUnitDescription=t.OfficialPlacementUnitDescription;n.secondment.PostingTransferAreaId=t.PostingTransferArea==null?null:t.PostingTransferArea.Id;n.secondment.NominationYear=t.NominationYear;n.getOfficialPlacementUnits();n.getComputerKnowlegdeTypes()},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),n.fekDetails.ValidTo=n.fek.ValidTo,n.fekDetails.ValidFrom=n.fek.ValidFrom,n.FirstLevelBody())};n.getComputerKnowlegdeTypes=function(){v.getByAll("/api/SecondmentMusic/computerKnowlegdeTypes").then(function(t){n.consts.computerKnowlegdeType=t},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.getApplDocuments=function(){v.getByParams({id:n.secondment.Id},"/api/SecondmentBodyTechnicalController/getApplDocumentsById").then(function(t){n.secondmentDocument=t},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.ApplBodyById=function(){l.getApplBodyById(n.secondment.Id).then(function(t){n.SelectedBodies=t;v.isEmptyValue(n.SelectedBodies)||n.SelectedBodies[0].Description1!="Γ.Γ.Δ.Β.Μ.Ν.Γ. - Δημόσια ΙΕΚ"?(n.SelectedBodyListItems[0]=n.SelectedBodies[0],n.secondment.bodyLayer1=n.SelectedBodies[0],v.isEmptyValue(n.bodyLayer1)||n.secondment.bodyLayer1.Description1!="Άλλος Φορέας"?n.details=!1:(n.secondment.details=n.SelectedBodies[0].Details,n.details=!0),n.SecondLevelBody(),n.secondment.bodyLayer2=n.SelectedBodies[0],v.isEmptyValue(n.secondment.bodyLayer2)||n.secondment.bodyLayer2.RegionAndUnitId2==null||n.secondment.bodyLayer2.RegionAndUnitId2==""||(n.ThirdLevelBody(),n.secondment.bodyLayer3=n.SelectedBodies[0],n.secondment.bodyLayer3.Description3=="Άλλο Τμήμα - Υπηρεσία"?(n.secondment.details=n.SelectedBodies[0].Details,n.details=!0):n.details=!1)):(n.secondment.bodyLayer1=n.SelectedBodies[0],n.secondment.bodyLayer2=n.SelectedBodies[0],n.SelectedAvailBodyItems=t,n.SelectedBodyListItems=t,n.SecondLevelBody(),n.IEKForPrefecture())},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.getOfficialPlacementUnits=function(){var t;t=n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"?n.secondment.OfficialRegionAndUnitId:n.person.OfficialRegionAndUnit.Id;params={OfficialUnitAndRegionId:t,userLevel:n.authentication.levelId};v.getByAll("/api/RegionAndUnit/getRegionAndUnitForPlacement").then(function(t){n.OfficialPlacementUnits=t;n.changedRegionAndUnit()},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.getPostingTranferAreas=function(){v.getByParams({id:n.secondment.OfficialRegionAndUnitId},"/api/RegionAndUnit/getPostingTransferAreaByRegionAndUnitId").then(function(t){n.PostingTranferAreas=t},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.changedRegionAndUnit=function(){n.checkForPostingTransferArea();n.getPostingTranferAreas()};n.changeLevel=function(){d();g();n.secondment.LevelId==1&&(n.secondment.IsPyspde=!0)};n.checkForPostingTransferArea=function(){n.myfilter=u("filter")(n.OfficialPlacementUnits,{Id:n.secondment.OfficialRegionAndUnitId},!0)[0];n.myfilter.RegionAndUnitTypeId==8?(n.showPostingTransferArea=!0,n.showLevel=!1,n.secondment.LevelId=n.myfilter.LevelId,n.secondment.LevelId==1&&(n.secondment.IsPyspde=!0),d(),g()):(v.getByAll("/api/Dbo/getLevelsAsync").then(function(t){n.levels=t;n.showLevel=!0},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία φόρτωσης βαθμίδων επιλογής")}),n.showPostingTransferArea=!1,n.secondment.PostingTransferAreaId=null)};n.FirstLevelBody=function(){v.getByParams({applicationType:n.applicationType},"/api/ApplicationTypeRegionAndUnit/getFirstLevelBodyWithoutActiveTime").then(function(t){n.firstLevelBody=t;n.firstRegionType1=n.firstLevelBody[0].RegionType1},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.SecondLevelBody=function(){n.secondment.bodyLayer1&&c.getSecondLevelBody(n.secondment.bodyLayer1.RegionAndUnitId1,n.applicationType).then(function(t){n.secondLevelBody=t;n.secondRegionType2=n.secondLevelBody[0].RegionType2},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.ThirdLevelBody=function(){c.getThirdLevelBody(n.secondment.bodyLayer1.RegionAndUnitId1,n.secondment.bodyLayer2.RegionAndUnitId2,n.applicationType).then(function(t){n.thirdLevelBody=t;v.isEmpty(n.thirdLevelBody)||(n.thirdRegionType3=n.thirdLevelBody[0].RegionType3)},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.IEKForPrefecture=function(){c.getIEKForPrefecture(n.secondment.bodyLayer2.RegionAndUnitId2).then(function(t){n.AvailableBodyListItems=t;n.removeDuplicatesBodyForDualList()},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα ","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.setRegion1=function(){n.secondLevelBody=[];n.thirdLevelBody=[];n.secondment.details="";n.SelectedBodyListItems=[];n.AvailableBodyListItems=[];n.SelectedSelectedBodyListItems=[];n.SelectedAvailBodyItems=[];n.secondment.bodyLayer2=null;n.secondment.bodyLayer3=null;n.SecondLevelBody();n.secondment.bodyLayer1!=null&&(n.secondment.bodyLayer1.Description1!="Γ.Γ.Δ.Β.Μ.Ν.Γ. - Δημόσια ΙΕΚ"&&(n.SelectedBodyListItems[0]=n.secondment.bodyLayer1),n.details=n.secondment.bodyLayer1.Description1=="Άλλος Φορέας"?!0:!1)};n.setRegion2=function(){n.secondment.details="";n.secondment.bodyLayer2!=null&&(n.secondment.bodyLayer2.Description1!="Γ.Γ.Δ.Β.Μ.Ν.Γ. - Δημόσια ΙΕΚ"&&(n.ThirdLevelBody(),n.SelectedBodyListItems[0]=n.secondment.bodyLayer2),n.secondment.bodyLayer2.Description1=="Γ.Γ.Δ.Β.Μ.Ν.Γ. - Δημόσια ΙΕΚ"&&(n.SelectedBodyListItems=[],n.SelectedSelectedBodyListItems=[],n.IEKForPrefecture()))};n.setRegion3=function(){n.secondment.bodyLayer3!=null&&(n.secondment.bodyLayer3.Description1!="Γ.Γ.Δ.Β.Μ.Ν.Γ. - Δημόσια ΙΕΚ"&&n.secondment.bodyLayer3.Description1!="Άλλο Τμήμα - Υπηρεσία"&&(n.SelectedBodyListItems[0]=n.secondment.bodyLayer3),n.secondment.bodyLayer3.Description3=="Άλλο Τμήμα - Υπηρεσία"?n.details=!0:(n.details=!1,n.secondment.details=""))};n.hasregions2=function(){return n.secondLevelBody[0]!=null&&n.secondLevelBody!="undefined"?n.secondLevelBody[0].RegionAndUnitId2!=null?!0:!1:!1};n.hasregions3=function(){return n.thirdLevelBody[0]!=null&&n.thirdLevelBody!="undefined"?n.thirdLevelBody[0].RegionAndUnitId3!=null?!0:!1:!1};n.hasIEK=function(){if(n.secondment.bodyLayer2!=null&&n.secondment.bodyLayer2!="undefined")return n.secondment.bodyLayer2.Description1=="Γ.Γ.Δ.Β.Μ.Ν.Γ. - Δημόσια ΙΕΚ"?!0:!1};n.InsOrUpd=function(t){var r={SecondmentBodyTechnical:n.secondment,BodyRegionAndUnit:n.SelectedBodyListItems,secDetails:n.secondment.details,Status:t,Role:n.authentication.role,UnitName:n.authentication.unitName},i=r;n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"?l.updateSecondmentBody(i).then(function(){f.setPersonId(n.secondment.PersonId);v.isValueInArray(n.pageRules.secBodyTechnical.CanAccess,"u1, u2")?e.go("history"):e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)}):l.insertSecondmentBody(i).then(function(){f.setPersonId(n.secondment.PersonId);v.isValueInArray(n.pageRules.secBodyTechnical.CanAccess,"u1, u2")?e.go("history"):e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)})};n.saveAction=function(r){if(v.isEmptyValue(n.SendDataForCVDto.Id)&&v.isValueInArray(n.pageRules.secBodyTechnical.CanAccess,"u1, u2")?(n.showAlertForUploadCV=!0,w.hash("showAlertRequiredCV"),b()):n.showAlertForUploadCV=!1,v.isEmpty(n.secondment.bodyLayer1)||n.secondment.bodyLayer1.Description1=="Διεύθυνση Εκπαίδευσης"||n.secondment.bodyLayer1.Description1=="Σχολείο φορέα"||(n.secondment.levelId=3),$("#SecondmentBodyTechnical").valid()&&!n.showAlertRegions&&!n.showAlertForUploadCV)if(r=="final"){var u=t.open({templateUrl:"ModalContent.html",controller:OpenModalController});u.result.then(function(t){t&&n.InsOrUpd(r)},function(){i.info("Modal dismissed at: "+new Date)})}else n.InsOrUpd(r)};n.removeDuplicatesBodyForDualList=function(){angular.forEach(n.SelectedAvailBodyItems,function(t){for(var i=n.AvailableBodyListItems.length-1;i>=0;i--)n.AvailableBodyListItems[i].Id==t.Id&&n.AvailableBodyListItems.splice(i,1)})};n.btnBodyUp=function(){for(var t,r,u,f=n.SelectedSelectedBodyListItems,i=0;i<n.SelectedSelectedBodyListItems.length;i++){if(t=n.SelectedBodyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedBodyListItems[i].Id),t<=0||t>=n.SelectedBodyListItems.length)return;r=n.SelectedBodyListItems[t];u=n.SelectedBodyListItems[t-1];n.SelectedBodyListItems[t-1]=r;n.SelectedBodyListItems[t]=u}};n.btnBodyDown=function(){for(var t,r,u,i=n.SelectedSelectedBodyListItems.length-1;i>=0;i--){if(t=n.SelectedBodyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedBodyListItems[i].Id),t<0||t>=n.SelectedBodyListItems.length-1)return;r=n.SelectedBodyListItems[t];u=n.SelectedBodyListItems[t+1];n.SelectedBodyListItems[t+1]=r;n.SelectedBodyListItems[t]=u}};n.btnBodyRight=function(){n.checkRegions();n.canInsertRegions&&(angular.forEach(n.SelectedAvailBodyItems,function(n){this.push(n)},n.SelectedBodyListItems),angular.forEach(n.SelectedAvailBodyItems,function(t){for(var i=n.AvailableBodyListItems.length-1;i>=0;i--)n.AvailableBodyListItems[i].Id==t.Id&&n.AvailableBodyListItems.splice(i,1)}),n.SelectedAvailBodyItems=[],n.SelectedSelectedBodyListItems=[])};n.checkRegions=function(){var t=3;n.canInsertRegions=!0;n.SelectedBodyListItems.length+n.SelectedAvailBodyItems.length>t&&(o.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών","Δεν μπορείτε να επιλέξετε περισσότερες από "+t+" περιοχές"),n.canInsertRegions=!1)};n.btnBodyLeft=function(){angular.forEach(n.SelectedSelectedBodyListItems,function(n){this.push(n)},n.AvailableBodyListItems);angular.forEach(n.SelectedSelectedBodyListItems,function(t){for(var i=n.SelectedBodyListItems.length-1;i>=0;i--)n.SelectedBodyListItems[i].Id==t.Id&&n.SelectedBodyListItems.splice(i,1)});n.SelectedSelectedBodyListItems=[];n.SelectedAvailBodyItems=[]};n.onFileSelect=function(t){var r,i;for(n.messages={completed:"",percentage:"0",error:""},n.showAlertForUploadCV=!1,r=0;r<t.length;r++){if(i=t[r],i.type!="application/pdf"){n.messages.error='Μη έγκυρη επέκταση αρχείου "'+i.name+'". Οι επεκτάσεις που υποστηρίζονται είναι: "<b>pdf<\/b>" .';return}if(i.size>=10485760){n.messages.error='Το αρχείο "'+i.name+'" (<b>'+Math.round(i.size/1024)+" KB<\/b>) υπερβαίνει το μέγιστο επιτρεπόμενο μέγεθος μεταφόρτωσης <b>10000 KB<\/b>.";return}(function(t){n.upload[t]=p.upload({url:"/api/files/uploadTechnical",method:"POST",data:{SendDataForCVDto:n.SendDataForCVDto},file:i}).progress(function(t){n.messages.percentage=parseInt(100*t.loaded/t.total)}).then(function(t){n.messages.completed="Το αρχείο <b>"+i.name+"<\/b> μεταφορτώθηκε με επιτυχία.";n.SendDataForCVDto.Id=t.data.secBodyCV.Id;n.SendDataForCVFullDto=t.data.secBodyCV;n.uploadedFileDetails=t.data.Message}).catch(function(t){n.messages.error=t.data.Message})})(r)}};n.abortUpload=function(t){n.upload[t].abort()};n.downloadFile=function(){v.getByParamsDownload({PersonId:n.secondment.PersonId,Path:n.SendDataForCVFullDto.DirectPdfLink,ContentType:n.SendDataForCVFullDto.ContentType},"api/files/download").then(function(t){var p=t.status,s=t.headers,h=t.data,y="application/octet-stream",r=!1,f,c,l,e,u,v,i,o;s=s();f=n.SendDataForCVFullDto.FileName||"download.pdf";c=s["content-type"]||y;try{if(console.log("Trying saveBlob method ..."),i=new Blob([h],{type:c}),navigator.msSaveBlob)navigator.msSaveBlob(i,f);else{if(l=navigator.webkitSaveBlob||navigator.mozSaveBlob||navigator.saveBlob,l===undefined)throw"Not supported";l(i,f)}console.log("saveBlob succeeded");r=!0}catch(a){console.log("saveBlob method failed with the following exception:");console.log(a)}if(!r&&(e=window.URL||window.webkitURL||window.mozURL||window.msURL,e)){if(u=document.createElement("a"),"download"in u)try{console.log("Trying download link method with simulated click ...");i=new Blob([h],{type:c});o=e.createObjectURL(i);u.setAttribute("href",o);u.setAttribute("download",f);v=document.createEvent("MouseEvents");v.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null);u.dispatchEvent(v);console.log("Download link method with simulated click succeeded");r=!0}catch(a){console.log("Download link method with simulated click failed with the following exception:");console.log(a)}if(!r)try{console.log("Trying download link method with window.location ...");i=new Blob([h],{type:y});o=e.createObjectURL(i);window.location=o;console.log("Download link method with window.location succeeded");r=!0}catch(a){console.log("Download link method with window.location failed with the following exception:");console.log(a)}}r||(console.log("No methods worked for saving the arraybuffer, using last resort window.open"),window.open(httpPath,"_blank",""))},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση του αρχείου")})}};SecondmentBodyTechnicalController.$inject=["$scope","$uibModal","$log","$q","$filter","PassParameters","$state","toaster","PersonFactory","PersonSpecialityFactory","ApplicationTypeRegionAndUnitFactory","SecondmentBodyTechnicalFactory","ApplicationTypeFekFactory","GeneralFactory","$timeout","$upload","$location","$anchorScroll"];SecondmentChurchController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y){function k(){c.getMaritalStatusTypes().then(function(t){n.consts.maritalStatusType=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των επιλογών οικογενειακής κατάταστασης","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function d(){c.getMateProfessionTypes().then(function(t){n.consts.mateProfessionType=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των επιλογών επαγγέλματος συζύγου","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function g(){c.getHealthProblemsTypes().then(function(t){n.consts.healthProblemsType=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των στοιχείων υγείας","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function nt(){c.getParentsHealthProblemsTypes().then(function(t){n.consts.parentsHealthProblemsType=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των στοιχείων υγείας γονέων","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function tt(){c.getBrothersHealthProblemsTypes().then(function(t){n.consts.brothersHealthProblemsType=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των στοιχείων υγείας γονέων","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function w(){l.getPyspdeWithoutJointExaminationByLevel(n.applicationType,n.secondment.LevelId).then(function(t){n.consts.pyspde=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function b(){v.getByParams({level:n.secondment.LevelId},"/api/RegionAndUnit/getPyspdeByLevel").then(function(t){n.consts.pyspdeRegionJoin=t;n.consts.pyspdeRegionAndUnit=i("filter")(t,function(n){return n.Description!="Υπό Μετακίνηση"})},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}if(n.secondment={IsTemporaryStored:!0},n.secondmentDocument={},n.secondment.UnderAgedOrStudingChildren=0,n.secondment.StudingChildren=0,n.consts={},n.applicationType=17,n.secondment.IsChurch=!0,n.secondment.IsPyspde=!1,n.showLevel={},n.pyspe="ΠΥΣΠΕ",n.pysde="ΠΥΣΔΕ",n.showMusic=!1,n.protocol="",n.showProtocol=!1,n.TempOfficialRegionAndUnit={},n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.canInsUpdFromChurch=!1,n.showParentsPyspdeId=!1,n.showBrothersPyspdeId=!1,n.showLevel=!1,n.showDiseaseId=!1,n.myfilter={},n.personalStep=!0,n.maritalAndPointsCriteriaStep=!1,n.regionStep=!1,n.fek={},n.dateForProposal="",n.HealthProblemsKEPA=!1,n.PyspdeListItems=[],n.ChurchListItems=[],n.ChurchListItemsWithoutJoint=[],n.AvailableDiseaseListItems=[],n.SelectedAvailDiseaseItems=[],n.AvailablePyspdeListItems=[],n.AvailableChurchListItems=[],n.SelectedAvailPyspdeItems=[],n.SelectedSelectedPyspdeListItems=[],n.SelectedPyspdeListItems=[],n.upload=[],n.messages={completed:"",percentage:"0",error:""},n.uploadedFileDetails="",n.showAlertForUploadCV=!1,n.SendDataForCVDto={Id:"",SecondmentApplicationId:"",PersonId:""},n.SendDataForCVFullDto={Id:"",SecondmentApplicationId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""},n.IsFirstTimePyspde=!0,n.IsFirstTimeChurch=!0,n.ShowAlertMessageForMate=!1,n.disabled={MilitaryMate:!1,JudicialMate:!1,DEPMate:!1,DoctorMate:!1},n.showMateHealthProblems=!1,n.alertsMessageForMate=[{type:"danger",msg:"Συμπληρώστε Οικογενειακή Κατάσταση ΕΓΓΑΜΟΣ ή ΣΥΜΦΩΝΟ ΣΥΜΒΙΩΣΗΣ - Επάγγελμα Συζύγου Άλλο - Περιοχή Συνυπηρέτησης, εφόσον είναι σύζυγος στρατιωτικού ή δικαστικού ή μέλους ΔΕΠ."}],n.showAlertRegions=!1,n.alertRegions=[{type:"danger",msg:"Πρέπει να δηλώσετε τουλάχιστον μία επιλογή προτίμησης."}],n.showAlertChurches=!1,n.alertChurches=[{type:"danger",msg:"Πρέπει να δηλώσετε τουλάχιστον ένα Εκκλησιαστικό Σχολείο Προτίμησης."}],n.showAlertDisease=!1,n.alertDisease=[{type:"danger",msg:"Επιλέξτε ασθένεια."}],n.cannotUpdate=!1,n.notActive=!1,n.noUpdAccess=!1,n.PyspdeFormOfficial=0,n.showAlertPyspdeFormOfficial=!1,n.concatPyspde="",n.messagePyspde="",n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.authentication.isAuth){var p="secChurch";v.getByParams({role:n.authentication.role,codes:p},"/api/Subsystem/NewCheckPermission").then(function(t){var r=p.split(","),u,o;for(u in r)n.pageRules[r[u]]=i("filter")(t,{Code:r[u]},!0)[0].Rules;n.secondment.DidacticYearId=n.applicationDidacticYear.Id;n.secondment.Id=e.getApplicationId();e.resetApplication();n.secondment.PersonId=e.getPersonId();v.isValueInArray(n.pageRules.secChurch.CanAccess,"u1, u2")&&(n.secondment.PersonId=n.authentication.personId);n.SendDataForCVDto.SecondmentApplicationId=n.secondment.Id;n.SendDataForCVDto.PersonId=n.secondment.PersonId;v.getByParams({personId:n.secondment.PersonId},"/api/SecondmentChurchController/GetDetailsForFile").then(function(t){t!=null&&(n.SendDataForCVFullDto=t,n.SendDataForCVDto.Id=t.Id,n.uploadedFileDetails="<h4>Έχετε μεταφορτώσει:<\/h4><ul><li>Αρχείο: "+n.SendDataForCVFullDto.FileName+" <\/li><li>Μέγεθος: "+n.SendDataForCVFullDto.FileSize+" <\/li><li>Ημερομηνία: "+i("date")(n.SendDataForCVFullDto.UploadDateTime,"dd/MM/yyyy - HH:mm:ss")+" <\/li><\/ul>")},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης επισυναπτόμενου Βιογραφικού")});o=f.all([a.isFekValidForApplicationTypeId(n.applicationType),c.canInsertApplication(n.secondment.PersonId),v.getByParams({personId:n.secondment.PersonId},"/api/SecondmentManagment/canInsUpdFromChurch")]);o.then(function(t){n.hasValidFek=t[0];n.fek=t[1];n.canInsUpdFromChurch=t[2];n.fek.Id>0?(n.canInsertAppl=!0,n.secondment.FekId=n.fek.Id):n.canInsertAppl=!1;n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"?(n.canUpdateAppl=!0,n.showAddEditForm=1):n.canInsertAppl&&n.hasValidFek?(n.canInsertAppl=!0,n.showAddEditForm=1):n.showAddEditForm=2;n.fek.DisplayModal&&v.isEmptyValue(n.secondment.Id)?$("#alertModal").modal("show"):n.doAll();v.isEmptyValue(n.secondment.Id)&&(n.IsDisabled=!n.pageRules.secChurch.CanInsert)})},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else o.go("/");n.cancelNewApplication=function(){$("#alertModal").modal("hide");o.go("/")};n.acceptNewApplication=function(){n.secondment.MilitaryMate=!0;n.DisableOtherChks("MilitaryMate");n.disabled.MilitaryMate=!0;$("#alertModal").modal("hide");n.doAll()};n.alerts=[{type:"danger",msg:"Δεν μπορείτε να υποβάλετε αίτηση. Για ήδη υποβληθείσα αίτηση μεταβείτε στο Ιστορικό Αιτήσεων."}];n.editPerson=function(){e.setPersonId(n.secondment.PersonId);o.go("stateEditPerson")};k();d();g();nt();tt();n.showAlertBlock=function(){return n.showMusic?n.secondment.NoRemoteUnit&&n.secondment.NoEducationalExecutive&&n.secondment.NoTenure&&n.secondment.NoTenureModelExpSchool&&n.secondment.NoMusicSchool?!1:!0:n.secondment.NoRemoteUnit&&n.secondment.NoEducationalExecutive&&n.secondment.NoTenure&&n.secondment.NoTenureModelExpSchool?!1:!0};n.getOfficialPlacementUnits=function(){var t,i,r;t=n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"?n.secondment.OfficialRegionAndUnitId:n.person.OfficialRegionAndUnit.Id;params={OfficialUnitAndRegionId:t,userLevel:n.authentication.levelId};i=n.person.OfficialUnitIsSmea||n.person.OfficialUnitIsIntercultural||n.person.OfficialUnitIsArtistic||n.person.OfficialUnitIsMusic;r=f.all([v.getByParams(params,"/api/RegionAndUnit/getRegionAndUnitByLevel"),v.getByParams({OfficialRegionAndUnitId:t,specialUnit:i,applicationType:n.applicationType},"/api/RegionAndUnit/getPysdpeFromOfficialRegionAndUnitId"),]);r.then(function(t){n.OfficialPlacementUnits=t[0];n.PyspdeFormOfficial=t[1];n.changedRegionAndUnit()})};n.getPostingTranferAreas=function(){v.getByParams({id:n.secondment.OfficialRegionAndUnitId},"/api/RegionAndUnit/getPostingTransferAreaByRegionAndUnitId").then(function(t){n.PostingTranferAreas=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.changedRegionAndUnit=function(){n.checkForPostingTransferArea();n.getPostingTranferAreas()};n.changeLevel=function(){b();w();n.secondment.LevelId==1&&(n.secondment.IsPyspde=!0)};n.checkForPostingTransferArea=function(){n.myfilter=i("filter")(n.OfficialPlacementUnits,{Id:n.secondment.OfficialRegionAndUnitId},!0)[0];n.myfilter.RegionAndUnitTypeId==8?(n.showPostingTransferArea=!0,n.showLevel=!1,n.secondment.LevelId=n.myfilter.LevelId,n.secondment.LevelId==1&&(n.secondment.IsPyspde=!0),b(),w()):(v.getByAll("/api/Dbo/getLevelsAsync").then(function(t){n.levels=t;n.showLevel=!0;n.changeLevel()},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία φόρτωσης βαθμίδων επιλογής")}),n.showPostingTransferArea=!1,n.secondment.PostingTransferAreaId=null)};n.getDateForProposal=function(){n.dateForProposal="31/8/"+n.applicationDidacticYear.YearFrom};n.checkForShowAlertMessageForMate=function(){n.ShowAlertMessageForMate=n.secondment.MilitaryMate||n.secondment.JudicialMate||n.secondment.DEPMate||n.secondment.DoctorMate?n.secondment.MateProfession==2&&(n.secondment.MaritalStatus==1||n.secondment.MaritalStatus==6)&&n.secondment.JointServiceId>0?!1:!0:!1};n.DisableOtherChks=function(t){n.ShowAlertMessageForMate=!1;switch(t){case"MilitaryMate":n.secondment.MilitaryMate?(n.disabled={MilitaryMate:!1,JudicialMate:!0,DEPMate:!0,DoctorMate:!0},n.JudicialMate=!1,n.DEPMate=!1,n.DoctorMate=!1,n.checkForShowAlertMessageForMate()):n.disabled={MilitaryMate:!1,JudicialMate:!1,DEPMate:!1,DoctorMate:!1};break;case"JudicialMate":n.secondment.JudicialMate?(n.disabled={MilitaryMate:!0,JudicialMate:!1,DEPMate:!0,DoctorMate:!0},n.checkForShowAlertMessageForMate()):n.disabled={MilitaryMate:!1,JudicialMate:!1,DEPMate:!1,DoctorMate:!1};break;case"DEPMate":n.secondment.DEPMate?(n.disabled={MilitaryMate:!0,JudicialMate:!0,DEPMate:!1,DoctorMate:!0},n.checkForShowAlertMessageForMate()):n.disabled={MilitaryMate:!1,JudicialMate:!1,DEPMate:!1,DoctorMate:!1};break;case"DoctorMate":n.secondment.DoctorMate?(n.disabled={MilitaryMate:!0,JudicialMate:!0,DEPMate:!0,DoctorMate:!1},n.checkForShowAlertMessageForMate()):n.disabled={MilitaryMate:!1,JudicialMate:!1,DEPMate:!1,DoctorMate:!1}}};n.changeMaritalStatus=function(){n.secondment.MaritalStatus==1||n.secondment.MaritalStatus==6?(n.secondment.MateProfession=0,n.secondment.JointExamination=!1,n.secondment.MateProtocolNumber=null,n.secondment.MateRegistryNo=null,n.secondment.JointServiceId=null,n.secondment.OtherMateProfession=null,n.secondment.ChildCustody=!1,n.showMateHealthProblems=!0):n.secondment.MaritalStatus==3||n.secondment.MaritalStatus==4?(n.secondment.MateProfession=0,n.secondment.JointExamination=null,n.secondment.MateProtocolNumber=null,n.secondment.MateRegistryNo=null,n.secondment.JointServiceId=null,n.secondment.OtherMateProfession=null,n.showMateHealthProblems=!1,n.secondment.MateHealthProblems=null,n.secondment.MateDiseaseDetails=null,n.secondment.MateHealthProblemsKEPA=!1,n.secondment.ChildCustody=!1,n.secondment.JointExamination=!1):n.secondment.MaritalStatus==2||n.secondment.MaritalStatus==5?(n.secondment.MateProfession=0,n.secondment.JointExamination=!1,n.secondment.MateProtocolNumber=null,n.secondment.MateRegistryNo=null,n.secondment.JointServiceId=null,n.secondment.OtherMateProfession=null,n.secondment.ChildCustody=!1,n.showMateHealthProblems=!1,n.secondment.MateHealthProblems=null,n.secondment.MateDiseaseDetails=null,n.secondment.MateHealthProblemsKEPA=!1,n.secondment.JointExamination=!1):(n.secondment.MateProfession=0,n.secondment.JointExamination=!1,n.secondment.MateProtocolNumber=null,n.secondment.MateRegistryNo=null,n.secondment.JointServiceId=null,n.secondment.OtherMateProfession=null,n.secondment.ChildCustody=!1,n.showMateHealthProblems=!1,n.secondment.MateHealthProblems=null,n.secondment.MateDiseaseDetails=null,n.secondment.MateHealthProblemsKEPA=!1,n.secondment.JointExamination=!1);n.checkForShowAlertMessageForMate()};n.changeUnderAgedOrStudingChildren=function(){n.secondment.UnderAgedOrStudingChildren==0&&n.secondment.StudingChildren==0&&(n.secondment.ChildCustody=!1);n.showChildCustody()};n.changeJointServiceId=function(){n.checkForShowAlertMessageForMate()};n.showMateProfession=function(){return n.secondment.MaritalStatus==1||n.secondment.MaritalStatus==6?!0:!1};n.clickLocality=function(){n.secondment.Locality==!1&&(n.secondment.LocalityPyspdeId=null);n.secondment.LocalityMunicipalityId=null};n.clickJointExamination=function(){n.secondment.JointExamination==!1&&(n.secondment.MateRegistryNo=null)};n.clickPostGraduateStudies=function(){n.secondment.PostGraduateStudies==!1&&(n.secondment.StudiesPyspdeId=null)};n.clickHasDisease=function(){if(n.secondment.HasDisease){if(v.isEmpty(n.secondment.Id))v.isEmpty(n.SelectedDiseaseListItems)&&v.getByAll("/api/SecondmentChurchController/getDiseases").then(function(t){n.AvailableDiseaseListItems=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία φόρτωσης ασθενειών")});else if(n.secondment.HasDisease&&v.isEmpty(n.SelectedDiseaseListItems)){var t=f.all([v.getByAll("/api/SecondmentChurchController/getDiseases"),v.getByParams({applicationId:n.secondment.Id},"/api/SecondmentChurchController/getSecondmentDiseaseById"),]);t.then(function(t){angular.copy(t[0],n.AvailableDiseaseListItems);n.SelectedDiseaseListItems=t[1];n.SelectedAvailDiseaseItems=t[1];n.removeDuplicatesDiseaseForDualList()})}}else n.SelectedAvailDiseaseItems=[],n.SelectedSelectedDiseaseListItems=[],n.SelectedDiseaseListItems=[]};n.showMateProtocolNumber=function(){return n.secondment.MateProfession==1&&(n.secondment.MaritalStatus==1||n.secondment.MaritalStatus==6)?!0:!1};n.showJointServiceId=function(){return n.secondment.MateProfession>0&&(n.secondment.MaritalStatus==1||n.secondment.MaritalStatus==6)?!0:!1};n.showMateRegistryNo=function(){return n.secondment.MateProfession==1&&(n.secondment.MaritalStatus==1||n.secondment.MaritalStatus==6)&&n.secondment.JointExamination?!0:!1};n.showChildCustody=function(){return(n.secondment.MaritalStatus==3||n.secondment.MaritalStatus==4)&&(n.secondment.UnderAgedOrStudingChildren>0||n.secondment.StudingChildren>0)?!0:!1};n.showUnderAgedOrStudingChildren=function(){return n.secondment.MaritalStatus==2||n.secondment.MaritalStatus==5?!0:!1};n.showJointExamination=function(){return n.secondment.MateProfession==1&&(n.secondment.MaritalStatus==1||n.secondment.MaritalStatus==6)?!0:!1};n.showOtherMateProfession=function(){return n.secondment.MateProfession==2&&(n.secondment.MaritalStatus==1||n.secondment.MaritalStatus==6)?!0:!1};n.showParentsPyspde=function(){return n.secondment.ParentsHealthProblems>0?!0:!1};n.showBrothersPyspde=function(){return n.secondment.BrothersHealthProblems>0?!0:!1};n.showDisease=function(){return n.secondment.SpecialCategoryId==2?!0:!1};n.changeMateProfession=function(){n.secondment.MateProfession==2?(n.secondment.MateProtocolNumber=null,n.secondment.MateRegistryNo=null,n.secondment.JointExamination=!1):n.secondment.MateProfession==1?n.secondment.OtherMateProfession=null:(n.secondment.MateProtocolNumber=null,n.secondment.MateRegistryNo=null,n.secondment.JointExamination=!1,n.secondment.JointServiceId=null,n.secondment.OtherMateProfession=null);n.checkForShowAlertMessageForMate()};n.changeParentsHealthProblems=function(){n.secondment.ParentsHealthProblems==null&&(n.secondment.ParentsPyspdeId=null)};n.changeBrothersHealthProblems=function(){n.secondment.BrothersHealthProblems==null&&(n.secondment.BrothersPyspdeId=null)};n.changeBrothersHealthProblems=function(){n.secondment.BrothersHealthProblems==null&&(n.secondment.BrothersPyspdeId=null)};n.changeSpecialCategoryId=function(){n.secondment.SpecialCategoryId!=4&&(n.secondment.DiseaseDetails=null,n.secondment.DiseaseId=null)};n.changeDiseaseId=function(){n.secondment.DiseaseId!=18&&(n.secondment.DiseaseDetails=null)};n.checkSelectedFromOfficial=function(){if(!v.isEmpty(n.SelectedPyspdeListItems)&&n.PyspdeFormOfficial>0){var t=n.myfilter=i("filter")(n.SelectedPyspdeListItems,{RegionAndUnitId:n.PyspdeFormOfficial},!0);t.length>0?(n.showAlertPyspdeFormOfficial=!0,t.length==1?(n.concatPyspde=t[0].DescriptionConc,n.messagePyspde="Δεν επιτρέπεται η επιλογή "+n.concatPyspde+", καθώς ταυτίζεται με τη Δ/νση Οργανικής σας"):(n.concatPyspde=t[0].DescriptionConc+","+t[1].DescriptionConc,n.messagePyspde="Δεν επιτρέπονται οι επιλογές "+n.concatPyspde+" καθώς ταυτίζονται με τη Δ/νση Οργανικής σας.")):(n.showAlertPyspdeFormOfficial=!1,n.concatPyspde="")}else n.showAlertPyspdeFormOfficial=!1,n.concatPyspde=""};n.goToMaritalAndPointsCriteria=function(){u.scrollTo(0,0);$("#SecondmentChurchStep1").valid()&&(n.personalStep=!1,n.maritalAndPointsCriteriaStep=!0,n.regionStep=!1,v.isEmpty(n.secondment.Id)||n.clickHasDisease())};n.removeDuplicatesChurchForDualList=function(){var t=[];angular.forEach(n.SelectedAvailChurchItems,function(i){for(var r=n.AvailableChurchListItems.length-1;r>=0;r--)n.AvailableChurchListItems[r].Id==i.Id&&n.AvailableChurchListItems.splice(r,1);n.secondment.JointExamination==!1&&i.JointExamination==!0&&t.push(i.Id)});t.length>0&&angular.forEach(t,function(t){for(var i=n.SelectedAvailChurchItems.length-1;i>=0;i--)n.SelectedAvailChurchItems[i].Id==t&&n.SelectedAvailChurchItems.splice(i,1)});n.SelectedAvailChurchItems=[];n.SelectedSelectedChurchListItems=[]};n.removeDuplicatesDiseaseForDualList=function(){angular.forEach(n.SelectedAvailDiseaseItems,function(t){for(var i=n.AvailableDiseaseListItems.length-1;i>=0;i--)n.AvailableDiseaseListItems[i].Id==t.Id&&n.AvailableDiseaseListItems.splice(i,1)});n.SelectedAvailDiseaseItems=[];n.SelectedSelectedDiseaseListItems=[]};n.removeDuplicatesChurchForDualListForInsert=function(){var t=[];angular.forEach(n.SelectedChurchListItems,function(i){n.secondment.JointExamination==!1&&i.JointExamination==!0&&t.push(i.Id)});angular.forEach(t,function(t){for(var i=n.SelectedChurchListItems.length-1;i>=0;i--)n.SelectedChurchListItems[i].Id==t&&n.SelectedChurchListItems.splice(i,1)});angular.copy(n.SelectedChurchListItems,n.SelectedAvailChurchItems);n.removeDuplicatesChurchForDualList()};n.goToRegions=function(){var t;n.showAlertDisease=n.secondment.HasDisease&&v.isEmpty(n.SelectedDiseaseListItems)?!0:!1;!$("#SecondmentChurchStep2").valid()||n.ShowAlertMessageForMate||n.showAlertDisease||(n.personalStep=!1,n.maritalAndPointsCriteriaStep=!1,n.regionStep=!0,u.scrollTo(0,0),n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"?((n.secondmentDocument.Id==null||n.secondmentDocument.Id==""||n.secondmentDocument.Id=="undefined")&&v.getByParams({id:n.secondment.Id},"/api/SecondmentChurchController/getApplDocumentsById").then(function(t){n.secondmentDocument=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),n.secondment.JointExamination?n.IsFirstTimeChurch?(t=f.all([l.getChurchJointExaminationBySex(n.applicationType,n.person.Sex),c.getApplChurchById(n.secondment.Id)]),t.then(function(t){n.SelectedChurchListItems=t[1];n.SelectedAvailChurchItems=t[1];n.ChurchListItems=t[0];angular.copy(n.ChurchListItems,n.AvailableChurchListItems);n.removeDuplicatesChurchForDualList();n.IsFirstTimeChurch=!1},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})):v.isEmpty(n.ChurchListItems)?l.getChurchJointExaminationBySex(n.applicationType,n.person.Sex).then(function(t){n.ChurchListItems=t;angular.copy(n.ChurchListItems,n.AvailableChurchListItems);angular.copy(n.SelectedChurchListItems,n.SelectedAvailChurchItems);n.removeDuplicatesChurchForDualListForInsert()},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των πιθανών ασθενειών","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.SelectedAvailChurchItems=[],angular.copy(n.ChurchListItems,n.AvailableChurchListItems),angular.copy(n.SelectedChurchListItems,n.SelectedAvailChurchItems),n.removeDuplicatesChurchForDualListForInsert()):n.IsFirstTimeChurch?(t=f.all([l.getChurchWithoutJointExaminationBySex(n.applicationType,n.person.Sex),c.getApplChurchById(n.secondment.Id)]),t.then(function(t){n.SelectedChurchListItems=t[1];n.SelectedAvailChurchItems=t[1];n.ChurchListItemsWithoutJoint=t[0];angular.copy(n.ChurchListItemsWithoutJoint,n.AvailableChurchListItems);n.removeDuplicatesChurchForDualList();n.IsFirstTimeChurch=!1},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})):v.isEmpty(n.ChurchListItemsWithoutJoint)?l.getChurchWithoutJointExaminationBySex(n.applicationType,n.person.Sex).then(function(t){n.ChurchListItemsWithoutJoint=t;angular.copy(n.ChurchListItemsWithoutJoint,n.AvailableChurchListItems);angular.copy(n.SelectedChurchListItems,n.SelectedAvailChurchItems);n.removeDuplicatesChurchForDualListForInsert()},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των πιθανών ασθενειών","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.SelectedAvailChurchItems=[],angular.copy(n.SelectedChurchListItems,n.SelectedAvailChurchItems),angular.copy(n.ChurchListItemsWithoutJoint,n.AvailableChurchListItems),n.removeDuplicatesChurchForDualListForInsert())):(n.secondment.JointExamination?v.isEmpty(n.ChurchListItems)?l.getChurchJointExaminationBySex(n.applicationType,n.person.Sex).then(function(t){n.ChurchListItems=t;angular.copy(n.ChurchListItems,n.AvailableChurchListItems)},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των επιλογών για τα εκκλησιαστικά σχολεία","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):angular.copy(n.ChurchListItems,n.AvailableChurchListItems):v.isEmpty(n.ChurchListItemsWithoutJoint)?l.getChurchWithoutJointExaminationBySex(n.applicationType,n.person.Sex).then(function(t){n.ChurchListItemsWithoutJoint=t;angular.copy(n.ChurchListItemsWithoutJoint,n.AvailableChurchListItems)},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Αδύνατη φορτωση των επιλογών για τα Εκκλησιαστικά σχολεία.")}):angular.copy(n.ChurchListItemsWithoutJoint,n.AvailableChurchListItems),n.removeDuplicatesChurchForDualListForInsert()))};n.goToPersonal=function(){n.personalStep=!0;n.maritalAndPointsCriteriaStep=!1;n.regionStep=!1;u.scrollTo(0,0)};n.InsOrUpd=function(t){var r={Pyspde:n.SelectedPyspdeListItems,SecondmentChurch:n.secondment,Church:n.SelectedChurchListItems,Status:t,SecondmentDocument:n.secondmentDocument,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Disease:n.SelectedDiseaseListItems},i=r;n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"?c.updateSecondmentChurch(i).then(function(){e.setPersonId(n.secondment.PersonId);v.isValueInArray(n.pageRules.secChurch.CanAccess,"u1, u2")?o.go("history"):o.go("history")}).catch(function(n){s.pop("error","Παρουσιάστηκε σφάλμα",n.data)}):c.insertSecondmentChurch(i).then(function(){e.setPersonId(n.secondment.PersonId);v.isValueInArray(n.pageRules.secChurch.CanAccess,"u1, u2")?o.go("history"):o.go("history")}).catch(function(n){s.pop("error","Παρουσιάστηκε σφάλμα",n.data)})};n.saveAction=function(i){if(n.showAlertForUploadCV=!1,n.showAlertChurches=n.secondment.IsChurch&&v.isEmpty(n.SelectedChurchListItems)?!0:!1,$("#SecondmentChurchStep3").valid()&&!n.showAlertChurches&&!n.showAlertPyspdeFormOfficial)if(i=="final"){var u=t.open({templateUrl:"ModalContent.html",controller:OpenModalController});u.result.then(function(t){t&&n.InsOrUpd(i)},function(){r.info("Modal dismissed at: "+new Date)})}else n.InsOrUpd(i)};n.getMunicipalityByPyspde=function(){v.getByParams({pyspdeId:n.secondment.LocalityPyspdeId},"/api/RegionAndUnit/getMunicipalityByPyspde").then(function(t){n.consts.pyspdeMunicipality=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})};n.checkForMusic=function(t){t.lastIndexOf("ΠΕ79",0)===0||t.lastIndexOf("ΤΕ16",0)===0?n.showMusic=!0:(n.showMusic=!1,n.secondment.NoMusicSchool=!1)};n.doAll=function(){if(n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"){if(n.canUpdateAppl){n.AvailablePyspdeListItems=[];var t=f.all([v.getByParams({id:n.secondment.PersonId},"/api/Person/GetSecondmentPersonDto"),c.getSecondmentChurchById(n.secondment.Id)]);t.then(function(t){n.person=t[0];n.getDateForProposal();n.checkForMusic(t[0].Speciality.Code);n.secondment=t[1];n.secondment.SpecialityId=t[0].Speciality.Id;n.getMunicipalityByPyspde();n.paramsForCheckUpd.personId=n.secondment.PersonId;n.paramsForCheckUpd.levelUser=n.authentication.levelId;n.paramsForCheckUpd.regionAndUnitId=n.authentication.regionAndUnitId;n.paramsForCheckUpd.userRole=n.authentication.role;n.paramsForCheckUpd.specialityId=n.secondment.SpecialityId;n.paramsForCheckUpd.applicationLevelId=n.secondment.LevelId;n.paramsForCheckUpd.applicationTypeId=n.applicationType;n.paramsForCheckUpd.IsActive=n.secondment.IsActive;n.paramsForCheckUpd.FekId=n.secondment.FekId;v.postByParams(n.paramsForCheckUpd,"/api/General/checkUpdateSecFromFEKAndUser").then(function(i){n.IsDisabled=!i;n.IsDisabled&&(n.noUpdAccess=!0);v.isValueInArray(n.pageRules.secChurch.CanAccess,"u1, u2")&&n.secondment.IsActive&&!n.secondment.IsTemporaryStored&&(n.IsDisabled=!0,n.cannotUpdate=!0);n.secondment.IsActive||(n.IsDisabled=!0,n.notActive=!0);v.isValueInArray(n.pageRules.secChurch.CanAccess,"d1, d2, p")&&n.secondment.OfficialRegionAndUnitId!=n.authentication.regionAndUnitId&&(n.IsDisabled=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.secChurch.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0);n.oldRegistry=n.secondment.MateRegistryNo;v.isEmpty(n.secondment.SecondmentChurchProtocols)||(n.protocol=n.secondment.SecondmentChurchProtocols[0].ProtocolString,n.showProtocol=!0);n.secondment.MaritalStatus==1||n.secondment.MaritalStatus==6?n.showMateHealthProblems=!0:(n.showMateHealthProblems=!1,n.secondment.MateHealthProblems=null,n.secondment.MateDiseaseDetails=null,n.secondment.MateHealthProblemsKEPA=!1);n.secondment.MilitaryMate?n.DisableOtherChks("MilitaryMate"):n.secondment.JudicialMate?n.DisableOtherChks("JudicialMate"):n.secondment.DEPMate?n.DisableOtherChks("DEPMate"):n.secondment.DoctorMate&&n.DisableOtherChks("DoctorMate");t[1].ApplicationTypeFek.DisplayModal&&(n.disabled.MilitaryMate=!0);n.getOfficialPlacementUnits()})})}}else n.canInsertAppl&&n.secondment.PersonId!=null&&n.secondment.PersonId!=""&&n.secondment.PersonId!="undefined"&&(n.AvailablePyspdeListItems=[],v.getByParams({id:n.secondment.PersonId},"/api/Person/GetSecondmentPersonDto").then(function(t){n.person=t;n.getDateForProposal();n.secondment.SpecialityId=t.Speciality.Id;n.checkForMusic(t.Speciality.Code);n.secondment.OfficialRegionAndUnitId=t.OfficialRegionAndUnit.Id;n.secondment.OfficialPlacementUnitDescription=t.OfficialPlacementUnitDescription;n.secondment.PostingTransferAreaId=t.PostingTransferArea==null?null:t.PostingTransferArea.Id;n.secondment.ExperienceYears=t.ExperienceYears;n.secondment.ExperienceDays=t.ExperienceDays;n.secondment.ExperienceMonths=t.ExperienceMonths;n.secondment.NominationYear=t.NominationYear;n.secondment.LevelId=t.OfficialRegionAndUnit.LevelId;n.secondment.MaritalStatus=t.MaritalStatus;n.changeMaritalStatus();n.secondment.UnderAgedOrStudingChildren=t.UnderAgedOrStudingChildren;n.secondment.StudingChildren=t.StudingChildren;n.secondment.LocalityPyspdeId=t.LocalityPyspdeId;n.secondment.LocalityMunicipalityId=t.LocalityMunicipalityId;n.secondment.JointServiceId=t.JointServiceId;n.secondment.LocalityPyspdeId!=null&&(n.secondment.Locality=!0,n.getMunicipalityByPyspde());n.secondment.JointServiceId!=null&&(n.secondment.MateProfession=t.MateRegistryNo!=null?1:2,n.changeMateProfession());n.secondment.MateRegistryNo=t.MateRegistryNo;n.secondment.MateRegistryNo!=null&&(n.secondment.JointExamination=!0,n.showJointExamination());n.secondment.ChildCustody=n.secondment.MaritalStatus==3||n.secondment.MaritalStatus==4?t.Custody:!1;n.showMateProfession();n.showMateProtocolNumber();n.getOfficialPlacementUnits()},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}))};n.SelectedAvailChurchItems=[];n.SelectedSelectedChurchListItems=[];n.SelectedChurchListItems=[];n.btnChurchUp=function(){for(var t,r,u,f=n.SelectedSelectedChurchListItems,i=0;i<n.SelectedSelectedChurchListItems.length;i++){if(t=n.SelectedChurchListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedChurchListItems[i].Id),t<=0||t>=n.SelectedChurchListItems.length)return;r=n.SelectedChurchListItems[t];u=n.SelectedChurchListItems[t-1];n.SelectedChurchListItems[t-1]=r;n.SelectedChurchListItems[t]=u}};n.btnChurchDown=function(){for(var t,r,u,i=n.SelectedSelectedChurchListItems.length-1;i>=0;i--){if(t=n.SelectedChurchListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedChurchListItems[i].Id),t<0||t>=n.SelectedChurchListItems.length-1)return;r=n.SelectedChurchListItems[t];u=n.SelectedChurchListItems[t+1];n.SelectedChurchListItems[t+1]=r;n.SelectedChurchListItems[t]=u}};n.btnChurchRight=function(){n.checkChurches();n.canInsertChurches&&(angular.forEach(n.SelectedAvailChurchItems,function(n){this.push(n)},n.SelectedChurchListItems),angular.forEach(n.SelectedAvailChurchItems,function(t){for(var i=n.AvailableChurchListItems.length-1;i>=0;i--)n.AvailableChurchListItems[i].Id==t.Id&&n.AvailableChurchListItems.splice(i,1)}),n.SelectedAvailChurchItems=[],n.SelectedSelectedChurchListItems=[])};n.checkChurches=function(){var e=4,o=4,h=8,t,r,u,f;n.canInsertChurches=!0;t=i("filter")(n.SelectedChurchListItems,{JointExamination:!1},!0).length;r=i("filter")(n.SelectedAvailChurchItems,{JointExamination:!1},!0).length;n.secondment.JointExamination&&(u=i("filter")(n.SelectedChurchListItems,{JointExamination:!0},!0).length,f=i("filter")(n.SelectedAvailChurchItems,{JointExamination:!0},!0).length,u+f>o&&(s.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών με συνεξέταση","Δεν μπορείτε να επιλέξετε περισσότερες από "+o+" περιοχές με συνεξέταση"),n.canInsertChurches=!1));t+r>e&&(s.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών χωρίς συνεξέταση","Δεν μπορείτε να επιλέξετε περισσότερες από "+e+" περιοχές χωρίς συνεξέταση"),n.canInsertChurches=!1);t+r+u+f>h&&(s.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών","Δεν μπορείτε να επιλέξετε περισσότερες από "+h+" περιοχές"),n.canInsertChurches=!1)};n.btnChurchLeft=function(){angular.forEach(n.SelectedSelectedChurchListItems,function(n){this.push(n)},n.AvailableChurchListItems);angular.forEach(n.SelectedSelectedChurchListItems,function(t){for(var i=n.SelectedChurchListItems.length-1;i>=0;i--)n.SelectedChurchListItems[i].Id==t.Id&&n.SelectedChurchListItems.splice(i,1)});n.SelectedSelectedChurchListItems=[];n.SelectedAvailChurchItems=[]};n.SelectedAvailDiseaseItems=[];n.SelectedSelectedDiseaseListItems=[];n.SelectedDiseaseListItems=[];n.btnDiseaseUp=function(){for(var t,r,u,f=n.SelectedSelectedDiseaseListItems,i=0;i<n.SelectedSelectedDiseaseListItems.length;i++){if(t=n.SelectedDiseaseListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedDiseaseListItems[i].Id),t<=0||t>=n.SelectedDiseaseListItems.length)return;r=n.SelectedDiseaseListItems[t];u=n.SelectedDiseaseListItems[t-1];n.SelectedDiseaseListItems[t-1]=r;n.SelectedDiseaseListItems[t]=u}};n.btnDiseaseDown=function(){for(var t,r,u,i=n.SelectedSelectedDiseaseListItems.length-1;i>=0;i--){if(t=n.SelectedDiseaseListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedDiseaseListItems[i].Id),t<0||t>=n.SelectedDiseaseListItems.length-1)return;r=n.SelectedDiseaseListItems[t];u=n.SelectedDiseaseListItems[t+1];n.SelectedDiseaseListItems[t+1]=r;n.SelectedDiseaseListItems[t]=u}};n.btnDiseaseRight=function(){angular.forEach(n.SelectedAvailDiseaseItems,function(n){this.push(n)},n.SelectedDiseaseListItems);angular.forEach(n.SelectedAvailDiseaseItems,function(t){for(var i=n.AvailableDiseaseListItems.length-1;i>=0;i--)n.AvailableDiseaseListItems[i].Id==t.Id&&n.AvailableDiseaseListItems.splice(i,1)});n.SelectedAvailDiseaseItems=[];n.SelectedSelectedDiseaseListItems=[]};n.btnDiseaseLeft=function(){angular.forEach(n.SelectedSelectedDiseaseListItems,function(n){this.push(n)},n.AvailableDiseaseListItems);angular.forEach(n.SelectedSelectedDiseaseListItems,function(t){for(var i=n.SelectedDiseaseListItems.length-1;i>=0;i--)n.SelectedDiseaseListItems[i].Id==t.Id&&n.SelectedDiseaseListItems.splice(i,1)});n.SelectedSelectedDiseaseListItems=[];n.SelectedAvailDiseaseItems=[]};n.onFileSelect=function(t){var r,i;for(n.messages={completed:"",percentage:"0",error:""},n.showAlertForUploadCV=!1,r=0;r<t.length;r++){if(i=t[r],i.type!="application/x-zip-compressed"&&i.type!="application/x-compressed"&&i.type!="application/zip"&&i.type!="multipart/x-zip"&&i.type!="application/pdf"){n.messages.error='Μη έγκυρη επέκταση αρχείου "'+i.name+'". Οι επεκτάσεις που υποστηρίζονται είναι: "<b>zip και pdf<\/b>" .';return}if(i.size>=10485760){n.messages.error='Το αρχείο "'+i.name+'" (<b>'+Math.round(i.size/1024)+" KB<\/b>) υπερβαίνει το μέγιστο επιτρεπόμενο μέγεθος μεταφόρτωσης <b>10000 KB<\/b>.";return}(function(t){n.upload[t]=y.upload({url:"/api/files/uploadChurch",method:"POST",data:{SendDataForCVDto:n.SendDataForCVDto},file:i}).progress(function(t){n.messages.percentage=parseInt(100*t.loaded/t.total)}).then(function(t){n.messages.completed="Το αρχείο <b>"+i.name+"<\/b> μεταφορτώθηκε με επιτυχία.";n.SendDataForCVDto.Id=t.data.secChurchFile.Id;n.SendDataForCVFullDto=t.data.secChurchFile;n.uploadedFileDetails=t.data.Message}).catch(function(t){n.messages.error=t.data.Message})})(r)}};n.abortUpload=function(t){n.upload[t].abort()};n.downloadFile=function(){v.getByParamsDownload({PersonId:n.secondment.PersonId,Path:n.SendDataForCVFullDto.DirectPdfLink,ContentType:n.SendDataForCVFullDto.ContentType},"api/files/download").then(function(t){var p=t.status,s=t.headers,h=t.data,y="application/octet-stream",r=!1,f,c,l,e,u,v,i,o;s=s();f=n.SendDataForCVFullDto.FileName||"download.pdf";c=s["content-type"]||y;try{if(console.log("Trying saveBlob method ..."),i=new Blob([h],{type:c}),navigator.msSaveBlob)navigator.msSaveBlob(i,f);else{if(l=navigator.webkitSaveBlob||navigator.mozSaveBlob||navigator.saveBlob,l===undefined)throw"Not supported";l(i,f)}console.log("saveBlob succeeded");r=!0}catch(a){console.log("saveBlob method failed with the following exception:");console.log(a)}if(!r&&(e=window.URL||window.webkitURL||window.mozURL||window.msURL,e)){if(u=document.createElement("a"),"download"in u)try{console.log("Trying download link method with simulated click ...");i=new Blob([h],{type:c});o=e.createObjectURL(i);u.setAttribute("href",o);u.setAttribute("download",f);v=document.createEvent("MouseEvents");v.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null);u.dispatchEvent(v);console.log("Download link method with simulated click succeeded");r=!0}catch(a){console.log("Download link method with simulated click failed with the following exception:");console.log(a)}if(!r)try{console.log("Trying download link method with window.location ...");i=new Blob([h],{type:y});o=e.createObjectURL(i);window.location=o;console.log("Download link method with window.location succeeded");r=!0}catch(a){console.log("Download link method with window.location failed with the following exception:");console.log(a)}}r||(console.log("No methods worked for saving the arraybuffer, using last resort window.open"),window.open(httpPath,"_blank",""))},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση του αρχείου")})}};SecondmentChurchController.$inject=["$scope","$uibModal","$filter","$log","$window","$q","PassParameters","$state","toaster","PersonFactory","SecondmentChurchFactory","ApplicationTypeRegionAndUnitFactory","ApplicationTypeFekFactory","GeneralFactory","$upload"];SecondmentEEPEBPController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y){function k(){v.getByAll("/api/SecondmentPyspdeEEPEBPController/maritalStatusTypes").then(function(t){n.consts.maritalStatusType=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των επιλογών οικογενειακής κατάταστασης","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function d(){v.getByAll("/api/SecondmentPyspdeEEPEBPController/mateProfessionTypes").then(function(t){n.consts.mateProfessionType=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των επιλογών επαγγέλματος συζύγου","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function g(){v.getByAll("/api/SecondmentPyspdeEEPEBPController/healthProblemsTypes").then(function(t){n.consts.healthProblemsType=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των στοιχείων υγείας","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function nt(){v.getByAll("/api/SecondmentPyspdeEEPEBPController/parentsHealthProblemsTypes").then(function(t){n.consts.parentsHealthProblemsType=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των στοιχείων υγείας γονέων","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function tt(){v.getByAll("/api/SecondmentPyspdeEEPEBPController/brothersHealthProblemsTypes").then(function(t){n.consts.brothersHealthProblemsType=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των στοιχείων υγείας γονέων","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function it(){v.getByAll("/api/SecondmentPyspdeEEPEBPController/mainSpecialPhysicalEduQualifications").then(function(t){n.consts.mainSpecialPhysicalEduQualifications=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των στοιχείων υγείας γονέων","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function rt(){v.getByAll("/api/SecondmentPyspdeEEPEBPController/getDiseases").then(function(t){n.consts.diseases=v.isValueInArray(n.pageRules.secEEPEBP.CanAccess,"a, m1, m2")?t:e("filter")(t,{IsActive:!0},!0)},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των πιθανών ασθενειών","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function w(){v.getByParams({applicationType:n.applicationType,level:n.secondmentEEPEBP.LevelId},"/api/ApplicationTypeRegionAndUnit/getPyspdeWithoutJointExaminationByLevel").then(function(t){n.consts.pyspde=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function b(){v.getByParams({level:2},"/api/RegionAndUnit/GetAreasByLevel").then(function(t){n.consts.pyspdeRegionAndUnit=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}if(n.pageRules=[],n.secondmentEEPEBP={IsTemporaryStored:!0},n.secondmentDocument={},n.consts={},n.levels={},n.applicationType=42,n.secondmentEEPEBP.BraileKnowledge=!1,n.secondmentEEPEBP.SignKnowledge=!1,n.pyspe="ΠΥΣΠΕ",n.pysde="ΠΥΣΔΕ",n.PlacementTypeList=[{Description:"ΣΜΕΑΕ",Id:1},{Description:"ΣΜΕΑ Braille",Id:2},{Description:"ΣΜΕΑ Νοηματικής Γλώσσας",Id:3},{Description:"ΣΔΕΥ-ΚΕΔΑΣΥ",Id:4},{Description:"ΚΕΔΑΣΥ",Id:5},],n.dateForProposal="",n.alerts=[{type:"danger",msg:"Δεν μπορείτε να υποβάλετε αίτηση. Για ήδη υποβληθείσα αίτηση μεταβείτε στο Ιστορικό Αιτήσεων."}],n.showAlertRegions=!1,n.alertRegions=[{type:"danger",msg:"Πρέπει να δηλώσετε τουλάχιστον μία επιλογή προτίμησης."}],n.showAlertBrailleSignKnowledge=!1,n.alertBrailleSignKnowledge=[{type:"danger",msg:"Πρέπει να δηλώσετε τουλάχιστον μία επιλογή προτίμησης Braille ή ΕΝΓ."}],n.showAlertPyspePysdeKedasySdey=!1,n.alertPyspePysdeKedasySdey=[{type:"danger",msg:"Πρέπει να δηλώσετε τουλάχιστον μία επιλογή προτίμησης ΠΥΣΠΕ/ΠΥΣΔΕ, ΚΕΔΑΣΥ, ΣΔΕΥ"}],n.showAlertDisease=!1,n.alertDisease=[{type:"danger",msg:"Επιλέξτε ασθένεια."}],n.showParentsPyspdeId=!1,n.showBrothersPyspdeId=!1,n.showDiseaseId=!1,n.showAddEditForm=0,n.personalStep=!0,n.maritalAndPointsCriteriaStep=!1,n.regionStep=!1,n.showLevel=!1,n.noUpdAccess=!1,n.upload=[],n.messages={completed:"",percentage:"0",error:""},n.uploadedFileDetails="",n.showAlertForUploadCV=!1,n.SendDataForCVDto={Id:"",SecondmentApplicationId:"",PersonId:""},n.SendDataForCVFullDto={Id:"",SecondmentApplicationId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""},n.DoctoralSpecialEducation=!1,n.PostgraduateSpecialEducation=!1,n.PostgraduateStudiesSpecialEducation=!1,n.SeminarSpecialEducation=!1,n.MainSpecialPhysicalEducation=!1,n.showMateHealthProblems=!1,n.ShowAlertMessageForMate=!1,n.disabled={MilitaryMate:!1,JudicialMate:!1,DEPMate:!1,DoctorMate:!1},n.alertsMessageForMate=[{type:"danger",msg:"Συμπληρώστε Οικογενειακή Κατάσταση ΕΓΓΑΜΟΣ ή ΣΥΜΦΩΝΟ ΣΥΜΒΙΩΣΗΣ - Επάγγελμα Συζύγου Αλλο - Περιοχή Συνυπηρέτησης, εφόσον είναι σύζυγος στρατιωτικού ή δικαστικού ή μέλους ΔΕΠ."}],n.secondmentEEPEBP.UnderAgedOrStudingChildren=0,n.secondmentEEPEBP.StudingChildren=0,n.protocol="",n.showProtocol=!1,n.showEAEAlert=!1,n.AvailableMainQueryPyspePysdeKedasySdeySignKnowledgeList=[],n.AvailableDiseaseListItems=[],n.SelectedAvailDiseaseItems=[],n.AvailablePyspdeListItems=[],n.AvailableBrailleSignKnowledgeListItems=[],n.ResponsePyspePysdeKedasySdeyListItems=[],n.SelectedAvailablePyspePysdeListItems=[],n.SelectedAvailableKedasyItems=[],n.SelectedAvailableSdeyItems=[],n.AvailableEEEEKListItems=[],n.AvailableSchoolBlindDeafListItems=[],n.SelectedAvailKeddyItems=[],n.SelectedSelectedKeddyListItems=[],n.SelectedKeddyListItems=[],n.fek={},n.showMusic=!1,n.cannotUpdate=!1,n.notActive=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.PyspdeFormOfficial=0,n.showAlertPyspdeFormOfficial=!1,n.concatPyspde="",n.messagePyspde="",n.pageRules={},n.IsDisabled=!1,n.authentication.isAuth){var p="secEEPEBP";v.getByParams({role:n.authentication.role,codes:p},"/api/Subsystem/NewCheckPermission").then(function(t){var i=p.split(","),r,o;for(r in i)n.pageRules[i[r]]=e("filter")(t,{Code:i[r]},!0)[0].Rules;n.pageRules=n.pageRules;n.secondmentEEPEBP.Id=f.getApplicationId();f.resetApplication();n.secondmentEEPEBP.PersonId=f.getPersonId();v.isValueInArray(n.pageRules.secEEPEBP.CanAccess,"u1, u2")&&(n.secondmentEEPEBP.PersonId=n.authentication.personId);n.SendDataForCVDto.SecondmentApplicationId=n.secondmentEEPEBP.Id;n.SendDataForCVDto.PersonId=n.secondmentEEPEBP.PersonId;v.getByParams({personId:n.secondmentEEPEBP.PersonId},"/api/SecondmentPyspdeEEPEBPController/GetDetailsForFile").then(function(t){t!=null&&(n.SendDataForCVFullDto=t,n.SendDataForCVDto.Id=t.Id,n.uploadedFileDetails="<h4>Έχετε μεταφορτώσει:<\/h4><ul><li>Αρχείο: "+n.SendDataForCVFullDto.FileName+" <\/li><li>Μέγεθος: "+n.SendDataForCVFullDto.FileSize+" <\/li><li>Ημερομηνία: "+e("date")(n.SendDataForCVFullDto.UploadDateTime,"dd/MM/yyyy - HH:mm:ss")+" <\/li><\/ul>")},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης επισυναπτόμενου Βιογραφικού")});o=u.all([a.isFekValidForApplicationTypeId(n.applicationType),v.getByParams({personId:n.secondmentEEPEBP.PersonId},"/api/SecondmentPyspdeEEPEBPController/canInsertApplication")]);o.then(function(t){n.hasValidFek=t[0];n.fek=t[1];n.fek.Id>0?(n.canInsertAppl=!0,n.secondmentEEPEBP.FekId=n.fek.Id):n.canInsertAppl=!1;n.secondmentEEPEBP.Id!=null&&n.secondmentEEPEBP.Id!=""&&n.secondmentEEPEBP.Id!="undefined"?(n.canUpdateAppl=!0,n.showAddEditForm=1):n.canInsertAppl&&n.hasValidFek?(n.canInsertAppl=!0,n.showAddEditForm=1):n.showAddEditForm=2;n.fek.DisplayModal&&v.isEmptyValue(n.secondmentEEPEBP.Id)?$("#alertModal").modal("show"):n.doAll();v.isEmptyValue(n.secondmentEEPEBP.Id)&&(n.IsDisabled=!n.pageRules.secEEPEBP.CanInsert)})},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else o.go("/");n.BraileKnowledgeSignKnowledgeChange=function(){var t;for(n.AvailableBrailleSignKnowledgeListItems=e("filter")(n.AvailableMainQueryPyspePysdeKedasySdeySignKnowledgeList,function(t){return t.IsBraille&&n.secondmentEEPEBP.BraileKnowledge||t.IsSignKnowledge&&n.secondmentEEPEBP.SignKnowledge}),t=n.SelectedBrailleSignKnowledgeListItems.length-1;t>=0;t--)!n.secondmentEEPEBP.SignKnowledge&&n.SelectedBrailleSignKnowledgeListItems[t].IsSignKnowledge&&n.SelectedBrailleSignKnowledgeListItems.splice(t,1);for(t=n.SelectedBrailleSignKnowledgeListItems.length-1;t>=0;t--)!n.secondmentEEPEBP.BraileKnowledge&&n.SelectedBrailleSignKnowledgeListItems[t].IsBraille&&n.SelectedBrailleSignKnowledgeListItems.splice(t,1);n.removeDuplicatesBrailleSignKnowledgeForDualList()};n.MainQueryPyspePysdeKedasySdeySignKnowledge=function(){v.isEmpty(n.AvailableMainQueryPyspePysdeKedasySdeySignKnowledgeList)&&v.getByParams({applicationType:n.applicationType,CanHaveKedasy:n.person.CanHaveKedasy,CanHaveSdeyKedasy:n.person.CanHaveSdeyKedasy},"/api/ApplicationTypeRegionAndUnit/GetPyspePysdeKedasySdeyBrailleIsSignKnowledgeForEEPEEBP").then(function(t){n.AvailableMainQueryPyspePysdeKedasySdeySignKnowledgeList=t;n.AvailableBrailleSignKnowledgeListItems=e("filter")(n.AvailableMainQueryPyspePysdeKedasySdeySignKnowledgeList,function(n){return n.IsBraille||n.IsSignKnowledge});n.removeDuplicatesBrailleSignKnowledgeForDualList();n.AvailablePyspePysdeListItems=[];n.AvailableKedasyListItems=[];n.AvailableSdeyListItems=[];n.AvailablePyspePysdeListItems=e("filter")(n.AvailableMainQueryPyspePysdeKedasySdeySignKnowledgeList,function(n){return(n.RegionAndUnitTypeId==1||n.RegionAndUnitTypeId==1)&&!n.IsBraille&&!n.IsSignKnowledge&&n.Description!="Υπό Μετακίνηση"});n.AvailableKedasyListItems=e("filter")(n.AvailableMainQueryPyspePysdeKedasySdeySignKnowledgeList,{RegionAndUnitTypeId:34,IsBraille:!1,IsSignKnowledge:!1},!0);n.AvailableSdeyListItems=e("filter")(n.AvailableMainQueryPyspePysdeKedasySdeySignKnowledgeList,{RegionAndUnitTypeId:35,IsBraille:!1,IsSignKnowledge:!1},!0);n.BraileKnowledgeSignKnowledgeChange();n.removeDuplicatesBrailleSignKnowledgeForDualList();n.removeDuplicatesPyspePysdeKedasySdeyListForDualList()},function(){n.AvailablePyspePysdeListItems=[];n.AvailableKedasySignKnowledgeListItems=[];n.AvailableSdeySignKnowledgeListItems=[];n.AvailableBrailleSignKnowledgeListItems=[];s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των Σχολείων κωφλων - Τυφλών")})};n.showAlertBlock=function(){return n.showMusic?n.secondmentEEPEBP.NoRemoteUnit&&n.secondmentEEPEBP.NoEducationalExecutive&&n.secondmentEEPEBP.NoTenure&&n.secondmentEEPEBP.NoTenureModelExpSchool&&n.secondmentEEPEBP.NoMusic?!1:!0:n.secondmentEEPEBP.NoRemoteUnit&&n.secondmentEEPEBP.NoEducationalExecutive&&n.secondmentEEPEBP.NoTenure&&n.secondmentEEPEBP.NoTenureModelExpSchool?!1:!0};n.editPerson=function(){f.setPersonId(n.secondmentEEPEBP.PersonId);o.go("stateEditPerson")};n.checkHavingManyChildren=function(){n.secondmentEEPEBP.HavingManyChildren||(n.secondmentEEPEBP.ASPENumber="")};n.checkEAEQualifiactions=function(){if(n.secondmentEEPEBP.SpecialityId==330||n.secondmentEEPEBP.SpecialityId==329)n.showEAEAlert=!1;else{var t=n.secondmentEEPEBP.DoctoralSpecialEducation||n.secondmentEEPEBP.PostgraduateSpecialEducation||n.secondmentEEPEBP.PostgraduateStudiesSpecialEducation||n.secondmentEEPEBP.MainSpecialPhysicalEducation||n.secondmentEEPEBP.SeminarSpecialEducation||n.secondmentEEPEBP.Infirmity||n.secondmentEEPEBP.DisabledChildren||n.secondmentEEPEBP.BraileKnowledge||n.secondmentEEPEBP.SignKnowledge||n.secondmentEEPEBP.FiveYearExperience;n.showEAEAlert=n.secondmentEEPEBP.DidacticYears<1&&!t?!0:!1}};k();d();g();nt();tt();it();rt();n.getOfficialPlacementUnits=function(){var t,i,r;t=n.secondmentEEPEBP.Id!=null&&n.secondmentEEPEBP.Id!=""&&n.secondmentEEPEBP.Id!="undefined"?n.secondmentEEPEBP.OfficialRegionAndUnitId:n.person.OfficialRegionAndUnit.Id;params={OfficialUnitAndRegionId:t,userLevel:n.authentication.levelId};i=n.person.OfficialUnitIsIntercultural||n.person.OfficialUnitIsArtistic||n.person.OfficialUnitIsMusic;r=u.all([v.getByAll("/api/RegionAndUnit/getRegionAndUnitForPlacement"),v.getByParams({OfficialRegionAndUnitId:t,specialUnit:i,applicationType:n.applicationType},"/api/RegionAndUnit/getPysdpeFromOfficialRegionAndUnitId"),]);r.then(function(t){n.OfficialPlacementUnits=t[0];n.PyspdeFormOfficial=t[1];n.changedRegionAndUnit()})};n.getPostingTranferAreas=function(){v.getByParams({id:n.secondmentEEPEBP.OfficialRegionAndUnitId},"/api/RegionAndUnit/getPostingTransferAreaByRegionAndUnitId").then(function(t){n.PostingTranferAreas=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.changedRegionAndUnit=function(){n.checkForPostingTransferArea();n.getPostingTranferAreas()};n.getDateForProposal=function(){n.dateForProposal="31/8/"+n.applicationDidacticYear.YearFrom};n.checkForShowAlertMessageForMate=function(){n.ShowAlertMessageForMate=n.secondmentEEPEBP.MilitaryMate||n.secondmentEEPEBP.JudicialMate||n.secondmentEEPEBP.DEPMate||n.secondmentEEPEBP.DoctorMate?n.secondmentEEPEBP.MateProfession==2&&(n.secondmentEEPEBP.MaritalStatus==1||n.secondmentEEPEBP.MaritalStatus==6)&&n.secondmentEEPEBP.JointServiceId>0?!1:!0:!1};n.checkSelectedFromOfficial=function(){if(!v.isEmpty(n.SelectedPyspdeListItems)&&n.PyspdeFormOfficial>0){var t=n.myfilter=e("filter")(n.SelectedPyspdeListItems,{RegionAndUnitId:n.PyspdeFormOfficial},!0);t.length>0?(n.showAlertPyspdeFormOfficial=!0,t.length==1&&(n.concatPyspde=t[0].DescriptionConc,n.messagePyspde="Δεν επιτρέπεται η επιλογή "+n.concatPyspde+", καθώς ταυτίζεται με τη Δ/νση Οργανικής σας")):(n.showAlertPyspdeFormOfficial=!1,n.concatPyspde="")}else n.showAlertPyspdeFormOfficial=!1,n.concatPyspde=""};n.DisableOtherChks=function(t){n.ShowAlertMessageForMate=!1;switch(t){case"MilitaryMate":n.secondmentEEPEBP.MilitaryMate?(n.disabled={MilitaryMate:!1,JudicialMate:!0,DEPMate:!0,DoctorMate:!0},n.JudicialMate=!1,n.DEPMate=!1,n.checkForShowAlertMessageForMate()):n.disabled={MilitaryMate:!1,JudicialMate:!1,DEPMate:!1,DoctorMate:!1};break;case"JudicialMate":n.secondmentEEPEBP.JudicialMate?(n.disabled={MilitaryMate:!0,JudicialMate:!1,DEPMate:!0,DoctorMate:!0},n.checkForShowAlertMessageForMate()):n.disabled={MilitaryMate:!1,JudicialMate:!1,DEPMate:!1,DoctorMate:!1};break;case"DEPMate":n.secondmentEEPEBP.DEPMate?(n.disabled={MilitaryMate:!0,JudicialMate:!0,DEPMate:!1,DoctorMate:!0},n.checkForShowAlertMessageForMate()):n.disabled={MilitaryMate:!1,JudicialMate:!1,DEPMate:!1,DoctorMate:!1};break;case"DoctorMate":n.secondmentEEPEBP.DoctorMate?(n.disabled={MilitaryMate:!0,JudicialMate:!0,DEPMate:!0,DoctorMate:!1},n.checkForShowAlertMessageForMate()):n.disabled={MilitaryMate:!1,JudicialMate:!1,DEPMate:!1,DoctorMate:!1}}};n.checkForPostingTransferArea=function(){n.myfilter=e("filter")(n.OfficialPlacementUnits,{Id:n.secondmentEEPEBP.OfficialRegionAndUnitId},!0)[0];n.secondmentEEPEBP.LevelId=3;n.myfilter.RegionAndUnitTypeId==8||n.myfilter.RegionAndUnitTypeId==7?(n.showPostingTransferArea=!0,n.showLevel=!1,b(),w()):(n.showLevel=!1,n.changeLevel(),n.showPostingTransferArea=!1,n.secondmentEEPEBP.PostingTransferAreaId=null)};n.changeLevel=function(){b();w()};n.changeMaritalStatus=function(){n.secondmentEEPEBP.MaritalStatus==1||n.secondmentEEPEBP.MaritalStatus==6?(n.secondmentEEPEBP.MateProfession=0,n.secondmentEEPEBP.JointServiceId=null,n.secondmentEEPEBP.OtherMateProfession=null,n.secondmentEEPEBP.ChildCustody=!1,n.showMateHealthProblems=!0):n.secondmentEEPEBP.MaritalStatus==3||n.secondmentEEPEBP.MaritalStatus==4?(n.secondmentEEPEBP.MateProfession=0,n.secondmentEEPEBP.JointServiceId=null,n.secondmentEEPEBP.OtherMateProfession=null,n.secondmentEEPEBP.ChildCustody=!1,n.showMateHealthProblems=!1,n.secondmentEEPEBP.MateHealthProblems=null,n.secondmentEEPEBP.MateDiseaseDetails=null,n.secondmentEEPEBP.MateHealthProblemsKEPA=!1):n.secondmentEEPEBP.MaritalStatus==2||n.secondmentEEPEBP.MaritalStatus==5?(n.secondmentEEPEBP.MateProfession=0,n.secondmentEEPEBP.JointServiceId=null,n.secondmentEEPEBP.OtherMateProfession=null,n.secondmentEEPEBP.ChildCustody=!1,n.showMateHealthProblems=!1,n.secondmentEEPEBP.MateHealthProblems=null,n.secondmentEEPEBP.MateDiseaseDetails=null,n.secondmentEEPEBP.MateHealthProblemsKEPA=!1):(n.secondmentEEPEBP.MateProfession=0,n.secondmentEEPEBP.JointServiceId=null,n.secondmentEEPEBP.OtherMateProfession=null,n.secondmentEEPEBP.ChildCustody=!1,n.showMateHealthProblems=!1,n.secondmentEEPEBP.MateHealthProblems=null,n.secondmentEEPEBP.MateDiseaseDetails=null,n.secondmentEEPEBP.MateHealthProblemsKEPA=!1);n.checkForShowAlertMessageForMate()};n.changeJointServiceId=function(){n.checkForShowAlertMessageForMate()};n.changeUnderAgedOrStudingChildren=function(){n.secondmentEEPEBP.UnderAgedOrStudingChildren==0&&n.secondmentEEPEBP.StudingChildren==0&&(n.secondmentEEPEBP.ChildCustody=!1);n.showChildCustody()};n.showMateProfession=function(){return n.secondmentEEPEBP.MaritalStatus==1||n.secondmentEEPEBP.MaritalStatus==6?!0:!1};n.showJointServiceId=function(){return n.secondmentEEPEBP.MateProfession>0&&(n.secondmentEEPEBP.MaritalStatus==1||n.secondmentEEPEBP.MaritalStatus==6)?!0:!1};n.showChildCustody=function(){return(n.secondmentEEPEBP.MaritalStatus==3||n.secondmentEEPEBP.MaritalStatus==4)&&(n.secondmentEEPEBP.UnderAgedOrStudingChildren>0||n.secondmentEEPEBP.StudingChildren)?!0:!1};n.showUnderAgedOrStudingChildren=function(){return n.secondmentEEPEBP.MaritalStatus==2||n.secondmentEEPEBP.MaritalStatus==5?!0:!1};n.showOtherMateProfession=function(){return n.secondmentEEPEBP.MateProfession==2&&(n.secondmentEEPEBP.MaritalStatus==1||n.secondmentEEPEBP.MaritalStatus==6)?!0:!1};n.showParentsPyspde=function(){return n.secondmentEEPEBP.ParentsHealthProblems>0?!0:!1};n.showBrothersPyspde=function(){return n.secondmentEEPEBP.BrothersHealthProblems>0?!0:!1};n.showDisease=function(){return n.secondmentEEPEBP.SpecialCategoryId==2?!0:!1};n.changeMateProfession=function(){n.secondmentEEPEBP.MateProfession==2||(n.secondmentEEPEBP.MateProfession==1?n.secondmentEEPEBP.OtherMateProfession=null:(n.secondmentEEPEBP.OtherMateProfession=null,n.secondmentEEPEBP.JointServiceId=null));n.checkForShowAlertMessageForMate()};n.changeSpecialCategoryId=function(){n.secondmentEEPEBP.SpecialCategoryId!=4&&(n.secondmentEEPEBP.DiseaseDetails=null,n.secondmentEEPEBP.DiseaseId=null)};n.changeDiseaseId=function(){n.secondmentEEPEBP.DiseaseId!=18&&(n.secondmentEEPEBP.DiseaseDetails=null)};n.goToMaritalAndPointsCriteria=function(){$("#SecondmentPyspdeEEPEBPStep1").valid()&&!n.showEAEAlert&&(n.personalStep=!1,n.maritalAndPointsCriteriaStep=!0,n.regionStep=!1,r.scrollTo(0,0),v.isEmpty(n.secondmentEEPEBP.Id)||n.clickHasDisease())};n.clickLocality=function(){n.secondmentEEPEBP.Locality==!1&&(n.secondmentEEPEBP.LocalityPyspdeId=null);n.secondmentEEPEBP.LocalityMunicipalityId=null};n.clickPostGraduateStudies=function(){n.secondmentEEPEBP.PostGraduateStudies==!1&&(n.secondmentEEPEBP.StudiesPyspdeId=null)};n.changeParentsHealthProblems=function(){n.secondmentEEPEBP.ParentsHealthProblems==null&&(n.secondmentEEPEBP.ParentsPyspdeId=null)};n.changeBrothersHealthProblems=function(){n.secondmentEEPEBP.BrothersHealthProblems==null&&(n.secondmentEEPEBP.BrothersPyspdeId=null)};n.changeBrothersHealthProblems=function(){n.secondmentEEPEBP.BrothersHealthProblems==null&&(n.secondmentEEPEBP.BrothersPyspdeId=null)};n.checkForMusic=function(t){t.lastIndexOf("ΠΕ79",0)===0||t.lastIndexOf("ΤΕ16",0)===0?n.showMusic=!0:(n.showMusic=!1,n.secondmentEEPEBP.NoMusic=!1)};n.clickHasDisease=function(){if(n.secondmentEEPEBP.HasDisease){if(v.isEmpty(n.secondmentEEPEBP.Id))v.isEmpty(n.SelectedDiseaseListItems)&&v.getByAll("/api/SecondmentPyspdeEEPEBPController/getDiseases").then(function(t){n.AvailableDiseaseListItems=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία φόρτωσης ασθενειών")});else if(n.secondmentEEPEBP.HasDisease&&v.isEmpty(n.SelectedDiseaseListItems)){var t=u.all([v.getByAll("/api/SecondmentPyspdeEEPEBPController/getDiseases"),v.getByParams({applicationId:n.secondmentEEPEBP.Id},"/api/SecondmentPyspdeEEPEBPController/getSecondmentDiseaseById"),]);t.then(function(t){angular.copy(t[0],n.AvailableDiseaseListItems);n.SelectedDiseaseListItems=t[1];n.SelectedAvailDiseaseItems=t[1];n.removeDuplicatesDiseaseForDualList()})}}else n.SelectedAvailDiseaseItems=[],n.SelectedSelectedDiseaseListItems=[],n.SelectedDiseaseListItems=[]};n.goToRegions=function(){n.showAlertDisease=n.secondmentEEPEBP.HasDisease&&v.isEmpty(n.SelectedDiseaseListItems)?!0:!1;!$("#SecondmentPyspdeEEPEBPStep2").valid()||n.ShowAlertMessageForMate||n.showAlertDisease||(n.personalStep=!1,n.maritalAndPointsCriteriaStep=!1,n.regionStep=!0,r.scrollTo(0,0),n.secondmentEEPEBP.Id!=null&&n.secondmentEEPEBP.Id!=""&&n.secondmentEEPEBP.Id!="undefined"?((n.secondmentDocument.Id==null||n.secondmentDocument.Id==""||n.secondmentDocument.Id=="undefined")&&v.getByParams({id:n.secondmentEEPEBP.Id},"/api/SecondmentPyspdeEEPEBPController/getApplDocumentsById").then(function(t){n.secondmentDocument=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),v.getByParams({applicationId:n.secondmentEEPEBP.Id},"/api/SecondmentPyspdeEEPEBPController/getApplEEPEBPAllById").then(function(t){n.ResponseSelectedPyspePysdeKedasySdeySignKnowledgeListItems=t;n.SelectedBrailleSignKnowledgeListItems=e("filter")(n.ResponseSelectedPyspePysdeKedasySdeySignKnowledgeListItems,function(n){return n.IsBraille||n.IsSignKnowledge});n.SelectedPyspePysdeKedasySdeyListItems=e("filter")(n.ResponseSelectedPyspePysdeKedasySdeySignKnowledgeListItems,function(n){return!n.IsBraille&&!n.IsSignKnowledge});n.MainQueryPyspePysdeKedasySdeySignKnowledge("update")},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΚΕΔΑΣΥ")})):n.MainQueryPyspePysdeKedasySdeySignKnowledge("insert"));n.dynamic_height=164;n.person.CanHaveKedasy&&(n.dynamic_height=n.dynamic_height+202.56);n.person.CanHaveSdeyKedasy&&(n.dynamic_height=n.dynamic_height+202.56);n.dynamic_height=n.dynamic_height+"px"};n.removeDuplicatesPyspdeForDualList=function(){angular.forEach(n.SelectedAvailPyspdeItems,function(t){for(var i=n.AvailablePyspdeListItems.length-1;i>=0;i--)n.AvailablePyspdeListItems[i].Id==t.Id&&n.AvailablePyspdeListItems.splice(i,1)});n.SelectedAvailPyspdeItems=[];n.SelectedSelectedPyspdeListItems=[]};n.removeDuplicatesKedasyForDualList=function(){angular.forEach(n.SelectedAvailKedasyItems,function(t){for(var i=n.AvailableKedasyListItems.length-1;i>=0;i--)n.AvailableKedasyListItems[i].Id==t.Id&&n.AvailableKedasyListItems.splice(i,1)});n.SelectedAvailKedsyItems=[]};n.removeDuplicatesDiseaseForDualList=function(){angular.forEach(n.SelectedAvailDiseaseItems,function(t){for(var i=n.AvailableDiseaseListItems.length-1;i>=0;i--)n.AvailableDiseaseListItems[i].Id==t.Id&&n.AvailableDiseaseListItems.splice(i,1)});n.SelectedAvailDiseaseItems=[];n.SelectedSelectedDiseaseListItems=[]};n.goToPersonal=function(){n.personalStep=!0;n.maritalAndPointsCriteriaStep=!1;n.regionStep=!1;r.scrollTo(0,0)};n.InsOrUpd=function(t){n.secondmentEEPEBP.IsPyspde||(n.SelectedPyspdeListItems=[]);n.secondmentEEPEBP.IsKeddy||(n.SelectedKeddyListItems=[]);n.secondmentEEPEBP.IsEEEEK||(n.SelectedEEEEKListItems=[]);n.secondmentEEPEBP.BraileKnowledge||n.secondmentEEPEBP.SignKnowledge||(n.SelectedSchoolBlindDeafListItems=[]);var r={PyspePysdeKedasySdey:n.SelectedPyspePysdeKedasySdeyListItems,SignKnowledge:n.SelectedBrailleSignKnowledgeListItems,Status:t,SecondmentDocument:n.secondmentDocument,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Disease:n.SelectedDiseaseListItems,IsConfirmed:!0,SecondmentPyspdeEEPEBP:n.secondmentEEPEBP},i=r;n.secondmentEEPEBP.Id!=null&&n.secondmentEEPEBP.Id!=""&&n.secondmentEEPEBP.Id!="undefined"?(v.postByParams(i,"/api/SecondmentPyspdeEEPEBPController/updateSecondmentPyspdeEEPEBP").then(function(){f.setPersonId(n.secondmentEEPEBP.PersonId);v.isValueInArray(n.pageRules.secEEPEBP.CanAccess,"u1, u2")?o.go("history"):o.go("history")}),function(){s.pop("error","Προσοχή","Παρουσιάστηκε σφάλμα. Η Ανανέωση δεν αποθηκεύτηκε.")}):(v.postByParams(i,"/api/SecondmentPyspdeEEPEBPController/insertSecondmentPyspdeEEPEBP").then(function(){f.setPersonId(n.secondmentEEPEBP.PersonId);v.isValueInArray(n.pageRules.secEEPEBP.CanAccess,"u1, u2")?o.go("history"):o.go("history")}),function(){s.pop("error","Προσοχή","Παρουσιάστηκε σφάλμα. Η Αίτηση δεν αποθηκεύτηκε.")})};n.saveAction=function(r){if(n.showAlertBrailleSignKnowledge=(n.secondmentEEPEBP.BraileKnowledge||n.secondmentEEPEBP.SignKnowledge)&&v.isEmpty(n.SelectedBrailleSignKnowledgeListItems)?!0:!1,n.showAlertPyspePysdeKedasySdey=!v.isEmpty(n.SelectedPyspePysdeKedasySdeyListItems)||n.secondmentEEPEBP.BraileKnowledge||n.secondmentEEPEBP.SignKnowledge?!1:!0,n.showAlertForUploadCV=!1,$("#SecondmentPyspdeEEPEBPStep3").valid()&&!n.showAlertBrailleSignKnowledge&&!n.showAlertPyspePysdeKedasySdey)if(r=="final"){var u=t.open({templateUrl:"ModalContent.html",controller:OpenModalController});u.result.then(function(t){t&&n.InsOrUpd(r)},function(){i.info("Modal dismissed at: "+new Date)})}else n.InsOrUpd(r)};n.getMunicipalityByPyspde=function(){v.getByParams({pyspdeId:n.secondmentEEPEBP.LocalityPyspdeId},"/api/RegionAndUnit/getMunicipalityByPyspde").then(function(t){n.consts.pyspdeMunicipality=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})};n.placemenTypeMapping=function(t,i,r,u){n.secondmentEEPEBP.PlacementType=r?2:u?3:i?4:t?5:1};n.doAll=function(){if(n.secondmentEEPEBP.Id!=null&&n.secondmentEEPEBP.Id!=""&&n.secondmentEEPEBP.Id!="undefined"){if(n.canUpdateAppl){n.AvailablePyspdeListItems=[];n.AvailableKeddyListItems=[];var t=u.all([v.getByParams({id:n.secondmentEEPEBP.PersonId},"/api/Person/GetSecondmentPersonDto"),v.getByParams({id:n.secondmentEEPEBP.Id},"/api/SecondmentPyspdeEEPEBPController/GetSecondmentPyspdeEEPEBPById"),]);t.then(function(t){n.person=t[0];n.secondmentEEPEBP=t[1];n.getDateForProposal();n.checkForMusic(t[0].Speciality.Code);n.secondmentEEPEBP.SpecialityId=t[0].Speciality.Id;n.person.CanHaveKeddy||(n.secondmentEEPEBP.IsPyspde=!0);n.getMunicipalityByPyspde();v.isEmpty(n.secondmentEEPEBP.SecondmentPyspdeSMEAProtocols)||(n.protocol=n.secondmentEEPEBP.SecondmentPyspdeSMEAProtocols[0].ProtocolString,n.showProtocol=!0);n.paramsForCheckUpd.personId=n.secondmentEEPEBP.PersonId;n.paramsForCheckUpd.levelUser=n.authentication.levelId;n.paramsForCheckUpd.regionAndUnitId=n.authentication.regionAndUnitId;n.paramsForCheckUpd.userRole=n.authentication.role;n.paramsForCheckUpd.specialityId=n.secondmentEEPEBP.SpecialityId;n.paramsForCheckUpd.applicationLevelId=3;n.paramsForCheckUpd.applicationTypeId=n.applicationType;n.paramsForCheckUpd.IsActive=n.secondmentEEPEBP.IsActive;n.paramsForCheckUpd.FekId=n.secondmentEEPEBP.FekId;v.postByParams(n.paramsForCheckUpd,"/api/General/checkUpdateSecFromFEKAndUser").then(function(i){n.IsDisabled=!i;n.IsDisabled&&(n.noUpdAccess=!0);v.isValueInArray(n.pageRules.secEEPEBP.CanAccess,"u1, u2")&&n.secondmentEEPEBP.IsActive&&!n.secondmentEEPEBP.IsTemporaryStored&&(n.IsDisabled=!0,n.cannotUpdate=!0);n.secondmentEEPEBP.IsActive||(n.IsDisabled=!0,n.notActive=!0);v.isValueInArray(n.pageRules.secEEPEBP.CanAccess,"d1, d2, p")&&n.secondmentEEPEBP.OfficialRegionAndUnitId!=n.authentication.regionAndUnitId&&(n.IsDisabled=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.secEEPEBP.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0);n.secondmentEEPEBP.MaritalStatus==1||n.secondmentEEPEBP.MaritalStatus==6?n.showMateHealthProblems=!0:(n.showMateHealthProblems=!1,n.secondmentEEPEBP.MateHealthProblems=null,n.secondmentEEPEBP.MateDiseaseDetails=null,n.secondmentEEPEBP.MateHealthProblemsKEPA=!1);n.secondmentEEPEBP.MilitaryMate?n.DisableOtherChks("MilitaryMate"):n.secondmentEEPEBP.JudicialMate?n.DisableOtherChks("JudicialMate"):n.secondmentEEPEBP.DEPMate?n.DisableOtherChks("DEPMate"):n.secondmentEEPEBP.DoctorMate&&n.DisableOtherChks("DoctorMate");t[1].ApplicationTypeFek.DisplayModal&&(n.disabled.MilitaryMate=!0);n.getOfficialPlacementUnits()})})}}else n.canInsertAppl&&n.secondmentEEPEBP.PersonId!=null&&n.secondmentEEPEBP.PersonId!=""&&n.secondmentEEPEBP.PersonId!="undefined"&&(n.AvailablePyspdeListItems=[],n.AvailableKeddyListItems=[],v.getByParams({id:n.secondmentEEPEBP.PersonId},"/api/Person/GetSecondmentPersonDto").then(function(t){n.person=t;n.getDateForProposal();n.checkForMusic(t.Speciality.Code);n.person.CanHaveKeddy||(n.secondmentEEPEBP.IsPyspde=!0);n.secondmentEEPEBP.DidacticYears=0;n.secondmentEEPEBP.DidacticMonths=0;n.secondmentEEPEBP.DidacticDays=0;n.secondmentEEPEBP.SpecialityId=t.Speciality.Id;n.secondmentEEPEBP.OfficialRegionAndUnitId=t.OfficialRegionAndUnit.Id;n.secondmentEEPEBP.OfficialPlacementUnitDescription=t.OfficialPlacementUnitDescription;n.secondmentEEPEBP.PostingTransferAreaId=t.PostingTransferArea===null?null:t.PostingTransferArea.Id;n.secondmentEEPEBP.ExperienceYears=t.ExperienceYears;n.secondmentEEPEBP.ExperienceDays=t.ExperienceDays;n.secondmentEEPEBP.ExperienceMonths=t.ExperienceMonths;n.secondmentEEPEBP.NominationYear=t.NominationYear;n.secondmentEEPEBP.LevelId=3;n.secondmentEEPEBP.MaritalStatus=t.MaritalStatus;n.changeMaritalStatus();n.secondmentEEPEBP.UnderAgedOrStudingChildren=t.UnderAgedOrStudingChildren;n.secondmentEEPEBP.StudingChildren=t.StudingChildren;n.secondmentEEPEBP.LocalityPyspdeId=t.LocalityPyspdeId;n.secondmentEEPEBP.LocalityMunicipalityId=t.LocalityMunicipalityId;n.secondmentEEPEBP.JointServiceId=t.JointServiceId;n.placemenTypeMapping(t.OfficialUnitIsKedasy,t.OfficialUnitIsSdeyKedasy,t.OfficialUnitIsSmeaBraille,t.OfficialUnitIsSmeaSignKnowledge);n.secondmentEEPEBP.LocalityPyspdeId!=null&&(n.secondmentEEPEBP.Locality=!0,n.getMunicipalityByPyspde());n.secondmentEEPEBP.JointServiceId!=null&&(n.secondmentEEPEBP.MateProfession=t.MateRegistryNo!=null?1:2,n.changeMateProfession());n.secondmentEEPEBP.MateRegistryNo=t.MateRegistryNo;n.secondmentEEPEBP.MateRegistryNo!=null&&(n.secondmentEEPEBP.JointExamination=!0);n.secondmentEEPEBP.ChildCustody=n.secondmentEEPEBP.MaritalStatus==3||n.secondmentEEPEBP.MaritalStatus==4?t.Custody:!1;n.showMateProfession();n.getOfficialPlacementUnits()},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}))};n.cancelNewApplication=function(){$("#alertModal").modal("hide");o.go("/")};n.acceptNewApplication=function(){n.secondmentEEPEBP.MilitaryMate=!0;n.DisableOtherChks("MilitaryMate");n.disabled.MilitaryMate=!0;$("#alertModal").modal("hide");n.doAll()};n.SelectedAvailPyspdeItems=[];n.SelectedSelectedPyspdeListItems=[];n.SelectedPyspdeListItems=[];n.btnPyspdeUp=function(){for(var t,r,u,f=n.SelectedSelectedPyspdeListItems,i=0;i<n.SelectedSelectedPyspdeListItems.length;i++){if(t=n.SelectedPyspdeListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedPyspdeListItems[i].Id),t<=0||t>=n.SelectedPyspdeListItems.length)return;r=n.SelectedPyspdeListItems[t];u=n.SelectedPyspdeListItems[t-1];n.SelectedPyspdeListItems[t-1]=r;n.SelectedPyspdeListItems[t]=u}};n.btnPyspdeDown=function(){for(var t,r,u,i=n.SelectedSelectedPyspdeListItems.length-1;i>=0;i--){if(t=n.SelectedPyspdeListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedPyspdeListItems[i].Id),t<0||t>=n.SelectedPyspdeListItems.length-1)return;r=n.SelectedPyspdeListItems[t];u=n.SelectedPyspdeListItems[t+1];n.SelectedPyspdeListItems[t+1]=r;n.SelectedPyspdeListItems[t]=u}};n.maxOptions=15;n.SelectedAvailBrailleSignKnowledgeItems=[];n.SelectedSelectedBrailleSignKnowledgeListItems=[];n.SelectedBrailleSignKnowledgeListItems=[];n.checkBrailleSignKnowledgeRegions=function(){var t=n.maxOptions;n.canInsertRegions=!0;n.SelectedBrailleSignKnowledgeListItems.length+n.SelectedAvailableBrailleSignKnowledgeListItems.length+ +n.SelectedPyspePysdeKedasySdeyListItems.length>t&&(s.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών","Δεν μπορείτε να επιλέξετε περισσότερες από "+t+" περιοχές"),n.canInsertRegions=!1)};n.btnBrailleSignKnowledgeRight=function(){n.checkBrailleSignKnowledgeRegions();n.canInsertRegions&&(angular.forEach(n.SelectedAvailableBrailleSignKnowledgeListItems,function(n){this.push(n)},n.SelectedBrailleSignKnowledgeListItems),angular.forEach(n.SelectedAvailableBrailleSignKnowledgeListItems,function(t){for(var i=n.AvailableBrailleSignKnowledgeListItems.length-1;i>=0;i--)n.AvailableBrailleSignKnowledgeListItems[i].Id==t.Id&&n.AvailableBrailleSignKnowledgeListItems.splice(i,1)}),n.SelectedAvailBrailleSignKnowledgeItems=[],n.SelectedSelectedBrailleSignKnowledgeListItems=[])};n.btnBrailleSignKnowledgeLeft=function(){angular.forEach(n.SelectedSelectedBrailleSignKnowledgeListItems,function(n){this.push(n)},n.AvailableBrailleSignKnowledgeListItems);angular.forEach(n.SelectedSelectedBrailleSignKnowledgeListItems,function(t){for(var i=n.SelectedBrailleSignKnowledgeListItems.length-1;i>=0;i--)n.SelectedBrailleSignKnowledgeListItems[i].Id==t.Id&&n.SelectedBrailleSignKnowledgeListItems.splice(i,1)});n.SelectedSelectedBrailleSignKnowledgeListItems=[];n.SelectedAvailBrailleSignKnowledgeItems=[]};n.btnBrailleSignKnowledgeUp=function(){for(var t,r,u,f=n.SelectedSelectedBrailleSignKnowledgeListItems,i=0;i<n.SelectedSelectedBrailleSignKnowledgeListItems.length;i++){if(t=n.SelectedBrailleSignKnowledgeListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedBrailleSignKnowledgeListItems[i].Id),t<=0||t>=n.SelectedBrailleSignKnowledgeListItems.length)return;r=n.SelectedBrailleSignKnowledgeListItems[t];u=n.SelectedBrailleSignKnowledgeListItems[t-1];n.SelectedBrailleSignKnowledgeListItems[t-1]=r;n.SelectedBrailleSignKnowledgeListItems[t]=u}};n.btnBrailleSignKnowledgeDown=function(){for(var t,r,u,i=n.SelectedSelectedBrailleSignKnowledgeListItems.length-1;i>=0;i--){if(t=n.SelectedBrailleSignKnowledgeListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedBrailleSignKnowledgeListItems[i].Id),t<0||t>=n.SelectedBrailleSignKnowledgeListItems.length-1)return;r=n.SelectedBrailleSignKnowledgeListItems[t];u=n.SelectedBrailleSignKnowledgeListItems[t+1];n.SelectedBrailleSignKnowledgeListItems[t+1]=r;n.SelectedBrailleSignKnowledgeListItems[t]=u}};n.removeDuplicatesBrailleSignKnowledgeForDualList=function(){angular.forEach(n.SelectedBrailleSignKnowledgeListItems,function(t){for(var i=n.AvailableBrailleSignKnowledgeListItems.length-1;i>=0;i--)n.AvailableBrailleSignKnowledgeListItems[i].Id==t.Id&&n.AvailableBrailleSignKnowledgeListItems.splice(i,1)});n.SelectedAvailableBrailleSignKnowledgeListItems=[];n.SelectedSelectedAvailableBrailleSignKnowledgeListItems=[]};n.SelectedAvailBrailleSignKnowledgeItems=[];n.SelectedSelectedBrailleSignKnowledgeListItems=[];n.SelectedPyspePysdeKedasySdeyListItems=[];n.checkbtnPyspePysdeKedasySdeyRightRegions=function(){var t=n.maxOptions;n.canInsertRegions=!0;n.SelectedBrailleSignKnowledgeListItems.length+(n.SelectedAvailablePyspePysdeListItems.length+n.SelectedAvailableKedasyItems.length+n.SelectedAvailableSdeyItems.length+n.SelectedPyspePysdeKedasySdeyListItems.length)>t&&(s.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών","Δεν μπορείτε να επιλέξετε περισσότερες από "+t+" περιοχές"),n.canInsertRegions=!1)};n.btnPyspePysdeKedasySdeyClick=function(t=0){switch(t){case 1:n.SelectedAvailableKedasyItems=[];n.SelectedAvailableSdeyItems=[];break;case 2:n.SelectedAvailablePyspePysdeListItems=[];n.SelectedAvailableSdeyItems=[];break;case 3:n.SelectedAvailablePyspePysdeListItems=[];n.SelectedAvailableKedasyItems=[]}};n.btnPyspePysdeKedasySdeyRight=function(t=0){switch(t){case 1:n.SelectedAvailableKedasyItems=[];n.SelectedAvailableSdeyItems=[];break;case 2:n.SelectedAvailablePyspePysdeListItems=[];n.SelectedAvailableSdeyItems=[];break;case 3:n.SelectedAvailablePyspePysdeListItems=[];n.SelectedAvailableKedasyItems=[]}n.checkbtnPyspePysdeKedasySdeyRightRegions();n.canInsertRegions&&(angular.forEach(n.SelectedAvailablePyspePysdeListItems,function(n){this.push(n)},n.SelectedPyspePysdeKedasySdeyListItems),angular.forEach(n.SelectedAvailableKedasyItems,function(n){this.push(n)},n.SelectedPyspePysdeKedasySdeyListItems),angular.forEach(n.SelectedAvailableSdeyItems,function(n){this.push(n)},n.SelectedPyspePysdeKedasySdeyListItems),n.removeDuplicatesPyspePysdeKedasySdeyListForDualList())};n.btnPyspePysdeKedasySdeyLeft=function(){angular.forEach(n.SelectedSelectedPyspePysdeKedasySdeyListItems,function(t){switch(t.RegionAndUnitTypeId){case 1:n.AvailablePyspePysdeListItems.push(t);break;case 34:n.AvailableKedasyListItems.push(t);break;case 35:n.AvailableSdeyListItems.push(t)}});angular.forEach(n.SelectedSelectedPyspePysdeKedasySdeyListItems,function(t){for(var i=n.SelectedPyspePysdeKedasySdeyListItems.length-1;i>=0;i--)n.SelectedPyspePysdeKedasySdeyListItems[i].Id==t.Id&&n.SelectedPyspePysdeKedasySdeyListItems.splice(i,1)});n.removeDuplicatesPyspePysdeKedasySdeyListForDualList();n.SelectedSelectedPyspePysdeKedasySdeyListItems=[];n.SelectedAvailablePyspePysdeListItems=[];n.SelectedAvailableKedasyItems=[];n.SelectedAvailableSdeyItems=[]};n.btnPyspePysdeKedasySdeyUp=function(){for(var t,r,u,f=n.SelectedSelectedPyspePysdeKedasySdeyListItems,i=0;i<n.SelectedSelectedPyspePysdeKedasySdeyListItems.length;i++){if(t=n.SelectedPyspePysdeKedasySdeyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedPyspePysdeKedasySdeyListItems[i].Id),t<=0||t>=n.SelectedPyspePysdeKedasySdeyListItems.length)return;r=n.SelectedPyspePysdeKedasySdeyListItems[t];u=n.SelectedPyspePysdeKedasySdeyListItems[t-1];n.SelectedPyspePysdeKedasySdeyListItems[t-1]=r;n.SelectedPyspePysdeKedasySdeyListItems[t]=u}};n.btnPyspePysdeKedasySdeyDown=function(){for(var t,r,u,i=n.SelectedSelectedPyspePysdeKedasySdeyListItems.length-1;i>=0;i--){if(t=n.SelectedPyspePysdeKedasySdeyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedPyspePysdeKedasySdeyListItems[i].Id),t<0||t>=n.SelectedPyspePysdeKedasySdeyListItems.length-1)return;r=n.SelectedPyspePysdeKedasySdeyListItems[t];u=n.SelectedPyspePysdeKedasySdeyListItems[t+1];n.SelectedPyspePysdeKedasySdeyListItems[t+1]=r;n.SelectedPyspePysdeKedasySdeyListItems[t]=u}};n.removeDuplicatesPyspePysdeKedasySdeyListForDualList=function(){angular.forEach(n.SelectedPyspePysdeKedasySdeyListItems,function(t){var i;if(t.RegionAndUnitTypeId==1||t.RegionAndUnitTypeId==1)for(i=n.AvailablePyspePysdeListItems.length-1;i>=0;i--)n.AvailablePyspePysdeListItems[i].Id==t.Id&&n.AvailablePyspePysdeListItems.splice(i,1);if(t.RegionAndUnitTypeId==34)for(i=n.AvailableKedasyListItems.length-1;i>=0;i--)n.AvailableKedasyListItems[i].Id==t.Id&&n.AvailableKedasyListItems.splice(i,1);if(t.RegionAndUnitTypeId==35)for(i=n.AvailableSdeyListItems.length-1;i>=0;i--)n.AvailableSdeyListItems[i].Id==t.Id&&n.AvailableSdeyListItems.splice(i,1)});n.SelectedSelectedPyspePysdeKedasySdeyListItems=[]};n.checkRegions=function(){var t=5;n.canInsertRegions=!0;n.SelectedPyspdeListItems.length+n.SelectedAvailPyspdeItems.length>t&&(s.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών","Δεν μπορείτε να επιλέξετε περισσότερες από "+t+" περιοχές"),n.canInsertRegions=!1)};n.btnPyspdeLeft=function(){angular.forEach(n.SelectedSelectedPyspdeListItems,function(n){this.push(n)},n.AvailablePyspdeListItems);angular.forEach(n.SelectedSelectedPyspdeListItems,function(t){for(var i=n.SelectedPyspdeListItems.length-1;i>=0;i--)n.SelectedPyspdeListItems[i].Id==t.Id&&n.SelectedPyspdeListItems.splice(i,1)});n.SelectedSelectedPyspdeListItems=[];n.SelectedAvailPyspdeItems=[]};n.removeDuplicatesKeddyForDualList=function(){angular.forEach(n.SelectedAvailKeddyItems,function(t){for(var i=n.AvailableKeddyListItems.length-1;i>=0;i--)n.AvailableKeddyListItems[i].Id==t.Id&&n.AvailableKeddyListItems.splice(i,1)});n.SelectedAvailKeddyItems=[];n.SelectedSelectedKeddyListItems=[]};n.SelectedAvailKeddyItems=[];n.SelectedSelectedKeddyListItems=[];n.SelectedKeddyListItems=[];n.btnKeddyUp=function(){for(var t,r,u,f=n.SelectedSelectedKeddyListItems,i=0;i<n.SelectedSelectedKeddyListItems.length;i++){if(t=n.SelectedKeddyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedKeddyListItems[i].Id),t<=0||t>=n.SelectedKeddyListItems.length)return;r=n.SelectedKeddyListItems[t];u=n.SelectedKeddyListItems[t-1];n.SelectedKeddyListItems[t-1]=r;n.SelectedKeddyListItems[t]=u}};n.btnKeddyDown=function(){for(var t,r,u,i=n.SelectedSelectedKeddyListItems.length-1;i>=0;i--){if(t=n.SelectedKeddyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedKeddyListItems[i].Id),t<0||t>=n.SelectedKeddyListItems.length-1)return;r=n.SelectedKeddyListItems[t];u=n.SelectedKeddyListItems[t+1];n.SelectedKeddyListItems[t+1]=r;n.SelectedKeddyListItems[t]=u}};n.btnKeddyRight=function(){n.checkKeddy();n.canInsertKeddy&&(angular.forEach(n.SelectedAvailKeddyItems,function(n){this.push(n)},n.SelectedKeddyListItems),angular.forEach(n.SelectedAvailKeddyItems,function(t){for(var i=n.AvailableKeddyListItems.length-1;i>=0;i--)n.AvailableKeddyListItems[i].Id==t.Id&&n.AvailableKeddyListItems.splice(i,1)}),n.SelectedAvailKeddyItems=[],n.SelectedSelectedKeddyListItems=[])};n.btnKeddyLeft=function(){angular.forEach(n.SelectedSelectedKeddyListItems,function(n){this.push(n)},n.AvailableKeddyListItems);angular.forEach(n.SelectedSelectedKeddyListItems,function(t){for(var i=n.SelectedKeddyListItems.length-1;i>=0;i--)n.SelectedKeddyListItems[i].Id==t.Id&&n.SelectedKeddyListItems.splice(i,1)});n.SelectedSelectedKeddyListItems=[];n.SelectedAvailKeddyItems=[]};n.checkKeddy=function(){var t=5;n.canInsertKeddy=!0;n.SelectedKeddyListItems.length+n.SelectedAvailKeddyItems.length>t&&(s.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος Κ.Ε.Σ.Υ.","Δεν μπορείτε να επιλέξετε περισσότερες από "+t+" Κ.Ε.Σ.Υ."),n.canInsertKeddy=!1)};n.removeDuplicatesEEEEKForDualList=function(){angular.forEach(n.SelectedAvailEEEEKItems,function(t){for(var i=n.AvailableEEEEKListItems.length-1;i>=0;i--)n.AvailableEEEEKListItems[i].Id==t.Id&&n.AvailableEEEEKListItems.splice(i,1)});n.SelectedAvailEEEEKItems=[];n.SelectedSelectedEEEEKListItems=[]};n.SelectedAvailEEEEKItems=[];n.SelectedSelectedEEEEKListItems=[];n.SelectedEEEEKListItems=[];n.btnEEEEKUp=function(){for(var t,r,u,f=n.SelectedSelectedEEEEKListItems,i=0;i<n.SelectedSelectedEEEEKListItems.length;i++){if(t=n.SelectedEEEEKListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedEEEEKListItems[i].Id),t<=0||t>=n.SelectedEEEEKListItems.length)return;r=n.SelectedEEEEKListItems[t];u=n.SelectedEEEEKListItems[t-1];n.SelectedEEEEKListItems[t-1]=r;n.SelectedEEEEKListItems[t]=u}};n.btnEEEEKDown=function(){for(var t,r,u,i=n.SelectedSelectedEEEEKListItems.length-1;i>=0;i--){if(t=n.SelectedEEEEKListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedEEEEKListItems[i].Id),t<0||t>=n.SelectedEEEEKListItems.length-1)return;r=n.SelectedEEEEKListItems[t];u=n.SelectedEEEEKListItems[t+1];n.SelectedEEEEKListItems[t+1]=r;n.SelectedEEEEKListItems[t]=u}};n.btnEEEEKRight=function(){n.checkEEEEK();n.canInsertEEEEK&&(angular.forEach(n.SelectedAvailEEEEKItems,function(n){this.push(n)},n.SelectedEEEEKListItems),angular.forEach(n.SelectedAvailEEEEKItems,function(t){for(var i=n.AvailableEEEEKListItems.length-1;i>=0;i--)n.AvailableEEEEKListItems[i].Id==t.Id&&n.AvailableEEEEKListItems.splice(i,1)}),n.SelectedAvailEEEEKItems=[],n.SelectedSelectedEEEEKListItems=[])};n.btnEEEEKLeft=function(){angular.forEach(n.SelectedSelectedEEEEKListItems,function(n){this.push(n)},n.AvailableEEEEKListItems);angular.forEach(n.SelectedSelectedEEEEKListItems,function(t){for(var i=n.SelectedEEEEKListItems.length-1;i>=0;i--)n.SelectedEEEEKListItems[i].Id==t.Id&&n.SelectedEEEEKListItems.splice(i,1)});n.SelectedSelectedEEEEKListItems=[];n.SelectedAvailEEEEKItems=[]};n.checkEEEEK=function(){var t=5;n.canInsertEEEEK=!0;n.SelectedEEEEKListItems.length+n.SelectedAvailEEEEKItems.length>t&&(s.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος ΕΕΕΕΚ","Δεν μπορείτε να επιλέξετε περισσότερες από "+t+" ΕΕΕΕΚ"),n.canInsertEEEEK=!1)};n.removeDuplicatesSchoolBlindDeafForDualList=function(){angular.forEach(n.SelectedAvailSchoolBlindDeafItems,function(t){for(var i=n.AvailableSchoolBlindDeafListItems.length-1;i>=0;i--)n.AvailableSchoolBlindDeafListItems[i].Id==t.Id&&n.AvailableSchoolBlindDeafListItems.splice(i,1)});n.SelectedAvailSchoolBlindDeafItems=[];n.SelectedSelectedSchoolBlindDeafListItems=[]};n.SelectedAvailSchoolBlindDeafItems=[];n.SelectedSelectedSchoolBlindDeafListItems=[];n.SelectedSchoolBlindDeafListItems=[];n.btnSchoolBlindDeafKUp=function(){for(var t,r,u,f=n.SelectedSelectedSchoolBlindDeafListItems,i=0;i<n.SelectedSelectedSchoolBlindDeafListItems.length;i++){if(t=n.SelectedSchoolBlindDeafListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedSchoolBlindDeafListItems[i].Id),t<=0||t>=n.SelectedSchoolBlindDeafListItems.length)return;r=n.SelectedSchoolBlindDeafListItems[t];u=n.SelectedSchoolBlindDeafListItems[t-1];n.SelectedSchoolBlindDeafListItems[t-1]=r;n.SelectedSchoolBlindDeafListItems[t]=u}};n.btnSchoolBlindDeafDown=function(){for(var t,r,u,i=n.SelectedSelectedSchoolBlindDeafListItems.length-1;i>=0;i--){if(t=n.SelectedSchoolBlindDeafListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedSchoolBlindDeafListItems[i].Id),t<0||t>=n.SelectedSchoolBlindDeafListItems.length-1)return;r=n.SelectedSchoolBlindDeafListItems[t];u=n.SelectedSchoolBlindDeafListItems[t+1];n.SelectedSchoolBlindDeafListItems[t+1]=r;n.SelectedSchoolBlindDeafListItems[t]=u}};n.btnSchoolBlindDeafRight=function(){n.checkSchoolBlindDeaf();n.canInsertSchoolBlindDeaf&&(angular.forEach(n.SelectedAvailSchoolBlindDeafItems,function(n){this.push(n)},n.SelectedSchoolBlindDeafListItems),angular.forEach(n.SelectedAvailSchoolBlindDeafItems,function(t){for(var i=n.AvailableSchoolBlindDeafListItems.length-1;i>=0;i--)n.AvailableSchoolBlindDeafListItems[i].Id==t.Id&&n.AvailableSchoolBlindDeafListItems.splice(i,1)}),n.SelectedAvailSchoolBlindDeafItems=[],n.SelectedSelectedSchoolBlindDeafListItems=[])};n.btnSchoolBlindDeafLeft=function(){angular.forEach(n.SelectedSelectedSchoolBlindDeafListItems,function(n){this.push(n)},n.AvailableSchoolBlindDeafListItems);angular.forEach(n.SelectedSelectedSchoolBlindDeafListItems,function(t){for(var i=n.SelectedSchoolBlindDeafListItems.length-1;i>=0;i--)n.SelectedSchoolBlindDeafListItems[i].Id==t.Id&&n.SelectedSchoolBlindDeafListItems.splice(i,1)});n.SelectedSelectedSchoolBlindDeafListItems=[];n.SelectedAvailSchoolBlindDeafItems=[]};n.checkSchoolBlindDeaf=function(){var t=5;n.canInsertSchoolBlindDeaf=!0;n.SelectedSchoolBlindDeafListItems.length+n.SelectedAvailSchoolBlindDeafItems.length>t&&(s.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος Σχολείων Κωφών - Τυφλών","Δεν μπορείτε να επιλέξετε περισσότερες από "+t+" Σχολεία Κωφών - Τυφλών"),n.canInsertSchoolBlindDeaf=!1)};n.SelectedAvailDiseaseItems=[];n.SelectedSelectedDiseaseListItems=[];n.SelectedDiseaseListItems=[];n.btnDiseaseUp=function(){for(var t,r,u,f=n.SelectedSelectedDiseaseListItems,i=0;i<n.SelectedSelectedDiseaseListItems.length;i++){if(t=n.SelectedDiseaseListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedDiseaseListItems[i].Id),t<=0||t>=n.SelectedDiseaseListItems.length)return;r=n.SelectedDiseaseListItems[t];u=n.SelectedDiseaseListItems[t-1];n.SelectedDiseaseListItems[t-1]=r;n.SelectedDiseaseListItems[t]=u}};n.btnDiseaseDown=function(){for(var t,r,u,i=n.SelectedSelectedDiseaseListItems.length-1;i>=0;i--){if(t=n.SelectedDiseaseListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedDiseaseListItems[i].Id),t<0||t>=n.SelectedDiseaseListItems.length-1)return;r=n.SelectedDiseaseListItems[t];u=n.SelectedDiseaseListItems[t+1];n.SelectedDiseaseListItems[t+1]=r;n.SelectedDiseaseListItems[t]=u}};n.btnDiseaseRight=function(){angular.forEach(n.SelectedAvailDiseaseItems,function(n){this.push(n)},n.SelectedDiseaseListItems);angular.forEach(n.SelectedAvailDiseaseItems,function(t){for(var i=n.AvailableDiseaseListItems.length-1;i>=0;i--)n.AvailableDiseaseListItems[i].Id==t.Id&&n.AvailableDiseaseListItems.splice(i,1)});n.SelectedAvailDiseaseItems=[];n.SelectedSelectedDiseaseListItems=[]};n.btnDiseaseLeft=function(){angular.forEach(n.SelectedSelectedDiseaseListItems,function(n){this.push(n)},n.AvailableDiseaseListItems);angular.forEach(n.SelectedSelectedDiseaseListItems,function(t){for(var i=n.SelectedDiseaseListItems.length-1;i>=0;i--)n.SelectedDiseaseListItems[i].Id==t.Id&&n.SelectedDiseaseListItems.splice(i,1)});n.SelectedSelectedDiseaseListItems=[];n.SelectedAvailDiseaseItems=[]};n.onFileSelect=function(t){var r,i;for(n.messages={completed:"",percentage:"0",error:""},n.showAlertForUploadCV=!1,r=0;r<t.length;r++){if(i=t[r],i.type!="application/x-zip-compressed"&&i.type!="application/x-compressed"&&i.type!="application/zip"&&i.type!="multipart/x-zip"&&i.type!="application/pdf"){n.messages.error='Μη έγκυρη επέκταση αρχείου "'+i.name+'". Οι επεκτάσεις που υποστηρίζονται είναι: "<b>zip και pdf<\/b>" .';return}if(i.size>=10485760){n.messages.error='Το αρχείο "'+i.name+'" (<b>'+Math.round(i.size/1024)+" KB<\/b>) υπερβαίνει το μέγιστο επιτρεπόμενο μέγεθος μεταφόρτωσης <b>10000 KB<\/b>.";return}(function(t){n.upload[t]=y.upload({url:"/api/files/uploadPyspdeEEPEBP",method:"POST",data:{SendDataForCVDto:n.SendDataForCVDto},file:i}).progress(function(t){n.messages.percentage=parseInt(100*t.loaded/t.total)}).then(function(t){n.messages.completed="Το αρχείο <b>"+i.name+"<\/b> μεταφορτώθηκε με επιτυχία.";n.SendDataForCVDto.Id=t.data.secPyspdeEEPEBPFile.Id;n.SendDataForCVFullDto=t.data.secPyspdeEEPEBPFile;n.uploadedFileDetails=t.data.Message}).catch(function(t){n.messages.error=t.message})})(r)}};n.abortUpload=function(t){n.upload[t].abort()};n.downloadFile=function(){v.getByParamsDownload({PersonId:n.secondmentEEPEBP.PersonId,Path:n.SendDataForCVFullDto.DirectPdfLink,ContentType:n.SendDataForCVFullDto.ContentType},"api/files/download").then(function(t){var p=t.status,s=t.headers,h=t.data,y="application/octet-stream",r=!1,f,c,l,e,u,v,i,o;s=s();f=n.SendDataForCVFullDto.FileName||"download.pdf";c=s["content-type"]||y;try{if(console.log("Trying saveBlob method ..."),i=new Blob([h],{type:c}),navigator.msSaveBlob)navigator.msSaveBlob(i,f);else{if(l=navigator.webkitSaveBlob||navigator.mozSaveBlob||navigator.saveBlob,l===undefined)throw"Not supported";l(i,f)}console.log("saveBlob succeeded");r=!0}catch(a){console.log("saveBlob method failed with the following exception:");console.log(a)}if(!r&&(e=window.URL||window.webkitURL||window.mozURL||window.msURL,e)){if(u=document.createElement("a"),"download"in u)try{console.log("Trying download link method with simulated click ...");i=new Blob([h],{type:c});o=e.createObjectURL(i);u.setAttribute("href",o);u.setAttribute("download",f);v=document.createEvent("MouseEvents");v.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null);u.dispatchEvent(v);console.log("Download link method with simulated click succeeded");r=!0}catch(a){console.log("Download link method with simulated click failed with the following exception:");console.log(a)}if(!r)try{console.log("Trying download link method with window.location ...");i=new Blob([h],{type:y});o=e.createObjectURL(i);window.location=o;console.log("Download link method with window.location succeeded");r=!0}catch(a){console.log("Download link method with window.location failed with the following exception:");console.log(a)}}r||(console.log("No methods worked for saving the arraybuffer, using last resort window.open"),window.open(httpPath,"_blank",""))},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση του αρχείου")})}};SecondmentEEPEBPController.$inject=["$scope","$uibModal","$log","$window","$q","PassParameters","$filter","$state","toaster","PersonFactory","SecondmentPyspdeSmeaFactory","ApplicationTypeRegionAndUnitFactory","ApplicationTypeFekFactory","GeneralFactory","$upload"];SecondmentGeneralController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y){function w(){l.getPyspdeWithoutJointExaminationByLevel(n.applicationForRegions,n.secondment.LevelId).then(function(t){n.consts.pyspde=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function b(){v.getByParams({level:n.secondment.LevelId},"/api/RegionAndUnit/getPyspdeByLevel").then(function(t){n.consts.pyspdeRegionJoin=t;n.consts.pyspdeRegionAndUnit=i("filter")(t,function(n){return n.Description!="Υπό Μετακίνηση"})},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}if(n.secondment={IsTemporaryStored:!0},n.consts={},n.ApplicationSubTypeList=[],n.ApplicationSubTypeInitialList=[],n.DidacticYearAll=[],n.DidacticYearList=[],n.PriorityTypeList=[],n.AvailableDiseaseListItems=[],n.SelectedAvailDiseaseItems=[],n.applicationType=43,n.applicationForRegions=0,n.secondmentYearSubType={},n.showLevel={},n.pyspe="ΠΥΣΠΕ",n.pysde="ΠΥΣΔΕ",n.showMusic=!1,n.protocol="",n.showProtocol=!1,n.canInsertAppl=!1,n.canUpdateAppl=!1,n.canInsUpdFromChurch=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.disableForUpdate=!1,n.showLevel=!1,n.showAlertHasEAEQualification=!1,n.showAlertHasDidacticExperience=!1,n.ModalMessage="Η αίτηση υποβάλλεται εκτός εγκυκλίου μόνο  για σοβαρούς επιγενόμενους λόγους",n.myfilter={},n.personalStep=!0,n.regionStep=!1,n.fek={},n.dateForProposal="",n.PyspdeListItems=[],n.AvailablePyspdeListItems=[],n.SelectedAvailPyspdeItems=[],n.SelectedSelectedPyspdeListItems=[],n.SelectedPyspdeListItems=[],n.SelectedAvailKeddyItems=[],n.SelectedSelectedKeddyListItems=[],n.SelectedKeddyListItems=[],n.AvailableKeddyListItems=[],n.AvailableBodyListItems=[],n.SelectedAvailBodyItems=[],n.SelectedSelectedBodyListItems=[],n.SelectedBodyListItems=[],n.SelectedBodies=[],n.secondLevelBody=[],n.thirdLevelBody=[],n.secondment.bodyLayer1=null,n.secondment.bodyLayer2=null,n.secondment.bodyLayer3=null,n.upload=[],n.messages={completed:"",percentage:"0",error:""},n.uploadedFileDetails="",n.showAlertForUploadCV=!1,n.SendDataForCVDto={Id:"",SecondmentApplicationId:"",PersonId:""},n.SendDataForCVFullDto={Id:"",SecondmentApplicationId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""},n.IsFirstTimePyspde=!0,n.IsFirstTimeChurch=!0,n.PlacementTypeList=[],n.showAlertRegions=!1,n.alertRegions=[{type:"danger",msg:"Πρέπει να δηλώσετε τουλάχιστον μία επιλογή προτίμησης."}],n.alertRegionsKeddy=[{type:"danger",msg:"Πρέπει να δηλώσετε τουλάχιστον μία επιλογή προτίμησης ΠΥΣΠΕ/ΠΥΣΔΕ ή τουλάχιστον μία επιλογή ΚΕΔΑΣΥ."}],n.alertHasEAEQualification=[{type:"danger",msg:"Το πεδίο είναι υποχρεωτικό για οριστικοποίηση."}],n.alertHasDidacticExperience=[{type:"danger",msg:"Το πεδίο είναι υποχρεωτικό για οριστικοποίηση."}],n.cannotUpdate=!1,n.notActive=!1,n.noUpdAccess=!1,n.PyspdeFormOfficial=0,n.showAlertPyspdeFormOfficial=!1,n.concatPyspde="",n.messagePyspde="",n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.authentication.isAuth){var p="secGeneral";v.getByParams({role:n.authentication.role,codes:p},"/api/Subsystem/NewCheckPermission").then(function(t){var r=p.split(",");for(var u in r)n.pageRules[r[u]]=i("filter")(t,{Code:r[u]},!0)[0].Rules;n.secondment.Id=e.getApplicationId();e.resetApplication();n.secondment.PersonId=e.getPersonId();v.isValueInArray(n.pageRules.secGeneral.CanAccess,"u1, u2")&&(n.secondment.PersonId=n.authentication.personId);n.SendDataForCVDto.SecondmentApplicationId=n.secondment.Id;n.SendDataForCVDto.PersonId=n.secondment.PersonId;v.getByParams({personId:n.secondment.PersonId},"/api/SecondmentGeneralController/canInsertOrUpdateApplication").then(function(t){n.applForUpdate=t.ApplicationForUpdate;n.canInsertAppl=t.CanInsert;n.CanUpdateApplication=t.CanUpdate;n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"?(n.disableForUpdate=!0,n.showAddEditForm=1,n.doAll()):n.canInsertAppl?$("#alertModalForInsert").modal("show"):n.showAddEditForm=2;v.isEmptyValue(n.secondment.Id)&&(n.IsDisabled=!n.pageRules.secGeneral.CanInsert)},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης επισυναπτόμενου Βιογραφικού")})},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else o.go("/");n.cancelNewApplication=function(){$("#alertModalForInsert").modal("hide");o.go("/")};n.acceptNewApplication=function(){$("#alertModalForInsert").modal("hide");n.showAddEditForm=1;n.doAll()};n.changeApplicationSubType=function(){v.isEmptyValue(n.secondment.Id)&&!v.isEmptyValue(n.secondmentYearSubType.ApplicationSubTypeId)&&v.getByParams({personId:n.secondment.PersonId,applicationSubTypeId:n.secondmentYearSubType.ApplicationSubTypeId},"/api/SecondmentGeneralController/canInsert").then(function(t){t?(n.SelectedAvailPyspdeItems=[],n.SelectedSelectedPyspdeListItems=[],n.SelectedPyspdeListItems=[],n.AvailablePyspdeListItems=[],n.AvailableKeddyListItems=[],n.SelectedAvailKeddyItems=[],n.SelectedSelectedKeddyListItems=[],n.SelectedKeddyListItems=[],n.SelectedKeddyListItems=[],n.secondmentYearSubType.ApplicationSubTypeId==1?(n.applicationForRegions=0,n.secondment.HasEAEQualification=0,n.secondment.HasSignKnowledge=0,n.secondment.HasBraille=0,n.secondment.HasDidacticExperience=0,n.secondment.PriorityTypeId=null,n.secondment.PriorityTypeDetails=null):n.secondmentYearSubType.ApplicationSubTypeId==2?(n.applicationForRegions=7,n.secondment.HasEAEQualification=0,n.secondment.HasSignKnowledge=0,n.secondment.HasBraille=0,n.secondment.HasDidacticExperience=0,n.secondment.PriorityTypeId=null,n.secondment.PriorityTypeDetails=null):n.secondmentYearSubType.ApplicationSubTypeId==3?(n.applicationForRegions=7,n.secondment.HasEAEQualification=0,n.secondment.HasSignKnowledge=0,n.secondment.HasBraille=0,n.secondment.HasDidacticExperience=0,n.secondment.DecisionNumber=null):n.secondmentYearSubType.ApplicationSubTypeId==4?(n.applicationForRegions=9,n.secondment.DecisionNumber=null):n.secondmentYearSubType.ApplicationSubTypeId==5?(n.applicationForRegions=8,n.secondment.HasEAEQualification=0,n.secondment.HasSignKnowledge=0,n.secondment.HasBraille=0,n.secondment.HasDidacticExperience=0,n.secondment.DecisionNumber=null,n.secondment.PriorityTypeId=null,n.secondment.PriorityTypeDetails=null):n.applicationForRegions=0,(n.secondmentYearSubType.ApplicationSubTypeId==2||n.secondmentYearSubType.ApplicationSubTypeId==3||n.secondmentYearSubType.ApplicationSubTypeId==4)&&(b(),w())):(n.alerts[0].msg="Δεν μπορείτε να εισάγετε νέα αίτηση γιατί υπάρχει ήδη άλλη αίτηση ίδιου τύπου προσωρινά αποθηκευμένη .",n.showAddEditForm=2)},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.changePriorityTypeDetails=function(){n.secondment.PriorityTypeId<=1&&(n.secondment.PriorityTypeDetails=null)};n.setApplicationTypeFromSubType=function(){n.applicationForRegions=n.secondmentYearSubType.ApplicationSubTypeId==1?0:n.secondmentYearSubType.ApplicationSubTypeId==2?7:n.secondmentYearSubType.ApplicationSubTypeId==3?7:n.secondmentYearSubType.ApplicationSubTypeId==4?9:n.secondmentYearSubType.ApplicationSubTypeId==5?8:0;(n.secondmentYearSubType.ApplicationSubTypeId==2||n.secondmentYearSubType.ApplicationSubTypeId==3||n.secondmentYearSubType.ApplicationSubTypeId==4)&&(b(),w())};n.alerts=[{type:"danger",msg:"Δεν μπορείτε να υποβάλετε αίτηση. Για ήδη υποβληθείσα αίτηση μεταβείτε στο Ιστορικό Αιτήσεων."}];n.editPerson=function(){e.setPersonId(n.secondment.PersonId);o.go("stateEditPerson")};n.showAlertBlock=function(){return n.showMusic?n.secondment.NoRemoteUnit&&n.secondment.NoEducationalExecutive&&n.secondment.NoTenure&&n.secondment.NoTenureModelExpSchool&&n.secondment.NoMusicSchool?!1:!0:n.secondment.NoRemoteUnit&&n.secondment.NoEducationalExecutive&&n.secondment.NoTenure&&n.secondment.NoTenureModelExpSchool?!1:!0};n.getOfficialPlacementUnits=function(){var t,i,r;t=n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"?n.secondment.OfficialRegionAndUnitId:n.person.OfficialRegionAndUnit.Id;params={OfficialUnitAndRegionId:t,userLevel:n.authentication.levelId};i=n.person.OfficialUnitIsSmea||n.person.OfficialUnitIsIntercultural||n.person.OfficialUnitIsArtistic||n.person.OfficialUnitIsMusic;r=f.all([v.getByAll("/api/RegionAndUnit/getRegionAndUnitForPlacement"),v.getByParams({OfficialRegionAndUnitId:t,specialUnit:i,applicationType:n.applicationType},"/api/RegionAndUnit/getPysdpeFromOfficialRegionAndUnitId"),]);r.then(function(t){n.OfficialPlacementUnits=t[0];n.PyspdeFormOfficial=t[1];n.changedRegionAndUnit()})};n.getPostingTranferAreas=function(){v.getByParams({id:n.secondment.OfficialRegionAndUnitId},"/api/RegionAndUnit/getPostingTransferAreaByRegionAndUnitId").then(function(t){n.PostingTranferAreas=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.changedRegionAndUnit=function(){n.checkForPostingTransferArea();n.getPostingTranferAreas()};n.changeLevel=function(){n.secondment.LevelId==1&&(n.secondment.IsPyspde=!0)};n.checkForPostingTransferArea=function(){n.myfilter=i("filter")(n.OfficialPlacementUnits,{Id:n.secondment.OfficialRegionAndUnitId},!0)[0];v.getByAll("/api/Dbo/getLevelsAsync").then(function(t){n.levels=t;n.myfilter.RegionAndUnitTypeId==8?(n.showPostingTransferArea=!0,n.showLevel=!0,n.changeLevel(),n.secondment.LevelId=n.myfilter.LevelId,n.secondment.LevelId==1&&(n.secondment.IsPyspde=!0)):(n.person.IsBothSpeciality?n.showLevel=!1:(n.showLevel=!0,n.secondment.LevelId=n.person.SpecialityLevel),n.changeLevel(),n.showPostingTransferArea=!1,n.secondment.PostingTransferAreaId=null)},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία φόρτωσης βαθμίδων επιλογής")})};n.getDateForProposal=function(){n.dateForProposal="31/8/"+n.applicationDidacticYear.YearFrom};n.checkForShowAlertMessageForMate=function(){n.ShowAlertMessageForMate=n.secondment.MilitaryMate||n.secondment.JudicialMate||n.secondment.DEPMate||n.secondment.DoctorMate?n.secondment.MateProfession==2&&(n.secondment.MaritalStatus==1||n.secondment.MaritalStatus==6)&&n.secondment.JointServiceId>0?!1:!0:!1};n.DisableOtherChks=function(t){n.ShowAlertMessageForMate=!1;switch(t){case"MilitaryMate":n.secondment.MilitaryMate?(n.disabled={MilitaryMate:!1,JudicialMate:!0,DEPMate:!0,DoctorMate:!0},n.JudicialMate=!1,n.DEPMate=!1,n.DoctorMate=!1,n.checkForShowAlertMessageForMate()):n.disabled={MilitaryMate:!1,JudicialMate:!1,DEPMate:!1,DoctorMate:!1};break;case"JudicialMate":n.secondment.JudicialMate?(n.disabled={MilitaryMate:!0,JudicialMate:!1,DEPMate:!0,DoctorMate:!0},n.checkForShowAlertMessageForMate()):n.disabled={MilitaryMate:!1,JudicialMate:!1,DEPMate:!1,DoctorMate:!1};break;case"DEPMate":n.secondment.DEPMate?(n.disabled={MilitaryMate:!0,JudicialMate:!0,DEPMate:!1,DoctorMate:!0},n.checkForShowAlertMessageForMate()):n.disabled={MilitaryMate:!1,JudicialMate:!1,DEPMate:!1,DoctorMate:!1};break;case"DoctorMate":n.secondment.DoctorMate?(n.disabled={MilitaryMate:!0,JudicialMate:!0,DEPMate:!0,DoctorMate:!1},n.checkForShowAlertMessageForMate()):n.disabled={MilitaryMate:!1,JudicialMate:!1,DEPMate:!1,DoctorMate:!1}}};n.changeMaritalStatus=function(){n.secondment.MaritalStatus==1||n.secondment.MaritalStatus==6?(n.secondment.MateProfession=0,n.secondment.JointExamination=!1,n.secondment.MateProtocolNumber=null,n.secondment.MateRegistryNo=null,n.secondment.JointServiceId=null,n.secondment.OtherMateProfession=null,n.secondment.ChildCustody=!1,n.showMateHealthProblems=!0):n.secondment.MaritalStatus==3||n.secondment.MaritalStatus==4?(n.secondment.MateProfession=0,n.secondment.JointExamination=null,n.secondment.MateProtocolNumber=null,n.secondment.MateRegistryNo=null,n.secondment.JointServiceId=null,n.secondment.OtherMateProfession=null,n.showMateHealthProblems=!1,n.secondment.MateHealthProblems=null,n.secondment.MateDiseaseDetails=null,n.secondment.MateHealthProblemsKEPA=!1,n.secondment.ChildCustody=!1,n.secondment.JointExamination=!1):n.secondment.MaritalStatus==2||n.secondment.MaritalStatus==5?(n.secondment.MateProfession=0,n.secondment.JointExamination=!1,n.secondment.MateProtocolNumber=null,n.secondment.MateRegistryNo=null,n.secondment.JointServiceId=null,n.secondment.OtherMateProfession=null,n.secondment.ChildCustody=!1,n.showMateHealthProblems=!1,n.secondment.MateHealthProblems=null,n.secondment.MateDiseaseDetails=null,n.secondment.MateHealthProblemsKEPA=!1,n.secondment.JointExamination=!1):(n.secondment.MateProfession=0,n.secondment.JointExamination=!1,n.secondment.MateProtocolNumber=null,n.secondment.MateRegistryNo=null,n.secondment.JointServiceId=null,n.secondment.OtherMateProfession=null,n.secondment.ChildCustody=!1,n.showMateHealthProblems=!1,n.secondment.MateHealthProblems=null,n.secondment.MateDiseaseDetails=null,n.secondment.MateHealthProblemsKEPA=!1,n.secondment.JointExamination=!1);n.checkForShowAlertMessageForMate()};n.changeUnderAgedOrStudingChildren=function(){n.secondment.UnderAgedOrStudingChildren==0&&n.secondment.StudingChildren==0&&(n.secondment.ChildCustody=!1);n.showChildCustody()};n.changeJointServiceId=function(){n.checkForShowAlertMessageForMate()};n.showMateProfession=function(){return n.secondment.MaritalStatus==1||n.secondment.MaritalStatus==6?!0:!1};n.clickLocality=function(){n.secondment.Locality==!1&&(n.secondment.LocalityPyspdeId=null);n.secondment.LocalityMunicipalityId=null};n.clickJointExamination=function(){n.secondment.JointExamination==!1&&(n.secondment.MateRegistryNo=null)};n.clickPostGraduateStudies=function(){n.secondment.PostGraduateStudies==!1&&(n.secondment.StudiesPyspdeId=null)};n.showMateProtocolNumber=function(){return n.secondment.MateProfession==1&&(n.secondment.MaritalStatus==1||n.secondment.MaritalStatus==6)?!0:!1};n.showJointServiceId=function(){return n.secondment.MateProfession>0&&(n.secondment.MaritalStatus==1||n.secondment.MaritalStatus==6)?!0:!1};n.showMateRegistryNo=function(){return n.secondment.MateProfession==1&&(n.secondment.MaritalStatus==1||n.secondment.MaritalStatus==6)&&n.secondment.JointExamination?!0:!1};n.showChildCustody=function(){return(n.secondment.MaritalStatus==3||n.secondment.MaritalStatus==4)&&(n.secondment.UnderAgedOrStudingChildren>0||n.secondment.StudingChildren>0)?!0:!1};n.showUnderAgedOrStudingChildren=function(){return n.secondment.MaritalStatus==2||n.secondment.MaritalStatus==5?!0:!1};n.showJointExamination=function(){return n.secondment.MateProfession==1&&(n.secondment.MaritalStatus==1||n.secondment.MaritalStatus==6)?!0:!1};n.changeDiseaseId=function(){n.secondment.DiseaseId!=18&&(n.secondment.DiseaseDetails=null)};n.checkSelectedFromOfficial=function(){if(!v.isEmpty(n.SelectedPyspdeListItems)&&n.PyspdeFormOfficial>0){var t=n.myfilter=i("filter")(n.SelectedPyspdeListItems,{RegionAndUnitId:n.PyspdeFormOfficial},!0);t.length>0?(n.showAlertPyspdeFormOfficial=!0,t.length==1?(n.concatPyspde=t[0].DescriptionConc,n.messagePyspde="Δεν επιτρέπεται η επιλογή "+n.concatPyspde+", καθώς ταυτίζεται με τη Δ/νση Οργανικής σας"):(n.concatPyspde=t[0].DescriptionConc+","+t[1].DescriptionConc,n.messagePyspde="Δεν επιτρέπονται οι επιλογές "+n.concatPyspde+" καθώς ταυτίζονται με τη Δ/νση Οργανικής σας.")):(n.showAlertPyspdeFormOfficial=!1,n.concatPyspde="")}else n.showAlertPyspdeFormOfficial=!1,n.concatPyspde=""};n.removeDuplicatesPyspdeForDualList=function(){n.checkSelectedFromOfficial();angular.forEach(n.SelectedAvailPyspdeItems,function(t){for(var i=n.AvailablePyspdeListItems.length-1;i>=0;i--)n.AvailablePyspdeListItems[i].Id==t.Id&&n.AvailablePyspdeListItems.splice(i,1)});n.SelectedAvailPyspdeItems=[];n.SelectedSelectedPyspdeListItems=[]};n.removeDuplicatesPyspdeForDualListForInsert=function(){n.checkSelectedFromOfficial();angular.copy(n.SelectedPyspdeListItems,n.SelectedAvailPyspdeItems);n.removeDuplicatesPyspdeForDualList()};n.removeDuplicatesBodyForDualList=function(){angular.forEach(n.SelectedAvailBodyItems,function(t){for(var i=n.AvailableBodyListItems.length-1;i>=0;i--)n.AvailableBodyListItems[i].Id==t.Id&&n.AvailableBodyListItems.splice(i,1)})};n.btnBodyUp=function(){for(var t,r,u,f=n.SelectedSelectedBodyListItems,i=0;i<n.SelectedSelectedBodyListItems.length;i++){if(t=n.SelectedBodyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedBodyListItems[i].Id),t<=0||t>=n.SelectedBodyListItems.length)return;r=n.SelectedBodyListItems[t];u=n.SelectedBodyListItems[t-1];n.SelectedBodyListItems[t-1]=r;n.SelectedBodyListItems[t]=u}};n.btnBodyDown=function(){for(var t,r,u,i=n.SelectedSelectedBodyListItems.length-1;i>=0;i--){if(t=n.SelectedBodyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedBodyListItems[i].Id),t<0||t>=n.SelectedBodyListItems.length-1)return;r=n.SelectedBodyListItems[t];u=n.SelectedBodyListItems[t+1];n.SelectedBodyListItems[t+1]=r;n.SelectedBodyListItems[t]=u}};n.btnBodyRight=function(){n.checkRegionsBody();n.canInsertRegions&&(angular.forEach(n.SelectedAvailBodyItems,function(n){this.push(n)},n.SelectedBodyListItems),angular.forEach(n.SelectedAvailBodyItems,function(t){for(var i=n.AvailableBodyListItems.length-1;i>=0;i--)n.AvailableBodyListItems[i].Id==t.Id&&n.AvailableBodyListItems.splice(i,1)}),n.SelectedAvailBodyItems=[],n.SelectedSelectedBodyListItems=[])};n.checkRegionsBody=function(){var t=3;n.canInsertRegions=!0;n.SelectedBodyListItems.length+n.SelectedAvailBodyItems.length>t&&(s.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών","Δεν μπορείτε να επιλέξετε περισσότερες από "+t+" περιοχές"),n.canInsertRegions=!1)};n.btnBodyLeft=function(){angular.forEach(n.SelectedSelectedBodyListItems,function(n){this.push(n)},n.AvailableBodyListItems);angular.forEach(n.SelectedSelectedBodyListItems,function(t){for(var i=n.SelectedBodyListItems.length-1;i>=0;i--)n.SelectedBodyListItems[i].Id==t.Id&&n.SelectedBodyListItems.splice(i,1)});n.SelectedSelectedBodyListItems=[];n.SelectedAvailBodyItems=[]};n.FirstLevelBody=function(){v.getByParams({applicationType:n.applicationForRegions},"/api/ApplicationTypeRegionAndUnit/getFirstLevelBodyWithoutActiveTime").then(function(t){n.firstLevelBody=t;n.firstRegionType1=n.firstLevelBody[0].RegionType1},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.SecondLevelBody=function(){l.getSecondLevelBody(n.secondment.bodyLayer1.RegionAndUnitId1,n.applicationForRegions).then(function(t){n.secondLevelBody=t;v.isEmpty(n.secondLevelBody)||(n.secondRegionType2=n.secondLevelBody[0].RegionType2)},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.ThirdLevelBody=function(){l.getThirdLevelBody(n.secondment.bodyLayer1.RegionAndUnitId1,n.secondment.bodyLayer2.RegionAndUnitId2,n.applicationForRegions).then(function(t){n.thirdLevelBody=t;v.isEmpty(n.thirdLevelBody)||(n.thirdRegionType3=n.thirdLevelBody[0].RegionType3)},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.IEKForPrefecture=function(){l.getIEKForPrefecture(n.secondment.bodyLayer2.RegionAndUnitId2).then(function(t){n.AvailableBodyListItems=t;n.removeDuplicatesBodyForDualList()},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα ","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.setRegion1=function(){n.secondLevelBody=[];n.thirdLevelBody=[];n.secondment.details="";n.SelectedBodyListItems=[];n.AvailableBodyListItems=[];n.SelectedSelectedBodyListItems=[];n.SelectedAvailBodyItems=[];n.secondment.bodyLayer2=null;n.secondment.bodyLayer3=null;n.SecondLevelBody();n.secondment.bodyLayer1!=null&&(n.secondment.bodyLayer1.Description1!="Γ.Γ.Δ.Β.Μ.Ν.Γ. - Δημόσια ΙΕΚ"&&(n.SelectedBodyListItems[0]=n.secondment.bodyLayer1),n.details=n.secondment.bodyLayer1.Description1=="Άλλος Φορέας"?!0:!1)};n.setRegion2=function(){n.secondment.details="";n.secondment.bodyLayer2!=null&&(n.secondment.bodyLayer2.Description1!="Γ.Γ.Δ.Β.Μ.Ν.Γ. - Δημόσια ΙΕΚ"&&(n.ThirdLevelBody(),n.SelectedBodyListItems[0]=n.secondment.bodyLayer2),n.secondment.bodyLayer2.Description1=="Γ.Γ.Δ.Β.Μ.Ν.Γ. - Δημόσια ΙΕΚ"&&(n.SelectedBodyListItems=[],n.SelectedSelectedBodyListItems=[],n.IEKForPrefecture()))};n.setRegion3=function(){n.secondment.bodyLayer3!=null&&(n.secondment.bodyLayer3.Description1!="Γ.Γ.Δ.Β.Μ.Ν.Γ. - Δημόσια ΙΕΚ"&&n.secondment.bodyLayer3.Description1!="Άλλο Τμήμα - Υπηρεσία"&&(n.SelectedBodyListItems[0]=n.secondment.bodyLayer3),n.secondment.bodyLayer3.Description3=="Άλλο Τμήμα - Υπηρεσία"?n.details=!0:(n.details=!1,n.secondment.details=""))};n.hasregions2=function(){return n.secondLevelBody[0]!=null&&n.secondLevelBody!="undefined"?n.secondLevelBody[0].RegionAndUnitId2!=null?!0:!1:!1};n.hasregions3=function(){return n.thirdLevelBody[0]!=null&&n.thirdLevelBody!="undefined"?n.thirdLevelBody[0].RegionAndUnitId3!=null?!0:!1:!1};n.hasIEK=function(){if(n.secondment.bodyLayer2!=null&&n.secondment.bodyLayer2!="undefined")return n.secondment.bodyLayer2.Description1=="Γ.Γ.Δ.Β.Μ.Ν.Γ. - Δημόσια ΙΕΚ"?!0:!1};n.goToRegions=function(){var t,i;$("#SecondmentGeneralStep1").valid()&&(n.personalStep=!1,n.regionStep=!0,u.scrollTo(0,0),n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"?n.secondmentYearSubType.ApplicationSubTypeId==2||n.secondmentYearSubType.ApplicationSubTypeId==3?v.isEmpty(n.SelectedPyspdeListItems)&&v.getByParams({applicationId:n.secondment.Id,level:n.secondment.LevelId},"/api/SecondmentGeneralController/getApplPyspdeById").then(function(t){n.SelectedAvailPyspdeItems=t;n.SelectedPyspdeListItems=t;angular.copy(n.consts.pyspde,n.AvailablePyspdeListItems);n.removeDuplicatesPyspdeForDualList()},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των πιθανών ασθενειών","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):n.secondmentYearSubType.ApplicationSubTypeId==4?(v.isEmpty(n.SelectedPyspdeListItems)&&v.getByParams({applicationId:n.secondment.Id,level:n.secondment.LevelId},"/api/SecondmentGeneralController/getApplPyspdeById").then(function(t){n.SelectedAvailPyspdeItems=t;n.SelectedPyspdeListItems=t;angular.copy(n.consts.pyspde,n.AvailablePyspdeListItems);n.removeDuplicatesPyspdeForDualList()},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των πιθανών ασθενειών","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),n.person.CanHaveKeddy&&v.isEmpty(n.SelectedKeddyListItems)&&(t=f.all([v.getByParams({applicationType:n.applicationForRegions},"/api/ApplicationTypeRegionAndUnit/getKesyForSecondment"),v.getByParams({applicationId:n.secondment.Id},"/api/SecondmentGeneralController/getApplKesyById")]),t.then(function(t){n.SelectedKeddyListItems=t[1];n.SelectedAvailKeddyItems=t[1];angular.copy(t[0],n.AvailableKeddyListItems);n.removeDuplicatesKeddyForDualList()},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")}))):n.secondmentYearSubType.ApplicationSubTypeId==5&&(i=f.all([v.getByParams({id:n.secondment.Id},"/api/SecondmentGeneralController/getApplBodyById"),n.FirstLevelBody()]),i.then(function(t){n.SelectedBodies=t[0];n.SelectedBodies[0].Description1=="Γ.Γ.Δ.Β.Μ.Ν.Γ. - Δημόσια ΙΕΚ"?(n.secondment.bodyLayer1=n.SelectedBodies[0],n.secondment.bodyLayer2=n.SelectedBodies[0],n.SelectedAvailBodyItems=t[0],n.SelectedBodyListItems=t[0],n.SecondLevelBody(),n.IEKForPrefecture()):(n.SelectedBodyListItems[0]=n.SelectedBodies[0],n.secondment.bodyLayer1=n.SelectedBodies[0],n.secondment.bodyLayer1.Description1=="Άλλος Φορέας"?(n.secondment.details=n.SelectedBodies[0].Details,n.details=!0):n.details=!1,n.SecondLevelBody(),n.secondment.bodyLayer2=n.SelectedBodies[0],n.secondment.bodyLayer2.RegionAndUnitId2!=null&&n.secondment.bodyLayer2.RegionAndUnitId2!=""&&(n.ThirdLevelBody(),n.secondment.bodyLayer3=n.SelectedBodies[0],n.secondment.bodyLayer3.Description3=="Άλλο Τμήμα - Υπηρεσία"?(n.secondment.details=n.SelectedBodies[0].Details,n.details=!0):n.details=!1))},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})):n.secondmentYearSubType.ApplicationSubTypeId==2||n.secondmentYearSubType.ApplicationSubTypeId==3?(angular.copy(n.consts.pyspde,n.AvailablePyspdeListItems),n.removeDuplicatesPyspdeForDualListForInsert()):n.secondmentYearSubType.ApplicationSubTypeId==4?(angular.copy(n.consts.pyspde,n.AvailablePyspdeListItems),n.removeDuplicatesPyspdeForDualListForInsert(),n.person.CanHaveKeddy&&v.getByParams({applicationType:n.applicationForRegions},"/api/ApplicationTypeRegionAndUnit/getKesyForSecondment").then(function(t){n.AvailableKeddyListItems=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})):n.secondmentYearSubType.ApplicationSubTypeId==5&&n.FirstLevelBody())};n.goToPersonal=function(){n.personalStep=!0;n.regionStep=!1;u.scrollTo(0,0)};n.InsOrUpd=function(t){n.secondment.DidacticYearApplSubTypeId=i("filter")(n.ApplicationSubTypeInitialList,{DidacticYearId:n.secondment.DidacticYearId,ApplicationSubTypeId:n.secondmentYearSubType.ApplicationSubTypeId},!0)[0].Id;var u={Pyspde:n.SelectedPyspdeListItems,Keddy:n.SelectedKeddyListItems,BodyRegionAndUnit:n.SelectedBodyListItems,SecondmentGeneral:n.secondment,secDetails:n.secondment.details,SecondmentGeneralCV:n.SendDataForCVFullDto,Status:t,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Disease:n.SelectedDiseaseListItems},r=u;n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"?v.postByParams(r,"/api/SecondmentGeneralController/updateSecondmentGeneral").then(function(){e.setPersonId(n.secondment.PersonId);v.isValueInArray(n.pageRules.secGeneral.CanAccess,"u1, u2")?o.go("history"):o.go("history")}).catch(function(n){s.pop("error","Παρουσιάστηκε σφάλμα",n.data)}):v.postByParams(r,"/api/SecondmentGeneralController/insertSecondmentGeneral").then(function(){e.setPersonId(n.secondment.PersonId);v.isValueInArray(n.pageRules.secGeneral.CanAccess,"u1, u2")?o.go("history"):o.go("history")}).catch(function(n){s.pop("error","Παρουσιάστηκε σφάλμα",n.data)})};n.saveAction=function(i){if(n.showAlertRegions=(n.secondmentYearSubType.ApplicationSubTypeId==2||n.secondmentYearSubType.ApplicationSubTypeId==3)&&v.isEmpty(n.SelectedPyspdeListItems)?!0:!1,n.showAlertKeddys=n.secondmentYearSubType.ApplicationSubTypeId==4&&v.isEmpty(n.SelectedKeddyListItems)&&v.isEmpty(n.SelectedPyspdeListItems)?!0:!1,n.showAlertHasEAEQualification=n.secondmentYearSubType.ApplicationSubTypeId!=4||i!="final"||n.secondment.HasEAEQualification?!1:!0,n.showAlertHasDidacticExperience=n.secondmentYearSubType.ApplicationSubTypeId!=4||i!="final"||n.secondment.HasDidacticExperience||v.isEmpty(n.SelectedKeddyListItems)?!1:!0,n.showAlertBodyRegions=n.secondmentYearSubType.ApplicationSubTypeId==5&&!v.isEmptyValue(n.bodyLayer2)&&n.secondment.bodyLayer2.Description1=="Γ.Γ.Δ.Β.Μ.Ν.Γ. - Δημόσια ΙΕΚ"&&v.isEmpty(n.SelectedBodyListItems)?!0:!1,n.showAlertForUploadCV=!1,$("#SecondmentGeneralStep2").valid()&&!n.showAlertRegions&&!n.showAlertKeddys&&!n.showAlertBodyRegions&&!n.showAlertPyspdeFormOfficial&&!n.showAlertHasEAEQualification)if(i=="final"){var u=t.open({templateUrl:"ModalContent.html",controller:OpenModalController});u.result.then(function(t){t&&n.InsOrUpd(i)},function(){r.info("Modal dismissed at: "+new Date)})}else n.InsOrUpd(i)};n.getMunicipalityByPyspde=function(){v.getByParams({pyspdeId:n.secondment.LocalityPyspdeId},"/api/RegionAndUnit/getMunicipalityByPyspde").then(function(t){n.consts.pyspdeMunicipality=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})};n.checkForMusic=function(t){t.lastIndexOf("ΠΕ79",0)===0||t.lastIndexOf("ΤΕ16",0)===0?n.showMusic=!0:(n.showMusic=!1,n.secondment.NoMusicSchool=!1)};n.removeDuplicatesDiseaseForDualList=function(){angular.forEach(n.SelectedAvailDiseaseItems,function(t){for(var i=n.AvailableDiseaseListItems.length-1;i>=0;i--)n.AvailableDiseaseListItems[i].Id==t.Id&&n.AvailableDiseaseListItems.splice(i,1)});n.SelectedAvailDiseaseItems=[];n.SelectedSelectedDiseaseListItems=[]};n.changeDidacticYear=function(){n.ApplicationSubTypeList=n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"?i("filter")(n.ApplicationSubTypeInitialList,{DidacticYearId:n.secondment.DidacticYearId},!0):i("filter")(n.ApplicationSubTypeInitialList,{IsActive:!0,DidacticYearId:n.secondment.DidacticYearId},!0)};n.doAll=function(){var t=f.all([v.getByAll("/api/SecondmentGeneralController/getDidacticYearApplSubTypeDetails"),v.getByAll("/api/SecondmentGeneralController/getPriorityTypes"),]);t.then(function(t){if(n.PriorityTypeList=t[1],n.DidacticYearList=t[0].DidacticYear,n.DidacticYearListAll=t[0].DidacticYearAll,n.ApplicationSubTypeInitialList=t[0].DidacticYearApplSubType,n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"){angular.copy(n.DidacticYearListAll,n.DidacticYearList);n.AvailablePyspdeListItems=[];var r=f.all([v.getByParams({id:n.secondment.PersonId},"/api/Person/GetSecondmentPersonDto"),v.getByParams({id:n.secondment.Id},"/api/SecondmentGeneralController/getSecondmentGeneralById"),v.getByParams({personId:n.secondment.PersonId,applicationId:n.secondment.Id},"/api/SecondmentGeneralController/GetDetailsForCVFromPersonIdAndApplicationId"),v.getByAll("/api/SecondmentGeneralController/getDiseases"),v.getByParams({applicationId:n.secondment.Id},"/api/SecondmentGeneralController/getSecondmentDiseaseById"),]);r.then(function(t){n.person=t[0];angular.copy(t[3],n.AvailableDiseaseListItems);n.SelectedDiseaseListItems=t[4];n.SelectedAvailDiseaseItems=t[4];n.removeDuplicatesDiseaseForDualList();angular.copy(n.ApplicationSubTypeInitialList,n.ApplicationSubTypeList);n.PlacementTypeList=n.person.IsEEPEBP?[{Description:"ΣΜΕΑΕ",Id:1},{Description:"Μουσικό Σχολείο",Id:2},{Description:"Καλλιτεχνικό Σχολείο",Id:3},{Description:"Διαπολιτισμικό Σχολείο",Id:4},{Description:"ΣΜΕΑ Braille",Id:5},{Description:"ΣΜΕΑ Νοηματικής Γλώσσας",Id:6},{Description:"ΣΔΕΥ-ΚΕΔΑΣΥ",Id:7},{Description:"ΚΕΔΑΣΥ",Id:8},]:[{Description:"ΣΜΕΑΕ",Id:1},{Description:"Μουσικό Σχολείο",Id:2},{Description:"Καλλιτεχνικό Σχολείο",Id:3},{Description:"Διαπολιτισμικό Σχολείο",Id:4}];n.secondment=t[1];var r=i("filter")(n.ApplicationSubTypeInitialList,{Id:n.secondment.DidacticYearApplSubTypeId},!0)[0];n.secondmentYearSubType.ApplicationSubTypeId=r.ApplicationSubTypeId;n.setApplicationTypeFromSubType();v.isEmptyValue(t[2])||(n.SendDataForCVFullDto=t[2],n.SendDataForCVDto.Id=t[2].Id,n.uploadedFileDetails="<h4>Έχετε μεταφορτώσει:<\/h4><ul><li>Αρχείο: "+n.SendDataForCVFullDto.FileName+" <\/li><li>Μέγεθος: "+n.SendDataForCVFullDto.FileSize+" <\/li><li>Ημερομηνία: "+i("date")(n.SendDataForCVFullDto.UploadDateTime,"dd/MM/yyyy - HH:mm:ss")+" <\/li><\/ul>");n.getDateForProposal();n.secondment.SpecialityId=t[0].Speciality.Id;n.checkForMusic(t[0].Speciality.Code);n.paramsForCheckUpd.personId=n.secondment.PersonId;n.paramsForCheckUpd.levelUser=n.authentication.levelId;n.paramsForCheckUpd.regionAndUnitId=n.authentication.regionAndUnitId;n.paramsForCheckUpd.userRole=n.authentication.role;n.paramsForCheckUpd.specialityId=n.secondment.SpecialityId;n.paramsForCheckUpd.applicationLevelId=n.secondment.LevelId;n.paramsForCheckUpd.applicationTypeId=n.applicationType;n.paramsForCheckUpd.IsActive=n.secondment.IsActive;n.paramsForCheckUpd.FekId=n.secondment.FekId;v.postByParams(n.paramsForCheckUpd,"/api/SecondmentGeneralController/checkUpdateSecGeneralFromUser").then(function(t){n.IsDisabled=!t;n.IsDisabled&&(n.noUpdAccess=!0);v.isValueInArray(n.pageRules.secGeneral.CanAccess,"u1, u2")&&n.secondment.IsActive&&!n.secondment.IsTemporaryStored&&(n.IsDisabled=!0,n.cannotUpdate=!0);n.secondment.IsActive||(n.IsDisabled=!0,n.notActive=!0);v.isValueInArray(n.pageRules.secGeneral.CanAccess,"d1, d2, p")&&n.secondment.OfficialRegionAndUnitId!=n.authentication.regionAndUnitId&&(n.IsDisabled=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.secGeneral.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0);r.IsActive||(n.IsDisabled=!0);v.isEmpty(n.secondment.SecondmentGeneralProtocols)||(n.protocol=n.secondment.SecondmentGeneralProtocols[0].ProtocolString,n.showProtocol=!0);n.getOfficialPlacementUnits()})})}else n.canInsertAppl&&n.secondment.PersonId!=null&&n.secondment.PersonId!=""&&n.secondment.PersonId!="undefined"&&(n.AvailablePyspdeListItems=[],v.getByParams({id:n.secondment.PersonId},"/api/Person/GetSecondmentPersonDto").then(function(t){n.person=t;v.getByAll("/api/SecondmentGeneralController/getDiseases").then(function(t){n.AvailableDiseaseListItems=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία φόρτωσης ασθενειών")});n.PlacementTypeList=n.person.IsEEPEBP?[{Description:"ΣΜΕΑΕ",Id:1},{Description:"Μουσικό Σχολείο",Id:2},{Description:"Καλλιτεχνικό Σχολείο",Id:3},{Description:"Διαπολιτισμικό Σχολείο",Id:4},{Description:"ΣΜΕΑ Braille",Id:5},{Description:"ΣΜΕΑ Νοηματικής Γλώσσας",Id:6},{Description:"ΣΔΕΥ-ΚΕΔΑΣΥ",Id:7},{Description:"ΚΕΔΑΣΥ",Id:8},]:[{Description:"ΣΜΕΑΕ",Id:1},{Description:"Μουσικό Σχολείο",Id:2},{Description:"Καλλιτεχνικό Σχολείο",Id:3},{Description:"Διαπολιτισμικό Σχολείο",Id:4}];n.getDateForProposal();n.secondment.SpecialityId=t.Speciality.Id;n.checkForMusic(t.Speciality.Code);n.secondment.OfficialRegionAndUnitId=t.OfficialRegionAndUnit.Id;n.secondment.OfficialPlacementUnitDescription=t.OfficialPlacementUnitDescription;n.secondment.PostingTransferAreaId=t.PostingTransferArea==null?null:t.PostingTransferArea.Id;n.secondment.ExperienceYears=t.ExperienceYears;n.secondment.ExperienceDays=t.ExperienceDays;n.secondment.ExperienceMonths=t.ExperienceMonths;n.secondment.NominationYear=t.NominationYear;n.secondment.LevelId=t.OfficialRegionAndUnit.LevelId;n.secondment.LocalityPyspdeId=t.LocalityPyspdeId;n.secondment.LocalityMunicipalityId=t.LocalityMunicipalityId;n.getOfficialPlacementUnits()},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}))})};n.btnPyspdeUp=function(){for(var t,r,u,f=n.SelectedSelectedPyspdeListItems,i=0;i<n.SelectedSelectedPyspdeListItems.length;i++){if(t=n.SelectedPyspdeListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedPyspdeListItems[i].Id),t<=0||t>=n.SelectedPyspdeListItems.length)return;r=n.SelectedPyspdeListItems[t];u=n.SelectedPyspdeListItems[t-1];n.SelectedPyspdeListItems[t-1]=r;n.SelectedPyspdeListItems[t]=u}};n.btnPyspdeDown=function(){for(var t,r,u,i=n.SelectedSelectedPyspdeListItems.length-1;i>=0;i--){if(t=n.SelectedPyspdeListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedPyspdeListItems[i].Id),t<0||t>=n.SelectedPyspdeListItems.length-1)return;r=n.SelectedPyspdeListItems[t];u=n.SelectedPyspdeListItems[t+1];n.SelectedPyspdeListItems[t+1]=r;n.SelectedPyspdeListItems[t]=u}};n.btnPyspdeRight=function(){n.checkRegions();n.canInsertRegions&&(angular.forEach(n.SelectedAvailPyspdeItems,function(n){this.push(n)},n.SelectedPyspdeListItems),angular.forEach(n.SelectedAvailPyspdeItems,function(t){for(var i=n.AvailablePyspdeListItems.length-1;i>=0;i--)n.AvailablePyspdeListItems[i].Id==t.Id&&n.AvailablePyspdeListItems.splice(i,1)}),n.SelectedAvailPyspdeItems=[],n.SelectedSelectedPyspdeListItems=[]);n.checkSelectedFromOfficial()};n.checkRegions=function(){var t=5;n.canInsertRegions=!0;n.SelectedPyspdeListItems.length+n.SelectedAvailPyspdeItems.length>t&&(s.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών","Δεν μπορείτε να επιλέξετε περισσότερες από "+t+" περιοχές"),n.canInsertRegions=!1)};n.btnPyspdeLeft=function(){angular.forEach(n.SelectedSelectedPyspdeListItems,function(n){this.push(n)},n.AvailablePyspdeListItems);angular.forEach(n.SelectedSelectedPyspdeListItems,function(t){for(var i=n.SelectedPyspdeListItems.length-1;i>=0;i--)n.SelectedPyspdeListItems[i].Id==t.Id&&n.SelectedPyspdeListItems.splice(i,1)});n.SelectedSelectedPyspdeListItems=[];n.SelectedAvailPyspdeItems=[];n.checkSelectedFromOfficial()};n.removeDuplicatesKeddyForDualList=function(){angular.forEach(n.SelectedAvailKeddyItems,function(t){for(var i=n.AvailableKeddyListItems.length-1;i>=0;i--)n.AvailableKeddyListItems[i].Id==t.Id&&n.AvailableKeddyListItems.splice(i,1)});n.SelectedAvailKeddyItems=[];n.SelectedSelectedKeddyListItems=[]};n.SelectedAvailKeddyItems=[];n.SelectedSelectedKeddyListItems=[];n.SelectedKeddyListItems=[];n.btnKeddyUp=function(){for(var t,r,u,f=n.SelectedSelectedKeddyListItems,i=0;i<n.SelectedSelectedKeddyListItems.length;i++){if(t=n.SelectedKeddyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedKeddyListItems[i].Id),t<=0||t>=n.SelectedKeddyListItems.length)return;r=n.SelectedKeddyListItems[t];u=n.SelectedKeddyListItems[t-1];n.SelectedKeddyListItems[t-1]=r;n.SelectedKeddyListItems[t]=u}};n.btnKeddyDown=function(){for(var t,r,u,i=n.SelectedSelectedKeddyListItems.length-1;i>=0;i--){if(t=n.SelectedKeddyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedKeddyListItems[i].Id),t<0||t>=n.SelectedKeddyListItems.length-1)return;r=n.SelectedKeddyListItems[t];u=n.SelectedKeddyListItems[t+1];n.SelectedKeddyListItems[t+1]=r;n.SelectedKeddyListItems[t]=u}};n.btnKeddyRight=function(){n.checkKeddy();n.canInsertKeddy&&(angular.forEach(n.SelectedAvailKeddyItems,function(n){this.push(n)},n.SelectedKeddyListItems),angular.forEach(n.SelectedAvailKeddyItems,function(t){for(var i=n.AvailableKeddyListItems.length-1;i>=0;i--)n.AvailableKeddyListItems[i].Id==t.Id&&n.AvailableKeddyListItems.splice(i,1)}),n.SelectedAvailKeddyItems=[],n.SelectedSelectedKeddyListItems=[])};n.btnKeddyLeft=function(){angular.forEach(n.SelectedSelectedKeddyListItems,function(n){this.push(n)},n.AvailableKeddyListItems);angular.forEach(n.SelectedSelectedKeddyListItems,function(t){for(var i=n.SelectedKeddyListItems.length-1;i>=0;i--)n.SelectedKeddyListItems[i].Id==t.Id&&n.SelectedKeddyListItems.splice(i,1)});n.SelectedSelectedKeddyListItems=[];n.SelectedAvailKeddyItems=[]};n.checkKeddy=function(){var t=5;n.canInsertKeddy=!0;n.SelectedKeddyListItems.length+n.SelectedAvailKeddyItems.length>t&&(s.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος Κ.Ε.Σ.Υ.","Δεν μπορείτε να επιλέξετε περισσότερες από "+t+" Κ.Ε.Σ.Υ."),n.canInsertKeddy=!1)};n.onFileSelect=function(t){var r,i;for(n.messages={completed:"",percentage:"0",error:""},n.showAlertForUploadCV=!1,r=0;r<t.length;r++){if(i=t[r],i.type!="application/x-zip-compressed"&&i.type!="application/x-compressed"&&i.type!="application/zip"&&i.type!="multipart/x-zip"&&i.type!="application/pdf"){n.messages.error='Μη έγκυρη επέκταση αρχείου "'+i.name+'". Οι επεκτάσεις που υποστηρίζονται είναι: "<b>zip και pdf<\/b>" .';return}if(i.size>=10485760){n.messages.error='Το αρχείο "'+i.name+'" (<b>'+Math.round(i.size/1024)+" KB<\/b>) υπερβαίνει το μέγιστο επιτρεπόμενο μέγεθος μεταφόρτωσης <b>10000 KB<\/b>.";return}(function(t){n.upload[t]=y.upload({url:"/api/files/uploadSecondmentGeneral",method:"POST",data:{SendDataForCVDto:n.SendDataForCVDto},file:i}).progress(function(t){n.messages.percentage=parseInt(100*t.loaded/t.total)}).then(function(t){n.messages.completed="Το αρχείο <b>"+i.name+"<\/b> μεταφορτώθηκε με επιτυχία.";n.SendDataForCVDto.Id=t.data.secGeneralCV.Id;n.SendDataForCVFullDto=t.data.secGeneralCV;n.uploadedFileDetails=t.data.Message}).catch(function(t){n.messages.error=t.data.Message})})(r)}};n.abortUpload=function(t){n.upload[t].abort()};n.SelectedAvailDiseaseItems=[];n.SelectedSelectedDiseaseListItems=[];n.SelectedDiseaseListItems=[];n.btnDiseaseUp=function(){for(var t,r,u,f=n.SelectedSelectedDiseaseListItems,i=0;i<n.SelectedSelectedDiseaseListItems.length;i++){if(t=n.SelectedDiseaseListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedDiseaseListItems[i].Id),t<=0||t>=n.SelectedDiseaseListItems.length)return;r=n.SelectedDiseaseListItems[t];u=n.SelectedDiseaseListItems[t-1];n.SelectedDiseaseListItems[t-1]=r;n.SelectedDiseaseListItems[t]=u}};n.btnDiseaseDown=function(){for(var t,r,u,i=n.SelectedSelectedDiseaseListItems.length-1;i>=0;i--){if(t=n.SelectedDiseaseListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedDiseaseListItems[i].Id),t<0||t>=n.SelectedDiseaseListItems.length-1)return;r=n.SelectedDiseaseListItems[t];u=n.SelectedDiseaseListItems[t+1];n.SelectedDiseaseListItems[t+1]=r;n.SelectedDiseaseListItems[t]=u}};n.btnDiseaseRight=function(){angular.forEach(n.SelectedAvailDiseaseItems,function(n){this.push(n)},n.SelectedDiseaseListItems);angular.forEach(n.SelectedAvailDiseaseItems,function(t){for(var i=n.AvailableDiseaseListItems.length-1;i>=0;i--)n.AvailableDiseaseListItems[i].Id==t.Id&&n.AvailableDiseaseListItems.splice(i,1)});n.SelectedAvailDiseaseItems=[];n.SelectedSelectedDiseaseListItems=[]};n.btnDiseaseLeft=function(){angular.forEach(n.SelectedSelectedDiseaseListItems,function(n){this.push(n)},n.AvailableDiseaseListItems);angular.forEach(n.SelectedSelectedDiseaseListItems,function(t){for(var i=n.SelectedDiseaseListItems.length-1;i>=0;i--)n.SelectedDiseaseListItems[i].Id==t.Id&&n.SelectedDiseaseListItems.splice(i,1)});n.SelectedSelectedDiseaseListItems=[];n.SelectedAvailDiseaseItems=[]};n.downloadFile=function(){v.getByParamsDownload({PersonId:n.secondment.PersonId,Path:n.SendDataForCVFullDto.DirectPdfLink,ContentType:n.SendDataForCVFullDto.ContentType},"api/files/download").then(function(t){var p=t.status,s=t.headers,h=t.data,y="application/octet-stream",r=!1,f,c,l,e,u,v,i,o;s=s();f=n.SendDataForCVFullDto.FileName||"download.pdf";c=s["content-type"]||y;try{if(console.log("Trying saveBlob method ..."),i=new Blob([h],{type:c}),navigator.msSaveBlob)navigator.msSaveBlob(i,f);else{if(l=navigator.webkitSaveBlob||navigator.mozSaveBlob||navigator.saveBlob,l===undefined)throw"Not supported";l(i,f)}console.log("saveBlob succeeded");r=!0}catch(a){console.log("saveBlob method failed with the following exception:");console.log(a)}if(!r&&(e=window.URL||window.webkitURL||window.mozURL||window.msURL,e)){if(u=document.createElement("a"),"download"in u)try{console.log("Trying download link method with simulated click ...");i=new Blob([h],{type:c});o=e.createObjectURL(i);u.setAttribute("href",o);u.setAttribute("download",f);v=document.createEvent("MouseEvents");v.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null);u.dispatchEvent(v);console.log("Download link method with simulated click succeeded");r=!0}catch(a){console.log("Download link method with simulated click failed with the following exception:");console.log(a)}if(!r)try{console.log("Trying download link method with window.location ...");i=new Blob([h],{type:y});o=e.createObjectURL(i);window.location=o;console.log("Download link method with window.location succeeded");r=!0}catch(a){console.log("Download link method with window.location failed with the following exception:");console.log(a)}}r||(console.log("No methods worked for saving the arraybuffer, using last resort window.open"),window.open(httpPath,"_blank",""))},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση του αρχείου")})}};SecondmentGeneralController.$inject=["$scope","$uibModal","$filter","$log","$window","$q","PassParameters","$state","toaster","PersonFactory","SecondmentPyspdeChurchFactory","ApplicationTypeRegionAndUnitFactory","ApplicationTypeFekFactory","GeneralFactory","$upload"];SecondmentGeneralManagmentController=function(n,t,i,r,u,f,e,o){n.authentication.isAuth?n.authentication.isAuth&&!o.isValueInArray(o.getRoleCode(n.authentication.role),"a")&&f.go("forbidden"):f.go("/");n.DidacticYearList=[];o.getByAll("/api/SecondmentGeneralController/getDidacticYearsForSecondmentGeneral").then(function(t){n.DidacticYearList=t},function(){e.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ετών")});n.search={DidacticYearId:""};n.searchAction=function(){n.results=[];n.showResults=0;o.getByParams({didacticYear:n.search.DidacticYearId},"api/SecondmentGeneralController/getApplSubTypeDetailslByDidacticYear").then(function(t){n.results=t;n.showResults=1},function(n){e.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.changeSubType=function(n,t){o.getByParams({id:n,isActive:t},"/api/SecondmentGeneralController/UpdateDidacticYearApplSubTypeAsync").then(function(n){n?e.pop("success","Αλλαγή Κατάστασης","Η αλλαγή πραγματοποιήθηκε με επιτυχία",3e3,"trustedHtml"):e.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε η ενημέρωση ",3e3,"trustedHtml")},function(){e.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε η ενημέρωση ",3e3,"trustedHtml")})};n.changeDidacticYear=function(){n.showResults=0};n.addSubTypesForDidacticYear=function(){o.getByParams({didacticYear:n.search.DidacticYearId},"/api/SecondmentGeneralController/insertSubTypesForDidacticYear").then(function(){n.searchAction()}).catch(function(n){e.pop("error","Παρουσιάστηκε σφάλμα",n.data)})}};SecondmentGeneralManagmentController.$inject=["$scope","$q","$compile","PassParameters","$filter","$state","toaster","GeneralFactory","DTOptionsBuilder","DTColumnBuilder","AuthService"];SecondmentKesyController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y){function d(){n.IsDisabled?($("#DidacticYears :input").prop("disabled",!0),$("#DidacticYears").parent().find(".input-group-btn button").prop("disabled",!0),$("#DidacticMonths :input").prop("disabled",!0),$("#DidacticMonths").parent().find(".input-group-btn button").prop("disabled",!0),$("#DidacticDays :input").prop("disabled",!0),$("#DidacticDays").parent().find(".input-group-btn button").prop("disabled",!0),$("#AttachmentPages :input").prop("disabled",!0),$("#AttachmentPages").parent().find(".input-group-btn button").prop("disabled",!0),$("#ExperienceYears :input").prop("disabled",!0),$("#ExperienceYears").parent().find(".input-group-btn button").prop("disabled",!0),$("#ExperienceMonths :input").prop("disabled",!0),$("#ExperienceMonths").parent().find(".input-group-btn button").prop("disabled",!0),$("#ExperienceDays :input").prop("disabled",!0),$("#ExperienceDays").parent().find(".input-group-btn button").prop("disabled",!0)):($("#DidacticYears :input").prop("disabled",!1),$("#DidacticYears").parent().find(".input-group-btn button").prop("disabled",!1),$("#DidacticMonths :input").prop("disabled",!1),$("#DidacticMonths").parent().find(".input-group-btn button").prop("disabled",!1),$("#DidacticDays :input").prop("disabled",!1),$("#DidacticDays").parent().find(".input-group-btn button").prop("disabled",!1),$("#AttachmentPages :input").prop("disabled",!1),$("#AttachmentPages").parent().find(".input-group-btn button").prop("disabled",!1),$("#ExperienceYears :input").prop("disabled",!1),$("#ExperienceYears").parent().find(".input-group-btn button").prop("disabled",!1),$("#ExperienceMonths :input").prop("disabled",!1),$("#ExperienceMonths").parent().find(".input-group-btn button").prop("disabled",!1),$("#ExperienceDays :input").prop("disabled",!1),$("#ExperienceDays").parent().find(".input-group-btn button").prop("disabled",!1))}function g(){c.getMaritalStatusTypes().then(function(t){n.consts.maritalStatusType=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά τη φόρτωση των επιλογών οικογενειακής κατάταστασης","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function nt(){c.getMateProfessionTypes().then(function(t){n.consts.mateProfessionType=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά τη φόρτωση των επιλογών επαγγέλματος συζύγου","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function w(){c.getAllMunicipalities().then(function(t){n.municipalities=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά τη φόρτωση των Περιφερεικών Διευθύνσεων","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function b(){l.getPyspdeWithoutJointExaminationByLevel(n.applicationType,n.secondmentKesy.LevelId).then(function(t){n.consts.pyspde=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των πιθανών ασθενειών","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function k(){v.getByParams({level:n.secondmentKesy.LevelId},"/api/RegionAndUnit/getPyspdeByLevel").then(function(t){n.consts.pyspdeRegionJoin=t;n.consts.pyspdeRegionAndUnit=e("filter")(t,function(n){return n.Description!="Υπό Μετακίνηση"})},function(){},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}if(n.pageRules=[],n.secondmentKesy={IsTemporaryStored:!0},n.secondmentDocument={},n.consts={},n.levels={},n.applicationType=20,n.dateForProposal="",n.alerts=[{type:"danger",msg:"Δεν μπορείτε να υποβάλετε αίτηση. Για ήδη υποβληθείσα αίτηση μεταβείτε στο Ιστορικό Αιτήσεων."}],n.showAlertRegions=!1,n.alertRegions=[{type:"danger",msg:"Πρέπει να δηλώσετε τουλάχιστον μία επιλογή προτίμησης."}],n.alertPostingTransferAreaIdSecondLevel=[{type:"danger",msg:"Δεν έχετε δικαίωμα να υποβάλλετε αίτηση γιατί η οργανική σας θέση δεν ανήκει στη δευτεροβάθμια."}],n.showAddEditForm=0,n.personalStep=!0,n.maritalAndPointsCriteriaStep=!1,n.regionStep=!1,n.showLevel=!1,n.noUpdAccess=!1,n.upload=[],n.messages={completed:"",percentage:"0",error:""},n.uploadedFileDetails="",n.showAlertForUploadCV=!1,n.SendDataForCVDto={Id:"",SecondmentApplicationId:"",PersonId:""},n.SendDataForCVFullDto={Id:"",SecondmentApplicationId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""},n.DoctoralCounsellingGuidance=!1,n.PostgraduateCounsellingGuidance=!1,n.QualificationCertificateCounsellingGuidance=!1,n.ThreeYearsCounsellingGuidanceService=!1,n.secondmentKesy.UnderAgedOrStudingChildren=0,n.secondmentKesy.StudingChildren=0,n.protocol="",n.showProtocol=!1,n.showCounsellingGuidanceAlert=!1,n.AvailableKesyListItems=[],n.fek={},n.showMusic=!1,n.cannotUpdate=!1,n.notActive=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.PyspdeFormOfficial=0,n.concatPyspde="",n.messagePyspde="",n.isPostingTransferAreaIdSecondLevel=!0,n.pageRules={},n.IsDisabled=!1,n.authentication.isAuth){var p="secKesy";v.getByParams({role:n.authentication.role,codes:p},"/api/Subsystem/NewCheckPermission").then(function(t){var i=p.split(","),r,o;for(r in i)n.pageRules[i[r]]=e("filter")(t,{Code:i[r]},!0)[0].Rules;n.secondmentKesy.Id=f.getApplicationId();f.resetApplication();n.secondmentKesy.PersonId=f.getPersonId();v.isValueInArray(n.pageRules.secKesy.CanAccess,"u1, u2")&&(n.secondmentKesy.PersonId=n.authentication.personId);n.SendDataForCVDto.SecondmentApplicationId=n.secondmentKesy.Id;n.SendDataForCVDto.PersonId=n.secondmentKesy.PersonId;v.getByParams({personId:n.secondmentKesy.PersonId},"/api/SecondmentKesyController/GetDetailsForFile").then(function(t){t!=null&&(n.SendDataForCVFullDto=t,n.SendDataForCVDto.Id=t.Id,n.uploadedFileDetails="<h4>Έχετε μεταφορτώσει:<\/h4><ul><li>Αρχείο: "+n.SendDataForCVFullDto.FileName+" <\/li><li>Μέγεθος: "+n.SendDataForCVFullDto.FileSize+" <\/li><li>Ημερομηνία: "+e("date")(n.SendDataForCVFullDto.UploadDateTime,"dd/MM/yyyy - HH:mm:ss")+" <\/li><\/ul>")},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης επισυναπτόμενου Βιογραφικού")});o=u.all([a.isFekValidForApplicationTypeId(n.applicationType),c.canInsertApplication(n.secondmentKesy.PersonId),v.getByParams({personId:n.secondmentKesy.PersonId},"/api/SecondmentKesyController/isPostingTransferAreaIdSecondLevel")]);o.then(function(t){n.hasValidFek=t[0];n.fek=t[1];n.isPostingTransferAreaIdSecondLevel=t[2];n.fek.Id>0?n.isPostingTransferAreaIdSecondLevel?(n.canInsertAppl=!0,n.secondmentKesy.FekId=n.fek.Id):n.canInsertAppl=!1:n.canInsertAppl=!1;n.secondmentKesy.Id!=null&&n.secondmentKesy.Id!=""&&n.secondmentKesy.Id!="undefined"?(n.canUpdateAppl=!0,n.showAddEditForm=1):n.canInsertAppl&&n.hasValidFek?(n.canInsertAppl=!0,n.showAddEditForm=1):n.showAddEditForm=n.isPostingTransferAreaIdSecondLevel?2:3;n.fek.DisplayModal&&v.isEmptyValue(n.secondmentKesy.Id)?$("#alertModal").modal("show"):n.doAll();v.isEmptyValue(n.secondmentKesy.Id)&&(n.IsDisabled=!n.pageRules.secKesy.CanInsert)})},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else o.go("/");n.showAlertBlock=function(){return n.showMusic?n.secondmentKesy.NoRemoteUnit&&n.secondmentKesy.NoEducationalExecutive&&n.secondmentKesy.NoTenure&&n.secondmentKesy.NoTenureModelExpSchool&&n.secondmentKesy.NoMusic?!1:!0:n.secondmentKesy.NoRemoteUnit&&n.secondmentKesy.NoEducationalExecutive&&n.secondmentKesy.NoTenure&&n.secondmentKesy.NoTenureModelExpSchool?!1:!0};n.editPerson=function(){f.setPersonId(n.secondmentKesy.PersonId);o.go("stateEditPerson")};n.checkEAEQualifiactions=function(){var t=n.secondmentKesy.DoctoralCounsellingGuidance||n.secondmentKesy.PostgraduateCounsellingGuidance||n.secondmentKesy.QualificationCertificateCounsellingGuidance||n.secondmentKesy.ThreeYearsCounsellingGuidanceService;n.showCounsellingGuidanceAlert=n.secondmentKesy.DidacticYears<7||!t?!0:!1};g();nt();n.getOfficialPlacementUnits=function(){var t,i,r;t=n.secondmentKesy.Id!=null&&n.secondmentKesy.Id!=""&&n.secondmentKesy.Id!="undefined"?n.secondmentKesy.OfficialRegionAndUnitId:n.person.OfficialRegionAndUnit.Id;params={OfficialUnitAndRegionId:t,userLevel:n.authentication.levelId};i=n.person.OfficialUnitIsIntercultural||n.person.OfficialUnitIsArtistic||n.person.OfficialUnitIsMusic;r=u.all([v.getByAll("/api/RegionAndUnit/getRegionAndUnitForPlacement"),v.getByParams({OfficialRegionAndUnitId:t,specialUnit:i,applicationType:n.applicationType},"/api/RegionAndUnit/getPysdpeFromOfficialRegionAndUnitId"),]);r.then(function(t){n.OfficialPlacementUnits=t[0];n.PyspdeFormOfficial=t[1];n.changedRegionAndUnit()})};n.getPostingTranferAreas=function(){v.getByParams({id:n.secondmentKesy.OfficialRegionAndUnitId},"/api/RegionAndUnit/getPostingTransferAreaByRegionAndUnitId").then(function(t){n.PostingTranferAreas=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.changedRegionAndUnit=function(){n.checkForPostingTransferArea();n.getPostingTranferAreas()};n.getDateForProposal=function(){n.dateForProposal="31/8/"+n.applicationDidacticYear.YearFrom};n.checkForPostingTransferArea=function(){n.myfilter=e("filter")(n.OfficialPlacementUnits,{Id:n.secondmentKesy.OfficialRegionAndUnitId},!0)[0];n.myfilter.RegionAndUnitTypeId==8?(n.showPostingTransferArea=!0,n.showLevel=!1,n.secondmentKesy.LevelId=n.myfilter.LevelId,k(),b()):(v.getByAll("/api/Dbo/getLevelsAsync").then(function(t){n.levels=t;n.showLevel=!0;n.changeLevel()},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία φόρτωσης βαθμίδων επιλογής")}),n.showPostingTransferArea=!1,n.secondmentKesy.PostingTransferAreaId=null)};n.changeLevel=function(){n.secondmentKesy.LevelId==1&&(n.alertPostingTransferAreaIdSecondLevel=[{type:"danger",msg:"Δεν έχετε δικαίωμα να υποβάλλετε αίτηση γιατί η αίτηση δεν ανήκει στη δευτεροβάθμια."}],n.isPostingTransferAreaIdSecondLevel=!1,n.showAddEditForm=3);k();b()};n.changeMaritalStatus=function(){n.secondmentKesy.MaritalStatus==1||n.secondmentKesy.MaritalStatus==6?(n.secondmentKesy.MateProfession=0,n.secondmentKesy.JointServiceId=null,n.secondmentKesy.OtherMateProfession=null,n.secondmentKesy.ChildCustody=!1,n.showMateHealthProblems=!0):n.secondmentKesy.MaritalStatus==3||n.secondmentKesy.MaritalStatus==4?(n.secondmentKesy.MateProfession=0,n.secondmentKesy.JointServiceId=null,n.secondmentKesy.OtherMateProfession=null,n.secondmentKesy.ChildCustody=!1):n.secondmentKesy.MaritalStatus==2||n.secondmentKesy.MaritalStatus==5?(n.secondmentKesy.MateProfession=0,n.secondmentKesy.JointServiceId=null,n.secondmentKesy.OtherMateProfession=null,n.secondmentKesy.ChildCustody=!1):(n.secondmentKesy.MateProfession=0,n.secondmentKesy.JointServiceId=null,n.secondmentKesy.OtherMateProfession=null,n.secondmentKesy.ChildCustody=!1)};n.changeJointServiceId=function(){};n.changeUnderAgedOrStudingChildren=function(){n.secondmentKesy.UnderAgedOrStudingChildren==0&&n.secondmentKesy.StudingChildren==0&&(n.secondmentKesy.ChildCustody=!1);n.showChildCustody()};n.showMateProfession=function(){return n.secondmentKesy.MaritalStatus==1||n.secondmentKesy.MaritalStatus==6?!0:!1};n.showJointServiceId=function(){return n.secondmentKesy.MateProfession>0&&(n.secondmentKesy.MaritalStatus==1||n.secondmentKesy.MaritalStatus==6)?!0:!1};n.showChildCustody=function(){return(n.secondmentKesy.MaritalStatus==3||n.secondmentKesy.MaritalStatus==4)&&(n.secondmentKesy.UnderAgedOrStudingChildren>0||n.secondmentKesy.StudingChildren)?!0:!1};n.showUnderAgedOrStudingChildren=function(){return n.secondmentKesy.MaritalStatus==2||n.secondmentKesy.MaritalStatus==5?!0:!1};n.showOtherMateProfession=function(){return n.secondmentKesy.MateProfession==2&&(n.secondmentKesy.MaritalStatus==1||n.secondmentKesy.MaritalStatus==6)?!0:!1};n.changeMateProfession=function(){n.secondmentKesy.MateProfession==2||(n.secondmentKesy.MateProfession==1?n.secondmentKesy.OtherMateProfession=null:(n.secondmentKesy.OtherMateProfession=null,n.secondmentKesy.JointServiceId=null))};n.goToMaritalAndPointsCriteria=function(){n.checkEAEQualifiactions();$("#SecondmentKesyStep1").valid()&&!n.showCounsellingGuidanceAlert&&(n.personalStep=!1,n.maritalAndPointsCriteriaStep=!0,n.regionStep=!1,r.scrollTo(0,0))};n.clickLocality=function(){n.secondmentKesy.Locality==!1&&(n.secondmentKesy.LocalityPyspdeId=null);n.secondmentKesy.LocalityMunicipalityId=null};n.checkForMusic=function(t){t.lastIndexOf("ΠΕ79",0)===0||t.lastIndexOf("ΤΕ16",0)===0?n.showMusic=!0:(n.showMusic=!1,n.secondmentKesy.NoMusic=!1)};n.goToRegions=function(){if($("#SecondmentKesyStep2").valid()&&!n.ShowAlertMessageForMate)if(n.personalStep=!1,n.maritalAndPointsCriteriaStep=!1,n.regionStep=!0,r.scrollTo(0,0),n.secondmentKesy.Id!=null&&n.secondmentKesy.Id!=""&&n.secondmentKesy.Id!="undefined")if((n.secondmentDocument.Id==null||n.secondmentDocument.Id==""||n.secondmentDocument.Id=="undefined")&&v.getByParams({id:n.secondmentKesy.Id},"/api/SecondmentKesyController/getApplDocumentsById").then(function(t){n.secondmentDocument=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),v.isEmpty(n.SelectedKesyListItems)){var t=u.all([l.getKesy(n.secondmentKesy.RegionAndUnitId,n.applicationType),v.getByParams({applicationId:n.secondmentKesy.Id},"/api/SecondmentKesyController/getApplKesyById")]);t.then(function(t){n.SelectedKesyListItems=t[1];n.SelectedAvailKesyItems=t[1];angular.copy(t[0],n.AvailableKesyListItems);n.removeDuplicatesKesyForDualList()},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})}else n.SelectedAvailKesyItems=[],n.SelectedSelectedKesyListItems=[],n.SelectedKesyListItems=[];else w()};n.removeDuplicatesKesyForDualList=function(){angular.forEach(n.SelectedAvailKesyItems,function(t){for(var i=n.AvailableKesyListItems.length-1;i>=0;i--)n.AvailableKesyListItems[i].Id==t.Id&&n.AvailableKesyListItems.splice(i,1)});n.SelectedAvailKesyItems=[];n.SelectedSelectedKesyListItems=[]};n.goToPersonal=function(){n.personalStep=!0;n.maritalAndPointsCriteriaStep=!1;n.regionStep=!1;r.scrollTo(0,0)};n.InsOrUpd=function(t){var r={Kesy:n.SelectedKesyListItems,SecondmentKesy:n.secondmentKesy,Status:t,SecondmentDocument:n.secondmentDocument,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName},i=r;n.secondmentKesy.Id!=null&&n.secondmentKesy.Id!=""&&n.secondmentKesy.Id!="undefined"?c.updateSecondmentKesy(i).then(function(){f.setPersonId(n.secondmentKesy.PersonId);v.isValueInArray(n.pageRules.secKesy.CanAccess,"u1, u2")?o.go("history"):o.go("history")}).catch(function(n){s.pop("error","Παρουσιάστηκε σφάλμα",n.data)}):c.insertSecondmentKesy(i).then(function(){f.setPersonId(n.secondmentKesy.PersonId);v.isValueInArray(n.pageRules.secKesy.CanAccess,"u1, u2")?o.go("history"):o.go("history")}).catch(function(n){s.pop("error","Παρουσιάστηκε σφάλμα",n.data)})};n.saveAction=function(r){if(n.showAlertRegions=v.isEmpty(n.SelectedKesyListItems)?!0:!1,n.showAlertForUploadCV=!1,$("#SecondmentKesyStep3").valid()&&!n.showAlertRegions)if(r=="final"){var u=t.open({templateUrl:"ModalContent.html",controller:OpenModalController});u.result.then(function(t){t&&n.InsOrUpd(r)},function(){i.info("Modal dismissed at: "+new Date)})}else n.InsOrUpd(r)};n.changedMunicipality=function(){n.SelectedKesyListItems=[];n.SelectedSelectedKesyListItems=[];n.getApplKesy()};n.getApplKesy=function(){n.secondmentKesy.RegionAndUnitId>0?(n.AvailableKesyListItems=[],blockUI({target:"#divBlockUIRegion",animate:!0}),l.getKesy(n.secondmentKesy.RegionAndUnitId,n.applicationType).then(function(t){angular.copy(t,n.AvailableKesyListItems);n.SelectedAvailKesyItems=n.SelectedKesyListItems;n.removeDuplicatesKesyForDualList();unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(unblockUI("#divBlockUIRegion"),n.AvailableKesyListItems=[],n.SelectedKesyListItems=[],n.SelectedSelectedKesyListItems=[])};n.getMunicipalityByPyspde=function(){v.getByParams({pyspdeId:n.secondmentKesy.LocalityPyspdeId},"/api/RegionAndUnit/getMunicipalityByPyspde").then(function(t){n.consts.pyspdeMunicipality=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})};n.doAll=function(){if(n.secondmentKesy.Id!=null&&n.secondmentKesy.Id!=""&&n.secondmentKesy.Id!="undefined"){if(n.canUpdateAppl){n.AvailableKesyListItems=[];var t=u.all([v.getByParams({id:n.secondmentKesy.PersonId},"/api/Person/GetSecondmentPersonDto"),c.getSecondmentKesyById(n.secondmentKesy.Id)]);t.then(function(t){n.person=t[0];n.getDateForProposal();n.checkForMusic(t[0].Speciality.Code);n.secondmentKesy=t[1];n.secondmentKesy.SpecialityId=t[0].Speciality.Id;n.getMunicipalityByPyspde();v.isEmpty(n.secondmentKesy.SecondmentKesyProtocols)||(n.protocol=n.secondmentKesy.SecondmentKesyProtocols[0].ProtocolString,n.showProtocol=!0);n.paramsForCheckUpd.personId=n.secondmentKesy.PersonId;n.paramsForCheckUpd.levelUser=n.authentication.levelId;n.paramsForCheckUpd.regionAndUnitId=n.authentication.regionAndUnitId;n.paramsForCheckUpd.userRole=n.authentication.role;n.paramsForCheckUpd.specialityId=n.secondmentKesy.SpecialityId;n.paramsForCheckUpd.applicationLevelId=n.secondmentKesy.LevelId;n.paramsForCheckUpd.applicationTypeId=n.applicationType;n.paramsForCheckUpd.IsActive=n.secondmentKesy.IsActive;n.paramsForCheckUpd.FekId=n.secondmentKesy.FekId;v.postByParams(n.paramsForCheckUpd,"/api/General/checkUpdateSecFromFEKAndUser").then(function(t){n.IsDisabled=!t;n.IsDisabled&&(n.noUpdAccess=!0);v.isValueInArray(n.pageRules.secKesy.CanAccess,"u1, u2")&&n.secondmentKesy.IsActive&&!n.secondmentKesy.IsTemporaryStored&&(n.IsDisabled=!0,n.cannotUpdate=!0);n.secondmentKesy.IsActive||(n.IsDisabled=!0,n.notActive=!0);v.isValueInArray(n.pageRules.secKesy.CanAccess,"d1, d2, p")&&n.secondmentKesy.OfficialRegionAndUnitId!=n.authentication.regionAndUnitId&&(n.IsDisabled=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.secKesy.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0);d();n.getOfficialPlacementUnits();w()})})}}else n.canInsertAppl&&n.secondmentKesy.PersonId!=null&&n.secondmentKesy.PersonId!=""&&n.secondmentKesy.PersonId!="undefined"&&(n.AvailableKesyListItems=[],n.AvailableKeddyListItems=[],v.getByParams({id:n.secondmentKesy.PersonId},"/api/Person/GetSecondmentPersonDto").then(function(t){n.person=t;n.getDateForProposal();n.checkForMusic(t.Speciality.Code);n.secondmentKesy.DidacticYears=0;n.secondmentKesy.DidacticMonths=0;n.secondmentKesy.DidacticDays=0;n.secondmentKesy.SpecialityId=t.Speciality.Id;n.secondmentKesy.OfficialRegionAndUnitId=t.OfficialRegionAndUnit.Id;n.secondmentKesy.OfficialPlacementUnitDescription=t.OfficialPlacementUnitDescription;n.secondmentKesy.PostingTransferAreaId=t.PostingTransferArea===null?null:t.PostingTransferArea.Id;n.secondmentKesy.ExperienceYears=t.ExperienceYears;n.secondmentKesy.ExperienceDays=t.ExperienceDays;n.secondmentKesy.ExperienceMonths=t.ExperienceMonths;n.secondmentKesy.NominationYear=t.NominationYear;n.secondmentKesy.LevelId=t.OfficialRegionAndUnit.LevelId;n.secondmentKesy.MaritalStatus=t.MaritalStatus;n.changeMaritalStatus();n.secondmentKesy.UnderAgedOrStudingChildren=t.UnderAgedOrStudingChildren;n.secondmentKesy.StudingChildren=t.StudingChildren;n.secondmentKesy.LocalityPyspdeId=t.LocalityPyspdeId;n.secondmentKesy.LocalityMunicipalityId=t.LocalityMunicipalityId;n.secondmentKesy.JointServiceId=t.JointServiceId;n.secondmentKesy.LocalityPyspdeId!=null&&(n.secondmentKesy.Locality=!0,n.getMunicipalityByPyspde());n.secondmentKesy.JointServiceId!=null&&(n.secondmentKesy.MateProfession=t.MateRegistryNo!=null?1:2,n.changeMateProfession());n.secondmentKesy.MateRegistryNo=t.MateRegistryNo;n.secondmentKesy.MateRegistryNo!=null&&(n.secondmentKesy.JointExamination=!0);n.secondmentKesy.ChildCustody=n.secondmentKesy.MaritalStatus==3||n.secondmentKesy.MaritalStatus==4?t.Custody:!1;n.showMateProfession();n.getOfficialPlacementUnits()},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}))};n.cancelNewApplication=function(){$("#alertModal").modal("hide");o.go("/")};n.acceptNewApplication=function(){n.secondmentKesy.MilitaryMate=!0;n.DisableOtherChks("MilitaryMate");n.disabled.MilitaryMate=!0;$("#alertModal").modal("hide");n.doAll()};n.SelectedAvailKesyItems=[];n.SelectedSelectedKesyListItems=[];n.SelectedKesyListItems=[];n.btnKesyUp=function(){for(var t,r,u,f=n.SelectedSelectedKesyListItems,i=0;i<n.SelectedSelectedKesyListItems.length;i++){if(t=n.SelectedKesyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedKesyListItems[i].Id),t<=0||t>=n.SelectedKesyListItems.length)return;r=n.SelectedKesyListItems[t];u=n.SelectedKesyListItems[t-1];n.SelectedKesyListItems[t-1]=r;n.SelectedKesyListItems[t]=u}};n.btnKesyDown=function(){for(var t,r,u,i=n.SelectedSelectedKesyListItems.length-1;i>=0;i--){if(t=n.SelectedKesyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedKesyListItems[i].Id),t<0||t>=n.SelectedKesyListItems.length-1)return;r=n.SelectedKesyListItems[t];u=n.SelectedKesyListItems[t+1];n.SelectedKesyListItems[t+1]=r;n.SelectedKesyListItems[t]=u}};n.btnKesyRight=function(){n.checkRegions();n.canInsertRegions&&(angular.forEach(n.SelectedAvailKesyItems,function(n){this.push(n)},n.SelectedKesyListItems),angular.forEach(n.SelectedAvailKesyItems,function(t){for(var i=n.AvailableKesyListItems.length-1;i>=0;i--)n.AvailableKesyListItems[i].Id==t.Id&&n.AvailableKesyListItems.splice(i,1)}),n.SelectedAvailKesyItems=[],n.SelectedSelectedKesyListItems=[])};n.checkRegions=function(){var t=5;n.canInsertRegions=!0;n.SelectedKesyListItems.length+n.SelectedAvailKesyItems.length>t&&(s.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών","Δεν μπορείτε να επιλέξετε περισσότερα από "+t+" ΚΕΣΥ"),n.canInsertRegions=!1)};n.btnKesyLeft=function(){angular.forEach(n.SelectedSelectedKesyListItems,function(n){this.push(n)},n.AvailableKesyListItems);angular.forEach(n.SelectedSelectedKesyListItems,function(t){for(var i=n.SelectedKesyListItems.length-1;i>=0;i--)n.SelectedKesyListItems[i].Id==t.Id&&n.SelectedKesyListItems.splice(i,1)});n.SelectedSelectedKesyListItems=[];n.SelectedAvailKesyItems=[]};n.onFileSelect=function(t){var r,i;for(n.messages={completed:"",percentage:"0",error:""},n.showAlertForUploadCV=!1,r=0;r<t.length;r++){if(i=t[r],i.type!="application/x-zip-compressed"&&i.type!="application/x-compressed"&&i.type!="application/zip"&&i.type!="multipart/x-zip"&&i.type!="application/pdf"){n.messages.error='Μη έγκυρη επέκταση αρχείου "'+i.name+'". Οι επεκτάσεις που υποστηρίζονται είναι: "<b>zip και pdf<\/b>" .';return}if(i.size>=10485760){n.messages.error='Το αρχείο "'+i.name+'" (<b>'+Math.round(i.size/1024)+" KB<\/b>) υπερβαίνει το μέγιστο επιτρεπόμενο μέγεθος μεταφόρτωσης <b>10000 KB<\/b>.";return}(function(t){n.upload[t]=y.upload({url:"/api/files/uploadKesy",method:"POST",data:{SendDataForCVDto:n.SendDataForCVDto},file:i}).progress(function(t){n.messages.percentage=parseInt(100*t.loaded/t.total)}).then(function(t){n.messages.completed="Το αρχείο <b>"+i.name+"<\/b> μεταφορτώθηκε με επιτυχία.";n.SendDataForCVDto.Id=t.data.secKESYFile.Id;n.SendDataForCVFullDto=t.data.secKESYFile;n.uploadedFileDetails=t.data.Message}).catch(function(t){n.messages.error=t.data.Message})})(r)}};n.abortUpload=function(t){n.upload[t].abort()};n.downloadFile=function(){v.getByParamsDownload({PersonId:n.secondmentKesy.PersonId,Path:n.SendDataForCVFullDto.DirectPdfLink,ContentType:n.SendDataForCVFullDto.ContentType},"api/files/download").then(function(t){var p=t.status,s=t.headers,h=t.data,y="application/octet-stream",r=!1,f,c,l,e,u,v,i,o;s=s();f=n.SendDataForCVFullDto.FileName||"download.pdf";c=s["content-type"]||y;try{if(console.log("Trying saveBlob method ..."),i=new Blob([h],{type:c}),navigator.msSaveBlob)navigator.msSaveBlob(i,f);else{if(l=navigator.webkitSaveBlob||navigator.mozSaveBlob||navigator.saveBlob,l===undefined)throw"Not supported";l(i,f)}console.log("saveBlob succeeded");r=!0}catch(a){console.log("saveBlob method failed with the following exception:");console.log(a)}if(!r&&(e=window.URL||window.webkitURL||window.mozURL||window.msURL,e)){if(u=document.createElement("a"),"download"in u)try{console.log("Trying download link method with simulated click ...");i=new Blob([h],{type:c});o=e.createObjectURL(i);u.setAttribute("href",o);u.setAttribute("download",f);v=document.createEvent("MouseEvents");v.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null);u.dispatchEvent(v);console.log("Download link method with simulated click succeeded");r=!0}catch(a){console.log("Download link method with simulated click failed with the following exception:");console.log(a)}if(!r)try{console.log("Trying download link method with window.location ...");i=new Blob([h],{type:y});o=e.createObjectURL(i);window.location=o;console.log("Download link method with window.location succeeded");r=!0}catch(a){console.log("Download link method with window.location failed with the following exception:");console.log(a)}}r||(console.log("No methods worked for saving the arraybuffer, using last resort window.open"),window.open(httpPath,"_blank",""))},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση του αρχείου")})}};SecondmentKesyController.$inject=["$scope","$uibModal","$log","$window","$q","PassParameters","$filter","$state","toaster","PersonFactory","SecondmentKesyFactory","ApplicationTypeRegionAndUnitFactory","ApplicationTypeFekFactory","GeneralFactory","$upload"];SecondmentManagement=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v){function b(t){i(angular.element(t).contents())(n)}function k(t){n.paramsForDataTable[y]=t;var i=!1,r=!1;switch(t.ApplicationType){case 7:i=n.pageRules.secPyspde.CanBlock;r=n.pageRules.secPyspde.CanCheck;break;case 8:i=n.pageRules.secBody.CanBlock;r=n.pageRules.secBody.CanCheck;break;case 9:i=n.pageRules.secSmea.CanBlock;r=n.pageRules.secSmea.CanCheck;break;case 10:i=n.pageRules.secArtistic.CanBlock;r=n.pageRules.secArtistic.CanCheck;break;case 11:i=n.pageRules.secMusic.CanBlock;r=n.pageRules.secMusic.CanCheck;break;case 12:i=n.pageRules.secBody1920.CanBlock;r=n.pageRules.secBody1920.CanCheck;break;case 13:i=n.pageRules.secBodyRef.CanBlock;r=n.pageRules.secBodyRef.CanCheck;break;case 17:i=n.pageRules.secChurch.CanBlock;r=n.pageRules.secChurch.CanCheck;break;case 18:i=n.pageRules.secBodySep.CanBlock;r=n.pageRules.secBodySep.CanCheck;break;case 20:i=n.pageRules.secKesy.CanBlock;r=n.pageRules.secKesy.CanCheck;break;case 22:i=n.pageRules.secBodyTechnical.CanBlock;r=n.pageRules.secBodyTechnical.CanCheck;break;case 42:i=n.pageRules.secEEPEBP.CanBlock;r=n.pageRules.secEEPEBP.CanCheck;break;default:i=!1;r=!1}return stringButtons='<button type="button" class="btn btn-primary btn-xs" uib-tooltip="Λοιπές ενέργειες" data-toggle="modal" data-target="#actionsModal" ng-click="openOtherActionsModal(paramsForDataTable['+y+'])"><i class="fa fa-cog"><\/i><\/button>',n.search.Status==1?i&&(stringButtons=stringButtons+'<button type="button" class="btn btn-success btn-xs" uib-tooltip="Έλεγχος αίτησης" data-toggle="modal" data-target="#blockModal" ng-click="openModal(paramsForDataTable['+y+'])"><i class="fa fa-check-circle"><\/i><\/button> <\/div>'):n.search.Status==2?(i&&(stringButtons=stringButtons+'<button type="button" class="btn btn-warning btn-xs" uib-tooltip="Αναίρεση ελέγχου" data-toggle="modal" data-target="#discardBlockModal" ng-click="openModal(paramsForDataTable['+y+'])"><i class="fa fa-check-circle"><\/i><\/button> <\/div>'),r&&(stringButtons=stringButtons+'<button type="button" class="btn btn-success btn-xs" uib-tooltip="Έγκριση αίτησης" data-toggle="modal" data-target="#checkModal" ng-click="openModal(paramsForDataTable['+y+'])"><i class="fa fa-thumbs-o-up"><\/i><\/button> <\/div>')):n.search.Status==3&&r&&(stringButtons=stringButtons+'<button type="button" class="btn btn-success btn-xs" uib-tooltip="Αναίρεση έγκρισης" data-toggle="modal" data-target="#discardCheckModal" ng-click="openModal(paramsForDataTable['+y+'])"><i class="fa fa-thumbs-o-up"><\/i><\/button> <\/div>'),y=y+1,stringButtons}var p,y,w;n.ApplicationType={};n.RegionAndUnitList=[];n.showRegionAndUnitList=!1;n.dtInstance={};n.search={applicationTypeId:"",regionAndUnitId:"",Status:""};n.blockDto={Id:"",ApplicationType:"",IsBlocked:!1,BlockDetails:"",BlockedDate:"",IsChecked:!1,CheckedDate:"",Status:"",DiscardAction:!1,UnitName:"",Role:""};n.otherActionsTmp=[{Description:"Εκτύπωση αίτησης",Action:1,Export:!0},{Description:"Προβολή / Επεξεργασία αίτησης",Action:2,Export:!1},{Description:"Αρχεία Δικαιολογητικών",Action:3,Export:!0}];n.otherActions=[];n.applicationStatus=[{Description:"Προς έλεγχο",Status:1},{Description:"Ελεγμένες",Status:2},{Description:"Εγκεκριμένες",Status:3}];n.levels={};n.paramsForDataTable={};n.myAction=0;n.regionAndUnitId={};n.regionAndUnitId.selected={};n.showDataGrid=!1;o.isValueInArray(o.getRoleCode(n.authentication.role),"u1, u2")&&f.go("/");n.pageRules={secPyspde:{CanBlock:!1},secBody:{CanBlock:!1},secSmea:{CanBlock:!1},secMusic:{CanBlock:!1},secBody1920:{CanBlock:!1},secBodyRef:{CanBlock:!1},secChurch:{CanBlock:!1},secBodySep:{CanBlock:!1},secEEPEBP:{CanBlock:!1}};n.authentication.isAuth?o.isValueInArray(o.getRoleCode(n.authentication.role),"u1, u2")?f.go("/"):(p="secArtistic,secPyspde,secBody,secSmea,secMusic,secBody1920,secBodyRef,secChurch,secBodySep,secKesy,secBodyTechnical,secEEPEBP",o.getByParams({role:n.authentication.role,codes:p},"/api/Subsystem/NewCheckPermission").then(function(t){var i=p.split(",");for(var r in i)n.pageRules[i[r]]=u("filter")(t,{Code:i[r]},!0)[0].Rules},function(){e.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωμάτων",3e3,"trustedHtml")})):f.go("/");n.IsDisabled=!1;o.getByAll("/api/Dbo/getLevels").then(function(t){n.levels=t},function(){e.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των βαθμίδων εκπαίδευσης")});o.getByParams({type:"secondment"},"/api/ApplicationType/getApplicationByType").then(function(t){n.ApplicationType=t},function(){e.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των βαθμίδων εκπαίδευσης")});n.dtOptions=s.newOptions().withPaginationType("full_numbers").withOption("order",[2,"desc"]).withOption("createdRow",b);n.dtColumns=[h.newColumn("ApplicationId").withTitle("ApplicationId").notVisible(),h.newColumn("ApplicationType").withTitle("ApplicationType").notVisible(),h.newColumn("ProtocolNumber").withTitle("Πρωτόκολλο"),h.newColumn("RegistryNo").withTitle("Α.Μ."),h.newColumn("Lastname").withTitle("Επώνυμο"),h.newColumn("FirstName").withTitle("Όνομα"),h.newColumn("FatherFirstName").withTitle("Πατρώνυμο"),h.newColumn("ApplType").withTitle("Τύπος Αίτησης"),h.newColumn("SpecialityCode").withTitle("Κλάδος"),h.newColumn("BlockIcon").withTitle("Ελεγμένες"),h.newColumn("CheckIcon").withTitle("Εγκεκριμένες"),h.newColumn(null).withTitle("Ενέργειες").notSortable().renderWith(k).withClass("text-center dataTables_Actions_150")];y=0;w=function(){n.search.regionAndUnitId=o.isValueInArray(o.getRoleCode(n.authentication.role),"d1, d2, p")?n.authentication.regionAndUnitId:n.regionAndUnitId.selected.Id;o.getByParams(n.search,"/api/SecondmentManagment/searchByStatusAndApplType").then(function(t){n.dtOptions.data=t;n.showDataGrid=!0},function(t){e.pop("error","ΠΡΟΣΟΧΗ",t.data);n.showDataGrid=!1})};n.changedApplicationType=function(){n.showDataGrid=!1};n.checkFields=function(){return!o.isValueInArray(o.getRoleCode(n.authentication.role)," d1, d2, p")||o.isEmptyValue(n.search.applicationTypeId)||o.isEmptyValue(n.search.Status)?(o.getRoleCode(n.authentication.role),!1)||o.isEmptyValue(n.search.applicationTypeId)||o.isEmptyValue(n.regionAndUnitId.selected)||o.isEmptyValue(n.search.Status)?!1:!0:!0};n.searchAction=function(){n.checkFields()?(n.search.regionAndUnitId=o.isValueInArray(o.getRoleCode(n.authentication.role)," d1, d2, p")?n.authentication.regionAndUnitId:n.regionAndUnitId.selected.Id,l.SearchFilters.SecondmentManagment={regionAndUnitId:n.search.regionAndUnitId,applicationTypeId:n.search.applicationTypeId,Status:n.search.Status,dtInstance:n.dtInstance,userRole:n.search.userRole,levelUser:n.search.levelUser,dtInstance:n.dtInstance},n.dtInstance.changeData(w())):e.pop("warning"," Αδύνατη αναζήτηση","Πρέπει να συμπληρώσετε όλα τα υποχρεωτικά πεδία για την αναζήτηση")};o.isValueInArray(o.getRoleCode(n.authentication.role),"a, m1, m2")?o.getByParams({userRole:n.authentication.role,levelId:n.authentication.levelId,regionAndUnitId:n.authentication.regionAndUnitId},"/api/RegionAndUnit/getMunicipalitiesAndIntendanciesByParams").then(function(t){n.RegionAndUnitList=t;n.showRegionAndUnitList=!0;l.SearchFilters!=null&&l.SearchFilters!=""&&l.SearchFilters!="undefined"?l.SearchFilters.SecondmentManagment!=null&&l.SearchFilters.SecondmentManagment!=""&&l.SearchFilters.SecondmentManagment!="undefined"?o.isEmptyValue(l.SearchFilters.SecondmentManagment.regionAndUnitId)||o.isEmptyValue(l.SearchFilters.SecondmentManagment.applicationTypeId)||(n.regionAndUnitId={selected:u("filter")(t,{Id:l.SearchFilters.SecondmentManagment.regionAndUnitId},!0)[0]},n.search.applicationTypeId=l.SearchFilters.SecondmentManagment.applicationTypeId,n.search.Status=l.SearchFilters.SecondmentManagment.Status,n.searchAction()):l.SearchFilters.SecondmentManagment={}:l.SearchFilters={}},function(){e.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των διευθύνσεων")}):(n.showRegionAndUnitList=!1,n.search.regionAndUnitId=n.authentication.regionAndUnitId,l.SearchFilters!=null&&l.SearchFilters!=""&&l.SearchFilters!="undefined"?l.SearchFilters.SecondmentManagment!=null&&l.SearchFilters.SecondmentManagment!=""&&l.SearchFilters.SecondmentManagment!="undefined"?l.SearchFilters.SecondmentManagment.regionAndUnitId>0&&l.SearchFilters.SecondmentManagment.applicationTypeId>0&&(n.search.applicationTypeId=l.SearchFilters.SecondmentManagment.applicationTypeId,n.search.Status=l.SearchFilters.SecondmentManagment.Status,n.dtInstance=l.SearchFilters.SecondmentManagment.dtInstance,n.searchAction()):l.SearchFilters.SecondmentManagment={}:l.SearchFilters={});n.openModal=function(t){n.application=t;n.search.Status==1&&($("[name='Blocked']").bootstrapSwitch("state",!1,!0),n.application.IsBlocked=!1)};n.openOtherActionsModal=function(t){n.application=t;var i=!1;switch(t.ApplicationType){case 7:i=n.pageRules.secPyspde.CanExport;break;case 8:i=n.pageRules.secBody.CanExport;break;case 9:i=n.pageRules.secSmea.CanExport;break;case 10:i=n.pageRules.secArtistic.CanExport;break;case 11:i=n.pageRules.secMusic.CanExport;break;case 12:i=n.pageRules.secBody1920.CanExport;break;case 13:i=n.pageRules.secBodyRef.CanExport;break;case 17:i=n.pageRules.secChurch.CanExport;break;case 18:i=n.pageRules.secBodySep.CanExport;break;case 20:i=n.pageRules.secKesy.CanExport;break;case 22:i=n.pageRules.secBodyTechnical.CanExport;break;case 42:i=n.pageRules.secEEPEBP.CanExport;break;default:i=!1}i?(angular.copy(n.otherActionsTmp,n.otherActions),(t.ApplicationType!=7&&t.ApplicationType!=8&&t.ApplicationType!=9&&t.ApplicationType!=10&&t.ApplicationType!=11&&t.ApplicationType!=12&&t.ApplicationType!=13&&t.ApplicationType!=17&&t.ApplicationType!=18&&t.ApplicationType!=20&&t.ApplicationType!=42||o.isEmptyValue(t.DirectPdfLink))&&(n.otherActions=u("filter")(n.otherActions,function(n){return n.Action!==3},!0))):n.otherActions=u("filter")(n.otherActionsTmp,{Export:!1},!0)};n.blockAction=function(t,i){n.blockDto.DiscardAction=i;n.blockDto.Status=n.search.Status;n.blockDto.UnitName=n.authentication.RegionAndUnitDescription;n.blockDto.Role=n.authentication.role;t.IsBlocked==null&&(t.IsBlocked=!1);n.search.Status!=1||n.blockDto.DiscardAction?n.search.Status==2&&n.blockDto.DiscardAction?(n.blockDto.Id=t.ApplicationId,n.blockDto.ApplicationType=t.ApplicationType,n.blockDto.IsBlocked=null,n.blockDto.BlockDetails=null,n.blockDto.IsChecked=null):n.search.Status!=2||n.blockDto.DiscardAction?n.search.Status==3&&n.blockDto.DiscardAction&&(n.blockDto.Id=t.ApplicationId,n.blockDto.ApplicationType=t.ApplicationType,n.blockDto.IsBlocked=t.IsBlocked,n.blockDto.BlockDetails=t.BlockDetails,n.blockDto.IsChecked=!1):(n.blockDto.Id=t.ApplicationId,n.blockDto.ApplicationType=t.ApplicationType,n.blockDto.IsBlocked=t.IsBlocked,n.blockDto.BlockDetails=t.BlockDetails,n.blockDto.IsChecked=!0):(n.blockDto.Id=t.ApplicationId,n.blockDto.ApplicationType=t.ApplicationType,n.blockDto.IsBlocked=t.IsBlocked,n.blockDto.BlockDetails=t.BlockDetails,n.blockDto.IsChecked=!1);var r=n.blockDto;o.postByParams(r,"/api/SecondmentManagment/blockAction").then(function(){n.searchAction()}).catch(function(n){e.pop("error","Παρουσιάστηκε σφάλμα",n.data)})};n.doAction=function(t){n.myAction==1?n.download(t.ApplicationType,t.ApplicationId):n.myAction==2?n.edit(t.ApplicationType,t.ApplicationId,t.PersonId):n.myAction==3&&n.downloadFile(t.PersonId,t.DirectPdfLink,t.ContentType,t.FileName);n.myAction=0};n.download=function(t,i){blockUI({target:"#blockui_loading",animate:!0});v(function(){o.getByParams({applicationId:i,applicationType:t,userRole:n.authentication.role},"/api/HistoryAppl/getAdHocPdfTemplateById").then(function(n){var i=new Date,t={},r;t=n;r=t;pdfMake.createPdf(t).download("export_"+Date.parse(i)+".pdf");unblockUI("#blockui_loading");e.pop("success","Εξαγωγή σε PDF","Το αρχείο export_"+Date.parse(i)+".pdf δημιουργήθηκε με επιτυχία.")},function(){unblockUI("#blockui_loading");e.pop("error","Παρουσιάστηκε σφάλμα","Η αίτηση δεν μπορεί να εκτυπωθεί.")})},1e3)};n.downloadFile=function(n,t,i,r){o.getByParamsDownload({PersonId:n,Path:t,ContentType:i},"api/files/download").then(function(n){var p=n.status,s=n.headers,h=n.data,y="application/octet-stream",i=!1,f,c,l,e,u,v,t,o;s=s();f=r||"download.pdf";c=s["content-type"]||y;try{if(console.log("Trying saveBlob method ..."),t=new Blob([h],{type:c}),navigator.msSaveBlob)navigator.msSaveBlob(t,f);else{if(l=navigator.webkitSaveBlob||navigator.mozSaveBlob||navigator.saveBlob,l===undefined)throw"Not supported";l(t,f)}console.log("saveBlob succeeded");i=!0}catch(a){console.log("saveBlob method failed with the following exception:");console.log(a)}if(!i&&(e=window.URL||window.webkitURL||window.mozURL||window.msURL,e)){if(u=document.createElement("a"),"download"in u)try{console.log("Trying download link method with simulated click ...");t=new Blob([h],{type:c});o=e.createObjectURL(t);u.setAttribute("href",o);u.setAttribute("download",f);v=document.createEvent("MouseEvents");v.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null);u.dispatchEvent(v);console.log("Download link method with simulated click succeeded");i=!0}catch(a){console.log("Download link method with simulated click failed with the following exception:");console.log(a)}if(!i)try{console.log("Trying download link method with window.location ...");t=new Blob([h],{type:y});o=e.createObjectURL(t);window.location=o;console.log("Download link method with window.location succeeded");i=!0}catch(a){console.log("Download link method with window.location failed with the following exception:");console.log(a)}}i||(console.log("No methods worked for saving the arraybuffer, using last resort window.open"),window.open(httpPath,"_blank",""))},function(){e.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση του αρχείου")})};n.edit=function(n,t,i){r.setApplicationId(t);r.setPersonId(i);c.goToPage(n)};l.SearchFilters!=null&&l.SearchFilters!=""&&l.SearchFilters!="undefined"?l.SearchFilters.SecondmentManagment!=null&&l.SearchFilters.SecondmentManagment!=""&&l.SearchFilters.SecondmentManagment!="undefined"?o.isEmptyValue(l.SearchFilters.SecondmentManagment.regionAndUnitId)||o.isEmptyValue(l.SearchFilters.SecondmentManagment.applicationTypeId)||o.isEmptyValue(l.SearchFilters.SecondmentManagment.Status)||(n.search={regionAndUnitId:l.SearchFilters.SecondmentManagment.regionAndUnitId,applicationTypeId:l.SearchFilters.SecondmentManagment.applicationTypeId,Status:l.SearchFilters.SecondmentManagment.Status,userRole:l.SearchFilters.SecondmentManagment.userRole,levelUser:l.SearchFilters.SecondmentManagment.levelUser},n.dtInstance=l.SearchFilters.SecondmentManagment.dtInstance,n.dtInstance.changeData(w())):l.SearchFilters.SecondmentManagment={}:l.SearchFilters={}};SecondmentManagement.$inject=["$scope","$q","$compile","PassParameters","$filter","$state","toaster","GeneralFactory","DTOptionsBuilder","DTColumnBuilder","RouteFactory","$rootScope","$window","$timeout"];SecondmentMusicController=function(n,t,i,r,u,f,e,o,s,h,c,l,a){if(n.secondmentMusic={IsTemporaryStored:!0},n.secondmentDocument={},n.applicationType=11,n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.personalStep=!0,n.qualificationRegionStep=!1,n.showLessons=!1,n.dideStep=!1,n.AvailableMusicListItems=[],n.fek={},n.dateForProposal="",n.levels={},n.consts={},n.MusicSpecialist=[],n.protocol="",n.showAlertNewPermanentSpecialCategory=!1,n.alertNewPermanentSpecialCategory=[{type:"danger",msg:"Πρέπει να δηλώσετε τουλάχιστον μία Ειδική Κατηγορία."}],n.showAlertRegions=!1,n.alertRegions=[{type:"danger",msg:"Πρέπει να δηλώσετε τουλάχιστον ένα σχολείο προτίμησης."}],n.showAlertLessons=!1,n.alertLessons=[{type:"danger",msg:"Πρέπει να δηλώσετε τουλάχιστον ένα μάθημα προτίμησης."}],n.showAlertDisease=!1,n.alertDisease=[{type:"danger",msg:"Επιλέξτε ασθένεια."}],n.AvailableDiseaseListItems=[],n.upload=[],n.messages={completed:"",percentage:"0",error:""},n.uploadedFileDetails="",n.showAlertForUploadCV=!1,n.SendDataForCVDto={Id:"",SecondmentApplicationId:"",PersonId:""},n.SendDataForCVFullDto={Id:"",SecondmentApplicationId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""},n.pageRules={},n.IsDisabled=!1,n.cannotUpdate=!1,n.notActive=!1,n.noUpdAccess=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.authentication.isAuth){var v="secMusic";h.getByParams({role:n.authentication.role,codes:v},"/api/Subsystem/NewCheckPermission").then(function(t){var i=v.split(","),r,o;for(r in i)n.pageRules[i[r]]=e("filter")(t,{Code:i[r]},!0)[0].Rules;n.secondmentMusic.DidacticYearId=n.applicationDidacticYear.Id;n.secondmentMusic.Id=f.getApplicationId();f.resetApplication();n.secondmentMusic.PersonId=f.getPersonId();h.isValueInArray(n.pageRules.secMusic.CanAccess,"u1, u2")&&(n.secondmentMusic.PersonId=n.authentication.personId,n.userLevel=0);n.SendDataForCVDto.SecondmentApplicationId=n.secondmentMusic.Id;n.SendDataForCVDto.PersonId=n.secondmentMusic.PersonId;h.getByParams({personId:n.secondmentMusic.PersonId},"/api/SecondmentMusic/GetDetailsForFile").then(function(t){t!=null&&(n.SendDataForCVFullDto=t,n.SendDataForCVDto.Id=t.Id,n.uploadedFileDetails="<h4>Έχετε μεταφορτώσει:<\/h4><ul><li>Αρχείο: "+n.SendDataForCVFullDto.FileName+" <\/li><li>Μέγεθος: "+n.SendDataForCVFullDto.FileSize+" <\/li><li>Ημερομηνία: "+e("date")(n.SendDataForCVFullDto.UploadDateTime,"dd/MM/yyyy - HH:mm:ss")+" <\/li><\/ul>")},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης επισυναπτόμενου Βιογραφικού")});o=u.all([c.isFekValidForApplicationTypeId(n.applicationType),h.getByParams({personId:n.secondmentMusic.PersonId},"api/SecondmentMusic/CanInsertApplication")]);o.then(function(t){n.hasValidFek=t[0];n.fek=t[1];n.fek.Id>0?(n.canInsertAppl=!0,n.secondmentMusic.FekId=n.fek.Id):n.canInsertAppl=!1;n.secondmentMusic.Id!=null&&n.secondmentMusic.Id!=""&&n.secondmentMusic.Id!="undefined"?(n.canUpdateAppl=!0,n.showAddEditForm=1):n.canInsertAppl&&n.hasValidFek?(n.canInsertAppl=!0,n.showAddEditForm=1):n.showAddEditForm=2;n.doAll();h.isEmptyValue(n.secondmentMusic.Id)&&(n.IsDisabled=!n.pageRules.secMusic.CanInsert)})},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else o.go("/");n.alerts=[{type:"danger",msg:"Δεν μπορείτε να υποβάλετε αίτηση. Για ήδη υποβληθείσα αίτηση μεταβείτε στο Ιστορικό Αιτήσεων."}];n.showAlertBlock=function(){return n.secondmentMusic.NoRemoteUnit&&n.secondmentMusic.NoEducationalExecutive&&n.secondmentMusic.NoTenure&&n.secondmentMusic.NoTenureModelExpSchool?!1:!0};n.editPerson=function(){f.setPersonId(n.secondmentMusic.PersonId);o.go("stateEditPerson")};n.goToQualificationAreas=function(){n.showAlertDisease=n.secondmentMusic.HasDisease&&h.isEmpty(n.SelectedDiseaseListItems)?!0:!1;n.showAlertNewPermanentSpecialCategory=!h.isEmptyValue(n.secondmentMusic.NewPermanentSpecialCategory)&&h.isEmptyValue(n.secondmentMusic.HavingManyChildren)&&h.isEmptyValue(n.secondmentMusic.ChildrenInfirmity)&&h.isEmptyValue(n.secondmentMusic.NewPermanentInfirmity)&&h.isEmptyValue(n.secondmentMusic.HasDisease)?!0:!1;!$("#SecondmentMusicStep1").valid()||n.showAlertDisease||n.showAlertNewPermanentSpecialCategory||(n.personalStep=!1,n.qualificationRegionStep=!0,n.dideStep=!1,r.scrollTo(0,0),n.goToRegions())};n.goToPersonal=function(){n.personalStep=!0;n.qualificationRegionStep=!1;n.dideStep=!1;r.scrollTo(0,0)};n.goToDideStep=function(){n.showAlertRegions=h.isEmpty(n.SelectedMusicListItems)?!0:!1;n.showAlertLessons=n.showLessons&&h.isEmpty(n.SelectedMusicLessonsListItems)?!0:!1;!$("#SecondmentMusicStep2").valid()||n.showAlertRegions||n.showAlertLessons||(n.personalStep=!1,n.qualificationRegionStep=!1,n.dideStep=!0,r.scrollTo(0,0))};n.getOfficialPlacementUnits=function(){var t;t=n.secondmentMusic.Id!=null&&n.secondmentMusic.Id!=""&&n.secondmentMusic.Id!="undefined"?n.secondmentMusic.OfficialRegionAndUnitId:n.person.OfficialRegionAndUnit.Id;params={OfficialUnitAndRegionId:t,userLevel:n.authentication.levelId};h.getByAll("/api/RegionAndUnit/getRegionAndUnitForPlacement").then(function(t){n.OfficialPlacementUnits=t;n.changedRegionAndUnit()},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.getDateForProposal=function(){n.dateForProposal="31/8/"+n.applicationDidacticYear.YearFrom};n.getPostingTranferAreas=function(){h.getByParams({id:n.secondmentMusic.OfficialRegionAndUnitId},"/api/RegionAndUnit/getPostingTransferAreaByRegionAndUnitId").then(function(t){n.PostingTranferAreas=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.changedRegionAndUnit=function(){n.checkForPostingTransferArea();n.getPostingTranferAreas()};n.checkForPostingTransferArea=function(){n.myfilter=e("filter")(n.OfficialPlacementUnits,{Id:n.secondmentMusic.OfficialRegionAndUnitId},!0)[0];n.myfilter.RegionAndUnitTypeId==8?(n.showPostingTransferArea=!0,n.showPostingTransferArea=!0,n.showLevel=!1,n.secondmentMusic.LevelId=n.myfilter.LevelId):(h.getByAll("/api/Dbo/getLevelsAsync").then(function(t){n.levels=e("filter")(t,{Id:2},!0);n.secondmentMusic.LevelId=n.levels[0].Id;n.showLevel=!0},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία φόρτωσης βαθμίδων επιλογής")}),n.showPostingTransferArea=!1,n.secondmentMusic.PostingTransferAreaId=null)};n.checkForLessons=function(t){n.showLessons=t.lastIndexOf("ΠΕ79",0)===0||t.lastIndexOf("ΤΕ16",0)===0?!0:!1};n.doAll=function(){var t;n.secondmentMusic.Id!=null&&n.secondmentMusic.Id!=""&&n.secondmentMusic.Id!="undefined"?n.canUpdateAppl&&(n.AvailableMusicListItems=[],n.AvailableMusicLessonsListItems=[],t=u.all([h.getByParams({id:n.secondmentMusic.PersonId},"/api/Person/GetSecondmentPersonDto"),h.getByAll("/api/MusicSpecialist/getMusicSpecialist"),h.getByParams({id:n.secondmentMusic.Id},"/api/SecondmentMusic/getSecondmentMusicById")]),t.then(function(t){n.person=t[0];n.getDateForProposal();n.checkForLessons(t[0].Speciality.Code);n.MusicSpecialist=e("filter")(t[1],function(n){return n.Id!=43});n.secondmentMusic=t[2];n.secondmentMusic.SpecialityId=t[0].Speciality.Id;h.isEmpty(n.secondmentMusic.SecondmentMusicProtocols)||(n.protocol=n.secondmentMusic.SecondmentMusicProtocols[0].ProtocolString,n.showProtocol=!0);n.paramsForCheckUpd.personId=n.secondmentMusic.PersonId;n.paramsForCheckUpd.levelUser=n.authentication.levelId;n.paramsForCheckUpd.regionAndUnitId=n.authentication.regionAndUnitId;n.paramsForCheckUpd.userRole=n.authentication.role;n.paramsForCheckUpd.specialityId=n.secondmentMusic.SpecialityId;n.paramsForCheckUpd.applicationLevelId=n.secondmentMusic.LevelId;n.paramsForCheckUpd.applicationTypeId=n.applicationType;n.paramsForCheckUpd.IsActive=n.secondmentMusic.IsActive;n.paramsForCheckUpd.FekId=n.secondmentMusic.FekId;h.postByParams(n.paramsForCheckUpd,"/api/General/checkUpdateSecFromFEKAndUser").then(function(t){n.IsDisabled=!t;n.IsDisabled&&(n.noUpdAccess=!0);h.isValueInArray(n.pageRules.secMusic.CanAccess,"u1, u2")&&n.secondmentMusic.IsActive&&!n.secondmentMusic.IsTemporaryStored&&(n.IsDisabled=!0,n.cannotUpdate=!0);n.secondmentMusic.IsActive||(n.IsDisabled=!0,n.notActive=!0);h.isValueInArray(n.pageRules.secMusic.CanAccess,"d1, d2, p")&&n.secondmentMusic.OfficialRegionAndUnitId!=n.authentication.regionAndUnitId&&(n.IsDisabled=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.secMusic.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0)}).catch(function(){s.pop("error","Παρουσιάστηκε σφάλμα","Δημιουργήθηκε πρόβλημα με τα δικαιώματα σας στη σελίδα.")});n.getOfficialPlacementUnits();n.clickHasDisease()}).catch(function(){s.pop("error","Παρουσιάστηκε σφάλμα","Εμφανίστηκε πρόβλημα κατά την φόρτωση των προσωπικών στοιχείων.")})):n.canInsertAppl&&n.secondmentMusic.PersonId!=null&&n.secondmentMusic.PersonId!=""&&n.secondmentMusic.PersonId!="undefined"&&(n.AvailableMusicListItems=[],n.AvailableMusicLessonsListItems=[],t=u.all([h.getByParams({id:n.secondmentMusic.PersonId},"/api/Person/GetSecondmentPersonDto"),h.getByAll("/api/MusicSpecialist/getMusicSpecialist")]),t.then(function(t){n.person=t[0];n.getDateForProposal();n.secondmentMusic.SpecialityId=t[0].Speciality.Id;n.checkForLessons(t[0].Speciality.Code);n.secondmentMusic.OfficialRegionAndUnitId=t[0].OfficialRegionAndUnit.Id;n.secondmentMusic.OfficialPlacementUnitDescription=t[0].OfficialPlacementUnitDescription;n.secondmentMusic.PostingTransferAreaId=t[0].PostingTransferArea==null?0:t[0].PostingTransferArea.Id;n.secondmentMusic.ExperienceYears=t[0].ExperienceYears;n.secondmentMusic.ExperienceDays=t[0].ExperiencExperienceDays;n.secondmentMusic.ExperienceMonths=t[0].ExperienceMonths;n.secondmentMusic.NominationYear=t[0].NominationYear;n.MusicSpecialist=t[1];n.getOfficialPlacementUnits();n.clickHasDisease()}).catch(function(){s.pop("error","Παρουσιάστηκε σφάλμα","Εμφανίστηκε πρόβλημα κατά την φόρτωση των προσωπικών στοιχείων.")}))};n.clickHasDisease=function(){if(n.secondmentMusic.HasDisease){if(h.isEmpty(n.secondmentMusic.Id))h.isEmpty(n.SelectedDiseaseListItems)&&h.getByAll("/api/SecondmentPyspdeChurchController/getDiseases").then(function(t){n.AvailableDiseaseListItems=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία φόρτωσης ασθενειών")});else if(n.secondmentMusic.HasDisease&&h.isEmpty(n.SelectedDiseaseListItems)){var t=u.all([h.getByAll("/api/SecondmentPyspdeChurchController/getDiseases"),h.getByParams({applicationId:n.secondmentMusic.Id},"/api/SecondmentMusic/getSecondmentDiseaseById"),]);t.then(function(t){angular.copy(t[0],n.AvailableDiseaseListItems);n.SelectedDiseaseListItems=t[1];n.SelectedAvailDiseaseItems=t[1];n.removeDuplicatesDiseaseForDualList()})}}else n.SelectedAvailDiseaseItems=[],n.SelectedSelectedDiseaseListItems=[],n.SelectedDiseaseListItems=[]};n.checkNewPermanentSpecialCategory=function(){n.secondmentMusic.NewPermanentSpecialCategory||(n.secondmentMusic.NewPermanentInfirmity=!1,n.secondmentMusic.ChildrenInfirmity=!1,n.secondmentMusic.HavingManyChildren=!1,n.secondmentMusic.HasDisease=!1,n.checkNewPermanentInfirmity(),n.checkChildrenInfirmity(),n.checkHavingManyChildren(),n.clickHasDisease())};n.checkNewPermanentInfirmity=function(){n.secondmentMusic.NewPermanentInfirmity||(n.secondmentMusic.NewPermanentInfirmityHealthProblemsKEPANumber="",n.secondmentMusic.NewPermanentInfirmityKEPASanitaryNumber="")};n.checkChildrenInfirmity=function(){n.secondmentMusic.ChildrenInfirmity||(n.secondmentMusic.ChildrenInfirmityHealthProblemsKEPANumber="",n.secondmentMusic.ChildrenInfirmityKEPASanitaryNumber="")};n.checkHavingManyChildren=function(){n.secondmentMusic.HavingManyChildren||(n.secondmentMusic.ASPENumber="")};n.goToRegions=function(){var t;n.secondmentMusic.Id!=null&&n.secondmentMusic.Id!=""&&n.secondmentMusic.Id!="undefined"?h.isEmpty(n.SelectedMusicListItems)&&(t=u.all([h.getByAll("/api/ApplicationTypeRegionAndUnit/getMusicSchools"),h.getByParams({id:n.secondmentMusic.Id},"/api/SecondmentMusic/getApplRegionsById"),h.getByParams({id:n.secondmentMusic.Id},"/api/SecondmentMusic/getApplLessonsById"),h.getByParams({specialityId:n.secondmentMusic.SpecialityId},"/api/SecondmentMusic/getLessonsBySpecialityId"),h.getByAll("/api/SecondmentMusic/computerKnowlegdeTypes"),h.getByParams({id:n.secondmentMusic.Id},"/api/SecondmentMusic/getApplDocumentsById")]),t.then(function(t){n.SelectedMusicListItems=t[1];n.SelectedAvailMusicItems=t[1];angular.copy(t[0],n.AvailableMusicListItems);n.removeDuplicatesMusicForDualList();n.consts.computerKnowlegdeType=t[4];n.secondmentDocument=t[5];n.SelectedMusicLessonsListItems=t[2];n.SelectedAvailMusicLessonsItems=t[2];angular.copy(t[3],n.AvailableMusicLessonsListItems);n.removeDuplicatesMusicLessonsForDualList()})):h.isEmpty(n.SelectedMusicListItems)&&(t=u.all([h.getByAll("/api/ApplicationTypeRegionAndUnit/getMusicSchools"),h.getByParams({specialityId:n.secondmentMusic.SpecialityId},"/api/SecondmentMusic/getLessonsBySpecialityId"),h.getByAll("/api/SecondmentMusic/computerKnowlegdeTypes")]),t.then(function(t){n.AvailableMusicListItems=t[0];n.removeDuplicatesMusicForDualList();n.consts.computerKnowlegdeType=t[2];n.AvailableMusicLessonsListItems=t[1];n.removeDuplicatesMusicLessonsForDualList()}))};n.InsOrUpd=function(t){var r={SecondmentMusicRegions:n.SelectedMusicListItems,SecondmentMusic:n.secondmentMusic,Status:t,SecondmentMusicLessons:n.SelectedMusicLessonsListItems,SecondmentDocument:n.secondmentDocument,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Disease:n.SelectedDiseaseListItems},i=r;n.secondmentMusic.Id!=null&&n.secondmentMusic.Id!=""&&n.secondmentMusic.Id!="undefined"?h.postByParams(i,"/api/SecondmentMusic/updateSecondmentMusic").then(function(){f.setPersonId(n.secondmentMusic.PersonId);h.isValueInArray(n.pageRules.secMusic.CanAccess,"u1, u2")?o.go("history"):o.go("history")},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα",response)}):h.postByParams(i,"/api/SecondmentMusic/insertSecondmentMusic").then(function(){f.setPersonId(n.secondmentMusic.PersonId);h.isValueInArray(n.pageRules.secMusic.CanAccess,"u1, u2")?o.go("history"):o.go("history")},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα",response)})};n.saveAction=function(r){var u;n.showAlertRegions=h.isEmpty(n.SelectedMusicListItems)?!0:!1;n.showAlertForUploadCV=!1;n.showAlertLessons=n.showLessons&&h.isEmpty(n.SelectedMusicLessonsListItems)?!0:!1;h.isValueInArray(n.pageRules.secMusic.CanAccess,"u1, u2")?!$("#SecondmentMusicStep2").valid()||n.showAlertRegions||n.showAlertLessons||(r=="final"?(u=t.open({templateUrl:"ModalContent.html",controller:OpenModalController}),u.result.then(function(t){t&&n.InsOrUpd(r)},function(){i.info("Modal dismissed at: "+new Date)})):n.InsOrUpd(r)):!$("#SecondmentMusicStep3").valid()||n.showAlertRegions||n.showAlertLessons||(r=="final"?(u=t.open({templateUrl:"ModalContent.html",controller:OpenModalController}),u.result.then(function(t){t&&n.InsOrUpd(r)},function(){i.info("Modal dismissed at: "+new Date)})):n.InsOrUpd(r))};n.removeDuplicatesMusicForDualList=function(){angular.forEach(n.SelectedAvailMusicItems,function(t){for(var i=n.AvailableMusicListItems.length-1;i>=0;i--)n.AvailableMusicListItems[i].Id==t.Id&&n.AvailableMusicListItems.splice(i,1)});n.SelectedAvailMusicItems=[];n.SelectedSelectedMusicListItems=[]};n.SelectedAvailMusicItems=[];n.SelectedSelectedMusicListItems=[];n.SelectedMusicListItems=[];n.btnMusicUp=function(){for(var t,r,u,f=n.SelectedSelectedMusicListItems,i=0;i<n.SelectedSelectedMusicListItems.length;i++){if(t=n.SelectedMusicListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedMusicListItems[i].Id),t<=0||t>=n.SelectedMusicListItems.length)return;r=n.SelectedMusicListItems[t];u=n.SelectedMusicListItems[t-1];n.SelectedMusicListItems[t-1]=r;n.SelectedMusicListItems[t]=u}};n.btnMusicDown=function(){for(var t,r,u,i=n.SelectedSelectedMusicListItems.length-1;i>=0;i--){if(t=n.SelectedMusicListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedMusicListItems[i].Id),t<0||t>=n.SelectedMusicListItems.length-1)return;r=n.SelectedMusicListItems[t];u=n.SelectedMusicListItems[t+1];n.SelectedMusicListItems[t+1]=r;n.SelectedMusicListItems[t]=u}};n.checkMusic=function(){var t=5;n.canInsertMusic=!0;n.SelectedMusicListItems.length+n.SelectedAvailMusicItems.length>t&&(s.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών","Δεν μπορείτε να επιλέξετε περισσότερα από "+t+" Μουσικά Σχολεία"),n.canInsertMusic=!1)};n.btnMusicRight=function(){n.checkMusic();n.canInsertMusic&&(angular.forEach(n.SelectedAvailMusicItems,function(n){this.push(n)},n.SelectedMusicListItems),angular.forEach(n.SelectedAvailMusicItems,function(t){for(var i=n.AvailableMusicListItems.length-1;i>=0;i--)n.AvailableMusicListItems[i].Id==t.Id&&n.AvailableMusicListItems.splice(i,1)}),n.SelectedAvailMusicItems=[],n.SelectedSelectedMusicListItems=[])};n.btnMusicLeft=function(){angular.forEach(n.SelectedSelectedMusicListItems,function(n){this.push(n)},n.AvailableMusicListItems);angular.forEach(n.SelectedSelectedMusicListItems,function(t){for(var i=n.SelectedMusicListItems.length-1;i>=0;i--)n.SelectedMusicListItems[i].Id==t.Id&&n.SelectedMusicListItems.splice(i,1)});n.SelectedSelectedMusicListItems=[];n.SelectedAvailMusicItems=[]};n.removeDuplicatesMusicLessonsForDualList=function(){angular.forEach(n.SelectedAvailMusicLessonsItems,function(t){for(var i=n.AvailableMusicLessonsListItems.length-1;i>=0;i--)n.AvailableMusicLessonsListItems[i].MusicLessonPerSpecialityId==t.MusicLessonPerSpecialityId&&n.AvailableMusicLessonsListItems.splice(i,1)});n.SelectedAvailMusicLessonsItems=[];n.SelectedSelectedMusicLessonsListItems=[]};n.SelectedAvailMusicLessonsItems=[];n.SelectedSelectedMusicLessonsListItems=[];n.SelectedMusicLessonsListItems=[];n.btnMusicLessonsUp=function(){for(var t,r,u,f=n.SelectedSelectedMusicLessonsListItems,i=0;i<n.SelectedSelectedMusicLessonsListItems.length;i++){if(t=n.SelectedMusicLessonsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedMusicLessonsListItems[i].Id),t<=0||t>=n.SelectedMusicLessonsListItems.length)return;r=n.SelectedMusicLessonsListItems[t];u=n.SelectedMusicLessonsListItems[t-1];n.SelectedMusicLessonsListItems[t-1]=r;n.SelectedMusicLessonsListItems[t]=u}};n.btnMusicLessonsDown=function(){for(var t,r,u,i=n.SelectedSelectedMusicLessonsListItems.length-1;i>=0;i--){if(t=n.SelectedMusicLessonsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedMusicLessonsListItems[i].Id),t<0||t>=n.SelectedMusicLessonsListItems.length-1)return;r=n.SelectedMusicLessonsListItems[t];u=n.SelectedMusicLessonsListItems[t+1];n.SelectedMusicLessonsListItems[t+1]=r;n.SelectedMusicLessonsListItems[t]=u}};n.btnMusicLessonsRight=function(){n.checkMusicLessons();n.canInsertMusicLessons&&(angular.forEach(n.SelectedAvailMusicLessonsItems,function(n){this.push(n)},n.SelectedMusicLessonsListItems),angular.forEach(n.SelectedAvailMusicLessonsItems,function(t){for(var i=n.AvailableMusicLessonsListItems.length-1;i>=0;i--)n.AvailableMusicLessonsListItems[i].MusicLessonPerSpecialityId==t.MusicLessonPerSpecialityId&&n.AvailableMusicLessonsListItems.splice(i,1)}),n.SelectedAvailMusicLessonsItems=[],n.SelectedSelectedMusicLessonsListItems=[])};n.btnMusicLessonsLeft=function(){angular.forEach(n.SelectedSelectedMusicLessonsListItems,function(n){this.push(n)},n.AvailableMusicLessonsListItems);angular.forEach(n.SelectedSelectedMusicLessonsListItems,function(t){for(var i=n.SelectedMusicLessonsListItems.length-1;i>=0;i--)n.SelectedMusicLessonsListItems[i].MusicLessonPerSpecialityId==t.MusicLessonPerSpecialityId&&n.SelectedMusicLessonsListItems.splice(i,1)});n.SelectedSelectedMusicLessonsListItems=[];n.SelectedAvailMusicLessonsItems=[]};n.checkMusicLessons=function(){var t=5;n.canInsertMusicLessons=!0;n.SelectedMusicLessonsListItems.length+n.SelectedAvailMusicLessonsItems.length>t&&(s.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος μαθημάτων","Δεν μπορείτε να επιλέξετε περισσότερα από "+t+" μαθήματα"),n.canInsertMusicLessons=!1)};n.SelectedAvailDiseaseItems=[];n.SelectedSelectedDiseaseListItems=[];n.SelectedDiseaseListItems=[];n.btnDiseaseUp=function(){for(var t,r,u,f=n.SelectedSelectedDiseaseListItems,i=0;i<n.SelectedSelectedDiseaseListItems.length;i++){if(t=n.SelectedDiseaseListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedDiseaseListItems[i].Id),t<=0||t>=n.SelectedDiseaseListItems.length)return;r=n.SelectedDiseaseListItems[t];u=n.SelectedDiseaseListItems[t-1];n.SelectedDiseaseListItems[t-1]=r;n.SelectedDiseaseListItems[t]=u}};n.btnDiseaseDown=function(){for(var t,r,u,i=n.SelectedSelectedDiseaseListItems.length-1;i>=0;i--){if(t=n.SelectedDiseaseListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedDiseaseListItems[i].Id),t<0||t>=n.SelectedDiseaseListItems.length-1)return;r=n.SelectedDiseaseListItems[t];u=n.SelectedDiseaseListItems[t+1];n.SelectedDiseaseListItems[t+1]=r;n.SelectedDiseaseListItems[t]=u}};n.btnDiseaseRight=function(){angular.forEach(n.SelectedAvailDiseaseItems,function(n){this.push(n)},n.SelectedDiseaseListItems);angular.forEach(n.SelectedAvailDiseaseItems,function(t){for(var i=n.AvailableDiseaseListItems.length-1;i>=0;i--)n.AvailableDiseaseListItems[i].Id==t.Id&&n.AvailableDiseaseListItems.splice(i,1)});n.showAlertDisease=n.secondmentMusic.HasDisease&&h.isEmpty(n.SelectedDiseaseListItems)?!0:!1;n.SelectedAvailDiseaseItems=[];n.SelectedSelectedDiseaseListItems=[]};n.btnDiseaseLeft=function(){angular.forEach(n.SelectedSelectedDiseaseListItems,function(n){this.push(n)},n.AvailableDiseaseListItems);angular.forEach(n.SelectedSelectedDiseaseListItems,function(t){for(var i=n.SelectedDiseaseListItems.length-1;i>=0;i--)n.SelectedDiseaseListItems[i].Id==t.Id&&n.SelectedDiseaseListItems.splice(i,1)});n.showAlertDisease=n.secondmentMusic.HasDisease&&h.isEmpty(n.SelectedDiseaseListItems)?!0:!1;n.SelectedSelectedDiseaseListItems=[];n.SelectedAvailDiseaseItems=[]};n.removeDuplicatesDiseaseForDualList=function(){angular.forEach(n.SelectedAvailDiseaseItems,function(t){for(var i=n.AvailableDiseaseListItems.length-1;i>=0;i--)n.AvailableDiseaseListItems[i].Id==t.Id&&n.AvailableDiseaseListItems.splice(i,1)});n.SelectedAvailDiseaseItems=[];n.SelectedSelectedDiseaseListItems=[]};n.onFileSelect=function(t){var r,i;for(n.messages={completed:"",percentage:"0",error:""},n.showAlertForUploadCV=!1,r=0;r<t.length;r++){if(i=t[r],i.type!="application/x-zip-compressed"&&i.type!="application/x-compressed"&&i.type!="application/zip"&&i.type!="multipart/x-zip"&&i.type!="application/pdf"){n.messages.error='Μη έγκυρη επέκταση αρχείου "'+i.name+'". Οι επεκτάσεις που υποστηρίζονται είναι: "<b>zip και pdf<\/b>" .';return}if(i.size>=10485760){n.messages.error='Το αρχείο "'+i.name+'" (<b>'+Math.round(i.size/1024)+" KB<\/b>) υπερβαίνει το μέγιστο επιτρεπόμενο μέγεθος μεταφόρτωσης <b>10000 KB<\/b>.";return}(function(t){n.upload[t]=a.upload({url:"/api/files/uploadMusic",method:"POST",data:{SendDataForCVDto:n.SendDataForCVDto},file:i}).progress(function(t){n.messages.percentage=parseInt(100*t.loaded/t.total)}).then(function(t){n.messages.completed="Το αρχείο <b>"+i.name+"<\/b> μεταφορτώθηκε με επιτυχία.";n.SendDataForCVDto.Id=t.data.secMusicFile.Id;n.SendDataForCVFullDto=t.data.secMusicFile;n.uploadedFileDetails=t.data.Message}).catch(function(t){n.messages.error=t.data.Message})})(r)}};n.abortUpload=function(t){n.upload[t].abort()};n.downloadFile=function(){h.getByParamsDownload({PersonId:n.secondmentMusic.PersonId,Path:n.SendDataForCVFullDto.DirectPdfLink,ContentType:n.SendDataForCVFullDto.ContentType},"api/files/download").then(function(t){var p=t.status,s=t.headers,h=t.data,y="application/octet-stream",r=!1,f,c,l,e,u,v,i,o;s=s();f=n.SendDataForCVFullDto.FileName||"download.pdf";c=s["content-type"]||y;try{if(console.log("Trying saveBlob method ..."),i=new Blob([h],{type:c}),navigator.msSaveBlob)navigator.msSaveBlob(i,f);else{if(l=navigator.webkitSaveBlob||navigator.mozSaveBlob||navigator.saveBlob,l===undefined)throw"Not supported";l(i,f)}console.log("saveBlob succeeded");r=!0}catch(a){console.log("saveBlob method failed with the following exception:");console.log(a)}if(!r&&(e=window.URL||window.webkitURL||window.mozURL||window.msURL,e)){if(u=document.createElement("a"),"download"in u)try{console.log("Trying download link method with simulated click ...");i=new Blob([h],{type:c});o=e.createObjectURL(i);u.setAttribute("href",o);u.setAttribute("download",f);v=document.createEvent("MouseEvents");v.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null);u.dispatchEvent(v);console.log("Download link method with simulated click succeeded");r=!0}catch(a){console.log("Download link method with simulated click failed with the following exception:");console.log(a)}if(!r)try{console.log("Trying download link method with window.location ...");i=new Blob([h],{type:y});o=e.createObjectURL(i);window.location=o;console.log("Download link method with window.location succeeded");r=!0}catch(a){console.log("Download link method with window.location failed with the following exception:");console.log(a)}}r||(console.log("No methods worked for saving the arraybuffer, using last resort window.open"),window.open(httpPath,"_blank",""))},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση του αρχείου")})}};SecondmentMusicController.$inject=["$scope","$uibModal","$log","$window","$q","PassParameters","$filter","$state","toaster","GeneralFactory","ApplicationTypeFekFactory","PersonFactory","$upload"];SecondmentPyspdeChurchController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y){function k(){c.getMaritalStatusTypes().then(function(t){n.consts.maritalStatusType=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των επιλογών οικογενειακής κατάταστασης","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function d(){c.getMateProfessionTypes().then(function(t){n.consts.mateProfessionType=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των επιλογών επαγγέλματος συζύγου","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function g(){c.getHealthProblemsTypes().then(function(t){n.consts.healthProblemsType=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των στοιχείων υγείας","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function nt(){c.getParentsHealthProblemsTypes().then(function(t){n.consts.parentsHealthProblemsType=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των στοιχείων υγείας γονέων","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function tt(){c.getBrothersHealthProblemsTypes().then(function(t){n.consts.brothersHealthProblemsType=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των στοιχείων υγείας γονέων","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function w(){l.getPyspdeWithoutJointExaminationByLevel(n.applicationType,n.secondment.LevelId).then(function(t){n.consts.pyspde=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}function b(){v.getByParams({level:n.secondment.LevelId},"/api/RegionAndUnit/getPyspdeByLevel").then(function(t){n.consts.pyspdeRegionJoin=t;n.consts.pyspdeRegionAndUnit=i("filter")(t,function(n){return n.Description!="Υπό Μετακίνηση"})},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}if(n.secondment={IsTemporaryStored:!0},n.secondmentDocument={},n.secondment.UnderAgedOrStudingChildren=0,n.secondment.StudingChildren=0,n.consts={},n.applicationType=7,n.secondment.IsChurch=!1,n.secondment.IsPyspde=!0,n.showLevel={},n.pyspe="ΠΥΣΠΕ",n.pysde="ΠΥΣΔΕ",n.showMusic=!1,n.protocol="",n.showProtocol=!1,n.TempOfficialRegionAndUnit={},n.canInsertAppl=!1,n.canUpdateAppl=!1,n.canInsUpdFromChurch=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.showParentsPyspdeId=!1,n.showBrothersPyspdeId=!1,n.showLevel=!1,n.showDiseaseId=!1,n.myfilter={},n.personalStep=!0,n.maritalAndPointsCriteriaStep=!1,n.regionStep=!1,n.fek={},n.dateForProposal="",n.HealthProblemsKEPA=!1,n.PyspdeListItems=[],n.ChurchListItems=[],n.ChurchListItemsWithoutJoint=[],n.AvailableDiseaseListItems=[],n.SelectedAvailDiseaseItems=[],n.AvailablePyspdeListItems=[],n.AvailableChurchListItems=[],n.SelectedAvailPyspdeItems=[],n.SelectedSelectedPyspdeListItems=[],n.SelectedPyspdeListItems=[],n.upload=[],n.messages={completed:"",percentage:"0",error:""},n.uploadedFileDetails="",n.showAlertForUploadCV=!1,n.SendDataForCVDto={Id:"",SecondmentApplicationId:"",PersonId:""},n.SendDataForCVFullDto={Id:"",SecondmentApplicationId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""},n.IsFirstTimePyspde=!0,n.IsFirstTimeChurch=!0,n.ShowAlertMessageForMate=!1,n.disabled={MilitaryMate:!1,JudicialMate:!1,DEPMate:!1},n.showMateHealthProblems=!1,n.alertsMessageForMate=[{type:"danger",msg:"Συμπληρώστε Οικογενειακή Κατάσταση ΕΓΓΑΜΟΣ ή ΣΥΜΦΩΝΟ ΣΥΜΒΙΩΣΗΣ - Επάγγελμα Συζύγου Άλλο - Περιοχή Συνυπηρέτησης, εφόσον είναι σύζυγος στρατιωτικού ή δικαστικού ή μέλους ΔΕΠ."}],n.showAlertRegions=!1,n.alertRegions=[{type:"danger",msg:"Πρέπει να δηλώσετε τουλάχιστον μία επιλογή προτίμησης."}],n.showAlertChurches=!1,n.alertChurches=[{type:"danger",msg:"Πρέπει να δηλώσετε τουλάχιστον ένα Εκκλησιαστικό Σχολείο Προτίμησης."}],n.showAlertDisease=!1,n.alertDisease=[{type:"danger",msg:"Επιλέξτε ασθένεια."}],n.cannotUpdate=!1,n.notActive=!1,n.noUpdAccess=!1,n.PyspdeFormOfficial=0,n.showAlertPyspdeFormOfficial=!1,n.concatPyspde="",n.messagePyspde="",n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.authentication.isAuth){var p="secPyspde";v.getByParams({role:n.authentication.role,codes:p},"/api/Subsystem/NewCheckPermission").then(function(t){var r=p.split(","),u,o;for(u in r)n.pageRules[r[u]]=i("filter")(t,{Code:r[u]},!0)[0].Rules;n.secondment.DidacticYearId=n.applicationDidacticYear.Id;n.secondment.Id=e.getApplicationId();e.resetApplication();n.secondment.PersonId=e.getPersonId();v.isValueInArray(n.pageRules.secPyspde.CanAccess,"u1, u2")&&(n.secondment.PersonId=n.authentication.personId);n.SendDataForCVDto.SecondmentApplicationId=n.secondment.Id;n.SendDataForCVDto.PersonId=n.secondment.PersonId;v.getByParams({personId:n.secondment.PersonId},"/api/SecondmentPyspdeChurchController/GetDetailsForFile").then(function(t){t!=null&&(n.SendDataForCVFullDto=t,n.SendDataForCVDto.Id=t.Id,n.uploadedFileDetails="<h4>Έχετε μεταφορτώσει:<\/h4><ul><li>Αρχείο: "+n.SendDataForCVFullDto.FileName+" <\/li><li>Μέγεθος: "+n.SendDataForCVFullDto.FileSize+" <\/li><li>Ημερομηνία: "+i("date")(n.SendDataForCVFullDto.UploadDateTime,"dd/MM/yyyy - HH:mm:ss")+" <\/li><\/ul>")},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης επισυναπτόμενου Βιογραφικού")});o=f.all([a.isFekValidForApplicationTypeId(n.applicationType),c.canInsertApplication(n.secondment.PersonId),v.getByParams({personId:n.secondment.PersonId},"/api/SecondmentManagment/canInsUpdFromChurch")]);o.then(function(t){n.hasValidFek=t[0];n.fek=t[1];n.canInsUpdFromChurch=t[2];n.fek.Id>0?(n.canInsertAppl=!0,n.secondment.FekId=n.fek.Id):n.canInsertAppl=!1;n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"?(n.canUpdateAppl=!0,n.showAddEditForm=1):n.canInsertAppl&&n.hasValidFek?(n.canInsertAppl=!0,n.showAddEditForm=1):n.showAddEditForm=2;n.fek.DisplayModal&&v.isEmptyValue(n.secondment.Id)?$("#alertModal").modal("show"):n.doAll();v.isEmptyValue(n.secondment.Id)&&(n.IsDisabled=!n.pageRules.secPyspde.CanInsert)})},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else o.go("/");n.cancelNewApplication=function(){$("#alertModal").modal("hide");o.go("/")};n.checkHavingManyChildren=function(){n.secondment.HavingManyChildren||(n.secondment.ASPENumber="")};n.acceptNewApplication=function(){n.secondment.MilitaryMate=!0;n.DisableOtherChks("MilitaryMate");n.disabled.MilitaryMate=!0;$("#alertModal").modal("hide");n.doAll()};n.alerts=[{type:"danger",msg:"Δεν μπορείτε να υποβάλετε αίτηση. Για ήδη υποβληθείσα αίτηση μεταβείτε στο Ιστορικό Αιτήσεων."}];n.editPerson=function(){e.setPersonId(n.secondment.PersonId);o.go("stateEditPerson")};k();d();g();nt();tt();n.showAlertBlock=function(){return n.showMusic?n.secondment.NoRemoteUnit&&n.secondment.NoEducationalExecutive&&n.secondment.NoTenure&&n.secondment.NoTenureModelExpSchool&&n.secondment.NoMusicSchool?!1:!0:n.secondment.NoRemoteUnit&&n.secondment.NoEducationalExecutive&&n.secondment.NoTenure&&n.secondment.NoTenureModelExpSchool?!1:!0};n.getOfficialPlacementUnits=function(){var t,i,r;t=n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"?n.secondment.OfficialRegionAndUnitId:n.person.OfficialRegionAndUnit.Id;params={OfficialUnitAndRegionId:t,userLevel:n.authentication.levelId};i=n.person.OfficialUnitIsSmea||n.person.OfficialUnitIsIntercultural||n.person.OfficialUnitIsArtistic||n.person.OfficialUnitIsMusic;r=f.all([v.getByAll("/api/RegionAndUnit/getRegionAndUnitForPlacement"),v.getByParams({OfficialRegionAndUnitId:t,specialUnit:i,applicationType:n.applicationType},"/api/RegionAndUnit/getPysdpeFromOfficialRegionAndUnitId"),]);r.then(function(t){n.OfficialPlacementUnits=t[0];n.PyspdeFormOfficial=t[1];n.changedRegionAndUnit()})};n.getPostingTranferAreas=function(){v.getByParams({id:n.secondment.OfficialRegionAndUnitId},"/api/RegionAndUnit/getPostingTransferAreaByRegionAndUnitId").then(function(t){n.PostingTranferAreas=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.changedRegionAndUnit=function(){n.checkForPostingTransferArea();n.getPostingTranferAreas()};n.changeLevel=function(){b();w();n.secondment.LevelId==1&&(n.secondment.IsPyspde=!0)};n.checkForPostingTransferArea=function(){n.myfilter=i("filter")(n.OfficialPlacementUnits,{Id:n.secondment.OfficialRegionAndUnitId},!0)[0];n.myfilter.RegionAndUnitTypeId==8?(n.showPostingTransferArea=!0,n.showLevel=!1,n.secondment.LevelId=n.myfilter.LevelId,n.secondment.LevelId==1&&(n.secondment.IsPyspde=!0),b(),w()):(v.getByAll("/api/Dbo/getLevelsAsync").then(function(t){n.levels=t;n.showLevel=!0;n.changeLevel()},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία φόρτωσης βαθμίδων επιλογής")}),n.showPostingTransferArea=!1,n.secondment.PostingTransferAreaId=null)};n.getDateForProposal=function(){n.dateForProposal="31/8/"+n.applicationDidacticYear.YearFrom};n.checkForShowAlertMessageForMate=function(){n.ShowAlertMessageForMate=n.secondment.MilitaryMate||n.secondment.JudicialMate||n.secondment.DEPMate||n.secondment.DoctorMate?n.secondment.MateProfession==2&&(n.secondment.MaritalStatus==1||n.secondment.MaritalStatus==6)&&n.secondment.JointServiceId>0?!1:!0:!1};n.DisableOtherChks=function(t){n.ShowAlertMessageForMate=!1;switch(t){case"MilitaryMate":n.secondment.MilitaryMate?(n.disabled={MilitaryMate:!1,JudicialMate:!0,DEPMate:!0,DoctorMate:!0},n.JudicialMate=!1,n.DEPMate=!1,n.DoctorMate=!1,n.checkForShowAlertMessageForMate()):n.disabled={MilitaryMate:!1,JudicialMate:!1,DEPMate:!1,DoctorMate:!1};break;case"JudicialMate":n.secondment.JudicialMate?(n.disabled={MilitaryMate:!0,JudicialMate:!1,DEPMate:!0,DoctorMate:!0},n.checkForShowAlertMessageForMate()):n.disabled={MilitaryMate:!1,JudicialMate:!1,DEPMate:!1,DoctorMate:!1};break;case"DEPMate":n.secondment.DEPMate?(n.disabled={MilitaryMate:!0,JudicialMate:!0,DEPMate:!1,DoctorMate:!0},n.checkForShowAlertMessageForMate()):n.disabled={MilitaryMate:!1,JudicialMate:!1,DEPMate:!1,DoctorMate:!1};break;case"DoctorMate":n.secondment.DoctorMate?(n.disabled={MilitaryMate:!0,JudicialMate:!0,DEPMate:!0,DoctorMate:!1},n.checkForShowAlertMessageForMate()):n.disabled={MilitaryMate:!1,JudicialMate:!1,DEPMate:!1,DoctorMate:!1}}};n.changeMaritalStatus=function(){n.secondment.MaritalStatus==1||n.secondment.MaritalStatus==6?(n.secondment.MateProfession=0,n.secondment.JointExamination=!1,n.secondment.MateProtocolNumber=null,n.secondment.MateRegistryNo=null,n.secondment.JointServiceId=null,n.secondment.OtherMateProfession=null,n.secondment.ChildCustody=!1,n.showMateHealthProblems=!0):n.secondment.MaritalStatus==3||n.secondment.MaritalStatus==4?(n.secondment.MateProfession=0,n.secondment.JointExamination=null,n.secondment.MateProtocolNumber=null,n.secondment.MateRegistryNo=null,n.secondment.JointServiceId=null,n.secondment.OtherMateProfession=null,n.showMateHealthProblems=!1,n.secondment.MateHealthProblems=null,n.secondment.MateDiseaseDetails=null,n.secondment.MateHealthProblemsKEPA=!1,n.secondment.ChildCustody=!1,n.secondment.JointExamination=!1):n.secondment.MaritalStatus==2||n.secondment.MaritalStatus==5?(n.secondment.MateProfession=0,n.secondment.JointExamination=!1,n.secondment.MateProtocolNumber=null,n.secondment.MateRegistryNo=null,n.secondment.JointServiceId=null,n.secondment.OtherMateProfession=null,n.secondment.ChildCustody=!1,n.showMateHealthProblems=!1,n.secondment.MateHealthProblems=null,n.secondment.MateDiseaseDetails=null,n.secondment.MateHealthProblemsKEPA=!1,n.secondment.JointExamination=!1):(n.secondment.MateProfession=0,n.secondment.JointExamination=!1,n.secondment.MateProtocolNumber=null,n.secondment.MateRegistryNo=null,n.secondment.JointServiceId=null,n.secondment.OtherMateProfession=null,n.secondment.ChildCustody=!1,n.showMateHealthProblems=!1,n.secondment.MateHealthProblems=null,n.secondment.MateDiseaseDetails=null,n.secondment.MateHealthProblemsKEPA=!1,n.secondment.JointExamination=!1);n.checkForShowAlertMessageForMate()};n.changeUnderAgedOrStudingChildren=function(){n.secondment.UnderAgedOrStudingChildren==0&&n.secondment.StudingChildren==0&&(n.secondment.ChildCustody=!1);n.showChildCustody()};n.changeJointServiceId=function(){n.checkForShowAlertMessageForMate()};n.showMateProfession=function(){return n.secondment.MaritalStatus==1||n.secondment.MaritalStatus==6?!0:!1};n.clickLocality=function(){n.secondment.Locality==!1&&(n.secondment.LocalityPyspdeId=null);n.secondment.LocalityMunicipalityId=null};n.clickJointExamination=function(){n.secondment.JointExamination==!1&&(n.secondment.MateRegistryNo=null)};n.clickPostGraduateStudies=function(){n.secondment.PostGraduateStudies==!1&&(n.secondment.StudiesPyspdeId=null)};n.clickHasDisease=function(){if(n.secondment.HasDisease){if(v.isEmpty(n.secondment.Id))v.isEmpty(n.SelectedDiseaseListItems)&&v.getByAll("/api/SecondmentPyspdeChurchController/getDiseases").then(function(t){n.AvailableDiseaseListItems=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία φόρτωσης ασθενειών")});else if(n.secondment.HasDisease&&v.isEmpty(n.SelectedDiseaseListItems)){var t=f.all([v.getByAll("/api/SecondmentPyspdeChurchController/getDiseases"),v.getByParams({applicationId:n.secondment.Id},"/api/SecondmentPyspdeChurchController/getSecondmentDiseaseById"),]);t.then(function(t){angular.copy(t[0],n.AvailableDiseaseListItems);n.SelectedDiseaseListItems=t[1];n.SelectedAvailDiseaseItems=t[1];n.removeDuplicatesDiseaseForDualList()})}}else n.SelectedAvailDiseaseItems=[],n.SelectedSelectedDiseaseListItems=[],n.SelectedDiseaseListItems=[]};n.showMateProtocolNumber=function(){return n.secondment.MateProfession==1&&(n.secondment.MaritalStatus==1||n.secondment.MaritalStatus==6)?!0:!1};n.showJointServiceId=function(){return n.secondment.MateProfession>0&&(n.secondment.MaritalStatus==1||n.secondment.MaritalStatus==6)?!0:!1};n.showMateRegistryNo=function(){return n.secondment.MateProfession==1&&(n.secondment.MaritalStatus==1||n.secondment.MaritalStatus==6)&&n.secondment.JointExamination?!0:!1};n.showChildCustody=function(){return(n.secondment.MaritalStatus==3||n.secondment.MaritalStatus==4)&&(n.secondment.UnderAgedOrStudingChildren>0||n.secondment.StudingChildren>0)?!0:!1};n.showUnderAgedOrStudingChildren=function(){return n.secondment.MaritalStatus==2||n.secondment.MaritalStatus==5?!0:!1};n.showJointExamination=function(){return n.secondment.MateProfession==1&&(n.secondment.MaritalStatus==1||n.secondment.MaritalStatus==6)?!0:!1};n.showOtherMateProfession=function(){return n.secondment.MateProfession==2&&(n.secondment.MaritalStatus==1||n.secondment.MaritalStatus==6)?!0:!1};n.showParentsPyspde=function(){return n.secondment.ParentsHealthProblems>0?!0:!1};n.showBrothersPyspde=function(){return n.secondment.BrothersHealthProblems>0?!0:!1};n.showDisease=function(){return n.secondment.SpecialCategoryId==2?!0:!1};n.changeMateProfession=function(){n.secondment.MateProfession==2?(n.secondment.MateProtocolNumber=null,n.secondment.MateRegistryNo=null,n.secondment.JointExamination=!1):n.secondment.MateProfession==1?n.secondment.OtherMateProfession=null:(n.secondment.MateProtocolNumber=null,n.secondment.MateRegistryNo=null,n.secondment.JointExamination=!1,n.secondment.JointServiceId=null,n.secondment.OtherMateProfession=null);n.checkForShowAlertMessageForMate()};n.changeParentsHealthProblems=function(){n.secondment.ParentsHealthProblems==null&&(n.secondment.ParentsPyspdeId=null)};n.changeBrothersHealthProblems=function(){n.secondment.BrothersHealthProblems==null&&(n.secondment.BrothersPyspdeId=null)};n.changeBrothersHealthProblems=function(){n.secondment.BrothersHealthProblems==null&&(n.secondment.BrothersPyspdeId=null)};n.changeSpecialCategoryId=function(){n.secondment.SpecialCategoryId!=4&&(n.secondment.DiseaseDetails=null,n.secondment.DiseaseId=null)};n.changeDiseaseId=function(){n.secondment.DiseaseId!=18&&(n.secondment.DiseaseDetails=null)};n.checkSelectedFromOfficial=function(){if(!v.isEmpty(n.SelectedPyspdeListItems)&&n.PyspdeFormOfficial>0){var t=n.myfilter=i("filter")(n.SelectedPyspdeListItems,{RegionAndUnitId:n.PyspdeFormOfficial},!0);t.length>0?(n.showAlertPyspdeFormOfficial=!0,t.length==1?(n.concatPyspde=t[0].DescriptionConc,n.messagePyspde="Δεν επιτρέπεται η επιλογή "+n.concatPyspde+", καθώς ταυτίζεται με τη Δ/νση Οργανικής σας"):(n.concatPyspde=t[0].DescriptionConc+","+t[1].DescriptionConc,n.messagePyspde="Δεν επιτρέπονται οι επιλογές "+n.concatPyspde+" καθώς ταυτίζονται με τη Δ/νση Οργανικής σας.")):(n.showAlertPyspdeFormOfficial=!1,n.concatPyspde="")}else n.showAlertPyspdeFormOfficial=!1,n.concatPyspde=""};n.goToMaritalAndPointsCriteria=function(){u.scrollTo(0,0);$("#SecondmentPyspdeChurchStep1").valid()&&(n.personalStep=!1,n.maritalAndPointsCriteriaStep=!0,n.regionStep=!1,v.isEmpty(n.secondment.Id)||n.clickHasDisease())};n.removeDuplicatesPyspdeForDualList=function(){n.checkSelectedFromOfficial();var t=[];angular.forEach(n.SelectedAvailPyspdeItems,function(i){for(var r=n.AvailablePyspdeListItems.length-1;r>=0;r--)n.AvailablePyspdeListItems[r].Id==i.Id&&n.AvailablePyspdeListItems.splice(r,1);n.secondment.JointExamination==!1&&i.JointExamination==!0&&t.push(i.Id)});angular.forEach(t,function(t){for(var i=n.SelectedAvailPyspdeItems.length-1;i>=0;i--)n.SelectedAvailPyspdeItems[i].Id==t&&n.SelectedAvailPyspdeItems.splice(i,1)});n.SelectedAvailPyspdeItems=[];n.SelectedSelectedPyspdeListItems=[]};n.removeDuplicatesPyspdeForDualListForInsert=function(){n.checkSelectedFromOfficial();var t=[];angular.forEach(n.SelectedPyspdeListItems,function(i){n.secondment.JointExamination==!1&&i.JointExamination==!0&&t.push(i.Id)});angular.forEach(t,function(t){for(var i=n.SelectedPyspdeListItems.length-1;i>=0;i--)n.SelectedPyspdeListItems[i].Id==t&&n.SelectedPyspdeListItems.splice(i,1)});angular.copy(n.SelectedPyspdeListItems,n.SelectedAvailPyspdeItems);n.removeDuplicatesPyspdeForDualList()};n.removeDuplicatesChurchForDualList=function(){var t=[];angular.forEach(n.SelectedAvailChurchItems,function(i){for(var r=n.AvailableChurchListItems.length-1;r>=0;r--)n.AvailableChurchListItems[r].Id==i.Id&&n.AvailableChurchListItems.splice(r,1);n.secondment.JointExamination==!1&&i.JointExamination==!0&&t.push(i.Id)});t.length>0&&angular.forEach(t,function(t){for(var i=n.SelectedAvailChurchItems.length-1;i>=0;i--)n.SelectedAvailChurchItems[i].Id==t&&n.SelectedAvailChurchItems.splice(i,1)});n.SelectedAvailChurchItems=[];n.SelectedSelectedChurchListItems=[]};n.removeDuplicatesDiseaseForDualList=function(){angular.forEach(n.SelectedAvailDiseaseItems,function(t){for(var i=n.AvailableDiseaseListItems.length-1;i>=0;i--)n.AvailableDiseaseListItems[i].Id==t.Id&&n.AvailableDiseaseListItems.splice(i,1)});n.SelectedAvailDiseaseItems=[];n.SelectedSelectedDiseaseListItems=[]};n.removeDuplicatesChurchForDualListForInsert=function(){var t=[];angular.forEach(n.SelectedChurchListItems,function(i){n.secondment.JointExamination==!1&&i.JointExamination==!0&&t.push(i.Id)});angular.forEach(t,function(t){for(var i=n.SelectedChurchListItems.length-1;i>=0;i--)n.SelectedChurchListItems[i].Id==t&&n.SelectedChurchListItems.splice(i,1)});angular.copy(n.SelectedChurchListItems,n.SelectedAvailChurchItems);n.removeDuplicatesChurchForDualList()};n.goToRegions=function(){var i,t;n.showAlertDisease=n.secondment.HasDisease&&v.isEmpty(n.SelectedDiseaseListItems)?!0:!1;!$("#SecondmentPyspdeChurchStep2").valid()||n.ShowAlertMessageForMate||n.showAlertDisease||(n.personalStep=!1,n.maritalAndPointsCriteriaStep=!1,n.regionStep=!0,u.scrollTo(0,0),n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"?((n.secondmentDocument.Id==null||n.secondmentDocument.Id==""||n.secondmentDocument.Id=="undefined")&&v.getByParams({id:n.secondment.Id},"/api/SecondmentPyspdeChurchController/getApplDocumentsById").then(function(t){n.secondmentDocument=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),n.secondment.IsPyspde?n.secondment.JointExamination?n.IsFirstTimePyspde?(i=f.all([l.getPyspdeJointExaminationByLevel(n.applicationType,n.secondment.LevelId),c.getApplPyspdeById(n.secondment.Id,n.secondment.LevelId),]),i.then(function(t){n.SelectedPyspdeListItems=t[1];n.SelectedAvailPyspdeItems=t[1];n.PyspdeListItems=t[0];angular.copy(n.PyspdeListItems,n.AvailablePyspdeListItems);n.removeDuplicatesPyspdeForDualList();n.IsFirstTimePyspde=!1},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})):v.isEmpty(n.PyspdeListItems)?l.getPyspdeJointExaminationByLevel(n.applicationType,n.secondment.LevelId).then(function(t){n.PyspdeListItems=t;angular.copy(n.PyspdeListItems,n.AvailablePyspdeListItems);angular.copy(n.SelectedPyspdeListItems,n.SelectedAvailPyspdeItems);n.removeDuplicatesPyspdeForDualListForInsert()},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των πιθανών ασθενειών","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(angular.copy(n.PyspdeListItems,n.AvailablePyspdeListItems),angular.copy(n.SelectedPyspdeListItems,n.SelectedAvailPyspdeItems),n.removeDuplicatesPyspdeForDualListForInsert()):n.IsFirstTimePyspde?c.getApplPyspdeById(n.secondment.Id,n.secondment.LevelId).then(function(t){n.SelectedAvailPyspdeItems=t;n.SelectedPyspdeListItems=t;angular.copy(n.consts.pyspde,n.AvailablePyspdeListItems);n.removeDuplicatesPyspdeForDualList();n.IsFirstTimePyspde=!1},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των πιθανών ασθενειών","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(angular.copy(n.SelectedPyspdeListItems,n.SelectedAvailPyspdeItems),angular.copy(n.consts.pyspde,n.AvailablePyspdeListItems),n.removeDuplicatesPyspdeForDualListForInsert()):(n.SelectedAvailPyspdeItems=[],n.SelectedSelectedPyspdeListItems=[],n.SelectedPyspdeListItems=[]),n.secondment.IsChurch?n.secondment.JointExamination?n.IsFirstTimeChurch?(t=f.all([l.getChurchJointExaminationBySex(n.applicationType,n.person.Sex),c.getApplChurchById(n.secondment.Id)]),t.then(function(t){n.SelectedChurchListItems=t[1];n.SelectedAvailChurchItems=t[1];n.ChurchListItems=t[0];angular.copy(n.ChurchListItems,n.AvailableChurchListItems);n.removeDuplicatesChurchForDualList();n.IsFirstTimeChurch=!1},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})):v.isEmpty(n.ChurchListItems)?l.getChurchJointExaminationBySex(n.applicationType,n.person.Sex).then(function(t){n.ChurchListItems=t;angular.copy(n.ChurchListItems,n.AvailableChurchListItems);angular.copy(n.SelectedChurchListItems,n.SelectedAvailChurchItems);n.removeDuplicatesChurchForDualListForInsert()},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των πιθανών ασθενειών","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.SelectedAvailChurchItems=[],angular.copy(n.ChurchListItems,n.AvailableChurchListItems),angular.copy(n.SelectedChurchListItems,n.SelectedAvailChurchItems),n.removeDuplicatesChurchForDualListForInsert()):n.IsFirstTimeChurch?(t=f.all([l.getChurchWithoutJointExaminationBySex(n.applicationType,n.person.Sex),c.getApplChurchById(n.secondment.Id)]),t.then(function(t){n.SelectedChurchListItems=t[1];n.SelectedAvailChurchItems=t[1];n.ChurchListItemsWithoutJoint=t[0];angular.copy(n.ChurchListItemsWithoutJoint,n.AvailableChurchListItems);n.removeDuplicatesChurchForDualList();n.IsFirstTimeChurch=!1},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})):v.isEmpty(n.ChurchListItemsWithoutJoint)?l.getChurchWithoutJointExaminationBySex(n.applicationType,n.person.Sex).then(function(t){n.ChurchListItemsWithoutJoint=t;angular.copy(n.ChurchListItemsWithoutJoint,n.AvailableChurchListItems);angular.copy(n.SelectedChurchListItems,n.SelectedAvailChurchItems);n.removeDuplicatesChurchForDualListForInsert()},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των πιθανών ασθενειών","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.SelectedAvailChurchItems=[],angular.copy(n.SelectedChurchListItems,n.SelectedAvailChurchItems),angular.copy(n.ChurchListItemsWithoutJoint,n.AvailableChurchListItems),n.removeDuplicatesChurchForDualListForInsert()):(n.SelectedAvailChurchItems=[],n.SelectedSelectedChurchListItems=[],n.SelectedChurchListItems=[])):(n.secondment.IsPyspde&&(n.secondment.JointExamination?v.isEmpty(n.PyspdeListItems)?l.getPyspdeJointExaminationByLevel(n.applicationType,n.secondment.LevelId).then(function(t){n.PyspdeListItems=t;angular.copy(n.PyspdeListItems,n.AvailablePyspdeListItems)},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των πιθανών ασθενειών","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):angular.copy(n.PyspdeListItems,n.AvailablePyspdeListItems):angular.copy(n.consts.pyspde,n.AvailablePyspdeListItems),n.removeDuplicatesPyspdeForDualListForInsert()),n.secondment.IsChurch&&(n.secondment.JointExamination?v.isEmpty(n.ChurchListItems)?l.getChurchJointExaminationBySex(n.applicationType,n.person.Sex).then(function(t){n.ChurchListItems=t;angular.copy(n.ChurchListItems,n.AvailableChurchListItems)},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των επιλογών για τα εκκλησιαστικά σχολεία","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):angular.copy(n.ChurchListItems,n.AvailableChurchListItems):v.isEmpty(n.ChurchListItemsWithoutJoint)?l.getChurchWithoutJointExaminationBySex(n.applicationType,n.person.Sex).then(function(t){n.ChurchListItemsWithoutJoint=t;angular.copy(n.ChurchListItemsWithoutJoint,n.AvailableChurchListItems)},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Αδύνατη φορτωση των επιλογών για τα Εκκλησιαστικά σχολεία.")}):angular.copy(n.ChurchListItemsWithoutJoint,n.AvailableChurchListItems),n.removeDuplicatesChurchForDualListForInsert())))};n.goToPersonal=function(){n.personalStep=!0;n.maritalAndPointsCriteriaStep=!1;n.regionStep=!1;u.scrollTo(0,0)};n.InsOrUpd=function(t){var r={Pyspde:n.SelectedPyspdeListItems,SecondmentPyspdeChurch:n.secondment,Church:n.SelectedChurchListItems,Status:t,SecondmentDocument:n.secondmentDocument,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Disease:n.SelectedDiseaseListItems},i=r;n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"?c.updateSecondmentPyspdeChurch(i).then(function(){e.setPersonId(n.secondment.PersonId);v.isValueInArray(n.pageRules.secPyspde.CanAccess,"u1, u2")?o.go("history"):o.go("history")}).catch(function(n){s.pop("error","Παρουσιάστηκε σφάλμα",n.data)}):c.insertSecondmentPyspdeChurch(i).then(function(){e.setPersonId(n.secondment.PersonId);v.isValueInArray(n.pageRules.secPyspde.CanAccess,"u1, u2")?o.go("history"):o.go("history")}).catch(function(n){s.pop("error","Παρουσιάστηκε σφάλμα",n.data)})};n.saveAction=function(i){if(n.showAlertRegions=n.secondment.IsPyspde&&v.isEmpty(n.SelectedPyspdeListItems)?!0:!1,n.showAlertForUploadCV=!1,n.showAlertChurches=n.secondment.IsChurch&&v.isEmpty(n.SelectedChurchListItems)?!0:!1,$("#SecondmentPyspdeChurchStep3").valid()&&!n.showAlertRegions&&!n.showAlertChurches&&!n.showAlertPyspdeFormOfficial)if(i=="final"){var u=t.open({templateUrl:"ModalContent.html",controller:OpenModalController});u.result.then(function(t){t&&n.InsOrUpd(i)},function(){r.info("Modal dismissed at: "+new Date)})}else n.InsOrUpd(i)};n.getMunicipalityByPyspde=function(){v.getByParams({pyspdeId:n.secondment.LocalityPyspdeId},"/api/RegionAndUnit/getMunicipalityByPyspde").then(function(t){n.consts.pyspdeMunicipality=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})};n.checkForMusic=function(t){t.lastIndexOf("ΠΕ79",0)===0||t.lastIndexOf("ΤΕ16",0)===0?n.showMusic=!0:(n.showMusic=!1,n.secondment.NoMusicSchool=!1)};n.doAll=function(){if(n.secondment.Id!=null&&n.secondment.Id!=""&&n.secondment.Id!="undefined"){if(n.canUpdateAppl){n.AvailablePyspdeListItems=[];var t=f.all([v.getByParams({id:n.secondment.PersonId},"/api/Person/GetSecondmentPersonDto"),c.getSecondmentPyspdeChurchById(n.secondment.Id)]);t.then(function(t){n.person=t[0];n.secondment=t[1];n.getDateForProposal();n.secondment.SpecialityId=t[0].Speciality.Id;n.checkForMusic(t[0].Speciality.Code);n.secondment.LocalityPyspdeId!=null&&n.getMunicipalityByPyspde();n.paramsForCheckUpd.personId=n.secondment.PersonId;n.paramsForCheckUpd.levelUser=n.authentication.levelId;n.paramsForCheckUpd.regionAndUnitId=n.authentication.regionAndUnitId;n.paramsForCheckUpd.userRole=n.authentication.role;n.paramsForCheckUpd.specialityId=n.secondment.SpecialityId;n.paramsForCheckUpd.applicationLevelId=n.secondment.LevelId;n.paramsForCheckUpd.applicationTypeId=n.applicationType;n.paramsForCheckUpd.IsActive=n.secondment.IsActive;n.paramsForCheckUpd.FekId=n.secondment.FekId;v.postByParams(n.paramsForCheckUpd,"/api/General/checkUpdateSecFromFEKAndUser").then(function(i){n.IsDisabled=!i;n.IsDisabled&&(n.noUpdAccess=!0);v.isValueInArray(n.pageRules.secPyspde.CanAccess,"u1, u2")&&n.secondment.IsActive&&!n.secondment.IsTemporaryStored&&(n.IsDisabled=!0,n.cannotUpdate=!0);n.secondment.IsActive||(n.IsDisabled=!0,n.notActive=!0);v.isValueInArray(n.pageRules.secPyspde.CanAccess,"d1, d2, p")&&n.secondment.OfficialRegionAndUnitId!=n.authentication.regionAndUnitId&&(n.IsDisabled=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.secPyspde.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0);n.oldRegistry=n.secondment.MateRegistryNo;v.isEmpty(n.secondment.SecondmentPyspdeChurchProtocols)||(n.protocol=n.secondment.SecondmentPyspdeChurchProtocols[0].ProtocolString,n.showProtocol=!0);n.secondment.MaritalStatus==1||n.secondment.MaritalStatus==6?n.showMateHealthProblems=!0:(n.showMateHealthProblems=!1,n.secondment.MateHealthProblems=null,n.secondment.MateDiseaseDetails=null,n.secondment.MateHealthProblemsKEPA=!1);n.secondment.MilitaryMate?n.DisableOtherChks("MilitaryMate"):n.secondment.JudicialMate?n.DisableOtherChks("JudicialMate"):n.secondment.DEPMate?n.DisableOtherChks("DEPMate"):n.secondment.DoctorMate&&n.DisableOtherChks("DoctorMate");t[1].ApplicationTypeFek.DisplayModal&&(n.disabled.MilitaryMate=!0);n.getOfficialPlacementUnits()})})}}else n.canInsertAppl&&n.secondment.PersonId!=null&&n.secondment.PersonId!=""&&n.secondment.PersonId!="undefined"&&(n.AvailablePyspdeListItems=[],v.getByParams({id:n.secondment.PersonId},"/api/Person/GetSecondmentPersonDto").then(function(t){n.person=t;n.getDateForProposal();n.secondment.SpecialityId=t.Speciality.Id;n.checkForMusic(t.Speciality.Code);n.secondment.OfficialRegionAndUnitId=t.OfficialRegionAndUnit.Id;n.secondment.OfficialPlacementUnitDescription=t.OfficialPlacementUnitDescription;n.secondment.PostingTransferAreaId=t.PostingTransferArea==null?null:t.PostingTransferArea.Id;n.secondment.ExperienceYears=t.ExperienceYears;n.secondment.ExperienceDays=t.ExperienceDays;n.secondment.ExperienceMonths=t.ExperienceMonths;n.secondment.NominationYear=t.NominationYear;n.secondment.LevelId=t.OfficialRegionAndUnit.LevelId;n.secondment.MaritalStatus=t.MaritalStatus;n.changeMaritalStatus();n.secondment.UnderAgedOrStudingChildren=t.UnderAgedOrStudingChildren;n.secondment.LocalityPyspdeId=t.LocalityPyspdeId;n.secondment.LocalityMunicipalityId=t.LocalityMunicipalityId;n.secondment.JointServiceId=t.JointServiceId;n.secondment.LocalityPyspdeId!=null&&(n.secondment.Locality=!0,n.getMunicipalityByPyspde());n.secondment.JointServiceId!=null&&(n.secondment.MateProfession=t.MateRegistryNo!=null?1:2,n.changeMateProfession());n.secondment.MateRegistryNo=t.MateRegistryNo;n.secondment.MateRegistryNo!=null&&(n.secondment.JointExamination=!0,n.showJointExamination());n.secondment.ChildCustody=n.secondment.MaritalStatus==3||n.secondment.MaritalStatus==4?t.Custody:!1;n.showMateProfession();n.showMateProtocolNumber();n.getOfficialPlacementUnits()},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}))};n.btnPyspdeUp=function(){for(var t,r,u,f=n.SelectedSelectedPyspdeListItems,i=0;i<n.SelectedSelectedPyspdeListItems.length;i++){if(t=n.SelectedPyspdeListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedPyspdeListItems[i].Id),t<=0||t>=n.SelectedPyspdeListItems.length)return;r=n.SelectedPyspdeListItems[t];u=n.SelectedPyspdeListItems[t-1];n.SelectedPyspdeListItems[t-1]=r;n.SelectedPyspdeListItems[t]=u}};n.btnPyspdeDown=function(){for(var t,r,u,i=n.SelectedSelectedPyspdeListItems.length-1;i>=0;i--){if(t=n.SelectedPyspdeListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedPyspdeListItems[i].Id),t<0||t>=n.SelectedPyspdeListItems.length-1)return;r=n.SelectedPyspdeListItems[t];u=n.SelectedPyspdeListItems[t+1];n.SelectedPyspdeListItems[t+1]=r;n.SelectedPyspdeListItems[t]=u}};n.btnPyspdeRight=function(){n.checkRegions();n.canInsertRegions&&(angular.forEach(n.SelectedAvailPyspdeItems,function(n){this.push(n)},n.SelectedPyspdeListItems),angular.forEach(n.SelectedAvailPyspdeItems,function(t){for(var i=n.AvailablePyspdeListItems.length-1;i>=0;i--)n.AvailablePyspdeListItems[i].Id==t.Id&&n.AvailablePyspdeListItems.splice(i,1)}),n.SelectedAvailPyspdeItems=[],n.SelectedSelectedPyspdeListItems=[]);n.checkSelectedFromOfficial()};n.checkRegions=function(){var e=5,o=5,h=10,t,r,u,f;n.canInsertRegions=!0;t=i("filter")(n.SelectedPyspdeListItems,{JointExamination:!1},!0).length;r=i("filter")(n.SelectedAvailPyspdeItems,{JointExamination:!1},!0).length;n.secondment.JointExamination&&(u=i("filter")(n.SelectedPyspdeListItems,{JointExamination:!0},!0).length,f=i("filter")(n.SelectedAvailPyspdeItems,{JointExamination:!0},!0).length,u+f>o&&(s.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών με συνεξέταση","Δεν μπορείτε να επιλέξετε περισσότερες από "+o+" περιοχές με συνεξέταση"),n.canInsertRegions=!1));t+r>e&&(s.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών χωρίς συνεξέταση","Δεν μπορείτε να επιλέξετε περισσότερες από "+e+" περιοχές χωρίς συνεξέταση"),n.canInsertRegions=!1);t+r+u+f>h&&(s.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών","Δεν μπορείτε να επιλέξετε περισσότερες από "+h+" περιοχές"),n.canInsertRegions=!1)};n.btnPyspdeLeft=function(){angular.forEach(n.SelectedSelectedPyspdeListItems,function(n){this.push(n)},n.AvailablePyspdeListItems);angular.forEach(n.SelectedSelectedPyspdeListItems,function(t){for(var i=n.SelectedPyspdeListItems.length-1;i>=0;i--)n.SelectedPyspdeListItems[i].Id==t.Id&&n.SelectedPyspdeListItems.splice(i,1)});n.SelectedSelectedPyspdeListItems=[];n.SelectedAvailPyspdeItems=[];n.checkSelectedFromOfficial()};n.SelectedAvailChurchItems=[];n.SelectedSelectedChurchListItems=[];n.SelectedChurchListItems=[];n.btnChurchUp=function(){for(var t,r,u,f=n.SelectedSelectedChurchListItems,i=0;i<n.SelectedSelectedChurchListItems.length;i++){if(t=n.SelectedChurchListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedChurchListItems[i].Id),t<=0||t>=n.SelectedChurchListItems.length)return;r=n.SelectedChurchListItems[t];u=n.SelectedChurchListItems[t-1];n.SelectedChurchListItems[t-1]=r;n.SelectedChurchListItems[t]=u}};n.btnChurchDown=function(){for(var t,r,u,i=n.SelectedSelectedChurchListItems.length-1;i>=0;i--){if(t=n.SelectedChurchListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedChurchListItems[i].Id),t<0||t>=n.SelectedChurchListItems.length-1)return;r=n.SelectedChurchListItems[t];u=n.SelectedChurchListItems[t+1];n.SelectedChurchListItems[t+1]=r;n.SelectedChurchListItems[t]=u}};n.btnChurchRight=function(){n.checkChurches();n.canInsertChurches&&(angular.forEach(n.SelectedAvailChurchItems,function(n){this.push(n)},n.SelectedChurchListItems),angular.forEach(n.SelectedAvailChurchItems,function(t){for(var i=n.AvailableChurchListItems.length-1;i>=0;i--)n.AvailableChurchListItems[i].Id==t.Id&&n.AvailableChurchListItems.splice(i,1)}),n.SelectedAvailChurchItems=[],n.SelectedSelectedChurchListItems=[])};n.checkChurches=function(){var e=4,o=4,h=8,t,r,u,f;n.canInsertChurches=!0;t=i("filter")(n.SelectedChurchListItems,{JointExamination:!1},!0).length;r=i("filter")(n.SelectedAvailChurchItems,{JointExamination:!1},!0).length;n.secondment.JointExamination&&(u=i("filter")(n.SelectedChurchListItems,{JointExamination:!0},!0).length,f=i("filter")(n.SelectedAvailChurchItems,{JointExamination:!0},!0).length,u+f>o&&(s.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών με συνεξέταση","Δεν μπορείτε να επιλέξετε περισσότερες από "+o+" περιοχές με συνεξέταση"),n.canInsertChurches=!1));t+r>e&&(s.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών χωρίς συνεξέταση","Δεν μπορείτε να επιλέξετε περισσότερες από "+e+" περιοχές χωρίς συνεξέταση"),n.canInsertChurches=!1);t+r+u+f>h&&(s.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών","Δεν μπορείτε να επιλέξετε περισσότερες από "+h+" περιοχές"),n.canInsertChurches=!1)};n.btnChurchLeft=function(){angular.forEach(n.SelectedSelectedChurchListItems,function(n){this.push(n)},n.AvailableChurchListItems);angular.forEach(n.SelectedSelectedChurchListItems,function(t){for(var i=n.SelectedChurchListItems.length-1;i>=0;i--)n.SelectedChurchListItems[i].Id==t.Id&&n.SelectedChurchListItems.splice(i,1)});n.SelectedSelectedChurchListItems=[];n.SelectedAvailChurchItems=[]};n.SelectedAvailDiseaseItems=[];n.SelectedSelectedDiseaseListItems=[];n.SelectedDiseaseListItems=[];n.btnDiseaseUp=function(){for(var t,r,u,f=n.SelectedSelectedDiseaseListItems,i=0;i<n.SelectedSelectedDiseaseListItems.length;i++){if(t=n.SelectedDiseaseListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedDiseaseListItems[i].Id),t<=0||t>=n.SelectedDiseaseListItems.length)return;r=n.SelectedDiseaseListItems[t];u=n.SelectedDiseaseListItems[t-1];n.SelectedDiseaseListItems[t-1]=r;n.SelectedDiseaseListItems[t]=u}};n.btnDiseaseDown=function(){for(var t,r,u,i=n.SelectedSelectedDiseaseListItems.length-1;i>=0;i--){if(t=n.SelectedDiseaseListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedDiseaseListItems[i].Id),t<0||t>=n.SelectedDiseaseListItems.length-1)return;r=n.SelectedDiseaseListItems[t];u=n.SelectedDiseaseListItems[t+1];n.SelectedDiseaseListItems[t+1]=r;n.SelectedDiseaseListItems[t]=u}};n.btnDiseaseRight=function(){angular.forEach(n.SelectedAvailDiseaseItems,function(n){this.push(n)},n.SelectedDiseaseListItems);angular.forEach(n.SelectedAvailDiseaseItems,function(t){for(var i=n.AvailableDiseaseListItems.length-1;i>=0;i--)n.AvailableDiseaseListItems[i].Id==t.Id&&n.AvailableDiseaseListItems.splice(i,1)});n.SelectedAvailDiseaseItems=[];n.SelectedSelectedDiseaseListItems=[]};n.btnDiseaseLeft=function(){angular.forEach(n.SelectedSelectedDiseaseListItems,function(n){this.push(n)},n.AvailableDiseaseListItems);angular.forEach(n.SelectedSelectedDiseaseListItems,function(t){for(var i=n.SelectedDiseaseListItems.length-1;i>=0;i--)n.SelectedDiseaseListItems[i].Id==t.Id&&n.SelectedDiseaseListItems.splice(i,1)});n.SelectedSelectedDiseaseListItems=[];n.SelectedAvailDiseaseItems=[]};n.onFileSelect=function(t){var r,i;for(n.messages={completed:"",percentage:"0",error:""},n.showAlertForUploadCV=!1,r=0;r<t.length;r++){if(i=t[r],i.type!="application/x-zip-compressed"&&i.type!="application/x-compressed"&&i.type!="application/zip"&&i.type!="multipart/x-zip"&&i.type!="application/pdf"){n.messages.error='Μη έγκυρη επέκταση αρχείου "'+i.name+'". Οι επεκτάσεις που υποστηρίζονται είναι: "<b>zip και pdf<\/b>" .';return}if(i.size>=10485760){n.messages.error='Το αρχείο "'+i.name+'" (<b>'+Math.round(i.size/1024)+" KB<\/b>) υπερβαίνει το μέγιστο επιτρεπόμενο μέγεθος μεταφόρτωσης <b>10000 KB<\/b>.";return}(function(t){n.upload[t]=y.upload({url:"/api/files/uploadPyspde",method:"POST",data:{SendDataForCVDto:n.SendDataForCVDto},file:i}).progress(function(t){n.messages.percentage=parseInt(100*t.loaded/t.total)}).then(function(t){n.messages.completed="Το αρχείο <b>"+i.name+"<\/b> μεταφορτώθηκε με επιτυχία.";n.SendDataForCVDto.Id=t.data.secPyspdeFile.Id;n.SendDataForCVFullDto=t.data.secPyspdeFile;n.uploadedFileDetails=t.data.Message}).catch(function(t){n.messages.error=t.data.Message})})(r)}};n.abortUpload=function(t){n.upload[t].abort()};n.downloadFile=function(){v.getByParamsDownload({PersonId:n.secondment.PersonId,Path:n.SendDataForCVFullDto.DirectPdfLink,ContentType:n.SendDataForCVFullDto.ContentType},"api/files/download").then(function(t){var p=t.status,s=t.headers,h=t.data,y="application/octet-stream",r=!1,f,c,l,e,u,v,i,o;s=s();f=n.SendDataForCVFullDto.FileName||"download.pdf";c=s["content-type"]||y;try{if(console.log("Trying saveBlob method ..."),i=new Blob([h],{type:c}),navigator.msSaveBlob)navigator.msSaveBlob(i,f);else{if(l=navigator.webkitSaveBlob||navigator.mozSaveBlob||navigator.saveBlob,l===undefined)throw"Not supported";l(i,f)}console.log("saveBlob succeeded");r=!0}catch(a){console.log("saveBlob method failed with the following exception:");console.log(a)}if(!r&&(e=window.URL||window.webkitURL||window.mozURL||window.msURL,e)){if(u=document.createElement("a"),"download"in u)try{console.log("Trying download link method with simulated click ...");i=new Blob([h],{type:c});o=e.createObjectURL(i);u.setAttribute("href",o);u.setAttribute("download",f);v=document.createEvent("MouseEvents");v.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null);u.dispatchEvent(v);console.log("Download link method with simulated click succeeded");r=!0}catch(a){console.log("Download link method with simulated click failed with the following exception:");console.log(a)}if(!r)try{console.log("Trying download link method with window.location ...");i=new Blob([h],{type:y});o=e.createObjectURL(i);window.location=o;console.log("Download link method with window.location succeeded");r=!0}catch(a){console.log("Download link method with window.location failed with the following exception:");console.log(a)}}r||(console.log("No methods worked for saving the arraybuffer, using last resort window.open"),window.open(httpPath,"_blank",""))},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση του αρχείου")})}};SecondmentPyspdeChurchController.$inject=["$scope","$uibModal","$filter","$log","$window","$q","PassParameters","$state","toaster","PersonFactory","SecondmentPyspdeChurchFactory","ApplicationTypeRegionAndUnitFactory","ApplicationTypeFekFactory","GeneralFactory","$upload"];SecondmentPyspdeSmeaController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y){function k(){c.getMaritalStatusTypes().then(function(t){n.consts.maritalStatusType=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των επιλογών οικογενειακής κατάταστασης","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function d(){c.getMateProfessionTypes().then(function(t){n.consts.mateProfessionType=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των επιλογών επαγγέλματος συζύγου","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function g(){c.getHealthProblemsTypes().then(function(t){n.consts.healthProblemsType=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των στοιχείων υγείας","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function nt(){c.getParentsHealthProblemsTypes().then(function(t){n.consts.parentsHealthProblemsType=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των στοιχείων υγείας γονέων","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function tt(){c.getBrothersHealthProblemsTypes().then(function(t){n.consts.brothersHealthProblemsType=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των στοιχείων υγείας γονέων","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function it(){c.getMainSpecialPhysicalEduQualifications().then(function(t){n.consts.mainSpecialPhysicalEduQualifications=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των στοιχείων κύριας ειδικότητας ΤΕΦΑΑ","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function rt(){c.getDiseases().then(function(t){n.consts.diseases=v.isValueInArray(n.pageRules.secSmea.CanAccess,"a, m1, m2")?t:e("filter")(t,{IsActive:!0},!0)},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των πιθανών ασθενειών","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function w(){l.getPyspdeWithoutJointExaminationByLevel(n.applicationType,n.IsPE7071WithLevel2?1:n.secondmentSmea.LevelId).then(function(t){n.consts.pyspde=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των πιθανών ασθενειών","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}function b(){v.getByParams({level:n.IsPE7071WithLevel2?1:n.secondmentSmea.LevelId},"/api/RegionAndUnit/getPyspdeByLevel").then(function(t){n.consts.pyspdeRegionJoin=t;n.consts.pyspdeRegionAndUnit=e("filter")(t,function(n){return n.Description!="Υπό Μετακίνηση"})},function(){},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})}if(n.pageRules=[],n.secondmentSmea={IsTemporaryStored:!0},n.secondmentDocument={},n.consts={},n.levels={},n.applicationType=9,n.pyspe="ΠΥΣΠΕ",n.pysde="ΠΥΣΔΕ",n.PlacementTypeList=[{Description:"ΣΜΕΑΕ",Id:1},{Description:"ΣΜΕΑ Braille",Id:2},{Description:"ΣΜΕΑ Νοηματικής Γλώσσας",Id:3},{Description:"ΕΕΕΕΚ",Id:4},{Description:"ΚΕΔΑΣΥ",Id:5},{Description:"Μουσικό Σχολείο",Id:6},{Description:"Καλλιτεχνικό Σχολείο",Id:7},{Description:"Διαπολιτισμικό Σχολείο",Id:8}],n.dateForProposal="",n.alerts=[{type:"danger",msg:"Δεν μπορείτε να υποβάλετε αίτηση. Για ήδη υποβληθείσα αίτηση μεταβείτε στο Ιστορικό Αιτήσεων."}],n.showAlertRegions=!1,n.alertRegions=[{type:"danger",msg:"Πρέπει να δηλώσετε τουλάχιστον μία επιλογή προτίμησης."}],n.showAlertKeddys=!1,n.alertKeddys=[{type:"danger",msg:"Πρέπει να δηλώσετε τουλάχιστον ένα Κ.Ε.Σ.Υ. προτίμησης."}],n.showAlertDisease=!1,n.alertDisease=[{type:"danger",msg:"Επιλέξτε ασθένεια."}],n.showParentsPyspdeId=!1,n.showBrothersPyspdeId=!1,n.showDiseaseId=!1,n.showAddEditForm=0,n.personalStep=!0,n.maritalAndPointsCriteriaStep=!1,n.regionStep=!1,n.showLevel=!1,n.noUpdAccess=!1,n.upload=[],n.messages={completed:"",percentage:"0",error:""},n.uploadedFileDetails="",n.showAlertForUploadCV=!1,n.SendDataForCVDto={Id:"",SecondmentApplicationId:"",PersonId:""},n.SendDataForCVFullDto={Id:"",SecondmentApplicationId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""},n.DoctoralSpecialEducation=!1,n.PostgraduateSpecialEducation=!1,n.PostgraduateStudiesSpecialEducation=!1,n.SeminarSpecialEducation=!1,n.MainSpecialPhysicalEducation=!1,n.showMateHealthProblems=!1,n.ShowAlertMessageForMate=!1,n.disabled={MilitaryMate:!1,JudicialMate:!1,DEPMate:!1,DoctorMate:!1},n.alertsMessageForMate=[{type:"danger",msg:"Συμπληρώστε Οικογενειακή Κατάσταση ΕΓΓΑΜΟΣ ή ΣΥΜΦΩΝΟ ΣΥΜΒΙΩΣΗΣ - Επάγγελμα Συζύγου Αλλο - Περιοχή Συνυπηρέτησης, εφόσον είναι σύζυγος στρατιωτικού ή δικαστικού ή μέλους ΔΕΠ."}],n.secondmentSmea.UnderAgedOrStudingChildren=0,n.secondmentSmea.StudingChildren=0,n.protocol="",n.showProtocol=!1,n.showEAEAlert=!1,n.AvailableDiseaseListItems=[],n.SelectedAvailDiseaseItems=[],n.AvailablePyspdeListItems=[],n.AvailableEEEEKListItems=[],n.AvailableSchoolBlindDeafListItems=[],n.SelectedAvailKeddyItems=[],n.SelectedSelectedKeddyListItems=[],n.SelectedKeddyListItems=[],n.fek={},n.showMusic=!1,n.cannotUpdate=!1,n.notActive=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.PyspdeFormOfficial=0,n.showAlertPyspdeFormOfficial=!1,n.concatPyspde="",n.messagePyspde="",n.IsPE7071WithLevel2=!1,n.pageRules={},n.IsDisabled=!1,n.authentication.isAuth){var p="secSmea";v.getByParams({role:n.authentication.role,codes:p},"/api/Subsystem/NewCheckPermission").then(function(t){var i=p.split(","),r,o;for(r in i)n.pageRules[i[r]]=e("filter")(t,{Code:i[r]},!0)[0].Rules;n.secondmentSmea.Id=f.getApplicationId();f.resetApplication();n.secondmentSmea.PersonId=f.getPersonId();v.isValueInArray(n.pageRules.secSmea.CanAccess,"u1, u2")&&(n.secondmentSmea.PersonId=n.authentication.personId);n.SendDataForCVDto.SecondmentApplicationId=n.secondmentSmea.Id;n.SendDataForCVDto.PersonId=n.secondmentSmea.PersonId;v.getByParams({personId:n.secondmentSmea.PersonId},"/api/SecondmentPyspdeSmeaController/GetDetailsForFile").then(function(t){t!=null&&(n.SendDataForCVFullDto=t,n.SendDataForCVDto.Id=t.Id,n.uploadedFileDetails="<h4>Έχετε μεταφορτώσει:<\/h4><ul><li>Αρχείο: "+n.SendDataForCVFullDto.FileName+" <\/li><li>Μέγεθος: "+n.SendDataForCVFullDto.FileSize+" <\/li><li>Ημερομηνία: "+e("date")(n.SendDataForCVFullDto.UploadDateTime,"dd/MM/yyyy - HH:mm:ss")+" <\/li><\/ul>")},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης επισυναπτόμενου Βιογραφικού")});o=u.all([a.isFekValidForApplicationTypeId(n.applicationType),c.canInsertApplication(n.secondmentSmea.PersonId)]);o.then(function(t){n.hasValidFek=t[0];n.fek=t[1];n.fek.Id>0?(n.canInsertAppl=!0,n.secondmentSmea.FekId=n.fek.Id):n.canInsertAppl=!1;n.secondmentSmea.Id!=null&&n.secondmentSmea.Id!=""&&n.secondmentSmea.Id!="undefined"?(n.canUpdateAppl=!0,n.showAddEditForm=1):n.canInsertAppl&&n.hasValidFek?(n.canInsertAppl=!0,n.showAddEditForm=1):n.showAddEditForm=2;n.fek.DisplayModal&&v.isEmptyValue(n.secondmentSmea.Id)?$("#alertModal").modal("show"):n.doAll();v.isEmptyValue(n.secondmentSmea.Id)&&(n.IsDisabled=!n.pageRules.secSmea.CanInsert)})},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else o.go("/");n.showAlertBlock=function(){return n.showMusic?n.secondmentSmea.NoRemoteUnit&&n.secondmentSmea.NoEducationalExecutive&&n.secondmentSmea.NoTenure&&n.secondmentSmea.NoTenureModelExpSchool&&n.secondmentSmea.NoMusic?!1:!0:n.secondmentSmea.NoRemoteUnit&&n.secondmentSmea.NoEducationalExecutive&&n.secondmentSmea.NoTenure&&n.secondmentSmea.NoTenureModelExpSchool?!1:!0};n.editPerson=function(){f.setPersonId(n.secondmentSmea.PersonId);o.go("stateEditPerson")};n.checkHavingManyChildren=function(){n.secondmentSmea.HavingManyChildren||(n.secondmentSmea.ASPENumber="")};n.checkEAEQualifiactions=function(){if(n.secondmentSmea.SpecialityId==330||n.secondmentSmea.SpecialityId==329)n.showEAEAlert=!1;else{var t=n.secondmentSmea.DoctoralSpecialEducation||n.secondmentSmea.PostgraduateSpecialEducation||n.secondmentSmea.PostgraduateStudiesSpecialEducation||n.secondmentSmea.MainSpecialPhysicalEducation||n.secondmentSmea.SeminarSpecialEducation||n.secondmentSmea.Infirmity||n.secondmentSmea.DisabledChildren||n.secondmentSmea.BraileKnowledge||n.secondmentSmea.SignKnowledge||n.secondmentSmea.FiveYearExperience;n.showEAEAlert=n.secondmentSmea.DidacticYears<1&&!t?!0:!1}};k();d();g();nt();tt();it();rt();n.getOfficialPlacementUnits=function(){var t,i,r;t=n.secondmentSmea.Id!=null&&n.secondmentSmea.Id!=""&&n.secondmentSmea.Id!="undefined"?n.secondmentSmea.OfficialRegionAndUnitId:n.person.OfficialRegionAndUnit.Id;params={OfficialUnitAndRegionId:t,userLevel:n.authentication.levelId};i=!n.person.OfficialUnitIsSmea;r=u.all([v.getByAll("/api/RegionAndUnit/getRegionAndUnitForPlacement"),v.getByParams({OfficialRegionAndUnitId:t,specialUnit:i,applicationType:n.applicationType},"/api/RegionAndUnit/getPysdpeFromOfficialRegionAndUnitId"),]);r.then(function(t){n.OfficialPlacementUnits=t[0];n.PyspdeFormOfficial=t[1];n.changedRegionAndUnit()})};n.getPostingTranferAreas=function(){v.getByParams({id:n.secondmentSmea.OfficialRegionAndUnitId},"/api/RegionAndUnit/getPostingTransferAreaByRegionAndUnitId").then(function(t){n.PostingTranferAreas=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.changedRegionAndUnit=function(){n.checkForPostingTransferArea();n.getPostingTranferAreas()};n.getDateForProposal=function(){n.dateForProposal="31/8/"+n.applicationDidacticYear.YearFrom};n.checkForShowAlertMessageForMate=function(){n.ShowAlertMessageForMate=n.secondmentSmea.MilitaryMate||n.secondmentSmea.JudicialMate||n.secondmentSmea.DEPMate||n.secondmentSmea.DoctorMate?n.secondmentSmea.MateProfession==2&&(n.secondmentSmea.MaritalStatus==1||n.secondmentSmea.MaritalStatus==6)&&n.secondmentSmea.JointServiceId>0?!1:!0:!1};n.checkSelectedFromOfficial=function(){if(!v.isEmpty(n.SelectedPyspdeListItems)&&n.PyspdeFormOfficial>0){var t=n.myfilter=e("filter")(n.SelectedPyspdeListItems,{RegionAndUnitId:n.PyspdeFormOfficial},!0);t.length>0?(n.showAlertPyspdeFormOfficial=!0,t.length==1&&(n.concatPyspde=t[0].DescriptionConc,n.messagePyspde="Δεν επιτρέπεται η επιλογή "+n.concatPyspde+", καθώς ταυτίζεται με τη Δ/νση Οργανικής σας")):(n.showAlertPyspdeFormOfficial=!1,n.concatPyspde="")}else n.showAlertPyspdeFormOfficial=!1,n.concatPyspde=""};n.DisableOtherChks=function(t){n.ShowAlertMessageForMate=!1;switch(t){case"MilitaryMate":n.secondmentSmea.MilitaryMate?(n.disabled={MilitaryMate:!1,JudicialMate:!0,DEPMate:!0,DoctorMate:!0},n.JudicialMate=!1,n.DEPMate=!1,n.checkForShowAlertMessageForMate()):n.disabled={MilitaryMate:!1,JudicialMate:!1,DEPMate:!1,DoctorMate:!1};break;case"JudicialMate":n.secondmentSmea.JudicialMate?(n.disabled={MilitaryMate:!0,JudicialMate:!1,DEPMate:!0,DoctorMate:!0},n.checkForShowAlertMessageForMate()):n.disabled={MilitaryMate:!1,JudicialMate:!1,DEPMate:!1,DoctorMate:!1};break;case"DEPMate":n.secondmentSmea.DEPMate?(n.disabled={MilitaryMate:!0,JudicialMate:!0,DEPMate:!1,DoctorMate:!0},n.checkForShowAlertMessageForMate()):n.disabled={MilitaryMate:!1,JudicialMate:!1,DEPMate:!1,DoctorMate:!1};break;case"DoctorMate":n.secondmentSmea.DoctorMate?(n.disabled={MilitaryMate:!0,JudicialMate:!0,DEPMate:!0,DoctorMate:!1},n.checkForShowAlertMessageForMate()):n.disabled={MilitaryMate:!1,JudicialMate:!1,DEPMate:!1,DoctorMate:!1}}};n.checkForPostingTransferArea=function(){n.myfilter=e("filter")(n.OfficialPlacementUnits,{Id:n.secondmentSmea.OfficialRegionAndUnitId},!0)[0];n.myfilter.RegionAndUnitTypeId==8?(n.showPostingTransferArea=!0,n.showLevel=!1,n.secondmentSmea.LevelId=n.myfilter.LevelId,b(),w()):n.myfilter.RegionAndUnitTypeId==7?(n.showPostingTransferArea=!0,v.getByAll("/api/Dbo/getLevelsAsync").then(function(t){n.levels=t;n.showLevel=!0;n.changeLevel()},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία φόρτωσης βαθμίδων επιλογής")})):(v.getByAll("/api/Dbo/getLevelsAsync").then(function(t){n.levels=t;n.showLevel=!0;n.changeLevel()},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία φόρτωσης βαθμίδων επιλογής")}),n.showPostingTransferArea=!1,n.secondmentSmea.PostingTransferAreaId=null)};n.changeLevel=function(){b();w()};n.changeMaritalStatus=function(){n.secondmentSmea.MaritalStatus==1||n.secondmentSmea.MaritalStatus==6?(n.secondmentSmea.MateProfession=0,n.secondmentSmea.JointServiceId=null,n.secondmentSmea.OtherMateProfession=null,n.secondmentSmea.ChildCustody=!1,n.showMateHealthProblems=!0):n.secondmentSmea.MaritalStatus==3||n.secondmentSmea.MaritalStatus==4?(n.secondmentSmea.MateProfession=0,n.secondmentSmea.JointServiceId=null,n.secondmentSmea.OtherMateProfession=null,n.secondmentSmea.ChildCustody=!1,n.showMateHealthProblems=!1,n.secondmentSmea.MateHealthProblems=null,n.secondmentSmea.MateDiseaseDetails=null,n.secondmentSmea.MateHealthProblemsKEPA=!1):n.secondmentSmea.MaritalStatus==2||n.secondmentSmea.MaritalStatus==5?(n.secondmentSmea.MateProfession=0,n.secondmentSmea.JointServiceId=null,n.secondmentSmea.OtherMateProfession=null,n.secondmentSmea.ChildCustody=!1,n.showMateHealthProblems=!1,n.secondmentSmea.MateHealthProblems=null,n.secondmentSmea.MateDiseaseDetails=null,n.secondmentSmea.MateHealthProblemsKEPA=!1):(n.secondmentSmea.MateProfession=0,n.secondmentSmea.JointServiceId=null,n.secondmentSmea.OtherMateProfession=null,n.secondmentSmea.ChildCustody=!1,n.showMateHealthProblems=!1,n.secondmentSmea.MateHealthProblems=null,n.secondmentSmea.MateDiseaseDetails=null,n.secondmentSmea.MateHealthProblemsKEPA=!1);n.checkForShowAlertMessageForMate()};n.changeJointServiceId=function(){n.checkForShowAlertMessageForMate()};n.changeUnderAgedOrStudingChildren=function(){n.secondmentSmea.UnderAgedOrStudingChildren==0&&n.secondmentSmea.StudingChildren==0&&(n.secondmentSmea.ChildCustody=!1);n.showChildCustody()};n.showMateProfession=function(){return n.secondmentSmea.MaritalStatus==1||n.secondmentSmea.MaritalStatus==6?!0:!1};n.showJointServiceId=function(){return n.secondmentSmea.MateProfession>0&&(n.secondmentSmea.MaritalStatus==1||n.secondmentSmea.MaritalStatus==6)?!0:!1};n.showChildCustody=function(){return(n.secondmentSmea.MaritalStatus==3||n.secondmentSmea.MaritalStatus==4)&&(n.secondmentSmea.UnderAgedOrStudingChildren>0||n.secondmentSmea.StudingChildren)?!0:!1};n.showUnderAgedOrStudingChildren=function(){return n.secondmentSmea.MaritalStatus==2||n.secondmentSmea.MaritalStatus==5?!0:!1};n.showOtherMateProfession=function(){return n.secondmentSmea.MateProfession==2&&(n.secondmentSmea.MaritalStatus==1||n.secondmentSmea.MaritalStatus==6)?!0:!1};n.showParentsPyspde=function(){return n.secondmentSmea.ParentsHealthProblems>0?!0:!1};n.showBrothersPyspde=function(){return n.secondmentSmea.BrothersHealthProblems>0?!0:!1};n.showDisease=function(){return n.secondmentSmea.SpecialCategoryId==2?!0:!1};n.changeMateProfession=function(){n.secondmentSmea.MateProfession==2||(n.secondmentSmea.MateProfession==1?n.secondmentSmea.OtherMateProfession=null:(n.secondmentSmea.OtherMateProfession=null,n.secondmentSmea.JointServiceId=null));n.checkForShowAlertMessageForMate()};n.changeSpecialCategoryId=function(){n.secondmentSmea.SpecialCategoryId!=4&&(n.secondmentSmea.DiseaseDetails=null,n.secondmentSmea.DiseaseId=null)};n.changeDiseaseId=function(){n.secondmentSmea.DiseaseId!=18&&(n.secondmentSmea.DiseaseDetails=null)};n.goToMaritalAndPointsCriteria=function(){n.checkEAEQualifiactions();$("#SecondmentPyspdeSmeaStep1").valid()&&!n.showEAEAlert&&(n.personalStep=!1,n.maritalAndPointsCriteriaStep=!0,n.regionStep=!1,r.scrollTo(0,0),v.isEmpty(n.secondmentSmea.Id)||n.clickHasDisease())};n.clickLocality=function(){n.secondmentSmea.Locality==!1&&(n.secondmentSmea.LocalityPyspdeId=null);n.secondmentSmea.LocalityMunicipalityId=null};n.clickPostGraduateStudies=function(){n.secondmentSmea.PostGraduateStudies==!1&&(n.secondmentSmea.StudiesPyspdeId=null)};n.changeParentsHealthProblems=function(){n.secondmentSmea.ParentsHealthProblems==null&&(n.secondmentSmea.ParentsPyspdeId=null)};n.changeBrothersHealthProblems=function(){n.secondmentSmea.BrothersHealthProblems==null&&(n.secondmentSmea.BrothersPyspdeId=null)};n.changeBrothersHealthProblems=function(){n.secondmentSmea.BrothersHealthProblems==null&&(n.secondmentSmea.BrothersPyspdeId=null)};n.checkForMusic=function(t){t.lastIndexOf("ΠΕ79",0)===0||t.lastIndexOf("ΤΕ16",0)===0?n.showMusic=!0:(n.showMusic=!1,n.secondmentSmea.NoMusic=!1)};n.clickHasDisease=function(){if(n.secondmentSmea.HasDisease){if(v.isEmpty(n.secondmentSmea.Id))v.isEmpty(n.SelectedDiseaseListItems)&&v.getByAll("/api/SecondmentPyspdeChurchController/getDiseases").then(function(t){n.AvailableDiseaseListItems=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία φόρτωσης ασθενειών")});else if(n.secondmentSmea.HasDisease&&v.isEmpty(n.SelectedDiseaseListItems)){var t=u.all([v.getByAll("/api/SecondmentPyspdeChurchController/getDiseases"),v.getByParams({applicationId:n.secondmentSmea.Id},"/api/SecondmentPyspdeSmeaController/getSecondmentDiseaseById"),]);t.then(function(t){angular.copy(t[0],n.AvailableDiseaseListItems);n.SelectedDiseaseListItems=t[1];n.SelectedAvailDiseaseItems=t[1];n.removeDuplicatesDiseaseForDualList()})}}else n.SelectedAvailDiseaseItems=[],n.SelectedSelectedDiseaseListItems=[],n.SelectedDiseaseListItems=[]};n.goToRegions=function(){var t,i,f;n.showAlertDisease=n.secondmentSmea.HasDisease&&v.isEmpty(n.SelectedDiseaseListItems)?!0:!1;!$("#SecondmentPyspdeSmeaStep2").valid()||n.ShowAlertMessageForMate||n.showAlertDisease||(n.personalStep=!1,n.maritalAndPointsCriteriaStep=!1,n.regionStep=!0,r.scrollTo(0,0),n.secondmentSmea.Id!=null&&n.secondmentSmea.Id!=""&&n.secondmentSmea.Id!="undefined"?((n.secondmentDocument.Id==null||n.secondmentDocument.Id==""||n.secondmentDocument.Id=="undefined")&&v.getByParams({id:n.secondmentSmea.Id},"/api/SecondmentPyspdeSmeaController/getApplDocumentsById").then(function(t){n.secondmentDocument=t},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),n.secondmentSmea.IsPyspde?v.isEmpty(n.SelectedPyspdeListItems)&&c.getApplPyspdeById(n.secondmentSmea.Id,n.IsPE7071WithLevel2?1:n.secondmentSmea.LevelId).then(function(t){n.SelectedAvailPyspdeItems=t;n.SelectedPyspdeListItems=t;angular.copy(n.consts.pyspde,n.AvailablePyspdeListItems);n.removeDuplicatesPyspdeForDualList()},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των πιθανών ασθενειών","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.SelectedAvailPyspdeItems=[],n.SelectedSelectedPyspdeListItems=[],n.SelectedPyspdeListItems=[]),n.secondmentSmea.IsKeddy?v.isEmpty(n.SelectedKeddyListItems)&&(t=u.all([v.getByParams({applicationType:n.applicationType},"/api/ApplicationTypeRegionAndUnit/getKesyForSecondment"),v.getByParams({applicationId:n.secondmentSmea.Id},"/api/SecondmentPyspdeSmeaController/getApplKesyById")]),t.then(function(t){n.SelectedKeddyListItems=t[1];n.SelectedAvailKeddyItems=t[1];angular.copy(t[0],n.AvailableKeddyListItems);n.removeDuplicatesKeddyForDualList()},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})):(n.SelectedAvailKeddyItems=[],n.SelectedSelectedKeddyListItems=[],n.SelectedKeddyListItems=[]),n.secondmentSmea.IsEEEEK?v.isEmpty(n.SelectedEEEEKListItems)&&(i=u.all([v.getByParams({applicationType:n.applicationType},"/api/ApplicationTypeRegionAndUnit/getEEEEKForSecondment"),v.getByParams({applicationId:n.secondmentSmea.Id},"/api/SecondmentPyspdeSmeaController/getApplEEEEKById")]),i.then(function(t){n.SelectedEEEEKListItems=t[1];n.SelectedAvailEEEEKItems=t[1];angular.copy(t[0],n.AvailableEEEEKListItems);n.removeDuplicatesEEEEKForDualList()},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})):(n.SelectedAvailSchoolBlindDeafItems=[],n.SelectedSelectedSchoolBlindDeafListItems=[],n.SelectedSchoolBlindDeafListItems=[]),n.secondmentSmea.BraileKnowledge||n.secondmentSmea.SignKnowledge?v.isEmpty(n.SelectedSchoolBlindDeafListItems)&&(f=u.all([v.getByParams({applicationType:n.applicationType},"/api/ApplicationTypeRegionAndUnit/getSchoolBlindDeafForSecondment"),v.getByParams({applicationId:n.secondmentSmea.Id},"/api/SecondmentPyspdeSmeaController/getApplSchoolBlindDeafById")]),f.then(function(t){n.SelectedSchoolBlindDeafListItems=t[1];n.SelectedAvailSchoolBlindDeafItems=t[1];angular.copy(t[0],n.AvailableSchoolBlindDeafListItems);n.removeDuplicatesSchoolBlindDeafForDualList()},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})):(n.SelectedAvailSchoolBlindDeafItems=[],n.SelectedSelectedSchoolBlindDeafListItems=[],n.SelectedSchoolBlindDeafListItems=[])):(n.secondmentSmea.IsPyspde&&angular.copy(n.consts.pyspde,n.AvailablePyspdeListItems),n.secondmentSmea.IsKeddy&&v.getByParams({applicationType:n.applicationType},"/api/ApplicationTypeRegionAndUnit/getKesyForSecondment").then(function(t){n.AvailableKeddyListItems=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")}),n.secondmentSmea.IsEEEEK&&v.getByParams({applicationType:n.applicationType},"/api/ApplicationTypeRegionAndUnit/getEEEEKForSecondment").then(function(t){n.AvailableEEEEKListItems=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΕΕΕΕΚ")}),(n.secondmentSmea.SignKnowledge||n.secondmentSmea.BraileKnowledge)&&v.getByParams({applicationType:n.applicationType},"/api/ApplicationTypeRegionAndUnit/getSchoolBlindDeafForSecondment").then(function(t){n.AvailableSchoolBlindDeafListItems=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των Σχολείων κωφλων - Τυφλών")})))};n.removeDuplicatesPyspdeForDualList=function(){n.checkSelectedFromOfficial();angular.forEach(n.SelectedAvailPyspdeItems,function(t){for(var i=n.AvailablePyspdeListItems.length-1;i>=0;i--)n.AvailablePyspdeListItems[i].Id==t.Id&&n.AvailablePyspdeListItems.splice(i,1)});n.SelectedAvailPyspdeItems=[];n.SelectedSelectedPyspdeListItems=[]};n.removeDuplicatesDiseaseForDualList=function(){angular.forEach(n.SelectedAvailDiseaseItems,function(t){for(var i=n.AvailableDiseaseListItems.length-1;i>=0;i--)n.AvailableDiseaseListItems[i].Id==t.Id&&n.AvailableDiseaseListItems.splice(i,1)});n.SelectedAvailDiseaseItems=[];n.SelectedSelectedDiseaseListItems=[]};n.goToPersonal=function(){n.personalStep=!0;n.maritalAndPointsCriteriaStep=!1;n.regionStep=!1;r.scrollTo(0,0)};n.InsOrUpd=function(t){n.secondmentSmea.IsPyspde||(n.SelectedPyspdeListItems=[]);n.secondmentSmea.IsKeddy||(n.SelectedKeddyListItems=[]);n.secondmentSmea.IsEEEEK||(n.SelectedEEEEKListItems=[]);n.secondmentSmea.BraileKnowledge||n.secondmentSmea.SignKnowledge||(n.SelectedSchoolBlindDeafListItems=[]);var r={Pyspde:n.SelectedPyspdeListItems,Keddy:n.SelectedKeddyListItems,EEEEK:n.SelectedEEEEKListItems,SchoolBlindDeaf:n.SelectedSchoolBlindDeafListItems,SecondmentPyspdeSmea:n.secondmentSmea,Status:t,SecondmentDocument:n.secondmentDocument,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Disease:n.SelectedDiseaseListItems},i=r;n.secondmentSmea.Id!=null&&n.secondmentSmea.Id!=""&&n.secondmentSmea.Id!="undefined"?c.updateSecondmentPyspdeSmea(i).then(function(){f.setPersonId(n.secondmentSmea.PersonId);v.isValueInArray(n.pageRules.secSmea.CanAccess,"u1, u2")?o.go("history"):o.go("history")}).catch(function(n){s.pop("error","Παρουσιάστηκε σφάλμα",n.data)}):c.insertSecondmentPyspdeSmea(i).then(function(){f.setPersonId(n.secondmentSmea.PersonId);v.isValueInArray(n.pageRules.secSmea.CanAccess,"u1, u2")?o.go("history"):o.go("history")}).catch(function(n){s.pop("error","Παρουσιάστηκε σφάλμα",n.data)})};n.saveAction=function(r){if(n.showAlertRegions=n.secondmentSmea.IsPyspde&&v.isEmpty(n.SelectedPyspdeListItems)?!0:!1,n.showAlertForUploadCV=!1,n.showAlertKeddys=n.secondmentSmea.IsKeddy&&v.isEmpty(n.SelectedKeddyListItems)?!0:!1,$("#SecondmentPyspdeSmeaStep3").valid()&&!n.showAlertRegions&&!n.showAlertKeddys&&!n.showAlertPyspdeFormOfficial)if(r=="final"){var u=t.open({templateUrl:"ModalContent.html",controller:OpenModalController});u.result.then(function(t){t&&n.InsOrUpd(r)},function(){i.info("Modal dismissed at: "+new Date)})}else n.InsOrUpd(r)};n.getMunicipalityByPyspde=function(){v.getByParams({pyspdeId:n.secondmentSmea.LocalityPyspdeId},"/api/RegionAndUnit/getMunicipalityByPyspde").then(function(t){n.consts.pyspdeMunicipality=t},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΠΥΣΠΔΕ")})};n.placemenTypeMapping=function(t,i,r,u){n.secondmentSmea.PlacementType=r?2:u?3:t?5:i?1:6};n.doAll=function(){if(n.secondmentSmea.Id!=null&&n.secondmentSmea.Id!=""&&n.secondmentSmea.Id!="undefined"){if(n.canUpdateAppl){n.AvailablePyspdeListItems=[];n.AvailableKeddyListItems=[];var t=u.all([v.getByParams({id:n.secondmentSmea.PersonId},"/api/Person/GetSecondmentPersonDto"),c.getSecondmentPyspdeSmeaById(n.secondmentSmea.Id)]);t.then(function(t){n.person=t[0];n.secondmentSmea=t[1];n.getDateForProposal();n.checkForMusic(t[0].Speciality.Code);n.secondmentSmea.SpecialityId=t[0].Speciality.Id;n.IsPE7071WithLevel2=(n.secondmentSmea.SpecialityId==164||n.secondmentSmea.SpecialityId==330)&&n.secondmentSmea.LevelId==2?!0:!1;n.person.CanHaveKeddy||(n.secondmentSmea.IsPyspde=!0);n.getMunicipalityByPyspde();v.isEmpty(n.secondmentSmea.SecondmentPyspdeSMEAProtocols)||(n.protocol=n.secondmentSmea.SecondmentPyspdeSMEAProtocols[0].ProtocolString,n.showProtocol=!0);n.paramsForCheckUpd.personId=n.secondmentSmea.PersonId;n.paramsForCheckUpd.levelUser=n.authentication.levelId;n.paramsForCheckUpd.regionAndUnitId=n.authentication.regionAndUnitId;n.paramsForCheckUpd.userRole=n.authentication.role;n.paramsForCheckUpd.specialityId=n.secondmentSmea.SpecialityId;n.paramsForCheckUpd.applicationLevelId=n.secondmentSmea.LevelId;n.paramsForCheckUpd.applicationTypeId=n.applicationType;n.paramsForCheckUpd.IsActive=n.secondmentSmea.IsActive;n.paramsForCheckUpd.FekId=n.secondmentSmea.FekId;v.postByParams(n.paramsForCheckUpd,"/api/General/checkUpdateSecFromFEKAndUser").then(function(i){n.IsDisabled=!i;n.IsDisabled&&(n.noUpdAccess=!0);v.isValueInArray(n.pageRules.secSmea.CanAccess,"u1, u2")&&n.secondmentSmea.IsActive&&!n.secondmentSmea.IsTemporaryStored&&(n.IsDisabled=!0,n.cannotUpdate=!0);n.secondmentSmea.IsActive||(n.IsDisabled=!0,n.notActive=!0);v.isValueInArray(n.pageRules.secSmea.CanAccess,"d1, d2, p")&&n.secondmentSmea.OfficialRegionAndUnitId!=n.authentication.regionAndUnitId&&(n.IsDisabled=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.secSmea.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0);n.secondmentSmea.MaritalStatus==1||n.secondmentSmea.MaritalStatus==6?n.showMateHealthProblems=!0:(n.showMateHealthProblems=!1,n.secondmentSmea.MateHealthProblems=null,n.secondmentSmea.MateDiseaseDetails=null,n.secondmentSmea.MateHealthProblemsKEPA=!1);n.secondmentSmea.MilitaryMate?n.DisableOtherChks("MilitaryMate"):n.secondmentSmea.JudicialMate?n.DisableOtherChks("JudicialMate"):n.secondmentSmea.DEPMate?n.DisableOtherChks("DEPMate"):n.secondmentSmea.DoctorMate&&n.DisableOtherChks("DoctorMate");t[1].ApplicationTypeFek.DisplayModal&&(n.disabled.MilitaryMate=!0);n.getOfficialPlacementUnits()})})}}else n.canInsertAppl&&n.secondmentSmea.PersonId!=null&&n.secondmentSmea.PersonId!=""&&n.secondmentSmea.PersonId!="undefined"&&(n.AvailablePyspdeListItems=[],n.AvailableKeddyListItems=[],v.getByParams({id:n.secondmentSmea.PersonId},"/api/Person/GetSecondmentPersonDto").then(function(t){n.person=t;n.getDateForProposal();n.checkForMusic(t.Speciality.Code);n.person.CanHaveKeddy||(n.secondmentSmea.IsPyspde=!0);n.secondmentSmea.DidacticYears=0;n.secondmentSmea.DidacticMonths=0;n.secondmentSmea.DidacticDays=0;n.secondmentSmea.SpecialityId=t.Speciality.Id;n.secondmentSmea.OfficialRegionAndUnitId=t.OfficialRegionAndUnit.Id;n.secondmentSmea.OfficialPlacementUnitDescription=t.OfficialPlacementUnitDescription;n.secondmentSmea.PostingTransferAreaId=t.PostingTransferArea===null?null:t.PostingTransferArea.Id;n.secondmentSmea.ExperienceYears=t.ExperienceYears;n.secondmentSmea.ExperienceDays=t.ExperienceDays;n.secondmentSmea.ExperienceMonths=t.ExperienceMonths;n.secondmentSmea.NominationYear=t.NominationYear;n.secondmentSmea.LevelId=t.OfficialRegionAndUnit.LevelId;n.secondmentSmea.MaritalStatus=t.MaritalStatus;n.changeMaritalStatus();n.secondmentSmea.UnderAgedOrStudingChildren=t.UnderAgedOrStudingChildren;n.secondmentSmea.StudingChildren=t.StudingChildren;n.secondmentSmea.LocalityPyspdeId=t.LocalityPyspdeId;n.secondmentSmea.LocalityMunicipalityId=t.LocalityMunicipalityId;n.secondmentSmea.JointServiceId=t.JointServiceId;n.placemenTypeMapping(t.OfficialUnitIsKedasy,t.OfficialUnitIsSmea,t.OfficialUnitIsSmeaBraille,t.OfficialUnitIsSmeaSignKnowledge);n.secondmentSmea.LocalityPyspdeId!=null&&(n.secondmentSmea.Locality=!0,n.getMunicipalityByPyspde());n.secondmentSmea.JointServiceId!=null&&(n.secondmentSmea.MateProfession=t.MateRegistryNo!=null?1:2,n.changeMateProfession());n.IsPE7071WithLevel2=(n.secondmentSmea.SpecialityId==164||n.secondmentSmea.SpecialityId==330)&&n.secondmentSmea.LevelId==2?!0:!1;n.secondmentSmea.MateRegistryNo=t.MateRegistryNo;n.secondmentSmea.MateRegistryNo!=null&&(n.secondmentSmea.JointExamination=!0);n.secondmentSmea.ChildCustody=n.secondmentSmea.MaritalStatus==3||n.secondmentSmea.MaritalStatus==4?t.Custody:!1;n.showMateProfession();n.getOfficialPlacementUnits()},function(n){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}))};n.cancelNewApplication=function(){$("#alertModal").modal("hide");o.go("/")};n.acceptNewApplication=function(){n.secondmentSmea.MilitaryMate=!0;n.DisableOtherChks("MilitaryMate");n.disabled.MilitaryMate=!0;$("#alertModal").modal("hide");n.doAll()};n.SelectedAvailPyspdeItems=[];n.SelectedSelectedPyspdeListItems=[];n.SelectedPyspdeListItems=[];n.btnPyspdeUp=function(){for(var t,r,u,f=n.SelectedSelectedPyspdeListItems,i=0;i<n.SelectedSelectedPyspdeListItems.length;i++){if(t=n.SelectedPyspdeListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedPyspdeListItems[i].Id),t<=0||t>=n.SelectedPyspdeListItems.length)return;r=n.SelectedPyspdeListItems[t];u=n.SelectedPyspdeListItems[t-1];n.SelectedPyspdeListItems[t-1]=r;n.SelectedPyspdeListItems[t]=u}};n.btnPyspdeDown=function(){for(var t,r,u,i=n.SelectedSelectedPyspdeListItems.length-1;i>=0;i--){if(t=n.SelectedPyspdeListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedPyspdeListItems[i].Id),t<0||t>=n.SelectedPyspdeListItems.length-1)return;r=n.SelectedPyspdeListItems[t];u=n.SelectedPyspdeListItems[t+1];n.SelectedPyspdeListItems[t+1]=r;n.SelectedPyspdeListItems[t]=u}};n.btnPyspdeRight=function(){n.checkRegions();n.canInsertRegions&&(angular.forEach(n.SelectedAvailPyspdeItems,function(n){this.push(n)},n.SelectedPyspdeListItems),angular.forEach(n.SelectedAvailPyspdeItems,function(t){for(var i=n.AvailablePyspdeListItems.length-1;i>=0;i--)n.AvailablePyspdeListItems[i].Id==t.Id&&n.AvailablePyspdeListItems.splice(i,1)}),n.SelectedAvailPyspdeItems=[],n.SelectedSelectedPyspdeListItems=[]);n.checkSelectedFromOfficial()};n.checkRegions=function(){var t=5;n.canInsertRegions=!0;n.SelectedPyspdeListItems.length+n.SelectedAvailPyspdeItems.length>t&&(s.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών","Δεν μπορείτε να επιλέξετε περισσότερες από "+t+" περιοχές"),n.canInsertRegions=!1)};n.btnPyspdeLeft=function(){angular.forEach(n.SelectedSelectedPyspdeListItems,function(n){this.push(n)},n.AvailablePyspdeListItems);angular.forEach(n.SelectedSelectedPyspdeListItems,function(t){for(var i=n.SelectedPyspdeListItems.length-1;i>=0;i--)n.SelectedPyspdeListItems[i].Id==t.Id&&n.SelectedPyspdeListItems.splice(i,1)});n.SelectedSelectedPyspdeListItems=[];n.SelectedAvailPyspdeItems=[];n.checkSelectedFromOfficial()};n.removeDuplicatesKeddyForDualList=function(){angular.forEach(n.SelectedAvailKeddyItems,function(t){for(var i=n.AvailableKeddyListItems.length-1;i>=0;i--)n.AvailableKeddyListItems[i].Id==t.Id&&n.AvailableKeddyListItems.splice(i,1)});n.SelectedAvailKeddyItems=[];n.SelectedSelectedKeddyListItems=[]};n.SelectedAvailKeddyItems=[];n.SelectedSelectedKeddyListItems=[];n.SelectedKeddyListItems=[];n.btnKeddyUp=function(){for(var t,r,u,f=n.SelectedSelectedKeddyListItems,i=0;i<n.SelectedSelectedKeddyListItems.length;i++){if(t=n.SelectedKeddyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedKeddyListItems[i].Id),t<=0||t>=n.SelectedKeddyListItems.length)return;r=n.SelectedKeddyListItems[t];u=n.SelectedKeddyListItems[t-1];n.SelectedKeddyListItems[t-1]=r;n.SelectedKeddyListItems[t]=u}};n.btnKeddyDown=function(){for(var t,r,u,i=n.SelectedSelectedKeddyListItems.length-1;i>=0;i--){if(t=n.SelectedKeddyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedKeddyListItems[i].Id),t<0||t>=n.SelectedKeddyListItems.length-1)return;r=n.SelectedKeddyListItems[t];u=n.SelectedKeddyListItems[t+1];n.SelectedKeddyListItems[t+1]=r;n.SelectedKeddyListItems[t]=u}};n.btnKeddyRight=function(){n.checkKeddy();n.canInsertKeddy&&(angular.forEach(n.SelectedAvailKeddyItems,function(n){this.push(n)},n.SelectedKeddyListItems),angular.forEach(n.SelectedAvailKeddyItems,function(t){for(var i=n.AvailableKeddyListItems.length-1;i>=0;i--)n.AvailableKeddyListItems[i].Id==t.Id&&n.AvailableKeddyListItems.splice(i,1)}),n.SelectedAvailKeddyItems=[],n.SelectedSelectedKeddyListItems=[])};n.btnKeddyLeft=function(){angular.forEach(n.SelectedSelectedKeddyListItems,function(n){this.push(n)},n.AvailableKeddyListItems);angular.forEach(n.SelectedSelectedKeddyListItems,function(t){for(var i=n.SelectedKeddyListItems.length-1;i>=0;i--)n.SelectedKeddyListItems[i].Id==t.Id&&n.SelectedKeddyListItems.splice(i,1)});n.SelectedSelectedKeddyListItems=[];n.SelectedAvailKeddyItems=[]};n.checkKeddy=function(){var t=5;n.canInsertKeddy=!0;n.SelectedKeddyListItems.length+n.SelectedAvailKeddyItems.length>t&&(s.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος Κ.Ε.Σ.Υ.","Δεν μπορείτε να επιλέξετε περισσότερες από "+t+" Κ.Ε.Σ.Υ."),n.canInsertKeddy=!1)};n.removeDuplicatesEEEEKForDualList=function(){angular.forEach(n.SelectedAvailEEEEKItems,function(t){for(var i=n.AvailableEEEEKListItems.length-1;i>=0;i--)n.AvailableEEEEKListItems[i].Id==t.Id&&n.AvailableEEEEKListItems.splice(i,1)});n.SelectedAvailEEEEKItems=[];n.SelectedSelectedEEEEKListItems=[]};n.SelectedAvailEEEEKItems=[];n.SelectedSelectedEEEEKListItems=[];n.SelectedEEEEKListItems=[];n.btnEEEEKUp=function(){for(var t,r,u,f=n.SelectedSelectedEEEEKListItems,i=0;i<n.SelectedSelectedEEEEKListItems.length;i++){if(t=n.SelectedEEEEKListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedEEEEKListItems[i].Id),t<=0||t>=n.SelectedEEEEKListItems.length)return;r=n.SelectedEEEEKListItems[t];u=n.SelectedEEEEKListItems[t-1];n.SelectedEEEEKListItems[t-1]=r;n.SelectedEEEEKListItems[t]=u}};n.btnEEEEKDown=function(){for(var t,r,u,i=n.SelectedSelectedEEEEKListItems.length-1;i>=0;i--){if(t=n.SelectedEEEEKListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedEEEEKListItems[i].Id),t<0||t>=n.SelectedEEEEKListItems.length-1)return;r=n.SelectedEEEEKListItems[t];u=n.SelectedEEEEKListItems[t+1];n.SelectedEEEEKListItems[t+1]=r;n.SelectedEEEEKListItems[t]=u}};n.btnEEEEKRight=function(){n.checkEEEEK();n.canInsertEEEEK&&(angular.forEach(n.SelectedAvailEEEEKItems,function(n){this.push(n)},n.SelectedEEEEKListItems),angular.forEach(n.SelectedAvailEEEEKItems,function(t){for(var i=n.AvailableEEEEKListItems.length-1;i>=0;i--)n.AvailableEEEEKListItems[i].Id==t.Id&&n.AvailableEEEEKListItems.splice(i,1)}),n.SelectedAvailEEEEKItems=[],n.SelectedSelectedEEEEKListItems=[])};n.btnEEEEKLeft=function(){angular.forEach(n.SelectedSelectedEEEEKListItems,function(n){this.push(n)},n.AvailableEEEEKListItems);angular.forEach(n.SelectedSelectedEEEEKListItems,function(t){for(var i=n.SelectedEEEEKListItems.length-1;i>=0;i--)n.SelectedEEEEKListItems[i].Id==t.Id&&n.SelectedEEEEKListItems.splice(i,1)});n.SelectedSelectedEEEEKListItems=[];n.SelectedAvailEEEEKItems=[]};n.checkEEEEK=function(){var t=5;n.canInsertEEEEK=!0;n.SelectedEEEEKListItems.length+n.SelectedAvailEEEEKItems.length>t&&(s.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος ΕΕΕΕΚ","Δεν μπορείτε να επιλέξετε περισσότερες από "+t+" ΕΕΕΕΚ"),n.canInsertEEEEK=!1)};n.removeDuplicatesSchoolBlindDeafForDualList=function(){angular.forEach(n.SelectedAvailSchoolBlindDeafItems,function(t){for(var i=n.AvailableSchoolBlindDeafListItems.length-1;i>=0;i--)n.AvailableSchoolBlindDeafListItems[i].Id==t.Id&&n.AvailableSchoolBlindDeafListItems.splice(i,1)});n.SelectedAvailSchoolBlindDeafItems=[];n.SelectedSelectedSchoolBlindDeafListItems=[]};n.SelectedAvailSchoolBlindDeafItems=[];n.SelectedSelectedSchoolBlindDeafListItems=[];n.SelectedSchoolBlindDeafListItems=[];n.btnSchoolBlindDeafKUp=function(){for(var t,r,u,f=n.SelectedSelectedSchoolBlindDeafListItems,i=0;i<n.SelectedSelectedSchoolBlindDeafListItems.length;i++){if(t=n.SelectedSchoolBlindDeafListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedSchoolBlindDeafListItems[i].Id),t<=0||t>=n.SelectedSchoolBlindDeafListItems.length)return;r=n.SelectedSchoolBlindDeafListItems[t];u=n.SelectedSchoolBlindDeafListItems[t-1];n.SelectedSchoolBlindDeafListItems[t-1]=r;n.SelectedSchoolBlindDeafListItems[t]=u}};n.btnSchoolBlindDeafDown=function(){for(var t,r,u,i=n.SelectedSelectedSchoolBlindDeafListItems.length-1;i>=0;i--){if(t=n.SelectedSchoolBlindDeafListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedSchoolBlindDeafListItems[i].Id),t<0||t>=n.SelectedSchoolBlindDeafListItems.length-1)return;r=n.SelectedSchoolBlindDeafListItems[t];u=n.SelectedSchoolBlindDeafListItems[t+1];n.SelectedSchoolBlindDeafListItems[t+1]=r;n.SelectedSchoolBlindDeafListItems[t]=u}};n.btnSchoolBlindDeafRight=function(){n.checkSchoolBlindDeaf();n.canInsertSchoolBlindDeaf&&(angular.forEach(n.SelectedAvailSchoolBlindDeafItems,function(n){this.push(n)},n.SelectedSchoolBlindDeafListItems),angular.forEach(n.SelectedAvailSchoolBlindDeafItems,function(t){for(var i=n.AvailableSchoolBlindDeafListItems.length-1;i>=0;i--)n.AvailableSchoolBlindDeafListItems[i].Id==t.Id&&n.AvailableSchoolBlindDeafListItems.splice(i,1)}),n.SelectedAvailSchoolBlindDeafItems=[],n.SelectedSelectedSchoolBlindDeafListItems=[])};n.btnSchoolBlindDeafLeft=function(){angular.forEach(n.SelectedSelectedSchoolBlindDeafListItems,function(n){this.push(n)},n.AvailableSchoolBlindDeafListItems);angular.forEach(n.SelectedSelectedSchoolBlindDeafListItems,function(t){for(var i=n.SelectedSchoolBlindDeafListItems.length-1;i>=0;i--)n.SelectedSchoolBlindDeafListItems[i].Id==t.Id&&n.SelectedSchoolBlindDeafListItems.splice(i,1)});n.SelectedSelectedSchoolBlindDeafListItems=[];n.SelectedAvailSchoolBlindDeafItems=[]};n.checkSchoolBlindDeaf=function(){var t=5;n.canInsertSchoolBlindDeaf=!0;n.SelectedSchoolBlindDeafListItems.length+n.SelectedAvailSchoolBlindDeafItems.length>t&&(s.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος Σχολείων Κωφών - Τυφλών","Δεν μπορείτε να επιλέξετε περισσότερες από "+t+" Σχολεία Κωφών - Τυφλών"),n.canInsertSchoolBlindDeaf=!1)};n.SelectedAvailDiseaseItems=[];n.SelectedSelectedDiseaseListItems=[];n.SelectedDiseaseListItems=[];n.btnDiseaseUp=function(){for(var t,r,u,f=n.SelectedSelectedDiseaseListItems,i=0;i<n.SelectedSelectedDiseaseListItems.length;i++){if(t=n.SelectedDiseaseListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedDiseaseListItems[i].Id),t<=0||t>=n.SelectedDiseaseListItems.length)return;r=n.SelectedDiseaseListItems[t];u=n.SelectedDiseaseListItems[t-1];n.SelectedDiseaseListItems[t-1]=r;n.SelectedDiseaseListItems[t]=u}};n.btnDiseaseDown=function(){for(var t,r,u,i=n.SelectedSelectedDiseaseListItems.length-1;i>=0;i--){if(t=n.SelectedDiseaseListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedDiseaseListItems[i].Id),t<0||t>=n.SelectedDiseaseListItems.length-1)return;r=n.SelectedDiseaseListItems[t];u=n.SelectedDiseaseListItems[t+1];n.SelectedDiseaseListItems[t+1]=r;n.SelectedDiseaseListItems[t]=u}};n.btnDiseaseRight=function(){angular.forEach(n.SelectedAvailDiseaseItems,function(n){this.push(n)},n.SelectedDiseaseListItems);angular.forEach(n.SelectedAvailDiseaseItems,function(t){for(var i=n.AvailableDiseaseListItems.length-1;i>=0;i--)n.AvailableDiseaseListItems[i].Id==t.Id&&n.AvailableDiseaseListItems.splice(i,1)});n.SelectedAvailDiseaseItems=[];n.SelectedSelectedDiseaseListItems=[]};n.btnDiseaseLeft=function(){angular.forEach(n.SelectedSelectedDiseaseListItems,function(n){this.push(n)},n.AvailableDiseaseListItems);angular.forEach(n.SelectedSelectedDiseaseListItems,function(t){for(var i=n.SelectedDiseaseListItems.length-1;i>=0;i--)n.SelectedDiseaseListItems[i].Id==t.Id&&n.SelectedDiseaseListItems.splice(i,1)});n.SelectedSelectedDiseaseListItems=[];n.SelectedAvailDiseaseItems=[]};n.onFileSelect=function(t){var r,i;for(n.messages={completed:"",percentage:"0",error:""},n.showAlertForUploadCV=!1,r=0;r<t.length;r++){if(i=t[r],i.type!="application/x-zip-compressed"&&i.type!="application/x-compressed"&&i.type!="application/zip"&&i.type!="multipart/x-zip"&&i.type!="application/pdf"){n.messages.error='Μη έγκυρη επέκταση αρχείου "'+i.name+'". Οι επεκτάσεις που υποστηρίζονται είναι: "<b>zip και pdf<\/b>" .';return}if(i.size>=10485760){n.messages.error='Το αρχείο "'+i.name+'" (<b>'+Math.round(i.size/1024)+" KB<\/b>) υπερβαίνει το μέγιστο επιτρεπόμενο μέγεθος μεταφόρτωσης <b>10000 KB<\/b>.";return}(function(t){n.upload[t]=y.upload({url:"/api/files/uploadPyspdeSMEA",method:"POST",data:{SendDataForCVDto:n.SendDataForCVDto},file:i}).progress(function(t){n.messages.percentage=parseInt(100*t.loaded/t.total)}).then(function(t){n.messages.completed="Το αρχείο <b>"+i.name+"<\/b> μεταφορτώθηκε με επιτυχία.";n.SendDataForCVDto.Id=t.data.secPyspdeSMEAFile.Id;n.SendDataForCVFullDto=t.data.secPyspdeSMEAFile;n.uploadedFileDetails=t.data.Message}).catch(function(t){n.messages.error=t.data.Message})})(r)}};n.abortUpload=function(t){n.upload[t].abort()};n.downloadFile=function(){v.getByParamsDownload({PersonId:n.secondmentSmea.PersonId,Path:n.SendDataForCVFullDto.DirectPdfLink,ContentType:n.SendDataForCVFullDto.ContentType},"api/files/download").then(function(t){var p=t.status,s=t.headers,h=t.data,y="application/octet-stream",r=!1,f,c,l,e,u,v,i,o;s=s();f=n.SendDataForCVFullDto.FileName||"download.pdf";c=s["content-type"]||y;try{if(console.log("Trying saveBlob method ..."),i=new Blob([h],{type:c}),navigator.msSaveBlob)navigator.msSaveBlob(i,f);else{if(l=navigator.webkitSaveBlob||navigator.mozSaveBlob||navigator.saveBlob,l===undefined)throw"Not supported";l(i,f)}console.log("saveBlob succeeded");r=!0}catch(a){console.log("saveBlob method failed with the following exception:");console.log(a)}if(!r&&(e=window.URL||window.webkitURL||window.mozURL||window.msURL,e)){if(u=document.createElement("a"),"download"in u)try{console.log("Trying download link method with simulated click ...");i=new Blob([h],{type:c});o=e.createObjectURL(i);u.setAttribute("href",o);u.setAttribute("download",f);v=document.createEvent("MouseEvents");v.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null);u.dispatchEvent(v);console.log("Download link method with simulated click succeeded");r=!0}catch(a){console.log("Download link method with simulated click failed with the following exception:");console.log(a)}if(!r)try{console.log("Trying download link method with window.location ...");i=new Blob([h],{type:y});o=e.createObjectURL(i);window.location=o;console.log("Download link method with window.location succeeded");r=!0}catch(a){console.log("Download link method with window.location failed with the following exception:");console.log(a)}}r||(console.log("No methods worked for saving the arraybuffer, using last resort window.open"),window.open(httpPath,"_blank",""))},function(){s.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση του αρχείου")})}};SecondmentPyspdeSmeaController.$inject=["$scope","$uibModal","$log","$window","$q","PassParameters","$filter","$state","toaster","PersonFactory","SecondmentPyspdeSmeaFactory","ApplicationTypeRegionAndUnitFactory","ApplicationTypeFekFactory","GeneralFactory","$upload"];SecondmentResults=function(n,t,i,r,u,f){n.authentication.isAuth?t.isValueInArray(t.getRoleCode(n.authentication.role),"u1, u2 ,d1, d2, p")&&$state.go("forbidden"):$state.go("/");n.InitialDefaultOptions=function(){n.searchVars=[];n.searchVars.AMsList="";n.amList=[];n.formats=["dd/MM/yyyy"];n.format=n.formats[0];n.DateValidTo=new Date;n.currentPage=1;n.viewby=20;n.itemsPerPage=n.viewby;n.showPaging=!0};n.InitialDefaultOptions();n.Priorities=[{value:"1",Desc:"Ναι"},{value:"0",Desc:"Όχι"}];n.searchVars.Priority="1";n.Phases=[{value:"0",Desc:"Χωρίς Φάση"},{value:"1",Desc:"1"},{value:"2",Desc:"2"},{value:"3",Desc:"3"}];n.searchVars.Phase="0";n.changeAMList=function(){n.amList=r("filter")(n.searchVars.AMsList.split(/\r?\n/),function(n){return n.trim()!=""});n.amList=n.amList};n.openCalendarItems={};n.setOpenCalendarItem=function(t,i){t.preventDefault();t.stopPropagation();n.openCalendarItems={};n.openCalendarItems["idx"+i]=!0};t.getByAll("/api/SecondmentGeneralController/getDidacticYearsForSecondmentGeneral").then(function(t){n.YearsSelect=t;n.searchVars.Year=""+n.YearsSelect[0].Id},function(){f.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία φόρτωσης διδακτικών έτων")});t.getByAll("/api/ApplicationType/getAllApplicationType").then(function(t){n.AllApplicationTypes=t;n.SecondmentApplicationTypes=n.AllApplicationTypes.filter(n=>n.DescriptionType==="secondment"&&n.Id!=43);n.searchVars.ApplicationTypeId=""+n.SecondmentApplicationTypes[0].Id},function(n){f.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});t.getByAll("/api/Management/getAllRegionAndUnitTypes").then(function(t){n.RegionAndUnits=t;n.searchVars.RegionUnit=""+n.RegionAndUnits[0].Id},function(n){f.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});n.searchSecondmentResults=function(){var i={},r;i.Year=n.searchVars.Year;i.Phase=n.searchVars.Phase;i.ApplicationTypeId=n.searchVars.ApplicationTypeId;i.Priority=n.searchVars.Priority;i.RegionUnitType=n.searchVars.RegionUnitType;i.AMs=n.amList;r=n.searchVars.Description;n.currentPage=1;t.postByParams(i,"/api/SecondmentManagment/getSecondmentResultsList").then(function(t){n.SecondmentResult=angular.copy(t);n.SearchResults=[];n.totalItemsRegionAndUnitLevel=0;angular.forEach(n.SecondmentResult,function(t,u){switch(t.Mode){case"personsecondment":t.Phase==null?t.Phase="":t.Phase+="";t.PostingTransferAreaId=""+t.PostingTransferAreaId;t.Priority=t.Priority=="1"?!0:!1;n.totalItemsRegionAndUnitLevel+=1;break;case"application":t.Phase=""+i.Phase;t.Process=!0;t.OpenGap=!0;t.CloseGap=!0;t.Priority=i.Priority=="1"?!0:!1;t.Description=r;t.PostingTransferAreaId=""+t.PostingTransferAreaList[0].RegionAndUnitId;t.ProtocolDate=n.DateValidTo;n.totalItemsRegionAndUnitLevel+=1}t.Process==null&&(t.Process=!1);t.DecisionDate==null&&(t.DecisionDate="");t.ProtocolNumber==null&&(t.ProtocolNumber="");t.IsCalendarOpen=!1;t.Selected=!0;t.ArrayKey=u;this.push(t)},n.SearchResults);n.SelectAllSelected=!0},function(){f.pop("error","Προσοχή","Παρουσιάστηκε σφάλμα. Δεν επέστρεψαν εγγραφές.")})};n.colorFlag=function(n){switch(n){case"personsecondment":return"#DBFCFF";case"application":return"#DECCCC"}return"initial"};n.preCheckUpdateSecondmentsResults=function(){$("#SaveSecondmentResults").modal("show")};n.handleSearchResultsFullscreen=function(t){var i=!t.currentTarget.closest(".portlet").classList.contains("portlet-fullscreen");n.isFullscreen=i};n.changeSelectAll=function(){angular.forEach(n.SecondmentResult,function(t){t.Selected=n.SelectAllSelected})};n.updateSecondmentsResults=function(){n.submitSearchResults=n.SearchResults.filter(n=>(n.Mode=="personsecondment"||n.Mode=="application")&&n.Selected==!0);n.submitSearchResults=n.submitSearchResults;let i={};i.ApplicationTypeId=n.searchVars.ApplicationTypeId;i.DidacticYear=n.searchVars.Year;i.SecondmentResultsPersons=n.submitSearchResults;t.postByParams(i,"/api/SecondmentManagment/updateSecondmentsResults").then(function(){n.searchSecondmentResults()},function(){f.pop("error","Προσοχή","Παρουσιάστηκε σφάλμα. Δεν επέστρεψαν εγγραφές.")})}};SecondmentResults.$inject=["$scope","GeneralFactory","$q","$filter","$uibModal","toaster"];SecondmentUpdateTransfer=function(n,t,i,r,u,f,e,o,s,h,c,l){if(n.searchParams={ApplicationTypeId:0,ApplicationId:0,PersonId:"0"},n.person={},n.AvailableArtisticListItems=[],n.AvailableMusicListItems=[],n.AvailablePyspdeSmeaListItems=[],n.AvailableKeddyListItems=[],n.AvailablePyspdeListItems=[],n.AvailableChurchListItems=[],n.AvailableMusicListItems=[],n.PyspdeListItems=[],n.ChurchListItems=[],n.ChurchListItemsWithoutJoint=[],n.AvailablePyspdeListItems=[],n.AvailableChurchListItems=[],n.SelectedAvailPyspdeItems=[],n.SelectedSelectedPyspdeListItems=[],n.SelectedPyspdeListItems=[],n.showAlert=!1,n.showAlertArtisticRegions=!1,n.showAlertMusicRegions=!1,n.showAlertPyspdeSmeaRegions=!1,n.showAlertKeddyRegions=!1,n.pageRules={},n.secondmentSmea={},n.secondment={},n.IsFirstTimePyspde=!0,n.IsFirstTimeChurch=!0,n.secondmentEEPEBP={},n.SelectedAvailablePyspePysdeListItems=[],n.SelectedAvailableKedasyItems=[],n.SelectedAvailableSdeyItems=[],n.authentication.isAuth){var a="secArtistic,secPyspde,secSmea,secMusic,secEEPEBP";u.getByParams({role:n.authentication.role,codes:a},"/api/Subsystem/NewCheckPermission").then(function(t){var f=a.split(",");for(var s in f)n.pageRules[f[s]]=e("filter")(t,{Code:f[s]},!0)[0].Rules;n.searchParams.PersonId=i.getPersonId();u.getByParams({personId:n.searchParams.PersonId},"/api/Person/getBasicFieldsFromPerson").then(function(t){var f;n.person=t;n.searchParams.ApplicationId=i.getApplicationId();n.searchParams.ApplicationTypeId=i.getApplicationTypeId();switch(n.searchParams.ApplicationTypeId){case 7:u.getByParams({id:n.searchParams.ApplicationId},"/api/SecondmentPyspdeChurchController/getApplRegionsWithProtocolById").then(function(t){var f,e,s,i;n.secondment.IsPyspde=t.IsPyspde;n.secondment.IsChurch=t.IsChurch;n.secondment.LevelId=t.LevelId;n.secondment.OfficialRegionAndUnitId=t.OfficialRegionAndUnitId;n.secondment.JointExamination=t.JointExamination;n.protocol=t.Protocol;f=n.person.OfficialUnitIsSmea||n.person.OfficialUnitIsIntercultural||n.person.OfficialUnitIsArtistic||n.person.OfficialUnitIsMusic;n.secondment.IsPyspde?n.secondment.JointExamination?n.IsFirstTimePyspde?(e=o.all([c.getPyspdeJointExaminationByLevel(n.searchParams.ApplicationTypeId,n.secondment.LevelId),h.getApplPyspdeById(n.searchParams.ApplicationId,n.secondment.LevelId),u.getByParams({OfficialRegionAndUnitId:n.secondment.OfficialRegionAndUnitId,specialUnit:f,applicationType:n.searchParams.ApplicationTypeId},"/api/RegionAndUnit/getPysdpeFromOfficialRegionAndUnitId")]),e.then(function(t){n.SelectedPyspdeListItems=t[1];n.SelectedAvailPyspdeItems=t[1];n.PyspdeListItems=t[0];angular.copy(n.PyspdeListItems,n.AvailablePyspdeListItems);n.PyspdeFormOfficial=t[2];n.removeDuplicatesPyspdeForDualList();n.IsFirstTimePyspde=!1},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})):u.isEmpty(n.PyspdeListItems)?c.getPyspdeJointExaminationByLevel(n.searchParams.ApplicationTypeId,n.secondment.LevelId).then(function(t){n.PyspdeListItems=t;angular.copy(n.PyspdeListItems,n.AvailablePyspdeListItems);angular.copy(n.SelectedPyspdeListItems,n.SelectedAvailPyspdeItems);n.removeDuplicatesPyspdeForDualListForInsert()},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των πιθανών ασθενειών","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(angular.copy(n.PyspdeListItems,n.AvailablePyspdeListItems),angular.copy(n.SelectedPyspdeListItems,n.SelectedAvailPyspdeItems),n.removeDuplicatesPyspdeForDualListForInsert()):n.IsFirstTimePyspde&&(s=o.all([u.getByParams({applicationId:n.searchParams.ApplicationId,level:n.secondment.LevelId},"/api/SecondmentPyspdeChurchController/getApplPyspdeById"),u.getByParams({applicationType:n.searchParams.ApplicationTypeId,level:n.secondment.LevelId},"/api/ApplicationTypeRegionAndUnit/getPyspdeWithoutJointExaminationByLevel"),u.getByParams({OfficialRegionAndUnitId:n.secondment.OfficialRegionAndUnitId,specialUnit:f,applicationType:n.searchParams.ApplicationTypeId},"/api/RegionAndUnit/getPysdpeFromOfficialRegionAndUnitId")]),s.then(function(t){n.SelectedAvailPyspdeItems=t[0];n.SelectedPyspdeListItems=t[0];angular.copy(t[1],n.AvailablePyspdeListItems);n.PyspdeFormOfficial=t[2];n.removeDuplicatesPyspdeForDualList();n.IsFirstTimePyspde=!1})):(n.SelectedAvailPyspdeItems=[],n.SelectedSelectedPyspdeListItems=[],n.SelectedPyspdeListItems=[]);n.secondment.IsChurch?n.secondment.JointExamination?n.IsFirstTimeChurch?(i=o.all([c.getChurchJointExaminationBySex(n.searchParams.ApplicationTypeId,n.person.Sex),h.getApplChurchById(n.searchParams.ApplicationId)]),i.then(function(t){n.SelectedChurchListItems=t[1];n.SelectedAvailChurchItems=t[1];n.ChurchListItems=t[0];angular.copy(n.ChurchListItems,n.AvailableChurchListItems);n.removeDuplicatesChurchForDualList();n.IsFirstTimeChurch=!1},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})):u.isEmpty(n.ChurchListItems)?c.getChurchJointExaminationBySex(n.searchParams.ApplicationTypeId,n.person.Sex).then(function(t){n.ChurchListItems=t;angular.copy(n.ChurchListItems,n.AvailableChurchListItems);angular.copy(n.SelectedChurchListItems,n.SelectedAvailChurchItems);n.removeDuplicatesChurchForDualListForInsert()},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των πιθανών ασθενειών","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.SelectedAvailChurchItems=[],angular.copy(n.ChurchListItems,n.AvailableChurchListItems),angular.copy(n.SelectedChurchListItems,n.SelectedAvailChurchItems),n.removeDuplicatesChurchForDualListForInsert()):n.IsFirstTimeChurch?(i=o.all([c.getChurchWithoutJointExaminationBySex(n.searchParams.ApplicationTypeId,n.person.Sex),h.getApplChurchById(n.searchParams.ApplicationId)]),i.then(function(t){n.SelectedChurchListItems=t[1];n.SelectedAvailChurchItems=t[1];n.ChurchListItemsWithoutJoint=t[0];angular.copy(n.ChurchListItemsWithoutJoint,n.AvailableChurchListItems);n.removeDuplicatesChurchForDualList();n.IsFirstTimeChurch=!1},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})):u.isEmpty(n.ChurchListItemsWithoutJoint)?c.getChurchWithoutJointExaminationBySex(n.searchParams.ApplicationTypeId,n.person.Sex).then(function(t){n.ChurchListItemsWithoutJoint=t;angular.copy(n.ChurchListItemsWithoutJoint,n.AvailableChurchListItems);angular.copy(n.SelectedChurchListItems,n.SelectedAvailChurchItems);n.removeDuplicatesChurchForDualListForInsert()},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των πιθανών ασθενειών","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.SelectedAvailChurchItems=[],angular.copy(n.SelectedChurchListItems,n.SelectedAvailChurchItems),angular.copy(n.ChurchListItemsWithoutJoint,n.AvailableChurchListItems),n.removeDuplicatesChurchForDualListForInsert()):(n.SelectedAvailChurchItems=[],n.SelectedSelectedChurchListItems=[],n.SelectedChurchListItems=[])},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 9:u.getByParams({id:n.searchParams.ApplicationId},"/api/SecondmentPyspdeSmeaController/getApplRegionsWithProtocolById").then(function(t){var i,f,e;n.secondmentSmea.IsPyspde=t.IsPyspde;n.secondmentSmea.IsKeddy=t.IsKeddy;n.secondmentSmea.LevelId=t.LevelId;n.secondmentSmea.OfficialRegionAndUnitId=t.OfficialRegionAndUnitId;n.protocol=t.Protocol;n.secondmentSmea.IsPyspde?(i=n.person.OfficialUnitIsIntercultural||n.person.OfficialUnitIsArtistic||n.person.OfficialUnitIsMusic,u.isEmpty(n.SelectedPyspdeSmeaListItems)&&(f=o.all([u.getByParams({applicationId:n.searchParams.ApplicationId,level:n.secondmentSmea.LevelId},"/api/SecondmentPyspdeSmeaController/getApplPyspdeById"),u.getByParams({applicationType:n.searchParams.ApplicationTypeId,level:n.secondmentSmea.LevelId},"/api/ApplicationTypeRegionAndUnit/getPyspdeWithoutJointExaminationByLevel"),u.getByParams({OfficialRegionAndUnitId:n.secondmentSmea.OfficialRegionAndUnitId,specialUnit:i,applicationType:n.searchParams.ApplicationTypeId},"/api/RegionAndUnit/getPysdpeFromOfficialRegionAndUnitId")]),f.then(function(t){n.SelectedAvailPyspdeSmeaItems=t[0];n.SelectedPyspdeSmeaListItems=t[0];angular.copy(t[1],n.AvailablePyspdeSmeaListItems);n.PyspdeFormOfficial=t[2];n.removeDuplicatesPyspdeSmeaForDualList()}))):(n.SelectedAvailPyspdeSmeaItems=[],n.SelectedSelectedPyspdeSmeaListItems=[],n.SelectedPyspdeSmeaListItems=[]);n.secondmentSmea.IsKeddy?u.isEmpty(n.SelectedKeddyListItems)&&(e=o.all([u.getByParams({applicationType:n.searchParams.ApplicationTypeId},"/api/ApplicationTypeRegionAndUnit/getKesyForSecondment"),u.getByParams({applicationId:n.searchParams.ApplicationId},"/api/SecondmentPyspdeSmeaController/getApplKesyById")]),e.then(function(t){n.SelectedKeddyListItems=t[1];n.SelectedAvailKeddyItems=t[1];angular.copy(t[0],n.AvailableKeddyListItems);n.removeDuplicatesKeddyForDualList()},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})):(n.SelectedAvailKeddyItems=[],n.SelectedSelectedKeddyListItems=[],n.SelectedKeddyListItems=[])},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});break;case 10:f=o.all([u.getByAll("/api/ApplicationTypeRegionAndUnit/getArtisticSchools"),u.getByParams({id:n.searchParams.ApplicationId},"/api/SecondmentArtistic/getApplRegionsWithProtocolById"),]);f.then(function(t){n.SelectedArtisticListItems=t[1].regions;n.SelectedAvailArtisticItems=t[1].regions;angular.copy(t[0],n.AvailableArtisticListItems);n.removeDuplicatesArtisticForDualList();n.protocol=t[1].Protocol});break;case 11:f=o.all([u.getByAll("/api/ApplicationTypeRegionAndUnit/getMusicSchools"),u.getByParams({id:n.searchParams.ApplicationId},"/api/SecondmentMusic/getApplRegionsWithProtocolById"),]);f.then(function(t){n.SelectedMusicListItems=t[1].regions;n.SelectedAvailMusicItems=t[1].regions;angular.copy(t[0],n.AvailableMusicListItems);n.removeDuplicatesMusicForDualList();n.protocol=t[1].Protocol});break;case 42:u.getByParams({id:n.searchParams.ApplicationId},"/api/SecondmentPyspdeEEPEBPController/getApplRegionsWithProtocolById").then(function(t){n.secondmentEEPEBP.BraileKnowledge=t.BraileKnowledge;n.secondmentEEPEBP.SignKnowledge=t.SignKnowledge;n.secondmentEEPEBP.LevelId=t.LevelId;n.secondmentEEPEBP.OfficialRegionAndUnitId=t.OfficialRegionAndUnitId;n.protocol=t.Protocol;u.getByParams({applicationId:n.searchParams.ApplicationId},"/api/SecondmentPyspdeEEPEBPController/getApplEEPEBPAllById").then(function(t){n.ResponseSelectedPyspePysdeKedasySdeySignKnowledgeListItems=t;n.SelectedBrailleSignKnowledgeListItems=e("filter")(n.ResponseSelectedPyspePysdeKedasySdeySignKnowledgeListItems,function(n){return n.IsBraille||n.IsSignKnowledge});n.SelectedPyspePysdeKedasySdeyListItems=e("filter")(n.ResponseSelectedPyspePysdeKedasySdeySignKnowledgeListItems,function(n){return!n.IsBraille&&!n.IsSignKnowledge})},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των ΚΕΔΑΣΥ")});u.getByParams({applicationType:n.searchParams.ApplicationTypeId,CanHaveKedasy:n.person.CanHaveKedasy,CanHaveSdeyKedasy:n.person.CanHaveSdeyKedasy},"/api/ApplicationTypeRegionAndUnit/GetPyspePysdeKedasySdeyBrailleIsSignKnowledgeForEEPEEBP").then(function(t){n.AvailableMainQueryPyspePysdeKedasySdeySignKnowledgeList=t;n.AvailableBrailleSignKnowledgeListItems=e("filter")(n.AvailableMainQueryPyspePysdeKedasySdeySignKnowledgeList,function(n){return n.IsBraille||n.IsSignKnowledge});n.removeDuplicatesBrailleSignKnowledgeForDualList();n.AvailablePyspePysdeListItems=[];n.AvailableKedasyListItems=[];n.AvailableSdeyListItems=[];n.AvailablePyspePysdeListItems=e("filter")(n.AvailableMainQueryPyspePysdeKedasySdeySignKnowledgeList,function(n){return(n.RegionAndUnitTypeId==1||n.RegionAndUnitTypeId==1)&&!n.IsBraille&&!n.IsSignKnowledge});n.AvailableKedasyListItems=e("filter")(n.AvailableMainQueryPyspePysdeKedasySdeySignKnowledgeList,{RegionAndUnitTypeId:34,IsBraille:!1,IsSignKnowledge:!1},!0);n.AvailableSdeyListItems=e("filter")(n.AvailableMainQueryPyspePysdeKedasySdeySignKnowledgeList,{RegionAndUnitTypeId:35,IsBraille:!1,IsSignKnowledge:!1},!0);n.removeDuplicatesBrailleSignKnowledgeForDualList();n.removeDuplicatesPyspePysdeKedasySdeyListForDualList()},function(){n.AvailablePyspePysdeListItems=[];n.AvailableKedasySignKnowledgeListItems=[];n.AvailableSdeySignKnowledgeListItems=[];n.AvailableBrailleSignKnowledgeListItems=[];r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση των Σχολείων κωφλων - Τυφλών")});n.dynamic_height=164;n.person.CanHaveKedasy&&(n.dynamic_height=n.dynamic_height+202.56);n.person.CanHaveSdeyKedasy&&(n.dynamic_height=n.dynamic_height+202.56);n.dynamic_height=n.dynamic_height+"px"},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωμάτων",3e3,"trustedHtml")})}else t.go("/");n.changeChurch=function(){var t;n.secondment.IsChurch?n.secondment.JointExamination?n.IsFirstTimeChurch?(t=o.all([c.getChurchJointExaminationBySex(n.searchParams.ApplicationTypeId,n.person.Sex),h.getApplChurchById(n.searchParams.ApplicationId)]),t.then(function(t){n.SelectedChurchListItems=t[1];n.SelectedAvailChurchItems=t[1];n.ChurchListItems=t[0];angular.copy(n.ChurchListItems,n.AvailableChurchListItems);n.removeDuplicatesChurchForDualList();n.IsFirstTimeChurch=!1},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})):u.isEmpty(n.ChurchListItems)?c.getChurchJointExaminationBySex(n.searchParams.ApplicationTypeId,n.person.Sex).then(function(t){n.ChurchListItems=t;angular.copy(n.ChurchListItems,n.AvailableChurchListItems);angular.copy(n.SelectedChurchListItems,n.SelectedAvailChurchItems);n.removeDuplicatesChurchForDualListForInsert()},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των πιθανών ασθενειών","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.SelectedAvailChurchItems=[],angular.copy(n.ChurchListItems,n.AvailableChurchListItems),angular.copy(n.SelectedChurchListItems,n.SelectedAvailChurchItems),n.removeDuplicatesChurchForDualListForInsert()):n.IsFirstTimeChurch?(t=o.all([c.getChurchWithoutJointExaminationBySex(n.searchParams.ApplicationTypeId,n.person.Sex),h.getApplChurchById(n.searchParams.ApplicationId)]),t.then(function(t){n.SelectedChurchListItems=t[1];n.SelectedAvailChurchItems=t[1];n.ChurchListItemsWithoutJoint=t[0];angular.copy(n.ChurchListItemsWithoutJoint,n.AvailableChurchListItems);n.removeDuplicatesChurchForDualList();n.IsFirstTimeChurch=!1},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})):u.isEmpty(n.ChurchListItemsWithoutJoint)?c.getChurchWithoutJointExaminationBySex(n.searchParams.ApplicationTypeId,n.person.Sex).then(function(t){n.ChurchListItemsWithoutJoint=t;angular.copy(n.ChurchListItemsWithoutJoint,n.AvailableChurchListItems);angular.copy(n.SelectedChurchListItems,n.SelectedAvailChurchItems);n.removeDuplicatesChurchForDualListForInsert()},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των πιθανών ασθενειών","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.SelectedAvailChurchItems=[],angular.copy(n.SelectedChurchListItems,n.SelectedAvailChurchItems),angular.copy(n.ChurchListItemsWithoutJoint,n.AvailableChurchListItems),n.removeDuplicatesChurchForDualListForInsert()):(n.SelectedAvailChurchItems=[],n.SelectedSelectedChurchListItems=[],n.SelectedChurchListItems=[])};n.changePyspde=function(){var t=n.person.OfficialUnitIsSmea||n.person.OfficialUnitIsIntercultural||n.person.OfficialUnitIsArtistic||n.person.OfficialUnitIsMusic,i,f;n.secondment.IsPyspde?n.secondment.JointExamination?n.IsFirstTimePyspde?(i=o.all([c.getPyspdeJointExaminationByLevel(n.searchParams.ApplicationTypeId,n.secondment.LevelId),h.getApplPyspdeById(n.searchParams.ApplicationId,n.secondment.LevelId),u.getByParams({OfficialRegionAndUnitId:n.secondment.OfficialRegionAndUnitId,specialUnit:t,applicationType:n.searchParams.ApplicationTypeId},"/api/RegionAndUnit/getPysdpeFromOfficialRegionAndUnitId")]),i.then(function(t){n.SelectedPyspdeListItems=t[1];n.SelectedAvailPyspdeItems=t[1];n.PyspdeListItems=t[0];angular.copy(n.PyspdeListItems,n.AvailablePyspdeListItems);n.PyspdeFormOfficial=t[2];n.removeDuplicatesPyspdeForDualList();n.IsFirstTimePyspde=!1},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})):u.isEmpty(n.PyspdeListItems)?c.getPyspdeJointExaminationByLevel(n.searchParams.ApplicationTypeId,n.secondment.LevelId).then(function(t){n.PyspdeListItems=t;angular.copy(n.PyspdeListItems,n.AvailablePyspdeListItems);angular.copy(n.SelectedPyspdeListItems,n.SelectedAvailPyspdeItems);n.removeDuplicatesPyspdeForDualListForInsert()},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα κατά φόρτωση των πιθανών ασθενειών","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(angular.copy(n.PyspdeListItems,n.AvailablePyspdeListItems),angular.copy(n.SelectedPyspdeListItems,n.SelectedAvailPyspdeItems),n.removeDuplicatesPyspdeForDualListForInsert()):n.IsFirstTimePyspde&&(f=o.all([u.getByParams({applicationId:n.searchParams.ApplicationId,level:n.secondment.LevelId},"/api/SecondmentPyspdeChurchController/getApplPyspdeById"),u.getByParams({applicationType:n.searchParams.ApplicationTypeId,level:n.secondment.LevelId},"/api/ApplicationTypeRegionAndUnit/getPyspdeWithoutJointExaminationByLevel"),u.getByParams({OfficialRegionAndUnitId:n.secondment.OfficialRegionAndUnitId,specialUnit:t,applicationType:n.searchParams.ApplicationTypeId},"/api/RegionAndUnit/getPysdpeFromOfficialRegionAndUnitId")]),f.then(function(t){n.SelectedAvailPyspdeItems=t[0];n.SelectedPyspdeListItems=t[0];angular.copy(t[1],n.AvailablePyspdeListItems);n.PyspdeFormOfficial=t[2];n.removeDuplicatesPyspdeForDualList();n.IsFirstTimePyspde=!1})):(n.SelectedAvailPyspdeItems=[],n.SelectedSelectedPyspdeListItems=[],n.SelectedPyspdeListItems=[])};n.changeKeddy=function(){if(n.secondmentSmea.IsKeddy){if(u.isEmpty(n.SelectedKeddyListItems)){var t=o.all([u.getByParams({applicationType:n.searchParams.ApplicationTypeId},"/api/ApplicationTypeRegionAndUnit/getKeddyForSecondment"),u.getByParams({applicationId:n.searchParams.ApplicationId},"/api/SecondmentPyspdeSmeaController/getApplKeddyById")]);t.then(function(t){n.SelectedKeddyListItems=t[1];n.SelectedAvailKeddyItems=t[1];angular.copy(t[0],n.AvailableKeddyListItems);n.removeDuplicatesKeddyForDualList()},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})}}else n.SelectedAvailKeddyItems=[],n.SelectedSelectedKeddyListItems=[],n.SelectedKeddyListItems=[]};n.changePyspdeSmea=function(){var t,i;n.secondmentSmea.IsPyspde?(t=n.person.OfficialUnitIsIntercultural||n.person.OfficialUnitIsArtistic||n.person.OfficialUnitIsMusic,u.isEmpty(n.SelectedPyspdeSmeaListItems)&&(i=o.all([u.getByParams({applicationId:n.searchParams.ApplicationId,level:n.secondmentSmea.LevelId},"/api/SecondmentPyspdeSmeaController/getApplPyspdeById"),u.getByParams({applicationType:n.searchParams.ApplicationTypeId,level:n.secondmentSmea.LevelId},"/api/ApplicationTypeRegionAndUnit/getPyspdeWithoutJointExaminationByLevel"),u.getByParams({OfficialRegionAndUnitId:n.secondmentSmea.OfficialRegionAndUnitId,specialUnit:t,applicationType:n.searchParams.ApplicationTypeId},"/api/RegionAndUnit/getPysdpeFromOfficialRegionAndUnitId")]),i.then(function(t){n.SelectedAvailPyspdeSmeaItems=t[0];n.SelectedPyspdeSmeaListItems=t[0];angular.copy(t[1],n.AvailablePyspdeSmeaListItems);n.PyspdeFormOfficial=t[2];n.removeDuplicatesPyspdeSmeaForDualList()}))):(n.SelectedAvailPyspdeSmeaItems=[],n.SelectedSelectedPyspdeSmeaListItems=[],n.SelectedPyspdeSmeaListItems=[])};n.removeDuplicatesPyspdeForDualList=function(){n.checkSelectedFromOfficial();var t=[];angular.forEach(n.SelectedAvailPyspdeItems,function(i){for(var r=n.AvailablePyspdeListItems.length-1;r>=0;r--)n.AvailablePyspdeListItems[r].Id==i.Id&&n.AvailablePyspdeListItems.splice(r,1);n.secondment.JointExamination==!1&&i.JointExamination==!0&&t.push(i.Id)});angular.forEach(t,function(t){for(var i=n.SelectedAvailPyspdeItems.length-1;i>=0;i--)n.SelectedAvailPyspdeItems[i].Id==t&&n.SelectedAvailPyspdeItems.splice(i,1)});n.SelectedAvailPyspdeItems=[];n.SelectedSelectedPyspdeListItems=[]};n.removeDuplicatesPyspdeForDualListForInsert=function(){n.checkSelectedFromOfficial();var t=[];angular.forEach(n.SelectedPyspdeListItems,function(i){n.secondment.JointExamination==!1&&i.JointExamination==!0&&t.push(i.Id)});angular.forEach(t,function(t){for(var i=n.SelectedPyspdeListItems.length-1;i>=0;i--)n.SelectedPyspdeListItems[i].Id==t&&n.SelectedPyspdeListItems.splice(i,1)});angular.copy(n.SelectedPyspdeListItems,n.SelectedAvailPyspdeItems);n.removeDuplicatesPyspdeForDualList()};n.removeDuplicatesChurchForDualList=function(){var t=[];angular.forEach(n.SelectedAvailChurchItems,function(i){for(var r=n.AvailableChurchListItems.length-1;r>=0;r--)n.AvailableChurchListItems[r].Id==i.Id&&n.AvailableChurchListItems.splice(r,1);n.secondment.JointExamination==!1&&i.JointExamination==!0&&t.push(i.Id)});t.length>0&&angular.forEach(t,function(t){for(var i=n.SelectedAvailChurchItems.length-1;i>=0;i--)n.SelectedAvailChurchItems[i].Id==t&&n.SelectedAvailChurchItems.splice(i,1)});n.SelectedAvailChurchItems=[];n.SelectedSelectedChurchListItems=[]};n.removeDuplicatesChurchForDualListForInsert=function(){var t=[];angular.forEach(n.SelectedChurchListItems,function(i){n.secondment.JointExamination==!1&&i.JointExamination==!0&&t.push(i.Id)});angular.forEach(t,function(t){for(var i=n.SelectedChurchListItems.length-1;i>=0;i--)n.SelectedChurchListItems[i].Id==t&&n.SelectedChurchListItems.splice(i,1)});angular.copy(n.SelectedChurchListItems,n.SelectedAvailChurchItems);n.removeDuplicatesChurchForDualList()};n.Upd=function(){var e,f;switch(n.searchParams.ApplicationTypeId){case 7:e={Pyspde:n.SelectedPyspdeListItems,IsPyspde:n.secondment.IsPyspde,Church:n.SelectedChurchListItems,IsChurch:n.secondment.IsChurch,ApplicationId:n.searchParams.ApplicationId,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName};f=e;u.postByParams(f,"/api/SecondmentPyspdeChurchController/updateFromTransfer").then(function(){i.setPersonId(n.searchParams.PersonId);u.isValueInArray(n.pageRules.secPyspde.CanAccess,"u1, u2")?t.go("history"):t.go("showapplicationperintendancy")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα",response)});break;case 9:e={Pyspde:n.SelectedPyspdeSmeaListItems,IsPyspde:n.secondmentSmea.IsPyspde,Keddy:n.SelectedKeddyListItems,IsKeddy:n.secondmentSmea.IsKeddy,ApplicationId:n.searchParams.ApplicationId,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName};f=e;u.postByParams(f,"/api/SecondmentPyspdeSmeaController/updateFromTransfer").then(function(){i.setPersonId(n.searchParams.PersonId);u.isValueInArray(n.pageRules.secSmea.CanAccess,"u1, u2")?t.go("history"):t.go("showapplicationperintendancy")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα",response)});break;case 10:e={SecondmentArtisticRegions:n.SelectedArtisticListItems,ApplicationId:n.searchParams.ApplicationId,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName};f=e;u.postByParams(f,"/api/SecondmentArtistic/updateFromTransfer").then(function(){i.setPersonId(n.searchParams.PersonId);u.isValueInArray(n.pageRules.secArtistic.CanAccess,"u1, u2")?t.go("history"):t.go("showapplicationperintendancy")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα",response)});break;case 11:e={SecondmentMusicRegions:n.SelectedMusicListItems,ApplicationId:n.searchParams.ApplicationId,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName};f=e;u.postByParams(f,"/api/SecondmentMusic/updateFromTransfer").then(function(){i.setPersonId(n.searchParams.PersonId);u.isValueInArray(n.pageRules.secMusic.CanAccess,"u1, u2")?t.go("history"):t.go("showapplicationperintendancy")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα",response)});break;case 42:var e={Pyspde:n.SelectedPyspdeSmeaListItems,IsPyspde:n.secondmentSmea.IsPyspde,Keddy:n.SelectedKeddyListItems,IsKeddy:n.secondmentSmea.IsKeddy,ApplicationId:n.searchParams.ApplicationId,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName},o={PyspePysdeKedasySdey:n.SelectedPyspePysdeKedasySdeyListItems,SignKnowledge:n.SelectedBrailleSignKnowledgeListItems,ApplicationId:n.searchParams.ApplicationId,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName},f=o;u.postByParams(f,"/api/SecondmentPyspdeEEPEBPController/updateFromTransfer").then(function(){i.setPersonId(n.searchParams.PersonId);u.isValueInArray(n.pageRules.secEEPEBP.CanAccess,"u1, u2")?t.go("history"):t.go("showapplicationperintendancy")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα",response)})}};n.saveAction=function(){if(n.showAlertKeddyRegions=u.isEmpty(n.SelectedKeddyListItems)&&n.secondmentSmea.IsKeddy&&n.searchParams.ApplicationTypeId==9?!0:!1,n.showAlertPyspdeSmeaRegions=u.isEmpty(n.SelectedPyspdeSmeaListItems)&&n.secondmentSmea.IsPyspde&&n.searchParams.ApplicationTypeId==9?!0:!1,n.showAlertChurchRegions=u.isEmpty(n.SelectedChurchListItems)&&n.secondment.IsChurch&&n.searchParams.ApplicationTypeId==7?!0:!1,n.showAlertPyspdeRegions=u.isEmpty(n.SelectedPyspdeListItems)&&n.secondment.IsPyspde&&n.searchParams.ApplicationTypeId==7?!0:!1,!n.showAlertPyspdeSmeaRegions&&!n.showAlertKeddyRegions&&!n.showAlertPyspdeRegions&&!n.showAlertChurchRegions){var t=s.open({templateUrl:"ModalContent.html",controller:OpenModalController});t.result.then(function(t){t&&n.Upd()},function(){l.info("Modal dismissed at: "+new Date)})}};n.removeDuplicatesArtisticForDualList=function(){angular.forEach(n.SelectedAvailArtisticItems,function(t){for(var i=n.AvailableArtisticListItems.length-1;i>=0;i--)n.AvailableArtisticListItems[i].Id==t.Id&&n.AvailableArtisticListItems.splice(i,1)});n.SelectedAvailArtisticItems=[];n.SelectedSelectedArtisticListItems=[]};n.SelectedAvailArtisticItems=[];n.SelectedSelectedArtisticListItems=[];n.SelectedArtisticListItems=[];n.btnArtisticUp=function(){for(var t,r,u,f=n.SelectedSelectedArtisticListItems,i=0;i<n.SelectedSelectedArtisticListItems.length;i++){if(t=n.SelectedArtisticListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedArtisticListItems[i].Id),t<=0||t>=n.SelectedArtisticListItems.length)return;r=n.SelectedArtisticListItems[t];u=n.SelectedArtisticListItems[t-1];n.SelectedArtisticListItems[t-1]=r;n.SelectedArtisticListItems[t]=u}};n.btnArtisticDown=function(){for(var t,r,u,i=n.SelectedSelectedArtisticListItems.length-1;i>=0;i--){if(t=n.SelectedArtisticListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedArtisticListItems[i].Id),t<0||t>=n.SelectedArtisticListItems.length-1)return;r=n.SelectedArtisticListItems[t];u=n.SelectedArtisticListItems[t+1];n.SelectedArtisticListItems[t+1]=r;n.SelectedArtisticListItems[t]=u}};n.btnArtisticRight=function(){angular.forEach(n.SelectedAvailArtisticItems,function(n){this.push(n)},n.SelectedArtisticListItems);angular.forEach(n.SelectedAvailArtisticItems,function(t){for(var i=n.AvailableArtisticListItems.length-1;i>=0;i--)n.AvailableArtisticListItems[i].Id==t.Id&&n.AvailableArtisticListItems.splice(i,1)});n.SelectedAvailArtisticItems=[];n.SelectedSelectedArtisticListItems=[]};n.btnArtisticLeft=function(){angular.forEach(n.SelectedSelectedArtisticListItems,function(n){this.push(n)},n.AvailableArtisticListItems);angular.forEach(n.SelectedSelectedArtisticListItems,function(t){for(var i=n.SelectedArtisticListItems.length-1;i>=0;i--)n.SelectedArtisticListItems[i].Id==t.Id&&n.SelectedArtisticListItems.splice(i,1)});n.SelectedSelectedArtisticListItems=[];n.SelectedAvailArtisticItems=[]};n.removeDuplicatesMusicForDualList=function(){angular.forEach(n.SelectedAvailMusicItems,function(t){for(var i=n.AvailableMusicListItems.length-1;i>=0;i--)n.AvailableMusicListItems[i].Id==t.Id&&n.AvailableMusicListItems.splice(i,1)});n.SelectedAvailMusicItems=[];n.SelectedSelectedMusicListItems=[]};n.SelectedAvailMusicItems=[];n.SelectedSelectedMusicListItems=[];n.SelectedMusicListItems=[];n.btnMusicUp=function(){for(var t,r,u,f=n.SelectedSelectedMusicListItems,i=0;i<n.SelectedSelectedMusicListItems.length;i++){if(t=n.SelectedMusicListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedMusicListItems[i].Id),t<=0||t>=n.SelectedMusicListItems.length)return;r=n.SelectedMusicListItems[t];u=n.SelectedMusicListItems[t-1];n.SelectedMusicListItems[t-1]=r;n.SelectedMusicListItems[t]=u}};n.btnMusicDown=function(){for(var t,r,u,i=n.SelectedSelectedMusicListItems.length-1;i>=0;i--){if(t=n.SelectedMusicListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedMusicListItems[i].Id),t<0||t>=n.SelectedMusicListItems.length-1)return;r=n.SelectedMusicListItems[t];u=n.SelectedMusicListItems[t+1];n.SelectedMusicListItems[t+1]=r;n.SelectedMusicListItems[t]=u}};n.checkMusic=function(){var t=5;n.canInsertMusic=!0;n.SelectedMusicListItems.length+n.SelectedAvailMusicItems.length>t&&(r.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών","Δεν μπορείτε να επιλέξετε περισσότερα από "+t+" Μουσικά Σχολεία"),n.canInsertMusic=!1)};n.btnMusicRight=function(){n.checkMusic();n.canInsertMusic&&(angular.forEach(n.SelectedAvailMusicItems,function(n){this.push(n)},n.SelectedMusicListItems),angular.forEach(n.SelectedAvailMusicItems,function(t){for(var i=n.AvailableMusicListItems.length-1;i>=0;i--)n.AvailableMusicListItems[i].Id==t.Id&&n.AvailableMusicListItems.splice(i,1)}),n.SelectedAvailMusicItems=[],n.SelectedSelectedMusicListItems=[])};n.btnMusicLeft=function(){angular.forEach(n.SelectedSelectedMusicListItems,function(n){this.push(n)},n.AvailableMusicListItems);angular.forEach(n.SelectedSelectedMusicListItems,function(t){for(var i=n.SelectedMusicListItems.length-1;i>=0;i--)n.SelectedMusicListItems[i].Id==t.Id&&n.SelectedMusicListItems.splice(i,1)});n.SelectedSelectedMusicListItems=[];n.SelectedAvailMusicItems=[]};n.checkSelectedSmeaFromOfficial=function(){if(!u.isEmpty(n.SelectedPyspdeSmeaListItems)&&n.PyspdeFormOfficial>0){var t=n.myfilter=e("filter")(n.SelectedPyspdeSmeaListItems,{RegionAndUnitId:n.PyspdeFormOfficial},!0);t.length>0?(n.showAlertPyspdeSmeaFormOfficial=!0,t.length==1&&(n.concatPyspde=t[0].DescriptionConc,n.messagePyspdeSmea="Δεν επιτρέπεται η επιλογή "+n.concatPyspde+", καθώς ταυτίζεται με τη Δ/νση Οργανικής σας")):(n.showAlertPyspdeSmeaFormOfficial=!1,n.concatPyspdeSmea="")}else n.showAlertPyspdeSmeaFormOfficial=!1,n.concatPyspdeSmea=""};n.removeDuplicatesPyspdeSmeaForDualList=function(){n.checkSelectedSmeaFromOfficial();angular.forEach(n.SelectedAvailPyspdeSmeaItems,function(t){for(var i=n.AvailablePyspdeSmeaListItems.length-1;i>=0;i--)n.AvailablePyspdeSmeaListItems[i].Id==t.Id&&n.AvailablePyspdeSmeaListItems.splice(i,1)})};n.SelectedAvailPyspdeSmeaItems=[];n.SelectedSelectedPyspdeSmeaListItems=[];n.SelectedPyspdeSmeaListItems=[];n.btnPyspdeSmeaUp=function(){for(var t,r,u,f=n.SelectedSelectedPyspdeSmeaListItems,i=0;i<n.SelectedSelectedPyspdeSmeaListItems.length;i++){if(t=n.SelectedPyspdeSmeaListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedPyspdeSmeaListItems[i].Id),t<=0||t>=n.SelectedPyspdeSmeaListItems.length)return;r=n.SelectedPyspdeSmeaListItems[t];u=n.SelectedPyspdeSmeaListItems[t-1];n.SelectedPyspdeSmeaListItems[t-1]=r;n.SelectedPyspdeSmeaListItems[t]=u}};n.btnPyspdeSmeaDown=function(){for(var t,r,u,i=n.SelectedSelectedPyspdeSmeaListItems.length-1;i>=0;i--){if(t=n.SelectedPyspdeSmeaListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedPyspdeSmeaListItems[i].Id),t<0||t>=n.SelectedPyspdeSmeaListItems.length-1)return;r=n.SelectedPyspdeSmeaListItems[t];u=n.SelectedPyspdeSmeaListItems[t+1];n.SelectedPyspdeSmeaListItems[t+1]=r;n.SelectedPyspdeSmeaListItems[t]=u}};n.btnPyspdeSmeaRight=function(){n.checkRegionsSmea();n.canInsertRegions&&(angular.forEach(n.SelectedAvailPyspdeSmeaItems,function(n){this.push(n)},n.SelectedPyspdeSmeaListItems),angular.forEach(n.SelectedAvailPyspdeSmeaItems,function(t){for(var i=n.AvailablePyspdeSmeaListItems.length-1;i>=0;i--)n.AvailablePyspdeSmeaListItems[i].Id==t.Id&&n.AvailablePyspdeSmeaListItems.splice(i,1)}),n.SelectedAvailPyspdeSmeaItems=[],n.SelectedSelectedPyspdeSmeaListItems=[]);n.checkSelectedSmeaFromOfficial()};n.checkRegionsSmea=function(){var t=5;n.canInsertRegions=!0;n.SelectedPyspdeSmeaListItems.length+n.SelectedAvailPyspdeSmeaItems.length>t&&(r.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών","Δεν μπορείτε να επιλέξετε περισσότερες από "+t+" περιοχές"),n.canInsertRegions=!1)};n.btnPyspdeSmeaLeft=function(){angular.forEach(n.SelectedSelectedPyspdeSmeaListItems,function(n){this.push(n)},n.AvailablePyspdeSmeaListItems);angular.forEach(n.SelectedSelectedPyspdeSmeaListItems,function(t){for(var i=n.SelectedPyspdeSmeaListItems.length-1;i>=0;i--)n.SelectedPyspdeSmeaListItems[i].Id==t.Id&&n.SelectedPyspdeSmeaListItems.splice(i,1)});n.SelectedSelectedPyspdeSmeaListItems=[];n.SelectedAvailPyspdeSmeaItems=[];n.checkSelectedSmeaFromOfficial()};n.removeDuplicatesKeddyForDualList=function(){angular.forEach(n.SelectedAvailKeddyItems,function(t){for(var i=n.AvailableKeddyListItems.length-1;i>=0;i--)n.AvailableKeddyListItems[i].Id==t.Id&&n.AvailableKeddyListItems.splice(i,1)});n.SelectedAvailKeddyItems=[];n.SelectedSelectedKeddyListItems=[]};n.SelectedAvailKeddyItems=[];n.SelectedSelectedKeddyListItems=[];n.SelectedKeddyListItems=[];n.btnKeddyUp=function(){for(var t,r,u,f=n.SelectedSelectedKeddyListItems,i=0;i<n.SelectedSelectedKeddyListItems.length;i++){if(t=n.SelectedKeddyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedKeddyListItems[i].Id),t<=0||t>=n.SelectedKeddyListItems.length)return;r=n.SelectedKeddyListItems[t];u=n.SelectedKeddyListItems[t-1];n.SelectedKeddyListItems[t-1]=r;n.SelectedKeddyListItems[t]=u}};n.btnKeddyDown=function(){for(var t,r,u,i=n.SelectedSelectedKeddyListItems.length-1;i>=0;i--){if(t=n.SelectedKeddyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedKeddyListItems[i].Id),t<0||t>=n.SelectedKeddyListItems.length-1)return;r=n.SelectedKeddyListItems[t];u=n.SelectedKeddyListItems[t+1];n.SelectedKeddyListItems[t+1]=r;n.SelectedKeddyListItems[t]=u}};n.btnKeddyRight=function(){n.checkKeddy();n.canInsertKeddy&&(angular.forEach(n.SelectedAvailKeddyItems,function(n){this.push(n)},n.SelectedKeddyListItems),angular.forEach(n.SelectedAvailKeddyItems,function(t){for(var i=n.AvailableKeddyListItems.length-1;i>=0;i--)n.AvailableKeddyListItems[i].Id==t.Id&&n.AvailableKeddyListItems.splice(i,1)}),n.SelectedAvailKeddyItems=[],n.SelectedSelectedKeddyListItems=[])};n.btnKeddyLeft=function(){angular.forEach(n.SelectedSelectedKeddyListItems,function(n){this.push(n)},n.AvailableKeddyListItems);angular.forEach(n.SelectedSelectedKeddyListItems,function(t){for(var i=n.SelectedKeddyListItems.length-1;i>=0;i--)n.SelectedKeddyListItems[i].Id==t.Id&&n.SelectedKeddyListItems.splice(i,1)});n.SelectedSelectedKeddyListItems=[];n.SelectedAvailKeddyItems=[]};n.checkKeddy=function(){var t=5;n.canInsertKeddy=!0;n.SelectedKeddyListItems.length+n.SelectedAvailKeddyItems.length>t&&(r.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος ΚΕΔΔΥ","Δεν μπορείτε να επιλέξετε περισσότερες από "+t+" ΚΕΔΔΥ"),n.canInsertKeddy=!1)};n.checkSelectedFromOfficial=function(){if(!u.isEmpty(n.SelectedPyspdeListItems)&&n.PyspdeFormOfficial>0){var t=n.myfilter=e("filter")(n.SelectedPyspdeListItems,{RegionAndUnitId:n.PyspdeFormOfficial},!0);t.length>0?(n.showAlertPyspdeFormOfficial=!0,t.length==1?(n.concatPyspde=t[0].DescriptionConc,n.messagePyspde="Δεν επιτρέπεται η επιλογή "+n.concatPyspde+", καθώς ταυτίζεται με τη Δ/νση Οργανικής σας"):(n.concatPyspde=t[0].DescriptionConc+","+t[1].DescriptionConc,n.messagePyspde="Δεν επιτρέπονται οι επιλογές "+n.concatPyspde+" καθώς ταυτίζονται με τη Δ/νση Οργανικής σας.")):(n.showAlertPyspdeFormOfficial=!1,n.concatPyspde="")}else n.showAlertPyspdeFormOfficial=!1,n.concatPyspde=""};n.btnPyspdeUp=function(){for(var t,r,u,f=n.SelectedSelectedPyspdeListItems,i=0;i<n.SelectedSelectedPyspdeListItems.length;i++){if(t=n.SelectedPyspdeListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedPyspdeListItems[i].Id),t<=0||t>=n.SelectedPyspdeListItems.length)return;r=n.SelectedPyspdeListItems[t];u=n.SelectedPyspdeListItems[t-1];n.SelectedPyspdeListItems[t-1]=r;n.SelectedPyspdeListItems[t]=u}};n.btnPyspdeDown=function(){for(var t,r,u,i=n.SelectedSelectedPyspdeListItems.length-1;i>=0;i--){if(t=n.SelectedPyspdeListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedPyspdeListItems[i].Id),t<0||t>=n.SelectedPyspdeListItems.length-1)return;r=n.SelectedPyspdeListItems[t];u=n.SelectedPyspdeListItems[t+1];n.SelectedPyspdeListItems[t+1]=r;n.SelectedPyspdeListItems[t]=u}};n.btnPyspdeRight=function(){n.checkRegions();n.canInsertRegions&&(angular.forEach(n.SelectedAvailPyspdeItems,function(n){this.push(n)},n.SelectedPyspdeListItems),angular.forEach(n.SelectedAvailPyspdeItems,function(t){for(var i=n.AvailablePyspdeListItems.length-1;i>=0;i--)n.AvailablePyspdeListItems[i].Id==t.Id&&n.AvailablePyspdeListItems.splice(i,1)}),n.SelectedAvailPyspdeItems=[],n.SelectedSelectedPyspdeListItems=[]);n.checkSelectedFromOfficial()};n.checkRegions=function(){var o=5,s=5,h=10,t,i,u,f;n.canInsertRegions=!0;t=e("filter")(n.SelectedPyspdeListItems,{JointExamination:!1},!0).length;i=e("filter")(n.SelectedAvailPyspdeItems,{JointExamination:!1},!0).length;n.secondment.JointExamination&&(u=e("filter")(n.SelectedPyspdeListItems,{JointExamination:!0},!0).length,f=e("filter")(n.SelectedAvailPyspdeItems,{JointExamination:!0},!0).length,u+f>s&&(r.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών με συνεξέταση","Δεν μπορείτε να επιλέξετε περισσότερες από "+s+" περιοχές με συνεξέταση"),n.canInsertRegions=!1));t+i>o&&(r.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών χωρίς συνεξέταση","Δεν μπορείτε να επιλέξετε περισσότερες από "+o+" περιοχές χωρίς συνεξέταση"),n.canInsertRegions=!1);t+i+u+f>h&&(r.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών","Δεν μπορείτε να επιλέξετε περισσότερες από "+h+" περιοχές"),n.canInsertRegions=!1)};n.btnPyspdeLeft=function(){angular.forEach(n.SelectedSelectedPyspdeListItems,function(n){this.push(n)},n.AvailablePyspdeListItems);angular.forEach(n.SelectedSelectedPyspdeListItems,function(t){for(var i=n.SelectedPyspdeListItems.length-1;i>=0;i--)n.SelectedPyspdeListItems[i].Id==t.Id&&n.SelectedPyspdeListItems.splice(i,1)});n.SelectedSelectedPyspdeListItems=[];n.SelectedAvailPyspdeItems=[];n.checkSelectedFromOfficial()};n.SelectedAvailChurchItems=[];n.SelectedSelectedChurchListItems=[];n.SelectedChurchListItems=[];n.btnChurchUp=function(){for(var t,r,u,f=n.SelectedSelectedChurchListItems,i=0;i<n.SelectedSelectedChurchListItems.length;i++){if(t=n.SelectedChurchListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedChurchListItems[i].Id),t<=0||t>=n.SelectedChurchListItems.length)return;r=n.SelectedChurchListItems[t];u=n.SelectedChurchListItems[t-1];n.SelectedChurchListItems[t-1]=r;n.SelectedChurchListItems[t]=u}};n.btnChurchDown=function(){for(var t,r,u,i=n.SelectedSelectedChurchListItems.length-1;i>=0;i--){if(t=n.SelectedChurchListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedChurchListItems[i].Id),t<0||t>=n.SelectedChurchListItems.length-1)return;r=n.SelectedChurchListItems[t];u=n.SelectedChurchListItems[t+1];n.SelectedChurchListItems[t+1]=r;n.SelectedChurchListItems[t]=u}};n.btnChurchRight=function(){n.checkChurches();n.canInsertChurches&&(angular.forEach(n.SelectedAvailChurchItems,function(n){this.push(n)},n.SelectedChurchListItems),angular.forEach(n.SelectedAvailChurchItems,function(t){for(var i=n.AvailableChurchListItems.length-1;i>=0;i--)n.AvailableChurchListItems[i].Id==t.Id&&n.AvailableChurchListItems.splice(i,1)}),n.SelectedAvailChurchItems=[],n.SelectedSelectedChurchListItems=[])};n.checkChurches=function(){var o=4,s=4,h=8,t,i,u,f;n.canInsertChurches=!0;t=e("filter")(n.SelectedChurchListItems,{JointExamination:!1},!0).length;i=e("filter")(n.SelectedAvailChurchItems,{JointExamination:!1},!0).length;n.secondment.JointExamination&&(u=e("filter")(n.SelectedChurchListItems,{JointExamination:!0},!0).length,f=e("filter")(n.SelectedAvailChurchItems,{JointExamination:!0},!0).length,u+f>s&&(r.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών με συνεξέταση","Δεν μπορείτε να επιλέξετε περισσότερες από "+s+" περιοχές με συνεξέταση"),n.canInsertChurches=!1));t+i>o&&(r.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών χωρίς συνεξέταση","Δεν μπορείτε να επιλέξετε περισσότερες από "+o+" περιοχές χωρίς συνεξέταση"),n.canInsertChurches=!1);t+i+u+f>h&&(r.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών","Δεν μπορείτε να επιλέξετε περισσότερες από "+h+" περιοχές"),n.canInsertChurches=!1)};n.btnChurchLeft=function(){angular.forEach(n.SelectedSelectedChurchListItems,function(n){this.push(n)},n.AvailableChurchListItems);angular.forEach(n.SelectedSelectedChurchListItems,function(t){for(var i=n.SelectedChurchListItems.length-1;i>=0;i--)n.SelectedChurchListItems[i].Id==t.Id&&n.SelectedChurchListItems.splice(i,1)});n.SelectedSelectedChurchListItems=[];n.SelectedAvailChurchItems=[]};n.SelectedAvailBrailleSignKnowledgeItems=[];n.SelectedSelectedBrailleSignKnowledgeListItems=[];n.SelectedBrailleSignKnowledgeListItems=[];n.checkBrailleSignKnowledgeRegions=function(){var t=5;n.canInsertRegions=!0;n.SelectedBrailleSignKnowledgeListItems.length+n.SelectedAvailableBrailleSignKnowledgeListItems.length>t&&(r.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών","Δεν μπορείτε να επιλέξετε περισσότερες από "+t+" περιοχές"),n.canInsertRegions=!1)};n.btnBrailleSignKnowledgeRight=function(){n.checkBrailleSignKnowledgeRegions();n.canInsertRegions&&(angular.forEach(n.SelectedAvailableBrailleSignKnowledgeListItems,function(n){this.push(n)},n.SelectedBrailleSignKnowledgeListItems),angular.forEach(n.SelectedAvailableBrailleSignKnowledgeListItems,function(t){for(var i=n.AvailableBrailleSignKnowledgeListItems.length-1;i>=0;i--)n.AvailableBrailleSignKnowledgeListItems[i].Id==t.Id&&n.AvailableBrailleSignKnowledgeListItems.splice(i,1)}),n.SelectedAvailBrailleSignKnowledgeItems=[],n.SelectedSelectedBrailleSignKnowledgeListItems=[])};n.btnBrailleSignKnowledgeLeft=function(){console.log();angular.forEach(n.SelectedSelectedBrailleSignKnowledgeListItems,function(n){this.push(n)},n.AvailableBrailleSignKnowledgeListItems);angular.forEach(n.SelectedSelectedBrailleSignKnowledgeListItems,function(t){for(var i=n.SelectedBrailleSignKnowledgeListItems.length-1;i>=0;i--)n.SelectedBrailleSignKnowledgeListItems[i].Id==t.Id&&n.SelectedBrailleSignKnowledgeListItems.splice(i,1)});n.SelectedSelectedBrailleSignKnowledgeListItems=[];n.SelectedAvailBrailleSignKnowledgeItems=[]};n.btnBrailleSignKnowledgeUp=function(){for(var t,r,u,f=n.SelectedSelectedBrailleSignKnowledgeListItems,i=0;i<n.SelectedSelectedBrailleSignKnowledgeListItems.length;i++){if(t=n.SelectedBrailleSignKnowledgeListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedBrailleSignKnowledgeListItems[i].Id),t<=0||t>=n.SelectedBrailleSignKnowledgeListItems.length)return;r=n.SelectedBrailleSignKnowledgeListItems[t];u=n.SelectedBrailleSignKnowledgeListItems[t-1];n.SelectedBrailleSignKnowledgeListItems[t-1]=r;n.SelectedBrailleSignKnowledgeListItems[t]=u}};n.btnBrailleSignKnowledgeDown=function(){for(var t,r,u,i=n.SelectedSelectedBrailleSignKnowledgeListItems.length-1;i>=0;i--){if(t=n.SelectedBrailleSignKnowledgeListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedBrailleSignKnowledgeListItems[i].Id),t<0||t>=n.SelectedBrailleSignKnowledgeListItems.length-1)return;r=n.SelectedBrailleSignKnowledgeListItems[t];u=n.SelectedBrailleSignKnowledgeListItems[t+1];n.SelectedBrailleSignKnowledgeListItems[t+1]=r;n.SelectedBrailleSignKnowledgeListItems[t]=u}};n.removeDuplicatesBrailleSignKnowledgeForDualList=function(){angular.forEach(n.SelectedBrailleSignKnowledgeListItems,function(t){for(var i=n.AvailableBrailleSignKnowledgeListItems.length-1;i>=0;i--)n.AvailableBrailleSignKnowledgeListItems[i].Id==t.Id&&n.AvailableBrailleSignKnowledgeListItems.splice(i,1)});n.SelectedAvailableBrailleSignKnowledgeListItems=[];n.SelectedSelectedAvailableBrailleSignKnowledgeListItems=[]};n.BraileKnowledgeSignKnowledgeChange=function(){var t;for(n.AvailableBrailleSignKnowledgeListItems=e("filter")(n.AvailableMainQueryPyspePysdeKedasySdeySignKnowledgeList,function(t){return t.IsBraille&&n.secondmentEEPEBP.BraileKnowledge||t.IsSignKnowledge&&n.secondmentEEPEBP.SignKnowledge}),t=n.SelectedBrailleSignKnowledgeListItems.length-1;t>=0;t--)!n.secondmentEEPEBP.SignKnowledge&&n.SelectedBrailleSignKnowledgeListItems[t].IsSignKnowledge&&n.SelectedBrailleSignKnowledgeListItems.splice(t,1);for(t=n.SelectedBrailleSignKnowledgeListItems.length-1;t>=0;t--)!n.secondmentEEPEBP.BraileKnowledge&&n.SelectedBrailleSignKnowledgeListItems[t].IsBraille&&n.SelectedBrailleSignKnowledgeListItems.splice(t,1)};n.SelectedAvailBrailleSignKnowledgeItems=[];n.SelectedSelectedBrailleSignKnowledgeListItems=[];n.SelectedPyspePysdeKedasySdeyListItems=[];n.checkbtnPyspePysdeKedasySdeyRightRegions=function(){var t=5;n.canInsertRegions=!0;n.SelectedAvailablePyspePysdeListItems.length+n.SelectedAvailableKedasyItems.length+n.SelectedAvailableSdeyItems.length+n.SelectedPyspePysdeKedasySdeyListItems.length>t&&(r.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος επιλογών","Δεν μπορείτε να επιλέξετε περισσότερες από "+t+" περιοχές"),n.canInsertRegions=!1)};n.btnPyspePysdeKedasySdeyRight=function(){n.checkbtnPyspePysdeKedasySdeyRightRegions();n.canInsertRegions&&(angular.forEach(n.SelectedAvailablePyspePysdeListItems,function(n){this.push(n)},n.SelectedPyspePysdeKedasySdeyListItems),angular.forEach(n.SelectedAvailableKedasyItems,function(n){this.push(n)},n.SelectedPyspePysdeKedasySdeyListItems),angular.forEach(n.SelectedAvailableSdeyItems,function(n){this.push(n)},n.SelectedPyspePysdeKedasySdeyListItems),n.removeDuplicatesPyspePysdeKedasySdeyListForDualList())};n.btnPyspePysdeKedasySdeyLeft=function(){angular.forEach(n.SelectedSelectedPyspePysdeKedasySdeyListItems,function(t){switch(t.RegionAndUnitTypeId){case 17:case 18:n.AvailablePyspePysdeListItems.push(t);break;case 34:n.AvailableKedasyListItems.push(t);break;case 35:n.AvailableSdeyListItems.push(t)}});angular.forEach(n.SelectedSelectedPyspePysdeKedasySdeyListItems,function(t){for(var i=n.SelectedPyspePysdeKedasySdeyListItems.length-1;i>=0;i--)n.SelectedPyspePysdeKedasySdeyListItems[i].Id==t.Id&&n.SelectedPyspePysdeKedasySdeyListItems.splice(i,1)});n.removeDuplicatesPyspePysdeKedasySdeyListForDualList();n.SelectedSelectedPyspePysdeKedasySdeyListItems=[];n.SelectedAvailablePyspePysdeListItems=[];n.SelectedAvailableKedasyItems=[];n.SelectedAvailableSdeyItems=[]};n.btnPyspePysdeKedasySdeyUp=function(){for(var t,r,u,f=n.SelectedSelectedPyspePysdeKedasySdeyListItems,i=0;i<n.SelectedSelectedPyspePysdeKedasySdeyListItems.length;i++){if(t=n.SelectedPyspePysdeKedasySdeyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedPyspePysdeKedasySdeyListItems[i].Id),t<=0||t>=n.SelectedPyspePysdeKedasySdeyListItems.length)return;r=n.SelectedPyspePysdeKedasySdeyListItems[t];u=n.SelectedPyspePysdeKedasySdeyListItems[t-1];n.SelectedPyspePysdeKedasySdeyListItems[t-1]=r;n.SelectedPyspePysdeKedasySdeyListItems[t]=u}};n.btnPyspePysdeKedasySdeyDown=function(){for(var t,r,u,i=n.SelectedSelectedPyspePysdeKedasySdeyListItems.length-1;i>=0;i--){if(t=n.SelectedPyspePysdeKedasySdeyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedPyspePysdeKedasySdeyListItems[i].Id),t<0||t>=n.SelectedPyspePysdeKedasySdeyListItems.length-1)return;r=n.SelectedPyspePysdeKedasySdeyListItems[t];u=n.SelectedPyspePysdeKedasySdeyListItems[t+1];n.SelectedPyspePysdeKedasySdeyListItems[t+1]=r;n.SelectedPyspePysdeKedasySdeyListItems[t]=u}};n.removeDuplicatesPyspePysdeKedasySdeyListForDualList=function(){angular.forEach(n.SelectedPyspePysdeKedasySdeyListItems,function(t){var i;if(t.RegionAndUnitTypeId==1||t.RegionAndUnitTypeId==1)for(i=n.AvailablePyspePysdeListItems.length-1;i>=0;i--)n.AvailablePyspePysdeListItems[i].Id==t.Id&&n.AvailablePyspePysdeListItems.splice(i,1);if(t.RegionAndUnitTypeId==34)for(i=n.AvailableKedasyListItems.length-1;i>=0;i--)n.AvailableKedasyListItems[i].Id==t.Id&&n.AvailableKedasyListItems.splice(i,1);if(t.RegionAndUnitTypeId==35)for(i=n.AvailableSdeyListItems.length-1;i>=0;i--)n.AvailableSdeyListItems[i].Id==t.Id&&n.AvailableSdeyListItems.splice(i,1)});n.SelectedSelectedPyspePysdeKedasySdeyListItems=[]}};SecondmentUpdateTransfer.$inject=["$scope","$state","PassParameters","toaster","GeneralFactory","$timeout","$filter","$q","$uibModal","SecondmentPyspdeChurchFactory","ApplicationTypeRegionAndUnitFactory","$log"];SeminarManagmentController=function(n,t,i,r,u,f){n.authentication.isAuth?n.authentication.isAuth&&!r.isValueInArray(r.getRoleCode(n.authentication.role),"a")&&t.go("forbidden"):t.go("/");n.seminar={};n.seminar.SeminarImplementationBody={};n.seminar.SeminarImplementationBody={selected:""};n.implementationBodyList=[];var e=f.all([r.getByAll("/api/PersonQualifications/getSeminarImplementationBody"),]);e.then(function(t){n.implementationBodyList=t[0]});n.saveAction=function(){r.isEmptyValue(n.seminar.SeminarImplementationBody.selected)||r.isEmptyValue(n.seminar.seminar)?i.pop("error","ΠΡΟΣΟΧΗ","Δεν έχετε συμπληρώσει όλα τα απαραίτητα πεδία"):(n.seminar.SeminarImplementationBodyId=n.seminar.SeminarImplementationBody.selected.Id,n.seminar.UserRole=n.authentication.role,r.postByParams(n.seminar,"/api/PersonQualifications/InsertSeminarToList").then(function(){i.pop("success","Ενημέρωση","Η καταχώριση του σεμιναρίου πραγματοποιήθηκε με επιτυχία");n.seminar={};n.seminar.SeminarImplementationBody={};n.seminar.SeminarImplementationBody={selected:""}},function(n){i.pop("error","ΠΡΟΣΟΧΗ",n.data)}))}};SeminarManagmentController.$inject=["$scope","$state","toaster","GeneralFactory","$filter","$q"];ShowAlgorithmResultsController=function(n,t,i,r,u,f,e,o,s){n.algorithmTypeId=i.getBackbgroudProcessId();n.dtInstance1={};n.dtInstance2={};n.dtInstance3={};n.dtInstance4={};n.dtOptions1=e.newOptions().withDOM("Blfrtip").withOption("scrollX","100%").withPaginationType("full_numbers").withButtons(["excel"]);n.dtOptions2=e.newOptions().withDOM("Blfrtip").withOption("scrollX","100%").withPaginationType("full_numbers").withButtons(["excel"]);n.dtOptions3=e.newOptions().withDOM("Blfrtip").withOption("scrollX","100%").withPaginationType("full_numbers").withButtons(["excel"]);n.dtOptions4=e.newOptions().withDOM("Blfrtip").withOption("scrollX","100%").withPaginationType("full_numbers").withButtons(["excel"]);n.dtColumns1=[o.newColumn("TaxNumber").withTitle("Α.Φ.Μ."),o.newColumn("Lastname").withTitle("Επώνυμο"),o.newColumn("Firstname").withTitle("Όνομα"),o.newColumn("HavingManyChildren").withTitle("Πολύτεκνος/Τρίτεκνος"),o.newColumn("Thalassemia").withTitle("Μεσογειακή Αναιμία"),o.newColumn("MultipleSclerosis").withTitle("Σκλήρυνση Κατά Πλάκας"),o.newColumn("DiplomaDegree").withTitle("Βαθμός Πτυχίου"),o.newColumn("DiplomaDate").withTitle("Ημερομηνία κτήσης πτυχίου"),o.newColumn("CivilServant").withTitle("Δημόσιος υπάλληλος"),o.newColumn("TotalPoints").withTitle("Μόρια"),o.newColumn("SpecialityOrder").withTitle("Σειρά κατάταξης"),o.newColumn("SpecialityCode").withTitle("Κλάδος"),o.newColumn("SpecialityGroup").withTitle("Ομάδα")];n.dtColumns2=[o.newColumn("TaxNumber").withTitle("Α.Φ.Μ."),o.newColumn("Lastname").withTitle("Επώνυμο"),o.newColumn("Firstname").withTitle("Όνομα"),o.newColumn("HavingManyChildren").withTitle("Πολύτεκνος/Τρίτεκνος"),o.newColumn("Thalassemia").withTitle("Μεσογειακή Αναιμία"),o.newColumn("MultipleSclerosis").withTitle("Σκλήρυνση Κατά Πλάκας"),o.newColumn("DiplomaDegree").withTitle("Βαθμός Πτυχίου"),o.newColumn("DiplomaDate").withTitle("Ημερομηνία κτήσης πτυχίου"),o.newColumn("CivilServant").withTitle("Δημόσιος υπάλληλος"),o.newColumn("TotalPoints").withTitle("Μόρια"),o.newColumn("SpecialityOrder").withTitle("Σειρά κατάταξης"),o.newColumn("SpecialityCode").withTitle("Κλάδος"),o.newColumn("SpecialityGroup").withTitle("Ομάδα")];n.dtColumns3=[o.newColumn("TaxNumber").withTitle("Α.Φ.Μ."),o.newColumn("Lastname").withTitle("Επώνυμο"),o.newColumn("Firstname").withTitle("Όνομα"),o.newColumn("HavingManyChildren").withTitle("Πολύτεκνος/Τρίτεκνος"),o.newColumn("Thalassemia").withTitle("Μεσογειακή Αναιμία"),o.newColumn("MultipleSclerosis").withTitle("Σκλήρυνση Κατά Πλάκας"),o.newColumn("DiplomaDegree").withTitle("Βαθμός Πτυχίου"),o.newColumn("DiplomaDate").withTitle("Ημερομηνία κτήσης πτυχίου"),o.newColumn("CivilServant").withTitle("Δημόσιος υπάλληλος"),o.newColumn("TotalPoints").withTitle("Μόρια"),o.newColumn("SpecialityOrder").withTitle("Σειρά κατάταξης"),o.newColumn("SpecialityCode").withTitle("Κλάδος"),o.newColumn("SpecialityGroup").withTitle("Ομάδα")];n.dtColumns4=[o.newColumn("TaxNumber").withTitle("Α.Φ.Μ."),o.newColumn("Lastname").withTitle("Επώνυμο"),o.newColumn("Firstname").withTitle("Όνομα"),o.newColumn("HavingManyChildren").withTitle("Πολύτεκνος/Τρίτεκνος"),o.newColumn("Thalassemia").withTitle("Μεσογειακή Αναιμία"),o.newColumn("MultipleSclerosis").withTitle("Σκλήρυνση Κατά Πλάκας"),o.newColumn("DiplomaDegree").withTitle("Βαθμός Πτυχίου"),o.newColumn("DiplomaDate").withTitle("Ημερομηνία κτήσης πτυχίου"),o.newColumn("CivilServant").withTitle("Δημόσιος υπάλληλος"),o.newColumn("TotalPoints").withTitle("Μόρια"),o.newColumn("SpecialityOrder").withTitle("Σειρά κατάταξης"),o.newColumn("SpecialityCode").withTitle("Κλάδος"),o.newColumn("SpecialityGroup").withTitle("Ομάδα")];n.dtColumns4=[o.newColumn("TaxNumber").withTitle("Α.Φ.Μ."),o.newColumn("Lastname").withTitle("Επώνυμο"),o.newColumn("Firstname").withTitle("Όνομα"),o.newColumn("HavingManyChildren").withTitle("Πολύτεκνος/Τρίτεκνος"),o.newColumn("Thalassemia").withTitle("Μεσογειακή Αναιμία"),o.newColumn("MultipleSclerosis").withTitle("Σκλήρυνση Κατά Πλάκας"),o.newColumn("DiplomaDegree").withTitle("Βαθμός Πτυχίου"),o.newColumn("DiplomaDate").withTitle("Ημερομηνία κτήσης πτυχίου"),o.newColumn("CivilServant").withTitle("Δημόσιος υπάλληλος"),o.newColumn("TotalPoints").withTitle("Μόρια"),o.newColumn("SpecialityOrder").withTitle("Σειρά κατάταξης"),o.newColumn("SpecialityCode").withTitle("Κλάδος"),o.newColumn("MusicSpecialityDescription").withTitle("Ομάδα")];var h=function(){var n=s.defer();return t({url:"/api/Classification/getSubstituteClassification",method:"GET",headers:{"Content-Type":"application/json"}}).success(function(t){n.resolve(t)}).error(function(){n.reject(response)}),n.promise},c=function(){var n=s.defer();return t({url:"/api/Classification/getSubstituteClassificationZero",method:"GET",headers:{"Content-Type":"application/json"}}).success(function(t){n.resolve(t)}).error(function(){n.reject(response)}),n.promise},l=function(){var i=s.defer();return t({url:"/api/Classification/getSubstituteSmeaClassification",method:"GET",headers:{"Content-Type":"application/json"}}).success(function(t){n.dtOptions3.data=t;i.resolve(t)}).error(function(){i.reject(response)}),i.promise},a=function(){var i=s.defer();return t({url:"/api/Classification/getSubstituteMusicClassification",method:"GET",headers:{"Content-Type":"application/json"}}).success(function(t){n.dtOptions4.data=t;i.resolve(t)}).error(function(){i.reject(response)}),i.promise};n.algorithmTypeId==1?(n.dtOptions1=e.fromFnPromise(h()).withDOM("Blfrtip").withOption("scrollX","100%").withOption("order",[12,"desc"]).withPaginationType("full_numbers").withButtons(["excel"]),n.dtOptions2=e.fromFnPromise(c()).withDOM("Blfrtip").withOption("scrollX","100%").withPaginationType("full_numbers").withOption("order",[12,"desc"]).withButtons(["excel"])):n.algorithmTypeId==2?n.dtOptions3=e.fromFnPromise(l()).withDOM("Blfrtip").withOption("scrollX","100%").withPaginationType("full_numbers").withOption("order",[12,"desc"]).withButtons(["excel"]):n.algorithmTypeId==3&&(n.dtOptions4=e.fromFnPromise(a()).withDOM("Blfrtip").withOption("scrollX","100%").withPaginationType("full_numbers").withOption("order",[12,"desc"]).withButtons(["excel"]))};ShowAlgorithmResultsController.$inject=["$scope","$http","PassParameters","$state","$filter","ClassificationFactory","DTOptionsBuilder","DTColumnBuilder","$q","toaster","ManagementFactory","$compile"];ShowApplicationPerIntendancy=function(n,t,i,r,u,f,e,o,s,h,c,l,a){function w(t){i(angular.element(t).contents())(n)}function b(t){n.paramsForDataTable[v]=t;var r=!1,i=!1;switch(t.ApplicationTypeId){case 1:r=n.pageRules.sub.CanConfirm;i=n.pageRules.sub.CanExport;break;case 2:r=n.pageRules.hourly.CanConfirm;i=n.pageRules.hourly.CanExport;break;case 3:r=n.pageRules.subSmea.CanConfirm;i=n.pageRules.subSmea.CanExport;break;case 4:r=n.pageRules.hourlySmea.CanConfirm;i=n.pageRules.hourlySmea.CanExport;break;case 5:r=n.pageRules.subMusic.CanConfirm;i=n.pageRules.subMusic.CanExport;break;case 6:r=n.pageRules.hourlyMusic.CanConfirm;i=n.pageRules.hourlyMusic.CanExport;break;case 7:r=n.pageRules.secPyspde.CanConfirm;i=n.pageRules.secPyspde.CanExport;break;case 8:r=n.pageRules.secBody.CanConfirm;i=n.pageRules.secBody.CanExport;break;case 9:r=n.pageRules.secSmea.CanConfirm;i=n.pageRules.secSmea.CanExport;break;case 10:r=n.pageRules.secArtistic.CanConfirm;i=n.pageRules.secArtistic.CanExport;break;case 11:r=n.pageRules.secMusic.CanConfirm;i=n.pageRules.secMusic.CanExport;break;case 12:r=n.pageRules.secBody1920.CanConfirm;i=n.pageRules.secBody1920.CanExport;break;case 13:r=n.pageRules.secBodyRef.CanConfirm;i=n.pageRules.secBodyRef.CanExport;break;case 14:r=n.pageRules.subRemediation.CanConfirm;i=n.pageRules.subRemediation.CanExport;break;default:r=!1;i=!1}return stringButtons='<button type="button" class="btn btn-primary btn-xs" uib-tooltip="Προβολή / Επεξεργασία" ng-click="goToApplication(\''+t.PersonId+"','"+t.ApplicationTypeId+"','"+t.ApplId+'\')"><i class="fa fa-search"><\/i><\/button>',stringButtons=stringButtons+'<button type="button" class="btn btn-warning btn-xs" uib-tooltip="Ιστορικό αιτήσεων" ng-click="goToHistory(\''+t.PersonId+'\')"><i class="fa fa-folder-open"><\/i><\/button> <\/div>',i&&(stringButtons=stringButtons+'<button type="button" class="btn blue-hoki btn-xs" uib-tooltip="Εξαγωγή σε PDF" ng-click="download(\''+t.ApplicationTypeId+"','"+t.ApplId+'\')"><i class="fa fa-file-pdf-o"><\/i><\/button>'),v=v+1,stringButtons}var y,v,p;n.paramsForDataTable={};n.ShowIsConfirmed=!0;n.pageRules={sub:{CanConfirm:!1},hourly:{CanConfirm:!1},subSmea:{CanConfirm:!1},hourlySmea:{CanConfirm:!1},subMusic:{CanConfirm:!1},hourlyMusic:{CanConfirm:!1},secPyspde:{CanConfirm:!1},secBody:{CanConfirm:!1},secBody1920:{CanConfirm:!1},secBodyRef:{CanConfirm:!1},secSmea:{CanConfirm:!1},secMusic:{CanConfirm:!1},secArtistic:{CanConfirm:!1},subRemediation:{CanConfirm:!1}};!n.authentication.isAuth||u.isValueInArray(u.getRoleCode(n.authentication.role),"u1, u2")?r.go("/"):(y="secArtistic,secPyspde,secBody,secBody1920,secBodyRef,secSmea,secMusic,hourly,hourlySmea,sub,hourlyMusic,subSmea,subMusic,myAppl2,subRemediation",u.getByParams({role:n.authentication.role,codes:y},"/api/Subsystem/NewCheckPermission").then(function(t){var i=y.split(",");for(var r in i)n.pageRules[i[r]]=l("filter")(t,{Code:i[r]},!0)[0].Rules},function(){h.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")}));n.IsDisabled=!1;n.ApplicationType={};n.RegionAndUnitList=[];n.showRegionAndUnitList=!1;n.dtInstance={};n.search={applicationTypeId:"",regionAndUnitId:"",IsConfirmed:!1,userRole:n.authentication.role,levelUser:n.authentication.levelId};n.confAction;n.regionAndUnitId={};n.dtOptions=e.newOptions().withPaginationType("full_numbers").withOption("order",[2,"desc"]).withOption("createdRow",w);n.dtColumns=[o.newColumn("ApplId").withTitle("ApplId").notVisible(),o.newColumn("ApplicationTypeId").withTitle("ApplicationTypeId").notVisible(),o.newColumn("IsConfirmed").withTitle("IsConfirmed").notVisible(),o.newColumn("PersonId").withTitle("PersonId").notVisible(),o.newColumn("RegistryNo").withTitle("Α.Μ."),o.newColumn("TaxNumber").withTitle("Α.Φ.Μ."),o.newColumn("Lastname").withTitle("Επώνυμο"),o.newColumn("Firstname").withTitle("Όνομα"),o.newColumn("ApplType").withTitle("Τύπος Αίτησης"),o.newColumn("CreationDateString").withTitle("Ημ/νία Υποβολής"),o.newColumn("LastEditDateString").withTitle("Ημ/νία Τροποποίησης"),o.newColumn("ConfirmationIcon").withTitle("Επικύρωση"),o.newColumn(null).withTitle("Ενέργειες").notSortable().renderWith(b).withClass("text-center dataTables_Actions_150")];v=0;p=function(){u.getByParams(n.search,"/api/HistoryAppl/getHistoryByRegionAndUnit").then(function(t){n.dtOptions.data=t},function(n){h.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.checkFields=function(){return u.isValueInArray(u.getRoleCode(n.authentication.role)," d1, d2, p")&&!u.isEmptyValue(n.search.applicationTypeId)?!0:(u.getRoleCode(n.authentication.role),!1)||u.isEmptyValue(n.search.applicationTypeId)||u.isEmptyValue(n.regionAndUnitId.selected)?!1:!0};n.searchAction=function(){n.checkFields()?(n.search.regionAndUnitId=u.isValueInArray(u.getRoleCode(n.authentication.role)," d1, d2, p")?n.authentication.regionAndUnitId:n.regionAndUnitId.selected.Id,c.SearchFilters.ShowApplicationPerIntendancy={regionAndUnitId:n.search.regionAndUnitId,applicationTypeId:n.search.applicationTypeId,IsConfirmed:n.search.IsConfirmed,userRole:n.search.userRole,levelUser:n.search.levelUser,dtInstance:n.dtInstance},n.dtInstance.changeData(p())):h.pop("warning"," Αδύνατη αναζήτηση","Πρέπει να συμπληρώσετε όλα τα υποχρεωτικά πεδία για την αναζήτηση")};n.download=function(t,i){blockUI({target:"#blockui_loading",animate:!0});a(function(){u.getByParams({applicationId:i,applicationType:t,userRole:n.authentication.role},"/api/HistoryAppl/getAdHocPdfTemplateById").then(function(n){var i=new Date,t={},r;t=n;r=t;pdfMake.createPdf(t).download("export_"+Date.parse(i)+".pdf");unblockUI("#blockui_loading");h.pop("success","Εξαγωγή σε PDF","Το αρχείο export_"+Date.parse(i)+".pdf δημιουργήθηκε με επιτυχία.")},function(){unblockUI("#blockui_loading");h.pop("error","Παρουσιάστηκε σφάλμα","Η αίτηση δεν μπορεί να εκτυπωθεί.")})},1e3)};u.isValueInArray(u.getRoleCode(n.authentication.role),"a, m1, m2")?u.getByParams({userRole:n.authentication.role,levelId:n.authentication.levelId,regionAndUnitId:n.authentication.regionAndUnitId},"/api/RegionAndUnit/getMunicipalitiesAndIntendanciesByParams").then(function(t){n.RegionAndUnitList=t;n.showRegionAndUnitList=!0;c.SearchFilters!=null&&c.SearchFilters!=""&&c.SearchFilters!="undefined"?c.SearchFilters.ShowApplicationPerIntendancy!=null&&c.SearchFilters.ShowApplicationPerIntendancy!=""&&c.SearchFilters.ShowApplicationPerIntendancy!="undefined"?c.SearchFilters.ShowApplicationPerIntendancy.regionAndUnitId>0&&c.SearchFilters.ShowApplicationPerIntendancy.applicationTypeId>0&&(n.regionAndUnitId={selected:l("filter")(t,{Id:c.SearchFilters.ShowApplicationPerIntendancy.regionAndUnitId},!0)[0]},n.search.applicationTypeId=c.SearchFilters.ShowApplicationPerIntendancy.applicationTypeId,n.search.IsConfirmed=c.SearchFilters.ShowApplicationPerIntendancy.IsConfirmed,n.searchAction()):c.SearchFilters.ShowApplicationPerIntendancy={}:c.SearchFilters={}},function(){h.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των τύπων αίτησης")}):(n.showRegionAndUnitList=!1,n.search.regionAndUnitId=n.authentication.regionAndUnitId,c.SearchFilters!=null&&c.SearchFilters!=""&&c.SearchFilters!="undefined"?c.SearchFilters.ShowApplicationPerIntendancy!=null&&c.SearchFilters.ShowApplicationPerIntendancy!=""&&c.SearchFilters.ShowApplicationPerIntendancy!="undefined"?c.SearchFilters.ShowApplicationPerIntendancy.regionAndUnitId>0&&c.SearchFilters.ShowApplicationPerIntendancy.applicationTypeId>0&&(n.search.applicationTypeId=c.SearchFilters.ShowApplicationPerIntendancy.applicationTypeId,n.search.IsConfirmed=c.SearchFilters.ShowApplicationPerIntendancy.IsConfirmed,n.dtInstance=c.SearchFilters.ShowApplicationPerIntendancy.dtInstance,n.searchAction()):c.SearchFilters.ShowApplicationPerIntendancy={}:c.SearchFilters={});u.getByAll("/api/ApplicationType/getApplicationType").then(function(t){n.ApplicationType=l("filter")(t,{IsPublish:!0,DescriptionType:"secondment"},!0)},function(){h.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των τύπων αίτησης")});n.goToHistory=function(n){t.setPersonId(n);r.go("history")};n.goToApplication=function(n,i,r){t.setPersonId(n,10);t.setApplicationId(r,10);f.goToPage(parseInt(i,10))};n.ConfirmationAction=function(t){u.getByParams({applicationType:t.ApplicationTypeId,applicationId:t.ApplId,UnitName:n.authentication.unitName,Role:n.authentication.role},"/api/General/confirmationAction").then(function(){n.searchAction()},function(n){h.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.changedApplicationType=function(){n.selectedApplicationType=l("filter")(n.ApplicationType,function(t){return t.Id==n.search.applicationTypeId&&t.DescriptionType=="secondment"});u.isEmptyValue(n.selectedApplicationType)?(n.ShowIsConfirmed=!0,n.search.IsConfirmed=null):(n.ShowIsConfirmed=!1,n.search.IsConfirmed=!0)};n.openModal=function(t){n.confAction=t};c.SearchFilters!=null&&c.SearchFilters!=""&&c.SearchFilters!="undefined"?c.SearchFilters.ShowApplicationPerIntendancy!=null&&c.SearchFilters.ShowApplicationPerIntendancy!=""&&c.SearchFilters.ShowApplicationPerIntendancy!="undefined"?u.isEmptyValue(c.SearchFilters.ShowApplicationPerIntendancy.regionAndUnitId)||u.isEmptyValue(c.SearchFilters.ShowApplicationPerIntendancy.applicationTypeId)||(n.search={regionAndUnitId:c.SearchFilters.ShowApplicationPerIntendancy.regionAndUnitId,applicationTypeId:c.SearchFilters.ShowApplicationPerIntendancy.applicationTypeId,IsConfirmed:c.SearchFilters.ShowApplicationPerIntendancy.IsConfirmed,userRole:c.SearchFilters.ShowApplicationPerIntendancy.userRole,levelUser:c.SearchFilters.ShowApplicationPerIntendancy.levelUser},n.dtInstance=c.SearchFilters.ShowApplicationPerIntendancy.dtInstance,n.dtInstance.changeData(p())):c.SearchFilters.ShowApplicationPerIntendancy={}:c.SearchFilters={}};ShowApplicationPerIntendancy.$inject=["$scope","PassParameters","$compile","$state","GeneralFactory","RouteFactory","DTOptionsBuilder","DTColumnBuilder","$q","toaster","$rootScope","$filter","$timeout"];ShowChangeDataRequestController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v){function w(t){h(angular.element(t).contents())(n)}function d(t,i,r,f){var e;return n.paramsForDataTable[f.row]=t,e="",(u.isValueInArray(u.getRoleCode(n.authentication.role),"a, m1, m2, s")||n.authentication.regionAndUnitId==n.paramsForDataTable[f.row].IntendancyId||n.authentication.regionAndUnitId==n.paramsForDataTable[f.row].PersonIntendancyId)&&(e='<button type="button" class="btn btn-primary btn-xs" uib-tooltip="Προβολή" data-toggle="modal" data-target="#editPersonModal" ng-click="openActionsModal(paramsForDataTable['+f.row+"], "+f.row+')"><i class="fa fa-search"><\/i><\/button>'),u.isValueInArray(u.getRoleCode(n.authentication.role),"a, m1, m2, s, d2, d1,p")&&(e=e+'<button type="button" class="btn btn-warning btn-xs" uib-tooltip="Φάκελος εκπαιδευτικού" ng-click="goToEditPerson(paramsForDataTable['+f.row+'])"><i class="fa fa-pencil"><\/i><\/button>'),e}function g(){return dto={Id:u.isEmptyValue(n.changeDataRequest.Id)?"":n.changeDataRequest.Id,PersonId:y,ChangeDataRequestId:n.changeDataRequest.ChangeDataRequestItem.selected.Id,Description:n.changeDataRequest.Description,PedagogicalCompetencyId:u.isEmptyValue(n.changeDataRequest.PedagCompetency.selected.Id)?"":n.changeDataRequest.PedagCompetency.selected.Id,Documents:n.changeDataRequest.Documents,RequestedBy:u.isValueInArray(u.getRoleCode(n.authentication.role),"u1, u2")?n.person.Lastname+n.person.Firstname:n.authentication.unitName,SendDocumentsById:u.isEmptyValue(n.changeDataRequest.SendDocuments.selected)?"":u.isEmptyValue(n.changeDataRequest.SendDocuments.selected.Id)?"":n.changeDataRequest.SendDocuments.selected.Id,Answer:n.Answer,IsCompleted:n.changeDataRequest.IsCompleted,IsNew:n.changeDataRequest.IsNew,CreatedBy:n.changeDataRequest.CreatedBy,CreationDate:n.changeDataRequest.CreationDate,CreatedUserRole:n.changeDataRequest.CreatedUserRole,CreatedRegionAndUnitDescription:u.isEmptyValue(n.changeDataRequest.CreatedRegionAndUnitDescription)?"":n.changeDataRequest.CreatedRegionAndUnitDescription}}var p,y,k,b;n.pageRules={};n.authentication.isAuth?(p="changeDataRequest",u.getByParams({role:n.authentication.role,codes:p},"/api/Subsystem/NewCheckPermission").then(function(t){var i=p.split(",");for(var r in i)n.pageRules[i[r]]=f("filter")(t,{Code:i[r]},!0)[0].Rules},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})):i.go("/");n.alertsNotHaveUploadMessage=[{type:"danger",msg:"Δεν έχει μεταφορτωθεί αρχείο."}];y=t.getPersonId();u.isValueInArray(u.getRoleCode(n.authentication.role),"u1, u2")&&(y=n.authentication.personId);n.paramsForDataTable={};k=0;n.changeDataList=[];n.changeDataRequest={};n.changeDataRequest.ChangeDataRequestItem={selected:""};n.changeDataRequest.SendDocuments={selected:""};n.changeDataRequest.PedagCompetency={selected:""};n.changeDataRequest.Intendancy={selected:""};n.consts={};n.search={personId:"",TaxNumber:"",ChangeDataRequestId:"",IntendancyId:"",IsCompleted:!1,IsOld:!1};n.TaxNumberValidation=!1;n.ChangeDataRequestItem={};n.ChangeDataRequestItem.Item={selected:""};n.showResults=!1;n.showUploadFile=!1;n.upload=[];n.messages={completed:"",percentage:"0",error:""};n.uploadedFileDetails="";n.SendDataForCVDto={Id:"",PersonChangeDataRequestId:"",PersonId:""};n.SendDataForCVFullDto={Id:"",PersonChangeDataRequestId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""};n.showAlertForUpload=!1;n.ShowDownloadField=!1;n.showUploadMessage=!1;n.showAnwserForIntendancy=!1;n.casePath=0;n.SendDataForCVDto.PersonId=y;n.messages={completed:"",percentage:"0",error:""};n.Answer="";n.dtInstance={};n.VisibleFields={PedagCompetency:!1,Documents:!1,SendDocuments:!0};n.DisableFieldset=!1;n.dtOptions=c.newOptions().withPaginationType("full_numbers").withOption("order",[2,"desc"]).withOption("createdRow",w).withOption("scrollX","100%").withDOM("Blfrtip").withDataProp("data").withButtons([{extend:"excelHtml5",fileName:"CustomFileName.xlsx",exportOptions:{columns:":visible"},exportData:{decodeEntities:!0}}]);n.dtColumns2=[l.newColumn("Id").withTitle("Id").notVisible(),l.newColumn("TaxNumber").withTitle("Α.Φ.Μ."),l.newColumn("Lastname").withTitle("Επώνυμο"),l.newColumn("Firstname").withTitle("Όνομα"),l.newColumn("ConcatenateSpecialities").withTitle("Κλάδος"),l.newColumn("Intendancy").withTitle("Διεύθυνση Φακέλου"),l.newColumn("ChangeDataRequest").withTitle("Πεδίο προς αλλαγή"),l.newColumn("Completed").withTitle("Διεκπεραιωμένο"),l.newColumn("CreationDateString").withTitle("Ημ. Αιτήματος"),l.newColumn("RequestedBy").withTitle("Αιτήθηκε από "),l.newColumn("Answer").withTitle("Απάντηση αιτήματος"),l.newColumn(null).withTitle("Ενέργειες").notSortable().renderWith(d).withClass("text-center dataTables_Actions_150")];n.dtColumns=[l.newColumn("Id").withTitle("Id").notVisible(),l.newColumn("ChangeDataRequest").withTitle("Πεδίο προς αλλαγή"),l.newColumn("Completed").withTitle("Διεκπεραιωμένο"),l.newColumn("CreationDateString").withTitle("Ημ. Αιτήματος"),l.newColumn("RequestedBy").withTitle("Αιτήθηκε από "),l.newColumn("Answer").withTitle("Απάντηση αιτήματος"),l.newColumn(null).withTitle("Ενέργειες").notSortable().renderWith(d).withClass("text-center dataTables_Actions_150")];b=function(){n.search.IntendancyId=u.isValueInArray(u.getRoleCode(n.authentication.role),"d1, d2,p ")?n.authentication.regionAndUnitId:"";u.getByParams(n.search,"/api/ChangeDataRequest/getChangeDataHistoryByPersonId").then(function(t){n.dtOptions.data=t},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})};u.isValueInArray(u.getRoleCode(n.authentication.role),"u1, u2, d1, d2, p")&&!u.isEmptyValue(y)?(n.search.personId=y,n.showResults=!0,n.casePath=1,n.search.IsCompleted=null,n.dtOptions=c.fromFnPromise(b()).withPaginationType("full_numbers").withOption("order",[2,"desc"]).withOption("createdRow",w).withOption("scrollX","100%").withDOM("Blfrtip").withDataProp("data").withButtons([{extend:"excelHtml5",fileName:"CustomFileName.xlsx",exportOptions:{columns:":visible"},exportData:{decodeEntities:!0}}])):(u.isValueInArray(u.getRoleCode(n.authentication.role),"a, m1, m2, s")||u.isValueInArray(u.getRoleCode(n.authentication.role),"d1, d2,p")&&u.isEmptyValue(y))&&(n.casePath=2,u.isEmpty(n.changeDataList)&&(u.isValueInArray(u.getRoleCode(n.authentication.role),"a, m1, m2, s")?u.getByAll("/api/ChangeDataRequest/getChangeDataRequestListAllForHistory").then(function(t){n.changeDataList=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Υπήρξε πρόβλημα κατά την φόρτωση της λίστας με τις επιλογές αλλαγών")}):u.getByAll("/api/ChangeDataRequest/getChangeDataRequestListAllActive").then(function(t){n.changeDataList=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Υπήρξε πρόβλημα κατά την φόρτωση της λίστας με τις επιλογές αλλαγών")})));n.fillFields=function(t,i){n.messages={completed:"",percentage:"0",error:""};n.uploadedFileDetails="";n.SendDataForCVDto={Id:"",PersonChangeDataRequestId:"",PersonId:""};n.SendDataForCVFullDto={Id:"",PersonChangeDataRequestId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""};n.SendDataForCVDto.PersonId=t.PersonId;n.SendDataForCVFullDto.PersonId=t.PersonId;n.PreviousIsCompleted=t.IsCompleted;n.PreviousAnswer=t.Answer;n.changeDataRequest.myIndex=i;n.changeDataRequest.ChangeDataRequestItem.selected=f("filter")(n.changeDataList,{Id:t.ChangeDataRequestId},!0)[0];n.changeDataRequest.Description=t.Description;n.changeDataRequest.PedagCompetency.selected=u.isEmptyValue(t.PedagogicalCompetencyId)?"":f("filter")(n.consts.PedagogicalCompetency,{Id:t.PedagogicalCompetencyId},!0)[0];n.changeDataRequest.Documents=t.Documents;n.changeDataRequest.RequestedBy=t.RequestedBy;n.changeDataRequest.Answer=t.Answer;n.changeDataRequest.IsNew=t.IsNew;n.Answer=t.Answer;n.changeDataRequest.CreatedBy=t.CreatedBy;n.changeDataRequest.IsCompleted=t.IsCompleted;n.changeDataRequest.CreationDate=t.CreationDate;n.changeDataRequest.CreatedUserRole=t.CreatedRegionAndUnitDescription;n.changeDataRequest.ModifiedBy=t.ModifiedBy;n.changeDataRequest.LastEditDate=t.LastEditDate;n.changeDataRequest.ModifiedUserRole=t.ModifiedUserRole;n.changeDataRequest.Id=t.Id;n.changeDataRequest.ModifiedRegionAndUnitDescription=t.ModifiedRegionAndUnitDescription;n.changeDataRequest.SendDocuments.selected=u.isEmptyValue(t.SendDocumentsById)?"":f("filter")(n.consts.sendDocumentsTypes,{Id:t.SendDocumentsById},!0)[0];n.showAnwserForIntendancy=u.isValueInArray(u.getRoleCode(n.authentication.role),"d1, d2,p")&&(t.IntendancyId==n.authentication.regionAndUnitId||t.PersonIntendancyId==n.authentication.regionAndUnitId)?!0:!1;n.changeDataRequest.ChangeDataRequestItem.selected.Id==4?(n.VisibleFields={PedagCompetency:!0,Documents:!1},n.changeDataRequest.Documents=null):(n.VisibleFields={PedagCompetency:!1,Documents:!0},u.isEmpty(n.consts.sendDocumentsTypes)?(n.VisibleFields.SendDocuments=!1,n.changeDataRequest.SendDocuments={selected:""}):n.changeDataRequest.ChangeDataRequestItem.selected.Id==8||n.changeDataRequest.ChangeDataRequestItem.selected.Id==9?(n.VisibleFields.SendDocuments=!1,n.changeDataRequest.SendDocuments={selected:""}):n.VisibleFields.SendDocuments=!0,n.changeDataRequest.PedagCompetency={selected:""});n.showUploadFile=u.isValueInArray(u.getRoleCode(n.authentication.role),"u1, u2")?!1:!0;n.DisableFieldset=(!u.isValueInArray(u.getRoleCode(n.authentication.role),"s, u1, u2, d1, d2, m1, m2, p")||n.pageRules.changeDataRequest.CanUpdate)&&n.changeDataRequest.IsNew?!1:!0;n.SendDataForCVDto.PersonChangeDataRequestId=n.changeDataRequest.Id;u.getByParams({PersonChangeDataRequestId:n.SendDataForCVDto.PersonChangeDataRequestId},"/api/ChangeDataRequest/GetDetailsForFile").then(function(t){t!=null?(n.SendDataForCVFullDto=t,n.SendDataForCVDto.Id=t.Id,n.ShowDownloadField=!0,n.uploadedFileDetails="Έχετε μεταφορτώσει το αρχείο: "+n.SendDataForCVFullDto.FileName):n.ShowDownloadField=!1},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης επισυναπτόμενου Βιογραφικού")})};n.goToEditPerson=function(n){t.setPersonId(n.PersonId);i.go("stateEditPerson")};n.openActionsModal=function(t,i){if(u.isEmpty(n.consts.sendDocumentsTypes)){var r=s.all([u.getByAll("/api/ChangeDataRequest/getChangeDataRequestListAll"),u.getByAll("/api/ChangeDataRequest/sendDocumentsTypes"),u.getByAll("/api/Person/getPedagogicalCompetency")]);r.then(function(r){n.changeDataList=r[0];n.consts.sendDocumentsTypes=r[1];n.consts.PedagogicalCompetency=r[2];n.fillFields(t,i)})}else n.fillFields(t,i)};n.checkValidTaxNumber=function(){var u,i,r,t;if(n.TaxNumberValidation=!1,n.search.TaxNumber!=="000000000"&&n.search.TaxNumber.match(/^\d{9}$/)){for(i=1,r=0,t=7;t>=0;t--)i*=2,r+=n.search.TaxNumber.charAt(t)*i;u=r%11%10==n.search.TaxNumber.charAt(8);n.TaxNumberValidation=u?!1:!0}else n.TaxNumberValidation=!0};n.searchAction=function(){k=0;u.isEmptyValue(n.search.TaxNumber)&&u.isEmptyValue(n.ChangeDataRequestItem.Item.selected)&&!u.isValueInArray(u.getRoleCode(n.authentication.role),"d1, d2")?r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρακαλώ συμπληρώστε ένα από τα φίλτρα αναζήτησης"):(u.isEmptyValue(n.search.TaxNumber)||n.checkValidTaxNumber(),n.search.ChangeDataRequestId=n.ChangeDataRequestItem.Item.selected.Id,n.TaxNumberValidation||(n.dtOptions=c.fromFnPromise(b()).withPaginationType("full_numbers").withOption("order",[2,"desc"]).withOption("createdRow",w).withOption("scrollX","100%").withDOM("Blfrtip").withDataProp("data").withButtons([{extend:"excelHtml5",fileName:"CustomFileName.xlsx",exportOptions:{columns:":visible"},exportData:{decodeEntities:!0}}])),n.showResults=!0)};n.cancel=function(){n.Answer="";n.changeDataRequest={};n.changeDataRequest.ChangeDataRequestItem={selected:""};n.changeDataRequest.SendDocuments={selected:""};n.changeDataRequest.PedagCompetency={selected:""}};n.SaveChangeDataRequest=function(t){blockUI({target:"#divBlockUI",animate:!0});a(function(){var i=g();i.ModifiedBy=n.authentication.userName;i.ModifiedUserRole=n.authentication.role;i.ModifiedRegionAndUnitDescription=n.authentication.unitName;n.PreviousIsCompleted==i.IsCompleted&&n.PreviousAnswer==i.Answer&&($("#editPersonModal").modal("hide"),n.cancel(),unblockUI("#divBlockUI"));u.postByParams(i,"/api/ChangeDataRequest/save").then(function(){i.IsCompleted!=n.PreviousIsCompleted?n.dtOptions.data.splice(t,1):n.dtOptions.data[t].Answer=i.Answer;n.dtInstance.reloadData();$("#editPersonModal").modal("hide");n.cancel()},function(n){unblockUI("#divBlockUI");r.pop("error","ΠΡΟΣΟΧΗ",n.data)})},600);a(function(){unblockUI("#divBlockUI")},600)};n.clearButtons=function(){n.search={personId:"",TaxNumber:"",ChangeDataRequestId:""};n.ChangeDataRequestItem={};n.ChangeDataRequestItem.Item={selected:""};n.dtOptions.data=[];n.dtInstance.changeData(n.dtOptions.data)};n.onFileSelect=function(t){var r,i;for(n.messages={completed:"",percentage:"0",error:""},n.showAlertForUpload=!1,r=0;r<t.length;r++){if(i=t[r],i.type!="application/pdf"){n.messages.error='Μη έγκυρη επέκταση αρχείου "'+i.name+'". Οι επεκτάσεις που υποστηρίζονται είναι: "<b> pdf<\/b>" .';return}if(i.size>=6291456){n.messages.error='Το αρχείο "'+i.name+'" (<b>'+Math.round(i.size/1024)+" KB<\/b>) υπερβαίνει το μέγιστο επιτρεπόμενο μέγεθος μεταφόρτωσης <b>6000 KB<\/b>.";return}(function(t){n.upload[t]=v.upload({url:"/api/files/uploadChangeDataRequest",method:"POST",data:{SendDataForCVDto:n.SendDataForCVDto},file:i}).progress(function(t){n.messages.percentage=parseInt(100*t.loaded/t.total)}).then(function(t){n.messages.completed="Το αρχείο <b>"+i.name+"<\/b> μεταφορτώθηκε με επιτυχία.";n.SendDataForCVDto.Id=t.data.personChangeDataRequestFile.Id;n.SendDataForCVFullDto=t.data.personChangeDataRequestFile;n.uploadedFileDetails="";n.ShowDownloadFile=!0}).catch(function(t){n.messages.error=t.Message})})(r)}};n.abortUpload=function(t){n.upload[t].abort()};n.downloadFile=function(){u.getByParamsDownload({PersonId:n.SendDataForCVFullDto.PersonId,Path:n.SendDataForCVFullDto.DirectPdfLink,ContentType:n.SendDataForCVFullDto.ContentType},"api/files/downloadFolder").then(function(t){var y=t.status,s=t.headers,h=t.data,v="application/octet-stream",r=!1,f,c,l,e,u,a,i,o;s=s();f=n.SendDataForCVFullDto.FileName||"download.pdf";c=s["content-type"]||v;try{if(i=new Blob([h],{type:c}),navigator.msSaveBlob)navigator.msSaveBlob(i,f);else{if(l=navigator.webkitSaveBlob||navigator.mozSaveBlob||navigator.saveBlob,l===undefined)throw"Not supported";l(i,f)}r=!0}catch(p){}if(!r&&(e=window.URL||window.webkitURL||window.mozURL||window.msURL,e)){if(u=document.createElement("a"),"download"in u)try{i=new Blob([h],{type:c});o=e.createObjectURL(i);u.setAttribute("href",o);u.setAttribute("download",f);a=document.createEvent("MouseEvents");a.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null);u.dispatchEvent(a);r=!0}catch(p){}if(!r)try{i=new Blob([h],{type:v});o=e.createObjectURL(i);window.location=o;r=!0}catch(p){}}r||window.open(httpPath,"_blank","")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση του αρχείου")})}};ShowChangeDataRequestController.$inject=["$scope","PassParameters","$state","toaster","GeneralFactory","$filter","$uibModal","$log","$q","$compile","DTOptionsBuilder","DTColumnBuilder","$timeout","$upload"];showTotalPointsController=function(n,t,i,r,u,f,e,o,s,h){var l,c;n.pageRules={};n.totalPoints={};n.personMessage={};n.showMessages=!1;blockUI({target:"#divBlockUI",animate:!0});n.authentication.isAuth?(l="folder,specSmea,specSmeaEEPEBP,spec,specEEPEBP,changeDataRequest",u.getByParams({role:n.authentication.role,codes:l},"/api/Subsystem/NewCheckPermission").then(function(t){var i=l.split(",");for(var r in i)n.pageRules[i[r]]=f("filter")(t,{Code:i[r]},!0)[0].Rules},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")}),c=t.getPersonId(),u.isValueInArray(u.getRoleCode(n.authentication.role),"u1, u2")&&(c=n.authentication.personId),u.getByParams({personId:c},"/api/Person/getPersonSpecialitiesDetails").then(function(t){n.personMessage=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την εμφάνιση των μηνυμάτων του φακέλου σας.")}),u.getByAll("api/LandingPage/getCurrentDidacticYear").then(function(t){n.didacticYear=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Υπήρξε πρόβλημα κατά την φόρτωση του διδακτικού έτους")}),u.getByParams({personId:c},"/api/PreviousExperience/getTotalPoints").then(function(t){n.totalPoints=t;n.showNoPointsMessage=n.totalPoints.PointsPerYear.length>0?!1:!0;n.showNoPointsSMEAMessage=n.totalPoints.PointsPerYearSmea.length>0?!1:!0;n.showNoPointsAsepMessage=n.totalPoints.AsepPoints.length>0?!1:!0;n.showMessages=!0;unblockUI("#divBlockUI")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των Κλάδων");unblockUI("#divBlockUI")})):i.go("/");n.previousExperienceCertificate=function(){blockUI({target:"#pointsloading",animate:!0});h(function(){u.getByParams({personId:c,regionAndUnitId:0,role:n.authentication.role},"/api/Pdf/getPreviousExperienceCertificate").then(function(n){var i=new Date,t={},u;t=n;u=t;pdfMake.createPdf(t).download("export_"+Date.parse(i)+".pdf");unblockUI("#pointsloading");r.pop("success","Εξαγωγή σε PDF","Το αρχείο export_"+Date.parse(i)+".pdf δημιουργήθηκε με επιτυχία.")},function(){unblockUI("#pointsloading");r.pop("error","Παρουσιάστηκε σφάλμα","Η αίτηση δεν μπορεί να εκτυπωθεί.")})},1e3)}};showTotalPointsController.$inject=["$scope","PassParameters","$state","toaster","GeneralFactory","$filter","$uibModal","$log","$q","$timeout"];ShowTrackChanges=function(n,t,i,r,u,f,e,o,s,h){var c,l;n.authentication.isAuth||r.go("/");u.isValueInArray(u.getRoleCode(n.authentication.role),"u1, u2")&&r.go("/");n.showTrackTypes=!1;n.trackType=[{TrackName:"Προσωπικός Φάκελος",Id:1},{TrackName:"Κλάδοι",Id:6},{TrackName:"Μουσικές Ειδικεύσεις",Id:5},{TrackName:"Μεταπτυχιακοί Τίτλοι",Id:3},{TrackName:"Στοιχεία Τέκνων",Id:29},{TrackName:"Ξένες Γλώσσες",Id:30},{TrackName:"Γνώση χειρισμού Η/Υ",Id:31},{TrackName:"Σεμινάρια - Επιμορφώσεις",Id:32},{TrackName:"Τίτλοι Σπουδών",Id:36}];n.resultsCreate=[];n.results=[];c=t.getTrackId();n.trackTypeId=t.getTrackTypeId();l=t.getPersonId();n.trackTypeId==1&&(n.showTrackTypes=!0);n.type=u.trackTypesFromIds(n.trackTypeId);n.filterRow={visible:!0,applyFilter:"auto"};n.headerFilter={visible:!0};n.showColumnLines=!0;n.showRowLines=!0;n.showBorders=!0;n.rowAlternationEnabled=!0;n.gridCreateOptions={bindingOptions:{dataSource:"resultsCreate",showColumnLines:"showColumnLines",showRowLines:"showRowLines",showBorders:"showBorders",rowAlternationEnabled:"rowAlternationEnabled",columns:"columnsCreate"}};n.gridOptions={bindingOptions:{dataSource:"results",filterRow:"filterRow",headerFilter:"headerFilter",showColumnLines:"showColumnLines",showRowLines:"showRowLines",showBorders:"showBorders",rowAlternationEnabled:"rowAlternationEnabled",columns:"columns"},allowColumnReordering:!0,allowColumnResizing:!0,columnAutoWidth:!0,columnFixing:{enabled:!0},searchPanel:{visible:!0,width:240,placeholder:"Αναζήτηση..."},selection:{mode:"multiple"},columnChooser:{enabled:!0},"export":{enabled:!0,fileName:"Results",allowExportSelectedData:!0},groupPanel:{visible:!0},paging:{pageSize:10},pager:{showPageSizeSelector:!0,allowedPageSizes:[10,20,50,100],showInfo:!0}};u.getByParams({trackId:c,trackTypeId:n.trackTypeId,personId:l},"/api/General/getCreatedInformation").then(function(t){n.resultsCreate=t;n.columnsCreate=[{dataField:"CreationDate",caption:"Ημερομηνία Εισαγωγής",dataType:"date",format:"dd/MM/yyyy hh:mm:ss"},{dataField:"CreatedBy",caption:"Χρήστης Εισαγωγής"}];n.trackTypeId!=1&&(n.columnsCreate.push({dataField:"CreatedUserRole",caption:"Ρόλος Χρήστης Εισαγωγής"}),n.columnsCreate.push({dataField:"CreatedRegionAndUitDescription",caption:"Όνομα Χρήστη Εισαγωγής"}))},function(){h.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση του ιστορικού των αλλαγών")});u.getByParams({trackId:c,trackTypeId:n.trackTypeId,personId:l},"/api/General/getTrackChanges").then(function(t){n.results=t;n.columns=[{dataField:"PreviousLastEditDate",caption:"Ημερομηνία",dataType:"date",format:"dd/MM/yyyy hh:mm:ss"},{dataField:"PreviousModifiedBy",caption:"Χρήστης"},{dataField:"Status",caption:"Κατάσταση"},{dataField:"AttributeName",caption:"Πεδίο",width:200},{dataField:"AttributeValueOld",caption:"Από",width:200},{dataField:"AttributeValueNew",caption:"Σε",width:200},{dataField:"UserRole",caption:"Ρόλος Χρήστη"},{dataField:"RegionAndUnitDescription",caption:"Θέση εκτός σχολικών μονάδων"}]},function(){h.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση του ιστορικού των αλλαγών")});n.getTrackChanges=function(){if(n.showTrackTypes){n.results=[];n.resultsCreate=[];var t=s.all([u.getByParams({trackId:c,trackTypeId:n.trackTypeId,personId:l},"/api/General/getTrackChanges"),u.getByParams({trackId:c,trackTypeId:n.trackTypeId,personId:l},"/api/General/getCreatedInformation")]);t.then(function(t){n.results=t[0];n.resultsCreate=t[1];n.columns=[{dataField:"PreviousLastEditDate",caption:"Ημερομηνία",dataType:"date",format:"dd/MM/yyyy hh:mm:ss"},{dataField:"PreviousModifiedBy",caption:"Χρήστης"},{dataField:"Status",caption:"Κατάσταση"},{dataField:"AttributeName",caption:"Πεδίο",width:200},{dataField:"AttributeValueOld",caption:"Από",width:200},{dataField:"AttributeValueNew",caption:"Σε",width:200},{dataField:"UserRole",caption:"Ρόλος Χρήστη"},{dataField:"RegionAndUnitDescription",caption:"Θέση εκτός σχολικών μονάδων"}];n.columnsCreate=[{dataField:"CreationDate",caption:"Ημερομηνία Εισαγωγής",dataType:"date",format:"dd/MM/yyyy hh:mm:ss"},{dataField:"CreatedBy",caption:"Χρήστης Εισαγωγής"}];n.trackTypeId!=1&&(n.columnsCreate.push({dataField:"CreatedUserRole",caption:"Ρόλος Χρήστης Εισαγωγής"}),n.columnsCreate.push({dataField:"CreatedRegionAndUitDescription",caption:"Όνομα Χρήστη Εισαγωγής"}));n.trackTypeId==6?(n.columns.push({dataField:"TrackItem",caption:"Κλάδος"}),n.columnsCreate.push({dataField:"TrackItem",caption:"Κλάδος"})):n.trackTypeId==3?(n.columns.push({dataField:"TrackItem",caption:"Προσόν"}),n.columnsCreate.push({dataField:"TrackItem",caption:"Προσόν"})):n.trackTypeId==5?n.columns.push({dataField:"TrackItem",caption:"Μουσικές Ειδικεύσεις"}):n.trackTypeId==32?(n.columns.push({dataField:"TrackItem",caption:"Σεμινάριο-Επιμόρφωση"}),n.columnsCreate.push({dataField:"TrackItem",caption:"Σεμινάριο-Επιμόρφωση"})):n.trackTypeId==30?(n.columns.push({dataField:"TrackItem",caption:"Ξένη Γλώσσα"}),n.columnsCreate.push({dataField:"TrackItem",caption:"Ξένη Γλώσσα"})):n.trackTypeId==36&&(n.columns.push({dataField:"TrackItem",caption:"Πτυχίο"}),n.columnsCreate.push({dataField:"TrackItem",caption:"Πτυχίο"}))},function(){h.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση του ιστορικού των αλλαγών")})}else h.pop("warning","Δεν υπάρχουν δεδομένα προς εμφάνιση","Δεν υπάρχουν δεδομένα προς εμφάνιση")}};ShowTrackChanges.$inject=["$scope","PassParameters","$compile","$state","GeneralFactory","RouteFactory","DTOptionsBuilder","DTColumnBuilder","$q","toaster","$rootScope","$filter"];ShowUncheckedDocuments=function(n,t,i,r,u,f,e,o,s,h,c){function a(t){i(angular.element(t).contents())(n)}function y(){return stringButtons='<button type="button" class="btn btn-primary btn-xs" uib-tooltip="Τροποποίηση αίτησης" "><i class="fa fa-pencil"><\/i><\/button>'}var v,l;n.paramsForDataTable={};n.authentication.isAuth||r.go("/");u.isValueInArray(u.getRoleCode(n.authentication.role),"u1, u2")&&r.go("/");n.ApplicationType={};n.RegionAndUnitList={};n.showRegionAndUnitList=!1;n.dtInstance={};n.search={applicationTypeId:"",regionAndUnitId:""};n.confAction;u.isValueInArray(u.getRoleCode(n.authentication.role),"a, m1, m2")?u.getByAll("/api/RegionAndUnit/getMunicipalitiesAndIntendancies").then(function(t){n.RegionAndUnitList=t;n.showRegionAndUnitList=!0},function(){h.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των τύπων αίτησης")}):(n.showRegionAndUnitList=!1,n.search.regionAndUnitId=n.authentication.regionAndUnitId);u.getByAll("/api/ApplicationType/getApplicationType").then(function(t){n.ApplicationType=t},function(){h.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των τύπων αίτησης")});n.dtOptions=e.newOptions().withPaginationType("full_numbers").withOption("order",[2,"desc"]).withOption("createdRow",a);n.dtColumns=[o.newColumn("Id").withTitle("Id").notVisible(),o.newColumn("RegistryNo").withTitle("Α.Μ."),o.newColumn("TaxNumber").withTitle("Α.Φ.Μ."),o.newColumn("Lastname").withTitle("Επώνυμο"),o.newColumn("Firstname").withTitle("Όνομα"),o.newColumn("FatherFirstname").withTitle("Πατρώνυμο"),o.newColumn(null).withTitle("Ενέργειες").notSortable().renderWith(y).withClass("text-center")];v=0;l=function(){u.getByParams(n.search,"/api/General/getPersonWithUncheckedDocuments").then(function(t){n.dtOptions.data=t},function(n){h.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.searchAction=function(){c.SearchFilters.ShowUncheckedDocuments={regionAndUnitId:n.search.regionAndUnitId,applicationTypeId:n.search.applicationTypeId,dtInstance:n.dtInstance};n.dtInstance.changeData(l())};n.openModal=function(t){n.confAction=t};c.SearchFilters!=null&&c.SearchFilters!=""&&c.SearchFilters!="undefined"?c.SearchFilters.ShowUncheckedDocuments!=null&&c.SearchFilters.ShowUncheckedDocuments!=""&&c.SearchFilters.ShowUncheckedDocuments!="undefined"?c.SearchFilters.ShowUncheckedDocuments.regionAndUnitId!=""&&c.SearchFilters.ShowUncheckedDocuments.applicationTypeId!=""&&(n.search={regionAndUnitId:c.SearchFilters.ShowUncheckedDocuments.regionAndUnitId,applicationTypeId:c.SearchFilters.ShowUncheckedDocuments.applicationTypeId},n.dtInstance=c.SearchFilters.ShowUncheckedDocuments.dtInstance,n.dtInstance.changeData(l())):c.SearchFilters.ShowUncheckedDocuments={}:c.SearchFilters={}};ShowUncheckedDocuments.$inject=["$scope","PassParameters","$compile","$state","GeneralFactory","RouteFactory","DTOptionsBuilder","DTColumnBuilder","$q","toaster","$rootScope"];SignupController=function(n,t,i,r){n.savedSuccessfully=!1;n.message="";n.registration={userName:"",password:"",confirmPassword:""};n.signUp=function(){r.saveRegistration(n.registration).then(function(){n.savedSuccessfully=!0;n.message="User has been registered successfully, you will be redicted to login page in 2 seconds.";u()},function(t){var u=[],r,i;for(r in t.data.modelState)for(i=0;i<t.data.modelState[r].length;i++)u.push(t.data.modelState[r][i]);n.message="Failed to register user due to:"+u.join(" ")})};var u=function(){var n=i(function(){i.cancel(n);t.path("/login")},2e3)}};SignupController.$inject=["$scope","$location","$timeout","AuthService"];SocialCriteriaController=function(n,t,i,r,u,f,e,o,s){function c(){!n.pageRules.folder.CanUpdate||u.isValueInArray(u.getRoleCode(n.authentication.role),"u1, u2")?($("#DisabilityRate :input").prop("disabled",!0),$("#MateDisabilityRate :input").prop("disabled",!0),$("#ChildDisabilityRate :input").prop("disabled",!0),$("#DisabilityRate").parent().find(".input-group-btn button").prop("disabled",!0),$("#MateDisabilityRate").parent().find(".input-group-btn button").prop("disabled",!0),$("#ChildDisabilityRate").parent().find(".input-group-btn button").prop("disabled",!0)):($("#DisabilityRate :input").prop("disabled",!1),$("#MateDisabilityRate :input").prop("disabled",!1),$("#ChildDisabilityRate :input").prop("disabled",!1),$("#DisabilityRate").parent().find(".input-group-btn button").prop("disabled",!1),$("#MateDisabilityRate").parent().find(".input-group-btn button").prop("disabled",!1),$("#ChildDisabilityRate").parent().find(".input-group-btn button").prop("disabled",!1))}if(n.person={},n.person.Id="",n.children=[],n.child={},n.child.DisabilityRate=0,n.pageRules={},n.showMessages=!1,n.geographicMunicipalitiesList=[],n.FamilyStatusType=[],n.ChildStatusTypes=[],n.ShowFields={Disability:!1,DisabilityDetails:!1,DisabilityMessage:!1,MateDisability:!1,MateDisabilityDetails:!1,MateDisabilityMessage:!1,Child:!1,ChildDisabilityDetails:!1,ChildStatus:!1,ChildMateDisabilityMessage:!1,FamilyStatusMessage:!1,ValidationMessage:!1,MateValidationMessage:!1,ChildValidationMessage:!1},n.SaveDisabledChild=!1,n.SaveDisabled=!1,n.geographicMunicipalities={selected:""},n.disabilityMessage="Το πεδίο πρέπει να έχει τιμή 0 ή μεταξύ 50-100.",n.IsDisabled=!1,n.DisabledOpenModalForView=!1,n.FamilyStatusMessage="Δεν μπορείτε να καταχωρίσετε τέκνο αν δεν έχετε καταχωρίσει πρώτα οικογενειακή κατάσταση",n.disableDideForViewForPermanent=!1,n.authentication.isAuth){var h="folder,specSmea,specSmeaEEPEBP,spec,specEEPEBP,changeDataRequest";u.getByParams({role:n.authentication.role,codes:h},"/api/Subsystem/NewCheckPermission").then(function(i){var r=h.split(","),o,s;for(o in r)n.pageRules[r[o]]=f("filter")(i,{Code:r[o]},!0)[0].Rules;c();(!n.pageRules.folder.CanUpdate||u.isValueInArray(u.getRoleCode(n.authentication.role),"u1, u2, d1, d2, p"))&&(n.IsDisabled=!0);n.pageRules.folder.CanView||(n.DisabledOpenModalForView=!0);n.person.Id=t.getPersonId();u.isValueInArray(u.getRoleCode(n.authentication.role),"u1, u2")&&(n.person.Id=n.authentication.personId);s=e.all([u.getByAll("/api/General/getGeographicKalMunicipalities"),u.getByParams({personId:n.person.Id},"/api/Person/getPersonSpecialitiesDetails"),u.getByAll("/api/Person/maritalStatusTypes"),u.getByAll("/api/Person/childStatusTypes"),u.getByParams({personId:n.person.Id},"/api/PersonChild/getPersonChildren"),u.getByParams({personId:n.person.Id},"/api/Person/GetPersonSocialCriteria"),u.getByParams({personId:n.person.Id,role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId},"/api/Person/checkPermanentViewFromOfficialDide")]);s.then(function(t){n.geographicMunicipalitiesList=t[0];n.personMessage=t[1];n.FamilyStatusType=t[2];n.showMessages=!0;n.ChildStatusTypes=t[3];n.children=t[4];n.person=t[5];n.personOriginal=angular.copy(t[5]);n.disableDideForViewForPermanent=t[6];n.changeFamilyStatus();n.changeMateDisabilityRate();n.changeDisabilityRate();n.geographicMunicipalities.selected=f("filter")(n.geographicMunicipalitiesList,{KalMunicipalityId:n.person.KalMunicipalityId},!0)[0]})},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else i.go("/");n.changeFamilyStatus=function(){n.person.FamilyStatus==1||n.person.FamilyStatus==6?n.ShowFields.MateDisability=!0:(n.ShowFields.MateDisability=!1,n.ShowFields.MateDisabilityDetails=!1,n.person.MateDisabilityRate=0,n.person.IsMateDisabilityRateConfirmed=0,n.person.KEPANumberMate=null,n.person.SanitaryNumberMate=null,n.person.KEPAEndDateMate=null,n.person.WeddingDate=null);n.ShowFields.Child=u.isEmptyValue(n.person.FamilyStatus)?!1:!0};n.changeMateDisabilityRate=function(){n.person.MateDisabilityRate>0?n.person.MateDisabilityRate.toString().match(/^(0|[5-9][0-9]|100)$/)?(n.ShowFields.MateDisabilityMessage=!1,n.ShowFields.MateDisabilityDetails=!0):(n.ShowFields.MateDisabilityMessage=!0,n.ShowFields.MateDisabilityDetails=!1):(n.ShowFields.MateDisabilityDetails=!1,n.person.KEPANumberMate=null,n.person.SanitaryNumberMate=null,n.person.KEPAEndDateMate=null,n.person.WeddingDate=null)};n.changeChildDisabilityRate=function(){n.child.DisabilityRate>0?n.child.DisabilityRate.toString().match(/^(0|[5-9][0-9]|100)$/)?(n.ShowFields.ChildDisabilityMessage=!1,n.ShowFields.ChildDisabilityDetails=!0):(n.ShowFields.ChildDisabilityMessage=!0,n.ShowFields.ChildDisabilityDetails=!1):(n.ShowFields.ChildDisabilityDetails=!1,n.child.KEPANumber=null,n.child.SanitaryNumber=null,n.child.KEPAEndDate=null)};n.changeDisabilityRate=function(){n.person.DisabilityRate>0?n.person.DisabilityRate.toString().match(/^(0|[5-9][0-9]|100)$/)?(n.ShowFields.DisabilityMessage=!1,n.ShowFields.DisabilityDetails=!0):(n.ShowFields.DisabilityMessage=!0,n.ShowFields.DisabilityDetails=!1):(n.ShowFields.DisabilityDetails=!1,n.person.KEPANumber=null,n.person.SanitaryNumber=null,n.person.KEPAEndDate=null,n.person.MentalIllness=!1)};n.changeBirthDate=function(){n.ShowFields.ChildStatus=!1;u.isEmptyValue(n.child.BirthDate)||u.getByParams({BirthDate:n.child.BirthDate},"/api/PersonChild/checkBirthDate").then(function(t){n.ShowFields.ChildStatus=t;n.ShowFields.ChildStatus||(n.child.ChildStatus="")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης τέκνων",3e3,"trustedHtml")})};n.fillFormControls=function(){n.ModalTitle="Προσθήκη Τέκνου";n.child={};n.child.PersonId=n.person.Id;n.child.DisabilityRate=0;n.ShowFields.ChildDisabilityMessage=!1;n.changeChildDisabilityRate();n.ShowFields.FamilyStatusMessage=!1};n.cancelChild=function(){n.child={};$("#editChildForm").validate().resetForm()};n.openChildModal=function(t){blockUI({target:"#tblChild",animate:!0});angular.copy(t,n.child);n.changeChildDisabilityRate();n.changeBirthDate();n.SaveDisabledChild=!1;n.ModalTitle="Επεξεργασία Tέκνου";s(function(){unblockUI("#tblChild");$("#AddChildModal").modal("show")},300)};n.checkKEPAFields=function(t){t=="personal"?n.ShowFields.ValidationMessage=n.ShowFields.DisabilityDetails&&u.isEmptyValue(n.person.KEPANumber)&&u.isEmptyValue(n.person.SanitaryNumber)&&u.isEmptyValue(n.person.OtherNumber)?!0:!1:t=="mate"?n.ShowFields.MateValidationMessage=n.ShowFields.MateDisabilityDetails&&u.isEmptyValue(n.person.KEPANumberMate)&&u.isEmptyValue(n.person.SanitaryNumberMate)&&u.isEmptyValue(n.person.OtherNumberMate)?!0:!1:(n.ShowFields.ValidationMessage=!1,n.ShowFields.MateValidationMessage=!1)};n.checkKEPAFieldsChild=function(){n.ShowFields.ChildValidationMessage=n.ShowFields.ChildDisabilityDetails&&u.isEmptyValue(n.child.KEPANumber)&&u.isEmptyValue(n.child.SanitaryNumber)&&u.isEmptyValue(n.child.OtherNumber)?!0:!1};n.saveAction=function(t,i){n.checkKEPAFields(i);!$("#socialCriteria").valid()||n.ShowFields.MateDisabilityMessage||n.ShowFields.DisabilityMessage||n.ShowFields.ValidationMessage||n.ShowFields.MateValidationMessage||(n.SaveDisabled=!0,t=="Confirm"&&i=="personal"?n.person.IsInfirmityConfirmed=n.person.DisabilityRate>0?!0:!1:t=="Confirm"&&i=="mate"?n.person.IsMateDisabilityRateConfirmed=n.person.MateDisabilityRate>0?!0:!1:t=="UnConfirm"&&i=="personal"?n.person.IsInfirmityConfirmed=!1:t=="UnConfirm"&&i=="mate"&&(n.person.IsMateDisabilityRateConfirmed=!1),n.person.personalOrMate=i,u.isEmptyValue(n.person.Id)||(n.person.ModifiedBy=n.authentication.userName,n.person.UserRole=n.authentication.role,n.person.RegionAndUnitDescription=n.authentication.unitName,n.person.KalMunicipalityId=u.isEmptyValue(n.geographicMunicipalities.selected)?null:n.geographicMunicipalities.selected.KalMunicipalityId,u.postByParams(n.person,"/api/Person/UpdateSocialCriteria").then(function(){n.SaveDisabled=!1},function(t){r.pop("error","ΠΡΟΣΟΧΗ",t.data);n.SaveDisabled=!1})))};n.saveChild=function(t,i){n.ShowFields.FamilyStatusMessage=n.person.FamilyStatus>0?!1:!0;n.checkKEPAFieldsChild();!$("#editChildForm").valid()||n.ShowFields.ChildDisabilityMessage||n.ShowFields.FamilyStatusMessage||n.ShowFields.ChildValidationMessage||(n.SaveDisabledChild=!0,i=="Confirm"?t.IsChildConfirmed=!0:i=="UnConfirm"&&(t.IsChildConfirmed=!1),u.isEmptyValue(t.Id)?(t.CreatedBy=n.authentication.userName,t.CreatedUserRole=n.authentication.role,t.CreatedRegionAndUnitDescription=n.authentication.unitName,u.postByParams(t,"/api/PersonChild/InsertChild").then(function(){u.getByParams({personId:n.person.Id},"/api/PersonChild/getPersonChildren").then(function(t){n.children=t;n.SaveDisabledChild=!1},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης τέκνων",3e3,"trustedHtml")});$("#AddChildModal").modal("hide");n.cancelChild()},function(t){n.SaveDisabledChild=!1;r.pop("error","ΠΡΟΣΟΧΗ",t.data)})):(t.ModifiedBy=n.authentication.userName,t.ModifiedUserRole=n.authentication.role,t.ModifiedRegionAndUnitDescription=n.authentication.unitName,u.postByParams(t,"/api/PersonChild/UpdateChild").then(function(){u.getByParams({personId:n.person.Id},"/api/PersonChild/getPersonChildren").then(function(t){n.children=t;n.SaveDisabledChild=!1},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης τέκνων",3e3,"trustedHtml")});$("#AddChildModal").modal("hide");n.cancelChild()},function(t){n.SaveDisabledChild=!1;r.pop("error","ΠΡΟΣΟΧΗ",t.data)})))};n.openDeleteChild=function(t){n.delChild=t};n.DeleteChild=function(t){var i=t;i.ModifiedBy=n.authentication.userName;i.ModifiedUserRole=n.authentication.role;i.ModifiedRegionAndUnitDescription=n.authentication.unitName;u.postByParams(i,"/api/PersonChild/DeleteChild").then(function(){u.getByParams({personId:n.person.Id},"/api/PersonChild/getPersonChildren").then(function(t){n.children=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης τέκνων",3e3,"trustedHtml")})},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.minDate="01/01/1900";n.maxDate="01/01/3000";n.formats=["dd/MM/yyyy"];n.format=n.formats[0];n.today=function(){};n.today();n.clear=function(){n.dt=null};n.toggleMin=function(){n.minDate=n.minDate?null:new Date};n.toggleMin();n.open=function(t,i){t.preventDefault();t.stopPropagation();n[i]=!0};n.dateOptions={formatYear:"yy",startingDay:1,format:"dd/mm/yyyy"}};SocialCriteriaController.$inject=["$scope","PassParameters","$state","toaster","GeneralFactory","$filter","$q","PersonFactory","$timeout"];SpecialityController=function(n,t,i,r,u,f,e,o,s){function l(t){f.getByParams({Id:t},"/api/PersonSpeciality/GetPersonSpecialitiesWithMusicByPersonId").then(function(t){n.specialities=e("filter")(t.PersonSpeciality,{IsActive:!0,IsEEPEBP:!1},!0);n.specialitiesEEPEBP=e("filter")(t.PersonSpeciality,{IsActive:!0,IsEEPEBP:!0},!0);n.specialitiesNotActive=e("filter")(t.PersonSpeciality,{IsActive:!1},!0);n.musicspecialities=t.PersonMusicSpeciality;n.exceedSpecialityLimits=n.specialities.length>=5?!0:!1;n.showMessages=!0;unblockUI("#divBlockUI")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά το φόρτωμα των καταχωρημένων κλάδων",3e3,"trustedHtml");unblockUI("#divBlockUI")})}function y(){if(dto={Id:f.isEmptyValue(n.perspeciality.Id)?"":n.perspeciality.Id,SpecialityId:n.perspeciality.Speciality1.selected.Id,SpecialityCode:n.perspeciality.Speciality1.selected.Code,PersonId:h,DiplomaDate:n.perspeciality.DiplomaDate,DiplomaAcquisitionPeriod:n.perspeciality.DiplomaAcquisitionPeriod,DiplomaDegree:n.perspeciality.DiplomaDegree,DimplomaSource:f.isEmptyValue(n.perspeciality.DimplomaSource.selected.Id)?"":n.perspeciality.DimplomaSource.selected.Id,EquivalenceType:n.perspeciality.EquivalenceType,MusicEquivalenceType:n.perspeciality.MusicEquivalenceType,InitialRegistrationDate:n.perspeciality.InitialRegistrationDate,Diploma:{Id:"",Description:"",CountryId:""},YearsOfStudy:n.perspeciality.YearsOfStudy,PD130Simulation:n.perspeciality.PD130Simulation,DateofSimulation:n.perspeciality.DateofSimulation,SimulationDegree:n.perspeciality.SimulationDegree,DateofReStudy:n.perspeciality.DateofReStudy,ReStudy:n.perspeciality.ReStudy,WorkExperience:n.perspeciality.WorkExperience,MonthExperience:n.perspeciality.MonthExperience,DayExperience:n.perspeciality.DayExperience,HasSpecialEducation:f.isEmptyValue(n.perspeciality.HasSpecialEducation)?!1:n.perspeciality.HasSpecialEducation,SpecialId:f.isEmptyValue(n.perspeciality.SpecialId)?"":n.perspeciality.SpecialId,IsConfirmed:f.isEmptyValue(n.perspeciality.IsConfirmed)?!1:n.perspeciality.IsConfirmed,HasPaedologicCompetency:f.isEmptyValue(n.perspeciality.Speciality1.selected.HasPaedologicCompetency)?!1:n.perspeciality.Speciality1.selected.HasPaedologicCompetency,CreatedBy:"",CreationDate:"",CreatedUserRole:"",CreatedRegionAndUnitDescription:"",ModifiedBy:"",LastEditDate:"",ModifiedUserRole:"",ModifiedRegionAndUnitDescription:""},f.isEmptyValue(n.perspeciality.DiplomaDegree)||(dto.DiplomaDegree=parseFloat(n.perspeciality.DiplomaDegree.toString().replace(",","."))),f.isEmptyValue(n.perspeciality.SimulationDegree)||(dto.SimulationDegree=parseFloat(n.perspeciality.SimulationDegree.toString().replace(",","."))),f.isEmptyValue(n.perspeciality.DimplomaSource.selected.Id)||n.perspeciality.DimplomaSource.selected.Id!=1)if(f.isEmptyValue(n.DiplomaAbroad.Description)){var t=e("filter")(n.diplomas,{Description:n.DiplomaAbroad},!0)[0];f.isEmptyValue(t)?dto.DiplomaId=n.DiplomaAbroad=="ATTESTATO DI PERFEZIONAMENTO ARTE DEL GRES E DELLA PORCELLANA ΤΟΥ ΚΡΑΤΙΚΟΥ ΙΝΣΤΙΤΟΥΤΟΥ ΚΕΡΑΜΙΚΗΣ G.BALARDINI"?436:"":(dto.DiplomaId=t.Id,dto.HasDiplomaPaedologicCompetency=n.DiplomaAbroad.HasDiplomaPaedologicCompetency);dto.Diploma={Id:dto.DiplomaId,Description:f.isEmptyValue(n.DiplomaAbroad)?"":n.DiplomaAbroad,CountryId:f.isEmptyValue(n.perspeciality.Country.selected.Id)?"":n.perspeciality.Country.selected.Id}}else dto.DiplomaId=n.DiplomaAbroad.Id,dto.Diploma={Id:n.DiplomaAbroad.Id,Description:n.DiplomaAbroad.Description,CountryId:f.isEmptyValue(n.perspeciality.Country.selected.Id)?"":n.perspeciality.Country.selected.Id};else dto.DiplomaId=f.isEmptyValue(n.perspeciality.Diploma.selected.Id)?"":n.perspeciality.Diploma.selected.Id,dto.Diploma={Id:dto.DiplomaId,Description:f.isEmptyValue(n.perspeciality.Diploma.selected.Description)?"":n.perspeciality.Diploma.selected.Description,CountryId:f.isEmptyValue(n.perspeciality.Country.selected.Id)?"":n.perspeciality.Country.selected.Id};return f.isEmptyValue(dto.DiplomaId)?dto.HasDiplomaPaedologicCompetency=!1:(n.FilterDiplomas=e("filter")(n.diplomas,function(n){return n.Id==dto.DiplomaId}),n.FilterDiplomas=e("filter")(n.diplomas,{Id:dto.DiplomaId},!0)[0],dto.HasDiplomaPaedologicCompetency=n.FilterDiplomas.HasDiplomaPaedologicCompetency),dto}function p(){var t;return n.perspeciality.AcademicQualification=w(),dto={Id:f.isEmptyValue(n.perspeciality.Id)?"":n.perspeciality.Id,SpecialityId:n.perspeciality.Speciality1.selected.Id,SpecialityCode:n.perspeciality.Speciality1.selected.Code,PersonId:h,DiplomaDate:n.perspeciality.DiplomaDate,DiplomaAcquisitionPeriod:n.perspeciality.DiplomaAcquisitionPeriod,DiplomaDegree:n.perspeciality.DiplomaDegree,DimplomaSource:f.isEmptyValue(n.perspeciality.DimplomaSource.selected.Id)?"":n.perspeciality.DimplomaSource.selected.Id,EquivalenceType:n.perspeciality.EquivalenceType,InitialRegistrationDate:n.perspeciality.InitialRegistrationDate,Diploma:{Id:"",Description:"",CountryId:""},WorkExperienceEEPEBP:n.perspeciality.WorkExperienceEEPEBP,YearExperienceEEPEBP:n.perspeciality.YearExperienceEEPEBP,MonthExperienceEEPEBP:n.perspeciality.MonthExperienceEEPEBP,DayExperienceEEPEBP:n.perspeciality.DayExperienceEEPEBP,IsConfirmed:f.isEmptyValue(n.perspeciality.IsConfirmed)?!1:n.perspeciality.IsConfirmed,HasPaedologicCompetency:f.isEmptyValue(n.perspeciality.Speciality1.selected.HasPaedologicCompetency)?!1:n.perspeciality.Speciality1.selected.HasPaedologicCompetency,PersonSpecialityFile:{Id:"",PersonId:"",PersonAcademicQualificationId:0,FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",ContentType:"",IsActive:!1},CreatedBy:"",CreationDate:"",CreatedUserRole:"",CreatedRegionAndUnitDescription:"",ModifiedBy:"",LastEditDate:"",ModifiedUserRole:"",ModifiedRegionAndUnitDescription:"",PersonSpecialityEEPEBPId:f.isEmptyValue(n.perspeciality.PersonSpecialityEEPEBPId)?"":n.perspeciality.PersonSpecialityEEPEBPId,ProfessionLicence:n.perspeciality.ProfessionLicence,ProfessionLicenceDate:n.perspeciality.ProfessionLicenceDate,ProfessionLicenceBodyId:n.perspeciality.ProfessionLicenceBodyId,ChildPsychiatrist:n.perspeciality.ChildPsychiatrist,ChildPsychiatristDate:n.perspeciality.ChildPsychiatristDate,MedicalAssociation:n.perspeciality.MedicalAssociation,CountrysideService:n.perspeciality.CountrysideService,Physiotherapists:n.perspeciality.Physiotherapists,AeiOrTei:n.perspeciality.AeiOrTei,De1DimplomaType:n.perspeciality.De1DimplomaType,IsAcademicQualificationRequired:n.perspeciality.IsAcademicQualificationRequired,PersonAcademicQualificationId:n.perspeciality.PersonAcademicQualificationId,CertificateDE1:n.perspeciality.CertificateDE1,CertificateDE1Date:n.perspeciality.CertificateDE1Date,MedicalAssociationNumber:n.perspeciality.MedicalAssociationNumber,MedicalAssociationDateFrom:n.perspeciality.MedicalAssociationDateFrom,MedicalAssociationDateTo:n.perspeciality.MedicalAssociationDateTo,NursesOrHealthVisitorsType:n.perspeciality.NursesOrHealthVisitorsType,NursesOrHealthVisitors:n.perspeciality.NursesOrHealthVisitors,NursesOrHealthVisitorsNumber:n.perspeciality.NursesOrHealthVisitorsNumber,NursesOrHealthVisitorsDateFrom:n.perspeciality.NursesOrHealthVisitorsDateFrom,NursesOrHealthVisitorsDateTo:n.perspeciality.NursesOrHealthVisitorsDateTo,PhysiotherapistsNumber:n.perspeciality.PhysiotherapistsNumber,PhysiotherapistsDateFrom:n.perspeciality.PhysiotherapistsDateFrom,PhysiotherapistsDateTo:n.perspeciality.PhysiotherapistsDateTo,ProfessionLicenceNumber:n.perspeciality.ProfessionLicenceNumber},f.isEmptyValue(n.perspeciality.DiplomaDegree)||(dto.DiplomaDegree=parseFloat(n.perspeciality.DiplomaDegree.toString().replace(",","."))),f.isEmptyValue(n.perspeciality.SimulationDegree)||(dto.SimulationDegree=parseFloat(n.perspeciality.SimulationDegree.toString().replace(",","."))),f.isEmptyValue(n.perspeciality.DimplomaSource.selected.Id)||n.perspeciality.DimplomaSource.selected.Id!=1?f.isEmptyValue(n.DiplomaAbroad.Description)?(t=e("filter")(n.diplomas,{Description:n.DiplomaAbroad},!0)[0],dto.DiplomaId=f.isEmptyValue(t)?"":t.Id,dto.Diploma={Id:dto.DiplomaId,Description:f.isEmptyValue(n.DiplomaAbroad)?"":n.DiplomaAbroad,CountryId:f.isEmptyValue(n.perspeciality.Country.selected.Id)?"":n.perspeciality.Country.selected.Id}):(dto.DiplomaId=n.DiplomaAbroad.Id,dto.Diploma={Id:n.DiplomaAbroad.Id,Description:n.DiplomaAbroad.Description,CountryId:f.isEmptyValue(n.perspeciality.Country.selected.Id)?"":n.perspeciality.Country.selected.Id}):v.indexOf(n.perspeciality.Speciality1.selected.Code)!=-1&&(n.perspeciality.Speciality1.selected.Code!="ΠΕ21"||n.perspeciality.IsAcademicQualificationRequired)?f.isEmptyValue(n.DiplomaAbroad.Description)?(t=e("filter")(n.diplomas,{Description:n.DiplomaAbroad},!0)[0],dto.DiplomaId=f.isEmptyValue(t)?"":t.Id,dto.Diploma={Id:dto.DiplomaId,Description:f.isEmptyValue(n.DiplomaAbroad)?"":n.DiplomaAbroad,CountryId:f.isEmptyValue(n.perspeciality.Country.selected.Id)?"":n.perspeciality.Country.selected.Id}):(dto.DiplomaId=n.DiplomaAbroad.Id,dto.Diploma={Id:n.DiplomaAbroad.Id,Description:n.DiplomaAbroad.Description,CountryId:f.isEmptyValue(n.perspeciality.Country.selected.Id)?"":n.perspeciality.Country.selected.Id}):(dto.DiplomaId=f.isEmptyValue(n.perspeciality.Diploma.selected.Id)?"":n.perspeciality.Diploma.selected.Id,dto.Diploma={Id:dto.DiplomaId,Description:f.isEmptyValue(n.perspeciality.Diploma.selected.Description)?"":n.perspeciality.Diploma.selected.Description,CountryId:f.isEmptyValue(n.perspeciality.Country.selected.Id)?"":n.perspeciality.Country.selected.Id}),n.AddAcademicQualificationRegion=!1,dto.AcademicQualification=n.perspeciality.AcademicQualification,dto.PersonSpecialityFile=n.SendDataForCVFullDto,dto}function w(){return dto={Id:f.isEmptyValue(n.peracademicqual.Id)?"":n.peracademicqual.Id,PersonId:h,AcademicQualificationId:n.peracademicqual.AcademicQualification.Id,AcademicDiplomaId:f.isEmptyValue(n.peracademicqual.AcademicDiplomaId)?"":n.peracademicqual.AcademicDiplomaId,Diploma:{Id:"",Description:"",CountryId:""},DiplomaDate:n.peracademicqual.DiplomaDate,DiplomaDegree:n.peracademicqual.DiplomaDegree,DiplomaSource:f.isEmptyValue(n.peracademicqual.DiplomaSource)?"":n.peracademicqual.DiplomaSource,EquivalenceType:n.peracademicqual.EquivalenceType,Relevancy:f.isEmptyValue(n.peracademicqual.Relevancy)?0:n.peracademicqual.Relevancy,FirstSpeciality:f.isEmptyValue(n.peracademicqual.FirstSpeciality)?"":n.peracademicqual.FirstSpeciality,RelevancySMEAE:f.isEmptyValue(n.peracademicqual.RelevancySMEAE)?!1:n.peracademicqual.RelevancySMEAE,RelevancySpeciality:f.isEmptyValue(n.peracademicqual.RelevancySpeciality)?!1:n.peracademicqual.RelevancySpeciality,RelevancySchoolPhychology:f.isEmptyValue(n.peracademicqual.RelevancySchoolPhychology)?!1:n.peracademicqual.RelevancySchoolPhychology,CountClassification:"",IsConfirmed:f.isEmptyValue(n.peracademicqual.IsConfirmed)?!1:n.peracademicqual.IsConfirmed,CreatedBy:"",CreationDate:"",CreatedUserRole:"",CreatedRegionAndUnitDescription:"",ModifiedBy:"",LastEditDate:"",ModifiedUserRole:"",ModifiedRegionAndUnitDescription:"",AcademicQualificationSpecialities:{Id:"",PersonAcademicQualificationId:"",PersonSpecialityId:""}},f.isEmptyValue(n.peracademicqual.DiplomaDegree)||(dto.DiplomaDegree=parseFloat(n.peracademicqual.DiplomaDegree.toString().replace(",","."))),f.isEmptyValue(n.peracademicqual.AcademicDiplomaId)&&!f.isEmptyValue(n.pera.DiplomaAbroadAcademic)?dto.Diploma={Id:"",Description:n.pera.DiplomaAbroadAcademic,CountryId:f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?"":n.peracademicqual.AcademicDiploma.Country.Id}:f.isEmptyValue(n.peracademicqual.AcademicDiplomaId)||f.isEmptyValue(n.pera.DiplomaAbroadAcademic)?f.isEmptyValue(n.peracademicqual.AcademicDiploma)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Id)||(dto.AcademicDiplomaId=n.peracademicqual.AcademicDiploma.Id,dto.Diploma={Id:n.peracademicqual.AcademicDiploma.Id,Description:n.peracademicqual.AcademicDiploma.Description,CountryId:f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?"":n.peracademicqual.AcademicDiploma.Country.Id}):(dto.AcademicDiplomaId=n.peracademicqual.AcademicDiplomaId,dto.Diploma={Id:n.peracademicqual.AcademicDiplomaId,Description:n.pera.DiplomaAbroadAcademic,CountryId:f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?"":n.peracademicqual.AcademicDiploma.Country.Id}),dto.PersonAcademicQualificationId=f.isEmptyValue(n.perspeciality.PersonAcademicQualificationId)?n.perspeciality.IsAcademicQualificationRequired&&f.isEmptyValue(n.perspeciality.PersonAcademicQualificationId)?0:null:n.perspeciality.PersonAcademicQualificationId,dto}var a,h,v,c;n.pageRules={};n.pageRules.spec={CanDelete:!1};n.showMessages=!1;blockUI({target:"#divBlockUI",animate:!0});n.authentication.isAuth?(a="spec,specSmea,specSmeaEEPEBP,specEEPEBP",f.getByParams({role:n.authentication.role,codes:a},"/api/Subsystem/NewCheckPermission").then(function(t){var i=a.split(",");for(var r in i)n.pageRules[i[r]]=e("filter")(t,{Code:i[r]},!0)[0].Rules},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})):i.go("/");h=t.getPersonId();f.isValueInArray(f.getRoleCode(n.authentication.role),"u1, u2")&&(h=n.authentication.personId);f.getByParams({personId:h},"/api/Person/getPersonSpecialitiesDetails").then(function(t){n.personMessage=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την εμφάνιση των μηνυμάτων του φακέλου σας.")});n.speciality=[];n.DisableOrVisibleFields={Speciality:!0,HasSpecialEducation:!1,DimplomaSource:!1,DiplomaDate:!1,DiplomaAcquisitionPeriod:!1,Country:!1,DiplomaDegree:!1,DiplomaDateAndGrade:!1,Diploma:!1,DiplomaAbroad:!1,EquivalenceType:!1,MusicEquivalenceType:!1,YearsOfStudy:!1,ReStudy:!1,PD130Simulation:!1,DateofSimulation:!1,SimulationDegree:!1,DateofReStudy:!1,WorkExperience:!1,MonthExperience:!1,DayExperience:!1,Save:!1,IsMusic:!1,InitialRegistrationDate:!1,IsAcademicQualificationRequired:!1,DisableAcademicQualificationRequired:!1,AeiOrTei:!1,NursesOrHealthVisitors:!1,De1DimplomaType:!1,De1DimplomaTypeDetails:!1,ProfessionLicence:!1,ChildPsychiatrist:!1,Physiotherapists:!1,WorkExperienceEEPEBP:!1,YearExperienceEEPEBP:!1,MonthExperienceEEPEBP:!1,DayExperienceEEPEBP:!1,PersonAcademicQualification:!1};n.SaveDisabled=!1;n.DisableFieldset=!1;n.DisableFieldsBydiploma=!1;n.ModalTitle="Προσθήκη κλάδου";n.perspeciality={};n.perspeciality.Speciality1={};n.perspeciality.DimplomaSource={};n.Countries=[];n.diplomas=[];n.perspeciality.DimplomaSource={selected:""};n.perspeciality.Speciality1={selected:""};n.perspeciality.Country={selected:""};n.perspeciality.Diploma={selected:""};n.consts={};n.Specialities=[];n.Klados={Id:"",IsChanged:!1};n.Country={Id:"",IsChanged:!1};n.AeiOrTei={Id:"",IsChanged:!1};n.AcademicQualificationRequired={Id:!1,IsChanged:!1};n.NursesOrHealthVisitorsType={Id:"",IsChanged:!1};n.DiplomaSource={Id:"",IsChanged:!1};n.DiplomaDate={Id:"",IsChanged:!1};n.exceedSpecialityLimits=!1;n.DiplomaAcquisitionPeriod=[];n.delPerSpeciality;n.SelectedSpeciality={};n.SelectedSpeciality.Diploma={Id:"",Country:{Id:""}};n.personMessage={};n.InitialRegistrationDateRequired=!1;n.AddAcademicQualificationRegion=!1;n.MusicDisableOrVisibleFields={MusicSpecialistPerSpeciality:!1,WithoutMusicSpecialistOrIsEM16:!1,DiplomaAcquisitionPeriod:!1,DiplomaTitle:!1,MusicSpecialistPerSpecialityDiploma:!1,Save:!1,AddMusicBtn:!1,Cancel:!1};n.DelMusicBtn=!1;n.permusicspeciality={};n.permusicspeciality.PersonId=h;n.MusicSpecialist=[];n.MusicDiplomas=[];n.MusicDiplomaAcquisitionPeriod=[];n.musicDiplomaDate={Id:"",IsChanged:!1};v=["ΠΕ21"];n.de01EEP=!1;n.DisableFieldsetNotActive=!1;n.specialitiesEEPEBP=[];n.specialitiesNotActive=[];n.DisableFieldsetEEPEBP=!1;n.IsAcademicQualificationRequired=!1;n.messageForAcademic=!1;n.academicQualifications=[];n.FilterAcademicQualifications=[];n.peracademicqual={};n.peracademicqual.AcademicQualification=[];n.peracademicqual.AcademicDiploma=[];n.peracademicqual.PersonId=h;n.peracademicqual.DimplomaSource={selected:""};n.peracademicqual.Country={selected:""};n.peracademicqual.Diploma={selected:""};n.DisableOrVisibleFieldsAcademic={AcademicQualification:!0,FirstSpeciality:!1,DimplomaSource:!1,Country:!1,DiplomaDate:!1,DiplomaDegree:!1,DiplomaDateAndGrade:!1,AcademicDiploma:!1,DiplomaAbroad:!1,Relevancy:!1,EquivalenceType:!1,Save:!1};n.DisableFieldsEEPEBP={EEPEBP:!1,RelevancySchoolPhychology:!1};n.AcademicQualification={Id:"",IsChanged:!1};n.CountryAcademic={Id:"",IsChanged:!1};n.DiplomaSourceAcademic={Id:"",IsChanged:!1};n.pera={DiplomaAbroadAcademic:""};n.hasAcademicSpecialityBySpecialityId=null;c=[9487,9488,9489,9490,9491,9492,9493,9494,9495];n.openRegion=null;n.showDownloadFile=!1;n.showUploadFile=!1;n.upload=[];n.messages={completed:"",percentage:"0",error:""};n.uploadedFileDetails="";n.SendDataForCVDto={Id:"",PersonSpecialityId:"",PersonId:""};n.SendDataForCVFullDto={Id:"",PersonSpecialityId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""};n.showAlertForUpload=!1;n.SendDataForCVDto.PersonId=h;n.messages={completed:"",percentage:"0",error:""};n.CheckAddMusicBtn=function(){if(!f.isEmptyValue(n.musicspecialities)){var t=e("filter")(n.musicspecialities,{MusicSpecialistPerSpeciality:{SpecialityId:n.perspeciality.Speciality1.selected.Id}},!0).length;n.MusicDisableOrVisibleFields.AddMusicBtn=(f.isEmptyValue(n.musicspecialities)||n.perspeciality.Speciality1.selected.MaxMusicSpecialists>t)&&n.pageRules.spec.CanInsert?!0:f.isEmptyValue(n.musicspecialities)||n.perspeciality.Speciality1.selected.MaxMusicSpecialists!=t?!1:!1;n.DelMusicBtn=t>=2?!0:!1}};n.getAllPersonMusicSpecialities=function(){f.getByParams({PersonId:h},"/api/PersonMusicSpeciality/GetPersonMusicSpecialitiesByPersonId").then(function(t){n.musicspecialities=t;n.CheckAddMusicBtn()},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά το φόρτωμα των μουσικών οργάνων",3e3,"trustedHtml")})};n.disabledMusicDeleteAction=function(t,i){return(f.isValueInArray(f.getRoleCode(n.authentication.role),"a, m1, m2")||!n.DisableFieldsetNotActive)&&!t&&n.pageRules.spec.CanDelete&&i?!1:!0};n.DelMusicSpec=function(t){var i=t;i.ModifiedBy=n.authentication.userName;i.ModifiedUserRole=n.authentication.role;i.ModifiedRegionAndUnitDescription=n.authentication.unitName;f.postByParams(i,"/api/PersonMusicSpeciality/DeleteMusicSpeciality").then(function(){n.getAllPersonMusicSpecialities()},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.SaveMusicSpec=function(t){var i;t.DiplomaDegree!=null&&(t.DiplomaDegree=parseFloat(t.DiplomaDegree.toString().replace(",",".")));t.MusicSpecialistPerSpecialityId=n.permusicspeciality.MusicSpecialistPerSpeciality.Id;f.isEmptyValue(n.permusicspeciality.MusicSpecialistPerSpecialityDiploma)||(t.MusicSpecialistPerSpecialityDiplomaId=n.permusicspeciality.MusicSpecialistPerSpecialityDiploma.Id);!f.isEmptyValue(t.Id)&&t.Id>0?(t.ModifiedBy=n.authentication.userName,t.ModifiedUserRole=n.authentication.role,t.ModifiedRegionAndUnitDescription=n.authentication.unitName,i=t,f.postByParams(i,"/api/PersonMusicSpeciality/UpdateMusicSpeciality").then(function(){n.getAllPersonMusicSpecialities();n.AddOrEditMusic=!1}).catch(function(n){r.pop("error","Παρουσιάστηκε σφάλμα",n.data)})):(t.CreatedBy=n.authentication.userName,t.CreatedUserRole=n.authentication.role,t.CreatedRegionAndUnitDescription=n.authentication.unitName,t.PersonId=h,i=t,f.postByParams(i,"/api/PersonMusicSpeciality/InsertMusicSpeciality").then(function(){n.getAllPersonMusicSpecialities();n.AddOrEditMusic=!1}).catch(function(n){r.pop("error","Παρουσιάστηκε σφάλμα",n.data)}))};n.AddOrEditMusic=!1;n.AddEditMusic=function(t){t=="Add"?(n.permusicspeciality={},n.permusicspeciality.Id="",n.permusicspeciality.IsConfirmed=!1,n.permusicspeciality.PersonId=h,n.AddOrEditMusic=!0,n.MusicDisableOrVisibleFields.AddMusicBtn=!1,n.musicDisplayErrorMessage=!1,n.musicErrorMessage=""):(t=="Save"||t=="UnConfirm"||t=="Confirm")&&n.perspeciality.Id>0?$("#editSpecialityForm").valid()&&(t=="Confirm"?n.permusicspeciality.IsConfirmed=!0:t=="UnConfirm"&&(n.permusicspeciality.IsConfirmed=!1),n.SaveMusicSpec(n.permusicspeciality)):(n.AddOrEditMusic=!1,n.CheckAddMusicBtn())};l(h);n.fillFormControls=function(t,i){n.perspeciality.Id="";n.ModalTitle="Προσθήκη κλάδου";n.DisableOrVisibleFields.Speciality=!0;n.SelectedSpeciality={};n.SelectedSpeciality.Diploma={Id:"",Country:{Id:""}};n.Klados={Id:"",IsChanged:!1};n.Country={Id:"",IsChanged:!1};n.DiplomaDate={Id:"",IsChanged:!1};n.DisableFieldset=!1;n.perspeciality.IsConfirmed=!1;n.permusicspeciality={};n.permusicspeciality.Id="";n.permusicspeciality.IsConfirmed=!1;n.permusicspeciality.PersonId=h;n.MusicDisableOrVisibleFields.WithoutMusicSpecialistOrIsEM16=!1;n.musicDisplayErrorMessage=!1;n.musicErrorMessage="";n.MusicDiplomaAcquisitionPeriod=[];n.MusicDisableOrVisibleFields.Cancel=!1;n.SaveDisabled=!1;n.DisableField={Speciality:!1,DiplomaDegree:!1,DiplomaDate:!1};n.showUploadFile=!1;n.uploadedFileDetails=!1;n.showAlertForUpload=!1;n.messages={completed:"",percentage:"0",error:""};n.uploadedFileDetails="";n.SendDataForCVDto={Id:"",PersonSpecialityId:"",PersonId:""};n.SendDataForCVFullDto={Id:"",PersonSpecialityId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""};f.isEmpty(n.consts.Specialities)?f.getByAll("/api/Speciality/getSpecialitiesDTO").then(function(r){n.consts.Specialities=r;f.isValueInArray(f.getRoleCode(n.authentication.role),"a, m1, m2")?n.Specialities=n.consts.Specialities:t=="Add"?(n.Specialities=e("filter")(n.consts.Specialities,{CanPublish:!0,IsActive:i},!0),n.DisableFieldsetNotActive=!1):n.Specialities=e("filter")(n.consts.Specialities,{IsActive:i},!0)},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των Κλάδων")}):f.isValueInArray(f.getRoleCode(n.authentication.role),"a, m1, m2")?n.Specialities=n.consts.Specialities:t=="Add"?(n.Specialities=e("filter")(n.consts.Specialities,{CanPublish:!0,IsActive:i},!0),n.DisableFieldsetNotActive=!1):n.Specialities=e("filter")(n.consts.Specialities,{IsActive:i},!0);f.isEmpty(n.consts.DimplomaSource)&&f.getByAll("/api/PersonSpeciality/getDimplomaSourceTypes").then(function(t){n.consts.DimplomaSource=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση της Προέλευσης Πτυχίου")});f.isEmpty(n.consts.Countries)&&f.getByAll("/api/Country/getCountriesDto").then(function(t){n.consts.Countries=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των Χωρών")});f.isEmpty(n.consts.workExperienceType)&&f.getByAll("/api/PersonSpeciality/getWorkExperienceTypes").then(function(t){n.consts.workExperienceType=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση της Επαγ/κής Εμπειρίας")});f.isEmpty(n.consts.musicequivalenceType)&&f.getByAll("/api/Diploma/getMusicEquivalenceTypes").then(function(t){n.consts.musicequivalenceType=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των Τίτλων Ισοτιμίας")});f.isEmpty(n.consts.MusicSpecialist)&&f.getByAll("/api/MusicSpecialist/getMusicSpecialistDto").then(function(t){n.consts.MusicSpecialist=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των μουσικών ειδικεύσεων")});f.isEmpty(n.consts.MusicDiplomas)&&f.getByAll("/api/MusicSpecialist/GetAllMusicDiplomas").then(function(t){n.consts.MusicDiplomas=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των μουσικών διπλωμάτων")})};n.fillFormControlsEEPEBP=function(t){n.perspeciality={};n.perspeciality.Speciality1={};n.perspeciality.DimplomaSource={};n.perspeciality.DimplomaSource={selected:""};n.perspeciality.Speciality1={selected:""};n.perspeciality.Country={selected:""};n.perspeciality.Diploma={selected:""};n.perspeciality.Id="";n.ModalTitle="Προσθήκη κλάδου Ε.Ε.Π. - Ε.Β.Π.";n.DisableOrVisibleFields.Speciality=!0;n.SelectedSpeciality={};n.SelectedSpeciality.Diploma={Id:"",Country:{Id:""}};n.Klados={Id:"",IsChanged:!1};n.Country={Id:"",IsChanged:!1};n.DiplomaDate={Id:"",IsChanged:!1};n.DisableFieldsetEEPEBP=!1;n.perspeciality.IsConfirmed=!1;n.SaveDisabled=!1;n.minDate2="01/01/1900";n.maxDate2=new Date;n.DisableField={Speciality:!1,DiplomaDegree:!1,DiplomaDate:!1};n.showUploadFile=!1;n.uploadedFileDetails=!1;n.showAlertForUpload=!1;n.messages={completed:"",percentage:"0",error:""};n.uploadedFileDetails="";n.SendDataForCVDto={Id:"",PersonSpecialityId:"",PersonId:""};n.SendDataForCVFullDto={Id:"",PersonSpecialityId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""};f.isEmpty(n.consts.SpecialitiesEEPEBP)?f.getByAll("/api/Speciality/getSpecialitiesEEPEBPDTO").then(function(i){n.consts.SpecialitiesEEPEBP=i;n.Specialities=f.isValueInArray(f.getRoleCode(n.authentication.role),"a, m1, m2")?n.consts.SpecialitiesEEPEBP:t=="Add"?e("filter")(n.consts.SpecialitiesEEPEBP,{CanPublish:!0},!0):n.consts.SpecialitiesEEPEBP},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των Κλάδων")}):n.Specialities=f.isValueInArray(f.getRoleCode(n.authentication.role),"a, m1, m2")?n.consts.SpecialitiesEEPEBP:t=="Add"?e("filter")(n.consts.SpecialitiesEEPEBP,{CanPublish:!0},!0):n.consts.SpecialitiesEEPEBP;f.isEmpty(n.consts.DimplomaSource)&&f.getByAll("/api/PersonSpeciality/getDimplomaSourceTypes").then(function(t){n.consts.DimplomaSource=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση της Προέλευσης Πτυχίου")});f.isEmpty(n.consts.Countries)&&f.getByAll("/api/Country/getCountriesDto").then(function(t){n.consts.Countries=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των Χωρών")});f.isEmpty(n.consts.workExperienceType)&&f.getByAll("/api/PersonSpeciality/getWorkExperienceTypes").then(function(t){n.consts.workExperienceType=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση της Επαγ/κής Εμπειρίας")})};n.disabledDeleteAction=function(t,i,r){return t||!f.isEmpty(n.SpecialitiesWithSpecialists)||r||!n.pageRules.spec.CanDelete?!0:!1};n.disabledDeleteActionEEPEBP=function(t,i,r){return t||r||!n.pageRules.specEEPEBP.CanDelete?!0:!1};n.openModal=function(t){t.IsEEPEBP?f.getByParams({PersonSpecialityId:t.Id},"/api/PersonAcademicQualification/HasAcademicSpecialityBySpecialityId").then(function(i){n.hasAcademicSpecialityBySpecialityId=i;n.delPerSpeciality=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά το φόρτωμα των καταχωρημένων κλάδων",3e3,"trustedHtml");unblockUI("#divBlockUI")}):n.delPerSpeciality=t};n.DeleteAction=function(t){var i=t;i.IsMusic=t.IsMusic;i.ModifiedBy=n.authentication.userName;i.ModifiedUserRole=n.authentication.role;i.ModifiedRegionAndUnitDescription=n.authentication.unitName;f.postByParams(i,"/api/PersonSpeciality/DeleteSpeciality").then(function(){if(t.IsActive?n.specialities.splice(n.specialities.indexOf(t),1):n.specialitiesNotActive.splice(n.specialitiesNotActive.indexOf(t),1),n.exceedSpecialityLimits=n.specialities.length>=5?!0:!1,i.HasSpecialEducation)if(n.specialitiesEEPEBP.length>=1)n.personMessage.hasSpecialEducation=!0;else{n.personMessage.hasSpecialEducation=!1;for(var r=0;r<n.specialities.length;r+=1)if(n.specialities[r].HasSpecialEducation==!0){n.personMessage.hasSpecialEducation=!0;break}}},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.DeleteActionEEPEBP=function(t){var i=t;i.ModifiedBy=n.authentication.userName;i.ModifiedUserRole=n.authentication.role;i.ModifiedRegionAndUnitDescription=n.authentication.unitName;f.postByParams(i,"/api/PersonSpeciality/DeleteSpecialityEEPEBP").then(function(){n.specialitiesEEPEBP.splice(n.specialitiesEEPEBP.indexOf(t),1);n.specialitiesEEPEBP.length>=1&&(n.personMessage.hasSpecialEducation=!0)},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.openAddSpecModal=function(t){blockUI({target:"#tblSpeciality",animate:!0});var i=u.all([n.fillFormControls(0,t.IsActive),f.getByParams({Id:t.Id},"/api/PersonSpeciality/getPersonSpecialityBySpecialityId")]);n.SaveDisabled=!1;i.then(function(i){o(function(){var u;n.SelectedSpeciality=i[1];n.messages={completed:"",percentage:"0",error:""};n.uploadedFileDetails="";n.SendDataForCVDto={Id:"",PersonSpecialityId:"",PersonId:""};n.SendDataForCVFullDto={Id:"",PersonSpecialityId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""};!f.isEmptyValue(n.SelectedSpeciality.DimplomaSource)&&n.SelectedSpeciality.DimplomaSource>1&&(n.SendDataForCVDto.PersonSpecialityId=n.SelectedSpeciality.Id,f.getByParams({PersonSpecialityId:n.SelectedSpeciality.Id},"/api/PersonSpeciality/GetDetailsForFile").then(function(t){t!=null?(n.SendDataForCVFullDto=t,n.SendDataForCVDto.Id=t.Id,n.showDownloadFile=!0,n.uploadedFileDetails="Έχετε μεταφορτώσει το αρχείο: "+n.SendDataForCVFullDto.FileName):n.showDownloadFile=!1},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης επισυναπτόμενου Βιογραφικού")}));n.DisableFieldsetNotActive=t.IsActive?!1:f.isValueInArray(n.pageRules.spec.CanAccess,"m1, m2, a")?!1:!0;n.pageRules.spec.CanUpdate?n.SelectedSpeciality.IsConfirmed&&n.pageRules.spec.CanUpdate?f.isValueInArray(n.pageRules.spec.CanAccess,"u1, u2")?n.DisableFieldset=!0:f.isValueInArray(n.pageRules.spec.CanAccess,"a, m1, m2")?n.DisableFieldset=!1:f.isValueInArray(n.pageRules.spec.CanAccess,"d1, d2, p")?(n.DisableFieldset=!1,n.DisableField={Speciality:!0,DiplomaDegree:!0,DiplomaDate:!0}):n.DisableFieldset=!0:n.DisableFieldset=!n.SelectedSpeciality.IsConfirmed&&n.pageRules.spec.CanUpdate?!1:!0:n.DisableFieldset=!0;n.perspeciality.Id=n.SelectedSpeciality.Id;n.perspeciality.IsConfirmed=n.SelectedSpeciality.IsConfirmed;n.ModalTitle="Προβολή / Επεξεργασία κλάδου";n.DisableOrVisibleFields.Speciality=!1;n.perspeciality.Speciality1.selected=e("filter")(n.consts.Specialities,{Id:n.SelectedSpeciality.Speciality1.Id},!0)[0];n.perspeciality.Speciality1.selected.IsEM16?(u=e("filter")(n.musicspecialities,{MusicSpecialistPerSpeciality:{SpecialityId:n.perspeciality.Speciality1.selected.Id}},!0).length,u!=0?(n.DisableOrVisibleFields.IsMusic=!0,n.AddOrEditMusic=!1,n.MusicDisableOrVisibleFields.Cancel=!1):(n.DisableOrVisibleFields.IsMusic=!0,n.AddOrEditMusic=!0,n.MusicDisableOrVisibleFields.Cancel=!0)):(n.SelectedSpeciality.DimplomaSource>0&&(n.perspeciality.DimplomaSource.selected=e("filter")(n.consts.DimplomaSource,{Id:n.SelectedSpeciality.DimplomaSource},!0)[0]),f.isEmptyValue(n.SelectedSpeciality.Diploma)||(n.perspeciality.Country.selected=e("filter")(n.consts.Countries,{Id:n.SelectedSpeciality.Diploma.Country.Id},!0)[0]),n.perspeciality.DiplomaDate=n.SelectedSpeciality.DiplomaDate,n.perspeciality.InitialRegistrationDate=n.SelectedSpeciality.InitialRegistrationDate,n.perspeciality.InitialRegistrationDate=n.SelectedSpeciality.InitialRegistrationDate,n.perspeciality.DiplomaAcquisitionPeriod=new Date(n.SelectedSpeciality.DiplomaAcquisitionPeriod),n.perspeciality.DiplomaDegree=n.SelectedSpeciality.DiplomaDegree,n.perspeciality.HasSpecialEducation=n.SelectedSpeciality.HasSpecialEducation,n.perspeciality.MusicEquivalenceType=n.SelectedSpeciality.MusicEquivalenceType,n.perspeciality.YearsOfStudy=n.SelectedSpeciality.YearsOfStudy,n.perspeciality.ReStudy=n.SelectedSpeciality.ReStudy,n.perspeciality.DateofReStudy=n.SelectedSpeciality.DateofReStudy,n.perspeciality.PD130Simulation=n.SelectedSpeciality.PD130Simulation,n.perspeciality.DateofSimulation=n.SelectedSpeciality.DateofSimulation,n.perspeciality.SimulationDegree=n.SelectedSpeciality.SimulationDegree,n.perspeciality.WorkExperience=n.SelectedSpeciality.WorkExperience,n.perspeciality.MonthExperience=n.SelectedSpeciality.MonthExperience,n.perspeciality.DayExperience=n.SelectedSpeciality.DayExperience,n.perspeciality.Speciality1.selected.IsMusic?(u=e("filter")(n.musicspecialities,{MusicSpecialistPerSpeciality:{SpecialityId:n.perspeciality.Speciality1.selected.Id}},!0).length,u!=0?(n.DisableOrVisibleFields.IsMusic=!0,n.AddOrEditMusic=!1,n.MusicDisableOrVisibleFields.Cancel=!1):(n.DisableOrVisibleFields.IsMusic=!0,n.AddOrEditMusic=!0,n.MusicDisableOrVisibleFields.Cancel=!0)):(n.DisableOrVisibleFields.IsMusic=!1,n.AddOrEditMusic=!1,n.MusicDisableOrVisibleFields.Cancel=!1))},300);o(function(){n.formFields();unblockUI("#tblSpeciality");$("#AddSpecModal").modal("show")},300)})};n.openAddSpecEEPEBPModal=function(t){blockUI({target:"#tblSpecialityEEPEBP",animate:!0});n.SaveDisabled=!1;var i=u.all([n.fillFormControlsEEPEBP(),f.getByParams({Id:t.Id},"/api/PersonSpeciality/getPersonSpecialityBySpecialityId"),f.getByParams({Id:t.PersonSpecialityEEPEBPId},"/api/PersonSpeciality/getPersonSpecialityEEPEBPBySpecialityId"),f.getByParams({personId:h},"/api/PersonAcademicQualification/getPersonAcademicQualificationEEPEBP")]);i.then(function(i){o(function(){var u,o;n.SelectedSpeciality=i[1];n.SelectedSpecialityEEPEBP=i[2];u=i[3];n.messages={completed:"",percentage:"0",error:""};n.uploadedFileDetails="";n.SendDataForCVDto={Id:"",PersonSpecialityId:"",PersonId:""};n.SendDataForCVFullDto={Id:"",PersonSpecialityId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""};!f.isEmptyValue(n.SelectedSpeciality.DimplomaSource)&&n.SelectedSpeciality.DimplomaSource>1&&(n.SendDataForCVDto.PersonSpecialityId=n.SelectedSpeciality.Id,f.getByParams({PersonSpecialityId:n.SelectedSpeciality.Id},"/api/PersonSpeciality/GetDetailsForFile").then(function(t){t!=null?(n.SendDataForCVFullDto=t,n.SendDataForCVDto.Id=t.Id,n.showDownloadFile=!0,n.uploadedFileDetails="Έχετε μεταφορτώσει το αρχείο: "+n.SendDataForCVFullDto.FileName):n.showDownloadFile=!1},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης επισυναπτόμενου Βιογραφικού")}));n.DisableFieldsetNotActive=t.IsActive?!1:!0;n.pageRules.specEEPEBP.CanUpdate?n.SelectedSpeciality.IsConfirmed&&n.pageRules.specEEPEBP.CanUpdate?f.isValueInArray(n.pageRules.specEEPEBP.CanAccess,"u1, u2")?n.DisableFieldsetEEPEBP=!0:f.isValueInArray(n.pageRules.specEEPEBP.CanAccess,"a, m1, m2")?n.DisableFieldsetEEPEBP=!1:f.isValueInArray(n.pageRules.specEEPEBP.CanAccess,"d1, d2, p")?(n.DisableFieldsetEEPEBP=!1,n.DisableField={Speciality:!0,DiplomaDegree:!0,DiplomaDate:!0}):n.DisableFieldsetEEPEBP=!0:n.DisableFieldsetEEPEBP=!n.SelectedSpeciality.IsConfirmed&&n.pageRules.specEEPEBP.CanUpdate?!1:!0:n.DisableFieldsetEEPEBP=!0;n.perspeciality.Id=n.SelectedSpeciality.Id;n.perspeciality.IsConfirmed=n.SelectedSpeciality.IsConfirmed;n.ModalTitle="Προβολή / Επεξεργασία κλάδου Ε.Ε.Π. - Ε.Β.Π.";n.DisableOrVisibleFields.Speciality=!1;n.perspeciality.Speciality1.selected=e("filter")(n.consts.SpecialitiesEEPEBP,{Id:n.SelectedSpeciality.Speciality1.Id},!0)[0];n.consts.PersonAcademicQualification=n.perspeciality.Speciality1.selected.Code=="ΠΕ31ΕΠ"||n.perspeciality.Speciality1.selected.Code=="ΠΕ31ΚΙΝ"||n.perspeciality.Speciality1.selected.Code=="ΠΕ31ΝΟ"?u:e("filter")(u,function(n){return n.AcademicDiplomaId!==14});n.SelectedSpeciality.DimplomaSource>0&&(n.perspeciality.DimplomaSource.selected=e("filter")(n.consts.DimplomaSource,{Id:n.SelectedSpeciality.DimplomaSource},!0)[0]);f.isEmptyValue(n.SelectedSpeciality.Diploma)||(n.perspeciality.Country.selected=e("filter")(n.consts.Countries,{Id:n.SelectedSpeciality.Diploma.Country.Id},!0)[0]);n.perspeciality.DiplomaDate=n.SelectedSpeciality.DiplomaDate;n.perspeciality.InitialRegistrationDate=n.SelectedSpeciality.InitialRegistrationDate;n.perspeciality.InitialRegistrationDate=n.SelectedSpeciality.InitialRegistrationDate;n.perspeciality.DiplomaAcquisitionPeriod=new Date(n.SelectedSpeciality.DiplomaAcquisitionPeriod);n.perspeciality.DiplomaDegree=n.SelectedSpeciality.DiplomaDegree;n.perspeciality.PersonSpecialityEEPEBPId=n.SelectedSpeciality.PersonSpecialityEEPEBPId;n.perspeciality.ProfessionLicenceNumber=n.SelectedSpecialityEEPEBP.ProfessionLicenceNumber;n.perspeciality.ProfessionLicence=n.SelectedSpecialityEEPEBP.ProfessionLicence;n.perspeciality.ProfessionLicenceDate=n.SelectedSpecialityEEPEBP.ProfessionLicenceDate;n.perspeciality.ProfessionLicenceBodyId=n.SelectedSpecialityEEPEBP.ProfessionLicenceBodyId;n.perspeciality.ChildPsychiatrist=n.SelectedSpecialityEEPEBP.ChildPsychiatrist;n.perspeciality.ChildPsychiatristDate=n.SelectedSpecialityEEPEBP.ChildPsychiatristDate;n.perspeciality.MedicalAssociation=n.SelectedSpecialityEEPEBP.MedicalAssociation;n.perspeciality.CountrysideService=n.SelectedSpecialityEEPEBP.CountrysideService;n.perspeciality.Physiotherapists=n.SelectedSpecialityEEPEBP.Physiotherapists;n.perspeciality.AeiOrTei=n.SelectedSpecialityEEPEBP.AeiOrTei;n.perspeciality.De1DimplomaType=n.SelectedSpecialityEEPEBP.De1DimplomaType;n.perspeciality.IsAcademicQualificationRequired=n.SelectedSpecialityEEPEBP.IsAcademicQualificationRequired;o=e("filter")(n.consts.PersonAcademicQualification,{PersonAcademicQualificationId:n.SelectedSpecialityEEPEBP.PersonAcademicQualificationId},!0)[0];n.perspeciality.PersonAcademicQualificationId=f.isEmptyValue(o)?0:o.PersonAcademicQualificationId;n.perspeciality.CertificateDE1=n.SelectedSpecialityEEPEBP.CertificateDE1;n.perspeciality.CertificateDE1Date=n.SelectedSpecialityEEPEBP.CertificateDE1Date;n.perspeciality.MedicalAssociationNumber=n.SelectedSpecialityEEPEBP.MedicalAssociationNumber;n.perspeciality.MedicalAssociationDateFrom=n.SelectedSpecialityEEPEBP.MedicalAssociationDateFrom;n.perspeciality.MedicalAssociationDateTo=n.SelectedSpecialityEEPEBP.MedicalAssociationDateTo;n.perspeciality.NursesOrHealthVisitorsType=n.SelectedSpecialityEEPEBP.NursesOrHealthVisitorsType;n.perspeciality.NursesOrHealthVisitors=n.SelectedSpecialityEEPEBP.NursesOrHealthVisitors;n.perspeciality.NursesOrHealthVisitorsNumber=n.SelectedSpecialityEEPEBP.NursesOrHealthVisitorsNumber;n.perspeciality.NursesOrHealthVisitorsDateFrom=n.SelectedSpecialityEEPEBP.NursesOrHealthVisitorsDateFrom;n.perspeciality.NursesOrHealthVisitorsDateTo=n.SelectedSpecialityEEPEBP.NursesOrHealthVisitorsDateTo;n.perspeciality.PhysiotherapistsNumber=n.SelectedSpecialityEEPEBP.PhysiotherapistsNumber;n.perspeciality.PhysiotherapistsDateFrom=n.SelectedSpecialityEEPEBP.PhysiotherapistsDateFrom;n.perspeciality.PhysiotherapistsDateTo=n.SelectedSpecialityEEPEBP.PhysiotherapistsDateTo;n.perspeciality.WorkExperienceEEPEBP=n.SelectedSpecialityEEPEBP.WorkExperienceEEPEBP;n.perspeciality.YearExperienceEEPEBP=n.SelectedSpecialityEEPEBP.YearExperienceEEPEBP;n.perspeciality.MonthExperienceEEPEBP=n.SelectedSpecialityEEPEBP.MonthExperienceEEPEBP;n.perspeciality.DayExperienceEEPEBP=n.SelectedSpecialityEEPEBP.DayExperienceEEPEBP},300);o(function(){n.formFieldsEEPEBP();unblockUI("#tblSpecialityEEPEBP");$("#AddSpecEEPEBPModal").modal("show")},300)})};Date.prototype.withoutTime=function(){var n=new Date(this);return n.setHours(0,0,0,0,0),n};n.FillRealDiplomaDate=function(){var i,t;if(!f.isEmptyValue(n.perspeciality.DiplomaDate))if(i=new Date(n.perspeciality.DiplomaDate),t=i.getFullYear(),n.DiplomaAcquisitionPeriod=[{Value:t-1+"-01-01",Description:"Χειμερινό Εξάμηνο/"+(t-2)+"-"+(t-1)},{Value:t-1+"-05-01",Description:"Εαρινό Εξάμηνο/"+(t-2)+"-"+(t-1)},{Value:t-1+"-08-16",Description:"Περίοδος Σεπτεμβρίου/"+(t-2)+"-"+(t-1)},{Value:t+"-01-01",Description:"Χειμερινό Εξάμηνο/"+(t-1)+"-"+t},{Value:t+"-05-01",Description:"Εαρινό Εξάμηνο/"+(t-1)+"-"+t},{Value:t+"-08-16",Description:"Περίοδος Σεπτεμβρίου/"+(t-1)+"-"+t},{Value:t+1+"-01-01",Description:"Χειμερινό Εξάμηνο/"+t+"-"+(t+1)},{Value:t+1+"-05-01",Description:"Εαρινό Εξάμηνο/"+t+"-"+(t+1)},{Value:t+1+"-08-16",Description:"Περίοδος Σεπτεμβρίου/"+t+"-"+(t+1)}],f.isEmptyValue(n.perspeciality.DiplomaAcquisitionPeriod)||n.DiplomaDate.IsChanged)new Date(i).withoutTime()>=new Date(t+"-01-01").withoutTime()&&new Date(i).withoutTime()<new Date(t+"-05-01").withoutTime()?n.perspeciality.DiplomaAcquisitionPeriod=t+"-01-01":new Date(i).withoutTime()>=new Date(t+"-05-01").withoutTime()&&new Date(i).withoutTime()<new Date(t+"-08-16").withoutTime()?n.perspeciality.DiplomaAcquisitionPeriod=t+"-05-01":new Date(i).withoutTime()>=new Date(t+"-08-16").withoutTime()&&new Date(i).withoutTime()<new Date(t+"-12-31").withoutTime()&&(n.perspeciality.DiplomaAcquisitionPeriod=t+"-08-16");else{var e=new Date(n.perspeciality.DiplomaAcquisitionPeriod),o=e.getFullYear(),r=e.getMonth()+1,u=e.getDate();r.toString().length<=1&&(r="0"+r);u.toString().length<=1&&(u="0"+u);n.perspeciality.DiplomaAcquisitionPeriod=o+"-"+r+"-"+u}};n.FillMusicDiplomaDate=function(){var i,t;if(!f.isEmptyValue(n.permusicspeciality.DiplomaDate))if(i=new Date(n.permusicspeciality.DiplomaDate),t=i.getFullYear(),n.MusicDiplomaAcquisitionPeriod=[{Value:t-1+"-01-01",Description:"Χειμερινό Εξάμηνο/"+(t-2)+"-"+(t-1)},{Value:t-1+"-05-01",Description:"Εαρινό Εξάμηνο/"+(t-2)+"-"+(t-1)},{Value:t-1+"-08-16",Description:"Περίοδος Σεπτεμβρίου/"+(t-2)+"-"+(t-1)},{Value:t+"-01-01",Description:"Χειμερινό Εξάμηνο/"+(t-1)+"-"+t},{Value:t+"-05-01",Description:"Εαρινό Εξάμηνο/"+(t-1)+"-"+t},{Value:t+"-08-16",Description:"Περίοδος Σεπτεμβρίου/"+(t-1)+"-"+t},{Value:t+1+"-01-01",Description:"Χειμερινό Εξάμηνο/"+t+"-"+(t+1)},{Value:t+1+"-05-01",Description:"Εαρινό Εξάμηνο/"+t+"-"+(t+1)},{Value:t+1+"-08-16",Description:"Περίοδος Σεπτεμβρίου/"+t+"-"+(t+1)}],f.isEmptyValue(n.permusicspeciality.DiplomaAcquisitionPeriod)||n.musicDiplomaDate.IsChanged)new Date(i).withoutTime()>=new Date(t+"-01-01").withoutTime()&&new Date(i).withoutTime()<new Date(t+"-05-01").withoutTime()?n.permusicspeciality.DiplomaAcquisitionPeriod=t+"-01-01":new Date(i).withoutTime()>=new Date(t+"-05-01").withoutTime()&&new Date(i).withoutTime()<new Date(t+"-08-16").withoutTime()?n.permusicspeciality.DiplomaAcquisitionPeriod=t+"-05-01":new Date(i).withoutTime()>=new Date(t+"-08-16").withoutTime()&&new Date(i).withoutTime()<new Date(t+"-12-31").withoutTime()&&(n.permusicspeciality.DiplomaAcquisitionPeriod=t+"-08-16");else{var e=new Date(n.permusicspeciality.DiplomaAcquisitionPeriod),o=e.getFullYear(),r=e.getMonth()+1,u=e.getDate();r.toString().length<=1&&(r="0"+r);u.toString().length<=1&&(u="0"+u);n.permusicspeciality.DiplomaAcquisitionPeriod=o+"-"+r+"-"+u}};n.formFields=function(){if(!f.isEmptyValue(n.perspeciality.Speciality1.selected))if(n.maxDate=new Date(n.perspeciality.Speciality1.selected.LimitationDate),n.perspeciality.Speciality1.selected.IsMusic&&(f.isEmptyValue(n.Klados.Id)||n.Klados.IsChanged)?(n.MusicSpecialist=e("filter")(n.consts.MusicSpecialist,{SpecialityId:n.perspeciality.Speciality1.selected.Id},!0),n.MusicDisableOrVisibleFields.WithoutMusicSpecialistOrIsEM16=n.perspeciality.Speciality1.selected.IsEM16?!0:!1):n.perspeciality.Speciality1.selected.IsMusic||(n.permusicspeciality.MusicSpecialistPerSpeciality="",n.permusicspeciality.DiplomaDegree="",n.permusicspeciality.DiplomaDate="",n.permusicspeciality.DiplomaAcquisitionPeriod="",n.permusicspeciality.DiplomaTitle="",n.permusicspeciality.MusicSpecialistPerSpecialityDiploma=""),n.perspeciality.Speciality1.selected.IsMusic&&n.CheckAddMusicBtn(),f.isEmptyValue(n.Klados.Id)?(n.Klados.Id=n.perspeciality.Speciality1.selected.Id,n.Klados.IsChanged=!1):n.Klados.Id!=n.perspeciality.Speciality1.selected.Id?(n.Klados.Id=n.perspeciality.Speciality1.selected.Id,n.Klados.IsChanged=!0):n.Klados.IsChanged=!1,n.showUploadFile=!f.isEmptyValue(n.perspeciality.DimplomaSource)&&n.perspeciality.DimplomaSource.selected.Id>1?!0:!1,f.isEmptyValue(n.SelectedSpeciality.Diploma)||(!f.isEmptyValue(n.Country.Id)||f.isEmptyValue(n.SelectedSpeciality.Diploma.Country.Id)&&f.isEmptyValue(n.perspeciality.Country.selected.Id)?f.isEmptyValue(n.Country.Id)||f.isEmptyValue(n.SelectedSpeciality.Diploma.Country.Id)&&f.isEmptyValue(n.perspeciality.Country.selected.Id)?n.Country.IsChanged=!1:f.isEmptyValue(n.perspeciality.Country.selected.Id)?f.isEmptyValue(n.SelectedSpeciality.Diploma.Country.Id)?n.Country.IsChanged=!1:n.Country.Id!=n.SelectedSpeciality.Diploma.Country.Id?(n.Country.Id=n.SelectedSpeciality.Diploma.Country.Id,n.Country.IsChanged=!0):n.Country.IsChanged=!1:n.Country.Id!=n.perspeciality.Country.selected.Id?(n.Country.Id=n.perspeciality.Country.selected.Id,n.Country.IsChanged=!0):n.Country.IsChanged=!1:(n.Country.Id=f.isEmptyValue(n.SelectedSpeciality.Diploma.Country.Id)?n.perspeciality.Country.selected.Id:n.SelectedSpeciality.Diploma.Country.Id,n.Country.IsChanged=!1)),f.isEmptyValue(n.DiplomaDate.Id)&&!f.isEmptyValue(n.perspeciality.DiplomaDate)?(n.DiplomaDate.Id=n.perspeciality.DiplomaDate,n.DiplomaDate.IsChanged=!1):f.isEmptyValue(n.DiplomaDate.Id)||f.isEmptyValue(n.perspeciality.DiplomaDate)?n.DiplomaDate.IsChanged=!1:n.DiplomaDate.Id!=n.perspeciality.DiplomaDate?(n.DiplomaDate.Id=n.perspeciality.DiplomaDate,n.DiplomaDate.IsChanged=!0):n.DiplomaDate.IsChanged=!1,n.FillRealDiplomaDate(),n.perspeciality.Speciality1.selected.IsEM16)n.perspeciality.Country.selected="",n.perspeciality.DimplomaSource.selected="",n.perspeciality.Diploma.selected="",n.DiplomaAbroad="",n.perspeciality.DiplomaDate="",n.perspeciality.InitialRegistrationDate="",n.perspeciality.DiplomaAcquisitionPeriod="",n.perspeciality.DiplomaDegree="",n.perspeciality.HasSpecialEducation=!1,n.perspeciality.YearsOfStudy="",n.perspeciality.EquivalenceType="",n.perspeciality.MusicEquivalenceType="",n.perspeciality.ReStudy="",n.perspeciality.DateofReStudy="",n.perspeciality.PD130Simulation=!1,n.perspeciality.DateofSimulation="",n.perspeciality.SimulationDegree="",n.perspeciality.WorkExperience="",n.perspeciality.MonthExperience="",n.perspeciality.DayExperience="",f.isEmptyValue(n.perspeciality.Id)&&(n.AddOrEditMusic=!0),n.DisableOrVisibleFields={Speciality:!0,HasSpecialEducation:!1,DimplomaSource:!1,DiplomaDate:!1,DiplomaAcquisitionPeriod:!1,Country:!1,DiplomaDegree:!1,DiplomaDateAndGrade:!1,Diploma:!1,DiplomaAbroad:!1,EquivalenceType:!1,MusicEquivalenceType:!1,YearsOfStudy:!1,ReStudy:!1,PD130Simulation:!1,DateofSimulation:!1,SimulationDegree:!1,DateofReStudy:!1,WorkExperience:!1,MonthExperience:!1,DayExperience:!1,Save:!0,IsMusic:!0,InitialRegistrationDate:!1};else if(n.perspeciality.Speciality1.selected.IsPE1838){n.perspeciality.DimplomaSource.selected=e("filter")(n.consts.DimplomaSource,{Id:3},!0)[0];n.perspeciality.Country.selected=e("filter")(n.consts.Countries,{Id:13},!0)[0];var t=u.all([f.getByAll("/api/Diploma/getAllequivalenceTypes"),f.getByAll("/api/Diploma/getDiplomaForPE1838")]);t.then(function(t){n.consts.equivalenceType=t[0];n.perspeciality.EquivalenceType=e("filter")(n.consts.equivalenceType,{Id:14},!0)[0].Id;n.diplomas=t[1];n.DiplomaAbroad=t[1].Description;n.perspeciality.Diploma=t[1];n.perspeciality.DiplomaId=t[1].Id});n.DisableOrVisibleFields.DiplomaAbroad=!0;n.DisableOrVisibleFields.DiplomaDate=!0;n.DisableOrVisibleFields.DiplomaDegree=!0;n.DisableOrVisibleFields.DiplomaDateAndGrade=!0;n.DisableOrVisibleFields.EquivalenceType=!0;n.DisableOrVisibleFields.HasSpecialEducation=!0;n.DisableOrVisibleFields.InitialRegistrationDate=!0;n.disableDiplomaAbroad=!0;n.disableEquivalenceType=!0;n.DisableOrVisibleFields.Save=!0;n.perspeciality.Diploma.selected="";n.perspeciality.YearsOfStudy="";n.perspeciality.MusicEquivalenceType="";n.perspeciality.ReStudy="";n.perspeciality.DateofReStudy="";n.perspeciality.PD130Simulation=!1;n.perspeciality.DateofSimulation="";n.perspeciality.SimulationDegree="";n.perspeciality.WorkExperience="";n.perspeciality.MonthExperience="";n.perspeciality.DayExperience=""}else n.DisableOrVisibleFields.DimplomaSource=!0,n.disableDiplomaAbroad=!1,n.disableEquivalenceType=!1,f.isEmptyValue(n.perspeciality.DimplomaSource.selected.Id)||(n.perspeciality.DimplomaSource.selected.Id==1?(n.perspeciality.Country.selected.Id!=3&&(n.Countries=e("filter")(n.consts.Countries,{DiplomaSource:n.perspeciality.DimplomaSource.selected.Id},!0),n.perspeciality.Country.selected=n.Countries[0]),n.DisableOrVisibleFields.Country=!1):(f.isEmptyValue(n.perspeciality.Country.selected.Id)||n.perspeciality.Country.selected.Id==3||n.perspeciality.Country.selected.DiplomaSource==2&&n.perspeciality.DimplomaSource.selected.Id!=2||n.perspeciality.Country.selected.DiplomaSource==3&&n.perspeciality.DimplomaSource.selected.Id!=3?(n.Countries=e("filter")(n.consts.Countries,{DiplomaSource:n.perspeciality.DimplomaSource.selected.Id},!0),n.perspeciality.Country.selected=""):f.isEmptyValue(n.SelectedSpeciality.Diploma)||f.isEmptyValue(n.SelectedSpeciality.Diploma.Country.Id)||n.Country.IsChanged||(n.Countries=e("filter")(n.consts.Countries,{DiplomaSource:n.perspeciality.DimplomaSource.selected.Id},!0),n.perspeciality.Country.selected=e("filter")(n.consts.Countries,{Id:n.SelectedSpeciality.Diploma.Country.Id},!0)[0]),n.DisableOrVisibleFields.Country=!0)),f.isEmptyValue(n.perspeciality.DimplomaSource.selected)||n.perspeciality.DimplomaSource.selected.Id!=1||f.isEmptyValue(n.perspeciality.Country.selected)?f.isEmptyValue(n.perspeciality.DimplomaSource.selected)||n.perspeciality.DimplomaSource.selected.Id==1||f.isEmptyValue(n.perspeciality.Country.selected)?(n.DisableOrVisibleFields.Diploma=!1,n.DisableOrVisibleFields.DiplomaAbroad=!1,n.DisableOrVisibleFields.DiplomaDate=!1,n.DisableOrVisibleFields.DiplomaDegree=!1,n.DisableOrVisibleFields.DiplomaDateAndGrade=!1,n.DisableOrVisibleFields.InitialRegistrationDate=!1,n.DisableOrVisibleFields.HasSpecialEducation=!1,n.DisableOrVisibleFields.ReStudy=!1,n.DisableOrVisibleFields.WorkExperience=!1,n.DisableOrVisibleFields.MonthExperience=!1,n.DisableOrVisibleFields.DayExperience=!1,n.DisableOrVisibleFields.Save=!1,n.perspeciality.Diploma.selected="",n.DiplomaAbroad="",n.perspeciality.HasSpecialEducation=!1,n.perspeciality.YearsOfStudy="",n.perspeciality.EquivalenceType="",n.perspeciality.MusicEquivalenceType="",n.perspeciality.ReStudy="",n.perspeciality.DateofReStudy="",n.perspeciality.PD130Simulation=!1,n.perspeciality.DateofSimulation="",n.perspeciality.SimulationDegree="",(f.isEmptyValue(n.SelectedSpeciality.WorkExperience)||n.Klados.IsChanged)&&(n.perspeciality.WorkExperience=""),(f.isEmptyValue(n.SelectedSpeciality.MonthExperience)||n.Klados.IsChanged)&&(n.perspeciality.MonthExperience=""),(f.isEmptyValue(n.SelectedSpeciality.DayExperience)||n.Klados.IsChanged)&&(n.perspeciality.DayExperience="")):(n.DisableOrVisibleFields.Save=!1,n.DisableOrVisibleFields.Diploma=!1,n.DisableOrVisibleFields.DiplomaAbroad=!0,n.DisableOrVisibleFields.DiplomaDate=!0,n.DisableOrVisibleFields.DiplomaDegree=!0,n.DisableOrVisibleFields.DiplomaDateAndGrade=!0,n.DisableOrVisibleFields.InitialRegistrationDate=!0,n.DisableOrVisibleFields.Save=!0,n.DisableOrVisibleFields.HasSpecialEducation=n.perspeciality.Speciality1.selected.HasSpecialEducation,n.DisableOrVisibleFields.ReStudy=n.perspeciality.DimplomaSource.selected.Id==2?n.perspeciality.Speciality1.selected.OpenReStudy:!1,n.perspeciality.Speciality1.selected.IsMusic?(n.DisableOrVisibleFields.IsMusic=!0,n.perspeciality.Id==""&&(n.AddOrEditMusic=!0)):(n.DisableOrVisibleFields.IsMusic=!1,n.AddOrEditMusic=!1),n.DisableOrVisibleFields.WorkExperience=n.perspeciality.Speciality1.selected.OpenWorkExperience,n.DisableOrVisibleFields.WorkExperience||(n.perspeciality.WorkExperience=""),n.DisableOrVisibleFields.WorkExperience&&n.perspeciality.WorkExperience==2?(n.DisableOrVisibleFields.MonthExperience=!0,n.DisableOrVisibleFields.DayExperience=!0):(n.DisableOrVisibleFields.MonthExperience=!1,n.DisableOrVisibleFields.DayExperience=!1,n.perspeciality.MonthExperience="",n.perspeciality.DayExperience=""),(f.isEmptyValue(n.DiplomaAbroad)||n.Klados.IsChanged||n.Country.IsChanged)&&(n.DiplomaAbroad="",n.DisableOrVisibleFields.Save=!1,f.getByParams({specialityId:n.perspeciality.Speciality1.selected.Id,countryId:n.perspeciality.Country.selected.Id},"/api/Diploma/getDiplomasBySpecAndCountry").then(function(t){n.diplomas=t;f.isEmptyValue(n.SelectedSpeciality.Diploma.Description)||n.Country.IsChanged||n.Klados.IsChanged?(n.Country.IsChanged||n.Klados.IsChanged)&&(n.DiplomaAbroad="",n.SelectedSpeciality.Diploma={Id:"",Description:"",Country:{Id:""}}):n.DiplomaAbroad=n.SelectedSpeciality.Diploma.Description},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των Κλάδων")})),n.DisableOrVisibleFields.Save=!0):(n.DisableOrVisibleFields.Save=!1,n.DisableOrVisibleFields.Diploma=!0,n.DisableOrVisibleFields.DiplomaAbroad=!1,n.DisableOrVisibleFields.DiplomaDate=!0,n.DisableOrVisibleFields.DiplomaDegree=!0,n.DisableOrVisibleFields.DiplomaDateAndGrade=!0,n.DisableOrVisibleFields.InitialRegistrationDate=!0,n.DisableOrVisibleFields.HasSpecialEducation=n.perspeciality.Speciality1.selected.HasSpecialEducation,n.DisableOrVisibleFields.ReStudy=!1,n.perspeciality.Speciality1.selected.IsMusic?(n.DisableOrVisibleFields.IsMusic=!0,n.perspeciality.Id==""&&(n.AddOrEditMusic=!0)):(n.DisableOrVisibleFields.IsMusic=!1,n.AddOrEditMusic=!1),n.DisableOrVisibleFields.WorkExperience=n.perspeciality.Speciality1.selected.OpenWorkExperience,n.DisableOrVisibleFields.WorkExperience||(n.perspeciality.WorkExperience=""),n.DisableOrVisibleFields.WorkExperience&&n.perspeciality.WorkExperience==2?(n.DisableOrVisibleFields.MonthExperience=!0,n.DisableOrVisibleFields.DayExperience=!0):(n.DisableOrVisibleFields.MonthExperience=!1,n.DisableOrVisibleFields.DayExperience=!1,n.perspeciality.MonthExperience="",n.perspeciality.DayExperience=""),f.isEmptyValue(n.perspeciality.Diploma.selected)||f.isEmptyValue(n.perspeciality.Diploma.selected.Id)||n.Klados.IsChanged?(n.perspeciality.Diploma.selected="",n.DisableOrVisibleFields.Save=!1,f.getByParams({specialityId:n.perspeciality.Speciality1.selected.Id,countryId:n.perspeciality.Country.selected.Id},"/api/Diploma/getDiplomasBySpecAndCountry").then(function(t){n.diplomas=t;f.isEmptyValue(n.SelectedSpeciality.Diploma.Id)||(n.perspeciality.Diploma.selected=e("filter")(n.diplomas,{Id:n.SelectedSpeciality.Diploma.Id},!0)[0],n.DisableOrVisibleFields.Save=!f.isEmptyValue(n.perspeciality.Diploma.selected)&&n.perspeciality.Diploma.selected.Id>0?!0:!1)},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των Κλάδων")})):n.DisableOrVisibleFields.Save=!f.isEmptyValue(n.perspeciality.Diploma.selected)&&n.perspeciality.Diploma.selected.Id>0?!0:!1),n.DisableOrVisibleFields.ReStudy&&n.perspeciality.ReStudy?n.DisableOrVisibleFields.DateofReStudy=!0:(n.DisableOrVisibleFields.DateofReStudy=!1,n.perspeciality.DateofReStudy=""),n.perspeciality.Speciality1.selected.OpenYearsOfStudy&&!f.isEmptyValue(n.perspeciality.DimplomaSource.selected.Id)?n.DisableOrVisibleFields.YearsOfStudy=!0:(n.DisableOrVisibleFields.YearsOfStudy=!1,n.perspeciality.YearsOfStudy=""),!f.isEmptyValue(n.perspeciality.Country.selected.Id)&&n.perspeciality.DimplomaSource.selected.Id>1&&!f.isEmptyValue(n.perspeciality.DiplomaDate)?f.isEmptyValue(n.perspeciality.EquivalenceType)&&(f.isEmptyValue(n.SelectedSpeciality.EquivalenceType)||(n.perspeciality.EquivalenceType=n.SelectedSpeciality.EquivalenceType),f.getByParams({specialityId:n.perspeciality.Speciality1.selected.Id,countryId:n.perspeciality.Country.selected.Id,sourceType:n.perspeciality.DimplomaSource.selected.Id,diplomaDate:n.perspeciality.DiplomaDate},"/api/Diploma/getEquivalenceTypes").then(function(t){n.consts.equivalenceType=t;f.isEmpty(n.consts.equivalenceType)?(n.DisableOrVisibleFields.EquivalenceType=!1,n.perspeciality.EquivalenceType="",n.perspeciality.MusicEquivalenceType=""):(n.DisableOrVisibleFields.EquivalenceType=!0,f.isEmptyValue(n.SelectedSpeciality.EquivalenceType)||(n.perspeciality.EquivalenceType=n.SelectedSpeciality.EquivalenceType,n.perspeciality.Speciality1.selected.IsPE1601&&n.perspeciality.EquivalenceType==14?(n.DisableOrVisibleFields.MusicEquivalenceType=!0,f.isEmptyValue(n.SelectedSpeciality.MusicEquivalenceType)||(n.perspeciality.MusicEquivalenceType=n.SelectedSpeciality.MusicEquivalenceType)):(n.DisableOrVisibleFields.MusicEquivalenceType=!1,n.perspeciality.MusicEquivalenceType="")))},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των επιλογών για Ακαδημαϊκή/Επαγγελματική Αναγνώριση")})):(n.DisableOrVisibleFields.EquivalenceType=!1,n.DisableOrVisibleFields.MusicEquivalenceType=!1,n.perspeciality.EquivalenceType="",n.perspeciality.MusicEquivalenceType=""),n.perspeciality.Speciality1.selected.OpenSimulation&&n.perspeciality.DimplomaSource.selected.Id==1&&(!f.isEmptyValue(n.perspeciality.Diploma.selected.Id)&&(n.perspeciality.Diploma.selected.Description.indexOf("2ΕΤΟΥΣ")>0||n.perspeciality.Diploma.selected.Description.indexOf("ΒΕΛΛΑΣ")>0||n.perspeciality.Diploma.selected.Description.indexOf("ΕΚΚΛ")>0)||f.isEmptyValue(n.perspeciality.Diploma.selected.Id)&&!f.isEmptyValue(n.SelectedSpeciality.Diploma.Id)&&(n.SelectedSpeciality.Diploma.Description.indexOf("2ΕΤΟΥΣ")>0||n.SelectedSpeciality.Diploma.Description.indexOf("ΒΕΛΛΑΣ")>0||n.SelectedSpeciality.Diploma.Description.indexOf("ΕΚΚΛ")>0))||n.perspeciality.Speciality1.selected.OpenSimulation&&n.perspeciality.DimplomaSource.selected.Id>1&&n.perspeciality.EquivalenceType==10?n.DisableOrVisibleFields.PD130Simulation=!0:(n.DisableOrVisibleFields.PD130Simulation=!1,n.perspeciality.PD130Simulation=!1,n.perspeciality.DateofSimulation="",n.perspeciality.SimulationDegree=""),n.DisableOrVisibleFields.PD130Simulation&&n.perspeciality.PD130Simulation?(n.DisableOrVisibleFields.DateofSimulation=!0,n.DisableOrVisibleFields.SimulationDegree=!0):(n.DisableOrVisibleFields.DateofSimulation=!1,n.DisableOrVisibleFields.SimulationDegree=!1,n.perspeciality.DateofSimulation="",n.perspeciality.SimulationDegree=""),n.perspeciality.Speciality1.selected.IsPE1601&&n.perspeciality.EquivalenceType==14?n.DisableOrVisibleFields.MusicEquivalenceType=!0:(n.DisableOrVisibleFields.MusicEquivalenceType=!1,n.perspeciality.MusicEquivalenceType="");$("#editSpecialityForm").validate().resetForm()};n.formFieldsEEPEBP=function(){var t,l,i,o,s;n.messageForAcademic=!1;n.IsAcademicQualificationRequired=!1;n.DisableOrVisibleFields.IsAcademicQualificationRequired=!1;n.DisableOrVisibleFields.DisableAcademicQualificationRequired=!1;n.perspeciality.Speciality1.selected.Code=="ΠΕ21"&&(f.isEmptyValue(n.perspeciality.DimplomaSource.selected)||n.perspeciality.DimplomaSource.selected.Id==1)&&(n.IsAcademicQualificationRequired=!1,n.DisableOrVisibleFields.IsAcademicQualificationRequired=!0,n.DisableOrVisibleFields.DisableAcademicQualificationRequired=!1);f.isEmptyValue(n.perspeciality.Speciality1.selected)||(n.maxDate=new Date(n.perspeciality.Speciality1.selected.LimitationDate),f.isEmptyValue(n.Klados.Id)?(n.Klados.Id=n.perspeciality.Speciality1.selected.Id,n.Klados.IsChanged=!1):n.Klados.Id!=n.perspeciality.Speciality1.selected.Id?(n.Klados.Id=n.perspeciality.Speciality1.selected.Id,n.Klados.IsChanged=!0):n.Klados.IsChanged=!1,n.showUploadFile=!f.isEmptyValue(n.perspeciality.DimplomaSource)&&n.perspeciality.DimplomaSource.selected.Id>1?!0:!1,n.perspeciality.Speciality1.selected.Code=="ΠΕ25"?(f.isEmptyValue(n.consts.NursesOrHealthVisitorsTypes)&&f.isEmptyValue(n.consts.NursesOrHealthVisitorsTypes)&&f.getByAll("/api/Diploma/getAllNursesOrHealthVisitorsTypes").then(function(t){n.consts.NursesOrHealthVisitorsTypes=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση επιλογών")}),n.DisableOrVisibleFields.NursesOrHealthVisitors=!0):(n.DisableOrVisibleFields.NursesOrHealthVisitors=!1,n.perspeciality.NursesOrHealthVisitorsType="",n.perspeciality.NursesOrHealthVisitors=!1,n.perspeciality.NursesOrHealthVisitorsNumber="",n.perspeciality.NursesOrHealthVisitorsDateFrom="",n.perspeciality.NursesOrHealthVisitorsDateTo=""),n.de01EEP=n.perspeciality.Speciality1.selected.Code=="ΔΕ01"?!0:!1,n.perspeciality.Speciality1.selected.Code=="ΠΕ30"?(f.isEmptyValue(n.consts.AeiOrTeiType)&&f.isEmptyValue(n.consts.AeiOrTeiType)&&f.getByAll("/api/Diploma/getAllAeiOrTeiTypes").then(function(t){n.consts.AeiOrTeiType=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση επιλογών")}),n.DisableOrVisibleFields.AeiOrTei=!0):(n.DisableOrVisibleFields.AeiOrTei=!1,n.perspeciality.AeiOrTei=""),f.isEmptyValue(n.AeiOrTei.Id)?(n.AeiOrTei.Id=n.perspeciality.AeiOrTei,n.AeiOrTei.IsChanged=!1):n.AeiOrTei.Id!=n.perspeciality.AeiOrTei?(n.AeiOrTei.Id=n.perspeciality.AeiOrTei,n.AeiOrTei.IsChanged=!0):n.AeiOrTei.IsChanged=!1,f.isEmptyValue(n.NursesOrHealthVisitorsType.Id)?(n.NursesOrHealthVisitorsType.Id=n.perspeciality.NursesOrHealthVisitorsType,n.NursesOrHealthVisitorsType.IsChanged=!1):n.NursesOrHealthVisitorsType.Id!=n.perspeciality.NursesOrHealthVisitorsType?(n.NursesOrHealthVisitorsType.Id=n.perspeciality.NursesOrHealthVisitorsType,n.NursesOrHealthVisitorsType.IsChanged=!0):n.NursesOrHealthVisitorsType.IsChanged=!1,f.isEmptyValue(n.DiplomaSource.Id)?(n.DiplomaSource.Id=n.perspeciality.DimplomaSource.selected.Id,n.DiplomaSource.IsChanged=!1):n.DiplomaSource.Id!=n.perspeciality.DimplomaSource.selected.Id?(n.DiplomaSource.Id=n.perspeciality.DimplomaSource.selected.Id,n.DiplomaSource.IsChanged=!0):n.DiplomaSource.IsChanged=!1,f.isEmptyValue(n.SelectedSpeciality.Diploma)||(!f.isEmptyValue(n.Country.Id)||f.isEmptyValue(n.SelectedSpeciality.Diploma.Country.Id)&&f.isEmptyValue(n.perspeciality.Country.selected.Id)?f.isEmptyValue(n.Country.Id)||f.isEmptyValue(n.SelectedSpeciality.Diploma.Country.Id)&&f.isEmptyValue(n.perspeciality.Country.selected.Id)?n.Country.IsChanged=!1:f.isEmptyValue(n.perspeciality.Country.selected.Id)?f.isEmptyValue(n.SelectedSpeciality.Diploma.Country.Id)?n.Country.IsChanged=!1:n.Country.Id!=n.SelectedSpeciality.Diploma.Country.Id?(n.Country.Id=n.SelectedSpeciality.Diploma.Country.Id,n.Country.IsChanged=!0):n.Country.IsChanged=!1:n.Country.Id!=n.perspeciality.Country.selected.Id?(n.Country.Id=n.perspeciality.Country.selected.Id,n.Country.IsChanged=!0):n.Country.IsChanged=!1:(n.Country.Id=f.isEmptyValue(n.SelectedSpeciality.Diploma.Country.Id)?n.perspeciality.Country.selected.Id:n.SelectedSpeciality.Diploma.Country.Id,n.Country.IsChanged=!1)),f.isEmptyValue(n.DiplomaDate.Id)&&!f.isEmptyValue(n.perspeciality.DiplomaDate)?(n.DiplomaDate.Id=n.perspeciality.DiplomaDate,n.DiplomaDate.IsChanged=!1):f.isEmptyValue(n.DiplomaDate.Id)||f.isEmptyValue(n.perspeciality.DiplomaDate)?n.DiplomaDate.IsChanged=!1:n.DiplomaDate.Id!=n.perspeciality.DiplomaDate?(n.DiplomaDate.Id=n.perspeciality.DiplomaDate,n.DiplomaDate.IsChanged=!0):n.DiplomaDate.IsChanged=!1,n.AcademicQualificationRequired.Id==n.perspeciality.IsAcademicQualificationRequired?n.AcademicQualificationRequired.IsChanged=!1:n.AcademicQualificationRequired.Id!=n.perspeciality.IsAcademicQualificationRequired?(n.AcademicQualificationRequired.Id=n.perspeciality.IsAcademicQualificationRequired,n.AcademicQualificationRequired.IsChanged=!0):n.AcademicQualificationRequired.IsChanged=!1,n.FillRealDiplomaDate(),n.Klados.IsChanged&&(n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΕΠ"&&n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΚΙΝ"&&n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΝΟ"?(angular.copy(e("filter")(n.academicQualifications,{IsEEPEBP:!0},!0),n.FilterAcademicQualifications),n.FilterAcademicQualifications=e("filter")(n.FilterAcademicQualifications,function(n){return n.Id!==14})):angular.copy(e("filter")(n.academicQualifications,{IsEEPEBP:!0},!0),n.FilterAcademicQualifications)),n.DiplomaSource.IsChanged&&n.perspeciality.Speciality1.selected.Code=="ΠΕ23"&&(n.perspeciality.IsAcademicQualificationRequired=!1),t=["ΠΕ60","ΠΕ61","ΠΕ70","ΠΕ71","ΠΕ73","ΠΕ17.01","ΠΕ17.02","ΠΕ17.03","ΠΕ17.04"],l="2016-01-01",f.isEmptyValue(n.perspeciality.DiplomaDate)?n.InitialRegistrationDateRequired=!0:(n.InitialRegistrationDateRequired=t.indexOf(n.perspeciality.Speciality1.selected.Code)!=-1||n.perspeciality.DiplomaDate<"2016-01-01"?!1:!0,n.minDate=n.perspeciality.DiplomaDate),n.DisableOrVisibleFields.DimplomaSource=!0,n.disableDiplomaAbroad=!1,n.disableEquivalenceType=!1,f.isEmptyValue(n.perspeciality.DimplomaSource.selected.Id)||(n.perspeciality.DimplomaSource.selected.Id==1?(n.perspeciality.Country.selected.Id!=3&&(n.Countries=e("filter")(n.consts.Countries,{DiplomaSource:n.perspeciality.DimplomaSource.selected.Id},!0),n.perspeciality.Country.selected=n.Countries[0]),n.DisableOrVisibleFields.Country=!1):(f.isEmptyValue(n.perspeciality.Country.selected.Id)||n.perspeciality.Country.selected.Id==3||n.perspeciality.Country.selected.DiplomaSource==2&&n.perspeciality.DimplomaSource.selected.Id!=2||n.perspeciality.Country.selected.DiplomaSource==3&&n.perspeciality.DimplomaSource.selected.Id!=3?(n.Countries=e("filter")(n.consts.Countries,{DiplomaSource:n.perspeciality.DimplomaSource.selected.Id},!0),n.perspeciality.Country.selected=""):f.isEmptyValue(n.SelectedSpeciality.Diploma)||f.isEmptyValue(n.SelectedSpeciality.Diploma.Country.Id)||n.Country.IsChanged||(n.Countries=e("filter")(n.consts.Countries,{DiplomaSource:n.perspeciality.DimplomaSource.selected.Id},!0),n.perspeciality.Country.selected=e("filter")(n.consts.Countries,{Id:n.SelectedSpeciality.Diploma.Country.Id},!0)[0]),n.DisableOrVisibleFields.Country=!0)),f.isEmptyValue(n.perspeciality.DimplomaSource.selected)||n.perspeciality.DimplomaSource.selected.Id!=1||f.isEmptyValue(n.perspeciality.Country.selected)?f.isEmptyValue(n.perspeciality.DimplomaSource.selected)||n.perspeciality.DimplomaSource.selected.Id==1||f.isEmptyValue(n.perspeciality.Country.selected)?(n.DisableOrVisibleFields.Diploma=!1,n.DisableOrVisibleFields.DiplomaAbroad=!1,n.DisableOrVisibleFields.DiplomaDate=!1,n.DisableOrVisibleFields.DiplomaDegree=!1,n.DisableOrVisibleFields.DiplomaDateAndGrade=!1,n.DisableOrVisibleFields.InitialRegistrationDate=!1,n.DisableOrVisibleFields.HasSpecialEducation=!1,n.DisableOrVisibleFields.ReStudy=!1,n.DisableOrVisibleFields.WorkExperienceEEPEBP=!1,n.DisableOrVisibleFields.YearExperienceEEPEBP=!1,n.DisableOrVisibleFields.MonthExperienceEEPEBP=!1,n.DisableOrVisibleFields.DayExperienceEEPEBP=!1,n.DisableOrVisibleFields.Save=!1,n.perspeciality.Diploma.selected="",n.DiplomaAbroad="",n.perspeciality.ProfessionLicence=!1,(f.isEmptyValue(n.SelectedSpeciality.WorkExperienceEEPEBP)||n.Klados.IsChanged)&&(n.perspeciality.WorkExperienceEEPEBP=""),(f.isEmptyValue(n.SelectedSpeciality.YearExperienceEEPEBP)||n.Klados.IsChanged)&&(n.perspeciality.YearExperienceEEPEBP=""),(f.isEmptyValue(n.SelectedSpeciality.MonthExperienceEEPEBP)||n.Klados.IsChanged)&&(n.perspeciality.MonthExperienceEEPEBP=""),(f.isEmptyValue(n.SelectedSpeciality.DayExperienceEEPEBP)||n.Klados.IsChanged)&&(n.perspeciality.DayExperienceEEPEBP="")):(n.DisableOrVisibleFields.Save=!1,n.DisableOrVisibleFields.Diploma=!1,n.DisableOrVisibleFields.DiplomaAbroad=!0,n.DisableOrVisibleFields.DiplomaDate=!0,n.DisableOrVisibleFields.DiplomaDegree=!0,n.DisableOrVisibleFields.DiplomaDateAndGrade=!0,n.DisableOrVisibleFields.InitialRegistrationDate=!0,n.DisableOrVisibleFields.Save=!0,(f.isEmptyValue(n.DiplomaAbroad)||n.Klados.IsChanged||n.Country.IsChanged)&&(n.DiplomaAbroad="",n.DisableOrVisibleFields.Save=!1,f.getByParams({specialityId:n.perspeciality.Speciality1.selected.Id,countryId:n.perspeciality.Country.selected.Id},"/api/Diploma/getDiplomasBySpecAndCountry").then(function(t){n.diplomas=t;f.isEmptyValue(n.SelectedSpeciality.Diploma.Description)||n.Country.IsChanged||n.Klados.IsChanged?(n.Country.IsChanged||n.Klados.IsChanged)&&(n.DiplomaAbroad="",n.SelectedSpeciality.Diploma={Id:"",Description:"",Country:{Id:""}}):n.DiplomaAbroad=n.SelectedSpeciality.Diploma.Description},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των Κλάδων")})),n.DisableOrVisibleFields.Save=!0):(n.DisableOrVisibleFields.Save=!1,v.indexOf(n.perspeciality.Speciality1.selected.Code)!=-1&&(n.perspeciality.Speciality1.selected.Code!="ΠΕ21"||n.perspeciality.IsAcademicQualificationRequired)?(n.perspeciality.Speciality1.selected.Code=="ΠΕ21"&&(f.isEmptyValue(n.perspeciality.DimplomaSource.selected)||n.perspeciality.DimplomaSource.selected.Id==1)?(n.IsAcademicQualificationRequired=!1,n.DisableOrVisibleFields.IsAcademicQualificationRequired=!0,n.DisableOrVisibleFields.DisableAcademicQualificationRequired=!1):(n.IsAcademicQualificationRequired=!1,n.DisableOrVisibleFields.DisableAcademicQualificationRequired=!1,n.DisableOrVisibleFields.IsAcademicQualificationRequired=!1),n.DisableOrVisibleFields.Save=!1,n.DisableOrVisibleFields.Diploma=!1,n.DisableOrVisibleFields.DiplomaAbroad=!0,n.DisableOrVisibleFields.DiplomaDate=!0,n.DisableOrVisibleFields.DiplomaDegree=!0,n.DisableOrVisibleFields.DiplomaDateAndGrade=!0,n.DisableOrVisibleFields.InitialRegistrationDate=!0,n.DisableOrVisibleFields.Save=!0,(f.isEmptyValue(n.DiplomaAbroad)||n.Klados.IsChanged||n.Country.IsChanged)&&(n.DiplomaAbroad="",n.DisableOrVisibleFields.Save=!1,f.getByParams({specialityId:n.perspeciality.Speciality1.selected.Id,countryId:n.perspeciality.Country.selected.Id},"/api/Diploma/getDiplomasBySpecAndCountry").then(function(t){n.diplomas=t;f.isEmptyValue(n.SelectedSpeciality.Diploma.Description)||n.Country.IsChanged||n.Klados.IsChanged?(n.Country.IsChanged||n.Klados.IsChanged)&&(n.DiplomaAbroad="",n.SelectedSpeciality.Diploma={Id:"",Description:"",Country:{Id:""}}):n.DiplomaAbroad=n.SelectedSpeciality.Diploma.Description},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των Κλάδων")})),n.DisableOrVisibleFields.Save=!0):(n.perspeciality.Speciality1.selected.Code=="ΠΕ25"&&f.isEmptyValue(n.perspeciality.NursesOrHealthVisitorsType)||n.perspeciality.Speciality1.selected.Code=="ΠΕ30"&&f.isEmptyValue(n.perspeciality.AeiOrTei)?(n.DisableOrVisibleFields.Diploma=!1,n.DisableOrVisibleFields.DiplomaAbroad=!1,n.DisableOrVisibleFields.DiplomaDate=!1,n.DisableOrVisibleFields.DiplomaDegree=!1,n.DisableOrVisibleFields.DiplomaDateAndGrade=!1,n.DisableOrVisibleFields.InitialRegistrationDate=!1):n.perspeciality.Speciality1.selected.Code=="ΠΕ21"&&n.perspeciality.IsAcademicQualificationRequired?(n.DisableOrVisibleFields.Diploma=!1,n.DisableOrVisibleFields.DiplomaAbroad=!0,n.DisableOrVisibleFields.DiplomaDate=!0,n.DisableOrVisibleFields.DiplomaDegree=!0,n.DisableOrVisibleFields.DiplomaDateAndGrade=!0,n.DisableOrVisibleFields.InitialRegistrationDate=!0):(n.DisableOrVisibleFields.Diploma=!0,n.DisableOrVisibleFields.DiplomaAbroad=!1,n.DisableOrVisibleFields.DiplomaDate=!0,n.DisableOrVisibleFields.DiplomaDegree=!0,n.DisableOrVisibleFields.DiplomaDateAndGrade=!0,n.DisableOrVisibleFields.InitialRegistrationDate=!0),f.isEmptyValue(n.perspeciality.Diploma.selected)||f.isEmptyValue(n.perspeciality.Diploma.selected.Id)||n.Klados.IsChanged||n.AeiOrTei.IsChanged||n.NursesOrHealthVisitorsType.IsChanged||n.AcademicQualificationRequired.IsChanged?(n.perspeciality.Diploma.selected="",n.DisableOrVisibleFields.Save=!1,f.getByParams({specialityId:n.perspeciality.Speciality1.selected.Id,countryId:n.perspeciality.Country.selected.Id},"/api/Diploma/getDiplomasBySpecAndCountry").then(function(t){n.consts.diplomas=t;n.diplomas=t;n.diplomas=n.perspeciality.Speciality1.selected.Code=="ΠΕ30"&&!f.isEmptyValue(n.perspeciality.AeiOrTei)&&n.perspeciality.AeiOrTei>0&&n.perspeciality.DimplomaSource.selected.Id==1?e("filter")(n.consts.diplomas,{AeiOrTei:n.perspeciality.AeiOrTei},!0):n.perspeciality.Speciality1.selected.Code=="ΠΕ25"&&!f.isEmptyValue(n.perspeciality.NursesOrHealthVisitorsType)&&n.perspeciality.NursesOrHealthVisitorsType>0&&n.perspeciality.DimplomaSource.selected.Id==1?e("filter")(n.consts.diplomas,{AeiOrTei:n.perspeciality.NursesOrHealthVisitorsType},!0):n.perspeciality.Speciality1.selected.Code=="ΠΕ21"&&n.perspeciality.DimplomaSource.selected.Id==1?e("filter")(n.consts.diplomas,{DiplomaForList:!n.perspeciality.IsAcademicQualificationRequired},!0):n.consts.diplomas;f.isEmptyValue(n.SelectedSpeciality.Diploma.Id)||(n.perspeciality.Diploma.selected=e("filter")(n.diplomas,{Id:n.SelectedSpeciality.Diploma.Id},!0)[0],n.perspeciality.Speciality1.selected.Code=="ΠΕ23"&&(f.isEmptyValue(n.perspeciality.DimplomaSource)||n.perspeciality.DimplomaSource.selected.Id!=1?(n.IsAcademicQualificationRequired=!1,n.DisableOrVisibleFields.IsAcademicQualificationRequired=!0,n.DisableOrVisibleFields.DisableAcademicQualificationRequired=!1):c.indexOf(n.perspeciality.Diploma.selected.Id)!=-1?(n.IsAcademicQualificationRequired=!0,n.perspeciality.IsAcademicQualificationRequired=!0,n.DisableOrVisibleFields.IsAcademicQualificationRequired=!0,n.DisableOrVisibleFields.DisableAcademicQualificationRequired=!0):(n.IsAcademicQualificationRequired=!1,n.DisableOrVisibleFields.IsAcademicQualificationRequired=!1,n.DisableOrVisibleFields.DisableAcademicQualificationRequired=!1)));n.DisableOrVisibleFields.Save=!f.isEmptyValue(n.perspeciality.Diploma.selected)&&n.perspeciality.Diploma.selected.Id>0||n.perspeciality.Speciality1.selected.Code=="ΠΕ21"&&n.perspeciality.IsAcademicQualificationRequired?!0:!1},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των Κλάδων")})):(n.DisableOrVisibleFields.Save=!f.isEmptyValue(n.perspeciality.Diploma.selected)&&n.perspeciality.Diploma.selected.Id>0?!0:!1,!f.isEmptyValue(n.perspeciality.Diploma.selected)&&n.perspeciality.Diploma.selected.Id>0&&n.perspeciality.Speciality1.selected.Code=="ΠΕ23"?c.indexOf(n.perspeciality.Diploma.selected.Id)!=-1?(n.IsAcademicQualificationRequired=!0,n.perspeciality.IsAcademicQualificationRequired=!0,n.DisableOrVisibleFields.IsAcademicQualificationRequired=!0,n.DisableOrVisibleFields.DisableAcademicQualificationRequired=!0):(n.IsAcademicQualificationRequired=!1,n.DisableOrVisibleFields.IsAcademicQualificationRequired=!1,n.DisableOrVisibleFields.DisableAcademicQualificationRequired=!1):(n.IsAcademicQualificationRequired=!1,n.DisableOrVisibleFields.DisableAcademicQualificationRequired=!1,n.DisableOrVisibleFields.IsAcademicQualificationRequired=!1)))),n.perspeciality.Speciality1.selected.Code=="ΠΕ23"&&!f.isEmptyValue(n.perspeciality.DimplomaSource.selected)&&n.perspeciality.DimplomaSource.selected.Id>1?(n.IsAcademicQualificationRequired=!1,n.DisableOrVisibleFields.IsAcademicQualificationRequired=!0,n.DisableOrVisibleFields.DisableAcademicQualificationRequired=!1):n.perspeciality.Speciality1.selected.Code!="ΠΕ23"||n.perspeciality.DimplomaSource.selected.Id!=1||(f.isEmptyValue(n.perspeciality.Diploma.selected)||c.indexOf(n.perspeciality.Diploma.selected.Id)==-1)&&(f.isEmptyValue(n.SelectedSpeciality.Diploma.Id)||c.indexOf(n.SelectedSpeciality.Diploma.Id)==-1)?n.perspeciality.Speciality1.selected.Code=="ΠΕ23"&&n.perspeciality.DimplomaSource.selected.Id==1&&f.isEmptyValue(n.perspeciality.Diploma.selected)&&(n.IsAcademicQualificationRequired=!1):(n.IsAcademicQualificationRequired=!0,n.DisableOrVisibleFields.IsAcademicQualificationRequired=!1,n.DisableOrVisibleFields.DisableAcademicQualificationRequired=!0),(n.perspeciality.Speciality1.selected.Code=="ΠΕ22"||n.perspeciality.Speciality1.selected.Code=="ΠΕ31ΕΠ"||n.perspeciality.Speciality1.selected.Code=="ΠΕ31ΚΙΝ"||n.perspeciality.Speciality1.selected.Code=="ΠΕ31ΝΟ")&&(n.IsAcademicQualificationRequired=!0,n.perspeciality.IsAcademicQualificationRequired=!0,n.DisableOrVisibleFields.IsAcademicQualificationRequired=!0,n.DisableOrVisibleFields.DisableAcademicQualificationRequired=!0),i=["ΠΕ21","ΠΕ22","ΠΕ31ΕΠ","ΠΕ31ΚΙΝ","ΠΕ31ΝΟ"],(i.indexOf(n.perspeciality.Speciality1.selected.Code)!=-1&&!f.isEmptyValue(n.perspeciality.DimplomaSource.selected)||n.IsAcademicQualificationRequired)&&f.getByParams({personId:h},"/api/PersonAcademicQualification/getPersonAcademicQualificationEEPEBP").then(function(t){var i=t;n.consts.PersonAcademicQualification=n.perspeciality.Speciality1.selected.Code=="ΠΕ31ΕΠ"||n.perspeciality.Speciality1.selected.Code=="ΠΕ31ΚΙΝ"||n.perspeciality.Speciality1.selected.Code=="ΠΕ31ΝΟ"?i:e("filter")(i,function(n){return n.AcademicDiplomaId!==14});n.DisableOrVisibleFields.IsAcademicQualificationRequired=!0},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση επιλογών")}),!f.isEmptyValue(n.perspeciality.DimplomaSource.selected)&&n.perspeciality.DimplomaSource.selected.Id>=1&&!f.isEmptyValue(n.perspeciality.Country.selected)?(n.perspeciality.IsAcademicQualificationRequired?n.DisableOrVisibleFields.PersonAcademicQualification=!0:(n.DisableOrVisibleFields.PersonAcademicQualification=!1,n.perspeciality.PersonAcademicQualificationId=""),o=["ΠΕ21","ΠΕ26","ΠΕ23","ΠΕ24","ΠΕ25","ΠΕ28","ΠΕ29","ΠΕ30"],o.indexOf(n.perspeciality.Speciality1.selected.Code)!=-1?(f.isEmpty(n.consts.ProfessionLicenceBody)&&f.getByAll("/api/PersonSpeciality/getProfessionLicenceBody").then(function(t){n.consts.ProfessionLicenceBody=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των φορέων")}),n.DisableOrVisibleFields.ProfessionLicence=!0):(n.DisableOrVisibleFields.ProfessionLicence=!1,n.perspeciality.ProfessionLicence="",n.perspeciality.ProfessionLicenceDate="",n.perspeciality.ProfessionLicenceBodyId="",n.perspeciality.ProfessionLicenceNumber=""),n.perspeciality.ProfessionLicence||(n.perspeciality.ProfessionLicence="",n.perspeciality.ProfessionLicenceDate="",n.perspeciality.ProfessionLicenceBodyId="",n.perspeciality.ProfessionLicenceNumber=""),n.perspeciality.Speciality1.selected.Code=="ΔΕ01"?(f.isEmptyValue(n.consts.De1DimplomaType)&&(s=u.all([f.getByAll("/api/Diploma/getDe1DimplomaTypes"),f.getByAll("/api/Diploma/getCertificateDE1Types")]),s.then(function(t){n.consts.De1DimplomaType=t[0];n.consts.CertificateDE1Type=t[1]})),n.DisableOrVisibleFields.De1DimplomaType=!0,f.isEmptyValue(n.perspeciality.De1DimplomaType)||n.perspeciality.De1DimplomaType!=1&&n.perspeciality.De1DimplomaType!=6?(n.DisableOrVisibleFields.De1DimplomaTypeDetails=!1,n.perspeciality.CertificateDE1="",n.perspeciality.CertificateDE1Date=""):n.DisableOrVisibleFields.De1DimplomaTypeDetails=!0):(n.DisableOrVisibleFields.De1DimplomaType=!1,n.perspeciality.De1DimplomaType="",n.perspeciality.CertificateDE1="",n.perspeciality.CertificateDE1Date="",n.DisableOrVisibleFields.De1DimplomaTypeDetails=!1,n.perspeciality.CertificateDE1="",n.perspeciality.CertificateDE1Date=""),n.perspeciality.Speciality1.selected.Code=="ΠΕ24"?(n.DisableOrVisibleFields.ChildPsychiatrist=!0,n.perspeciality.MedicalAssociation||(n.MedicalAssociationNumber="",n.MedicalAssociationDateFrom="",n.MedicalAssociationDateTo=""),n.perspeciality.ChildPsychiatrist||(n.perspeciality.ChildPsychiatristDate="")):(n.DisableOrVisibleFields.ChildPsychiatrist=!1,n.perspeciality.ChildPsychiatrist="",n.perspeciality.ChildPsychiatristDate="",n.perspeciality.MedicalAssociation="",n.perspeciality.CountrysideService="",n.MedicalAssociationNumber="",n.MedicalAssociationDateFrom="",n.MedicalAssociationDateTo=""),n.perspeciality.Speciality1.selected.Code=="ΠΕ28"?n.DisableOrVisibleFields.Physiotherapists=!0:(n.DisableOrVisibleFields.Physiotherapists=!1,n.perspeciality.Physiotherapists="",n.perspeciality.PhysiotherapistsNumber="",n.perspeciality.PhysiotherapistsDateFrom="",n.perspeciality.PhysiotherapistsDateTo=""),n.perspeciality.Speciality1.selected.Code=="ΠΕ31ΕΠ"||n.perspeciality.Speciality1.selected.Code=="ΠΕ31ΚΙΝ"||n.perspeciality.Speciality1.selected.Code=="ΠΕ31ΝΟ"?(n.DisableOrVisibleFields.WorkExperienceEEPEBP=!0,n.DisableOrVisibleFields.WorkExperienceEEPEBP||(n.perspeciality.WorkExperienceEEPEBP=""),n.DisableOrVisibleFields.WorkExperienceEEPEBP&&n.perspeciality.WorkExperienceEEPEBP==1?(n.DisableOrVisibleFields.YearExperienceEEPEBP=!0,n.DisableOrVisibleFields.MonthExperienceEEPEBP=!0,n.DisableOrVisibleFields.DayExperienceEEPEBP=!0):(n.DisableOrVisibleFields.WorkExperienceEEPEBP=!1,n.DisableOrVisibleFields.YearExperienceEEPEBP=!1,n.DisableOrVisibleFields.MonthExperienceEEPEBP=!1,n.DisableOrVisibleFields.DayExperienceEEPEBP=!1,n.perspeciality.WorkExperienceEEPEBP="",n.perspeciality.YearExperienceEEPEBP="",n.perspeciality.MonthExperienceEEPEBP="",n.perspeciality.DayExperienceEEPEBP="")):(n.DisableOrVisibleFields.WorkExperienceEEPEBP=!1,n.DisableOrVisibleFields.YearExperienceEEPEBP=!1,n.DisableOrVisibleFields.MonthExperienceEEPEBP=!1,n.DisableOrVisibleFields.DayExperienceEEPEBP=!1,n.perspeciality.WorkExperienceEEPEBP="",n.perspeciality.YearExperienceEEPEBP="",n.perspeciality.MonthExperienceEEPEBP="",n.perspeciality.DayExperienceEEPEBP="")):(n.DisableOrVisibleFields.PersonAcademicQualification=!1,n.perspeciality.PersonAcademicQualificationId="",n.DisableOrVisibleFields.ProfessionLicence=!1,n.perspeciality.ProfessionLicence="",n.perspeciality.ProfessionLicenceDate="",n.perspeciality.ProfessionLicenceBodyId="",n.perspeciality.ProfessionLicenceNumber="",n.DisableOrVisibleFields.De1DimplomaType=!1,n.perspeciality.De1DimplomaType="",n.perspeciality.CertificateDE1="",n.perspeciality.CertificateDE1Date="",n.DisableOrVisibleFields.ChildPsychiatrist=!1,n.perspeciality.ChildPsychiatrist="",n.perspeciality.ChildPsychiatristDate="",n.perspeciality.MedicalAssociation="",n.perspeciality.CountrysideService="",n.perspeciality.MedicalAssociationNumber="",n.perspeciality.MedicalAssociationDateFrom="",n.perspeciality.MedicalAssociationDateTo="",n.DisableOrVisibleFields.Physiotherapists=!1,n.perspeciality.Physiotherapists="",n.perspeciality.PhysiotherapistsNumber="",n.perspeciality.PhysiotherapistsDateFrom="",n.perspeciality.PhysiotherapistsDateTo="",n.perspeciality.AeiOrTei="",n.DisableOrVisibleFields.AeiOrTei=!1,n.DisableOrVisibleFields.WorkExperienceEEPEBP=!1,n.perspeciality.WorkExperienceEEPEBP=""),!f.isEmptyValue(n.perspeciality.Country.selected.Id)&&n.perspeciality.DimplomaSource.selected.Id>1&&!f.isEmptyValue(n.perspeciality.DiplomaDate)?f.isEmptyValue(n.perspeciality.EquivalenceType)&&(f.isEmptyValue(n.SelectedSpeciality.EquivalenceType)||(n.perspeciality.EquivalenceType=n.SelectedSpeciality.EquivalenceType),f.getByAll("/api/Diploma/getAllequivalenceTypes").then(function(t){n.consts.equivalenceEEPEBPType=t;f.isEmpty(n.consts.equivalenceEEPEBPType)?(n.DisableOrVisibleFields.EquivalenceType=!1,n.perspeciality.EquivalenceType="",n.perspeciality.MusicEquivalenceType=""):(n.DisableOrVisibleFields.EquivalenceType=!0,f.isEmptyValue(n.SelectedSpeciality.EquivalenceType)||(n.perspeciality.EquivalenceType=n.SelectedSpeciality.EquivalenceType))},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των επιλογών για Ακαδημαϊκή/Επαγγελματική Αναγνώριση")})):(n.DisableOrVisibleFields.EquivalenceType=!1,n.DisableOrVisibleFields.MusicEquivalenceType=!1,n.perspeciality.EquivalenceType="",n.perspeciality.MusicEquivalenceType=""));$("#editSpecialityEEPEBPForm").validate().resetForm()};n.formFieldsAcademic=function(){var t;n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΕΠ"&&n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΚΙΝ"&&n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΝΟ"&&(n.FilterAcademicQualifications=e("filter")(n.FilterAcademicQualifications,function(n){return n.Id!==14}));f.isEmptyValue(n.peracademicqual.AcademicQualification)||(f.isEmptyValue(n.AcademicQualification.Id)?(n.AcademicQualification.Id=n.peracademicqual.AcademicQualification.Id,n.AcademicQualification.IsChanged=!1):n.AcademicQualification.Id!=n.peracademicqual.AcademicQualification.Id?(n.AcademicQualification.Id=n.peracademicqual.AcademicQualification.Id,n.AcademicQualification.IsChanged=!0):n.AcademicQualification.IsChanged=!1,f.isEmptyValue(n.DiplomaSourceAcademic.Id)&&!f.isEmptyValue(n.peracademicqual.DiplomaSource)?(n.DiplomaSourceAcademic.Id=n.peracademicqual.DiplomaSource,n.DiplomaSourceAcademic.IsChanged=!1):f.isEmptyValue(n.DiplomaSourceAcademic.Id)||f.isEmptyValue(n.peracademicqual.DiplomaSource)?n.DiplomaSourceAcademic.IsChanged=!1:n.DiplomaSourceAcademic.Id!=n.peracademicqual.DiplomaSource?(n.DiplomaSourceAcademic.Id=n.peracademicqual.DiplomaSource,n.DiplomaSourceAcademic.IsChanged=!0,n.peracademicqual.AcademicDiploma.Country=""):n.DiplomaSourceAcademic.IsChanged=!1,!f.isEmptyValue(n.CountryAcademic.Id)||f.isEmptyValue(n.peracademicqual.AcademicDiploma)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?f.isEmptyValue(n.CountryAcademic.Id)||f.isEmptyValue(n.peracademicqual.AcademicDiploma)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?n.CountryAcademic.IsChanged=!1:n.CountryAcademic.Id!=n.peracademicqual.AcademicDiploma.Country.Id?(n.CountryAcademic.Id=n.peracademicqual.AcademicDiploma.Country.Id,n.CountryAcademic.IsChanged=!0):n.CountryAcademic.IsChanged=!1:(n.CountryAcademic.Id=n.peracademicqual.AcademicDiploma.Country.Id,n.CountryAcademic.IsChanged=!1),n.peracademicqual.AcademicQualification.Id==14?(n.peracademicqual.FirstSpeciality="",n.peracademicqual.DiplomaDegree="",n.peracademicqual.DiplomaSource="",n.DisableFieldsEEPEBP.EEPEBP=n.peracademicqual.AcademicQualification.IsEEPEBP&&n.peracademicqual.DiplomaSource?!0:!1,f.isEmptyValue(n.peracademicqual.AcademicDiploma)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||(n.peracademicqual.AcademicDiploma.Country=""),n.peracademicqual.EquivalenceType="",n.DisableOrVisibleFieldsAcademic={AcademicQualification:!0,FirstSpeciality:!1,DimplomaSource:!1,Country:!1,DiplomaDate:!0,DiplomaDegree:!1,DiplomaDateAndGrade:!0,AcademicDiploma:!1,DiplomaAbroad:!0,Relevancy:!1,EquivalenceType:!1,Save:!0}):(f.isEmptyValue(n.peracademicqual.Id)&&(n.peracademicqual.Relevancy=!1),n.peracademicqual.FirstSpeciality="",n.peracademicqual.AcademicQualification.IsEEPEBP&&n.peracademicqual.DiplomaSource?(n.DisableFieldsEEPEBP.EEPEBP=!0,n.DisableFieldsEEPEBP.RelevancySchoolPhychology=!0):(n.DisableFieldsEEPEBP.EEPEBP=!1,n.DisableFieldsEEPEBP.RelevancySchoolPhychology=!1),n.DisableOrVisibleFieldsAcademic.AcademicQualification=!0,n.DisableOrVisibleFieldsAcademic.DimplomaSource=!0,n.DisableOrVisibleFieldsAcademic.FirstSpeciality=!1,!f.isEmptyValue(n.peracademicqual.DiplomaSource)&&n.peracademicqual.DiplomaSource>1?(n.DisableOrVisibleFieldsAcademic.Country=!0,(n.AcademicQualification.IsChanged||f.isEmptyValue(n.countriesAcademic)||n.countriesAcademic[0].Id==3)&&(n.peracademicqual.AcademicQualification.IsEEPEBP?f.getByAll("/api/Country/getCountriesWithoutGreece").then(function(t){n.countriesAcademic=t;n.academicDiplomas=""},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):f.getByParams({AcademicQualificationId:n.peracademicqual.AcademicQualification.Id},"/api/Country/getCountriesByAcademicQualificationId").then(function(t){n.countriesAcademic=t;n.academicDiplomas=""},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})),(n.AcademicQualification.IsChanged||n.DiplomaSourceAcademic.IsChanged||n.CountryAcademic.IsChanged||f.isEmptyValue(n.academicDiplomas))&&(n.peracademicqual.AcademicQualification.IsEEPEBP?(n.DisableOrVisibleFieldsAcademic.DiplomaDate=!0,n.DisableOrVisibleFieldsAcademic.DiplomaDegree=!0,n.DisableOrVisibleFieldsAcademic.DiplomaDateAndGrade=!0,n.DisableOrVisibleFieldsAcademic.EquivalenceType=!0,n.DisableOrVisibleFieldsAcademic.AcademicDiploma=!1,n.DisableOrVisibleFieldsAcademic.DiplomaAbroad=!0,n.DisableOrVisibleFieldsAcademic.AcademicQualification=!1,n.DisableOrVisibleFieldsAcademic.Relevancy=f.isValueInArray(n.pageRules.specSmeaEEPEBP.CanAccess,"a, m1, m2"),n.DisableOrVisibleFieldsAcademic.Save=!0):f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?(n.DisableOrVisibleFieldsAcademic.DiplomaDate=!1,n.DisableOrVisibleFieldsAcademic.DiplomaDegree=!1,n.DisableOrVisibleFieldsAcademic.DiplomaDateAndGrade=!1,n.DisableOrVisibleFieldsAcademic.EquivalenceType=!1,n.DisableOrVisibleFieldsAcademic.AcademicDiploma=!1,n.DisableOrVisibleFieldsAcademic.DiplomaAbroad=!1,n.DisableOrVisibleFieldsAcademic.Relevancy=!1,n.DisableOrVisibleFieldsAcademic.Save=!1):(t={AcademicQualificationId:n.peracademicqual.AcademicQualification.Id,CountryId:n.peracademicqual.AcademicDiploma.Country.Id},f.getByParams(t,"/api/PersonAcademicQualification/getAcademicDiploma").then(function(t){n.academicDiplomas=t;n.DisableOrVisibleFieldsAcademic.DiplomaDate=!0;n.DisableOrVisibleFieldsAcademic.DiplomaDegree=!0;n.DisableOrVisibleFieldsAcademic.DiplomaDateAndGrade=!0;n.DisableOrVisibleFieldsAcademic.EquivalenceType=!0;n.DisableOrVisibleFieldsAcademic.AcademicDiploma=!0;n.DisableOrVisibleFieldsAcademic.DiplomaAbroad=!1;n.DisableOrVisibleFieldsAcademic.Relevancy=f.isValueInArray(n.pageRules.specSmeaEEPEBP.CanAccess,"a, m1, m2");n.DisableOrVisibleFieldsAcademic.Save=!0},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})))):f.isEmptyValue(n.peracademicqual.DiplomaSource)||n.peracademicqual.DiplomaSource!=1?(n.DisableOrVisibleFieldsAcademic.CountryAcademic=!1,n.DisableOrVisibleFieldsAcademic.DiplomaDate=!1,n.DisableOrVisibleFieldsAcademic.DiplomaDegree=!1,n.DisableOrVisibleFieldsAcademic.DiplomaDateAndGrade=!1,n.DisableOrVisibleFieldsAcademic.EquivalenceType=!1,n.DisableOrVisibleFieldsAcademic.AcademicDiploma=!1,n.DisableOrVisibleFieldsAcademic.DiplomaAbroad=!1,n.DisableOrVisibleFieldsAcademic.Relevancy=!1,n.DisableOrVisibleFieldsAcademic.Save=!1):(n.countriesAcademic=[{Id:3,Description:"ΕΛΛΑΔΑ",IsEU:!0}],f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)?(n.peracademicqual.AcademicDiploma=[{Country:[]}],n.peracademicqual.AcademicDiploma.Country=n.countriesAcademic[0]):n.peracademicqual.AcademicDiploma.Country=n.countriesAcademic[0],(n.AcademicQualification.IsChanged||n.DiplomaSourceAcademic.IsChanged||n.CountryAcademic.IsChanged||f.isEmptyValue(n.academicDiplomas))&&(t={AcademicQualificationId:n.peracademicqual.AcademicQualification.Id,CountryId:3},f.getByParams(t,"/api/PersonAcademicQualification/getAcademicDiploma").then(function(t){n.academicDiplomas=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})),n.DisableOrVisibleFieldsAcademic.CountryAcademic=!1,n.DisableOrVisibleFieldsAcademic.DiplomaDate=!0,n.DisableOrVisibleFieldsAcademic.DiplomaDegree=!0,n.DisableOrVisibleFieldsAcademic.DiplomaDateAndGrade=!0,n.DisableOrVisibleFieldsAcademic.EquivalenceType=!1,n.peracademicqual.AcademicQualification.IsEEPEBP&&n.peracademicqual.DiplomaSource?(n.DisableOrVisibleFieldsAcademic.AcademicDiploma=!1,n.DisableOrVisibleFieldsAcademic.DiplomaAbroad=!0):(n.DisableOrVisibleFieldsAcademic.AcademicDiploma=!0,n.DisableOrVisibleFieldsAcademic.DiplomaAbroad=!1),n.DisableOrVisibleFieldsAcademic.Relevancy=f.isValueInArray(n.pageRules.specSmeaEEPEBP.CanAccess,"a, m1, m2"),n.DisableOrVisibleFieldsAcademic.Save=!0)));n.DisableOrVisibleFieldsAcademic.AcademicQualification=n.updateMode?!1:!0};n.EditMusicSpec=function(t){n.permusicspeciality.Id=t.Id;n.MusicDisableOrVisibleFields.AddMusicBtn=!1;n.MusicDisableOrVisibleFields.WithoutMusicSpecialistOrIsEM16=n.perspeciality.Speciality1.selected.IsEM16||t.MusicSpecialistPerSpeciality.MusicSpecialist.Description=="Χωρίς Μουσική Ειδίκευση"?!0:!1;n.permusicspeciality.DiplomaDegree=t.DiplomaDegree;n.permusicspeciality.DiplomaDate=t.DiplomaDate;n.permusicspeciality.DiplomaAcquisitionPeriod=t.DiplomaAcquisitionPeriod;f.isEmptyValue(n.musicDiplomaDate.Id)&&!f.isEmptyValue(n.permusicspeciality.DiplomaDate)?(n.musicDiplomaDate.Id=n.permusicspeciality.DiplomaDate,n.musicDiplomaDate.IsChanged=!1):f.isEmptyValue(n.musicDiplomaDate.Id)||f.isEmptyValue(n.permusicspeciality.DiplomaDate)?n.musicDiplomaDate.IsChanged=!1:n.musicDiplomaDate.Id!=n.permusicspeciality.DiplomaDate?(n.musicDiplomaDate.Id=n.permusicspeciality.DiplomaDate,n.musicDiplomaDate.IsChanged=!0):n.musicDiplomaDate.IsChanged=!1;n.FillMusicDiplomaDate();n.permusicspeciality.DiplomaTitle=t.DiplomaTitle;n.MusicDisableOrVisibleFields.DiplomaTitle=f.isEmptyValue(t.DiplomaTitle)?!1:!0;n.permusicspeciality.PersonId=h;n.permusicspeciality.IsConfirmed=t.IsConfirmed;n.permusicspeciality.MusicSpecialistPerSpecialityId=t.MusicSpecialistPerSpeciality.Id;n.permusicspeciality.MusicSpecialistPerSpeciality={Description:t.MusicSpecialistPerSpeciality.MusicSpecialist.Description,Id:t.MusicSpecialistPerSpeciality.Id,MusicSpecialistId:t.MusicSpecialistPerSpeciality.MusicSpecialistId,SpecialityId:t.MusicSpecialistPerSpeciality.SpecialityId};f.isEmptyValue(t.MusicSpecialistPerSpeciality.MusicSpecialistId)?n.MusicDisableOrVisibleFields.MusicSpecialistPerSpecialityDiploma=!1:(n.MusicDiplomas=e("filter")(n.consts.MusicDiplomas,{SpecialityId:t.MusicSpecialistPerSpeciality.SpecialityId,MusicSpecialistId:t.MusicSpecialistPerSpeciality.MusicSpecialistId},!0),n.MusicDisableOrVisibleFields.MusicSpecialistPerSpecialityDiploma=!0);n.permusicspeciality.MusicSpecialistPerSpecialityDiplomaId=t.MusicSpecialistPerSpecialityDiplomaId;!f.isEmptyValue(t.MusicSpecialistPerSpecialityDiplomaId)&&t.MusicSpecialistPerSpecialityDiplomaId>0&&(n.permusicspeciality.MusicSpecialistPerSpecialityDiploma={Description:t.MusicSpecialistPerSpecialityDiploma.Description,Id:t.MusicSpecialistPerSpecialityDiploma.Id,MusicSpecialistId:t.MusicSpecialistPerSpeciality.MusicSpecialistId,MusicSpecialistPerSpecialityId:t.MusicSpecialistPerSpecialityDiploma.MusicSpecialistPerSpecialityId,SpecialityId:t.MusicSpecialistPerSpeciality.SpecialityId});n.AddOrEditMusic=!0};n.formMusicFields=function(){f.isEmptyValue(n.perspeciality.Speciality1.selected)||(f.isEmptyValue(n.musicDiplomaDate.Id)&&!f.isEmptyValue(n.permusicspeciality.DiplomaDate)?(n.musicDiplomaDate.Id=n.permusicspeciality.DiplomaDate,n.musicDiplomaDate.IsChanged=!1):f.isEmptyValue(n.musicDiplomaDate.Id)||f.isEmptyValue(n.permusicspeciality.DiplomaDate)?n.musicDiplomaDate.IsChanged=!1:n.musicDiplomaDate.Id!=n.permusicspeciality.DiplomaDate?(n.musicDiplomaDate.Id=n.permusicspeciality.DiplomaDate,n.musicDiplomaDate.IsChanged=!0):n.musicDiplomaDate.IsChanged=!1,f.isEmptyValue(n.permusicspeciality.MusicSpecialistPerSpeciality)||n.permusicspeciality.MusicSpecialistPerSpeciality.Description!="Χωρίς Μουσική Ειδίκευση"||n.perspeciality.Speciality1.selected.IsEM16?n.MusicDisableOrVisibleFields.WithoutMusicSpecialistOrIsEM16=!1:(n.MusicDisableOrVisibleFields.WithoutMusicSpecialistOrIsEM16=!0,n.permusicspeciality.DiplomaDegree="",n.permusicspeciality.DiplomaDate="",n.permusicspeciality.DiplomaAcquisitionPeriod="",n.permusicspeciality.DiplomaTitle="",n.permusicspeciality.MusicSpecialistPerSpecialityDiploma=""),n.perspeciality.Speciality1.selected.IsEM16?(n.MusicDisableOrVisibleFields.WithoutMusicSpecialistOrIsEM16=!0,n.permusicspeciality.DiplomaDegree="",n.permusicspeciality.DiplomaDate="",n.permusicspeciality.DiplomaAcquisitionPeriod="",n.permusicspeciality.DiplomaTitle="",n.permusicspeciality.MusicSpecialistPerSpecialityDiploma=""):(n.MusicDisableOrVisibleFields.DiplomaTitle=f.isEmptyValue(n.permusicspeciality.DiplomaTitle)?!1:!0,n.FillMusicDiplomaDate(),f.isEmptyValue(n.permusicspeciality.MusicSpecialistPerSpeciality)?n.MusicDisableOrVisibleFields.MusicSpecialistPerSpecialityDiploma=!1:(n.MusicDiplomas=e("filter")(n.consts.MusicDiplomas,{SpecialityId:n.perspeciality.Speciality1.selected.Id,MusicSpecialistId:n.permusicspeciality.MusicSpecialistPerSpeciality.MusicSpecialistId},!0),n.MusicDisableOrVisibleFields.MusicSpecialistPerSpecialityDiploma=!0)))};n.cancelAcademical=function(){n.AddAcademicQualificationRegion=!1;n.peracademicqual.Country={selected:""};n.peracademicqual.DimplomaSource={selected:""};n.peracademicqual.Diploma={selected:""};n.peracademicqual.DiplomaDate="";n.peracademicqual.DiplomaDegree="";n.DisableOrVisibleFieldsAcademic={DimplomaSource:!1,DiplomaDate:!1,Country:!1,DiplomaDegree:!1,Diploma:!1,DiplomaAbroad:!1,EquivalenceType:!1,YearsOfStudy:!1,ReStudy:!1,Save:!1}};n.cancel=function(){n.perspeciality.Speciality1.selected="";n.perspeciality.Country.selected="";n.perspeciality.DimplomaSource.selected="";n.perspeciality.Diploma.selected="";n.DiplomaAbroad="";n.perspeciality.DiplomaDate="";n.perspeciality.InitialRegistrationDate="";n.perspeciality.DiplomaAcquisitionPeriod="";n.perspeciality.DiplomaDegree="";n.perspeciality.HasSpecialEducation=!1;n.perspeciality.YearsOfStudy="";n.perspeciality.EquivalenceType="";n.perspeciality.MusicEquivalenceType="";n.perspeciality.ReStudy="";n.perspeciality.DateofReStudy="";n.perspeciality.PD130Simulation=!1;n.perspeciality.DateofSimulation="";n.perspeciality.SimulationDegree="";n.perspeciality.WorkExperience="";n.perspeciality.MonthExperience="";n.perspeciality.DayExperience="";n.DisableOrVisibleFields={HasSpecialEducation:!1,DimplomaSource:!1,DiplomaDate:!1,DiplomaAcquisitionPeriod:!1,Country:!1,DiplomaDegree:!1,DiplomaDateAndGrade:!1,Diploma:!1,DiplomaAbroad:!1,EquivalenceType:!1,MusicEquivalenceType:!1,YearsOfStudy:!1,ReStudy:!1,PD130Simulation:!1,DateofSimulation:!1,SimulationDegree:!1,DateofReStudy:!1,WorkExperience:!1,MonthExperience:!1,DayExperience:!1,Save:!1,InitialRegistrationDate:!1};n.cancelAcademical();$("#editSpecialityForm").validate().resetForm()};n.cancelEEPEBP=function(){n.perspeciality.Speciality1.selected="";n.perspeciality.Country.selected="";n.perspeciality.DimplomaSource.selected="";n.perspeciality.Diploma.selected="";n.DiplomaAbroad="";n.perspeciality.DiplomaDate="";n.perspeciality.InitialRegistrationDate="";n.perspeciality.DiplomaAcquisitionPeriod="";n.perspeciality.DiplomaDegree="";n.perspeciality.EquivalenceType="";n.perspeciality.IsAcademicQualificationRequired=!1;n.perspeciality.PersonAcademicQualificationId="";n.perspeciality.ProfessionLicence="";n.perspeciality.ProfessionLicenceDate="";n.perspeciality.ProfessionLicenceBodyId="";n.perspeciality.ProfessionLicenceNumber="";n.perspeciality.De1DimplomaType="";n.perspeciality.CertificateDE1="";n.perspeciality.CertificateDE1Date="";n.perspeciality.ChildPsychiatrist="";n.perspeciality.ChildPsychiatristDate="";n.perspeciality.MedicalAssociation="";n.perspeciality.CountrysideService="";n.perspeciality.MedicalAssociationNumber="";n.perspeciality.MedicalAssociationDateFrom="";n.perspeciality.MedicalAssociationDateTo="";n.perspeciality.NursesOrHealthVisitorsType="";n.perspeciality.NursesOrHealthVisitorsNumber="";n.perspeciality.NursesOrHealthVisitorsDateFrom="";n.perspeciality.NursesOrHealthVisitorsDateTo="";n.perspeciality.Physiotherapists="";n.perspeciality.PhysiotherapistsNumber="";n.perspeciality.PhysiotherapistsDateFrom="";n.perspeciality.PhysiotherapistsDateTo="";n.perspeciality.AeiOrTei="";n.perspeciality.WorkExperienceEEPEBP="";n.perspeciality.YearExperienceEEPEBP="";n.perspeciality.MonthExperienceEEPEBP="";n.perspeciality.DayExperienceEEPEBP="";n.DisableOrVisibleFields={DimplomaSource:!1,DiplomaDate:!1,DiplomaAcquisitionPeriod:!1,Country:!1,DiplomaDegree:!1,DiplomaDateAndGrade:!1,Diploma:!1,DiplomaAbroad:!1,EquivalenceType:!1,Save:!1,InitialRegistrationDate:!1,IsAcademicQualificationRequired:!1,AeiOrTei:!1,NursesOrHealthVisitors:!1,De1DimplomaType:!1,De1DimplomaTypeDetails:!1,ProfessionLicence:!1,ChildPsychiatrist:!1,Physiotherapists:!1,WorkExperienceEEPEBP:!1,YearExperienceEEPEBP:!1,MonthExperienceEEPEBP:!1,DayExperienceEEPEBP:!1,PersonAcademicQualification:!1};$("#editSpecialityEEPEBPForm").validate().resetForm()};n.MusicCancel=function(){n.AddOrEditMusic=!1;n.permusicspeciality={};n.MusicDiplomaAcquisitionPeriod=[];n.CheckAddMusicBtn();$("#editSpecialityForm").validate().resetForm()};n.AddAcademicQualification=function(){n.peracademicqual={};n.peracademicqual.AcademicQualification=[];n.peracademicqual.AcademicDiploma=[];n.peracademicqual.PersonId=h;n.perspeciality.PersonAcademicQualificationId=null;n.openRegion=!0;n.pera={DiplomaAbroadAcademic:""};f.isEmpty(n.academicQualifications)?f.getByAll("/api/PersonAcademicQualification/getAllAcademicQualification").then(function(t){n.academicQualifications=t;angular.copy(e("filter")(n.academicQualifications,{IsEEPEBP:!0},!0),n.FilterAcademicQualifications);n.AddAcademicQualificationRegion=!0;n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΕΠ"&&n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΚΙΝ"&&n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΝΟ"&&(n.FilterAcademicQualifications=e("filter")(n.FilterAcademicQualifications,function(n){return n.Id!==14}))},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(angular.copy(e("filter")(n.academicQualifications,{IsEEPEBP:!0},!0),n.FilterAcademicQualifications),n.AddAcademicQualificationRegion=!0,n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΕΠ"&&n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΚΙΝ"&&n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΝΟ"&&(n.FilterAcademicQualifications=e("filter")(n.FilterAcademicQualifications,function(n){return n.Id!==14})));n.perspeciality.Speciality1.selected.Code&&f.isEmpty(n.consts.relevancies)&&f.getByAll("/api/PersonAcademicQualification/getRelevancies").then(function(t){n.consts.relevancy=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});f.isEmpty(n.consts.academicDiplomaSourceType)&&f.getByAll("/api/PersonAcademicQualification/getAcademicDiplomaSourceTypes").then(function(t){n.consts.academicDiplomaSourceType=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});f.isEmpty(n.consts.academicequivalenceType)&&f.getByAll("/api/PersonAcademicQualification/getAcademicEquivalenceTypes").then(function(t){n.consts.academicequivalenceType=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.saveAction=function(t){var i=y();n.showAlertForUpload=i.DimplomaSource>1&&n.showUploadFile&&f.isEmptyValue(n.SendDataForCVFullDto.DirectPdfLink)&&f.isEmptyValue(n.perspeciality.IsConfirmed)?!0:!1;$("#editSpecialityForm").valid()&&!n.showAlertForUpload&&(n.SaveDisabled=!0,t=="Confirm"?i.IsConfirmed=!0:t=="UnConfirm"&&(i.IsConfirmed=!1),f.isEmptyValue(i.Id)?(i.CreatedBy=n.authentication.userName,i.CreatedUserRole=n.authentication.role,i.CreatedRegionAndUnitDescription=n.authentication.unitName,i.personSpecialityFile=n.SendDataForCVFullDto,n.perspeciality.Speciality1.selected.IsMusic?(i.IsMusic=!0,i.MusicSpecialistPerSpecialityId=n.permusicspeciality.MusicSpecialistPerSpeciality.Id,i.MusicDiplomaDate=n.permusicspeciality.DiplomaDate,f.isEmptyValue(n.permusicspeciality.DiplomaDegree)||(i.MusicDiplomaDegree=parseFloat(n.permusicspeciality.DiplomaDegree.toString().replace(",","."))),i.MusicDiplomaAcquisitionPeriod=n.permusicspeciality.DiplomaAcquisitionPeriod,f.isEmptyValue(n.permusicspeciality.MusicSpecialistPerSpecialityDiploma)||(i.MusicSpecialistPerSpecialityDiplomaId=n.permusicspeciality.MusicSpecialistPerSpecialityDiploma.Id)):i.IsMusic=!1,f.postByParams(i,"/api/PersonSpeciality/InsertSpeciality").then(function(){l(h);i.HasSpecialEducation&&(n.personMessage.hasSpecialEducation=!0);$("#AddSpecModal").modal("hide");n.cancel()},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})):(i.ModifiedBy=n.authentication.userName,i.ModifiedUserRole=n.authentication.role,i.ModifiedRegionAndUnitDescription=n.authentication.unitName,i.personSpecialityFile=n.SendDataForCVFullDto,f.postByParams(i,"/api/PersonSpeciality/UpdateSpeciality").then(function(){if(l(h),i.HasSpecialEducation)n.personMessage.hasSpecialEducation=!0;else if(n.specialitiesEEPEBP.length>=1)n.personMessage.hasSpecialEducation=!0;else{n.personMessage.hasSpecialEducation=!1;for(var t=0;t<n.specialities.length;t+=1)if(n.specialities[t].HasSpecialEducation==!0){n.personMessage.hasSpecialEducation=!0;break}}$("#AddSpecModal").modal("hide");n.cancel()},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})))};n.saveActionEEPEBP=function(t){var u,i;n.messageForAcademic=!1;u=!1;n.DisableOrVisibleFields.DisableAcademicQualificationRequired&&n.IsAcademicQualificationRequired&&!n.perspeciality.IsAcademicQualificationRequired&&(n.messageForAcademic=!0);i=p();f.isEmptyValue(n.consts.PersonAcademicQualification)&&(n.openRegion=!0);f.isEmptyValue(n.peracademicqual.AcademicQualification.Id)&&f.isEmptyValue(n.perspeciality.AcademicQualification.PersonAcademicQualificationId)&&n.perspeciality.IsAcademicQualificationRequired&&(u=!0);n.showAlertForUpload=i.DimplomaSource>1&&n.showUploadFile&&f.isEmptyValue(n.SendDataForCVFullDto.DirectPdfLink)&&f.isEmptyValue(n.perspeciality.IsConfirmed)?!0:!1;!$("#editSpecialityEEPEBPForm").valid()||n.messageForAcademic||n.showAlertForUpload||u||(n.SaveDisabled=!0,t=="Confirm"?(i.IsConfirmed=!0,i.AcademicQualification.IsConfirmed=!0):t=="UnConfirm"&&(i.IsConfirmed=!1),f.isEmptyValue(i.Id)?(i.CreatedBy=n.authentication.userName,i.CreatedUserRole=n.authentication.role,i.CreatedRegionAndUnitDescription=n.authentication.unitName,i.IsMusic=!1,f.postByParams(i,"/api/PersonSpeciality/InsertSpecialityEEPEBP").then(function(){l(h);n.openRegion=!1;n.personMessage.hasSpecialEducation=!0;$("#AddSpecEEPEBPModal").modal("hide");n.cancel()},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})):(i.ModifiedBy=n.authentication.userName,i.ModifiedUserRole=n.authentication.role,i.ModifiedRegionAndUnitDescription=n.authentication.unitName,f.postByParams(i,"/api/PersonSpeciality/UpdateSpecialityEEPEBP").then(function(){l(h);n.openRegion=!1;$("#AddSpecEEPEBPModal").modal("hide");n.cancel()},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})))};n.onFileSelect=function(t){var r,i;for(n.messages={completed:"",percentage:"0",error:""},n.showAlertForUpload=!1,n.SendDataForCVFullDto={Id:"",PersonSpecialityId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""},n.SendDataForCVDto.Id="",n.SendDataForCVDto.PersonId=h,r=0;r<t.length;r++){if(i=t[r],i.type!="application/pdf"){n.messages.error='Μη έγκυρη επέκταση αρχείου "'+i.name+'". Οι επεκτάσεις που υποστηρίζονται είναι: "<b> pdf<\/b>" .';return}if(i.size>=2097152){n.messages.error='Το αρχείο "'+i.name+'" (<b>'+Math.round(i.size/1024)+" KB<\/b>) υπερβαίνει το μέγιστο επιτρεπόμενο μέγεθος μεταφόρτωσης <b>2000 KB<\/b>.";return}(function(t){n.upload[t]=s.upload({url:"/api/files/uploadSpeciality",method:"POST",data:{SendDataForCVDto:n.SendDataForCVDto},file:i}).progress(function(t){n.messages.percentage=parseInt(100*t.loaded/t.total)}).then(function(t){n.messages.completed="Θα μεταφορτώσετε το αρχείο <b>"+i.name+"<\/b>.";n.SendDataForCVDto.Id=t.data.personSpecialityFile.Id;n.SendDataForCVFullDto=t.data.personSpecialityFile;n.uploadedFileDetails=""}).catch(function(t){n.messages.error=t.data.Message})})(r)}};n.abortUpload=function(t){n.upload[t].abort()};n.downloadFile=function(){f.getByParamsDownload({PersonId:h,Path:n.SendDataForCVFullDto.DirectPdfLink,ContentType:n.SendDataForCVFullDto.ContentType},"api/files/downloadFolder").then(function(t){var y=t.status,s=t.headers,h=t.data,v="application/octet-stream",r=!1,f,c,l,e,u,a,i,o;s=s();f=n.SendDataForCVFullDto.FileName||"download.pdf";c=s["content-type"]||v;try{if(i=new Blob([h],{type:c}),navigator.msSaveBlob)navigator.msSaveBlob(i,f);else{if(l=navigator.webkitSaveBlob||navigator.mozSaveBlob||navigator.saveBlob,l===undefined)throw"Not supported";l(i,f)}r=!0}catch(p){}if(!r&&(e=window.URL||window.webkitURL||window.mozURL||window.msURL,e)){if(u=document.createElement("a"),"download"in u)try{i=new Blob([h],{type:c});o=e.createObjectURL(i);u.setAttribute("href",o);u.setAttribute("download",f);a=document.createEvent("MouseEvents");a.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null);u.dispatchEvent(a);r=!0}catch(p){}if(!r)try{i=new Blob([h],{type:v});o=e.createObjectURL(i);window.location=o;r=!0}catch(p){}}r||window.open(httpPath,"_blank","")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση του αρχείου")})};n.minDate="01/01/1900";n.maxDate=new Date;n.formats=["dd/MM/yyyy"];n.format=n.formats[0];n.clear=function(){n.dt=null};n.toggleMin=function(){n.minDate=n.minDate?null:new Date};n.toggleMin();n.open=function(t,i){t.preventDefault();t.stopPropagation();n[i]=!0};n.status={opened:!1};n.openDatetimePicker=function(){n.status.opened=!0;n.status.opened1=!0};n.dateOptions={formatYear:"yy",startingDay:1,format:"dd/mm/yyyy"}};SpecialityController.$inject=["$scope","PassParameters","$state","toaster","$q","GeneralFactory","$filter","$timeout","$upload"];SpecialityNewController=function(n,t,i,r,u,f,e,o,s){function l(t){f.getByParams({Id:t},"/api/PersonSpeciality/GetPersonSpecialitiesWithMusicByPersonId").then(function(t){n.specialities=e("filter")(t.PersonSpeciality,{IsActive:!0,IsEEPEBP:!1},!0);n.specialitiesEEPEBP=e("filter")(t.PersonSpeciality,{IsActive:!0,IsEEPEBP:!0},!0);n.specialitiesNotActive=e("filter")(t.PersonSpeciality,{IsActive:!1},!0);n.musicspecialities=t.PersonMusicSpeciality;n.exceedSpecialityLimits=n.specialities.length>=5?!0:!1;n.showPermanentNotHaveIsMainMessage=!1;var i=e("filter")(t.PersonSpeciality,{IsMain:!0},!0);n.personMessage.IsPermanent&&i.length==0&&(n.showPermanentNotHaveIsMainMessage=!0);n.showMessages=!0;unblockUI("#divBlockUI")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά το φόρτωμα των καταχωρημένων κλάδων",3e3,"trustedHtml");unblockUI("#divBlockUI")})}function y(){return dto={Id:f.isEmptyValue(n.perspeciality.Id)?"":n.perspeciality.Id,SpecialityId:n.perspeciality.Speciality1.selected.Id,SpecialityCode:n.perspeciality.Speciality1.selected.Code,PersonId:h,MusicEquivalenceType:n.perspeciality.MusicEquivalenceType,WorkExperience:n.perspeciality.WorkExperience,MonthExperience:n.perspeciality.MonthExperience,DayExperience:n.perspeciality.DayExperience,MonthsExperienceForPoints:n.perspeciality.MonthsExperienceForPoints,DaysExperienceForPoints:n.perspeciality.DaysExperienceForPoints,YearsExperienceForPoints:n.perspeciality.YearsExperienceForPoints,HasSpecialEducation:f.isEmptyValue(n.perspeciality.HasSpecialEducation)?!1:n.perspeciality.HasSpecialEducation,IsConfirmed:f.isEmptyValue(n.perspeciality.IsConfirmed)?!1:n.perspeciality.IsConfirmed,HasPaedologicCompetency:f.isEmptyValue(n.perspeciality.Speciality1.selected.HasPaedologicCompetency)?!1:n.perspeciality.Speciality1.selected.HasPaedologicCompetency,CreatedBy:"",CreationDate:"",CreatedUserRole:"",CreatedRegionAndUnitDescription:"",ModifiedBy:"",LastEditDate:"",ModifiedUserRole:"",ModifiedRegionAndUnitDescription:""}}function p(){return n.perspeciality.AcademicQualification=w(),dto={Id:f.isEmptyValue(n.perspeciality.Id)?"":n.perspeciality.Id,SpecialityId:n.perspeciality.Speciality1.selected.Id,SpecialityCode:n.perspeciality.Speciality1.selected.Code,PersonId:h,WorkExperienceEEPEBP:n.perspeciality.WorkExperienceEEPEBP,YearExperienceEEPEBP:n.perspeciality.YearExperienceEEPEBP,MonthExperienceEEPEBP:n.perspeciality.MonthExperienceEEPEBP,DayExperienceEEPEBP:n.perspeciality.DayExperienceEEPEBP,IsConfirmed:f.isEmptyValue(n.perspeciality.IsConfirmed)?!1:n.perspeciality.IsConfirmed,HasPaedologicCompetency:f.isEmptyValue(n.perspeciality.Speciality1.selected.HasPaedologicCompetency)?!1:n.perspeciality.Speciality1.selected.HasPaedologicCompetency,PersonSpecialityFile:{Id:"",PersonId:"",PersonAcademicQualificationId:0,FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",ContentType:"",IsActive:!1},CreatedBy:"",CreationDate:"",CreatedUserRole:"",CreatedRegionAndUnitDescription:"",ModifiedBy:"",LastEditDate:"",ModifiedUserRole:"",ModifiedRegionAndUnitDescription:"",PersonSpecialityEEPEBPId:f.isEmptyValue(n.perspeciality.PersonSpecialityEEPEBPId)?"":n.perspeciality.PersonSpecialityEEPEBPId,ProfessionLicence:n.perspeciality.ProfessionLicence,ProfessionLicenceDate:n.perspeciality.ProfessionLicenceDate,ProfessionLicenceBodyId:n.perspeciality.ProfessionLicenceBodyId,ChildPsychiatrist:n.perspeciality.ChildPsychiatrist,ChildPsychiatristDate:n.perspeciality.ChildPsychiatristDate,MedicalAssociation:n.perspeciality.MedicalAssociation,CountrysideService:n.perspeciality.CountrysideService,Physiotherapists:n.perspeciality.Physiotherapists,De1DimplomaType:n.perspeciality.De1DimplomaType,IsAcademicQualificationRequired:n.perspeciality.IsAcademicQualificationRequired,PersonAcademicQualificationId:n.perspeciality.PersonAcademicQualificationId,IsSeminarRequired:n.perspeciality.IsSeminarRequired,PersonSeminarId:n.perspeciality.PersonSeminarId,CertificateDE1:n.perspeciality.CertificateDE1,CertificateDE1Date:n.perspeciality.CertificateDE1Date,MedicalAssociationNumber:n.perspeciality.MedicalAssociationNumber,MedicalAssociationDateFrom:n.perspeciality.MedicalAssociationDateFrom,MedicalAssociationDateTo:n.perspeciality.MedicalAssociationDateTo,NursesOrHealthVisitorsType:n.perspeciality.NursesOrHealthVisitorsType,NursesOrHealthVisitors:n.perspeciality.NursesOrHealthVisitors,NursesOrHealthVisitorsNumber:n.perspeciality.NursesOrHealthVisitorsNumber,NursesOrHealthVisitorsDateFrom:n.perspeciality.NursesOrHealthVisitorsDateFrom,NursesOrHealthVisitorsDateTo:n.perspeciality.NursesOrHealthVisitorsDateTo,PhysiotherapistsNumber:n.perspeciality.PhysiotherapistsNumber,PhysiotherapistsDateFrom:n.perspeciality.PhysiotherapistsDateFrom,PhysiotherapistsDateTo:n.perspeciality.PhysiotherapistsDateTo,ProfessionLicenceNumber:n.perspeciality.ProfessionLicenceNumber,SocialWorkers:n.perspeciality.SocialWorkers,SocialWorkersNumber:n.perspeciality.SocialWorkersNumber,SocialWorkersDateFrom:n.perspeciality.SocialWorkersDateFrom,SocialWorkersDateTo:n.perspeciality.SocialWorkersDateTo,Ergotherapists:n.perspeciality.Ergotherapists,ErgotherapistsNumber:n.perspeciality.ErgotherapistsNumber,ErgotherapistsDateFrom:n.perspeciality.ErgotherapistsDateFrom,ErgotherapistsDateTo:n.perspeciality.ErgotherapistsDateTo},dto.DiplomaId=f.isEmptyValue(n.perspeciality.Diploma.selected)?"":n.perspeciality.Diploma.selected.Id,n.AddAcademicQualificationRegion=!1,n.DisableAndVisibleListDiploma||f.isEmptyValue(n.perspeciality.Diploma.selected.Id)?dto.PersonDiploma=n.persondiplomasFilter:(dto.PersonDiploma=e("filter")(n.personDiplomasAcademicFilter,function(t){return t.DiplomaId==n.perspeciality.Diploma.selected.DiplomaId}),dto.PersonDiploma=e("unique")(dto.PersonDiploma,"DiplomaId")),dto}function w(){return dto={Id:f.isEmptyValue(n.peracademicqual.Id)?"":n.peracademicqual.Id,PersonId:h,AcademicQualificationId:n.peracademicqual.AcademicQualification.Id,AcademicDiplomaId:f.isEmptyValue(n.peracademicqual.AcademicDiplomaId)?"":n.peracademicqual.AcademicDiplomaId,Diploma:{Id:"",Description:"",CountryId:""},DiplomaDate:n.peracademicqual.DiplomaDate,DiplomaDegree:n.peracademicqual.DiplomaDegree,DiplomaSource:f.isEmptyValue(n.peracademicqual.DiplomaSource)?"":n.peracademicqual.DiplomaSource,EquivalenceType:n.peracademicqual.EquivalenceType,Relevancy:f.isEmptyValue(n.peracademicqual.Relevancy)?0:n.peracademicqual.Relevancy,FirstSpeciality:f.isEmptyValue(n.peracademicqual.FirstSpeciality)?"":n.peracademicqual.FirstSpeciality,RelevancySMEAE:f.isEmptyValue(n.peracademicqual.RelevancySMEAE)?!1:n.peracademicqual.RelevancySMEAE,RelevancySpeciality:f.isEmptyValue(n.peracademicqual.RelevancySpeciality)?!1:n.peracademicqual.RelevancySpeciality,RelevancySchoolPhychology:f.isEmptyValue(n.peracademicqual.RelevancySchoolPhychology)?!1:n.peracademicqual.RelevancySchoolPhychology,CountClassification:"",IsConfirmed:f.isEmptyValue(n.peracademicqual.IsConfirmed)?!1:n.peracademicqual.IsConfirmed,CreatedBy:"",CreationDate:"",CreatedUserRole:"",CreatedRegionAndUnitDescription:"",ModifiedBy:"",LastEditDate:"",ModifiedUserRole:"",ModifiedRegionAndUnitDescription:"",AcademicQualificationSpecialities:{Id:"",PersonAcademicQualificationId:"",PersonSpecialityId:""}},f.isEmptyValue(n.peracademicqual.DiplomaDegree)||(dto.DiplomaDegree=parseFloat(n.peracademicqual.DiplomaDegree.toString().replace(",","."))),f.isEmptyValue(n.peracademicqual.AcademicDiplomaId)&&!f.isEmptyValue(n.pera.DiplomaAbroadAcademic)?dto.Diploma={Id:"",Description:n.pera.DiplomaAbroadAcademic,CountryId:f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?"":n.peracademicqual.AcademicDiploma.Country.Id}:f.isEmptyValue(n.peracademicqual.AcademicDiplomaId)||f.isEmptyValue(n.pera.DiplomaAbroadAcademic)?f.isEmptyValue(n.peracademicqual.AcademicDiploma)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Id)||(dto.AcademicDiplomaId=n.peracademicqual.AcademicDiploma.Id,dto.Diploma={Id:n.peracademicqual.AcademicDiploma.Id,Description:n.peracademicqual.AcademicDiploma.Description,CountryId:f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?"":n.peracademicqual.AcademicDiploma.Country.Id}):(dto.AcademicDiplomaId=n.peracademicqual.AcademicDiplomaId,dto.Diploma={Id:n.peracademicqual.AcademicDiplomaId,Description:n.pera.DiplomaAbroadAcademic,CountryId:f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?"":n.peracademicqual.AcademicDiploma.Country.Id}),dto.PersonAcademicQualificationId=f.isEmptyValue(n.perspeciality.PersonAcademicQualificationId)?n.perspeciality.IsAcademicQualificationRequired&&f.isEmptyValue(n.perspeciality.PersonAcademicQualificationId)?0:null:n.perspeciality.PersonAcademicQualificationId,dto}function b(){return dto={Id:n.ForMainSpec.Id,PersonId:h,SpecialityId:n.ForMainSpec.SpecialityId,IsMain:n.ForMainSpec.IsMain,ModifiedBy:n.authentication.userName,LastEditDate:"",ModifiedUserRole:n.authentication.role,ModifiedRegionAndUnitDescription:n.authentication.unitName}}var a,h,v,c;n.pageRules={};n.pageRules.spec={CanDelete:!1};n.showMessages=!1;n.personDiplomas=[];n.personDiplomasFilter=[];n.personDiplomasAcademicFilter=[];n.messageNoDiploma=!1;n.DiplomaSelected=[];n.DisableAndVisibleListDiploma=!1;n.showDataTable=!1;n.SpecialityDiplomas=[];n.minDiplomaDate="";n.disableDideForViewForPermanent=!1;n.alertsMessageForIsMain=[{type:"danger",msg:""}];n.showIsMainMessage=!1;n.alertsMessageForPermanentNotHaveIsMain=[{type:"danger",msg:"Ο εκπαιδευτικός είναι δηλωμένος ως μόνιμος αλλά δεν διαθέτει κύριο κλάδο."}];n.showPermanentNotHaveIsMainMessage=!1;blockUI({target:"#divBlockUI",animate:!0});n.authentication.isAuth?(a="folder,specSmea,specSmeaEEPEBP,spec,specEEPEBP,changeDataRequest",f.getByParams({role:n.authentication.role,codes:a},"/api/Subsystem/NewCheckPermission").then(function(t){var i=a.split(",");for(var r in i)n.pageRules[i[r]]=e("filter")(t,{Code:i[r]},!0)[0].Rules},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})):i.go("/");h=t.getPersonId();f.isValueInArray(f.getRoleCode(n.authentication.role),"u1, u2")&&(h=n.authentication.personId);n.personMessage={};f.getByParams({personId:h},"/api/Person/getPersonSpecialitiesDetails").then(function(t){n.personMessage=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την εμφάνιση των μηνυμάτων του φακέλου σας.")});f.getByParams({id:h},"/api/PersonDiploma/getPersonDiplomasPerSpeciality").then(function(t){n.personDiplomas=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την εμφάνιση των μηνυμάτων του φακέλου σας.")});f.getByParams({personId:h,role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId},"/api/Person/checkPermanentViewFromOfficialDide").then(function(t){n.disableDideForViewForPermanent=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά το φόρτωμα των στοιχείων.",3e3,"trustedHtml");unblockUI("#divBlockUI")});n.speciality=[];n.DisableOrVisibleFields={Speciality:!0,HasSpecialEducation:!1,DimplomaSource:!1,DiplomaDate:!1,DiplomaAcquisitionPeriod:!1,Country:!1,DiplomaDegree:!1,DiplomaDateAndGrade:!1,Diploma:!1,DiplomaAbroad:!1,EquivalenceType:!1,MusicEquivalenceType:!1,YearsOfStudy:!1,ReStudy:!1,PD130Simulation:!1,DateofSimulation:!1,SimulationDegree:!1,DateofReStudy:!1,WorkExperience:!1,MonthExperience:!1,DayExperience:!1,Save:!1,IsMusic:!1,InitialRegistrationDate:!1,IsAcademicQualificationRequired:!1,DisableAcademicQualificationRequired:!1,IsSeminarRequired:!1,DisableASeminarRequired:!1,AeiOrTei:!1,NursesOrHealthVisitors:!1,De1DimplomaType:!1,De1DimplomaTypeDetails:!1,ProfessionLicence:!1,ChildPsychiatrist:!1,Physiotherapists:!1,Ergotherapists:!1,WorkExperienceEEPEBP:!1,YearExperienceEEPEBP:!1,MonthExperienceEEPEBP:!1,DayExperienceEEPEBP:!1,PersonAcademicQualification:!1};n.SaveDisabled=!1;n.DisableFieldset=!1;n.DisableFieldsBydiploma=!0;n.ModalTitle="Προσθήκη κλάδου";n.perspeciality={};n.perspeciality.Speciality1={};n.perspeciality.DimplomaSource={};n.perspeciality.Diploma={};n.Countries=[];n.diplomas=[];n.perspeciality.DimplomaSource={selected:""};n.perspeciality.Speciality1={selected:""};n.perspeciality.Country={selected:""};n.perspeciality.Diploma={selected:""};n.consts={};n.Specialities=[];n.Klados={Id:"",IsChanged:!1};n.Country={Id:"",IsChanged:!1};n.AeiOrTei={Id:"",IsChanged:!1};n.AcademicQualificationRequired={Id:!1,IsChanged:!1};n.NursesOrHealthVisitorsType={Id:"",IsChanged:!1};n.DiplomaSource={Id:"",IsChanged:!1};n.DiplomaDate={Id:"",IsChanged:!1};n.exceedSpecialityLimits=!1;n.DiplomaAcquisitionPeriod=[];n.delPerSpeciality;n.SelectedSpeciality={};n.SelectedSpeciality.Diploma={Id:"",Country:{Id:""}};n.InitialRegistrationDateRequired=!1;n.AddAcademicQualificationRegion=!1;n.MusicDisableOrVisibleFields={MusicSpecialistPerSpeciality:!1,WithoutMusicSpecialistOrIsEM16:!1,DiplomaAcquisitionPeriod:!1,DiplomaTitle:!1,MusicSpecialistPerSpecialityDiploma:!1,Save:!1,AddMusicBtn:!1,Cancel:!1};n.DelMusicBtn=!1;n.permusicspeciality={};n.permusicspeciality.PersonId=h;n.MusicSpecialist=[];n.MusicDiplomas=[];n.MusicDiplomaAcquisitionPeriod=[];n.musicDiplomaDate={Id:"",IsChanged:!1};v=[];n.de01EEP=!1;n.DisableFieldsetNotActive=!1;n.specialitiesEEPEBP=[];n.specialitiesNotActive=[];n.DisableFieldsetEEPEBP=!1;n.DisableFieldsetEEPEBPNotMemberFields=!1;n.IsAcademicQualificationRequired=!1;n.IsSeminarRequired=!1;n.messageForAcademic=!1;n.academicQualifications=[];n.FilterAcademicQualifications=[];n.peracademicqual={};n.peracademicqual.AcademicQualification=[];n.peracademicqual.AcademicDiploma=[];n.peracademicqual.PersonId=h;n.peracademicqual.DimplomaSource={selected:""};n.peracademicqual.Country={selected:""};n.peracademicqual.Diploma={selected:""};n.DisableOrVisibleFieldsAcademic={AcademicQualification:!0,FirstSpeciality:!1,DimplomaSource:!1,Country:!1,DiplomaDate:!1,DiplomaDegree:!1,DiplomaDateAndGrade:!1,AcademicDiploma:!1,DiplomaAbroad:!1,Relevancy:!1,EquivalenceType:!1,Save:!1};n.DisableFieldsEEPEBP={EEPEBP:!1,RelevancySchoolPhychology:!1};n.AcademicQualification={Id:"",IsChanged:!1};n.CountryAcademic={Id:"",IsChanged:!1};n.DiplomaSourceAcademic={Id:"",IsChanged:!1};n.pera={DiplomaAbroadAcademic:""};n.hasAcademicSpecialityBySpecialityId=null;c=[11681,11680,11679];n.openRegion=null;n.showDownloadFile=!1;n.showUploadFile=!1;n.upload=[];n.messages={completed:"",percentage:"0",error:""};n.uploadedFileDetails="";n.SendDataForCVDto={Id:"",PersonSpecialityId:"",PersonId:""};n.SendDataForCVFullDto={Id:"",PersonSpecialityId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""};n.showAlertForUpload=!1;n.SendDataForCVDto.PersonId=h;n.messages={completed:"",percentage:"0",error:""};n.CheckAddMusicBtn=function(){if(!f.isEmptyValue(n.musicspecialities)){var t=e("filter")(n.musicspecialities,{MusicSpecialistPerSpeciality:{SpecialityId:n.perspeciality.Speciality1.selected.Id}},!0).length;n.MusicDisableOrVisibleFields.AddMusicBtn=(f.isEmptyValue(n.musicspecialities)||n.perspeciality.Speciality1.selected.MaxMusicSpecialists>t)&&n.pageRules.spec.CanInsert?!0:f.isEmptyValue(n.musicspecialities)||n.perspeciality.Speciality1.selected.MaxMusicSpecialists!=t?!1:!1;n.DelMusicBtn=t>=2?!0:!1}};n.getAllPersonMusicSpecialities=function(){f.getByParams({PersonId:h},"/api/PersonMusicSpeciality/GetPersonMusicSpecialitiesByPersonId").then(function(t){n.musicspecialities=t;n.CheckAddMusicBtn()},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά το φόρτωμα των μουσικών οργάνων",3e3,"trustedHtml")})};n.disabledMusicDeleteAction=function(t,i){return(f.isValueInArray(f.getRoleCode(n.authentication.role),"a, m1, m2")||!n.DisableFieldsetNotActive)&&!t&&n.pageRules.spec.CanDelete&&i?!1:!0};n.DelMusicSpec=function(t){var i=t;i.ModifiedBy=n.authentication.userName;i.ModifiedUserRole=n.authentication.role;i.ModifiedRegionAndUnitDescription=n.authentication.unitName;f.postByParams(i,"/api/PersonMusicSpeciality/DeleteMusicSpeciality").then(function(){n.getAllPersonMusicSpecialities()},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.SaveMusicSpec=function(t){var i;t.DiplomaDegree!=null&&(t.DiplomaDegree=parseFloat(t.DiplomaDegree.toString().replace(",",".")));t.MusicSpecialistPerSpecialityId=n.permusicspeciality.MusicSpecialistPerSpeciality.Id;f.isEmptyValue(n.permusicspeciality.MusicSpecialistPerSpecialityDiploma)||(t.MusicSpecialistPerSpecialityDiplomaId=n.permusicspeciality.MusicSpecialistPerSpecialityDiploma.Id);!f.isEmptyValue(t.Id)&&t.Id>0?(t.ModifiedBy=n.authentication.userName,t.ModifiedUserRole=n.authentication.role,t.ModifiedRegionAndUnitDescription=n.authentication.unitName,i=t,f.postByParams(i,"/api/PersonMusicSpeciality/UpdateMusicSpeciality").then(function(){n.getAllPersonMusicSpecialities();n.AddOrEditMusic=!1}).catch(function(n){r.pop("error","Παρουσιάστηκε σφάλμα",n.data)})):(t.CreatedBy=n.authentication.userName,t.CreatedUserRole=n.authentication.role,t.CreatedRegionAndUnitDescription=n.authentication.unitName,t.PersonId=h,i=t,f.postByParams(i,"/api/PersonMusicSpeciality/InsertMusicSpeciality").then(function(){n.getAllPersonMusicSpecialities();n.AddOrEditMusic=!1}).catch(function(n){r.pop("error","Παρουσιάστηκε σφάλμα",n.data)}))};n.AddOrEditMusic=!1;n.AddEditMusic=function(t){t=="Add"?(n.permusicspeciality={},n.permusicspeciality.Id="",n.permusicspeciality.IsConfirmed=!1,n.permusicspeciality.PersonId=h,n.AddOrEditMusic=!0,n.MusicDisableOrVisibleFields.AddMusicBtn=!1,n.musicDisplayErrorMessage=!1,n.musicErrorMessage=""):(t=="Save"||t=="UnConfirm"||t=="Confirm")&&n.perspeciality.Id>0?$("#editSpecialityForm").valid()&&(t=="Confirm"?n.permusicspeciality.IsConfirmed=!0:t=="UnConfirm"&&(n.permusicspeciality.IsConfirmed=!1),n.SaveMusicSpec(n.permusicspeciality)):(n.AddOrEditMusic=!1,n.CheckAddMusicBtn())};l(h);n.fillFormControls=function(t,i){n.perspeciality.Id="";n.ModalTitle="Προσθήκη κλάδου";n.DisableOrVisibleFields.Speciality=!0;n.SelectedSpeciality={};n.SelectedSpeciality.Diploma={Id:"",Country:{Id:""}};n.Klados={Id:"",IsChanged:!1};n.Country={Id:"",IsChanged:!1};n.DiplomaDate={Id:"",IsChanged:!1};n.DisableFieldset=!1;n.perspeciality.IsConfirmed=!1;n.permusicspeciality={};n.permusicspeciality.Id="";n.permusicspeciality.IsConfirmed=!1;n.permusicspeciality.PersonId=h;n.MusicDisableOrVisibleFields.WithoutMusicSpecialistOrIsEM16=!1;n.musicDisplayErrorMessage=!1;n.musicErrorMessage="";n.MusicDiplomaAcquisitionPeriod=[];n.MusicDisableOrVisibleFields.Cancel=!1;n.SaveDisabled=!1;n.DisableField={Speciality:!1,DiplomaDegree:!1,DiplomaDate:!1};n.showUploadFile=!1;n.uploadedFileDetails=!1;n.showAlertForUpload=!1;n.messages={completed:"",percentage:"0",error:""};n.uploadedFileDetails="";n.SendDataForCVDto={Id:"",PersonSpecialityId:"",PersonId:""};n.SendDataForCVFullDto={Id:"",PersonSpecialityId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""};f.isEmpty(n.consts.Specialities)?f.getByAll("/api/Speciality/getSpecialitiesDTO").then(function(r){n.consts.Specialities=r;t=="Add"?(n.Specialities=e("filter")(n.consts.Specialities,{Code:"ΕΜ16.00"},!0),n.DisableFieldsetNotActive=!1,n.showDataTable=!1,n.perspeciality.Speciality1.selected=n.Specialities[0],n.formFields()):(n.Specialities=e("filter")(n.consts.Specialities,{IsActive:i},!0),n.DisableFieldsetNotActive=!1,n.showDataTable=!0)}):t=="Add"?(n.Specialities=e("filter")(n.consts.Specialities,{Code:"ΕΜ16.00"},!0),n.DisableFieldsetNotActive=!1,n.showDataTable=!1,n.perspeciality.Speciality1.selected=n.Specialities[0],n.formFields()):(n.Specialities=e("filter")(n.consts.Specialities,{IsActive:i},!0),n.DisableFieldsetNotActive=!1,n.showDataTable=!0);f.isEmpty(n.consts.DimplomaSource)&&f.getByAll("/api/PersonSpeciality/getDimplomaSourceTypes").then(function(t){n.consts.DimplomaSource=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση της Προέλευσης Πτυχίου")});f.isEmpty(n.consts.Countries)&&f.getByAll("/api/Country/getCountriesDto").then(function(t){n.consts.Countries=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των Χωρών")});f.isEmpty(n.consts.workExperienceType)&&f.getByAll("/api/PersonSpeciality/getWorkExperienceTypes").then(function(t){n.consts.workExperienceType=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση της Επαγ/κής Εμπειρίας")});f.isEmpty(n.consts.musicequivalenceType)&&f.getByAll("/api/Diploma/getMusicEquivalenceTypes").then(function(t){n.consts.musicequivalenceType=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των Τίτλων Ισοτιμίας")});f.isEmpty(n.consts.MusicSpecialist)&&f.getByAll("/api/MusicSpecialist/getMusicSpecialistDto").then(function(t){n.consts.MusicSpecialist=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των μουσικών ειδικεύσεων")});f.isEmpty(n.consts.MusicDiplomas)&&f.getByAll("/api/MusicSpecialist/GetAllMusicDiplomas").then(function(t){n.consts.MusicDiplomas=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των μουσικών διπλωμάτων")})};n.fillFormControlsEEPEBP=function(t){n.perspeciality={};n.perspeciality.Speciality1={};n.perspeciality.Diploma={};n.perspeciality.DimplomaSource={};n.perspeciality.DimplomaSource={selected:""};n.perspeciality.Speciality1={selected:""};n.perspeciality.Country={selected:""};n.perspeciality.Diploma={selected:""};n.perspeciality.Id="";n.ModalTitle="Προσθήκη κλάδου Ε.Ε.Π. - Ε.Β.Π.";n.DisableOrVisibleFields.Speciality=!0;n.SelectedSpeciality={};n.SelectedSpeciality.Diploma={Id:"",Country:{Id:""}};n.Klados={Id:"",IsChanged:!1};n.Country={Id:"",IsChanged:!1};n.DiplomaDate={Id:"",IsChanged:!1};n.DisableFieldsetEEPEBP=!1;n.DisableFieldsetEEPEBPNotMemberFields=!1;n.messageNoDiploma=!1;n.DisableAndVisibleListDiploma=!1;n.perspeciality.IsConfirmed=!1;n.SaveDisabled=!1;n.minDate2="01/01/1900";n.maxDate2=new Date;n.DisableField={Speciality:!1,DiplomaDegree:!1,DiplomaDate:!1};n.showUploadFile=!1;n.uploadedFileDetails=!1;n.showAlertForUpload=!1;n.messages={completed:"",percentage:"0",error:""};n.uploadedFileDetails="";n.SendDataForCVDto={Id:"",PersonSpecialityId:"",PersonId:""};n.SendDataForCVFullDto={Id:"",PersonSpecialityId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""};f.isEmpty(n.consts.SpecialitiesEEPEBP)?f.getByAll("/api/Speciality/getSpecialitiesEEPEBPDTO").then(function(i){n.consts.SpecialitiesEEPEBP=i;n.Specialities=f.isValueInArray(f.getRoleCode(n.authentication.role),"a, m1, m2")?n.consts.SpecialitiesEEPEBP:t=="Add"?e("filter")(n.consts.SpecialitiesEEPEBP,{CanPublish:!0},!0):n.consts.SpecialitiesEEPEBP},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των Κλάδων")}):n.Specialities=f.isValueInArray(f.getRoleCode(n.authentication.role),"a, m1, m2")?n.consts.SpecialitiesEEPEBP:t=="Add"?e("filter")(n.consts.SpecialitiesEEPEBP,{CanPublish:!0},!0):n.consts.SpecialitiesEEPEBP;f.isEmpty(n.consts.DimplomaSource)&&f.getByAll("/api/PersonSpeciality/getDimplomaSourceTypes").then(function(t){n.consts.DimplomaSource=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση της Προέλευσης Πτυχίου")});f.isEmpty(n.consts.Countries)&&f.getByAll("/api/Country/getCountriesDto").then(function(t){n.consts.Countries=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των Χωρών")});f.isEmpty(n.consts.workExperienceType)&&f.getByAll("/api/PersonSpeciality/getWorkExperienceTypes").then(function(t){n.consts.workExperienceType=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση της Επαγ/κής Εμπειρίας")})};n.disabledDeleteAction=function(t,i,r){return t||!f.isEmpty(n.SpecialitiesWithSpecialists)||r||!n.pageRules.spec.CanDelete?!0:!1};n.disabledDeleteActionEEPEBP=function(t,i,r){return t||r||!n.pageRules.specEEPEBP.CanDelete?!0:!1};n.openModal=function(t){t.IsEEPEBP?f.getByParams({PersonSpecialityId:t.Id},"/api/PersonAcademicQualification/HasAcademicSpecialityBySpecialityId").then(function(i){n.hasAcademicSpecialityBySpecialityId=i;n.delPerSpeciality=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά το φόρτωμα των καταχωρημένων κλάδων",3e3,"trustedHtml");unblockUI("#divBlockUI")}):n.delPerSpeciality=t};n.DeleteAction=function(t){var i=t;i.IsMusic=t.IsMusic;i.ModifiedBy=n.authentication.userName;i.ModifiedUserRole=n.authentication.role;i.ModifiedRegionAndUnitDescription=n.authentication.unitName;f.postByParams(i,"/api/PersonSpeciality/DeleteSpeciality").then(function(){if(t.IsActive?n.specialities.splice(n.specialities.indexOf(t),1):n.specialitiesNotActive.splice(n.specialitiesNotActive.indexOf(t),1),n.exceedSpecialityLimits=n.specialities.length>=5?!0:!1,i.HasSpecialEducation)if(n.specialitiesEEPEBP.length>=1)n.personMessage.hasSpecialEducation=!0;else{n.personMessage.hasSpecialEducation=!1;for(var r=0;r<n.specialities.length;r+=1)if(n.specialities[r].HasSpecialEducation==!0){n.personMessage.hasSpecialEducation=!0;break}}},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.DeleteActionEEPEBP=function(t){var i=t;i.ModifiedBy=n.authentication.userName;i.ModifiedUserRole=n.authentication.role;i.ModifiedRegionAndUnitDescription=n.authentication.unitName;f.postByParams(i,"/api/PersonSpeciality/DeleteSpecialityNewEEPEBP").then(function(){n.specialitiesEEPEBP.splice(n.specialitiesEEPEBP.indexOf(t),1);n.specialitiesEEPEBP.length>=1&&(n.personMessage.hasSpecialEducation=!0)},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.openAddSpecModal=function(t){n.personDiplomasPerSpeciality=[];blockUI({target:"#tblSpeciality",animate:!0});var i=u.all([n.fillFormControls(0,t.IsActive),f.getByParams({Id:t.Id},"/api/PersonSpeciality/getPersonSpecialityBySpecialityId"),f.getByParams({Id:t.Id},"/api/PersonDiploma/getPersonSpecialityDiplomaById"),]);n.SaveDisabled=!1;i.then(function(i){o(function(){var u;n.SelectedSpeciality=i[1];n.personDiplomasPerSpeciality=i[2];n.messages={completed:"",percentage:"0",error:""};n.uploadedFileDetails="";n.SendDataForCVDto={Id:"",PersonSpecialityId:"",PersonId:""};n.SendDataForCVFullDto={Id:"",PersonSpecialityId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""};!f.isEmptyValue(n.SelectedSpeciality.DimplomaSource)&&n.SelectedSpeciality.DimplomaSource>1&&(n.SendDataForCVDto.PersonSpecialityId=n.SelectedSpeciality.Id,f.getByParams({PersonSpecialityId:n.SelectedSpeciality.Id},"/api/PersonSpeciality/GetDetailsForFile").then(function(t){t!=null?(n.SendDataForCVFullDto=t,n.SendDataForCVDto.Id=t.Id,n.showDownloadFile=!0,n.uploadedFileDetails="Έχετε μεταφορτώσει το αρχείο: "+n.SendDataForCVFullDto.FileName):n.showDownloadFile=!1},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης επισυναπτόμενου Βιογραφικού")}));n.DisableFieldsetNotActive=t.IsActive?!1:f.isValueInArray(n.pageRules.spec.CanAccess,"m1, m2, a")?!1:!0;n.perspeciality.Speciality1.selected=e("filter")(n.consts.Specialities,{Id:n.SelectedSpeciality.Speciality1.Id},!0)[0];f.isValueInArray(n.pageRules.spec.CanAccess,"d2")&&n.perspeciality.Speciality1.selected.IsEM16?n.DisableFieldset=!1:n.pageRules.spec.CanUpdate?n.SelectedSpeciality.IsConfirmed&&n.pageRules.spec.CanUpdate?f.isValueInArray(n.pageRules.spec.CanAccess,"u1, u2")?n.DisableFieldset=!0:f.isValueInArray(n.pageRules.spec.CanAccess,"a, m1, m2")?n.DisableFieldset=!1:f.isValueInArray(n.pageRules.spec.CanAccess,"d1, d2, p")?(n.DisableFieldset=!1,n.DisableField={Speciality:!0,DiplomaDegree:!0,DiplomaDate:!0}):n.DisableFieldset=!0:n.DisableFieldset=!n.SelectedSpeciality.IsConfirmed&&n.pageRules.spec.CanUpdate?!1:!0:n.DisableFieldset=!0;n.perspeciality.Id=n.SelectedSpeciality.Id;n.perspeciality.IsConfirmed=n.SelectedSpeciality.IsConfirmed;n.ModalTitle="Προβολή / Επεξεργασία κλάδου";n.DisableOrVisibleFields.Speciality=!1;n.perspeciality.Speciality1.selected.IsEM16?(u=e("filter")(n.musicspecialities,{MusicSpecialistPerSpeciality:{SpecialityId:n.perspeciality.Speciality1.selected.Id}},!0).length,u!=0?(n.DisableOrVisibleFields.IsMusic=!0,n.AddOrEditMusic=!1,n.MusicDisableOrVisibleFields.Cancel=!1):(n.DisableOrVisibleFields.IsMusic=!0,n.AddOrEditMusic=!0,n.MusicDisableOrVisibleFields.Cancel=!0)):(n.perspeciality.WorkExperience=n.SelectedSpeciality.WorkExperience,n.perspeciality.MonthExperience=n.SelectedSpeciality.MonthExperience,n.perspeciality.DayExperience=n.SelectedSpeciality.DayExperience,n.perspeciality.YearsExperienceForPoints=n.SelectedSpeciality.YearsExperienceForPoints,n.perspeciality.MonthsExperienceForPoints=n.SelectedSpeciality.MonthsExperienceForPoints,n.perspeciality.DaysExperienceForPoints=n.SelectedSpeciality.DaysExperienceForPoints,n.perspeciality.Speciality1.selected.IsMusic?(u=e("filter")(n.musicspecialities,{MusicSpecialistPerSpeciality:{SpecialityId:n.perspeciality.Speciality1.selected.Id}},!0).length,u!=0?(n.DisableOrVisibleFields.IsMusic=!0,n.AddOrEditMusic=!1,n.MusicDisableOrVisibleFields.Cancel=!1):(n.DisableOrVisibleFields.IsMusic=!0,n.AddOrEditMusic=!0,n.MusicDisableOrVisibleFields.Cancel=!0)):(n.DisableOrVisibleFields.IsMusic=!1,n.AddOrEditMusic=!1,n.MusicDisableOrVisibleFields.Cancel=!1))},300);o(function(){n.formFields();unblockUI("#tblSpeciality");$("#AddSpecModal").modal("show")},300)})};n.openAddSpecEEPEBPModal=function(t){blockUI({target:"#tblSpecialityEEPEBP",animate:!0});n.SaveDisabled=!1;var i=u.all([n.fillFormControlsEEPEBP(),f.getByParams({Id:t.Id},"/api/PersonSpeciality/getPersonSpecialityBySpecialityId"),f.getByParams({Id:t.PersonSpecialityEEPEBPId},"/api/PersonSpeciality/getPersonSpecialityEEPEBPBySpecialityId"),f.getByParams({personId:h},"/api/PersonAcademicQualification/getPersonAcademicQualificationEEPEBP"),f.getByParams({Id:t.Id},"/api/PersonDiploma/getPersonSpecialityDiplomaById"),]);i.then(function(i){o(function(){var u,r;for(n.SelectedSpeciality=i[1],n.SelectedSpecialityEEPEBP=i[2],u=i[3],n.SpecialityDiplomas=i[4],n.messages={completed:"",percentage:"0",error:""},n.uploadedFileDetails="",n.SendDataForCVDto={Id:"",PersonSpecialityId:"",PersonId:""},n.SendDataForCVFullDto={Id:"",PersonSpecialityId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""},n.minDiplomaDate=n.SpecialityDiplomas[0].DiplomaDate,r=n.SpecialityDiplomas.length-1;r>=1;r--)n.SpecialityDiplomas[r].DiplomaDate<n.minDiplomaDate&&(n.minDiplomaDate=n.SpecialityDiplomas[r].DiplomaDate);n.DisableFieldsetNotActive=t.IsActive?!1:!0;n.pageRules.specEEPEBP.CanUpdate?n.SelectedSpeciality.IsConfirmed&&n.pageRules.specEEPEBP.CanUpdate?f.isValueInArray(n.pageRules.specEEPEBP.CanAccess,"u1, u2")?n.DisableFieldsetEEPEBP=!0:f.isValueInArray(n.pageRules.specEEPEBP.CanAccess,"a, m1, m2")?n.DisableFieldsetEEPEBP=!1:f.isValueInArray(n.pageRules.specEEPEBP.CanAccess,"d1, d2, p")?(n.DisableFieldsetEEPEBP=!1,n.DisableFieldsetEEPEBPNotMemberFields=!0,n.DisableField={Speciality:!0,DiplomaDegree:!0,DiplomaDate:!0}):n.DisableFieldsetEEPEBP=!0:!n.SelectedSpeciality.IsConfirmed&&n.pageRules.specEEPEBP.CanUpdate?(n.DisableFieldsetEEPEBP=!1,n.DisableFieldsetEEPEBPNotMemberFields=!1):n.DisableFieldsetEEPEBP=!0:n.DisableFieldsetEEPEBP=!0;n.perspeciality.Id=n.SelectedSpeciality.Id;n.perspeciality.IsConfirmed=n.SelectedSpeciality.IsConfirmed;n.ModalTitle="Προβολή / Επεξεργασία κλάδου Ε.Ε.Π. - Ε.Β.Π.";n.DisableOrVisibleFields.Speciality=!1;n.perspeciality.Speciality1.selected=e("filter")(n.consts.SpecialitiesEEPEBP,{Id:n.SelectedSpeciality.Speciality1.Id},!0)[0];n.perspeciality.PersonSpecialityEEPEBPId=n.SelectedSpeciality.PersonSpecialityEEPEBPId;n.perspeciality.ProfessionLicenceNumber=n.SelectedSpecialityEEPEBP.ProfessionLicenceNumber;n.perspeciality.ProfessionLicence=n.SelectedSpecialityEEPEBP.ProfessionLicence;n.perspeciality.ProfessionLicenceDate=n.SelectedSpecialityEEPEBP.ProfessionLicenceDate;n.perspeciality.ProfessionLicenceBodyId=n.SelectedSpecialityEEPEBP.ProfessionLicenceBodyId;n.perspeciality.ChildPsychiatrist=n.SelectedSpecialityEEPEBP.ChildPsychiatrist;n.perspeciality.ChildPsychiatristDate=n.SelectedSpecialityEEPEBP.ChildPsychiatristDate;n.perspeciality.MedicalAssociation=n.SelectedSpecialityEEPEBP.MedicalAssociation;n.perspeciality.CountrysideService=n.SelectedSpecialityEEPEBP.CountrysideService;n.perspeciality.Physiotherapists=n.SelectedSpecialityEEPEBP.Physiotherapists;n.perspeciality.AeiOrTei=n.SelectedSpecialityEEPEBP.AeiOrTei;n.perspeciality.De1DimplomaType=n.SelectedSpecialityEEPEBP.De1DimplomaType;n.perspeciality.IsAcademicQualificationRequired=n.SelectedSpecialityEEPEBP.IsAcademicQualificationRequired;n.perspeciality.IsSeminarRequired=n.SelectedSpecialityEEPEBP.IsSeminarRequired;n.perspeciality.PersonAcademicQualificationId=f.isEmptyValue(n.SelectedSpecialityEEPEBP.PersonAcademicQualificationId)?null:n.SelectedSpecialityEEPEBP.PersonAcademicQualificationId;n.perspeciality.PersonSeminarId=f.isEmptyValue(n.SelectedSpecialityEEPEBP.PersonSeminarId)?null:n.SelectedSpecialityEEPEBP.PersonSeminarId;n.perspeciality.CertificateDE1=n.SelectedSpecialityEEPEBP.CertificateDE1;n.perspeciality.CertificateDE1Date=n.SelectedSpecialityEEPEBP.CertificateDE1Date;n.perspeciality.MedicalAssociationNumber=n.SelectedSpecialityEEPEBP.MedicalAssociationNumber;n.perspeciality.MedicalAssociationDateFrom=n.SelectedSpecialityEEPEBP.MedicalAssociationDateFrom;n.perspeciality.MedicalAssociationDateTo=n.SelectedSpecialityEEPEBP.MedicalAssociationDateTo;n.perspeciality.NursesOrHealthVisitorsType=n.SelectedSpecialityEEPEBP.NursesOrHealthVisitorsType;n.perspeciality.NursesOrHealthVisitors=n.SelectedSpecialityEEPEBP.NursesOrHealthVisitors;n.perspeciality.NursesOrHealthVisitorsNumber=n.SelectedSpecialityEEPEBP.NursesOrHealthVisitorsNumber;n.perspeciality.NursesOrHealthVisitorsDateFrom=n.SelectedSpecialityEEPEBP.NursesOrHealthVisitorsDateFrom;n.perspeciality.NursesOrHealthVisitorsDateTo=n.SelectedSpecialityEEPEBP.NursesOrHealthVisitorsDateTo;n.perspeciality.PhysiotherapistsNumber=n.SelectedSpecialityEEPEBP.PhysiotherapistsNumber;n.perspeciality.PhysiotherapistsDateFrom=n.SelectedSpecialityEEPEBP.PhysiotherapistsDateFrom;n.perspeciality.PhysiotherapistsDateTo=n.SelectedSpecialityEEPEBP.PhysiotherapistsDateTo;n.perspeciality.SocialWorkers=n.SelectedSpecialityEEPEBP.SocialWorkers;n.perspeciality.SocialWorkersNumber=n.SelectedSpecialityEEPEBP.SocialWorkersNumber;n.perspeciality.SocialWorkersDateFrom=n.SelectedSpecialityEEPEBP.SocialWorkersDateFrom;n.perspeciality.SocialWorkersDateTo=n.SelectedSpecialityEEPEBP.SocialWorkersDateTo;n.perspeciality.Ergotherapists=n.SelectedSpecialityEEPEBP.Ergotherapists;n.perspeciality.ErgotherapistsNumber=n.SelectedSpecialityEEPEBP.ErgotherapistsNumber;n.perspeciality.ErgotherapistsDateFrom=n.SelectedSpecialityEEPEBP.ErgotherapistsDateFrom;n.perspeciality.ErgotherapistsDateTo=n.SelectedSpecialityEEPEBP.ErgotherapistsDateTo;n.perspeciality.WorkExperienceEEPEBP=n.SelectedSpecialityEEPEBP.WorkExperienceEEPEBP;n.perspeciality.YearExperienceEEPEBP=n.SelectedSpecialityEEPEBP.YearExperienceEEPEBP;n.perspeciality.MonthExperienceEEPEBP=n.SelectedSpecialityEEPEBP.MonthExperienceEEPEBP;n.perspeciality.DayExperienceEEPEBP=n.SelectedSpecialityEEPEBP.DayExperienceEEPEBP;(n.perspeciality.IsAcademicQualificationRequired||n.perspeciality.IsSeminarRequired)&&!n.perspeciality.IsConfirmed||(n.persondiplomasFilter=n.SpecialityDiplomas);f.isEmptyValue(n.SpecialityDiplomas[0].DiplomaId)?n.perspeciality.Diploma.selected=e("filter")(n.personDiplomas,{DiplomaId:n.SpecialityDiplomas[0].DiplomaId},!0)[0]:(n.perspeciality.Diploma.selected=e("filter")(n.personDiplomas,{DiplomaId:n.SpecialityDiplomas[0].DiplomaId},!0)[0],n.SelectedSpeciality.Diploma=e("filter")(n.personDiplomas,{DiplomaId:n.SpecialityDiplomas[0].DiplomaId},!0)[0])},300);o(function(){n.formFieldsEEPEBP();unblockUI("#tblSpecialityEEPEBP");$("#AddSpecEEPEBPModal").modal("show")},300)})};Date.prototype.withoutTime=function(){var n=new Date(this);return n.setHours(0,0,0,0,0),n};n.FillRealDiplomaDate=function(){var i,t;if(!f.isEmptyValue(n.perspeciality.DiplomaDate))if(i=new Date(n.perspeciality.DiplomaDate),t=i.getFullYear(),n.DiplomaAcquisitionPeriod=[{Value:t-1+"-01-01",Description:"Χειμερινό Εξάμηνο/"+(t-2)+"-"+(t-1)},{Value:t-1+"-05-01",Description:"Εαρινό Εξάμηνο/"+(t-2)+"-"+(t-1)},{Value:t-1+"-08-16",Description:"Περίοδος Σεπτεμβρίου/"+(t-2)+"-"+(t-1)},{Value:t+"-01-01",Description:"Χειμερινό Εξάμηνο/"+(t-1)+"-"+t},{Value:t+"-05-01",Description:"Εαρινό Εξάμηνο/"+(t-1)+"-"+t},{Value:t+"-08-16",Description:"Περίοδος Σεπτεμβρίου/"+(t-1)+"-"+t},{Value:t+1+"-01-01",Description:"Χειμερινό Εξάμηνο/"+t+"-"+(t+1)},{Value:t+1+"-05-01",Description:"Εαρινό Εξάμηνο/"+t+"-"+(t+1)},{Value:t+1+"-08-16",Description:"Περίοδος Σεπτεμβρίου/"+t+"-"+(t+1)}],f.isEmptyValue(n.perspeciality.DiplomaAcquisitionPeriod)||n.DiplomaDate.IsChanged)new Date(i).withoutTime()>=new Date(t+"-01-01").withoutTime()&&new Date(i).withoutTime()<new Date(t+"-05-01").withoutTime()?n.perspeciality.DiplomaAcquisitionPeriod=t+"-01-01":new Date(i).withoutTime()>=new Date(t+"-05-01").withoutTime()&&new Date(i).withoutTime()<new Date(t+"-08-16").withoutTime()?n.perspeciality.DiplomaAcquisitionPeriod=t+"-05-01":new Date(i).withoutTime()>=new Date(t+"-08-16").withoutTime()&&new Date(i).withoutTime()<new Date(t+"-12-31").withoutTime()&&(n.perspeciality.DiplomaAcquisitionPeriod=t+"-08-16");else{var e=new Date(n.perspeciality.DiplomaAcquisitionPeriod),o=e.getFullYear(),r=e.getMonth()+1,u=e.getDate();r.toString().length<=1&&(r="0"+r);u.toString().length<=1&&(u="0"+u);n.perspeciality.DiplomaAcquisitionPeriod=o+"-"+r+"-"+u}};n.FillMusicDiplomaDate=function(){var i,t;if(!f.isEmptyValue(n.permusicspeciality.DiplomaDate))if(i=new Date(n.permusicspeciality.DiplomaDate),t=i.getFullYear(),n.MusicDiplomaAcquisitionPeriod=[{Value:t-1+"-01-01",Description:"Χειμερινό Εξάμηνο/"+(t-2)+"-"+(t-1)},{Value:t-1+"-05-01",Description:"Εαρινό Εξάμηνο/"+(t-2)+"-"+(t-1)},{Value:t-1+"-08-16",Description:"Περίοδος Σεπτεμβρίου/"+(t-2)+"-"+(t-1)},{Value:t+"-01-01",Description:"Χειμερινό Εξάμηνο/"+(t-1)+"-"+t},{Value:t+"-05-01",Description:"Εαρινό Εξάμηνο/"+(t-1)+"-"+t},{Value:t+"-08-16",Description:"Περίοδος Σεπτεμβρίου/"+(t-1)+"-"+t},{Value:t+1+"-01-01",Description:"Χειμερινό Εξάμηνο/"+t+"-"+(t+1)},{Value:t+1+"-05-01",Description:"Εαρινό Εξάμηνο/"+t+"-"+(t+1)},{Value:t+1+"-08-16",Description:"Περίοδος Σεπτεμβρίου/"+t+"-"+(t+1)}],f.isEmptyValue(n.permusicspeciality.DiplomaAcquisitionPeriod)||n.musicDiplomaDate.IsChanged)new Date(i).withoutTime()>=new Date(t+"-01-01").withoutTime()&&new Date(i).withoutTime()<new Date(t+"-05-01").withoutTime()?n.permusicspeciality.DiplomaAcquisitionPeriod=t+"-01-01":new Date(i).withoutTime()>=new Date(t+"-05-01").withoutTime()&&new Date(i).withoutTime()<new Date(t+"-08-16").withoutTime()?n.permusicspeciality.DiplomaAcquisitionPeriod=t+"-05-01":new Date(i).withoutTime()>=new Date(t+"-08-16").withoutTime()&&new Date(i).withoutTime()<new Date(t+"-12-31").withoutTime()&&(n.permusicspeciality.DiplomaAcquisitionPeriod=t+"-08-16");else{var e=new Date(n.permusicspeciality.DiplomaAcquisitionPeriod),o=e.getFullYear(),r=e.getMonth()+1,u=e.getDate();r.toString().length<=1&&(r="0"+r);u.toString().length<=1&&(u="0"+u);n.permusicspeciality.DiplomaAcquisitionPeriod=o+"-"+r+"-"+u}};n.formFields=function(){f.isEmptyValue(n.perspeciality.Speciality1.selected)||(n.maxDate=new Date(n.perspeciality.Speciality1.selected.LimitationDate),n.perspeciality.Speciality1.selected.IsMusic&&(f.isEmptyValue(n.Klados.Id)||n.Klados.IsChanged)?(n.MusicSpecialist=e("filter")(n.consts.MusicSpecialist,{SpecialityId:n.perspeciality.Speciality1.selected.Id},!0),n.MusicDisableOrVisibleFields.WithoutMusicSpecialistOrIsEM16=n.perspeciality.Speciality1.selected.IsEM16?!0:!1):n.perspeciality.Speciality1.selected.IsMusic||(n.permusicspeciality.MusicSpecialistPerSpeciality="",n.permusicspeciality.DiplomaDegree="",n.permusicspeciality.DiplomaDate="",n.permusicspeciality.DiplomaAcquisitionPeriod="",n.permusicspeciality.DiplomaTitle="",n.permusicspeciality.MusicSpecialistPerSpecialityDiploma=""),n.perspeciality.Speciality1.selected.IsMusic&&n.CheckAddMusicBtn(),n.FillRealDiplomaDate(),n.perspeciality.Speciality1.selected.IsEM16?(n.perspeciality.MusicEquivalenceType="",n.perspeciality.WorkExperience="",n.perspeciality.MonthExperience="",n.perspeciality.DayExperience="",n.perspeciality.YearsExperienceForPoints="",n.perspeciality.MonthsExperienceForPoints="",n.perspeciality.DaysExperienceForPoints="",f.isEmptyValue(n.perspeciality.Id)&&(n.AddOrEditMusic=!0),n.DisableOrVisibleFields={Speciality:!0,MusicEquivalenceType:!1,WorkExperience:!1,MonthExperience:!1,DayExperience:!1,Save:!0,IsMusic:!0}):(n.perspeciality.Speciality1.selected.IsMusic?(n.DisableOrVisibleFields.IsMusic=!0,n.perspeciality.Id==""&&(n.AddOrEditMusic=!0)):(n.DisableOrVisibleFields.IsMusic=!1,n.AddOrEditMusic=!1),n.DisableOrVisibleFields.WorkExperience=n.perspeciality.Speciality1.selected.OpenWorkExperience,n.DisableOrVisibleFields.WorkExperience||(n.perspeciality.WorkExperience=""),n.DisableOrVisibleFields.WorkExperience&&n.perspeciality.WorkExperience==2?(n.DisableOrVisibleFields.MonthExperience=!0,n.DisableOrVisibleFields.DayExperience=!0):(n.DisableOrVisibleFields.MonthExperience=!1,n.DisableOrVisibleFields.DayExperience=!1,n.perspeciality.MonthExperience="",n.perspeciality.DayExperience=""),n.DisableOrVisibleFields.WorkExperience&&n.perspeciality.WorkExperience==2&&(n.perspeciality.YearsExperienceForPoints="",n.perspeciality.MonthsExperienceForPoints="",n.perspeciality.DaysExperienceForPoints=""),n.DisableOrVisibleFields.Save=!f.isEmptyValue(n.personDiplomasPerSpeciality)&&n.personDiplomasPerSpeciality.length>0?!0:n.personMessage.IsPermanent&&f.isValueInArray(f.getRoleCode(n.authentication.role),"a")?!0:!1));$("#editSpecialityForm").validate().resetForm()};n.changeSeminarRequired=function(){n.perspeciality.IsSeminarRequired&&(n.perspeciality.IsAcademicQualificationRequired=!1);n.formFieldsEEPEBP()};n.changeAcademicQualificationRequired=function(){n.perspeciality.IsAcademicQualificationRequired&&(n.perspeciality.IsSeminarRequired=!1);n.formFieldsEEPEBP()};n.formFieldsEEPEBP=function(){var o,y,s,l,a,v,i,t;if(n.messageForAcademic=!1,n.DisableOrVisibleFields.Save=!1,n.IsAcademicQualificationRequired=!1,n.IsSeminarRequired=!1,n.DisableOrVisibleFields.IsAcademicQualificationRequired=!1,n.DisableOrVisibleFields.DisableAcademicQualificationRequired=!1,n.DisableOrVisibleFields.IsSeminarRequired=!1,n.DisableOrVisibleFields.DisableSeminarRequired=!1,!f.isEmptyValue(n.perspeciality.Speciality1.selected)){if(n.DisableOrVisibleFields.Save=!0,n.maxDate=new Date(n.perspeciality.Speciality1.selected.LimitationDate),f.isEmptyValue(n.Klados.Id)?(n.Klados.Id=n.perspeciality.Speciality1.selected.Id,n.Klados.IsChanged=!1):n.Klados.Id!=n.perspeciality.Speciality1.selected.Id?(n.Klados.Id=n.perspeciality.Speciality1.selected.Id,n.Klados.IsChanged=!0):n.Klados.IsChanged=!1,n.Klados.IsChanged&&(n.perspeciality.DimplomaSource.selected=[],n.perspeciality.Country.selected=[],n.perspeciality.Diploma=[],n.perspeciality.IsAcademicQualificationRequired=!1,n.perspeciality.IsSeminarRequired=!1),n.perspeciality.Speciality1.selected.Code=="ΠΕ25"?n.DisableOrVisibleFields.NursesOrHealthVisitors=!0:(n.DisableOrVisibleFields.NursesOrHealthVisitors=!1,n.perspeciality.NursesOrHealthVisitors=!1,n.perspeciality.NursesOrHealthVisitorsNumber="",n.perspeciality.NursesOrHealthVisitorsDateFrom="",n.perspeciality.NursesOrHealthVisitorsDateTo=""),n.de01EEP=n.perspeciality.Speciality1.selected.Code=="ΔΕ01"?!0:!1,n.AcademicQualificationRequired.Id==n.perspeciality.IsAcademicQualificationRequired?n.AcademicQualificationRequired.IsChanged=!1:n.AcademicQualificationRequired.Id!=n.perspeciality.IsAcademicQualificationRequired?(n.AcademicQualificationRequired.Id=n.perspeciality.IsAcademicQualificationRequired,n.AcademicQualificationRequired.IsChanged=!0):n.AcademicQualificationRequired.IsChanged=!1,n.Klados.IsChanged&&(n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΕΠ"&&n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΚΙΝ"&&n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΝΟ"?(angular.copy(e("filter")(n.academicQualifications,{IsEEPEBP:!0},!0),n.FilterAcademicQualifications),n.FilterAcademicQualifications=e("filter")(n.FilterAcademicQualifications,function(n){return n.Id!==14})):angular.copy(e("filter")(n.academicQualifications,{IsEEPEBP:!0},!0),n.FilterAcademicQualifications)),o=["ΠΕ60","ΠΕ61","ΠΕ70","ΠΕ71","ΠΕ73","ΠΕ17.01","ΠΕ17.02","ΠΕ17.03","ΠΕ17.04"],y="2016-01-01",f.isEmptyValue(n.perspeciality.DiplomaDate)?n.InitialRegistrationDateRequired=!0:(n.InitialRegistrationDateRequired=o.indexOf(n.perspeciality.Speciality1.selected.Code)!=-1||n.perspeciality.DiplomaDate<"2016-01-01"?!1:!0,n.minDate=n.perspeciality.DiplomaDate),n.perspeciality.Speciality1.selected.Code!="ΠΕ23"||(f.isEmptyValue(n.perspeciality.Diploma.selected)||c.indexOf(n.perspeciality.Diploma.selected.DiplomaId)==-1)&&(f.isEmptyValue(n.SelectedSpeciality.Diploma)||c.indexOf(n.SelectedSpeciality.Diploma.DiplomaId)==-1)?n.perspeciality.Speciality1.selected.Code=="ΠΕ23"?(n.IsAcademicQualificationRequired=!1,n.DisableOrVisibleFields.IsAcademicQualificationRequired=!0,n.DisableOrVisibleFields.DisableAcademicQualificationRequired=!1):n.perspeciality.Speciality1.selected.Code=="ΠΕ23"&&f.isEmptyValue(n.perspeciality.Diploma.selected)&&(n.IsAcademicQualificationRequired=!1):(n.IsAcademicQualificationRequired=!0,n.DisableOrVisibleFields.IsAcademicQualificationRequired=!1,n.DisableOrVisibleFields.DisableAcademicQualificationRequired=!0),n.perspeciality.Speciality1.selected.Code=="ΠΕ22"&&(n.IsAcademicQualificationRequired=!0,n.perspeciality.IsAcademicQualificationRequired=!0,n.DisableOrVisibleFields.IsAcademicQualificationRequired=!0,n.DisableOrVisibleFields.DisableAcademicQualificationRequired=!0),n.perspeciality.Speciality1.selected.Code=="ΠΕ31ΕΠ"||n.perspeciality.Speciality1.selected.Code=="ΠΕ31ΚΙΝ"||n.perspeciality.Speciality1.selected.Code=="ΠΕ31ΝΟ"?(n.IsSeminarRequired=!0,n.DisableOrVisibleFields.IsSeminarRequired=!0,n.IsAcademicQualificationRequired=!0,n.DisableOrVisibleFields.IsAcademicQualificationRequired=!0):(n.IsSeminarRequired=!1,n.perspeciality.IsSeminarRequired=!1,n.DisableOrVisibleFields.IsSeminarRequired=!1,n.DisableOrVisibleFields.DisableSeminarRequired=!1),s=["ΠΕ31ΕΠ","ΠΕ31ΚΙΝ","ΠΕ31ΝΟ"],(s.indexOf(n.perspeciality.Speciality1.selected.Code)!=-1||n.IsSeminarRequired)&&(f.getByParams({personId:h},"/api/PersonQualifications/getPersonSeminars").then(function(t){n.consts.PersonSeminar=t;n.DisableOrVisibleFields.IsSeminarRequired=!0},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση επιλογών")}),f.isEmptyValue(n.perspeciality.Diploma.selected)||($sscope.minDiplomaDate=n.perspeciality.Diploma.selected.DiplomaDate)),l=["ΠΕ21","ΠΕ22","ΠΕ31ΕΠ","ΠΕ31ΚΙΝ","ΠΕ31ΝΟ"],(l.indexOf(n.perspeciality.Speciality1.selected.Code)!=-1||n.IsAcademicQualificationRequired)&&f.getByParams({personId:h},"/api/PersonAcademicQualification/getAllPersonAcademicQualificationForEEPEBP").then(function(t){n.consts.PersonAcademicQualification=t;n.DisableOrVisibleFields.IsAcademicQualificationRequired=!0},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση επιλογών")}),f.isEmptyValue(n.perspeciality.Speciality1.selected)?(n.DisableOrVisibleFields.PersonAcademicQualification=!1,n.DisableOrVisibleFields.PersonSeminar=!1,n.perspeciality.PersonAcademicQualificationId="",n.DisableOrVisibleFields.ProfessionLicence=!1,n.perspeciality.ProfessionLicence="",n.perspeciality.ProfessionLicenceDate="",n.perspeciality.ProfessionLicenceBodyId="",n.perspeciality.ProfessionLicenceNumber="",n.DisableOrVisibleFields.De1DimplomaType=!1,n.perspeciality.De1DimplomaType="",n.perspeciality.CertificateDE1="",n.perspeciality.CertificateDE1Date="",n.DisableOrVisibleFields.ChildPsychiatrist=!1,n.perspeciality.ChildPsychiatrist="",n.perspeciality.ChildPsychiatristDate="",n.perspeciality.MedicalAssociation="",n.perspeciality.CountrysideService="",n.perspeciality.MedicalAssociationNumber="",n.perspeciality.MedicalAssociationDateFrom="",n.perspeciality.MedicalAssociationDateTo="",n.DisableOrVisibleFields.Physiotherapists=!1,n.perspeciality.Physiotherapists="",n.perspeciality.PhysiotherapistsNumber="",n.perspeciality.PhysiotherapistsDateFrom="",n.perspeciality.PhysiotherapistsDateTo="",n.DisableOrVisibleFields.Ergotherapists=!1,n.perspeciality.Ergotherapists="",n.perspeciality.ErgotherapistsNumber="",n.perspeciality.ErgotherapistsDateFrom="",n.perspeciality.ErgotherapistsDateTo="",n.perspeciality.AeiOrTei="",n.DisableOrVisibleFields.AeiOrTei=!1,n.DisableOrVisibleFields.WorkExperienceEEPEBP=!1,n.perspeciality.WorkExperienceEEPEBP=""):(n.perspeciality.IsAcademicQualificationRequired?(n.DisableOrVisibleFields.PersonAcademicQualification=!0,n.DisableOrVisibleFields.PersonSeminar=!1):n.perspeciality.IsSeminarRequired?(n.DisableOrVisibleFields.PersonAcademicQualification=!1,n.DisableOrVisibleFields.PersonSeminar=!0):(n.DisableOrVisibleFields.PersonAcademicQualification=!1,n.perspeciality.PersonAcademicQualificationId="",n.perspeciality.PersonSeminarId=""),a=["ΠΕ21","ΠΕ26","ΠΕ23","ΠΕ24","ΠΕ25","ΠΕ28","ΠΕ29","ΠΕ30"],a.indexOf(n.perspeciality.Speciality1.selected.Code)==-1||n.messageNoDiploma?(n.DisableOrVisibleFields.ProfessionLicence=!1,n.perspeciality.ProfessionLicence="",n.perspeciality.ProfessionLicenceDate="",n.perspeciality.ProfessionLicenceBodyId="",n.perspeciality.ProfessionLicenceNumber=""):(f.isEmpty(n.consts.ProfessionLicenceBody)&&f.getByAll("/api/PersonSpeciality/getProfessionLicenceBody").then(function(t){n.consts.ProfessionLicenceBody=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των φορέων")}),n.DisableOrVisibleFields.ProfessionLicence=!0),n.perspeciality.ProfessionLicence||(n.perspeciality.ProfessionLicence="",n.perspeciality.ProfessionLicenceDate="",n.perspeciality.ProfessionLicenceBodyId="",n.perspeciality.ProfessionLicenceNumber=""),n.perspeciality.Speciality1.selected.Code=="ΔΕ01"?(f.isEmptyValue(n.consts.De1DimplomaType)&&(v=u.all([f.getByAll("/api/Diploma/getDe1DimplomaTypes"),f.getByAll("/api/Diploma/getCertificateDE1Types")]),v.then(function(t){n.consts.De1DimplomaType=t[0];n.consts.CertificateDE1Type=t[1]})),n.DisableOrVisibleFields.De1DimplomaType=!0,f.isEmptyValue(n.perspeciality.De1DimplomaType)||n.perspeciality.De1DimplomaType!=1&&n.perspeciality.De1DimplomaType!=6?(n.DisableOrVisibleFields.De1DimplomaTypeDetails=!1,n.perspeciality.CertificateDE1="",n.perspeciality.CertificateDE1Date=""):n.DisableOrVisibleFields.De1DimplomaTypeDetails=!0):(n.DisableOrVisibleFields.De1DimplomaType=!1,n.perspeciality.De1DimplomaType="",n.perspeciality.CertificateDE1="",n.perspeciality.CertificateDE1Date="",n.DisableOrVisibleFields.De1DimplomaTypeDetails=!1,n.perspeciality.CertificateDE1="",n.perspeciality.CertificateDE1Date=""),n.perspeciality.Speciality1.selected.Code=="ΠΕ24"?(n.DisableOrVisibleFields.ChildPsychiatrist=!0,n.perspeciality.MedicalAssociation||(n.MedicalAssociationNumber="",n.MedicalAssociationDateFrom="",n.MedicalAssociationDateTo=""),n.perspeciality.ChildPsychiatrist||(n.perspeciality.ChildPsychiatristDate="")):(n.DisableOrVisibleFields.ChildPsychiatrist=!1,n.perspeciality.ChildPsychiatrist="",n.perspeciality.ChildPsychiatristDate="",n.perspeciality.MedicalAssociation="",n.perspeciality.CountrysideService="",n.MedicalAssociationNumber="",n.MedicalAssociationDateFrom="",n.MedicalAssociationDateTo=""),n.perspeciality.Speciality1.selected.Code=="ΠΕ28"?n.DisableOrVisibleFields.Physiotherapists=!0:(n.DisableOrVisibleFields.Physiotherapists=!1,n.perspeciality.Physiotherapists="",n.perspeciality.PhysiotherapistsNumber="",n.perspeciality.PhysiotherapistsDateFrom="",n.perspeciality.PhysiotherapistsDateTo=""),n.perspeciality.Speciality1.selected.Code=="ΠΕ29"?n.DisableOrVisibleFields.Ergotherapists=!0:(n.DisableOrVisibleFields.Ergotherapists=!1,n.perspeciality.Ergotherapists="",n.perspeciality.ErgotherapistsNumber="",n.perspeciality.ErgotherapistsDateFrom="",n.perspeciality.ErgotherapistsDateTo=""),n.perspeciality.Speciality1.selected.Code=="ΠΕ30"?n.DisableOrVisibleFields.SocialWorkers=!0:(n.DisableOrVisibleFields.SocialWorkers=!1,n.perspeciality.SocialWorkers="",n.perspeciality.SocialWorkersNumber="",n.perspeciality.SocialWorkersDateFrom="",n.perspeciality.SocialWorkersDateTo=""),(n.perspeciality.Speciality1.selected.Code=="ΠΕ31ΕΠ"||n.perspeciality.Speciality1.selected.Code=="ΠΕ31ΚΙΝ"||n.perspeciality.Speciality1.selected.Code=="ΠΕ31ΝΟ")&&(n.perspeciality.IsAcademicQualificationRequired||n.perspeciality.IsSeminarRequired)&&(n.DisableOrVisibleFields.WorkExperienceEEPEBP=!0)),n.persondiplomasFilter=[],n.personDiplomasAcademicFilter=[],!f.isEmptyValue(n.Klados.Id)&&n.perspeciality.Speciality1.selected.Code!="ΠΕ22"&&n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΕΠ"&&n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΚΙΝ"&&n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΝΟ"&&(f.isEmptyValue(n.perspeciality.IsAcademicQualificationRequired)||n.perspeciality.IsAcademicQualificationRequired==!1)&&(f.isEmptyValue(n.perspeciality.IsSeminarRequired)||n.perspeciality.IsSeminarRequired==!1))for(t=n.personDiplomas.length-1;t>=0;t--)for(i=0;i<n.personDiplomas[t].SpecialityDiploma.length;i++)n.personDiplomas[t].SpecialityDiploma[i].SpecialityDiplId==n.Klados.Id&&c.indexOf(n.personDiplomas[t].DiplomaId)==-1&&n.persondiplomasFilter.push(n.personDiplomas[t]);else if(f.isEmptyValue(n.Klados.Id)||n.perspeciality.Speciality1.selected.Code!="ΠΕ22"&&n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΕΠ"&&n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΚΙΝ"&&n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΝΟ")if(f.isEmptyValue(n.Klados.Id)||n.perspeciality.Speciality1.selected.Code!="ΠΕ23"||f.isEmptyValue(n.perspeciality.IsAcademicQualificationRequired)||n.perspeciality.IsAcademicQualificationRequired!=!0)if(f.isEmptyValue(n.Klados.Id)||n.perspeciality.Speciality1.selected.Code!="ΠΕ21"||(f.isEmptyValue(n.perspeciality.IsAcademicQualificationRequired)||n.perspeciality.IsAcademicQualificationRequired!=!0)&&(f.isEmptyValue(n.perspeciality.IsSeminarRequired)||n.perspeciality.IsSeminarRequired!=!0)){if(!f.isEmptyValue(n.Klados.Id)&&(!f.isEmptyValue(n.perspeciality.IsAcademicQualificationRequired)&&n.perspeciality.IsAcademicQualificationRequired==!0||!f.isEmptyValue(n.perspeciality.IsSeminarRequired)&&n.perspeciality.IsSeminarRequired==!0))for(t=n.personDiplomas.length-1;t>=0;t--)for(i=0;i<n.personDiplomas[t].SpecialityDiploma.length;i++)n.personDiplomas[t].SpecialityDiploma[i].SpecialityDiplId!=n.Klados.Id&&n.personDiplomasAcademicFilter.indexOf(n.personDiplomas[t].DiplomaId)==-1&&n.personDiplomasAcademicFilter.push(n.personDiplomas[t])}else for(t=n.personDiplomas.length-1;t>=0;t--)if(n.personDiplomas[t].SpecialityDiploma.length>0)for(i=0;i<n.personDiplomas[t].SpecialityDiploma.length;i++)n.personDiplomas[t].SpecialityDiploma[i].SpecialityDiplId!=n.Klados.Id&&n.personDiplomas[t].DiplomaTypeId==13&&n.personDiplomasAcademicFilter.indexOf(n.personDiplomas[t].DiplomaId)==-1&&n.personDiplomas[t].DiplomaTypeId==13&&n.personDiplomasAcademicFilter.indexOf(n.personDiplomas[t].DiplomaId)==-1&&n.personDiplomasAcademicFilter.push(n.personDiplomas[t]);else n.personDiplomas[t].DiplomaTypeId==13&&n.personDiplomasAcademicFilter.indexOf(n.personDiplomas[t].DiplomaId)==-1&&n.personDiplomasAcademicFilter.push(n.personDiplomas[t]);else for(t=n.personDiplomas.length-1;t>=0;t--)for(i=0;i<n.personDiplomas[t].SpecialityDiploma.length;i++)c.indexOf(n.personDiplomas[t].DiplomaId)!=-1&&n.personDiplomasAcademicFilter.indexOf(n.personDiplomas[t].DiplomaId)==-1&&n.personDiplomasAcademicFilter.push(n.personDiplomas[t]);else for(t=n.personDiplomas.length-1;t>=0;t--)for(i=0;i<n.personDiplomas[t].SpecialityDiploma.length;i++)n.personDiplomas[t].SpecialityDiploma[i].SpecialityDiplId==n.Klados.Id&&c.indexOf(n.personDiplomas[t].DiplomaId)==-1&&n.personDiplomasAcademicFilter.push(n.personDiplomas[t]);if(f.isEmptyValue(n.persondiplomasFilter)){if(!f.isEmptyValue(n.personDiplomasAcademicFilter))for(n.minDiplomaDate=n.personDiplomasAcademicFilter[0].DiplomaDate,t=n.personDiplomasAcademicFilter.length-1;t>=1;t--)n.personDiplomasAcademicFilter[t].DiplomaDate<n.minDiplomaDate&&(n.minDiplomaDate=n.personDiplomasAcademicFilter[t].DiplomaDate)}else for(n.minDiplomaDate=n.persondiplomasFilter[0].DiplomaDate,t=n.persondiplomasFilter.length-1;t>=1;t--)n.persondiplomasFilter[t].DiplomaDate<n.minDiplomaDate&&(n.minDiplomaDate=n.persondiplomasFilter[t].DiplomaDate);n.messageNoDiploma=!f.isEmptyValue(n.Klados.Id)&&(f.isEmptyValue(n.persondiplomasFilter)&&!n.perspeciality.IsAcademicQualificationRequired&&!n.perspeciality.IsSeminarRequired&&n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΕΠ"&&n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΚΙΝ"&&n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΝΟ"||f.isEmptyValue(n.personDiplomasAcademicFilter)&&(n.perspeciality.IsAcademicQualificationRequired||n.perspeciality.IsSeminarRequired))?!0:!1;n.DisableAndVisibleListDiploma=!f.isEmptyValue(n.personDiplomas)&&f.isEmptyValue(n.perspeciality.IsAcademicQualificationRequired)&&f.isEmptyValue(n.perspeciality.IsSeminarRequired)?!0:!1}$("#editSpecialityEEPEBPForm").validate().resetForm()};n.formFieldsAcademic=function(){var t;n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΕΠ"&&n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΚΙΝ"&&n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΝΟ"&&(n.FilterAcademicQualifications=e("filter")(n.FilterAcademicQualifications,function(n){return n.Id!==14}));f.isEmptyValue(n.peracademicqual.AcademicQualification)||(f.isEmptyValue(n.AcademicQualification.Id)?(n.AcademicQualification.Id=n.peracademicqual.AcademicQualification.Id,n.AcademicQualification.IsChanged=!1):n.AcademicQualification.Id!=n.peracademicqual.AcademicQualification.Id?(n.AcademicQualification.Id=n.peracademicqual.AcademicQualification.Id,n.AcademicQualification.IsChanged=!0):n.AcademicQualification.IsChanged=!1,f.isEmptyValue(n.DiplomaSourceAcademic.Id)&&!f.isEmptyValue(n.peracademicqual.DiplomaSource)?(n.DiplomaSourceAcademic.Id=n.peracademicqual.DiplomaSource,n.DiplomaSourceAcademic.IsChanged=!1):f.isEmptyValue(n.DiplomaSourceAcademic.Id)||f.isEmptyValue(n.peracademicqual.DiplomaSource)?n.DiplomaSourceAcademic.IsChanged=!1:n.DiplomaSourceAcademic.Id!=n.peracademicqual.DiplomaSource?(n.DiplomaSourceAcademic.Id=n.peracademicqual.DiplomaSource,n.DiplomaSourceAcademic.IsChanged=!0,n.peracademicqual.AcademicDiploma.Country=""):n.DiplomaSourceAcademic.IsChanged=!1,!f.isEmptyValue(n.CountryAcademic.Id)||f.isEmptyValue(n.peracademicqual.AcademicDiploma)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?f.isEmptyValue(n.CountryAcademic.Id)||f.isEmptyValue(n.peracademicqual.AcademicDiploma)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?n.CountryAcademic.IsChanged=!1:n.CountryAcademic.Id!=n.peracademicqual.AcademicDiploma.Country.Id?(n.CountryAcademic.Id=n.peracademicqual.AcademicDiploma.Country.Id,n.CountryAcademic.IsChanged=!0):n.CountryAcademic.IsChanged=!1:(n.CountryAcademic.Id=n.peracademicqual.AcademicDiploma.Country.Id,n.CountryAcademic.IsChanged=!1),n.peracademicqual.AcademicQualification.Id==14?(n.peracademicqual.FirstSpeciality="",n.peracademicqual.DiplomaDegree="",n.peracademicqual.DiplomaSource="",n.DisableFieldsEEPEBP.EEPEBP=n.peracademicqual.AcademicQualification.IsEEPEBP&&n.peracademicqual.DiplomaSource?!0:!1,f.isEmptyValue(n.peracademicqual.AcademicDiploma)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||(n.peracademicqual.AcademicDiploma.Country=""),n.peracademicqual.EquivalenceType="",n.DisableOrVisibleFieldsAcademic={AcademicQualification:!0,FirstSpeciality:!1,DimplomaSource:!1,Country:!1,DiplomaDate:!0,DiplomaDegree:!1,DiplomaDateAndGrade:!0,AcademicDiploma:!1,DiplomaAbroad:!0,Relevancy:!1,EquivalenceType:!1,Save:!0}):(f.isEmptyValue(n.peracademicqual.Id)&&(n.peracademicqual.Relevancy=!1),n.peracademicqual.FirstSpeciality="",n.peracademicqual.AcademicQualification.IsEEPEBP&&n.peracademicqual.DiplomaSource?(n.DisableFieldsEEPEBP.EEPEBP=!0,n.DisableFieldsEEPEBP.RelevancySchoolPhychology=!0):(n.DisableFieldsEEPEBP.EEPEBP=!1,n.DisableFieldsEEPEBP.RelevancySchoolPhychology=!1),n.DisableOrVisibleFieldsAcademic.AcademicQualification=!0,n.DisableOrVisibleFieldsAcademic.DimplomaSource=!0,n.DisableOrVisibleFieldsAcademic.FirstSpeciality=!1,!f.isEmptyValue(n.peracademicqual.DiplomaSource)&&n.peracademicqual.DiplomaSource>1?(n.DisableOrVisibleFieldsAcademic.Country=!0,(n.AcademicQualification.IsChanged||f.isEmptyValue(n.countriesAcademic)||n.countriesAcademic[0].Id==3)&&(n.peracademicqual.AcademicQualification.IsEEPEBP?f.getByAll("/api/Country/getCountriesWithoutGreece").then(function(t){n.countriesAcademic=t;n.academicDiplomas=""},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):f.getByParams({AcademicQualificationId:n.peracademicqual.AcademicQualification.Id},"/api/Country/getCountriesByAcademicQualificationId").then(function(t){n.countriesAcademic=t;n.academicDiplomas=""},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})),(n.AcademicQualification.IsChanged||n.DiplomaSourceAcademic.IsChanged||n.CountryAcademic.IsChanged||f.isEmptyValue(n.academicDiplomas))&&(n.peracademicqual.AcademicQualification.IsEEPEBP?(n.DisableOrVisibleFieldsAcademic.DiplomaDate=!0,n.DisableOrVisibleFieldsAcademic.DiplomaDegree=!0,n.DisableOrVisibleFieldsAcademic.DiplomaDateAndGrade=!0,n.DisableOrVisibleFieldsAcademic.EquivalenceType=!0,n.DisableOrVisibleFieldsAcademic.AcademicDiploma=!1,n.DisableOrVisibleFieldsAcademic.DiplomaAbroad=!0,n.DisableOrVisibleFieldsAcademic.AcademicQualification=!1,n.DisableOrVisibleFieldsAcademic.Relevancy=f.isValueInArray(n.pageRules.specSmeaEEPEBP.CanAccess,"a, m1, m2"),n.DisableOrVisibleFieldsAcademic.Save=!0):f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)||f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country.Id)?(n.DisableOrVisibleFieldsAcademic.DiplomaDate=!1,n.DisableOrVisibleFieldsAcademic.DiplomaDegree=!1,n.DisableOrVisibleFieldsAcademic.DiplomaDateAndGrade=!1,n.DisableOrVisibleFieldsAcademic.EquivalenceType=!1,n.DisableOrVisibleFieldsAcademic.AcademicDiploma=!1,n.DisableOrVisibleFieldsAcademic.DiplomaAbroad=!1,n.DisableOrVisibleFieldsAcademic.Relevancy=!1,n.DisableOrVisibleFieldsAcademic.Save=!1):(t={AcademicQualificationId:n.peracademicqual.AcademicQualification.Id,CountryId:n.peracademicqual.AcademicDiploma.Country.Id},f.getByParams(t,"/api/PersonAcademicQualification/getAcademicDiploma").then(function(t){n.academicDiplomas=t;n.DisableOrVisibleFieldsAcademic.DiplomaDate=!0;n.DisableOrVisibleFieldsAcademic.DiplomaDegree=!0;n.DisableOrVisibleFieldsAcademic.DiplomaDateAndGrade=!0;n.DisableOrVisibleFieldsAcademic.EquivalenceType=!0;n.DisableOrVisibleFieldsAcademic.AcademicDiploma=!0;n.DisableOrVisibleFieldsAcademic.DiplomaAbroad=!1;n.DisableOrVisibleFieldsAcademic.Relevancy=f.isValueInArray(n.pageRules.specSmeaEEPEBP.CanAccess,"a, m1, m2");n.DisableOrVisibleFieldsAcademic.Save=!0},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})))):f.isEmptyValue(n.peracademicqual.DiplomaSource)||n.peracademicqual.DiplomaSource!=1?(n.DisableOrVisibleFieldsAcademic.CountryAcademic=!1,n.DisableOrVisibleFieldsAcademic.DiplomaDate=!1,n.DisableOrVisibleFieldsAcademic.DiplomaDegree=!1,n.DisableOrVisibleFieldsAcademic.DiplomaDateAndGrade=!1,n.DisableOrVisibleFieldsAcademic.EquivalenceType=!1,n.DisableOrVisibleFieldsAcademic.AcademicDiploma=!1,n.DisableOrVisibleFieldsAcademic.DiplomaAbroad=!1,n.DisableOrVisibleFieldsAcademic.Relevancy=!1,n.DisableOrVisibleFieldsAcademic.Save=!1):(n.countriesAcademic=[{Id:3,Description:"ΕΛΛΑΔΑ",IsEU:!0}],f.isEmptyValue(n.peracademicqual.AcademicDiploma.Country)?(n.peracademicqual.AcademicDiploma=[{Country:[]}],n.peracademicqual.AcademicDiploma.Country=n.countriesAcademic[0]):n.peracademicqual.AcademicDiploma.Country=n.countriesAcademic[0],(n.AcademicQualification.IsChanged||n.DiplomaSourceAcademic.IsChanged||n.CountryAcademic.IsChanged||f.isEmptyValue(n.academicDiplomas))&&(t={AcademicQualificationId:n.peracademicqual.AcademicQualification.Id,CountryId:3},f.getByParams(t,"/api/PersonAcademicQualification/getAcademicDiploma").then(function(t){n.academicDiplomas=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})),n.DisableOrVisibleFieldsAcademic.CountryAcademic=!1,n.DisableOrVisibleFieldsAcademic.DiplomaDate=!0,n.DisableOrVisibleFieldsAcademic.DiplomaDegree=!0,n.DisableOrVisibleFieldsAcademic.DiplomaDateAndGrade=!0,n.DisableOrVisibleFieldsAcademic.EquivalenceType=!1,n.peracademicqual.AcademicQualification.IsEEPEBP&&n.peracademicqual.DiplomaSource?(n.DisableOrVisibleFieldsAcademic.AcademicDiploma=!1,n.DisableOrVisibleFieldsAcademic.DiplomaAbroad=!0):(n.DisableOrVisibleFieldsAcademic.AcademicDiploma=!0,n.DisableOrVisibleFieldsAcademic.DiplomaAbroad=!1),n.DisableOrVisibleFieldsAcademic.Relevancy=f.isValueInArray(n.pageRules.specSmeaEEPEBP.CanAccess,"a, m1, m2"),n.DisableOrVisibleFieldsAcademic.Save=!0)));n.DisableOrVisibleFieldsAcademic.AcademicQualification=n.updateMode?!1:!0};n.EditMusicSpec=function(t){n.permusicspeciality.Id=t.Id;n.MusicDisableOrVisibleFields.AddMusicBtn=!1;n.MusicDisableOrVisibleFields.WithoutMusicSpecialistOrIsEM16=n.perspeciality.Speciality1.selected.IsEM16||t.MusicSpecialistPerSpeciality.MusicSpecialist.Description=="Χωρίς Μουσική Ειδίκευση"?!0:!1;n.permusicspeciality.DiplomaDegree=t.DiplomaDegree;n.permusicspeciality.DiplomaDate=t.DiplomaDate;n.permusicspeciality.DiplomaAcquisitionPeriod=t.DiplomaAcquisitionPeriod;f.isEmptyValue(n.musicDiplomaDate.Id)&&!f.isEmptyValue(n.permusicspeciality.DiplomaDate)?(n.musicDiplomaDate.Id=n.permusicspeciality.DiplomaDate,n.musicDiplomaDate.IsChanged=!1):f.isEmptyValue(n.musicDiplomaDate.Id)||f.isEmptyValue(n.permusicspeciality.DiplomaDate)?n.musicDiplomaDate.IsChanged=!1:n.musicDiplomaDate.Id!=n.permusicspeciality.DiplomaDate?(n.musicDiplomaDate.Id=n.permusicspeciality.DiplomaDate,n.musicDiplomaDate.IsChanged=!0):n.musicDiplomaDate.IsChanged=!1;n.FillMusicDiplomaDate();n.permusicspeciality.DiplomaTitle=t.DiplomaTitle;n.MusicDisableOrVisibleFields.DiplomaTitle=f.isEmptyValue(t.DiplomaTitle)?!1:!0;n.permusicspeciality.PersonId=h;n.permusicspeciality.IsConfirmed=t.IsConfirmed;n.permusicspeciality.MusicSpecialistPerSpecialityId=t.MusicSpecialistPerSpeciality.Id;n.permusicspeciality.MusicSpecialistPerSpeciality={Description:t.MusicSpecialistPerSpeciality.MusicSpecialist.Description,Id:t.MusicSpecialistPerSpeciality.Id,MusicSpecialistId:t.MusicSpecialistPerSpeciality.MusicSpecialistId,SpecialityId:t.MusicSpecialistPerSpeciality.SpecialityId};f.isEmptyValue(t.MusicSpecialistPerSpeciality.MusicSpecialistId)?n.MusicDisableOrVisibleFields.MusicSpecialistPerSpecialityDiploma=!1:(n.MusicDiplomas=e("filter")(n.consts.MusicDiplomas,{SpecialityId:t.MusicSpecialistPerSpeciality.SpecialityId,MusicSpecialistId:t.MusicSpecialistPerSpeciality.MusicSpecialistId},!0),n.MusicDisableOrVisibleFields.MusicSpecialistPerSpecialityDiploma=!0);n.permusicspeciality.MusicSpecialistPerSpecialityDiplomaId=t.MusicSpecialistPerSpecialityDiplomaId;!f.isEmptyValue(t.MusicSpecialistPerSpecialityDiplomaId)&&t.MusicSpecialistPerSpecialityDiplomaId>0&&(n.permusicspeciality.MusicSpecialistPerSpecialityDiploma={Description:t.MusicSpecialistPerSpecialityDiploma.Description,Id:t.MusicSpecialistPerSpecialityDiploma.Id,MusicSpecialistId:t.MusicSpecialistPerSpeciality.MusicSpecialistId,MusicSpecialistPerSpecialityId:t.MusicSpecialistPerSpecialityDiploma.MusicSpecialistPerSpecialityId,SpecialityId:t.MusicSpecialistPerSpeciality.SpecialityId});n.AddOrEditMusic=!0};n.formMusicFields=function(){f.isEmptyValue(n.perspeciality.Speciality1.selected)||(f.isEmptyValue(n.musicDiplomaDate.Id)&&!f.isEmptyValue(n.permusicspeciality.DiplomaDate)?(n.musicDiplomaDate.Id=n.permusicspeciality.DiplomaDate,n.musicDiplomaDate.IsChanged=!1):f.isEmptyValue(n.musicDiplomaDate.Id)||f.isEmptyValue(n.permusicspeciality.DiplomaDate)?n.musicDiplomaDate.IsChanged=!1:n.musicDiplomaDate.Id!=n.permusicspeciality.DiplomaDate?(n.musicDiplomaDate.Id=n.permusicspeciality.DiplomaDate,n.musicDiplomaDate.IsChanged=!0):n.musicDiplomaDate.IsChanged=!1,f.isEmptyValue(n.permusicspeciality.MusicSpecialistPerSpeciality)||n.permusicspeciality.MusicSpecialistPerSpeciality.Description!="Χωρίς Μουσική Ειδίκευση"||n.perspeciality.Speciality1.selected.IsEM16?n.MusicDisableOrVisibleFields.WithoutMusicSpecialistOrIsEM16=!1:(n.MusicDisableOrVisibleFields.WithoutMusicSpecialistOrIsEM16=!0,n.permusicspeciality.DiplomaDegree="",n.permusicspeciality.DiplomaDate="",n.permusicspeciality.DiplomaAcquisitionPeriod="",n.permusicspeciality.DiplomaTitle="",n.permusicspeciality.MusicSpecialistPerSpecialityDiploma=""),n.perspeciality.Speciality1.selected.IsEM16?(n.MusicDisableOrVisibleFields.WithoutMusicSpecialistOrIsEM16=!0,n.permusicspeciality.DiplomaDegree="",n.permusicspeciality.DiplomaDate="",n.permusicspeciality.DiplomaAcquisitionPeriod="",n.permusicspeciality.DiplomaTitle="",n.permusicspeciality.MusicSpecialistPerSpecialityDiploma=""):(n.MusicDisableOrVisibleFields.DiplomaTitle=f.isEmptyValue(n.permusicspeciality.DiplomaTitle)?!1:!0,n.FillMusicDiplomaDate(),f.isEmptyValue(n.permusicspeciality.MusicSpecialistPerSpeciality)?n.MusicDisableOrVisibleFields.MusicSpecialistPerSpecialityDiploma=!1:(n.MusicDiplomas=e("filter")(n.consts.MusicDiplomas,{SpecialityId:n.perspeciality.Speciality1.selected.Id,MusicSpecialistId:n.permusicspeciality.MusicSpecialistPerSpeciality.MusicSpecialistId},!0),n.MusicDisableOrVisibleFields.MusicSpecialistPerSpecialityDiploma=!0)))};n.cancelAcademical=function(){n.AddAcademicQualificationRegion=!1;n.peracademicqual.Country={selected:""};n.peracademicqual.DimplomaSource={selected:""};n.peracademicqual.Diploma={selected:""};n.peracademicqual.DiplomaDate="";n.peracademicqual.DiplomaDegree="";n.DisableOrVisibleFieldsAcademic={DimplomaSource:!1,DiplomaDate:!1,Country:!1,DiplomaDegree:!1,Diploma:!1,DiplomaAbroad:!1,EquivalenceType:!1,YearsOfStudy:!1,ReStudy:!1,Save:!1}};n.cancel=function(){n.perspeciality.Speciality1.selected="";n.perspeciality.Country.selected="";n.perspeciality.DimplomaSource.selected="";n.perspeciality.Diploma.selected="";n.DiplomaAbroad="";n.perspeciality.DiplomaDate="";n.perspeciality.InitialRegistrationDate="";n.perspeciality.DiplomaAcquisitionPeriod="";n.perspeciality.DiplomaDegree="";n.perspeciality.HasSpecialEducation=!1;n.perspeciality.YearsOfStudy="";n.perspeciality.EquivalenceType="";n.perspeciality.MusicEquivalenceType="";n.perspeciality.ReStudy="";n.perspeciality.DateofReStudy="";n.perspeciality.PD130Simulation=!1;n.perspeciality.DateofSimulation="";n.perspeciality.SimulationDegree="";n.perspeciality.WorkExperience="";n.perspeciality.MonthExperience="";n.perspeciality.DayExperience="";n.DisableOrVisibleFields={HasSpecialEducation:!1,DimplomaSource:!1,DiplomaDate:!1,DiplomaAcquisitionPeriod:!1,Country:!1,DiplomaDegree:!1,DiplomaDateAndGrade:!1,Diploma:!1,DiplomaAbroad:!1,EquivalenceType:!1,MusicEquivalenceType:!1,YearsOfStudy:!1,ReStudy:!1,PD130Simulation:!1,DateofSimulation:!1,SimulationDegree:!1,DateofReStudy:!1,WorkExperience:!1,MonthExperience:!1,DayExperience:!1,Save:!1,InitialRegistrationDate:!1};n.cancelAcademical();$("#editSpecialityForm").validate().resetForm()};n.cancelEEPEBP=function(){n.perspeciality.Speciality1.selected="";n.perspeciality.Country.selected="";n.perspeciality.DimplomaSource.selected="";n.perspeciality.Diploma.selected="";n.DiplomaAbroad="";n.perspeciality.DiplomaDate="";n.perspeciality.InitialRegistrationDate="";n.perspeciality.DiplomaAcquisitionPeriod="";n.perspeciality.DiplomaDegree="";n.perspeciality.EquivalenceType="";n.perspeciality.IsAcademicQualificationRequired=!1;n.perspeciality.PersonAcademicQualificationId="";n.perspeciality.IsSeminarRequired=!1;n.perspeciality.PersonSeminarId="";n.perspeciality.ProfessionLicence="";n.perspeciality.ProfessionLicenceDate="";n.perspeciality.ProfessionLicenceBodyId="";n.perspeciality.ProfessionLicenceNumber="";n.perspeciality.De1DimplomaType="";n.perspeciality.CertificateDE1="";n.perspeciality.CertificateDE1Date="";n.perspeciality.ChildPsychiatrist="";n.perspeciality.ChildPsychiatristDate="";n.perspeciality.MedicalAssociation="";n.perspeciality.CountrysideService="";n.perspeciality.MedicalAssociationNumber="";n.perspeciality.MedicalAssociationDateFrom="";n.perspeciality.MedicalAssociationDateTo="";n.perspeciality.NursesOrHealthVisitorsType="";n.perspeciality.NursesOrHealthVisitorsNumber="";n.perspeciality.NursesOrHealthVisitorsDateFrom="";n.perspeciality.NursesOrHealthVisitorsDateTo="";n.perspeciality.Physiotherapists="";n.perspeciality.PhysiotherapistsNumber="";n.perspeciality.PhysiotherapistsDateFrom="";n.perspeciality.PhysiotherapistsDateTo="";n.perspeciality.Ergotherapists="";n.perspeciality.ErgotherapistsNumber="";n.perspeciality.ErgotherapistsDateFrom="";n.perspeciality.ErgotherapistsDateTo="";n.perspeciality.AeiOrTei="";n.perspeciality.WorkExperienceEEPEBP="";n.perspeciality.YearExperienceEEPEBP="";n.perspeciality.MonthExperienceEEPEBP="";n.perspeciality.DayExperienceEEPEBP="";n.DisableOrVisibleFields={DimplomaSource:!1,DiplomaDate:!1,DiplomaAcquisitionPeriod:!1,Country:!1,DiplomaDegree:!1,DiplomaDateAndGrade:!1,Diploma:!1,DiplomaAbroad:!1,EquivalenceType:!1,Save:!1,InitialRegistrationDate:!1,IsAcademicQualificationRequired:!1,IsSeminarRequired:!1,AeiOrTei:!1,NursesOrHealthVisitors:!1,De1DimplomaType:!1,De1DimplomaTypeDetails:!1,ProfessionLicence:!1,ChildPsychiatrist:!1,Physiotherapists:!1,Ergotherapists:!1,WorkExperienceEEPEBP:!1,YearExperienceEEPEBP:!1,MonthExperienceEEPEBP:!1,DayExperienceEEPEBP:!1,PersonAcademicQualification:!1};$("#editSpecialityEEPEBPForm").validate().resetForm()};n.MusicCancel=function(){n.AddOrEditMusic=!1;n.permusicspeciality={};n.MusicDiplomaAcquisitionPeriod=[];n.CheckAddMusicBtn();$("#editSpecialityForm").validate().resetForm()};n.openModalIsMain=function(t){n.ForMainSpec=t;var i=e("filter")(n.specialities,function(n){return n.SpecialityId!=t.SpecialityId&&n.IsMain}),r=e("filter")(n.specialitiesEEPEBP,function(n){return n.SpecialityId!=t.SpecialityId&&n.IsMain});n.showIsMainMessage=!1;(i.length>0||r.length>0)&&!t.IsMain?(n.alertsMessageForIsMain[0].msg="Υπάρχει ήδη δηλωμένος άλλος κλάδος ως κύριος. Με την επιλογή σας αυτή θα ορίσετε τον κλάδο "+t.SpecialityCode+" ως κύριο.",n.showIsMainMessage=!0):i.length==0&&r.length==0&&t.IsMain?(n.alertsMessageForIsMain[0].msg="Με την επιλογή αυτή ο εκπαιδευτικός δεν θα έχει ορισμένο κύριο κλάδο.",n.showIsMainMessage=!0):n.alertsMessageForIsMain[0].msg=""};n.AddAcademicQualification=function(){n.peracademicqual={};n.peracademicqual.AcademicQualification=[];n.peracademicqual.AcademicDiploma=[];n.peracademicqual.PersonId=h;n.perspeciality.PersonAcademicQualificationId=null;n.openRegion=!0;n.pera={DiplomaAbroadAcademic:""};f.isEmpty(n.academicQualifications)?f.getByAll("/api/PersonAcademicQualification/getAllAcademicQualification").then(function(t){n.academicQualifications=t;angular.copy(e("filter")(n.academicQualifications,{IsEEPEBP:!0},!0),n.FilterAcademicQualifications);n.AddAcademicQualificationRegion=!0;n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΕΠ"&&n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΚΙΝ"&&n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΝΟ"&&(n.FilterAcademicQualifications=e("filter")(n.FilterAcademicQualifications,function(n){return n.Id!==14}))},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(angular.copy(e("filter")(n.academicQualifications,{IsEEPEBP:!0},!0),n.FilterAcademicQualifications),n.AddAcademicQualificationRegion=!0,n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΕΠ"&&n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΚΙΝ"&&n.perspeciality.Speciality1.selected.Code!="ΠΕ31ΝΟ"&&(n.FilterAcademicQualifications=e("filter")(n.FilterAcademicQualifications,function(n){return n.Id!==14})));n.perspeciality.Speciality1.selected.Code&&f.isEmpty(n.consts.relevancies)&&f.getByAll("/api/PersonAcademicQualification/getRelevancies").then(function(t){n.consts.relevancy=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});f.isEmpty(n.consts.academicDiplomaSourceType)&&f.getByAll("/api/PersonAcademicQualification/getAcademicDiplomaSourceTypes").then(function(t){n.consts.academicDiplomaSourceType=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});f.isEmpty(n.consts.academicequivalenceType)&&f.getByAll("/api/PersonAcademicQualification/getAcademicEquivalenceTypes").then(function(t){n.consts.academicequivalenceType=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.saveAction=function(t){var i=y();n.showAlertForUpload=i.DimplomaSource>1&&n.showUploadFile&&f.isEmptyValue(n.SendDataForCVFullDto.DirectPdfLink)&&f.isEmptyValue(n.perspeciality.IsConfirmed)?!0:!1;$("#editSpecialityForm").valid()&&!n.showAlertForUpload&&(n.SaveDisabled=!0,t=="Confirm"?i.IsConfirmed=!0:t=="UnConfirm"&&(i.IsConfirmed=!1),f.isEmptyValue(i.Id)?(i.CreatedBy=n.authentication.userName,i.CreatedUserRole=n.authentication.role,i.CreatedRegionAndUnitDescription=n.authentication.unitName,i.personSpecialityFile=n.SendDataForCVFullDto,n.perspeciality.Speciality1.selected.IsMusic?(i.IsMusic=!0,i.MusicSpecialistPerSpecialityId=n.permusicspeciality.MusicSpecialistPerSpeciality.Id,i.MusicDiplomaDate=n.permusicspeciality.DiplomaDate,f.isEmptyValue(n.permusicspeciality.DiplomaDegree)||(i.MusicDiplomaDegree=parseFloat(n.permusicspeciality.DiplomaDegree.toString().replace(",","."))),i.MusicDiplomaAcquisitionPeriod=n.permusicspeciality.DiplomaAcquisitionPeriod,f.isEmptyValue(n.permusicspeciality.MusicSpecialistPerSpecialityDiploma)||(i.MusicSpecialistPerSpecialityDiplomaId=n.permusicspeciality.MusicSpecialistPerSpecialityDiploma.Id)):i.IsMusic=!1,f.postByParams(i,"/api/PersonSpeciality/InsertSpeciality").then(function(){l(h);i.HasSpecialEducation&&(n.personMessage.hasSpecialEducation=!0);$("#AddSpecModal").modal("hide");n.cancel()},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})):(i.ModifiedBy=n.authentication.userName,i.ModifiedUserRole=n.authentication.role,i.ModifiedRegionAndUnitDescription=n.authentication.unitName,i.personSpecialityFile=n.SendDataForCVFullDto,f.postByParams(i,"/api/PersonSpeciality/UpdateSpeciality").then(function(){if(l(h),i.HasSpecialEducation)n.personMessage.hasSpecialEducation=!0;else if(n.specialitiesEEPEBP.length>=1)n.personMessage.hasSpecialEducation=!0;else{n.personMessage.hasSpecialEducation=!1;for(var t=0;t<n.specialities.length;t+=1)if(n.specialities[t].HasSpecialEducation==!0){n.personMessage.hasSpecialEducation=!0;break}}$("#AddSpecModal").modal("hide");n.cancel()},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})))};n.saveActionEEPEBP=function(t){var u,i;n.messageForAcademic=!1;u=!1;n.DisableOrVisibleFields.DisableAcademicQualificationRequired&&n.IsAcademicQualificationRequired&&!n.perspeciality.IsAcademicQualificationRequired&&(n.messageForAcademic=!0);i=p();f.isEmptyValue(n.consts.PersonAcademicQualification)&&(n.openRegion=!0);(f.isEmptyValue(n.perspeciality.PersonAcademicQualificationId)&&n.perspeciality.IsAcademicQualificationRequired||f.isEmptyValue(n.perspeciality.PersonSeminarId)&&n.perspeciality.IsSeminarRequired)&&(u=!0);!$("#editSpecialityEEPEBPForm").valid()||n.messageForAcademic||u||(n.SaveDisabled=!0,t=="Confirm"?i.IsConfirmed=!0:t=="UnConfirm"&&(i.IsConfirmed=!1),f.isEmptyValue(i.Id)?(i.CreatedBy=n.authentication.userName,i.CreatedUserRole=n.authentication.role,i.CreatedRegionAndUnitDescription=n.authentication.unitName,i.IsMusic=!1,f.postByParams(i,"/api/PersonSpeciality/InsertSpecialityNewEEPEBP").then(function(){l(h);n.openRegion=!1;n.personMessage.hasSpecialEducation=!0;$("#AddSpecEEPEBPModal").modal("hide");n.cancel()},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})):(i.ModifiedBy=n.authentication.userName,i.ModifiedUserRole=n.authentication.role,i.ModifiedRegionAndUnitDescription=n.authentication.unitName,f.postByParams(i,"/api/PersonSpeciality/UpdateSpecialityNewEEPEBP").then(function(){l(h);n.openRegion=!1;$("#AddSpecEEPEBPModal").modal("hide");n.cancel()},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})))};n.changeIsMain=function(){var n=b();f.postByParams(n,"/api/PersonSpeciality/changeIsMain").then(function(){l(h)},function(){r.pop("error","Παρουσιάστηκε σφάλμα","Δε πραγματοποιήθηκε η αλλαγή για τον κύριο κλάδο")})};n.onFileSelect=function(t){var r,i;for(n.messages={completed:"",percentage:"0",error:""},n.showAlertForUpload=!1,n.SendDataForCVFullDto={Id:"",PersonSpecialityId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""},n.SendDataForCVDto.Id="",n.SendDataForCVDto.PersonId=h,r=0;r<t.length;r++){if(i=t[r],i.type!="application/pdf"){n.messages.error='Μη έγκυρη επέκταση αρχείου "'+i.name+'". Οι επεκτάσεις που υποστηρίζονται είναι: "<b> pdf<\/b>" .';return}if(i.size>=2097152){n.messages.error='Το αρχείο "'+i.name+'" (<b>'+Math.round(i.size/1024)+" KB<\/b>) υπερβαίνει το μέγιστο επιτρεπόμενο μέγεθος μεταφόρτωσης <b>2000 KB<\/b>.";return}(function(t){n.upload[t]=s.upload({url:"/api/files/uploadSpeciality",method:"POST",data:{SendDataForCVDto:n.SendDataForCVDto},file:i}).progress(function(t){n.messages.percentage=parseInt(100*t.loaded/t.total)}).then(function(t){n.messages.completed="Θα μεταφορτώσετε το αρχείο <b>"+i.name+"<\/b>.";n.SendDataForCVDto.Id=t.data.personSpecialityFile.Id;n.SendDataForCVFullDto=t.data.personSpecialityFile;n.uploadedFileDetails=""}).catch(function(t){n.messages.error=t.data.Message})})(r)}};n.abortUpload=function(t){n.upload[t].abort()};n.downloadFile=function(){f.getByParamsDownload({PersonId:h,Path:n.SendDataForCVFullDto.DirectPdfLink,ContentType:n.SendDataForCVFullDto.ContentType},"api/files/downloadFolder").then(function(t){var y=t.status,s=t.headers,h=t.data,v="application/octet-stream",r=!1,f,c,l,e,u,a,i,o;s=s();f=n.SendDataForCVFullDto.FileName||"download.pdf";c=s["content-type"]||v;try{if(i=new Blob([h],{type:c}),navigator.msSaveBlob)navigator.msSaveBlob(i,f);else{if(l=navigator.webkitSaveBlob||navigator.mozSaveBlob||navigator.saveBlob,l===undefined)throw"Not supported";l(i,f)}r=!0}catch(p){}if(!r&&(e=window.URL||window.webkitURL||window.mozURL||window.msURL,e)){if(u=document.createElement("a"),"download"in u)try{i=new Blob([h],{type:c});o=e.createObjectURL(i);u.setAttribute("href",o);u.setAttribute("download",f);a=document.createEvent("MouseEvents");a.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null);u.dispatchEvent(a);r=!0}catch(p){}if(!r)try{i=new Blob([h],{type:v});o=e.createObjectURL(i);window.location=o;r=!0}catch(p){}}r||window.open(httpPath,"_blank","")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση του αρχείου")})};n.minDate="01/01/1900";n.maxDate=new Date;n.formats=["dd/MM/yyyy"];n.format=n.formats[0];n.clear=function(){n.dt=null};n.toggleMin=function(){n.minDate=n.minDate?null:new Date};n.toggleMin();n.open=function(t,i){t.preventDefault();t.stopPropagation();n[i]=!0};n.status={opened:!1};n.openDatetimePicker=function(){n.status.opened=!0;n.status.opened1=!0};n.dateOptions={formatYear:"yy",startingDay:1,format:"dd/mm/yyyy"}};SpecialityNewController.$inject=["$scope","PassParameters","$state","toaster","$q","GeneralFactory","$filter","$timeout","$upload","$uibModal"];StudiesController=function(n,t,i,r,u,f,e,o,s){function l(t){f.getByParams({Id:t},"/api/PersonDiploma/GetPersonDiplomas").then(function(t){n.personDiplomas=t;n.showMessages=!0;unblockUI("#divBlockUI")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά το φόρτωμα των καταχωρημένων πτυχίων",3e3,"trustedHtml");unblockUI("#divBlockUI")});f.getByParams({personId:t,role:n.authentication.role,regionAndUnitId:n.authentication.regionAndUnitId},"/api/Person/checkPermanentViewFromOfficialDide").then(function(t){n.disableDideForViewForPermanent=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά το φόρτωμα των στοιχείων.",3e3,"trustedHtml");unblockUI("#divBlockUI")})}function a(){if(dto={Id:f.isEmptyValue(n.perdiploma.Id)?"":n.perdiploma.Id,PersonId:h,DiplomaDate:n.perdiploma.DiplomaDate,DiplomaAcquisitionDate:n.perdiploma.DiplomaAcquisitionDate,DiplomaEquivalenceDateNumber:n.perdiploma.DiplomaEquivalenceDateNumber,DiplomaEquivalenceDate:n.perdiploma.DiplomaEquivalenceDate,IsExaminationEquivalence:n.perdiploma.IsExaminationEquivalence,DiplomaAcquisitionPeriod:n.perdiploma.DiplomaAcquisitionPeriod,DiplomaDegree:n.perdiploma.DiplomaDegree,DimplomaSource:f.isEmptyValue(n.perdiploma.DimplomaSource.selected.Id)?"":n.perdiploma.DimplomaSource.selected.Id,PD130Simulation:n.perdiploma.PD130Simulation,DateofSimulation:n.perdiploma.DateofSimulation,SimulationDegree:n.perdiploma.SimulationDegree,EquivalenceTypeId:n.perdiploma.EquivalenceTypeId,DateofReStudy:n.perdiploma.DateofReStudy,ReStudy:n.perdiploma.ReStudy,DiplomaPE6070:n.perdiploma.Diploma.selected.DiplomaPE6070,MainSpecialPhysicalEducation:n.perdiploma.MainSpecialPhysicalEducation,CertificateDE1:n.perdiploma.CertificateDE1,Diploma:{Id:"",Description:"",CountryId:"",DiplomaTypeId:""},IsConfirmed:f.isEmptyValue(n.perdiploma.IsConfirmed)?!1:n.perdiploma.IsConfirmed,CreatedBy:"",CreationDate:"",CreatedUserRole:"",CreatedRegionAndUnitDescription:"",ModifiedBy:"",LastEditDate:"",ModifiedUserRole:"",ModifiedRegionAndUnitDescription:""},f.isEmptyValue(n.perdiploma.DiplomaDegree)||(dto.DiplomaDegree=parseFloat(n.perdiploma.DiplomaDegree.toString().replace(",","."))),f.isEmptyValue(n.perdiploma.SimulationDegree)||(dto.SimulationDegree=parseFloat(n.perdiploma.SimulationDegree.toString().replace(",","."))),f.isEmptyValue(n.perdiploma.DimplomaSource.selected.Id)||n.perdiploma.DimplomaSource.selected.Id!=1)if(f.isEmptyValue(n.DiplomaAbroad.Description)){var t=e("filter")(n.diplomas,{Description:n.DiplomaAbroad},!0)[0];f.isEmptyValue(t)?dto.DiplomaId=n.DiplomaAbroad=="ATTESTATO DI PERFEZIONAMENTO ARTE DEL GRES E DELLA PORCELLANA ΤΟΥ ΚΡΑΤΙΚΟΥ ΙΝΣΤΙΤΟΥΤΟΥ ΚΕΡΑΜΙΚΗΣ G.BALARDINI"?436:"":(dto.DiplomaId=t.Id,dto.HasDiplomaPaedologicCompetency=n.DiplomaAbroad.HasDiplomaPaedologicCompetency);dto.Diploma={Id:dto.DiplomaId,Description:f.isEmptyValue(n.DiplomaAbroad)?"":n.DiplomaAbroad,CountryId:f.isEmptyValue(n.perdiploma.Country.selected.Id)?"":n.perdiploma.Country.selected.Id,DiplomaTypeId:f.isEmptyValue(n.perdiploma.DiplomaType.selected.Id)?"":n.perdiploma.DiplomaType.selected.Id}}else dto.DiplomaId=n.DiplomaAbroad.Id,dto.Diploma={Id:n.DiplomaAbroad.Id,Description:n.DiplomaAbroad.Description,CountryId:f.isEmptyValue(n.perdiploma.Country.selected.Id)?"":n.perdiploma.Country.selected.Id,DiplomaTypeId:f.isEmptyValue(n.perdiploma.DiplomaType.selected.Id)?"":n.perdiploma.DiplomaType.selected.Id};else dto.DiplomaId=f.isEmptyValue(n.perdiploma.Diploma.selected.Id)?"":n.perdiploma.Diploma.selected.Id,dto.Diploma={Id:dto.DiplomaId,Description:f.isEmptyValue(n.perdiploma.Diploma.selected.Description)?"":n.perdiploma.Diploma.selected.Description,CountryId:f.isEmptyValue(n.perdiploma.Country.selected.Id)?"":n.perdiploma.Country.selected.Id,DiplomaTypeId:f.isEmptyValue(n.perdiploma.DiplomaType.selected.Id)?"":n.perdiploma.DiplomaType.selected.Id};return f.isEmptyValue(n.perdiploma.DimplomaSource.selected.Id)||n.perdiploma.DimplomaSource.selected.Id==1||f.isEmptyValue(n.perdiploma.Diploma.selected.Id)||(dto.EquivalenceDiplomaId=f.isEmptyValue(n.perdiploma.Diploma.selected.Id)?"":n.perdiploma.Diploma.selected.Id),f.isEmptyValue(dto.EquivalenceDiplomaId)||n.perdiploma.DimplomaSource.selected.Id==1?f.isEmptyValue(dto.DiplomaId)?dto.HasPaedologicCompetency=!1:(n.FilterDiplomas=e("filter")(n.diplomas,function(n){return n.Id==dto.DiplomaId}),n.FilterDiplomas=e("filter")(n.diplomas,{Id:dto.DiplomaId},!0)[0],n.perdiploma.DimplomaSource.selected.Id==1&&(dto.HasPaedologicCompetency=n.FilterDiplomas.HasDiplomaPaedologicCompetency)):(n.FilterDiplomas=e("filter")(n.diplomas,function(n){return n.Id==dto.EquivalenceDiplomaId}),n.FilterDiplomas=e("filter")(n.diplomas,{Id:dto.EquivalenceDiplomaId},!0)[0],dto.HasPaedologicCompetency=n.FilterDiplomas.HasDiplomaPaedologicCompetency),n.perdiploma.DimplomaSource.selected.Id!=1&&(n.equivalenceProfessional=f.isEmptyValue(n.perdiploma.EquivalenceTypeId)?!1:e("filter")(n.equivalenceTypesFilter,{Id:n.perdiploma.EquivalenceTypeId},!0)[0].IsProfessional,dto.DiplomaDate=n.equivalenceProfessional||n.perdiploma.IsExaminationEquivalence?n.perdiploma.DiplomaEquivalenceDate:n.perdiploma.DiplomaAcquisitionDate),f.isEmpty(n.SendDataForCVFullDto)||(dto.PersonDiplomaFile=n.SendDataForCVFullDto),dto.IntegratedMasterEquivalent=n.perdiploma.IntegratedMasterEquivalent,dto}var c,h;n.pageRules={};n.pageRules.studies={CanDelete:!1};n.showMessages=!1;n.CountryId="";blockUI({target:"#divBlockUI",animate:!0});n.authentication.isAuth?(c="studies,folder,specSmea,specSmeaEEPEBP,spec,specEEPEBP,changeDataRequest",f.getByParams({role:n.authentication.role,codes:c},"/api/Subsystem/NewCheckPermission").then(function(t){var i=c.split(",");for(var r in i)n.pageRules[i[r]]=e("filter")(t,{Code:i[r]},!0)[0].Rules},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})):i.go("/");h=t.getPersonId();f.isValueInArray(f.getRoleCode(n.authentication.role),"u1, u2")&&(h=n.authentication.personId);f.getByParams({personId:h},"/api/Person/getPersonSpecialitiesDetails").then(function(t){n.personMessage=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την εμφάνιση των μηνυμάτων του φακέλου σας.")});n.$watch("DiplomaAbroad",function(){n.formFields()});n.DisableOrVisibleFields={HasSpecialEducation:!1,DimplomaSource:!1,DiplomaDate:!1,DiplomaAcquisitionPeriod:!1,Country:!1,DiplomaDegree:!1,DiplomaDateAndGrade:!1,Diploma:!1,DiplomaAbroad:!1,EquivalenceType:!1,MusicEquivalenceType:!1,ReStudy:!1,PD130Simulation:!1,DateofSimulation:!1,SimulationDegree:!1,DateofReStudy:!1,WorkExperience:!1,MonthExperience:!1,DayExperience:!1,Save:!1,IsMusic:!1,InitialRegistrationDate:!1,De1DimplomaTypeDetails:!1,equivalenceDiploma:!1,equivalenceAcademic:!1,equivalenceProfessional:!1};n.SaveDisabled=!1;n.DisableFieldset=!1;n.ModalTitle="Προσθήκη πτυχίου";n.perdiploma={};n.perdiploma.DimplomaSource={};n.Countries=[];n.diplomas=[];n.diplomasAbroad=[];n.diplomaCategories=[];n.diplomaTypes=[];n.perdiploma.DimplomaSource={selected:""};n.perdiploma.Country={selected:""};n.perdiploma.Diploma={selected:""};n.perdiploma.DiplomaType={selected:""};n.perdiploma.DiplomaCategory={selected:""};n.consts={};n.Specialities=[];n.Country={Id:"",IsChanged:!1};n.AeiOrTei={Id:"",IsChanged:!1};n.NursesOrHealthVisitorsType={Id:"",IsChanged:!1};n.DiplomaSource={Id:"",IsChanged:!1};n.DiplomaDate={Id:"",IsChanged:!1};n.DiplomaAcquisitionPeriod=[];n.delperdiploma;n.SelectedDiploma={};n.SelectedDiploma.Diploma={Id:"",Country:{Id:""}};n.SelectedDiploma.Diploma1={Id:"",Country:{Id:""}};n.personMessage={};n.InitialRegistrationDateRequired=!1;n.equivalenceDiploma=[];n.equivalenceTypesFilter=[];n.temp=[];n.showAlertForEquivalenceDiploma=!1;n.showAlertForDisableSave=!1;n.DisableFieldsetNotActive=!1;n.showDownloadFile=!1;n.showUploadFile=!1;n.upload=[];n.messages={completed:"",percentage:"0",error:""};n.uploadedFileDetails="";n.SendDataForCVDto={Id:"",PersonDiplomaId:"",PersonId:""};n.SendDataForCVFullDto={Id:"",PersonDiplomaId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""};n.showAlertForUpload=!1;n.SendDataForCVDto.PersonId=h;n.messages={completed:"",percentage:"0",error:""};l(h);n.fillFormControls=function(){n.perdiploma.Id="";n.ModalTitle="Προσθήκη πτυχίου";n.SelectedDiploma={};n.SelectedDiploma.Diploma={Id:"",Country:{Id:""}};n.SelectedDiploma.Diploma1={Id:"",Country:{Id:""}};n.Klados={Id:"",IsChanged:!1};n.Country={Id:"",IsChanged:!1};n.DiplomaDate={Id:"",IsChanged:!1};n.DisableFieldset=!1;n.perdiploma.IsConfirmed=!1;n.perdiploma.IsConfirmed=!1;n.specialitiesByDiploma={};n.diplomas=[];n.diplomasAbroad=[];n.diplomaTypes=[];n.diplomaCategories=[];n.perdiploma={};n.perdiploma.DimplomaSource={};n.Countries=[];n.perdiploma.DimplomaSource={selected:""};n.perdiploma.Country={selected:""};n.perdiploma.Diploma={selected:""};n.perdiploma.DiplomaCategory={selected:""};n.perdiploma.DiplomaType={selected:""};n.SaveDisabled=!1;n.DisableField={DiplomaDegree:!1,DiplomaDate:!1};n.showUploadFile=!1;n.uploadedFileDetails=!1;n.showAlertForUpload=!1;n.messages={completed:"",percentage:"0",error:""};n.uploadedFileDetails="";n.SendDataForCVDto={Id:"",PersonDiplomaId:"",PersonId:""};n.SendDataForCVFullDto={Id:"",PersonDiplomaId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""};f.isEmpty(n.consts.DimplomaSource)&&f.getByAll("/api/PersonSpeciality/getDimplomaSourceTypes").then(function(t){n.consts.DimplomaSource=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση της Προέλευσης Πτυχίου")});f.isEmpty(n.consts.Countries)&&f.getByAll("/api/Country/getCountriesDto").then(function(t){n.consts.Countries=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των Χωρών")});f.isEmpty(n.consts.workExperienceType)&&f.getByAll("/api/PersonSpeciality/getWorkExperienceTypes").then(function(t){n.consts.workExperienceType=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση της Επαγ/κής Εμπειρίας")});f.isEmpty(n.diplomaTypes)&&f.getByAll("/api/Diploma/getDiplomaTypes").then(function(t){n.diplomaTypes=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των Τύπων Πτυχίων")});f.isEmpty(n.consts.diplomaCategories)&&f.getByAll("/api/Diploma/getDiplomaCategories").then(function(t){n.consts.diplomaCategories=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των Πανεπιστημίων")});f.isEmpty(n.consts.equivalenceTypes)&&f.getByAll("/api/Diploma/getEquivalenceTypesDB").then(function(t){n.consts.equivalenceTypes=t;angular.copy(n.consts.equivalenceTypes,n.equivalenceTypesFilter)},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση ΙσοτιμίαςΑντιστοιχίας")});f.isEmpty(n.consts.CertificateDE1Type)&&f.getByAll("/api/Diploma/getCertificateDE1Types").then(function(t){n.consts.CertificateDE1Type=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση επιλογών")})};n.disabledDeleteAction=function(t,i,r){return t||!f.isEmpty(n.SpecialitiesWithSpecialists)||r||!n.pageRules.studies.CanDelete?!0:!1};n.openModal=function(t){n.delperdiploma=t};n.DeleteAction=function(t){var i=t;i.ModifiedBy=n.authentication.userName;i.ModifiedUserRole=n.authentication.role;i.ModifiedRegionAndUnitDescription=n.authentication.unitName;f.postByParams(i,"/api/PersonDiploma/DeleteDiploma").then(function(){n.personDiplomas.splice(n.personDiplomas.indexOf(t),1)},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})};n.openAddDiplModal=function(t){blockUI({target:"#tblDiploma",animate:!0});var i=u.all([n.fillFormControls(0,t.IsActive),f.getByParams({Id:t.Id},"/api/PersonDiploma/getPersonDiplomaById")]);n.SaveDisabled=!1;i.then(function(t){o(function(){n.SelectedDiploma=t[1];n.messages={completed:"",percentage:"0",error:""};n.uploadedFileDetails="";n.SendDataForCVDto={Id:"",PersonDiplomaId:"",PersonId:""};n.SendDataForCVFullDto={Id:"",PersonDiplomaId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""};!f.isEmptyValue(n.SelectedDiploma.DimplomaSource)&&n.SelectedDiploma.DimplomaSource>1&&(n.SendDataForCVDto.PersonDiplomaId=n.SelectedDiploma.Id,f.getByParams({PersonDiplomaId:n.SelectedDiploma.Id},"/api/PersonDiploma/GetDetailsForFile").then(function(t){t!=null?(n.SendDataForCVFullDto=t,n.SendDataForCVDto.Id=t.Id,n.showDownloadFile=!0,n.uploadedFileDetails="Έχετε μεταφορτώσει το αρχείο: "+n.SendDataForCVFullDto.FileName):n.showDownloadFile=!1},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης επισυναπτόμενου Βιογραφικού")}));n.DisableFieldsetNotActive=f.isValueInArray(n.pageRules.studies.CanAccess,"d1, d2, p")&&n.SelectedDiploma.IsLocked?!0:!1;n.pageRules.studies.CanUpdate?n.SelectedDiploma.IsConfirmed&&n.pageRules.studies.CanUpdate?f.isValueInArray(n.pageRules.studies.CanAccess,"u1, u2")?n.DisableFieldset=!0:f.isValueInArray(n.pageRules.studies.CanAccess,"a, m1, m2")?n.DisableFieldset=!1:f.isValueInArray(n.pageRules.studies.CanAccess,"d1, d2, p")?(n.DisableFieldset=!1,n.DisableField={DiplomaDegree:!1,DiplomaDate:!1}):n.DisableFieldset=!0:n.DisableFieldset=!n.SelectedDiploma.IsConfirmed&&n.pageRules.studies.CanUpdate?!1:!0:n.DisableFieldset=!0;n.perdiploma.Id=n.SelectedDiploma.Id;n.perdiploma.IsConfirmed=n.SelectedDiploma.IsConfirmed;n.ModalTitle="Προβολή / Επεξεργασία πτυχίου";n.SelectedDiploma.DimplomaSource>0&&(n.perdiploma.DimplomaSource.selected=e("filter")(n.consts.DimplomaSource,{Id:n.SelectedDiploma.DimplomaSource},!0)[0]);f.isEmptyValue(n.SelectedDiploma.Diploma)||(n.perdiploma.Country.selected=e("filter")(n.consts.Countries,{Id:n.SelectedDiploma.Diploma.Country.Id},!0)[0]);n.perdiploma.DiplomaDate=n.SelectedDiploma.DiplomaDate;n.perdiploma.InitialRegistrationDate=n.SelectedDiploma.InitialRegistrationDate;n.perdiploma.InitialRegistrationDate=n.SelectedDiploma.InitialRegistrationDate;n.perdiploma.DiplomaAcquisitionPeriod=new Date(n.SelectedDiploma.DiplomaAcquisitionPeriod);n.perdiploma.DiplomaDegree=n.SelectedDiploma.DiplomaDegree;n.perdiploma.EquivalenceTypeId=n.SelectedDiploma.EquivalenceTypeId;n.perdiploma.DiplomaTypeId=n.SelectedDiploma.Diploma.DiplomaTypeId;n.perdiploma.MainSpecialPhysicalEducation=n.SelectedDiploma.MainSpecialPhysicalEducation;n.perdiploma.IntegratedMaster=n.SelectedDiploma.Diploma.IntegratedMaster;n.perdiploma.IntegratedMasterEquivalent=n.SelectedDiploma.IntegratedMasterEquivalent;n.perdiploma.DiplomaAcquisitionDate=n.SelectedDiploma.DiplomaAcquisitionDate;n.perdiploma.DiplomaEquivalenceDateNumber=n.SelectedDiploma.DiplomaEquivalenceDateNumber;n.perdiploma.DiplomaEquivalenceDate=n.SelectedDiploma.DiplomaEquivalenceDate;n.perdiploma.IsExaminationEquivalence=n.SelectedDiploma.IsExaminationEquivalence;n.SelectedDiploma.DimplomaSource>1&&!f.isEmptyValue(n.SelectedDiploma.Diploma1)?(f.isEmptyValue(n.SelectedDiploma.Diploma1.DiplomaCategoryId)||(n.perdiploma.DiplomaCategory.selected=e("filter")(n.consts.diplomaCategories,{Id:n.SelectedDiploma.Diploma1.DiplomaCategoryId},!0)[0]),n.perdiploma.DiplomaCategory.selected.Id=n.SelectedDiploma.Diploma1.DiplomaCategoryId,f.isEmptyValue(n.SelectedDiploma.Diploma1.DiplomaCategoryId)||(n.perdiploma.DiplomaType.selected=e("filter")(n.diplomaTypes,{Id:n.perdiploma.DiplomaCategory.selected.DiplomaTypeId},!0)[0])):(f.isEmptyValue(n.SelectedDiploma.Diploma.DiplomaCategoryId)||(n.perdiploma.DiplomaCategory.selected=e("filter")(n.consts.diplomaCategories,{Id:n.SelectedDiploma.Diploma.DiplomaCategoryId},!0)[0]),n.perdiploma.DiplomaCategory.selected.Id=n.SelectedDiploma.Diploma.DiplomaCategoryId,n.perdiploma.DiplomaType.selected=f.isEmptyValue(n.SelectedDiploma.Diploma.DiplomaCategoryId)?e("filter")(n.diplomaTypes,{Id:n.SelectedDiploma.Diploma.DiplomaTypeId},!0)[0]:e("filter")(n.diplomaTypes,{Id:n.perdiploma.DiplomaCategory.selected.DiplomaTypeId},!0)[0]);f.isEmptyValue(n.SelectedDiploma.Diploma1)||(n.perdiploma.Diploma.selected.Id=n.SelectedDiploma.Diploma1.Id);n.perdiploma.PD130Simulation=n.SelectedDiploma.PD130Simulation;n.perdiploma.DateofSimulation=n.SelectedDiploma.DateofSimulation;n.perdiploma.SimulationDegree=n.SelectedDiploma.SimulationDegree;n.perdiploma.ReStudy=n.SelectedDiploma.ReStudy;n.perdiploma.DateofReStudy=n.SelectedDiploma.DateofReStudy;n.perdiploma.CertificateDE1=n.SelectedDiploma.CertificateDE1;n.SelectedDiploma.DimplomaSource!=2||n.perdiploma.ReStudy||(n.PE60PE70Exists=[],f.isEmptyValue(n.SelectedDiploma.Diploma1)||(n.PE60PE70Exists=e("filter")(n.SelectedDiploma.Diploma1.SpecialityDiplomas,function(n){return n.SpecialityId===164||n.SpecialityId===1})));n.DisableOrVisibleFields.ReStudy=!f.isEmptyValue(n.PE60PE70Exists)||n.perdiploma.ReStudy?!0:!1;n.DisableOrVisibleFields.DateofReStudy=n.perdiploma.ReStudy?!0:!1;n.perdiploma.PD130Simulation?(n.DisableOrVisibleFields.PD130Simulation=!0,n.DisableOrVisibleFields.DateofSimulation=!0,n.DisableOrVisibleFields.SimulationDegree=!0):(n.DisableOrVisibleFields.PD130Simulation=!1,n.DisableOrVisibleFields.DateofSimulation=!1,n.DisableOrVisibleFields.SimulationDegree=!1);n.DisableOrVisibleFields.disableEquivalenceDiploma=n.SelectedDiploma.IsConfirmed&&n.SelectedDiploma.DimplomaSource>1&&f.isEmptyValue(n.SelectedDiploma.EquivalenceDiplomaId)?!1:!0},300);o(function(){n.formFields();unblockUI("#tblDiploma");$("#AddDiplModal").modal("show")},300)})};Date.prototype.withoutTime=function(){var n=new Date(this);return n.setHours(0,0,0,0,0),n};n.FillRealDiplomaDate=function(){var i,t;if(!f.isEmptyValue(n.perdiploma.DiplomaDate))if(i=new Date(n.perdiploma.DiplomaDate),t=i.getFullYear(),n.DiplomaAcquisitionPeriod=[{Value:t-1+"-01-01",Description:"Χειμερινό Εξάμηνο/"+(t-2)+"-"+(t-1)},{Value:t-1+"-05-01",Description:"Εαρινό Εξάμηνο/"+(t-2)+"-"+(t-1)},{Value:t-1+"-08-16",Description:"Περίοδος Σεπτεμβρίου/"+(t-2)+"-"+(t-1)},{Value:t+"-01-01",Description:"Χειμερινό Εξάμηνο/"+(t-1)+"-"+t},{Value:t+"-05-01",Description:"Εαρινό Εξάμηνο/"+(t-1)+"-"+t},{Value:t+"-08-16",Description:"Περίοδος Σεπτεμβρίου/"+(t-1)+"-"+t},{Value:t+1+"-01-01",Description:"Χειμερινό Εξάμηνο/"+t+"-"+(t+1)},{Value:t+1+"-05-01",Description:"Εαρινό Εξάμηνο/"+t+"-"+(t+1)},{Value:t+1+"-08-16",Description:"Περίοδος Σεπτεμβρίου/"+t+"-"+(t+1)}],f.isEmptyValue(n.perdiploma.DiplomaAcquisitionPeriod)||n.DiplomaDate.IsChanged)new Date(i).withoutTime()>=new Date(t+"-01-01").withoutTime()&&new Date(i).withoutTime()<new Date(t+"-05-01").withoutTime()?n.perdiploma.DiplomaAcquisitionPeriod=t+"-01-01":new Date(i).withoutTime()>=new Date(t+"-05-01").withoutTime()&&new Date(i).withoutTime()<new Date(t+"-08-16").withoutTime()?n.perdiploma.DiplomaAcquisitionPeriod=t+"-05-01":new Date(i).withoutTime()>=new Date(t+"-08-16").withoutTime()&&new Date(i).withoutTime()<new Date(t+"-12-31").withoutTime()&&(n.perdiploma.DiplomaAcquisitionPeriod=t+"-08-16");else{var e=new Date(n.perdiploma.DiplomaAcquisitionPeriod),o=e.getFullYear(),r=e.getMonth()+1,u=e.getDate();r.toString().length<=1&&(r="0"+r);u.toString().length<=1&&(u="0"+u);n.perdiploma.DiplomaAcquisitionPeriod=o+"-"+r+"-"+u}};n.formFields=function(){var t,i;n.DisableOrVisibleFields.DimplomaSource=!0;n.showAlertForEquivalenceDiploma=!1;n.showAlertForDisableSave=!1;n.disableDiplomaAbroad=!1;f.isEmptyValue(n.perdiploma.DimplomaSource.selected.Id)||(n.perdiploma.DimplomaSource.selected.Id==1?(n.perdiploma.Country.selected.Id!=3&&(n.Countries=e("filter")(n.consts.Countries,{DiplomaSource:n.perdiploma.DimplomaSource.selected.Id},!0),n.perdiploma.Country.selected=n.Countries[0]),n.DisableOrVisibleFields.Country=!1,n.perdiploma.DiplomaEquivalenceDate="",n.perdiploma.IsExaminationEquivalence=!1,n.perdiploma.DiplomaEquivalenceDateNumber="",n.perdiploma.DiplomaAcquisitionDate=""):(f.isEmptyValue(n.perdiploma.Country.selected.Id)||n.perdiploma.Country.selected.Id==3||n.perdiploma.Country.selected.DiplomaSource==2&&n.perdiploma.DimplomaSource.selected.Id!=2||n.perdiploma.Country.selected.DiplomaSource==3&&n.perdiploma.DimplomaSource.selected.Id!=3?(n.Countries=e("filter")(n.consts.Countries,{DiplomaSource:n.perdiploma.DimplomaSource.selected.Id},!0),n.perdiploma.Country.selected="",n.DiplomaAbroad="",n.perdiploma.DiplomaType.selected="",n.perdiploma.DiplomaCategory.selected="",n.perdiploma.DiplomaEquivalenceDate="",n.perdiploma.IsExaminationEquivalence=!1,n.perdiploma.DiplomaEquivalenceDateNumber="",n.perdiploma.DiplomaAcquisitionDate=""):f.isEmptyValue(n.SelectedDiploma.Diploma)||f.isEmptyValue(n.SelectedDiploma.Diploma.Country.Id)||n.Country.IsChanged||(n.Countries=e("filter")(n.consts.Countries,{DiplomaSource:n.perdiploma.DimplomaSource.selected.Id},!0),n.perdiploma.Country.selected=e("filter")(n.consts.Countries,{Id:n.perdiploma.Country.selected.Id},!0)[0]),n.DisableOrVisibleFields.Country=!0));f.isEmptyValue(n.perdiploma.DiplomaType.selected)||(f.isEmptyValue(n.perdiploma.DiplomaType.selected.Id)||f.isEmptyValue(n.perdiploma.DiplomaCategory.selected.DiplomaTypeId)||n.perdiploma.DiplomaCategory.selected.DiplomaTypeId==n.perdiploma.DiplomaType.selected.Id?!f.isEmptyValue(n.perdiploma.DiplomaType.selected.Id)&&(f.isEmpty(n.diplomaCategories)||f.isEmpty(n.perdiploma.DiplomaCategory.selected))&&(n.diplomaCategories=e("filter")(n.consts.diplomaCategories,{DiplomaTypeId:n.perdiploma.DiplomaType.selected.Id},!0)):(n.perdiploma.DiplomaCategory.selected="",n.perdiploma.Diploma.selected="",n.DisableOrVisibleFields.Save=!1,n.diplomaCategories=e("filter")(n.consts.diplomaCategories,{DiplomaTypeId:n.perdiploma.DiplomaType.selected.Id},!0)));f.isEmptyValue(n.SelectedDiploma.Diploma)||(!f.isEmptyValue(n.Country.Id)||f.isEmptyValue(n.SelectedDiploma.Diploma.Country.Id)&&f.isEmptyValue(n.perdiploma.Country.selected.Id)?f.isEmptyValue(n.Country.Id)||f.isEmptyValue(n.SelectedDiploma.Diploma.Country.Id)&&f.isEmptyValue(n.perdiploma.Country.selected.Id)?n.Country.IsChanged=!1:f.isEmptyValue(n.perdiploma.Country.selected.Id)?f.isEmptyValue(n.SelectedDiploma.Diploma.Country.Id)?n.Country.IsChanged=!1:n.Country.Id!=n.SelectedDiploma.Diploma.Country.Id?(n.Country.Id=n.SelectedDiploma.Diploma.Country.Id,n.Country.IsChanged=!0):n.Country.IsChanged=!1:n.Country.Id!=n.perdiploma.Country.selected.Id?(n.Country.Id=n.perdiploma.Country.selected.Id,n.Country.IsChanged=!0):n.Country.IsChanged=!1:(n.Country.Id=f.isEmptyValue(n.SelectedDiploma.Diploma.Country.Id)?n.perdiploma.Country.selected.Id:n.SelectedDiploma.Diploma.Country.Id,n.Country.IsChanged=!1));f.isEmptyValue(n.perdiploma.Diploma.selected)||f.isEmptyValue(n.perdiploma.Diploma.selected.Id)||n.perdiploma.Diploma.selected.DiplomaCategoryId!=n.perdiploma.DiplomaCategory.selected.Id||n.perdiploma.DiplomaCategory.selected.DiplomaTypeId!=n.perdiploma.DiplomaType.selected.Id?(n.perdiploma.Diploma.selected="",n.DisableOrVisibleFields.Save=!1,f.isEmptyValue(n.perdiploma.DimplomaSource.selected)||n.perdiploma.DimplomaSource.selected.Id!=1||f.isEmptyValue(n.perdiploma.DiplomaCategory.selected)||f.isEmptyValue(n.perdiploma.DiplomaType.selected)?f.isEmptyValue(n.perdiploma.DimplomaSource.selected)||n.perdiploma.DimplomaSource.selected.Id!=1||!f.isEmptyValue(n.perdiploma.DiplomaCategory.selected)||f.isEmptyValue(n.perdiploma.DiplomaType.selected)?f.isEmptyValue(n.Country.Id)||f.isEmptyValue(n.SelectedDiploma.Diploma.Country.Id)&&f.isEmptyValue(n.perdiploma.Country.selected.Id)||(n.CountryId=f.isEmptyValue(n.SelectedDiploma.Diploma.Country.Id)?n.perdiploma.Country.selected.Id:n.SelectedDiploma.Diploma.Country.Id,f.getByParams({countryId:n.CountryId},"/api/Diploma/getDiplomasByCountry").then(function(t){n.diplomasAbroad=t},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των πτυχίων")})):n.diplomas=[]:f.getByParams({categoryId:n.perdiploma.DiplomaCategory.selected.Id},"/api/Diploma/getDiplomasByCategory").then(function(t){n.diplomas=t;f.isEmptyValue(n.SelectedDiploma.Diploma.Id)||(n.perdiploma.Diploma.selected=e("filter")(n.diplomas,{Id:n.SelectedDiploma.Diploma.Id},!0)[0],n.DisableOrVisibleFields.Save=!f.isEmptyValue(n.perdiploma.Diploma.selected)&&n.perdiploma.Diploma.selected.Id>0?!0:!1)},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των πτυχίων")})):n.DisableOrVisibleFields.Save=!f.isEmptyValue(n.perdiploma.Diploma.selected)&&n.perdiploma.Diploma.selected.Id>0?!0:!1;f.isEmptyValue(n.perdiploma.EquivalenceTypeId)||(n.maxDate=n.perdiploma.EquivalenceTypeId==8?"05/01/2004":new Date,n.diplomaEquivalence=e("filter")(n.consts.equivalenceTypes,{Id:n.perdiploma.EquivalenceTypeId},!0),!f.isEmptyValue(n.perdiploma.EquivalenceTypeId)&&n.diplomaEquivalence[0].NoEquivalenceDiplomaRequired?(n.DisableOrVisibleFields.equivalenceDiploma=!0,n.perdiploma.Diploma.selected="",n.perdiploma.DiplomaType.selected="",n.perdiploma.DiplomaCategory.selected=""):n.DisableOrVisibleFields.equivalenceDiploma=!1,n.DisableOrVisibleFields.equivalenceAcademic=!f.isEmptyValue(n.perdiploma.EquivalenceTypeId)&&n.diplomaEquivalence[0].IsAcademic?!0:!1,n.DisableOrVisibleFields.equivalenceProfessional=!f.isEmptyValue(n.perdiploma.EquivalenceTypeId)&&n.diplomaEquivalence[0].IsProfessional?!0:!1);f.isEmptyValue(n.perdiploma.DimplomaSource.selected)||n.perdiploma.DimplomaSource.selected.Id!=1||f.isEmptyValue(n.perdiploma.Country.selected)?f.isEmptyValue(n.perdiploma.DimplomaSource.selected)||n.perdiploma.DimplomaSource.selected.Id==1||f.isEmptyValue(n.perdiploma.Country.selected)?(n.DisableOrVisibleFields.Diploma=!1,n.DisableOrVisibleFields.DiplomaAbroad=!1,n.DisableOrVisibleFields.DiplomaDate=!1,n.DisableOrVisibleFields.DiplomaDegree=!1,n.DisableOrVisibleFields.DiplomaDateAndGrade=!1,n.DisableOrVisibleFields.InitialRegistrationDate=!1,n.DisableOrVisibleFields.Save=!1,n.perdiploma.Diploma.selected="",n.DiplomaAbroad="",n.perdiploma.ReStudy="",n.perdiploma.DateofReStudy="",n.perdiploma.PD130Simulation=!1,n.perdiploma.DateofSimulation="",n.perdiploma.SimulationDegree="",n.perdiploma.ReStudy="",n.perdiploma.DateofReStudy="",n.perdiploma.EquivalenceTypeId=""):(n.DisableOrVisibleFields.Diploma=!1,n.DisableOrVisibleFields.DiplomaAbroad=!0,n.DisableOrVisibleFields.DiplomaDate=!0,n.DisableOrVisibleFields.DiplomaDegree=!0,n.DisableOrVisibleFields.DiplomaDateAndGrade=!0,n.DisableOrVisibleFields.InitialRegistrationDate=!0,n.DisableOrVisibleFields.Save=!0,f.isEmptyValue(n.perdiploma.Diploma.selected)||(n.DisableOrVisibleFields.ReStudy=n.perdiploma.DimplomaSource.selected.Id==2?n.perdiploma.Diploma.selected.DiplomaPE6070:!1),(f.isEmptyValue(n.DiplomaAbroad)||n.Country.IsChanged)&&(n.DiplomaAbroad="",n.DisableOrVisibleFields.Save=!1,f.getByParams({countryId:n.perdiploma.Country.selected.Id},"/api/Diploma/getDiplomasByCountry").then(function(t){n.diplomasAbroad=t;f.isEmptyValue(n.SelectedDiploma.Diploma.Description)||n.Country.IsChanged?n.Country.IsChanged&&(n.DiplomaAbroad="",n.SelectedDiploma.Diploma={Id:"",Description:"",Country:{Id:""}}):n.DiplomaAbroad=n.SelectedDiploma.Diploma.Description},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των πτυχίων")})),!f.isEmptyValue(n.DiplomaAbroad)&&n.DisableOrVisibleFields.equivalenceDiploma&&(n.perdiploma.DiplomaType.selected=e("filter")(n.diplomaTypes,{Id:n.DiplomaAbroad.DiplomaTypeId},!0)[0],n.DisableOrVisibleFields.DiplomaType=f.isEmptyValue(n.perdiploma.DiplomaType.selected)?!1:!0),n.perdiploma.Country.selected.Id!=25?(n.temp=e("filter")(n.equivalenceTypesFilter,function(n){return n.Id==8})[0],f.isEmptyValue(n.temp)||(t=n.equivalenceTypesFilter.indexOf(n.temp),n.equivalenceTypesFilter.splice(t,1))):angular.copy(n.consts.equivalenceTypes,n.equivalenceTypesFilter),!f.isEmpty(n.perdiploma.EquivalenceTypeId)&&n.equivalenceTypesFilter.filter(t=>t.Id===n.perdiploma.EquivalenceTypeId)[0].NoEquivalenceDiplomaRequired&&(n.perdiploma.DiplomaType.selected="",n.perdiploma.DiplomaCategory.selected="",n.perdiploma.Diploma.selected=""),n.DisableOrVisibleFields.Save=!0):(n.DisableOrVisibleFields.Diploma=!0,n.DisableOrVisibleFields.DiplomaAbroad=!1,f.isEmptyValue(n.perdiploma.DiplomaCategory.selected)||f.getByParams({categoryId:n.perdiploma.DiplomaCategory.selected.Id},"/api/Diploma/getDiplomasByCategory").then(function(t){n.diplomas=t;n.DisableOrVisibleFields.Save=!0;n.DisableOrVisibleFields.DiplomaDate=!0;n.DisableOrVisibleFields.DiplomaDegree=!0;n.DisableOrVisibleFields.DiplomaDateAndGrade=!0;n.DisableOrVisibleFields.InitialRegistrationDate=!0;n.DisableOrVisibleFields.ReStudy=!1;n.DisableOrVisibleFields.DateofReStudy=!1;n.perdiploma.DateofReStudy=""},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των πτυχίων")}));n.DisableOrVisibleFields.ReStudy&&n.perdiploma.ReStudy?n.DisableOrVisibleFields.DateofReStudy=!0:(n.DisableOrVisibleFields.DateofReStudy=!1,n.perdiploma.DateofReStudy="");f.isEmptyValue(n.perdiploma.DimplomaSource.selected)||n.perdiploma.DimplomaSource.selected.Id==1||f.isEmptyValue(n.perdiploma.Country.selected)||f.isEmptyValue(n.perdiploma.DiplomaCategory.selected)||f.isEmptyValue(n.perdiploma.DiplomaType.selected)?f.isEmptyValue(n.perdiploma.DimplomaSource.selected)||n.perdiploma.DimplomaSource.selected.Id==1||!f.isEmptyValue(n.perdiploma.DiplomaCategory.selected)||f.isEmptyValue(n.perdiploma.DiplomaType.selected)||(n.diplomas=[]):f.getByParams({categoryId:n.perdiploma.DiplomaCategory.selected.Id},"/api/Diploma/getDiplomasByCategory").then(function(t){n.diplomas=t;f.isEmptyValue(n.perdiploma.Diploma.selected.Id)?f.isEmptyValue(n.SelectedDiploma.Diploma1.Id)||(n.perdiploma.Diploma.selected=e("filter")(n.diplomas,{Id:n.SelectedDiploma.Diploma1.Id},!0)[0],n.DisableOrVisibleFields.Save=!f.isEmptyValue(n.perdiploma.Diploma.selected)&&n.SelectedDiploma.Diploma1.Id>0?!0:!1):(n.perdiploma.Diploma.selected=e("filter")(n.diplomas,{Id:n.perdiploma.Diploma.selected.Id},!0)[0],n.DisableOrVisibleFields.Save=!f.isEmptyValue(n.perdiploma.Diploma.selected)&&n.perdiploma.Diploma.selected.Id>0?!0:!1)},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των πτυχίων")});n.showUploadFile=!1;f.isEmptyValue(n.DiplomaDate.Id)&&!f.isEmptyValue(n.perdiploma.DiplomaDate)?(n.DiplomaDate.Id=n.perdiploma.DiplomaDate,n.DiplomaDate.IsChanged=!1):f.isEmptyValue(n.DiplomaDate.Id)||f.isEmptyValue(n.perdiploma.DiplomaDate)?n.DiplomaDate.IsChanged=!1:n.DiplomaDate.Id!=n.perdiploma.DiplomaDate?(n.DiplomaDate.Id=n.perdiploma.DiplomaDate,n.DiplomaDate.IsChanged=!0):n.DiplomaDate.IsChanged=!1;(f.isEmptyValue(n.perdiploma.Diploma.selected)||f.isEmptyValue(n.perdiploma.Diploma.selected.Id)||f.isEmptyValue(n.perdiploma.Diploma.selected.IsPD130SimulationRequired))&&(f.isEmptyValue(n.SelectedDiploma)||f.isEmptyValue(n.SelectedDiploma.PD130Simulation))&&(f.isEmptyValue(n.SelectedDiploma.Diploma)||f.isEmptyValue(n.SelectedDiploma.Diploma.IsPD130SimulationRequired))&&(f.isEmptyValue(n.SelectedDiploma.Diploma1)||f.isEmptyValue(n.SelectedDiploma.Diploma1.IsPD130SimulationRequired))?(n.DisableOrVisibleFields.PD130Simulation=!1,n.perdiploma.PD130Simulation=!1,n.perdiploma.DateofSimulation="",n.perdiploma.SimulationDegree=""):n.DisableOrVisibleFields.PD130Simulation=!0;n.DisableOrVisibleFields.PD130Simulation&&n.perdiploma.PD130Simulation?(n.DisableOrVisibleFields.DateofSimulation=!0,n.DisableOrVisibleFields.SimulationDegree=!0):(n.DisableOrVisibleFields.DateofSimulation=!1,n.DisableOrVisibleFields.SimulationDegree=!1,n.perdiploma.DateofSimulation="",n.perdiploma.SimulationDegree="");f.isEmptyValue(n.perdiploma.Diploma.selected)||f.isEmptyValue(n.perdiploma.Diploma.selected.Id)||(n.perdiploma.IntegratedMaster=n.perdiploma.Diploma.selected.IntegratedMaster);i=[17,19,24,25,26,27,20,31];n.de01EEP=f.isEmptyValue(n.perdiploma.DiplomaType.selected)||i.indexOf(n.perdiploma.DiplomaType.selected.Id)==-1?!1:!0;f.isEmptyValue(n.perdiploma.DiplomaType.selected)||n.perdiploma.DiplomaType.selected.Id!=20&&n.perdiploma.DiplomaType.selected.Id!=31?(n.DisableOrVisibleFields.De1DimplomaTypeDetails=!1,n.perdiploma.CertificateDE1=""):n.DisableOrVisibleFields.De1DimplomaTypeDetails=!0;n.FillRealDiplomaDate();$("#editDiplomaForm").validate().resetForm()};n.cancel=function(){n.perdiploma.Country.selected="";n.perdiploma.DimplomaSource.selected="";n.perdiploma.Diploma.selected="";n.DiplomaAbroad="";n.perdiploma.DiplomaDate="";n.perdiploma.InitialRegistrationDate="";n.perdiploma.DiplomaAcquisitionPeriod="";n.perdiploma.DiplomaDegree="";n.perdiploma.EquivalenceTypeId="";n.perdiploma.MusicEquivalenceType="";n.perdiploma.ReStudy="";n.perdiploma.DateofReStudy="";n.perdiploma.PD130Simulation=!1;n.perdiploma.DateofSimulation="";n.perdiploma.SimulationDegree="";n.perdiploma.DiplomaAcquisitionDate="";n.perdiploma.DiplomaEquivalenceDate="";n.perdiploma.DiplomaEquivalenceDateNumber="";n.perdiploma.IsExaminationEquivalence=!1;n.DisableOrVisibleFields={DimplomaSource:!1,DiplomaDate:!1,DiplomaAcquisitionPeriod:!1,Country:!1,DiplomaDegree:!1,DiplomaDateAndGrade:!1,Diploma:!1,DiplomaAbroad:!1,Save:!1,InitialRegistrationDate:!1,EquivalenceType:!1,MusicEquivalenceType:!1,ReStudy:!1,PD130Simulation:!1,DateofSimulation:!1,SimulationDegree:!1,DateofReStudy:!1,De1DimplomaTypeDetails:!1,equivalenceDiploma:!1,equivalenceAcademic:!1,equivalenceProfessional:!1};$("#editDiplomaForm").validate().resetForm()};n.saveAction=function(t){var i=a();n.showAlertForEquivalenceDiploma=i.DimplomaSource>1&&f.isEmptyValue(i.EquivalenceDiplomaId)&&!n.DisableOrVisibleFields.equivalenceDiploma?!0:!1;n.showAlertForDisableSave=n.DisableOrVisibleFields.Diploma&&!f.isEmptyValue(n.perdiploma.DiplomaCategory.selected)&&f.isEmptyValue(n.perdiploma.Diploma.selected)?!0:!f.isEmptyValue(n.perdiploma.DiplomaCategory.selected)&&f.isEmptyValue(n.perdiploma.Diploma.selected)?!0:!1;!$("#editDiplomaForm").valid()||n.showAlertForEquivalenceDiploma||n.showAlertForDisableSave||(n.SaveDisabled=!0,t=="Confirm"?i.IsConfirmed=!0:t=="UnConfirm"&&(i.IsConfirmed=!1),f.isEmptyValue(i.Id)?(i.CreatedBy=n.authentication.userName,i.CreatedUserRole=n.authentication.role,i.CreatedRegionAndUnitDescription=n.authentication.unitName,i.personDiplomaFile=n.SendDataForCVFullDto,f.postByParams(i,"/api/PersonDiploma/InsertDiploma").then(function(){l(h);$("#AddDiplModal").modal("hide");n.cancel()},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})):(i.ModifiedBy=n.authentication.userName,i.ModifiedUserRole=n.authentication.role,i.ModifiedRegionAndUnitDescription=n.authentication.unitName,i.personDiplomaFile=n.SendDataForCVFullDto,f.postByParams(i,"/api/PersonDiploma/UpdateDiploma").then(function(){l(h);$("#AddDiplModal").modal("hide");n.cancel()},function(n){r.pop("error","ΠΡΟΣΟΧΗ",n.data)})))};n.onFileSelect=function(t){var r,i;for(n.messages={completed:"",percentage:"0",error:""},n.showAlertForUpload=!1,n.SendDataForCVFullDto={Id:"",PersonDiplomaId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""},n.SendDataForCVDto.Id="",n.SendDataForCVDto.PersonId=h,r=0;r<t.length;r++){if(i=t[r],i.type!="application/pdf"){n.messages.error='Μη έγκυρη επέκταση αρχείου "'+i.name+'". Οι επεκτάσεις που υποστηρίζονται είναι: "<b> pdf<\/b>" .';return}if(i.size>=2097152){n.messages.error='Το αρχείο "'+i.name+'" (<b>'+Math.round(i.size/1024)+" KB<\/b>) υπερβαίνει το μέγιστο επιτρεπόμενο μέγεθος μεταφόρτωσης <b>2000 KB<\/b>.";return}(function(t){n.upload[t]=s.upload({url:"/api/files/uploadDiploma",method:"POST",data:{SendDataForCVDto:n.SendDataForCVDto},file:i}).progress(function(t){n.messages.percentage=parseInt(100*t.loaded/t.total)}).then(function(t){n.messages.completed="Θα μεταφορτώσετε το αρχείο <b>"+i.name+"<\/b>.";n.SendDataForCVDto.Id=t.data.personDiplomaFile.Id;n.SendDataForCVFullDto=t.data.data.personDiplomaFile;n.uploadedFileDetails=""}).catch(function(t){n.messages.error=t.data.Message})})(r)}};n.abortUpload=function(t){n.upload[t].abort()};n.downloadFile=function(){f.getByParamsDownload({PersonId:h,Path:n.SendDataForCVFullDto.DirectPdfLink,ContentType:n.SendDataForCVFullDto.ContentType},"api/files/downloadFolder").then(function(t){var v=t.status,s=t.headers,t=t.data,a="application/octet-stream",r=!1,f,h,c,e,u,l,i,o;s=s();f=n.SendDataForCVFullDto.FileName||"download.pdf";h=s["content-type"]||a;try{if(i=new Blob([t],{type:h}),navigator.msSaveBlob)navigator.msSaveBlob(i,f);else{if(c=navigator.webkitSaveBlob||navigator.mozSaveBlob||navigator.saveBlob,c===undefined)throw"Not supported";c(i,f)}r=!0}catch(y){}if(!r&&(e=window.URL||window.webkitURL||window.mozURL||window.msURL,e)){if(u=document.createElement("a"),"download"in u)try{i=new Blob([t],{type:h});o=e.createObjectURL(i);u.setAttribute("href",o);u.setAttribute("download",f);l=document.createEvent("MouseEvents");l.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null);u.dispatchEvent(l);r=!0}catch(y){}if(!r)try{i=new Blob([t],{type:a});o=e.createObjectURL(i);window.location=o;r=!0}catch(y){}}r||window.open(httpPath,"_blank","")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση του αρχείου")})};n.minDate="01/01/1900";n.maxDate=new Date;n.formats=["dd/MM/yyyy"];n.format=n.formats[0];n.clear=function(){n.dt=null};n.toggleMin=function(){n.minDate=n.minDate?null:new Date};n.toggleMin();n.open=function(t,i){t.preventDefault();t.stopPropagation();n[i]=!0};n.status={opened:!1};n.openDatetimePicker=function(){n.status.opened=!0;n.status.opened1=!0};n.dateOptions={formatYear:"yy",startingDay:1,format:"dd/mm/yyyy"}};StudiesController.$inject=["$scope","PassParameters","$state","toaster","$q","GeneralFactory","$filter","$timeout","$upload"];Substitute3monthsController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p){if(n.mess="",n.messInfo="",n.sub3months={IsTemporaryStored:!0},n.person={},n.applicationType=31,n.step1=!0,n.step2=!1,n.continueDisabled=!0,n.perspec={},n.SelectedSpecs=[],n.Years=[],n.hasValidFekNoConfirmSpeciality=!1,n.alerts="",n.showToConfirmSpeciality=!1,n.enableButtonSave=!1,n.selected={Years:[]},n.HasSpecPe70=!1,n.HasSpecPe11Pe06=!1,n.intendancies=[],n.SelectedAvailRegionsItems=[],n.SelectedSelectedRegionsListItems=[],n.SelectedRegionsListItems=[],n.AvailableSpecListItems=[],n.AvailableRegionsListItems=[],n.subs=[],n.showAlertSpec=!1,n.showAlertRegion=!1,n.DisableDLevel=!1,n.protocol="",n.showProtocol=!1,n.cannotUpdate=!1,n.notActive=!1,n.noUpdAccess=!1,n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.userLevel=0,n.fek={},n.ChurchList=[71,72,73,74,75,76,77,78,79,80,2,364,358,356,4,82,355],n.ArtisticList=[384],n.Pe73List=[336],n.applicationLevelId=0,n.showIconography={IsPe01:!1,IsPe08:!1},n.upload=[],n.messages={completed:"",percentage:"0",error:""},n.uploadedFileDetails="",n.showAlertForUploadCV=!1,n.SendDataForCVDto={Id:"",ApplicationSubstituteId:"",PersonId:""},n.SendDataForCVFullDto={Id:"",ApplicationSubstituteId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""},n.showUpload=!1,n.showUploadMessageRequired=!1,n.showIconographyMessage=!1,blockUI({target:"#divBlockUI",animate:!0}),n.regionsFor={IsChurch:!1,IsArtistic:!1,IsPe73:!1},n.goToStep=function(i,r){i==2?y.getByParams({applicationTypeId:n.applicationType,specialityId:r},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(i){n.SelectedSpecListItems=t("filter")(n.AvailableSpecListItems,{Id:r},!0)[0];n.fek=i;y.isEmptyValue(i)?(n.mess="<li>Δεν υπαρχει ενεργό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2):(n.step1=!1,n.step2=!0,n.sub3months.SpecialityId=r,blockUI({target:"#divBlockUIForm",animate:!0}),n.doAll())},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.step1=!0,n.step2=!1,n.DisableDLevel=y.isEmpty(n.SelectedSpecListItems)&&y.isEmptyValue(n.sub3months.Id)?!1:!0,n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[])},n.canSave=!0,n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.authentication.isAuth){var w="sub3months";y.getByParams({role:n.authentication.role,codes:w},"/api/Subsystem/NewCheckPermission").then(function(i){var u=w.split(","),e,s;for(e in u)n.pageRules[u[e]]=t("filter")(i,{Code:u[e]},!0)[0].Rules;n.sub3months.Id=f.getApplicationId();n.applicationLevelId=f.getApplicationLevelId();y.isEmptyValue(n.applicationLevelId)&&(n.applicationLevelId=0);y.isEmptyValue(n.sub3months.Id)?(n.step1=!0,n.step2=!1):(n.step1=!1,n.step2=!0);f.resetApplication();n.sub3months.PersonId=f.getPersonId();y.isValueInArray(n.pageRules.sub3months.CanAccess,"u1, u2")&&(n.sub3months.PersonId=n.authentication.personId);s=r.all([y.getByParams({personId:n.sub3months.PersonId},"/api/ApplSubstitute3months/getSpecialityForSubstitute3months"),y.getByParams({Id:n.sub3months.PersonId},"/api/ApplSubstitute3months/GetApplSubstitute3months"),y.getByParams({personId:n.sub3months.PersonId},"/api/RecruitmentServiceAssumed/getSubstitutesServiceAssumed")]);s.then(function(i){var u,r;for(angular.copy(i[0],n.AvailableSpecListItems),n.applSub=i[1],n.subs=i[2].substitutes,r=n.AvailableSpecListItems.length-1;r>=0;r--)n.AvailableSpecListItems[r].hasApplPerm=0;for(u=n.applSub.length-1;u>=0;u--)for(r=n.AvailableSpecListItems.length-1;r>=0;r--)n.applSub[u].SpecialityId==n.AvailableSpecListItems[r].Id&&(n.AvailableSpecListItems[r].hasApplSub=1);n.sub3months.Id!=null&&n.sub3months.Id!=""&&n.sub3months.Id!="undefined"?(y.isEmptyValue(n.sub3months.SpecialityId)&&(n.sub3months.SpecialityId=f.getSpecialityId()),y.getByParams({applicationTypeId:n.applicationType,specialityId:n.sub3months.SpecialityId},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(i){n.SelectedSpecListItems=t("filter")(n.AvailableSpecListItems,{Id:n.sub3months.SpecialityId},!0)[0];!y.isEmptyValue(i)||y.isValueInArray(y.getRoleCode(n.authentication.role),"a")?(n.canUpdateAppl=!0,n.showAddEditForm=1,n.getApplication()):(n.mess+="<li>Δεν μπορείτε να τροποποιήσετε την αίτηση γιατί δεν υπάρχει ανοιχτό ΦΕΚ<\/li>",n.showAddEditForm=2)},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):y.isEmpty(n.AvailableSpecListItems)?(n.mess+=y.isEmpty(n.subs)?"<li>Δεν μπορείτε να υποβάλετε αίτηση. Δεν βρίσκεστε στον ενιαίο πίνακα για κάποιον κλάδο<\/li>":"<li>Δεν μπορείτε να υποβάλετε αίτηση. Έχετε ήδη προσληφθεί το τρέχον σχολικό έτος<\/li>",n.showAddEditForm=2):(n.canInsertAppl=!0,n.showAddEditForm=1)})},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml");unblockUI("#divBlockUI")})}else e.go("/");y.isValueInArray(y.getRoleCode(n.authentication.role),"d1, d2")&&(n.userLevel=n.authentication.levelId,n.sub3months.LevelId=n.authentication.levelId,n.sub3months.IntendancyId=n.authentication.regionAndUnitId);n.hasMusicSpeciality=!1;n.hasboth=!1;n.IsCivilServant=!1;n.showCivilServantFull=!1;n.SpecialSupport=!1;n.checkCivilServant=function(){n.IsCivilServant==1?n.showCivilServantFull=!1:(n.sub3months.PublicServantFull=0,n.showCivilServantFull=!0)};n.showCivilServantBlock=function(){return n.IsCivilServant==!0?!0:!1};n.checkForMusic=function(){n.hasMusicSpeciality=n.SelectedSpecListItems.IsMusic==!0?!0:!1;n.hasMusicSpeciality==!1&&(n.sub3months.ConservatoryOwner=0)};n.checkForBoth=function(){n.hasboth=n.SelectedSpecListItems.IsBoth==!0?!0:!1;n.hasboth||(n.sub3months.AcceptAllSubstitudeToPrimarySpecialEducation=!1)};n.checkForSpecialNeeds=function(){n.SpecialSupport=!1;["ΠΕ60","ΠΕ70","ΠΕ02","ΠΕ03","ΠΕ04.01","ΠΕ04.02","ΠΕ04.04","ΠΕ04.05"].indexOf(n.SelectedSpecListItems.Code)!=-1?n.SelectedSpecListItems.LevelId==1?n.SelectedRegionsListItems.length>0&&(n.SpecialSupport=!0):n.SelectedSpecListItems.LevelId==2?t("filter")(n.SelectedRegionsListItems,function(n){return n.IsFull==!1}).length>0&&(n.SpecialSupport=!0):n.SpecialSupport=!0:n.SpecialSupport=!1};n.checkForRegions=function(){n.regionsFor.IsChurch=!1;n.regionsFor.IsArtistic=!1;n.regionsFor.IsPe73=!1;for(var t=0;t<n.AvailableSpecListItems.length;t+=1)if(n.ChurchList.indexOf(n.AvailableSpecListItems[t].Id)!=-1||n.AvailableSpecListItems.HasMusicVizantini==!0){n.regionsFor.IsChurch=!0;break}else n.regionsFor.IsChurch=!1;n.regionsFor.IsArtistic=n.ArtisticList.indexOf(n.SelectedSpecListItems.Id)!=-1?!0:!1;n.regionsFor.IsPe73=n.Pe73List.indexOf(n.SelectedSpecListItems.Id)!=-1?!0:!1};n.showDetails=function(){return n.SelectedSpecs.length>0?!0:!1};n.acceptAllSMEA=function(){n.sub3months.AcceptAllSubstitudeToPrimarySpecialEducation=y.isEmptyValue(n.sub3months.AcceptAllSubstitudeToSpecialEducation)||n.sub3months.AcceptAllSubstitudeToSpecialEducation!=!0||y.isEmptyValue(n.hasboth)||n.hasboth!=!0?!1:!0};n.enableSave=function(){n.enableButtonSave=n.sub3months.NotInRiskForCovid19==!0?!0:!1};n.changeLevel=function(){y.isEmptyValue(n.sub3months.LevelId)?(n.sub3months.LevelId=null,n.intendancies=[],n.sub3months.IntendancyId=null,n.continueDisabled=!0):(v.getIntendancies(n.sub3months.LevelId).then(function(t){n.intendancies=t}).catch(function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα στην εύρεση διευθύνσεων")}),y.isEmptyValue(n.sub3months.Id)&&(n.sub3months.IntendancyId=null),n.continueDisabled=!1)};n.changeIntendancies=function(){y.isEmptyValue(n.sub3months.LevelId)||y.isEmptyValue(n.sub3months.IntendancyId)?(n.continueDisabled=!0,n.sub3months.IntendancyId=null):n.continueDisabled=!1};n.doAll=function(){if(n.sub3months.Id!=null&&n.sub3months.Id!=""&&n.sub3months.Id!="undefined")n.canUpdateAppl&&n.sub3months.PersonId!=null&&n.sub3months.PersonId!=""&&n.sub3months.PersonId!="undefined"&&h.getPersonForApplication(n.sub3months.PersonId).then(function(t){if(n.person=t,n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1,n.showCivilServantBlock(),n.checkCivilServant(),n.enableSave(),y.isEmpty(n.SelectedSpecListItems)){y.isValueInArray(n.pageRules.sub3months.CanAccess,"d1, d2, m1, m2")&&n.sub3months.LevelId!=n.authentication.levelId&&(n.canUpdateAppl=!1);n.IsDisabled=!n.canUpdateAppl;n.sub3months.IsActive||(n.IsDisabled=!0,n.notActive=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.sub3months.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0);y.isEmpty(n.sub3months.ApplicationSubstitute3monthsProtocols)||(n.protocol=n.sub3months.ApplicationSubstitute3monthsProtocols[0].ProtocolString,n.showProtocol=!0);n.checkForMusic();n.checkForSpecialNeeds();n.checkForRegions();n.checkForBoth();var i=r.all([y.getByParams({id:n.sub3months.Id},"/api/ApplSubstitute3months/GetApplRegionsByApplId"),n.hasboth?y.postByParams({applicationTypeId:n.applicationType,sex:n.person.Sex,specialityId:n.SelectedSpecListItems.Id,personId:n.sub3months.PersonId},"/api/ApplicationTypeRegionAndUnit/GetTypeRegionAndUnitByApplicationTypeSpecAndBothSubst"):y.postByParams({level:n.sub3months.LevelId,applicationTypeId:n.applicationType,sex:n.person.Sex,specialityId:n.SelectedSpecListItems.Id,personId:n.sub3months.PersonId},"/api/ApplicationTypeRegionAndUnit/getTypeRegionAndUnitByApplicationTypeAndLevelAndSpecSubst")]);i.then(function(t){n.SelectedRegionsListItems=t[0];n.SelectedAvailRegionsItems=t[0];angular.copy(t[1],n.AvailableRegionsListItems);n.HasSpecPe70=n.SelectedSpecListItems.Id==164?!0:!1;n.HasSpecPe11Pe06=n.SelectedSpecListItems.Id==2||n.SelectedSpecListItems.Id==80?!0:!1;n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList();n.checkForChurch();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των περιοχών της αίτησης.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})}},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description);unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")}),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm");else{if(n.canInsertAppl&&n.sub3months.PersonId!=null&&n.sub3months.PersonId!=""&&n.sub3months.PersonId!="undefined"){var t=r.all([h.getPersonForApplication(n.sub3months.PersonId)]);t.then(function(t){n.person=t[0];n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1;n.showCivilServantBlock();n.checkCivilServant();n.enableSave();n.checkForMusic();n.checkForBoth();n.checkForSpecialNeeds();n.SpecialSupport==!1&&(n.sub3months.AcceptFullSubstitudeForSpecialSupport=!1);n.checkForRegions();n.SelectedAvailSpecItems=[];n.SelectedSelectedSpecListItems=[];n.AvailableRegionsListItems=[];n.getApplRegions()},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description);unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})}unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")}};n.getApplication=function(){if(n.sub3months.Id!=null&&n.sub3months.Id!=""&&n.sub3months.Id!="undefined"&&(n.DisableDLevel=!0,n.canUpdateAppl&&n.sub3months.PersonId!=null&&n.sub3months.PersonId!=""&&n.sub3months.PersonId!="undefined")){var t=r.all([y.getByParams({id:n.sub3months.Id},"/api/ApplSubstitute3months/GetApplSubstitute3monthsById"),]);t.then(function(t){n.sub3months=t[0];n.doAll();var i=r.all([y.getByParams({personId:n.sub3months.PersonId,applicationTypeId:n.applicationType,didacticYearId:n.sub3months.DidacticYearId,applicationId:n.sub3months.Id},"api/HistoryAppl/getLevelByApplTypeIdAndPersonIdAndYear")]);i.then(function(t){n.levels=t[0];n.changeLevel();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})})}};n.SelectedSpecAvailItems=[];n.SelectedSelectedSpecListItems=[];n.SelectedSpecListItems=[];n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[];n.SelectedRegionsListItems=[];n.btnRegionsUp=function(){for(var t,r,u,f=n.SelectedSelectedRegionsListItems,i=0;i<n.SelectedSelectedRegionsListItems.length;i++){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<=0||t>=n.SelectedRegionsListItems.length)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t-1];n.SelectedRegionsListItems[t-1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsDown=function(){for(var t,r,u,i=n.SelectedSelectedRegionsListItems.length-1;i>=0;i--){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<0||t>=n.SelectedRegionsListItems.length-1)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t+1];n.SelectedRegionsListItems[t+1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsRight=function(){angular.forEach(n.SelectedAvailRegionsItems,function(n){this.push(n)},n.SelectedRegionsListItems);angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.checkForSpecialNeeds();n.SpecialSupport==!1&&(n.sub3months.AcceptFullSubstitudeForSpecialSupport=!1);n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.btnRegionsLeft=function(){angular.forEach(n.SelectedSelectedRegionsListItems,function(n){this.push(n)},n.AvailableRegionsListItems);angular.forEach(n.SelectedSelectedRegionsListItems,function(t){for(var i=n.SelectedRegionsListItems.length-1;i>=0;i--)n.SelectedRegionsListItems[i].Id==t.Id&&n.SelectedRegionsListItems.splice(i,1)});n.checkForSpecialNeeds();n.SpecialSupport==!1&&(n.sub3months.AcceptFullSubstitudeForSpecialSupport=!1);n.SelectedSelectedRegionsListItems=[];n.SelectedAvailRegionsItems=[]};n.checkRegions=function(){var i=0,t=0,u=60,r=30;n.canInsertRegions=!0;n.SelectedRegionsListItems.length+n.SelectedAvailRegionsItems.length>u&&(o.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών","Δεν μπορείτε να επιλέξετε περισσότερες από "+u+" περιοχές"),n.canInsertRegions=!1);angular.forEach(n.SelectedRegionsListItems,function(n){n.Level==1?i=i+1:t=t+1});angular.forEach(n.SelectedAvailRegionsItems,function(n){n.Level==1?i=i+1:t=t+1});i>r&&(o.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών Α/βάθμιας","Δεν μπορείτε να επιλέξετε περισσότερες από "+r+" περιοχές Α/βάθμιας"),n.canInsertRegions=!1);t>t&&(o.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών Β/βάθμιας","Δεν μπορείτε να επιλέξετε περισσότερες από "+r+" περιοχές Β/βάθμιας"),n.canInsertRegions=!1)};n.getApplRegions=function(){y.isEmptyValue(n.SelectedSpecListItems)?(unblockUI("#divBlockUIRegion"),n.AvailableRegionsListItems=[],n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[]):(n.AvailableRegionsListItems=[],n.hasboth?(blockUI({target:"#divBlockUIRegion",animate:!0}),y.postByParams({applicationTypeId:n.applicationType,sex:n.person.Sex,specialityId:n.SelectedSpecListItems.Id,personId:n.sub3months.PersonId},"/api/ApplicationTypeRegionAndUnit/GetTypeRegionAndUnitByApplicationTypeSpecAndBothSubst").then(function(t){angular.copy(t,n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.HasSpecPe70=n.SelectedSpecListItems.Id==164?!0:!1;n.HasSpecPe11Pe06=n.SelectedSpecListItems.Id==2||n.SelectedSpecListItems.Id==80?!0:!1;n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(blockUI({target:"#divBlockUIRegion",animate:!0}),y.postByParams({level:n.SelectedSpecListItems.LevelId,applicationTypeId:n.applicationType,sex:n.person.Sex,specialityId:n.SelectedSpecListItems.Id},"/api/ApplicationTypeRegionAndUnit/getTypeRegionAndUnitByApplicationTypeAndLevelAndSpecSubst").then(function(i){angular.copy(i,n.AvailableRegionsListItems);n.HasSpecPe70=t("filter")(n.SelectedSpecListItems,{Id:164},!0).length>0?1:0;n.HasSpecPe11Pe06=n.SelectedSpecListItems.Id==2||n.SelectedSpecListItems.Id==80?!0:!1;n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})))};n.onFileSelect=function(t){var r,i;for(n.messages={completed:"",percentage:"0",error:""},n.showAlertForUploadCV=!1,r=0;r<t.length;r++){if(i=t[r],i.type!="application/x-zip-compressed"&&i.type!="application/x-compressed"&&i.type!="application/zip"&&i.type!="multipart/x-zip"&&i.type!="application/pdf"){n.messages.error='Μη έγκυρη επέκταση αρχείου "'+i.name+'". Οι επεκτάσεις που υποστηρίζονται είναι: "<b>zip και pdf<\/b>" .';return}if(i.size>=10485760){n.messages.error='Το αρχείο "'+i.name+'" (<b>'+Math.round(i.size/1024)+" KB<\/b>) υπερβαίνει το μέγιστο επιτρεπόμενο μέγεθος μεταφόρτωσης <b>10000 KB<\/b>.";return}(function(t){n.upload[t]=p.upload({url:"/api/files/uploadApplicationSubstitute",method:"POST",data:{SendDataForCVDto:n.SendDataForCVDto},file:i}).progress(function(t){n.messages.percentage=parseInt(100*t.loaded/t.total)}).then(function(t){n.messages.completed="";n.SendDataForCVDto.Id=t.data.applicationSubstituteFile.Id;n.SendDataForCVFullDto=t.data.applicationSubstituteFile;n.uploadedFileDetails=t.data.Message;n.showUploadMessageRequired=!1}).catch(function(t){n.messages.error=t.data.Message})})(r)}};n.removeDuplicatesRegionsForDualList=function(){angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.hasboth||(n.SelectedRegionsListItems=t("filter")(n.SelectedRegionsListItems,{Level:n.sub3months.LevelId},!0));n.regionsFor.IsChurch||(n.SelectedRegionsListItems=t("filter")(n.SelectedRegionsListItems,{IsChurch:!1},!0));n.regionsFor.IsArtistic||(n.SelectedRegionsListItems=t("filter")(n.SelectedRegionsListItems,{IsArtistic:!1},!0),n.SelectedRegionsListItems=n.regionsFor.IsPe73&&!y.isEmptyValue(n.SelectedSpecListItems)?t("filter")(n.SelectedRegionsListItems,{OnlyPE73:!0},!0):n.HasSpecPe70&&!n.regionsFor.IsPe73?t("filter")(n.SelectedRegionsListItems,{OnlyPE73:!1},!0):n.regionsFor.IsPe73&&!y.isEmptyValue(n.SelectedSpecListItems)?t("filter")(n.SelectedRegionsListItems,{OnlyPE70:!1},!0):n.HasSpecPe11Pe06?t("filter")(n.SelectedRegionsListItems,{OnlyPE73:!1},!0):t("filter")(n.SelectedRegionsListItems,{OnlyPE70:!1,OnlyPE73:!1},!0));n.checkForSpecialNeeds();n.SpecialSupport==!1&&(n.sub3months.AcceptFullSubstitudeForSpecialSupport=!1);n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.removeDuplicatesSpecsForDualList=function(){angular.forEach(n.SelectedAvailSpecItems,function(t){for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].Id==t.Id&&n.AvailableSpecListItems.splice(i,1)});n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.editPerson=function(){f.setPersonId(n.sub3months.PersonId);e.go("stateEditPerson")};n.saveAction=function(t){n.showAlertRegion=y.isEmpty(n.SelectedRegionsListItems)?!0:!1;n.canSave=!0;n.showAlertSpec||n.showAlertRegion||!n.canSave||n.InsOrUpd(t)};n.InsOrUpd=function(t){var r,i;n.sub3months.SpecialityId=n.SelectedSpecListItems.Id;n.sub3months.LevelId=n.SelectedSpecListItems.LevelId;r={Substitute3months:n.sub3months,RegionAndUnit:n.SelectedRegionsListItems,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Status:t};i=r;n.sub3months.Id!=null&&n.sub3months.Id!=""&&n.sub3months.Id!="undefined"?(n.sub3months.ModifiedBy=n.authentication.userName,y.postByParams(i,"/api/ApplSubstitute3months/updateApplSubstitute3months").then(function(){f.setPersonId(n.sub3months.PersonId);e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)})):(n.sub3months.DidacticYearId=n.applicationDidacticYear.Id,n.sub3months.CreatedBy=n.authentication.userName,y.postByParams(i,"/api/ApplSubstitute3months/insertApplSubstitute3months").then(function(){f.setPersonId(n.sub3months.PersonId);e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)}))}};Substitute3monthsController.$inject=["$scope","$filter","$log","$q","$uibModal","PassParameters","$state","toaster","SubstituteFactory","PersonFactory","PersonSpecialityFactory","ApplicationTypeRegionAndUnitFactory","ApplicationTypeFekFactory","RegionAndFactory","GeneralFactory","$upload"];SubstituteController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p){if(n.mess="",n.messInfo="",n.sub={IsTemporaryStored:!0},n.person={},n.applicationType=1,n.step1=!0,n.step2=!1,n.continueDisabled=!0,n.perspec={},n.SelectedSpecs=[],n.Years=[],n.hasValidFekNoConfirmSpeciality=!1,n.alerts="",n.showToConfirmSpeciality=!1,n.SelectedSpecListItems=[],n.selected={Years:[]},n.HasSpecPe70=!1,n.HasSpecPe11Pe06=!1,n.intendancies=[],n.SelectedAvailRegionsItems=[],n.SelectedSelectedRegionsListItems=[],n.SelectedRegionsListItems=[],n.AvailableSpecListItems=[],n.AvailableRegionsListItems=[],n.showAlertSpec=!1,n.showAlertRegion=!1,n.DisableDLevel=!1,n.protocol="",n.showProtocol=!1,n.cannotUpdate=!1,n.notActive=!1,n.noUpdAccess=!1,n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.userLevel=0,n.fek={},n.ChurchList=[71,72,73,74,75,76,77,78,79,80,2,364,358,356,4,82,355,81],n.ArtisticList=[384],n.Pe73List=[336],n.applicationLevelId=0,n.showIconography={IsPe01:!1,IsPe08:!1},n.upload=[],n.messages={completed:"",percentage:"0",error:""},n.uploadedFileDetails="",n.showAlertForUploadCV=!1,n.SendDataForCVDto={Id:"",ApplicationSubstituteId:"",PersonId:""},n.SendDataForCVFullDto={Id:"",ApplicationSubstituteId:"",PersonId:"",FileName:"",FileSize:"",EncryptedName:"",DirectPdfLink:"",UploadDateTime:"",ContentType:""},n.showUpload=!1,n.showUploadMessageRequired=!1,n.showIconographyMessage=!1,blockUI({target:"#divBlockUI",animate:!0}),n.regionsFor={IsChurch:!1,IsArtistic:!1,IsPe73:!1},n.goToStep=function(i,r){i==2?y.getByParams({applicationTypeId:n.applicationType,specialityId:r},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(i){n.SelectedSpecListItems=t("filter")(n.AvailableSpecListItems,{Id:r},!0)[0];n.fek=i;y.isEmptyValue(i)?(n.mess="<li>Δεν υπαρχει ενεργό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2):(n.step1=!1,n.step2=!0,n.sub.SpecialityId=r,blockUI({target:"#divBlockUIForm",animate:!0}),n.doAll())},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.step1=!0,n.step2=!1,n.DisableDLevel=y.isEmpty(n.SelectedSpecListItems)&&y.isEmptyValue(n.sub.Id)?!1:!0,n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[])},n.canSave=!0,n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.authentication.isAuth){var w="sub";y.getByParams({role:n.authentication.role,codes:w},"/api/Subsystem/NewCheckPermission").then(function(i){var u=w.split(","),e,s;for(e in u)n.pageRules[u[e]]=t("filter")(i,{Code:u[e]},!0)[0].Rules;n.sub.Id=f.getApplicationId();n.applicationLevelId=f.getApplicationLevelId();y.isEmptyValue(n.applicationLevelId)&&(n.applicationLevelId=0);y.isEmptyValue(n.sub.Id)?(n.step1=!0,n.step2=!1):(n.step1=!1,n.step2=!0);f.resetApplication();n.sub.PersonId=f.getPersonId();y.isValueInArray(n.pageRules.sub.CanAccess,"u1, u2")&&(n.sub.PersonId=n.authentication.personId);s=r.all([y.getByParams({personId:n.sub.PersonId},"/api/ApplSubstitute/getSpecialityForSubstitute"),y.getByParams({Id:n.sub.PersonId},"/api/ApplSubstitute/GetApplSubstitute")]);s.then(function(i){var u,r;for(angular.copy(i[0],n.AvailableSpecListItems),n.applSub=i[1],r=n.AvailableSpecListItems.length-1;r>=0;r--)n.AvailableSpecListItems[r].hasApplPerm=0;for(u=n.applSub.length-1;u>=0;u--)for(r=n.AvailableSpecListItems.length-1;r>=0;r--)n.applSub[u].SpecialityId==n.AvailableSpecListItems[r].Id&&(n.AvailableSpecListItems[r].hasApplSub=1);y.isEmpty(n.AvailableSpecListItems)?(n.mess+="<li>Δεν μπορείτε να υποβάλετε αίτηση. Δεν βρίσκεστε στους αξιολογικούς πίνακες κατάταξης του ΑΣΕΠ για κάποιον κλάδο.<\/li>",n.showAddEditForm=2):n.sub.Id!=null&&n.sub.Id!=""&&n.sub.Id!="undefined"?(y.isEmptyValue(n.sub.SpecialityId)&&(n.sub.SpecialityId=f.getSpecialityId()),y.getByParams({applicationTypeId:n.applicationType,specialityId:n.sub.SpecialityId},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(i){n.SelectedSpecListItems=t("filter")(n.AvailableSpecListItems,{Id:n.sub.SpecialityId},!0)[0];!y.isEmptyValue(i)||y.isValueInArray(y.getRoleCode(n.authentication.role),"a")?(n.canUpdateAppl=!0,n.showAddEditForm=1,n.getApplication()):(n.mess+="<li>Δεν μπορείτε να τροποποιήσετε την αίτηση γιατί δεν υπάρχει ανοιχτό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2)},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(n.canInsertAppl=!0,n.showAddEditForm=1)});n.SendDataForCVDto.ApplicationSubstituteId=n.sub.Id;n.SendDataForCVDto.PersonId=n.sub.PersonId;y.getByParams({personId:n.sub.PersonId,ApplicationSubstituteId:n.sub.Id},"/api/ApplSubstitute/GetDetailsForFile").then(function(i){i!=null&&(n.SendDataForCVFullDto=i,n.SendDataForCVDto.Id=i.Id,n.uploadedFileDetails="<h4>Έχετε μεταφορτώσει:<\/h4><ul><li>Αρχείο: "+n.SendDataForCVFullDto.FileName+" <\/li><li>Μέγεθος: "+n.SendDataForCVFullDto.FileSize+" <\/li><li>Ημερομηνία: "+t("date")(n.SendDataForCVFullDto.UploadDateTime,"dd/MM/yyyy - HH:mm:ss")+" <\/li><\/ul>")},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης επισυναπτόμενου Βιογραφικού")})},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml");unblockUI("#divBlockUI")})}else e.go("/");y.isValueInArray(y.getRoleCode(n.authentication.role),"d1, d2")&&(n.userLevel=n.authentication.levelId,n.sub.LevelId=n.authentication.levelId,n.sub.IntendancyId=n.authentication.regionAndUnitId);n.hasMusicSpeciality=!1;n.hasboth=!1;n.IsCivilServant=!1;n.showCivilServantFull=!1;n.SpecialSupport=!1;n.checkCivilServant=function(){n.IsCivilServant==1?n.showCivilServantFull=!1:(n.sub.PublicServantFull=0,n.showCivilServantFull=!0)};n.showCivilServantBlock=function(){return n.IsCivilServant==!0?!0:!1};n.checkForMusic=function(){n.hasMusicSpeciality=n.SelectedSpecListItems.IsMusic==!0?!0:!1;n.hasMusicSpeciality==!1&&(n.sub.ConservatoryOwner=0)};n.checkForBoth=function(){n.hasboth=n.SelectedSpecListItems.IsBoth==!0?!0:!1;n.hasboth||(n.sub.AcceptAllSubstitudeToPrimarySpecialEducation=!1)};n.checkForIconography=function(){n.showIconography.IsPe01=!1;n.showIconography.IsPe08=!1;n.SelectedSpecListItems.Id==71?n.showIconography.IsPe01=!0:n.SelectedSpecListItems.Id==82&&(n.showIconography.IsPe08=!0);n.showIconography.IsPe01||n.showIconography.IsPe08||(n.sub.AcceptIconography=!1,n.sub.IconographyQualification=0)};n.checkForSpecialNeeds=function(){n.SpecialSupport=!1;["ΠΕ60","ΠΕ70","ΠΕ02","ΠΕ03","ΠΕ04.01","ΠΕ04.02","ΠΕ04.04","ΠΕ04.05"].indexOf(n.SelectedSpecListItems.Code)!=-1?n.SelectedSpecListItems.LevelId==1?n.SelectedRegionsListItems.length>0&&(n.SpecialSupport=!0):n.SelectedSpecListItems.LevelId==2?t("filter")(n.SelectedRegionsListItems,function(n){return n.IsFull==!1}).length>0&&(n.SpecialSupport=!0):n.SpecialSupport=!0:n.SpecialSupport=!1};n.checkForChurch=function(){n.showUpload=!1;t("filter")(n.SelectedRegionsListItems,function(n){return n.IsChurch==!0}).length>0?n.showUpload=!0:(n.sub.AcceptIconography=!1,n.sub.IconographyQualification=0)};n.checkForRegions=function(){n.regionsFor.IsChurch=!1;n.regionsFor.IsArtistic=!1;n.regionsFor.IsPe73=!1;for(var t=0;t<n.AvailableSpecListItems.length;t+=1)if(n.ChurchList.indexOf(n.AvailableSpecListItems[t].Id)!=-1||n.AvailableSpecListItems.HasMusicVizantini==!0){n.regionsFor.IsChurch=!0;break}else n.regionsFor.IsChurch=!1;n.regionsFor.IsArtistic=n.ArtisticList.indexOf(n.SelectedSpecListItems.Id)!=-1?!0:!1;n.regionsFor.IsPe73=n.Pe73List.indexOf(n.SelectedSpecListItems.Id)!=-1?!0:!1};n.acceptIconography=function(){n.sub.AcceptIconography||(n.sub.IconographyQualification=0)};n.showDetails=function(){return n.SelectedSpecs.length>0?!0:!1};n.acceptAllSMEA=function(){n.sub.AcceptAllSubstitudeToPrimarySpecialEducation=y.isEmptyValue(n.sub.AcceptAllSubstitudeToSpecialEducation)||n.sub.AcceptAllSubstitudeToSpecialEducation!=!0||y.isEmptyValue(n.hasboth)||n.hasboth!=!0?!1:!0};n.changeLevel=function(){y.isEmptyValue(n.sub.LevelId)?(n.sub.LevelId=null,n.intendancies=[],n.sub.IntendancyId=null,n.continueDisabled=!0):(v.getIntendancies(n.sub.LevelId).then(function(t){n.intendancies=t}).catch(function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα στην εύρεση διευθύνσεων")}),y.isEmptyValue(n.sub.Id)&&(n.sub.IntendancyId=null),n.continueDisabled=!1)};n.changeIntendancies=function(){y.isEmptyValue(n.sub.LevelId)||y.isEmptyValue(n.sub.IntendancyId)?(n.continueDisabled=!0,n.sub.IntendancyId=null):n.continueDisabled=!1};n.downloadFile=function(){y.getByParamsDownload({PersonId:n.sub.PersonId,Path:n.SendDataForCVFullDto.DirectPdfLink,ContentType:n.SendDataForCVFullDto.ContentType},"api/files/downloadFolder").then(function(t){var p=t.status,s=t.headers,h=t.data,y="application/octet-stream",r=!1,f,c,l,e,u,v,i,o;s=s();f=n.SendDataForCVFullDto.FileName||"download.pdf";c=s["content-type"]||y;try{if(console.log("Trying saveBlob method ..."),i=new Blob([h],{type:c}),navigator.msSaveBlob)navigator.msSaveBlob(i,f);else{if(l=navigator.webkitSaveBlob||navigator.mozSaveBlob||navigator.saveBlob,l===undefined)throw"Not supported";l(i,f)}console.log("saveBlob succeeded");r=!0}catch(a){console.log("saveBlob method failed with the following exception:");console.log(a)}if(!r&&(e=window.URL||window.webkitURL||window.mozURL||window.msURL,e)){if(u=document.createElement("a"),"download"in u)try{console.log("Trying download link method with simulated click ...");i=new Blob([h],{type:c});o=e.createObjectURL(i);u.setAttribute("href",o);u.setAttribute("download",f);v=document.createEvent("MouseEvents");v.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null);u.dispatchEvent(v);console.log("Download link method with simulated click succeeded");r=!0}catch(a){console.log("Download link method with simulated click failed with the following exception:");console.log(a)}if(!r)try{console.log("Trying download link method with window.location ...");i=new Blob([h],{type:y});o=e.createObjectURL(i);window.location=o;console.log("Download link method with window.location succeeded");r=!0}catch(a){console.log("Download link method with window.location failed with the following exception:");console.log(a)}}r||(console.log("No methods worked for saving the arraybuffer, using last resort window.open"),window.open(httpPath,"_blank",""))},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα στη φόρτωση του αρχείου")})};n.doAll=function(){if(n.sub.Id!=null&&n.sub.Id!=""&&n.sub.Id!="undefined")n.canUpdateAppl&&n.sub.PersonId!=null&&n.sub.PersonId!=""&&n.sub.PersonId!="undefined"&&h.getPersonForApplication(n.sub.PersonId).then(function(t){if(n.person=t,n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1,n.showCivilServantBlock(),n.checkCivilServant(),y.isEmpty(n.SelectedSpecListItems)){y.isValueInArray(n.pageRules.sub.CanAccess,"d1, d2, m1, m2")&&n.sub.LevelId!=n.authentication.levelId&&(n.canUpdateAppl=!1);n.IsDisabled=!n.canUpdateAppl;n.sub.IsActive||(n.IsDisabled=!0,n.notActive=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.sub.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0);y.isEmpty(n.sub.ApplicationSubstituteProtocols)||(n.protocol=n.sub.ApplicationSubstituteProtocols[0].ProtocolString,n.showProtocol=!0);var i=r.all([s.getPrivatesSchoolYearsByApplSubId(n.sub.Id),s.getPrivatesSchoolYearsAllAvailable()]);i.then(function(t){n.checkForMusic();n.checkForSpecialNeeds();n.checkForRegions();n.checkForIconography();n.checkForBoth();n.selected.Years=t[2];n.Years=t[3];var i=r.all([s.getApplRegionsByApplId(n.sub.Id),n.hasboth?y.postByParams({applicationTypeId:n.applicationType,sex:n.person.Sex,specialityId:n.SelectedSpecListItems.Id,personId:n.sub.PersonId},"/api/ApplicationTypeRegionAndUnit/GetTypeRegionAndUnitByApplicationTypeSpecAndBothSubst"):y.postByParams({level:n.sub.LevelId,applicationTypeId:n.applicationType,sex:n.person.Sex,specialityId:n.SelectedSpecListItems.Id,personId:n.sub.PersonId},"/api/ApplicationTypeRegionAndUnit/getTypeRegionAndUnitByApplicationTypeAndLevelAndSpecSubst")]);i.then(function(t){n.SelectedRegionsListItems=t[0];n.SelectedAvailRegionsItems=t[0];angular.copy(t[1],n.AvailableRegionsListItems);n.HasSpecPe70=n.SelectedSpecListItems.Id==164?!0:!1;n.HasSpecPe11Pe06=n.SelectedSpecListItems.Id==2||n.SelectedSpecListItems.Id==80?!0:!1;n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList();n.checkForChurch();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των περιοχών της αίτησης.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})}},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description);unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")}),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm");else{if(n.canInsertAppl&&n.sub.PersonId!=null&&n.sub.PersonId!=""&&n.sub.PersonId!="undefined"){var t=r.all([h.getPersonForApplication(n.sub.PersonId)]);t.then(function(t){n.person=t[0];n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1;n.showCivilServantBlock();n.checkCivilServant();n.checkForMusic();n.checkForIconography();n.checkForBoth();n.checkForSpecialNeeds();n.SpecialSupport==!1&&(n.sub.AcceptFullSubstitudeForSpecialSupport=!1);n.checkForRegions();n.SelectedAvailSpecItems=[];n.SelectedSelectedSpecListItems=[];n.AvailableRegionsListItems=[];n.getApplRegions()},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description);unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})}unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")}};n.getApplication=function(){if(n.sub.Id!=null&&n.sub.Id!=""&&n.sub.Id!="undefined"&&(n.DisableDLevel=!0,n.canUpdateAppl&&n.sub.PersonId!=null&&n.sub.PersonId!=""&&n.sub.PersonId!="undefined")){var t=r.all([s.getSubstituteById(n.sub.Id)]);t.then(function(t){n.sub=t[0];n.doAll();var i=r.all([y.getByParams({personId:n.sub.PersonId,applicationTypeId:n.applicationType,didacticYearId:n.sub.DidacticYearId,applicationId:n.sub.Id},"api/HistoryAppl/getLevelByApplTypeIdAndPersonIdAndYear")]);i.then(function(t){n.levels=t[0];n.changeLevel();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})})}};n.SelectedSpecAvailItems=[];n.SelectedSelectedSpecListItems=[];n.SelectedSpecListItems=[];n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[];n.SelectedRegionsListItems=[];n.btnRegionsUp=function(){for(var t,r,u,f=n.SelectedSelectedRegionsListItems,i=0;i<n.SelectedSelectedRegionsListItems.length;i++){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<=0||t>=n.SelectedRegionsListItems.length)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t-1];n.SelectedRegionsListItems[t-1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsDown=function(){for(var t,r,u,i=n.SelectedSelectedRegionsListItems.length-1;i>=0;i--){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<0||t>=n.SelectedRegionsListItems.length-1)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t+1];n.SelectedRegionsListItems[t+1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsRight=function(){angular.forEach(n.SelectedAvailRegionsItems,function(n){this.push(n)},n.SelectedRegionsListItems);angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.checkForSpecialNeeds();n.checkForChurch();n.SpecialSupport==!1&&(n.sub.AcceptFullSubstitudeForSpecialSupport=!1);n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.btnRegionsLeft=function(){angular.forEach(n.SelectedSelectedRegionsListItems,function(n){this.push(n)},n.AvailableRegionsListItems);angular.forEach(n.SelectedSelectedRegionsListItems,function(t){for(var i=n.SelectedRegionsListItems.length-1;i>=0;i--)n.SelectedRegionsListItems[i].Id==t.Id&&n.SelectedRegionsListItems.splice(i,1)});n.checkForSpecialNeeds();n.checkForChurch();n.SpecialSupport==!1&&(n.sub.AcceptFullSubstitudeForSpecialSupport=!1);n.SelectedSelectedRegionsListItems=[];n.SelectedAvailRegionsItems=[]};n.checkRegions=function(){var i=0,t=0,u=60,r=30;n.canInsertRegions=!0;n.SelectedRegionsListItems.length+n.SelectedAvailRegionsItems.length>u&&(o.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών","Δεν μπορείτε να επιλέξετε περισσότερες από "+u+" περιοχές"),n.canInsertRegions=!1);angular.forEach(n.SelectedRegionsListItems,function(n){n.Level==1?i=i+1:t=t+1});angular.forEach(n.SelectedAvailRegionsItems,function(n){n.Level==1?i=i+1:t=t+1});i>r&&(o.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών Α/βάθμιας","Δεν μπορείτε να επιλέξετε περισσότερες από "+r+" περιοχές Α/βάθμιας"),n.canInsertRegions=!1);t>t&&(o.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών Β/βάθμιας","Δεν μπορείτε να επιλέξετε περισσότερες από "+r+" περιοχές Β/βάθμιας"),n.canInsertRegions=!1)};n.getApplRegions=function(){y.isEmptyValue(n.SelectedSpecListItems)?(unblockUI("#divBlockUIRegion"),n.AvailableRegionsListItems=[],n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[]):(n.AvailableRegionsListItems=[],n.hasboth?(blockUI({target:"#divBlockUIRegion",animate:!0}),y.postByParams({applicationTypeId:n.applicationType,sex:n.person.Sex,specialityId:n.SelectedSpecListItems.Id,personId:n.sub.PersonId},"/api/ApplicationTypeRegionAndUnit/GetTypeRegionAndUnitByApplicationTypeSpecAndBothSubst").then(function(t){angular.copy(t,n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.HasSpecPe70=n.SelectedSpecListItems.Id==164?!0:!1;n.HasSpecPe11Pe06=n.SelectedSpecListItems.Id==2||n.SelectedSpecListItems.Id==80?!0:!1;n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(blockUI({target:"#divBlockUIRegion",animate:!0}),y.postByParams({level:n.SelectedSpecListItems.LevelId,applicationTypeId:n.applicationType,sex:n.person.Sex,specialityId:n.SelectedSpecListItems.Id},"/api/ApplicationTypeRegionAndUnit/getTypeRegionAndUnitByApplicationTypeAndLevelAndSpecSubst").then(function(t){angular.copy(t,n.AvailableRegionsListItems);n.HasSpecPe70=n.SelectedSpecListItems.Id==164?1:0;n.HasSpecPe11Pe06=n.SelectedSpecListItems.Id==2||n.SelectedSpecListItems.Id==80?!0:!1;n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})))};n.onFileSelect=function(t){var r,i;for(n.messages={completed:"",percentage:"0",error:""},n.showAlertForUploadCV=!1,r=0;r<t.length;r++){if(i=t[r],i.type!="application/x-zip-compressed"&&i.type!="application/x-compressed"&&i.type!="application/zip"&&i.type!="multipart/x-zip"&&i.type!="application/pdf"){n.messages.error='Μη έγκυρη επέκταση αρχείου "'+i.name+'". Οι επεκτάσεις που υποστηρίζονται είναι: "<b>zip και pdf<\/b>" .';return}if(i.size>=10485760){n.messages.error='Το αρχείο "'+i.name+'" (<b>'+Math.round(i.size/1024)+" KB<\/b>) υπερβαίνει το μέγιστο επιτρεπόμενο μέγεθος μεταφόρτωσης <b>10000 KB<\/b>.";return}(function(t){n.upload[t]=p.upload({url:"/api/files/uploadApplicationSubstitute",method:"POST",data:{SendDataForCVDto:n.SendDataForCVDto},file:i}).progress(function(t){n.messages.percentage=parseInt(100*t.loaded/t.total)}).then(function(t){n.messages.completed="";n.SendDataForCVDto.Id=t.data.applicationSubstituteFile.Id;n.SendDataForCVFullDto=t.data.applicationSubstituteFile;n.uploadedFileDetails=t.data.Message;n.showUploadMessageRequired=!1}).catch(function(t){n.messages.error=t.Message})})(r)}};n.removeDuplicatesRegionsForDualList=function(){angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.hasboth||(n.SelectedRegionsListItems=t("filter")(n.SelectedRegionsListItems,{Level:n.sub.LevelId},!0));n.regionsFor.IsChurch||(n.SelectedRegionsListItems=t("filter")(n.SelectedRegionsListItems,{IsChurch:!1},!0));n.regionsFor.IsArtistic||(n.SelectedRegionsListItems=t("filter")(n.SelectedRegionsListItems,{IsArtistic:!1},!0),n.SelectedRegionsListItems=n.regionsFor.IsPe73&&!y.isEmptyValue(n.SelectedSpecListItems)?t("filter")(n.SelectedRegionsListItems,{OnlyPE73:!0},!0):n.HasSpecPe70&&!n.regionsFor.IsPe73?t("filter")(n.SelectedRegionsListItems,{OnlyPE73:!1},!0):n.regionsFor.IsPe73&&!y.isEmptyValue(n.SelectedSpecListItems)?t("filter")(n.SelectedRegionsListItems,{OnlyPE70:!1},!0):n.HasSpecPe11Pe06?t("filter")(n.SelectedRegionsListItems,{OnlyPE73:!1},!0):t("filter")(n.SelectedRegionsListItems,{OnlyPE70:!1,OnlyPE73:!1},!0));n.checkForSpecialNeeds();n.SpecialSupport==!1&&(n.sub.AcceptFullSubstitudeForSpecialSupport=!1);n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.removeDuplicatesSpecsForDualList=function(){angular.forEach(n.SelectedAvailSpecItems,function(t){for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].Id==t.Id&&n.AvailableSpecListItems.splice(i,1)});n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.editPerson=function(){f.setPersonId(n.sub.PersonId);e.go("stateEditPerson")};n.saveAction=function(t){n.showAlertRegion=y.isEmpty(n.SelectedRegionsListItems)?!0:!1;n.canSave=!0;n.showUploadMessageRequired=y.isEmptyValue(n.uploadedFileDetails)&&n.showUpload?!0:!1;n.showIconographyMessage=n.sub.AcceptIconography&&n.sub.IconographyQualification<1?!0:!1;n.showAlertSpec||n.showAlertRegion||!n.canSave||n.showIconographyMessage||n.InsOrUpd(t)};n.InsOrUpd=function(t){var r,i;n.sub.SpecialityId=n.SelectedSpecListItems.Id;n.sub.LevelId=n.SelectedSpecListItems.LevelId;r={Substitute:n.sub,RegionAndUnit:n.SelectedRegionsListItems,PrivateYears:n.selected.Years,ApplTemplate:"",UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Status:t,ApplicationSubstituteFile:n.SendDataForCVFullDto};i=r;n.sub.Id!=null&&n.sub.Id!=""&&n.sub.Id!="undefined"?(n.sub.ModifiedBy=n.authentication.userName,s.updateApplSubstitute(i).then(function(){f.setPersonId(n.sub.PersonId);e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)})):(n.sub.DidacticYearId=n.applicationDidacticYear.Id,n.sub.CreatedBy=n.authentication.userName,s.insertApplSubstitute(i).then(function(){f.setPersonId(n.sub.PersonId);e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)}))}};SubstituteController.$inject=["$scope","$filter","$log","$q","$uibModal","PassParameters","$state","toaster","SubstituteFactory","PersonFactory","PersonSpecialityFactory","ApplicationTypeRegionAndUnitFactory","ApplicationTypeFekFactory","RegionAndFactory","GeneralFactory","$upload"];SubstituteEEPEBP3monthsController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y){if(n.mess="",n.messInfo="",n.subEEPEBP3months={IsTemporaryStored:!0},n.subEEPEBP3months.LevelId=3,n.person={},n.applicationType=34,n.perspec={},n.SelectedSpecs=[],n.hasValidFekNoConfirmSpeciality=!1,n.showToConfirmSpeciality=!1,n.hasKESY=!1,n.enableButtonSave=!1,n.continueDisabled="disabled",n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=!1,n.userLevel=0,n.IsCivilServant=!1,n.showCivilServantFull=!1,n.SelectedAvailRegionsItems=[],n.SelectedSelectedRegionsListItems=[],n.SelectedRegionsListItems=[],n.SelectedSpecListItems=[],n.AvailableSpecListItems=[],n.SelectedAvailSpecItems=[],n.AvailableRegionsListItems=[],n.applSubs=[],n.DisableDLevel=!1,n.hasMusicSpeciality=!1,n.hasboth=!1,n.applicationLevelId=0,n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=!1,n.showAlertSpec=!1,n.showAlertRegion=!1,n.visibleColumns={FirstSpeciality:!1,EquivalenceType:!1},n.canSave=!0,y.isValueInArray(y.getRoleCode(n.authentication.role),"d1, d2")&&(n.userLevel=n.authentication.levelId,n.subEEPEBP3months.LevelId=n.authentication.levelId,n.subEEPEBP3months.IntendancyId=n.authentication.regionAndUnitId),n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},blockUI({target:"#divBlockUI",animate:!0}),n.authentication.isAuth){var p="subEEPEBP3months";y.getByParams({role:n.authentication.role,codes:p},"/api/Subsystem/NewCheckPermission").then(function(r){var u=p.split(","),e,o;for(e in u)n.pageRules[u[e]]=t("filter")(r,{Code:u[e]},!0)[0].Rules;n.subEEPEBP3months.Id=f.getApplicationId();y.isEmptyValue(n.subEEPEBP3months.Id)?(n.step1=!0,n.step2=!1):(n.step1=!1,n.step2=!0);n.applicationLevelId=f.getApplicationLevelId();y.isEmptyValue(n.applicationLevelId)&&(n.applicationLevelId=0);f.resetApplication();n.subEEPEBP3months.PersonId=f.getPersonId();y.isValueInArray(n.pageRules.subEEPEBP3months.CanAccess,"u1, u2")&&(n.subEEPEBP3months.PersonId=n.authentication.personId);o=i.all([y.getByParams({personId:n.subEEPEBP3months.PersonId,level:n.userLevel,applicationType:n.applicationType,didacticYear:n.applicationDidacticYear.Id,applicationLevelId:n.applicationLevelId},"api/HistoryAppl/canInsertApplicationToLevels"),y.getByParams({personId:n.subEEPEBP3months.PersonId},"api/Person/getValidPersonForAppl"),y.getByParams({personId:n.subEEPEBP3months.PersonId},"/api/RecruitmentServiceAssumed/getSubstitutesServiceAssumed")]);o.then(function(t){n.hasValidFek=t[0].ValidFek;n.LevelList=t[0].LevelDto;n.mess=t[0].mess;n.messInfo=t[0].messInfo;n.ValidPersonForAppl=t[1];n.mess+=n.ValidPersonForAppl.mess;n.hasValidFekNoConfirmSpeciality=t[0].ValidFekNoConfirmSpeciality;n.subs=t[2].substitutes;y.isEmpty(n.subs)||(n.mess+="<li>Δεν μπορείτε να υποβάλετε αίτηση. Έχετε ήδη προσληφθεί το τρέχον σχολικό έτος<\/li>");n.hasValidFekNoConfirmSpeciality&&(n.showToConfirmSpeciality=!0);n.canInsertAppl=!0;n.hasValidFek&&!y.isEmptyValue(n.subEEPEBP3months.Id)&&n.ValidPersonForAppl.ValidPerson||y.isValueInArray(y.getRoleCode(n.authentication.role),"m1, m2, a, s")&&!y.isEmptyValue(n.subEEPEBP3months.Id)?(n.canUpdateAppl=!0,n.showAddEditForm=1,y.isValueInArray(y.getRoleCode(n.authentication.role),"d1, d2")?(n.step1=!1,n.step2=!0,blockUI({target:"#divBlockUIForm",animate:!0}),n.getApplication()):n.getApplication()):n.hasValidFek||n.subEEPEBP3months.Id==null||n.subEEPEBP3months.Id==""||n.subEEPEBP3months.Id=="undefined"?n.canInsertAppl&&n.hasValidFek&&n.ValidPersonForAppl.ValidPerson&&y.isEmpty(n.subs)?(n.canInsertAppl=!0,n.showAddEditForm=1,unblockUI("#divBlockUI"),n.doAll()):(y.isEmpty(n.mess)&&(n.mess+="<li>Δεν μπορείτε να υποβάλετε αίτηση. Για ήδη υποβληθείσα αίτηση μεταβείτε στο Ιστορικό Αιτήσεων<\/li>"),n.showAddEditForm=2,unblockUI("#divBlockUI")):(n.showAddEditForm=2,n.doAll())})},function(){unblockUI("#divBlockUI");o.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else e.go("/");n.checkCivilServant=function(){n.IsCivilServant==1?n.showCivilServantFull=!1:(n.subEEPEBP3months.PublicServantFull=0,n.showCivilServantFull=!0)};n.checkForBoth=function(){for(var t=0;t<n.SelectedSpecListItems.length;t+=1)if(n.SelectedSpecListItems[t].IsBoth==!0){n.hasboth=!0;break}else n.hasboth=!1};n.showCivilServantBlock=function(){return n.IsCivilServant==!0?!0:!1};n.checkForMusic=function(){for(var t=0;t<n.SelectedSpecListItems.length;t+=1)if(n.SelectedSpecListItems[t].IsMusic==!0){n.hasMusicSpeciality=!0;break}else n.hasMusicSpeciality=!1;n.hasMusicSpeciality==!1&&(n.subEEPEBP3months.ConservatoryOwner=0)};n.getApplRegions=function(){n.AvailableRegionsListItems=[];blockUI({target:"#divBlockUIRegion",animate:!0});y.getByParams({applicationTypeId:n.applicationType},"/api/ApplicationTypeRegionAndUnit/getTypeRegionAndUnitByApplicationType").then(function(t){if(angular.copy(t,n.AvailableRegionsListItems),n.SelectedSpecListItems.Code!="ΠΕ23"&&n.SelectedSpecListItems.Code!="ΠΕ30")for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].RegionAndUnitId==151&&n.AvailableRegionsListItems.splice(i,1);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.goToStep=function(i,r){if(i==2){if(n.step1=!1,n.step2=!0,n.subEEPEBP3months.SpecialityId=r,n.SelectedSpecListItems=t("filter")(n.AvailableSpecListItems,{Id:r},!0)[0],n.checkForKesy(),n.SelectedSpecListItems.Code!="ΠΕ23"&&n.SelectedSpecListItems.Code!="ΠΕ30")for(var u=n.AvailableRegionsListItems.length-1;u>=0;u--)n.AvailableRegionsListItems[u].RegionAndUnitId==151&&n.AvailableRegionsListItems.splice(u,1);blockUI({target:"#divBlockUIForm",animate:!0});n.doAll()}else n.step1=!0,n.step2=!1,n.DisableDLevel=y.isEmpty(n.SelectedSpecListItems)&&y.isEmptyValue(n.subEEPEBP3months.Id)?!1:!0};n.showDetails=function(){return n.SelectedSpecs.length>0?!0:!1};n.removeDuplicatesRegionsForDualList=function(){angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.enableSave=function(){n.enableButtonSave=n.subEEPEBP3months.NotInRiskForCovid19==!0?!0:!1};n.checkForKesy=function(){var t;n.hasKESY=["ΠΕ21","ΠΕ23","ΠΕ30","ΠΕ28","ΠΕ29","ΠΕ31ΚΙΝ","ΠΕ31ΝΟ","ΠΕ31ΕΠ"].indexOf(n.SelectedSpecListItems.Code)!=-1?!0:!1;t=document.getElementsByTagName("SELECT")[3];t.id==="selectedRegionslistfinal"&&n.hasKESY?t.size="48":t.id!=="selectedRegionslistfinal"||n.hasKESY||(t.size="31")};n.doAll=function(){var r,u;n.subEEPEBP3months.Id!=null&&n.subEEPEBP3months.Id!=""&&n.subEEPEBP3months.Id!="undefined"?(n.canUpdateAppl&&n.subEEPEBP3months.PersonId!=null&&n.subEEPEBP3months.PersonId!=""&&n.subEEPEBP3months.PersonId!="undefined"&&(y.getByParams({id:n.subEEPEBP3months.PersonId},"/api/Person/GetPersonDtoSmea").then(function(i){n.person=i;n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1;n.visibleColumns.FirstSpeciality=y.isEmptyValue(t("filter")(n.person.ListSmea,{Id:7},!0)[0])?!1:!0;n.visibleColumns.EquivalenceType=y.isEmptyValue(t("filter")(n.person.ListSmea,function(n){return n.EquivalenceType!=""}))?!1:!0;n.showCivilServantBlock();n.checkCivilServant();n.enableSave()},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),y.isEmpty(n.AvailableSpecListItems)&&(n.IsDisabled=!n.canUpdateAppl,n.IsDisabled&&(n.noUpdAccess=!0),n.subEEPEBP3months.IsActive||(n.IsDisabled=!0,n.notActive=!0),n.IsDisabled||(n.IsDisabled=!n.pageRules.subEEPEBP3months.CanUpdate),n.IsDisabled&&(n.noUpdAccess=!0),y.isEmpty(n.subEEPEBP3months.ApplicationSubstituteEEPEBPProtocols)||(n.protocol=n.subEEPEBP3months.ApplicationSubstituteEEPEBPProtocols[0].ProtocolString,n.showProtocol=!0),n.subEEPEBP3months.LevelId=3,r=i.all([y.getByParams({personId:n.subEEPEBP3months.PersonId},"/api/ApplSubstituteEEPEBP3months/getSpecialityForSubstituteEEPEBP3months"),]),r.then(function(r){angular.copy(r[0],n.AvailableSpecListItems);n.SelectedSpecListItems=t("filter")(n.AvailableSpecListItems,{Id:n.subEEPEBP3months.SpecialityId},!0)[0];n.checkForKesy();var u=i.all([y.getByParams({id:n.subEEPEBP3months.Id},"/api/ApplSubstituteEEPEBP3months/GetApplRegionsByApplId"),y.getByParams({applicationTypeId:n.applicationType},"/api/ApplicationTypeRegionAndUnit/getTypeRegionAndUnitByApplicationType")]);u.then(function(t){if(n.SelectedRegionsListItems=t[0],n.SelectedAvailRegionsItems=t[0],angular.copy(t[1],n.AvailableRegionsListItems),n.SelectedSpecListItems.Code!="ΠΕ23"&&n.SelectedSpecListItems.Code!="ΠΕ30")for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].RegionAndUnitId==151&&n.AvailableRegionsListItems.splice(i,1);n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")},function(){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση tων περιοχών της αίτησης.")})},function(){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")}))),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm")):(n.canInsertAppl&&n.subEEPEBP3months.PersonId!=null&&n.subEEPEBP3months.PersonId!=""&&n.subEEPEBP3months.PersonId!="undefined"&&(y.getByParams({id:n.subEEPEBP3months.PersonId},"/api/Person/GetPersonDtoSmea").then(function(i){n.person=i;n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1;n.visibleColumns.FirstSpeciality=y.isEmptyValue(t("filter")(n.person.ListSmea,{Id:7},!0)[0])?!1:!0;n.visibleColumns.EquivalenceType=y.isEmptyValue(t("filter")(n.person.ListSmea,function(n){return n.EquivalenceType!=""}))?!1:!0;n.showCivilServantBlock();n.checkCivilServant();n.enableSave()},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),y.isEmpty(n.SelectedSpecListItems)&&(u=i.all([y.getByParams({personId:n.subEEPEBP3months.PersonId},"/api/ApplSubstituteEEPEBP3months/getSpecialityForSubstituteEEPEBP3months"),y.getByParams({Id:n.subEEPEBP3months.PersonId},"/api/ApplSubstituteEEPEBP3months/GetApplSubstituteEEPEBPB3months")]),u.then(function(t){var r,i;for(angular.copy(t[0],n.AvailableSpecListItems),n.applSubs=t[1],n.getApplRegions(),i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].hasApplSubs=0;for(r=n.applSubs.length-1;r>=0;r--)for(i=n.AvailableSpecListItems.length-1;i>=0;i--)n.applSubs[r].SpecialityId==n.AvailableSpecListItems[i].Id&&(n.AvailableSpecListItems[i].hasApplSubs=1);n.subEEPEBP3months.RegionAndUnitId=t[2];unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")}))),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm"))};n.getApplication=function(){if(n.subEEPEBP3months.Id!=null&&n.subEEPEBP3months.Id!=""&&n.subEEPEBP3months.Id!="undefined"&&(n.DisableDLevel=!0,n.canUpdateAppl&&n.subEEPEBP3months.PersonId!=null&&n.subEEPEBP3months.PersonId!=""&&n.subEEPEBP3months.PersonId!="undefined")){var t=i.all([y.getByParams({id:n.subEEPEBP3months.Id},"/api/ApplSubstituteEEPEBP3months/GetApplSubstituteEEPEBP3monthsById")]);t.then(function(t){n.subEEPEBP3months=t[0];n.doAll()})}};n.btnRegionsUp=function(){for(var t,r,u,f=n.SelectedSelectedRegionsListItems,i=0;i<n.SelectedSelectedRegionsListItems.length;i++){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<=0||t>=n.SelectedRegionsListItems.length)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t-1];n.SelectedRegionsListItems[t-1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsDown=function(){for(var t,r,u,i=n.SelectedSelectedRegionsListItems.length-1;i>=0;i--){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<0||t>=n.SelectedRegionsListItems.length-1)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t+1];n.SelectedRegionsListItems[t+1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsRight=function(){angular.forEach(n.SelectedAvailRegionsItems,function(n){this.push(n)},n.SelectedRegionsListItems);angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.btnRegionsLeft=function(){angular.forEach(n.SelectedSelectedRegionsListItems,function(n){this.push(n)},n.AvailableRegionsListItems);angular.forEach(n.SelectedSelectedRegionsListItems,function(t){for(var i=n.SelectedRegionsListItems.length-1;i>=0;i--)n.SelectedRegionsListItems[i].Id==t.Id&&n.SelectedRegionsListItems.splice(i,1)});n.SelectedSelectedRegionsListItems=[];n.SelectedAvailRegionsItems=[]};n.editPerson=function(){f.setPersonId(n.subEEPEBP3months.PersonId);e.go("stateEditPerson")};n.saveAction=function(t){n.showAlertSpec=y.isEmptyValue(n.SelectedSpecListItems)?!0:!1;n.showAlertRegion=y.isEmpty(n.SelectedRegionsListItems)?!0:!1;n.canSave=!0;n.showAlertSpec||n.showAlertRegion||!n.canSave||n.InsOrUpd(t)};n.InsOrUpd=function(t){var r={SubstituteEEPEBP3months:n.subEEPEBP3months,RegionAndUnit:n.SelectedRegionsListItems,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Status:t},i=r;n.subEEPEBP3months.Id!=null&&n.subEEPEBP3months.Id!=""&&n.subEEPEBP3months.Id!="undefined"?(n.subEEPEBP3months.ModifiedBy=n.authentication.userName,y.postByParams(i,"/api/ApplSubstituteEEPEBP3months/updateApplSubstituteEEPEBP3months").then(function(){e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)})):(n.subEEPEBP3months.DidacticYearId=n.applicationDidacticYear.Id,n.subEEPEBP3months.CreatedBy=n.authentication.userName,y.postByParams(i,"/api/ApplSubstituteEEPEBP3months/insertApplSubstituteEEPEBP3months").then(function(){f.setPersonId(n.subEEPEBP3months.PersonId);e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)}))}};SubstituteEEPEBP3monthsController.$inject=["$scope","$filter","$q","$uibModal","$log","PassParameters","$state","toaster","PersonFactory","SubstituteEEPEBPFactory","PersonSpecialityFactory","ApplicationTypeRegionAndUnitFactory","ApplicationTypeFekFactory","RegionAndFactory","GeneralFactory"];SubstituteEEPEBPController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y){if(n.mess="",n.messInfo="",n.subEEPEBP={IsTemporaryStored:!0},n.subEEPEBP.LevelId=3,n.person={},n.applicationType=23,n.perspec={},n.SelectedSpecs=[],n.hasValidFekNoConfirmSpeciality=!1,n.showToConfirmSpeciality=!1,n.hasKESY=!1,n.continueDisabled="disabled",n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=!1,n.userLevel=0,n.IsCivilServant=!1,n.showCivilServantFull=!1,n.SelectedAvailRegionsItems=[],n.SelectedSelectedRegionsListItems=[],n.SelectedRegionsListItems=[],n.SelectedSpecListItems=[],n.AvailableSpecListItems=[],n.SelectedAvailSpecItems=[],n.AvailableRegionsListItems=[],n.applSubs=[],n.DisableDLevel=!1,n.hasMusicSpeciality=!1,n.hasboth=!1,n.applicationLevelId=0,n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=!1,n.showAlertSpec=!1,n.showAlertRegion=!1,n.visibleColumns={FirstSpeciality:!1,EquivalenceType:!1},n.canSave=!0,y.isValueInArray(y.getRoleCode(n.authentication.role),"d1, d2")&&(n.userLevel=n.authentication.levelId,n.subEEPEBP.LevelId=n.authentication.levelId,n.subEEPEBP.IntendancyId=n.authentication.regionAndUnitId),n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},blockUI({target:"#divBlockUI",animate:!0}),n.authentication.isAuth){var p="subEEPEBP";y.getByParams({role:n.authentication.role,codes:p},"/api/Subsystem/NewCheckPermission").then(function(r){var u=p.split(","),e,s;for(e in u)n.pageRules[u[e]]=t("filter")(r,{Code:u[e]},!0)[0].Rules;n.subEEPEBP.Id=f.getApplicationId();y.isEmptyValue(n.subEEPEBP.Id)?(n.step1=!0,n.step2=!1):(n.step1=!1,n.step2=!0);n.applicationLevelId=f.getApplicationLevelId();y.isEmptyValue(n.applicationLevelId)&&(n.applicationLevelId=0);f.resetApplication();n.subEEPEBP.PersonId=f.getPersonId();y.isValueInArray(n.pageRules.subEEPEBP.CanAccess,"u1, u2")&&(n.subEEPEBP.PersonId=n.authentication.personId);s=i.all([y.getByParams({personId:n.subEEPEBP.PersonId},"/api/ApplSubstituteEEPEBP/GetSpecialityForSubstituteEEPEBP"),y.getByParams({Id:n.subEEPEBP.PersonId},"/api/ApplSubstituteEEPEBP/GetApplSubstituteEEPEBPB")]);s.then(function(i){var u,r;for(angular.copy(i[0],n.AvailableSpecListItems),n.applSub=i[1],r=n.AvailableSpecListItems.length-1;r>=0;r--)n.AvailableSpecListItems[r].hasApplPerm=0;for(u=n.applSub.length-1;u>=0;u--)for(r=n.AvailableSpecListItems.length-1;r>=0;r--)n.applSub[u].SpecialityId==n.AvailableSpecListItems[r].Id&&(n.AvailableSpecListItems[r].hasApplSubs=1);y.isEmpty(n.AvailableSpecListItems)?(n.mess+="<li>Δεν μπορείτε να υποβάλετε αίτηση. Δεν βρίσκεστε στους αξιολογικούς πίνακες κατάταξης του ΑΣΕΠ για κάποιον κλάδο ή δεν έχετε δικαίωμα υποβολής αίτησης.<\/li>",n.showAddEditForm=2):n.subEEPEBP.Id!=null&&n.subEEPEBP.Id!=""&&n.subEEPEBP.Id!="undefined"?(y.isEmptyValue(n.subEEPEBP.SpecialityId)&&(n.subEEPEBP.SpecialityId=f.getSpecialityId()),y.getByParams({applicationTypeId:n.applicationType,specialityId:n.subEEPEBP.SpecialityId},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(i){n.SelectedSpecListItems=t("filter")(n.AvailableSpecListItems,{Id:n.subEEPEBP.SpecialityId},!0)[0];!y.isEmptyValue(i)||y.isValueInArray(y.getRoleCode(n.authentication.role),"a")?(n.canUpdateAppl=!0,n.showAddEditForm=1,n.getApplication()):(n.mess+="<li>Δεν μπορείτε να τροποποιήσετε την αίτηση γιατί δεν υπάρχει ανοιχτό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2)},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(n.canInsertAppl=!0,n.showAddEditForm=1)})},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml");unblockUI("#divBlockUI")})}else e.go("/");n.checkCivilServant=function(){n.IsCivilServant==1?n.showCivilServantFull=!1:(n.subEEPEBP.PublicServantFull=0,n.showCivilServantFull=!0)};n.checkForBoth=function(){for(var t=0;t<n.SelectedSpecListItems.length;t+=1)if(n.SelectedSpecListItems[t].IsBoth==!0){n.hasboth=!0;break}else n.hasboth=!1};n.showCivilServantBlock=function(){return n.IsCivilServant==!0?!0:!1};n.checkForMusic=function(){for(var t=0;t<n.SelectedSpecListItems.length;t+=1)if(n.SelectedSpecListItems[t].IsMusic==!0){n.hasMusicSpeciality=!0;break}else n.hasMusicSpeciality=!1;n.hasMusicSpeciality==!1&&(n.subEEPEBP.ConservatoryOwner=0)};n.getApplRegions=function(){n.AvailableRegionsListItems=[];blockUI({target:"#divBlockUIRegion",animate:!0});y.getByParams({applicationTypeId:n.applicationType},"/api/ApplicationTypeRegionAndUnit/getTypeRegionAndUnitByApplicationType").then(function(t){var i;if(angular.copy(t,n.AvailableRegionsListItems),n.SelectedSpecListItems.Code!="ΠΕ23"&&n.SelectedSpecListItems.Code!="ΠΕ30")for(i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].RegionAndUnitId==151&&n.AvailableRegionsListItems.splice(i,1);if(n.SelectedSpecListItems.Code!="ΔΕ01"&&n.SelectedSpecListItems.Code!="ΠΕ25")for(i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].RegionAndUnitTypeId==2&&n.AvailableRegionsListItems.splice(i,1);if((n.SelectedSpecListItems.Code=="ΔΕ01"||n.SelectedSpecListItems.Code=="ΠΕ25")&&n.person.Sex=="Θ")for(i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].RegionAndUnitId==138&&n.AvailableRegionsListItems.splice(i,1);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.goToStep=function(i,r){i==2?y.getByParams({applicationTypeId:n.applicationType,specialityId:r},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(i){var u;if(n.subEEPEBP.SpecialityId=r,n.SelectedSpecListItems=t("filter")(n.AvailableSpecListItems,{Id:r},!0)[0],n.fek=i,y.isEmptyValue(i))n.mess="<li>Δεν υπαρχει ενεργό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2;else{if(n.step1=!1,n.step2=!0,n.checkForKesy(),n.SelectedSpecListItems.Code!="ΠΕ23"&&n.SelectedSpecListItems.Code!="ΠΕ30")for(u=n.AvailableRegionsListItems.length-1;u>=0;u--)n.AvailableRegionsListItems[u].RegionAndUnitId==151&&n.AvailableRegionsListItems.splice(u,1);if(n.SelectedSpecListItems.Code!="ΔΕ01"&&n.SelectedSpecListItems.Code!="ΠΕ25")for(u=n.AvailableRegionsListItems.length-1;u>=0;u--)n.AvailableRegionsListItems[u].RegionAndUnitTypeId==2&&n.AvailableRegionsListItems.splice(u,1);if((n.SelectedSpecListItems.Code=="ΔΕ01"||n.SelectedSpecListItems.Code=="ΠΕ25")&&n.person.Sex=="Θ")for(u=n.AvailableRegionsListItems.length-1;u>=0;u--)n.AvailableRegionsListItems[u].RegionAndUnitId==138&&n.AvailableRegionsListItems.splice(u,1);blockUI({target:"#divBlockUIForm",animate:!0});n.doAll()}},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.step1=!0,n.step2=!1,n.DisableDLevel=y.isEmpty(n.SelectedSpecListItems)&&y.isEmptyValue(n.subEEPEBP.Id)?!1:!0)};n.showDetails=function(){return n.SelectedSpecs.length>0?!0:!1};n.removeDuplicatesRegionsForDualList=function(){angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.checkForKesy=function(){var t;n.hasKESY=["ΠΕ21","ΠΕ23","ΠΕ30","ΠΕ28","ΠΕ29","ΠΕ31ΚΙΝ","ΠΕ31ΝΟ","ΠΕ31ΕΠ"].indexOf(n.SelectedSpecListItems.Code)!=-1?!0:!1;n.hasSdey=["ΠΕ23","ΠΕ30"].indexOf(n.SelectedSpecListItems.Code)!=-1?!0:!1;t=document.getElementsByTagName("SELECT")[6];t.id==="selectedRegionslistfinal"&&n.hasKESY&&!n.hasSdey?t.size="85":t.id==="selectedRegionslistfinal"&&n.hasKESY&&n.hasSdey?t.size="102":t.id!=="selectedRegionslistfinal"||n.hasKESY||(t.size="62")};n.doAll=function(){var r,u;n.subEEPEBP.Id!=null&&n.subEEPEBP.Id!=""&&n.subEEPEBP.Id!="undefined"?(n.canUpdateAppl&&n.subEEPEBP.PersonId!=null&&n.subEEPEBP.PersonId!=""&&n.subEEPEBP.PersonId!="undefined"&&(y.getByParams({id:n.subEEPEBP.PersonId,specialityId:n.subEEPEBP.SpecialityId},"/api/Person/GetPersonDtoEEPEBP").then(function(i){n.person=i;n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1;n.visibleColumns.FirstSpeciality=y.isEmptyValue(t("filter")(n.person.ListSmea,{Id:7},!0)[0])?!1:!0;n.visibleColumns.EquivalenceType=y.isEmptyValue(t("filter")(n.person.ListSmea,function(n){return n.EquivalenceType!=""}))?!1:!0;n.showCivilServantBlock();n.checkCivilServant()},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),n.IsDisabled=!n.canUpdateAppl,n.IsDisabled&&(n.noUpdAccess=!0),n.subEEPEBP.IsActive||(n.IsDisabled=!0,n.notActive=!0),n.IsDisabled||(n.IsDisabled=!n.pageRules.subEEPEBP.CanUpdate),n.IsDisabled||n.AvailableSpecListItems[0].IsValidForSubstitute==!1&&(n.IsDisabled=!0),n.IsDisabled&&(n.noUpdAccess=!0),y.isEmpty(n.subEEPEBP.ApplicationSubstituteEEPEBPProtocols)||(n.protocol=n.subEEPEBP.ApplicationSubstituteEEPEBPProtocols[0].ProtocolString,n.showProtocol=!0),n.subEEPEBP.LevelId=3,r=i.all([y.getByParams({personId:n.subEEPEBP.PersonId},"/api/ApplSubstituteEEPEBP/getSpecialityForSubstituteEEPEBP"),]),r.then(function(r){angular.copy(r[0],n.AvailableSpecListItems);n.SelectedSpecListItems=t("filter")(n.AvailableSpecListItems,{Id:n.subEEPEBP.SpecialityId},!0)[0];n.checkForKesy();var u=i.all([h.getApplRegionsByApplId(n.subEEPEBP.Id),y.getByParams({applicationTypeId:n.applicationType},"/api/ApplicationTypeRegionAndUnit/getTypeRegionAndUnitByApplicationType")]);u.then(function(t){var i;if(n.SelectedRegionsListItems=t[0],n.SelectedAvailRegionsItems=t[0],angular.copy(t[1],n.AvailableRegionsListItems),n.SelectedSpecListItems.Code!="ΠΕ23"&&n.SelectedSpecListItems.Code!="ΠΕ30")for(i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].RegionAndUnitId==151&&n.AvailableRegionsListItems.splice(i,1);if(n.SelectedSpecListItems.Code!="ΔΕ01"&&n.SelectedSpecListItems.Code!="ΠΕ25")for(i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].RegionAndUnitTypeId==2&&n.AvailableRegionsListItems.splice(i,1);if((n.SelectedSpecListItems.Code=="ΔΕ01"||n.SelectedSpecListItems.Code=="ΠΕ25")&&n.person.Sex=="Θ")for(i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].RegionAndUnitId==138&&n.AvailableRegionsListItems.splice(i,1);n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")},function(){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση tων περιοχών της αίτησης.")})},function(){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm")):(n.canInsertAppl&&n.subEEPEBP.PersonId!=null&&n.subEEPEBP.PersonId!=""&&n.subEEPEBP.PersonId!="undefined"&&(y.getByParams({id:n.subEEPEBP.PersonId,specialityId:n.subEEPEBP.SpecialityId},"/api/Person/GetPersonDtoEEPEBP").then(function(i){n.person=i;n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1;n.visibleColumns.FirstSpeciality=y.isEmptyValue(t("filter")(n.person.ListSmea,{Id:7},!0)[0])?!1:!0;n.visibleColumns.EquivalenceType=y.isEmptyValue(t("filter")(n.person.ListSmea,function(n){return n.EquivalenceType!=""}))?!1:!0;n.showCivilServantBlock();n.checkCivilServant()},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),y.isEmpty(n.SelectedSpecListItems)&&(u=i.all([y.getByParams({personId:n.subEEPEBP.PersonId},"/api/ApplSubstituteEEPEBP/getSpecialityForSubstituteEEPEBP"),y.getByParams({Id:n.subEEPEBP.PersonId},"/api/ApplSubstituteEEPEBP/GetApplSubstituteEEPEBPB")]),u.then(function(t){var r,i;for(angular.copy(t[0],n.AvailableSpecListItems),n.applSubs=t[1],n.getApplRegions(),i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].hasApplSubs=0;for(r=n.applSubs.length-1;r>=0;r--)for(i=n.AvailableSpecListItems.length-1;i>=0;i--)n.applSubs[r].SpecialityId==n.AvailableSpecListItems[i].Id&&(n.AvailableSpecListItems[i].hasApplSubs=1);n.subEEPEBP.RegionAndUnitId=t[2];unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")}))),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm"))};n.getApplication=function(){if(n.subEEPEBP.Id!=null&&n.subEEPEBP.Id!=""&&n.subEEPEBP.Id!="undefined"&&(n.DisableDLevel=!0,n.canUpdateAppl&&n.subEEPEBP.PersonId!=null&&n.subEEPEBP.PersonId!=""&&n.subEEPEBP.PersonId!="undefined")){var t=i.all([h.getApplSubstituteEEPEBPById(n.subEEPEBP.Id)]);t.then(function(t){n.subEEPEBP=t[0];n.doAll()})}};n.btnRegionsUp=function(){for(var t,r,u,f=n.SelectedSelectedRegionsListItems,i=0;i<n.SelectedSelectedRegionsListItems.length;i++){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<=0||t>=n.SelectedRegionsListItems.length)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t-1];n.SelectedRegionsListItems[t-1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsDown=function(){for(var t,r,u,i=n.SelectedSelectedRegionsListItems.length-1;i>=0;i--){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<0||t>=n.SelectedRegionsListItems.length-1)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t+1];n.SelectedRegionsListItems[t+1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsRight=function(){angular.forEach(n.SelectedAvailRegionsItems,function(n){this.push(n)},n.SelectedRegionsListItems);angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.btnRegionsLeft=function(){angular.forEach(n.SelectedSelectedRegionsListItems,function(n){this.push(n)},n.AvailableRegionsListItems);angular.forEach(n.SelectedSelectedRegionsListItems,function(t){for(var i=n.SelectedRegionsListItems.length-1;i>=0;i--)n.SelectedRegionsListItems[i].Id==t.Id&&n.SelectedRegionsListItems.splice(i,1)});n.SelectedSelectedRegionsListItems=[];n.SelectedAvailRegionsItems=[]};n.editPerson=function(){f.setPersonId(n.subEEPEBP.PersonId);e.go("stateEditPerson")};n.saveAction=function(t){n.showAlertSpec=y.isEmptyValue(n.SelectedSpecListItems)?!0:!1;n.showAlertRegion=y.isEmpty(n.SelectedRegionsListItems)?!0:!1;n.canSave=!0;n.showAlertSpec||n.showAlertRegion||!n.canSave||n.InsOrUpd(t)};n.InsOrUpd=function(t){var r={SubstituteEEPEBP:n.subEEPEBP,RegionAndUnit:n.SelectedRegionsListItems,ApplTemplate:"",UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Status:t},i=r;n.subEEPEBP.Id!=null&&n.subEEPEBP.Id!=""&&n.subEEPEBP.Id!="undefined"?(n.subEEPEBP.ModifiedBy=n.authentication.userName,h.updateApplSubstituteEEPEBP(i).then(function(){f.setPersonId(n.subEEPEBP.PersonId);e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)})):(n.subEEPEBP.DidacticYearId=n.applicationDidacticYear.Id,n.subEEPEBP.CreatedBy=n.authentication.userName,h.insertApplSubstituteEEPEBP(i).then(function(){f.setPersonId(n.subEEPEBP.PersonId);e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)}))}};SubstituteEEPEBPController.$inject=["$scope","$filter","$q","$uibModal","$log","PassParameters","$state","toaster","PersonFactory","SubstituteEEPEBPFactory","PersonSpecialityFactory","ApplicationTypeRegionAndUnitFactory","ApplicationTypeFekFactory","RegionAndFactory","GeneralFactory"];SubstituteEEPEBPForSchoolController=function(n,t,i,r,u,f,e,o){if(n.mess="",n.messInfo="",n.subEEPEBPSchool={IsTemporaryStored:!0},n.subEEPEBPSchoolOld=[],n.person={},n.applicationType=30,n.step1=!0,n.step2=!1,n.continueDisabled=!0,n.perspec={},n.SelectedSpecs=[],n.hasValidFekNoConfirmSpeciality=!1,n.alerts="",n.showToConfirmSpeciality=!1,n.selected={Years:[]},n.HasSpecPe70=!1,n.HasSpecPe11Pe06=!1,n.SelectedAvailRegionsItems=[],n.SelectedSelectedRegionsListItems=[],n.SelectedRegionsListItems=[],n.AvailableSpecListItems=[],n.AvailableRegionsListItems=[],n.showAlertSpec=!1,n.showAlertRegion=!1,n.DisableDLevel=!1,n.protocol="",n.showProtocol=!1,n.cannotUpdate=!1,n.notActive=!1,n.noUpdAccess=!1,n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.userLevel=0,n.fek={},n.HasFullLevel1=[],n.HasFullLevel2=[],n.HasNoFullLevel1=[],n.HasNoFullLevel2=[],n.HasKESY=[],n.HasSDEY=[],n.applicationLevelId=0,blockUI({target:"#divBlockUI",animate:!0}),n.goToStep=function(t,i){t==2?u.getByParams({applicationTypeId:n.applicationType,specialityId:i},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(t){n.SelectedSpecListItems=f("filter")(n.AvailableSpecListItems,{Id:i},!0)[0];n.fek=t;u.isEmptyValue(t)?(n.mess="<li>Δεν υπαρχει ενεργό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2):(n.step1=!1,n.step2=!0,n.subEEPEBPSchool.SpecialityId=i,blockUI({target:"#divBlockUIForm",animate:!0}),n.doAll())},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.step1=!0,n.step2=!1,n.DisableDLevel=u.isEmpty(n.SelectedSpecListItems)&&u.isEmptyValue(n.subEEPEBPSchool.Id)?!1:!0,n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[])},n.canSave=!0,n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.authentication.isAuth){var s="subEEPEBPSchool";u.getByParams({role:n.authentication.role,codes:s},"/api/Subsystem/NewCheckPermission").then(function(i){var o=s.split(","),h,c;for(h in o)n.pageRules[o[h]]=f("filter")(i,{Code:o[h]},!0)[0].Rules;n.subEEPEBPSchool.Id=t.getApplicationId();n.applicationLevelId=t.getApplicationLevelId();u.isEmptyValue(n.applicationLevelId)&&(n.applicationLevelId=0);u.isEmptyValue(n.subEEPEBPSchool.Id)?(n.step1=!0,n.step2=!1):(n.step1=!1,n.step2=!0);t.resetApplication();n.subEEPEBPSchool.PersonId=t.getPersonId();u.isValueInArray(n.pageRules.subEEPEBPSchool.CanAccess,"u1, u2")&&(n.subEEPEBPSchool.PersonId=n.authentication.personId);c=e.all([u.getByParams({personId:n.subEEPEBPSchool.PersonId},"/api/ApplSubstituteEEPEBPSchool/GetSpecialityForSubstituteEEPEBPSchool"),u.getByParams({Id:n.subEEPEBPSchool.PersonId},"/api/ApplSubstituteEEPEBPSchool/GetApplSubstituteEEPEBPSchool"),u.getByParams({personId:n.subEEPEBPSchool.PersonId},"/api/RecruitmentServiceAssumed/getSubstitutesServiceAssumed")]);c.then(function(i){var s,o,e;for(angular.copy(i[0],n.AvailableSpecListItems),n.applSub=i[1],s=i[2].substitutes,n.subs=f("filter")(s,function(n){return n.SubstitutesTypeId!=9&&n.SubstitutesTypeId!=10&&n.SubstitutesTypeId!=11&&n.SubstitutesTypeId!=12}),e=n.AvailableSpecListItems.length-1;e>=0;e--)n.AvailableSpecListItems[e].hasApplPerm=0;for(o=n.applSub.length-1;o>=0;o--)for(e=n.AvailableSpecListItems.length-1;e>=0;e--)n.applSub[o].SpecialityId==n.AvailableSpecListItems[e].Id&&(n.AvailableSpecListItems[e].hasApplSub=1);n.subEEPEBPSchool.Id!=null&&n.subEEPEBPSchool.Id!=""&&n.subEEPEBPSchool.Id!="undefined"?(u.isEmptyValue(n.subEEPEBPSchool.SpecialityId)&&(n.subEEPEBPSchool.SpecialityId=t.getSpecialityId()),u.getByParams({applicationTypeId:n.applicationType,specialityId:n.subEEPEBPSchool.SpecialityId},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(t){n.fek=t;n.SelectedSpecListItems=f("filter")(n.AvailableSpecListItems,{Id:n.subEEPEBPSchool.SpecialityId},!0)[0];u.isEmptyValue(n.fek)||u.isEmptyValue(n.SelectedSpecListItems)?(n.mess+="<li>Δεν μπορείτε να τροποποιήσετε την αίτηση γιατί δεν υπάρχει ανοιχτό ΦΕΚ <\/li>",n.showAddEditForm=2):(n.canUpdateAppl=!0,n.showAddEditForm=1,n.getApplication())},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):u.isEmpty(n.AvailableSpecListItems)?(n.mess+=u.isEmpty(n.subs)?"<li>Δεν μπορείτε να υποβάλετε αίτηση. Δεν βρίσκεστε στον ενιαίο πίνακα για κάποιον κλάδο<\/li>":"<li>Δεν μπορείτε να υποβάλετε αίτηση. Έχετε ήδη προσληφθεί το τρέχον σχολικό έτος<\/li>",n.showAddEditForm=2):(n.canInsertAppl=!0,n.showAddEditForm=1)})},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml");unblockUI("#divBlockUI")})}else i.go("/");u.isValueInArray(u.getRoleCode(n.authentication.role),"d1, d2")&&(n.userLevel=n.authentication.levelId,n.subEEPEBPSchool.LevelId=n.authentication.levelId,n.subEEPEBPSchool.IntendancyId=n.authentication.regionAndUnitId);n.checkCivilServant=function(){n.IsCivilServant==1?n.showCivilServantFull=!1:(n.subEEPEBPSchool.PublicServantFull=0,n.showCivilServantFull=!0)};n.showCivilServantBlock=function(){return n.IsCivilServant==!0?!0:!1};n.showDetails=function(){return n.SelectedSpecs.length>0?!0:!1};n.changeLevel=function(){u.isEmptyValue(n.subEEPEBPSchool.LevelId)?(n.subEEPEBPSchool.LevelId=null,n.intendancies=[],n.subEEPEBPSchool.IntendancyId=null,n.continueDisabled=!0):(RegionAndFactory.getIntendancies(n.subEEPEBPSchool.LevelId).then(function(t){n.intendancies=t}).catch(function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα στην εύρεση διευθύνσεων")}),u.isEmptyValue(n.subEEPEBPSchool.Id)&&(n.subEEPEBPSchool.IntendancyId=null),n.continueDisabled=!1)};n.changeSelectHeight=function(){var i,r,t;u.isEmpty(n.AvailableRegionsListItems)?(t=15,i.id==="selectedRegionslistfinal"&&(i.size=t,r[0].height=t*15,r[1].height=t*15)):(n.HasFullLevel1=f("filter")(n.AvailableRegionsListItems,{IsFull:!0,Level:1},!0)[0],n.HasFullLevel2=f("filter")(n.AvailableRegionsListItems,{IsFull:!0,Level:2},!0)[0],n.HasNoFullLevel1=f("filter")(n.AvailableRegionsListItems,{IsFull:!1,Level:1},!0)[0],n.HasNoFullLevel2=f("filter")(n.AvailableRegionsListItems,{IsFull:!1,Level:2},!0)[0],n.HasKESY=f("filter")(n.AvailableRegionsListItems,{IsKESY:!0},!0)[0],n.HasSDEY=f("filter")(n.AvailableRegionsListItems,{IsSDEY:!0},!0)[0],t=0,u.isEmptyValue(n.HasFullLevel1)||(t=t+15),u.isEmptyValue(n.HasFullLevel2)||(t=t+15),u.isEmptyValue(n.HasNoFullLevel1)||(t=t+15),u.isEmptyValue(n.HasNoFullLevel2)||(t=t+15),u.isEmptyValue(n.HasKESY)||(t=t+15),u.isEmptyValue(n.HasSDEY)||(t=t+15),i=document.getElementsByTagName("SELECT")[6],r=document.getElementsByTagName("TABLE"),i.id==="selectedRegionslistfinal"&&(i.size=t,r[0].height=t*15,r[1].height=t*15))};n.doAll=function(){if(u.isEmpty(n.applSub)||(n.subEEPEBPSchoolOld=f("filter")(n.applSub,{SpecialityId:n.subEEPEBPSchool.SpecialityId},!0)[0],u.isEmptyValue(n.subEEPEBPSchoolOld)||(n.subEEPEBPSchool=n.subEEPEBPSchoolOld),n.canUpdateAppl=!0,n.showAddEditForm=1),n.subEEPEBPSchool.Id!=null&&n.subEEPEBPSchool.Id!=""&&n.subEEPEBPSchool.Id!="undefined")n.canUpdateAppl&&n.subEEPEBPSchool.PersonId!=null&&n.subEEPEBPSchool.PersonId!=""&&n.subEEPEBPSchool.PersonId!="undefined"&&o.getPersonForApplication(n.subEEPEBPSchool.PersonId).then(function(t){if(n.person=t,n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1,n.showCivilServantBlock(),n.checkCivilServant(),u.isEmpty(n.SelectedSpecListItems)){n.IsDisabled=!n.canUpdateAppl;n.subEEPEBPSchool.IsActive||(n.IsDisabled=!0,n.notActive=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.subEEPEBPSchool.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0);u.isEmpty(n.subEEPEBPSchool.ApplicationSubstituteEEPEBPSchoolProtocols)||(n.protocol=n.subEEPEBPSchool.ApplicationSubstituteEEPEBPSchoolProtocols[0].ProtocolString,n.showProtocol=!0);var i=e.all([u.getByParams({applicationId:n.subEEPEBPSchool.Id,ApplicationTypeFekId:n.fek.Id},"/api/ApplSubstituteEEPEBPSchool/GetApplRegionsByApplId"),u.getByParams({specialityId:n.SelectedSpecListItems.Id,personId:n.subEEPEBPSchool.PersonId},"/api/ApplSubstituteEEPEBPSchool/GetAvailRegionsBySpecialityId"),]);i.then(function(t){n.SelectedRegionsListItems=t[0];n.SelectedAvailRegionsItems=t[0];angular.copy(t[1],n.AvailableRegionsListItems);u.isEmptyValue(n.AvailableRegionsListItems)&&(n.mess+="<li>Δεν υπάρχουν διαθέσιμα κενά για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.changeSelectHeight();n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των περιοχών της αίτησης.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})}},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description);unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")}),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm");else{if(n.canInsertAppl&&n.subEEPEBPSchool.PersonId!=null&&n.subEEPEBPSchool.PersonId!=""&&n.subEEPEBPSchool.PersonId!="undefined"){var t=e.all([o.getPersonForApplication(n.subEEPEBPSchool.PersonId)]);t.then(function(t){n.person=t[0];n.SelectedAvailSpecItems=[];n.SelectedSelectedSpecListItems=[];n.AvailableRegionsListItems=[];u.isEmptyValue(n.SelectedSpecListItems)||u.getByParams({specialityId:n.SelectedSpecListItems.Id,personId:n.subEEPEBPSchool.PersonId},"/api/ApplSubstituteEEPEBPSchool/GetAvailRegionsBySpecialityId").then(function(t){angular.copy(t,n.AvailableRegionsListItems);u.isEmptyValue(n.AvailableRegionsListItems)&&(n.mess+="<li>Δεν υπάρχουν διαθέσιμα κενά για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.changeSelectHeight();n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description);unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})}unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")}};n.openModal=function(t,i){n.myList=[];n.selectedCode=i;angular.copy(t,n.myList)};n.getApplication=function(){if(n.subEEPEBPSchool.Id!=null&&n.subEEPEBPSchool.Id!=""&&n.subEEPEBPSchool.Id!="undefined"&&(n.DisableDLevel=!0,n.canUpdateAppl&&n.subEEPEBPSchool.PersonId!=null&&n.subEEPEBPSchool.PersonId!=""&&n.subEEPEBPSchool.PersonId!="undefined")){var t=e.all([u.getByParams({Id:n.subEEPEBPSchool.Id},"/api/ApplSubstituteEEPEBPSchool/GetApplSubstituteEEPEBPSchoolById")]);t.then(function(t){n.subEEPEBPSchool=t[0];n.doAll()})}};n.SelectedSpecAvailItems=[];n.SelectedSelectedSpecListItems=[];n.SelectedSpecListItems=[];n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[];n.SelectedRegionsListItems=[];n.btnRegionsUp=function(){for(var t,r,u,f=n.SelectedSelectedRegionsListItems,i=0;i<n.SelectedSelectedRegionsListItems.length;i++){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<=0||t>=n.SelectedRegionsListItems.length)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t-1];n.SelectedRegionsListItems[t-1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsDown=function(){for(var t,r,u,i=n.SelectedSelectedRegionsListItems.length-1;i>=0;i--){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<0||t>=n.SelectedRegionsListItems.length-1)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t+1];n.SelectedRegionsListItems[t+1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsRight=function(){angular.forEach(n.SelectedAvailRegionsItems,function(n){this.push(n)},n.SelectedRegionsListItems);angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SpecialSupport==!1&&(n.subEEPEBPSchool.AcceptFullSubstitudeForSpecialSupport=!1);n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.btnRegionsLeft=function(){angular.forEach(n.SelectedSelectedRegionsListItems,function(n){this.push(n)},n.AvailableRegionsListItems);angular.forEach(n.SelectedSelectedRegionsListItems,function(t){for(var i=n.SelectedRegionsListItems.length-1;i>=0;i--)n.SelectedRegionsListItems[i].Id==t.Id&&n.SelectedRegionsListItems.splice(i,1)});n.SpecialSupport==!1&&(n.subEEPEBPSchool.AcceptFullSubstitudeForSpecialSupport=!1);n.SelectedSelectedRegionsListItems=[];n.SelectedAvailRegionsItems=[]};n.checkRegions=function(){var i=0,t=0,f=60,u=30;n.canInsertRegions=!0;n.SelectedRegionsListItems.length+n.SelectedAvailRegionsItems.length>f&&(r.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών","Δεν μπορείτε να επιλέξετε περισσότερες από "+f+" περιοχές"),n.canInsertRegions=!1);angular.forEach(n.SelectedRegionsListItems,function(n){n.Level==1?i=i+1:t=t+1});angular.forEach(n.SelectedAvailRegionsItems,function(n){n.Level==1?i=i+1:t=t+1});i>u&&(r.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών Α/βάθμιας","Δεν μπορείτε να επιλέξετε περισσότερες από "+u+" περιοχές Α/βάθμιας"),n.canInsertRegions=!1);t>t&&(r.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών Β/βάθμιας","Δεν μπορείτε να επιλέξετε περισσότερες από "+u+" περιοχές Β/βάθμιας"),n.canInsertRegions=!1)};n.removeDuplicatesRegionsForDualList=function(){angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.editPerson=function(){t.setPersonId(n.subEEPEBPSchool.PersonId);i.go("stateEditPerson")};n.saveAction=function(t){n.showAlertRegion=u.isEmpty(n.SelectedRegionsListItems)?!0:!1;n.canSave=!0;n.showAlertSpec||n.showAlertRegion||!n.canSave||n.InsOrUpd(t)};n.InsOrUpd=function(f){n.subEEPEBPSchool.SpecialityId=n.SelectedSpecListItems.Id;n.subEEPEBPSchool.LevelId=n.SelectedSpecListItems.LevelId;var o={SubstituteEEPEBPSchool:n.subEEPEBPSchool,RegionAndUnit:n.SelectedRegionsListItems,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Status:f,ApplicationTypeFekId:n.fek.Id},e=o;n.subEEPEBPSchool.Id!=null&&n.subEEPEBPSchool.Id!=""&&n.subEEPEBPSchool.Id!="undefined"?(n.subEEPEBPSchool.ModifiedBy=n.authentication.userName,u.postByParams(e,"/api/ApplSubstituteEEPEBPSchool/updateApplSubstituteEEPEBPSchool").then(function(){t.setPersonId(n.subEEPEBPSchool.PersonId);i.go("history")}).catch(function(n){r.pop("error","Παρουσιάστηκε σφάλμα",n.data)})):(n.subEEPEBPSchool.DidacticYearId=n.didacticYear.Id,n.subEEPEBPSchool.CreatedBy=n.authentication.userName,u.postByParams(e,"/api/ApplSubstituteEEPEBPSchool/insertApplSubstituteEEPEBPSchool").then(function(){t.setPersonId(n.subEEPEBPSchool.PersonId);i.go("history")}).catch(function(n){r.pop("error","Παρουσιάστηκε σφάλμα",n.data)}))}};SubstituteEEPEBPForSchoolController.$inject=["$scope","PassParameters","$state","toaster","GeneralFactory","$filter","$q","PersonFactory"];SubstituteForSchoolController=function(n,t,i,r,u,f,e,o){if(n.mess="",n.messInfo="",n.subSchool={IsTemporaryStored:!0},n.subSchoolOld=[],n.person={},n.applicationType=28,n.step1=!0,n.step2=!1,n.continueDisabled=!0,n.perspec={},n.SelectedSpecs=[],n.hasValidFekNoConfirmSpeciality=!1,n.alerts="",n.showToConfirmSpeciality=!1,n.selected={Years:[]},n.HasSpecPe70=!1,n.HasSpecPe11Pe06=!1,n.SelectedAvailRegionsItems=[],n.SelectedSelectedRegionsListItems=[],n.SelectedRegionsListItems=[],n.AvailableSpecListItems=[],n.AvailableRegionsListItems=[],n.showAlertSpec=!1,n.showAlertRegion=!1,n.DisableDLevel=!1,n.protocol="",n.showProtocol=!1,n.cannotUpdate=!1,n.notActive=!1,n.noUpdAccess=!1,n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.userLevel=0,n.fek={},n.hasboth=!1,n.HasFullLevel1=[],n.HasFullLevel2=[],n.HasNoFullLevel1=[],n.HasNoFullLevel2=[],n.applicationLevelId=0,blockUI({target:"#divBlockUI",animate:!0}),n.goToStep=function(t,i){t==2?u.getByParams({applicationTypeId:n.applicationType,specialityId:i},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(t){n.SelectedSpecListItems=f("filter")(n.AvailableSpecListItems,{Id:i},!0)[0];n.fek=t;u.isEmptyValue(t)?(n.mess="<li>Δεν υπαρχει ενεργό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2):(n.step1=!1,n.step2=!0,n.subSchool.SpecialityId=i,n.subSchool.LevelId=n.SelectedSpecListItems.LevelId,blockUI({target:"#divBlockUIForm",animate:!0}),n.doAll())},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.step1=!0,n.step2=!1,n.DisableDLevel=u.isEmpty(n.SelectedSpecListItems)&&u.isEmptyValue(n.subSchool.Id)?!1:!0,n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[])},n.canSave=!0,n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.authentication.isAuth){var s="subSchool";u.getByParams({role:n.authentication.role,codes:s},"/api/Subsystem/NewCheckPermission").then(function(i){var o=s.split(","),h,c;for(h in o)n.pageRules[o[h]]=f("filter")(i,{Code:o[h]},!0)[0].Rules;n.subSchool.Id=t.getApplicationId();n.applicationLevelId=t.getApplicationLevelId();u.isEmptyValue(n.applicationLevelId)&&(n.applicationLevelId=0);u.isEmptyValue(n.subSchool.Id)?(n.step1=!0,n.step2=!1):(n.step1=!1,n.step2=!0);t.resetApplication();n.subSchool.PersonId=t.getPersonId();u.isValueInArray(n.pageRules.subSchool.CanAccess,"u1, u2")&&(n.subSchool.PersonId=n.authentication.personId);c=e.all([u.getByParams({personId:n.subSchool.PersonId},"/api/ApplSubstituteSchool/getSpecialityForSubstituteSchool"),u.getByParams({Id:n.subSchool.PersonId},"/api/ApplSubstituteSchool/GetApplSubstituteSchool"),u.getByParams({personId:n.subSchool.PersonId},"/api/RecruitmentServiceAssumed/getSubstitutesServiceAssumed")]);c.then(function(i){var s,o,e;for(angular.copy(i[0],n.AvailableSpecListItems),n.applSub=i[1],s=i[2].substitutes,n.subs=f("filter")(s,function(n){return n.SubstitutesTypeId!=9&&n.SubstitutesTypeId!=10&&n.SubstitutesTypeId!=11&&n.SubstitutesTypeId!=12}),e=n.AvailableSpecListItems.length-1;e>=0;e--)n.AvailableSpecListItems[e].hasApplPerm=0;for(o=n.applSub.length-1;o>=0;o--)for(e=n.AvailableSpecListItems.length-1;e>=0;e--)n.applSub[o].SpecialityId==n.AvailableSpecListItems[e].Id&&(n.AvailableSpecListItems[e].hasApplSub=1);n.subSchool.Id!=null&&n.subSchool.Id!=""&&n.subSchool.Id!="undefined"?(u.isEmptyValue(n.subSchool.SpecialityId)&&(n.subSchool.SpecialityId=t.getSpecialityId()),u.getByParams({applicationTypeId:n.applicationType,specialityId:n.subSchool.SpecialityId},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(t){n.fek=t;n.SelectedSpecListItems=f("filter")(n.AvailableSpecListItems,{Id:n.subSchool.SpecialityId},!0)[0];u.isEmptyValue(t)||u.isEmptyValue(n.SelectedSpecListItems)?(n.mess+="<li>Δεν μπορείτε να τροποποιήσετε την αίτηση γιατί δεν υπάρχει ανοιχτό ΦΕΚ <\/li>",n.showAddEditForm=2):(n.canUpdateAppl=!0,n.showAddEditForm=1,n.getApplication())},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):u.isEmpty(n.AvailableSpecListItems)?(n.mess+=u.isEmpty(n.subs)?"<li>Δεν μπορείτε να υποβάλετε αίτηση. Δεν βρίσκεστε στον ενιαίο πίνακα για κάποιον κλάδο<\/li>":"<li>Δεν μπορείτε να υποβάλετε αίτηση. Έχετε ήδη προσληφθεί το τρέχον σχολικό έτος<\/li>",n.showAddEditForm=2):(n.canInsertAppl=!0,n.showAddEditForm=1)})},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml");unblockUI("#divBlockUI")})}else i.go("/");u.isValueInArray(u.getRoleCode(n.authentication.role),"d1, d2")&&(n.userLevel=n.authentication.levelId,n.subSchool.LevelId=n.authentication.levelId,n.subSchool.IntendancyId=n.authentication.regionAndUnitId);n.changeSelectHeight=function(){var t,i,r;n.HasFullLevel1=f("filter")(n.AvailableRegionsListItems,{IsFull:!0,Level:1},!0)[0];n.HasFullLevel2=f("filter")(n.AvailableRegionsListItems,{IsFull:!0,Level:2},!0)[0];n.HasNoFullLevel1=f("filter")(n.AvailableRegionsListItems,{IsFull:!1,Level:1},!0)[0];n.HasNoFullLevel2=f("filter")(n.AvailableRegionsListItems,{IsFull:!1,Level:2},!0)[0];t=0;u.isEmptyValue(n.HasFullLevel1)||(t=t+15);u.isEmptyValue(n.HasFullLevel2)||(t=t+15);u.isEmptyValue(n.HasNoFullLevel1)||(t=t+15);u.isEmptyValue(n.HasNoFullLevel2)||(t=t+15);i=document.getElementsByTagName("SELECT")[4];r=document.getElementsByTagName("TABLE");i.id==="selectedRegionslistfinal"&&(i.size=t,r[0].height=t*15,r[1].height=t*15)};n.checkCivilServant=function(){n.IsCivilServant==1?n.showCivilServantFull=!1:(n.subSchool.PublicServantFull=0,n.showCivilServantFull=!0)};n.showCivilServantBlock=function(){return n.IsCivilServant==!0?!0:!1};n.checkForBoth=function(){n.hasboth=f("filter")(n.AvailableRegionsListItems,function(n){return n.Level==1}).length>0&&f("filter")(n.AvailableRegionsListItems,function(n){return n.Level==2}).length>0?!0:!1;n.hasboth||(n.sub.AcceptAllSubstitudeToPrimarySpecialEducation=!1)};n.showDetails=function(){return n.SelectedSpecs.length>0?!0:!1};n.changeLevel=function(){u.isEmptyValue(n.subSchool.LevelId)?(n.subSchool.LevelId=null,n.intendancies=[],n.subSchool.IntendancyId=null,n.continueDisabled=!0):(RegionAndFactory.getIntendancies(n.subSchool.LevelId).then(function(t){n.intendancies=t}).catch(function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα στην εύρεση διευθύνσεων")}),u.isEmptyValue(n.subSchool.Id)&&(n.subSchool.IntendancyId=null),n.continueDisabled=!1)};n.doAll=function(){if(u.isEmpty(n.applSub)||(n.subSchoolOld=f("filter")(n.applSub,{SpecialityId:n.subSchool.SpecialityId},!0)[0],u.isEmptyValue(n.subSchoolOld)||(n.subSchool=n.subSchoolOld,n.subSchool.LevelId=n.SelectedSpecListItems.LevelId),n.canUpdateAppl=!0,n.showAddEditForm=1),n.subSchool.Id!=null&&n.subSchool.Id!=""&&n.subSchool.Id!="undefined")n.canUpdateAppl&&n.subSchool.PersonId!=null&&n.subSchool.PersonId!=""&&n.subSchool.PersonId!="undefined"&&o.getPersonForApplication(n.subSchool.PersonId).then(function(t){if(n.person=t,n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1,n.showCivilServantBlock(),n.checkCivilServant(),u.isEmpty(n.SelectedSpecListItems)){u.isValueInArray(n.pageRules.subSchool.CanAccess,"d1, d2, m1, m2")&&n.subSchool.LevelId!=n.authentication.levelId&&(n.canUpdateAppl=!1);n.IsDisabled=!n.canUpdateAppl;n.subSchool.IsActive||(n.IsDisabled=!0,n.notActive=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.subSchool.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0);u.isEmpty(n.subSchool.ApplicationSubstituteProtocols)||(n.protocol=n.subSchool.ApplicationSubstituteProtocols[0].ProtocolString,n.showProtocol=!0);var i=e.all([u.getByParams({applicationId:n.subSchool.Id,ApplicationTypeFekId:n.fek.Id},"/api/ApplSubstituteSchool/GetApplRegionsByApplId"),u.getByParams({specialityId:n.SelectedSpecListItems.Id,personId:n.subSchool.PersonId},"/api/ApplSubstituteSchool/GetAvailRegionsBySpecialityId"),]);i.then(function(t){n.SelectedRegionsListItems=t[0];n.SelectedAvailRegionsItems=t[0];angular.copy(t[1],n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;u.isEmptyValue(n.AvailableRegionsListItems)?(n.mess+="<li>Δεν υπάρχουν διαθέσιμα κενά για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2):(n.changeSelectHeight(),n.removeDuplicatesRegionsForDualList());unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των περιοχών της αίτησης.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})}},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description);unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")}),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm");else{if(n.canInsertAppl&&n.subSchool.PersonId!=null&&n.subSchool.PersonId!=""&&n.subSchool.PersonId!="undefined"){var t=e.all([o.getPersonForApplication(n.subSchool.PersonId)]);t.then(function(t){n.person=t[0];n.SelectedAvailSpecItems=[];n.SelectedSelectedSpecListItems=[];n.AvailableRegionsListItems=[];u.isEmptyValue(n.SelectedSpecListItems)||u.getByParams({specialityId:n.SelectedSpecListItems.Id,personId:n.subSchool.PersonId},"/api/ApplSubstituteSchool/GetAvailRegionsBySpecialityId").then(function(t){angular.copy(t,n.AvailableRegionsListItems);u.isEmptyValue(n.AvailableRegionsListItems)?(n.mess+="<li>Δεν υπάρχουν διαθέσιμα κενά για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2):(n.SelectedAvailRegionsItems=n.SelectedRegionsListItems,n.changeSelectHeight(),n.removeDuplicatesRegionsForDualList());unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description);unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})}unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")}};n.openModal=function(t,i){n.myList=[];n.selectedCode=i;angular.copy(t,n.myList)};n.getApplication=function(){if(n.subSchool.Id!=null&&n.subSchool.Id!=""&&n.subSchool.Id!="undefined"&&(n.DisableDLevel=!0,n.canUpdateAppl&&n.subSchool.PersonId!=null&&n.subSchool.PersonId!=""&&n.subSchool.PersonId!="undefined")){var t=e.all([u.getByParams({Id:n.subSchool.Id},"/api/ApplSubstituteSchool/GetApplSubstituteSchoolById")]);t.then(function(t){n.subSchool=t[0];n.doAll();var i=e.all([u.getByParams({personId:n.subSchool.PersonId,applicationTypeId:n.applicationType,didacticYearId:n.subSchool.DidacticYearId,applicationId:n.subSchool.Id},"api/HistoryAppl/getLevelByApplTypeIdAndPersonIdAndYear")]);i.then(function(t){n.levels=t[0];unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})})}};n.SelectedSpecAvailItems=[];n.SelectedSelectedSpecListItems=[];n.SelectedSpecListItems=[];n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[];n.SelectedRegionsListItems=[];n.btnRegionsUp=function(){for(var t,r,u,f=n.SelectedSelectedRegionsListItems,i=0;i<n.SelectedSelectedRegionsListItems.length;i++){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<=0||t>=n.SelectedRegionsListItems.length)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t-1];n.SelectedRegionsListItems[t-1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsDown=function(){for(var t,r,u,i=n.SelectedSelectedRegionsListItems.length-1;i>=0;i--){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<0||t>=n.SelectedRegionsListItems.length-1)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t+1];n.SelectedRegionsListItems[t+1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsRight=function(){angular.forEach(n.SelectedAvailRegionsItems,function(n){this.push(n)},n.SelectedRegionsListItems);angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SpecialSupport==!1&&(n.subSchool.AcceptFullSubstitudeForSpecialSupport=!1);n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.btnRegionsLeft=function(){angular.forEach(n.SelectedSelectedRegionsListItems,function(n){this.push(n)},n.AvailableRegionsListItems);angular.forEach(n.SelectedSelectedRegionsListItems,function(t){for(var i=n.SelectedRegionsListItems.length-1;i>=0;i--)n.SelectedRegionsListItems[i].Id==t.Id&&n.SelectedRegionsListItems.splice(i,1)});n.SpecialSupport==!1&&(n.subSchool.AcceptFullSubstitudeForSpecialSupport=!1);n.SelectedSelectedRegionsListItems=[];n.SelectedAvailRegionsItems=[]};n.checkRegions=function(){var i=0,t=0,f=60,u=30;n.canInsertRegions=!0;n.SelectedRegionsListItems.length+n.SelectedAvailRegionsItems.length>f&&(r.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών","Δεν μπορείτε να επιλέξετε περισσότερες από "+f+" περιοχές"),n.canInsertRegions=!1);angular.forEach(n.SelectedRegionsListItems,function(n){n.Level==1?i=i+1:t=t+1});angular.forEach(n.SelectedAvailRegionsItems,function(n){n.Level==1?i=i+1:t=t+1});i>u&&(r.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών Α/βάθμιας","Δεν μπορείτε να επιλέξετε περισσότερες από "+u+" περιοχές Α/βάθμιας"),n.canInsertRegions=!1);t>t&&(r.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών Β/βάθμιας","Δεν μπορείτε να επιλέξετε περισσότερες από "+u+" περιοχές Β/βάθμιας"),n.canInsertRegions=!1)};n.removeDuplicatesRegionsForDualList=function(){angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.editPerson=function(){t.setPersonId(n.subSchool.PersonId);i.go("stateEditPerson")};n.saveAction=function(t){n.showAlertRegion=u.isEmpty(n.SelectedRegionsListItems)?!0:!1;n.canSave=!0;n.showAlertSpec||n.showAlertRegion||!n.canSave||n.InsOrUpd(t)};n.InsOrUpd=function(f){n.subSchool.SpecialityId=n.SelectedSpecListItems.Id;n.subSchool.LevelId=n.SelectedSpecListItems.LevelId;var o={SubstituteSchool:n.subSchool,RegionAndUnit:n.SelectedRegionsListItems,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Status:f,ApplicationTypeFekId:n.fek.Id},e=o;n.subSchool.Id!=null&&n.subSchool.Id!=""&&n.subSchool.Id!="undefined"?(n.subSchool.ModifiedBy=n.authentication.userName,u.postByParams(e,"/api/ApplSubstituteSchool/updateApplSubstituteSchool").then(function(){t.setPersonId(n.subSchool.PersonId);i.go("history")}).catch(function(n){r.pop("error","Παρουσιάστηκε σφάλμα",n.data)})):(n.subSchool.DidacticYearId=n.didacticYear.Id,n.subSchool.CreatedBy=n.authentication.userName,u.postByParams(e,"/api/ApplSubstituteSchool/insertApplSubstituteSchool").then(function(){t.setPersonId(n.subSchool.PersonId);i.go("history")}).catch(function(n){r.pop("error","Παρουσιάστηκε σφάλμα",n.data)}))}};SubstituteForSchoolController.$inject=["$scope","PassParameters","$state","toaster","GeneralFactory","$filter","$q","PersonFactory"];SubstituteMusic3monthsController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p){if(n.mess="",n.messInfo="",n.subMusic3months={IsTemporaryStored:!0},n.applicationType=33,n.step1=!0,n.step2=!1,n.continueDisabled=!0,n.perspec={},n.SelectedSpecs=[],n.person={},n.showAlertSpec=!1,n.showAlertMusicTE16=!1,n.showAlertMusicPE16=!1,n.showAlertRegion=!1,n.hasValidFekNoConfirmSpeciality=!1,n.alerts="",n.showToConfirmSpeciality=!1,n.SelectedAvailRegionsItems=[],n.SelectedSelectedRegionsListItems=[],n.SelectedRegionsListItems=[],n.personmusicspecialists=[],n.DisableDLevel=!1,n.AvailableSpecListItems=[],n.AvailableRegionsListItems=[],n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.userLevel=0,n.canSave=!0,n.showTableWithMusic=!1,n.showPe16=!1,n.showTe16=!1,n.IsCivilServant=!1,n.applicationLevelId=0,n.enableButtonSave=!1,n.permusicspecialists=[],blockUI({target:"#divBlockUI",animate:!0}),p.isValueInArray(p.getRoleCode(n.authentication.role),"d1, d2")&&(n.userLevel=n.authentication.levelId,n.subMusic3months.LevelId=n.authentication.levelId,n.subMusic3months.IntendancyId=n.authentication.regionAndUnitId),n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.authentication.isAuth){var w="subMusic3months";p.getByParams({role:n.authentication.role,codes:w},"/api/Subsystem/NewCheckPermission").then(function(r){var u=w.split(","),e,s;for(e in u)n.pageRules[u[e]]=t("filter")(r,{Code:u[e]},!0)[0].Rules;n.subMusic3months.Id=f.getApplicationId();n.applicationLevelId=f.getApplicationLevelId();p.isEmptyValue(n.applicationLevelId)&&(n.applicationLevelId=0);f.resetApplication();n.subMusic3months.PersonId=f.getPersonId();p.isEmptyValue(n.subMusic3months.Id)?(n.step1=!0,n.step2=!1):(n.step1=!1,n.step2=!0);p.isValueInArray(n.pageRules.subMusic3months.CanAccess,"u1, u2")&&(n.subMusic3months.PersonId=n.authentication.personId);s=i.all([p.getByParams({personId:n.subMusic3months.PersonId},"/api/ApplSubstituteMusic3months/getSpecialityForSubstituteMusic3months"),p.getByParams({Id:n.subMusic3months.PersonId},"/api/ApplSubstituteMusic3months/GetApplSubstituteMusic3months"),p.getByParams({personId:n.subMusic3months.PersonId},"/api/RecruitmentServiceAssumed/getSubstitutesServiceAssumed")]);s.then(function(i){var u,r;for(angular.copy(i[0],n.AvailableSpecListItems),n.applHourly=i[1],n.subs=i[2].substitutes,r=n.AvailableSpecListItems.length-1;r>=0;r--)n.AvailableSpecListItems[r].applHourly=0;for(u=n.applHourly.length-1;u>=0;u--)for(r=n.AvailableSpecListItems.length-1;r>=0;r--)n.applHourly[u].SpecialityId==n.AvailableSpecListItems[r].Id&&(n.AvailableSpecListItems[r].applHourly=1);n.subMusic3months.Id!=null&&n.subMusic3months.Id!=""&&n.subMusic3months.Id!="undefined"?(p.isEmptyValue(n.subMusic3months.SpecialityId)&&(n.subMusic3months.SpecialityId=f.getSpecialityId()),p.getByParams({applicationTypeId:n.applicationType,specialityId:n.subMusic3months.SpecialityId},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(i){n.SelectedSpecListItems=t("filter")(n.AvailableSpecListItems,{Id:n.subMusic3months.SpecialityId},!0)[0];!p.isEmptyValue(i)||p.isValueInArray(p.getRoleCode(n.authentication.role),"a")?(n.canUpdateAppl=!0,n.showAddEditForm=1,n.getApplication()):(n.mess+="<li>Δεν μπορείτε να τροποποιήσετε την αίτηση γιατί δεν υπάρχει ανοιχτό ΦΕΚ  <\/li>",n.showAddEditForm=2)},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):p.isEmpty(n.AvailableSpecListItems)?(n.mess+=p.isEmpty(n.subs)?"<li>Δεν μπορείτε να υποβάλετε αίτηση. Δεν βρίσκεστε στον ενιαίο πίνακα για κάποιον κλάδο<\/li>":"<li>Δεν μπορείτε να υποβάλετε αίτηση. Έχετε ήδη προσληφθεί το τρέχον σχολικό έτος<\/li>",n.showAddEditForm=2):(n.canInsertAppl=!0,n.showAddEditForm=1)})},function(){unblockUI("#divBlockUI");o.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else e.go("/");n.checkCivilServant=function(){n.IsCivilServant==1?n.showCivilServantFull=!1:(n.subMusic3months.PublicServantFull=0,n.showCivilServantFull=!0)};n.showCivilServantBlock=function(){return n.IsCivilServant==!0?!0:!1};n.enableSave=function(){n.enableButtonSave=n.subMusic3months.NotInRiskForCovid19==!0?!0:!1};n.showDetails=function(){return n.SelectedSpecs.length>0?!0:!1};n.goToStep=function(i,r,u){i==2?p.getByParams({applicationTypeId:n.applicationType,specialityId:r},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(i){n.SelectedSpecListItems=t("filter")(n.AvailableSpecListItems,{Id:r},!0)[0];n.fek=i;p.isEmptyValue(i)?(n.mess="<li>Δεν υπαρχει ενεργό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2):(n.step1=!1,n.step2=!0,n.subMusic3months.SpecialityId=r,n.subMusic3months.LevelId=u,blockUI({target:"#divBlockUIForm",animate:!0}),n.doAll())},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.step1=!0,n.step2=!1,n.DisableDLevel=p.isEmpty(n.SelectedSpecListItems)&&p.isEmptyValue(n.subMusic3months.Id)?!1:!0)};n.changeLevel=function(){p.isEmptyValue(n.subMusic3months.LevelId)?(n.subMusic3months.LevelId=null,n.intendancies=[],n.subMusic3months.IntendancyId=null,n.continueDisabled=!0):(y.getIntendancies(n.subMusic3months.LevelId).then(function(t){n.intendancies=t}).catch(function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα στην εύρεση διευθύνσεων")}),p.isEmptyValue(n.subMusic3months.Id)&&(n.subMusic3months.IntendancyId=null),n.continueDisabled=!1)};n.changeIntendancies=function(){p.isEmptyValue(n.subMusic3months.LevelId)||p.isEmptyValue(n.subMusic3months.IntendancyId)?(n.continueDisabled=!0,n.subMusic3months.IntendancyId=null):n.continueDisabled=!1};n.checkSpecificMusicSpeciality=function(){n.showTableWithMusic=!1;n.showPe16=!1;n.showTe16=!1;n.SelectedSpecListItems.Code=="ΠΕ79.01"?n.showPe16=!0:n.SelectedSpecListItems.Code=="ΤΕ16.00"?n.showTe16=!0:n.showTableWithMusic=!0};n.findSpecsForDetails=function(){n.SelectedSpecs=[];angular.forEach(n.SelectedSpecListItems,function(t){for(var i=n.perspec.length-1;i>=0;i--)n.perspec[i].Speciality1.Id==t.Id&&n.SelectedSpecs.push(n.perspec[i])})};n.findMusicSpecialitiesBySpec=function(){n.musicspecialists=[];n.AvailableMusicPE16ListItems=[];n.AvailableMusicTE16ListItems=[];n.specialistother=[];for(var t=n.personmusicspecialists.length-1;t>=0;t--)n.personmusicspecialists[t].MusicSpecialistPerSpeciality.Speciality.Id==n.SelectedSpecListItems.Id&&(n.SelectedSpecListItems.Code=="ΠΕ79.01"?n.AvailableMusicPE16ListItems.push(n.personmusicspecialists[t].MusicSpecialistPerSpeciality):n.SelectedSpecListItems.Code=="ΤΕ16.00"?n.AvailableMusicTE16ListItems.push(n.personmusicspecialists[t].MusicSpecialistPerSpeciality):(n.musicspecialists.push(n.personmusicspecialists[t]),n.specialistother.push(n.personmusicspecialists[t].MusicSpecialistPerSpeciality)));n.removeDuplicatesMusicPE16ForDualListFromSelected();n.removeDuplicatesMusicTE16ForDualListFromSelected()};n.createTemplate=function(){return{content:[{style:"tableExample",table:{widths:["*"],body:[[{stack:[{text:"\nΑΙΤΗΣΗ / ΔΗΛΩΣΗ ΠΡΟΤΙΜΗΣΕΩΝ ΥΠΟΨΗΦΙΩΝ\nα.ΑΝΑΠΛΗΡΩΤΩΝ ΕΚΠΑΙΔΕΥΤΙΚΩΝ, β.ΩΡΟΜΙΣΘΙΩΝ ΕΚΠΑΙΔΕΥΤΙΚΩΝ\nΣΧΟΛΙΚΟΥ ΕΤΟΥΣ 2014-15",style:"header",alignment:"center"},{text:["Της ",{text:"αριθμ. 118102/Δ1/25.07.2014 (ΑΔΑ: Β3Ξ69-ΣΦΤ)",bold:!0}," εγκυκλίου του Υ.ΠΑΙ.Θ.\n"],fontSize:9},{text:"(επέχει θέση Υπεύθυνης Δήλωσης του Ν.1599/86)\n\n",fontSize:9}]}]]}},{style:"tableExample",table:{widths:["auto","*"],body:[[{text:["δια μέσου της Διεύθυνσης : ",{text:"Δ.Ε. Αχαΐας",bold:!0}],fontSize:9},{text:["Αρ. Πρωτοκόλου : ",{text:"1234567890",bold:!0}],fontSize:9,alignment:"right"}],[{text:"(συμπληρώνονται αυτόματα κατά την καταχώρηση της αίτησης)\n\n",fontSize:6},{text:["Ημερομηνία : ",{text:"20/04/2015",bold:!0}],fontSize:9,alignment:"right"}]]},layout:"noBorders"},{text:"\nΠΡΟΣΩΠΙΚΑ ΣΤΟΙΧΕΙΑ",style:"header",alignment:"center"},{style:"tableExample",table:{widths:["*"],body:[[{stack:[{style:"tableExample",table:{widths:["*","*"],body:[[{text:["Α.Φ.Μ : ",{text:"000000024",bold:!0}],fontSize:9},{text:["Α.Δ.Τ : ",{text:"ΑΖ 711210",bold:!0}],fontSize:9}],[{text:["ΕΠΩΝΥΜΟ : ",{text:"ΠΕΤΡΟΠΟΥΛΟΣ",bold:!0}],fontSize:9},{text:["ΟΝΟΜΑ : ",{text:"ΔΗΜΗΤΡΗΣ",bold:!0}],fontSize:9}],[{columns:[{width:90,text:"ΠΟΛΥΤΕΚΝΟΣ ",fontSize:9,alignment:"right"},{width:"*",image:"imgUncheckedBox",width:12,height:12},{width:90,text:"ΤΡΙΤΕΚΝΟΣ ",fontSize:9,alignment:"right"},{width:"*",image:"imgCheckedBox",width:12,height:12},{width:120,text:"ΠΑΙΔΑΓΩΓΙΚΗ ΚΑΤΑΡΤΙΣΗ ",fontSize:9,alignment:"right"},{width:"*",image:"imgUncheckedBox",width:12,height:12},{width:120,text:"ΔΗΜΟΣΙΟΣ ΥΠΑΛΛΗΛΟΣ ",fontSize:9,alignment:"right"},{width:"*",image:"imgCheckedBox",width:12,height:12}],colSpan:2}]]},layout:"noBorders"}]}]]}}],styles:{header:{fontSize:12,bold:!0,margin:[0,0,0,10]},subheader:{fontSize:16,bold:!0,margin:[0,10,0,5]},tableExample:{margin:[0,5,0,15]},tableHeader:{bold:!0,fontSize:13,color:"black"}},images:{imgCheckedBox:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAA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H7SeYxVnJItzBOCu1gMAwBpNfWct1CmAXa0HAIA1mvrOWphTAPsz/f+ZAHDArgy7a6rOSJJtL3rRi05N8uPGwxzLd2qtZ7ceAgDWqpRyb5IXtp7jGJ65PdP+7T9J7m49AACs092tB1jFGdsz/fP/32s9AACs09R315nbk5zWeopV7G49AACs09R312nbk+xsPcUq7ms9AACs09R3187tSXa0nuIY9tRaH2o9BACsx7i79rSe4xh2TD0Apl5QAHA0U95hkw+A+1sPAAAbNOUdNvkAmPLhEwA4linvMAEAAHMy5R0mAABgTqa8wwQAAMzJlHeYAACAOZnyDtuxPcnxrac4hn2tBwCADZryDjt+++p/BwBYNgIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQ9uT7Gs9xDEc33oAANigKe+wfduT7G09xTHsbD0AAGzQlHfYXgEAAPMx5R0mAABgTqa8wwQAAMzJlHeYAACAOZnyDpt8AJzeegAA2KAp77DJB8AZrQcAgA2a8g6bfADsLKWc2noIAFiPcXdN/hTAntZTrGLKBQUARzL13bVne5IHWk+xijNbDwAA6zT13fXA9iS7W0+xiue3HgAA1mnqu2v39iT3tZ5iFee1HgAA1um81gOs4r5t+/fvTynlZ5nuxQr7k5xca/1p60EAYDWllF9L8kiSba1nOYo9tdZnHHgc8JSPA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5JckLToQBYr8eTfC3JrgyLv9Zan2g70rQIgFWMFxC+JEMMnJ/kxUme1nQoAA73yyTfzLDwdyX5Rg8X8m2GAFin8XTBmePXGYf92XUEAPO1J8l9SXaPXwf/7LD++giAGSqlnJpfRcFpGYJgxypfxzcZFqC9fRnOzR/ra0+GR+3uTnJfrfWhNqMun/8PcskwF+bRQ44AAAAASUVORK5CYII="},defaultStyle:{columnGap:5}}};n.findMusicSpecialitiesBySpecForUpdate=function(){n.musicspecialists=[];n.SelectedMusicPE16ListItems=[];n.SelectedAvailMusicPE16ListItems=[];n.SelectedMusicTE16ListItems=[];n.SelectedAvailMusicTE16ListItems=[];n.specialistother=[];for(var t=0;t<n.permusicspecialists.length;t++)n.permusicspecialists[t].MusicSpecialistPerSpeciality.Speciality.Id==n.SelectedSpecListItems.Id&&(n.SelectedSpecListItems.Code=="ΠΕ79.01"?(n.SelectedMusicPE16ListItems.push(n.permusicspecialists[t].MusicSpecialistPerSpeciality),n.SelectedAvailMusicPE16ListItems.push(n.permusicspecialists[t].MusicSpecialistPerSpeciality),n.removeDuplicatesMusicPE16ForDualList()):n.SelectedSpecListItems.Code=="ΤΕ16.00"?(n.SelectedMusicTE16ListItems.push(n.permusicspecialists[t].MusicSpecialistPerSpeciality),n.SelectedAvailMusicTE16ListItems.push(n.permusicspecialists[t].MusicSpecialistPerSpeciality),n.removeDuplicatesMusicTE16ForDualList()):(n.musicspecialists.push(n.permusicspecialists[t]),n.specialistother.push(n.permusicspecialists[t].MusicSpecialistPerSpeciality)));n.checkSpecificMusicSpeciality()};n.getApplRegions=function(){n.SelectedSpecListItems.length>0&&n.hourlyTeacher.RegionAndUnitId>0?a.getTypeRegionAndUnitByMunicipality(n.hourlyTeacherMusic.RegionAndUnitId,n.applicationType,n.subMusic3months.LevelId).then(function(t){angular.copy(t,n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList()},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.AvailableRegionsListItems=[],n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[])};n.doAll=function(){n.subMusic3months.Id!=null&&n.subMusic3months.Id!=""&&n.subMusic3months.Id!="undefined"?(n.canUpdateAppl&&n.subMusic3months.PersonId!=null&&n.subMusic3months.PersonId!=""&&n.subMusic3months.PersonId!="undefined"&&h.getPersonForApplication(n.subMusic3months.PersonId).then(function(t){if(n.person=t,n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1,n.showCivilServantBlock(),n.checkCivilServant(),n.enableSave(),p.isValueInArray(n.pageRules.subMusic3months.CanAccess,"d1, d2, m1, m2")&&n.subMusic3months.LevelId!=n.authentication.levelId&&(n.canUpdateAppl=!1),!p.isEmpty(n.AvailableSpecListItems)){n.IsDisabled=!n.canUpdateAppl;n.IsDisabled&&(n.noUpdAccess=!0);n.subMusic3months.IsActive||(n.IsDisabled=!0,n.notActive=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.subMusic3months.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0);p.isEmpty(n.subMusic3months.ApplicationSubstituteMusicProtocols)||(n.protocol=n.subMusic3months.ApplicationSubstituteMusicProtocols[0].ProtocolString,n.showProtocol=!0);var r=i.all([p.getByParams({id:n.subMusic3months.PersonId},"/api/PersonMusicSpeciality/getMusicSpecialistsFromClassification"),p.getByParams({id:n.subMusic3months.Id},"/api/ApplSubstituteMusic3months/getApplSubstituteMusic3monthsSpecialistsById"),p.getByParams({id:n.subMusic3months.Id},"/api/ApplSubstituteMusic3months/getApplRegionsByApplId"),p.getByParams({level:n.subMusic3months.LevelId,applicationTypeId:n.applicationType,sex:n.person.Sex},"/api/ApplicationTypeRegionAndUnit/getApplicationRegionByAppTypeAndLevel")]);r.then(function(t){n.personmusicspecialists=t[0];n.permusicspecialists=t[1];n.SelectedRegionsListItems=t[2];n.SelectedAvailRegionsItems=t[2];angular.copy(t[3],n.AvailableRegionsListItems);n.removeDuplicatesRegionsForDualList();n.findMusicSpecialitiesBySpec();n.findMusicSpecialitiesBySpecForUpdate()},function(){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})}},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm")):(n.canInsertAppl&&n.subMusic3months.PersonId!=null&&n.subMusic3months.PersonId!=""&&n.subMusic3months.PersonId!="undefined"&&h.getPersonForApplication(n.subMusic3months.PersonId).then(function(t){if(n.person=t,n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1,n.showCivilServantBlock(),n.checkCivilServant(),p.isEmpty(n.SelectedSpecListItems)){var r=i.all([p.getByParams({id:n.subMusic3months.PersonId},"/api/PersonMusicSpeciality/getMusicSpecialistsFromClassification")]);r.then(function(t){n.personmusicspecialists=t[0];var r=i.all([p.getByParams({level:n.subMusic3months.LevelId,applicationTypeId:n.applicationType,sex:n.person.Sex},"/api/ApplicationTypeRegionAndUnit/getApplicationRegionByAppTypeAndLevel"),n.findMusicSpecialitiesBySpec()]);r.then(function(t){angular.copy(t[0],n.AvailableRegionsListItems);angular.copy(n.AvailableMusicTE16ListItems,n.SelectedAvailMusicTE16Items);angular.copy(n.AvailableMusicPE16ListItems,n.SelectedAvailMusicPE16Items);n.checkSpecificMusicSpeciality();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")},function(){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση tων περιοχών της αίτησης.")})},function(){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})}},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm"))};n.getApplication=function(){if(n.subMusic3months.Id!=null&&n.subMusic3months.Id!=""&&n.subMusic3months.Id!="undefined"&&(n.DisableDLevel=!0,n.canUpdateAppl&&n.subMusic3months.PersonId!=null&&n.subMusic3months.PersonId!=""&&n.subMusic3months.PersonId!="undefined")){var t=i.all([p.getByParams({id:n.subMusic3months.Id},"/api/ApplSubstituteMusic3months/GetApplSubstituteMusic3monthsById")]);t.then(function(t){n.subMusic3months=t[0];n.doAll()})}};n.SelectedSpecAvailItems=[];n.SelectedSelectedSpecListItems=[];n.SelectedSpecListItems=[];n.btnSpecUp=function(){for(var t,r,u,f=n.SelectedSelectedSpecListItems,i=0;i<n.SelectedSelectedSpecListItems.length;i++){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<=0||t>=n.SelectedSpecListItems.length)return;r=n.SelectedSpecListItems[t];u=n.SelectedSpecListItems[t-1];n.SelectedSpecListItems[t-1]=r;n.SelectedSpecListItems[t]=u}};n.btnSpecDown=function(){for(var t,r,u,i=n.SelectedSelectedSpecListItems.length-1;i>=0;i--){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<0||t>=n.SelectedSpecListItems.length-1)return;r=n.SelectedSpecListItems[t];u=n.SelectedSpecListItems[t+1];n.SelectedSpecListItems[t+1]=r;n.SelectedSpecListItems[t]=u}};n.btnSpecRight=function(){angular.forEach(n.SelectedAvailSpecItems,function(n){this.push(n)},n.SelectedSpecListItems);angular.forEach(n.SelectedAvailSpecItems,function(t){for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].Id==t.Id&&n.AvailableSpecListItems.splice(i,1)});n.findMusicSpecialitiesBySpec();n.checkSpecificMusicSpeciality();n.SelectedAvailSpecItems=[];n.SelectedSelectedSpecListItems=[]};n.btnSpecLeft=function(){angular.forEach(n.SelectedSelectedSpecListItems,function(n){this.push(n)},n.AvailableSpecListItems);angular.forEach(n.SelectedSelectedSpecListItems,function(t){for(var i=n.SelectedSpecListItems.length-1;i>=0;i--)n.SelectedSpecListItems[i].Id==t.Id&&(t.Code=="ΠΕ79.01"?(n.SelectedMusicPE16ListItems=[],n.SelectedAvailMusicPE16ListItems=[]):t.Code=="ΤΕ16.00"?(n.SelectedMusicTE16ListItems=[],n.SelectedAvailMusicTE16ListItems=[]):n.specialistother=[],n.SelectedSpecListItems.splice(i,1))});n.checkSpecificMusicSpeciality();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.btnAllSpecRight=function(){angular.forEach(n.AvailableSpecListItems,function(n){this.push(n)},n.SelectedSpecListItems);for(var t=n.AvailableSpecListItems.length-1;t>=0;t--)n.AvailableSpecListItems.splice(t,1);n.findMusicSpecialitiesBySpec();n.checkSpecificMusicSpeciality();n.AvailableRegionsListItems=[];n.getApplRegions();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.btnAllSpecLeft=function(){angular.forEach(n.SelectedSpecListItems,function(n){this.push(n)},n.AvailableSpecListItems);for(var t=n.SelectedSpecListItems.length-1;t>=0;t--)n.SelectedSpecListItems[t].Code=="ΠΕ19.01"?(n.SelectedMusicPE16ListItems=[],n.SelectedAvailMusicPE16ListItems=[]):n.SelectedSpecListItems[t].Code=="ΤΕ16.00"?(n.SelectedMusicTE16ListItems=[],n.SelectedAvailMusicTE16ListItems=[]):n.specialistother=[],n.SelectedSpecListItems.splice(t,1);n.checkSpecificMusicSpeciality();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.SelectedMusicPE16AvailItems=[];n.SelectedSelectedMusicPE16ListItems=[];n.SelectedMusicPE16ListItems=[];n.btnMusicPE16Up=function(){for(var t,r,u,f=n.SelectedSelectedMusicPE16ListItems,i=0;i<n.SelectedSelectedMusicPE16ListItems.length;i++){if(t=n.SelectedMusicPE16ListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedMusicPE16ListItems[i].Id),t<=0||t>=n.SelectedMusicPE16ListItems.length)return;r=n.SelectedMusicPE16ListItems[t];u=n.SelectedMusicPE16ListItems[t-1];n.SelectedMusicPE16ListItems[t-1]=r;n.SelectedMusicPE16ListItems[t]=u}};n.btnMusicPE16Down=function(){for(var t,r,u,i=n.SelectedSelectedMusicPE16ListItems.length-1;i>=0;i--){if(t=n.SelectedMusicPE16ListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedMusicPE16ListItems[i].Id),t<0||t>=n.SelectedMusicPE16ListItems.length-1)return;r=n.SelectedMusicPE16ListItems[t];u=n.SelectedMusicPE16ListItems[t+1];n.SelectedMusicPE16ListItems[t+1]=r;n.SelectedMusicPE16ListItems[t]=u}};n.btnMusicPE16Right=function(){angular.forEach(n.SelectedAvailMusicPE16Items,function(n){this.push(n)},n.SelectedMusicPE16ListItems);angular.forEach(n.SelectedAvailMusicPE16Items,function(t){for(var i=n.AvailableMusicPE16ListItems.length-1;i>=0;i--)n.AvailableMusicPE16ListItems[i].Id==t.Id&&n.AvailableMusicPE16ListItems.splice(i,1)});n.SelectedAvailMusicPE16Items=[];n.SelectedSelectedMusicPE16ListItems=[]};n.btnMusicPE16Left=function(){angular.forEach(n.SelectedSelectedMusicPE16ListItems,function(n){this.push(n)},n.AvailableMusicPE16ListItems);angular.forEach(n.SelectedSelectedMusicPE16ListItems,function(t){for(var i=n.SelectedMusicPE16ListItems.length-1;i>=0;i--)n.SelectedMusicPE16ListItems[i].Id==t.Id&&n.SelectedMusicPE16ListItems.splice(i,1)});n.SelectedSelectedMusicPE16ListItems=[];n.SelectedAvailMusicPE16Items=[]};n.btnAllMusicPE16Right=function(){angular.forEach(n.AvailableMusicPE16ListItems,function(n){this.push(n)},n.SelectedMusicPE16ListItems);for(var t=n.AvailableMusicPE16ListItems.length-1;t>=0;t--)n.AvailableMusicPE16ListItems.splice(t,1);n.SelectedSelectedMusicPE16ListItems=[];n.SelectedAvailMusicPE16Items=[]};n.btnAllMusicPE16Left=function(){angular.forEach(n.SelectedMusicPE16ListItems,function(n){this.push(n)},n.AvailableMusicPE16ListItems);for(var t=n.SelectedMusicPE16ListItems.length-1;t>=0;t--)n.SelectedMusicPE16ListItems.splice(t,1);n.SelectedSelectedMusicPE16ListItems=[];n.SelectedAvailMusicPE16Items=[]};n.SelectedMusicTE16AvailItems=[];n.SelectedSelectedMusicTE16ListItems=[];n.SelectedMusicTE16ListItems=[];n.btnMusicTE16Up=function(){for(var t,r,u,f=n.SelectedSelectedMusicTE16ListItems,i=0;i<n.SelectedSelectedMusicTE16ListItems.length;i++){if(t=n.SelectedMusicTE16ListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedMusicTE16ListItems[i].Id),t<=0||t>=n.SelectedMusicTE16ListItems.length)return;r=n.SelectedMusicTE16ListItems[t];u=n.SelectedMusicTE16ListItems[t-1];n.SelectedMusicTE16ListItems[t-1]=r;n.SelectedMusicTE16ListItems[t]=u}};n.btnMusicTE16Down=function(){for(var t,r,u,i=n.SelectedSelectedMusicTE16ListItems.length-1;i>=0;i--){if(t=n.SelectedMusicTE16ListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedMusicTE16ListItems[i].Id),t<0||t>=n.SelectedMusicTE16ListItems.length-1)return;r=n.SelectedMusicTE16ListItems[t];u=n.SelectedMusicTE16ListItems[t+1];n.SelectedMusicTE16ListItems[t+1]=r;n.SelectedMusicTE16ListItems[t]=u}};n.btnMusicTE16Right=function(){angular.forEach(n.SelectedAvailMusicTE16Items,function(n){this.push(n)},n.SelectedMusicTE16ListItems);angular.forEach(n.SelectedAvailMusicTE16Items,function(t){for(var i=n.AvailableMusicTE16ListItems.length-1;i>=0;i--)n.AvailableMusicTE16ListItems[i].MusicSpecialist.Id==t.MusicSpecialist.Id&&n.AvailableMusicTE16ListItems.splice(i,1)});n.SelectedAvailMusicTE16Items=[];n.SelectedSelectedMusicTE16ListItems=[]};n.btnMusicTE16Left=function(){angular.forEach(n.SelectedSelectedMusicTE16ListItems,function(n){this.push(n)},n.AvailableMusicTE16ListItems);angular.forEach(n.SelectedSelectedMusicTE16ListItems,function(t){for(var i=n.SelectedMusicTE16ListItems.length-1;i>=0;i--)n.SelectedMusicTE16ListItems[i].MusicSpecialist.Id==t.MusicSpecialist.Id&&n.SelectedMusicTE16ListItems.splice(i,1)});n.SelectedSelectedMusicTE16ListItems=[];n.SelectedAvailMusicTE16Items=[]};n.btnAllMusicTE16Right=function(){angular.forEach(n.AvailableMusicTE16ListItems,function(n){this.push(n)},n.SelectedMusicTE16ListItems);for(var t=n.AvailableMusicTE16ListItems.length-1;t>=0;t--)n.AvailableMusicTE16ListItems.splice(t,1);n.SelectedSelectedMusicTE16ListItems=[];n.SelectedAvailMusicTE16Items=[]};n.btnAllMusicTE16Left=function(){angular.forEach(n.SelectedMusicTE16ListItems,function(n){this.push(n)},n.AvailableMusicTE16ListItems);for(var t=n.SelectedMusicTE16ListItems.length-1;t>=0;t--)n.SelectedMusicTE16ListItems.splice(t,1);n.SelectedSelectedMusicTE16ListItems=[];n.SelectedAvailMusicTE16Items=[]};n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[];n.SelectedRegionsListItems=[];n.btnRegionsUp=function(){for(var t,r,u,f=n.SelectedSelectedRegionsListItems,i=0;i<n.SelectedSelectedRegionsListItems.length;i++){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<=0||t>=n.SelectedRegionsListItems.length)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t-1];n.SelectedRegionsListItems[t-1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsDown=function(){for(var t,r,u,i=n.SelectedSelectedRegionsListItems.length-1;i>=0;i--){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<0||t>=n.SelectedRegionsListItems.length-1)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t+1];n.SelectedRegionsListItems[t+1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsRight=function(){angular.forEach(n.SelectedAvailRegionsItems,function(n){this.push(n)},n.SelectedRegionsListItems);angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.btnRegionsLeft=function(){angular.forEach(n.SelectedSelectedRegionsListItems,function(n){this.push(n)},n.AvailableRegionsListItems);angular.forEach(n.SelectedSelectedRegionsListItems,function(t){for(var i=n.SelectedRegionsListItems.length-1;i>=0;i--)n.SelectedRegionsListItems[i].Id==t.Id&&n.SelectedRegionsListItems.splice(i,1)});n.SelectedSelectedRegionsListItems=[];n.SelectedAvailRegionsItems=[]};n.getApplRegions=function(){n.SelectedSpecListItems.length>0?(n.AvailableRegionsListItems=[],p.getByParams({level:n.subMusic3months.LevelId,applicationTypeId:n.applicationType,sex:n.person.Sex},"/api/ApplicationTypeRegionAndUnit/getApplicationRegionByAppTypeAndLevel").then(function(t){angular.copy(t,n.AvailableRegionsListItems);n.removeDuplicatesRegionsForDualList()},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(n.AvailableRegionsListItems=[],n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[])};n.removeDuplicatesRegionsForDualList=function(){angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.removeDuplicatesSpecsForDualList=function(){angular.forEach(n.SelectedAvailSpecItems,function(t){for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].Id==t.Id&&n.AvailableSpecListItems.splice(i,1)});n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.removeDuplicatesMusicPE16ForDualList=function(){angular.forEach(n.SelectedAvailMusicPE16ListItems,function(t){for(var i=n.AvailableMusicPE16ListItems.length-1;i>=0;i--)n.AvailableMusicPE16ListItems[i].Id==t.Id&&n.AvailableMusicPE16ListItems.splice(i,1)});n.SelectedAvailMusicPE16ListItems=[];n.SelectedSelectedMusicPE16ListItems=[]};n.removeDuplicatesMusicPE16ForDualListFromSelected=function(){angular.forEach(n.SelectedMusicPE16ListItems,function(t){for(var i=n.AvailableMusicPE16ListItems.length-1;i>=0;i--)n.AvailableMusicPE16ListItems[i].Id==t.Id&&n.AvailableMusicPE16ListItems.splice(i,1)})};n.removeDuplicatesMusicTE16ForDualList=function(){angular.forEach(n.SelectedAvailMusicTE16ListItems,function(t){for(var i=n.AvailableMusicTE16ListItems.length-1;i>=0;i--)n.AvailableMusicTE16ListItems[i].Id==t.Id&&n.AvailableMusicTE16ListItems.splice(i,1)});n.SelectedAvailMusicTE16ListItems=[];n.SelectedSelectedMusicTE16ListItems=[]};n.removeDuplicatesMusicTE16ForDualListFromSelected=function(){angular.forEach(n.SelectedMusicTE16ListItems,function(t){for(var i=n.AvailableMusicTE16ListItems.length-1;i>=0;i--)n.AvailableMusicTE16ListItems[i].Id==t.Id&&n.AvailableMusicTE16ListItems.splice(i,1)})};n.editPerson=function(){f.setPersonId(n.subMusic3months.PersonId);e.go("stateEditPerson")};n.saveAction=function(t){n.showAlertMusicPE16=n.showPe16&&p.isEmpty(n.SelectedMusicPE16ListItems)?!0:!1;n.showAlertMusicTE16=n.showTe16&&p.isEmpty(n.SelectedMusicTE16ListItems)?!0:!1;n.showAlertRegion=p.isEmpty(n.SelectedRegionsListItems)?!0:!1;n.canSave=!0;n.showAlertMusicPE16||n.showAlertMusicTE16||n.showAlertRegion||!n.canSave||n.InsOrUpd(t)};n.InsOrUpd=function(t){var r={SubstituteMusic3months:n.subMusic3months,RegionAndUnit:n.SelectedRegionsListItems,MusicSpecialistPE16:n.SelectedMusicPE16ListItems,MusicSpecialistTE16:n.SelectedMusicTE16ListItems,MusicSpecialistOthers:n.specialistother,ApplTemplate:"",UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Status:t},i=r;n.subMusic3months.Id!=null&&n.subMusic3months.Id!=""&&n.subMusic3months.Id!="undefined"?(n.subMusic3months.ModifiedBy=n.authentication.userName,p.postByParams(i,"/api/ApplSubstituteMusic3months/updateApplSubstituteMusic3months").then(function(){f.setPersonId(n.person.Id);e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)})):(n.subMusic3months.CreatedBy=n.authentication.userName,n.subMusic3months.DidacticYearId=n.applicationDidacticYear.Id,p.postByParams(i,"/api/ApplSubstituteMusic3months/insertApplSubstituteMusic3months").then(function(){f.setPersonId(n.subMusic3months.PersonId);e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)}))}};SubstituteMusic3monthsController.$inject=["$scope","$filter","$q","$uibModal","$log","PassParameters","$state","toaster","SubstituteMusicFactory","PersonFactory","PersonSpecialityFactory","PersonMusicSpecialityFactory","ApplicationTypeRegionAndUnitFactory","ApplicationTypeFekFactory","RegionAndFactory","GeneralFactory"];SubstituteMusicController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p){if(n.mess="",n.messInfo="",n.subMusic={IsTemporaryStored:!0},n.applicationType=5,n.step1=!0,n.step2=!1,n.continueDisabled=!0,n.intendancies=[],n.perspec={},n.SelectedSpecs=[],n.person={},n.showAlertSpec=!1,n.showAlertMusicTE16=!1,n.showAlertMusicPE16=!1,n.showAlertRegion=!1,n.hasValidFekNoConfirmSpeciality=!1,n.alerts="",n.showToConfirmSpeciality=!1,n.SelectedAvailRegionsItems=[],n.SelectedSelectedRegionsListItems=[],n.SelectedRegionsListItems=[],n.personmusicspecialists=[],n.DisableDLevel=!1,n.AvailableSpecListItems=[],n.AvailableRegionsListItems=[],n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.userLevel=0,n.canSave=!0,n.showTableWithMusic=!1,n.showPe16=!1,n.showTe16=!1,n.IsCivilServant=!1,n.applicationLevelId=0,n.permusicspecialists=[],blockUI({target:"#divBlockUI",animate:!0}),p.isValueInArray(p.getRoleCode(n.authentication.role),"d1, d2")&&(n.userLevel=n.authentication.levelId,n.subMusic.LevelId=n.authentication.levelId,n.subMusic.IntendancyId=n.authentication.regionAndUnitId),n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.authentication.isAuth){var w="subMusic";p.getByParams({role:n.authentication.role,codes:w},"/api/Subsystem/NewCheckPermission").then(function(r){var u=w.split(","),e,s;for(e in u)n.pageRules[u[e]]=t("filter")(r,{Code:u[e]},!0)[0].Rules;n.subMusic.Id=f.getApplicationId();n.applicationLevelId=f.getApplicationLevelId();p.isEmptyValue(n.applicationLevelId)&&(n.applicationLevelId=0);f.resetApplication();n.subMusic.PersonId=f.getPersonId();p.isEmptyValue(n.subMusic.Id)?(n.step1=!0,n.step2=!1):(n.step1=!1,n.step2=!0);p.isValueInArray(n.pageRules.subMusic.CanAccess,"u1, u2")&&(n.subMusic.PersonId=n.authentication.personId);s=i.all([p.getByParams({personId:n.subMusic.PersonId},"/api/ApplSubstituteMusic/getSpecialityForSubstituteMusic"),p.getByParams({Id:n.subMusic.PersonId},"/api/ApplSubstituteMusic/GetApplSubstituteMusic")]);s.then(function(i){var u,r;for(angular.copy(i[0],n.AvailableSpecListItems),n.applHourly=i[1],r=n.AvailableSpecListItems.length-1;r>=0;r--)n.AvailableSpecListItems[r].applHourly=0;for(u=n.applHourly.length-1;u>=0;u--)for(r=n.AvailableSpecListItems.length-1;r>=0;r--)n.applHourly[u].SpecialityId==n.AvailableSpecListItems[r].Id&&(n.AvailableSpecListItems[r].applHourly=1);p.isEmpty(n.AvailableSpecListItems)?(n.mess+="<li>Δεν μπορείτε να υποβάλετε αίτηση. Δεν βρίσκεστε στους τελικούς αξιολογικούς πίνακες κατάταξης του ΑΣΕΠ για κάποιον κλάδο.<\/li>",n.showAddEditForm=2):n.subMusic.Id!=null&&n.subMusic.Id!=""&&n.subMusic.Id!="undefined"?(p.isEmptyValue(n.subMusic.SpecialityId)&&(n.subMusic.SpecialityId=f.getSpecialityId()),p.getByParams({applicationTypeId:n.applicationType,specialityId:n.subMusic.SpecialityId},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(i){n.SelectedSpecListItems=t("filter")(n.AvailableSpecListItems,{Id:n.subMusic.SpecialityId},!0)[0];!p.isEmptyValue(i)||p.isValueInArray(p.getRoleCode(n.authentication.role),"a")?(n.canUpdateAppl=!0,n.showAddEditForm=1,n.getApplication()):(n.mess+="<li>Δεν μπορείτε να τροποποιήσετε την αίτηση γιατί δεν υπάρχει ανοιχτό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2)},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(n.canInsertAppl=!0,n.showAddEditForm=1)})},function(){unblockUI("#divBlockUI");o.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else e.go("/");n.checkCivilServant=function(){n.IsCivilServant==1?n.showCivilServantFull=!1:(n.subMusic.PublicServantFull=0,n.showCivilServantFull=!0)};n.showCivilServantBlock=function(){return n.IsCivilServant==!0?!0:!1};n.showDetails=function(){return n.SelectedSpecs.length>0?!0:!1};n.goToStep=function(i,r,u){i==2?p.getByParams({applicationTypeId:n.applicationType,specialityId:r},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(i){n.SelectedSpecListItems=t("filter")(n.AvailableSpecListItems,{Id:r},!0)[0];n.fek=i;p.isEmptyValue(i)?(n.mess="<li>Δεν υπαρχει ενεργό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2):(n.step1=!1,n.step2=!0,n.subMusic.SpecialityId=r,n.subMusic.LevelId=u,blockUI({target:"#divBlockUIForm",animate:!0}),n.doAll())},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.step1=!0,n.step2=!1,n.DisableDLevel=p.isEmpty(n.SelectedSpecListItems)&&p.isEmptyValue(n.subMusic.Id)?!1:!0)};n.changeLevel=function(){p.isEmptyValue(n.subMusic.LevelId)?(n.subMusic.LevelId=null,n.intendancies=[],n.subMusic.IntendancyId=null,n.continueDisabled=!0):(y.getIntendancies(n.subMusic.LevelId).then(function(t){n.intendancies=t}).catch(function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα στην εύρεση διευθύνσεων")}),p.isEmptyValue(n.subMusic.Id)&&(n.subMusic.IntendancyId=null),n.continueDisabled=!1)};n.changeIntendancies=function(){p.isEmptyValue(n.subMusic.LevelId)||p.isEmptyValue(n.subMusic.IntendancyId)?(n.continueDisabled=!0,n.subMusic.IntendancyId=null):n.continueDisabled=!1};n.checkSpecificMusicSpeciality=function(){n.showTableWithMusic=!1;n.showPe16=!1;n.showTe16=!1;n.SelectedSpecListItems.Code=="ΠΕ79.01"?n.showPe16=!0:n.SelectedSpecListItems.Code=="ΤΕ16.00"?n.showTe16=!0:n.showTableWithMusic=!0};n.findSpecsForDetails=function(){n.SelectedSpecs=[];angular.forEach(n.SelectedSpecListItems,function(t){for(var i=n.perspec.length-1;i>=0;i--)n.perspec[i].Speciality1.Id==t.Id&&n.SelectedSpecs.push(n.perspec[i])})};n.findMusicSpecialitiesBySpec=function(){n.musicspecialists=[];n.AvailableMusicPE16ListItems=[];n.AvailableMusicTE16ListItems=[];n.specialistother=[];for(var t=n.personmusicspecialists.length-1;t>=0;t--)n.personmusicspecialists[t].MusicSpecialistPerSpeciality.Speciality.Id==n.SelectedSpecListItems.Id&&(n.SelectedSpecListItems.Code=="ΠΕ79.01"?n.AvailableMusicPE16ListItems.push(n.personmusicspecialists[t].MusicSpecialistPerSpeciality):n.SelectedSpecListItems.Code=="ΤΕ16.00"?n.AvailableMusicTE16ListItems.push(n.personmusicspecialists[t].MusicSpecialistPerSpeciality):(n.musicspecialists.push(n.personmusicspecialists[t]),n.specialistother.push(n.personmusicspecialists[t].MusicSpecialistPerSpeciality)));n.removeDuplicatesMusicPE16ForDualListFromSelected();n.removeDuplicatesMusicTE16ForDualListFromSelected()};n.createTemplate=function(){return{content:[{style:"tableExample",table:{widths:["*"],body:[[{stack:[{text:"\nΑΙΤΗΣΗ / ΔΗΛΩΣΗ ΠΡΟΤΙΜΗΣΕΩΝ ΥΠΟΨΗΦΙΩΝ\nα.ΑΝΑΠΛΗΡΩΤΩΝ ΕΚΠΑΙΔΕΥΤΙΚΩΝ, β.ΩΡΟΜΙΣΘΙΩΝ ΕΚΠΑΙΔΕΥΤΙΚΩΝ\nΣΧΟΛΙΚΟΥ ΕΤΟΥΣ 2014-15",style:"header",alignment:"center"},{text:["Της ",{text:"αριθμ. 118102/Δ1/25.07.2014 (ΑΔΑ: Β3Ξ69-ΣΦΤ)",bold:!0}," εγκυκλίου του Υ.ΠΑΙ.Θ.\n"],fontSize:9},{text:"(επέχει θέση Υπεύθυνης Δήλωσης του Ν.1599/86)\n\n",fontSize:9}]}]]}},{style:"tableExample",table:{widths:["auto","*"],body:[[{text:["δια μέσου της Διεύθυνσης : ",{text:"Δ.Ε. Αχαΐας",bold:!0}],fontSize:9},{text:["Αρ. Πρωτοκόλου : ",{text:"1234567890",bold:!0}],fontSize:9,alignment:"right"}],[{text:"(συμπληρώνονται αυτόματα κατά την καταχώρηση της αίτησης)\n\n",fontSize:6},{text:["Ημερομηνία : ",{text:"20/04/2015",bold:!0}],fontSize:9,alignment:"right"}]]},layout:"noBorders"},{text:"\nΠΡΟΣΩΠΙΚΑ ΣΤΟΙΧΕΙΑ",style:"header",alignment:"center"},{style:"tableExample",table:{widths:["*"],body:[[{stack:[{style:"tableExample",table:{widths:["*","*"],body:[[{text:["Α.Φ.Μ : ",{text:"000000024",bold:!0}],fontSize:9},{text:["Α.Δ.Τ : ",{text:"ΑΖ 711210",bold:!0}],fontSize:9}],[{text:["ΕΠΩΝΥΜΟ : ",{text:"ΠΕΤΡΟΠΟΥΛΟΣ",bold:!0}],fontSize:9},{text:["ΟΝΟΜΑ : ",{text:"ΔΗΜΗΤΡΗΣ",bold:!0}],fontSize:9}],[{columns:[{width:90,text:"ΠΟΛΥΤΕΚΝΟΣ ",fontSize:9,alignment:"right"},{width:"*",image:"imgUncheckedBox",width:12,height:12},{width:90,text:"ΤΡΙΤΕΚΝΟΣ ",fontSize:9,alignment:"right"},{width:"*",image:"imgCheckedBox",width:12,height:12},{width:120,text:"ΠΑΙΔΑΓΩΓΙΚΗ ΚΑΤΑΡΤΙΣΗ ",fontSize:9,alignment:"right"},{width:"*",image:"imgUncheckedBox",width:12,height:12},{width:120,text:"ΔΗΜΟΣΙΟΣ ΥΠΑΛΛΗΛΟΣ ",fontSize:9,alignment:"right"},{width:"*",image:"imgCheckedBox",width:12,height:12}],colSpan:2}]]},layout:"noBorders"}]}]]}}],styles:{header:{fontSize:12,bold:!0,margin:[0,0,0,10]},subheader:{fontSize:16,bold:!0,margin:[0,10,0,5]},tableExample:{margin:[0,5,0,15]},tableHeader:{bold:!0,fontSize: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5LAHRm3FG3tZ5jFU/LsPMPCYCpW4RDKwD0bRF21SEBcEbDQdbiB7XWe1sPAQDHMu6qH7SeYxVnJItzBOCu1gMAwBpNfWct1CmAXa0HAIA1mvrOWphTAPsz/f+ZAHDArgy7a6rOSJJtL3rRi05N8uPGwxzLd2qtZ7ceAgDWqpRyb5IXtp7jGJ65PdP+7T9J7m49AACs092tB1jFGdsz/fP/32s9AACs09R315nbk5zWeopV7G49AACs09R312nbk+xsPcUq7ms9AACs09R3187tSXa0nuIY9tRaH2o9BACsx7i79rSe4xh2TD0Apl5QAHA0U95hkw+A+1sPAAAbNOUdNvkAmPLhEwA4linvMAEAAHMy5R0mAABgTqa8wwQAAMzJlHeYAACAOZnyDtuxPcnxrac4hn2tBwCADZryDjt+++p/BwBYNgIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQ9uT7Gs9xDEc33oAANigKe+wfduT7G09xTHsbD0AAGzQlHfYXgEAAPMx5R0mAABgTqa8wwQAAMzJlHeYAACAOZnyDpt8AJzeegAA2KAp77DJB8AZrQcAgA2a8g6bfADsLKWc2noIAFiPcXdN/hTAntZTrGLKBQUARzL13bVne5IHWk+xijNbDwAA6zT13fXA9iS7W0+xiue3HgAA1mnqu2v39iT3tZ5iFee1HgAA1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/XWrtchN0GwEqllBOSvC7JxUleER8lBFg2e5N8KcntST5Ta3288TzNCYDDlFKOS1IyhMD5Sc5JckLToQBYr8eTfC3JrgyLv9Zan2g70rQIgFWMFxC+JEMMnJ/kxUme1nQoAA73yyTfzLDwdyX5Rg8X8m2GAFin8XTBmePXGYf92XUEAPO1J8l9SXaPXwf/7LD++giAGSqlnJpfRcFpGYJgxypfxzcZFqC9fRnOzR/ra0+GR+3uTnJfrfWhNqMun/8PcskwF+bRQ44AAAAASUVORK5CYII="},defaultStyle:{columnGap:5}}};n.findMusicSpecialitiesBySpecForUpdate=function(){n.musicspecialists=[];n.SelectedMusicPE16ListItems=[];n.SelectedAvailMusicPE16ListItems=[];n.SelectedMusicTE16ListItems=[];n.SelectedAvailMusicTE16ListItems=[];n.specialistother=[];for(var t=0;t<n.permusicspecialists.length;t++)n.permusicspecialists[t].MusicSpecialistPerSpeciality.Speciality.Id==n.SelectedSpecListItems.Id&&(n.SelectedSpecListItems.Code=="ΠΕ79.01"?(n.SelectedMusicPE16ListItems.push(n.permusicspecialists[t].MusicSpecialistPerSpeciality),n.SelectedAvailMusicPE16ListItems.push(n.permusicspecialists[t].MusicSpecialistPerSpeciality),n.removeDuplicatesMusicPE16ForDualList()):n.SelectedSpecListItems.Code=="ΤΕ16.00"?(n.SelectedMusicTE16ListItems.push(n.permusicspecialists[t].MusicSpecialistPerSpeciality),n.SelectedAvailMusicTE16ListItems.push(n.permusicspecialists[t].MusicSpecialistPerSpeciality),n.removeDuplicatesMusicTE16ForDualList()):(n.musicspecialists.push(n.permusicspecialists[t]),n.specialistother.push(n.permusicspecialists[t].MusicSpecialistPerSpeciality)));n.checkSpecificMusicSpeciality()};n.getApplRegions=function(){n.SelectedSpecListItems.length>0&&n.hourlyTeacher.RegionAndUnitId>0?a.getTypeRegionAndUnitByMunicipality(n.hourlyTeacherMusic.RegionAndUnitId,n.applicationType,n.subMusic.LevelId).then(function(t){angular.copy(t,n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList()},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.AvailableRegionsListItems=[],n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[])};n.doAll=function(){n.subMusic.Id!=null&&n.subMusic.Id!=""&&n.subMusic.Id!="undefined"?(n.canUpdateAppl&&n.subMusic.PersonId!=null&&n.subMusic.PersonId!=""&&n.subMusic.PersonId!="undefined"&&h.getPersonForApplication(n.subMusic.PersonId).then(function(t){if(n.person=t,n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1,n.showCivilServantBlock(),n.checkCivilServant(),p.isValueInArray(n.pageRules.subMusic.CanAccess,"d1, d2, m1, m2")&&n.subMusic.LevelId!=n.authentication.levelId&&(n.canUpdateAppl=!1),!p.isEmpty(n.AvailableSpecListItems)){n.IsDisabled=!n.canUpdateAppl;n.IsDisabled&&(n.noUpdAccess=!0);n.subMusic.IsActive||(n.IsDisabled=!0,n.notActive=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.subMusic.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0);p.isEmpty(n.subMusic.ApplicationSubstituteMusicProtocols)||(n.protocol=n.subMusic.ApplicationSubstituteMusicProtocols[0].ProtocolString,n.showProtocol=!0);var r=i.all([p.getByParams({id:n.subMusic.PersonId},"/api/PersonMusicSpeciality/getMusicSpecialistsFromClassification"),s.getApplSubstituteMusicSpecialistsById(n.subMusic.Id),s.getApplRegionsByApplId(n.subMusic.Id),p.getByParams({level:n.subMusic.LevelId,applicationTypeId:n.applicationType,sex:n.person.Sex},"/api/ApplicationTypeRegionAndUnit/getApplicationRegionByAppTypeAndLevel")]);r.then(function(t){n.personmusicspecialists=t[0];n.permusicspecialists=t[1];n.SelectedRegionsListItems=t[2];n.SelectedAvailRegionsItems=t[2];angular.copy(t[3],n.AvailableRegionsListItems);n.removeDuplicatesRegionsForDualList();n.findMusicSpecialitiesBySpec();n.findMusicSpecialitiesBySpecForUpdate()},function(){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})}},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm")):(n.canInsertAppl&&n.subMusic.PersonId!=null&&n.subMusic.PersonId!=""&&n.subMusic.PersonId!="undefined"&&h.getPersonForApplication(n.subMusic.PersonId).then(function(t){if(n.person=t,n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1,n.showCivilServantBlock(),n.checkCivilServant(),p.isEmpty(n.SelectedSpecListItems)){var r=i.all([p.getByParams({id:n.subMusic.PersonId},"/api/PersonMusicSpeciality/getMusicSpecialistsFromClassification")]);r.then(function(t){n.personmusicspecialists=t[0];var r=i.all([p.getByParams({level:n.subMusic.LevelId,applicationTypeId:n.applicationType,sex:n.person.Sex},"/api/ApplicationTypeRegionAndUnit/getApplicationRegionByAppTypeAndLevel"),n.findMusicSpecialitiesBySpec()]);r.then(function(t){angular.copy(t[0],n.AvailableRegionsListItems);angular.copy(n.AvailableMusicTE16ListItems,n.SelectedAvailMusicTE16Items);angular.copy(n.AvailableMusicPE16ListItems,n.SelectedAvailMusicPE16Items);n.checkSpecificMusicSpeciality();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")},function(){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση tων περιοχών της αίτησης.")})},function(){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})}},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm"))};n.getApplication=function(){if(n.subMusic.Id!=null&&n.subMusic.Id!=""&&n.subMusic.Id!="undefined"&&(n.DisableDLevel=!0,n.canUpdateAppl&&n.subMusic.PersonId!=null&&n.subMusic.PersonId!=""&&n.subMusic.PersonId!="undefined")){var t=i.all([s.getSubstituteMusicById(n.subMusic.Id)]);t.then(function(t){n.subMusic=t[0];n.doAll()})}};n.SelectedSpecAvailItems=[];n.SelectedSelectedSpecListItems=[];n.SelectedSpecListItems=[];n.btnSpecUp=function(){for(var t,r,u,f=n.SelectedSelectedSpecListItems,i=0;i<n.SelectedSelectedSpecListItems.length;i++){if(t=n.SelectedSpecListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedSpecListItems[i].Id),t<=0||t>=n.SelectedSpecListItems.length)return;r=n.SelectedSpecListItems[t];u=n.SelectedSpecListItems[t-1];n.SelectedSpecListItems[t-1]=r;n.SelectedSpecListItems[t]=u}};n.btnSpecDown=function(){for(var t,r,u,i=n.SelectedSelectedSpecListItems.length-1;i>=0;i--){if(t=n.SelectedSpecListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedSpecListItems[i].Id),t<0||t>=n.SelectedSpecListItems.length-1)return;r=n.SelectedSpecListItems[t];u=n.SelectedSpecListItems[t+1];n.SelectedSpecListItems[t+1]=r;n.SelectedSpecListItems[t]=u}};n.btnSpecRight=function(){angular.forEach(n.SelectedAvailSpecItems,function(n){this.push(n)},n.SelectedSpecListItems);angular.forEach(n.SelectedAvailSpecItems,function(t){for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].Id==t.Id&&n.AvailableSpecListItems.splice(i,1)});n.findMusicSpecialitiesBySpec();n.checkSpecificMusicSpeciality();n.SelectedAvailSpecItems=[];n.SelectedSelectedSpecListItems=[]};n.btnSpecLeft=function(){angular.forEach(n.SelectedSelectedSpecListItems,function(n){this.push(n)},n.AvailableSpecListItems);angular.forEach(n.SelectedSelectedSpecListItems,function(t){for(var i=n.SelectedSpecListItems.length-1;i>=0;i--)n.SelectedSpecListItems[i].Id==t.Id&&(t.Code=="ΠΕ79.01"?(n.SelectedMusicPE16ListItems=[],n.SelectedAvailMusicPE16ListItems=[]):t.Code=="ΤΕ16.00"?(n.SelectedMusicTE16ListItems=[],n.SelectedAvailMusicTE16ListItems=[]):n.specialistother=[],n.SelectedSpecListItems.splice(i,1))});n.checkSpecificMusicSpeciality();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.btnAllSpecRight=function(){angular.forEach(n.AvailableSpecListItems,function(n){this.push(n)},n.SelectedSpecListItems);for(var t=n.AvailableSpecListItems.length-1;t>=0;t--)n.AvailableSpecListItems.splice(t,1);n.findMusicSpecialitiesBySpec();n.checkSpecificMusicSpeciality();n.AvailableRegionsListItems=[];n.getApplRegions();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.btnAllSpecLeft=function(){angular.forEach(n.SelectedSpecListItems,function(n){this.push(n)},n.AvailableSpecListItems);for(var t=n.SelectedSpecListItems.length-1;t>=0;t--)n.SelectedSpecListItems[t].Code=="ΠΕ19.01"?(n.SelectedMusicPE16ListItems=[],n.SelectedAvailMusicPE16ListItems=[]):n.SelectedSpecListItems[t].Code=="ΤΕ16.00"?(n.SelectedMusicTE16ListItems=[],n.SelectedAvailMusicTE16ListItems=[]):n.specialistother=[],n.SelectedSpecListItems.splice(t,1);n.checkSpecificMusicSpeciality();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.SelectedMusicPE16AvailItems=[];n.SelectedSelectedMusicPE16ListItems=[];n.SelectedMusicPE16ListItems=[];n.btnMusicPE16Up=function(){for(var t,r,u,f=n.SelectedSelectedMusicPE16ListItems,i=0;i<n.SelectedSelectedMusicPE16ListItems.length;i++){if(t=n.SelectedMusicPE16ListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedMusicPE16ListItems[i].Id),t<=0||t>=n.SelectedMusicPE16ListItems.length)return;r=n.SelectedMusicPE16ListItems[t];u=n.SelectedMusicPE16ListItems[t-1];n.SelectedMusicPE16ListItems[t-1]=r;n.SelectedMusicPE16ListItems[t]=u}};n.btnMusicPE16Down=function(){for(var t,r,u,i=n.SelectedSelectedMusicPE16ListItems.length-1;i>=0;i--){if(t=n.SelectedMusicPE16ListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedMusicPE16ListItems[i].Id),t<0||t>=n.SelectedMusicPE16ListItems.length-1)return;r=n.SelectedMusicPE16ListItems[t];u=n.SelectedMusicPE16ListItems[t+1];n.SelectedMusicPE16ListItems[t+1]=r;n.SelectedMusicPE16ListItems[t]=u}};n.btnMusicPE16Right=function(){angular.forEach(n.SelectedAvailMusicPE16Items,function(n){this.push(n)},n.SelectedMusicPE16ListItems);angular.forEach(n.SelectedAvailMusicPE16Items,function(t){for(var i=n.AvailableMusicPE16ListItems.length-1;i>=0;i--)n.AvailableMusicPE16ListItems[i].Id==t.Id&&n.AvailableMusicPE16ListItems.splice(i,1)});n.SelectedAvailMusicPE16Items=[];n.SelectedSelectedMusicPE16ListItems=[]};n.btnMusicPE16Left=function(){angular.forEach(n.SelectedSelectedMusicPE16ListItems,function(n){this.push(n)},n.AvailableMusicPE16ListItems);angular.forEach(n.SelectedSelectedMusicPE16ListItems,function(t){for(var i=n.SelectedMusicPE16ListItems.length-1;i>=0;i--)n.SelectedMusicPE16ListItems[i].Id==t.Id&&n.SelectedMusicPE16ListItems.splice(i,1)});n.SelectedSelectedMusicPE16ListItems=[];n.SelectedAvailMusicPE16Items=[]};n.btnAllMusicPE16Right=function(){angular.forEach(n.AvailableMusicPE16ListItems,function(n){this.push(n)},n.SelectedMusicPE16ListItems);for(var t=n.AvailableMusicPE16ListItems.length-1;t>=0;t--)n.AvailableMusicPE16ListItems.splice(t,1);n.SelectedSelectedMusicPE16ListItems=[];n.SelectedAvailMusicPE16Items=[]};n.btnAllMusicPE16Left=function(){angular.forEach(n.SelectedMusicPE16ListItems,function(n){this.push(n)},n.AvailableMusicPE16ListItems);for(var t=n.SelectedMusicPE16ListItems.length-1;t>=0;t--)n.SelectedMusicPE16ListItems.splice(t,1);n.SelectedSelectedMusicPE16ListItems=[];n.SelectedAvailMusicPE16Items=[]};n.SelectedMusicTE16AvailItems=[];n.SelectedSelectedMusicTE16ListItems=[];n.SelectedMusicTE16ListItems=[];n.btnMusicTE16Up=function(){for(var t,r,u,f=n.SelectedSelectedMusicTE16ListItems,i=0;i<n.SelectedSelectedMusicTE16ListItems.length;i++){if(t=n.SelectedMusicTE16ListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedMusicTE16ListItems[i].Id),t<=0||t>=n.SelectedMusicTE16ListItems.length)return;r=n.SelectedMusicTE16ListItems[t];u=n.SelectedMusicTE16ListItems[t-1];n.SelectedMusicTE16ListItems[t-1]=r;n.SelectedMusicTE16ListItems[t]=u}};n.btnMusicTE16Down=function(){for(var t,r,u,i=n.SelectedSelectedMusicTE16ListItems.length-1;i>=0;i--){if(t=n.SelectedMusicTE16ListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedMusicTE16ListItems[i].Id),t<0||t>=n.SelectedMusicTE16ListItems.length-1)return;r=n.SelectedMusicTE16ListItems[t];u=n.SelectedMusicTE16ListItems[t+1];n.SelectedMusicTE16ListItems[t+1]=r;n.SelectedMusicTE16ListItems[t]=u}};n.btnMusicTE16Right=function(){angular.forEach(n.SelectedAvailMusicTE16Items,function(n){this.push(n)},n.SelectedMusicTE16ListItems);angular.forEach(n.SelectedAvailMusicTE16Items,function(t){for(var i=n.AvailableMusicTE16ListItems.length-1;i>=0;i--)n.AvailableMusicTE16ListItems[i].MusicSpecialist.Id==t.MusicSpecialist.Id&&n.AvailableMusicTE16ListItems.splice(i,1)});n.SelectedAvailMusicTE16Items=[];n.SelectedSelectedMusicTE16ListItems=[]};n.btnMusicTE16Left=function(){angular.forEach(n.SelectedSelectedMusicTE16ListItems,function(n){this.push(n)},n.AvailableMusicTE16ListItems);angular.forEach(n.SelectedSelectedMusicTE16ListItems,function(t){for(var i=n.SelectedMusicTE16ListItems.length-1;i>=0;i--)n.SelectedMusicTE16ListItems[i].MusicSpecialist.Id==t.MusicSpecialist.Id&&n.SelectedMusicTE16ListItems.splice(i,1)});n.SelectedSelectedMusicTE16ListItems=[];n.SelectedAvailMusicTE16Items=[]};n.btnAllMusicTE16Right=function(){angular.forEach(n.AvailableMusicTE16ListItems,function(n){this.push(n)},n.SelectedMusicTE16ListItems);for(var t=n.AvailableMusicTE16ListItems.length-1;t>=0;t--)n.AvailableMusicTE16ListItems.splice(t,1);n.SelectedSelectedMusicTE16ListItems=[];n.SelectedAvailMusicTE16Items=[]};n.btnAllMusicTE16Left=function(){angular.forEach(n.SelectedMusicTE16ListItems,function(n){this.push(n)},n.AvailableMusicTE16ListItems);for(var t=n.SelectedMusicTE16ListItems.length-1;t>=0;t--)n.SelectedMusicTE16ListItems.splice(t,1);n.SelectedSelectedMusicTE16ListItems=[];n.SelectedAvailMusicTE16Items=[]};n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[];n.SelectedRegionsListItems=[];n.btnRegionsUp=function(){for(var t,r,u,f=n.SelectedSelectedRegionsListItems,i=0;i<n.SelectedSelectedRegionsListItems.length;i++){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<=0||t>=n.SelectedRegionsListItems.length)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t-1];n.SelectedRegionsListItems[t-1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsDown=function(){for(var t,r,u,i=n.SelectedSelectedRegionsListItems.length-1;i>=0;i--){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<0||t>=n.SelectedRegionsListItems.length-1)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t+1];n.SelectedRegionsListItems[t+1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsRight=function(){angular.forEach(n.SelectedAvailRegionsItems,function(n){this.push(n)},n.SelectedRegionsListItems);angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.btnRegionsLeft=function(){angular.forEach(n.SelectedSelectedRegionsListItems,function(n){this.push(n)},n.AvailableRegionsListItems);angular.forEach(n.SelectedSelectedRegionsListItems,function(t){for(var i=n.SelectedRegionsListItems.length-1;i>=0;i--)n.SelectedRegionsListItems[i].Id==t.Id&&n.SelectedRegionsListItems.splice(i,1)});n.SelectedSelectedRegionsListItems=[];n.SelectedAvailRegionsItems=[]};n.getApplRegions=function(){n.SelectedSpecListItems.length>0?(n.AvailableRegionsListItems=[],p.getByParams({level:n.subMusic.LevelId,applicationTypeId:n.applicationType,sex:n.person.Sex},"/api/ApplicationTypeRegionAndUnit/getApplicationRegionByAppTypeAndLevel").then(function(t){angular.copy(t,n.AvailableRegionsListItems);n.removeDuplicatesRegionsForDualList()},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(n.AvailableRegionsListItems=[],n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[])};n.removeDuplicatesRegionsForDualList=function(){angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.removeDuplicatesSpecsForDualList=function(){angular.forEach(n.SelectedAvailSpecItems,function(t){for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].Id==t.Id&&n.AvailableSpecListItems.splice(i,1)});n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.removeDuplicatesMusicPE16ForDualList=function(){angular.forEach(n.SelectedAvailMusicPE16ListItems,function(t){for(var i=n.AvailableMusicPE16ListItems.length-1;i>=0;i--)n.AvailableMusicPE16ListItems[i].Id==t.Id&&n.AvailableMusicPE16ListItems.splice(i,1)});n.SelectedAvailMusicPE16ListItems=[];n.SelectedSelectedMusicPE16ListItems=[]};n.removeDuplicatesMusicPE16ForDualListFromSelected=function(){angular.forEach(n.SelectedMusicPE16ListItems,function(t){for(var i=n.AvailableMusicPE16ListItems.length-1;i>=0;i--)n.AvailableMusicPE16ListItems[i].Id==t.Id&&n.AvailableMusicPE16ListItems.splice(i,1)})};n.removeDuplicatesMusicTE16ForDualList=function(){angular.forEach(n.SelectedAvailMusicTE16ListItems,function(t){for(var i=n.AvailableMusicTE16ListItems.length-1;i>=0;i--)n.AvailableMusicTE16ListItems[i].Id==t.Id&&n.AvailableMusicTE16ListItems.splice(i,1)});n.SelectedAvailMusicTE16ListItems=[];n.SelectedSelectedMusicTE16ListItems=[]};n.removeDuplicatesMusicTE16ForDualListFromSelected=function(){angular.forEach(n.SelectedMusicTE16ListItems,function(t){for(var i=n.AvailableMusicTE16ListItems.length-1;i>=0;i--)n.AvailableMusicTE16ListItems[i].Id==t.Id&&n.AvailableMusicTE16ListItems.splice(i,1)})};n.editPerson=function(){f.setPersonId(n.subMusic.PersonId);e.go("stateEditPerson")};n.saveAction=function(t){n.showAlertMusicPE16=n.showPe16&&p.isEmpty(n.SelectedMusicPE16ListItems)?!0:!1;n.showAlertMusicTE16=n.showTe16&&p.isEmpty(n.SelectedMusicTE16ListItems)?!0:!1;n.showAlertRegion=p.isEmpty(n.SelectedRegionsListItems)?!0:!1;n.canSave=!0;n.showAlertMusicPE16||n.showAlertMusicTE16||n.showAlertRegion||!n.canSave||n.InsOrUpd(t)};n.InsOrUpd=function(t){var r={SubstituteMusic:n.subMusic,RegionAndUnit:n.SelectedRegionsListItems,MusicSpecialistPE16:n.SelectedMusicPE16ListItems,MusicSpecialistTE16:n.SelectedMusicTE16ListItems,MusicSpecialistOthers:n.specialistother,ApplTemplate:"",UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Status:t},i=r;n.subMusic.Id!=null&&n.subMusic.Id!=""&&n.subMusic.Id!="undefined"?(n.subMusic.ModifiedBy=n.authentication.userName,s.updateApplSubstituteMusic(i).then(function(){f.setPersonId(n.person.Id);e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)})):(n.subMusic.CreatedBy=n.authentication.userName,n.subMusic.DidacticYearId=n.applicationDidacticYear.Id,s.insertApplSubstituteMusic(i).then(function(){f.setPersonId(n.subMusic.PersonId);e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)}))}};SubstituteMusicController.$inject=["$scope","$filter","$q","$uibModal","$log","PassParameters","$state","toaster","SubstituteMusicFactory","PersonFactory","PersonSpecialityFactory","PersonMusicSpecialityFactory","ApplicationTypeRegionAndUnitFactory","ApplicationTypeFekFactory","RegionAndFactory","GeneralFactory"];SubstitutePE8702SchoolController=function(n,t,i,r,u,f,e,o){if(n.mess="",n.messInfo="",n.subPE8702School={IsTemporaryStored:!0},n.subPE8702SchoolOld=[],n.person={},n.applicationType=35,n.step1=!0,n.step2=!1,n.continueDisabled=!0,n.perspec={},n.SelectedSpecs=[],n.hasValidFekNoConfirmSpeciality=!1,n.alerts="",n.showToConfirmSpeciality=!1,n.selected={Years:[]},n.HasSpecPe70=!1,n.HasSpecPe11Pe06=!1,n.SelectedAvailRegionsItems=[],n.SelectedSelectedRegionsListItems=[],n.SelectedRegionsListItems=[],n.AvailableSpecListItems=[],n.AvailableRegionsListItems=[],n.showAlertSpec=!1,n.showAlertRegion=!1,n.DisableDLevel=!1,n.protocol="",n.showProtocol=!1,n.cannotUpdate=!1,n.notActive=!1,n.noUpdAccess=!1,n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.userLevel=0,n.fek={},n.hasboth=!1,n.HasFullLevel1=[],n.HasFullLevel2=[],n.HasNoFullLevel1=[],n.HasNoFullLevel2=[],n.enableButtonSave=!1,n.applicationLevelId=0,blockUI({target:"#divBlockUI",animate:!0}),n.goToStep=function(t,i){t==2?u.getByParams({applicationTypeId:n.applicationType,specialityId:i},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(t){n.SelectedSpecListItems=f("filter")(n.AvailableSpecListItems,{Id:i},!0)[0];n.fek=t;u.isEmptyValue(t)?(n.mess="<li>Δεν υπαρχει ενεργό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2):(n.step1=!1,n.step2=!0,n.subPE8702School.SpecialityId=i,n.subPE8702School.LevelId=n.SelectedSpecListItems.LevelId,blockUI({target:"#divBlockUIForm",animate:!0}),n.doAll())},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.step1=!0,n.step2=!1,n.DisableDLevel=u.isEmpty(n.SelectedSpecListItems)&&u.isEmptyValue(n.subPE8702School.Id)?!1:!0,n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[])},n.canSave=!0,n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.authentication.isAuth){var s="subPE8702School";u.getByParams({role:n.authentication.role,codes:s},"/api/Subsystem/NewCheckPermission").then(function(i){var o=s.split(","),h,c;for(h in o)n.pageRules[o[h]]=f("filter")(i,{Code:o[h]},!0)[0].Rules;n.subPE8702School.Id=t.getApplicationId();n.applicationLevelId=t.getApplicationLevelId();u.isEmptyValue(n.applicationLevelId)&&(n.applicationLevelId=0);u.isEmptyValue(n.subPE8702School.Id)?(n.step1=!0,n.step2=!1):(n.step1=!1,n.step2=!0);t.resetApplication();n.subPE8702School.PersonId=t.getPersonId();u.isValueInArray(n.pageRules.subPE8702School.CanAccess,"u1, u2")&&(n.subPE8702School.PersonId=n.authentication.personId);c=e.all([u.getByParams({personId:n.subPE8702School.PersonId},"/api/ApplSubstitutePE8702School/getSpecialityForSubstituteSchool"),u.getByParams({Id:n.subPE8702School.PersonId},"/api/ApplSubstitutePE8702School/GetApplSubstituteSchool"),u.getByParams({personId:n.subPE8702School.PersonId},"/api/RecruitmentServiceAssumed/getSubstitutesServiceAssumed")]);c.then(function(i){var s,o,e;for(angular.copy(i[0].PersonSelectedSpec,n.AvailableSpecListItems),n.CanWorkAsEEP=i[0].CanWorkAsEEP,n.applSub=i[1],s=i[2].substitutes,n.subs=f("filter")(s,function(n){return n.SubstitutesTypeId!=9&&n.SubstitutesTypeId!=10&&n.SubstitutesTypeId!=11&&n.SubstitutesTypeId!=12}),e=n.AvailableSpecListItems.length-1;e>=0;e--)n.AvailableSpecListItems[e].hasApplPerm=0;for(o=n.applSub.length-1;o>=0;o--)for(e=n.AvailableSpecListItems.length-1;e>=0;e--)n.applSub[o].SpecialityId==n.AvailableSpecListItems[e].Id&&(n.AvailableSpecListItems[e].hasApplSub=1);n.subPE8702School.Id!=null&&n.subPE8702School.Id!=""&&n.subPE8702School.Id!="undefined"?(u.isEmptyValue(n.subPE8702School.SpecialityId)&&(n.subPE8702School.SpecialityId=t.getSpecialityId()),u.getByParams({applicationTypeId:n.applicationType,specialityId:n.subPE8702School.SpecialityId},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(t){n.fek=t;n.SelectedSpecListItems=f("filter")(n.AvailableSpecListItems,{Id:n.subPE8702School.SpecialityId},!0)[0];u.isEmptyValue(t)||u.isEmptyValue(n.SelectedSpecListItems)?(n.mess+="<li>Δεν μπορείτε να τροποποιήσετε την αίτηση γιατί δεν υπάρχει ανοιχτό ΦΕΚ <\/li>",n.showAddEditForm=2):(n.canUpdateAppl=!0,n.showAddEditForm=1,n.getApplication())},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):u.isEmpty(n.AvailableSpecListItems)?(u.isEmpty(n.subs)?n.CanWorkAsEEP==2?n.mess+="<li>Δεν μπορεί να υποβληθεί αίτηση καθώς δεν πληρούνται οι προϋποθέσεις του άρθρου 165 του ν.4763/2020 (ΦΕΚ 254Α)<\/li>":n.CanWorkAsEEP==0&&(n.mess+="<li>Δεν μπορείτε να υποβάλετε αίτηση. Δεν βρίσκεστε στον ενιαίο πίνακα για τον κλάδο ΠΕ87.02 <\/li>"):n.mess+="<li>Δεν μπορείτε να υποβάλετε αίτηση. Έχετε ήδη προσληφθεί το τρέχον σχολικό έτος<\/li>",n.showAddEditForm=2):(n.canInsertAppl=!0,n.showAddEditForm=1)})},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml");unblockUI("#divBlockUI")})}else i.go("/");u.isValueInArray(u.getRoleCode(n.authentication.role),"d1, d2")&&(n.userLevel=n.authentication.levelId,n.subPE8702School.LevelId=n.authentication.levelId,n.subPE8702School.IntendancyId=n.authentication.regionAndUnitId);n.changeSelectHeight=function(){var t,i,r;n.HasFullLevel1=f("filter")(n.AvailableRegionsListItems,{IsFull:!0,Level:1},!0)[0];n.HasFullLevel2=f("filter")(n.AvailableRegionsListItems,{IsFull:!0,Level:2},!0)[0];n.HasNoFullLevel1=f("filter")(n.AvailableRegionsListItems,{IsFull:!1,Level:1},!0)[0];n.HasNoFullLevel2=f("filter")(n.AvailableRegionsListItems,{IsFull:!1,Level:2},!0)[0];t=0;u.isEmptyValue(n.HasFullLevel1)||(t=t+15);u.isEmptyValue(n.HasFullLevel2)||(t=t+15);u.isEmptyValue(n.HasNoFullLevel1)||(t=t+15);u.isEmptyValue(n.HasNoFullLevel2)||(t=t+15);i=document.getElementsByTagName("SELECT")[4];r=document.getElementsByTagName("TABLE");i.id==="selectedRegionslistfinal"&&(i.size=t,r[0].height=t*15,r[1].height=t*15)};n.checkCivilServant=function(){n.IsCivilServant==1?n.showCivilServantFull=!1:(n.subPE8702School.PublicServantFull=0,n.showCivilServantFull=!0)};n.showCivilServantBlock=function(){return n.IsCivilServant==!0?!0:!1};n.checkForBoth=function(){n.hasboth=f("filter")(n.AvailableRegionsListItems,function(n){return n.Level==1}).length>0&&f("filter")(n.AvailableRegionsListItems,function(n){return n.Level==2}).length>0?!0:!1;n.hasboth||(n.sub.AcceptAllSubstitudeToPrimarySpecialEducation=!1)};n.showDetails=function(){return n.SelectedSpecs.length>0?!0:!1};n.changeLevel=function(){u.isEmptyValue(n.subPE8702School.LevelId)?(n.subPE8702School.LevelId=null,n.intendancies=[],n.subPE8702School.IntendancyId=null,n.continueDisabled=!0):(RegionAndFactory.getIntendancies(n.subPE8702School.LevelId).then(function(t){n.intendancies=t}).catch(function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα στην εύρεση διευθύνσεων")}),u.isEmptyValue(n.subPE8702School.Id)&&(n.subPE8702School.IntendancyId=null),n.continueDisabled=!1)};n.doAll=function(){if(u.isEmpty(n.applSub)||(n.subPE8702SchoolOld=f("filter")(n.applSub,{SpecialityId:n.subPE8702School.SpecialityId},!0)[0],u.isEmptyValue(n.subPE8702SchoolOld)||(n.subPE8702School=n.subPE8702SchoolOld,n.subPE8702School.LevelId=n.SelectedSpecListItems.LevelId),n.canUpdateAppl=!0,n.showAddEditForm=1),n.subPE8702School.Id!=null&&n.subPE8702School.Id!=""&&n.subPE8702School.Id!="undefined")n.canUpdateAppl&&n.subPE8702School.PersonId!=null&&n.subPE8702School.PersonId!=""&&n.subPE8702School.PersonId!="undefined"&&o.getPersonForApplication(n.subPE8702School.PersonId).then(function(t){if(n.person=t,n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1,n.showCivilServantBlock(),n.checkCivilServant(),n.enableSave(),u.isEmpty(n.SelectedSpecListItems)){u.isValueInArray(n.pageRules.subPE8702School.CanAccess,"d1, d2, m1, m2")&&n.subPE8702School.LevelId!=n.authentication.levelId&&(n.canUpdateAppl=!1);n.IsDisabled=!n.canUpdateAppl;n.subPE8702School.IsActive||(n.IsDisabled=!0,n.notActive=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.subPE8702School.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0);u.isEmpty(n.subPE8702School.ApplicationSubstituteProtocols)||(n.protocol=n.subPE8702School.ApplicationSubstituteProtocols[0].ProtocolString,n.showProtocol=!0);var i=e.all([u.getByParams({applicationId:n.subPE8702School.Id,ApplicationTypeFekId:n.fek.Id},"/api/ApplSubstitutePE8702School/GetApplRegionsByApplId"),u.getByParams({specialityId:n.SelectedSpecListItems.Id,personId:n.subPE8702School.PersonId},"/api/ApplSubstitutePE8702School/GetAvailRegionsBySpecialityId"),]);i.then(function(t){n.SelectedRegionsListItems=t[0];n.SelectedAvailRegionsItems=t[0];angular.copy(t[1],n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;u.isEmptyValue(n.AvailableRegionsListItems)?(n.mess+="<li>Δεν υπάρχουν διαθέσιμα κενά για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2):(n.changeSelectHeight(),n.removeDuplicatesRegionsForDualList());unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των περιοχών της αίτησης.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})}},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description);unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")}),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm");else{if(n.canInsertAppl&&n.subPE8702School.PersonId!=null&&n.subPE8702School.PersonId!=""&&n.subPE8702School.PersonId!="undefined"){var t=e.all([o.getPersonForApplication(n.subPE8702School.PersonId)]);t.then(function(t){n.person=t[0];n.SelectedAvailSpecItems=[];n.SelectedSelectedSpecListItems=[];n.AvailableRegionsListItems=[];n.enableSave();u.isEmptyValue(n.SelectedSpecListItems)||u.getByParams({specialityId:n.SelectedSpecListItems.Id,personId:n.subPE8702School.PersonId},"/api/ApplSubstitutePE8702School/GetAvailRegionsBySpecialityId").then(function(t){angular.copy(t,n.AvailableRegionsListItems);u.isEmptyValue(n.AvailableRegionsListItems)?(n.mess+="<li>Δεν υπάρχουν διαθέσιμα κενά για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2):(n.SelectedAvailRegionsItems=n.SelectedRegionsListItems,n.changeSelectHeight(),n.removeDuplicatesRegionsForDualList());unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description);unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})}unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")}};n.openModal=function(t,i){n.myList=[];n.selectedCode=i;angular.copy(t,n.myList)};n.getApplication=function(){if(n.subPE8702School.Id!=null&&n.subPE8702School.Id!=""&&n.subPE8702School.Id!="undefined"&&(n.DisableDLevel=!0,n.canUpdateAppl&&n.subPE8702School.PersonId!=null&&n.subPE8702School.PersonId!=""&&n.subPE8702School.PersonId!="undefined")){var t=e.all([u.getByParams({Id:n.subPE8702School.Id},"/api/ApplSubstitutePE8702School/GetApplSubstituteSchoolById")]);t.then(function(t){n.subPE8702School=t[0];n.doAll();var i=e.all([u.getByParams({personId:n.subPE8702School.PersonId,applicationTypeId:n.applicationType,didacticYearId:n.subPE8702School.DidacticYearId,applicationId:n.subPE8702School.Id},"api/HistoryAppl/getLevelByApplTypeIdAndPersonIdAndYear")]);i.then(function(t){n.levels=t[0];n.changeLevel();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})})}};n.SelectedSpecAvailItems=[];n.SelectedSelectedSpecListItems=[];n.SelectedSpecListItems=[];n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[];n.SelectedRegionsListItems=[];n.btnRegionsUp=function(){for(var t,r,u,f=n.SelectedSelectedRegionsListItems,i=0;i<n.SelectedSelectedRegionsListItems.length;i++){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<=0||t>=n.SelectedRegionsListItems.length)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t-1];n.SelectedRegionsListItems[t-1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsDown=function(){for(var t,r,u,i=n.SelectedSelectedRegionsListItems.length-1;i>=0;i--){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<0||t>=n.SelectedRegionsListItems.length-1)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t+1];n.SelectedRegionsListItems[t+1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsRight=function(){angular.forEach(n.SelectedAvailRegionsItems,function(n){this.push(n)},n.SelectedRegionsListItems);angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SpecialSupport==!1&&(n.subPE8702School.AcceptFullSubstitudeForSpecialSupport=!1);n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.btnRegionsLeft=function(){angular.forEach(n.SelectedSelectedRegionsListItems,function(n){this.push(n)},n.AvailableRegionsListItems);angular.forEach(n.SelectedSelectedRegionsListItems,function(t){for(var i=n.SelectedRegionsListItems.length-1;i>=0;i--)n.SelectedRegionsListItems[i].Id==t.Id&&n.SelectedRegionsListItems.splice(i,1)});n.SpecialSupport==!1&&(n.subPE8702School.AcceptFullSubstitudeForSpecialSupport=!1);n.SelectedSelectedRegionsListItems=[];n.SelectedAvailRegionsItems=[]};n.checkRegions=function(){var i=0,t=0,f=60,u=30;n.canInsertRegions=!0;n.SelectedRegionsListItems.length+n.SelectedAvailRegionsItems.length>f&&(r.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών","Δεν μπορείτε να επιλέξετε περισσότερες από "+f+" περιοχές"),n.canInsertRegions=!1);angular.forEach(n.SelectedRegionsListItems,function(n){n.Level==1?i=i+1:t=t+1});angular.forEach(n.SelectedAvailRegionsItems,function(n){n.Level==1?i=i+1:t=t+1});i>u&&(r.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών Α/βάθμιας","Δεν μπορείτε να επιλέξετε περισσότερες από "+u+" περιοχές Α/βάθμιας"),n.canInsertRegions=!1);t>t&&(r.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών Β/βάθμιας","Δεν μπορείτε να επιλέξετε περισσότερες από "+u+" περιοχές Β/βάθμιας"),n.canInsertRegions=!1)};n.removeDuplicatesRegionsForDualList=function(){angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.editPerson=function(){t.setPersonId(n.subPE8702School.PersonId);i.go("stateEditPerson")};n.saveAction=function(t){n.showAlertRegion=u.isEmpty(n.SelectedRegionsListItems)?!0:!1;n.canSave=!0;n.showAlertSpec||n.showAlertRegion||!n.canSave||n.InsOrUpd(t)};n.enableSave=function(){n.enableButtonSave=n.subPE8702School.HasNursePracticeLicense==!0?!0:!1};n.InsOrUpd=function(f){n.subPE8702School.SpecialityId=n.SelectedSpecListItems.Id;n.subPE8702School.LevelId=n.SelectedSpecListItems.LevelId;var o={SubstitutePE8702School:n.subPE8702School,RegionAndUnit:n.SelectedRegionsListItems,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Status:f,ApplicationTypeFekId:n.fek.Id},e=o;n.subPE8702School.Id!=null&&n.subPE8702School.Id!=""&&n.subPE8702School.Id!="undefined"?(n.subPE8702School.ModifiedBy=n.authentication.userName,u.postByParams(e,"/api/ApplSubstitutePE8702School/updateApplSubstituteSchool").then(function(){t.setPersonId(n.subPE8702School.PersonId);i.go("history")}).catch(function(n){r.pop("error","Παρουσιάστηκε σφάλμα",n.data)})):(n.subPE8702School.DidacticYearId=n.didacticYear.Id,n.subPE8702School.CreatedBy=n.authentication.userName,u.postByParams(e,"/api/ApplSubstitutePE8702School/insertApplSubstituteSchool").then(function(){t.setPersonId(n.subPE8702School.PersonId);i.go("history")}).catch(function(n){r.pop("error","Παρουσιάστηκε σφάλμα",n.data)}))}};SubstitutePE8702SchoolController.$inject=["$scope","PassParameters","$state","toaster","GeneralFactory","$filter","$q","PersonFactory"];SubstitutePlacementSchoolController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y){if(n.mess="",n.messInfo="",n.substitutePlacementSchool={IsTemporaryStored:!0},n.substituteInfo={},n.sortableList={},n.applicationType=41,n.step1=!0,n.step2=!1,n.hasValidFekNoConfirmSpeciality=!1,n.alerts="",n.showToConfirmSpeciality=!1,n.selected={Years:[]},n.showAlertSpec=!1,n.showAlertRegion=!1,n.protocol="",n.showProtocol=!1,n.cannotUpdate=!1,n.notActive=!1,n.noUpdAccess=!1,n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.userLevel=0,n.fek={},n.hasboth=!1,n.applicationLevelId=0,n.canSave=!0,n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.authentication.isAuth){var p="substitutePlacementSchool";y.getByParams({role:n.authentication.role,codes:p},"/api/Subsystem/NewCheckPermission").then(function(i){var r=p.split(",");for(var u in r)n.pageRules[r[u]]=t("filter")(i,{Code:r[u]},!0)[0].Rules;n.substitutePlacementSchool.Id=f.getApplicationId();n.applicationLevelId=f.getApplicationLevelId();y.isEmptyValue(n.applicationLevelId)&&(n.applicationLevelId=0);f.resetApplication();n.substituteInfo.PersonId=f.getPersonId();y.isValueInArray(n.pageRules.substitutePlacementSchool.CanAccess,"u1, u2")&&(n.substituteInfo.PersonId=n.authentication.personId);y.postByParams({PersonId:n.substituteInfo.PersonId,SubstitutePlacementSchoolId:n.substitutePlacementSchool.Id},"/api/ApplSubstitutePlacementSchool/GetSubstituteInfoAsync").then(function(t){t.success&&t.data&&t.data.SubstituteId?(n.substituteInfo=t.data,y.getByParams({applicationTypeId:n.applicationType,specialityId:n.substituteInfo.SpecialityId},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(t){n.fek=t;y.isEmptyValue(t)?(n.mess="<li>Δεν υπάρχει ενεργή προθεσμία υποβολής αίτησης τοποθέτησης αναπληρωτή για τον κλάδο "+n.substituteInfo.SpecialityCode+"<\/li>",n.showAddEditForm=2):y.postByParams({SubstituteId:n.substituteInfo.SubstituteId},"/api/ApplSubstitutePlacementSchool/CheckIfApplicationExistsAsync").then(function(t){if(t.data)y.postByParams({SubstituteId:n.substituteInfo.SubstituteId},"/api/ApplSubstitutePlacementSchool/GetApplicationDataAsync").then(function(t){t.success?(n.step1=!1,n.step2=!0,n.substitutePlacementSchool.Id=t.data.Id,n.substitutePlacementSchool.LastEditDate=t.data.LastEditDate,n.sortableList=t.data.PlacementGap):(n.mess="<li>Παρουσιάστηκε σφάλμα κατά την ανάκτηση της αίτησης τοποθέτησης ("+t.message+")<\/li>",n.showAddEditForm=2)},function(){n.mess="<li>Παρουσιάστηκε σφάλμα κατά την ανάκτηση της αίτησης τοποθέτησης<\/li>";n.showAddEditForm=2});else{let t={RegionAndUnitId:n.substituteInfo.RegionAndUnitId,LevelId:n.substituteInfo.LevelId,IsFull:n.substituteInfo.IsFull,DidactidYearId:n.substituteInfo.DidacticYearId,RecruitmentDate:n.substituteInfo.RecruitmentDate,GapType:n.substituteInfo.GapType,SpecialityId:n.substituteInfo.SpecialityId};y.postByParams(t,"/api/ApplSubstitutePlacementSchool/CheckForConfirmPlacementGapsAsync").then(function(t){if(t.success&&t.data&&t.data.Id){n.step1=!1;n.step2=!0;let i=1;angular.forEach(t.data.Groups,function(n){n.CustomOrder=i;i++});n.sortableList=t.data}else t.success&&(!t.data||t.data.Id)?(n.mess="<li>Δεν έχουν οριστεί ή επιβεβαιωθεί κενά από την Διεύθυνση πρόσληψής σας<\/li>",n.showAddEditForm=2):(n.mess="<li>Παρουσιάστηκε σφάλμα κατά τον έλεγχο οριστικοποιημένων κενών από την Δ/νση ("+t.message+")<\/li>",n.showAddEditForm=2)},function(){n.mess="<li>Παρουσιάστηκε σφάλμα κατά τον έλεγχο οριστικοποιημένων κενών από την Δ/νση<\/li>";n.showAddEditForm=2})}},function(){n.mess="<li>Παρουσιάστηκε σφάλμα κατά τον έλεγχο της αίτησης<\/li>";n.showAddEditForm=2})},function(){n.mess+="<li>Παρουσιάστηκε σφάλμα κατά τον έλεγχο των κλάδων που έχουν δικαίωμα υποβολής αίτησης τοποθέτησης αναπληρωτή<\/li>";n.showAddEditForm=2})):!t.success||t.data&&t.data.SubstituteId?(n.mess+="<li>Παρουσιάστηκε σφάλμα κατά την ανάκτηση των στοιχείων πρόσληψής σας "+t.message+"<\/li>",n.showAddEditForm=2):(n.mess+="<li>Δεν έχετε προσληφθεί ως αναπληρωτής στην παρούσα φάση προσλήψεων<\/li>",n.mess+="<li>Δεν απαιτείται να υποβάλετε αίτηση – δήλωση προτίμησης τοποθέτησης αναπληρωτή<\/li>",n.showAddEditForm=2)},function(){n.mess+="<li>Παρουσιάστηκε σφάλμα κατά την ανάκτηση των στοιχείων πρόσληψής σας<\/li>";n.showAddEditForm=2})},function(){o.pop("warning","Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml")})}else e.go("/");y.isValueInArray(y.getRoleCode(n.authentication.role),"d1, d2")&&(n.userLevel=n.authentication.levelId,n.substitutePlacementSchool.LevelId=n.authentication.levelId,n.substitutePlacementSchool.IntendancyId=n.authentication.regionAndUnitId);n.editPerson=function(){f.setPersonId(n.substituteInfo.PersonId);e.go("stateEditPerson")};n.sortByCustomOrder=function(){n.sortableList.Groups=t("orderBy")(n.sortableList.Groups,"CustomOrder")};n.dragControlListeners={orderChanged:function(){let t=1;angular.forEach(n.sortableList.Groups,function(n){n.CustomOrder=t;t++})}};n.TotalActiveGroups=0;n.calcTotalActiveGroups=function(){let t=0;return n.sortableList&&n.sortableList.Groups&&angular.forEach(n.sortableList.Groups,function(n){n.IsActive&&(t+=n.Quantity)}),n.TotalActiveGroups=t,t};n.submitApplication=function(){blockUI({target:"#ApplicationSubstituteStep1",animate:!0});let t={Id:n.substitutePlacementSchool.Id,PersonId:n.substituteInfo.PersonId,DidacticYearId:n.substituteInfo.DidacticYearId,SpecialityId:n.substituteInfo.SpecialityId,SpecialityGroupId:n.substituteInfo.SpecialityGroupId,RegionAndUnitId:n.substituteInfo.RegionAndUnitId,SubstituteId:n.substituteInfo.SubstituteId,RecruitmentDate:n.substituteInfo.RecruitmentDate,LevelId:n.substituteInfo.LevelId,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,SubstitutePlacementGapId:n.sortableList.Id,ApplicationTypeFekId:n.fek.Id,GroupPreferenceOrders:[]};angular.forEach(n.sortableList.Groups,function(n,i){t.GroupPreferenceOrders.push({SubstitutePlacementGapGroupId:n.Id,PreferedOrder:i+1})});y.postByParams(t,"/api/ApplSubstitutePlacementSchool/SaveApplicationAsync").then(function(t){t.success?(n.substitutePlacementSchool.Id=t.data.Id,n.substitutePlacementSchool.LastEditDate=t.data.LastEditDate,n.sortableList=t.data.PlacementGap,unblockUI("#ApplicationSubstituteStep1"),o.pop("success","Η δήλωσή σας υποβλήθηκε με επιτυχία!")):(unblockUI("#ApplicationSubstituteStep1"),o.pop("error","Παρουσιάστηκε σφάλμα","H εισαγωγή δεν πραγματοποιήθηκε"))},function(){unblockUI("#ApplicationSubstituteStep1");o.pop("error","Παρουσιάστηκε σφάλμα","H ενημέρωση δεν πραγματοποιήθηκε")})}};SubstitutePlacementSchoolController.$inject=["$scope","$filter","$log","$q","$uibModal","PassParameters","$state","toaster","SubstituteFactory","PersonFactory","PersonSpecialityFactory","ApplicationTypeRegionAndUnitFactory","ApplicationTypeFekFactory","RegionAndFactory","GeneralFactory"];SubstituteSMEA3monthsController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y){if(n.mess="",n.messInfo="",n.subSMEA3months={IsTemporaryStored:!0},n.person={},n.applicationType=32,n.perspec={},n.SelectedSpecs=[],n.hasValidFekNoConfirmSpeciality=!1,n.alerts="",n.showToConfirmSpeciality=!1,n.enableButtonSave=!1,n.Years=[],n.selected={Years:[]},n.addAlert=function(t){n.alerts=[{type:"danger",msg:t}]},n.canSave=!0,n.alerts2=[{type:"info",msg:"Διαθέτετε στο φάκελό σας μη επικυρωμένους κλάδους για τους οποίους μπορείτε να υποβάλετε αίτητη εφόσον επικυρωθούν πρώτα."}],n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.step1=!0,n.step2=!1,n.continueDisabled=!0,n.intendancies=[],n.userLevel=0,n.SelectedAvailRegionsItems=[],n.SelectedSelectedRegionsListItems=[],n.SelectedRegionsListItems=[],n.SelectedAvailKeddyItems=[],n.SelectedSelectedKeddyListItems=[],n.SelectedKeddyListItems=[],n.DisableDLevel=!1,n.AvailableSpecListItems=[],n.AvailableRegionsListItems=[],n.AvailableKeddyListItems=[],n.IsCivilServant=!1,n.showCivilServantFull=!1,n.hasMusicSpeciality=!1,n.hasKeddy=!1,n.hasPtixioP1101=!1,n.hasPtixioP50=!1,n.hasEEEK=!1,n.hasABPrimaryClass=!1,n.hasBraile=!1,n.hasSignKnowledge=!1,n.hasSpecialSupport=!1,n.hasboth=!1,n.showAlertSpec=!1,n.showAlertRegion=!1,n.showAlertKeddy=!1,n.visibleColumns={FirstSpeciality:!1,EquivalenceType:!1},n.Pe70List=[293,330,6,218],n.regionsForPe70=!1,n.applicationLevelId=0,blockUI({target:"#divBlockUI",animate:!0}),y.isValueInArray(y.getRoleCode(n.authentication.role),"d1, d2")&&(n.userLevel=n.authentication.levelId,n.subSMEA3months.LevelId=n.authentication.levelId,n.subSMEA3months.IntendancyId=n.authentication.regionAndUnitId),n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.authentication.isAuth){var p="subSMEA3months";y.getByParams({role:n.authentication.role,codes:p},"/api/Subsystem/NewCheckPermission").then(function(r){var u=p.split(","),e,s;for(e in u)n.pageRules[u[e]]=t("filter")(r,{Code:u[e]},!0)[0].Rules;n.subSMEA3months.Id=f.getApplicationId();n.applicationLevelId=f.getApplicationLevelId();y.isEmptyValue(n.applicationLevelId)&&(n.applicationLevelId=0);y.isEmptyValue(n.subSMEA3months.Id)?(n.step1=!0,n.step2=!1):(n.step1=!1,n.step2=!0);f.resetApplication();n.subSMEA3months.PersonId=f.getPersonId();y.isValueInArray(n.pageRules.subSMEA3months.CanAccess,"u1, u2")&&(n.subSMEA3months.PersonId=n.authentication.personId);s=i.all([y.getByParams({personId:n.subSMEA3months.PersonId},"/api/ApplSubstituteSMEA3months/getSpecialityForSubstituteSmea3months"),y.getByParams({Id:n.subSMEA3months.PersonId},"/api/ApplSubstituteSMEA3months/GetApplSubstituteSmea3months"),y.getByParams({personId:n.subSMEA3months.PersonId},"/api/RecruitmentServiceAssumed/getSubstitutesServiceAssumed")]);s.then(function(i){var u,r;for(angular.copy(i[0],n.AvailableSpecListItems),n.applSub=i[1],n.subs=i[2].substitutes,r=n.AvailableSpecListItems.length-1;r>=0;r--)n.AvailableSpecListItems[r].hasApplPerm=0;for(u=n.applSub.length-1;u>=0;u--)for(r=n.AvailableSpecListItems.length-1;r>=0;r--)n.applSub[u].SpecialityId==n.AvailableSpecListItems[r].Id&&(n.AvailableSpecListItems[r].hasApplSub=1);n.subSMEA3months.Id!=null&&n.subSMEA3months.Id!=""&&n.subSMEA3months.Id!="undefined"?(y.isEmptyValue(n.subSMEA3months.SpecialityId)&&(n.subSMEA3months.SpecialityId=f.getSpecialityId()),y.getByParams({applicationTypeId:n.applicationType,specialityId:n.subSMEA3months.SpecialityId},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(i){n.SelectedSpecListItems=t("filter")(n.AvailableSpecListItems,{Id:n.subSMEA3months.SpecialityId},!0)[0];!y.isEmptyValue(i)||y.isValueInArray(y.getRoleCode(n.authentication.role),"a")?(n.canUpdateAppl=!0,n.showAddEditForm=1,n.getApplication()):(n.mess+="<li>Δεν μπορείτε να τροποποιήσετε την αίτηση γιατί δεν υπάρχει ανοιχτό ΦΕΚ <\/li>",n.showAddEditForm=2)},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):y.isEmpty(n.AvailableSpecListItems)?(n.mess+=y.isEmpty(n.subs)?"<li>Δεν μπορείτε να υποβάλετε αίτηση. Δεν βρίσκεστε στον ενιαίο πίνακα για κάποιον κλάδο<\/li>":"<li>Δεν μπορείτε να υποβάλετε αίτηση. Έχετε ήδη προσληφθεί το τρέχον σχολικό έτος<\/li>",n.showAddEditForm=2):(n.canInsertAppl=!0,n.showAddEditForm=1)})},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml");unblockUI("#divBlockUI")})}else e.go("/");n.changeLevel=function(){y.isEmptyValue(n.subSMEA3months.LevelId)?(n.subSMEA3months.LevelId=null,n.intendancies=[],n.subSMEA3months.IntendancyId=null,n.continueDisabled=!0):(v.getIntendancies(n.subSMEA3months.LevelId).then(function(t){n.intendancies=t}).catch(function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα στην εύρεση διευθύνσεων")}),y.isEmptyValue(n.subSMEA3months.Id)&&(n.subSMEA3months.IntendancyId=null),n.continueDisabled=!1)};n.changeIntendancies=function(){y.isEmptyValue(n.subSMEA3months.LevelId)||y.isEmptyValue(n.subSMEA3months.IntendancyId)?(n.continueDisabled=!0,n.subSMEA3months.IntendancyId=null):n.continueDisabled=!1};n.checkCivilServant=function(){n.IsCivilServant==1?n.showCivilServantFull=!1:(n.subSMEA3months.PublicServantFull=0,n.showCivilServantFull=!0)};n.checkForBoth=function(){n.hasboth=n.SelectedSpecListItems.IsBoth==!0?!0:!1};n.showCivilServantBlock=function(){return n.IsCivilServant==!0?!0:!1};n.enableSave=function(){n.enableButtonSave=n.subSMEA3months.NotInRiskForCovid19==!0?!0:!1};n.checkForRegions=function(){n.regionsForPe70=!1;n.regionsForPe70=n.Pe70List.indexOf(n.SelectedSpecListItems.Id)!=-1?!0:!1};n.checkForSpecialSupport=function(){n.hasSpecialSupport=!1;n.person.ParaplegicQuadriplegic==!1&&n.person.Deaf==!1&&n.person.Blind==!1&&(["ΠΕ71","ΠΕ61","ΠΕ60.ΕΑΕ","ΠΕ70.ΕΑΕ","ΠΕ02.ΕΑΕ","ΠΕ03.ΕΑΕ","ΠΕ04.01.ΕΑΕ","ΠΕ04.02.ΕΑΕ","ΠΕ04.03.ΕΑΕ","ΠΕ04.04.ΕΑΕ","ΠΕ04.05.ΕΑΕ"].indexOf(n.SelectedSpecListItems.Code)!=-1?n.SelectedSpecListItems.LevelId==1?t("filter")(n.SelectedRegionsListItems,function(n){return n.IsKeddy==!1}).length>0&&(n.hasSpecialSupport=!0):n.SelectedSpecListItems.LevelId==2&&t("filter")(n.SelectedRegionsListItems,function(n){return n.IsFull==!1&&n.IsKeddy==!1}).length>0&&(n.hasSpecialSupport=!0):n.hasSpecialSupport=!1)};n.checkForMusic=function(){n.hasMusicSpeciality=n.SelectedSpecListItems.IsMusic==!0?!0:!1;n.hasMusicSpeciality==!1&&(n.subSMEA3months.ConservatoryOwner=0)};n.checkForKeddy=function(){n.hasKeddy=!1;n.hasKeddy=["ΠΕ60.ΕΑΕ","ΠΕ70.ΕΑΕ","ΠΕ61","ΠΕ71","ΠΕ02.ΕΑΕ","ΠΕ03.ΕΑΕ","ΠΕ04.01.ΕΑΕ","ΠΕ04.02.ΕΑΕ","ΠΕ04.04.ΕΑΕ","ΠΕ04.05.ΕΑΕ"].indexOf(n.SelectedSpecListItems.Code)!=-1?!0:!1;n.hasKeddy==!1&&(n.subSMEA3months.AcceptFullSubstitudeSMEAToAllKEDDY=0)};n.checkForHasPtixio=function(){n.hasPtixioP1101=!1;n.hasPtixioP50=!1;n.SelectedSpecListItems.Code=="ΠΕ11.ΕΑΕ"?n.hasPtixioP1101=!0:n.SelectedSpecListItems.Code.indexOf(".ΕΑΕ")!=-1&&(n.hasPtixioP50=!0)};n.checkForEEEK=function(){n.hasEEEK=!1;(n.SelectedSpecListItems.Code=="ΠΕ71"||n.SelectedSpecListItems.Code=="ΠΕ70.ΕΑΕ")&&t("filter")(n.SelectedRegionsListItems,function(n){return n.IsKeddy==!1}).length>0&&(n.hasEEEK=!0)};n.checkForABPrimaryClass=function(){n.hasABPrimaryClass=!1;(n.SelectedSpecListItems.Code=="ΠΕ61"||n.SelectedSpecListItems.Code=="ΠΕ60.ΕΑΕ")&&(n.hasABPrimaryClass=!0);n.hasABPrimaryClass||(n.subSMEA3months.AcceptFullSubstitudeSMEAForABPrimaryClass=!1)};n.checkHasBraile=function(){n.hasBraile=n.person.BraileKnowledge=="ΕΠΑΡΚΕΙΑ"&&n.person.IsBraileKnowledgeConfirmed?!0:!1;n.hasBraile||(n.subSMEA3months.AcceptFullSubstitudeSMEAForBraileKnowledge=!1)};n.checkHasSignKnolewdge=function(){n.hasSignKnowledge=n.person.SignKnowledge=="ΕΠΑΡΚΕΙΑ"&&n.person.IsSignKnowledgeConfirmed?!0:!1;n.hasSignKnowledge||(n.subSMEA3months.AcceptFullSubstitudeSMEAForSignKnowledge=!1)};n.checkAllConstraints=function(){n.checkForBoth();n.checkForMusic();n.checkForKeddy();n.checkForEEEK();n.checkForHasPtixio();n.checkForABPrimaryClass();n.checkHasBraile();n.checkHasSignKnolewdge();n.checkForSpecialSupport();n.checkForRegions()};n.goToStep=function(i,r){i==2?y.getByParams({applicationTypeId:n.applicationType,specialityId:r},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(i){n.SelectedSpecListItems=t("filter")(n.AvailableSpecListItems,{Id:r},!0)[0];n.fek=i;y.isEmptyValue(i)?(n.mess="<li>Δεν υπαρχει ενεργό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2):(n.step1=!1,n.step2=!0,n.subSMEA3months.SpecialityId=r,blockUI({target:"#divBlockUIForm",animate:!0}),n.doAll())},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.step1=!0,n.step2=!1,n.DisableDLevel=y.isEmpty(n.SelectedSpecListItems)&&y.isEmptyValue(n.subSMEA3months.Id)?!1:!0,n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[])};n.findSpecsForDetails=function(){n.SelectedSpecs=[];angular.forEach(n.SelectedSpecListItems,function(t){for(var i=n.perspec.length-1;i>=0;i--)n.perspec[i].Speciality.Id==t.Id&&n.SelectedSpecs.push(n.perspec[i])})};n.showDetails=function(){return n.SelectedSpecs.length>0?!0:!1};n.getApplRegions=function(){y.isEmptyValue(n.SelectedSpecListItems)?(unblockUI("#divBlockUIRegion"),n.AvailableRegionsListItems=[],n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[]):(blockUI({target:"#divBlockUIRegion",animate:!0}),n.AvailableRegionsListItems=[],n.hasboth?y.postByParams({applicationTypeId:n.applicationType,sex:n.person.Sex,specialityId:n.SelectedSpecListItems.Id},"/api/ApplicationTypeRegionAndUnit/GetTypeRegionAndUnitByApplicationTypeSpecAndBothSubSmea").then(function(t){angular.copy(t,n.AvailableRegionsListItems);n.checkForRegions();n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(blockUI({target:"#divBlockUIRegion",animate:!0}),y.postByParams({level:n.SelectedSpecListItems.LevelId,applicationTypeId:n.applicationType,sex:n.person.Sex,specialityId:n.SelectedSpecListItems.Id},"/api/ApplicationTypeRegionAndUnit/GetApplicationRegionByAppTypeSpecAndLevelSubSmea").then(function(t){angular.copy(t,n.AvailableRegionsListItems);n.checkForRegions();n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})))};n.getApplKeddy=function(){n.hasKeddy?(blockUI({target:"#divBlockUIKeddy",animate:!0}),y.isEmpty(n.AvailableKeddyListItems)&&l.getKeddy(n.applicationType).then(function(t){angular.copy(t,n.AvailableKeddyListItems);n.removeDuplicatesKeddyForDualList();unblockUI("#divBlockUIKeddy")},function(n){unblockUI("#divBlockUIKeddy");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(unblockUI("#divBlockUIKeddy"),n.AvailableKeddyListItems=[],n.SelectedKeddyListItems=[],n.SelectedSelectedKeddyListItems=[])};n.removeDuplicatesKeddyForDualList=function(){angular.forEach(n.SelectedAvailKeddyItems,function(t){for(var i=n.AvailableKeddyListItems.length-1;i>=0;i--)n.AvailableKeddyListItems[i].Id==t.Id&&n.AvailableKeddyListItems.splice(i,1)});n.SelectedAvailKeddyItems=[];n.SelectedSelectedKeddyListItems=[]};n.removeDuplicatesRegionsForDualList=function(){angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.hasboth||n.hasKeddy||(n.SelectedRegionsListItems=t("filter")(n.SelectedRegionsListItems,{Level:n.subSMEA3months.LevelId},!0));n.regionsForPe70||(n.SelectedRegionsListItems=t("filter")(n.SelectedRegionsListItems,{OnlyPE70:!1},!0));n.checkForSpecialSupport();n.checkForEEEK();n.hasSpecialSupport||(n.subSMEA3months.AcceptFullSubstitudeSMEAForSpecialSupport=!1);n.hasEEEK||(n.subSMEA3months.AcceptFullSubstitudeSMEAToEEEEK=!1);n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.removeDuplicatesSpecsForDualList=function(){angular.forEach(n.SelectedAvailSpecItems,function(t){for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].Id==t.Id&&n.AvailableSpecListItems.splice(i,1)});n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.doAll=function(){n.subSMEA3months.Id!=null&&n.subSMEA3months.Id!=""&&n.subSMEA3months.Id!="undefined"?(n.canUpdateAppl&&n.subSMEA3months.PersonId!=null&&n.subSMEA3months.PersonId!=""&&n.subSMEA3months.PersonId!="undefined"&&y.getByParams({id:n.subSMEA3months.PersonId},"/api/Person/GetPersonDtoSmea").then(function(r){if(n.person=r,n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1,n.visibleColumns.FirstSpeciality=y.isEmptyValue(t("filter")(n.person.ListSmea,{Id:7},!0)[0])?!1:!0,n.visibleColumns.EquivalenceType=y.isEmptyValue(t("filter")(n.person.ListSmea,function(n){return n.EquivalenceType!=""}))?!1:!0,n.showCivilServantBlock(),n.checkCivilServant(),n.enableSave(),c.getSpecialSpecialitiesDetailsByPersonId(n.subSMEA3months.PersonId).then(function(t){n.perspec=t},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),y.isEmpty(n.SelectedSpecListItems)){y.isValueInArray(n.pageRules.subSMEA3months.CanAccess,"d1, d2, m1, m2")&&n.subSMEA3months.LevelId!=n.authentication.levelId&&(n.canUpdateAppl=!1);n.IsDisabled=!n.canUpdateAppl;n.IsDisabled&&(n.noUpdAccess=!0);n.subSMEA3months.IsActive||(n.IsDisabled=!0,n.notActive=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.subSMEA3months.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0);y.isEmpty(n.subSMEA3months.ApplicationSubstituteSMEAProtocols)||(n.protocol=n.subSMEA3months.ApplicationSubstituteSMEAProtocols[0].ProtocolString,n.showProtocol=!0);n.checkAllConstraints();var u=i.all([y.getByParams({id:n.subSMEA3months.Id},"/api/ApplSubstituteSMEA3months/GetApplRegionsByApplId"),n.hasboth?y.postByParams({applicationTypeId:n.applicationType,sex:n.person.Sex,specialityId:n.SelectedSpecListItems.Id},"/api/ApplicationTypeRegionAndUnit/GetTypeRegionAndUnitByApplicationTypeSpecAndBothSubSmea"):y.postByParams({level:n.subSMEA3months.LevelId,applicationTypeId:n.applicationType,sex:n.person.Sex,specialityId:n.SelectedSpecListItems.Id},"/api/ApplicationTypeRegionAndUnit/GetApplicationRegionByAppTypeSpecAndLevelSubSmea"),s.getApplKeddyByApplId(n.subSMEA3months.Id),l.getKeddy(n.applicationType)]);u.then(function(t){n.SelectedRegionsListItems=t[0];n.SelectedAvailRegionsItems=t[0];angular.copy(t[1],n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList();n.SelectedKeddyListItems=t[2];n.SelectedAvailKeddyItems=t[2];angular.copy(t[3],n.AvailableKeddyListItems);n.removeDuplicatesKeddyForDualList();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")},function(){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση tων περιοχών της αίτησης.")})}},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm")):(n.canInsertAppl&&n.subSMEA3months.PersonId!=null&&n.subSMEA3months.PersonId!=""&&n.subSMEA3months.PersonId!="undefined"&&y.getByParams({id:n.subSMEA3months.PersonId},"/api/Person/GetPersonDtoSmea").then(function(i){n.person=i;n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1;n.checkAllConstraints();n.showCivilServantBlock();n.checkCivilServant();n.enableSave();n.SelectedAvailSpecItems=[];n.SelectedSelectedSpecListItems=[];n.AvailableRegionsListItems=[];n.getApplRegions();n.getApplKeddy();n.visibleColumns.FirstSpeciality=y.isEmptyValue(t("filter")(n.person.ListSmea,{Id:7},!0)[0])?!1:!0;n.visibleColumns.EquivalenceType=y.isEmptyValue(t("filter")(n.person.ListSmea,function(n){return n.EquivalenceType!=""}))?!1:!0},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm"))};n.getApplication=function(){if(n.subSMEA3months.Id!=null&&n.subSMEA3months.Id!=""&&n.subSMEA3months.Id!="undefined"&&(n.DisableDLevel=!0,n.canUpdateAppl&&n.subSMEA3months.PersonId!=null&&n.subSMEA3months.PersonId!=""&&n.subSMEA3months.PersonId!="undefined")){var t=i.all([y.getByParams({id:n.subSMEA3months.Id},"/api/ApplSubstituteSMEA3months/GetApplSubstituteSmea3monthsById")]);t.then(function(t){n.subSMEA3months=t[0];n.doAll();var r=i.all([y.getByParams({personId:n.subSMEA3months.PersonId,applicationTypeId:n.applicationType,didacticYearId:n.subSMEA3months.DidacticYearId,applicationId:n.subSMEA3months.Id},"api/HistoryAppl/getLevelByApplTypeIdAndPersonIdAndYear")]);r.then(function(t){n.levels=t[0];n.changeLevel();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})})}};n.SelectedSpecAvailItems=[];n.SelectedSelectedSpecListItems=[];n.SelectedSpecListItems=[];n.btnSpecUp=function(){for(var t,r,u,f=n.SelectedSelectedSpecListItems,i=0;i<n.SelectedSelectedSpecListItems.length;i++){if(t=n.SelectedSpecListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedSpecListItems[i].Id),t<=0||t>=n.SelectedSpecListItems.length)return;r=n.SelectedSpecListItems[t];u=n.SelectedSpecListItems[t-1];n.SelectedSpecListItems[t-1]=r;n.SelectedSpecListItems[t]=u}};n.btnSpecDown=function(){for(var t,r,u,i=n.SelectedSelectedSpecListItems.length-1;i>=0;i--){if(t=n.SelectedSpecListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedSpecListItems[i].Id),t<0||t>=n.SelectedSpecListItems.length-1)return;r=n.SelectedSpecListItems[t];u=n.SelectedSpecListItems[t+1];n.SelectedSpecListItems[t+1]=r;n.SelectedSpecListItems[t]=u}};n.btnSpecRight=function(){angular.forEach(n.SelectedAvailSpecItems,function(n){this.push(n)},n.SelectedSpecListItems);angular.forEach(n.SelectedAvailSpecItems,function(t){for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].Id==t.Id&&n.AvailableSpecListItems.splice(i,1)});n.findSpecsForDetails();n.checkAllConstraints();n.SelectedAvailSpecItems=[];n.SelectedSelectedSpecListItems=[];n.AvailableRegionsListItems=[];n.getApplRegions();n.getApplKeddy()};n.btnSpecLeft=function(){angular.forEach(n.SelectedSelectedSpecListItems,function(n){this.push(n)},n.AvailableSpecListItems);angular.forEach(n.SelectedSelectedSpecListItems,function(t){for(var i=n.SelectedSpecListItems.length-1;i>=0;i--)n.SelectedSpecListItems[i].Id==t.Id&&n.SelectedSpecListItems.splice(i,1)});n.findSpecsForDetails();n.checkAllConstraints();n.AvailableRegionsListItems=[];n.getApplRegions();n.getApplKeddy();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.btnAllSpecRight=function(){angular.forEach(n.AvailableSpecListItems,function(n){this.push(n)},n.SelectedSpecListItems);for(var t=n.AvailableSpecListItems.length-1;t>=0;t--)n.AvailableSpecListItems.splice(t,1);n.findSpecsForDetails();n.checkAllConstraints();n.AvailableRegionsListItems=[];n.getApplRegions();n.getApplKeddy();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.btnAllSpecLeft=function(){angular.forEach(n.SelectedSpecListItems,function(n){this.push(n)},n.AvailableSpecListItems);for(var t=n.SelectedSpecListItems.length-1;t>=0;t--)n.SelectedSpecListItems.splice(t,1);n.findSpecsForDetails();n.checkAllConstraints();n.AvailableRegionsListItems=[];n.getApplRegions();n.getApplKeddy();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[];n.SelectedRegionsListItems=[];n.btnRegionsUp=function(){for(var t,r,u,f=n.SelectedSelectedRegionsListItems,i=0;i<n.SelectedSelectedRegionsListItems.length;i++){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<=0||t>=n.SelectedRegionsListItems.length)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t-1];n.SelectedRegionsListItems[t-1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsDown=function(){for(var t,r,u,i=n.SelectedSelectedRegionsListItems.length-1;i>=0;i--){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<0||t>=n.SelectedRegionsListItems.length-1)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t+1];n.SelectedRegionsListItems[t+1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsRight=function(){angular.forEach(n.SelectedAvailRegionsItems,function(n){this.push(n)},n.SelectedRegionsListItems);angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.checkForSpecialSupport();n.checkForEEEK();n.hasSpecialSupport||(n.subSMEA3months.AcceptFullSubstitudeSMEAForSpecialSupport=!1);n.hasEEEK||(n.subSMEA3months.AcceptFullSubstitudeSMEAToEEEEK=!1);n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.btnRegionsLeft=function(){angular.forEach(n.SelectedSelectedRegionsListItems,function(n){this.push(n)},n.AvailableRegionsListItems);angular.forEach(n.SelectedSelectedRegionsListItems,function(t){for(var i=n.SelectedRegionsListItems.length-1;i>=0;i--)n.SelectedRegionsListItems[i].Id==t.Id&&n.SelectedRegionsListItems.splice(i,1)});n.checkForSpecialSupport();n.checkForEEEK();n.hasSpecialSupport||(n.subSMEA3months.AcceptFullSubstitudeSMEAForSpecialSupport=!1);n.hasEEEK||(n.subSMEA3months.AcceptFullSubstitudeSMEAToEEEEK=!1);n.SelectedSelectedRegionsListItems=[];n.SelectedAvailRegionsItems=[]};n.checkRegions=function(){var i=0,t=0,u=60,r=30;n.canInsertRegions=!0;n.SelectedRegionsListItems.length+n.SelectedAvailRegionsItems.length>u&&(o.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών","Δεν μπορείτε να επιλέξετε περισσότερες από "+u+" περιοχές"),n.canInsertRegions=!1);angular.forEach(n.SelectedRegionsListItems,function(n){n.Level==1?i=i+1:t=t+1});angular.forEach(n.SelectedAvailRegionsItems,function(n){n.Level==1?i=i+1:t=t+1});i>r&&(o.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών Α/βάθμιας","Δεν μπορείτε να επιλέξετε περισσότερες από "+r+" περιοχές Α/βάθμιας"),n.canInsertRegions=!1);t>t&&(o.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών Β/βάθμιας","Δεν μπορείτε να επιλέξετε περισσότερες από "+r+" περιοχές Β/βάθμιας"),n.canInsertRegions=!1)};n.SelectedAvailKeddyItems=[];n.SelectedSelectedKeddyListItems=[];n.SelectedKeddyListItems=[];n.btnKeddyUp=function(){for(var t,r,u,f=n.SelectedSelectedKeddyListItems,i=0;i<n.SelectedSelectedKeddyListItems.length;i++){if(t=n.SelectedKeddyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedKeddyListItems[i].Id),t<=0||t>=n.SelectedKeddyListItems.length)return;r=n.SelectedKeddyListItems[t];u=n.SelectedKeddyListItems[t-1];n.SelectedKeddyListItems[t-1]=r;n.SelectedKeddyListItems[t]=u}};n.btnKeddyDown=function(){for(var t,r,u,i=n.SelectedSelectedKeddyListItems.length-1;i>=0;i--){if(t=n.SelectedKeddyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedKeddyListItems[i].Id),t<0||t>=n.SelectedKeddyListItems.length-1)return;r=n.SelectedKeddyListItems[t];u=n.SelectedKeddyListItems[t+1];n.SelectedKeddyListItems[t+1]=r;n.SelectedKeddyListItems[t]=u}};n.btnKeddyRight=function(){angular.forEach(n.SelectedAvailKeddyItems,function(n){this.push(n)},n.SelectedKeddyListItems);angular.forEach(n.SelectedAvailKeddyItems,function(t){for(var i=n.AvailableKeddyListItems.length-1;i>=0;i--)n.AvailableKeddyListItems[i].Id==t.Id&&n.AvailableKeddyListItems.splice(i,1)});n.SelectedAvailKeddyItems=[];n.SelectedSelectedKeddyListItems=[]};n.btnKeddyLeft=function(){angular.forEach(n.SelectedSelectedKeddyListItems,function(n){this.push(n)},n.AvailableKeddyListItems);angular.forEach(n.SelectedSelectedKeddyListItems,function(t){for(var i=n.SelectedKeddyListItems.length-1;i>=0;i--)n.SelectedKeddyListItems[i].Id==t.Id&&n.SelectedKeddyListItems.splice(i,1)});n.SelectedSelectedKeddyListItems=[];n.SelectedAvailKeddyItems=[]};n.checkKeddy=function(){var t=30;n.canInsertKeddy=!0;n.SelectedKeddyListItems.length+n.SelectedAvailKeddyItems.length>t&&(o.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος ΚΕΣΥ","Δεν μπορείτε να επιλέξετε περισσότερες από "+t+" ΚΕΣΥ"),n.canInsertKeddy=!1)};n.editPerson=function(){f.setPersonId(n.subSMEA3months.PersonId);e.go("stateEditPerson")};n.saveAction=function(t){y.isEmpty(n.SelectedRegionsListItems)&&!n.hasKeddy||y.isEmpty(n.SelectedRegionsListItems)&&n.hasKeddy&&y.isEmpty(n.SelectedKeddyListItems)?(n.showAlertRegion=!0,n.showAlertKeddy=!0):(n.showAlertRegion=!1,n.showAlertKeddy=!1);n.canSave=!0;n.showAlertSpec||n.showAlertRegion||n.showAlertKeddy||!n.canSave||n.InsOrUpd(t)};n.InsOrUpd=function(t){var r,i;n.subSMEA3months.SpecialityId=n.SelectedSpecListItems.Id;n.subSMEA3months.LevelId=n.SelectedSpecListItems.LevelId;r={SubstituteSmea3months:n.subSMEA3months,RegionAndUnit:n.SelectedRegionsListItems,Keddy:n.SelectedKeddyListItems,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Status:t};i=r;n.subSMEA3months.Id!=null&&n.subSMEA3months.Id!=""&&n.subSMEA3months.Id!="undefined"?(n.subSMEA3months.ModifiedBy=n.authentication.userName,y.postByParams(i,"/api/ApplSubstituteSMEA3months/updateApplSubstituteSMEA3months").then(function(){f.setPersonId(n.subSMEA3months.PersonId);e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)})):(n.subSMEA3months.DidacticYearId=n.applicationDidacticYear.Id,n.subSMEA3months.CreatedBy=n.authentication.userName,y.postByParams(i,"/api/ApplSubstituteSMEA3months/insertApplSubstituteSmea3months").then(function(){f.setPersonId(n.subSMEA3months.PersonId);e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)}))}};SubstituteSMEA3monthsController.$inject=["$scope","$filter","$q","$uibModal","$log","PassParameters","$state","toaster","SubstituteSMEAFactory","PersonFactory","PersonSpecialityFactory","ApplicationTypeRegionAndUnitFactory","ApplicationTypeFekFactory","RegionAndFactory","GeneralFactory"];SubstituteSMEAController=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y){if(n.mess="",n.messInfo="",n.subSmea={IsTemporaryStored:!0},n.person={},n.applicationType=3,n.perspec={},n.SelectedSpecs=[],n.hasValidFekNoConfirmSpeciality=!1,n.alerts="",n.showToConfirmSpeciality=!1,n.Years=[],n.selected={Years:[]},n.addAlert=function(t){n.alerts=[{type:"danger",msg:t}]},n.canSave=!0,n.alerts2=[{type:"info",msg:"Διαθέτετε στο φάκελό σας μη επικυρωμένους κλάδους για τους οποίους μπορείτε να υποβάλετε αίτητη εφόσον επικυρωθούν πρώτα."}],n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.step1=!0,n.step2=!1,n.continueDisabled=!0,n.intendancies=[],n.userLevel=0,n.SelectedAvailRegionsItems=[],n.SelectedSelectedRegionsListItems=[],n.SelectedRegionsListItems=[],n.SelectedAvailKeddyItems=[],n.SelectedSelectedKeddyListItems=[],n.SelectedKeddyListItems=[],n.DisableDLevel=!1,n.AvailableSpecListItems=[],n.AvailableRegionsListItems=[],n.AvailableKeddyListItems=[],n.IsCivilServant=!1,n.showCivilServantFull=!1,n.hasMusicSpeciality=!1,n.hasKeddy=!1,n.hasPtixioP1101=!1,n.hasPtixioP50=!1,n.hasEEEK=!1,n.hasABPrimaryClass=!1,n.hasBraile=!1,n.hasSignKnowledge=!1,n.hasSpecialSupport=!1,n.hasboth=!1,n.showAlertSpec=!1,n.showAlertRegion=!1,n.showAlertKeddy=!1,n.visibleColumns={FirstSpeciality:!1,EquivalenceType:!1},n.Pe70List=[293,330,6,218],n.regionsForPe70=!1,n.applicationLevelId=0,blockUI({target:"#divBlockUI",animate:!0}),y.isValueInArray(y.getRoleCode(n.authentication.role),"d1, d2")&&(n.userLevel=n.authentication.levelId,n.subSmea.LevelId=n.authentication.levelId,n.subSmea.IntendancyId=n.authentication.regionAndUnitId),n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.authentication.isAuth){var p="subSmea";y.getByParams({role:n.authentication.role,codes:p},"/api/Subsystem/NewCheckPermission").then(function(r){var u=p.split(","),e,s;for(e in u)n.pageRules[u[e]]=t("filter")(r,{Code:u[e]},!0)[0].Rules;n.subSmea.Id=f.getApplicationId();n.applicationLevelId=f.getApplicationLevelId();y.isEmptyValue(n.applicationLevelId)&&(n.applicationLevelId=0);y.isEmptyValue(n.subSmea.Id)?(n.step1=!0,n.step2=!1):(n.step1=!1,n.step2=!0);f.resetApplication();n.subSmea.PersonId=f.getPersonId();y.isValueInArray(n.pageRules.subSmea.CanAccess,"u1, u2")&&(n.subSmea.PersonId=n.authentication.personId);s=i.all([y.getByParams({personId:n.subSmea.PersonId},"/api/ApplSubstituteSmea/GetSpecialityForSubstituteSmea"),y.getByParams({Id:n.subSmea.PersonId},"/api/ApplSubstituteSmea/GetApplSubstituteSmea")]);s.then(function(i){var u,r;for(angular.copy(i[0],n.AvailableSpecListItems),n.applSub=i[1],r=n.AvailableSpecListItems.length-1;r>=0;r--)n.AvailableSpecListItems[r].hasApplPerm=0;for(u=n.applSub.length-1;u>=0;u--)for(r=n.AvailableSpecListItems.length-1;r>=0;r--)n.applSub[u].SpecialityId==n.AvailableSpecListItems[r].Id&&(n.AvailableSpecListItems[r].hasApplSub=1);y.isEmpty(n.AvailableSpecListItems)?(n.mess+="<li>Δεν μπορείτε να υποβάλετε αίτηση. Δεν βρίσκεστε στους αξιολογικούς πίνακες κατάταξης του ΑΣΕΠ για κάποιον κλάδο.<\/li>",n.showAddEditForm=2):n.subSmea.Id!=null&&n.subSmea.Id!=""&&n.subSmea.Id!="undefined"?(y.isEmptyValue(n.subSmea.SpecialityId)&&(n.subSmea.SpecialityId=f.getSpecialityId()),y.getByParams({applicationTypeId:n.applicationType,specialityId:n.subSmea.SpecialityId},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(i){n.SelectedSpecListItems=t("filter")(n.AvailableSpecListItems,{Id:n.subSmea.SpecialityId},!0)[0];!y.isEmptyValue(i)||y.isValueInArray(y.getRoleCode(n.authentication.role),"a")?(n.canUpdateAppl=!0,n.showAddEditForm=1,n.getApplication()):(n.mess+="<li>Δεν μπορείτε να τροποποιήσετε την αίτηση γιατί δεν υπάρχει ανοιχτό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2)},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(n.canInsertAppl=!0,n.showAddEditForm=1)})},function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml");unblockUI("#divBlockUI")})}else e.go("/");n.changeLevel=function(){y.isEmptyValue(n.subSmea.LevelId)?(n.subSmea.LevelId=null,n.intendancies=[],n.subSmea.IntendancyId=null,n.continueDisabled=!0):(v.getIntendancies(n.subSmea.LevelId).then(function(t){n.intendancies=t}).catch(function(){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα στην εύρεση διευθύνσεων")}),y.isEmptyValue(n.subSmea.Id)&&(n.subSmea.IntendancyId=null),n.continueDisabled=!1)};n.changeIntendancies=function(){y.isEmptyValue(n.subSmea.LevelId)||y.isEmptyValue(n.subSmea.IntendancyId)?(n.continueDisabled=!0,n.subSmea.IntendancyId=null):n.continueDisabled=!1};n.checkCivilServant=function(){n.IsCivilServant==1?n.showCivilServantFull=!1:(n.subSmea.PublicServantFull=0,n.showCivilServantFull=!0)};n.checkForBoth=function(){n.hasboth=n.SelectedSpecListItems.IsBoth==!0?!0:!1};n.showCivilServantBlock=function(){return n.IsCivilServant==!0?!0:!1};n.checkForRegions=function(){n.regionsForPe70=!1;n.regionsForPe70=n.Pe70List.indexOf(n.SelectedSpecListItems.Id)!=-1?!0:!1};n.checkForSpecialSupport=function(){n.hasSpecialSupport=!1;n.person.ParaplegicQuadriplegic==!1&&n.person.Deaf==!1&&n.person.Blind==!1&&(["ΠΕ71","ΠΕ61","ΠΕ60.ΕΑΕ","ΠΕ70.ΕΑΕ","ΠΕ02.ΕΑΕ","ΠΕ03.ΕΑΕ","ΠΕ04.01.ΕΑΕ","ΠΕ04.02.ΕΑΕ","ΠΕ04.03.ΕΑΕ","ΠΕ04.04.ΕΑΕ","ΠΕ04.05.ΕΑΕ"].indexOf(n.SelectedSpecListItems.Code)!=-1?n.SelectedSpecListItems.LevelId==1?t("filter")(n.SelectedRegionsListItems,function(n){return n.IsKeddy==!1}).length>0&&(n.hasSpecialSupport=!0):n.SelectedSpecListItems.LevelId==2&&t("filter")(n.SelectedRegionsListItems,function(n){return n.IsFull==!1&&n.IsKeddy==!1}).length>0&&(n.hasSpecialSupport=!0):n.hasSpecialSupport=!1)};n.checkForMusic=function(){n.hasMusicSpeciality=n.SelectedSpecListItems.IsMusic==!0?!0:!1;n.hasMusicSpeciality==!1&&(n.subSmea.ConservatoryOwner=0)};n.checkForKeddy=function(){n.hasKeddy=!1;n.hasKeddy=["ΠΕ60.ΕΑΕ","ΠΕ70.ΕΑΕ","ΠΕ61","ΠΕ71","ΠΕ02.ΕΑΕ","ΠΕ03.ΕΑΕ","ΠΕ04.01.ΕΑΕ","ΠΕ04.02.ΕΑΕ","ΠΕ04.04.ΕΑΕ","ΠΕ04.05.ΕΑΕ"].indexOf(n.SelectedSpecListItems.Code)!=-1?!0:!1;n.hasKeddy==!1&&(n.subSmea.AcceptFullSubstitudeSMEAToAllKEDDY=0)};n.checkForHasPtixio=function(){n.hasPtixioP1101=!1;n.hasPtixioP50=!1;n.SelectedSpecListItems.Code=="ΠΕ11.ΕΑΕ"?n.hasPtixioP1101=!0:n.SelectedSpecListItems.Code.indexOf(".ΕΑΕ")!=-1&&(n.hasPtixioP50=!0)};n.checkForEEEK=function(){n.hasEEEK=!1;(n.SelectedSpecListItems.Code=="ΠΕ71"||n.SelectedSpecListItems.Code=="ΠΕ70.ΕΑΕ")&&t("filter")(n.SelectedRegionsListItems,function(n){return n.IsKeddy==!1}).length>0&&(n.hasEEEK=!0)};n.checkForABPrimaryClass=function(){n.hasABPrimaryClass=!1;(n.SelectedSpecListItems.Code=="ΠΕ61"||n.SelectedSpecListItems.Code=="ΠΕ60.ΕΑΕ")&&(n.hasABPrimaryClass=!0);n.hasABPrimaryClass||(n.subSmea.AcceptFullSubstitudeSMEAForABPrimaryClass=!1)};n.checkHasBraile=function(){n.hasBraile=n.person.BraileKnowledge=="ΕΠΑΡΚΕΙΑ"&&n.person.IsBraileKnowledgeConfirmed?!0:!1;n.hasBraile||(n.subSmea.AcceptFullSubstitudeSMEAForBraileKnowledge=!1)};n.checkHasSignKnolewdge=function(){n.hasSignKnowledge=n.person.SignKnowledge=="ΕΠΑΡΚΕΙΑ"&&n.person.IsSignKnowledgeConfirmed?!0:!1;n.hasSignKnowledge||(n.subSmea.AcceptFullSubstitudeSMEAForSignKnowledge=!1)};n.checkAllConstraints=function(){n.checkForBoth();n.checkForMusic();n.checkForKeddy();n.checkForEEEK();n.checkForHasPtixio();n.checkForABPrimaryClass();n.checkHasBraile();n.checkHasSignKnolewdge();n.checkForSpecialSupport();n.checkForRegions()};n.createTemplate=function(){return{content:[{style:"tableExample",table:{widths:["*"],body:[[{stack:[{text:"\nΑΙΤΗΣΗ / ΔΗΛΩΣΗ ΠΡΟΤΙΜΗΣΕΩΝ ΥΠΟΨΗΦΙΩΝ\nα.ΑΝΑΠΛΗΡΩΤΩΝ ΕΚΠΑΙΔΕΥΤΙΚΩΝ, β.ΩΡΟΜΙΣΘΙΩΝ ΕΚΠΑΙΔΕΥΤΙΚΩΝ\nΣΧΟΛΙΚΟΥ ΕΤΟΥΣ 2014-15",style:"header",alignment:"center"},{text:["Της ",{text:"αριθμ. 118102/Δ1/25.07.2014 (ΑΔΑ: Β3Ξ69-ΣΦΤ)",bold:!0}," εγκυκλίου του Υ.ΠΑΙ.Θ.\n"],fontSize:9},{text:"(επέχει θέση Υπεύθυνης Δήλωσης του Ν.1599/86)\n\n",fontSize:9}]}]]}},{style:"tableExample",table:{widths:["auto","*"],body:[[{text:["δια μέσου της Διεύθυνσης : ",{text:"Δ.Ε. Αχαΐας",bold:!0}],fontSize:9},{text:["Αρ. Πρωτοκόλου : ",{text:"1234567890",bold:!0}],fontSize:9,alignment:"right"}],[{text:"(συμπληρώνονται αυτόματα κατά την καταχώρηση της αίτησης)\n\n",fontSize:6},{text:["Ημερομηνία : ",{text:"20/04/2015",bold:!0}],fontSize:9,alignment:"right"}]]},layout:"noBorders"},{text:"\nΠΡΟΣΩΠΙΚΑ ΣΤΟΙΧΕΙΑ",style:"header",alignment:"center"},{style:"tableExample",table:{widths:["*"],body:[[{stack:[{style:"tableExample",table:{widths:["*","*"],body:[[{text:["Α.Φ.Μ : ",{text:"000000024",bold:!0}],fontSize:9},{text:["Α.Δ.Τ : ",{text:"ΑΖ 711210",bold:!0}],fontSize:9}],[{text:["ΕΠΩΝΥΜΟ : ",{text:"ΠΕΤΡΟΠΟΥΛΟΣ",bold:!0}],fontSize:9},{text:["ΟΝΟΜΑ : ",{text:"ΔΗΜΗΤΡΗΣ",bold:!0}],fontSize:9}],[{columns:[{width:90,text:"ΠΟΛΥΤΕΚΝΟΣ ",fontSize:9,alignment:"right"},{width:"*",image:"imgUncheckedBox",width:12,height:12},{width:90,text:"ΤΡΙΤΕΚΝΟΣ ",fontSize:9,alignment:"right"},{width:"*",image:"imgCheckedBox",width:12,height:12},{width:120,text:"ΠΑΙΔΑΓΩΓΙΚΗ ΚΑΤΑΡΤΙΣΗ ",fontSize:9,alignment:"right"},{width:"*",image:"imgUncheckedBox",width:12,height:12},{width:120,text:"ΔΗΜΟΣΙΟΣ ΥΠΑΛΛΗΛΟΣ ",fontSize:9,alignment:"right"},{width:"*",image:"imgCheckedBox",width:12,height:12}],colSpan:2}]]},layout:"noBorders"}]}]]}}],styles:{header:{fontSize:12,bold:!0,margin:[0,0,0,10]},subheader:{fontSize:16,bold:!0,margin:[0,10,0,5]},tableExample:{margin:[0,5,0,15]},tableHeader:{bold:!0,fontSize:13,color:"black"}},images:{imgCheckedBox:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAEQkAABEJABiazSuAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAACAASURBVHic7d153GZ1Xf/x14wDCDngkixiYC6AaUr1Ke3nhqBomSZlJaaACqiEggq44oaKIioaoqIijAtaJq5pJAhuKX1KNCshlyBlc0EHZRmGmd8f5wzes97bdV2fc67zej4e98Px4dzX9Z4R7s/7+p7v+Z4la9euRaMRETsDewB7ArsB2wPLZ/nauiSsJNVbBVw3y9dK4HLgEuDSzLyqJur0WWIBmJ+I2JZmwO/Jr4b9ul9vXxhNkoZgJXApTSG4ZOavM/OGymB9YwGYRURsAzwQ2Lf9egCwVWkoSdKGbga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wIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQwIAADokAACgQ9uT7Gs9xDEc33oAANigKe+wfduT7G09xTHsbD0AAGzQlHfYXgEAAPMx5R0mAABgTqa8wwQAAMzJlHeYAACAOZnyDpt8AJzeegAA2KAp77DJB8AZrQcAgA2a8g6bfADsLKWc2noIAFiPcXdN/hTAntZTrGLKBQUARzL13bVne5IHWk+xijNbDwAA6zT13fXA9iS7W0+xiue3HgAA1mnqu2v39iT3tZ5iFee1HgAA1um81gOs4r5t+/fvTynlZ5nuxQr7k5xca/1p60EAYDWllF9L8kiSba1nOYo9tdZnHHgc8JSPAmxLcn7rIQBgjc7PdJd/Mu78AwEw9esABAAAi2LqO2t3sjgBcEHrAQBgjaa+sw4JgCmfAkiS55ZSzm49BAAcy7irntt6jlUs1CmAJLms9QAAsIpF2FVPOQXwy3azrMklpZTjWg8BAEcy7qhLWs+xil9mZQDUWh9P8s2WE63BKUkubD0EABzFhRl21ZR9c9z5B48AJMmuRsOsxyIcWgGgT4uwow7u+kULgItKKc9uPQQArDTupotaz7EGRwyAbyR5fOtnWZfjk7y99RAAcJi3Z9hRU/Z4hl2fZEUA1Fp/keRrLSZapyvG2ywCQHPjTrqi9Rxr8LVx1yc59AhAshinAU5McnXrIQBgdHWG3TR1h+z4wwPgS1s4yGZcVUqZ6sOLAOjEuIuuaj3HGh2y4w8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W8MsnH4hMCACyHh5NcOo9H+m7GJI4ArDT+Dzo7ya7WswDAJu1KcvbUln8ywQBIklrrQ0l+L8MzkJ0SAGDRPJlhh/3euNMmZ3KnAA5XSjkvyW1Jntl4FABYix8nuaTWenfrQY5lkkcAVhr/B56d5PONRwGA1Xw+wyH/u1sPsprJHwFYqZTy+iQfTHJa61kAYIUHkry11vrp1oOs1eSPAKw0/o99XpL3JNnXeBwA2JdhJz1vkZZ/smBHAFYqpZyV5MNJLmg9CwBduivJVbXW77ceZCMWNgAOKKW8McnfJXlW61kA6MKDSd5Wa/1E60E2Y+EDIElKKTuSvCvJVUl2NB4HgOW0N8OR5/fUWve2HmazliIADiilnJTkLUnemuSkxuMAsBwezXAB+odqrY+2HmZWlioADhiPCFyZ5C+SnNx4HAAW0yNJPpDkpmX4jf9wSxkAB5RSTkxyRZJ3xDUCAKzNg0nen+TmWutjrYeZl6UOgANKKU9PcnmSNyf53cbjADBN30rykSS3TOWJffPURQCsVEo5M8mbklya5PTG4wDQ1v0ZnkD70Vrr7tbDbKXuAuCAUsq2JC9PclmSNyTZ2XYiALbIniSfSnJrki/XWrtchN0GwEqllBOSvC7JxUleER8lBFg2e5N8KcntST5Ta3288TzNCYDDlFKOS1IyhMD5Sc5JckLToQBYr8eTfC3JrgyLv9Zan2g70rQIgFWMFxC+JEMMnJ/kxUme1nQoAA73yyTfzLDwdyX5Rg8X8m2GAFin8XTBmePXGYf92XUEAPO1J8l9SXaPXwf/7LD++giAGSqlnJpfRcFpGYJgxypfxzcZFqC9fRnOzR/ra0+GR+3uTnJfrfWhNqMun/8PcskwF+bRQ44AAAAASUVORK5CYII="},defaultStyle:{columnGap:5}}};n.goToStep=function(i,r){i==2?y.getByParams({applicationTypeId:n.applicationType,specialityId:r},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(i){n.SelectedSpecListItems=t("filter")(n.AvailableSpecListItems,{Id:r},!0)[0];n.fek=i;y.isEmptyValue(i)?(n.mess="<li>Δεν υπαρχει ενεργό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2):(n.step1=!1,n.step2=!0,n.subSmea.SpecialityId=r,blockUI({target:"#divBlockUIForm",animate:!0}),n.doAll())},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.step1=!0,n.step2=!1,n.DisableDLevel=y.isEmpty(n.SelectedSpecListItems)&&y.isEmptyValue(n.subSmea.Id)?!1:!0,n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[])};n.findSpecsForDetails=function(){n.SelectedSpecs=[];angular.forEach(n.SelectedSpecListItems,function(t){for(var i=n.perspec.length-1;i>=0;i--)n.perspec[i].Speciality.Id==t.Id&&n.SelectedSpecs.push(n.perspec[i])})};n.showDetails=function(){return n.SelectedSpecs.length>0?!0:!1};n.getApplRegions=function(){y.isEmptyValue(n.SelectedSpecListItems)?(unblockUI("#divBlockUIRegion"),n.AvailableRegionsListItems=[],n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[]):(blockUI({target:"#divBlockUIRegion",animate:!0}),n.AvailableRegionsListItems=[],n.hasboth?y.postByParams({applicationTypeId:n.applicationType,sex:n.person.Sex,specialityId:n.SelectedSpecListItems.Id},"/api/ApplicationTypeRegionAndUnit/GetTypeRegionAndUnitByApplicationTypeSpecAndBothSubSmea").then(function(t){angular.copy(t,n.AvailableRegionsListItems);n.checkForRegions();n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(blockUI({target:"#divBlockUIRegion",animate:!0}),y.postByParams({level:n.SelectedSpecListItems.LevelId,applicationTypeId:n.applicationType,sex:n.person.Sex,specialityId:n.SelectedSpecListItems.Id},"/api/ApplicationTypeRegionAndUnit/GetApplicationRegionByAppTypeSpecAndLevelSubSmea").then(function(t){angular.copy(t,n.AvailableRegionsListItems);n.checkForRegions();n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})))};n.getApplKeddy=function(){n.hasKeddy?(blockUI({target:"#divBlockUIKeddy",animate:!0}),y.isEmpty(n.AvailableKeddyListItems)&&l.getKeddy(n.applicationType).then(function(t){angular.copy(t,n.AvailableKeddyListItems);n.removeDuplicatesKeddyForDualList();unblockUI("#divBlockUIKeddy")},function(n){unblockUI("#divBlockUIKeddy");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):(unblockUI("#divBlockUIKeddy"),n.AvailableKeddyListItems=[],n.SelectedKeddyListItems=[],n.SelectedSelectedKeddyListItems=[])};n.removeDuplicatesKeddyForDualList=function(){angular.forEach(n.SelectedAvailKeddyItems,function(t){for(var i=n.AvailableKeddyListItems.length-1;i>=0;i--)n.AvailableKeddyListItems[i].Id==t.Id&&n.AvailableKeddyListItems.splice(i,1)});n.SelectedAvailKeddyItems=[];n.SelectedSelectedKeddyListItems=[]};n.removeDuplicatesRegionsForDualList=function(){angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.hasboth||n.hasKeddy||(n.SelectedRegionsListItems=t("filter")(n.SelectedRegionsListItems,{Level:n.subSmea.LevelId},!0));n.regionsForPe70||(n.SelectedRegionsListItems=t("filter")(n.SelectedRegionsListItems,{OnlyPE70:!1},!0));n.checkForSpecialSupport();n.checkForEEEK();n.hasSpecialSupport||(n.subSmea.AcceptFullSubstitudeSMEAForSpecialSupport=!1);n.hasEEEK||(n.subSmea.AcceptFullSubstitudeSMEAToEEEEK=!1);n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.removeDuplicatesSpecsForDualList=function(){angular.forEach(n.SelectedAvailSpecItems,function(t){for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].Id==t.Id&&n.AvailableSpecListItems.splice(i,1)});n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.doAll=function(){n.subSmea.Id!=null&&n.subSmea.Id!=""&&n.subSmea.Id!="undefined"?(n.canUpdateAppl&&n.subSmea.PersonId!=null&&n.subSmea.PersonId!=""&&n.subSmea.PersonId!="undefined"&&y.getByParams({id:n.subSmea.PersonId,specialityId:n.subSmea.SpecialityId},"/api/Person/GetPersonDtoSmea").then(function(r){if(n.person=r,n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1,n.visibleColumns.FirstSpeciality=y.isEmptyValue(t("filter")(n.person.ListSmea,{Id:7},!0)[0])?!1:!0,n.visibleColumns.EquivalenceType=y.isEmptyValue(t("filter")(n.person.ListSmea,function(n){return n.EquivalenceType!=""}))?!1:!0,n.showCivilServantBlock(),n.checkCivilServant(),c.getSpecialSpecialitiesDetailsByPersonId(n.subSmea.PersonId).then(function(t){n.perspec=t},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),y.isEmpty(n.SelectedSpecListItems)){y.isValueInArray(n.pageRules.subSmea.CanAccess,"d1, d2, m1, m2")&&n.subSmea.LevelId!=n.authentication.levelId&&(n.canUpdateAppl=!1);n.IsDisabled=!n.canUpdateAppl;n.IsDisabled&&(n.noUpdAccess=!0);n.subSmea.IsActive||(n.IsDisabled=!0,n.notActive=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.subSmea.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0);y.isEmpty(n.subSmea.ApplicationSubstituteSMEAProtocols)||(n.protocol=n.subSmea.ApplicationSubstituteSMEAProtocols[0].ProtocolString,n.showProtocol=!0);var u=i.all([s.getPrivatesSchoolYearsByApplSubId(n.subSmea.Id),s.getPrivatesSchoolYearsAllAvailable(),]);u.then(function(t){n.checkAllConstraints();n.selected.Years=t[2];n.Years=t[3];var r=i.all([s.getApplRegionsByApplId(n.subSmea.Id),n.hasboth?y.postByParams({applicationTypeId:n.applicationType,sex:n.person.Sex,specialityId:n.SelectedSpecListItems.Id},"/api/ApplicationTypeRegionAndUnit/GetTypeRegionAndUnitByApplicationTypeSpecAndBothSubSmea"):y.postByParams({level:n.subSmea.LevelId,applicationTypeId:n.applicationType,sex:n.person.Sex,specialityId:n.SelectedSpecListItems.Id},"/api/ApplicationTypeRegionAndUnit/GetApplicationRegionByAppTypeSpecAndLevelSubSmea"),s.getApplKeddyByApplId(n.subSmea.Id),l.getKeddy(n.applicationType)]);r.then(function(t){n.SelectedRegionsListItems=t[0];n.SelectedAvailRegionsItems=t[0];angular.copy(t[1],n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList();n.SelectedKeddyListItems=t[2];n.SelectedAvailKeddyItems=t[2];angular.copy(t[3],n.AvailableKeddyListItems);n.removeDuplicatesKeddyForDualList();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")},function(){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση tων περιοχών της αίτησης.")})},function(){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση της αίτησης σας.")})}},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm")):(n.canInsertAppl&&n.subSmea.PersonId!=null&&n.subSmea.PersonId!=""&&n.subSmea.PersonId!="undefined"&&y.getByParams({id:n.subSmea.PersonId,specialityId:n.subSmea.SpecialityId},"/api/Person/GetPersonDtoSmea").then(function(i){n.person=i;n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1;n.checkAllConstraints();n.showCivilServantBlock();n.checkCivilServant();n.SelectedAvailSpecItems=[];n.SelectedSelectedSpecListItems=[];n.AvailableRegionsListItems=[];n.getApplRegions();n.getApplKeddy();n.visibleColumns.FirstSpeciality=y.isEmptyValue(t("filter")(n.person.ListSmea,{Id:7},!0)[0])?!1:!0;n.visibleColumns.EquivalenceType=y.isEmptyValue(t("filter")(n.person.ListSmea,function(n){return n.EquivalenceType!=""}))?!1:!0},function(n){o.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm"))};n.getApplication=function(){if(n.subSmea.Id!=null&&n.subSmea.Id!=""&&n.subSmea.Id!="undefined"&&(n.DisableDLevel=!0,n.canUpdateAppl&&n.subSmea.PersonId!=null&&n.subSmea.PersonId!=""&&n.subSmea.PersonId!="undefined")){var t=i.all([s.getSubstituteSMEAById(n.subSmea.Id)]);t.then(function(t){n.subSmea=t[0];n.doAll();var r=i.all([y.getByParams({personId:n.subSmea.PersonId,applicationTypeId:n.applicationType,didacticYearId:n.subSmea.DidacticYearId,applicationId:n.subSmea.Id},"api/HistoryAppl/getLevelByApplTypeIdAndPersonIdAndYear")]);r.then(function(t){n.levels=t[0];n.changeLevel();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})})}};n.SelectedSpecAvailItems=[];n.SelectedSelectedSpecListItems=[];n.SelectedSpecListItems=[];n.btnSpecUp=function(){for(var t,r,u,f=n.SelectedSelectedSpecListItems,i=0;i<n.SelectedSelectedSpecListItems.length;i++){if(t=n.SelectedSpecListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedSpecListItems[i].Id),t<=0||t>=n.SelectedSpecListItems.length)return;r=n.SelectedSpecListItems[t];u=n.SelectedSpecListItems[t-1];n.SelectedSpecListItems[t-1]=r;n.SelectedSpecListItems[t]=u}};n.btnSpecDown=function(){for(var t,r,u,i=n.SelectedSelectedSpecListItems.length-1;i>=0;i--){if(t=n.SelectedSpecListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedSpecListItems[i].Id),t<0||t>=n.SelectedSpecListItems.length-1)return;r=n.SelectedSpecListItems[t];u=n.SelectedSpecListItems[t+1];n.SelectedSpecListItems[t+1]=r;n.SelectedSpecListItems[t]=u}};n.btnSpecRight=function(){angular.forEach(n.SelectedAvailSpecItems,function(n){this.push(n)},n.SelectedSpecListItems);angular.forEach(n.SelectedAvailSpecItems,function(t){for(var i=n.AvailableSpecListItems.length-1;i>=0;i--)n.AvailableSpecListItems[i].Id==t.Id&&n.AvailableSpecListItems.splice(i,1)});n.findSpecsForDetails();n.checkAllConstraints();n.SelectedAvailSpecItems=[];n.SelectedSelectedSpecListItems=[];n.AvailableRegionsListItems=[];n.getApplRegions();n.getApplKeddy()};n.btnSpecLeft=function(){angular.forEach(n.SelectedSelectedSpecListItems,function(n){this.push(n)},n.AvailableSpecListItems);angular.forEach(n.SelectedSelectedSpecListItems,function(t){for(var i=n.SelectedSpecListItems.length-1;i>=0;i--)n.SelectedSpecListItems[i].Id==t.Id&&n.SelectedSpecListItems.splice(i,1)});n.findSpecsForDetails();n.checkAllConstraints();n.AvailableRegionsListItems=[];n.getApplRegions();n.getApplKeddy();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.btnAllSpecRight=function(){angular.forEach(n.AvailableSpecListItems,function(n){this.push(n)},n.SelectedSpecListItems);for(var t=n.AvailableSpecListItems.length-1;t>=0;t--)n.AvailableSpecListItems.splice(t,1);n.findSpecsForDetails();n.checkAllConstraints();n.AvailableRegionsListItems=[];n.getApplRegions();n.getApplKeddy();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.btnAllSpecLeft=function(){angular.forEach(n.SelectedSpecListItems,function(n){this.push(n)},n.AvailableSpecListItems);for(var t=n.SelectedSpecListItems.length-1;t>=0;t--)n.SelectedSpecListItems.splice(t,1);n.findSpecsForDetails();n.checkAllConstraints();n.AvailableRegionsListItems=[];n.getApplRegions();n.getApplKeddy();n.SelectedSelectedSpecListItems=[];n.SelectedAvailSpecItems=[]};n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[];n.SelectedRegionsListItems=[];n.btnRegionsUp=function(){for(var t,r,u,f=n.SelectedSelectedRegionsListItems,i=0;i<n.SelectedSelectedRegionsListItems.length;i++){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<=0||t>=n.SelectedRegionsListItems.length)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t-1];n.SelectedRegionsListItems[t-1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsDown=function(){for(var t,r,u,i=n.SelectedSelectedRegionsListItems.length-1;i>=0;i--){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<0||t>=n.SelectedRegionsListItems.length-1)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t+1];n.SelectedRegionsListItems[t+1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsRight=function(){angular.forEach(n.SelectedAvailRegionsItems,function(n){this.push(n)},n.SelectedRegionsListItems);angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.checkForSpecialSupport();n.checkForEEEK();n.hasSpecialSupport||(n.subSmea.AcceptFullSubstitudeSMEAForSpecialSupport=!1);n.hasEEEK||(n.subSmea.AcceptFullSubstitudeSMEAToEEEEK=!1);n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.btnRegionsLeft=function(){angular.forEach(n.SelectedSelectedRegionsListItems,function(n){this.push(n)},n.AvailableRegionsListItems);angular.forEach(n.SelectedSelectedRegionsListItems,function(t){for(var i=n.SelectedRegionsListItems.length-1;i>=0;i--)n.SelectedRegionsListItems[i].Id==t.Id&&n.SelectedRegionsListItems.splice(i,1)});n.checkForSpecialSupport();n.checkForEEEK();n.hasSpecialSupport||(n.subSmea.AcceptFullSubstitudeSMEAForSpecialSupport=!1);n.hasEEEK||(n.subSmea.AcceptFullSubstitudeSMEAToEEEEK=!1);n.SelectedSelectedRegionsListItems=[];n.SelectedAvailRegionsItems=[]};n.checkRegions=function(){var i=0,t=0,u=60,r=30;n.canInsertRegions=!0;n.SelectedRegionsListItems.length+n.SelectedAvailRegionsItems.length>u&&(o.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών","Δεν μπορείτε να επιλέξετε περισσότερες από "+u+" περιοχές"),n.canInsertRegions=!1);angular.forEach(n.SelectedRegionsListItems,function(n){n.Level==1?i=i+1:t=t+1});angular.forEach(n.SelectedAvailRegionsItems,function(n){n.Level==1?i=i+1:t=t+1});i>r&&(o.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών Α/βάθμιας","Δεν μπορείτε να επιλέξετε περισσότερες από "+r+" περιοχές Α/βάθμιας"),n.canInsertRegions=!1);t>t&&(o.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών Β/βάθμιας","Δεν μπορείτε να επιλέξετε περισσότερες από "+r+" περιοχές Β/βάθμιας"),n.canInsertRegions=!1)};n.SelectedAvailKeddyItems=[];n.SelectedSelectedKeddyListItems=[];n.SelectedKeddyListItems=[];n.btnKeddyUp=function(){for(var t,r,u,f=n.SelectedSelectedKeddyListItems,i=0;i<n.SelectedSelectedKeddyListItems.length;i++){if(t=n.SelectedKeddyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedKeddyListItems[i].Id),t<=0||t>=n.SelectedKeddyListItems.length)return;r=n.SelectedKeddyListItems[t];u=n.SelectedKeddyListItems[t-1];n.SelectedKeddyListItems[t-1]=r;n.SelectedKeddyListItems[t]=u}};n.btnKeddyDown=function(){for(var t,r,u,i=n.SelectedSelectedKeddyListItems.length-1;i>=0;i--){if(t=n.SelectedKeddyListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedKeddyListItems[i].Id),t<0||t>=n.SelectedKeddyListItems.length-1)return;r=n.SelectedKeddyListItems[t];u=n.SelectedKeddyListItems[t+1];n.SelectedKeddyListItems[t+1]=r;n.SelectedKeddyListItems[t]=u}};n.btnKeddyRight=function(){angular.forEach(n.SelectedAvailKeddyItems,function(n){this.push(n)},n.SelectedKeddyListItems);angular.forEach(n.SelectedAvailKeddyItems,function(t){for(var i=n.AvailableKeddyListItems.length-1;i>=0;i--)n.AvailableKeddyListItems[i].Id==t.Id&&n.AvailableKeddyListItems.splice(i,1)});n.SelectedAvailKeddyItems=[];n.SelectedSelectedKeddyListItems=[]};n.btnKeddyLeft=function(){angular.forEach(n.SelectedSelectedKeddyListItems,function(n){this.push(n)},n.AvailableKeddyListItems);angular.forEach(n.SelectedSelectedKeddyListItems,function(t){for(var i=n.SelectedKeddyListItems.length-1;i>=0;i--)n.SelectedKeddyListItems[i].Id==t.Id&&n.SelectedKeddyListItems.splice(i,1)});n.SelectedSelectedKeddyListItems=[];n.SelectedAvailKeddyItems=[]};n.checkKeddy=function(){var t=30;n.canInsertKeddy=!0;n.SelectedKeddyListItems.length+n.SelectedAvailKeddyItems.length>t&&(o.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος ΚΕΣΥ","Δεν μπορείτε να επιλέξετε περισσότερες από "+t+" ΚΕΣΥ"),n.canInsertKeddy=!1)};n.editPerson=function(){f.setPersonId(n.subSmea.PersonId);e.go("stateEditPerson")};n.saveAction=function(t){y.isEmpty(n.SelectedRegionsListItems)&&!n.hasKeddy||y.isEmpty(n.SelectedRegionsListItems)&&n.hasKeddy&&y.isEmpty(n.SelectedKeddyListItems)?(n.showAlertRegion=!0,n.showAlertKeddy=!0):(n.showAlertRegion=!1,n.showAlertKeddy=!1);n.canSave=!0;n.showAlertSpec||n.showAlertRegion||n.showAlertKeddy||!n.canSave||n.InsOrUpd(t)};n.InsOrUpd=function(t){var r,i;n.subSmea.SpecialityId=n.SelectedSpecListItems.Id;n.subSmea.LevelId=n.SelectedSpecListItems.LevelId;r={Specialities:n.SelectedSpecListItems,SubstituteSmea:n.subSmea,RegionAndUnit:n.SelectedRegionsListItems,Keddy:n.SelectedKeddyListItems,PrivateYears:n.selected.Years,ApplTemplate:n.createTemplate(n.subSmea.Id,1,n.person),UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Status:t};i=r;n.subSmea.Id!=null&&n.subSmea.Id!=""&&n.subSmea.Id!="undefined"?(n.subSmea.ModifiedBy=n.authentication.userName,s.updateApplSubstituteSMEA(i).then(function(){f.setPersonId(n.subSmea.PersonId);e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)})):(n.subSmea.DidacticYearId=n.applicationDidacticYear.Id,n.subSmea.CreatedBy=n.authentication.userName,s.insertApplSubstituteSMEA(i).then(function(){f.setPersonId(n.subSmea.PersonId);e.go("history")}).catch(function(n){o.pop("error","Παρουσιάστηκε σφάλμα",n.data)}))}};SubstituteSMEAController.$inject=["$scope","$filter","$q","$uibModal","$log","PassParameters","$state","toaster","SubstituteSMEAFactory","PersonFactory","PersonSpecialityFactory","ApplicationTypeRegionAndUnitFactory","ApplicationTypeFekFactory","RegionAndFactory","GeneralFactory"];SubstituteSMEAForSchoolController=function(n,t,i,r,u,f,e,o){if(n.mess="",n.messInfo="",n.subSMEASchool={IsTemporaryStored:!0},n.subSMEASchoolOld=[],n.person={},n.applicationType=29,n.step1=!0,n.step2=!1,n.continueDisabled=!0,n.perspec={},n.SelectedSpecs=[],n.hasValidFekNoConfirmSpeciality=!1,n.alerts="",n.showToConfirmSpeciality=!1,n.selected={Years:[]},n.HasSpecPe70=!1,n.HasSpecPe11Pe06=!1,n.SelectedAvailRegionsItems=[],n.SelectedSelectedRegionsListItems=[],n.SelectedRegionsListItems=[],n.AvailableSpecListItems=[],n.AvailableRegionsListItems=[],n.showAlertSpec=!1,n.showAlertRegion=!1,n.DisableDLevel=!1,n.protocol="",n.showProtocol=!1,n.cannotUpdate=!1,n.notActive=!1,n.noUpdAccess=!1,n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.userLevel=0,n.fek={},n.HasFullLevel1=[],n.HasFullLevel2=[],n.HasNoFullLevel1=[],n.HasNoFullLevel2=[],n.HasKESY=[],n.applicationLevelId=0,blockUI({target:"#divBlockUI",animate:!0}),n.goToStep=function(t,i){t==2?u.getByParams({applicationTypeId:n.applicationType,specialityId:i},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(t){n.SelectedSpecListItems=f("filter")(n.AvailableSpecListItems,{Id:i},!0)[0];n.fek=t;u.isEmptyValue(t)?(n.mess="<li>Δεν υπαρχει ενεργό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2):(n.step1=!1,n.step2=!0,n.subSMEASchool.SpecialityId=i,n.subSMEASchool.LevelId=n.SelectedSpecListItems.LevelId,blockUI({target:"#divBlockUIForm",animate:!0}),n.doAll())},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.step1=!0,n.step2=!1,n.DisableDLevel=u.isEmpty(n.SelectedSpecListItems)&&u.isEmptyValue(n.subSMEASchool.Id)?!1:!0,n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[])},n.canSave=!0,n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.authentication.isAuth){var s="subSMEASchool";u.getByParams({role:n.authentication.role,codes:s},"/api/Subsystem/NewCheckPermission").then(function(i){var o=s.split(","),h,c;for(h in o)n.pageRules[o[h]]=f("filter")(i,{Code:o[h]},!0)[0].Rules;n.subSMEASchool.Id=t.getApplicationId();n.applicationLevelId=t.getApplicationLevelId();u.isEmptyValue(n.applicationLevelId)&&(n.applicationLevelId=0);u.isEmptyValue(n.subSMEASchool.Id)?(n.step1=!0,n.step2=!1):(n.step1=!1,n.step2=!0);t.resetApplication();n.subSMEASchool.PersonId=t.getPersonId();u.isValueInArray(n.pageRules.subSMEASchool.CanAccess,"u1, u2")&&(n.subSMEASchool.PersonId=n.authentication.personId);c=e.all([u.getByParams({personId:n.subSMEASchool.PersonId},"/api/ApplSubstituteSMEASchool/getSpecialityForSubstituteSMEASchool"),u.getByParams({Id:n.subSMEASchool.PersonId},"/api/ApplSubstituteSMEASchool/GetApplSubstituteSMEASchool"),u.getByParams({personId:n.subSMEASchool.PersonId},"/api/RecruitmentServiceAssumed/getSubstitutesServiceAssumed")]);c.then(function(i){var s,o,e;for(angular.copy(i[0],n.AvailableSpecListItems),n.applSub=i[1],s=i[2].substitutes,n.subs=f("filter")(s,function(n){return n.SubstitutesTypeId!=9&&n.SubstitutesTypeId!=10&&n.SubstitutesTypeId!=11&&n.SubstitutesTypeId!=12}),e=n.AvailableSpecListItems.length-1;e>=0;e--)n.AvailableSpecListItems[e].hasApplPerm=0;for(o=n.applSub.length-1;o>=0;o--)for(e=n.AvailableSpecListItems.length-1;e>=0;e--)n.applSub[o].SpecialityId==n.AvailableSpecListItems[e].Id&&(n.AvailableSpecListItems[e].hasApplSub=1);n.subSMEASchool.Id!=null&&n.subSMEASchool.Id!=""&&n.subSMEASchool.Id!="undefined"?(u.isEmptyValue(n.subSMEASchool.SpecialityId)&&(n.subSMEASchool.SpecialityId=t.getSpecialityId()),u.getByParams({applicationTypeId:n.applicationType,specialityId:n.subSMEASchool.SpecialityId},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(t){n.fek=t;n.SelectedSpecListItems=f("filter")(n.AvailableSpecListItems,{Id:n.subSMEASchool.SpecialityId},!0)[0];u.isEmptyValue(t)||u.isEmptyValue(n.SelectedSpecListItems)?(n.mess+="<li>Δεν μπορείτε να τροποποιήσετε την αίτηση γιατί δεν υπάρχει ανοιχτό ΦΕΚ <\/li>",n.showAddEditForm=2):(n.canUpdateAppl=!0,n.showAddEditForm=1,n.getApplication())},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):u.isEmpty(n.AvailableSpecListItems)?(n.mess+=u.isEmpty(n.subs)?"<li>Δεν μπορείτε να υποβάλετε αίτηση. Δεν βρίσκεστε στον ενιαίο πίνακα για κάποιον κλάδο<\/li>":"<li>Δεν μπορείτε να υποβάλετε αίτηση. Έχετε ήδη προσληφθεί το τρέχον σχολικό έτος<\/li>",n.showAddEditForm=2):(n.canInsertAppl=!0,n.showAddEditForm=1)})},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml");unblockUI("#divBlockUI")})}else i.go("/");u.isValueInArray(u.getRoleCode(n.authentication.role),"d1, d2")&&(n.userLevel=n.authentication.levelId,n.subSMEASchool.LevelId=n.authentication.levelId,n.subSMEASchool.IntendancyId=n.authentication.regionAndUnitId);n.changeSelectHeight=function(){var t,i,r;n.HasFullLevel1=f("filter")(n.AvailableRegionsListItems,{IsFull:!0,Level:1},!0)[0];n.HasFullLevel2=f("filter")(n.AvailableRegionsListItems,{IsFull:!0,Level:2},!0)[0];n.HasNoFullLevel1=f("filter")(n.AvailableRegionsListItems,{IsFull:!1,Level:1},!0)[0];n.HasNoFullLevel2=f("filter")(n.AvailableRegionsListItems,{IsFull:!1,Level:2},!0)[0];n.HasKESY=f("filter")(n.AvailableRegionsListItems,{IsKESY:!0},!0)[0];t=0;u.isEmptyValue(n.HasFullLevel1)||(t=t+15);u.isEmptyValue(n.HasFullLevel2)||(t=t+15);u.isEmptyValue(n.HasNoFullLevel1)||(t=t+15);u.isEmptyValue(n.HasNoFullLevel2)||(t=t+15);u.isEmptyValue(n.HasKESY)||(t=t+15);i=document.getElementsByTagName("SELECT")[5];r=document.getElementsByTagName("TABLE");i.id==="selectedRegionslistfinal"&&(i.size=t,r[0].height=t*15,r[1].height=t*15)};n.checkCivilServant=function(){n.IsCivilServant==1?n.showCivilServantFull=!1:(n.subSMEASchool.PublicServantFull=0,n.showCivilServantFull=!0)};n.showCivilServantBlock=function(){return n.IsCivilServant==!0?!0:!1};n.showDetails=function(){return n.SelectedSpecs.length>0?!0:!1};n.changeLevel=function(){u.isEmptyValue(n.subSMEASchool.LevelId)?(n.subSMEASchool.LevelId=null,n.intendancies=[],n.subSMEASchool.IntendancyId=null,n.continueDisabled=!0):(RegionAndFactory.getIntendancies(n.subSMEASchool.LevelId).then(function(t){n.intendancies=t}).catch(function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα στην εύρεση διευθύνσεων")}),u.isEmptyValue(n.subSMEASchool.Id)&&(n.subSMEASchool.IntendancyId=null),n.continueDisabled=!1)};n.doAll=function(){if(u.isEmpty(n.applSub)||(n.subSMEASchoolOld=f("filter")(n.applSub,{SpecialityId:n.subSMEASchool.SpecialityId},!0)[0],u.isEmptyValue(n.subSMEASchoolOld)||(n.subSMEASchool=n.subSMEASchoolOld,n.subSMEASchool.LevelId=n.SelectedSpecListItems.LevelId),n.canUpdateAppl=!0,n.showAddEditForm=1),n.subSMEASchool.Id!=null&&n.subSMEASchool.Id!=""&&n.subSMEASchool.Id!="undefined")n.canUpdateAppl&&n.subSMEASchool.PersonId!=null&&n.subSMEASchool.PersonId!=""&&n.subSMEASchool.PersonId!="undefined"&&o.getPersonForApplication(n.subSMEASchool.PersonId).then(function(t){if(n.person=t,n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1,n.showCivilServantBlock(),n.checkCivilServant(),u.isEmpty(n.SelectedSpecListItems)){u.isValueInArray(n.pageRules.subSMEASchool.CanAccess,"d1, d2, m1, m2")&&n.subSMEASchool.LevelId!=n.authentication.levelId&&(n.canUpdateAppl=!1);n.IsDisabled=!n.canUpdateAppl;n.subSMEASchool.IsActive||(n.IsDisabled=!0,n.notActive=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.subSMEASchool.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0);u.isEmpty(n.subSMEASchool.ApplicationSubstituteProtocols)||(n.protocol=n.subSMEASchool.ApplicationSubstituteProtocols[0].ProtocolString,n.showProtocol=!0);var i=e.all([u.getByParams({applicationId:n.subSMEASchool.Id,ApplicationTypeFekId:n.fek.Id},"/api/ApplSubstituteSMEASchool/GetApplRegionsByApplId"),u.getByParams({specialityId:n.SelectedSpecListItems.Id,personId:n.subSMEASchool.PersonId},"/api/ApplSubstituteSMEASchool/GetAvailRegionsBySpecialityId"),]);i.then(function(t){n.SelectedRegionsListItems=t[0];n.SelectedAvailRegionsItems=t[0];angular.copy(t[1],n.AvailableRegionsListItems);u.isEmptyValue(n.AvailableRegionsListItems)?(n.mess+="<li>Δεν υπάρχουν διαθέσιμα κενά για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2):(n.SelectedAvailRegionsItems=n.SelectedRegionsListItems,n.changeSelectHeight(),n.removeDuplicatesRegionsForDualList());unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των περιοχών της αίτησης.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})}},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description);unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")}),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm");else{if(n.canInsertAppl&&n.subSMEASchool.PersonId!=null&&n.subSMEASchool.PersonId!=""&&n.subSMEASchool.PersonId!="undefined"){var t=e.all([o.getPersonForApplication(n.subSMEASchool.PersonId)]);t.then(function(t){n.person=t[0];n.SelectedAvailSpecItems=[];n.SelectedSelectedSpecListItems=[];n.AvailableRegionsListItems=[];u.isEmptyValue(n.SelectedSpecListItems)||u.getByParams({specialityId:n.SelectedSpecListItems.Id,personId:n.subSMEASchool.PersonId},"/api/ApplSubstituteSMEASchool/GetAvailRegionsBySpecialityId").then(function(t){angular.copy(t,n.AvailableRegionsListItems);u.isEmptyValue(n.AvailableRegionsListItems)?(n.mess+="<li>Δεν υπάρχουν διαθέσιμα κενά για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2):(n.SelectedAvailRegionsItems=n.SelectedRegionsListItems,n.changeSelectHeight(),n.removeDuplicatesRegionsForDualList());unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description);unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})}unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")}};n.openModal=function(t,i){n.myList=[];n.selectedCode=i;angular.copy(t,n.myList)};n.getApplication=function(){if(n.subSMEASchool.Id!=null&&n.subSMEASchool.Id!=""&&n.subSMEASchool.Id!="undefined"&&(n.DisableDLevel=!0,n.canUpdateAppl&&n.subSMEASchool.PersonId!=null&&n.subSMEASchool.PersonId!=""&&n.subSMEASchool.PersonId!="undefined")){var t=e.all([u.getByParams({Id:n.subSMEASchool.Id},"/api/ApplSubstituteSMEASchool/GetApplSubstituteSMEASchoolById")]);t.then(function(t){n.subSMEASchool=t[0];n.doAll();var i=e.all([u.getByParams({personId:n.subSMEASchool.PersonId,applicationTypeId:n.applicationType,didacticYearId:n.subSMEASchool.DidacticYearId,applicationId:n.subSMEASchool.Id},"api/HistoryAppl/getLevelByApplTypeIdAndPersonIdAndYear")]);i.then(function(t){n.levels=t[0];unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})})}};n.SelectedSpecAvailItems=[];n.SelectedSelectedSpecListItems=[];n.SelectedSpecListItems=[];n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[];n.SelectedRegionsListItems=[];n.btnRegionsUp=function(){for(var t,r,u,f=n.SelectedSelectedRegionsListItems,i=0;i<n.SelectedSelectedRegionsListItems.length;i++){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<=0||t>=n.SelectedRegionsListItems.length)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t-1];n.SelectedRegionsListItems[t-1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsDown=function(){for(var t,r,u,i=n.SelectedSelectedRegionsListItems.length-1;i>=0;i--){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<0||t>=n.SelectedRegionsListItems.length-1)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t+1];n.SelectedRegionsListItems[t+1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsRight=function(){angular.forEach(n.SelectedAvailRegionsItems,function(n){this.push(n)},n.SelectedRegionsListItems);angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SpecialSupport==!1&&(n.subSMEASchool.AcceptFullSubstitudeForSpecialSupport=!1);n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.btnRegionsLeft=function(){angular.forEach(n.SelectedSelectedRegionsListItems,function(n){this.push(n)},n.AvailableRegionsListItems);angular.forEach(n.SelectedSelectedRegionsListItems,function(t){for(var i=n.SelectedRegionsListItems.length-1;i>=0;i--)n.SelectedRegionsListItems[i].Id==t.Id&&n.SelectedRegionsListItems.splice(i,1)});n.SpecialSupport==!1&&(n.subSMEASchool.AcceptFullSubstitudeForSpecialSupport=!1);n.SelectedSelectedRegionsListItems=[];n.SelectedAvailRegionsItems=[]};n.checkRegions=function(){var i=0,t=0,f=60,u=30;n.canInsertRegions=!0;n.SelectedRegionsListItems.length+n.SelectedAvailRegionsItems.length>f&&(r.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών","Δεν μπορείτε να επιλέξετε περισσότερες από "+f+" περιοχές"),n.canInsertRegions=!1);angular.forEach(n.SelectedRegionsListItems,function(n){n.Level==1?i=i+1:t=t+1});angular.forEach(n.SelectedAvailRegionsItems,function(n){n.Level==1?i=i+1:t=t+1});i>u&&(r.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών Α/βάθμιας","Δεν μπορείτε να επιλέξετε περισσότερες από "+u+" περιοχές Α/βάθμιας"),n.canInsertRegions=!1);t>t&&(r.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών Β/βάθμιας","Δεν μπορείτε να επιλέξετε περισσότερες από "+u+" περιοχές Β/βάθμιας"),n.canInsertRegions=!1)};n.removeDuplicatesRegionsForDualList=function(){angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.editPerson=function(){t.setPersonId(n.subSMEASchool.PersonId);i.go("stateEditPerson")};n.saveAction=function(t){n.showAlertRegion=u.isEmpty(n.SelectedRegionsListItems)?!0:!1;n.canSave=!0;n.showAlertSpec||n.showAlertRegion||!n.canSave||n.InsOrUpd(t)};n.InsOrUpd=function(f){n.subSMEASchool.SpecialityId=n.SelectedSpecListItems.Id;n.subSMEASchool.LevelId=n.SelectedSpecListItems.LevelId;var o={SubstituteSMEASchool:n.subSMEASchool,RegionAndUnit:n.SelectedRegionsListItems,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Status:f,ApplicationTypeFekId:n.fek.Id},e=o;n.subSMEASchool.Id!=null&&n.subSMEASchool.Id!=""&&n.subSMEASchool.Id!="undefined"?(n.subSMEASchool.ModifiedBy=n.authentication.userName,u.postByParams(e,"/api/ApplSubstituteSMEASchool/updateApplSubstituteSMEASchool").then(function(){t.setPersonId(n.subSMEASchool.PersonId);i.go("history")}).catch(function(n){r.pop("error","Παρουσιάστηκε σφάλμα",n.data)})):(n.subSMEASchool.DidacticYearId=n.didacticYear.Id,n.subSMEASchool.CreatedBy=n.authentication.userName,u.postByParams(e,"/api/ApplSubstituteSMEASchool/insertApplSubstituteSMEASchool").then(function(){t.setPersonId(n.subSMEASchool.PersonId);i.go("history")}).catch(function(n){r.pop("error","Παρουσιάστηκε σφάλμα",n.data)}))}};SubstituteSMEAForSchoolController.$inject=["$scope","PassParameters","$state","toaster","GeneralFactory","$filter","$q","PersonFactory"];SubstituteTE0130SchoolController=function(n,t,i,r,u,f,e,o){if(n.mess="",n.messInfo="",n.subTE0130School={IsTemporaryStored:!0},n.subTE0130SchoolOld=[],n.person={},n.applicationType=38,n.step1=!0,n.step2=!1,n.continueDisabled=!0,n.perspec={},n.SelectedSpecs=[],n.hasValidFekNoConfirmSpeciality=!1,n.alerts="",n.showToConfirmSpeciality=!1,n.selected={Years:[]},n.HasSpecPe70=!1,n.HasSpecPe11Pe06=!1,n.SelectedAvailRegionsItems=[],n.SelectedSelectedRegionsListItems=[],n.SelectedRegionsListItems=[],n.AvailableSpecListItems=[],n.AvailableRegionsListItems=[],n.showAlertSpec=!1,n.showAlertRegion=!1,n.DisableDLevel=!1,n.protocol="",n.showProtocol=!1,n.cannotUpdate=!1,n.notActive=!1,n.noUpdAccess=!1,n.canInsertAppl=!1,n.canUpdateAppl=!1,n.hasValidFek=!1,n.showAddEditForm=0,n.userLevel=0,n.fek={},n.hasboth=!1,n.HasFullLevel1=[],n.HasFullLevel2=[],n.HasNoFullLevel1=[],n.HasNoFullLevel2=[],n.applicationLevelId=0,blockUI({target:"#divBlockUI",animate:!0}),n.goToStep=function(t,i){t==2?u.getByParams({applicationTypeId:n.applicationType,specialityId:i},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(t){n.SelectedSpecListItems=f("filter")(n.AvailableSpecListItems,{Id:i},!0)[0];n.fek=t;u.isEmptyValue(t)?(n.mess="<li>Δεν υπαρχει ενεργό ΦΕΚ για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2):(n.step1=!1,n.step2=!0,n.subTE0130School.SpecialityId=i,n.subTE0130School.LevelId=n.SelectedSpecListItems.LevelId,blockUI({target:"#divBlockUIForm",animate:!0}),n.doAll())},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}):(n.step1=!0,n.step2=!1,n.DisableDLevel=u.isEmpty(n.SelectedSpecListItems)&&u.isEmptyValue(n.subTE0130School.Id)?!1:!0,n.SelectedRegionsListItems=[],n.SelectedSelectedRegionsListItems=[])},n.canSave=!0,n.pageRules={},n.IsDisabled=!1,n.paramsForCheckUpd={personId:"",levelUser:"",regionAndUnitId:"",userRole:"",specialityId:"",applicationLevelId:"",applicationTypeId:"",IsActive:""},n.authentication.isAuth){var s="subTE0130School";u.getByParams({role:n.authentication.role,codes:s},"/api/Subsystem/NewCheckPermission").then(function(i){var o=s.split(","),h,c;for(h in o)n.pageRules[o[h]]=f("filter")(i,{Code:o[h]},!0)[0].Rules;n.subTE0130School.Id=t.getApplicationId();n.applicationLevelId=t.getApplicationLevelId();u.isEmptyValue(n.applicationLevelId)&&(n.applicationLevelId=0);u.isEmptyValue(n.subTE0130School.Id)?(n.step1=!0,n.step2=!1):(n.step1=!1,n.step2=!0);t.resetApplication();n.subTE0130School.PersonId=t.getPersonId();u.isValueInArray(n.pageRules.subTE0130School.CanAccess,"u1, u2")&&(n.subTE0130School.PersonId=n.authentication.personId);c=e.all([u.getByParams({personId:n.subTE0130School.PersonId},"/api/ApplSubstituteTE0130School/getSpecialityForSubstituteSchool"),u.getByParams({Id:n.subTE0130School.PersonId},"/api/ApplSubstituteTE0130School/GetApplSubstituteSchool"),u.getByParams({personId:n.subTE0130School.PersonId},"/api/RecruitmentServiceAssumed/getSubstitutesServiceAssumed")]);c.then(function(i){var s,o,e;for(angular.copy(i[0].PersonSelectedSpec,n.AvailableSpecListItems),n.CanWorkAsEEP=i[0].CanWorkAsEEP,n.applSub=i[1],s=i[2].substitutes,n.subs=f("filter")(s,function(n){return n.SubstitutesTypeId!=9&&n.SubstitutesTypeId!=10&&n.SubstitutesTypeId!=11&&n.SubstitutesTypeId!=12}),e=n.AvailableSpecListItems.length-1;e>=0;e--)n.AvailableSpecListItems[e].hasApplPerm=0;for(o=n.applSub.length-1;o>=0;o--)for(e=n.AvailableSpecListItems.length-1;e>=0;e--)n.applSub[o].SpecialityId==n.AvailableSpecListItems[e].Id&&(n.AvailableSpecListItems[e].hasApplSub=1);n.subTE0130School.Id!=null&&n.subTE0130School.Id!=""&&n.subTE0130School.Id!="undefined"?(u.isEmptyValue(n.subTE0130School.SpecialityId)&&(n.subTE0130School.SpecialityId=t.getSpecialityId()),u.getByParams({applicationTypeId:n.applicationType,specialityId:n.subTE0130School.SpecialityId},"/api/ApplicationTypeFek/getActiveFekFromApplicatioTypeAndSpeciality").then(function(t){n.fek=t;n.SelectedSpecListItems=f("filter")(n.AvailableSpecListItems,{Id:n.subTE0130School.SpecialityId},!0)[0];u.isEmptyValue(t)||u.isEmptyValue(n.SelectedSpecListItems)?(n.mess+="<li>Δεν μπορείτε να τροποποιήσετε την αίτηση γιατί δεν υπάρχει ανοιχτό ΦΕΚ <\/li>",n.showAddEditForm=2):(n.canUpdateAppl=!0,n.showAddEditForm=1,n.getApplication())},function(n){unblockUI("#divBlockUI");unblockUI("#divBlockUIForm");r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})):u.isEmpty(n.AvailableSpecListItems)?(u.isEmpty(n.subs)?n.CanWorkAsEEP==2?n.mess+="<li>Δεν μπορεί να υποβληθεί αίτηση καθώς δεν πληρούνται οι προϋποθέσεις του άρθρου 165 του ν.4763/2020 (ΦΕΚ 254Α)<\/li>":n.CanWorkAsEEP==0&&(n.mess+="<li>Δεν μπορείτε να υποβάλετε αίτηση. Δεν βρίσκεστε στον ενιαίο πίνακα για τον κλάδο ΤΕ01.30 <\/li>"):n.mess+="<li>Δεν μπορείτε να υποβάλετε αίτηση. Έχετε ήδη προσληφθεί το τρέχον σχολικό έτος<\/li>",n.showAddEditForm=2):(n.canInsertAppl=!0,n.showAddEditForm=1)})},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml");unblockUI("#divBlockUI")})}else i.go("/");u.isValueInArray(u.getRoleCode(n.authentication.role),"d1, d2")&&(n.userLevel=n.authentication.levelId,n.subTE0130School.LevelId=n.authentication.levelId,n.subTE0130School.IntendancyId=n.authentication.regionAndUnitId);n.changeSelectHeight=function(){var t,i,r;n.HasFullLevel1=f("filter")(n.AvailableRegionsListItems,{IsFull:!0,Level:1},!0)[0];n.HasFullLevel2=f("filter")(n.AvailableRegionsListItems,{IsFull:!0,Level:2},!0)[0];n.HasNoFullLevel1=f("filter")(n.AvailableRegionsListItems,{IsFull:!1,Level:1},!0)[0];n.HasNoFullLevel2=f("filter")(n.AvailableRegionsListItems,{IsFull:!1,Level:2},!0)[0];t=0;u.isEmptyValue(n.HasFullLevel1)||(t=t+15);u.isEmptyValue(n.HasFullLevel2)||(t=t+15);u.isEmptyValue(n.HasNoFullLevel1)||(t=t+15);u.isEmptyValue(n.HasNoFullLevel2)||(t=t+15);i=document.getElementsByTagName("SELECT")[4];r=document.getElementsByTagName("TABLE");i.id==="selectedRegionslistfinal"&&(i.size=t,r[0].height=t*15,r[1].height=t*15)};n.checkCivilServant=function(){n.IsCivilServant==1?n.showCivilServantFull=!1:(n.subTE0130School.PublicServantFull=0,n.showCivilServantFull=!0)};n.showCivilServantBlock=function(){return n.IsCivilServant==!0?!0:!1};n.checkForBoth=function(){n.hasboth=f("filter")(n.AvailableRegionsListItems,function(n){return n.Level==1}).length>0&&f("filter")(n.AvailableRegionsListItems,function(n){return n.Level==2}).length>0?!0:!1;n.hasboth||(n.sub.AcceptAllSubstitudeToPrimarySpecialEducation=!1)};n.showDetails=function(){return n.SelectedSpecs.length>0?!0:!1};n.changeLevel=function(){u.isEmptyValue(n.subTE0130School.LevelId)?(n.subTE0130School.LevelId=null,n.intendancies=[],n.subTE0130School.IntendancyId=null,n.continueDisabled=!0):(RegionAndFactory.getIntendancies(n.subTE0130School.LevelId).then(function(t){n.intendancies=t}).catch(function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα στην εύρεση διευθύνσεων")}),u.isEmptyValue(n.subTE0130School.Id)&&(n.subTE0130School.IntendancyId=null),n.continueDisabled=!1)};n.doAll=function(){if(u.isEmpty(n.applSub)||(n.subTE0130SchoolOld=f("filter")(n.applSub,{SpecialityId:n.subTE0130School.SpecialityId},!0)[0],u.isEmptyValue(n.subTE0130SchoolOld)||(n.subTE0130School=n.subTE0130SchoolOld,n.subTE0130School.LevelId=n.SelectedSpecListItems.LevelId),n.canUpdateAppl=!0,n.showAddEditForm=1),n.subTE0130School.Id!=null&&n.subTE0130School.Id!=""&&n.subTE0130School.Id!="undefined")n.canUpdateAppl&&n.subTE0130School.PersonId!=null&&n.subTE0130School.PersonId!=""&&n.subTE0130School.PersonId!="undefined"&&o.getPersonForApplication(n.subTE0130School.PersonId).then(function(t){if(n.person=t,n.IsCivilServant=n.person.CivilServant=="ΝΑΙ"?!0:!1,n.showCivilServantBlock(),n.checkCivilServant(),u.isEmpty(n.SelectedSpecListItems)){u.isValueInArray(n.pageRules.subTE0130School.CanAccess,"d1, d2, m1, m2")&&n.subTE0130School.LevelId!=n.authentication.levelId&&(n.canUpdateAppl=!1);n.IsDisabled=!n.canUpdateAppl;n.subTE0130School.IsActive||(n.IsDisabled=!0,n.notActive=!0);n.IsDisabled||(n.IsDisabled=!n.pageRules.subTE0130School.CanUpdate);n.IsDisabled&&(n.noUpdAccess=!0);u.isEmpty(n.subTE0130School.ApplicationSubstituteProtocols)||(n.protocol=n.subTE0130School.ApplicationSubstituteProtocols[0].ProtocolString,n.showProtocol=!0);var i=e.all([u.getByParams({applicationId:n.subTE0130School.Id,ApplicationTypeFekId:n.fek.Id},"/api/ApplSubstituteTE0130School/GetApplRegionsByApplId"),u.getByParams({specialityId:n.SelectedSpecListItems.Id,personId:n.subTE0130School.PersonId},"/api/ApplSubstituteTE0130School/GetAvailRegionsBySpecialityId"),]);i.then(function(t){n.SelectedRegionsListItems=t[0];n.SelectedAvailRegionsItems=t[0];angular.copy(t[1],n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;u.isEmptyValue(n.AvailableRegionsListItems)?(n.mess+="<li>Δεν υπάρχουν διαθέσιμα κενά για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2):(n.changeSelectHeight(),n.removeDuplicatesRegionsForDualList());unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")},function(){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των περιοχών της αίτησης.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})}},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description);unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")}),unblockUI("#divBlockUI"),unblockUI("#divBlockUIForm");else{if(n.canInsertAppl&&n.subTE0130School.PersonId!=null&&n.subTE0130School.PersonId!=""&&n.subTE0130School.PersonId!="undefined"){var t=e.all([o.getPersonForApplication(n.subTE0130School.PersonId)]);t.then(function(t){n.person=t[0];n.SelectedAvailSpecItems=[];n.SelectedSelectedSpecListItems=[];n.AvailableRegionsListItems=[];u.isEmptyValue(n.SelectedSpecListItems)||u.getByParams({specialityId:n.SelectedSpecListItems.Id,personId:n.subTE0130School.PersonId},"/api/ApplSubstituteTE0130School/GetAvailRegionsBySpecialityId").then(function(t){angular.copy(t,n.AvailableRegionsListItems);u.isEmptyValue(n.AvailableRegionsListItems)?(n.mess+="<li>Δεν υπάρχουν διαθέσιμα κενά για τον κλάδο "+n.SelectedSpecListItems.Code+"<\/li>",n.showAddEditForm=2):(n.SelectedAvailRegionsItems=n.SelectedRegionsListItems,n.changeSelectHeight(),n.removeDuplicatesRegionsForDualList());unblockUI("#divBlockUIRegion")},function(n){unblockUI("#divBlockUIRegion");r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description);unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})}unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")}};n.openModal=function(t,i){n.myList=[];n.selectedCode=i;angular.copy(t,n.myList)};n.getApplication=function(){if(n.subTE0130School.Id!=null&&n.subTE0130School.Id!=""&&n.subTE0130School.Id!="undefined"&&(n.DisableDLevel=!0,n.canUpdateAppl&&n.subTE0130School.PersonId!=null&&n.subTE0130School.PersonId!=""&&n.subTE0130School.PersonId!="undefined")){var t=e.all([u.getByParams({Id:n.subTE0130School.Id},"/api/ApplSubstituteTE0130School/GetApplSubstituteSchoolById")]);t.then(function(t){n.subTE0130School=t[0];n.doAll();var i=e.all([u.getByParams({personId:n.subTE0130School.PersonId,applicationTypeId:n.applicationType,didacticYearId:n.subTE0130School.DidacticYearId,applicationId:n.subTE0130School.Id},"api/HistoryAppl/getLevelByApplTypeIdAndPersonIdAndYear")]);i.then(function(t){n.levels=t[0];n.changeLevel();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})})}};n.SelectedSpecAvailItems=[];n.SelectedSelectedSpecListItems=[];n.SelectedSpecListItems=[];n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[];n.SelectedRegionsListItems=[];n.btnRegionsUp=function(){for(var t,r,u,f=n.SelectedSelectedRegionsListItems,i=0;i<n.SelectedSelectedRegionsListItems.length;i++){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<=0||t>=n.SelectedRegionsListItems.length)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t-1];n.SelectedRegionsListItems[t-1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsDown=function(){for(var t,r,u,i=n.SelectedSelectedRegionsListItems.length-1;i>=0;i--){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<0||t>=n.SelectedRegionsListItems.length-1)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t+1];n.SelectedRegionsListItems[t+1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsRight=function(){angular.forEach(n.SelectedAvailRegionsItems,function(n){this.push(n)},n.SelectedRegionsListItems);angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SpecialSupport==!1&&(n.subTE0130School.AcceptFullSubstitudeForSpecialSupport=!1);n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.btnRegionsLeft=function(){angular.forEach(n.SelectedSelectedRegionsListItems,function(n){this.push(n)},n.AvailableRegionsListItems);angular.forEach(n.SelectedSelectedRegionsListItems,function(t){for(var i=n.SelectedRegionsListItems.length-1;i>=0;i--)n.SelectedRegionsListItems[i].Id==t.Id&&n.SelectedRegionsListItems.splice(i,1)});n.SpecialSupport==!1&&(n.subTE0130School.AcceptFullSubstitudeForSpecialSupport=!1);n.SelectedSelectedRegionsListItems=[];n.SelectedAvailRegionsItems=[]};n.checkRegions=function(){var i=0,t=0,f=60,u=30;n.canInsertRegions=!0;n.SelectedRegionsListItems.length+n.SelectedAvailRegionsItems.length>f&&(r.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών","Δεν μπορείτε να επιλέξετε περισσότερες από "+f+" περιοχές"),n.canInsertRegions=!1);angular.forEach(n.SelectedRegionsListItems,function(n){n.Level==1?i=i+1:t=t+1});angular.forEach(n.SelectedAvailRegionsItems,function(n){n.Level==1?i=i+1:t=t+1});i>u&&(r.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών Α/βάθμιας","Δεν μπορείτε να επιλέξετε περισσότερες από "+u+" περιοχές Α/βάθμιας"),n.canInsertRegions=!1);t>t&&(r.pop("error","Υπερβήκατε το μέγιστο επιτρεπτό πλήθος περιοχών Β/βάθμιας","Δεν μπορείτε να επιλέξετε περισσότερες από "+u+" περιοχές Β/βάθμιας"),n.canInsertRegions=!1)};n.removeDuplicatesRegionsForDualList=function(){angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.editPerson=function(){t.setPersonId(n.subTE0130School.PersonId);i.go("stateEditPerson")};n.saveAction=function(t){n.showAlertRegion=u.isEmpty(n.SelectedRegionsListItems)?!0:!1;n.canSave=!0;n.showAlertSpec||n.showAlertRegion||!n.canSave||n.InsOrUpd(t)};n.InsOrUpd=function(f){n.subTE0130School.SpecialityId=n.SelectedSpecListItems.Id;n.subTE0130School.LevelId=n.SelectedSpecListItems.LevelId;var o={SubstituteTE0130School:n.subTE0130School,RegionAndUnit:n.SelectedRegionsListItems,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName,Status:f,ApplicationTypeFekId:n.fek.Id},e=o;n.subTE0130School.Id!=null&&n.subTE0130School.Id!=""&&n.subTE0130School.Id!="undefined"?(n.subTE0130School.ModifiedBy=n.authentication.userName,u.postByParams(e,"/api/ApplSubstituteTE0130School/updateApplSubstituteSchool").then(function(){t.setPersonId(n.subTE0130School.PersonId);i.go("history")}).catch(function(n){r.pop("error","Παρουσιάστηκε σφάλμα",n.data)})):(n.subTE0130School.DidacticYearId=n.didacticYear.Id,n.subTE0130School.CreatedBy=n.authentication.userName,u.postByParams(e,"/api/ApplSubstituteTE0130School/insertApplSubstituteSchool").then(function(){t.setPersonId(n.subTE0130School.PersonId);i.go("history")}).catch(function(n){r.pop("error","Παρουσιάστηκε σφάλμα",n.data)}))}};SubstituteTE0130SchoolController.$inject=["$scope","PassParameters","$state","toaster","GeneralFactory","$filter","$q","PersonFactory"];SubsystemController=function(n,t,i,r){n.authentication.isAuth||t.go("/");n.cmbSubsystem={};n.cmbSubsystemList=[];n.ShowPermissions=!0;n.tables=[];r.getByAll("/api/Subsystem/GetSubsystems").then(function(t){n.cmbSubsystemList=t},function(){i.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των Υποσυστημάτων")});n.getRoleAccessRulesAsync=function(){n.cmbSubsystem.selected.Id&&(blockUI({target:"#blockui_sample_1_portlet_body",animate:!0}),r.getByParams({parentId:n.cmbSubsystem.selected.Id},"/api/Subsystem/GetRoleAccessRulesAsync").then(function(t){n.tables=t;n.ShowPermissions=n.tables===undefined||n.tables.length==0?!0:!1;unblockUI("#blockui_sample_1_portlet_body")},function(){unblockUI("#blockui_sample_1_portlet_body");i.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των Δικαιωμάτων")}))};n.setAccessRulesAsync=function(n,t,u,f){r.getByParams({id:u,isChecked:f},"/api/Subsystem/UpdateAccessRuleAsync").then(function(r){r?i.pop("success","Αλλαγή Δικαιωμάτων","<p>Έγινε ενημέρωση στη <b>"+n+"<\/b> του ρόλου <b>"+t+"<\/b><\/p>",3e3,"trustedHtml"):i.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε η ενημέρωση στη <b>"+n+"<\/b> του ρόλου <b>"+t+"<\/b>",3e3,"trustedHtml")},function(){i.pop("warning"," Παρουσιάστηκε σφάλμα","Δεν έγινε η ενημέρωση στη <b>"+n+"<\/b> του ρόλου <b>"+t+"<\/b>",3e3,"trustedHtml")})}};SubsystemController.$inject=["$scope","$state","toaster","GeneralFactory"];TablePerSpecialityController=function(n,t,i,r){n.allSpecialities=[];n.modifySpecialities=[];n.diffSpecialities=[];n.getAllSpecialities=function(){i.getByAll("/api/Speciality/getSpecialitiesForTable").then(function(t){n.allSpecialities=t;angular.forEach(n.allSpecialities,function(n){n.HasAsepTemp=n.HasAsepTemp?"true":"false"});n.tableAllSpecialities=angular.copy(n.allSpecialities)}).catch(function(){})};n.getAllSpecialities();n.saveTablePerSpeciality=function(){n.diffSpecialities=[];n.tableAllSpecialities.forEach(t=>{var i=n.allSpecialities.find(n=>n.Id===t.Id);t.HasAsepTemp!==i.HasAsepTemp&&n.diffSpecialities.push({Id:t.Id,HasAsepTemp:t.HasAsepTemp})});i.postByParams(n.diffSpecialities,"/api/Speciality/updateSpecialitiesPerTable").then(function(){n.getAllSpecialities();r.pop("success","Επιτυχής Εισαγωγή","Η ενημέρωση ολοκληρώθηκε με επιτυχία.")},function(n){r.pop("error","Μήνυμα λάθους",n.data)})};n.checkSaveTablePerSpeciality=function(){if(n.diffSpecialitiesForCheck=[],n.tableAllSpecialities.forEach(t=>{var i=n.allSpecialities.find(n=>n.Id===t.Id);t.HasAsepTemp!==i.HasAsepTemp&&n.diffSpecialitiesForCheck.push({Id:t.Id,Code:i.Code,Description:i.Description,HasAsepTempOld:i.HasAsepTemp,HasAsepTempNew:t.HasAsepTemp})}),n.diffSpecialitiesForCheck=n.diffSpecialitiesForCheck,n.diffSpecialitiesForCheck.length===0){r.pop("warning","Μήνυμα","Δεν υπάρχουν αλλαγές για αποθήκευση.");return}$("#saveTablePerSpeciality").modal("show")}};TablePerSpecialityController.$inject=["$scope","$state","GeneralFactory","toaster"];TokensManagerController=function(n,t){n.refreshTokens=[];t.getRefreshTokens().then(function(t){n.refreshTokens=t.data},function(n){alert(n.data.message)});n.deleteRefreshTokens=function(i,r){r=window.encodeURIComponent(r);t.deleteRefreshTokens(r).then(function(){n.refreshTokens.splice(i,1)},function(n){alert(n.data.message)})};n.Index;n.TokenId;n.Subject;n.openModal=function(t,i,r){n.Index=t;n.TokenId=i;n.Subject=r}};TokensManagerController.$inject=["$scope","TokensManagerService"];UISelectController=function(n,t){n.$on("$viewContentLoaded",function(){OpsydCoreJS.initAjax()});n.test=!0;n.cmbtest="";n.disabled=!1;n.hide=!1;n.iCheckChange=function(t){n.test=t};n.iCheckChangecmb=function(){n.cmbtest=="1"?(n.test=!0,n.disabled=!1,n.hide=!1):n.cmbtest=="2"?(n.test=!1,n.disabled=!1,n.hide=!1):n.cmbtest=="3"?(n.disabled=!0,n.hide=!1):n.cmbtest=="4"?(n.test=!1,n.disabled=!1,n.hide=!0):(n.test=!1,n.disabled=!1,n.hide=!1)};n.disabled=undefined;n.searchEnabled=undefined;n.enable=function(){n.disabled=!1};n.disable=function(){n.disabled=!0};n.enableSearch=function(){n.searchEnabled=!0};n.disableSearch=function(){n.searchEnabled=!1};n.clear=function(){n.person.selected=undefined;n.address.selected=undefined;n.country.selected=undefined};n.someGroupFn=function(n){return n.name[0]>="A"&&n.name[0]<="M"?"From A - M":n.name[0]>="N"&&n.name[0]<="Z"?"From N - Z":void 0};n.personAsync={selected:"wladimir@email.com"};n.peopleAsync=[];t(function(){n.peopleAsync=[{name:"Adam",email:"adam@email.com",age:12,country:"United States"},{name:"Amalie",email:"amalie@email.com",age:12,country:"Argentina"},{name:"Estefanía",email:"estefania@email.com",age:21,country:"Argentina"},{name:"Adrian",email:"adrian@email.com",age:21,country:"Ecuador"},{name:"Wladimir",email:"wladimir@email.com",age:30,country:"Ecuador"},{name:"Samantha",email:"samantha@email.com",age:30,country:"United States"},{name:"Nicole",email:"nicole@email.com",age:43,country:"Colombia"},{name:"Natasha",email:"natasha@email.com",age:54,country:"Ecuador"},{name:"Michael",email:"michael@email.com",age:15,country:"Colombia"},{name:"Nicolás",email:"nicole@email.com",age:43,country:"Colombia"}]},3e3);n.counter=0;n.someFunction=function(t,i){n.counter++;n.eventResult={item:t,model:i}};n.removed=function(t,i){n.lastRemoved={item:t,model:i}};n.person={};n.people=[{name:"Adam",email:"adam@email.com",age:12,country:"United States"},{name:"Amalie",email:"amalie@email.com",age:12,country:"Argentina"},{name:"Estefanía",email:"estefania@email.com",age:21,country:"Argentina"},{name:"Adrian",email:"adrian@email.com",age:21,country:"Ecuador"},{name:"Wladimir",email:"wladimir@email.com",age:30,country:"Ecuador"},{name:"Samantha",email:"samantha@email.com",age:30,country:"United States"},{name:"Nicole",email:"nicole@email.com",age:43,country:"Colombia"},{name:"Natasha",email:"natasha@email.com",age:54,country:"Ecuador"},{name:"Michael",email:"michael@email.com",age:15,country:"Colombia"},{name:"Nicolás",email:"nicolas@email.com",age:43,country:"Colombia"}];n.availableColors=["Red","Green","Blue","Yellow","Magenta","Maroon","Umbra","Turquoise"];n.multipleDemo={};n.multipleDemo.colors=["Blue","Red"];n.multipleDemo.selectedPeople=[n.people[5],n.people[4]];n.multipleDemo.selectedPeopleWithGroupBy=[n.people[8],n.people[6]];n.multipleDemo.selectedPeopleSimple=["samantha@email.com","wladimir@email.com"];n.address={};n.refreshAddresses=function(n){var t={address:n,sensor:!1}};n.country={};n.countries=[{name:"Afghanistan",code:"AF"},{name:"Åland Islands",code:"AX"},{name:"Albania",code:"AL"},{name:"Algeria",code:"DZ"},{name:"American Samoa",code:"AS"},{name:"Andorra",code:"AD"},{name:"Angola",code:"AO"},{name:"Anguilla",code:"AI"},{name:"Antarctica",code:"AQ"},{name:"Antigua and Barbuda",code:"AG"},{name:"Argentina",code:"AR"},{name:"Armenia",code:"AM"},{name:"Aruba",code:"AW"},{name:"Australia",code:"AU"},{name:"Austria",code:"AT"},{name:"Azerbaijan",code:"AZ"},{name:"Bahamas",code:"BS"},{name:"Bahrain",code:"BH"},{name:"Bangladesh",code:"BD"},{name:"Barbados",code:"BB"},{name:"Belarus",code:"BY"},{name:"Belgium",code:"BE"},{name:"Belize",code:"BZ"},{name:"Benin",code:"BJ"},{name:"Bermuda",code:"BM"},{name:"Bhutan",code:"BT"},{name:"Bolivia",code:"BO"},{name:"Bosnia and Herzegovina",code:"BA"},{name:"Botswana",code:"BW"},{name:"Bouvet Island",code:"BV"},{name:"Brazil",code:"BR"},{name:"British Indian Ocean Territory",code:"IO"},{name:"Brunei Darussalam",code:"BN"},{name:"Bulgaria",code:"BG"},{name:"Burkina Faso",code:"BF"},{name:"Burundi",code:"BI"},{name:"Cambodia",code:"KH"},{name:"Cameroon",code:"CM"},{name:"Canada",code:"CA"},{name:"Cape Verde",code:"CV"},{name:"Cayman Islands",code:"KY"},{name:"Central African Republic",code:"CF"},{name:"Chad",code:"TD"},{name:"Chile",code:"CL"},{name:"China",code:"CN"},{name:"Christmas Island",code:"CX"},{name:"Cocos (Keeling) Islands",code:"CC"},{name:"Colombia",code:"CO"},{name:"Comoros",code:"KM"},{name:"Congo",code:"CG"},{name:"Congo, The Democratic Republic of the",code:"CD"},{name:"Cook Islands",code:"CK"},{name:"Costa Rica",code:"CR"},{name:"Cote D'Ivoire",code:"CI"},{name:"Croatia",code:"HR"},{name:"Cuba",code:"CU"},{name:"Cyprus",code:"CY"},{name:"Czech Republic",code:"CZ"},{name:"Denmark",code:"DK"},{name:"Djibouti",code:"DJ"},{name:"Dominica",code:"DM"},{name:"Dominican Republic",code:"DO"},{name:"Ecuador",code:"EC"},{name:"Egypt",code:"EG"},{name:"El Salvador",code:"SV"},{name:"Equatorial Guinea",code:"GQ"},{name:"Eritrea",code:"ER"},{name:"Estonia",code:"EE"},{name:"Ethiopia",code:"ET"},{name:"Falkland Islands (Malvinas)",code:"FK"},{name:"Faroe Islands",code:"FO"},{name:"Fiji",code:"FJ"},{name:"Finland",code:"FI"},{name:"France",code:"FR"},{name:"French Guiana",code:"GF"},{name:"French Polynesia",code:"PF"},{name:"French Southern Territories",code:"TF"},{name:"Gabon",code:"GA"},{name:"Gambia",code:"GM"},{name:"Georgia",code:"GE"},{name:"Germany",code:"DE"},{name:"Ghana",code:"GH"},{name:"Gibraltar",code:"GI"},{name:"Greece",code:"GR"},{name:"Greenland",code:"GL"},{name:"Grenada",code:"GD"},{name:"Guadeloupe",code:"GP"},{name:"Guam",code:"GU"},{name:"Guatemala",code:"GT"},{name:"Guernsey",code:"GG"},{name:"Guinea",code:"GN"},{name:"Guinea-Bissau",code:"GW"},{name:"Guyana",code:"GY"},{name:"Haiti",code:"HT"},{name:"Heard Island and Mcdonald Islands",code:"HM"},{name:"Holy See (Vatican City State)",code:"VA"},{name:"Honduras",code:"HN"},{name:"Hong Kong",code:"HK"},{name:"Hungary",code:"HU"},{name:"Iceland",code:"IS"},{name:"India",code:"IN"},{name:"Indonesia",code:"ID"},{name:"Iran, Islamic Republic Of",code:"IR"},{name:"Iraq",code:"IQ"},{name:"Ireland",code:"IE"},{name:"Isle of Man",code:"IM"},{name:"Israel",code:"IL"},{name:"Italy",code:"IT"},{name:"Jamaica",code:"JM"},{name:"Japan",code:"JP"},{name:"Jersey",code:"JE"},{name:"Jordan",code:"JO"},{name:"Kazakhstan",code:"KZ"},{name:"Kenya",code:"KE"},{name:"Kiribati",code:"KI"},{name:"Korea, Democratic People's Republic of",code:"KP"},{name:"Korea, Republic of",code:"KR"},{name:"Kuwait",code:"KW"},{name:"Kyrgyzstan",code:"KG"},{name:"Lao People's Democratic Republic",code:"LA"},{name:"Latvia",code:"LV"},{name:"Lebanon",code:"LB"},{name:"Lesotho",code:"LS"},{name:"Liberia",code:"LR"},{name:"Libyan Arab Jamahiriya",code:"LY"},{name:"Liechtenstein",code:"LI"},{name:"Lithuania",code:"LT"},{name:"Luxembourg",code:"LU"},{name:"Macao",code:"MO"},{name:"Macedonia, The Former Yugoslav Republic of",code:"MK"},{name:"Madagascar",code:"MG"},{name:"Malawi",code:"MW"},{name:"Malaysia",code:"MY"},{name:"Maldives",code:"MV"},{name:"Mali",code:"ML"},{name:"Malta",code:"MT"},{name:"Marshall Islands",code:"MH"},{name:"Martinique",code:"MQ"},{name:"Mauritania",code:"MR"},{name:"Mauritius",code:"MU"},{name:"Mayotte",code:"YT"},{name:"Mexico",code:"MX"},{name:"Micronesia, Federated States of",code:"FM"},{name:"Moldova, Republic of",code:"MD"},{name:"Monaco",code:"MC"},{name:"Mongolia",code:"MN"},{name:"Montserrat",code:"MS"},{name:"Morocco",code:"MA"},{name:"Mozambique",code:"MZ"},{name:"Myanmar",code:"MM"},{name:"Namibia",code:"NA"},{name:"Nauru",code:"NR"},{name:"Nepal",code:"NP"},{name:"Netherlands",code:"NL"},{name:"Netherlands Antilles",code:"AN"},{name:"New Caledonia",code:"NC"},{name:"New Zealand",code:"NZ"},{name:"Nicaragua",code:"NI"},{name:"Niger",code:"NE"},{name:"Nigeria",code:"NG"},{name:"Niue",code:"NU"},{name:"Norfolk Island",code:"NF"},{name:"Northern Mariana Islands",code:"MP"},{name:"Norway",code:"NO"},{name:"Oman",code:"OM"},{name:"Pakistan",code:"PK"},{name:"Palau",code:"PW"},{name:"Palestinian Territory, Occupied",code:"PS"},{name:"Panama",code:"PA"},{name:"Papua New Guinea",code:"PG"},{name:"Paraguay",code:"PY"},{name:"Peru",code:"PE"},{name:"Philippines",code:"PH"},{name:"Pitcairn",code:"PN"},{name:"Poland",code:"PL"},{name:"Portugal",code:"PT"},{name:"Puerto Rico",code:"PR"},{name:"Qatar",code:"QA"},{name:"Reunion",code:"RE"},{name:"Romania",code:"RO"},{name:"Russian Federation",code:"RU"},{name:"Rwanda",code:"RW"},{name:"Saint Helena",code:"SH"},{name:"Saint Kitts and Nevis",code:"KN"},{name:"Saint Lucia",code:"LC"},{name:"Saint Pierre and Miquelon",code:"PM"},{name:"Saint Vincent and the Grenadines",code:"VC"},{name:"Samoa",code:"WS"},{name:"San Marino",code:"SM"},{name:"Sao Tome and Principe",code:"ST"},{name:"Saudi Arabia",code:"SA"},{name:"Senegal",code:"SN"},{name:"Serbia and Montenegro",code:"CS"},{name:"Seychelles",code:"SC"},{name:"Sierra Leone",code:"SL"},{name:"Singapore",code:"SG"},{name:"Slovakia",code:"SK"},{name:"Slovenia",code:"SI"},{name:"Solomon Islands",code:"SB"},{name:"Somalia",code:"SO"},{name:"South Africa",code:"ZA"},{name:"South Georgia and the South Sandwich Islands",code:"GS"},{name:"Spain",code:"ES"},{name:"Sri Lanka",code:"LK"},{name:"Sudan",code:"SD"},{name:"Suriname",code:"SR"},{name:"Svalbard and Jan Mayen",code:"SJ"},{name:"Swaziland",code:"SZ"},{name:"Sweden",code:"SE"},{name:"Switzerland",code:"CH"},{name:"Syrian Arab Republic",code:"SY"},{name:"Taiwan, Province of China",code:"TW"},{name:"Tajikistan",code:"TJ"},{name:"Tanzania, United Republic of",code:"TZ"},{name:"Thailand",code:"TH"},{name:"Timor-Leste",code:"TL"},{name:"Togo",code:"TG"},{name:"Tokelau",code:"TK"},{name:"Tonga",code:"TO"},{name:"Trinidad and Tobago",code:"TT"},{name:"Tunisia",code:"TN"},{name:"Turkey",code:"TR"},{name:"Turkmenistan",code:"TM"},{name:"Turks and Caicos Islands",code:"TC"},{name:"Tuvalu",code:"TV"},{name:"Uganda",code:"UG"},{name:"Ukraine",code:"UA"},{name:"United Arab Emirates",code:"AE"},{name:"United Kingdom",code:"GB"},{name:"United States",code:"US"},{name:"United States Minor Outlying Islands",code:"UM"},{name:"Uruguay",code:"UY"},{name:"Uzbekistan",code:"UZ"},{name:"Vanuatu",code:"VU"},{name:"Venezuela",code:"VE"},{name:"Vietnam",code:"VN"},{name:"Virgin Islands, British",code:"VG"},{name:"Virgin Islands, U.S.",code:"VI"},{name:"Wallis and Futuna",code:"WF"},{name:"Western Sahara",code:"EH"},{name:"Yemen",code:"YE"},{name:"Zambia",code:"ZM"},{name:"Zimbabwe",code:"ZW"}]};UISelectController.$inject=["$scope","$timeout"];UpdateFekController=function(n,t,i,r,u,f,e,o){var s=t.getFek();n.feks={};n.feks={};o.getByParams({fek:s},"/api/ApplicationTypeFek/getFekListByFekIdDto").then(function(t){n.feks=t},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)});n.deleteSpecFromFek=function(t){r.deleteSpecFromFek(t.Id).then(function(){n.feks.splice(n.feks.indexOf(t),1)},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.openDeleteModal=function(t){n.delSpec=t};n.openModal=function(i){t.setFek(i.ApplicationTypeFekDescription);t.setFekId(i.Id);t.setCode(i.Code);t.setFekValidFrom(i.ValidFrom);t.setFekValidTo(i.ValidTo);t.setApplicationId(i.ApplicationTypeDescription);var r=f.open({templateUrl:"ModalContent.html",controller:UpdFekController});r.result.then(function(t){t?(i.ValidFrom=t.ValidFrom,i.ValidTo=t.ValidTo,n.updateSpecFek(i)):u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα")},function(){e.info("Modal dismissed at: "+new Date)})};n.updateSpecFek=function(n){$("#fekEdit").valid()&&r.updateSpecFek(n).then(function(){},function(n){u.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})}};UpdateFekController.$inject=["$scope","PassParameters","$state","ApplicationTypeFekFactory","toaster","$uibModal","$log","GeneralFactory"];UpdateRegionsController=function(n,t,i,r,u,f,e,o,s,h,c,l){var v,a,y,w,p;n.person={};n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[];n.SelectedRegionsListItems=[];n.AvailableRegionsListItems=[];n.SelectedSpecListItems=[];n.myvalues=[];n.pageRules={};n.hasKeddy=!1;n.hasSdey=!1;n.showForm=0;n.hasboth=!1;v="";a="";n.applicationTypeId=0;n.applicationType="";y=0;w=0;n.ArtisticList=[158];n.ChurchList=[71,72,73,74,75,76,77,78,79,80,2,364,358,356,4,82,355];n.ArtisticList=[384];n.Pe73List=[336];n.Pe70List=[293,330,6,218,2,80,164];n.showAlertRegion=!1;n.sub={};n.subSmea={};n.subMusic={};n.SpecialSupport=!1;n.noAccess=0;n.regionsFor={IsChurch:!1,IsArtistic:!1,IsPe73:!1};n.hasEEEK=!1;n.IsDisabledForNo={AcceptAllSubstitudeToSpecialEducation:!1,AcceptAllSubstitudeToPrimarySpecialEducation:!1,HasRefRegions:!1,AcceptFullSubstitudeSMEAToEEEEK:!1};n.authentication.isAuth?(v=u.getPersonId(),a=u.getApplicationId(),n.applicationTypeId=u.getApplicationTypeId(),n.applicationType=l.findApplicationName(n.applicationTypeId),y=u.getTrackId(),p="sub,subMusic,subSmea,hourly,hourlyMusic,hourlySmea,subEEPEBP",o.getByParams({role:n.authentication.role,codes:p},"/api/Subsystem/NewCheckPermission").then(function(t){var i=p.split(","),r,u;for(r in i)n.pageRules[i[r]]=s("filter")(t,{Code:i[r]},!0)[0].Rules;(o.isEmptyValue(n.pageRules.sub)||n.pageRules.sub.UpdateTransfer!=!1||n.applicationTypeId!=1)&&(o.isEmptyValue(n.pageRules.subSmea)||n.pageRules.subSmea.UpdateTransfer!=!1||n.applicationTypeId!=3)&&(o.isEmptyValue(n.pageRules.subMusic)||n.pageRules.subMusic.UpdateTransfer!=!1||n.applicationTypeId!=5)&&(o.isEmptyValue(n.pageRules.hourly)||n.pageRules.hourly.UpdateTransfer!=!1||n.applicationTypeId!=2)&&(o.isEmptyValue(n.pageRules.hourlyMusic)||n.pageRules.hourlyMusic.UpdateTransfer!=!1||n.applicationTypeId!=6)&&(o.isEmptyValue(n.pageRules.hourlySmea)||n.pageRules.hourlySmea.UpdateTransfer!=!1||n.applicationTypeId!=4)&&(o.isEmptyValue(n.pageRules.subEEPEBP)||n.pageRules.subEEPEBP.UpdateTransfer!=!1||n.applicationTypeId!=23)?(o.isEmptyValue(n.pageRules.sub)||n.pageRules.sub.UpdateTransfer!=!0||n.applicationTypeId!=1)&&(o.isEmptyValue(n.pageRules.subSmea)||n.pageRules.subSmea.UpdateTransfer!=!0||n.applicationTypeId!=3)&&(o.isEmptyValue(n.pageRules.subMusic)||n.pageRules.subMusic.UpdateTransfer!=!0||n.applicationTypeId!=5)&&(o.isEmptyValue(n.pageRules.hourly)||n.pageRules.hourly.UpdateTransfer!=!0||n.applicationTypeId!=2)&&(o.isEmptyValue(n.pageRules.hourlyMusic)||n.pageRules.hourlyMusic.UpdateTransfer!=!0||n.applicationTypeId!=6)&&(o.isEmptyValue(n.pageRules.hourlySmea)||n.pageRules.hourlySmea.UpdateTransfer!=!0||n.applicationTypeId!=4)&&(o.isEmptyValue(n.pageRules.subEEPEBP)||n.pageRules.subEEPEBP.UpdateTransfer!=!0||n.applicationTypeId!=23)&&!o.isValueInArray(o.getRoleCode(n.authentication.role),"a")||(n.showForm=1,u=h.all([o.getByAll("/api/ApplSubstitute/findActivePhase")]),u.then(function(t){n.noAccess=t[0];n.getApplication();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")},function(){e.pop("warning"," Παρουσιάστηκε σφάλμα","αρουσιάστηκε σφάλμα κατά την φόρτωση των προσωπικών στοιχείων.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})):n.showForm=2},function(){e.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά τον έλεγχο δικαιωματων",3e3,"trustedHtml");unblockUI("#divBlockUI")})):f.go("/");n.checkForEEEK=function(){n.hasEEEK=!1;for(var t=0;t<n.SelectedSpecListItems.length;t+=1)if((n.SelectedSpecListItems[t].Code=="ΠΕ71"||n.SelectedSpecListItems[t].Code=="ΠΕ70.ΕΑΕ")&&s("filter")(n.SelectedRegionsListItems,function(n){return n.IsKeddy==!1}).length>0){n.hasEEEK=!0;break}n.hasEEEK||(n.subSmea.AcceptFullSubstitudeSMEAToEEEEK=!1)};n.checkForRegions=function(){var t;for(n.regionsFor.IsChurch=!1,n.regionsFor.IsArtistic=!1,n.regionsFor.IsPe73=!1,n.regionsForPe70=!1,t=0;t<n.SelectedSpecListItems.length;t+=1)if(n.ChurchList.indexOf(n.SelectedSpecListItems[t].Id)!=-1||n.SelectedSpecListItems[t].HasMusicVizantini==!0){n.regionsFor.IsChurch=!0;break}else n.regionsFor.IsChurch=!1;for(t=0;t<n.SelectedSpecListItems.length;t+=1)if(n.ArtisticList.indexOf(n.SelectedSpecListItems[t].Id)!=-1){n.regionsFor.IsArtistic=!0;break}else n.regionsFor.IsArtistic=!1;for(t=0;t<n.SelectedSpecListItems.length;t+=1)if(n.Pe73List.indexOf(n.SelectedSpecListItems[t].Id)!=-1){n.regionsFor.IsPe73=!0;break}else n.regionsFor.IsPe73=!1;for(t=0;t<n.SelectedSpecListItems.length;t+=1)if(n.Pe70List.indexOf(n.SelectedSpecListItems[t].Id)!=-1){n.regionsForPe70=!0;break}else n.regionsForPe70=!1};n.checkForSpecialNeeds=function(){var i,t;for(n.SpecialSupport=!1,i=["ΠΕ60","ΠΕ70","ΠΕ02","ΠΕ03","ΠΕ04.01","ΠΕ04.02","ΠΕ04.04","ΠΕ04.05"],t=0;t<n.SelectedSpecListItems.length;t+=1)if(i.indexOf(n.SelectedSpecListItems[t].Code)!=-1)if(n.sub.LevelId==1){n.SelectedRegionsListItems.length>0&&(n.SpecialSupport=!0);break}else if(n.sub.LevelId==2){s("filter")(n.SelectedRegionsListItems,function(n){return n.IsFull==!1}).length>0&&(n.SpecialSupport=!0);break}else{n.SpecialSupport=!0;break}else n.SpecialSupport=!1};n.checkForBoth=function(){for(var t=0;t<n.SelectedSpecListItems.length;t+=1)if(n.SelectedSpecListItems[t].IsBoth==!0){n.hasboth=!0;break}else n.hasboth=!1};n.checkForKeddy=function(){var i,r,t;if(n.hasKeddy=!1,i=["ΠΕ60.ΕΑΕ","ΠΕ70.ΕΑΕ","ΠΕ61","ΠΕ71","ΠΕ02.ΕΑΕ","ΠΕ03.ΕΑΕ","ΠΕ04.01.ΕΑΕ","ΠΕ04.02.ΕΑΕ","ΠΕ04.04.ΕΑΕ","ΠΕ04.05.ΕΑΕ"],r=["ΠΕ23","ΠΕ30"],n.person.ParaplegicQuadriplegic==!1&&n.person.Deaf==!1&&n.person.Blind==!1)for(t=0;t<n.SelectedSpecListItems.length;t+=1)if(i.indexOf(n.SelectedSpecListItems[t].Code)!=-1){n.hasKeddy=!0;break}else n.hasKeddy=!1;else n.hasKeddy=!1};n.checkForKeddyEEPEBP=function(){n.hasKeddy=!1;n.hasSdey=!1;for(var t=0;t<n.SelectedAvailRegionsItems.length;t+=1)n.SelectedAvailRegionsItems[t].IsKeddy&&(n.hasKeddy=!0),n.SelectedAvailRegionsItems[t].IsSdey&&(n.hasSdey=!0)};n.removeDuplicatesRegionsForDualList=function(){angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.hasboth||n.hasKeddy||n.applicationTypeId==23||(n.SelectedRegionsListItems=s("filter")(n.SelectedRegionsListItems,{Level:y},!0));n.regionsFor.IsChurch||(n.SelectedRegionsListItems=s("filter")(n.SelectedRegionsListItems,{IsChurch:!1},!0));n.regionsFor.IsArtistic||(n.SelectedRegionsListItems=s("filter")(n.SelectedRegionsListItems,{IsArtistic:!1},!0),n.SelectedRegionsListItems=n.regionsFor.IsPe73&&n.SelectedSpecListItems.length==1?s("filter")(n.SelectedRegionsListItems,{OnlyPE73:!0},!0):n.regionsForPe70&&!n.regionsFor.IsPe73?s("filter")(n.SelectedRegionsListItems,{OnlyPE73:!1},!0):n.regionsFor.IsPe73&&n.SelectedSpecListItems.length>1?s("filter")(n.SelectedRegionsListItems,{OnlyPE70:!1},!0):s("filter")(n.SelectedRegionsListItems,{OnlyPE70:!1,OnlyPE73:!1},!0));n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.btnRegionsLeft=function(){n.showAlertRegion=!1;n.showAlertRegion||(angular.forEach(n.SelectedSelectedRegionsListItems,function(n){this.push(n)},n.AvailableRegionsListItems),angular.forEach(n.SelectedSelectedRegionsListItems,function(t){for(var i=n.SelectedRegionsListItems.length-1;i>=0;i--)n.SelectedRegionsListItems[i].Id==t.Id&&n.SelectedRegionsListItems.splice(i,1)}),n.SelectedSelectedRegionsListItems=[],n.SelectedAvailRegionsItems=[],n.applicationTypeId==1&&(n.checkForSpecialNeeds(),n.SpecialSupport==!1&&(n.sub.AcceptFullSubstitudeForSpecialSupport=!1)),n.applicationTypeId==3&&n.checkForEEEK())};n.btnRegionsRight=function(){angular.forEach(n.SelectedAvailRegionsItems,function(n){this.push(n)},n.SelectedRegionsListItems);n.SelectedRegionsListItems=s("orderBy")(n.SelectedRegionsListItems,"PreferedOrder");angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[];n.applicationTypeId==1&&(n.checkForSpecialNeeds(),n.SpecialSupport==!1&&(n.sub.AcceptFullSubstitudeForSpecialSupport=!1))};n.getApplication=function(){switch(n.applicationTypeId){case 1:o.getByParams({id:a},"/api/ApplSubstitute/GetApplSpecDetailsByApplId").then(function(t){n.SelectedSpecListItems=t;n.checkForBoth();var i=h.all([o.getByParams({id:a},"/api/ApplSubstitute/GetApplRegionsByApplId"),o.getByParams({id:a},"/api/ApplSubstitute/GetApplRegionsByApplIdForRevertRegions"),o.getByParams({id:a},"/api/ApplSubstitute/GetApplSubstituteById"),o.getByParams({id:v,specialityId:n.SelectedSpecListItems[0].Id},"/api/Person/GetPersonDtoSmea"),]);i.then(function(t){n.SelectedRegionsListItems=t[0];n.SelectedAvailRegionsItems=t[0];angular.copy(t[1],n.AvailableRegionsListItems);n.sub=t[2];n.person=t[3];n.checkForSpecialNeeds();n.checkForRegions();n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.sub.AcceptAllSubstitudeToSpecialEducation||(n.IsDisabledForNo.AcceptAllSubstitudeToSpecialEducation=!0);n.sub.AcceptAllSubstitudeToPrimarySpecialEducation||(n.IsDisabledForNo.AcceptAllSubstitudeToPrimarySpecialEducation=!0);n.sub.HasRefRegions||(n.IsDisabledForNo.HasRefRegions=!0);n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")},function(){e.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των περιοχών της αίτησης.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})},function(){e.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά την φόρτωση των κλάδων",3e3,"trustedHtml");unblockUI("#divBlockUI")});break;case 3:o.getByParams({id:a},"/api/ApplSubstituteSmea/GetApplSpecDetailsByApplId").then(function(t){n.SelectedSpecListItems=t;n.checkForBoth();var i=h.all([o.getByParams({id:a},"/api/ApplSubstituteSmea/GetApplRegionsByApplId"),o.getByParams({id:a},"/api/ApplSubstituteSmea/GetApplRegionsByApplIdForRevertRegions"),o.getByParams({id:a},"/api/ApplSubstituteSmea/GetApplSubstituteSmeaById"),o.getByParams({id:v,specialityId:n.SelectedSpecListItems[0].Id},"/api/Person/GetPersonDtoSmea")]);i.then(function(t){n.SelectedRegionsListItems=t[0];n.SelectedAvailRegionsItems=t[0];angular.copy(t[1],n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.subSmea=t[2];n.person=t[3];n.checkForKeddy();n.checkForRegions();n.checkForEEEK();n.subSmea.AcceptFullSubstitudeSMEAToEEEEK||(n.IsDisabledForNo.AcceptFullSubstitudeSMEAToEEEEK=!0);n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")},function(){e.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των περιοχών της αίτησης.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})},function(){e.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά την φόρτωση των κλάδων",3e3,"trustedHtml");unblockUI("#divBlockUI")});break;case 5:o.getByParams({id:a},"/api/ApplSubstituteMusic/GetApplSubstituteMusicSpecDetailsById").then(function(t){n.SelectedSpecListItems=t;var i=h.all([o.getByParams({id:a},"/api/ApplSubstituteMusic/GetApplRegionsByApplId"),o.getByParams({id:a},"/api/ApplSubstituteMusic/GetApplRegionsByApplIdForRevertRegions"),o.getByParams({id:a},"/api/ApplSubstituteMusic/GetApplSubstituteMusicById"),o.getByParams({id:v,specialityId:n.SelectedSpecListItems[0].Id},"/api/Person/GetPersonDtoSmea")]);i.then(function(t){n.SelectedRegionsListItems=t[0];n.SelectedAvailRegionsItems=t[0];angular.copy(t[1],n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.subMusic=t[2];n.person=t[3];n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")},function(){e.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των περιοχών της αίτησης.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})},function(){e.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά την φόρτωση των κλάδων",3e3,"trustedHtml");unblockUI("#divBlockUI")});break;case 23:o.getByParams({id:a},"/api/ApplSubstituteEEPEBP/GetApplSubstituteEEPEBPSpecDetailsById").then(function(t){n.SelectedSpecListItems=t;var i=h.all([o.getByParams({id:a},"/api/ApplSubstituteEEPEBP/GetApplRegionsByApplId"),o.getByParams({id:a},"/api/ApplSubstituteEEPEBP/GetApplRegionsByApplIdForRevertRegions"),o.getByParams({id:a},"/api/ApplSubstituteEEPEBP/GetApplSubstituteEEPEBPById"),o.getByParams({id:v,specialityId:n.SelectedSpecListItems[0].Id},"/api/Person/GetPersonDtoSmea")]);i.then(function(t){n.SelectedRegionsListItems=t[0];n.SelectedAvailRegionsItems=t[0];angular.copy(t[1],n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.subEEPEBP=t[2];n.person=t[3];n.checkForKeddyEEPEBP();n.removeDuplicatesRegionsForDualList();unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")},function(){e.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των περιοχών της αίτησης.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})},function(){e.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά την φόρτωση των κλάδων",3e3,"trustedHtml");unblockUI("#divBlockUI")})}};n.cancel=function(){u.setPersonId(v);f.go("history")};n.UpdateRegions=function(){var s,r,h;n.showAlertRegion=o.isEmpty(n.SelectedRegionsListItems)?!0:!1;s={SubstituteEEPEBP:n.subEEPEBP,SubstituteMusic:n.subMusic,SubstituteSMEA:n.subSmea,Substitute:n.sub,ApplicationId:a,RegionAndUnit:n.SelectedRegionsListItems,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName};r=s;n.showAlertRegion||(u.setPersonId(v),h=t.open({templateUrl:"ModalContentUpdateRegions.html",controller:OpenModalContentUpdateRegions,backdrop:"static"}),h.result.then(function(t){if(t)switch(n.applicationTypeId){case 1:o.postByParams(r,"/api/ApplSubstitute/UpdateRegions").then(function(){u.setPersonId(v);f.go("history")},function(){e.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την ενημέρωση των περιοχών.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")});break;case 3:o.postByParams(r,"/api/ApplSubstituteSmea/UpdateRegions").then(function(){u.setPersonId(v);f.go("history")},function(){e.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την ενημέρωση των περιοχών.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")});break;case 5:o.postByParams(r,"/api/ApplSubstituteMusic/UpdateRegions").then(function(){u.setPersonId(v);f.go("history")},function(){n.temp=1;e.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την ενημέρωση των περιοχών.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")});break;case 23:o.postByParams(r,"/api/ApplSubstituteEEPEBP/UpdateRegions").then(function(){u.setPersonId(v);f.go("history")},function(){e.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την ενημέρωση των περιοχών.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})}},function(){i.info("Modal dismissed at: "+new Date)}))};n.ResetRegions=function(){var h={ApplicationId:a,RegionAndUnit:n.SelectedRegionsListItems,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName},r=h,s;u.setPersonId(v);s=t.open({templateUrl:"ModalContentResetRegions.html",controller:OpenModalContentUpdateRegions,backdrop:"static"});s.result.then(function(t){if(t)switch(n.applicationTypeId){case 1:o.postByParams(r,"/api/ApplSubstitute/ResetRegions").then(function(){u.setPersonId(v);f.go("history")},function(){e.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την ενημέρωση των περιοχών.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")});break;case 3:o.postByParams(r,"/api/ApplSubstituteSmea/ResetRegions").then(function(){u.setPersonId(v);f.go("history")},function(){e.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την ενημέρωση των περιοχών.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")});break;case 5:o.postByParams(r,"/api/ApplSubstituteMusic/ResetRegions").then(function(){u.setPersonId(v);f.go("history")},function(){e.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την ενημέρωση των περιοχών.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")});break;case 23:o.postByParams(r,"/api/ApplSubstituteEEPEBP/ResetRegions").then(function(){u.setPersonId(v);f.go("history")},function(){e.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την ενημέρωση των περιοχών.");unblockUI("#divBlockUI");unblockUI("#divBlockUIForm")})}},function(){i.info("Modal dismissed at: "+new Date)})}};UpdateRegionsController.$inject=["$scope","$uibModal","$log","$window","PassParameters","$state","toaster","GeneralFactory","$filter","$q","PersonFactory","RouteFactory"];UpdateSubstituteRefRegionsController=function(n,t,i,r,u,f,e,o){var h,s,c,l;n.person={};n.applicationType=1;n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[];n.SelectedRegionsListItems=[];n.AvailableRegionsListItems=[];n.myvalues=[];n.showAlertRefRegions=!1;n.alertRefRegions=[{type:"danger",msg:"Πρέπει να δηλώσετε τουλάχιστον μία Περιοχή προτίμησης."}];n.authentication.isAuth?(h=t.getPersonId(),s=t.getApplicationId(),o.getPersonForApplication(h).then(function(t){n.person=t},function(n){r.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)}),c=e.all([u.getByParams({applicationTypeId:n.applicationType},"/api/ApplicationTypeRegionAndUnit/getRefRegions")]),c.then(function(t){angular.copy(t[0],n.myvalues);angular.copy(n.myvalues,n.AvailableRegionsListItems);n.SelectedAvailRegionsItems=n.SelectedRegionsListItems}),l=e.all([u.getByParams({Id:s},"api/ApplSubstitute/getApplSubstituteHasRef"),u.getByParams({Id:s},"api/ApplSubstitute/GetApplRegionsRefByApplId")]),l.then(function(t){n.HasRefRegions=t[0];n.SelectedRegionsListItems=t[1];n.SelectedAvailRegionsItems=n.SelectedRegionsListItems;n.removeDuplicatesRegionsForDualList()})):i.go("/");n.resetRegions=function(){(n.HasRefRegions==null||n.HasRefRegions==!1)&&(n.SelectedRegionsListItems=[])};n.saveAction=function(){n.HasRefRegions==null&&(n.HasRefRegions=!1);n.showAlertRefRegions=n.HasRefRegions&&u.isEmpty(n.SelectedRegionsListItems)?!0:!1;var f={Id:s,RegionAndUnit:n.SelectedRegionsListItems,HasRefRegions:n.HasRefRegions,UserRole:n.authentication.role,RegionAndUnitDescription:n.authentication.unitName},e=f;n.showAlertRefRegions||u.postByParams(e,"/api/ApplSubstitute/updateApplSubstituteRef").then(function(){t.setPersonId(h);i.go("history")}).catch(function(n){r.pop("error","Παρουσιάστηκε σφάλμα",n.data)})};n.removeDuplicatesRegionsForDualList=function(){angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[];n.SelectedRegionsListItems=[];n.btnRegionsUp=function(){for(var t,r,u,f=n.SelectedSelectedRegionsListItems,i=0;i<n.SelectedSelectedRegionsListItems.length;i++){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<=0||t>=n.SelectedRegionsListItems.length)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t-1];n.SelectedRegionsListItems[t-1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsDown=function(){for(var t,r,u,i=n.SelectedSelectedRegionsListItems.length-1;i>=0;i--){if(t=n.SelectedRegionsListItems.map(function(n){return n.Id}).indexOf(n.SelectedSelectedRegionsListItems[i].Id),t<0||t>=n.SelectedRegionsListItems.length-1)return;r=n.SelectedRegionsListItems[t];u=n.SelectedRegionsListItems[t+1];n.SelectedRegionsListItems[t+1]=r;n.SelectedRegionsListItems[t]=u}};n.btnRegionsRight=function(){angular.forEach(n.SelectedAvailRegionsItems,function(n){this.push(n)},n.SelectedRegionsListItems);angular.forEach(n.SelectedAvailRegionsItems,function(t){for(var i=n.AvailableRegionsListItems.length-1;i>=0;i--)n.AvailableRegionsListItems[i].Id==t.Id&&n.AvailableRegionsListItems.splice(i,1)});n.SelectedAvailRegionsItems=[];n.SelectedSelectedRegionsListItems=[]};n.btnRegionsLeft=function(){angular.forEach(n.SelectedSelectedRegionsListItems,function(n){this.push(n)},n.AvailableRegionsListItems);angular.forEach(n.SelectedSelectedRegionsListItems,function(t){for(var i=n.SelectedRegionsListItems.length-1;i>=0;i--)n.SelectedRegionsListItems[i].Id==t.Id&&n.SelectedRegionsListItems.splice(i,1)});n.SelectedSelectedRegionsListItems=[];n.SelectedAvailRegionsItems=[]}};UpdateSubstituteRefRegionsController.$inject=["$scope","PassParameters","$state","toaster","GeneralFactory","$filter","$q","PersonFactory"];UploadController=function(n,t,i,r){n.authentication.isAuth||r.go("/");n.upload=[];n.messages={completed:"",percentage:"0",error:""};n.uploadedFileDetails="";n.SendDataForCVDto={Id:"",SecondmentBodyId:"",PersonId:n.authentication.personId};n.onFileSelect=function(t){var u,r;for(n.messages={completed:"",percentage:"0",error:""},u=0;u<t.length;u++){if(r=t[u],r.type!="application/pdf"){n.messages.error='Μη έγκυρη επέκταση αρχείου "'+r.name+'". Οι επεκτάσεις που υποστηρίζονται είναι: "<b>pdf<\/b>" .';return}if(r.size>=2097152){n.messages.error='Το αρχείο "'+r.name+'" (<b>'+Math.round(r.size/1024)+" KB<\/b>) υπερβαίνει το μέγιστο επιτρεπόμενο μέγεθος μεταφόρτωσης <b>2000 KB<\/b>.";return}(function(t){n.upload[t]=i.upload({url:"/api/files/upload",method:"POST",data:{SendDataForCVDto:n.SendDataForCVDto},file:r}).progress(function(t){n.messages.percentage=parseInt(100*t.loaded/t.total)}).then(function(t){n.messages.completed="Το αρχείο <b>"+r.name+"<\/b> μεταφορτώθηκε με επιτυχία.";n.SendDataForCVDto.Id=t.data.Id;n.uploadedFileDetails=t.data.Message}).catch(function(t){n.messages.error=t.data.Message})})(u)}};n.abortUpload=function(t){n.upload[t].abort()}};UploadController.$inject=["$scope","$timeout","$upload","$state"];UserRoleController=function(n,t,i,r,u,f,e){n.authentication.isAuth?n.authentication.isAuth&&!r.isValueInArray(r.getRoleCode(n.authentication.role),"a")&&t.go("forbidden"):t.go("/");n.searchuser={TaxNumber:"",Email:"",RegistryNo:"",UserName:""};n.results=[];n.resultsEmail=[];n.rolesForEmail=[];n.roleEmail={};n.applicationTypeList=[];n.showMessage=0;n.showFields=0;n.user="";n.rolesAll=[];n.rolesFilter=[];n.role={roleId:"",regionAndUnitId:""};n.regions=[];n.regionsFilter=[];n.disableField="";n.person={};n.checkDisableField=function(){var t=u("filter")(n.rolesAll,function(t){return t.Id==n.role.roleId})[0].Name;n.disableField=!1;(r.isEmptyValue(n.role.roleId)||t!="Χρήστης"&&r.isEmptyValue(n.role.regionAndUnitId))&&(n.disableField=!0)};n.searchAction=function(){n.results=[];n.person={};n.showMessage=0;r.postByParams(n.searchuser,"api/Management/getUserRoles").then(function(t){r.isEmptyValue(t)?n.showMessage=2:(n.results=t.AspNetRoles,n.user=t.UserId,n.person=t,n.showMessage=1)},function(n){i.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε το εξής πρόβλημα"+n.error_description)})};n.role;n.openModal=function(t){n.role=t};n.openAddRoleModal=function(){n.role={};n.disableField=!0;n.showFields=0;var t=f.all([r.getByAll("/api/Management/getSystemRolesEcxeptUsers"),r.getByAll("/api/RegionAndUnit/getRegionsForRoles")]);t.then(function(t){var e,f,i;for(n.rolesAll=t[0],n.regions=t[1],n.rolesFilter=[],angular.copy(n.rolesAll,n.rolesFilter),n.ExistingRoles=[],e=!1,i=n.rolesFilter.length-1;i>=0;i--)for(f=0;f<n.results.length;f++)n.rolesFilter[i].Name===n.results[f].RoleName&&n.ExistingRoles.push(i),n.results[f].RoleName=="Εκπαιδευτικός"&&(e=!0);if(n.ExistingRoles=u("orderBy")(n.ExistingRoles),!r.isEmpty(n.ExistingRoles))for(i=n.ExistingRoles.length-1;i>=0;i--)n.rolesFilter.splice(n.ExistingRoles[i],1);e&&(n.rolesFilter=u("filter")(n.rolesFilter,function(n){return n.Name!="Χρήστης"}));r.isEmpty(n.rolesFilter)&&(n.showFields=1)})};n.getRegion=function(){n.checkDisableField();var t=u("filter")(n.rolesAll,function(t){return t.Id==n.role.roleId})[0].Name;r.isEmpty(n.rolesFilter)?n.showFields=1:t!="Χρήστης"&&(n.showFields=2);n.disableField=!1;(r.isEmptyValue(n.role.roleId)||t!="Χρήστης"&&r.isEmptyValue(n.role.regionAndUnitId))&&(n.disableField=!0);n.regionsFilter=t=="Διαχειριστής"?u("filter")(n.regions,function(n){return n.RegionAndUnitTypeId==19&&(n.Id==1677||n.Id==3324)}):t=="Χρήστης ΑΣΕΠ"?u("filter")(n.regions,function(n){return n.RegionAndUnitTypeId==19&&n.Id==1877}):t=="Χρήστης Διεύθυνσης Α/θμιας"?u("filter")(n.regions,function(n){return n.RegionAndUnitTypeId==8&&n.LevelId==1}):t=="Χρήστης Διεύθυνσης Β/θμιας"?u("filter")(n.regions,function(n){return n.RegionAndUnitTypeId==8&&n.LevelId==2}):t=="Χρήστης Περιφέρειας"?u("filter")(n.regions,function(n){return n.RegionAndUnitTypeId==7}):t=="Χρήστης Υπουργείου Α/θμιας"?u("filter")(n.regions,function(n){return n.RegionAndUnitTypeId==19&&n.LevelId==1&&n.Id!=1677&&n.Id!=1877}):t=="Χρήστης Υπουργείου Β/θμιας"?u("filter")(n.regions,function(n){return n.RegionAndUnitTypeId==19&&n.LevelId==2&&n.Id!=1677&&n.Id!=1877}):t=="Χρήστης Συμβουλίου"?u("filter")(n.regions,function(n){return n.RegionAndUnitTypeId==19&&n.Id!=1677&&n.Id!=1877}):t=="Χρήστης Συμβουλίου Α/θμιας"?u("filter")(n.regions,function(n){return n.RegionAndUnitTypeId==19&&n.Id!=1677&&n.Id!=1877&&n.LevelId==1}):t=="Χρήστης Συμβουλίου Β/θμιας"?u("filter")(n.regions,function(n){return n.RegionAndUnitTypeId==19&&n.Id!=1677&&n.Id!=1877&&n.LevelId==2}):t=="Χρήστης Κεντρικής Υπηρεσίας Υπουργείου"?u("filter")(n.regions,function(n){return n.RegionAndUnitTypeId==19&&(n.LevelId==1||n.LevelId==2)&&n.Id!=1677&&n.Id!=1877}):{}};n.deleteRole=function(t){r.getByParams({roleId:t.RoleId,userId:n.user,roleName:t.RoleName},"/api/Management/deleteRoleByUser").then(function(){n.searchAction(n.searchuser)},function(){unblockUI("#divBlockUIRegion");i.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε πρόβλημα κατά την διαγραφή του ρόλου")})};n.saveRole=function(){r.getByParams({roleId:n.role.roleId,userId:n.user,regionAndUnitId:n.role.regionAndUnitId},"/api/Management/AddRole").then(function(){n.searchAction();$("#AddRoleModal").modal("hide")},function(){i.pop("warning"," Παρουσιάστηκε σφάλμα","Πρόβλημα κατά την εισαγωγή νέου ρόλου",3e3,"trustedHtml")})};n.clickTabUserRole=function(){};n.clickTabRoleEmail=function(){r.getByAll("/api/Dbo/getApplicationRoleEmails").then(function(t){n.resultsEmail=t},function(){i.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά τη φόρτωση των στοιχείων Email")})};n.openModalDelete=function(t){n.delApplRoleEmail=t};n.DeleteApplicationRoleEmail=function(t){r.postByParams(t,"api/Dbo/deleteApplicationRoleEmail").then(function(){r.getByAll("/api/Dbo/getApplicationRoleEmails").then(function(t){n.resultsEmail=t},function(){i.pop("warning"," Παρουσιάστηκε σφάλμα","Παρουσιάστηκε σφάλμα κατά την φόρτωση των στοιχείων για τα Email των ρόλων.")});i.pop("success","Η αλλαγή τροποποιήθηκε με επιτυχία","Τα στοιχεία που ζητήσατε διαγράφηκαν")},function(){i.pop("error","Παρουσιάστηκε σφάλμα",response)})};n.openModalFek=function(t){n.delPerFek=t};n.fillFormControls=function(t){if(n.ModalTitle=t,n.roleEmail={},r.isEmpty(n.applicationTypeList)){var i=f.all([r.getByAll("/api/ApplicationType/getApplicationType"),r.getByAll("/api/Management/getSystemRolesForEmail"),]);i.then(function(t){n.applicationTypeList=t[0];n.rolesForEmail=t[1]})}};n.saveApplRoleEmail=function(){$("#AddApplRoleEmailForm").valid()&&(r.isEmptyValue(n.roleEmail.Id)?r.postByParams(n.roleEmail,"/api/Dbo/InsertApplicationRoleEmail").then(function(){r.getByAll("/api/Dbo/getApplicationRoleEmails").then(function(t){n.resultsEmail=t},function(){i.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης στοιχείων",3e3,"trustedHtml")});$("#AddApplRoleEmail").modal("hide")},function(t){n.SaveDisabledChild=!1;i.pop("error","ΠΡΟΣΟΧΗ",t.data)}):r.postByParams(n.roleEmail,"/api/Dbo/UpdateApplicationRoleEmail").then(function(){r.getByAll("/api/Dbo/getApplicationRoleEmails").then(function(t){n.resultsEmail=t},function(){i.pop("warning"," Παρουσιάστηκε σφάλμα","Αδυναμία εύρεσης στοιχείων",3e3,"trustedHtml")});$("#AddApplRoleEmail").modal("hide")},function(n){i.pop("error","ΠΡΟΣΟΧΗ",n.data)}))};n.openEditModalForEmail=function(t){blockUI({target:"#tblEmail",animate:!0});var i=f.all([n.fillFormControls("Επεξεργασία Email"),angular.copy(t,n.roleEmail)]);i.then(function(){e(function(){unblockUI("#tblEmail");$("#AddApplRoleEmail").modal("show")},300)})}};UserRoleController.$inject=["$scope","$state","toaster","GeneralFactory","$filter","$q","$timeout"];ApplicationTypeFactory=function(n,t){var i={},r=function(){var i=t.defer();return n({url:"/api/ApplicationType/getApplicationType",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},u=function(){var i=t.defer();return n({url:"/api/ApplicationType/getApplicationTypeByActiveFek",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise};return i.getApplicationType=r,i.getApplicationTypeByActiveFek=u,i};ApplicationTypeFactory.$inject=["$http","$q"];ApplicationTypeFekFactory=function(n,t){var i={},r=function(i){var r=t.defer();return n({url:"/api/ApplicationTypeFek/getFekByApplicationType",method:"GET",params:{applicationTypeId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},u=function(i){var r=t.defer();return n({url:"/api/ApplicationTypeFek/insertApplTypeFek",method:"POST",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},f=function(i){var r=t.defer();return n({url:"/api/ApplicationTypeFek/getFekById",method:"GET",params:{fek:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},e=function(i){var r=t.defer();return n({url:"/api/ApplicationTypeFek/getFekListById",method:"GET",params:{fek:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},o=function(i){var r=t.defer();return n({url:"/api/ApplicationTypeFek/deleteSpecFromFek",method:"Post",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},s=function(i,r){var u=t.defer();return n({url:"/api/ApplicationTypeFek/deleteFek",method:"Post",params:{id:i,UserRole:r},headers:{"Content-Type":"application/json"}}).then(function(n){u.resolve(n.data)}).catch(function(n){u.reject(n)}),u.promise},h=function(i){var r=t.defer();return n({url:"/api/ApplicationTypeFek/updateSpecFek",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},c=function(i){var r=t.defer();return n({url:"/api/ApplicationTypeFek/updateApplTypeFek",method:"POST",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},l=function(i){var r=t.defer();return n({url:"/api/ApplicationTypeFek/isFekValidForApplicationTypeId",method:"GET",params:{applicationTypeId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise};return i.getFekByApplicationType=r,i.insertApplicationTypeFek=u,i.getFekListById=e,i.getFekById=f,i.deleteSpecFromFek=o,i.deleteFek=s,i.updateSpecFek=h,i.updateApplicationTypeFek=c,i.isFekValidForApplicationTypeId=l,i};ApplicationTypeFekFactory.$inject=["$http","$q"];ApplicationTypeRegionAndUnitFactory=function(n,t){var i={},r=function(i,r,u){var f=t.defer();return n({url:"/api/ApplicationTypeRegionAndUnit/getTypeRegionAndUnitByMunicipality",method:"GET",params:{municipalityId:i,applicationTypeId:r,level:u},headers:{"Content-Type":"application/json"}}).then(function(n){f.resolve(n.data)}).catch(function(){f.reject(response)}),f.promise},u=function(i,r){var u=t.defer();return n({url:"/api/ApplicationTypeRegionAndUnit/getTypeRegionAndUnitByMunicipalityAndBoth",method:"GET",params:{municipalityId:i,applicationTypeId:r},headers:{"Content-Type":"application/json"}}).then(function(n){u.resolve(n.data)}).catch(function(){u.reject(response)}),u.promise},f=function(i,r){var u=t.defer();return n({url:"/api/ApplicationTypeRegionAndUnit/getTypeRegionAndUnitByMunicipalityAndBothAndKesy",method:"GET",params:{municipalityId:i,applicationTypeId:r},headers:{"Content-Type":"application/json"}}).then(function(n){u.resolve(n.data)}).catch(function(){u.reject(response)}),u.promise},e=function(i,r){var u=t.defer();return n({url:"/api/ApplicationTypeRegionAndUnit/getApplicationRegionByAppTypeAndLevel",method:"GET",params:{level:i,applicationTypeId:r},headers:{"Content-Type":"application/json"}}).then(function(n){u.resolve(n.data)}).catch(function(){u.reject(response)}),u.promise},o=function(i,r){var u=t.defer();return n({url:"/api/ApplicationTypeRegionAndUnit/getTypeRegionUnitForGaps",method:"GET",params:{level:i,applicationType:r},headers:{"Content-Type":"application/json"}}).then(function(n){u.resolve(n.data)}).catch(function(){u.reject(response)}),u.promise},s=function(i){var r=t.defer();return n({url:"/api/ApplicationTypeRegionAndUnit/getApplicationRegionByAppTypeAndBoth",method:"GET",params:{applicationTypeId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},h=function(i){var r=t.defer();return n({url:"/api/ApplicationTypeRegionAndUnit/getKeddy",method:"GET",params:{applicationTypeId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},c=function(i,r){var u=t.defer();return n({url:"/api/ApplicationTypeRegionAndUnit/getPyspdeWithoutJointExaminationByLevel",method:"GET",params:{applicationType:i,level:r},headers:{"Content-Type":"application/json"}}).then(function(n){u.resolve(n.data)}).catch(function(){u.reject(response)}),u.promise},l=function(i,r){var u=t.defer();return n({url:"/api/ApplicationTypeRegionAndUnit/getPyspdeJointExaminationByLevel",method:"GET",params:{applicationType:i,level:r},headers:{"Content-Type":"application/json"}}).then(function(n){u.resolve(n.data)}).catch(function(){u.reject(response)}),u.promise},a=function(i,r){var u=t.defer();return n({url:"/api/ApplicationTypeRegionAndUnit/getChurchWithoutJointExaminationBySex",method:"GET",params:{applicationType:i,sex:r},headers:{"Content-Type":"application/json"}}).then(function(n){u.resolve(n.data)}).catch(function(){u.reject(response)}),u.promise},v=function(i,r){var u=t.defer();return n({url:"/api/ApplicationTypeRegionAndUnit/getChurchJointExaminationBySex",method:"GET",params:{applicationType:i,sex:r},headers:{"Content-Type":"application/json"}}).then(function(n){u.resolve(n.data)}).catch(function(){u.reject(response)}),u.promise},y=function(i,r,u){var f=t.defer();return n({url:"/api/ApplicationTypeRegionAndUnit/getFirstLevelBody",method:"GET",params:{applicationType:i,validTo:r,validFrom:u},headers:{"Content-Type":"application/json"}}).then(function(n){f.resolve(n.data)}).catch(function(){f.reject(response)}),f.promise},p=function(i,r){var u=t.defer();return n({url:"/api/ApplicationTypeRegionAndUnit/getSecondLevelBody",method:"GET",params:{regionAndUnitId1:i,applicationType:r},headers:{"Content-Type":"application/json"}}).then(function(n){u.resolve(n.data)}).catch(function(){u.reject(response)}),u.promise},w=function(i,r,u){var f=t.defer();return n({url:"/api/ApplicationTypeRegionAndUnit/getThirdLevelBody",method:"GET",params:{regionAndUnitId1:i,regionAndUnitId2:r,applicationType:u},headers:{"Content-Type":"application/json"}}).then(function(n){f.resolve(n.data)}).catch(function(){f.reject(response)}),f.promise},b=function(){var i=t.defer();return n({url:"/api/ApplicationTypeRegionAndUnit/getRegionLevels",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},k=function(i){var r=t.defer();return n({url:"/api/ApplicationTypeRegionAndUnit/getIEKForPrefecture",method:"GET",params:{PrefectureRegionAndUnitId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},d=function(i){var r=t.defer();return n({url:"/api/ApplicationTypeRegionAndUnit/getPefugeeStructureForPrefecture",method:"GET",params:{PrefectureRegionAndUnitId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},g=function(i,r){var u=t.defer();return n({url:"/api/ApplicationTypeRegionAndUnit/getKesy",method:"GET",params:{municipalityId:i,applicationType:r},headers:{"Content-Type":"application/json"}}).then(function(n){u.resolve(n.data)}).catch(function(){u.reject(response)}),u.promise};return i.getTypeRegionAndUnitByMunicipality=r,i.getApplicationRegionByAppTypeAndLevel=e,i.getApplicationRegionByAppTypeAndBoth=s,i.getKeddy=h,i.getTypeRegionAndUnitByMunicipalityAndBoth=u,i.getTypeRegionAndUnitByMunicipalityAndBothAndKesy=f,i.getTypeRegionUnitForGaps=o,i.getPyspdeWithoutJointExaminationByLevel=c,i.getPyspdeJointExaminationByLevel=l,i.getChurchWithoutJointExaminationBySex=a,i.getChurchJointExaminationBySex=v,i.getRegionLevels=b,i.getIEKForPrefecture=k,i.getPefugeeStructureForPrefecture=d,i.getFirstLevelBody=y,i.getSecondLevelBody=p,i.getThirdLevelBody=w,i.getKesy=g,i};ApplicationTypeRegionAndUnitFactory.$inject=["$http","$q"];AuthInterceptorService=function(n,t,i,r){var u={},f=function(n){var u,e,f;return n.headers=n.headers||{},u=i.get("authorizationData"),u&&(e=moment().isAfter(u.expiration),e?(f=t.get("AuthService"),u.useRefreshTokens?f.refreshToken().then(function(){r.pop("success"," Αυτόματη ανανέωση χρόνου","Η σύνδεσή σας ανανεώθηκε!")},function(){f.logOut()}):f.logOut()):n.headers.Authorization="Bearer "+u.token),n},e=function(u){var s=n.defer(),o,e,f;if(u.status===401){if(o=!1,e=i.get("authorizationData"),e)if(o=moment().isAfter(e.expiration),o)if(f=t.get("AuthService"),e.useRefreshTokens)f.refreshToken().then(function(){r.pop("success"," Αυτόματη ανανέωση χρόνου","Η σύνδεσή σας ανανεώθηκε!")},function(){f.logOut()});else return f.logOut(),t.get("$state").go("login"),n.reject(u);else return t.get("$state").go("forbidden"),n.reject(u);f.logOut();t.get("$state").go("login")}return n.reject(u)};return u.request=f,u.responseError=e,u};AuthInterceptorService.$inject=["$q","$injector","localStorageService","toaster"];AuthService=function(n,t,i,r,u){var o=r.apiServiceBaseUri,e={},f={isAuth:!1,userName:"",useRefreshTokens:!1,userId:"",personId:"",role:"",accessRoules:"",regionAndUnitId:"",levelId:"",unitName:"",isPermanent:"False",expiration:"",sex:"",lastname:"",firstname:""},h=function(t){return s(),n.post(o+"api/account/register",t).then(function(n){return n})},c=function(u){var h="grant_type=password&username="+u.userName+"&password="+u.password+"&role="+u.role,e;return u.useRefreshTokens&&(h=h+"&client_id="+r.clientId),e=t.defer(),n.post(o+"token",h,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(n){u.useRefreshTokens?i.set("authorizationData",{token:n.data.access_token,userName:u.userName,refreshToken:n.data.refresh_token,useRefreshTokens:!0,userId:n.data.userId,personId:n.data.personId,role:n.data.role,accessRoules:n.data.accessRoules,regionAndUnitId:n.data.regionAndUnitId,levelId:n.data.levelId,unitName:n.data.unitName,isPermanent:n.data.isPermanent,expiration:new Date(n.data[".expires"])}):i.set("authorizationData",{token:n.data.access_token,userName:u.userName,refreshToken:"",useRefreshTokens:!1,userId:n.data.userId,personId:n.data.personId,role:n.data.role,accessRoules:n.data.accessRoules,regionAndUnitId:n.data.regionAndUnitId,levelId:n.data.levelId,unitName:n.data.unitName,isPermanent:n.data.isPermanent,expiration:new Date(n.data[".expires"])});f.isAuth=!0;f.userName=u.userName;f.useRefreshTokens=u.useRefreshTokens;f.userId=n.data.userId;f.personId=n.data.personId;f.role=n.data.role;f.accessRoules=n.data.accessRoules;f.regionAndUnitId=n.data.regionAndUnitId;f.levelId=n.data.levelId;f.unitName=n.data.unitName;f.isPermanent=n.data.isPermanent;f.expiration=new Date(n.data[".expires"]);e.resolve(n.data)}).catch(function(n){s();e.reject(n)}),e.promise},s=function(){u.isEmptyValue(i.get("authorizationData"))||i.remove("authorizationData");f.isAuth=!1;f.userName="";f.useRefreshTokens=!1;f.userId="";f.personId="";f.role="";f.accessRoules="";f.regionAndUnitId="";f.levelId="";f.unitName="";f.isPermanent="False";f.expiration="";f.sex="";f.lastname="";f.firstname=""},l=function(){var r=i.get("authorizationData"),u;r&&(f.isAuth=!0,f.userName=r.userName,f.useRefreshTokens=r.useRefreshTokens,f.userId=r.userId,f.personId=r.personId,f.role=r.role,f.accessRoules=r.accessRoules,f.regionAndUnitId=r.regionAndUnitId,f.levelId=r.levelId,f.unitName=r.unitName,f.isPermanent=r.isPermanent,f.expiration=r.expiration,u=t.defer(),n({url:"/api/Person/GetPersonDto",method:"GET",params:{Id:f.personId},headers:{"Content-Type":"application/json"}}).then(function(n){f.sex=n.data.Sex;f.lastname=n.data.Lastname;f.firstname=n.data.Firstname;u.resolve(n.data)}).catch(function(){u.reject(response1)}))},a=function(){var u=t.defer(),f=i.get("authorizationData"),e;return f&&f.useRefreshTokens&&(e="grant_type=refresh_token&refresh_token="+f.refreshToken+"&client_id="+r.clientId,i.remove("authorizationData"),n.post(o+"token",e,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(n){i.set("authorizationData",{token:n.data.access_token,userName:n.data.userName,refreshToken:n.data.refresh_token,useRefreshTokens:!0,userId:n.data.userId,personId:n.data.personId,role:n.data.role,accessRoules:n.data.accessRoules,regionAndUnitId:n.data.regionAndUnitId,levelId:n.data.levelId,unitName:n.data.unitName,isPermanent:n.data.isPermanent,expiration:new Date(n.data[".expires"])});u.resolve(n)}).catch(function(n){s();u.reject(n)})),u.promise},v=function(r){var u=t.defer();return n.get(o+"api/account/ObtainLocalAccessToken",{params:{provider:r.provider,externalAccessToken:r.externalAccessToken}}).success(function(n){i.set("authorizationData",{token:n.access_token,userName:n.userName,refreshToken:"",useRefreshTokens:!1});f.isAuth=!0;f.userName=n.userName;f.useRefreshTokens=!1;u.resolve(n)}).error(function(n){s();u.reject(n)}),u.promise},y=function(r){var u=t.defer();return n.post(o+"api/account/registerexternal",r).success(function(n){i.set("authorizationData",{token:n.access_token,userName:n.userName,refreshToken:"",useRefreshTokens:!1});f.isAuth=!0;f.userName=n.userName;f.useRefreshTokens=!1;u.resolve(n)}).error(function(n){s();u.reject(n)}),u.promise},p=function(i){var r=t.defer();return n.post(o+"api/Account/ForgotPassword",i).then(function(n){r.resolve(n)}).catch(function(n){r.reject(n.data)}),r.promise},w=function(t){return n.post(o+"api/account/ResetPassword",t).then(function(n){return n})},b=function(t){return n.post(o+"api/account/ChangeEmail",t).then(function(n){return n})},k=function(t){return n.post(o+"api/account/ChangePassword",t).then(function(n){return n})};return e.saveRegistration=h,e.login=c,e.logOut=s,e.fillAuthData=l,e.authentication=f,e.refreshToken=a,e.obtainAccessToken=v,e.externalAuthData={provider:"",userName:"",externalAccessToken:""},e.registerExternal=y,e.forgotPassword=p,e.resetPassword=w,e.changeEmail=b,e.changePassword=k,e};AuthService.$inject=["$http","$q","localStorageService","ngAuthSettings","GeneralFactory"];ClassificationFactory=function(n,t){var i={},r=function(i){var r=t.defer();return n({url:"/api/Classification/runSubstituteClassification",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},u=function(i){var r=t.defer();return n({url:"/api/Classification/runSubstituteSMEAClassification",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},f=function(i){var r=t.defer();return n({url:"/api/Classification/runSubstituteMusicClassification",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},e=function(){var i=t.defer();return n({url:"/api/Classification/getSubstituteClassification",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},o=function(){var i=t.defer();return n({url:"/api/Classification/getSubstituteSMEAClassification",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},s=function(){var i=t.defer();return n({url:"/api/Classification/getSubstituteMusicClassification",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise};return i.runSubstituteClassification=r,i.runSubstituteSMEAClassification=u,i.runSubstituteMusicClassification=f,i.getSubstituteClassification=e,i.getSubstituteSMEAClassification=o,i.getSubstituteMusicClassification=s,i};ClassificationFactory.$inject=["$http","$q"];GeneralFactory=function(n,t,i){var r={},u=function(i,r){var u=t.defer();return n({method:"GET",url:r,params:i,responseType:"arraybuffer"}).then(function(n){return u.resolve({success:!0,data:n.data,status:n.status,headers:n.headers})}).catch(function(n){return u.reject({success:!1,data:n.data,status:n.status,headers:n.headers})}),u.promise},f=function(i,r){var u=t.defer();return n({url:r,method:"GET",params:i,headers:{"Content-Type":"application/json"}}).then(function(n){u.resolve(n.data)}).catch(function(n){u.reject(n)}),u.promise},e=function(i){var r=t.defer();return n({url:i,method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},o=function(i,r){var u=t.defer();return n({url:r,method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){u.resolve(n.data)}).catch(function(n){u.reject(n)}),u.promise},s=function(n){return typeof n!="undefined"&&n!=undefined&&n!=null&&n.length>0?!1:!0},h=function(n){return typeof n!="undefined"&&n!=null&&n!=""&&n!=""?!1:!0},c=function(n,t){return t.indexOf(n)!==-1?!0:!1},l=function(n){switch(n){case"Χρήστης":return"u1";case"Εκπαιδευτικός":return"u2";case"Χρήστης Διεύθυνσης Α/θμιας":return"d1";case"Χρήστης Διεύθυνσης Β/θμιας":return"d2";case"Χρήστης Περιφέρειας":return"p";case"Χρήστης Υπουργείου Α/θμιας":return"m1";case"Χρήστης Υπουργείου Β/θμιας":return"m2";case"Διαχειριστής":return"a";case"Χρήστης ΑΣΕΠ":return"s";case"Χρήστης Συμβουλίου":return"c";case"Χρήστης Συμβουλίου Α/θμιας":return"c1";case"Χρήστης Συμβουλίου Β/θμιας":return"c2";case"Χρήστης Κεντρικής Υπηρεσίας Υπουργείου":return"mk";default:return""}},a=function(n){switch(Number(n)){case 1:i.setTrackTypeId(16);break;case 2:i.setTrackTypeId(13);break;case 3:i.setTrackTypeId(15);break;case 4:i.setTrackTypeId(12);break;case 5:i.setTrackTypeId(14);break;case 6:i.setTrackTypeId(11);break;case 7:i.setTrackTypeId(2);break;case 8:i.setTrackTypeId(8);break;case 9:i.setTrackTypeId(10);break;case 10:i.setTrackTypeId(7);break;case 11:i.setTrackTypeId(9);break;case 12:i.setTrackTypeId(17);break;case 13:i.setTrackTypeId(18);break;case 14:i.setTrackTypeId(22);break;case 17:i.setTrackTypeId(24);break;case 18:i.setTrackTypeId(25);break;case 19:i.setTrackTypeId(26);break;case 20:i.setTrackTypeId(27);break;case 21:i.setTrackTypeId(28);break;case 22:i.setTrackTypeId(33);break;case 23:i.setTrackTypeId(37);break;case 24:i.setTrackTypeId(34);break;case 25:i.setTrackTypeId(35);break;case 26:i.setTrackTypeId(38);break;case 27:i.setTrackTypeId(40);break;case 31:i.setTrackTypeId(41);break;case 32:i.setTrackTypeId(42);break;case 33:i.setTrackTypeId(43);break;case 34:i.setTrackTypeId(44);break;case 28:i.setTrackTypeId(45);break;case 29:i.setTrackTypeId(46);break;case 30:i.setTrackTypeId(47);break;case 35:i.setTrackTypeId(48);break;case 36:i.setTrackTypeId(50);break;case 37:i.setTrackTypeId(49);break;case 38:i.setTrackTypeId(51);break;case 39:i.setTrackTypeId(52);break;case 40:i.setTrackTypeId(53);break;case 42:i.setTrackTypeId(54);break;case 43:i.setTrackTypeId(55)}},v=function(n){switch(Number(n)){case 23:return"Προσόντα για ΔΥΕΠ";case 22:return"Ενισχυτικής Διδασκαλίας";case 21:return"Σχολείο ανάληψης υπηρεσίας";case 20:return"Πρόσληψης";case 19:return"Ανάληψης";case 18:return"Απόσπασης σε ΔΥΕΠ (Δομές Υποδοχής για την Εκπαίδευση των Προσφύγων)";case 17:return"Απόσπασης κλάδου Πληροφορικής σε Φορέα";case 16:return"Αναπληρωτή";case 15:return"Αναπληρωτή ΣΜΕΑΕ";case 14:return"Αναπληρωτή σε Μουσικά Σχολεία";case 13:return"Ωρομισθίου";case 12:return"Ωρομισθίου ΣΜΕΑΕ";case 11:return"Ωρομισθίου σε Μουσικά Σχολεία";case 10:return"Απόσπασης ΣΜΕΑΕ - ΚΕ.Δ.Α.Σ.Υ.";case 9:return"Απόσπασης σε Μουσικά Σχολεία";case 8:return"Απόσπασης σε Φορέα";case 7:return"Απόσπασης σε Καλλιτεχνικά Σχολεία";case 2:return"Απόσπασης ΠΥΣΠΕ/ΠΥΣΔΕ - Εκκλησιαστικά Σχολεία";case 26:return"Περιφερειακοί Διευθυντές Εκπαίδευσης";case 27:return"Απόσπασης σε Κ.Ε.Σ.Υ. με εξειδίκευση στη συμβουλευτική και στον επαγγελματικό προσανατολισμό";case 37:return"Αναπληρωτή ΕΕΠ - ΕΒΠ";case 40:return"Μόνιμου Διορισμού ΣΜΕΑ";case 41:return"Αναπληρωτή για δια ζώσης διδασκαλία με 3μηνη σύμβαση";case 42:return"Αναπληρωτή ΣΜΕΑΕ για δια ζώσης διδασκαλία με 3μηνη σύμβαση";case 43:return"Αναπληρωτή σε Μουσικά Σχολεία για δια ζώσης διδασκαλία με 3μηνη σύμβαση";case 44:return"Αναπληρωτή ΕΕΠ-ΕΒΠ για δια ζώσης παροχή υποστηρικτικού έργου με 3μηνη σύμβαση";case 45:return"Αναπληρωτή για ειδική προκήρυξη";case 46:return"Αναπληρωτή ΣΜΕΑΕ για ειδική προκήρυξη";case 47:return"Αναπληρωτή ΕΕΠ-ΕΒΠ για ειδική προκήρυξη";case 48:return"Αναπληρωτή ΠΕ87.02 για κάλυψη θέσεων ΠΕ25 (ειδική προκήρυξη)";case 52:return"Μόνιμου Διορισμού";case 53:return"Μόνιμου Διορισμού σε Μουσικό Σχολείο";case 54:return"Αποσπάσεων για ΕΕΠ - ΕΒΠ";case 55:return"Γενική Αίτηση Απόσπασης";default:return""}};return r.getByParams=f,r.getByParamsDownload=u,r.getByAll=e,r.postByParams=o,r.isEmpty=s,r.isValueInArray=c,r.trackTypes=a,r.getRoleCode=l,r.isEmptyValue=h,r.trackTypesFromIds=v,r};GeneralFactory.$inject=["$http","$q","PassParameters"];HourlyTeacherFactory=function(n,t){var i={},r=function(){var i=t.defer();return n({url:"/api/ApplHourlyTeacher/getMunicipalities",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},u=function(i){var r=t.defer();return n({url:"/api/ApplHourlyTeacher/GetHourlyTeacherSpecsById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},f=function(i){var r=t.defer();return n({url:"/api/ApplHourlyTeacher/insertApplHourlyTeacher",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},e=function(i){var r=t.defer();return n({url:"/api/ApplHourlyTeacher/updateApplHourlyTeacher",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},o=function(i){var r=t.defer();return n({url:"/api/ApplHourlyTeacher/GetApplRegionsByApplId",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},s=function(i){var r=t.defer();return n({url:"/api/ApplHourlyTeacher/GetApplHourlyTeacherById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},h=function(i){var r=t.defer();return n({url:"/api/ApplHourlyTeacher/canInsertApplication",method:"GET",params:{personId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise};return i.getAllMunicipalities=r,i.getHourlyTeacherSpecsById=u,i.insertApplHourlyTeacher=f,i.updateApplHourlyTeacher=e,i.getApplRegionsByApplId=o,i.getHourlyTeacherById=s,i.canInsertApplication=h,i};HourlyTeacherFactory.$inject=["$http","$q"];HourlyTeacherMusicFactory=function(n,t){var i={},r=function(){var i=t.defer();return n({url:"/api/ApplHourlyTeacherMusic/getMunicipalities",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},u=function(i){var r=t.defer();return n({url:"/api/ApplHourlyTeacherMusic/GetApplHourlyTeacherMusicSpecsById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},f=function(i){var r=t.defer();return n({url:"/api/ApplHourlyTeacherMusic/insertApplHourlyTeacherMusic",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},e=function(i){var r=t.defer();return n({url:"/api/ApplHourlyTeacherMusic/updateApplHourlyTeacherMusic",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},o=function(i){var r=t.defer();return n({url:"/api/ApplHourlyTeacherMusic/GetApplHourlyTeacherMusicSpecialistsById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},s=function(i){var r=t.defer();return n({url:"/api/ApplHourlyTeacherMusic/GetApplRegionsByApplId",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},h=function(i){var r=t.defer();return n({url:"/api/ApplHourlyTeacherMusic/GetApplHourlyTeacherMusicById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},c=function(i){var r=t.defer();return n({url:"/api/ApplHourlyTeacherMusic/canInsertApplication",method:"GET",params:{personId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},l=function(i){var r=t.defer();return n({url:"/api/ApplHourlyTeacherMusic/GetHourlyTeacherMusicEM16",method:"GET",params:{applicationId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise};return i.getAllMunicipalities=r,i.getHourlyTeacherMusicSpecsById=u,i.insertApplHourlyTeacherMusic=f,i.updateApplHourlyTeacherMusic=e,i.getApplHourlyTeacherMusicSpecialistsById=o,i.getApplRegionsByApplId=s,i.getHourlyTeacherById=h,i.canInsertApplication=c,i.getHourlyTeacherMusicEM16=l,i};HourlyTeacherMusicFactory.$inject=["$http","$q"];HourlyTeacherSmeaFactory=function(n,t){var i={},r=function(){var i=t.defer();return n({url:"/api/ApplHourlyTeacherSmea/getMunicipalities",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},u=function(i){var r=t.defer();return n({url:"/api/ApplHourlyTeacherSmea/GetHourlyTeacherSmeaSpecsById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},f=function(i){var r=t.defer();return n({url:"/api/ApplHourlyTeacherSmea/insertApplHourlyTeacherSmea",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},e=function(i){var r=t.defer();return n({url:"/api/ApplHourlyTeacherSmea/updateApplHourlyTeacherSmea",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},o=function(i){var r=t.defer();return n({url:"/api/ApplHourlyTeacherSmea/GetApplRegionsByApplId",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},s=function(i){var r=t.defer();return n({url:"/api/ApplHourlyTeacherSmea/GetApplHourlyTeacherSmeaById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},h=function(i){var r=t.defer();return n({url:"/api/ApplHourlyTeacherSmea/canInsertApplication",method:"GET",params:{personId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise};return i.getAllMunicipalities=r,i.getHourlyTeacherSmeaSpecsById=u,i.insertApplHourlyTeacherSmea=f,i.updateApplHourlyTeacherSmea=e,i.getApplRegionsByApplId=o,i.getHourlyTeacherSmeaById=s,i.canInsertApplication=h,i};HourlyTeacherSmeaFactory.$inject=["$http","$q"];LandingPageFactory=function(n,t){var i={},r=function(i){var r=t.defer();return n({url:"/api/LandingPage/getPersonAttributesForMenu",method:"GET",params:{personId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise};return i.getPersonAttributesForMenu=r,i};LandingPageFactory.$inject=["$http","$q"];ManagementFactory=function(n,t){var i={},r=function(){var i=t.defer();return n({url:"/api/Management/getDateLimitation",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},u=function(i){var r=t.defer();return n({url:"/api/Management/updateLimitationDate",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},f=function(i,r){var u=t.defer();return n({url:"/api/Management/getSpecsOrGroupsForGaps",method:"GET",params:{level:i,applicationType:r},headers:{"Content-Type":"application/json"}}).then(function(n){u.resolve(n.data)}).catch(function(){u.reject(response)}),u.promise},e=function(){var i=t.defer();return n({url:"/api/Management/getMusicSpecialistsForGaps",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},o=function(i){var r=t.defer();return n({url:"/api/Management/getGapsForInsertUpdateSubstitute",method:"POST",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},s=function(i){var r=t.defer();return n({url:"/api/Management/getGapsForInsertUpdateSubstituteRef",method:"POST",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},h=function(i){var r=t.defer();return n({url:"/api/Management/getGapsForInsertUpdateSubstituteSmea",method:"POST",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},c=function(i){var r=t.defer();return n({url:"/api/Management/getGapsForInsertUpdateSubstituteMusic",method:"POST",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},l=function(i){var r=t.defer();return n({url:"/api/Management/updateSubstituteGap",method:"POST",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},a=function(i){var r=t.defer();return n({url:"/api/Management/updateSubstituteSmeaGap",method:"POST",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},v=function(i){var r=t.defer();return n({url:"/api/Management/updateSubstituteMusicGap",method:"POST",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},y=function(i){var r=t.defer();return n({url:"/api/Management/getBackgroundProcessesByApplicationTypeId",method:"GET",params:{applicationTypeId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},p=function(i){var r=t.defer();return n({url:"/api/Management/countActiveProcessesByApplicationTypeId",method:"GET",params:{applicationTypeId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},w=function(){var i=t.defer();return n({url:"/api/Management/countActiveProcesses",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},b=function(i){var r=t.defer();return n({url:"/api/Management/getBackroundProcessesForHistoryById",method:"GET",params:{applicationTypeId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},k=function(i){var r=t.defer();return n({url:"/api/Management/getLastBackroundProcessesForHistoryById",method:"GET",params:{applicationTypeId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},d=function(){var i=t.defer();return n({url:"/api/Management/getAlgorithmType",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise};return i.updateLimitationDate=u,i.getDateLimitation=r,i.getSpecsOrGroupsForGaps=f,i.getGapsForInsertUpdateSubstitute=o,i.getGapsForInsertUpdateSubstituteRef=s,i.updateSubstituteGap=l,i.updateSubstituteSmeaGap=a,i.updateSubstituteMusicGap=v,i.getGapsForInsertUpdateSubstituteSmea=h,i.getGapsForInsertUpdateSubstituteMusic=c,i.getMusicSpecialistsForGaps=e,i.getBackgroundProcessesByApplicationTypeId=y,i.countActiveProcessesByApplicationTypeId=p,i.countActiveProcesses=w,i.getBackroundProcessesForHistoryById=b,i.getAlgorithmType=d,i.getLastBackroundProcessesForHistoryById=k,i};ManagementFactory.$inject=["$http","$q"];PassParameters=function(){var n={personId:"",applicationId:"",hasMusicSpeciality:"",hasSpecialEducation:"",fekId:"",fek:"",fekValidTo:"",fekValidFrom:"",code:"",applicationTypeId:"",backbgroudProcessId:"",trackId:"",trackTypeId:"",firstName:"",lastName:"",fatherFirstName:"",specialityId:"",musicSpecialistId:""},t=[],i=function(n){t=n},r=function(){return t},u=function(t){n.firstName=t},f=function(){return n.firstName},e=function(t){n.lastName=t},o=function(){return n.lastName},s=function(t){n.fatherFirstName=t},h=function(){return n.fatherFirstName},c=function(t){n.code=t},l=function(){return n.code},a=function(t){n.fekValidFrom=t},v=function(){return n.fekValidFrom},y=function(){return n.fekValidTo},p=function(t){n.fekValidTo=t},w=function(t){n.trackId=t},b=function(){return n.trackId},k=function(t){n.trackTypeId=t},d=function(){return n.trackTypeId},g=function(t){n.personId=t},nt=function(){return n.personId},tt=function(t){n.specialityId=t},it=function(){return n.specialityId},rt=function(t){n.musicSpecialistId=t},ut=function(){return n.musicSpecialistId},ft=function(t){n.applicationId=t},et=function(){return n.applicationId},ot=function(){return n.personId="",n.personId},st=function(){return n.applicationId="",n.applicationId},ht=function(){return n.fek="",n.fek},ct=function(t){n.hasMusicSpeciality=t},lt=function(){return n.hasMusicSpeciality},at=function(t){n.hasSpecialEducation=t},vt=function(){return n.hasSpecialEducation},yt=function(t){n.fekId=t},pt=function(){return n.fekId},wt=function(t){n.fek=t},bt=function(){return n.fek},kt=function(t){n.applicationTypeId=t},dt=function(){return n.applicationTypeId},gt=function(t){n.backbgroudProcessId=t},ni=function(){return n.backbgroudProcessId},ti=function(t){n.IsPermanent=t},ii=function(){return n.IsPermanent},ri=function(t){n.applicationLevelId=t},ui=function(){return n.applicationLevelId};return{setPersonId:g,getPersonId:nt,setSpecialityId:tt,getSpecialityId:it,setMusicSpecialistId:rt,getMusicSpecialistId:ut,resetPerson:ot,setApplicationId:ft,getApplicationId:et,resetApplication:st,setHasMusicSpeciality:ct,getHasMusicSpeciality:lt,setHasSpecialEducation:at,getHasSpecialEducation:vt,getFekId:pt,setFekId:yt,getFek:bt,setFek:wt,setCode:c,getCode:l,setFekValidTo:p,getFekValidTo:y,setFekValidFrom:a,getFekValidFrom:v,getApplicationTypeId:dt,setApplicationTypeId:kt,getBackbgroudProcessId:ni,setBackbgroudProcessId:gt,setTrackId:w,getTrackId:b,setTrackTypeId:k,getTrackTypeId:d,resetFek:ht,getfirstName:f,getlastName:o,getfatherFirstName:h,setfirstName:u,setlastName:e,setfatherFirstName:s,setArray:i,getArray:r,setIsPermanent:ti,getIsPermanent:ii,setApplicationLevelId:ri,getApplicationLevelId:ui}};PassParameters.$inject=["$q"];PersonFactory=function(n,t){var i={},r=function(i){var r=t.defer();return n({url:"/api/Person/GetPersonDto",method:"GET",params:{Id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise};return i.getPersonForApplication=r,i};PersonFactory.$inject=["$http","$q"];PersonMusicSpecialityFactory=function(n,t){var i={},r=function(i){var r=t.defer();return n({url:"/api/PersonMusicSpeciality/getMusicSpecialists",method:"GET",params:{Id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise};return i.getMusicSpecialists=r,i};PersonMusicSpecialityFactory.$inject=["$http","$q"];PersonSpecialityFactory=function(n,t){var i={},r=function(i){var r=t.defer();return n({url:"/api/PersonSpeciality/getMusicSpecialitiesByPerson",method:"GET",params:{Id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},u=function(i){var r=t.defer();return n({url:"/api/PersonSpeciality/getPersonSpecialitiesByPersonId",method:"GET",params:{Id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},f=function(i){var r=t.defer();return n({url:"/api/PersonSpeciality/getSpecialitiesByPersonId",method:"GET",params:{Id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},e=function(i){var r=t.defer();return n({url:"/api/PersonSpeciality/getMusicSpecialitiesWithDetails",method:"GET",params:{Id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},o=function(i){var r=t.defer();return n({url:"/api/PersonSpeciality/getSpecialSpecialitiesByPersonId",method:"GET",params:{Id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},s=function(i){var r=t.defer();return n({url:"/api/PersonSpeciality/getSpecialSpecialitiesDetailsByPersonId",method:"GET",params:{Id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},h=function(i,r,u){var f=t.defer();return n({url:"/api/PersonSpeciality/getSpecialitiesByPersonIdAndValidFekAndLevel",method:"GET",params:{Id:i,applicationTypeId:r,level:u},headers:{"Content-Type":"application/json"}}).then(function(n){f.resolve(n.data)}).catch(function(){f.reject(response)}),f.promise},c=function(i,r,u){var f=t.defer();return n({url:"/api/PersonSpeciality/getSpecialSpecialitiesByPersonIdAndValidFek",method:"GET",params:{Id:i,applicationTypeId:r,level:u},headers:{"Content-Type":"application/json"}}).then(function(n){f.resolve(n.data)}).catch(function(){f.reject(response)}),f.promise},l=function(i,r,u){var f=t.defer();return n({url:"/api/PersonSpeciality/getMusicSpecialitiesByPersonIdAndValidFekAndLevel",method:"GET",params:{Id:i,applicationTypeId:r,level:u},headers:{"Content-Type":"application/json"}}).then(function(n){f.resolve(n.data)}).catch(function(){f.reject(response)}),f.promise},a=function(i){var r=t.defer();return n({url:"/api/PersonSpeciality/getSpecialitiesLevel",method:"GET",params:{Id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise};return i.getMusicSpecialitiesByPerson=r,i.getMusicSpecialitiesWithDetails=e,i.getPersonSpecialitiesByPersonId=u,i.getSpecialitiesByPersonId=f,i.getSpecialSpecialitiesByPersonId=o,i.getSpecialSpecialitiesDetailsByPersonId=s,i.getSpecialitiesByPersonIdAndValidFekAndLevel=h,i.getSpecialSpecialitiesByPersonIdAndValidFek=c,i.getMusicSpecialitiesByPersonIdAndValidFekAndLevel=l,i.getSpecialitiesLevel=a,i};PersonSpecialityFactory.$inject=["$http","$q"];RegionAndFactory=function(n,t){var i={},r=function(i){var r=t.defer();return n({url:"/api/RegionAndUnit/getIntendancies",method:"GET",params:{level:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise};return i.getIntendancies=r,i};RegionAndFactory.$inject=["$http","$q"];RouteFactory=function(n,t,i){var r={},u=function(n){switch(Number(n)){case 1:i.go("substitute");break;case 2:i.go("hourlyteacher");break;case 3:i.go("substitutesmea");break;case 4:i.go("hourlyteachersmea");break;case 5:i.go("substitutemusic");break;case 6:i.go("hourlyteachermusic");break;case 7:i.go("secondmentapplicationpyspdechurch");break;case 8:i.go("secondmentapplicationbody");break;case 9:i.go("secondmentapplicationpyspdesmea");break;case 10:i.go("secondmentapplicationartistic");break;case 11:i.go("secondmentapplicationmusic");break;case 12:i.go("secondmentapplicationbody1920");break;case 13:i.go("secondmentapplicationbodyref");break;case 14:i.go("remediation");break;case 17:i.go("secondmentchurch");break;case 18:i.go("secondmentapplicationbodysep");break;case 19:i.go("prefecture");break;case 20:i.go("secondmentapplicationkesy");break;case 21:i.go("intendancy");break;case 22:i.go("secondmentapplicationbodytechnical");break;case 23:i.go("substituteEEPEBP");break;case 24:i.go("hourlyteachermusicforEM16");break;case 25:i.go("permanentEEPEBP");break;case 26:i.go("educationDirectors");break;case 27:i.go("permanentSMEA");break;case 28:i.go("substituteForSchool");break;case 29:i.go("substituteSMEAForSchool");break;case 30:i.go("substituteEEPEBPForSchool");break;case 31:i.go("substitute3months");break;case 32:i.go("substituteSMEA3months");break;case 33:i.go("substituteMusic3months");break;case 34:i.go("substituteEEPEBP3months");break;case 35:i.go("substitutePE8702School");break;case 36:i.go("remediationMusic");break;case 37:i.go("remediationSMEA");break;case 38:i.go("substituteTE0130School");break;case 39:i.go("permanent");break;case 40:i.go("permanentMusic");break;case 41:i.go("substitutePlacementSchool");break;case 42:i.go("secondmentapplicationeepebp");break;case 43:i.go("secondmentapplicationgeneral")}},f=function(n){switch(Number(n)){case 1:return"Αναπληρωτή";case 2:return"Ωρομισθίου";case 3:return"Αναπληρωτή ΣΜΕΑΕ";case 4:return"Ωρομισθίου ΣΜΕΑΕ";case 5:return"Αναπληρωτή σε Μουσικά Σχολεία";case 6:return"Ωρομισθίου σε Μουσικά Σχολεία"}};return r.goToPage=u,r.findApplicationName=f,r};RouteFactory.$inject=["$http","$q","$state"];SecondmentBody1920Factory=function(n,t){var i={},r=function(i){var r=t.defer();return n({url:"/api/SecondmentBody1920Controller/insertSecondmentBody",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},u=function(i){var r=t.defer();return n({url:"/api/SecondmentBody1920Controller/updateSecondmentBody",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},f=function(i){var r=t.defer();return n({url:"/api/SecondmentBody1920Controller/getSecondmentBodyById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},e=function(i){var r=t.defer();return n({url:"/api/SecondmentBody1920Controller/getApplBodyById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},o=function(i){var r=t.defer();return n({url:"/api/SecondmentBody1920Controller/canInsertApplication",method:"GET",params:{personId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise};return i.insertSecondmentBody=r,i.updateSecondmentBody=u,i.getSecondmentBodyById=f,i.getApplBodyById=e,i.canInsertApplication=o,i};SecondmentBody1920Factory.$inject=["$http","$q"];SecondmentBodyFactory=function(n,t){var i={},r=function(i){var r=t.defer();return n({url:"/api/SecondmentBodyController/insertSecondmentBody",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},u=function(i){var r=t.defer();return n({url:"/api/SecondmentBodyController/updateSecondmentBody",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},f=function(i){var r=t.defer();return n({url:"/api/SecondmentBodyController/getSecondmentBodyById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},e=function(i){var r=t.defer();return n({url:"/api/SecondmentBodyController/getApplBodyById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},o=function(i){var r=t.defer();return n({url:"/api/SecondmentBodyController/canInsertApplication",method:"GET",params:{personId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise};return i.insertSecondmentBody=r,i.updateSecondmentBody=u,i.getSecondmentBodyById=f,i.getApplBodyById=e,i.canInsertApplication=o,i};SecondmentBodyFactory.$inject=["$http","$q"];SecondmentBodyRefFactory=function(n,t){var i={},r=function(i){var r=t.defer();return n({url:"/api/SecondmentBodyRefController/insertSecondmentBody",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},u=function(i){var r=t.defer();return n({url:"/api/SecondmentBodyRefController/updateSecondmentBody",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},f=function(i){var r=t.defer();return n({url:"/api/SecondmentBodyRefController/getSecondmentBodyById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},e=function(i){var r=t.defer();return n({url:"/api/SecondmentBodyRefController/getApplBodyById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},o=function(i){var r=t.defer();return n({url:"/api/SecondmentBodyRefController/canInsertApplication",method:"GET",params:{personId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise};return i.insertSecondmentBody=r,i.updateSecondmentBody=u,i.getSecondmentBodyById=f,i.getApplBodyById=e,i.canInsertApplication=o,i};SecondmentBodyRefFactory.$inject=["$http","$q"];SecondmentBodySepFactory=function(n,t){var i={},r=function(i){var r=t.defer();return n({url:"/api/SecondmentBodySepController/insertSecondmentBody",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},u=function(i){var r=t.defer();return n({url:"/api/SecondmentBodySepController/updateSecondmentBody",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},f=function(i){var r=t.defer();return n({url:"/api/SecondmentBodySepController/getSecondmentBodyById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},e=function(i){var r=t.defer();return n({url:"/api/SecondmentBodySepController/getApplBodyById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},o=function(i){var r=t.defer();return n({url:"/api/SecondmentBodySepController/canInsertApplication",method:"GET",params:{personId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise};return i.insertSecondmentBody=r,i.updateSecondmentBody=u,i.getSecondmentBodyById=f,i.getApplBodyById=e,i.canInsertApplication=o,i};SecondmentBodySepFactory.$inject=["$http","$q"];SecondmentBodyTechnicalFactory=function(n,t){var i={},r=function(i){var r=t.defer();return n({url:"/api/SecondmentBodyTechnicalController/insertSecondmentBody",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},u=function(i){var r=t.defer();return n({url:"/api/SecondmentBodyTechnicalController/updateSecondmentBody",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},f=function(i){var r=t.defer();return n({url:"/api/SecondmentBodyTechnicalController/getSecondmentBodyById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},e=function(i){var r=t.defer();return n({url:"/api/SecondmentBodyTechnicalController/getApplBodyById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},o=function(i){var r=t.defer();return n({url:"/api/SecondmentBodyTechnicalController/canInsertApplication",method:"GET",params:{personId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise};return i.insertSecondmentBody=r,i.updateSecondmentBody=u,i.getSecondmentBodyById=f,i.getApplBodyById=e,i.canInsertApplication=o,i};SecondmentBodyTechnicalFactory.$inject=["$http","$q"];SecondmentChurchFactory=function(n,t){var i={},r=function(){var i=t.defer();return n({url:"/api/SecondmentChurchController/maritalStatusTypes",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},u=function(){var i=t.defer();return n({url:"/api/SecondmentChurchController/mateProfessionTypes",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},f=function(){var i=t.defer();return n({url:"/api/SecondmentChurchController/healthProblemsTypes",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},e=function(){var i=t.defer();return n({url:"/api/SecondmentChurchController/parentsHealthProblemsTypes",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},o=function(){var i=t.defer();return n({url:"/api/SecondmentChurchController/brothersHealthProblemsTypes",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},s=function(){var i=t.defer();return n({url:"/api/SecondmentChurchController/getDiseases",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},h=function(i){var r=t.defer();return n({url:"/api/SecondmentChurchController/insertSecondmentChurch",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},c=function(i){var r=t.defer();return n({url:"/api/SecondmentChurchController/getSecondmentChurchById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},l=function(i,r){var u=t.defer();return n({url:"/api/SecondmentChurchController/getApplPyspdeById",method:"GET",params:{applicationId:i,level:r},headers:{"Content-Type":"application/json"}}).then(function(n){u.resolve(n.data)}).catch(function(){u.reject(response)}),u.promise},a=function(i){var r=t.defer();return n({url:"/api/SecondmentChurchController/getApplChurchById",method:"GET",params:{applicationId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},v=function(i){var r=t.defer();return n({url:"/api/SecondmentChurchController/updateSecondmentChurch",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},y=function(i){var r=t.defer();return n({url:"/api/SecondmentChurchController/canInsertApplication",method:"GET",params:{personId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise};return i.getMaritalStatusTypes=r,i.getMateProfessionTypes=u,i.getHealthProblemsTypes=f,i.getParentsHealthProblemsTypes=e,i.getBrothersHealthProblemsTypes=o,i.getDiseases=s,i.insertSecondmentChurch=h,i.getSecondmentChurchById=c,i.getApplPyspdeById=l,i.getApplChurchById=a,i.updateSecondmentChurch=v,i.canInsertApplication=y,i};SecondmentChurchFactory.$inject=["$http","$q"];SecondmentKesyFactory=function(n,t){var i={},r=function(){var i=t.defer();return n({url:"/api/SecondmentKesyController/maritalStatusTypes",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},u=function(){var i=t.defer();return n({url:"/api/SecondmentKesyController/mateProfessionTypes",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},f=function(i){var r=t.defer();return n({url:"/api/SecondmentKesyController/insertSecondmentKesy",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},e=function(i){var r=t.defer();return n({url:"/api/SecondmentKesyController/getSecondmentKesyById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},o=function(i){var r=t.defer();return n({url:"/api/SecondmentKesyController/getApplKesyById",method:"GET",params:{applicationId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},s=function(i){var r=t.defer();return n({url:"/api/SecondmentKesyController/updateSecondmentKesy",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},h=function(i){var r=t.defer();return n({url:"/api/SecondmentKesyController/canInsertApplication",method:"GET",params:{personId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},c=function(){var i=t.defer();return n({url:"/api/SecondmentKesyController/mainSpecialPhysicalEduQualifications",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},l=function(){var i=t.defer();return n({url:"/api/SecondmentKesyController/getMunicipalities",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise};return i.getMaritalStatusTypes=r,i.getMateProfessionTypes=u,i.insertSecondmentKesy=f,i.getSecondmentKesyById=e,i.getApplKesyById=o,i.updateSecondmentKesy=s,i.canInsertApplication=h,i.getMainSpecialPhysicalEduQualifications=c,i.getAllMunicipalities=l,i};SecondmentKesyFactory.$inject=["$http","$q"];SecondmentPyspdeChurchFactory=function(n,t){var i={},r=function(){var i=t.defer();return n({url:"/api/SecondmentPyspdeChurchController/maritalStatusTypes",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},u=function(){var i=t.defer();return n({url:"/api/SecondmentPyspdeChurchController/mateProfessionTypes",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},f=function(){var i=t.defer();return n({url:"/api/SecondmentPyspdeChurchController/healthProblemsTypes",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},e=function(){var i=t.defer();return n({url:"/api/SecondmentPyspdeChurchController/parentsHealthProblemsTypes",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},o=function(){var i=t.defer();return n({url:"/api/SecondmentPyspdeChurchController/brothersHealthProblemsTypes",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},s=function(){var i=t.defer();return n({url:"/api/SecondmentPyspdeChurchController/getDiseases",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},h=function(i){var r=t.defer();return n({url:"/api/SecondmentPyspdeChurchController/insertSecondmentPyspdeChurch",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},c=function(i){var r=t.defer();return n({url:"/api/SecondmentPyspdeChurchController/getSecondmentPyspdeChurchById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},l=function(i,r){var u=t.defer();return n({url:"/api/SecondmentPyspdeChurchController/getApplPyspdeById",method:"GET",params:{applicationId:i,level:r},headers:{"Content-Type":"application/json"}}).then(function(n){u.resolve(n.data)}).catch(function(){u.reject(response)}),u.promise},a=function(i){var r=t.defer();return n({url:"/api/SecondmentPyspdeChurchController/getApplChurchById",method:"GET",params:{applicationId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},v=function(i){var r=t.defer();return n({url:"/api/SecondmentPyspdeChurchController/updateSecondmentPyspdeChurch",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},y=function(i){var r=t.defer();return n({url:"/api/SecondmentPyspdeChurchController/canInsertApplication",method:"GET",params:{personId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise};return i.getMaritalStatusTypes=r,i.getMateProfessionTypes=u,i.getHealthProblemsTypes=f,i.getParentsHealthProblemsTypes=e,i.getBrothersHealthProblemsTypes=o,i.getDiseases=s,i.insertSecondmentPyspdeChurch=h,i.getSecondmentPyspdeChurchById=c,i.getApplPyspdeById=l,i.getApplChurchById=a,i.updateSecondmentPyspdeChurch=v,i.canInsertApplication=y,i};SecondmentPyspdeChurchFactory.$inject=["$http","$q"];SecondmentPyspdeSmeaFactory=function(n,t){var i={},r=function(){var i=t.defer();return n({url:"/api/SecondmentPyspdeSmeaController/maritalStatusTypes",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},u=function(){var i=t.defer();return n({url:"/api/SecondmentPyspdeSmeaController/mateProfessionTypes",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},f=function(){var i=t.defer();return n({url:"/api/SecondmentPyspdeSmeaController/healthProblemsTypes",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},e=function(){var i=t.defer();return n({url:"/api/SecondmentPyspdeSmeaController/parentsHealthProblemsTypes",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},o=function(){var i=t.defer();return n({url:"/api/SecondmentPyspdeSmeaController/brothersHealthProblemsTypes",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},s=function(){var i=t.defer();return n({url:"/api/SecondmentPyspdeSmeaController/getDiseases",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},h=function(i){var r=t.defer();return n({url:"/api/SecondmentPyspdeSmeaController/insertSecondmentPyspdeSmea",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},c=function(i){var r=t.defer();return n({url:"/api/SecondmentPyspdeSmeaController/getSecondmentPyspdeSmeaById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},l=function(i,r){var u=t.defer();return n({url:"/api/SecondmentPyspdeSmeaController/getApplPyspdeById",method:"GET",params:{applicationId:i,level:r},headers:{"Content-Type":"application/json"}}).then(function(n){u.resolve(n.data)}).catch(function(){u.reject(response)}),u.promise},a=function(i){var r=t.defer();return n({url:"/api/SecondmentPyspdeSmeaController/updateSecondmentPyspdeSmea",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},v=function(i){var r=t.defer();return n({url:"/api/SecondmentPyspdeSmeaController/canInsertApplication",method:"GET",params:{personId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},y=function(){var i=t.defer();return n({url:"/api/SecondmentPyspdeSmeaController/mainSpecialPhysicalEduQualifications",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise};return i.getMaritalStatusTypes=r,i.getMateProfessionTypes=u,i.getHealthProblemsTypes=f,i.getParentsHealthProblemsTypes=e,i.getBrothersHealthProblemsTypes=o,i.getDiseases=s,i.insertSecondmentPyspdeSmea=h,i.getSecondmentPyspdeSmeaById=c,i.getApplPyspdeById=l,i.updateSecondmentPyspdeSmea=a,i.canInsertApplication=v,i.getMainSpecialPhysicalEduQualifications=y,i};SecondmentPyspdeSmeaFactory.$inject=["$http","$q"];SpecialityFactory=function(n,t){var i={},r=function(){var i=t.defer();return n({url:"/api/Speciality/getAllSpecialities",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise};return i.getAllSpecialities=r,i};SpecialityFactory.$inject=["$http","$q"];SubstituteEEPEBPFactory=function(n,t){var i={},r=function(){var i=t.defer();return n({url:"/api/ApplSubstituteEEPEBP/getMunicipalities",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},u=function(i){var r=t.defer();return n({url:"/api/ApplSubstituteEEPEBP/getSubstituteEEPEBPSpecsById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},f=function(i){var r=t.defer();return n({url:"/api/ApplSubstituteEEPEBP/insertApplSubstituteEEPEBP",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},e=function(i){var r=t.defer();return n({url:"/api/ApplSubstituteEEPEBP/updateApplSubstituteEEPEBP",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},o=function(i){var r=t.defer();return n({url:"/api/ApplSubstituteEEPEBP/GetApplRegionsByApplId",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},s=function(i){var r=t.defer();return n({url:"/api/ApplSubstituteEEPEBP/GetApplSubstituteEEPEBPById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},h=function(i){var r=t.defer();return n({url:"/api/ApplSubstituteEEPEBP/canInsertApplication",method:"GET",params:{personId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise};return i.getAllMunicipalities=r,i.getSubstituteEEPEBPSpecsById=u,i.insertApplSubstituteEEPEBP=f,i.updateApplSubstituteEEPEBP=e,i.getApplRegionsByApplId=o,i.getApplSubstituteEEPEBPById=s,i.canInsertApplication=h,i};SubstituteEEPEBPFactory.$inject=["$http","$q"];SubstituteFactory=function(n,t){var i={},r=function(i){var r=t.defer();return n({url:"/api/ApplSubstitute/GetApplSubstituteSpecsById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},u=function(i){var r=t.defer();return n({url:"/api/ApplSubstitute/insertApplSubstitute",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},f=function(i){var r=t.defer();return n({url:"/api/ApplSubstitute/updateApplSubstitute",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},e=function(i){var r=t.defer();return n({url:"/api/ApplSubstitute/GetApplRegionsByApplId",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},o=function(i){var r=t.defer();return n({url:"/api/ApplSubstitute/GetApplSubstituteById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},s=function(i){var r=t.defer();return n({url:"/api/ApplSubstitute/GetLevelFromSubstituteId",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},h=function(){var i=t.defer();return n({url:"/api/ApplSubstitute/getPrivatesSchoolYearsAllAvailable",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},c=function(i){var r=t.defer();return n({url:"/api/ApplSubstitute/getPrivatesSchoolYearsByApplSubId",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},l=function(i,r){var u=t.defer();return n({url:"/api/ApplSubstitute/canInsertApplicationToLevels",method:"GET",params:{personId:i,level:r},headers:{"Content-Type":"application/json"}}).then(function(n){u.resolve(n.data)}).catch(function(){u.reject(response)}),u.promise};return i.getSubstituteSpecsById=r,i.insertApplSubstitute=u,i.updateApplSubstitute=f,i.getApplRegionsByApplId=e,i.getSubstituteById=o,i.getPrivatesSchoolYearsAllAvailable=h,i.getPrivatesSchoolYearsByApplSubId=c,i.canInsertApplicationToLevels=l,i.getLevelFromSubstituteId=s,i};SubstituteFactory.$inject=["$http","$q"];SubstituteMusicFactory=function(n,t){var i={},r=function(i){var r=t.defer();return n({url:"/api/ApplSubstituteMusic/GetApplSubstituteMusicSpecsById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},u=function(i){var r=t.defer();return n({url:"/api/ApplSubstituteMusic/insertApplSubstituteMusic",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},f=function(i){var r=t.defer();return n({url:"/api/ApplSubstituteMusic/updateApplSubstituteMusic",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},e=function(i){var r=t.defer();return n({url:"/api/ApplSubstituteMusic/GetApplSubstituteMusicSpecialistsById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},o=function(i){var r=t.defer();return n({url:"/api/ApplSubstituteMusic/GetApplRegionsByApplId",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},s=function(i){var r=t.defer();return n({url:"/api/ApplSubstituteMusic/GetApplSubstituteMusicById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},h=function(i){var r=t.defer();return n({url:"/api/ApplSubstituteMusic/canInsertApplication",method:"GET",params:{personId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise};return i.getSubstituteMusicSpecsById=r,i.insertApplSubstituteMusic=u,i.updateApplSubstituteMusic=f,i.getApplSubstituteMusicSpecialistsById=e,i.getApplRegionsByApplId=o,i.getSubstituteMusicById=s,i.canInsertApplication=h,i};SubstituteMusicFactory.$inject=["$http","$q"];SubstituteSMEAFactory=function(n,t){var i={},r=function(i){var r=t.defer();return n({url:"/api/ApplSubstituteSmea/GetApplSubstituteSMEASpecsById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},u=function(i){var r=t.defer();return n({url:"/api/ApplSubstituteSmea/insertApplSubstituteSMEA",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},f=function(i){var r=t.defer();return n({url:"/api/ApplSubstituteSmea/updateApplSubstituteSMEA",method:"Post",data:i,headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(n){r.reject(n)}),r.promise},e=function(i){var r=t.defer();return n({url:"/api/ApplSubstituteSmea/GetApplRegionsByApplId",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},o=function(i){var r=t.defer();return n({url:"/api/ApplSubstituteSmea/GetApplKeddyByApplId",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},s=function(i){var r=t.defer();return n({url:"/api/ApplSubstituteSmea/GetApplSubstituteSMEAById",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},h=function(){var i=t.defer();return n({url:"/api/ApplSubstituteSmea/getPrivatesSchoolYearsAllAvailable",method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){i.resolve(n.data)}).catch(function(){i.reject(response)}),i.promise},c=function(i){var r=t.defer();return n({url:"/api/ApplSubstituteSMEA/getPrivatesSchoolYearsByApplSubId",method:"GET",params:{id:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise},l=function(i){var r=t.defer();return n({url:"/api/ApplSubstituteSMEA/canInsertApplication",method:"GET",params:{personId:i},headers:{"Content-Type":"application/json"}}).then(function(n){r.resolve(n.data)}).catch(function(){r.reject(response)}),r.promise};return i.getSubstituteSMEASpecsById=r,i.insertApplSubstituteSMEA=u,i.updateApplSubstituteSMEA=f,i.getApplRegionsByApplId=e,i.getSubstituteSMEAById=s,i.getApplKeddyByApplId=o,i.getPrivatesSchoolYearsAllAvailable=h,i.getPrivatesSchoolYearsByApplSubId=c,i.canInsertApplication=l,i};SubstituteSMEAFactory.$inject=["$http","$q"];TokensManagerService=function(n,t){var r=t.apiServiceBaseUri,i={},u=function(){return n.get(r+"api/refreshtokens").then(function(n){return n})},f=function(t){return n.delete(r+"api/refreshtokens/?tokenid="+t).then(function(n){return n})};return i.deleteRefreshTokens=f,i.getRefreshTokens=u,i};TokensManagerService.$inject=["$http","ngAuthSettings"];OPSYDMVCApp=angular.module("OPSYDMVCApp",["ui.router","ui.bootstrap","angular-loading-bar","ngAnimate","ngSanitize","toaster","jkuri.touchspin","ng.deviceDetector","datatables","datatables.bootstrap","datatables.buttons","datatables.scroller","datatables.colreorder","ui.select","frapontillo.bootstrap-duallistbox","checklist-model","LocalStorageModule","angular.filter","vcRecaptcha","ngIdle","angularFileUpload","dx","as.sortable"]);OPSYDMVCApp.controller("LandingPageController",LandingPageController);OPSYDMVCApp.factory("PersonFactory",PersonFactory);OPSYDMVCApp.factory("PassParameters",PassParameters);OPSYDMVCApp.factory("HourlyTeacherMusicFactory",HourlyTeacherMusicFactory);OPSYDMVCApp.factory("PersonMusicSpecialityFactory",PersonMusicSpecialityFactory);OPSYDMVCApp.factory("PersonSpecialityFactory",PersonSpecialityFactory);OPSYDMVCApp.factory("ApplicationTypeRegionAndUnitFactory",ApplicationTypeRegionAndUnitFactory);OPSYDMVCApp.factory("AuthInterceptorService",AuthInterceptorService);OPSYDMVCApp.factory("AuthService",AuthService);OPSYDMVCApp.factory("TokensManagerService",TokensManagerService);OPSYDMVCApp.factory("SubstituteMusicFactory",SubstituteMusicFactory);OPSYDMVCApp.factory("SubstituteFactory",SubstituteFactory);OPSYDMVCApp.factory("SubstituteSMEAFactory",SubstituteSMEAFactory);OPSYDMVCApp.factory("HourlyTeacherFactory",HourlyTeacherFactory);OPSYDMVCApp.factory("HourlyTeacherSmeaFactory",HourlyTeacherSmeaFactory);OPSYDMVCApp.factory("ApplicationTypeFactory",ApplicationTypeFactory);OPSYDMVCApp.factory("ApplicationTypeFekFactory",ApplicationTypeFekFactory);OPSYDMVCApp.factory("SpecialityFactory",SpecialityFactory);OPSYDMVCApp.factory("ManagementFactory",ManagementFactory);OPSYDMVCApp.factory("ClassificationFactory",ClassificationFactory);OPSYDMVCApp.factory("SecondmentPyspdeChurchFactory",SecondmentPyspdeChurchFactory);OPSYDMVCApp.factory("SecondmentChurchFactory",SecondmentChurchFactory);OPSYDMVCApp.factory("SecondmentPyspdeSmeaFactory",SecondmentPyspdeSmeaFactory);OPSYDMVCApp.factory("SecondmentBodyFactory",SecondmentBodyFactory);OPSYDMVCApp.factory("SecondmentBody1920Factory",SecondmentBody1920Factory);OPSYDMVCApp.factory("LandingPageFactory",LandingPageFactory);OPSYDMVCApp.factory("RegionAndFactory",RegionAndFactory);OPSYDMVCApp.factory("GeneralFactory",GeneralFactory);OPSYDMVCApp.factory("RouteFactory",RouteFactory);OPSYDMVCApp.factory("SecondmentBodyRefFactory",SecondmentBodyRefFactory);OPSYDMVCApp.factory("SecondmentBodySepFactory",SecondmentBodySepFactory);OPSYDMVCApp.factory("SecondmentKesyFactory",SecondmentKesyFactory);OPSYDMVCApp.factory("SecondmentBodyTechnicalFactory",SecondmentBodyTechnicalFactory);OPSYDMVCApp.factory("SubstituteEEPEBPFactory",SubstituteEEPEBPFactory);configFunction=function(n,t,i,r,u,f,e){i.hashPrefix("!").html5Mode({enabled:!0,requireBase:!1});n.state("/",{url:"/",data:{pageTitle:"Αρχική Σελίδα"},views:{containerFull:{templateUrl:"/General/HomePage",controller:HomePageController}}}).state("stateSearch",{url:"/search",data:{pageTitle:"Αναζήτηση",pageDescription:"Αναζήτηση Εκπαιδευτικών"},views:{containerFull:{templateUrl:"/person/search",controller:search}}}).state("stateEditPerson",{url:"/editPerson",data:{pageTitle:"Φάκελος",pageDescription:"Ενημέρωση Προσωπικών Στοιχείων"},views:{containerFull:{templateUrl:"/person/editPerson/",controller:editPerson}}}).state("statenewPerson",{url:"/new",data:{pageTitle:"Φάκελος",pageDescription:"Εισαγωγή Προσωπικών Στοιχείων"},views:{containerFull:{templateUrl:"/person/editPerson",controller:editPerson}}}).state("totalPoints",{url:"/totalPoints",data:{pageTitle:"Φάκελος",pageDescription:"Συνολικά Μόρια"},views:{containerFull:{templateUrl:"/person/showTotalPoints",controller:showTotalPointsController}}}).state("specialities",{url:"/specialities",data:{pageTitle:"Φάκελος",pageDescription:"Διαχείριση Σπουδών/Προσόντων"},views:{containerFull:{templateUrl:"/person/Specialities",controller:SpecialityController}}}).state("specialitiesNew",{url:"/specialitiesNew",data:{pageTitle:"Φάκελος",pageDescription:"Διαχείριση Κλάδων"},views:{containerFull:{templateUrl:"/person/SpecialitiesNew",controller:SpecialityNewController}}}).state("studies",{url:"/studies",data:{pageTitle:"Φάκελος",pageDescription:"Διαχείριση Σπουδών"},views:{containerFull:{templateUrl:"/person/Studies",controller:StudiesController}}}).state("socialCriteria",{url:"/socialCriteria",data:{pageTitle:"Φάκελος",pageDescription:"Κοινωνικά Κριτήρια Νόμου"},views:{containerFull:{templateUrl:"/person/SocialCriteria",controller:SocialCriteriaController}}}).state("diplomaManagment",{url:"/diplomaManagment",data:{pageTitle:"Διαχείριση",pageDescription:"Διαχείριση πτυχίων - κλάδων"},views:{containerFull:{templateUrl:"/Management/DiplomaManagment",controller:DiplomaManagmentController}}}).state("seminarManagment",{url:"/seminarManagment",data:{pageTitle:"Διαχείριση",pageDescription:"Διαχείριση σεμιναρίων"},views:{containerFull:{templateUrl:"/Management/SeminarManagment",controller:SeminarManagmentController}}}).state("deleteChangeDataRequestFile",{url:"/deleteChangeDataRequestFile",data:{pageTitle:"Διαχείριση",pageDescription:"Διαγραφή αρχείων δικαιολογητικών ενημέρωσης φακέλου"},views:{containerFull:{templateUrl:"/Management/DeleteChangeDataRequestFile",controller:DeleteChangeDataRequestFileController}}}).state("diplomaSpecialityManagment",{url:"/diplomaSpecialityManagment",data:{pageTitle:"Διαχείριση",pageDescription:"Διαχείριση πτυχίων - κλάδων"},views:{containerFull:{templateUrl:"/Management/DiplomaSpecialityManagment",controller:DiplomaSpecialityManagmentController}}}).state("academicStudies",{url:"/academicStudies",data:{pageTitle:"Φάκελος",pageDescription:"Μεταπτυχιακές σπουδές"},views:{containerFull:{templateUrl:"/person/AcademicStudies",controller:AcademicStudiesController}}}).state("qualifications",{url:"/qualifications",data:{pageTitle:"Φάκελος",pageDescription:"Προσόντα"},views:{containerFull:{templateUrl:"/person/Qualifications",controller:QualificationsController}}}).state("changeDataRequest",{url:"/changeDataRequest",data:{pageTitle:"Φάκελος",pageDescription:"Επικαιροποίηση φακέλου"},views:{containerFull:{templateUrl:"/person/ChangeDataRequest",controller:ChangeDataRequest}}}).state("academicqualifications",{url:"/academicqualifications",data:{pageTitle:"Φάκελος",pageDescription:"Διαχείριση Ακαδημαικών Προσόντων ΕΑΕ"},views:{containerFull:{templateUrl:"/person/AcademicQualifications",controller:AcademicQualificationsController}}}).state("academicqualificationsref",{url:"/academicqualificationsref",data:{pageTitle:"Φάκελος",pageDescription:"Διαχείριση Ακαδημαικών Προσόντων ΔΥΕΠ"},views:{containerFull:{templateUrl:"/person/AcademicQualificationsRef",controller:AcademicQualificationsControllerRef}}}).state("stateEditSpecialEducation",{url:"/editSpecialEducation",data:{pageTitle:"Φάκελος",pageDescription:"Διαχείριση Ακαδημαικών Προσόντων ΕΑΕ"},views:{containerFull:{templateUrl:"/person/editSpecialEducation",controller:editSpecialEducation}}}).state("forbidden",{url:"/forbidden",data:{pageTitle:"Δεν επιτρέπεται η πρόσβαση"},views:{containerFull:{templateUrl:"/general/errorPage403"}}}).state("pagenotfound",{url:"/pagenotfound",data:{pageTitle:"Η σελίδα δε βρέθηκε"},views:{containerFull:{templateUrl:"/general/errorPage404"}}}).state("history",{url:"/history",data:{pageTitle:"Ιστορικό",pageDescription:"Προβολή Ιστορικού"},views:{containerFull:{templateUrl:"/Application/History",controller:HistoryController}}}).state("substitute",{url:"/substitute",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση Αναπληρωτή"},views:{containerFull:{templateUrl:"/Application/Substitute",controller:SubstituteController}}}).state("updateSubstituteRefRegions",{url:"/updateSubstituteRefRegions",data:{pageTitle:"Αιτήσεις",pageDescription:"Τροποποίηση περιοχών προτίμησης"},views:{containerFull:{templateUrl:"/Application/UpdateSubstituteRefRegions",controller:UpdateSubstituteRefRegionsController}}}).state("remediation",{url:"/remediation",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση για Ενισχυτική Διδασκαλία"},views:{containerFull:{templateUrl:"/Application/Remediation",controller:RemediationController}}}).state("remediationSMEA",{url:"/remediationSMEA",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση για Ενισχυτική Διδασκαλία ΣΜΕΑΕ"},views:{containerFull:{templateUrl:"/Application/RemediationSMEA",controller:RemediationSMEAController}}}).state("remediationMusic",{url:"/remediationMusic",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση για Ενισχυτική Διδασκαλία Μουσικών Σχολείων"},views:{containerFull:{templateUrl:"/Application/RemediationMusic",controller:RemediationMusicController}}}).state("substitutemusic",{url:"/substitutemusic",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση Αναπληρωτή σε Μουσικά Σχολεία"},views:{containerFull:{templateUrl:"/Application/SubstituteMusic",controller:SubstituteMusicController}}}).state("hourlyteacher",{url:"/hourlyteacher",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση Ωρομισθίου"},views:{containerFull:{templateUrl:"/Application/HourlyTeacher",controller:HourlyTeacherController}}}).state("substitutesmea",{url:"/substitutesmea",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση Αναπληρωτή ΣΜΕΑΕ"},views:{containerFull:{templateUrl:"/Application/SubstituteSMEA",controller:SubstituteSMEAController}}}).state("hourlyteachersmea",{url:"/hourlyteachersmea",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση Ωρομισθίου ΣΜΕΑΕ"},views:{containerFull:{templateUrl:"/Application/HourlyTeacherSMEA",controller:HourlyTeacherSMEAController}}}).state("hourlyteachermusic",{url:"/hourlyteachermusic",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση ωρομισθίου σε Μουσικά Σχολεία"},views:{containerFull:{templateUrl:"/Application/HourlyTeacherMusic",controller:HourlyTeacherMusicController}}}).state("hourlyteachermusicforEM16",{url:"/hourlyteachermusicforEM16",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση ωρομισθίου σε Μουσικά Σχολεία Κλάδου ΕΜ16.00"},views:{containerFull:{templateUrl:"/Application/HourlyTeacherMusicForEM16",controller:HourlyTeacherMusicForEM16Controller}}}).state("substituteEEPEBP",{url:"/substituteEEPEBP",data:{pageTitle:"Αιτήσεις",pageDescription:"Αναπληρωτή ΕΕΠ - ΕΒΠ"},views:{containerFull:{templateUrl:"/Application/SubstituteEEPEBP",controller:SubstituteEEPEBPController}}}).state("searchfek",{url:"/searchfek",data:{pageTitle:"Διαχείριση",pageDescription:"Αναζήτηση ΦΕΚ"},views:{containerFull:{templateUrl:"/Management/SearchFek",controller:SearchFekController}}}).state("updatedatelimitation",{url:"/updatedatelimitation",data:{pageTitle:"Διαχείριση",pageDescription:"Μέγιστη Ημερομηνία Κτήσης Πτυχίου"},views:{containerFull:{templateUrl:"/Management/DiplomaDateLimitation",controller:DiplomaDateLimitationController}}}).state("insertgapinit",{url:"/insertgapinit",data:{pageTitle:"Διαχείριση",pageDescription:"Εισαγωγή Κενών"},views:{containerFull:{templateUrl:"/Management/InsertGapInit",controller:InsertGapInitController}}}).state("insertgaphoursinit",{url:"/insertgaphoursinit",data:{pageTitle:"Διαχείριση",pageDescription:"Εισαγωγή Κενών σε Ώρες"},views:{containerFull:{templateUrl:"/Management/InsertGapHoursInit",controller:InsertGapHoursInitController}}}).state("insertPlacementGap",{url:"/insertPlacementGap",data:{pageTitle:"Διαχείριση",pageDescription:"Εισαγωγή κενών για Δήλωση Τοποθέτησης Αναπληρωτή"},views:{containerFull:{templateUrl:"/Management/InsertPlacementGap",controller:InsertPlacementGapController}}}).state("substitutePlacementSchool",{url:"/substitutePlacementSchool",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση - Δήλωση προτίμησης τοποθέτησης προσληφθέντων"},views:{containerFull:{templateUrl:"/Application/SubstitutePlacementSchool",controller:SubstitutePlacementSchoolController}}}).state("onlinecredits",{url:"/onlinecredits",data:{pageTitle:"Διαχείριση",pageDescription:"Πιστώσεις ανά περιοχή"},views:{containerFull:{templateUrl:"/Management/OnlineCredits",controller:OnlineCreditsController}}}).state("online",{url:"/online",data:{pageTitle:"Διαχείριση",pageDescription:"Online - Δέσμευση ωρών ωρομισθίων"},views:{containerFull:{templateUrl:"/Management/Online",controller:OnlineController}}}).state("runclassificationsubstitute",{url:"/runclassificationsubstitute",data:{pageTitle:"Διαχείριση",pageDescription:"Εκτέλεση Ενιαίων Κατάταξης"},views:{containerFull:{templateUrl:"/Management/RunClassificationSubstitute",controller:ClassificationSubstituteController}}}).state("forgotpassword",{url:"/forgotpassword",data:{pageTitle:"Ανάκτηση Κωδικού Πρόσβασης",pageDescription:"Ανάκτηση Κωδικού Πρόσβασης"},views:{containerFull:{templateUrl:"/Authentication/ForgotPassword",controller:ForgotPasswordController}}}).state("resetpassword",{url:"/resetpassword?load&code",data:{pageTitle:"Αλλαγή Κωδικού Πρόσβασης",pageDescription:"Αλλαγή Κωδικού Πρόσβασης"},views:{containerFull:{templateUrl:function(n){return"/Authentication/ResetPassword?load="+n.load+"&code="+n.code},controller:ResetPasswordController}},params:{load:null,code:null}}).state("changepassword",{url:"/changepassword",data:{pageTitle:"Αλλαγή Κωδικού Πρόσβασης",pageDescription:"Αλλαγή Κωδικού Πρόσβασης"},views:{containerFull:{templateUrl:"/Authentication/ChangePassword",controller:ChangePasswordController}}}).state("substituteForSchool",{url:"/substituteForSchool",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση αναπληρωτή για ειδική προκήρυξη"},views:{containerFull:{templateUrl:"/Application/SubstituteForSchool",controller:SubstituteForSchoolController}}}).state("substituteSMEAForSchool",{url:"/substituteSMEAForSchool",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση αναπληρωτή ΣΜΕΑΕ για ειδική προκήρυξη"},views:{containerFull:{templateUrl:"/Application/SubstituteSMEAForSchool",controller:SubstituteSMEAForSchoolController}}}).state("substituteEEPEBPForSchool",{url:"/substituteEEPEBPForSchool",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση αναπληρωτή ΕΕΠ-ΕΒΠ για ειδική προκήρυξη"},views:{containerFull:{templateUrl:"/Application/SubstituteEEPEBPForSchool",controller:SubstituteEEPEBPForSchoolController}}}).state("substitutePE8702School",{url:"/substitutePE8702School",data:{pageTitle:"Αιτήσεις",pageDescription:"Αναπληρωτή ΠΕ87.02 για κάλυψη θέσεων ΠΕ25 (ειδική προκήρυξη)"},views:{containerFull:{templateUrl:"/Application/SubstitutePE8702School",controller:SubstitutePE8702SchoolController}}}).state("substituteTE0130School",{url:"/substituteTE0130School",data:{pageTitle:"Αιτήσεις",pageDescription:"Αναπληρωτή TE01.30 για κάλυψη θέσεων ΕΒΠ (ειδική προκήρυξη)"},views:{containerFull:{templateUrl:"/Application/SubstituteTE0130School",controller:SubstituteTE0130SchoolController}}}).state("substitute3months",{url:"/substitute3months",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση Αναπληρωτή για δια ζώσης διδασκαλία με 3μηνη σύμβαση"},views:{containerFull:{templateUrl:"/Application/Substitute3months",controller:Substitute3monthsController}}}).state("substituteSMEA3months",{url:"/substituteSMEA3months",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση Αναπληρωτή ΣΜΕΑΕ για δια ζώσης διδασκαλία με 3μηνη σύμβαση"},views:{containerFull:{templateUrl:"/Application/SubstituteSMEA3months",controller:SubstituteSMEA3monthsController}}}).state("substituteMusic3months",{url:"/substituteMusic3months",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση Αναπληρωτή σε Μουσικά Σχολεία για δια ζώσης διδασκαλία με 3μηνη σύμβαση"},views:{containerFull:{templateUrl:"/Application/SubstituteMusic3months",controller:SubstituteMusic3monthsController}}}).state("substituteEEPEBP3months",{url:"/substituteEEPEBP3months",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση Αναπληρωτή ΕΕΠ-ΕΒΠ για δια ζώσης παροχή υποστηρικτικού έργου με 3μηνη σύμβαση"},views:{containerFull:{templateUrl:"/Application/SubstituteEEPEBP3months",controller:SubstituteEEPEBP3monthsController}}}).state("permanent",{url:"/permanent",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση Μόνιμου Διορισμού"},views:{containerFull:{templateUrl:"/Application/Permanent",controller:PermanentController}},params:{SpecialityId:null,Code:null}}).state("permanentMusic",{url:"/permanentMusic",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση Μόνιμου Διορισμού σε Μουσικό Σχολείο"},views:{containerFull:{templateUrl:"/Application/PermanentMusic",controller:PermanentMusicController}},params:{SpecialityId:null,Code:null}}).state("permanentEEPEBP",{url:"/permanentEEPEBP",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση Μόνιμου Διορισμού ΕΕΠ-ΕΒΠ"},views:{containerFull:{templateUrl:"/Application/PermanentEEPEBP",controller:PermanentEEPEBPController}},params:{SpecialityId:null,Code:null}}).state("permanentSMEA",{url:"/permanentSMEA",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση Μόνιμου Διορισμού ΣΜΕΑΕ"},views:{containerFull:{templateUrl:"/Application/PermanentSMEA",controller:PermanentSMEAController}},params:{SpecialityId:null,Code:null}}).state("profilemenu",{url:"/profilemenu",data:{pageTitle:"Το προφίλ μου",pageDescription:"Το προφίλ μου"},views:{containerFull:{templateUrl:"/Authentication/ProfileMenu",controller:ProfileMenuController}}}).state("newFek",{url:"/newFek",data:{pageTitle:"Διαχείριση",pageDescription:"Εισαγωγή ΦΕΚ"},views:{containerFull:{templateUrl:"/Management/editFek",controller:EditFekController}}}).state("updatefek",{url:"/updateFek",data:{pageTitle:"Διαχείριση",pageDescription:"Ενημέρωση ΦΕΚ"},views:{containerFull:{templateUrl:"/Management/updateFek",controller:UpdateFekController}}}).state("secondmentapplicationpyspdechurch",{url:"/secondmentapplicationpyspdechurch",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση Απόσπασης ΠΥΣΠΕ/ΠΥΣΔΕ"},views:{containerFull:{templateUrl:"/Secondment/SecondmentPyspdeChurch",controller:SecondmentPyspdeChurchController}}}).state("secondmentapplicationgeneral",{url:"/secondmentapplicationgeneral",data:{pageTitle:"Αιτήσεις",pageDescription:"Γενική Αίτηση Απόσπασης"},views:{containerFull:{templateUrl:"/Secondment/SecondmentGeneral",controller:SecondmentGeneralController}}}).state("secondmentchurch",{url:"/secondmentchurch",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση Απόσπασης σε Εκκλησιαστικά Σχολεία"},views:{containerFull:{templateUrl:"/Secondment/SecondmentChurch",controller:SecondmentChurchController}}}).state("secondmentUpdateTransfer",{url:"/secondmentUpdateTransfer",data:{pageTitle:"Αιτήσεις",pageDescription:"Τροποποίηση περιοχών προτίμησης"},views:{containerFull:{templateUrl:"/Secondment/SecondmentUpdateTransfer",controller:SecondmentUpdateTransfer}}}).state("UpdateRegions",{url:"/updateRegions",data:{pageTitle:"Αιτήσεις",pageDescription:"Αφαίρεση περιοχών προτίμησης"},views:{containerFull:{templateUrl:"/Application/UpdateRegions",controller:UpdateRegionsController}}}).state("secondmentapplicationpyspdesmea",{url:"/secondmentapplicationpyspdesmea",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση Απόσπασης ΣΜΕΑΕ - ΚΕ.Δ.Α.Σ.Υ."},views:{containerFull:{templateUrl:"/Secondment/SecondmentPyspdeSmea",controller:SecondmentPyspdeSmeaController}}}).state("secondmentapplicationeepebp",{url:"/secondmentapplicationeepebp",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση Απόσπασης ΕΕΠ - ΕΒΠ"},views:{containerFull:{templateUrl:"/Secondment/SecondmentEEPEBP",controller:SecondmentEEPEBPController}}}).state("secondmentapplicationkesy",{url:"/secondmentapplicationkesy",data:{pageTitle:"Αιτήσεις",pageDescription:"Απόσπασης σε Κ.Ε.Σ.Υ. με εξειδίκευση στη συμβουλευτική και στον επαγγελματικό προσανατολισμό"},views:{containerFull:{templateUrl:"/Secondment/SecondmentKesy",controller:SecondmentKesyController}}}).state("secondmentmanagement",{url:"/secondmentmanagement",data:{pageTitle:"Αποσπάσεις",pageDescription:"Έλεγχος αιτήσεων απόσπασης"},views:{containerFull:{templateUrl:"/Management/SecondmentManagement",controller:SecondmentManagement}}}).state("secondmentapplicationartistic",{url:"/secondmentapplicationartistic",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση Απόσπασης σε Καλλιτεχνικά Σχολεία"},views:{containerFull:{templateUrl:"/Secondment/SecondmentArtistic",controller:SecondmentArtisticController}}}).state("managmentUserAction",{url:"/managmentUserAction",data:{pageTitle:"Διαχείριση",pageDescription:"Διαχείριση Λογαριασμού Χρήστη"},views:{containerFull:{templateUrl:"/Management/ManagmentUserAction",controller:ManagmentUserAction}}}).state("managmentStatusSecondmentApplications",{url:"/managmentStatusSecondmentApplications",data:{pageTitle:"Διαχείριση",pageDescription:"Διαχείριση Κατάστασης Αιτήσεων Απόσπάσεων"},views:{containerFull:{templateUrl:"/Management/managmentStatusSecondmentApplications",controller:ManagmentStatusSecondmentApplications}}}).state("secondmentapplicationmusic",{url:"/secondmentapplicationmusic",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση Απόσπασης σε Μουσικά Σχολεία"},views:{containerFull:{templateUrl:"/Secondment/SecondmentMusic",controller:SecondmentMusicController}}}).state("secondmentapplicationbody",{url:"/secondmentapplicationbody",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση Απόσπασης σε Φορέα"},views:{containerFull:{templateUrl:"/Secondment/SecondmentBody",controller:SecondmentBodyController}}}).state("algorithmhistory",{url:"/algorithmhistory",data:{pageTitle:"Διαχείριση",pageDescription:"Ιστορικό Εκτέλεσης Αλγορίθμων"},views:{containerFull:{templateUrl:"/Management/AlgorithmHistory",controller:AlgorithmHistoryController}}}).state("showalgorithmresults",{url:"/showalgorithmresults",data:{pageTitle:"Διαχείριση",pageDescription:"Προβολή αποτελεσμάτων αλγορίθμων"},views:{containerFull:{templateUrl:"/Management/ShowAlgorithmResults",controller:ShowAlgorithmResultsController}}}).state("showapplicationperintendancy",{url:"/showapplicationperintendancy",data:{pageTitle:"Διαχείριση",pageDescription:"Προβολή αιτήσεων ανά Διεύθυνση"},views:{containerFull:{templateUrl:"/Management/ShowApplicationPerIntendancy",controller:ShowApplicationPerIntendancy}}}).state("presenceDatesManagment",{url:"/presenceDatesManagment",data:{pageTitle:"Διαχείριση",pageDescription:"Προθεσμία Ανάληψης Υπηρεσίας"},views:{containerFull:{templateUrl:"/Management/PresenceDatesManagment",controller:PresenceDatesManagmentController}}}).state("showUncheckedDocuments",{url:"/showUncheckedDocuments",data:{pageTitle:"Διαχείριση",pageDescription:"Εκκρεμότητες επικύρωσης στοιχείων"},views:{containerFull:{templateUrl:"/Management/ShowUncheckedDocuments",controller:ShowUncheckedDocuments}}}).state("RegionAndUnitModifications",{url:"/RegionAndUnitModifications",data:{pageTitle:"Διαχείριση",pageDescription:"Επεξεργασία Περιοχών"},views:{containerFull:{templateUrl:"/Management/RegionAndUnitModifications",controller:RegionAndUnitModifications}}}).state("AcademicDiplomaManagement",{url:"/AcademicDiplomaManagement",data:{pageTitle:"Διαχείριση",pageDescription:"Διαχείριση Μεταπτυχιακών"},views:{containerFull:{templateUrl:"/Management/AcademicDiplomaManagement",controller:AcademicDiplomaManagementController}}}).state("PrintSecondmentRequest",{url:"/PrintSecondmentRequest",data:{pageTitle:"Διαχείριση",pageDescription:"Εκτύπωση Αιτήσεων Απόσπασης"},views:{containerFull:{templateUrl:"/Management/PrintSecondmentRequest",controller:PrintSecondmentRequestController}}}).state("TablePerSpeciality",{url:"/TablePerSpeciality",data:{pageTitle:"Διαχείριση",pageDescription:"Επιλογή Πίνακα Κατάταξης ανά Κλάδο"},views:{containerFull:{templateUrl:"/Management/TablePerSpeciality",controller:TablePerSpecialityController}}}).state("SecondmentResults",{url:"/SecondmentResults",data:{pageTitle:"Διαχείριση",pageDescription:"Φόρμα Καταχώρισης Αποσπάσεων"},views:{containerFull:{templateUrl:"/Management/SecondmentResults",controller:SecondmentResults}}}).state("showChangeDataRequest",{url:"/showChangeDataRequest",data:{pageTitle:"Διαχείριση",pageDescription:"Ιστορικό Αιτημάτων Αλλαγής"},views:{containerFull:{templateUrl:"/Management/ShowChangeDataRequest",controller:ShowChangeDataRequestController}}}).state("showTrackChanges",{url:"/showTrackChanges",data:{pageTitle:"Διαχείριση",pageDescription:"Προβολή ιστορικού αλλαγών"},views:{containerFull:{templateUrl:"/Management/ShowTrackChanges",controller:ShowTrackChanges}}}).state("confirmation",{url:"/confirmation",data:{pageTitle:"Φάκελος",pageDescription:"Έλεγχος Γνησιότητας"},views:{containerFull:{templateUrl:"/Person/EditPersonConfirmation",controller:EditPersonConfirmation}}}).state("comments",{url:"/comments",data:{pageTitle:"Φάκελος",pageDescription:"Παρατηρήσεις"},views:{containerFull:{templateUrl:"/Person/Comments",controller:PersonComments}}}).state("subsystem",{url:"/subsystem",data:{pageTitle:"Υποσυστήματα",pageDescription:"Υποσυστήματα"},views:{containerFull:{templateUrl:"/Management/Subsystem",controller:SubsystemController}}}).state("userRole",{url:"/userRole",data:{pageTitle:"Μενού",pageDescription:"Διαχείριση ρόλων χρηστών"},views:{containerFull:{templateUrl:"/Management/UserRole",controller:UserRoleController}}}).state("secondmentapplicationbody1920",{url:"/secondmentapplicationbody1920",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση Απόσπασης κλάδου Πληροφορικής σε Φορέα"},views:{containerFull:{templateUrl:"/Secondment/SecondmentBody1920",controller:SecondmentBody1920Controller}}}).state("secondmentapplicationbodytechnical",{url:"/secondmentapplicationbodytechnical",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση Απόσπασης στη Γενική Διεύθυνση Στρατηγικού Σχεδιασμού, Προγραμματισμού και Ηλεκτρονικής Διακυβέρνησης του Υ.ΠΑΙ.Θ.Α."},views:{containerFull:{templateUrl:"/Secondment/SecondmentBodyTechnical",controller:SecondmentBodyTechnicalController}}}).state("secondmentapplicationbodyref",{url:"/secondmentapplicationbodyref",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση Απόσπασης για Θέση Συντονιστή Εκπαίδευσης Προσφύγων"},views:{containerFull:{templateUrl:"/Secondment/SecondmentBodyRef",controller:SecondmentBodyRefController}}}).state("secondmentapplicationbodysep",{url:"/secondmentapplicationbodysep",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση Απόσπασης για Σχολείο Ευρωπαϊκής Παιδείας"},views:{containerFull:{templateUrl:"/Secondment/SecondmentBodySep",controller:SecondmentBodySepController}}}).state("prefecture",{url:"/prefecture",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση Περιφερειακών Διευθυντών Εκπαίδευσης"},views:{containerFull:{templateUrl:"EducationalStaff/Prefecture",controller:PrefectureController}}}).state("intendancy",{url:"/intendancy",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση Διευθυντών Εκπαίδευσης"},views:{containerFull:{templateUrl:"EducationalStaff/Intendancy",controller:IntendancyController}}}).state("educationDirectors",{url:"/educationDirectors",data:{pageTitle:"Αιτήσεις",pageDescription:"Αίτηση Διευθυντών Α/θμιας & Β/θμιας Εκπαίδευσης"},views:{containerFull:{templateUrl:"EducationalStaff/EducationDirectors",controller:EducationDirectorsController}}}).state("announcements",{url:"/announcements",data:{pageTitle:"Ανακοινώσεις",pageDescription:"Ανακοινώσεις"},views:{containerFull:{templateUrl:"/General/Announcements",controller:AnnouncementsController}}}).state("reports",{url:"/reports",data:{pageTitle:"Αναφορές",pageDescription:"Αναφορές"},views:{containerFull:{templateUrl:"/Management/Reports",controller:ReportsController}}}).state("prefectureInterviewPoints",{url:"/prefectureInterviewPoints",data:{pageTitle:"Μοριοδότηση Συνέντευξης",pageDescription:"Μοριοδότηση Συνέντευξης"},views:{containerFull:{templateUrl:"/Management/PrefectureInterviewPoints",controller:PrefectureInterviewPointsController}}}).state("intendancyInterviewPoints",{url:"/intendancyInterviewPoints",data:{pageTitle:"Μοριοδότηση Συνέντευξης",pageDescription:"Μοριοδότηση Συνέντευξης"},views:{containerFull:{templateUrl:"/Management/IntendancyInterviewPoints",controller:IntendancyInterviewPointsController}}}).state("specialreports",{url:"/specialreports",data:{pageTitle:"Εξειδικευμένες Αναφορές",pageDescription:"Εξειδικευμένες Αναφορές"},views:{containerFull:{templateUrl:"/Management/ReportsBabis",controller:ReportsBabisController}}}).state("secondmentgeneralmanagment",{url:"/secondmentgeneralmanagment",data:{pageTitle:"Διαχείριση Γενικής Αίτησης Απόσπασης",pageDescription:"Διαχείριση Γενικής Αίτησης Απόσπασης"},views:{containerFull:{templateUrl:"/Management/SecondmentGeneralManagment",controller:SecondmentGeneralManagmentController}}}).state("recruitmentServiceAssumed",{url:"/recruitmentServiceAssumed",data:{pageTitle:"Φάκελος",pageDescription:"Πρόσληψη"},views:{containerFull:{templateUrl:"/Person/RecruitmentServiceAssumed",controller:RecruitmentServiceAssumed}}});r.otherwise("/pagenotfound");t.interceptors.push("AuthInterceptorService");e.idle(3600);e.timeout(30);f.interval(5);t.defaults.headers.get||(t.defaults.headers.get={});t.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";t.defaults.headers.get["If-Modified-Since"]="0"};configFunction.$inject=["$stateProvider","$httpProvider","$locationProvider","$urlRouterProvider","cfpLoadingBarProvider","KeepaliveProvider","IdleProvider"];OPSYDMVCApp.config(configFunction);OPSYDMVCApp.run(["$rootScope","$state","AuthService","Idle","$window","$location",function(n,t,i,r){n.$state=t;i.fillAuthData();r.unwatch()}]);serviceBase="https://opsyd.sch.gr/";OPSYDMVCApp.constant("ngAuthSettings",{apiServiceBaseUri:serviceBase,clientId:"opsyd-prod"});OPSYDMVCApp.directive("ngSpinnerBar",["$rootScope",function(n){return{link:function(t,i){i.addClass("hide");n.$on("$stateChangeStart",function(){i.removeClass("hide");Layout.closeMainMenu()});n.$on("$stateChangeSuccess",function(){i.addClass("hide");$("body").removeClass("page-on-load");Layout.setMainMenuActiveLink("match");setTimeout(function(){OpsydCoreJS.scrollTop()})});n.$on("$stateNotFound",function(){i.addClass("hide")});n.$on("$stateChangeError",function(){i.addClass("hide")})}}}]);OPSYDMVCApp.directive("a",function(){return{restrict:"E",link:function(n,t,i){if(i.ngClick||i.href===""||i.href==="#")t.on("click",function(n){n.preventDefault()})}}});OPSYDMVCApp.directive("dropdownMenuHover",function(){return{link:function(n,t){t.dropdownHover()}}});OPSYDMVCApp.directive("bsSwitch",function(){return{restrict:"A",require:"ngModel",link:function(n,t,i,r){$(t).bootstrapSwitch({onSwitchChange:function(t,i){n.$apply(function(){r.$setViewValue(i)})}});var u=n.$watch(function(){return r.$modelValue},function(n){$(t).bootstrapSwitch("state",!!n,!0);u()})}}});OPSYDMVCApp.directive("icheck",["$timeout","$parse",function(n){return{require:"ngModel",link:function(t,i,r,u){return n(function(){var n=r.value;t.$watch(r.ngModel,function(){$(i).iCheck("update")});t.$watch(r.ngDisabled,function(n){$(i).iCheck(n?"disable":"enable");$(i).iCheck("update")});return $(i).iCheck({checkboxClass:"icheckbox_square-blue",radioClass:"iradio_square-blue"}).on("ifChanged",function(t){return $(i).attr("type")==="checkbox"&&r.ngModel?u.$setViewValue(t.target.checked):$(i).attr("type")==="radio"&&r.ngModel?u.$setViewValue(n):void 0})})}}}]);OPSYDMVCApp.directive("csDateToIso",function(){var n=function(n,t,i,r){r.$parsers.push(function(n){return moment(n).format("YYYY-MM-DD")})};return{restrict:"A",require:"ngModel",link:n}});OPSYDMVCApp.directive("dualbox",function(){return{restrict:"E",replace:!0,scope:{title:"@",leftboxtitle:"@",rightboxtitle:"@",colors:"=ngModel"},templateUrl:"../Content/themes/assets/dualbox/dualboxTemplate.html",link:function(n){$("#add").click(function(){var t=$("#select1 option:selected");return angular.forEach(t,function(t){n.colors.destinationColors.push(t.text)}),!t.remove().appendTo("#select2")});$("#remove").click(function(){var i=$("#select2 option:selected"),t;!i.remove().appendTo("#select1");t=$("#select2 option");n.colors.oldDestinationColors=n.colors.destinationColors;n.colors.destinationColors=[];angular.forEach(t,function(t){n.colors.destinationColors.push(t.text)});return});$("#selectAll").click(function(){$("select option").attr("selected","selected")})}}});OPSYDMVCApp.directive("duallist",function(){return{restrict:"E",replace:!0,scope:{data1:"=",data2:"="},templateUrl:"../Content/themes/assets/dualbox/dualboxTemplateD.html",link:function(n){n.move=function(t,i){i==n.data1?(n.data2.push(t),i.splice(i.indexOf(t),1)):(n.data1.push(t),i.splice(i.indexOf(t),1))}}}});OPSYDMVCApp.directive("myValidateEmailTelephone",["$parse",function(){return{restrict:"A",require:"ngModel",link:function(n,t,i,r){n.$watch(function(n){var t;return(n.person.Email===undefined||n.person.Email===null||n.person.Email==="")&&(n.person.TelephoneMobile===undefined||n.person.TelephoneMobile===null||n.person.TelephoneMobile===""?(t=!1,r.$setValidity("invalidEmailTelephone",!1)):(t=!0,r.$setValidity("invalidEmailTelephone",!0))),(n.person.TelephoneMobile===undefined||n.person.TelephoneMobile===null||n.person.TelephoneMobile==="")&&(n.person.Email===undefined||n.person.Email===null||n.person.Email===""?(t=!1,r.$setValidity("invalidEmailTelephone",!1)):(t=!0,r.$setValidity("invalidEmailTelephone",!0))),t},!0)}}}]);OPSYDMVCApp.directive("requiredAny",function(){function t(t){var i=n[t],r;return i?(r=Object.keys(i),r.every(function(n){return n==="isRequired"||!i[n]})):!1}var n={};return{restrict:"A",require:"?ngModel",scope:{},link:function(i,r,u,f){function s(){e.isRequired?f.$setValidity("required",!1):f.$setValidity("required",!0)}function h(n){return e[i.$id]=!f.$isEmpty(n),e.isRequired=t(o),s(),e.isRequired?undefined:n}var o,e;f&&u.requiredAny&&(o=u.requiredAny,n[o]===undefined&&(n[o]={isRequired:!0}),e=i.group=n[o],i.$on("$destroy",function(){delete e[i.$id];Object.keys(e).length<=1&&delete n[o]}),f.$formatters.push(h),f.$parsers.unshift(h),i.$watch("group.isRequired",s))}}});OPSYDMVCApp.directive("myDatepicker",["$templateCache",function(){return{restrict:"A",scope:{model:"=",format:"@",options:"=datepickerOptions",myid:"@",myopen:"@"},replace:!0,transclude:!0,template:'<div class="row"><div class="col-md-6"><p class="input-group"><input type="text" class="form-control" id="{{myid}}" uib-datepicker-popup="{{format}}" ng-model="model" is-open="{{myopen}}" datepicker-options="{{options}}" ng-required="true" close-text="Close" /><span class="input-group-btn"><button type="button" class="btn btn-default" ng-click="open($event)"><i class="glyphicon glyphicon-calendar"><\/i><\/button><\/span><\/p><\/div><\/div>',link:function(n){n.popupOpen=!1;n.openPopup=function(t){t.preventDefault();t.stopPropagation();n.popupOpen=!0};n.open=function(t){t.preventDefault();t.stopPropagation();n.opened=!0}}}}]);OPSYDMVCApp.directive("capitalize",["$parse",function(n){return{require:"ngModel",link:function(t,i,r,u){var f=function(n){if(n!=null){n=n.replace("ς","σ").replace("ά","α").replace("έ","ε").replace("ή","η").replace("ί","ι").replace("ό","ο").replace("ύ","υ").replace("ώ","ω").replace("ί","ι").replace("ΰ","ϋ").replace("ΐ","ϊ");var t=n.toUpperCase();return t!==n&&(u.$setViewValue(t),u.$render()),t}},e=n(r.ngModel);u.$parsers.push(f);f(e(t))}}}]);OPSYDMVCApp.directive("emailAvailable",["$timeout","$q","GeneralFactory",function(n,t,i){return{restrict:"AE",require:"ngModel",link:function(r,u,f,e){e.$asyncValidators.emailExists=function(){var f=t.defer(),o;return!e||!u.val()?(n(function(){r.duplicateMail=!1;e.$setValidity("emailExists",!0);f.resolve},300),f.promise):(o=u.val(),r.oldEmail==o)?(n(function(){r.duplicateMail=!1;e.$setValidity("emailExists",!0);f.resolve},300),f.promise):(i.getByParams({personId:r.person.Id,email:o},"/api/Person/IsEmailAvailable").then(function(n){r.duplicateMail=!n;e.$setValidity("emailExists",n)},function(){r.duplicateMail=!0;e.$setValidity("emailExists",!1)}),r.person.Email=o,f.promise)}}}}]);OPSYDMVCApp.directive("registrynoAvailable",function(n,t,i){return{restrict:"AE",require:"ngModel",link:function(r,u,f,e){e.$asyncValidators.registryExists=function(){var f=t.defer(),o;return!e||!u.val()?(n(function(){e.$setValidity("registryExists",!0);f.resolve},300),f.promise):(o=u.val(),r.oldRegistry==o)?(n(function(){e.$setValidity("registryExists",!0);f.resolve},300),f.promise):(i({url:"/api/Person/checkValidRegistryNo",params:{registryNo:o},method:"GET",headers:{"Content-Type":"application/json"}}).then(function(n){e.$setValidity("registryExists",n.data);f.resolve}).catch(function(){e.$setValidity("registryExists",!1);f.reject}),r.secondment.MateRegistryNo=o,f.promise)}}}});OPSYDMVCApp.filter("to_trusted",["$sce",function(n){return function(t){return n.trustAsHtml(t)}}])