1import{h as ze}from"./chunk-LGWCY2T2.js";import{Aa as B,Ab as G,Cc as ee,Cl as Le,Dl as xe,Ea as M,Eb as W,Fa as F,Fb as Z,G as j,Ha as z,He as fe,I as u,Ia as d,Jc as te,K as N,Ka as v,L as C,Le as ue,Md as ne,Me as he,N as f,Na as V,Nd as le,O as L,Oa as T,Od as se,P as x,Pa as b,Qb as J,Wb as K,Wi as ge,Xa as s,Xj as ke,Ya as h,Za as Q,bj as H,bm as Be,ca as l,cj as De,ei as Ce,ej as He,fj as we,gb as Y,gi as _e,gj as Ae,ha as p,hi as ye,hj as Me,hk as Oe,ia as _,ib as $,ij as Fe,ik as Ue,j as I,ja as y,jd as ie,je as D,ji as Se,jj as Te,kb as q,kd as oe,ke as pe,kf as E,kj as be,kk as je,ld as re,lj as Re,md as ae,mj as Ee,n as k,na as S,nc as X,nj as Pe,ok as Ne,p as O,rd as g,rh as P,ri as ve,tc as R,te as me,vj as Ie,x as U,xa as m,xe as ce,ya as r,ye as de,za as a}from"./chunk-YMFY75IU.js";var A=(()=>{class e{constructor(){this.http=f(J),this.fileService=f(he),this.creditHolidaysApi=f(te),this.notificationService=f(le),this.authFlow=f(de),this.errorProviderService=f(D)}authorize(t,o){return this.authFlow.run(this.uploadAuthOperation(t,o),[],{title:"Autoryzacja wniosku",summary:`Potwierdzenie wys\u0142ania pliku ${o}`}).pipe(u(()=>this.notificationService.success("Plik zosta\u0142 zapisany")),U(i=>i instanceof ce?I:k(()=>i)),this.errorProviderService.processError(g.AUTHORIZATION_ERROR))}getRequestList(){return this.http.get(P)}openFile(t){this.http.post(P,t.id,{responseType:ee}).pipe(this.fileService.open(ue.PDF)).subscribe()}uploadAuthOperation(t,o){return{prepare:()=>this.creditHolidaysApi.uploadPrepare(t,o).pipe(O(i=>i.authMethodInfo)),perform:i=>this.creditHolidaysApi.uploadPerform(i),cancel:()=>this.creditHolidaysApi.uploadCancel()}}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275prov=N({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Qe=(()=>{class e{constructor(t,o,i){this.dialogRef=t,this.data=o,this.creditHolidayService=i,this.ButtonLabels=Ce,this.title=this.data.title,this.isSaveButtonOff=!0,this.isFileUploaded=!1,this.acceptedFilesFormats=[Le.PDF_FORMAT],this.originalName=""}getDataFileFromCore(t){t.readyForSave&&(this.originalName=t.originalName||"eCorpoNetFile",this.fileToUpload=t.content,this.isSaveButtonOff=!1)}close(){this.dialogRef.close({data:!1})}save(){this.fileToUpload&&this.creditHolidayService.authorize(this.fileToUpload,this.originalName).pipe(u(()=>this.close())).subscribe()}static{this.\u0275fac=function(o){return new(o||e)(p(oe),p(re),p(A))}}static{this.\u0275cmp=_({type:e,selectors:[["app-credit-holiday-uploader"]],inputs:{dialogTitle:"dialogTitle"},standalone:!1,decls:6,vars:6,consts:[[3,"loadedData","acceptedFilesFormats","isFileUploaded"],[3,"cancelAction","confirmAction","confirmDisabled","withResetButton","buttonLabelConfirm"]],template:function(o,i){o&1&&(r(0,"app-dialog-container")(1,"app-dialog-header"),s(2),a(),r(3,"app-dialog-content")(4,"app-uploader-core",0),d("loadedData",function(qe){return i.getDataFileFromCore(qe)}),a()(),r(5,"app-action-buttons-panel",1),d("cancelAction",function(){return i.close()})("confirmAction",function(){return i.save()}),a()()),o&2&&(l(2),h(i.title),l(2),m("acceptedFilesFormats",i.acceptedFilesFormats)("isFileUploaded",i.isFileUploaded),l(),m("confirmDisabled",i.isSaveButtonOff)("withResetButton",!1)("buttonLabelConfirm",i.ButtonLabels.SAVE))},dependencies:[_e,ye,Se,xe,ve],styles:[".proposalUploader[_ngcontent-%COMP%]{width:400px}"]})}}return e})();var Je=e=>({"basic-table-row-highlight":e});function Ke(e,c){e&1&&(r(0,"mat-header-cell",10),s(1,"Nazwa"),a())}function Xe(e,c){if(e&1&&(r(0,"mat-cell")(1,"span"),s(2),a()()),e&2){let t=c.$implicit;l(2),h(t.fullPath)}}function et(e,c){e&1&&(r(0,"mat-header-cell",10),s(1,"Data z\u0142o\u017Cenia"),a())}function tt(e,c){if(e&1&&(r(0,"mat-cell")(1,"span"),s(2),$(3,"date"),a()()),e&2){let t=c.$implicit,o=v();l(2),Q("",q(3,1,t.loadDate,o.dateFormat)," ")}}function it(e,c){e&1&&B(0,"mat-header-row")}function ot(e,c){if(e&1){let t=z();r(0,"mat-row",11),d("click",function(){let i=L(t).$implicit,n=v();return x(n.rowClickHandler(i))}),a()}if(e&2){let t=c.$implicit,o=v();m("ngClass",Y(1,Je,o.selection.selected.includes(t)))}}var Ye=(()=>{class e{constructor(t,o,i,n){this.creditHolidayService=t,this.dialog=o,this.spinnerService=i,this.errorProviderService=n,this.selection=new me(!0,[]),this.buttonTitle="Z\u0142\xF3\u017C wniosek",this.dataSource=new ke,this.dateFormat=fe,this.displayedColumns=["fullPath","loadDate"],this.matSortDirection="asc",this.matSortActive="fullPath"}ngOnInit(){this.refresh().subscribe()}ngAfterViewInit(){this.dataSource.sort=this.sort}openFile(){this.creditHolidayService.openFile(this.selection.selected[0])}openUploaderDialog(){let t=new ie;
1t.panelClass=pe.SMALL,t.data={title:this.buttonTitle},this.dialog.open(Qe,t).afterClosed().pipe(j(()=>this.refresh())).subscribe()}refreshClickHandler(){this.refresh().subscribe()}rowClickHandler(t){this.selection.clear(),this.selection.select(t)}refresh(){return this.spinnerService.showSpinner(),this.creditHolidayService.getRequestList().pipe(u(t=>{this.spinnerService.hideSpinner(),this.dataSource.data=t},this.errorProviderService.processError(g.FETCHING_DATA_ERROR)))}static{this.\u0275fac=function(o){return new(o||e)(p(A),p(ae),p(se),p(D))}}static{this.\u0275cmp=_({type:e,selectors:[["app-credit-holiday"]],viewQuery:function(o,i){if(o&1&&V(ge,5)(H,7),o&2){let n;T(n=b())&&(i.paginator=n.first),T(n=b())&&(i.sort=n.first)}},standalone:!1,decls:20,vars:8,consts:[[1,"gap-02rem"],[3,"clickAction"],[3,"clickAction","disabled"],["matSort","","matSortDisableClear","",3,"dataSource","matSortActive","matSortDirection"],["matColumnDef","fullPath"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","loadDate"],[4,"matHeaderRowDef","matHeaderRowDefSticky"],["ngDefaultControl","",3,"ngClass","click",4,"matRowDef","matRowDefColumns"],["mat-sort-header",""],["ngDefaultControl","",3,"click","ngClass"]],template:function(o,i){o&1&&(r(0,"app-page-container")(1,"app-page-header"),s(2,"Wakacje kredytowe"),a(),r(3,"app-page-content")(4,"app-page-btn-panel",0)(5,"app-button",1),d("clickAction",function(){return i.refreshClickHandler()}),s(6,"Odswie\u017C"),a(),r(7,"app-button",2),d("clickAction",function(){return i.openFile()}),s(8,"Otw\xF3rz wniosek "),a(),r(9,"app-button",1),d("clickAction",function(){return i.openUploaderDialog()}),s(10),a()(),r(11,"mat-table",3),M(12,4),S(13,Ke,2,0,"mat-header-cell",5)(14,Xe,3,1,"mat-cell",6),F(),M(15,7),S(16,et,2,0,"mat-header-cell",5)(17,tt,4,4,"mat-cell",6),F(),S(18,it,1,0,"mat-header-row",8)(19,ot,1,3,"mat-row",9),a()()()),o&2&&(l(7),m("disabled",i.selection.selected.length!==1),l(3),h(i.buttonTitle),l(),m("dataSource",i.dataSource)("matSortActive",i.matSortActive)("matSortDirection",i.matSortDirection),l(7),m("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",!0),l(),m("matRowDefColumns",i.displayedColumns))},dependencies:[H,De,He,Ae,be,Me,we,Re,Fe,Te,Ee,Pe,K,G,Oe,Ue,je,Ne,ne,W],styles:["[_nghost-%COMP%]{display:block;padding:1.5rem}",".gap-02rem[_ngcontent-%COMP%]{gap:.2rem}"]})}}return e})();var rt=[{path:"",component:ze,children:[{path:"",redirectTo:E},{path:E,component:Ye}]}],$e=(()=>{class e{static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275mod=y({type:e})}static{this.\u0275inj=C({imports:[R.forChild(rt),R]})}}return e})();var si=(()=>{class e{static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275mod=y({type:e})}static{this.\u0275inj=C({imports:[Ie,X,Z,$e,Be]})}}return e})();export{si as ProposalsModule};
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.