dealpos 25.50.0 → 25.50.1
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-4YZVDERU.js → chunk-2EP6XDTW.js} +1 -1
- package/browser/chunk-33OKCUGA.js +1 -0
- package/browser/{chunk-KUF3JPB2.js → chunk-34U6PVY5.js} +1 -1
- package/browser/{chunk-QWB3USYP.js → chunk-3FAXTVQI.js} +2 -2
- package/browser/{chunk-X2GHGFH2.js → chunk-42EJHS3A.js} +1 -1
- package/browser/{chunk-TTCSYFRX.js → chunk-467KNI4M.js} +1 -1
- package/browser/{chunk-3CUT73ZP.js → chunk-4I3C6CNY.js} +1 -1
- package/browser/{chunk-FMKY4THI.js → chunk-5Y24QJWR.js} +1 -1
- package/browser/{chunk-2FJNMKCN.js → chunk-6ACGUR3D.js} +1 -1
- package/browser/{chunk-F765TCAS.js → chunk-6DMG2LMI.js} +1 -1
- package/browser/{chunk-BFNGPKGX.js → chunk-7HOW5QOQ.js} +1 -1
- package/browser/{chunk-LIXEWT4U.js → chunk-7IKZACPQ.js} +1 -1
- package/browser/{chunk-4KYROBKJ.js → chunk-7MCT2FSH.js} +1 -1
- package/browser/{chunk-O3ENARQZ.js → chunk-7NFGGAUY.js} +1 -1
- package/browser/{chunk-BZ3GMUQ7.js → chunk-7WB7XD5V.js} +2 -2
- package/browser/chunk-A72QOXN4.js +4 -0
- package/browser/{chunk-BQ7QT5RB.js → chunk-B534JAF4.js} +1 -1
- package/browser/{chunk-GESNWWTD.js → chunk-BEXFUC6A.js} +1 -1
- package/browser/{chunk-2ENLMKGR.js → chunk-BFTWW3SB.js} +1 -1
- package/browser/{chunk-FSOHJLXB.js → chunk-BKZYMEVP.js} +1 -1
- package/browser/{chunk-G3DZI5XK.js → chunk-BNX6XXDZ.js} +1 -1
- package/browser/{chunk-PIAQ4TBN.js → chunk-BOQBXDOK.js} +1 -1
- package/browser/{chunk-BLEJLNEO.js → chunk-C4M7VQFI.js} +1 -1
- package/browser/{chunk-2ITJBRJU.js → chunk-CCWIK546.js} +1 -1
- package/browser/{chunk-OZ3MKU4C.js → chunk-CI4ULOBO.js} +1 -1
- package/browser/{chunk-3AZAILT2.js → chunk-CMKONRKZ.js} +1 -1
- package/browser/{chunk-JCLYKROE.js → chunk-CUDCXMJN.js} +1 -1
- package/browser/{chunk-CCJ6SHBL.js → chunk-DIFPP2ZV.js} +1 -1
- package/browser/{chunk-DYBRYTEM.js → chunk-DMWJZNTI.js} +1 -1
- package/browser/{chunk-7L5VMLEF.js → chunk-DU2VBWSN.js} +1 -1
- package/browser/{chunk-MFJH22SW.js → chunk-E2NGOMCD.js} +1 -1
- package/browser/{chunk-T7PBUS2H.js → chunk-E4L4PN2C.js} +1 -1
- package/browser/{chunk-CXWICNFP.js → chunk-EUSVY4UJ.js} +1 -1
- package/browser/{chunk-5SIEW7SH.js → chunk-FIHBOJV4.js} +1 -1
- package/browser/{chunk-3ZWJMFYL.js → chunk-HGD6HRSU.js} +1 -1
- package/browser/{chunk-S65MPEJS.js → chunk-HNTY7S25.js} +1 -1
- package/browser/{chunk-GBSRXCWH.js → chunk-HRM7HE6Z.js} +1 -1
- package/browser/{chunk-FV4MYFQI.js → chunk-I3SVXKZW.js} +1 -1
- package/browser/{chunk-M2HEFQUY.js → chunk-IGDDA2RG.js} +1 -1
- package/browser/{chunk-A5CTHLE4.js → chunk-J36LAI7P.js} +1 -1
- package/browser/{chunk-COL56R4A.js → chunk-JAUNAK7P.js} +1 -1
- package/browser/{chunk-PXIMA665.js → chunk-JIE2RXLX.js} +2 -2
- package/browser/{chunk-LIX7XJ55.js → chunk-JL4CFBF2.js} +1 -1
- package/browser/{chunk-Y7KCHRMM.js → chunk-JVNUQR5F.js} +1 -1
- package/browser/{chunk-RE6SQEP6.js → chunk-JZTKA4ST.js} +1 -1
- package/browser/{chunk-PLR55YR2.js → chunk-KAPQ56CY.js} +1 -1
- package/browser/{chunk-ISQHQTAS.js → chunk-L5UAK2LQ.js} +1 -1
- package/browser/{chunk-MZSJCSUV.js → chunk-NEP77MPC.js} +2 -2
- package/browser/{chunk-YUILNWDI.js → chunk-NYZIEOHQ.js} +1 -1
- package/browser/chunk-NZLZ6H6Q.js +1 -0
- package/browser/{chunk-HFOJZ3B5.js → chunk-OEUCWGFD.js} +1 -1
- package/browser/{chunk-SOW7VMSU.js → chunk-OQI4P5JW.js} +1 -1
- package/browser/{chunk-XSZJISVJ.js → chunk-OWS3IW26.js} +1 -1
- package/browser/{chunk-KZBVWICA.js → chunk-OZTSXG5Y.js} +1 -1
- package/browser/{chunk-CB6QEEJX.js → chunk-PASO7BB6.js} +1 -1
- package/browser/{chunk-HFZ437GH.js → chunk-PFIN2VSA.js} +1 -1
- package/browser/{chunk-G5JGQBAG.js → chunk-PYSTCFF2.js} +1 -1
- package/browser/{chunk-2SZZVWQD.js → chunk-R4NTCBWJ.js} +2 -2
- package/browser/{chunk-PV4YHZX5.js → chunk-R7KECBQD.js} +1 -1
- package/browser/{chunk-4MQZXTMM.js → chunk-REZUKRTR.js} +1 -1
- package/browser/{chunk-WXYXGYFH.js → chunk-RRIGLMUN.js} +1 -1
- package/browser/{chunk-T3ZHKT2K.js → chunk-RSDLXHSH.js} +1 -1
- package/browser/{chunk-Y5DX5U5Q.js → chunk-RTYMNLFW.js} +1 -1
- package/browser/{chunk-7MJWZXSK.js → chunk-S3IZOS7R.js} +2 -2
- package/browser/{chunk-YLEKN2EU.js → chunk-SLTQIIWW.js} +1 -1
- package/browser/{chunk-2KI73XNT.js → chunk-TNHTSFQM.js} +1 -1
- package/browser/{chunk-QZRMHLML.js → chunk-TRCRCGLM.js} +1 -1
- package/browser/{chunk-CZHWPDAM.js → chunk-TWS5PR4T.js} +1 -1
- package/browser/{chunk-GRLVYPPM.js → chunk-TY24TZEK.js} +1 -1
- package/browser/{chunk-PVBS6SYW.js → chunk-ULNAGOA3.js} +1 -1
- package/browser/{chunk-SBTTKQ4L.js → chunk-UU4IU25V.js} +1 -1
- package/browser/{chunk-UZN4OKOJ.js → chunk-VIZOMY6L.js} +2 -2
- package/browser/{chunk-SK6Y77W4.js → chunk-VOTRMLKO.js} +1 -1
- package/browser/{chunk-HFDJ5XSI.js → chunk-VXTQ5VEM.js} +1 -1
- package/browser/{chunk-GDQGP7DV.js → chunk-W26SBQKL.js} +1 -1
- package/browser/{chunk-S4D5UGSM.js → chunk-WC6DBADN.js} +1 -1
- package/browser/{chunk-IPPIH4F4.js → chunk-WK7YCGTV.js} +1 -1
- package/browser/{chunk-Q3DS2RLM.js → chunk-WOLF2DPX.js} +1 -1
- package/browser/{chunk-B7BVEOOI.js → chunk-XAT2P7QI.js} +1 -1
- package/browser/{chunk-ISN5K6K2.js → chunk-XLKF6N3S.js} +1 -1
- package/browser/{chunk-XFAV2VZL.js → chunk-XPR2GPHE.js} +1 -1
- package/browser/{chunk-YBUERVXV.js → chunk-XSNUFD7O.js} +1 -1
- package/browser/{chunk-A6Z5ZHVO.js → chunk-ZT57H2NK.js} +1 -1
- package/browser/index.html +2 -2
- package/browser/{main-4PHVOJ3C.js → main-EWD2LJE4.js} +2 -2
- package/package.json +1 -1
- package/browser/chunk-EAEOJMTA.js +0 -4
- package/browser/chunk-PHYDJ3P5.js +0 -1
- package/browser/chunk-PMDFKXZY.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ce,b as de,c as _e,d as se,e as ge,f as ue}from"./chunk-DYBRYTEM.js";import"./chunk-PHH2AA3W.js";import"./chunk-Y7KCHRMM.js";import"./chunk-DTVCBHPA.js";import"./chunk-5USF4MRW.js";import{a as te}from"./chunk-363IDTE3.js";import{a as ee}from"./chunk-QZZ2NRA3.js";import"./chunk-FAED643P.js";import{e as me}from"./chunk-WMZLH4YK.js";import"./chunk-72RZBOHX.js";import"./chunk-3RK6DDJD.js";import"./chunk-M3DKYPGC.js";import"./chunk-6WATOQG3.js";import"./chunk-VM4K4MNV.js";import"./chunk-XTCEZONP.js";import"./chunk-LNDHYAFW.js";import{d as re,e as le}from"./chunk-5ZD6KTDH.js";import"./chunk-ZZBF7AOW.js";import{c as pe}from"./chunk-B7BVEOOI.js";import{b as $}from"./chunk-VXPORXGI.js";import{a as Y}from"./chunk-T3ZHKT2K.js";import"./chunk-HFOJZ3B5.js";import"./chunk-L6PKNRWO.js";import"./chunk-SIQZO2WM.js";import{a as ie}from"./chunk-J6M7UWVR.js";import{e as oe,f as ae}from"./chunk-BFNGPKGX.js";import"./chunk-G3DZI5XK.js";import"./chunk-7YUPYNWQ.js";import"./chunk-2CL5FM3P.js";import"./chunk-LGINK7BD.js";import"./chunk-IKKPP4JS.js";import"./chunk-QPAUI5EG.js";import"./chunk-45E6XCHN.js";import"./chunk-SIDUUVNA.js";import"./chunk-KZFNI67M.js";import"./chunk-4BXCIT62.js";import"./chunk-D4FCXEV4.js";import"./chunk-6P2ASCNY.js";import"./chunk-OZ3MKU4C.js";import{b as ne}from"./chunk-JCLYKROE.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import{b as U,c as X}from"./chunk-JBS5UYZC.js";import"./chunk-TEGIL5RZ.js";import"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import"./chunk-THT6CY5E.js";import{g as Z}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-S7FOJJP2.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import{oa as K}from"./chunk-SLX34TWD.js";import{F as G,c as k,h as Q,o as j,q}from"./chunk-DWZ5JTI2.js";import"./chunk-KZBVWICA.js";import"./chunk-SBTTKQ4L.js";import"./chunk-36GWLMZX.js";import{b as J}from"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-EAEOJMTA.js";import{s as z}from"./chunk-LGOSIAUC.js";import{Ab as E,Fb as p,Fc as _,Gb as o,Gc as s,Hb as i,Hc as D,Ib as f,Jd as W,Lc as O,Pb as I,Qd as A,Sb as h,Sd as N,Ub as m,Xa as a,eb as C,hc as l,ib as B,ic as M,jc as g,jd as L,mb as F,mc as v,nc as S,ob as x,oc as b,sc as V,sd as R,ta as u,ua as y,vd as H,xc as T,yb as P,yc as w}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var Ce=()=>({"min-width":"50rem","font-family":"Roboto, sans-serif"}),xe=()=>["/menu/Products/Catalog/Products"],ye=t=>({CategoryID:t}),ve=()=>["/menu/Inventory/Quantity/Valuation"];function Se(t,c){if(t&1){let e=I();o(0,"button",10),h("click",function(){u(e);let n=m(2);return y(n.openExportModal())}),f(1,"i",11),l(2," Export "),i()}}function be(t,c){if(t&1){let e=I();o(0,"div",12)(1,"h6"),l(2,"Outlet"),i(),o(3,"outlet-selector",13),b("ngModelChange",function(n){u(e);let d=m(2);return S(d.pageData.Filter.ListIDs,n)||(d.pageData.Filter.ListIDs=n),y(n)}),i(),o(4,"h6"),l(5,"Quantity From - To"),i(),o(6,"div",14)(7,"input",15),b("ngModelChange",function(n){u(e);let d=m(2);return S(d.pageData.Filter.QuantityFrom,n)||(d.pageData.Filter.QuantityFrom=n),y(n)}),i(),o(8,"span",16),l(9,"-"),i(),o(10,"input",17),b("ngModelChange",function(n){u(e);let d=m(2);return S(d.pageData.Filter.QuantityTo,n)||(d.pageData.Filter.QuantityTo=n),y(n)}),i()(),o(11,"h6"),l(12,"Discontinued"),i(),o(13,"radio-options",18),b("modelChange",function(n){u(e);let d=m(2);return S(d.pageData.Filter.Discontinued,n)||(d.pageData.Filter.Discontinued=n),y(n)}),i()()}if(t&2){let e=m(2);a(3),p("multiple",!0)("accessType",2),v("ngModel",e.pageData.Filter.ListIDs),a(4),v("ngModel",e.pageData.Filter.QuantityFrom),a(3),v("ngModel",e.pageData.Filter.QuantityTo),a(3),v("model",e.pageData.Filter.Discontinued),p("options",e.pageData.Options.Discontinued)}}function Ie(t,c){t&1&&(o(0,"th",27),l(1," Cost "),f(2,"p-treeTableSortIcon",28),i())}function Te(t,c){t&1&&(o(0,"th",29),l(1," Price "),f(2,"p-treeTableSortIcon",30),i())}function De(t,c){t&1&&(o(0,"th",31),l(1," % "),f(2,"p-treeTableSortIcon",32),i())}function he(t,c){if(t&1&&(o(0,"tr",19)(1,"th",20),l(2," Category "),f(3,"p-treeTableSortIcon",21),i(),o(4,"th",22),l(5," On Hand "),f(6,"p-treeTableSortIcon",23),i(),x(7,Ie,3,0,"th",24)(8,Te,3,0,"th",25)(9,De,3,0,"th",26),i()),t&2){let e=m(2);a(7),p("ngIf",e.roleService.product.Cost),a(),p("ngIf",e.roleService.product.Price),a(),p("ngIf",e.roleService.product.Cost&&e.roleService.product.Price)}}function we(t,c){if(t&1&&(o(0,"td"),l(1),_(2,"amountFraction"),i()),t&2){let e=m().rowData;a(),g(" ",s(2,1,e.DisplayedCost)," ")}}function Be(t,c){if(t&1&&(o(0,"td"),l(1),_(2,"amountFraction"),i()),t&2){let e=m().rowData;a(),g(" ",s(2,1,e.DisplayedPrice)," ")}}function Fe(t,c){if(t&1&&(o(0,"td")(1,"span",38),_(2,"number"),l(3),_(4,"number"),i()()),t&2){let e=m().rowData;a(),p("matTooltip",D(2,2,e.DisplayedPercentage,"1.0-5")+"%"),a(2),g(" ",D(4,5,e.DisplayedPercentage,"1.0-0"),"% ")}}function Pe(t,c){if(t&1&&(o(0,"tr",33)(1,"td"),f(2,"p-treeTableToggler",34),o(3,"a",35),l(4),i()(),o(5,"td")(6,"a",36),_(7,"number"),_(8,"number"),_(9,"number"),l(10),_(11,"quantityFraction"),i()(),x(12,we,3,3,"td",37)(13,Be,3,3,"td",37)(14,Fe,5,8,"td",37),i()),t&2){let e=c.$implicit,r=c.rowData,n=m(2);p("ttRow",e),a(2),p("rowNode",e),a(),p("routerLink",T(21,xe))("queryParams",w(22,ye,r.ID)),a(),M(r.Name),a(2),p("matTooltip",V(r.OnHandIndirect&&r.OnHand?"Direct ("+s(7,13,r.OnHand)+") Indirect ("+s(8,15,r.OnHandIndirect)+")":r.OnHandIndirect?"Indirect ("+s(9,17,r.OnHandIndirect)+")":""))("routerLink",T(24,ve))("queryParams",w(25,ye,r.ID)),a(4),g("",s(11,19,r.DisplayedOnHand)," "),a(2),p("ngIf",n.roleService.product.Cost),a(),p("ngIf",n.roleService.product.Price),a(),p("ngIf",n.roleService.product.Cost&&n.roleService.product.Price)}}function Ee(t,c){if(t&1&&(o(0,"td",40),l(1),_(2,"amountFraction"),i()),t&2){let e=m(3);a(),g(" ",s(2,1,e.data==null||e.data.Aggregate==null?null:e.data.Aggregate.TotalCost)," ")}}function Me(t,c){if(t&1&&(o(0,"td",40),l(1),_(2,"amountFraction"),i()),t&2){let e=m(3);a(),g(" ",s(2,1,e.data==null||e.data.Aggregate==null?null:e.data.Aggregate.TotalPrice)," ")}}function Ve(t,c){if(t&1&&(o(0,"td",40),l(1),_(2,"number"),i()),t&2){let e=m(3);a(),g(" ",D(2,1,e.data==null||e.data.Aggregate==null?null:e.data.Aggregate.TotalPercentage,"1.0-0"),"% ")}}function Oe(t,c){if(t&1&&(o(0,"tr",39)(1,"td",40),l(2,"Total:"),i(),o(3,"td",40),l(4),_(5,"quantityFraction"),i(),x(6,Ee,3,3,"td",41)(7,Me,3,3,"td",41)(8,Ve,3,4,"td",41),i()),t&2){let e=m(2);a(4),g(" ",s(5,4,e.data==null||e.data.Aggregate==null?null:e.data.Aggregate.TotalOnHand)," "),a(2),p("ngIf",e.roleService.product.Cost),a(),p("ngIf",e.roleService.product.Price),a(),p("ngIf",e.roleService.product.Cost&&e.roleService.product.Price)}}function Le(t,c){if(t&1){let e=I();o(0,"mainpanel-cmp",2),h("onSubmit",function(){u(e);let n=m();return y(n.searchFromPageOne())}),b("filterChange",function(n){u(e);let d=m();return S(d.pageData.Filter,n)||(d.pageData.Filter=n),y(n)}),o(1,"actions"),P(2,Se,3,0,"button",3),i(),o(3,"div",4),x(4,be,14,7,"ng-template",null,0,O),i(),o(6,"content")(7,"div",5)(8,"p-treeTable",6),x(9,he,10,3,"ng-template",7)(10,Pe,15,27,"ng-template",8)(11,Oe,9,6,"ng-template",9),i()()()()}if(t&2){let e=m();p("pageData",e.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),v("filter",e.pageData.Filter),a(2),E(e.roleService.global.Export?2:-1),a(6),p("value",e.data.data)("scrollable",!0)("scrollable",!0)("tableStyle",T(9,Ce))}}var fe=class t extends Y{constructor(e,r,n,d,Re,He){super(e,r,"Inventory/GetByCategory","InventoryLoader/GetByCategory");this.httpService=r;this.csvConverter=n;this.pageTitle=d;this.roleService=Re;this.dialog=He}openExportModal(){this.dialog.open($,{data:{title:"Inventory By Category",exportTypes:[{ID:"inventoryexport/GetExportInventoryByCategory",Value:"Default",FileName:"Inventory By Category"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}static \u0275fac=function(r){return new(r||t)(C(ne),C(z),C(ie),C(W),C(J),C(Z))};static \u0275cmp=B({type:t,selectors:[["app-inventory-by-category"]],features:[F],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","hideSearchBox","isFilterOnDropdown","filter","onSubmit","filterChange",4,"ngIf"],[3,"onSubmit","filterChange","pageData","hideSearchBox","isFilterOnDropdown","filter"],[1,"btn","btn-outline-secondary","me-3"],["filters",""],[1,"container-fluid","mt-3"],[3,"value","scrollable","tableStyle"],["pTemplate","header"],["pTemplate","body"],["pTemplate","footer"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["placeholder","Choose Outlet",1,"ng-select-multiple",3,"ngModelChange","multiple","accessType","ngModel"],[1,"d-flex","align-items-center"],["type","number","placeholder","From",1,"form-control",3,"ngModelChange","ngModel"],[1,"mx-3"],["type","number","placeholder","To",1,"form-control",3,"ngModelChange","ngModel"],[3,"modelChange","model","options"],[1,"custom-header"],["ttSortableColumn","Name",1,"text-uppercase"],["field","Name"],["ttSortableColumn","DisplayedOnHand",1,"text-uppercase"],["field","DisplayedOnHand"],["class","text-uppercase","ttSortableColumn","DisplayedCost",4,"ngIf"],["class","text-uppercase","ttSortableColumn","DisplayedPrice",4,"ngIf"],["class","text-uppercase","ttSortableColumn","DisplayedPercentage",4,"ngIf"],["ttSortableColumn","DisplayedCost",1,"text-uppercase"],["field","DisplayedCost"],["ttSortableColumn","DisplayedPrice",1,"text-uppercase"],["field","DisplayedPrice"],["ttSortableColumn","DisplayedPercentage",1,"text-uppercase"],["field","DisplayedPercentage"],[3,"ttRow"],[3,"rowNode"],["target","_blank",3,"routerLink","queryParams"],["matTooltipPosition","above",3,"routerLink","queryParams","matTooltip"],[4,"ngIf"],["matTooltipPosition","above",3,"matTooltip"],[1,"table-footer"],[1,"text-end"],["class","text-end",4,"ngIf"]],template:function(r,n){r&1&&x(0,Le,12,10,"mainpanel-cmp",1),r&2&&p("ngIf",n.data)},dependencies:[H,L,ae,oe,N,A,ue,ce,K,ge,de,_e,se,pe,me,le,re,G,k,q,Q,j,X,U,R,ee,te],styles:[".p-treetable-scrollable-header-box{padding-right:0!important} .p-treetable .p-treetable-thead>tr>th:not(:first-child){text-align:right!important} .p-treetable .p-treetable-tbody>tr>td:not(:first-child){text-align:right!important} .p-treetable-scrollable-footer-box{padding-right:0!important} .table-header-styles, .p-treetable-tfoot td, .p-treetable-thead th{background:#f6f6f6!important;color:#3b3b3b!important;text-transform:uppercase!important;font-weight:700!important;line-height:25px!important;font-size:12px!important;font-family:Roboto,sans-serif!important} .p-component.p-iconwrapper>svg{height:11px!important} .p-treetable .p-treetable-tbody>tr>td{border-bottom-width:1px;border-color:#dee2e6}"]})};export{fe as InventoryByCategoryComponent};
|
|
1
|
+
import{a as ce,b as de,c as _e,d as se,e as ge,f as ue}from"./chunk-DMWJZNTI.js";import"./chunk-PHH2AA3W.js";import"./chunk-JVNUQR5F.js";import"./chunk-DTVCBHPA.js";import"./chunk-5USF4MRW.js";import{a as te}from"./chunk-363IDTE3.js";import{a as ee}from"./chunk-QZZ2NRA3.js";import"./chunk-FAED643P.js";import{e as me}from"./chunk-WMZLH4YK.js";import"./chunk-72RZBOHX.js";import"./chunk-3RK6DDJD.js";import"./chunk-M3DKYPGC.js";import"./chunk-6WATOQG3.js";import"./chunk-VM4K4MNV.js";import"./chunk-XTCEZONP.js";import"./chunk-LNDHYAFW.js";import{d as re,e as le}from"./chunk-5ZD6KTDH.js";import"./chunk-ZZBF7AOW.js";import{c as pe}from"./chunk-XAT2P7QI.js";import{b as $}from"./chunk-VXPORXGI.js";import{a as Y}from"./chunk-RSDLXHSH.js";import"./chunk-OEUCWGFD.js";import"./chunk-L6PKNRWO.js";import"./chunk-SIQZO2WM.js";import{a as ie}from"./chunk-J6M7UWVR.js";import{e as oe,f as ae}from"./chunk-7HOW5QOQ.js";import"./chunk-BNX6XXDZ.js";import"./chunk-7YUPYNWQ.js";import"./chunk-2CL5FM3P.js";import"./chunk-LGINK7BD.js";import"./chunk-IKKPP4JS.js";import"./chunk-QPAUI5EG.js";import"./chunk-45E6XCHN.js";import"./chunk-SIDUUVNA.js";import"./chunk-KZFNI67M.js";import"./chunk-4BXCIT62.js";import"./chunk-D4FCXEV4.js";import"./chunk-6P2ASCNY.js";import"./chunk-CI4ULOBO.js";import{b as ne}from"./chunk-CUDCXMJN.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import{b as U,c as X}from"./chunk-JBS5UYZC.js";import"./chunk-TEGIL5RZ.js";import"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import"./chunk-THT6CY5E.js";import{g as Z}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-S7FOJJP2.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import{oa as K}from"./chunk-SLX34TWD.js";import{F as G,c as k,h as Q,o as j,q}from"./chunk-DWZ5JTI2.js";import"./chunk-OZTSXG5Y.js";import"./chunk-UU4IU25V.js";import"./chunk-36GWLMZX.js";import{b as J}from"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-A72QOXN4.js";import{s as z}from"./chunk-LGOSIAUC.js";import{Ab as E,Fb as p,Fc as _,Gb as o,Gc as s,Hb as i,Hc as D,Ib as f,Jd as W,Lc as O,Pb as I,Qd as A,Sb as h,Sd as N,Ub as m,Xa as a,eb as C,hc as l,ib as B,ic as M,jc as g,jd as L,mb as F,mc as v,nc as S,ob as x,oc as b,sc as V,sd as R,ta as u,ua as y,vd as H,xc as T,yb as P,yc as w}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var Ce=()=>({"min-width":"50rem","font-family":"Roboto, sans-serif"}),xe=()=>["/menu/Products/Catalog/Products"],ye=t=>({CategoryID:t}),ve=()=>["/menu/Inventory/Quantity/Valuation"];function Se(t,c){if(t&1){let e=I();o(0,"button",10),h("click",function(){u(e);let n=m(2);return y(n.openExportModal())}),f(1,"i",11),l(2," Export "),i()}}function be(t,c){if(t&1){let e=I();o(0,"div",12)(1,"h6"),l(2,"Outlet"),i(),o(3,"outlet-selector",13),b("ngModelChange",function(n){u(e);let d=m(2);return S(d.pageData.Filter.ListIDs,n)||(d.pageData.Filter.ListIDs=n),y(n)}),i(),o(4,"h6"),l(5,"Quantity From - To"),i(),o(6,"div",14)(7,"input",15),b("ngModelChange",function(n){u(e);let d=m(2);return S(d.pageData.Filter.QuantityFrom,n)||(d.pageData.Filter.QuantityFrom=n),y(n)}),i(),o(8,"span",16),l(9,"-"),i(),o(10,"input",17),b("ngModelChange",function(n){u(e);let d=m(2);return S(d.pageData.Filter.QuantityTo,n)||(d.pageData.Filter.QuantityTo=n),y(n)}),i()(),o(11,"h6"),l(12,"Discontinued"),i(),o(13,"radio-options",18),b("modelChange",function(n){u(e);let d=m(2);return S(d.pageData.Filter.Discontinued,n)||(d.pageData.Filter.Discontinued=n),y(n)}),i()()}if(t&2){let e=m(2);a(3),p("multiple",!0)("accessType",2),v("ngModel",e.pageData.Filter.ListIDs),a(4),v("ngModel",e.pageData.Filter.QuantityFrom),a(3),v("ngModel",e.pageData.Filter.QuantityTo),a(3),v("model",e.pageData.Filter.Discontinued),p("options",e.pageData.Options.Discontinued)}}function Ie(t,c){t&1&&(o(0,"th",27),l(1," Cost "),f(2,"p-treeTableSortIcon",28),i())}function Te(t,c){t&1&&(o(0,"th",29),l(1," Price "),f(2,"p-treeTableSortIcon",30),i())}function De(t,c){t&1&&(o(0,"th",31),l(1," % "),f(2,"p-treeTableSortIcon",32),i())}function he(t,c){if(t&1&&(o(0,"tr",19)(1,"th",20),l(2," Category "),f(3,"p-treeTableSortIcon",21),i(),o(4,"th",22),l(5," On Hand "),f(6,"p-treeTableSortIcon",23),i(),x(7,Ie,3,0,"th",24)(8,Te,3,0,"th",25)(9,De,3,0,"th",26),i()),t&2){let e=m(2);a(7),p("ngIf",e.roleService.product.Cost),a(),p("ngIf",e.roleService.product.Price),a(),p("ngIf",e.roleService.product.Cost&&e.roleService.product.Price)}}function we(t,c){if(t&1&&(o(0,"td"),l(1),_(2,"amountFraction"),i()),t&2){let e=m().rowData;a(),g(" ",s(2,1,e.DisplayedCost)," ")}}function Be(t,c){if(t&1&&(o(0,"td"),l(1),_(2,"amountFraction"),i()),t&2){let e=m().rowData;a(),g(" ",s(2,1,e.DisplayedPrice)," ")}}function Fe(t,c){if(t&1&&(o(0,"td")(1,"span",38),_(2,"number"),l(3),_(4,"number"),i()()),t&2){let e=m().rowData;a(),p("matTooltip",D(2,2,e.DisplayedPercentage,"1.0-5")+"%"),a(2),g(" ",D(4,5,e.DisplayedPercentage,"1.0-0"),"% ")}}function Pe(t,c){if(t&1&&(o(0,"tr",33)(1,"td"),f(2,"p-treeTableToggler",34),o(3,"a",35),l(4),i()(),o(5,"td")(6,"a",36),_(7,"number"),_(8,"number"),_(9,"number"),l(10),_(11,"quantityFraction"),i()(),x(12,we,3,3,"td",37)(13,Be,3,3,"td",37)(14,Fe,5,8,"td",37),i()),t&2){let e=c.$implicit,r=c.rowData,n=m(2);p("ttRow",e),a(2),p("rowNode",e),a(),p("routerLink",T(21,xe))("queryParams",w(22,ye,r.ID)),a(),M(r.Name),a(2),p("matTooltip",V(r.OnHandIndirect&&r.OnHand?"Direct ("+s(7,13,r.OnHand)+") Indirect ("+s(8,15,r.OnHandIndirect)+")":r.OnHandIndirect?"Indirect ("+s(9,17,r.OnHandIndirect)+")":""))("routerLink",T(24,ve))("queryParams",w(25,ye,r.ID)),a(4),g("",s(11,19,r.DisplayedOnHand)," "),a(2),p("ngIf",n.roleService.product.Cost),a(),p("ngIf",n.roleService.product.Price),a(),p("ngIf",n.roleService.product.Cost&&n.roleService.product.Price)}}function Ee(t,c){if(t&1&&(o(0,"td",40),l(1),_(2,"amountFraction"),i()),t&2){let e=m(3);a(),g(" ",s(2,1,e.data==null||e.data.Aggregate==null?null:e.data.Aggregate.TotalCost)," ")}}function Me(t,c){if(t&1&&(o(0,"td",40),l(1),_(2,"amountFraction"),i()),t&2){let e=m(3);a(),g(" ",s(2,1,e.data==null||e.data.Aggregate==null?null:e.data.Aggregate.TotalPrice)," ")}}function Ve(t,c){if(t&1&&(o(0,"td",40),l(1),_(2,"number"),i()),t&2){let e=m(3);a(),g(" ",D(2,1,e.data==null||e.data.Aggregate==null?null:e.data.Aggregate.TotalPercentage,"1.0-0"),"% ")}}function Oe(t,c){if(t&1&&(o(0,"tr",39)(1,"td",40),l(2,"Total:"),i(),o(3,"td",40),l(4),_(5,"quantityFraction"),i(),x(6,Ee,3,3,"td",41)(7,Me,3,3,"td",41)(8,Ve,3,4,"td",41),i()),t&2){let e=m(2);a(4),g(" ",s(5,4,e.data==null||e.data.Aggregate==null?null:e.data.Aggregate.TotalOnHand)," "),a(2),p("ngIf",e.roleService.product.Cost),a(),p("ngIf",e.roleService.product.Price),a(),p("ngIf",e.roleService.product.Cost&&e.roleService.product.Price)}}function Le(t,c){if(t&1){let e=I();o(0,"mainpanel-cmp",2),h("onSubmit",function(){u(e);let n=m();return y(n.searchFromPageOne())}),b("filterChange",function(n){u(e);let d=m();return S(d.pageData.Filter,n)||(d.pageData.Filter=n),y(n)}),o(1,"actions"),P(2,Se,3,0,"button",3),i(),o(3,"div",4),x(4,be,14,7,"ng-template",null,0,O),i(),o(6,"content")(7,"div",5)(8,"p-treeTable",6),x(9,he,10,3,"ng-template",7)(10,Pe,15,27,"ng-template",8)(11,Oe,9,6,"ng-template",9),i()()()()}if(t&2){let e=m();p("pageData",e.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),v("filter",e.pageData.Filter),a(2),E(e.roleService.global.Export?2:-1),a(6),p("value",e.data.data)("scrollable",!0)("scrollable",!0)("tableStyle",T(9,Ce))}}var fe=class t extends Y{constructor(e,r,n,d,Re,He){super(e,r,"Inventory/GetByCategory","InventoryLoader/GetByCategory");this.httpService=r;this.csvConverter=n;this.pageTitle=d;this.roleService=Re;this.dialog=He}openExportModal(){this.dialog.open($,{data:{title:"Inventory By Category",exportTypes:[{ID:"inventoryexport/GetExportInventoryByCategory",Value:"Default",FileName:"Inventory By Category"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}static \u0275fac=function(r){return new(r||t)(C(ne),C(z),C(ie),C(W),C(J),C(Z))};static \u0275cmp=B({type:t,selectors:[["app-inventory-by-category"]],features:[F],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","hideSearchBox","isFilterOnDropdown","filter","onSubmit","filterChange",4,"ngIf"],[3,"onSubmit","filterChange","pageData","hideSearchBox","isFilterOnDropdown","filter"],[1,"btn","btn-outline-secondary","me-3"],["filters",""],[1,"container-fluid","mt-3"],[3,"value","scrollable","tableStyle"],["pTemplate","header"],["pTemplate","body"],["pTemplate","footer"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["placeholder","Choose Outlet",1,"ng-select-multiple",3,"ngModelChange","multiple","accessType","ngModel"],[1,"d-flex","align-items-center"],["type","number","placeholder","From",1,"form-control",3,"ngModelChange","ngModel"],[1,"mx-3"],["type","number","placeholder","To",1,"form-control",3,"ngModelChange","ngModel"],[3,"modelChange","model","options"],[1,"custom-header"],["ttSortableColumn","Name",1,"text-uppercase"],["field","Name"],["ttSortableColumn","DisplayedOnHand",1,"text-uppercase"],["field","DisplayedOnHand"],["class","text-uppercase","ttSortableColumn","DisplayedCost",4,"ngIf"],["class","text-uppercase","ttSortableColumn","DisplayedPrice",4,"ngIf"],["class","text-uppercase","ttSortableColumn","DisplayedPercentage",4,"ngIf"],["ttSortableColumn","DisplayedCost",1,"text-uppercase"],["field","DisplayedCost"],["ttSortableColumn","DisplayedPrice",1,"text-uppercase"],["field","DisplayedPrice"],["ttSortableColumn","DisplayedPercentage",1,"text-uppercase"],["field","DisplayedPercentage"],[3,"ttRow"],[3,"rowNode"],["target","_blank",3,"routerLink","queryParams"],["matTooltipPosition","above",3,"routerLink","queryParams","matTooltip"],[4,"ngIf"],["matTooltipPosition","above",3,"matTooltip"],[1,"table-footer"],[1,"text-end"],["class","text-end",4,"ngIf"]],template:function(r,n){r&1&&x(0,Le,12,10,"mainpanel-cmp",1),r&2&&p("ngIf",n.data)},dependencies:[H,L,ae,oe,N,A,ue,ce,K,ge,de,_e,se,pe,me,le,re,G,k,q,Q,j,X,U,R,ee,te],styles:[".p-treetable-scrollable-header-box{padding-right:0!important} .p-treetable .p-treetable-thead>tr>th:not(:first-child){text-align:right!important} .p-treetable .p-treetable-tbody>tr>td:not(:first-child){text-align:right!important} .p-treetable-scrollable-footer-box{padding-right:0!important} .table-header-styles, .p-treetable-tfoot td, .p-treetable-thead th{background:#f6f6f6!important;color:#3b3b3b!important;text-transform:uppercase!important;font-weight:700!important;line-height:25px!important;font-size:12px!important;font-family:Roboto,sans-serif!important} .p-component.p-iconwrapper>svg{height:11px!important} .p-treetable .p-treetable-tbody>tr>td{border-bottom-width:1px;border-color:#dee2e6}"]})};export{fe as InventoryByCategoryComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as J}from"./chunk-
|
|
1
|
+
import{c as J}from"./chunk-XAT2P7QI.js";import{a as G}from"./chunk-RSDLXHSH.js";import"./chunk-OEUCWGFD.js";import"./chunk-L6PKNRWO.js";import"./chunk-SIQZO2WM.js";import{e as q,f as z}from"./chunk-7HOW5QOQ.js";import"./chunk-BNX6XXDZ.js";import"./chunk-7YUPYNWQ.js";import"./chunk-2CL5FM3P.js";import"./chunk-QPAUI5EG.js";import"./chunk-45E6XCHN.js";import"./chunk-SIDUUVNA.js";import"./chunk-6P2ASCNY.js";import"./chunk-CI4ULOBO.js";import{b as A}from"./chunk-CUDCXMJN.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import{b as j,c as k}from"./chunk-JBS5UYZC.js";import"./chunk-TEGIL5RZ.js";import"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-S7FOJJP2.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import{F as W,h as B,o as H}from"./chunk-DWZ5JTI2.js";import"./chunk-OZTSXG5Y.js";import"./chunk-UU4IU25V.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-A72QOXN4.js";import{p as V,s as R}from"./chunk-LGOSIAUC.js";import{Bb as x,Db as M,Eb as w,Fb as d,Fc as C,Gb as i,Gc as F,Hb as n,Hc as T,Lc as E,Pb as v,Sb as N,Ub as S,Xa as l,eb as c,hc as o,ib as D,ic as u,mb as y,mc as _,nc as b,ob as I,oc as h,qd as P,sd as L,ta as p,ua as s,vd as O}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";function U(r,g){if(r&1){let e=v();i(0,"div")(1,"div",9)(2,"h6"),o(3,"Outlet"),n(),i(4,"outlet-selector",10),h("ngModelChange",function(t){p(e);let m=S();return b(m.pageData.Filter.ListIDs,t)||(m.pageData.Filter.ListIDs=t),s(t)}),n()()()}if(r&2){let e=S();l(4),d("accessType",2),_("ngModel",e.pageData.Filter.ListIDs),d("multiple",!0)}}function X(r,g){if(r&1&&(i(0,"tr")(1,"td"),o(2),n(),i(3,"td"),o(4),C(5,"number"),n(),i(6,"td"),o(7),C(8,"date"),n()()),r&2){let e=g.$implicit;l(2),u(e==null?null:e.EntityName),l(2),u(F(5,3,e==null?null:e.Number)),l(3),u(T(8,5,e==null?null:e.Modified,"dd MMM yyyy HH:mm"))}}var K=class r extends G{constructor(e,a,t){super(e,a,"Setup/Data/TransactionInvoiceNumber",null,t);this.httpService=a}preGetList(){let e=this.pageData.Filter?.ListIDs?this.pageData.Filter?.ListIDs:[];this.pageData.Filter={ListIDs:e}}static \u0275fac=function(a){return new(a||r)(c(A),c(R),c(V))};static \u0275cmp=D({type:r,selectors:[["app-invoice-numbering"]],features:[y],decls:19,vars:4,consts:[["pageFilterTemplate",""],[3,"onSubmit","filterChange","pageData","isFilterOnDropdown","hideSearchBox","filter"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"header"],["matTooltip","Next invoice number index to be generated",2,"width","200px"],[2,"width","200px"],[1,"dialog-filter"],["placeholder","Choose Outlet",3,"ngModelChange","accessType","ngModel","multiple"]],template:function(a,t){if(a&1){let m=v();i(0,"mainpanel-cmp",1),N("onSubmit",function(){return p(m),s(t.searchFromPageOne())}),h("filterChange",function(f){return p(m),b(t.pageData.Filter,f)||(t.pageData.Filter=f),s(f)}),i(1,"filters"),I(2,U,5,3,"ng-template",null,0,E),n(),i(4,"content")(5,"div",2)(6,"div",3)(7,"table",4)(8,"thead",5)(9,"tr",6)(10,"th"),o(11,"Outlet"),n(),i(12,"th",7),o(13," Next Number "),n(),i(14,"th",8),o(15,"Modified"),n()()(),i(16,"tbody"),M(17,X,9,8,"tr",null,x),n()()()()()()}a&2&&(d("pageData",t.menuData)("isFilterOnDropdown",!1)("hideSearchBox",!0),_("filter",t.pageData.Filter),l(17),w(t.data==null?null:t.data.Data))},dependencies:[O,z,q,J,W,B,H,k,j,L,P],encapsulation:2})};export{K as InvoiceNumberingComponent};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{O as b}from"./chunk-TEGIL5RZ.js";import{a as m}from"./chunk-2FWFPV5I.js";import{a as u}from"./chunk-
|
|
1
|
+
import{O as b}from"./chunk-TEGIL5RZ.js";import{a as m}from"./chunk-2FWFPV5I.js";import{a as u}from"./chunk-A72QOXN4.js";import{p as d,s as h}from"./chunk-LGOSIAUC.js";import{la as n,pa as c}from"./chunk-IEVGW2RT.js";import{k as l}from"./chunk-SNAKHGZS.js";var p=class a{constructor(){}copy(t){return new Promise((o,r)=>{try{if(navigator.clipboard)navigator.clipboard.writeText(t).then(o,r);else{let e=document.createElement("textarea");e.value=t,e.style.position="fixed",document.body.appendChild(e),e.focus(),e.select();try{document.execCommand("copy")?o():r(new Error("Failed to copy with execCommand"))}catch(i){r(i)}finally{document.body.removeChild(e)}}}catch(e){r(e)}})}static \u0275fac=function(o){return new(o||a)};static \u0275prov=n({token:a,factory:a.\u0275fac,providedIn:"root"})};var y=class a{toastr=c(d);httpService=c(h);copyToClipBoard=c(p);createCustomerFromNewNumberAndSendReceipt(t,o,r,e,i){r==0?this.httpService.post(b.CreateCustomerInvoice,{InvoiceID:e.ObjectID,Mobile:t}).subscribe(s=>l(this,null,function*(){this.toastr.success(s.Message,m.Success),yield this.sendReceiptToWhatsapp(t,e,o,i)})):this.toastr.info("WABA is not supported yet",m.Info)}createWhatsappReceipt(t,o,r){let e=I=>new Intl.NumberFormat("id-ID",{style:"currency",currency:"IDR"}).format(I).replace("Rp","").trim().split(",00")?.[0],i=JSON.parse(localStorage.getItem("AccountInfo"))?.BrandName,{ObjectID:s,Final:g,InvoiceNumber:f}=t,v=window.location.host,w=`https://receipt.dealpos.app/s?Data=${window.btoa(`${s}_${v}`)}`;return this.convertWhatsappTemplateMessage({Amount:e(g),Brand:i,Currency:o,Number:f,ReceiptLink:w},r)}convertWhatsappTemplateMessage(t,o){let r=o||u?.whatsappTemplateMessage,e=["Brand","Number","Currency","Amount","ReceiptLink"],i=r;return e.forEach(s=>i=i.replace(`{${s}}`,t[s])),i}redirectToWhatsapp(t,o){let r=t;r=r[0]==="0"?`62${r.slice(1)}`:r;let e=`whatsapp://send?phone=${r}&text=${encodeURIComponent(o)}`;window.location.href=e,this.showToastrWhatsappNoInstalled()}showToastrWhatsappNoInstalled(){let t=!1;window.onblur=function(){t=!0},setTimeout(()=>{t||this.toastr.warning(`Currently, sending an e-receipt automatically opens WhatsApp Desktop, provided the device has the app installed
|
|
2
2
|
`,"WhatsApp not installed")},2e3)}copyToClipboard(t){return new Promise((o,r)=>this.copyToClipBoard.copy(t).then(()=>{this.toastr.info("Message copied to clipboard. If WhatsApp doesn't show the message, please paste it manually.","Receipt Ready",{timeOut:8e3}),o("Copied to clipboard")}).catch(e=>{console.log(e),this.toastr.warning("Could not copy message to clipboard","Clipboard Error",{timeOut:8e3}),r(e)}))}sendReceiptToWhatsapp(t,o,r,e){return l(this,null,function*(){try{let i=this.createWhatsappReceipt(o,r,e);try{yield this.copyToClipboard(i)}finally{this.redirectToWhatsapp(t,i)}}catch(i){console.warn(i),this.toastr.error("Failed to send receipt")}})}static \u0275fac=function(o){return new(o||a)};static \u0275prov=n({token:a,factory:a.\u0275fac})};export{y as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as P}from"./chunk-
|
|
1
|
+
import{a as P}from"./chunk-OEUCWGFD.js";import{a as w}from"./chunk-7HOW5QOQ.js";import{a as C}from"./chunk-6P2ASCNY.js";import{a as A}from"./chunk-CUDCXMJN.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 W,d as X}from"./chunk-
|
|
1
|
+
import{c as W,d as X}from"./chunk-HRM7HE6Z.js";import{a as Y,b as Z}from"./chunk-L6PKNRWO.js";import{b as Q,c as U}from"./chunk-JBS5UYZC.js";import{a as B}from"./chunk-B7AC4RMR.js";import{oa as K}from"./chunk-SLX34TWD.js";import{F as J,h as q,o as G}from"./chunk-DWZ5JTI2.js";import{a as d}from"./chunk-WUV22SZ4.js";import{s as C}from"./chunk-LGOSIAUC.js";import{Ab as V,Fb as l,Fc as k,Gb as c,Gc as F,Hb as m,Lc as N,Ob as L,Pb as j,Sb as E,Ub as n,Xa as _,Y as f,Ya as M,ca as S,cc as I,d as x,eb as b,fa as T,ga as u,hc as v,ib as $,jc as R,la as w,nd as P,o as h,oa as O,ob as a,od as z,pa as D,ta as p,ua as g,vd as A,yb as H}from"./chunk-IEVGW2RT.js";var y=class o{signalRClient=D(B);continuedCategories$;allCategories$;_onOpenTreeSelector=new x;onOpenTreeSelector$=this._onOpenTreeSelector.asObservable();constructor(t){this.continuedCategories$=this.onOpenTreeSelector$.pipe(u(this.signalRClient.recacheCategory$),S((e,[i,r])=>r||!e.length?(this.signalRClient.resetCategoryCache(),t.post("/api/catalog/product/GetProductStorageOptions")):h(e),[]),f(1)),this.allCategories$=this.onOpenTreeSelector$.pipe(u(this.signalRClient.recacheCategory$),S((e,[i,r])=>r||!e.length?t.get("/API/catalog/category/SelectOptions"):h(e),[]),f(1))}onOpenTreeSelector(){this._onOpenTreeSelector.next(!0)}forceLoadCategories(){this._onOpenTreeSelector.next(!0)}static \u0275fac=function(e){return new(e||o)(O(C))};static \u0275prov=w({token:o,factory:o.\u0275fac,providedIn:"root"})};function re(o,t){o&1&&L(0)}function ne(o,t){if(o&1&&(c(0,"p-floatLabel",1),a(1,re,1,0,"ng-container",2),c(2,"label",3),v(3,"Category"),m()()),o&2){n();let e=I(3);_(),l("ngTemplateOutlet",e)}}function ae(o,t){o&1&&L(0)}function le(o,t){if(o&1&&a(0,ae,1,0,"ng-container",2),o&2){n();let e=I(3);l("ngTemplateOutlet",e)}}function ce(o,t){if(o&1&&(c(0,"div",6),v(1),m()),o&2){let e=n(2);l("matTooltip",e.selectedCategoryLabel),_(),R(" ",e.selectedCategoryLabel," ")}}function se(o,t){if(o&1){let e=j();c(0,"p-treeSelect",4),k(1,"async"),E("click",function(){p(e);let r=n();return g(r.loadCategories())})("ngModelChange",function(r){p(e);let s=n();return g(s.onSelectCategory(r))})("onClear",function(){p(e);let r=n();return g(r.onClear())}),a(2,ce,2,2,"ng-template",5),m()}if(o&2){let e=n();l("options",F(1,4,e.categories$))("ngModel",e.selectedCategory)("showClear",e.showClear)("placeholder",e.placeholder)}}var ee=class o{constructor(t,e){this.http=t;this.treeSelector=e}continuedCategoriesOnly=!0;categories=[];showClear=!1;showLabel=!1;isInitializedCategoryLabel=!1;placeholder="Select Storage Location";selectedCategory;selectedCategoryID;selectedCategoryIDChange=new M;selectedCategoryLabel;top=0;isLoadCategories=!1;categories$;ngAfterViewInit(){let t=document.querySelector("body");this.top=t.getBoundingClientRect().top*-1}ngOnInit(){this.isInitializedCategoryLabel&&(d.IsEmpty(this.selectedCategoryID)&&d.IsNotEmpty(this.categories)&&(this.selectedCategoryID=this.categories[0]?.key),this.selectedCategory=this.findSelectedCategory(this.categories,this.selectedCategoryID),this.generateLabelSelectedCategory(this.selectedCategory)),this.categories$=this.continuedCategoriesOnly?this.treeSelector.continuedCategories$:this.treeSelector.allCategories$,this.categories$=this.categories$.pipe(T(t=>{this.selectedCategory=this.findSelectedCategory(t,this.selectedCategoryID),this.generateLabelSelectedCategory(this.selectedCategory)}))}onSelectCategory(t){this.selectedCategory=t,this.generateLabelSelectedCategory(this.selectedCategory),this.selectedCategoryID=t?.key,this.selectedCategoryIDChange.emit(this.selectedCategoryID)}generateLabelSelectedCategory(t){if(t){let e=[];this.selectedCategoryLabel="";do e=[...e,t.label],t=t.parent;while(t!==void 0);this.selectedCategoryLabel=e.reverse().join("/")}else this.selectedCategoryLabel=this.placeholder}findSelectedCategory(t,e){if(d.IsNotEmpty(e))for(let i of t){if(i.key===e)return i;{i.children=i.children?i.children:[],i.children=i.children.map(s=>(s.parent=i,s));let r=this.findSelectedCategory(i.children,e);if(r)return r}}else return null}loadCategories(){this.treeSelector.onOpenTreeSelector()}onClear(){this.selectedCategoryID=null,this.selectedCategoryIDChange.emit(this.selectedCategoryID)}static \u0275fac=function(e){return new(e||o)(b(C),b(y))};static \u0275cmp=$({type:o,selectors:[["POS-storage-location-select"]],inputs:{continuedCategoriesOnly:"continuedCategoriesOnly",categories:"categories",showClear:"showClear",showLabel:"showLabel",isInitializedCategoryLabel:"isInitializedCategoryLabel",placeholder:"placeholder",selectedCategoryID:"selectedCategoryID"},outputs:{selectedCategoryIDChange:"selectedCategoryIDChange"},decls:4,vars:1,consts:[["categorySelectTemplate",""],["variant","on",1,"w-100"],[4,"ngTemplateOutlet"],["for","selectCategory",1,"tree-category-label"],["appendTo","body","selectionMode","single","filter","true","filterInputAutoFocus","true","scrollHeight","250px","inputId","selectCategory",3,"click","ngModelChange","onClear","options","ngModel","showClear","placeholder"],["pTemplate","value"],["matTooltipPosition","above",3,"matTooltip"]],template:function(e,i){e&1&&(H(0,ne,4,1,"p-floatLabel",1)(1,le,1,1,"ng-container"),a(2,se,3,6,"ng-template",null,0,N)),e&2&&V(i.showLabel?0:1)},dependencies:[A,P,U,Q,X,W,K,J,q,G,Z,Y,z],styles:[".p-popover.p-component{z-index:10000000000000000000000!important} .p-treeselect-panel .p-treeselect-items-wrapper .p-tree{padding-left:4px!important} .p-float-label .p-inputwrapper-filled~label.tree-category-label{left:.5rem!important}"]})};export{ee as a};
|