import{a as te}from"./chunk-YSFWT5VI.js";import{a as Z}from"./chunk-JPNJN7BT.js";import{a as q}from"./chunk-DV3DSI3N.js";import{a as Q}from"./chunk-YGRCRXXK.js";import{b as oe}from"./chunk-ER4PKN5Q.js";import{a as g,b as ee}from"./chunk-AANUGJO2.js";import"./chunk-JAY45DEO.js";import{a as Y}from"./chunk-WH5RBXYQ.js";import{b as X}from"./chunk-GF5II5JA.js";import{t as K}from"./chunk-W3BEWLBM.js";import"./chunk-LINAD4CC.js";import"./chunk-R7MAHTDS.js";import"./chunk-2MNVXWEX.js";import{A as W,F as A,Ja as V,Pa as j,Qa as G,Ya as U,q as E,r as O,v as L,x as R}from"./chunk-YFBLRBP4.js";import"./chunk-VXSBHXCN.js";import"./chunk-JOFGKPLY.js";import"./chunk-ZAOXB7JK.js";import"./chunk-RESH3J2M.js";import{b as H}from"./chunk-X6G2MEQP.js";import{c as z}from"./chunk-BYOG7O4N.js";import{a as J}from"./chunk-4QCIIFWS.js";import{n as $}from"./chunk-DC6G5OHZ.js";import"./chunk-JUPKAJPM.js";import"./chunk-PDYJ5OYY.js";import"./chunk-Z2AWIQRI.js";import{fa as B,ua as C}from"./chunk-3OWC7J4L.js";import{$b as N,Bb as c,Cd as x,Fb as d,Ka as k,_b as _,ac as M,fc as n,gc as h,hc as f,ic as s,id as b,jd as y,nb as l,oa as v,pc as T,q as S,tb as m,vc as P,wa as I,xa as w}from"./chunk-C2QKZJOP.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 Z{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(ee(e.operationDateTo)):null,cashboxId:e?e.cashboxId:[],employeeId:e?e.employeeId:[]}}};p.\u0275fac=function(a){return new(a||p)(m(oe),m(X),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,q,Q,Y],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-FUW2MH2W.js.map
