HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/vebon.komma.pro/wwwroot/js/vebon.js
"use strict";var app=angular.module("auditApp",["ngFileUpload","ngDialog"]);app.service("DocumentGroups",function(){return{validateMemberSubmit:function(){var e={};return angular.forEach(this.documentGroups,function(t,o){if(0==t.files.length&&t.applicable&&t.required)return void(e[t.id]="no_files");if(0==t.files.length&&t.applicable)return void(e[t.id]="no_files_or_not_applicable");var u=!1;angular.forEach(t.files,function(e,t){1==e.status&&(u=!0)}),u&&(e[t.id]="rejected_files")}),e},validateAuditorReject:function(){var e={};return angular.forEach(this.documentGroups,function(t,o){var u=!1;angular.forEach(t.files,function(e,o){0==e.status&&1==t.applicable&&(u=!0)}),u&&(e[t.id]="unchecked_files")}),e},validateAuditorSubmit:function(){var e={};return angular.forEach(this.documentGroups,function(t,o){var u=!1;angular.forEach(t.files,function(e,o){2!=e.status&&1==t.applicable&&(u=!0)}),u&&(e[t.id]="not_all_files_approved")}),e},documentGroups:{}}}),app.controller("documentGroupController",["$scope","Upload","$timeout","$http","ngDialog","DocumentGroups",function(e,t,o,u,a,n){e.files=[],e.errorMsg={},e.path="/ajax/documentGroup/{documentGroupId}",e.filePath="/ajax/documentGroup/{documentGroupId}/files",e.initialize=function(t,o){e.documentGroupId=t.id,e.documentGroup=t,e.not_applicable=!t.applicable,angular.forEach(o,function(t,o){e.files.push(t)}),e.updateGlobalDocumentGroup(t,o)},e.updateGlobalDocumentGroup=function(t,o,u){if(t.files=e.files,n.documentGroups[t.id]=t,"member"==u){var a=n.validateMemberSubmit();e.faults=a}},e.uploadFiles=function(t,o,u){"undefined"==typeof e.files&&(e.files=[]),e.errFiles=o,angular.forEach(t,function(t){var o=e.getFileKey(e.files,t);if(null!==o){var u=a;if(2==e.files[o].status)return void u.open({template:"/ajax/template/overWriteBlockedPopup",data:{file:t},scope:e});u.open({template:"/ajax/template/overWritePopup",data:{file:t,filesKey:o},scope:e})}else{var n=e.files.length;e.uploadFile(t,n)}})},e.uploadFile=function(u,a){e.files[a]||e.files.push({}),e.files[a].file_name=u.name,e.files[a].status=-1;var n=e.setDocumentGroup(e.filePath,e.documentGroupId);u.upload=t.upload({url:n,data:{file:u,uploadSizes:e.uploadSizes}}),u.upload.then(function(t){o(function(){var o=t.data;angular.forEach(o,function(t,o){e.files[a]=t}),e.updateGlobalDocumentGroup(e.documentGroup,e.files,"member")})},function(t){t.status>0&&(e.errorMsg=t.status+": "+t.data)})},e.deleteFilePopup=function(t){e.currentIndex=t,a.open({template:"/ajax/template/deleteFilePopup",scope:e})},e.deleteFile=function(t){var o=e.setDocumentGroup(e.filePath+"/"+t,e.documentGroupId);u["delete"](o).then(function(t){var o=t.data;e.files=o,e.updateGlobalDocumentGroup(e.documentGroup,o,"member")},function(e){})},e.canIDelete=function(e){return 2!=e.status&&e.status!=-1},e.setDocumentGroup=function(e,t){return e.replace("{documentGroupId}",t)},e.updateApplicable=function(t){u({method:"POST",url:e.setDocumentGroup(e.path,e.documentGroupId),data:{applicable:+!t}}).then(function(t){e.documentGroup.applicable=t.data.applicable,e.updateGlobalDocumentGroup(e.documentGroup,e.files,"member")},function(e){})},e.updateStatus=function(t,o){var a=e.setDocumentGroup(e.filePath+"/"+t.id,e.documentGroupId);u.put(a,{status:o}).then(function(u){t.status=o,e.updateGlobalDocumentGroup(e.documentGroup,e.files,"reject")},function(e){})},e.updateMultipleStatuses=function(t){var o=e.setDocumentGroup(e.filePath,e.documentGroupId);u.put(o,{status:t}).then(function(t){var o=t.data;e.files=o,e.updateGlobalDocumentGroup(e.documentGroup,e.files,"reject")},function(e){})},e.setStatus=function(e){var t=e+"";return t},e.getFileKey=function(e,t){for(var o=null,u=0;u<e.length;u++)if(t.name==e[u].file_name){o=u;break}return o},e.makeDate=function(e){var t=new Date(e);return t}}]),app.controller("auditTableController",["$scope","ngDialog",function(e,t){e.hide=!1,e.toggleHide=function(t){e.hide=!e.hide},e.claimPopup=function(o){o.preventDefault(),t.open({template:"/ajax/template/claimPopup",data:{event:o},scope:e}),e.clickLink=function(e){window.location=e.target.href}}}]),app.controller("auditController",["$scope","Upload","$timeout","$http","ngDialog","DocumentGroups",function(e,t,o,u,a,n){e.popup=function(t,o){if(o.preventDefault(),"file"==t){var u=n.validateMemberSubmit();jQuery.isEmptyObject(u)||(t="filedError",e.faults=u)}else if("reject"==t){var u=n.validateAuditorReject();jQuery.isEmptyObject(u)||(t="rejectError",e.faults=u)}else if("approve"==t){var u=n.validateAuditorSubmit();jQuery.isEmptyObject(u)||(t="approveError",e.faults=u)}a.open({template:"/ajax/template/"+t+"Popup",data:{type:t},scope:e})},e.goToFirstError=function(){var e=$(".document-group.group-error").offset().top,t=$(".topBar").height();e-=t+30,$("html,body").animate({scrollTop:e},"slow")},e.submitForm=function(e){$("#"+e).unbind("click").click()}}]),app.controller("dateController",["$scope",function(e){e.makeDate=function(e){var t=new Date(e);return t}}]),app.controller("popupController",["$scope","Upload","$timeout","$http","ngDialog","DocumentGroups",function(e,t,o,u,a,n){e.closedPopup=function(){a.open({template:"/ajax/template/closedPopup",scope:e})},e.rejectedPopup=function(){a.open({template:"/ajax/template/rejectedPopup",scope:e})}}]),app.directive("closeDialog",function(e,t){return{link:function(o,u,a){a.closeDialog&&t(function(){e.close()},1e3*a.closeDialog),u.bind("click",function(t){e.close()})}}}),$(document).ready(function(){$(".popup").on("click",function(){alert("test")})});