import{a as te}from"./chunk-J43C5WP7.js";import{a as ee}from"./chunk-6CNPPKIW.js";import{a as Y}from"./chunk-ZV3BGPM5.js";import{a as q}from"./chunk-QYJGZ7EQ.js";import{b as oe}from"./chunk-72BVSGBU.js";import{a as Z}from"./chunk-GCX3G43W.js";import{t as K}from"./chunk-TL6VKVO7.js";import{c as g,d as X}from"./chunk-BTNSHOI7.js";import"./chunk-JAY45DEO.js";import"./chunk-LINAD4CC.js";import"./chunk-HTEZFA6O.js";import"./chunk-LH4LY7P4.js";import{D as A,Ha as V,Na as j,Oa as G,Wa as U,q as E,r as O,u as L,w as R,z as W}from"./chunk-IDENGFF3.js";import"./chunk-2MCAID7M.js";import"./chunk-IGFM5CCE.js";import{b as Q}from"./chunk-OZZLCSEU.js";import"./chunk-JOFGKPLY.js";import{c as H}from"./chunk-Y5ZINRNV.js";import"./chunk-FWAWZDGH.js";import"./chunk-WUNNKW5D.js";import"./chunk-IFY4UZPR.js";import{c as z}from"./chunk-IXRBBB6V.js";import"./chunk-PLVHWZTL.js";import"./chunk-PDYJ5OYY.js";import{a as J}from"./chunk-FPRDBDVD.js";import{o as $}from"./chunk-M6NTKB7A.js";import"./chunk-YMOV4UGM.js";import{fa as B,ua as C}from"./chunk-TDUJNOEU.js";import{Db as c,Hb as d,Ia as k,Yb as _,Zb as N,_b as M,dc as n,ec as h,fc as f,fd as b,gc as s,gd as y,lb as l,ma as v,nc as T,q as S,tc as P,ua as I,va as w,wb as m,zd as x}from"./chunk-I3FGJX2C.js";import"./chunk-AKP2VPKK.js";import"./chunk-ML3VIXIY.js";import{d as F,n as ae}from"./chunk-INB5GR2I.js";import"./chunk-B7YGBANW.js";ae();function le(t,e){t&1&&s(0,"wk-dropdown",2),t&2&&n("options",e)("multiple",!0)("highlightSelectedItems",!1)("enableSearch",!0)("displayFieldName","fullName")}function se(t,e){t&1&&s(0,"wk-skeleton",3)}var ie=(()=>{let e=class e extends te{constructor(){super(...arguments),this.cashboxes$=v($).select(H.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 o;return function(i){return(o||(o=k(e)))(i||e)}})(),e.\u0275cmp=c({type:e,selectors:[["tis-canceled-position-filters"]],features:[d],decls:8,vars:12,consts:[[3,"formGroup"],["token","cashboxes","label","\u041A\u0430\u0441\u0441\u0430","placeholder","\u0412\u0441\u0435","formControlName","cashboxId",3,"options","multiple","highlightSelectedItems","enableSearch"],["token","employees","label","\u041A\u0430\u0441\u0441\u0438\u0440","placeholder","\u0412\u0441\u0435","formControlName","employeeId",3,"options","multiple","highlightSelectedItems","enableSearch","displayFieldName"],["width","100%","height","32px"],["token","date-to","label","\u0414\u0430\u0442\u0430 \u043D\u0430\u0447\u0430\u043B\u0430","placeholder","\u0434\u0434.\u043C\u043C.\u0433\u0433\u0433\u0433","formControlName","operationDateFrom",3,"maxDate"],["token","date-from","label","\u0414\u0430\u0442\u0430 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F","placeholder","\u0434\u0434.\u043C\u043C.\u0433\u0433\u0433\u0433","formControlName","operationDateTo",3,"minDate"]],template:function(r,i){if(r&1&&(h(0,"form",0),s(1,"wk-dropdown",1),b(2,"async"),_(3,le,1,5,"wk-dropdown",2),b(4,"async"),N(5,se,1,0,"wk-skeleton",3),s(6,"wk-date-picker",4)(7,"wk-date-picker",5),f()),r&2){let D;n("formGroup",i.filtersForm),l(),n("options",y(2,8,i.cashboxes$))("multiple",!0)("highlightSelectedItems",!1)("enableSearch",!0),l(2),M((D=y(4,10,i.filterData.employees$))?3:5,D),l(3),n("maxDate",i.filtersForm.value==null?null:i.filtersForm.value.operationDateTo),l(),n("minDate",i.filtersForm.value==null?null:i.filtersForm.value.operationDateFrom)}},dependencies:[C,A,L,E,O,R,W,V,G,U,B],styles:[`[_nghost-%COMP%]{display:block;width:100%}
/*# sourceMappingURL=canceled-position-filters.component-RPFKB7GE.css.map */`],changeDetection:0});let t=e;return t})();var ne=[{dataField:"operationDate",caption:"\u0414\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",calculateCellValue:t=>K(new Date(t.operationDate),"dd.MM.yyyy HH:mm"),width:"10%",minWidth:150},{caption:"\u041A\u0430\u0441\u0441\u0430",dataField:"cashboxName",width:"15%",minWidth:100},{caption:"\u041A\u0430\u0441\u0441\u0438\u0440",dataField:"employeeName",width:"15%",minWidth:100},{caption:"\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435",dataField:"positionName",width:"40%",minWidth:130},{caption:"\u041E\u0442\u043C\u0435\u043D\u0435\u043D\u043E",dataField:"canceledQuantity",width:"10%",minWidth:100},{caption:"\u0415\u0434. \u0438\u0437\u043C\u0435\u0440\u0435\u043D\u0438\u044F",dataField:"unit",minWidth:100,width:"8%"}];var p=class p extends ee{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(S(a=>a.data))}}constructor(e,a,o,r){super(o,r),this._canceledPositionService=e,this._employeeService=a,this.columns=ne,this.filterComponent=ie}getLoadMethod(e){return this._canceledPositionService.getCanceledPositions(e)}_toFilterModel(e){return{storeId:this.selectedStoreId,operationDateFrom:e?g(e.operationDateFrom):null,operationDateTo:e?g(X(e.operationDateTo)):null,cashboxId:e?e.cashboxId:[],employeeId:e?e.employeeId:[]}}};p.\u0275fac=function(a){return new(a||p)(m(oe),m(Q),m(x),m(j))},p.\u0275cmp=c({type:p,selectors:[["tis-canceled-position"]],features:[d],decls:4,vars:13,consts:[["table",""],["title","\u041E\u0442\u043C\u0435\u043D\u0435\u043D\u043D\u044B\u0435 \u0442\u043E\u0432\u0430\u0440\u044B",1,"header",3,"showBackButton"],[3,"clickedFilters","allowColumnResizing","data","columns","enableContextMenu","enablePagination","hoverable","enableSearch","pageNavigation","enableToolbar","enableFilters","activeFilters","enableSpinner"]],template:function(a,o){if(a&1){let r=T();s(0,"tis-subheader",1),h(1,"tis-main-layout")(2,"tis-table",2,0),P("clickedFilters",function(){return I(r),w(o.openFilters())}),f()()}a&2&&(n("showBackButton",!1),l(2),n("allowColumnResizing",!0)("data",o.dataSource)("columns",o.columns)("enableContextMenu",!1)("enablePagination",!0)("hoverable",!0)("enableSearch",!1)("pageNavigation",!0)("enableToolbar",!0)("enableFilters",!0)("activeFilters",!!o.filters)("enableSpinner",!0))},dependencies:[C,Y,q,Z],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 u=p;F([J(z.selectedStoreId)],u.prototype,"selectedStoreId",void 0);var Ve=[{path:"",component:u},{path:"**",redirectTo:""}];export{Ve as routes};
//# sourceMappingURL=canceled-position.routes-SLUGQ4RK.js.map
