dealpos 25.50.1 → 25.50.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/{chunk-RRIGLMUN.js → chunk-2KS45FOG.js} +1 -1
- package/browser/{chunk-R7KECBQD.js → chunk-2YCKWFSX.js} +1 -1
- package/browser/{chunk-TY24TZEK.js → chunk-3CI72KQ3.js} +1 -1
- package/browser/{chunk-HNTY7S25.js → chunk-3FIHANXM.js} +1 -1
- package/browser/{chunk-OWS3IW26.js → chunk-3IAS5WE6.js} +1 -1
- package/browser/{chunk-FIHBOJV4.js → chunk-4VHFIFH3.js} +1 -1
- package/browser/{chunk-JAUNAK7P.js → chunk-4WGA2OTP.js} +1 -1
- package/browser/{chunk-CI4ULOBO.js → chunk-4XR5RPFW.js} +1 -1
- package/browser/{chunk-ZT57H2NK.js → chunk-522M5UUJ.js} +1 -1
- package/browser/{chunk-5Y24QJWR.js → chunk-5I57WLXV.js} +1 -1
- package/browser/{chunk-OQI4P5JW.js → chunk-5JPSSGYG.js} +1 -1
- package/browser/{chunk-JZTKA4ST.js → chunk-5TRWYRN5.js} +1 -1
- package/browser/{chunk-BKZYMEVP.js → chunk-6K2PABLT.js} +1 -1
- package/browser/{chunk-VOTRMLKO.js → chunk-72M34LBD.js} +1 -1
- package/browser/{chunk-SLTQIIWW.js → chunk-76NP7MDH.js} +1 -1
- package/browser/{chunk-W26SBQKL.js → chunk-7KRURW6N.js} +1 -1
- package/browser/{chunk-PASO7BB6.js → chunk-7T4IG74V.js} +1 -1
- package/browser/{chunk-JL4CFBF2.js → chunk-7YINKSK5.js} +1 -1
- package/browser/{chunk-TNHTSFQM.js → chunk-A6LKXUGJ.js} +1 -1
- package/browser/{chunk-CCWIK546.js → chunk-ABAK5BOR.js} +1 -1
- package/browser/{chunk-B534JAF4.js → chunk-CAHMSC7J.js} +1 -1
- package/browser/{chunk-XSNUFD7O.js → chunk-CMZCCWKE.js} +1 -1
- package/browser/{chunk-34U6PVY5.js → chunk-CN2J3E2G.js} +1 -1
- package/browser/{chunk-BOQBXDOK.js → chunk-D3NB2D5J.js} +1 -1
- package/browser/{chunk-TWS5PR4T.js → chunk-DVEFT7GI.js} +1 -1
- package/browser/{chunk-467KNI4M.js → chunk-DXZJ5B2W.js} +1 -1
- package/browser/{chunk-PFIN2VSA.js → chunk-E7I3NPA7.js} +1 -1
- package/browser/{chunk-CUDCXMJN.js → chunk-E7RGLETU.js} +1 -1
- package/browser/{chunk-C4M7VQFI.js → chunk-EKL4DD7N.js} +1 -1
- package/browser/{chunk-DMWJZNTI.js → chunk-EQ5MSD2S.js} +1 -1
- package/browser/{chunk-BFTWW3SB.js → chunk-EXV4D73Z.js} +1 -1
- package/browser/{chunk-S3IZOS7R.js → chunk-F7YYCFKH.js} +2 -2
- package/browser/{chunk-NZLZ6H6Q.js → chunk-FCDFHL3X.js} +1 -1
- package/browser/{chunk-7IKZACPQ.js → chunk-FR2QCVXS.js} +1 -1
- package/browser/{chunk-XLKF6N3S.js → chunk-FYZR4T4Z.js} +1 -1
- package/browser/{chunk-HGD6HRSU.js → chunk-GDASNIZL.js} +1 -1
- package/browser/{chunk-BNX6XXDZ.js → chunk-GJCPLFMU.js} +1 -1
- package/browser/{chunk-OZTSXG5Y.js → chunk-GUN3GLFK.js} +1 -1
- package/browser/{chunk-L5UAK2LQ.js → chunk-I5PFTS7W.js} +1 -1
- package/browser/{chunk-3FAXTVQI.js → chunk-IB5IYQYR.js} +2 -2
- package/browser/{chunk-OEUCWGFD.js → chunk-IRGMPCNS.js} +1 -1
- package/browser/{chunk-NYZIEOHQ.js → chunk-IX6SAYD6.js} +1 -1
- package/browser/{chunk-VXTQ5VEM.js → chunk-J4JATC4H.js} +1 -1
- package/browser/{chunk-DIFPP2ZV.js → chunk-JIYQX2TI.js} +1 -1
- package/browser/{chunk-UU4IU25V.js → chunk-KJ6Y5C2X.js} +1 -1
- package/browser/{chunk-ULNAGOA3.js → chunk-L2E3ETBG.js} +1 -1
- package/browser/{chunk-WOLF2DPX.js → chunk-LJCEFLIZ.js} +1 -1
- package/browser/{chunk-PYSTCFF2.js → chunk-LKBQF2DU.js} +1 -1
- package/browser/{chunk-E2NGOMCD.js → chunk-LNFN2XQO.js} +1 -1
- package/browser/{chunk-XPR2GPHE.js → chunk-MNQNS2XG.js} +1 -1
- package/browser/{chunk-WK7YCGTV.js → chunk-MW6VWMF2.js} +1 -1
- package/browser/{chunk-6ACGUR3D.js → chunk-N5HYVJLW.js} +1 -1
- package/browser/{chunk-7WB7XD5V.js → chunk-NRXQVTHC.js} +2 -2
- package/browser/{chunk-VIZOMY6L.js → chunk-NX6SWHK4.js} +2 -2
- package/browser/{chunk-42EJHS3A.js → chunk-O7AYJCX3.js} +1 -1
- package/browser/{chunk-TRCRCGLM.js → chunk-OPACCKVN.js} +1 -1
- package/browser/{chunk-I3SVXKZW.js → chunk-OXGGKWTO.js} +1 -1
- package/browser/{chunk-JVNUQR5F.js → chunk-PCAJ3T4Y.js} +1 -1
- package/browser/{chunk-7MCT2FSH.js → chunk-PE5RSFD4.js} +1 -1
- package/browser/{chunk-BEXFUC6A.js → chunk-PG76XRHN.js} +1 -1
- package/browser/{chunk-E4L4PN2C.js → chunk-Q3HXBKNL.js} +1 -1
- package/browser/{chunk-JIE2RXLX.js → chunk-QM5JUHAR.js} +3 -3
- package/browser/{chunk-7NFGGAUY.js → chunk-QO5SWGKB.js} +1 -1
- package/browser/{chunk-RSDLXHSH.js → chunk-R66UUSM7.js} +1 -1
- package/browser/{chunk-DU2VBWSN.js → chunk-R7X75CAN.js} +1 -1
- package/browser/{chunk-EUSVY4UJ.js → chunk-RJFWUHOP.js} +1 -1
- package/browser/{chunk-IGDDA2RG.js → chunk-S2XP3WT2.js} +1 -1
- package/browser/{chunk-J36LAI7P.js → chunk-SXFDWJS4.js} +1 -1
- package/browser/{chunk-HRM7HE6Z.js → chunk-TFJ6RC7Q.js} +1 -1
- package/browser/{chunk-KAPQ56CY.js → chunk-TM4BVRKQ.js} +1 -1
- package/browser/{chunk-6DMG2LMI.js → chunk-TSYTV425.js} +1 -1
- package/browser/{chunk-REZUKRTR.js → chunk-TXFCAVU2.js} +1 -1
- package/browser/{chunk-33OKCUGA.js → chunk-UXISTLRF.js} +1 -1
- package/browser/{chunk-WC6DBADN.js → chunk-VD3VXMZE.js} +1 -1
- package/browser/{chunk-7HOW5QOQ.js → chunk-VL552ANV.js} +1 -1
- package/browser/{chunk-4I3C6CNY.js → chunk-VLALB254.js} +1 -1
- package/browser/{chunk-A72QOXN4.js → chunk-WMLA5VC3.js} +1 -1
- package/browser/{chunk-RTYMNLFW.js → chunk-YAZTTW7K.js} +1 -1
- package/browser/{chunk-2EP6XDTW.js → chunk-YDSGRKII.js} +1 -1
- package/browser/{chunk-CMKONRKZ.js → chunk-Z6DKCJUZ.js} +1 -1
- package/browser/{chunk-R4NTCBWJ.js → chunk-ZNKZYBB6.js} +2 -2
- package/browser/{chunk-NEP77MPC.js → chunk-ZUH63VNR.js} +2 -2
- package/browser/{chunk-XAT2P7QI.js → chunk-ZVJGTPQY.js} +1 -1
- package/browser/index.html +2 -2
- package/browser/{main-EWD2LJE4.js → main-OHWGY2LM.js} +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as le}from"./chunk-TY24TZEK.js";import{a as oe,b as ae,c as re}from"./chunk-AQW4VS3Y.js";import{a as xe,b as fe}from"./chunk-4W3WYXI2.js";import{f as ye}from"./chunk-HRM7HE6Z.js";import{c as ve}from"./chunk-XAT2P7QI.js";import{b as se}from"./chunk-VXPORXGI.js";import{a as _e}from"./chunk-J6M7UWVR.js";import{e as ue,f as ge}from"./chunk-7HOW5QOQ.js";import{b as Ce}from"./chunk-CUDCXMJN.js";import{b as ne,c as ie}from"./chunk-JBS5UYZC.js";import{a as me,d as pe,e as de}from"./chunk-THT6CY5E.js";import{g as ce}from"./chunk-ZTD4APMR.js";import{F as $,c as U,h as X,o as Y,q as Z}from"./chunk-DWZ5JTI2.js";import{b as te}from"./chunk-WFQIMZGL.js";import{p as J,s as ee}from"./chunk-LGOSIAUC.js";import{Ab as s,Ca as O,Cb as B,Db as N,Eb as H,Fb as g,Fc as S,Gb as o,Gc as w,Hb as a,Ib as j,Lc as G,Mb as F,Nb as M,Pb as T,Pc as R,Qd as K,Sb as V,Ub as r,Xa as i,eb as h,hc as m,ib as L,ic as D,jc as y,mb as W,mc as v,nc as x,ob as A,oc as f,pa as E,sc as k,sd as q,ta as C,ua as _,vd as z,yb as d,yc as Q}from"./chunk-IEVGW2RT.js";import{a as b,b as P}from"./chunk-SNAKHGZS.js";var he=n=>({ID:n});function De(n,p){if(n&1){let e=T();o(0,"button",16),V("click",function(){C(e);let t=r();return _(t.openExportModal())}),j(1,"i",17),m(2," Export "),a()}}function Se(n,p){if(n&1&&(o(0,"span",27),m(1),a()),n&2){let e=p.item;g("matTooltip",k(e.Value)),i(),D(e.Value)}}function we(n,p){if(n&1){let e=T();o(0,"div",18)(1,"div")(2,"h6"),m(3,"Outlet"),a(),o(4,"outlet-selector",19),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.OutletID,t)||(l.pageData.Filter.OutletID=t),_(t)}),a()(),o(5,"div")(6,"h6"),m(7,"Category"),a(),o(8,"POS-product-category-select",20),f("selectedCategoryIDChange",function(t){C(e);let l=r();return x(l.pageData.Filter.ProductCategoryID,t)||(l.pageData.Filter.ProductCategoryID=t),_(t)}),a()(),o(9,"div")(10,"h6"),m(11,"Brand"),a(),o(12,"ng-select",21),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.ProductBrandID,t)||(l.pageData.Filter.ProductBrandID=t),_(t)}),A(13,Se,2,3,"ng-template",22),a()(),o(14,"div")(15,"h6"),m(16,"Product Tags"),a(),o(17,"ng-select",23),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.ProductTagID,t)||(l.pageData.Filter.ProductTagID=t),_(t)}),a()(),o(18,"div")(19,"h6"),m(20,"Quantity From - To"),a(),o(21,"div",24)(22,"input",25),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.QtyFrom,t)||(l.pageData.Filter.QtyFrom=t),_(t)}),a(),m(23," - "),o(24,"input",26),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.QtyTo,t)||(l.pageData.Filter.QtyTo=t),_(t)}),a()()()()}if(n&2){let e=r();i(4),g("accessType",2),v("ngModel",e.pageData.Filter.OutletID),i(4),v("selectedCategoryID",e.pageData.Filter.ProductCategoryID),g("showClear",!0),i(4),g("items",e.pageData.Options==null?null:e.pageData.Options.Brands),v("ngModel",e.pageData.Filter.ProductBrandID),i(5),g("items",e.pageData.Options==null?null:e.pageData.Options.Tags),v("ngModel",e.pageData.Filter.ProductTagID),i(5),v("ngModel",e.pageData.Filter.QtyFrom),i(2),v("ngModel",e.pageData.Filter.QtyTo)}}function Te(n,p){if(n&1&&(o(0,"th",10),m(1),a()),n&2){let e=r();i(),y(" ",e.column.VariantName.name," ")}}function Ve(n,p){if(n&1&&(o(0,"th",11),m(1),a()),n&2){let e=r();i(),y(" ",e.column.VariantCode.name," ")}}function be(n,p){if(n&1&&(o(0,"th",12),m(1),a()),n&2){let e=r();i(),y(" ",e.column.OnHand.name," ")}}function Pe(n,p){if(n&1&&(o(0,"th",13),m(1),a()),n&2){let e=r();i(),y(" ",e.column.DirectAllocated.name," ")}}function Fe(n,p){if(n&1&&(o(0,"th",14),m(1),a()),n&2){let e=r();i(),y(" ",e.column.IndirectAllocated.name," ")}}function Me(n,p){if(n&1&&(o(0,"th",15),m(1),a()),n&2){let e=r();i(),y(" ",e.column.Available.name," ")}}function Ae(n,p){if(n&1&&(o(0,"td")(1,"a",28),m(2),a()()),n&2){let e=r().$implicit;i(),g("routerLink","/menu/Products/Catalog/Variants/Info")("queryParams",Q(3,he,e.VariantID)),i(),y(" ",e.VariantName," ")}}function Ee(n,p){if(n&1&&(o(0,"td"),m(1),a()),n&2){let e=r().$implicit;i(),D(e.VariantCode)}}function Oe(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.OnHand))}}function Le(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r(2).$implicit;i(),y(" ",w(2,1,e.DirectAllocated)," ")}}function We(n,p){if(n&1&&d(0,Le,3,3,"td"),n&2){let e=r(2);s(e.column.DirectAllocated&&e.column.DirectAllocated.selected?0:-1)}}function Be(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r(2).$implicit;i(),y(" ",w(2,1,e.DirectAllocated)," ")}}function Ne(n,p){if(n&1&&d(0,Be,3,3,"td"),n&2){let e=r(2);s(e.column.DirectAllocated&&e.column.DirectAllocated.selected?0:-1)}}function He(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.IndirectAllocated))}}function je(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.Available))}}function ke(n,p){if(n&1&&(o(0,"tr"),d(1,Ae,3,5,"td"),d(2,Ee,2,1,"td"),d(3,Oe,3,3,"td"),d(4,We,1,1)(5,Ne,1,1),d(6,He,3,3,"td"),d(7,je,3,3,"td"),a()),n&2){let e=r();i(),s(e.column.VariantName&&e.column.VariantName.selected?1:-1),i(),s(e.column.VariantCode&&e.column.VariantCode.selected?2:-1),i(),s(e.column.OnHand&&e.column.OnHand.selected?3:-1),i(),s(e.totalIndirect()>0?4:5),i(2),s(e.column.IndirectAllocated&&e.column.IndirectAllocated.selected&&e.totalIndirect()>0?6:-1),i(),s(e.column.Available&&e.column.Available.selected?7:-1)}}function Qe(n,p){if(n&1){let e=T();o(0,"div")(1,"POS-complex-pagination",29),V("jumpToPage",function(){C(e);let t=r();return _(t.getListData())})("previousPage",function(){C(e);let t=r();return _(t.getListData())})("nextPage",function(){C(e);let t=r();return _(t.getListData())}),a()()}if(n&2){let e=r();i(),g("total",e.data.Data.length)("pageData",e.pageData)}}var Ie=class n extends le{constructor(e,c,t,l,I){super(e,c,"inventory/GetListInventoryComposite","inventoryloader/GetListInventoryComposite",t,void 0,!1);this.httpService=c;this.csvConverter=l;this.roleService=I;R(()=>{let u=this.totalIndirect();u!==null&&u<=0&&(console.log("Indirect allocation is zero or negative"),this.column=P(b({},this.column),{DirectAllocated:P(b({},this.column.DirectAllocated),{name:"Allocated"}),IndirectAllocated:P(b({},this.column.IndirectAllocated),{show:!1})}))})}column={VariantName:{selected:!0,name:"Name",show:!0},VariantCode:{selected:!0,name:"Code",show:!0},OnHand:{selected:!0,name:"On Hand",show:!0},DirectAllocated:{selected:!0,name:"Direct Allocated",show:!0},IndirectAllocated:{selected:!0,name:"Indirect Allocated",show:!0},Available:{selected:!0,name:"Available",show:!0}};totalIndirect=O(null);dialog=E(ce);afterPostInit(e){console.log("Composite Inventory Data",e);let c=e.Data.reduce((t,l)=>t+l.IndirectAllocated,0);console.log("Total Indirect Allocated:",c),this.totalIndirect.set(c)}sortData(e){let c=[...this.data.Data];if(!e.active||e.direction===""){this.infiniteList=c;return}this.infiniteList=c.sort((t,l)=>{let I=e.direction==="asc";return this.compare(t[e.active],l[e.active],I)})}openExportModal(){this.dialog.open(se,{data:{title:"Composite Inventory",exportTypes:[{ID:"inventoryExport/GetExportInventoryComposite",Value:"Default",FileName:"Composite Inventory"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"inventory/GetCountInventoryComposite",pagination:!0}})}static \u0275fac=function(c){return new(c||n)(h(Ce),h(ee),h(J),h(_e),h(te))};static \u0275cmp=L({type:n,selectors:[["pos-composite-inventory"]],features:[W],decls:22,vars:13,consts:[["pageFilterTemplate",""],["tooltipTitle","Identify and manage unsold inventory that has been stagnant for a long time",3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter","column"],["ngProjectAs","actions",5,["actions"]],[1,"btn","btn-outline-secondary","me-3"],["ngProjectAs","filters",5,["filters"]],["ngProjectAs","content",5,["content"]],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table","border-bottom",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","VariantName",2,"width","20%"],["mat-sort-header","VariantCode",2,"width","20%"],["mat-sort-header","OnHand",2,"width","10%"],["mat-sort-header","DirectAllocated",2,"width","10%"],["mat-sort-header","IndirectAllocated",2,"width","10%"],["mat-sort-header","Available",2,"width","10%"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"d-flex","flex-column","gap-4"],["placeholder","Choose Outlets (Leave Blank to Choose All)",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],["bindLabel","Value","bindValue","Key","placeholder","Choose Brand",3,"ngModelChange","items","ngModel"],["ng-option-tmp",""],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose Tag",3,"ngModelChange","items","ngModel"],[1,"d-flex","align-items-center",2,"column-gap","8px"],["type","number","name","QuantityFrom",1,"form-control","input-filter",3,"ngModelChange","ngModel"],["type","number","name","QuantityTo",1,"form-control","input-filter",3,"ngModelChange","ngModel"],["matTooltipPosition","above",3,"matTooltip"],[3,"routerLink","queryParams"],["api","inventory/GetCountInventoryComposite",3,"jumpToPage","previousPage","nextPage","total","pageData"]],template:function(c,t){if(c&1){let l=T();o(0,"mainpanel-cmp",1),f("textChange",function(u){return C(l),x(t.pageData.Filter.SearchText,u)||(t.pageData.Filter.SearchText=u),_(u)}),V("onSubmit",function(){return C(l),_(t.searchFromPageOne())}),f("filterChange",function(u){return C(l),x(t.pageData.Filter,u)||(t.pageData.Filter=u),_(u)}),F(1,2),d(2,De,3,0,"button",3),M(),F(3,4),A(4,we,25,10,"ng-template",null,0,G),M(),F(6,5),o(7,"div",6)(8,"div",7)(9,"table",8),V("matSortChange",function(u){return C(l),_(t.sortData(u))}),o(10,"thead",9)(11,"tr"),d(12,Te,2,1,"th",10),d(13,Ve,2,1,"th",11),d(14,be,2,1,"th",12),d(15,Pe,2,1,"th",13),d(16,Fe,2,1,"th",14),d(17,Me,2,1,"th",15),a()(),o(18,"tbody"),N(19,ke,8,6,"tr",null,B),a()()(),d(21,Qe,2,2,"div"),a(),M(),a()}c&2&&(g("pageData",t.menuData),v("text",t.pageData.Filter.SearchText),g("isFilterOnDropdown",!1),v("filter",t.pageData.Filter),g("column",t.column),i(2),s(t.roleService.global.Export?2:-1),i(10),s(t.column.VariantName&&t.column.VariantName.selected?12:-1),i(),s(t.column.VariantCode&&t.column.VariantCode.selected?13:-1),i(),s(t.column.OnHand&&t.column.OnHand.selected?14:-1),i(),s(t.column.DirectAllocated&&t.column.DirectAllocated.selected?15:-1),i(),s(t.column.IndirectAllocated&&t.column.IndirectAllocated.selected&&t.totalIndirect()>0?16:-1),i(),s(t.column.Available&&t.column.Available.selected?17:-1),i(2),H(t.infiniteList),i(2),s(t.data?21:-1))},dependencies:[ge,ue,ve,ye,$,U,Z,X,Y,de,pe,me,ie,ne,fe,xe,z,K,re,oe,ae,q],styles:["[_nghost-%COMP%]{display:block}"]})};export{Ie as a};
|
|
1
|
+
import{a as le}from"./chunk-3CI72KQ3.js";import{a as oe,b as ae,c as re}from"./chunk-AQW4VS3Y.js";import{a as xe,b as fe}from"./chunk-4W3WYXI2.js";import{f as ye}from"./chunk-TFJ6RC7Q.js";import{c as ve}from"./chunk-ZVJGTPQY.js";import{b as se}from"./chunk-VXPORXGI.js";import{a as _e}from"./chunk-J6M7UWVR.js";import{e as ue,f as ge}from"./chunk-VL552ANV.js";import{b as Ce}from"./chunk-E7RGLETU.js";import{b as ne,c as ie}from"./chunk-JBS5UYZC.js";import{a as me,d as pe,e as de}from"./chunk-THT6CY5E.js";import{g as ce}from"./chunk-ZTD4APMR.js";import{F as $,c as U,h as X,o as Y,q as Z}from"./chunk-DWZ5JTI2.js";import{b as te}from"./chunk-WFQIMZGL.js";import{p as J,s as ee}from"./chunk-LGOSIAUC.js";import{Ab as s,Ca as O,Cb as B,Db as N,Eb as H,Fb as g,Fc as S,Gb as o,Gc as w,Hb as a,Ib as j,Lc as G,Mb as F,Nb as M,Pb as T,Pc as R,Qd as K,Sb as V,Ub as r,Xa as i,eb as h,hc as m,ib as L,ic as D,jc as y,mb as W,mc as v,nc as x,ob as A,oc as f,pa as E,sc as k,sd as q,ta as C,ua as _,vd as z,yb as d,yc as Q}from"./chunk-IEVGW2RT.js";import{a as b,b as P}from"./chunk-SNAKHGZS.js";var he=n=>({ID:n});function De(n,p){if(n&1){let e=T();o(0,"button",16),V("click",function(){C(e);let t=r();return _(t.openExportModal())}),j(1,"i",17),m(2," Export "),a()}}function Se(n,p){if(n&1&&(o(0,"span",27),m(1),a()),n&2){let e=p.item;g("matTooltip",k(e.Value)),i(),D(e.Value)}}function we(n,p){if(n&1){let e=T();o(0,"div",18)(1,"div")(2,"h6"),m(3,"Outlet"),a(),o(4,"outlet-selector",19),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.OutletID,t)||(l.pageData.Filter.OutletID=t),_(t)}),a()(),o(5,"div")(6,"h6"),m(7,"Category"),a(),o(8,"POS-product-category-select",20),f("selectedCategoryIDChange",function(t){C(e);let l=r();return x(l.pageData.Filter.ProductCategoryID,t)||(l.pageData.Filter.ProductCategoryID=t),_(t)}),a()(),o(9,"div")(10,"h6"),m(11,"Brand"),a(),o(12,"ng-select",21),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.ProductBrandID,t)||(l.pageData.Filter.ProductBrandID=t),_(t)}),A(13,Se,2,3,"ng-template",22),a()(),o(14,"div")(15,"h6"),m(16,"Product Tags"),a(),o(17,"ng-select",23),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.ProductTagID,t)||(l.pageData.Filter.ProductTagID=t),_(t)}),a()(),o(18,"div")(19,"h6"),m(20,"Quantity From - To"),a(),o(21,"div",24)(22,"input",25),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.QtyFrom,t)||(l.pageData.Filter.QtyFrom=t),_(t)}),a(),m(23," - "),o(24,"input",26),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.QtyTo,t)||(l.pageData.Filter.QtyTo=t),_(t)}),a()()()()}if(n&2){let e=r();i(4),g("accessType",2),v("ngModel",e.pageData.Filter.OutletID),i(4),v("selectedCategoryID",e.pageData.Filter.ProductCategoryID),g("showClear",!0),i(4),g("items",e.pageData.Options==null?null:e.pageData.Options.Brands),v("ngModel",e.pageData.Filter.ProductBrandID),i(5),g("items",e.pageData.Options==null?null:e.pageData.Options.Tags),v("ngModel",e.pageData.Filter.ProductTagID),i(5),v("ngModel",e.pageData.Filter.QtyFrom),i(2),v("ngModel",e.pageData.Filter.QtyTo)}}function Te(n,p){if(n&1&&(o(0,"th",10),m(1),a()),n&2){let e=r();i(),y(" ",e.column.VariantName.name," ")}}function Ve(n,p){if(n&1&&(o(0,"th",11),m(1),a()),n&2){let e=r();i(),y(" ",e.column.VariantCode.name," ")}}function be(n,p){if(n&1&&(o(0,"th",12),m(1),a()),n&2){let e=r();i(),y(" ",e.column.OnHand.name," ")}}function Pe(n,p){if(n&1&&(o(0,"th",13),m(1),a()),n&2){let e=r();i(),y(" ",e.column.DirectAllocated.name," ")}}function Fe(n,p){if(n&1&&(o(0,"th",14),m(1),a()),n&2){let e=r();i(),y(" ",e.column.IndirectAllocated.name," ")}}function Me(n,p){if(n&1&&(o(0,"th",15),m(1),a()),n&2){let e=r();i(),y(" ",e.column.Available.name," ")}}function Ae(n,p){if(n&1&&(o(0,"td")(1,"a",28),m(2),a()()),n&2){let e=r().$implicit;i(),g("routerLink","/menu/Products/Catalog/Variants/Info")("queryParams",Q(3,he,e.VariantID)),i(),y(" ",e.VariantName," ")}}function Ee(n,p){if(n&1&&(o(0,"td"),m(1),a()),n&2){let e=r().$implicit;i(),D(e.VariantCode)}}function Oe(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.OnHand))}}function Le(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r(2).$implicit;i(),y(" ",w(2,1,e.DirectAllocated)," ")}}function We(n,p){if(n&1&&d(0,Le,3,3,"td"),n&2){let e=r(2);s(e.column.DirectAllocated&&e.column.DirectAllocated.selected?0:-1)}}function Be(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r(2).$implicit;i(),y(" ",w(2,1,e.DirectAllocated)," ")}}function Ne(n,p){if(n&1&&d(0,Be,3,3,"td"),n&2){let e=r(2);s(e.column.DirectAllocated&&e.column.DirectAllocated.selected?0:-1)}}function He(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.IndirectAllocated))}}function je(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.Available))}}function ke(n,p){if(n&1&&(o(0,"tr"),d(1,Ae,3,5,"td"),d(2,Ee,2,1,"td"),d(3,Oe,3,3,"td"),d(4,We,1,1)(5,Ne,1,1),d(6,He,3,3,"td"),d(7,je,3,3,"td"),a()),n&2){let e=r();i(),s(e.column.VariantName&&e.column.VariantName.selected?1:-1),i(),s(e.column.VariantCode&&e.column.VariantCode.selected?2:-1),i(),s(e.column.OnHand&&e.column.OnHand.selected?3:-1),i(),s(e.totalIndirect()>0?4:5),i(2),s(e.column.IndirectAllocated&&e.column.IndirectAllocated.selected&&e.totalIndirect()>0?6:-1),i(),s(e.column.Available&&e.column.Available.selected?7:-1)}}function Qe(n,p){if(n&1){let e=T();o(0,"div")(1,"POS-complex-pagination",29),V("jumpToPage",function(){C(e);let t=r();return _(t.getListData())})("previousPage",function(){C(e);let t=r();return _(t.getListData())})("nextPage",function(){C(e);let t=r();return _(t.getListData())}),a()()}if(n&2){let e=r();i(),g("total",e.data.Data.length)("pageData",e.pageData)}}var Ie=class n extends le{constructor(e,c,t,l,I){super(e,c,"inventory/GetListInventoryComposite","inventoryloader/GetListInventoryComposite",t,void 0,!1);this.httpService=c;this.csvConverter=l;this.roleService=I;R(()=>{let u=this.totalIndirect();u!==null&&u<=0&&(console.log("Indirect allocation is zero or negative"),this.column=P(b({},this.column),{DirectAllocated:P(b({},this.column.DirectAllocated),{name:"Allocated"}),IndirectAllocated:P(b({},this.column.IndirectAllocated),{show:!1})}))})}column={VariantName:{selected:!0,name:"Name",show:!0},VariantCode:{selected:!0,name:"Code",show:!0},OnHand:{selected:!0,name:"On Hand",show:!0},DirectAllocated:{selected:!0,name:"Direct Allocated",show:!0},IndirectAllocated:{selected:!0,name:"Indirect Allocated",show:!0},Available:{selected:!0,name:"Available",show:!0}};totalIndirect=O(null);dialog=E(ce);afterPostInit(e){console.log("Composite Inventory Data",e);let c=e.Data.reduce((t,l)=>t+l.IndirectAllocated,0);console.log("Total Indirect Allocated:",c),this.totalIndirect.set(c)}sortData(e){let c=[...this.data.Data];if(!e.active||e.direction===""){this.infiniteList=c;return}this.infiniteList=c.sort((t,l)=>{let I=e.direction==="asc";return this.compare(t[e.active],l[e.active],I)})}openExportModal(){this.dialog.open(se,{data:{title:"Composite Inventory",exportTypes:[{ID:"inventoryExport/GetExportInventoryComposite",Value:"Default",FileName:"Composite Inventory"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"inventory/GetCountInventoryComposite",pagination:!0}})}static \u0275fac=function(c){return new(c||n)(h(Ce),h(ee),h(J),h(_e),h(te))};static \u0275cmp=L({type:n,selectors:[["pos-composite-inventory"]],features:[W],decls:22,vars:13,consts:[["pageFilterTemplate",""],["tooltipTitle","Identify and manage unsold inventory that has been stagnant for a long time",3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter","column"],["ngProjectAs","actions",5,["actions"]],[1,"btn","btn-outline-secondary","me-3"],["ngProjectAs","filters",5,["filters"]],["ngProjectAs","content",5,["content"]],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table","border-bottom",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","VariantName",2,"width","20%"],["mat-sort-header","VariantCode",2,"width","20%"],["mat-sort-header","OnHand",2,"width","10%"],["mat-sort-header","DirectAllocated",2,"width","10%"],["mat-sort-header","IndirectAllocated",2,"width","10%"],["mat-sort-header","Available",2,"width","10%"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"d-flex","flex-column","gap-4"],["placeholder","Choose Outlets (Leave Blank to Choose All)",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],["bindLabel","Value","bindValue","Key","placeholder","Choose Brand",3,"ngModelChange","items","ngModel"],["ng-option-tmp",""],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose Tag",3,"ngModelChange","items","ngModel"],[1,"d-flex","align-items-center",2,"column-gap","8px"],["type","number","name","QuantityFrom",1,"form-control","input-filter",3,"ngModelChange","ngModel"],["type","number","name","QuantityTo",1,"form-control","input-filter",3,"ngModelChange","ngModel"],["matTooltipPosition","above",3,"matTooltip"],[3,"routerLink","queryParams"],["api","inventory/GetCountInventoryComposite",3,"jumpToPage","previousPage","nextPage","total","pageData"]],template:function(c,t){if(c&1){let l=T();o(0,"mainpanel-cmp",1),f("textChange",function(u){return C(l),x(t.pageData.Filter.SearchText,u)||(t.pageData.Filter.SearchText=u),_(u)}),V("onSubmit",function(){return C(l),_(t.searchFromPageOne())}),f("filterChange",function(u){return C(l),x(t.pageData.Filter,u)||(t.pageData.Filter=u),_(u)}),F(1,2),d(2,De,3,0,"button",3),M(),F(3,4),A(4,we,25,10,"ng-template",null,0,G),M(),F(6,5),o(7,"div",6)(8,"div",7)(9,"table",8),V("matSortChange",function(u){return C(l),_(t.sortData(u))}),o(10,"thead",9)(11,"tr"),d(12,Te,2,1,"th",10),d(13,Ve,2,1,"th",11),d(14,be,2,1,"th",12),d(15,Pe,2,1,"th",13),d(16,Fe,2,1,"th",14),d(17,Me,2,1,"th",15),a()(),o(18,"tbody"),N(19,ke,8,6,"tr",null,B),a()()(),d(21,Qe,2,2,"div"),a(),M(),a()}c&2&&(g("pageData",t.menuData),v("text",t.pageData.Filter.SearchText),g("isFilterOnDropdown",!1),v("filter",t.pageData.Filter),g("column",t.column),i(2),s(t.roleService.global.Export?2:-1),i(10),s(t.column.VariantName&&t.column.VariantName.selected?12:-1),i(),s(t.column.VariantCode&&t.column.VariantCode.selected?13:-1),i(),s(t.column.OnHand&&t.column.OnHand.selected?14:-1),i(),s(t.column.DirectAllocated&&t.column.DirectAllocated.selected?15:-1),i(),s(t.column.IndirectAllocated&&t.column.IndirectAllocated.selected&&t.totalIndirect()>0?16:-1),i(),s(t.column.Available&&t.column.Available.selected?17:-1),i(2),H(t.infiniteList),i(2),s(t.data?21:-1))},dependencies:[ge,ue,ve,ye,$,U,Z,X,Y,de,pe,me,ie,ne,fe,xe,z,K,re,oe,ae,q],styles:["[_nghost-%COMP%]{display:block}"]})};export{Ie as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as P}from"./chunk-
|
|
1
|
+
import{a as P}from"./chunk-IRGMPCNS.js";import{a as w}from"./chunk-VL552ANV.js";import{a as C}from"./chunk-6P2ASCNY.js";import{a as A}from"./chunk-E7RGLETU.js";import{a as I}from"./chunk-ZTD4APMR.js";import{a as l}from"./chunk-2FWFPV5I.js";import{a as c}from"./chunk-WUV22SZ4.js";import{fa as y,pa as f,t as L,z as S}from"./chunk-IEVGW2RT.js";import{a as F}from"./chunk-SNAKHGZS.js";var g=class{enabledDragItem;constructor(){this.enabledDragItem=!1}drop(o,t){C(t.Data,o.previousIndex,o.currentIndex)}toggleEnabledDragItem(){}onSaveDragAndDrop(o,t){this.enabledDragItem=!this.enabledDragItem,this.enabledDragItem||t.postListID(o,t.data.Data)}onPutSaveDragAndDrop(o,t){this.enabledDragItem=!this.enabledDragItem,this.enabledDragItem||t.putListID(o,t.data.Data)}};var u=class{constructor(o){this.httpService=o}exportCSV(o,t,e,i){e.pageData.Filter.Export=!0,e.pageData.Filter.FormatType=0,i=i||"export.csv",this.httpService.post(`/api/${t}`,e.pageData.Filter).subscribe(r=>{o.convertToCSV(r,i),e.pageData.Filter.Export=!1})}convertToCSV(o,t=!1,e){let i=this.ExportDataFromUI2(t);o.convertToCSV(i,e)}ExportDataFromUI2(o=!1){let t=document.getElementById("tableGrid"),e=[];return c.IsNotEmpty(t)&&t.querySelectorAll("tr").forEach(r=>{let a=new Object,s=0;r.querySelectorAll("th, td").forEach(n=>{s++;let b=parseInt(n.getAttribute("colspan"));for(let h=1;h<b;h++)a["column"+s]="",s++;let m=n.innerText,v=m.toString().split("");if(o&&v[0]==="0"&&v.length>1){let h="'"+m.trim();a["column"+s]=h}else a["column"+s]=m.trim()}),e.push(a)}),e}};var d=class{listTotal;pageSize;show;constructor(){this.listTotal=0,this.pageSize=0,this.show=!1}changePaginationData(o){this.pageSize=o.pageData.Filter.RowCount,this.listTotal=o.data?.ListTotal??o.data?.Data?.total?.value,this.show=this.pageSize<=this.listTotal}changePage(o,t,e){t.Filter.PageNumber=o.pageIndex+1,e.getListData()}};var x=class extends A{constructor(t,e,i,r,a,s,p){super(t);this.httpService=e;this.dataAPI=i;this.pageAPI=r;this.toastrService=a;this.route=s;this.initOpenDialog=p;this.exportHandler=new u(e),r?(s&&(this.loaderPayload=F({ListIDs:this.reportFilterService?.initOutletFilter()},s.snapshot.queryParams)),this.preInitLoader(),S([this.menuData$,this.httpService.post("/api/"+this.pageAPI,this.loaderPayload)]).pipe(L(([n,b])=>b)).pipe(I()).subscribe(n=>{this.pageData=n,this.pageData.Filter||(this.pageData.Filter={},this.pageData.Filter.RowCount=20),this.pageData.Filter.PageNumber=1,this.pageData.Filter.ID=this.loaderPayload.ID,this.preInitList(),p?this.openDialogFilter.openDialog():this.getListData()})):(this.pageData.Filter.RowCount=20,this.pageData.Filter.PageNumber=1,this.preInitList(),S({menuData:this.menuData$,listData:this.getListData$()}).pipe(I()).subscribe())}openDialogFilter=f(w);reportFilterService=f(P);pageData={Filter:{},Options:{},Roles:{},Config:{}};data;pagination=new d;dragDrop=new g;exportHandler;comparation=0;loaderPayload={};preInitLoader(){}preInitList(){}getListData(t){this.preGetList(),this.dataAPI&&this.httpService.post("/api/"+this.dataAPI,this.pageData.Filter).subscribe(e=>{this.data=e,this.postInit(e),this.pagination.changePaginationData(this),t&&(this.pageData.HideStoreApiCount=!1)})}getListData$(t){return this.preGetList(),this.httpService.post("/api/"+this.dataAPI,this.pageData.Filter).pipe(y(e=>{this.data=e,this.postInit(e),this.pagination.changePaginationData(this),t&&(this.pageData.HideStoreApiCount=!1)}))}searchFromPageOne(){this.preSearchFromPageOne(),this.pageData.Filter.PageNumber=1,this.getListData("filterMode")}postInit(t){t.PageTitle!=null&&(this.menuData.H=t.PageTitle)}preGetList(){this.pageData.Filter.From==null&&(this.pageData.Filter.From=c.MinDate),this.pageData.Filter.To==null&&(this.pageData.Filter.To=c.MinDate)}preSearchFromPageOne(){}onPaginationChange(t){this.pagination.changePage(t,this.pageData,this)}onSelectAllData(t){this.data.Data=this.data.Data.map(e=>(e.selected=t,e))}getSelectedData(){let t=[];return this.data&&(t=this.data.Data.filter(e=>e.selected)),t}httpPostListID(t,e,i){if(e||(e="Are you sure you want to selected record/s?"),confirm(e)==!1)return;let r=this.getSelectedData();r.length>0&&this.postListID(t,r,i)}httpPutListID(t,e,i){if(e||(e="Are you sure you want to selected record/s?"),confirm(e)==!1)return;let r=this.getSelectedData();r.length>0&&this.putListID(t,r,i)}httpDeleteListID(t,e,i){if(e||(e="Are you sure you want to delete selected record/s?"),confirm(e)==!1)return;let r=this.getSelectedData();r.length>0&&this.DeleteListID(t,r,i)}onSaveDragAndDrop(t){this.dragDrop.onSaveDragAndDrop(t,this)}onPutSaveDragAndDrop(t){this.dragDrop.onPutSaveDragAndDrop(t,this)}postListID(t,e,i){let r=e.map(a=>i?a[i]:a.ID);this.httpService.post(`/api/${t}`,r,1e6,!0).subscribe(a=>{this.toastrService.success(a.Message?a.Message:a,l.Success),this.getListData()},a=>{let s=a.status+" "+a.statusText;this.toastrService.error(a.error.Message!=""?a.error.Message:"An unknown error has occured!",s,{enableHtml:!0})})}putListID(t,e,i){let r=e.map(a=>i?a[i]:a.ID);this.httpService.put(`/api/${t}`,r).subscribe(a=>{this.toastrService.success(a.Message?a.Message:a,l.Success),this.afterPutListSuccess(),this.getListData()})}afterPutListSuccess(){}DeleteListID(t,e,i){let r=e.map(a=>i?a[i]:a.ID);this.httpService.delete(`/api/${t}`,{body:r}).subscribe(a=>{this.toastrService.success(a.Message?a.Message:a,l.Success),this.getListData()})}postData(t,e){this.httpService.post("/API/"+t,e).subscribe(i=>{this.getListData(),this.toastrService.success(i.Message?i.Message:i,l.Success)})}compare(t,e,i){return(t<e?-1:1)*(i?1:-1)}exportCSV(t,e,i){this.exportHandler.exportCSV(t,e,this,i)}s2ab(t){for(var e=new ArrayBuffer(t.length),i=new Uint8Array(e),r=0;r!=t.length;++r)i[r]=t.charCodeAt(r)&255;return e}exportXlsx(t,e){this.pageData.Filter.FormatType=1,this.pageData.Filter.Export=!0,this.httpService.post(`/api/${t}`,this.pageData.Filter).subscribe(i=>{e=decodeURI(e);let r=window.URL.createObjectURL(new Blob([this.s2ab(atob(i))],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,"})),a=document.createElement("a");a.href=r,a.setAttribute("download",e),document.body.appendChild(a),a.click(),window.URL.revokeObjectURL(r),a.remove()})}convertToCSV(t,e=!1,i){let r=this.exportHandler.ExportDataFromUI2(e);t.convertToCSV(r,i)}OnCompare(t){let e=t?this.data[t]:this.data;if(e.length<1)return;let i=Object.assign({},this.pageData.Filter);i.From=new Date(new Date(this.pageData.Filter.From).getFullYear(),new Date(this.pageData.Filter.From).getMonth()-1,1),i.To=new Date(new Date(this.pageData.Filter.To).getFullYear(),new Date(this.pageData.Filter.To).getMonth(),0).toDateString(),this.httpService.post("/API/"+this.dataAPI,i).subscribe(r=>{let a=t?r[t]:r;this.comparation=0,e.forEach(s=>{s.PrevIndex="-",s.CurrentIndex="-",s.Increase="-";let p=a.filter(n=>n.EntityID==s.EntityID);if(s.CurrentIndex=s.Rank,p.length>0){let n=p[0];s.PrevIndex=n.Rank,n.SalesNet?s.Increase=(s.SalesNet-n.SalesNet)/n.SalesNet*100:n.Sales&&(s.Increase=(s.Sales-n.Sales)/n.Sales*100),s.IsPositive=s.Increase>0,s.IsNegative=s.Increase<0,this.comparation+=s.Increase}})})}};export{x as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f}from"./chunk-
|
|
1
|
+
import{c as f}from"./chunk-GUN3GLFK.js";import{a as m}from"./chunk-WMLA5VC3.js";import{p as v,s as u}from"./chunk-LGOSIAUC.js";import{Cd as h,Gd as l,I as c,k as n,la as s,oa as e}from"./chunk-IEVGW2RT.js";var d=class o{constructor(t,r,p,i){this.httpService=t;this.authService=r;this.httpClientService=p;this.toastr=i}port=window.location.href.split("localhost:")[1]?.split("/")[0];hostURL=t=>m.production?t:`https://localhost:${this.port}${t}`;configure2FA(t){return this.httpService.post("/api/Authentication/Setup_2FA",t)}validateCode(t,r){let p=this.authService.loginResponse?.Token,i=new h({"Content-Type":"application/json","Cache-Control":"no-cache"});i=i.append("Authorization","Bearer "+p);let S={ValidationCode:t,UserID:r};return this.httpClientService.post(this.hostURL("/api/Login/Validate_2FA "),S,{headers:i}).pipe(c(a=>(this.toastr.error(a?.error?.Message,"Error - "+a.status),n)))}disableTwoFactorAuthentication(){let t={enabled:!1};return this.httpService.post("/api/Authentication/Setup_2FA",t)}static \u0275fac=function(r){return new(r||o)(e(u),e(f),e(l),e(v))};static \u0275prov=s({token:o,factory:o.\u0275fac,providedIn:"root"})};export{d as a};
|