import{a as ie}from"./chunk-OCKHLW6K.js";import{c as te}from"./chunk-NXFRFRZF.js";import{a as ee}from"./chunk-TIU2IJHG.js";import{a as Y}from"./chunk-QYJGZ7EQ.js";import{b as oe}from"./chunk-72BVSGBU.js";import{a as Z}from"./chunk-FBUBZ6AE.js";import{t as Q}from"./chunk-TL6VKVO7.js";import{c as D,d as q}from"./chunk-AMCGKSO5.js";import"./chunk-JAY45DEO.js";import"./chunk-LINAD4CC.js";import"./chunk-ZBHD2A5S.js";import{b as g}from"./chunk-XJK5B3XJ.js";import{D as V,Fa as j,La as G,Ma as U,Va as $,q as O,r as L,u as R,w as W,z as A}from"./chunk-NKXT7PF4.js";import"./chunk-QVBHH5C3.js";import"./chunk-IGFM5CCE.js";import{b as X}from"./chunk-6LUCTPS2.js";import"./chunk-JOFGKPLY.js";import{c as J}from"./chunk-J7KKTDSX.js";import"./chunk-FWAWZDGH.js";import"./chunk-WUNNKW5D.js";import"./chunk-IFY4UZPR.js";import{c as H}from"./chunk-7R42RYQZ.js";import"./chunk-PLVHWZTL.js";import"./chunk-PDYJ5OYY.js";import{a as K}from"./chunk-LJUR6GAC.js";import{p as z}from"./chunk-7WGMNLRJ.js";import"./chunk-YMOV4UGM.js";import{fa as E,ua as y}from"./chunk-TDUJNOEU.js";import{Db as h,Hb as f,Ia as _,Yb as N,Zb as B,_b as T,dc as r,ec as C,fc as b,fd as i,gc as p,gd as o,lb as m,ma as I,nc as M,q as v,tc as P,ua as w,va as k,wb as u,zd as x}from"./chunk-I3FGJX2C.js";import"./chunk-AKP2VPKK.js";import"./chunk-ML3VIXIY.js";import{d as S,n as re}from"./chunk-INB5GR2I.js";import"./chunk-B7YGBANW.js";re();function pe(t,e){t&1&&(p(0,"wk-dropdown",2),i(1,"translate"),i(2,"translate")),t&2&&r("options",e)("multiple",!0)("highlightSelectedItems",!1)("enableSearch",!0)("displayFieldName","fullName")("label",o(1,7,"\u041A\u0430\u0441\u0441\u0438\u0440"))("placeholder",o(2,9,"\u0412\u0441\u0435"))}function se(t,e){t&1&&p(0,"wk-skeleton",3)}var ne=(()=>{let e=class e extends ie{constructor(){super(...arguments),this.cashboxes$=I(z).select(J.cashboxes)}get filterData(){return this.data}buildForm(){return this.fb.group({cashboxId:this.fb.nonNullable.control([]),employeeId:this.fb.nonNullable.control([]),operationDateFrom:this.fb.control(null),operationDateTo:this.fb.control(null)})}patchValue(){return{cashboxId:this.data.filters.cashboxId??[],employeeId:this.data.filters.employeeId??[],operationDateFrom:this.data.filters.operationDateFrom??null,operationDateTo:this.data.filters.operationDateTo??null}}};e.\u0275fac=(()=>{let n;return function(a){return(n||(n=_(e)))(a||e)}})(),e.\u0275cmp=h({type:e,selectors:[["tis-canceled-position-filters"]],features:[f],decls:14,vars:30,consts:[[3,"formGroup"],["token","cashboxes","formControlName","cashboxId",3,"options","multiple","highlightSelectedItems","enableSearch","label","placeholder"],["token","employees","formControlName","employeeId",3,"options","multiple","highlightSelectedItems","enableSearch","displayFieldName","label","placeholder"],["width","100%","height","32px"],["token","date-to","formControlName","operationDateFrom",3,"maxDate","label","placeholder"],["token","date-from","formControlName","operationDateTo",3,"minDate","label","placeholder"]],template:function(s,a){if(s&1&&(C(0,"form",0),p(1,"wk-dropdown",1),i(2,"async"),i(3,"translate"),i(4,"translate"),N(5,pe,3,11,"wk-dropdown",2),i(6,"async"),B(7,se,1,0,"wk-skeleton",3),p(8,"wk-date-picker",4),i(9,"translate"),i(10,"translate"),p(11,"wk-date-picker",5),i(12,"translate"),i(13,"translate"),b()),s&2){let F;r("formGroup",a.filtersForm),m(),r("options",o(2,14,a.cashboxes$))("multiple",!0)("highlightSelectedItems",!1)("enableSearch",!0)("label",o(3,16,"\u041A\u0430\u0441\u0441\u0430"))("placeholder",o(4,18,"\u0412\u0441\u0435")),m(4),T((F=o(6,20,a.filterData.employees$))?5:7,F),m(3),r("maxDate",a.filtersForm.value==null?null:a.filtersForm.value.operationDateTo)("label",o(9,22,"\u0414\u0430\u0442\u0430 \u043D\u0430\u0447\u0430\u043B\u0430"))("placeholder",o(10,24,"\u0434\u0434.\u043C\u043C.\u0433\u0433\u0433\u0433")),m(3),r("minDate",a.filtersForm.value==null?null:a.filtersForm.value.operationDateFrom)("label",o(12,26,"\u0414\u0430\u0442\u0430 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F"))("placeholder",o(13,28,"\u0434\u0434.\u043C\u043C.\u0433\u0433\u0433\u0433"))}},dependencies:[y,V,R,O,L,W,A,j,U,$,E,g],styles:[`[_nghost-%COMP%]{display:block;width:100%}
/*# sourceMappingURL=canceled-position-filters.component-RPFKB7GE.css.map */`],changeDetection:0});let t=e;return t})();var ae=t=>[{dataField:"operationDate",caption:t("\u0414\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F"),calculateCellValue:e=>Q(new Date(e.operationDate),"dd.MM.yyyy HH:mm"),width:"10%",minWidth:150},{caption:t("\u041A\u0430\u0441\u0441\u0430"),dataField:"cashboxName",width:"15%",minWidth:100},{caption:t("\u041A\u0430\u0441\u0441\u0438\u0440"),dataField:"employeeName",width:"15%",minWidth:100},{caption:t("\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435"),dataField:"positionName",width:"40%",minWidth:130},{caption:t("\u041E\u0442\u043C\u0435\u043D\u0435\u043D\u043E"),dataField:"canceledQuantity",width:"10%",minWidth:100},{caption:t("\u0415\u0434. \u0438\u0437\u043C\u0435\u0440\u0435\u043D\u0438\u044F"),dataField:"unit",minWidth:100,width:"8%"}];var d=class d extends te{get criteria(){return{filter:this._toFilterModel(this.filters)}}get filterData(){let e={criteria:null,take:100,skip:0,orderBy:"id",isAscending:!0};return{filters:this.filters,employees$:this._employeeService.getEmployees(e).pipe(v(l=>l.data))}}constructor(e,l,n,s){super(n,s),this._canceledPositionService=e,this._employeeService=l,this.columns=ae(this.translate),this.filterComponent=ne}getLoadMethod(e){return this._canceledPositionService.getCanceledPositions(e)}_toFilterModel(e){return{storeId:this.selectedStoreId,operationDateFrom:e?D(e.operationDateFrom):null,operationDateTo:e?D(q(e.operationDateTo)):null,cashboxId:e?e.cashboxId:[],employeeId:e?e.employeeId:[]}}};d.\u0275fac=function(l){return new(l||d)(u(oe),u(X),u(x),u(G))},d.\u0275cmp=h({type:d,selectors:[["tis-canceled-position"]],features:[f],decls:5,vars:16,consts:[["table",""],[1,"header",3,"showBackButton","title"],[3,"clickedFilters","allowColumnResizing","data","columns","enableContextMenu","enablePagination","hoverable","enableSearch","pageNavigation","enableToolbar","enableFilters","activeFilters","enableSpinner"]],template:function(l,n){if(l&1){let s=M();p(0,"tis-subheader",1),i(1,"translate"),C(2,"tis-main-layout")(3,"tis-table",2,0),P("clickedFilters",function(){return w(s),k(n.openFilters())}),b()()}l&2&&(r("showBackButton",!1)("title",o(1,14,"\u041E\u0442\u043C\u0435\u043D\u0435\u043D\u043D\u044B\u0435 \u0442\u043E\u0432\u0430\u0440\u044B")),m(3),r("allowColumnResizing",!0)("data",n.dataSource)("columns",n.columns)("enableContextMenu",!1)("enablePagination",!0)("hoverable",!0)("enableSearch",!1)("pageNavigation",!0)("enableToolbar",!0)("enableFilters",!0)("activeFilters",!!n.filters)("enableSpinner",!0))},dependencies:[y,ee,Y,Z,g],styles:[`[_nghost-%COMP%]{display:flex;flex-direction:column;min-height:100%}.header[_ngcontent-%COMP%]{top:0;position:sticky;z-index:10}
/*# sourceMappingURL=canceled-position.component-XLW2J7WM.css.map */`],changeDetection:0});var c=d;S([K(H.selectedStoreId)],c.prototype,"selectedStoreId",void 0);var Ue=[{path:"",component:c},{path:"**",redirectTo:""}];export{Ue as routes};
//# sourceMappingURL=canceled-position.routes-5Z4YZVXV.js.map
