PageSourceSearch

https://www.acscourier.net/lib/spa/chunk-3S7FVYTZ.js

js acscourier.net collected 2026-10-01 10:20:53 UTC 16,024 bytes, 1 lines download raw bytes

1import{a as Oe}from"./chunk-V4GZIQD6.js";import{$ as Ee,A as Z,M as ye,N as Me,W as Ie,X as ke,c as _e,g as Se,h as De,i as be,j as xe,k as we}from"./chunk-WTGXIEJ3.js";import{$a as h,A as U,Cb as c,Db as p,F as u,G as f,He as J,Ia as v,Ja as S,Ka as j,La as O,Ma as z,Na as m,Oa as a,Pa as r,Qa as b,Qb as me,Qe as X,R as A,Ve as Y,Xa as P,_a as g,_c as M,ac as de,cf as Ce,db as se,dc as ue,eb as le,f as je,fb as ce,gb as T,hc as fe,if as ve,kb as l,la as o,lb as d,lc as ge,le as ne,ma as re,mb as _,oe as H,qb as I,qc as he,rb as k,sb as E,sc as V,ta as w,tb as ie,te as B,ue as Q,ve as G,wa as y,xa as W,xe as F,yb as pe,ye as K,zb as N}from"./chunk-VVEX5CJC.js";function Qe(i,D){i&1&&b(0,"mat-progress-bar",20)}var $=class{},Te=(()=>{class i{constructor(e){this.adapter=e,this.filtersChanged=new re,this.filters=new $}ngOnInit(){this.adapter.setLocale(localStorage.getItem("previousLocale"))}onSubmit(){this.filtersChanged.emit(this.filters)}onClearAll(){this.filters=new $,this.filtersChanged.emit(void 0)}static{this.\u0275fac=function(n){return new(n||i)(w(ve))}}static{this.\u0275cmp=y({type:i,selectors:[["app-documents-search-filters"]],inputs:{isLoading:"isLoading"},outputs:{filtersChanged:"filtersChanged"},standalone:!1,decls:38,vars:30,consts:[["form","ngForm"],["pickupPicker",""],[1,"card-body","p-0","pb-1"],[3,"ngSubmit"],[1,"d-block","d-lg-flex","flex-lg-rows","align-items-lg-start","justify-content-lg-between"],[1,"flex-fill"],[1,"flex"],[1,"col-12","px-0"],[1,"d-flex","align-items-center","justify-content-between","mb-2"],[1,"ml-3"],["type","button",1,"btn-clear",3,"click"],[1,"text-secondary","required"],[1,"d-flex","align-items-start"],["appearance","fill",1,"w-100"],[3,"click","rangePicker"],["matStartDate","","name","startDate",3,"ngModelChange","placeholder","required","ngModel"],["matEndDate","","name","endDate",3,"ngModelChange","placeholder","required","ngModel"],["type","submit",1,"btn","btn-primary","border-0","with-icon","px-3",3,"disabled"],[1,"icon-search","mr-sm-2","mr-0",2,"line-height","1.5"],[1,"d-sm-inline-block","d-none"],["mode","indeterminate"]],template:function(n,t){if(n&1){let s=P();a(0,"div",2)(1,"form",3,0),g("ngSubmit",function(){return u(s),f(t.onSubmit())}),a(3,"div",4)(4,"div",5)(5,"div",6)(6,"div",7)(7,"div",8)(8,"mat-label",5),l(9),c(10,"translate"),r(),a(11,"small",9)(12,"button",10),g("click",function(){return u(s),f(t.onClearAll())}),a(13,"small"),l(14),c(15,"translate"),r()()()()()(),a(16,"div",6)(17,"label",11),l(18),c(19,"translate"),r()(),a(20,"div",12)(21,"mat-form-field",13)(22,"mat-label"),l(23),c(24,"translate"),r(),a(25,"mat-date-range-input",14),g("click",function(){u(s);let x=T(31);return f(x.open())}),a(26,"input",15),c(27,"translate"),E("ngModelChange",function(x){return u(s),k(t.filters.startDate,x)||(t.filters.startDate=x),f(x)}),r(),a(28,"input",16),c(29,"translate"),E("ngModelChange",function(x){return u(s),k(t.filters.endDate,x)||(t.filters.endDate=x),f(x)}),r()(),b(30,"mat-date-range-picker",null,1),r(),a(32,"button",17),b(33,"i",18),a(34,"span",19),l(35),c(36,"translate"),r()()()()()()(),v(37,Qe,1,0,"mat-progress-bar",20)}if(n&2){let s=T(2),C=T(31);o(9),_(" ",p(10,16,"accountDocumentSearch.availableFilters")," "),o(5),d(p(15,18,"accountDocumentSearch.clearAll")),o(4),d(p(19,20,"accountDocumentSearch.pickupDatePicker")),o(5),d(p(24,22,"accountDocumentSearch.pickupDatePicker")),o(2),m("rangePicker",C),o(),m("placeholder",ie(p(27,24,"accountDocumentSearch.from")))("required",!0),I("ngModel",t.filters.startDate),o(2),m("placeholder",ie(p(29,26,"accountDocumentSearch.to")))("required",!0),I("ngModel",t.filters.endDate),o(4),m("disabled",!s.valid),o(3),_(" ",p(36,28,"accountDocumentSearch.search")," "),o(2),S(t.isLoading?37:-1)}},dependencies:[Y,X,Se,De,be,xe,Z,K,H,B,Q,J,F,G,M],encapsulation:2})}}return i})();var Be=je(Oe());var Ke=()=>[10,25,50,100];function Je(i,D){if(i&1){let e=P();a(0,"tr")(1,"td"),l(2),r(),a(3,"td"),l(4),a(5,"small",8),l(6),r()(),a(7,"td")(8,"mat-checkbox",9),E("ngModelChange",function(t){let s=u(e).$implicit;return k(s.documentDownloaded,t)||(s.documentDownloaded=t),f(t)}),r()(),a(9,"td"),l(10),c(11,"acsDate"),r(),a(12,"td")(13,"a",10),g("click",function(){let t=u(e).$implicit,s=h(2);return f(s.onDownload(t.documentId,t.documentDescription,t.documentExtension))}),a(14,"span"),l(15),c(16,"translate"),r()()()()}if(i&2){let e=D.$implicit;o(2),_(" ",e.documentId," "),o(2),_(" ",e.documentDescription),o(2),_(".",e.documentExtension),o(2),I("ngModel",e.documentDownloaded),o(2),_(" ",p(11,6,e.documentDate)," "),o(5),d(p(16,8,"accountDocumentSearch.download"))}}function Xe(i,D){if(i&1){let e=P();a(0,"div")(1,"h6",1),l(2),c(3,"translate"),r(),a(4,"div",2)(5,"table")(6,"thead")(7,"tr")(8,"th",3),g("click",function(){u(e);let t=h();return f(t.setPaginatedResults())}),l(9),c(10,"translate"),r(),a(11,"th",4),g("click",function(){u(e);let t=h();return f(t.setPaginatedResults())}),l(12),c(13,"translate"),r(),a(14,"th",5),g("click",function(){u(e);let t=h();return f(t.setPaginatedResults())}),l(15),c(16,"translate"),r(),a(17,"th",6),g("click",function(){u(e);let t=h();return f(t.setPaginatedResults())}),l(18),c(19,"translate"),r(),a(20,"th"),l(21),c(22,"translate"),r()()(),a(23,"tbody"),O(24,Je,17,10,"tr",null,j),r()()(),a(26,"app-paginator",7,0),g("pageChanged",function(t){u(e);let s=h();return f(s.onPaginatorChanged(t,!1))})("rowsPerPageChangedEvent",function(t){u(e);let s=h();return f(s.onPaginatorChanged(t,!0))}),r()()}if(i&2){let e=h();o(2),d(p(3,14,"common.searchResults")),o(6),m("appSort",e.response.items),o(),d(p(10,16,"accountDocumentSearch.documentId")),o(2),m("appSort",e.response.items),o(),d(p(13,18,"accountDocumentSearch.documentDescription")),o(2),m("appSort",e.response.items),o(),d(p(16,20,"accountDocumentSearch.documentDownloaded")),o(2),m("appSort",e.response.items),o(),d(p(19,22,"accountDocumentSearch.documentDate")),o(3),d(p(22,24,"accountDocumentSearch.actions")),o(3),z(e.filteredResults),o(2),m("totalCount",e.response.items.length)("rowsPerPage",e.pageSize)("rowsPerPageOptions",pe(26,Ke))("currentPage",e.pageIndex)}}var Fe=(()=>{class i{get response(){return this._response}set response(e){this._response=e,this.setPaginatedResults()}constructor(e){this.client=e,this.pageIndex=1,this.pageSize=10}ngOnInit(){}
1onShowDetails(e){this.selectedResult=e}onHideDetails(e){this.selectedResult=void 0}onPaginatorChanged(e,n){n?this.pageSize=e:this.pageIndex=e,this.setPaginatedResults()}setPaginatedResults(){let e=Number(Number(this.pageIndex-1)*Number(this.pageSize));this.filteredResults=this.response.items.slice(e,Number(e)+Number(this.pageSize))}convertBase64ToBlobData(e,n="application/pdf",t=512){let s=atob(e),C=[];for(let L=0;L<s.length;L+=t){let te=s.slice(L,L+t),ae=new Array(te.length);for(let q=0;q<te.length;q++)ae[q]=te.charCodeAt(q);let We=new Uint8Array(ae);C.push(We)}return new Blob(C,{type:n})}onDownload(e,n,t){this.client.getDocument(e,t).subscribe(s=>{let C=s.data;(0,Be.saveAs)(C,n+"."+t)})}static{this.\u0275fac=function(n){return new(n||i)(w(V))}}static{this.\u0275cmp=y({type:i,selectors:[["app-documents-search-results"]],inputs:{response:"response"},standalone:!1,decls:1,vars:1,consts:[["paginator",""],[1,"p-4","bg-white","mb-0"],[1,"table-wrapper"],["data-order","desc","data-name","documentId",1,"sort",3,"click","appSort"],["data-order","desc","data-name","documentDescription",1,"sort",3,"click","appSort"],["data-order","desc","data-name","documentDownloaded",1,"sort",3,"click","appSort"],["data-order","desc","data-name","documentDate",1,"sort",3,"click","appSort"],[3,"pageChanged","rowsPerPageChangedEvent","totalCount","rowsPerPage","rowsPerPageOptions","currentPage"],[1,"text-secondary"],["disabled","",3,"ngModelChange","ngModel"],[2,"cursor","pointer",3,"click"]],template:function(n,t){n&1&&v(0,Xe,28,27,"div"),n&2&&S(t.selectedResult?-1:0)},dependencies:[_e,B,F,ke,ye,Ie,M],encapsulation:2})}}return i})();function Ze(i,D){if(i&1&&b(0,"app-validation-summary",0),i&2){let e=h();m("problemDetails",e.problemDetails)}}function $e(i,D){if(i&1&&b(0,"app-documents-search-results",2),i&2){let e=h();m("response",e.response)}}function et(i,D){i&1&&(a(0,"div",3),l(1),c(2,"translate"),r()),i&2&&(o(),_(" ",p(2,1,"common.noResults")," "))}var Re=(()=>{class i{constructor(e){this.client=e}ngOnInit(){}onFiltersChanged(e){if(!e){this.response=void 0;return}this.problemDetails=void 0,this.isLoading=!0,this.client.documentsSearch(e.startDate,e.endDate).pipe(A(()=>{this.isLoading=!1})).subscribe(n=>{this.response=n},n=>{this.response=void 0,this.problemDetails=n,this.problemDetails.detail=this.problemDetails?.detail?.replace("ACS:BACK_END:","")})}static{this.\u0275fac=function(n){return new(n||i)(w(V))}}static{this.\u0275cmp=y({type:i,selectors:[["app-documents-search"]],standalone:!1,decls:4,vars:4,consts:[[3,"problemDetails"],[3,"filtersChanged","isLoading"],[3,"response"],["role","alert",1,"alert","alert-light","mt-4"]],template:function(n,t){n&1&&(v(0,Ze,1,1,"app-validation-summary",0),a(1,"app-documents-search-filters",1),g("filtersChanged",function(C){return t.onFiltersChanged(C)}),r(),v(2,$e,1,1,"app-documents-search-results",2),v(3,et,3,3,"div",3)),n&2&&(S(t.problemDetails?0:-1),o(),m("isLoading",t.isLoading),o(),S(!t.isLoading&&t.response&&(t.response.items==null?null:t.response.items.length)>0?2:-1),o(),S(!t.isLoading&&t.response&&(t.response.items==null?null:t.response.items.length)==0?3:-1))},dependencies:[Me,Te,Fe,M],encapsulation:2})}}return i})();var nt=["fileInput"];function ot(i,D){i&1&&b(0,"mat-progress-bar",2)}function at(i,D){i&1&&(a(0,"div",3),l(1),c(2,"translate"),r()),i&2&&(o(),_(" ",p(2,1,"accountCustomerDocuments.updateSuccess")," "))}function rt(i,D){i&1&&(a(0,"div",4),l(1),c(2,"translate"),r()),i&2&&(o(),_(" ",p(2,1,"accountCustomerDocuments.errorMessage")," "))}function st(i,D){if(i&1&&(a(0,"mat-option",17),l(1),r()),i&2){let e=D.$implicit;m("value",e.id),o(),_(" ",e.department," ")}}function lt(i,D){if(i&1){let e=P();a(0,"div",5)(1,"form",6,0),g("ngSubmit",function(){u(e);let t=h();return f(t.onSubmit())}),a(3,"div",7)(4,"div",8)(5,"div",9)(6,"div",10)(7,"label",11),l(8),c(9,"translate"),r()()(),a(10,"div",9)(11,"div",12)(12,"label",13),l(13),c(14,"translate"),r(),a(15,"div",14)(16,"mat-form-field",15)(17,"mat-label"),l(18),c(19,"translate"),r(),a(20,"mat-select",16),E("ngModelChange",function(t){u(e);let s=h();return k(s.request.department,t)||(s.request.department=t),f(t)}),O(21,st,2,2,"mat-option",17,j),r()()()()(),a(23,"div",9)(24,"div",12)(25,"label",13),l(26),c(27,"translate"),r(),a(28,"div",14)(29,"input",18),E("ngModelChange",function(t){u(e);let s=h();return k(s.request.comments,t)||(s.request.comments=t),f(t)}),r()()()(),a(30,"div",9)(31,"div",12)(32,"label",13),l(33),c(34,"translate"),r()()(),a(35,"div",9)(36,"div",12)(37,"input",19,1),g("change",function(){u(e);let t=h();return f(t.addFile())}),r()()(),a(39,"div",9)(40,"div",12)(41,"button",20)(42,"span",21),l(43),c(44,"translate"),r()()()()()()()()}if(i&2){let e=T(2),n=h();o(8),d(p(9,13,"accountCustomerDocuments.info")),o(5),d(p(14,15,"accountCustomerDocuments.department")),o(5),d(p(19,17,"accountCustomerDocuments.department")),o(2),m("required",!0),I("ngModel",n.request.department),o(),z(n.departments),o(5),d(p(27,19,"accountCustomerDocuments.notes")),o(3),m("required",!0),I("ngModel",n.request.comments),o(4),d(p(34,21,"accountCustomerDocuments.file")),o(4),m("accept",n.accept)("required",!0),o(4),m("disabled",!e.valid),o(2),_(" ",p(44,23,"accountCustomerDocuments.submit")," ")}}var oe=class{},Ae=(()=>{class i{constructor(e,n,t){this.client=e,this.http=n,this.scroll=t,this.accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel,.pdf",this.input=new FormData}ngOnInit(){this.request=new oe,this.isLoading=!0,this.client.getUploadDocumentDepartments().pipe(A(()=>{this.isLoading=!1})).subscribe(e=>{this.departments=e.items})}addFile(){let e=this.fileInput.nativeElement;if(e.files&&e.files[0]){let n=e.files[0];this.upload(n)}}upload(e){this.input.append("file",e)}
1onSubmit(){if(this.scroll.scrollToPosition([0,0]),!this.request)return;let e=he.apiBaseUrl+"/api/documents/upload-document";this.uploadSuccess=void 0;let n={headers:new fe({})};this.isLoading=!0,this.input.append("date",new Date().toISOString()),this.input.append("department",this.request.department.toString()),this.input.append("comments",this.request.comments),this.http.post(e,this.input,n).pipe(A(()=>{this.isLoading=!1})).subscribe(()=>{this.uploadSuccess=!0},()=>{this.uploadSuccess=!1})}static{this.\u0275fac=function(n){return new(n||i)(w(V),w(ge),w(ue))}}static{this.\u0275cmp=y({type:i,selectors:[["app-documents-upload"]],viewQuery:function(n,t){if(n&1&&se(nt,5),n&2){let s;le(s=ce())&&(t.fileInput=s.first)}},standalone:!1,decls:4,vars:4,consts:[["form","ngForm"],["fileInput",""],["mode","indeterminate"],["role","alert",1,"alert-block","alert_success","alert"],["role","alert",1,"alert-block","alert_danger","alert"],[1,"card-body","p-0","pb-1"],[3,"ngSubmit"],[1,"d-block","d-lg-flex","flex-lg-rows","align-items-lg-start","justify-content-lg-between","mb-4"],[1,"flex-fill"],[1,"row","mt-3"],[1,"col-12"],[1,"mb-3","font-weight-bold"],[1,"col-12","col-md-6","mb-3"],[1,"text-secondary","required"],[1,"d-flex","justify-content-between","align-items-center"],["appearance","fill",1,"w-100"],["name","department","type","text",3,"ngModelChange","required","ngModel"],[3,"value"],["name","notes","type","text","aria-describedby","notes",1,"form-control","mr-1",3,"ngModelChange","required","ngModel"],["type","file",3,"change","accept","required"],["type","submit",1,"btn","btn-primary","with-icon","px-3",3,"disabled"],[1,"d-sm-inline-block","d-none"]],template:function(n,t){n&1&&(v(0,ot,1,0,"mat-progress-bar",2),v(1,at,3,3,"div",3),v(2,rt,3,3,"div",4),v(3,lt,45,25,"div",5)),n&2&&(S(t.isLoading?0:-1),o(),S(t.uploadSuccess===!0?1:-1),o(),S(t.uploadSuccess===!1?2:-1),o(),S(t.isLoading?-1:3))},dependencies:[Y,X,Ce,we,Z,K,H,B,Q,J,F,G,M],encapsulation:2})}}return i})();var Ne=i=>({active:i}),Le=i=>({"show active":i}),qe=(()=>{class i{constructor(){this.active=1}ngOnInit(){}onClick(e){this.active=e}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=y({type:i,selectors:[["app-account-documents"]],standalone:!1,decls:14,vars:18,consts:[["id","myTab","role","tablist",1,"nav","nav-tabs"],[1,"nav-item",3,"click"],["id","first-tab-link","data-toggle","tab","data-target","#first-tab","role","tab",1,"nav-link",2,"cursor","pointer",3,"ngClass"],["id","second-tab-link","data-toggle","tab","data-target","#second-tab","role","tab",1,"nav-link",2,"cursor","pointer",3,"ngClass"],["id","myTabContent",1,"tab-content","pt-3"],["id","first-tab","role","tabpanel","aria-labelledby","first-tab",1,"tab-pane","fade",3,"ngClass"],["id","second-tab","role","tabpanel","aria-labelledby","second-tab",1,"tab-pane","fade",3,"ngClass"]],template:function(n,t){n&1&&(a(0,"ul",0)(1,"li",1),g("click",function(){return t.onClick(1)}),a(2,"a",2),l(3),c(4,"translate"),r()(),a(5,"li",1),g("click",function(){return t.onClick(2)}),a(6,"a",3),l(7),c(8,"translate"),r()()(),a(9,"div",4)(10,"div",5),b(11,"app-documents-search"),r(),a(12,"div",6),b(13,"app-documents-upload"),r()()),n&2&&(o(2),m("ngClass",N(10,Ne,t.active===1)),o(),d(p(4,6,"accountCustomerDocuments.inbox")),o(3),m("ngClass",N(12,Ne,t.active===2)),o(),d(p(8,8,"accountCustomerDocuments.outbox")),o(3),m("ngClass",N(14,Le,t.active===1)),o(2),m("ngClass",N(16,Le,t.active===2)))},dependencies:[me,Re,Ae,M],encapsulation:2})}}return i})();var pt=[{path:"",component:qe}],Ue=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=W({type:i})}static{this.\u0275inj=U({imports:[ne.forChild(pt),ne]})}}return i})();var Qt=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=W({type:i})}static{this.\u0275inj=U({imports:[de,Ee,Ue]})}}return i})();export{Qt as AccountDocumentsModule};

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