dealpos 25.40.0 → 25.40.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.
Files changed (82) hide show
  1. package/browser/{chunk-NRCWDBAJ.js → chunk-2LQ2NHQZ.js} +1 -1
  2. package/browser/{chunk-GSZX7WS2.js → chunk-35KDSBX6.js} +1 -1
  3. package/browser/{chunk-HQQ77WPJ.js → chunk-36RSCYDI.js} +1 -1
  4. package/browser/{chunk-PO6IBZGK.js → chunk-3WK2KXRV.js} +1 -1
  5. package/browser/{chunk-GFRO6FJS.js → chunk-473FVTPP.js} +1 -1
  6. package/browser/{chunk-GFJRKEBT.js → chunk-5MKJM244.js} +1 -1
  7. package/browser/{chunk-75GCAMUG.js → chunk-5N5KE4MY.js} +1 -1
  8. package/browser/chunk-5SWKPDLG.js +112 -0
  9. package/browser/{chunk-WRBL5J73.js → chunk-6NLWIGH6.js} +2 -2
  10. package/browser/{chunk-RWU6A6Q3.js → chunk-72ELHSCV.js} +3 -3
  11. package/browser/{chunk-WNN2QQ2E.js → chunk-7ECY25MM.js} +1 -1
  12. package/browser/{chunk-SZGPES6H.js → chunk-7QN6GHX6.js} +1 -1
  13. package/browser/{chunk-YHUI7RQU.js → chunk-7T2MIRWC.js} +1 -1
  14. package/browser/{chunk-FF3AT4ZZ.js → chunk-7U5P25HF.js} +1 -1
  15. package/browser/chunk-7WXLMY3Y.js +1 -0
  16. package/browser/{chunk-YZLZXXPA.js → chunk-ALVRR7AP.js} +1 -1
  17. package/browser/{chunk-BS5CESBY.js → chunk-AVRQQPAW.js} +1 -1
  18. package/browser/{chunk-XFUISODZ.js → chunk-BNZYBP5J.js} +1 -1
  19. package/browser/{chunk-IBBZCB6S.js → chunk-BZY5WYGN.js} +1 -1
  20. package/browser/{chunk-CWVLKA3Y.js → chunk-CK7WM2TT.js} +1 -1
  21. package/browser/{chunk-V5YHCHGS.js → chunk-DHIWAZHG.js} +1 -1
  22. package/browser/{chunk-4VQB3RCY.js → chunk-DLAMPGGR.js} +1 -1
  23. package/browser/{chunk-CDW6OCYP.js → chunk-DSMI2L5T.js} +1 -1
  24. package/browser/{chunk-LUTFUKOO.js → chunk-E6FVFQLF.js} +1 -1
  25. package/browser/{chunk-2FQZ67ZX.js → chunk-EIIIFOPI.js} +2 -2
  26. package/browser/{chunk-DL2KKY4K.js → chunk-EMYULNEH.js} +1 -1
  27. package/browser/{chunk-KAILKU7Z.js → chunk-EOLAZVGP.js} +1 -1
  28. package/browser/{chunk-GIEZY27V.js → chunk-EVXMHULS.js} +1 -1
  29. package/browser/{chunk-AK4ZY2E5.js → chunk-G7VXLE7P.js} +1 -1
  30. package/browser/{chunk-M2BWMQEH.js → chunk-GHWFKUBT.js} +1 -1
  31. package/browser/{chunk-SSVZIUYC.js → chunk-GKJIHA2W.js} +1 -1
  32. package/browser/chunk-GLMZREQS.js +1 -0
  33. package/browser/{chunk-FMGNA4IZ.js → chunk-HDDWNOWD.js} +2 -2
  34. package/browser/{chunk-QVS25HHW.js → chunk-IY6GPD44.js} +1 -1
  35. package/browser/{chunk-DDK45GSM.js → chunk-J5BO472Y.js} +1 -1
  36. package/browser/{chunk-TF5EIKOX.js → chunk-K7YY7ZAJ.js} +1 -1
  37. package/browser/{chunk-SAMB3PL6.js → chunk-KEYOSYRP.js} +2 -2
  38. package/browser/{chunk-3VCFKFUX.js → chunk-KQI2NIA5.js} +1 -1
  39. package/browser/{chunk-MBJEISU5.js → chunk-LL5JZI2L.js} +1 -1
  40. package/browser/{chunk-E55NVZSM.js → chunk-LOOAI7QV.js} +1 -1
  41. package/browser/{chunk-2S3RIVNA.js → chunk-M24G6C74.js} +1 -1
  42. package/browser/{chunk-GXTAGWTL.js → chunk-M5LR2E34.js} +1 -1
  43. package/browser/{chunk-PO6NDTPF.js → chunk-M6GBM6JE.js} +1 -1
  44. package/browser/{chunk-FQDWWSFZ.js → chunk-MTVFHEYO.js} +1 -1
  45. package/browser/{chunk-3VVEN3CF.js → chunk-NAWIOWEP.js} +1 -1
  46. package/browser/{chunk-KISK5Y3K.js → chunk-NOLZQTM4.js} +1 -1
  47. package/browser/{chunk-5QW6ZGAI.js → chunk-NQ2TILK7.js} +1 -1
  48. package/browser/{chunk-NZDREZVN.js → chunk-OC2FT6HQ.js} +1 -1
  49. package/browser/{chunk-WEKOCTBY.js → chunk-ONJEHKSI.js} +1 -1
  50. package/browser/{chunk-HF4JUBJ3.js → chunk-P74V2E4B.js} +1 -1
  51. package/browser/{chunk-3JE7W7SE.js → chunk-PV3NX34D.js} +1 -1
  52. package/browser/{chunk-QNTE2LGU.js → chunk-PZVW2B3A.js} +1 -1
  53. package/browser/{chunk-FMUENILI.js → chunk-QETBCVAT.js} +1 -1
  54. package/browser/{chunk-FG7XUKIO.js → chunk-QMCLGLNR.js} +1 -1
  55. package/browser/{chunk-JGWDQEEO.js → chunk-R4LM2FUG.js} +1 -1
  56. package/browser/{chunk-C74OK6IO.js → chunk-RA3DDH4S.js} +2 -2
  57. package/browser/{chunk-MS5DBZJS.js → chunk-RSPANR5I.js} +1 -1
  58. package/browser/{chunk-JHXGTHND.js → chunk-SGVMHJSS.js} +1 -1
  59. package/browser/{chunk-SF3HNXGC.js → chunk-TIJTCUAQ.js} +1 -1
  60. package/browser/{chunk-T66DKYFZ.js → chunk-TRNJQNNU.js} +1 -1
  61. package/browser/{chunk-F3TAAANQ.js → chunk-U7UGBRW4.js} +1 -1
  62. package/browser/{chunk-R7LAPYIP.js → chunk-UEYIRK5F.js} +1 -1
  63. package/browser/{chunk-YAT62P4U.js → chunk-UNGORYVO.js} +2 -2
  64. package/browser/{chunk-DNYXHG4D.js → chunk-UZ25ROGJ.js} +1 -1
  65. package/browser/{chunk-4ZNRLNQI.js → chunk-V5YVPSDN.js} +1 -1
  66. package/browser/{chunk-IMLG5BJ7.js → chunk-V6OEZRUP.js} +1 -1
  67. package/browser/{chunk-D2FDNKXB.js → chunk-VPJV65HV.js} +1 -1
  68. package/browser/{chunk-ADURXNZF.js → chunk-WSXU6K3F.js} +1 -1
  69. package/browser/{chunk-GVBPGOE7.js → chunk-XSFFDKMT.js} +1 -1
  70. package/browser/{chunk-E7AAHH2H.js → chunk-Y2XNBH64.js} +13 -13
  71. package/browser/{chunk-BAOWCY34.js → chunk-YCGOXELE.js} +1 -1
  72. package/browser/{chunk-26RUS7IT.js → chunk-YTUAP6TP.js} +2 -2
  73. package/browser/{chunk-YBAZUK5O.js → chunk-Z7Z65PNB.js} +1 -1
  74. package/browser/{chunk-635ZDHSK.js → chunk-ZGRWIAQ2.js} +2 -2
  75. package/browser/{chunk-FXSXZS6W.js → chunk-ZINLH2FL.js} +1 -1
  76. package/browser/{chunk-6WKS4NBT.js → chunk-ZPAWI5X7.js} +1 -1
  77. package/browser/index.html +2 -2
  78. package/browser/{main-PULVISV3.js → main-NDFZJNIA.js} +2 -2
  79. package/package.json +1 -1
  80. package/browser/chunk-CGF5Z4D5.js +0 -1
  81. package/browser/chunk-GMN3233I.js +0 -1
  82. package/browser/chunk-UH3YL7ES.js +0 -112
