1import{a as oe}from"./chunk-BU7G4P6F.js";import{a as ne}from"./chunk-FHSB4F5V.js";import{a as te}from"./chunk-U3TAG3S7.js";import{a as x}from"./chunk-TVY25U6A.js";import"./chunk-SIR7J7JL.js";import{a as Z}from"./chunk-KI6F5MQE.js";import"./chunk-AR2TRTZJ.js";import"./chunk-CF7BVC3C.js";import{b as ee}from"./chunk-BVNXPFX4.js";import"./chunk-US6U3H73.js";import{a as X,b as Y}from"./chunk-DFVCKKWA.js";import"./chunk-UXT3IV4Z.js";import"./chunk-52NRLQXL.js";import"./chunk-IWV7KKTD.js";import{f as H,k as K,x as Q}from"./chunk-HAT64SAG.js";import"./chunk-ASF44XKG.js";import"./chunk-3XIHURP3.js";import"./chunk-PXZAQOEJ.js";import"./chunk-A7AYLVCT.js";import"./chunk-YBPXXZRC.js";import"./chunk-CARY4E7O.js";import"./chunk-RGUVVAL5.js";import"./chunk-EZXBBV34.js";import"./chunk-JXQZDUR2.js";import{a as G}from"./chunk-MEGCUKHS.js";import"./chunk-AYY4ONQF.js";import"./chunk-QVGMGP5U.js";import{a as R,b as W,d as j,e as z,f as J,g as U,h as q}from"./chunk-NP3H5KHF.js";import"./chunk-SKAA6W5O.js";import{a as E,d as N,e as L}from"./chunk-7U52Y4KW.js";import"./chunk-4ADFFCYA.js";import"./chunk-U4WE42C6.js";import"./chunk-MTMG77WX.js";import"./chunk-WE2ISEL4.js";import"./chunk-W5FHM725.js";import{h as k}from"./chunk-RZMWYYX2.js";import"./chunk-Z2GVAQG6.js";import"./chunk-NP6OI7J6.js";import"./chunk-2C3WUUOE.js";import"./chunk-C5T26E4S.js";import"./chunk-BYCOWWCA.js";import"./chunk-QGWXUQ7J.js";import{q as B,r as i}from"./chunk-7ZZOGKSF.js";import"./chunk-D74IVOWM.js";import{p as O}from"./chunk-4KETEAXU.js";import{$b as p,Bc as S,Ja as a,Ka as r,Kc as $,Lc as T,Mb as F,Mc as b,Qb as g,Vc as l,Wc as s,Zc as f,ac as u,f as v,fc as h,ha as I,ia as A,lc as _,nc as d,sa as C,tb as w,v as M,ya as V,zc as y}from"./chunk-OPD4GJAN.js";var ie=()=>[50,200,200,150,125],le=()=>[!1,!0,!0,!0,!0,!0];function se(n,m){if(n&1){let e=h();p(0,"download-doc",8),l(1,"async"),l(2,"async"),_("actionDownloadDocuments",function(){a(e);let t=d();return r(t.downloadDocuments())})("actionDownloadAllDocuments",function(){a(e);let t=d();return r(t.downloadAllDocuments())}),u()}if(n&2){let e=d();g("data",s(1,4,e.data$))("documentSelected",e.documentSelected)("loading",s(2,6,e.loadingDownloadDoc$))("buttonDownloadIsActive",e.buttonDownloadIsActive)}}function ae(n,m){if(n&1){let e=h();p(0,"mat-checkbox",9),_("ngModelChange",function(){let t=a(e).data,c=d();return r(c.checkboxAction(t))}),u()}if(n&2){let e=m.data,o=d();g("ngModel",o.idIsSelected(e))}}function re(n,m){if(n&1&&y(0),n&2){let e=m.data;S(" ",e," ")}}function me(n,m){if(n&1&&y(0),n&2){let e=m.data;S(" ",e," ")}}function ce(n,m){if(n&1){let e=h();p(0,"details-documents",10),_("view",function(){let t=a(e).data,c=d();return r(c.viewDoc([t]))}),u()}}var je=(()=>{class n{constructor(){this.displayedColumns=["id","nomDocument","dateDocument","id_button"],this.displayedColumnsName=["","Nom","Date du document","Actions"],this.documentSelected=[],this.dataIsLoaded=!1,this.store=C(B),this.filtersService=C(x)}ngOnInit(){this.filtersService.init(this.store.pipe(i(R)),this.store.pipe(i(W)),ne),this.filters$=this.filtersService.getFilters$(),this.formfilters=this.filtersService.getFormfilters(),this.metaData$=this.store.pipe(i(z)),this.data$=this.store.pipe(i(j)),this.loading$=this.store.pipe(i(U),v(M(e=>(this.documentSelected=[],e)))),this.loaded$=this.store.pipe(i(q)),this.loadingDownloadDoc$=this.store.pipe(i(G)),this.subscription$=this.store.pipe(i(J),A(this.store.pipe(i(k))),I(([e,o])=>{this.buttonDownloadIsActive=e<o})).subscribe()}ngOnDestroy(){this.subscription$.unsubscribe()}idIsSelected(e){return this.documentSelected.includes(e)}checkboxAction(e){this.documentSelected.includes(e)?this.documentSelected=this.documentSelected.filter(o=>o!==e):this.documentSelected.push(e)}changePagination(e){this.documentSelected=[],this.formfilters.patchValue({page:e.pageIndex,per_page:e.pageSize})}downloadDocuments(){this.downloadDoc(this.documentSelected),this.documentSelected=[]}downloadAllDocuments(){this.store.dispatch(L())}viewDoc(e){let o={type:"DocumentsDuClient",findDocsIn:"listeDocumentsId",idsDocs:e,filters:null};this.store.dispatch(E({payload:o}))}downloadDoc(e){let o={type:"DocumentsDuClient",findDocsIn:"listeDocumentsId",idsDocs:e,filters:null};this.store.dispatch(N({payload:o}))}selectAllDocuments(e){this.documentSelected=e}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=V({type:n,selectors:[["app-document-payment-slips"]],standalone:!0,features:[$([x]),T],decls:19,vars:27,consts:[["top",""],["column0",""],["column1",""],["column2",""],["column3",""],[1,"document-list"],[3,"actionFilters","filters","formfilters","filtersIsOpen","loaded"],[3,"pagination","actionSelectAllDocuments","downloadIsActive","documentSelected","data","loading","displayedColumns","displayedColumnsName","displayedColumnsMinWidth","displayedColumnsInMobile","metaData"],[3,"actionDownloadDocuments","actionDownloadAllDocuments","data","documentSelected","loading","buttonDownloadIsActive"],[3,"ngModelChange","ngModel"],[3,"view"]],template:function(o,t){if(o&1){let c=h();p(0,"section",5)(1,"filters",6),l(2,"async"),l(3,"async"),l(4,"async"),_("actionFilters",function(D){return a(c),r(t.filtersService.actionFilters(D))}),u(),p(5,"table-baudelet",7),l(6,"async"),l(7,"async"),l(8,"async"),_("pagination",function(D){return a(c),r(t.changePagination(D))})("actionSelectAllDocuments",function(D){return a(c),r(t.selectAllDocuments(D))}),F(9,se,3,8,"ng-template",null,0,f)(11,ae,1,1,"ng-template",null,1,f)(13,re,1,1,"ng-template",null,2,f)(15,me,1,1,"ng-template",null,3,f)(17,ce,1,0,"ng-template",null,4,f),u()()}o&2&&(w(),g("filters",s(2,13,t.filters$))("formfilters",t.formfilters)("filtersIsOpen",s(3,15,t.filtersService.filterIsOpen$()))("loaded",s(4,17,t.loaded$)),w(4),g("downloadIsActive",!0)("documentSelected",t.documentSelected)("data",s(6,19,t.data$))("loading",s(7,21,t.loading$))("displayedColumns",t.displayedColumns)("displayedColumnsName",t.displayedColumnsName)("displayedColumnsMinWidth",b(25,ie))("displayedColumnsInMobile",b(26,le))("metaData",
1s(8,23,t.metaData$)))},dependencies:[O,Z,te,Q,H,K,Y,X,ee,oe],styles:[".document-list[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.document-list[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-align:left}@media (max-width: 800px){.document-list[_ngcontent-%COMP%] download-doc[_ngcontent-%COMP%]{display:none}}"]})}}return n})();export{je as DocumentPaymentSlipsComponent};
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.