@@ -1 +1 @@
1
- import{a as me,b as ce,c as de,d as se,e as ue,f as ge}from"./chunk-CWVLKA3Y.js";import"./chunk-KVJTNXOJ.js";import"./chunk-75GCAMUG.js";import"./chunk-2GQKEX5I.js";import"./chunk-XZQMVGBQ.js";import{d as ae,e as re}from"./chunk-VPLAJK5S.js";import{a as $}from"./chunk-GSS2NRMS.js";import{e as pe}from"./chunk-VULOVOPY.js";import"./chunk-HHCO4QOU.js";import"./chunk-3RK6DDJD.js";import"./chunk-7UFQPOGN.js";import{a as ee}from"./chunk-PNM3PGBM.js";import"./chunk-E3TMOYBP.js";import"./chunk-DWOLAWQN.js";import"./chunk-QGGIOQJT.js";import"./chunk-T2PXIPKB.js";import"./chunk-QMCAG2HX.js";import{c as le}from"./chunk-WRBL5J73.js";import{b as Z}from"./chunk-PDV6AI5F.js";import{a as X}from"./chunk-DNYXHG4D.js";import"./chunk-2S3RIVNA.js";import"./chunk-NW73SHIZ.js";import{a as ie}from"./chunk-NDM2ODJP.js";import{d as ne,e as oe}from"./chunk-V5YHCHGS.js";import"./chunk-4VQB3RCY.js";import"./chunk-OMVUFMMZ.js";import"./chunk-TF5EIKOX.js";import"./chunk-T6MTT57B.js";import"./chunk-IFIBQUT3.js";import"./chunk-4L5G4WC4.js";import"./chunk-3NJFM55L.js";import"./chunk-2LFFOWKW.js";import"./chunk-OQCGVZVB.js";import"./chunk-UAI7BPPY.js";import"./chunk-6IW4MVP2.js";import{b as te}from"./chunk-YBAZUK5O.js";import"./chunk-OI2RWAOV.js";import"./chunk-7LXPGNYF.js";import"./chunk-CN5SHMHF.js";import"./chunk-3M5M2T4L.js";import"./chunk-B4IX7BMU.js";import{b as K,c as U}from"./chunk-XOQ4SW2R.js";import"./chunk-A7ZWFYP4.js";import"./chunk-QTAOV4NJ.js";import"./chunk-GIKR6Y2K.js";import"./chunk-3GV7FUAX.js";import{g as Y}from"./chunk-6BL2JKZG.js";import"./chunk-REQUYIUO.js";import"./chunk-QCBXPOJL.js";import"./chunk-T2PMKO3M.js";import"./chunk-2FWFPV5I.js";import{la as J}from"./chunk-OE7PM4Y4.js";import{F as q,c as N,h as k,o as Q,q as j}from"./chunk-CB33ZMNF.js";import"./chunk-GFRO6FJS.js";import"./chunk-FG7XUKIO.js";import{d as z}from"./chunk-TKBUOGER.js";import"./chunk-GIEZY27V.js";import{$a as l,Ac as s,Bc as I,Db as E,Fc as V,Ib as t,Jb as n,Kb as f,Ob as T,Qb as h,Rb as d,Rd as W,Td as A,Ub as M,Yd as G,Zc as O,db as C,ec as a,fc as P,gc as u,gd as L,jc as x,jd as R,kb as F,kc as b,lc as S,ob as B,qb as v,qc as D,rc as w,va as y,vb as c,wa as _,wd as H,zc as m}from"./chunk-DJOHANFC.js";import"./chunk-7DCB7DB2.js";var fe=()=>({"min-width":"50rem","font-family":"Roboto, sans-serif"}),Ce=()=>["/menu/Products/Catalog/Products"],ye=r=>({CategoryID:r}),xe=()=>["/menu/Inventory/Quantity/Valuation"];function be(r,g){if(r&1){let e=T();t(0,"button",10),h("click",function(){y(e);let o=d(2);return _(o.openExportModal())}),f(1,"i",11),a(2," Export "),n()}}function Se(r,g){if(r&1){let e=T();t(0,"div",12)(1,"h6"),a(2,"Outlet"),n(),t(3,"outlet-selector",13),S("ngModelChange",function(o){y(e);let p=d(2);return b(p.pageData.Filter.ListIDs,o)||(p.pageData.Filter.ListIDs=o),_(o)}),n(),t(4,"h6"),a(5,"Quantity From - To"),n(),t(6,"div",14)(7,"input",15),S("ngModelChange",function(o){y(e);let p=d(2);return b(p.pageData.Filter.QuantityFrom,o)||(p.pageData.Filter.QuantityFrom=o),_(o)}),n(),t(8,"span",16),a(9,"-"),n(),t(10,"input",17),S("ngModelChange",function(o){y(e);let p=d(2);return b(p.pageData.Filter.QuantityTo,o)||(p.pageData.Filter.QuantityTo=o),_(o)}),n()(),t(11,"h6"),a(12,"Discontinued"),n(),t(13,"radio-options",18),S("modelChange",function(o){y(e);let p=d(2);return b(p.pageData.Filter.Discontinued,o)||(p.pageData.Filter.Discontinued=o),_(o)}),n()()}if(r&2){let e=d(2);l(3),c("multiple",!0)("accessType",2),x("ngModel",e.pageData.Filter.ListIDs),l(4),x("ngModel",e.pageData.Filter.QuantityFrom),l(3),x("ngModel",e.pageData.Filter.QuantityTo),l(3),x("model",e.pageData.Filter.Discontinued),c("options",e.pageData.Options.Discontinued)}}function ve(r,g){r&1&&(t(0,"tr",19)(1,"th",20),a(2," Category "),f(3,"p-treeTableSortIcon",21),n(),t(4,"th",22),a(5," On Hand "),f(6,"p-treeTableSortIcon",23),n(),t(7,"th",24),a(8," Cost "),f(9,"p-treeTableSortIcon",25),n(),t(10,"th",26),a(11," Price "),f(12,"p-treeTableSortIcon",27),n(),t(13,"th",28),a(14," % "),f(15,"p-treeTableSortIcon",29),n()())}function Te(r,g){if(r&1&&(t(0,"tr",30)(1,"td"),f(2,"p-treeTableToggler",31),t(3,"a",32),a(4),n()(),t(5,"td")(6,"a",33),m(7,"number"),m(8,"number"),m(9,"number"),a(10),m(11,"quantityFraction"),n()(),t(12,"td"),a(13),m(14,"amountFraction"),n(),t(15,"td"),a(16),m(17,"amountFraction"),n(),t(18,"td")(19,"span",34),m(20,"number"),a(21),m(22,"number"),n()()()),r&2){let e=g.$implicit,i=g.rowData;c("ttRow",e),l(2),c("rowNode",e),l(),c("routerLink",D(31,Ce))("queryParams",w(32,ye,i.ID)),l(),P(i.Name),l(2),M("matTooltip",i.OnHandIndirect&&i.OnHand?"Direct ("+s(7,13,i.OnHand)+") Indirect ("+s(8,15,i.OnHandIndirect)+")":i.OnHandIndirect?"Indirect ("+s(9,17,i.OnHandIndirect)+")":""),c("routerLink",D(34,xe))("queryParams",w(35,ye,i.ID)),l(4),u("",s(11,19,i.DisplayedOnHand)," "),l(3),u(" ",s(14,21,i.DisplayedCost)," "),l(3),u(" ",s(17,23,i.DisplayedPrice)," "),l(3),c("matTooltip",I(20,25,i.DisplayedPercentage,"1.0-5")+"%"),l(2),u(" ",I(22,28,i.DisplayedPercentage,"1.0-0"),"% ")}}function De(r,g){if(r&1&&(t(0,"tr",35)(1,"td",36),a(2,"Total:"),n(),t(3,"td",36),a(4),m(5,"quantityFraction"),n(),t(6,"td",36),a(7),m(8,"amountFraction"),n(),t(9,"td",36),a(10),m(11,"amountFraction"),n(),t(12,"td",36),a(13),m(14,"number"),n()()),r&2){let e=d(2);l(4),u(" ",s(5,4,e.data==null||e.data.Aggregate==null?null:e.data.Aggregate.TotalOnHand)," "),l(3),u(" ",s(8,6,e.data==null||e.data.Aggregate==null?null:e.data.Aggregate.TotalCost)," "),l(3),u(" ",s(11,8,e.data==null||e.data.Aggregate==null?null:e.data.Aggregate.TotalPrice)," "),l(3),u(" ",I(14,10,e.data==null||e.data.Aggregate==null?null:e.data.Aggregate.TotalPercentage,"1.0-0"),"% ")}}function Ie(r,g){if(r&1){let e=T();t(0,"mainpanel-cmp",2),h("onSubmit",function(){y(e);let o=d();return _(o.searchFromPageOne())}),S("filterChange",function(o){y(e);let p=d();return b(p.pageData.Filter,o)||(p.pageData.Filter=o),_(o)}),t(1,"actions"),v(2,be,3,0,"button",3),n(),t(3,"div",4),v(4,Se,14,7,"ng-template",null,0,V),n(),t(6,"content")(7,"div",5)(8,"p-treeTable",6),v(9,ve,16,0,"ng-template",7)(10,Te,23,37,"ng-template",8)(11,De,15,13,"ng-template",9),n()()()()}if(r&2){let e=d();c("pageData",e.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),x("filter",e.pageData.Filter),l(2),E(e.roleService.global.Export?2:-1),l(6),c("value",e.data.data)("scrollable",!0)("scrollable",!0)("tableStyle",D(9,fe))}}var _e=class r extends X{constructor(e,i,o,p,he,we){super(e,i,"Inventory/GetByCategory","InventoryLoader/GetByCategory");this.httpService=i;this.csvConverter=o;this.pageTitle=p;this.roleService=he;this.dialog=we}openExportModal(){this.dialog.open(Z,{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(i){return new(i||r)(C(te),C(G),C(ie),C(H),C(z),C(Y))};static \u0275cmp=F({type:r,selectors:[["app-inventory-by-category"]],features:[B],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"],["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"],["matTooltipPosition","above",3,"matTooltip"],[1,"table-footer"],[1,"text-end"]],template:function(i,o){i&1&&v(0,Ie,12,10,"mainpanel-cmp",1),i&2&&c("ngIf",o.data)},dependencies:[R,O,L,oe,ne,A,W,ge,me,J,ue,ce,de,se,$,ee,le,pe,re,ae,q,N,j,k,Q,U,K],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{_e as InventoryByCategoryComponent};
1
+ import{a as me,b as ce,c as de,d as se,e as ue,f as ge}from"./chunk-CK7WM2TT.js";import"./chunk-KVJTNXOJ.js";import"./chunk-5N5KE4MY.js";import"./chunk-2GQKEX5I.js";import"./chunk-XZQMVGBQ.js";import{d as ae,e as re}from"./chunk-VPLAJK5S.js";import{a as $}from"./chunk-GSS2NRMS.js";import{e as pe}from"./chunk-VULOVOPY.js";import"./chunk-HHCO4QOU.js";import"./chunk-3RK6DDJD.js";import"./chunk-7UFQPOGN.js";import{a as ee}from"./chunk-PNM3PGBM.js";import"./chunk-E3TMOYBP.js";import"./chunk-DWOLAWQN.js";import"./chunk-QGGIOQJT.js";import"./chunk-T2PXIPKB.js";import"./chunk-QMCAG2HX.js";import{c as le}from"./chunk-6NLWIGH6.js";import{b as Z}from"./chunk-PDV6AI5F.js";import{a as X}from"./chunk-UZ25ROGJ.js";import"./chunk-M24G6C74.js";import"./chunk-NW73SHIZ.js";import{a as ie}from"./chunk-NDM2ODJP.js";import{d as ne,e as oe}from"./chunk-DHIWAZHG.js";import"./chunk-DLAMPGGR.js";import"./chunk-OMVUFMMZ.js";import"./chunk-K7YY7ZAJ.js";import"./chunk-T6MTT57B.js";import"./chunk-IFIBQUT3.js";import"./chunk-4L5G4WC4.js";import"./chunk-3NJFM55L.js";import"./chunk-2LFFOWKW.js";import"./chunk-OQCGVZVB.js";import"./chunk-UAI7BPPY.js";import"./chunk-6IW4MVP2.js";import{b as te}from"./chunk-Z7Z65PNB.js";import"./chunk-OI2RWAOV.js";import"./chunk-7LXPGNYF.js";import"./chunk-CN5SHMHF.js";import"./chunk-3M5M2T4L.js";import"./chunk-B4IX7BMU.js";import{b as K,c as U}from"./chunk-XOQ4SW2R.js";import"./chunk-A7ZWFYP4.js";import"./chunk-QTAOV4NJ.js";import"./chunk-GIKR6Y2K.js";import"./chunk-3GV7FUAX.js";import{g as Y}from"./chunk-6BL2JKZG.js";import"./chunk-REQUYIUO.js";import"./chunk-QCBXPOJL.js";import"./chunk-T2PMKO3M.js";import"./chunk-2FWFPV5I.js";import{la as J}from"./chunk-OE7PM4Y4.js";import{F as q,c as N,h as k,o as Q,q as j}from"./chunk-CB33ZMNF.js";import"./chunk-473FVTPP.js";import"./chunk-QMCLGLNR.js";import{d as z}from"./chunk-TKBUOGER.js";import"./chunk-EVXMHULS.js";import{$a as l,Ac as s,Bc as I,Db as E,Fc as V,Ib as t,Jb as n,Kb as f,Ob as T,Qb as h,Rb as d,Rd as W,Td as A,Ub as M,Yd as G,Zc as O,db as C,ec as a,fc as P,gc as u,gd as L,jc as x,jd as R,kb as F,kc as b,lc as S,ob as B,qb as v,qc as D,rc as w,va as y,vb as c,wa as _,wd as H,zc as m}from"./chunk-DJOHANFC.js";import"./chunk-7DCB7DB2.js";var fe=()=>({"min-width":"50rem","font-family":"Roboto, sans-serif"}),Ce=()=>["/menu/Products/Catalog/Products"],ye=r=>({CategoryID:r}),xe=()=>["/menu/Inventory/Quantity/Valuation"];function be(r,g){if(r&1){let e=T();t(0,"button",10),h("click",function(){y(e);let o=d(2);return _(o.openExportModal())}),f(1,"i",11),a(2," Export "),n()}}function Se(r,g){if(r&1){let e=T();t(0,"div",12)(1,"h6"),a(2,"Outlet"),n(),t(3,"outlet-selector",13),S("ngModelChange",function(o){y(e);let p=d(2);return b(p.pageData.Filter.ListIDs,o)||(p.pageData.Filter.ListIDs=o),_(o)}),n(),t(4,"h6"),a(5,"Quantity From - To"),n(),t(6,"div",14)(7,"input",15),S("ngModelChange",function(o){y(e);let p=d(2);return b(p.pageData.Filter.QuantityFrom,o)||(p.pageData.Filter.QuantityFrom=o),_(o)}),n(),t(8,"span",16),a(9,"-"),n(),t(10,"input",17),S("ngModelChange",function(o){y(e);let p=d(2);return b(p.pageData.Filter.QuantityTo,o)||(p.pageData.Filter.QuantityTo=o),_(o)}),n()(),t(11,"h6"),a(12,"Discontinued"),n(),t(13,"radio-options",18),S("modelChange",function(o){y(e);let p=d(2);return b(p.pageData.Filter.Discontinued,o)||(p.pageData.Filter.Discontinued=o),_(o)}),n()()}if(r&2){let e=d(2);l(3),c("multiple",!0)("accessType",2),x("ngModel",e.pageData.Filter.ListIDs),l(4),x("ngModel",e.pageData.Filter.QuantityFrom),l(3),x("ngModel",e.pageData.Filter.QuantityTo),l(3),x("model",e.pageData.Filter.Discontinued),c("options",e.pageData.Options.Discontinued)}}function ve(r,g){r&1&&(t(0,"tr",19)(1,"th",20),a(2," Category "),f(3,"p-treeTableSortIcon",21),n(),t(4,"th",22),a(5," On Hand "),f(6,"p-treeTableSortIcon",23),n(),t(7,"th",24),a(8," Cost "),f(9,"p-treeTableSortIcon",25),n(),t(10,"th",26),a(11," Price "),f(12,"p-treeTableSortIcon",27),n(),t(13,"th",28),a(14," % "),f(15,"p-treeTableSortIcon",29),n()())}function Te(r,g){if(r&1&&(t(0,"tr",30)(1,"td"),f(2,"p-treeTableToggler",31),t(3,"a",32),a(4),n()(),t(5,"td")(6,"a",33),m(7,"number"),m(8,"number"),m(9,"number"),a(10),m(11,"quantityFraction"),n()(),t(12,"td"),a(13),m(14,"amountFraction"),n(),t(15,"td"),a(16),m(17,"amountFraction"),n(),t(18,"td")(19,"span",34),m(20,"number"),a(21),m(22,"number"),n()()()),r&2){let e=g.$implicit,i=g.rowData;c("ttRow",e),l(2),c("rowNode",e),l(),c("routerLink",D(31,Ce))("queryParams",w(32,ye,i.ID)),l(),P(i.Name),l(2),M("matTooltip",i.OnHandIndirect&&i.OnHand?"Direct ("+s(7,13,i.OnHand)+") Indirect ("+s(8,15,i.OnHandIndirect)+")":i.OnHandIndirect?"Indirect ("+s(9,17,i.OnHandIndirect)+")":""),c("routerLink",D(34,xe))("queryParams",w(35,ye,i.ID)),l(4),u("",s(11,19,i.DisplayedOnHand)," "),l(3),u(" ",s(14,21,i.DisplayedCost)," "),l(3),u(" ",s(17,23,i.DisplayedPrice)," "),l(3),c("matTooltip",I(20,25,i.DisplayedPercentage,"1.0-5")+"%"),l(2),u(" ",I(22,28,i.DisplayedPercentage,"1.0-0"),"% ")}}function De(r,g){if(r&1&&(t(0,"tr",35)(1,"td",36),a(2,"Total:"),n(),t(3,"td",36),a(4),m(5,"quantityFraction"),n(),t(6,"td",36),a(7),m(8,"amountFraction"),n(),t(9,"td",36),a(10),m(11,"amountFraction"),n(),t(12,"td",36),a(13),m(14,"number"),n()()),r&2){let e=d(2);l(4),u(" ",s(5,4,e.data==null||e.data.Aggregate==null?null:e.data.Aggregate.TotalOnHand)," "),l(3),u(" ",s(8,6,e.data==null||e.data.Aggregate==null?null:e.data.Aggregate.TotalCost)," "),l(3),u(" ",s(11,8,e.data==null||e.data.Aggregate==null?null:e.data.Aggregate.TotalPrice)," "),l(3),u(" ",I(14,10,e.data==null||e.data.Aggregate==null?null:e.data.Aggregate.TotalPercentage,"1.0-0"),"% ")}}function Ie(r,g){if(r&1){let e=T();t(0,"mainpanel-cmp",2),h("onSubmit",function(){y(e);let o=d();return _(o.searchFromPageOne())}),S("filterChange",function(o){y(e);let p=d();return b(p.pageData.Filter,o)||(p.pageData.Filter=o),_(o)}),t(1,"actions"),v(2,be,3,0,"button",3),n(),t(3,"div",4),v(4,Se,14,7,"ng-template",null,0,V),n(),t(6,"content")(7,"div",5)(8,"p-treeTable",6),v(9,ve,16,0,"ng-template",7)(10,Te,23,37,"ng-template",8)(11,De,15,13,"ng-template",9),n()()()()}if(r&2){let e=d();c("pageData",e.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),x("filter",e.pageData.Filter),l(2),E(e.roleService.global.Export?2:-1),l(6),c("value",e.data.data)("scrollable",!0)("scrollable",!0)("tableStyle",D(9,fe))}}var _e=class r extends X{constructor(e,i,o,p,he,we){super(e,i,"Inventory/GetByCategory","InventoryLoader/GetByCategory");this.httpService=i;this.csvConverter=o;this.pageTitle=p;this.roleService=he;this.dialog=we}openExportModal(){this.dialog.open(Z,{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(i){return new(i||r)(C(te),C(G),C(ie),C(H),C(z),C(Y))};static \u0275cmp=F({type:r,selectors:[["app-inventory-by-category"]],features:[B],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"],["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"],["matTooltipPosition","above",3,"matTooltip"],[1,"table-footer"],[1,"text-end"]],template:function(i,o){i&1&&v(0,Ie,12,10,"mainpanel-cmp",1),i&2&&c("ngIf",o.data)},dependencies:[R,O,L,oe,ne,A,W,ge,me,J,ue,ce,de,se,$,ee,le,pe,re,ae,q,N,j,k,Q,U,K],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{_e as InventoryByCategoryComponent};
@@ -1 +1 @@
1
- import{a as ee}from"./chunk-QVS25HHW.js";import{a as K,b as Q}from"./chunk-BIHQKESC.js";import{a as J}from"./chunk-7UFQPOGN.js";import{d as Z,e as $}from"./chunk-V5YHCHGS.js";import{b as Y}from"./chunk-YBAZUK5O.js";import{a as U,c as X}from"./chunk-CN5SHMHF.js";import{h as q,m as z,q as G}from"./chunk-B4IX7BMU.js";import{b as j,c as H}from"./chunk-XOQ4SW2R.js";import{a as D}from"./chunk-2FWFPV5I.js";import{F as b,c as A,h as v,o as k}from"./chunk-CB33ZMNF.js";import{$a as l,Eb as w,Fa as C,Gb as P,Hb as F,Ib as o,Ja as g,Jb as a,Ob as N,Od as L,Qb as c,Rb as d,Vd as B,Yd as R,Zc as W,db as S,ec as r,fc as T,jc as E,jd as h,kb as M,kc as _,lc as V,ob as I,qb as O,va as u,vb as p,wa as f}from"./chunk-DJOHANFC.js";var x=class s{stringPrefixMask=g();stringSuffixMask=g();stringPrefixMaskChange=new C;stringSuffixMaskChange=new C;onStringPrefixMaskChange(m){this.stringPrefixMaskChange.emit(m)}onStringSuffixMaskChange(m){this.stringSuffixMaskChange.emit(m)}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=M({type:s,selectors:[["masking-config"]],inputs:{stringPrefixMask:[1,"stringPrefixMask"],stringSuffixMask:[1,"stringSuffixMask"]},outputs:{stringPrefixMaskChange:"stringPrefixMaskChange",stringSuffixMaskChange:"stringSuffixMaskChange"},decls:18,vars:2,consts:[[1,"row","my-10","ms-2"],[1,"col-md-2"],[1,"notes","text-muted"],[1,"col-md-10"],[1,"row"],[1,"col-6"],["matTooltipPosition","above","matTooltip","Sets the number of characters at the beginning of the sensitive field that remain visible",1,"form-floating-outline"],["type","text","id","name","placeholder","Max Visible Prefix","autoNum","",1,"form-control",3,"ngModelChange","ngModel"],["matTooltipPosition","above","matTooltip","Sets the number of characters at the end of the sensitive field that remain visible",1,"form-floating-outline"],["type","text","id","name","placeholder","Max Visible Suffix","autoNum","",1,"form-control",3,"ngModelChange","ngModel"]],template:function(e,i){e&1&&(o(0,"div",0)(1,"div",1)(2,"h5"),r(3,"Visible Masking Settings"),a(),o(4,"i",2),r(5," Configure how many characters at the beginning and end of sensitive fields remain visible. "),a()(),o(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"input",7),c("ngModelChange",function(n){return i.onStringPrefixMaskChange(n)}),a(),o(11,"label"),r(12,"Max Visible Prefix"),a()()(),o(13,"div",5)(14,"div",8)(15,"input",9),c("ngModelChange",function(n){return i.onStringSuffixMaskChange(n)}),a(),o(16,"label"),r(17,"Max Visible Suffix"),a()()()()()()),e&2&&(l(10),p("ngModel",i.stringPrefixMask()),l(5),p("ngModel",i.stringSuffixMask()))},dependencies:[h,b,A,v,k,U,X,H,j],encapsulation:2})};function ae(s,m){if(s&1&&(o(0,"mat-option",10),r(1),a()),s&2){let e=m.$implicit;p("value",e),l(),T(e)}}function re(s,m){if(s&1&&(o(0,"mat-option",10),r(1),a()),s&2){let e=m.$implicit;p("value",e),l(),T(e)}}var y=class s{options=g();contacts=g([]);products=g([]);contactsChange=new C;productsChange=new C;onContactsChange(m){this.contactsChange.emit(m)}onProductsChange(m){this.productsChange.emit(m)}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=M({type:s,selectors:[["masking-options"]],inputs:{options:[1,"options"],contacts:[1,"contacts"],products:[1,"products"]},outputs:{contactsChange:"contactsChange",productsChange:"productsChange"},decls:27,vars:2,consts:[[1,"row","my-10","ms-2"],[1,"col-md-2"],[1,"notes","text-muted"],["href","https://support.dealpos.com/en/articles/8278008-sensitive-field-roles-configuration-for-contacts","target","_blank"],[1,"col-md-10"],[1,"row"],[1,"col-6"],["appearance","outline",1,"w-100"],[1,"fs-4"],["placeholder","Product","multiple","",3,"ngModelChange","ngModel"],[3,"value"],["placeholder","Contact","multiple","",3,"ngModelChange","ngModel"]],template:function(e,i){if(e&1&&(o(0,"div",0)(1,"div",1)(2,"h5"),r(3,"Sensitive Field"),a(),o(4,"i",2),r(5,"When you mark a property as sensitive, the property value cannot be viewed to users without 'sensitive field' role. Please refer this "),o(6,"a",3),r(7,"Article"),a(),r(8," for more information"),a()(),o(9,"div",4)(10,"div",5)(11,"div",6)(12,"mat-form-field",7)(13,"mat-label")(14,"span",8),r(15,"Product"),a()(),o(16,"mat-select",9),c("ngModelChange",function(n){return i.onProductsChange(n)}),P(17,ae,2,2,"mat-option",10,w),a()()(),o(19,"div",6)(20,"mat-form-field",7)(21,"mat-label")(22,"span",8),r(23,"Contact"),a()(),o(24,"mat-select",11),c("ngModelChange",function(n){return i.onContactsChange(n)}),P(25,re,2,2,"mat-option",10,w),a()()()()()()),e&2){let t,n;l(16),p("ngModel",i.products()),l(),F((t=i.options())==null?null:t.Product),l(7),p("ngModel",i.contacts()),l(),F((n=i.options())==null?null:n.Customer)}},dependencies:[h,Q,z,q,K,G,J,b,v,k],encapsulation:2})};function se(s,m){if(s&1){let e=N();o(0,"mainpanel-cmp",1)(1,"actions")(2,"button",2),c("click",function(){u(e);let t=d();return f(t.onSubmit("Setup/Configuration/SubmitSensitiveFieldConfigurationV2"))}),r(3," Save "),a()(),o(4,"content")(5,"div",3)(6,"ul",4)(7,"li",5)(8,"button",6),r(9," Objects "),a()(),o(10,"li",5)(11,"button",7),r(12," Masking "),a()()(),o(13,"div",8)(14,"div",9)(15,"masking-options",10),V("productsChange",function(t){u(e);let n=d();return _(n.data.Form.Product,t)||(n.data.Form.Product=t),f(t)})("contactsChange",function(t){u(e);let n=d();return _(n.data.Form.Customer,t)||(n.data.Form.Customer=t),f(t)}),a()(),o(16,"div",11)(17,"masking-config",12),V("stringPrefixMaskChange",function(t){u(e);let n=d();return _(n.data.Form.Masking.StringPrefixMaskVisibleCharacterLength,t)||(n.data.Form.Masking.StringPrefixMaskVisibleCharacterLength=t),f(t)})("stringSuffixMaskChange",function(t){u(e);let n=d();return _(n.data.Form.Masking.StringSuffixMaskVisibleCharacterLength,t)||(n.data.Form.Masking.StringSuffixMaskVisibleCharacterLength=t),f(t)}),a()()()()()()}if(s&2){let e=d();p("pageData",e.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),l(15),p("options",e.data.Options),E("products",e.data.Form.Product)("contacts",e.data.Form.Customer),l(2),E("stringPrefixMask",e.data.Form.Masking.StringPrefixMaskVisibleCharacterLength)("stringSuffixMask",e.data.Form.Masking.StringSuffixMaskVisibleCharacterLength)}}var ne=class s extends ee{constructor(e,i,t,n){super(e,i,"Setup/ConfigurationLoader/SensitiveFieldConfigurationV2",t);this.httpService=i;this.activatedRoute=t;this.toaster=n}onSubmitSuccess(e){e?.MessageWarning?this.toaster.warning(e.MessageWarning,D.Warning):this.toaster.success("Config has been updated succesfully!",D.Success)}static \u0275fac=function(i){return new(i||s)(S(Y),S(R),S(L),S(B))};static \u0275cmp=M({type:s,selectors:[["app-sensitive-field"]],features:[I],decls:1,vars:1,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox",4,"ngIf"],[3,"pageData","hideSearchDropdown","hideSearchBox"],["type","button","role","button",1,"btn","btn-success",3,"click"],[1,"container-fluid","py-5","bg-light-white"],["id","myTab","role","tablist",1,"nav","nav-tabs"],[1,"nav-item"],["id","masking-options-tab","data-bs-toggle","tab","data-bs-target","#masking-options","role","tab","aria-controls","masking-options","aria-selected","true",1,"nav-link","active"],["id","masking-tab","data-bs-toggle","tab","data-bs-target","#masking","role","tab","aria-controls","masking","aria-selected","false",1,"nav-link"],["id","myTabContent",1,"tab-content","border-top-0","bg-white"],["id","masking-options","aria-labelledby","masking-options-tab","role","tabpanel",1,"tab-pane","fade","mt-0","p-7","show","active"],[3,"productsChange","contactsChange","options","products","contacts"],["id","masking","aria-labelledby","masking-tab","role","tabpanel",1,"tab-pane","fade","mt-0","p-7"],[3,"stringPrefixMaskChange","stringSuffixMaskChange","stringPrefixMask","stringSuffixMask"]],template:function(i,t){i&1&&O(0,se,18,8,"mainpanel-cmp",0),i&2&&p("ngIf",t.formData)},dependencies:[h,W,$,Z,x,y],encapsulation:2})};export{ne as a};
1
+ import{a as ee}from"./chunk-IY6GPD44.js";import{a as K,b as Q}from"./chunk-BIHQKESC.js";import{a as J}from"./chunk-7UFQPOGN.js";import{d as Z,e as $}from"./chunk-DHIWAZHG.js";import{b as Y}from"./chunk-Z7Z65PNB.js";import{a as U,c as X}from"./chunk-CN5SHMHF.js";import{h as q,m as z,q as G}from"./chunk-B4IX7BMU.js";import{b as j,c as H}from"./chunk-XOQ4SW2R.js";import{a as D}from"./chunk-2FWFPV5I.js";import{F as b,c as A,h as v,o as k}from"./chunk-CB33ZMNF.js";import{$a as l,Eb as w,Fa as C,Gb as P,Hb as F,Ib as o,Ja as g,Jb as a,Ob as N,Od as L,Qb as c,Rb as d,Vd as B,Yd as R,Zc as W,db as S,ec as r,fc as T,jc as E,jd as h,kb as M,kc as _,lc as V,ob as I,qb as O,va as u,vb as p,wa as f}from"./chunk-DJOHANFC.js";var x=class s{stringPrefixMask=g();stringSuffixMask=g();stringPrefixMaskChange=new C;stringSuffixMaskChange=new C;onStringPrefixMaskChange(m){this.stringPrefixMaskChange.emit(m)}onStringSuffixMaskChange(m){this.stringSuffixMaskChange.emit(m)}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=M({type:s,selectors:[["masking-config"]],inputs:{stringPrefixMask:[1,"stringPrefixMask"],stringSuffixMask:[1,"stringSuffixMask"]},outputs:{stringPrefixMaskChange:"stringPrefixMaskChange",stringSuffixMaskChange:"stringSuffixMaskChange"},decls:18,vars:2,consts:[[1,"row","my-10","ms-2"],[1,"col-md-2"],[1,"notes","text-muted"],[1,"col-md-10"],[1,"row"],[1,"col-6"],["matTooltipPosition","above","matTooltip","Sets the number of characters at the beginning of the sensitive field that remain visible",1,"form-floating-outline"],["type","text","id","name","placeholder","Max Visible Prefix","autoNum","",1,"form-control",3,"ngModelChange","ngModel"],["matTooltipPosition","above","matTooltip","Sets the number of characters at the end of the sensitive field that remain visible",1,"form-floating-outline"],["type","text","id","name","placeholder","Max Visible Suffix","autoNum","",1,"form-control",3,"ngModelChange","ngModel"]],template:function(e,i){e&1&&(o(0,"div",0)(1,"div",1)(2,"h5"),r(3,"Visible Masking Settings"),a(),o(4,"i",2),r(5," Configure how many characters at the beginning and end of sensitive fields remain visible. "),a()(),o(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"input",7),c("ngModelChange",function(n){return i.onStringPrefixMaskChange(n)}),a(),o(11,"label"),r(12,"Max Visible Prefix"),a()()(),o(13,"div",5)(14,"div",8)(15,"input",9),c("ngModelChange",function(n){return i.onStringSuffixMaskChange(n)}),a(),o(16,"label"),r(17,"Max Visible Suffix"),a()()()()()()),e&2&&(l(10),p("ngModel",i.stringPrefixMask()),l(5),p("ngModel",i.stringSuffixMask()))},dependencies:[h,b,A,v,k,U,X,H,j],encapsulation:2})};function ae(s,m){if(s&1&&(o(0,"mat-option",10),r(1),a()),s&2){let e=m.$implicit;p("value",e),l(),T(e)}}function re(s,m){if(s&1&&(o(0,"mat-option",10),r(1),a()),s&2){let e=m.$implicit;p("value",e),l(),T(e)}}var y=class s{options=g();contacts=g([]);products=g([]);contactsChange=new C;productsChange=new C;onContactsChange(m){this.contactsChange.emit(m)}onProductsChange(m){this.productsChange.emit(m)}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=M({type:s,selectors:[["masking-options"]],inputs:{options:[1,"options"],contacts:[1,"contacts"],products:[1,"products"]},outputs:{contactsChange:"contactsChange",productsChange:"productsChange"},decls:27,vars:2,consts:[[1,"row","my-10","ms-2"],[1,"col-md-2"],[1,"notes","text-muted"],["href","https://support.dealpos.com/en/articles/8278008-sensitive-field-roles-configuration-for-contacts","target","_blank"],[1,"col-md-10"],[1,"row"],[1,"col-6"],["appearance","outline",1,"w-100"],[1,"fs-4"],["placeholder","Product","multiple","",3,"ngModelChange","ngModel"],[3,"value"],["placeholder","Contact","multiple","",3,"ngModelChange","ngModel"]],template:function(e,i){if(e&1&&(o(0,"div",0)(1,"div",1)(2,"h5"),r(3,"Sensitive Field"),a(),o(4,"i",2),r(5,"When you mark a property as sensitive, the property value cannot be viewed to users without 'sensitive field' role. Please refer this "),o(6,"a",3),r(7,"Article"),a(),r(8," for more information"),a()(),o(9,"div",4)(10,"div",5)(11,"div",6)(12,"mat-form-field",7)(13,"mat-label")(14,"span",8),r(15,"Product"),a()(),o(16,"mat-select",9),c("ngModelChange",function(n){return i.onProductsChange(n)}),P(17,ae,2,2,"mat-option",10,w),a()()(),o(19,"div",6)(20,"mat-form-field",7)(21,"mat-label")(22,"span",8),r(23,"Contact"),a()(),o(24,"mat-select",11),c("ngModelChange",function(n){return i.onContactsChange(n)}),P(25,re,2,2,"mat-option",10,w),a()()()()()()),e&2){let t,n;l(16),p("ngModel",i.products()),l(),F((t=i.options())==null?null:t.Product),l(7),p("ngModel",i.contacts()),l(),F((n=i.options())==null?null:n.Customer)}},dependencies:[h,Q,z,q,K,G,J,b,v,k],encapsulation:2})};function se(s,m){if(s&1){let e=N();o(0,"mainpanel-cmp",1)(1,"actions")(2,"button",2),c("click",function(){u(e);let t=d();return f(t.onSubmit("Setup/Configuration/SubmitSensitiveFieldConfigurationV2"))}),r(3," Save "),a()(),o(4,"content")(5,"div",3)(6,"ul",4)(7,"li",5)(8,"button",6),r(9," Objects "),a()(),o(10,"li",5)(11,"button",7),r(12," Masking "),a()()(),o(13,"div",8)(14,"div",9)(15,"masking-options",10),V("productsChange",function(t){u(e);let n=d();return _(n.data.Form.Product,t)||(n.data.Form.Product=t),f(t)})("contactsChange",function(t){u(e);let n=d();return _(n.data.Form.Customer,t)||(n.data.Form.Customer=t),f(t)}),a()(),o(16,"div",11)(17,"masking-config",12),V("stringPrefixMaskChange",function(t){u(e);let n=d();return _(n.data.Form.Masking.StringPrefixMaskVisibleCharacterLength,t)||(n.data.Form.Masking.StringPrefixMaskVisibleCharacterLength=t),f(t)})("stringSuffixMaskChange",function(t){u(e);let n=d();return _(n.data.Form.Masking.StringSuffixMaskVisibleCharacterLength,t)||(n.data.Form.Masking.StringSuffixMaskVisibleCharacterLength=t),f(t)}),a()()()()()()}if(s&2){let e=d();p("pageData",e.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),l(15),p("options",e.data.Options),E("products",e.data.Form.Product)("contacts",e.data.Form.Customer),l(2),E("stringPrefixMask",e.data.Form.Masking.StringPrefixMaskVisibleCharacterLength)("stringSuffixMask",e.data.Form.Masking.StringSuffixMaskVisibleCharacterLength)}}var ne=class s extends ee{constructor(e,i,t,n){super(e,i,"Setup/ConfigurationLoader/SensitiveFieldConfigurationV2",t);this.httpService=i;this.activatedRoute=t;this.toaster=n}onSubmitSuccess(e){e?.MessageWarning?this.toaster.warning(e.MessageWarning,D.Warning):this.toaster.success("Config has been updated succesfully!",D.Success)}static \u0275fac=function(i){return new(i||s)(S(Y),S(R),S(L),S(B))};static \u0275cmp=M({type:s,selectors:[["app-sensitive-field"]],features:[I],decls:1,vars:1,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox",4,"ngIf"],[3,"pageData","hideSearchDropdown","hideSearchBox"],["type","button","role","button",1,"btn","btn-success",3,"click"],[1,"container-fluid","py-5","bg-light-white"],["id","myTab","role","tablist",1,"nav","nav-tabs"],[1,"nav-item"],["id","masking-options-tab","data-bs-toggle","tab","data-bs-target","#masking-options","role","tab","aria-controls","masking-options","aria-selected","true",1,"nav-link","active"],["id","masking-tab","data-bs-toggle","tab","data-bs-target","#masking","role","tab","aria-controls","masking","aria-selected","false",1,"nav-link"],["id","myTabContent",1,"tab-content","border-top-0","bg-white"],["id","masking-options","aria-labelledby","masking-options-tab","role","tabpanel",1,"tab-pane","fade","mt-0","p-7","show","active"],[3,"productsChange","contactsChange","options","products","contacts"],["id","masking","aria-labelledby","masking-tab","role","tabpanel",1,"tab-pane","fade","mt-0","p-7"],[3,"stringPrefixMaskChange","stringSuffixMaskChange","stringPrefixMask","stringSuffixMask"]],template:function(i,t){i&1&&O(0,se,18,8,"mainpanel-cmp",0),i&2&&p("ngIf",t.formData)},dependencies:[h,W,$,Z,x,y],encapsulation:2})};export{ne as a};
@@ -1,2 +1,2 @@
1
- import{O as b}from"./chunk-A7ZWFYP4.js";import{a as m}from"./chunk-2FWFPV5I.js";import{a as u}from"./chunk-GIEZY27V.js";import{Vd as d,Yd as h,ja as n,na as c}from"./chunk-DJOHANFC.js";import{j as l}from"./chunk-7DCB7DB2.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
1
+ import{O as b}from"./chunk-A7ZWFYP4.js";import{a as m}from"./chunk-2FWFPV5I.js";import{a as u}from"./chunk-EVXMHULS.js";import{Vd as d,Yd as h,ja as n,na as c}from"./chunk-DJOHANFC.js";import{j as l}from"./chunk-7DCB7DB2.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 r}from"./chunk-DNYXHG4D.js";var h=class extends r{constructor(t,i,a,e,n,s,o){super(t,i,a,e,n,s,o);this.httpService=i}toastrCount=0;nextPageDisabled=!1;extendData=!1;goToLast=!1;listTotal;infiniteList;originalData;StoreRowsCountAPIResult(t,i=!1){this.httpService.post("/api/"+t,this.pageData.Filter).subscribe(a=>{this.listTotal=a.Count,this.pageData.HideStoreApiCount=!0,i&&(this.pageData.Filter.RowCount=this.listTotal,this.goToLast=!0,this.pageData.Filter.PageNumber=1,this.getListData())})}NextPage(t){this.pageData.Filter.PageNumber=this.pageData.Filter.PageNumber||1,this.pageData.Filter.PageNumber+=1,this.extendData=t,this.getListData()}postInit(t){t?.Data?.length>0&&(this.toastrCount=0),t?.Data?.length===0&&this.toastrCount===0&&(this.toastrService?.info("No more data to load","Info"),this.toastrCount=1);let i=Array.isArray(t.Data?.hits),a=Array.isArray(t.Data?.[0]?.Variants);if(this.extendData){let e=this.infiniteList?.length?this.infiniteList[this.infiniteList.length-1]:null,n=t.Data.find(s=>s.ID===e?.ID);if(a&&e)if(e.ID===n?.ID){let s=t.Data.filter(o=>o.ID!=e?.ID);this.infiniteList[this.infiniteList.length-1].Variants=this.infiniteList[this.infiniteList.length-1].Variants.concat(n.Variants),this.infiniteList=this.infiniteList.concat(s)}else this.infiniteList=this.infiniteList.concat(t.Data);else this.infiniteList=this.infiniteList.concat(i?t.Data.hits:t.Data);this.postExtendData(t),this.extendData=!1}else this.infiniteList=i?t.Data.hits:t.Data,this.assignAggregate(t);this.nextPageDisabled=!((i?t.Data.hits.length:t.Data.length)<this.pageData.Filter.RowCount),this.originalData=[...this.infiniteList],this.menuData.H=this.data.PageTitle||this.menuData.H,this.afterPostInit(t)}afterPostInit(t){}preSearchFromPageOne(){this.goToLast=!1}postExtendData(t){}assignAggregate(t){}};export{h as a};
1
+ import{a as r}from"./chunk-UZ25ROGJ.js";var h=class extends r{constructor(t,i,a,e,n,s,o){super(t,i,a,e,n,s,o);this.httpService=i}toastrCount=0;nextPageDisabled=!1;extendData=!1;goToLast=!1;listTotal;infiniteList;originalData;StoreRowsCountAPIResult(t,i=!1){this.httpService.post("/api/"+t,this.pageData.Filter).subscribe(a=>{this.listTotal=a.Count,this.pageData.HideStoreApiCount=!0,i&&(this.pageData.Filter.RowCount=this.listTotal,this.goToLast=!0,this.pageData.Filter.PageNumber=1,this.getListData())})}NextPage(t){this.pageData.Filter.PageNumber=this.pageData.Filter.PageNumber||1,this.pageData.Filter.PageNumber+=1,this.extendData=t,this.getListData()}postInit(t){t?.Data?.length>0&&(this.toastrCount=0),t?.Data?.length===0&&this.toastrCount===0&&(this.toastrService?.info("No more data to load","Info"),this.toastrCount=1);let i=Array.isArray(t.Data?.hits),a=Array.isArray(t.Data?.[0]?.Variants);if(this.extendData){let e=this.infiniteList?.length?this.infiniteList[this.infiniteList.length-1]:null,n=t.Data.find(s=>s.ID===e?.ID);if(a&&e)if(e.ID===n?.ID){let s=t.Data.filter(o=>o.ID!=e?.ID);this.infiniteList[this.infiniteList.length-1].Variants=this.infiniteList[this.infiniteList.length-1].Variants.concat(n.Variants),this.infiniteList=this.infiniteList.concat(s)}else this.infiniteList=this.infiniteList.concat(t.Data);else this.infiniteList=this.infiniteList.concat(i?t.Data.hits:t.Data);this.postExtendData(t),this.extendData=!1}else this.infiniteList=i?t.Data.hits:t.Data,this.assignAggregate(t);this.nextPageDisabled=!((i?t.Data.hits.length:t.Data.length)<this.pageData.Filter.RowCount),this.originalData=[...this.infiniteList],this.menuData.H=this.data.PageTitle||this.menuData.H,this.afterPostInit(t)}afterPostInit(t){}preSearchFromPageOne(){this.goToLast=!1}postExtendData(t){}assignAggregate(t){}};export{h as a};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-7QN6GHX6.js";import"./chunk-NJIOGT5G.js";import"./chunk-IY6GPD44.js";import"./chunk-BIHQKESC.js";import"./chunk-3RK6DDJD.js";import"./chunk-7UFQPOGN.js";import"./chunk-T2PXIPKB.js";import"./chunk-DHIWAZHG.js";import"./chunk-K7YY7ZAJ.js";import"./chunk-UAI7BPPY.js";import"./chunk-6IW4MVP2.js";import"./chunk-Z7Z65PNB.js";import"./chunk-OI2RWAOV.js";import"./chunk-7LXPGNYF.js";import"./chunk-CN5SHMHF.js";import"./chunk-B4IX7BMU.js";import"./chunk-XOQ4SW2R.js";import"./chunk-A7ZWFYP4.js";import"./chunk-6BL2JKZG.js";import"./chunk-REQUYIUO.js";import"./chunk-T2PMKO3M.js";import"./chunk-2FWFPV5I.js";import"./chunk-OE7PM4Y4.js";import"./chunk-CB33ZMNF.js";import"./chunk-473FVTPP.js";import"./chunk-QMCLGLNR.js";import"./chunk-TKBUOGER.js";import"./chunk-EVXMHULS.js";import"./chunk-DJOHANFC.js";import"./chunk-7DCB7DB2.js";export{a as SensitiveFieldComponent};
@@ -1 +1 @@
1
- import{d as $,e as ee}from"./chunk-VPLAJK5S.js";import{a as z}from"./chunk-PNM3PGBM.js";import"./chunk-QMCAG2HX.js";import{f as te}from"./chunk-DL2KKY4K.js";import{a as oe,b as ne}from"./chunk-NHTMJTLV.js";import{a as H,b as G,c as A}from"./chunk-KTA5HCUQ.js";import{c as ie}from"./chunk-WRBL5J73.js";import{b as Q}from"./chunk-PDV6AI5F.js";import{a as q}from"./chunk-DNYXHG4D.js";import"./chunk-2S3RIVNA.js";import"./chunk-NW73SHIZ.js";import{d as Y,e as Z}from"./chunk-V5YHCHGS.js";import"./chunk-4VQB3RCY.js";import"./chunk-OMVUFMMZ.js";import"./chunk-TF5EIKOX.js";import"./chunk-T6MTT57B.js";import"./chunk-IFIBQUT3.js";import"./chunk-4L5G4WC4.js";import"./chunk-3NJFM55L.js";import"./chunk-2LFFOWKW.js";import"./chunk-OQCGVZVB.js";import"./chunk-UAI7BPPY.js";import"./chunk-6IW4MVP2.js";import{b as K}from"./chunk-YBAZUK5O.js";import"./chunk-OI2RWAOV.js";import"./chunk-7LXPGNYF.js";import"./chunk-CN5SHMHF.js";import"./chunk-3M5M2T4L.js";import"./chunk-B4IX7BMU.js";import"./chunk-XOQ4SW2R.js";import{N as X,g as U}from"./chunk-A7ZWFYP4.js";import"./chunk-QTAOV4NJ.js";import"./chunk-GIKR6Y2K.js";import"./chunk-3GV7FUAX.js";import{g as J}from"./chunk-6BL2JKZG.js";import"./chunk-REQUYIUO.js";import"./chunk-QCBXPOJL.js";import"./chunk-T2PMKO3M.js";import"./chunk-2FWFPV5I.js";import"./chunk-OE7PM4Y4.js";import{F as W,h as B,o as R}from"./chunk-CB33ZMNF.js";import"./chunk-GFRO6FJS.js";import"./chunk-FG7XUKIO.js";import{d as k}from"./chunk-TKBUOGER.js";import"./chunk-GIEZY27V.js";import{$a as p,Ac as P,Bc as T,Eb as b,Fc as V,Gb as M,Hb as O,Ib as i,Jb as o,Kb as v,Ob as _,Qb as S,Rb as m,Yd as j,Zc as F,db as u,ec as l,fc as h,gc as w,jc as x,jd as N,kb as E,kc as C,lc as y,ob as I,qb as f,va as c,vb as d,wa as s,zc as D}from"./chunk-DJOHANFC.js";import"./chunk-7DCB7DB2.js";function re(r,g){if(r&1){let e=_();i(0,"button",5),S("click",function(){c(e);let t=m();return s(t.openExportModal())}),v(1,"i",6),l(2," Export "),o()}}function le(r,g){if(r&1){let e=_();i(0,"h6"),l(1,"Outlet"),o(),i(2,"outlet-selector",7),y("ngModelChange",function(t){c(e);let a=m();return C(a.pageData.Filter.Outlet,t)||(a.pageData.Filter.Outlet=t),s(t)}),o(),i(3,"h6"),l(4,"Category"),o(),i(5,"POS-product-category-select",8),y("selectedCategoryIDChange",function(t){c(e);let a=m();return C(a.pageData.Filter.Category,t)||(a.pageData.Filter.Category=t),s(t)}),o(),i(6,"h6"),l(7,"Discontinued"),o(),i(8,"radio-options",9),y("modelChange",function(t){c(e);let a=m();return C(a.pageData.Filter.Discontinued,t)||(a.pageData.Filter.Discontinued=t),s(t)}),o()}if(r&2){let e=m();p(2),d("accessType",2),x("ngModel",e.pageData.Filter.Outlet),p(3),x("selectedCategoryID",e.pageData.Filter.Category),d("showClear",!0),p(3),d("options",e.pageData==null||e.pageData.Options==null?null:e.pageData.Options.Discontinued),x("model",e.pageData.Filter.Discontinued)}}function pe(r,g){if(r&1&&(i(0,"tr")(1,"td"),l(2),o(),i(3,"td"),l(4),o(),i(5,"td",20),l(6),D(7,"quantityFraction"),o()()),r&2){let e=g.$implicit;p(2),h(e.EntityName),p(2),h(e.Name),p(2),w(" ",P(7,3,e.Inventory)," ")}}function me(r,g){if(r&1){let e=_();i(0,"div",10)(1,"div",11)(2,"table",12),S("matSortChange",function(t){c(e);let a=m();return s(a.onSortData(t))}),i(3,"thead",13)(4,"tr",14)(5,"th",15),l(6,"Outlet"),o(),i(7,"th",16),l(8,"Storage Location"),o(),i(9,"th",17),l(10," On Hand "),o()()(),i(11,"tbody"),M(12,pe,8,5,"tr",null,b),o(),i(14,"tfoot")(15,"tr",18),v(16,"td",19),i(17,"td",19),l(18,"Total :"),o(),i(19,"td",20),l(20),D(21,"sum"),D(22,"quantityFraction"),o()()()(),i(23,"POS-complex-pagination",21),S("jumpToPage",function(){c(e);let t=m();return s(t.getListData())})("previousPage",function(){c(e);let t=m();return s(t.getListData())})("nextPage",function(){c(e);let t=m();return s(t.getListData())}),o()()()}if(r&2){let e=m();p(12),O(e.data.Data),p(8),w(" ",P(22,6,T(21,3,e.data.Data,"Inventory"))," "),p(3),d("total",e.data.Data==null?null:e.data.Data.length)("pageData",e.pageData)}}var ae=class r extends q{constructor(e,n,t,a){super(e,n,"Inventory/GetProductStorageLocation","InventoryLoader/InventoryReport");this.httpService=n;this.dialog=t;this.roleService=a}datasource;postInit(e){this.datasource=JSON.parse(JSON.stringify(e.Data))}openExportModal(){this.dialog.open(Q,{data:{title:"Storage Location",exportTypes:[{ID:"Inventory/GetProductStorageLocation",Value:"Default",FileName:"Storage Location"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"inventory/GetCountProductStorageLocation",pagination:!0}})}onSortData(e){let n=this.data.Data?.slice();if(!e.active||e.direction===""){this.data.Data=this.datasource;return}let t=e.direction==="asc";this.data.Data=n.sort((a,L)=>this.compare(a[e.active],L[e.active],t))}static \u0275fac=function(n){return new(n||r)(u(K),u(j),u(J),u(k))};static \u0275cmp=E({type:r,selectors:[["app-storage-location"]],features:[I],decls:9,vars:5,consts:[["pageFilterTemplate",""],[3,"onSubmit","pageData","hideSearchBox","isFilterOnDropdown"],[1,"d-flex"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],["class","container-fluid mt-3",4,"ngIf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],["placeholder","Choose an outlet","appendTo","body",3,"ngModelChange","accessType","ngModel"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],["name","Discontinued",3,"modelChange","options","model"],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[1,"header"],["mat-sort-header","EntityName",2,"width","450px"],["mat-sort-header","Brand"],["mat-sort-header","Inventory","arrowPosition","before",1,"text-end",2,"padding-right","100px","width","190px"],[1,"table-footer","fw-bold"],[1,"empty-column"],[1,"text-end",2,"padding-right","100px"],["api","inventory/GetCountProductStorageLocation",3,"jumpToPage","previousPage","nextPage","total","pageData"]],template:function(n,t){if(n&1){let a=_();i(0,"mainpanel-cmp",1),S("onSubmit",function(){return c(a),s(t.searchFromPageOne())}),i(1,"actions")(2,"div",2),f(3,re,3,0,"button",3),o()(),i(4,"filters"),f(5,le,9,6,"ng-template",null,0,V),o(),i(7,"content"),f(8,me,24,8,"div",4),o()()}n&2&&(d("pageData",t.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),p(3),d("ngIf",t.roleService.global.Export),p(5),d("ngIf",t.data))},dependencies:[N,F,Z,Y,z,X,U,ee,$,te,ie,W,B,R,ne,oe,A,H,G],encapsulation:2})};export{ae as StorageLocationComponent};
1
+ import{d as $,e as ee}from"./chunk-VPLAJK5S.js";import{a as z}from"./chunk-PNM3PGBM.js";import"./chunk-QMCAG2HX.js";import{f as te}from"./chunk-EMYULNEH.js";import{a as oe,b as ne}from"./chunk-NHTMJTLV.js";import{a as H,b as G,c as A}from"./chunk-KTA5HCUQ.js";import{c as ie}from"./chunk-6NLWIGH6.js";import{b as Q}from"./chunk-PDV6AI5F.js";import{a as q}from"./chunk-UZ25ROGJ.js";import"./chunk-M24G6C74.js";import"./chunk-NW73SHIZ.js";import{d as Y,e as Z}from"./chunk-DHIWAZHG.js";import"./chunk-DLAMPGGR.js";import"./chunk-OMVUFMMZ.js";import"./chunk-K7YY7ZAJ.js";import"./chunk-T6MTT57B.js";import"./chunk-IFIBQUT3.js";import"./chunk-4L5G4WC4.js";import"./chunk-3NJFM55L.js";import"./chunk-2LFFOWKW.js";import"./chunk-OQCGVZVB.js";import"./chunk-UAI7BPPY.js";import"./chunk-6IW4MVP2.js";import{b as K}from"./chunk-Z7Z65PNB.js";import"./chunk-OI2RWAOV.js";import"./chunk-7LXPGNYF.js";import"./chunk-CN5SHMHF.js";import"./chunk-3M5M2T4L.js";import"./chunk-B4IX7BMU.js";import"./chunk-XOQ4SW2R.js";import{N as X,g as U}from"./chunk-A7ZWFYP4.js";import"./chunk-QTAOV4NJ.js";import"./chunk-GIKR6Y2K.js";import"./chunk-3GV7FUAX.js";import{g as J}from"./chunk-6BL2JKZG.js";import"./chunk-REQUYIUO.js";import"./chunk-QCBXPOJL.js";import"./chunk-T2PMKO3M.js";import"./chunk-2FWFPV5I.js";import"./chunk-OE7PM4Y4.js";import{F as W,h as B,o as R}from"./chunk-CB33ZMNF.js";import"./chunk-473FVTPP.js";import"./chunk-QMCLGLNR.js";import{d as k}from"./chunk-TKBUOGER.js";import"./chunk-EVXMHULS.js";import{$a as p,Ac as P,Bc as T,Eb as b,Fc as V,Gb as M,Hb as O,Ib as i,Jb as o,Kb as v,Ob as _,Qb as S,Rb as m,Yd as j,Zc as F,db as u,ec as l,fc as h,gc as w,jc as x,jd as N,kb as E,kc as C,lc as y,ob as I,qb as f,va as c,vb as d,wa as s,zc as D}from"./chunk-DJOHANFC.js";import"./chunk-7DCB7DB2.js";function re(r,g){if(r&1){let e=_();i(0,"button",5),S("click",function(){c(e);let t=m();return s(t.openExportModal())}),v(1,"i",6),l(2," Export "),o()}}function le(r,g){if(r&1){let e=_();i(0,"h6"),l(1,"Outlet"),o(),i(2,"outlet-selector",7),y("ngModelChange",function(t){c(e);let a=m();return C(a.pageData.Filter.Outlet,t)||(a.pageData.Filter.Outlet=t),s(t)}),o(),i(3,"h6"),l(4,"Category"),o(),i(5,"POS-product-category-select",8),y("selectedCategoryIDChange",function(t){c(e);let a=m();return C(a.pageData.Filter.Category,t)||(a.pageData.Filter.Category=t),s(t)}),o(),i(6,"h6"),l(7,"Discontinued"),o(),i(8,"radio-options",9),y("modelChange",function(t){c(e);let a=m();return C(a.pageData.Filter.Discontinued,t)||(a.pageData.Filter.Discontinued=t),s(t)}),o()}if(r&2){let e=m();p(2),d("accessType",2),x("ngModel",e.pageData.Filter.Outlet),p(3),x("selectedCategoryID",e.pageData.Filter.Category),d("showClear",!0),p(3),d("options",e.pageData==null||e.pageData.Options==null?null:e.pageData.Options.Discontinued),x("model",e.pageData.Filter.Discontinued)}}function pe(r,g){if(r&1&&(i(0,"tr")(1,"td"),l(2),o(),i(3,"td"),l(4),o(),i(5,"td",20),l(6),D(7,"quantityFraction"),o()()),r&2){let e=g.$implicit;p(2),h(e.EntityName),p(2),h(e.Name),p(2),w(" ",P(7,3,e.Inventory)," ")}}function me(r,g){if(r&1){let e=_();i(0,"div",10)(1,"div",11)(2,"table",12),S("matSortChange",function(t){c(e);let a=m();return s(a.onSortData(t))}),i(3,"thead",13)(4,"tr",14)(5,"th",15),l(6,"Outlet"),o(),i(7,"th",16),l(8,"Storage Location"),o(),i(9,"th",17),l(10," On Hand "),o()()(),i(11,"tbody"),M(12,pe,8,5,"tr",null,b),o(),i(14,"tfoot")(15,"tr",18),v(16,"td",19),i(17,"td",19),l(18,"Total :"),o(),i(19,"td",20),l(20),D(21,"sum"),D(22,"quantityFraction"),o()()()(),i(23,"POS-complex-pagination",21),S("jumpToPage",function(){c(e);let t=m();return s(t.getListData())})("previousPage",function(){c(e);let t=m();return s(t.getListData())})("nextPage",function(){c(e);let t=m();return s(t.getListData())}),o()()()}if(r&2){let e=m();p(12),O(e.data.Data),p(8),w(" ",P(22,6,T(21,3,e.data.Data,"Inventory"))," "),p(3),d("total",e.data.Data==null?null:e.data.Data.length)("pageData",e.pageData)}}var ae=class r extends q{constructor(e,n,t,a){super(e,n,"Inventory/GetProductStorageLocation","InventoryLoader/InventoryReport");this.httpService=n;this.dialog=t;this.roleService=a}datasource;postInit(e){this.datasource=JSON.parse(JSON.stringify(e.Data))}openExportModal(){this.dialog.open(Q,{data:{title:"Storage Location",exportTypes:[{ID:"Inventory/GetProductStorageLocation",Value:"Default",FileName:"Storage Location"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"inventory/GetCountProductStorageLocation",pagination:!0}})}onSortData(e){let n=this.data.Data?.slice();if(!e.active||e.direction===""){this.data.Data=this.datasource;return}let t=e.direction==="asc";this.data.Data=n.sort((a,L)=>this.compare(a[e.active],L[e.active],t))}static \u0275fac=function(n){return new(n||r)(u(K),u(j),u(J),u(k))};static \u0275cmp=E({type:r,selectors:[["app-storage-location"]],features:[I],decls:9,vars:5,consts:[["pageFilterTemplate",""],[3,"onSubmit","pageData","hideSearchBox","isFilterOnDropdown"],[1,"d-flex"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],["class","container-fluid mt-3",4,"ngIf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],["placeholder","Choose an outlet","appendTo","body",3,"ngModelChange","accessType","ngModel"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],["name","Discontinued",3,"modelChange","options","model"],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[1,"header"],["mat-sort-header","EntityName",2,"width","450px"],["mat-sort-header","Brand"],["mat-sort-header","Inventory","arrowPosition","before",1,"text-end",2,"padding-right","100px","width","190px"],[1,"table-footer","fw-bold"],[1,"empty-column"],[1,"text-end",2,"padding-right","100px"],["api","inventory/GetCountProductStorageLocation",3,"jumpToPage","previousPage","nextPage","total","pageData"]],template:function(n,t){if(n&1){let a=_();i(0,"mainpanel-cmp",1),S("onSubmit",function(){return c(a),s(t.searchFromPageOne())}),i(1,"actions")(2,"div",2),f(3,re,3,0,"button",3),o()(),i(4,"filters"),f(5,le,9,6,"ng-template",null,0,V),o(),i(7,"content"),f(8,me,24,8,"div",4),o()()}n&2&&(d("pageData",t.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),p(3),d("ngIf",t.roleService.global.Export),p(5),d("ngIf",t.data))},dependencies:[N,F,Z,Y,z,X,U,ee,$,te,ie,W,B,R,ne,oe,A,H,G],encapsulation:2})};export{ae as StorageLocationComponent};
@@ -1,4 +1,4 @@
1
- import{b as _t}from"./chunk-BADUP5JT.js";import{d as bt}from"./chunk-G6C75N4Q.js";import{a as ze,b as Oe,c as Be,d as Ve,e as Pe}from"./chunk-KVJTNXOJ.js";import{a as yt,b as wt,c as Ct}from"./chunk-75GCAMUG.js";import{f as mt,g as He,i as ft}from"./chunk-4VQB3RCY.js";import{b as pt,e as ut}from"./chunk-TF5EIKOX.js";import{b as $e}from"./chunk-3NJFM55L.js";import{a as gt}from"./chunk-2LFFOWKW.js";import{a as te,b as _,c as ht}from"./chunk-OI2RWAOV.js";import{a as dt,d as ct}from"./chunk-QCBXPOJL.js";import{a as ee,b as m}from"./chunk-T2PMKO3M.js";import{U as Se,V as be,ea as Z,fa as lt,ga as Le,ha as rt,ia as st,la as X,ma as $,ua as Y}from"./chunk-OE7PM4Y4.js";import{F as Te,a as ue,g as nt,h as ot,o as at}from"./chunk-CB33ZMNF.js";import{$a as s,$b as g,Ba as Ue,Db as se,Fa as x,Fc as me,Ga as _e,Gb as Xe,Hb as Ye,Ib as y,Jb as w,Ka as he,Kb as S,Kc as Fe,Lb as k,Mb as M,Mc as f,Nb as C,Nc as O,Ob as q,Pb as et,Qb as z,Rb as p,Wc as pe,Yb as b,Yc as it,Za as Je,Zb as P,Zc as ve,_b as h,ad as xe,bd as U,d as ie,db as H,dc as Me,ec as we,fc as Ce,ia as ne,ja as A,jd as J,ka as oe,kb as E,kd as fe,lb as ae,mb as ye,na as L,ob as F,pb as Ze,pc as W,qb as c,rc as Q,sc as G,ua as We,ub as I,uc as De,va as K,vb as r,vc as ce,wa as N,wc as ge,xa as j,xb as le,xc as tt,yb as re,za as R,zb as D}from"./chunk-DJOHANFC.js";import{a as ke,b as qe}from"./chunk-7DCB7DB2.js";var vt=(()=>{class t extends te{pathId;ngOnInit(){this.pathId="url(#"+Z()+")"}static \u0275fac=(()=>{let e;return function(n){return(e||(e=R(t)))(n||t)}})();static \u0275cmp=E({type:t,selectors:[["FilterIcon"]],features:[F],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M8.64708 14H5.35296C5.18981 13.9979 5.03395 13.9321 4.91858 13.8167C4.8032 13.7014 4.73745 13.5455 4.73531 13.3824V7L0.329431 0.98C0.259794 0.889466 0.217389 0.780968 0.20718 0.667208C0.19697 0.553448 0.219379 0.439133 0.271783 0.337647C0.324282 0.236453 0.403423 0.151519 0.500663 0.0920138C0.597903 0.0325088 0.709548 0.000692754 0.823548 0H13.1765C13.2905 0.000692754 13.4021 0.0325088 13.4994 0.0920138C13.5966 0.151519 13.6758 0.236453 13.7283 0.337647C13.7807 0.439133 13.8031 0.553448 13.7929 0.667208C13.7826 0.780968 13.7402 0.889466 13.6706 0.98L9.26472 7V13.3824C9.26259 13.5455 9.19683 13.7014 9.08146 13.8167C8.96609 13.9321 8.81022 13.9979 8.64708 14ZM5.97061 12.7647H8.02943V6.79412C8.02878 6.66289 8.07229 6.53527 8.15296 6.43177L11.9412 1.23529H2.05884L5.86355 6.43177C5.94422 6.53527 5.98773 6.66289 5.98708 6.79412L5.97061 12.7647Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,n){i&1&&(j(),y(0,"svg",0)(1,"g"),S(2,"path",1),w(),y(3,"defs")(4,"clipPath",2),S(5,"rect",3),w()()()),i&2&&(D(n.getClassNames()),I("aria-label",n.ariaLabel)("aria-hidden",n.ariaHidden)("role",n.role),s(),I("clip-path",n.pathId),s(3),r("id",n.pathId))},encapsulation:2})}return t})();var xt=(()=>{class t extends te{pathId;ngOnInit(){this.pathId="url(#"+Z()+")"}static \u0275fac=(()=>{let e;return function(n){return(e||(e=R(t)))(n||t)}})();static \u0275cmp=E({type:t,selectors:[["FilterSlashIcon"]],features:[F],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M13.4994 0.0920138C13.5967 0.151519 13.6758 0.236453 13.7283 0.337647C13.7807 0.439133 13.8031 0.553448 13.7929 0.667208C13.7827 0.780968 13.7403 0.889466 13.6707 0.98L11.406 4.06823C11.3099 4.19928 11.1656 4.28679 11.005 4.3115C10.8444 4.33621 10.6805 4.2961 10.5495 4.2C10.4184 4.1039 10.3309 3.95967 10.3062 3.79905C10.2815 3.63843 10.3216 3.47458 10.4177 3.34353L11.9412 1.23529H7.41184C7.24803 1.23529 7.09093 1.17022 6.97509 1.05439C6.85926 0.938558 6.79419 0.781457 6.79419 0.617647C6.79419 0.453837 6.85926 0.296736 6.97509 0.180905C7.09093 0.0650733 7.24803 0 7.41184 0H13.1765C13.2905 0.000692754 13.4022 0.0325088 13.4994 0.0920138ZM4.20008 0.181168H4.24126L13.2013 9.03411C13.3169 9.14992 13.3819 9.3069 13.3819 9.47058C13.3819 9.63426 13.3169 9.79124 13.2013 9.90705C13.1445 9.96517 13.0766 10.0112 13.0016 10.0423C12.9266 10.0735 12.846 10.0891 12.7648 10.0882C12.6836 10.0886 12.6032 10.0728 12.5283 10.0417C12.4533 10.0106 12.3853 9.96479 12.3283 9.90705L9.3142 6.92587L9.26479 6.99999V13.3823C9.26265 13.5455 9.19689 13.7014 9.08152 13.8167C8.96615 13.9321 8.81029 13.9979 8.64714 14H5.35302C5.18987 13.9979 5.03401 13.9321 4.91864 13.8167C4.80327 13.7014 4.73751 13.5455 4.73537 13.3823V6.99999L0.329492 1.02117C0.259855 0.930634 0.21745 0.822137 0.207241 0.708376C0.197031 0.594616 0.21944 0.480301 0.271844 0.378815C0.324343 0.277621 0.403484 0.192687 0.500724 0.133182C0.597964 0.073677 0.709609 0.041861 0.823609 0.0411682H3.86243C3.92448 0.0461551 3.9855 0.060022 4.04361 0.0823446C4.10037 0.10735 4.15311 0.140655 4.20008 0.181168ZM8.02949 6.79411C8.02884 6.66289 8.07235 6.53526 8.15302 6.43176L8.42478 6.05293L3.55773 1.23529H2.0589L5.84714 6.43176C5.92781 6.53526 5.97132 6.66289 5.97067 6.79411V12.7647H8.02949V6.79411Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,n){i&1&&(j(),y(0,"svg",0)(1,"g"),S(2,"path",1),w(),y(3,"defs")(4,"clipPath",2),S(5,"rect",3),w()()()),i&2&&(D(n.getClassNames()),I("aria-label",n.ariaLabel)("aria-hidden",n.ariaHidden)("role",n.role),s(),I("clip-path",n.pathId),s(3),r("id",n.pathId))},encapsulation:2})}return t})();var Tt=(()=>{class t extends te{pathId;ngOnInit(){this.pathId="url(#"+Z()+")"}static \u0275fac=(()=>{let e;return function(n){return(e||(e=R(t)))(n||t)}})();static \u0275cmp=E({type:t,selectors:[["PlusIcon"]],features:[F],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M7.67742 6.32258V0.677419C7.67742 0.497757 7.60605 0.325452 7.47901 0.198411C7.35197 0.0713707 7.17966 0 7 0C6.82034 0 6.64803 0.0713707 6.52099 0.198411C6.39395 0.325452 6.32258 0.497757 6.32258 0.677419V6.32258H0.677419C0.497757 6.32258 0.325452 6.39395 0.198411 6.52099C0.0713707 6.64803 0 6.82034 0 7C0 7.17966 0.0713707 7.35197 0.198411 7.47901C0.325452 7.60605 0.497757 7.67742 0.677419 7.67742H6.32258V13.3226C6.32492 13.5015 6.39704 13.6725 6.52358 13.799C6.65012 13.9255 6.82106 13.9977 7 14C7.17966 14 7.35197 13.9286 7.47901 13.8016C7.60605 13.6745 7.67742 13.5022 7.67742 13.3226V7.67742H13.3226C13.5022 7.67742 13.6745 7.60605 13.8016 7.47901C13.9286 7.35197 14 7.17966 14 7C13.9977 6.82106 13.9255 6.65012 13.799 6.52358C13.6725 6.39704 13.5015 6.32492 13.3226 6.32258H7.67742Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,n){i&1&&(j(),y(0,"svg",0)(1,"g"),S(2,"path",1),w(),y(3,"defs")(4,"clipPath",2),S(5,"rect",3),w()()()),i&2&&(D(n.getClassNames()),I("aria-label",n.ariaLabel)("aria-hidden",n.ariaHidden)("role",n.role),s(),I("clip-path",n.pathId),s(3),r("id",n.pathId))},encapsulation:2})}return t})();var St=(()=>{class t extends te{pathId;ngOnInit(){this.pathId="url(#"+Z()+")"}static \u0275fac=(()=>{let e;return function(n){return(e||(e=R(t)))(n||t)}})();static \u0275cmp=E({type:t,selectors:[["TrashIcon"]],features:[F],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M3.44802 13.9955H10.552C10.8056 14.0129 11.06 13.9797 11.3006 13.898C11.5412 13.8163 11.7632 13.6877 11.9537 13.5196C12.1442 13.3515 12.2995 13.1473 12.4104 12.9188C12.5213 12.6903 12.5858 12.442 12.6 12.1884V4.36041H13.4C13.5591 4.36041 13.7117 4.29722 13.8243 4.18476C13.9368 4.07229 14 3.91976 14 3.76071C14 3.60166 13.9368 3.44912 13.8243 3.33666C13.7117 3.22419 13.5591 3.16101 13.4 3.16101H12.0537C12.0203 3.1557 11.9863 3.15299 11.952 3.15299C11.9178 3.15299 11.8838 3.1557 11.8503 3.16101H11.2285C11.2421 3.10893 11.2487 3.05513 11.248 3.00106V1.80966C11.2171 1.30262 10.9871 0.828306 10.608 0.48989C10.229 0.151475 9.73159 -0.0236625 9.22402 0.00257442H4.77602C4.27251 -0.0171866 3.78126 0.160868 3.40746 0.498617C3.03365 0.836366 2.807 1.30697 2.77602 1.80966V3.00106C2.77602 3.0556 2.78346 3.10936 2.79776 3.16101H0.6C0.521207 3.16101 0.443185 3.17652 0.37039 3.20666C0.297595 3.2368 0.231451 3.28097 0.175736 3.33666C0.120021 3.39235 0.0758251 3.45846 0.0456722 3.53121C0.0155194 3.60397 0 3.68196 0 3.76071C0 3.83946 0.0155194 3.91744 0.0456722 3.9902C0.0758251 4.06296 0.120021 4.12907 0.175736 4.18476C0.231451 4.24045 0.297595 4.28462 0.37039 4.31476C0.443185 4.3449 0.521207 4.36041 0.6 4.36041H1.40002V12.1884C1.41426 12.442 1.47871 12.6903 1.58965 12.9188C1.7006 13.1473 1.85582 13.3515 2.04633 13.5196C2.23683 13.6877 2.45882 13.8163 2.69944 13.898C2.94005 13.9797 3.1945 14.0129 3.44802 13.9955ZM2.60002 4.36041H11.304V12.1884C11.304 12.5163 10.952 12.7961 10.504 12.7961H3.40002C2.97602 12.7961 2.60002 12.5163 2.60002 12.1884V4.36041ZM3.95429 3.16101C3.96859 3.10936 3.97602 3.0556 3.97602 3.00106V1.80966C3.97602 1.48183 4.33602 1.20197 4.77602 1.20197H9.24802C9.66403 1.20197 10.048 1.48183 10.048 1.80966V3.00106C10.0473 3.05515 10.054 3.10896 10.0678 3.16101H3.95429ZM5.57571 10.997C5.41731 10.995 5.26597 10.9311 5.15395 10.8191C5.04193 10.7071 4.97808 10.5558 4.97601 10.3973V6.77517C4.97601 6.61612 5.0392 6.46359 5.15166 6.35112C5.26413 6.23866 5.41666 6.17548 5.57571 6.17548C5.73476 6.17548 5.8873 6.23866 5.99976 6.35112C6.11223 6.46359 6.17541 6.61612 6.17541 6.77517V10.3894C6.17647 10.4688 6.16174 10.5476 6.13208 10.6213C6.10241 10.695 6.05841 10.762 6.00261 10.8186C5.94682 10.8751 5.88035 10.92 5.80707 10.9506C5.73378 10.9813 5.65514 10.9971 5.57571 10.997ZM7.99968 10.8214C8.11215 10.9339 8.26468 10.997 8.42373 10.997C8.58351 10.9949 8.73604 10.93 8.84828 10.8163C8.96052 10.7025 9.02345 10.5491 9.02343 10.3894V6.77517C9.02343 6.61612 8.96025 6.46359 8.84778 6.35112C8.73532 6.23866 8.58278 6.17548 8.42373 6.17548C8.26468 6.17548 8.11215 6.23866 7.99968 6.35112C7.88722 6.46359 7.82404 6.61612 7.82404 6.77517V10.3973C7.82404 10.5564 7.88722 10.7089 7.99968 10.8214Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,n){i&1&&(j(),y(0,"svg",0)(1,"g"),S(2,"path",1),w(),y(3,"defs")(4,"clipPath",2),S(5,"rect",3),w()()()),i&2&&(D(n.getClassNames()),I("aria-label",n.ariaLabel)("aria-hidden",n.ariaHidden)("role",n.role),s(),I("clip-path",n.pathId),s(3),r("id",n.pathId))},encapsulation:2})}return t})();var Pt=["input"],$t=(t,l,e,i,n)=>({"p-radiobutton p-component":!0,"p-radiobutton-checked":t,"p-disabled":l,"p-variant-filled":e,"p-radiobutton-sm p-inputfield-sm":i,"p-radiobutton-lg p-inputfield-lg":n}),Ht=({dt:t})=>`
1
+ import{b as _t}from"./chunk-BADUP5JT.js";import{d as bt}from"./chunk-G6C75N4Q.js";import{a as ze,b as Oe,c as Be,d as Ve,e as Pe}from"./chunk-KVJTNXOJ.js";import{a as yt,b as wt,c as Ct}from"./chunk-5N5KE4MY.js";import{f as mt,g as He,i as ft}from"./chunk-DLAMPGGR.js";import{b as pt,e as ut}from"./chunk-K7YY7ZAJ.js";import{b as $e}from"./chunk-3NJFM55L.js";import{a as gt}from"./chunk-2LFFOWKW.js";import{a as te,b as _,c as ht}from"./chunk-OI2RWAOV.js";import{a as dt,d as ct}from"./chunk-QCBXPOJL.js";import{a as ee,b as m}from"./chunk-T2PMKO3M.js";import{U as Se,V as be,ea as Z,fa as lt,ga as Le,ha as rt,ia as st,la as X,ma as $,ua as Y}from"./chunk-OE7PM4Y4.js";import{F as Te,a as ue,g as nt,h as ot,o as at}from"./chunk-CB33ZMNF.js";import{$a as s,$b as g,Ba as Ue,Db as se,Fa as x,Fc as me,Ga as _e,Gb as Xe,Hb as Ye,Ib as y,Jb as w,Ka as he,Kb as S,Kc as Fe,Lb as k,Mb as M,Mc as f,Nb as C,Nc as O,Ob as q,Pb as et,Qb as z,Rb as p,Wc as pe,Yb as b,Yc as it,Za as Je,Zb as P,Zc as ve,_b as h,ad as xe,bd as U,d as ie,db as H,dc as Me,ec as we,fc as Ce,ia as ne,ja as A,jd as J,ka as oe,kb as E,kd as fe,lb as ae,mb as ye,na as L,ob as F,pb as Ze,pc as W,qb as c,rc as Q,sc as G,ua as We,ub as I,uc as De,va as K,vb as r,vc as ce,wa as N,wc as ge,xa as j,xb as le,xc as tt,yb as re,za as R,zb as D}from"./chunk-DJOHANFC.js";import{a as ke,b as qe}from"./chunk-7DCB7DB2.js";var vt=(()=>{class t extends te{pathId;ngOnInit(){this.pathId="url(#"+Z()+")"}static \u0275fac=(()=>{let e;return function(n){return(e||(e=R(t)))(n||t)}})();static \u0275cmp=E({type:t,selectors:[["FilterIcon"]],features:[F],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M8.64708 14H5.35296C5.18981 13.9979 5.03395 13.9321 4.91858 13.8167C4.8032 13.7014 4.73745 13.5455 4.73531 13.3824V7L0.329431 0.98C0.259794 0.889466 0.217389 0.780968 0.20718 0.667208C0.19697 0.553448 0.219379 0.439133 0.271783 0.337647C0.324282 0.236453 0.403423 0.151519 0.500663 0.0920138C0.597903 0.0325088 0.709548 0.000692754 0.823548 0H13.1765C13.2905 0.000692754 13.4021 0.0325088 13.4994 0.0920138C13.5966 0.151519 13.6758 0.236453 13.7283 0.337647C13.7807 0.439133 13.8031 0.553448 13.7929 0.667208C13.7826 0.780968 13.7402 0.889466 13.6706 0.98L9.26472 7V13.3824C9.26259 13.5455 9.19683 13.7014 9.08146 13.8167C8.96609 13.9321 8.81022 13.9979 8.64708 14ZM5.97061 12.7647H8.02943V6.79412C8.02878 6.66289 8.07229 6.53527 8.15296 6.43177L11.9412 1.23529H2.05884L5.86355 6.43177C5.94422 6.53527 5.98773 6.66289 5.98708 6.79412L5.97061 12.7647Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,n){i&1&&(j(),y(0,"svg",0)(1,"g"),S(2,"path",1),w(),y(3,"defs")(4,"clipPath",2),S(5,"rect",3),w()()()),i&2&&(D(n.getClassNames()),I("aria-label",n.ariaLabel)("aria-hidden",n.ariaHidden)("role",n.role),s(),I("clip-path",n.pathId),s(3),r("id",n.pathId))},encapsulation:2})}return t})();var xt=(()=>{class t extends te{pathId;ngOnInit(){this.pathId="url(#"+Z()+")"}static \u0275fac=(()=>{let e;return function(n){return(e||(e=R(t)))(n||t)}})();static \u0275cmp=E({type:t,selectors:[["FilterSlashIcon"]],features:[F],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M13.4994 0.0920138C13.5967 0.151519 13.6758 0.236453 13.7283 0.337647C13.7807 0.439133 13.8031 0.553448 13.7929 0.667208C13.7827 0.780968 13.7403 0.889466 13.6707 0.98L11.406 4.06823C11.3099 4.19928 11.1656 4.28679 11.005 4.3115C10.8444 4.33621 10.6805 4.2961 10.5495 4.2C10.4184 4.1039 10.3309 3.95967 10.3062 3.79905C10.2815 3.63843 10.3216 3.47458 10.4177 3.34353L11.9412 1.23529H7.41184C7.24803 1.23529 7.09093 1.17022 6.97509 1.05439C6.85926 0.938558 6.79419 0.781457 6.79419 0.617647C6.79419 0.453837 6.85926 0.296736 6.97509 0.180905C7.09093 0.0650733 7.24803 0 7.41184 0H13.1765C13.2905 0.000692754 13.4022 0.0325088 13.4994 0.0920138ZM4.20008 0.181168H4.24126L13.2013 9.03411C13.3169 9.14992 13.3819 9.3069 13.3819 9.47058C13.3819 9.63426 13.3169 9.79124 13.2013 9.90705C13.1445 9.96517 13.0766 10.0112 13.0016 10.0423C12.9266 10.0735 12.846 10.0891 12.7648 10.0882C12.6836 10.0886 12.6032 10.0728 12.5283 10.0417C12.4533 10.0106 12.3853 9.96479 12.3283 9.90705L9.3142 6.92587L9.26479 6.99999V13.3823C9.26265 13.5455 9.19689 13.7014 9.08152 13.8167C8.96615 13.9321 8.81029 13.9979 8.64714 14H5.35302C5.18987 13.9979 5.03401 13.9321 4.91864 13.8167C4.80327 13.7014 4.73751 13.5455 4.73537 13.3823V6.99999L0.329492 1.02117C0.259855 0.930634 0.21745 0.822137 0.207241 0.708376C0.197031 0.594616 0.21944 0.480301 0.271844 0.378815C0.324343 0.277621 0.403484 0.192687 0.500724 0.133182C0.597964 0.073677 0.709609 0.041861 0.823609 0.0411682H3.86243C3.92448 0.0461551 3.9855 0.060022 4.04361 0.0823446C4.10037 0.10735 4.15311 0.140655 4.20008 0.181168ZM8.02949 6.79411C8.02884 6.66289 8.07235 6.53526 8.15302 6.43176L8.42478 6.05293L3.55773 1.23529H2.0589L5.84714 6.43176C5.92781 6.53526 5.97132 6.66289 5.97067 6.79411V12.7647H8.02949V6.79411Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,n){i&1&&(j(),y(0,"svg",0)(1,"g"),S(2,"path",1),w(),y(3,"defs")(4,"clipPath",2),S(5,"rect",3),w()()()),i&2&&(D(n.getClassNames()),I("aria-label",n.ariaLabel)("aria-hidden",n.ariaHidden)("role",n.role),s(),I("clip-path",n.pathId),s(3),r("id",n.pathId))},encapsulation:2})}return t})();var Tt=(()=>{class t extends te{pathId;ngOnInit(){this.pathId="url(#"+Z()+")"}static \u0275fac=(()=>{let e;return function(n){return(e||(e=R(t)))(n||t)}})();static \u0275cmp=E({type:t,selectors:[["PlusIcon"]],features:[F],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M7.67742 6.32258V0.677419C7.67742 0.497757 7.60605 0.325452 7.47901 0.198411C7.35197 0.0713707 7.17966 0 7 0C6.82034 0 6.64803 0.0713707 6.52099 0.198411C6.39395 0.325452 6.32258 0.497757 6.32258 0.677419V6.32258H0.677419C0.497757 6.32258 0.325452 6.39395 0.198411 6.52099C0.0713707 6.64803 0 6.82034 0 7C0 7.17966 0.0713707 7.35197 0.198411 7.47901C0.325452 7.60605 0.497757 7.67742 0.677419 7.67742H6.32258V13.3226C6.32492 13.5015 6.39704 13.6725 6.52358 13.799C6.65012 13.9255 6.82106 13.9977 7 14C7.17966 14 7.35197 13.9286 7.47901 13.8016C7.60605 13.6745 7.67742 13.5022 7.67742 13.3226V7.67742H13.3226C13.5022 7.67742 13.6745 7.60605 13.8016 7.47901C13.9286 7.35197 14 7.17966 14 7C13.9977 6.82106 13.9255 6.65012 13.799 6.52358C13.6725 6.39704 13.5015 6.32492 13.3226 6.32258H7.67742Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,n){i&1&&(j(),y(0,"svg",0)(1,"g"),S(2,"path",1),w(),y(3,"defs")(4,"clipPath",2),S(5,"rect",3),w()()()),i&2&&(D(n.getClassNames()),I("aria-label",n.ariaLabel)("aria-hidden",n.ariaHidden)("role",n.role),s(),I("clip-path",n.pathId),s(3),r("id",n.pathId))},encapsulation:2})}return t})();var St=(()=>{class t extends te{pathId;ngOnInit(){this.pathId="url(#"+Z()+")"}static \u0275fac=(()=>{let e;return function(n){return(e||(e=R(t)))(n||t)}})();static \u0275cmp=E({type:t,selectors:[["TrashIcon"]],features:[F],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M3.44802 13.9955H10.552C10.8056 14.0129 11.06 13.9797 11.3006 13.898C11.5412 13.8163 11.7632 13.6877 11.9537 13.5196C12.1442 13.3515 12.2995 13.1473 12.4104 12.9188C12.5213 12.6903 12.5858 12.442 12.6 12.1884V4.36041H13.4C13.5591 4.36041 13.7117 4.29722 13.8243 4.18476C13.9368 4.07229 14 3.91976 14 3.76071C14 3.60166 13.9368 3.44912 13.8243 3.33666C13.7117 3.22419 13.5591 3.16101 13.4 3.16101H12.0537C12.0203 3.1557 11.9863 3.15299 11.952 3.15299C11.9178 3.15299 11.8838 3.1557 11.8503 3.16101H11.2285C11.2421 3.10893 11.2487 3.05513 11.248 3.00106V1.80966C11.2171 1.30262 10.9871 0.828306 10.608 0.48989C10.229 0.151475 9.73159 -0.0236625 9.22402 0.00257442H4.77602C4.27251 -0.0171866 3.78126 0.160868 3.40746 0.498617C3.03365 0.836366 2.807 1.30697 2.77602 1.80966V3.00106C2.77602 3.0556 2.78346 3.10936 2.79776 3.16101H0.6C0.521207 3.16101 0.443185 3.17652 0.37039 3.20666C0.297595 3.2368 0.231451 3.28097 0.175736 3.33666C0.120021 3.39235 0.0758251 3.45846 0.0456722 3.53121C0.0155194 3.60397 0 3.68196 0 3.76071C0 3.83946 0.0155194 3.91744 0.0456722 3.9902C0.0758251 4.06296 0.120021 4.12907 0.175736 4.18476C0.231451 4.24045 0.297595 4.28462 0.37039 4.31476C0.443185 4.3449 0.521207 4.36041 0.6 4.36041H1.40002V12.1884C1.41426 12.442 1.47871 12.6903 1.58965 12.9188C1.7006 13.1473 1.85582 13.3515 2.04633 13.5196C2.23683 13.6877 2.45882 13.8163 2.69944 13.898C2.94005 13.9797 3.1945 14.0129 3.44802 13.9955ZM2.60002 4.36041H11.304V12.1884C11.304 12.5163 10.952 12.7961 10.504 12.7961H3.40002C2.97602 12.7961 2.60002 12.5163 2.60002 12.1884V4.36041ZM3.95429 3.16101C3.96859 3.10936 3.97602 3.0556 3.97602 3.00106V1.80966C3.97602 1.48183 4.33602 1.20197 4.77602 1.20197H9.24802C9.66403 1.20197 10.048 1.48183 10.048 1.80966V3.00106C10.0473 3.05515 10.054 3.10896 10.0678 3.16101H3.95429ZM5.57571 10.997C5.41731 10.995 5.26597 10.9311 5.15395 10.8191C5.04193 10.7071 4.97808 10.5558 4.97601 10.3973V6.77517C4.97601 6.61612 5.0392 6.46359 5.15166 6.35112C5.26413 6.23866 5.41666 6.17548 5.57571 6.17548C5.73476 6.17548 5.8873 6.23866 5.99976 6.35112C6.11223 6.46359 6.17541 6.61612 6.17541 6.77517V10.3894C6.17647 10.4688 6.16174 10.5476 6.13208 10.6213C6.10241 10.695 6.05841 10.762 6.00261 10.8186C5.94682 10.8751 5.88035 10.92 5.80707 10.9506C5.73378 10.9813 5.65514 10.9971 5.57571 10.997ZM7.99968 10.8214C8.11215 10.9339 8.26468 10.997 8.42373 10.997C8.58351 10.9949 8.73604 10.93 8.84828 10.8163C8.96052 10.7025 9.02345 10.5491 9.02343 10.3894V6.77517C9.02343 6.61612 8.96025 6.46359 8.84778 6.35112C8.73532 6.23866 8.58278 6.17548 8.42373 6.17548C8.26468 6.17548 8.11215 6.23866 7.99968 6.35112C7.88722 6.46359 7.82404 6.61612 7.82404 6.77517V10.3973C7.82404 10.5564 7.88722 10.7089 7.99968 10.8214Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,n){i&1&&(j(),y(0,"svg",0)(1,"g"),S(2,"path",1),w(),y(3,"defs")(4,"clipPath",2),S(5,"rect",3),w()()()),i&2&&(D(n.getClassNames()),I("aria-label",n.ariaLabel)("aria-hidden",n.ariaHidden)("role",n.role),s(),I("clip-path",n.pathId),s(3),r("id",n.pathId))},encapsulation:2})}return t})();var Pt=["input"],$t=(t,l,e,i,n)=>({"p-radiobutton p-component":!0,"p-radiobutton-checked":t,"p-disabled":l,"p-variant-filled":e,"p-radiobutton-sm p-inputfield-sm":i,"p-radiobutton-lg p-inputfield-lg":n}),Ht=({dt:t})=>`
2
2
  .p-radiobutton {
3
3
  position: relative;
4
4
  display: inline-flex;
@@ -1 +1 @@
1
- import{c as U,d as W}from"./chunk-DL2KKY4K.js";import{a as X,b as Y}from"./chunk-NW73SHIZ.js";import{b as K,c as Q}from"./chunk-XOQ4SW2R.js";import{a as A}from"./chunk-QTAOV4NJ.js";import{la as J}from"./chunk-OE7PM4Y4.js";import{F as G,h as B,o as q}from"./chunk-CB33ZMNF.js";import{a as C}from"./chunk-TKBUOGER.js";import{$a as _,Ac as k,Db as H,Fa as M,Fc as F,Ib as c,Jb as m,Nb as L,Ob as V,Qb as j,Rb as n,Y as S,Yd as d,bd as N,ca as h,cd as P,d as x,db as b,dc as I,ec as v,fa as T,ga as u,gc as E,ja as w,jd as z,kb as $,ma as O,na as D,o as f,qb as a,va as p,vb as l,wa as g,zc as R}from"./chunk-DJOHANFC.js";var y=class o{signalRClient=D(A);continuedCategories$;allCategories$;_onOpenTreeSelector=new x;onOpenTreeSelector$=this._onOpenTreeSelector.asObservable();constructor(t){this.continuedCategories$=this.onOpenTreeSelector$.pipe(u(this.signalRClient.recacheCategory$),h((e,[i,r])=>r||!e.length?(this.signalRClient.resetCategoryCache(),t.post("/api/catalog/product/GetProductStorageOptions")):f(e),[]),S(1)),this.allCategories$=this.onOpenTreeSelector$.pipe(u(this.signalRClient.recacheCategory$),h((e,[i,r])=>r||!e.length?t.get("/API/catalog/category/SelectOptions"):f(e),[]),S(1))}onOpenTreeSelector(){this._onOpenTreeSelector.next(!0)}forceLoadCategories(){this._onOpenTreeSelector.next(!0)}static \u0275fac=function(e){return new(e||o)(O(d))};static \u0275prov=w({token:o,factory:o.\u0275fac,providedIn:"root"})};function ie(o,t){o&1&&L(0)}function re(o,t){if(o&1&&(c(0,"p-floatLabel",1),a(1,ie,1,0,"ng-container",2),c(2,"label",3),v(3,"Category"),m()()),o&2){n();let e=I(3);_(),l("ngTemplateOutlet",e)}}function ne(o,t){o&1&&L(0)}function ae(o,t){if(o&1&&a(0,ne,1,0,"ng-container",2),o&2){n();let e=I(3);l("ngTemplateOutlet",e)}}function le(o,t){if(o&1&&(c(0,"div",6),v(1),m()),o&2){let e=n(2);l("matTooltip",e.selectedCategoryLabel),_(),E(" ",e.selectedCategoryLabel," ")}}function ce(o,t){if(o&1){let e=V();c(0,"p-treeSelect",4),R(1,"async"),j("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,le,2,2,"ng-template",5),m()}if(o&2){let e=n();l("options",k(1,3,e.categories$))("ngModel",e.selectedCategory)("showClear",e.showClear)}}var Z=class o{constructor(t,e){this.http=t;this.treeSelector=e}continuedCategoriesOnly=!0;categories=[];showClear=!1;showLabel=!1;isInitializedCategoryLabel=!1;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&&(C.IsEmpty(this.selectedCategoryID)&&C.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="Select Storage Location"}findSelectedCategory(t,e){if(C.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(d),b(y))};static \u0275cmp=$({type:o,selectors:[["POS-storage-location-select"]],inputs:{continuedCategoriesOnly:"continuedCategoriesOnly",categories:"categories",showClear:"showClear",showLabel:"showLabel",isInitializedCategoryLabel:"isInitializedCategoryLabel",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","placeholder","Select Storage Location",3,"click","ngModelChange","onClear","options","ngModel","showClear"],["pTemplate","value"],["matTooltipPosition","above",3,"matTooltip"]],template:function(e,i){e&1&&a(0,re,4,1,"p-floatLabel",1)(1,ae,1,1,"ng-container")(2,ce,3,5,"ng-template",null,0,F),e&2&&H(i.showLabel?0:1)},dependencies:[z,N,P,Q,K,W,U,J,G,B,q,Y,X],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{Z as a};
1
+ import{c as U,d as W}from"./chunk-EMYULNEH.js";import{a as X,b as Y}from"./chunk-NW73SHIZ.js";import{b as K,c as Q}from"./chunk-XOQ4SW2R.js";import{a as A}from"./chunk-QTAOV4NJ.js";import{la as J}from"./chunk-OE7PM4Y4.js";import{F as G,h as B,o as q}from"./chunk-CB33ZMNF.js";import{a as C}from"./chunk-TKBUOGER.js";import{$a as _,Ac as k,Db as H,Fa as M,Fc as F,Ib as c,Jb as m,Nb as L,Ob as V,Qb as j,Rb as n,Y as S,Yd as d,bd as N,ca as h,cd as P,d as x,db as b,dc as I,ec as v,fa as T,ga as u,gc as E,ja as w,jd as z,kb as $,ma as O,na as D,o as f,qb as a,va as p,vb as l,wa as g,zc as R}from"./chunk-DJOHANFC.js";var y=class o{signalRClient=D(A);continuedCategories$;allCategories$;_onOpenTreeSelector=new x;onOpenTreeSelector$=this._onOpenTreeSelector.asObservable();constructor(t){this.continuedCategories$=this.onOpenTreeSelector$.pipe(u(this.signalRClient.recacheCategory$),h((e,[i,r])=>r||!e.length?(this.signalRClient.resetCategoryCache(),t.post("/api/catalog/product/GetProductStorageOptions")):f(e),[]),S(1)),this.allCategories$=this.onOpenTreeSelector$.pipe(u(this.signalRClient.recacheCategory$),h((e,[i,r])=>r||!e.length?t.get("/API/catalog/category/SelectOptions"):f(e),[]),S(1))}onOpenTreeSelector(){this._onOpenTreeSelector.next(!0)}forceLoadCategories(){this._onOpenTreeSelector.next(!0)}static \u0275fac=function(e){return new(e||o)(O(d))};static \u0275prov=w({token:o,factory:o.\u0275fac,providedIn:"root"})};function ie(o,t){o&1&&L(0)}function re(o,t){if(o&1&&(c(0,"p-floatLabel",1),a(1,ie,1,0,"ng-container",2),c(2,"label",3),v(3,"Category"),m()()),o&2){n();let e=I(3);_(),l("ngTemplateOutlet",e)}}function ne(o,t){o&1&&L(0)}function ae(o,t){if(o&1&&a(0,ne,1,0,"ng-container",2),o&2){n();let e=I(3);l("ngTemplateOutlet",e)}}function le(o,t){if(o&1&&(c(0,"div",6),v(1),m()),o&2){let e=n(2);l("matTooltip",e.selectedCategoryLabel),_(),E(" ",e.selectedCategoryLabel," ")}}function ce(o,t){if(o&1){let e=V();c(0,"p-treeSelect",4),R(1,"async"),j("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,le,2,2,"ng-template",5),m()}if(o&2){let e=n();l("options",k(1,3,e.categories$))("ngModel",e.selectedCategory)("showClear",e.showClear)}}var Z=class o{constructor(t,e){this.http=t;this.treeSelector=e}continuedCategoriesOnly=!0;categories=[];showClear=!1;showLabel=!1;isInitializedCategoryLabel=!1;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&&(C.IsEmpty(this.selectedCategoryID)&&C.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="Select Storage Location"}findSelectedCategory(t,e){if(C.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(d),b(y))};static \u0275cmp=$({type:o,selectors:[["POS-storage-location-select"]],inputs:{continuedCategoriesOnly:"continuedCategoriesOnly",categories:"categories",showClear:"showClear",showLabel:"showLabel",isInitializedCategoryLabel:"isInitializedCategoryLabel",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","placeholder","Select Storage Location",3,"click","ngModelChange","onClear","options","ngModel","showClear"],["pTemplate","value"],["matTooltipPosition","above",3,"matTooltip"]],template:function(e,i){e&1&&a(0,re,4,1,"p-floatLabel",1)(1,ae,1,1,"ng-container")(2,ce,3,5,"ng-template",null,0,F),e&2&&H(i.showLabel?0:1)},dependencies:[z,N,P,Q,K,W,U,J,G,B,q,Y,X],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{Z as a};